diff options
Diffstat (limited to 'arch/powerpc')
100 files changed, 13802 insertions, 1406 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 967ecf92d6a7..6ffae2d2b3fa 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -300,6 +300,7 @@ config PPC_PMAC64 | |||
300 | bool | 300 | bool |
301 | depends on PPC_PMAC && POWER4 | 301 | depends on PPC_PMAC && POWER4 |
302 | select U3_DART | 302 | select U3_DART |
303 | select GENERIC_TBSYNC | ||
303 | default y | 304 | default y |
304 | 305 | ||
305 | config PPC_PREP | 306 | config PPC_PREP |
@@ -314,15 +315,17 @@ config PPC_MAPLE | |||
314 | bool " Maple 970FX Evaluation Board" | 315 | bool " Maple 970FX Evaluation Board" |
315 | select U3_DART | 316 | select U3_DART |
316 | select MPIC_BROKEN_U3 | 317 | select MPIC_BROKEN_U3 |
318 | select GENERIC_TBSYNC | ||
317 | default n | 319 | default n |
318 | help | 320 | help |
319 | This option enables support for the Maple 970FX Evaluation Board. | 321 | This option enables support for the Maple 970FX Evaluation Board. |
320 | For more informations, refer to <http://www.970eval.com> | 322 | For more informations, refer to <http://www.970eval.com> |
321 | 323 | ||
322 | config PPC_BPA | 324 | config PPC_CELL |
323 | bool " Broadband Processor Architecture" | 325 | bool " Cell Broadband Processor Architecture" |
324 | depends on PPC_MULTIPLATFORM && PPC64 | 326 | depends on PPC_MULTIPLATFORM && PPC64 |
325 | select PPC_RTAS | 327 | select PPC_RTAS |
328 | select MMIO_NVRAM | ||
326 | 329 | ||
327 | config PPC_OF | 330 | config PPC_OF |
328 | bool | 331 | bool |
@@ -353,13 +356,26 @@ config RTAS_ERROR_LOGGING | |||
353 | depends on PPC_RTAS | 356 | depends on PPC_RTAS |
354 | default n | 357 | default n |
355 | 358 | ||
359 | config RTAS_PROC | ||
360 | bool "Proc interface to RTAS" | ||
361 | depends on PPC_RTAS | ||
362 | default y | ||
363 | |||
364 | config RTAS_FLASH | ||
365 | tristate "Firmware flash interface" | ||
366 | depends on PPC64 && RTAS_PROC | ||
367 | |||
368 | config MMIO_NVRAM | ||
369 | bool | ||
370 | default n | ||
371 | |||
356 | config MPIC_BROKEN_U3 | 372 | config MPIC_BROKEN_U3 |
357 | bool | 373 | bool |
358 | depends on PPC_MAPLE | 374 | depends on PPC_MAPLE |
359 | default y | 375 | default y |
360 | 376 | ||
361 | config BPA_IIC | 377 | config CELL_IIC |
362 | depends on PPC_BPA | 378 | depends on PPC_CELL |
363 | bool | 379 | bool |
364 | default y | 380 | default y |
365 | 381 | ||
@@ -372,6 +388,11 @@ config PPC_MPC106 | |||
372 | bool | 388 | bool |
373 | default n | 389 | default n |
374 | 390 | ||
391 | config GENERIC_TBSYNC | ||
392 | bool | ||
393 | default y if CONFIG_PPC32 && CONFIG_SMP | ||
394 | default n | ||
395 | |||
375 | source "drivers/cpufreq/Kconfig" | 396 | source "drivers/cpufreq/Kconfig" |
376 | 397 | ||
377 | config CPU_FREQ_PMAC | 398 | config CPU_FREQ_PMAC |
@@ -582,6 +603,16 @@ config NODES_SPAN_OTHER_NODES | |||
582 | def_bool y | 603 | def_bool y |
583 | depends on NEED_MULTIPLE_NODES | 604 | depends on NEED_MULTIPLE_NODES |
584 | 605 | ||
606 | config PPC_64K_PAGES | ||
607 | bool "64k page size" | ||
608 | depends on PPC64 | ||
609 | help | ||
610 | This option changes the kernel logical page size to 64k. On machines | ||
611 | without processor support for 64k pages, the kernel will simulate | ||
612 | them by loading each individual 4k page on demand transparently, | ||
613 | while on hardware with such support, it will be used to map | ||
614 | normal application pages. | ||
615 | |||
585 | config SCHED_SMT | 616 | config SCHED_SMT |
586 | bool "SMT (Hyperthreading) scheduler support" | 617 | bool "SMT (Hyperthreading) scheduler support" |
587 | depends on PPC64 && SMP | 618 | depends on PPC64 && SMP |
@@ -886,8 +917,21 @@ source "arch/powerpc/platforms/iseries/Kconfig" | |||
886 | 917 | ||
887 | source "lib/Kconfig" | 918 | source "lib/Kconfig" |
888 | 919 | ||
920 | menu "Instrumentation Support" | ||
921 | depends on EXPERIMENTAL | ||
922 | |||
889 | source "arch/powerpc/oprofile/Kconfig" | 923 | source "arch/powerpc/oprofile/Kconfig" |
890 | 924 | ||
925 | config KPROBES | ||
926 | bool "Kprobes (EXPERIMENTAL)" | ||
927 | help | ||
928 | Kprobes allows you to trap at almost any kernel address and | ||
929 | execute a callback function. register_kprobe() establishes | ||
930 | a probepoint and specifies the callback. Kprobes is useful | ||
931 | for kernel debugging, non-intrusive instrumentation and testing. | ||
932 | If in doubt, say "N". | ||
933 | endmenu | ||
934 | |||
891 | source "arch/powerpc/Kconfig.debug" | 935 | source "arch/powerpc/Kconfig.debug" |
892 | 936 | ||
893 | source "security/Kconfig" | 937 | source "security/Kconfig" |
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index 0baf64ec80d0..30a30bf559ea 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug | |||
@@ -9,16 +9,6 @@ config DEBUG_STACKOVERFLOW | |||
9 | This option will cause messages to be printed if free stack space | 9 | This option will cause messages to be printed if free stack space |
10 | drops below a certain limit. | 10 | drops below a certain limit. |
11 | 11 | ||
12 | config KPROBES | ||
13 | bool "Kprobes" | ||
14 | depends on DEBUG_KERNEL && PPC64 | ||
15 | help | ||
16 | Kprobes allows you to trap at almost any kernel address and | ||
17 | execute a callback function. register_kprobe() establishes | ||
18 | a probepoint and specifies the callback. Kprobes is useful | ||
19 | for kernel debugging, non-intrusive instrumentation and testing. | ||
20 | If in doubt, say "N". | ||
21 | |||
22 | config DEBUG_STACK_USAGE | 12 | config DEBUG_STACK_USAGE |
23 | bool "Stack utilization instrumentation" | 13 | bool "Stack utilization instrumentation" |
24 | depends on DEBUG_KERNEL && PPC64 | 14 | depends on DEBUG_KERNEL && PPC64 |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 2f4cce06a7e5..5bc11bd36c1f 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -12,9 +12,6 @@ | |||
12 | # Rewritten by Cort Dougan and Paul Mackerras | 12 | # Rewritten by Cort Dougan and Paul Mackerras |
13 | # | 13 | # |
14 | 14 | ||
15 | # This must match PAGE_OFFSET in include/asm-powerpc/page.h. | ||
16 | KERNELLOAD := $(CONFIG_KERNEL_START) | ||
17 | |||
18 | HAS_BIARCH := $(call cc-option-yn, -m32) | 15 | HAS_BIARCH := $(call cc-option-yn, -m32) |
19 | 16 | ||
20 | ifeq ($(CONFIG_PPC64),y) | 17 | ifeq ($(CONFIG_PPC64),y) |
@@ -59,7 +56,7 @@ override LD += -m elf$(SZ)ppc | |||
59 | override CC += -m$(SZ) | 56 | override CC += -m$(SZ) |
60 | endif | 57 | endif |
61 | 58 | ||
62 | LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic -e $(KERNELLOAD) | 59 | LDFLAGS_vmlinux := -Bstatic |
63 | 60 | ||
64 | # The -Iarch/$(ARCH)/include is temporary while we are merging | 61 | # The -Iarch/$(ARCH)/include is temporary while we are merging |
65 | CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include | 62 | CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include |
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig new file mode 100644 index 000000000000..67ffecbc05cb --- /dev/null +++ b/arch/powerpc/configs/cell_defconfig | |||
@@ -0,0 +1,1024 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.14-rc4 | ||
4 | # Thu Oct 20 08:29:10 2005 | ||
5 | # | ||
6 | CONFIG_64BIT=y | ||
7 | CONFIG_MMU=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_GENERIC_ISA_DMA=y | ||
11 | CONFIG_EARLY_PRINTK=y | ||
12 | CONFIG_COMPAT=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
16 | |||
17 | # | ||
18 | # Code maturity level options | ||
19 | # | ||
20 | CONFIG_EXPERIMENTAL=y | ||
21 | CONFIG_CLEAN_COMPILE=y | ||
22 | CONFIG_LOCK_KERNEL=y | ||
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
24 | |||
25 | # | ||
26 | # General setup | ||
27 | # | ||
28 | CONFIG_LOCALVERSION="" | ||
29 | CONFIG_LOCALVERSION_AUTO=y | ||
30 | CONFIG_SWAP=y | ||
31 | CONFIG_SYSVIPC=y | ||
32 | # CONFIG_POSIX_MQUEUE is not set | ||
33 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
34 | CONFIG_SYSCTL=y | ||
35 | # CONFIG_AUDIT is not set | ||
36 | CONFIG_HOTPLUG=y | ||
37 | CONFIG_KOBJECT_UEVENT=y | ||
38 | # CONFIG_IKCONFIG is not set | ||
39 | # CONFIG_CPUSETS is not set | ||
40 | CONFIG_INITRAMFS_SOURCE="" | ||
41 | # CONFIG_EMBEDDED is not set | ||
42 | CONFIG_KALLSYMS=y | ||
43 | # CONFIG_KALLSYMS_ALL is not set | ||
44 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
45 | CONFIG_PRINTK=y | ||
46 | CONFIG_BUG=y | ||
47 | CONFIG_BASE_FULL=y | ||
48 | CONFIG_FUTEX=y | ||
49 | CONFIG_EPOLL=y | ||
50 | CONFIG_SHMEM=y | ||
51 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
52 | CONFIG_CC_ALIGN_LABELS=0 | ||
53 | CONFIG_CC_ALIGN_LOOPS=0 | ||
54 | CONFIG_CC_ALIGN_JUMPS=0 | ||
55 | # CONFIG_TINY_SHMEM is not set | ||
56 | CONFIG_BASE_SMALL=0 | ||
57 | |||
58 | # | ||
59 | # Loadable module support | ||
60 | # | ||
61 | CONFIG_MODULES=y | ||
62 | CONFIG_MODULE_UNLOAD=y | ||
63 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
64 | CONFIG_OBSOLETE_MODPARM=y | ||
65 | # CONFIG_MODVERSIONS is not set | ||
66 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
67 | # CONFIG_KMOD is not set | ||
68 | CONFIG_STOP_MACHINE=y | ||
69 | CONFIG_SYSVIPC_COMPAT=y | ||
70 | |||
71 | # | ||
72 | # Platform support | ||
73 | # | ||
74 | # CONFIG_PPC_ISERIES is not set | ||
75 | CONFIG_PPC_MULTIPLATFORM=y | ||
76 | # CONFIG_PPC_PSERIES is not set | ||
77 | CONFIG_PPC_BPA=y | ||
78 | # CONFIG_PPC_PMAC is not set | ||
79 | # CONFIG_PPC_MAPLE is not set | ||
80 | CONFIG_PPC=y | ||
81 | CONFIG_PPC64=y | ||
82 | CONFIG_PPC_OF=y | ||
83 | CONFIG_BPA_IIC=y | ||
84 | CONFIG_ALTIVEC=y | ||
85 | CONFIG_KEXEC=y | ||
86 | # CONFIG_U3_DART is not set | ||
87 | # CONFIG_BOOTX_TEXT is not set | ||
88 | # CONFIG_POWER4_ONLY is not set | ||
89 | # CONFIG_IOMMU_VMERGE is not set | ||
90 | CONFIG_SMP=y | ||
91 | CONFIG_NR_CPUS=4 | ||
92 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | ||
93 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
94 | CONFIG_SELECT_MEMORY_MODEL=y | ||
95 | CONFIG_FLATMEM_MANUAL=y | ||
96 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
97 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
98 | CONFIG_FLATMEM=y | ||
99 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
100 | # CONFIG_SPARSEMEM_STATIC is not set | ||
101 | # CONFIG_NUMA is not set | ||
102 | CONFIG_SCHED_SMT=y | ||
103 | CONFIG_PREEMPT_NONE=y | ||
104 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
105 | # CONFIG_PREEMPT is not set | ||
106 | CONFIG_PREEMPT_BKL=y | ||
107 | # CONFIG_HZ_100 is not set | ||
108 | CONFIG_HZ_250=y | ||
109 | # CONFIG_HZ_1000 is not set | ||
110 | CONFIG_HZ=250 | ||
111 | CONFIG_GENERIC_HARDIRQS=y | ||
112 | CONFIG_PPC_RTAS=y | ||
113 | CONFIG_RTAS_PROC=y | ||
114 | CONFIG_RTAS_FLASH=y | ||
115 | CONFIG_SECCOMP=y | ||
116 | CONFIG_BINFMT_ELF=y | ||
117 | # CONFIG_BINFMT_MISC is not set | ||
118 | CONFIG_PROC_DEVICETREE=y | ||
119 | # CONFIG_CMDLINE_BOOL is not set | ||
120 | CONFIG_ISA_DMA_API=y | ||
121 | |||
122 | # | ||
123 | # Bus Options | ||
124 | # | ||
125 | CONFIG_PCI=y | ||
126 | CONFIG_PCI_DOMAINS=y | ||
127 | CONFIG_PCI_LEGACY_PROC=y | ||
128 | # CONFIG_PCI_DEBUG is not set | ||
129 | |||
130 | # | ||
131 | # PCCARD (PCMCIA/CardBus) support | ||
132 | # | ||
133 | # CONFIG_PCCARD is not set | ||
134 | |||
135 | # | ||
136 | # PCI Hotplug Support | ||
137 | # | ||
138 | # CONFIG_HOTPLUG_PCI is not set | ||
139 | |||
140 | # | ||
141 | # Networking | ||
142 | # | ||
143 | CONFIG_NET=y | ||
144 | |||
145 | # | ||
146 | # Networking options | ||
147 | # | ||
148 | CONFIG_PACKET=y | ||
149 | # CONFIG_PACKET_MMAP is not set | ||
150 | CONFIG_UNIX=y | ||
151 | CONFIG_XFRM=y | ||
152 | # CONFIG_XFRM_USER is not set | ||
153 | # CONFIG_NET_KEY is not set | ||
154 | CONFIG_INET=y | ||
155 | CONFIG_IP_MULTICAST=y | ||
156 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
157 | CONFIG_IP_FIB_HASH=y | ||
158 | # CONFIG_IP_PNP is not set | ||
159 | CONFIG_NET_IPIP=y | ||
160 | # CONFIG_NET_IPGRE is not set | ||
161 | # CONFIG_IP_MROUTE is not set | ||
162 | # CONFIG_ARPD is not set | ||
163 | CONFIG_SYN_COOKIES=y | ||
164 | # CONFIG_INET_AH is not set | ||
165 | # CONFIG_INET_ESP is not set | ||
166 | # CONFIG_INET_IPCOMP is not set | ||
167 | CONFIG_INET_TUNNEL=y | ||
168 | CONFIG_INET_DIAG=y | ||
169 | CONFIG_INET_TCP_DIAG=y | ||
170 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
171 | CONFIG_TCP_CONG_BIC=y | ||
172 | |||
173 | # | ||
174 | # IP: Virtual Server Configuration | ||
175 | # | ||
176 | # CONFIG_IP_VS is not set | ||
177 | CONFIG_IPV6=y | ||
178 | # CONFIG_IPV6_PRIVACY is not set | ||
179 | CONFIG_INET6_AH=m | ||
180 | CONFIG_INET6_ESP=m | ||
181 | CONFIG_INET6_IPCOMP=m | ||
182 | CONFIG_INET6_TUNNEL=m | ||
183 | CONFIG_IPV6_TUNNEL=m | ||
184 | CONFIG_NETFILTER=y | ||
185 | # CONFIG_NETFILTER_DEBUG is not set | ||
186 | # CONFIG_NETFILTER_NETLINK is not set | ||
187 | |||
188 | # | ||
189 | # IP: Netfilter Configuration | ||
190 | # | ||
191 | CONFIG_IP_NF_CONNTRACK=y | ||
192 | # CONFIG_IP_NF_CT_ACCT is not set | ||
193 | # CONFIG_IP_NF_CONNTRACK_MARK is not set | ||
194 | # CONFIG_IP_NF_CONNTRACK_EVENTS is not set | ||
195 | CONFIG_IP_NF_CT_PROTO_SCTP=y | ||
196 | CONFIG_IP_NF_FTP=m | ||
197 | CONFIG_IP_NF_IRC=m | ||
198 | # CONFIG_IP_NF_NETBIOS_NS is not set | ||
199 | CONFIG_IP_NF_TFTP=m | ||
200 | CONFIG_IP_NF_AMANDA=m | ||
201 | # CONFIG_IP_NF_PPTP is not set | ||
202 | CONFIG_IP_NF_QUEUE=m | ||
203 | CONFIG_IP_NF_IPTABLES=m | ||
204 | CONFIG_IP_NF_MATCH_LIMIT=m | ||
205 | CONFIG_IP_NF_MATCH_IPRANGE=m | ||
206 | CONFIG_IP_NF_MATCH_MAC=m | ||
207 | CONFIG_IP_NF_MATCH_PKTTYPE=m | ||
208 | CONFIG_IP_NF_MATCH_MARK=m | ||
209 | CONFIG_IP_NF_MATCH_MULTIPORT=m | ||
210 | CONFIG_IP_NF_MATCH_TOS=m | ||
211 | CONFIG_IP_NF_MATCH_RECENT=m | ||
212 | CONFIG_IP_NF_MATCH_ECN=m | ||
213 | CONFIG_IP_NF_MATCH_DSCP=m | ||
214 | CONFIG_IP_NF_MATCH_AH_ESP=m | ||
215 | CONFIG_IP_NF_MATCH_LENGTH=m | ||
216 | CONFIG_IP_NF_MATCH_TTL=m | ||
217 | CONFIG_IP_NF_MATCH_TCPMSS=m | ||
218 | CONFIG_IP_NF_MATCH_HELPER=m | ||
219 | CONFIG_IP_NF_MATCH_STATE=m | ||
220 | CONFIG_IP_NF_MATCH_CONNTRACK=m | ||
221 | CONFIG_IP_NF_MATCH_OWNER=m | ||
222 | CONFIG_IP_NF_MATCH_ADDRTYPE=m | ||
223 | CONFIG_IP_NF_MATCH_REALM=m | ||
224 | CONFIG_IP_NF_MATCH_SCTP=m | ||
225 | # CONFIG_IP_NF_MATCH_DCCP is not set | ||
226 | CONFIG_IP_NF_MATCH_COMMENT=m | ||
227 | CONFIG_IP_NF_MATCH_HASHLIMIT=m | ||
228 | CONFIG_IP_NF_MATCH_STRING=m | ||
229 | CONFIG_IP_NF_FILTER=m | ||
230 | CONFIG_IP_NF_TARGET_REJECT=m | ||
231 | CONFIG_IP_NF_TARGET_LOG=m | ||
232 | CONFIG_IP_NF_TARGET_ULOG=m | ||
233 | CONFIG_IP_NF_TARGET_TCPMSS=m | ||
234 | CONFIG_IP_NF_TARGET_NFQUEUE=m | ||
235 | CONFIG_IP_NF_NAT=m | ||
236 | CONFIG_IP_NF_NAT_NEEDED=y | ||
237 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
238 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
239 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
240 | CONFIG_IP_NF_TARGET_SAME=m | ||
241 | CONFIG_IP_NF_NAT_SNMP_BASIC=m | ||
242 | CONFIG_IP_NF_NAT_IRC=m | ||
243 | CONFIG_IP_NF_NAT_FTP=m | ||
244 | CONFIG_IP_NF_NAT_TFTP=m | ||
245 | CONFIG_IP_NF_NAT_AMANDA=m | ||
246 | CONFIG_IP_NF_MANGLE=m | ||
247 | CONFIG_IP_NF_TARGET_TOS=m | ||
248 | CONFIG_IP_NF_TARGET_ECN=m | ||
249 | CONFIG_IP_NF_TARGET_DSCP=m | ||
250 | CONFIG_IP_NF_TARGET_MARK=m | ||
251 | CONFIG_IP_NF_TARGET_CLASSIFY=m | ||
252 | CONFIG_IP_NF_TARGET_TTL=m | ||
253 | CONFIG_IP_NF_RAW=m | ||
254 | CONFIG_IP_NF_TARGET_NOTRACK=m | ||
255 | CONFIG_IP_NF_ARPTABLES=m | ||
256 | CONFIG_IP_NF_ARPFILTER=m | ||
257 | CONFIG_IP_NF_ARP_MANGLE=m | ||
258 | |||
259 | # | ||
260 | # IPv6: Netfilter Configuration (EXPERIMENTAL) | ||
261 | # | ||
262 | # CONFIG_IP6_NF_QUEUE is not set | ||
263 | # CONFIG_IP6_NF_IPTABLES is not set | ||
264 | # CONFIG_IP6_NF_TARGET_NFQUEUE is not set | ||
265 | |||
266 | # | ||
267 | # DCCP Configuration (EXPERIMENTAL) | ||
268 | # | ||
269 | # CONFIG_IP_DCCP is not set | ||
270 | |||
271 | # | ||
272 | # SCTP Configuration (EXPERIMENTAL) | ||
273 | # | ||
274 | # CONFIG_IP_SCTP is not set | ||
275 | # CONFIG_ATM is not set | ||
276 | # CONFIG_BRIDGE is not set | ||
277 | # CONFIG_VLAN_8021Q is not set | ||
278 | # CONFIG_DECNET is not set | ||
279 | # CONFIG_LLC2 is not set | ||
280 | # CONFIG_IPX is not set | ||
281 | # CONFIG_ATALK is not set | ||
282 | # CONFIG_X25 is not set | ||
283 | # CONFIG_LAPB is not set | ||
284 | # CONFIG_NET_DIVERT is not set | ||
285 | # CONFIG_ECONET is not set | ||
286 | # CONFIG_WAN_ROUTER is not set | ||
287 | # CONFIG_NET_SCHED is not set | ||
288 | CONFIG_NET_CLS_ROUTE=y | ||
289 | |||
290 | # | ||
291 | # Network testing | ||
292 | # | ||
293 | # CONFIG_NET_PKTGEN is not set | ||
294 | # CONFIG_HAMRADIO is not set | ||
295 | # CONFIG_IRDA is not set | ||
296 | # CONFIG_BT is not set | ||
297 | # CONFIG_IEEE80211 is not set | ||
298 | |||
299 | # | ||
300 | # Device Drivers | ||
301 | # | ||
302 | |||
303 | # | ||
304 | # Generic Driver Options | ||
305 | # | ||
306 | CONFIG_STANDALONE=y | ||
307 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
308 | CONFIG_FW_LOADER=y | ||
309 | # CONFIG_DEBUG_DRIVER is not set | ||
310 | |||
311 | # | ||
312 | # Connector - unified userspace <-> kernelspace linker | ||
313 | # | ||
314 | # CONFIG_CONNECTOR is not set | ||
315 | |||
316 | # | ||
317 | # Memory Technology Devices (MTD) | ||
318 | # | ||
319 | # CONFIG_MTD is not set | ||
320 | |||
321 | # | ||
322 | # Parallel port support | ||
323 | # | ||
324 | # CONFIG_PARPORT is not set | ||
325 | |||
326 | # | ||
327 | # Plug and Play support | ||
328 | # | ||
329 | |||
330 | # | ||
331 | # Block devices | ||
332 | # | ||
333 | # CONFIG_BLK_DEV_FD is not set | ||
334 | # CONFIG_BLK_CPQ_DA is not set | ||
335 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
336 | # CONFIG_BLK_DEV_DAC960 is not set | ||
337 | # CONFIG_BLK_DEV_UMEM is not set | ||
338 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
339 | CONFIG_BLK_DEV_LOOP=y | ||
340 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
341 | CONFIG_BLK_DEV_NBD=y | ||
342 | # CONFIG_BLK_DEV_SX8 is not set | ||
343 | CONFIG_BLK_DEV_RAM=y | ||
344 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
345 | CONFIG_BLK_DEV_RAM_SIZE=131072 | ||
346 | CONFIG_BLK_DEV_INITRD=y | ||
347 | # CONFIG_CDROM_PKTCDVD is not set | ||
348 | |||
349 | # | ||
350 | # IO Schedulers | ||
351 | # | ||
352 | CONFIG_IOSCHED_NOOP=y | ||
353 | CONFIG_IOSCHED_AS=y | ||
354 | CONFIG_IOSCHED_DEADLINE=y | ||
355 | CONFIG_IOSCHED_CFQ=y | ||
356 | # CONFIG_ATA_OVER_ETH is not set | ||
357 | |||
358 | # | ||
359 | # ATA/ATAPI/MFM/RLL support | ||
360 | # | ||
361 | CONFIG_IDE=y | ||
362 | CONFIG_BLK_DEV_IDE=y | ||
363 | |||
364 | # | ||
365 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
366 | # | ||
367 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
368 | CONFIG_BLK_DEV_IDEDISK=y | ||
369 | CONFIG_IDEDISK_MULTI_MODE=y | ||
370 | # CONFIG_BLK_DEV_IDECD is not set | ||
371 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
372 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
373 | # CONFIG_IDE_TASK_IOCTL is not set | ||
374 | |||
375 | # | ||
376 | # IDE chipset support/bugfixes | ||
377 | # | ||
378 | CONFIG_IDE_GENERIC=y | ||
379 | CONFIG_BLK_DEV_IDEPCI=y | ||
380 | CONFIG_IDEPCI_SHARE_IRQ=y | ||
381 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
382 | CONFIG_BLK_DEV_GENERIC=y | ||
383 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
384 | # CONFIG_BLK_DEV_SL82C105 is not set | ||
385 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
386 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
387 | CONFIG_IDEDMA_PCI_AUTO=y | ||
388 | # CONFIG_IDEDMA_ONLYDISK is not set | ||
389 | CONFIG_BLK_DEV_AEC62XX=y | ||
390 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
391 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
392 | # CONFIG_BLK_DEV_CMD64X is not set | ||
393 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
394 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
395 | # CONFIG_BLK_DEV_CS5520 is not set | ||
396 | # CONFIG_BLK_DEV_CS5530 is not set | ||
397 | # CONFIG_BLK_DEV_HPT34X is not set | ||
398 | # CONFIG_BLK_DEV_HPT366 is not set | ||
399 | # CONFIG_BLK_DEV_SC1200 is not set | ||
400 | # CONFIG_BLK_DEV_PIIX is not set | ||
401 | # CONFIG_BLK_DEV_IT821X is not set | ||
402 | # CONFIG_BLK_DEV_NS87415 is not set | ||
403 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
404 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
405 | # CONFIG_BLK_DEV_SVWKS is not set | ||
406 | CONFIG_BLK_DEV_SIIMAGE=y | ||
407 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
408 | # CONFIG_BLK_DEV_TRM290 is not set | ||
409 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
410 | # CONFIG_IDE_ARM is not set | ||
411 | CONFIG_BLK_DEV_IDEDMA=y | ||
412 | # CONFIG_IDEDMA_IVB is not set | ||
413 | CONFIG_IDEDMA_AUTO=y | ||
414 | # CONFIG_BLK_DEV_HD is not set | ||
415 | |||
416 | # | ||
417 | # SCSI device support | ||
418 | # | ||
419 | # CONFIG_RAID_ATTRS is not set | ||
420 | # CONFIG_SCSI is not set | ||
421 | |||
422 | # | ||
423 | # Multi-device support (RAID and LVM) | ||
424 | # | ||
425 | # CONFIG_MD is not set | ||
426 | |||
427 | # | ||
428 | # Fusion MPT device support | ||
429 | # | ||
430 | # CONFIG_FUSION is not set | ||
431 | |||
432 | # | ||
433 | # IEEE 1394 (FireWire) support | ||
434 | # | ||
435 | # CONFIG_IEEE1394 is not set | ||
436 | |||
437 | # | ||
438 | # I2O device support | ||
439 | # | ||
440 | # CONFIG_I2O is not set | ||
441 | |||
442 | # | ||
443 | # Macintosh device drivers | ||
444 | # | ||
445 | |||
446 | # | ||
447 | # Network device support | ||
448 | # | ||
449 | CONFIG_NETDEVICES=y | ||
450 | # CONFIG_DUMMY is not set | ||
451 | # CONFIG_BONDING is not set | ||
452 | # CONFIG_EQUALIZER is not set | ||
453 | # CONFIG_TUN is not set | ||
454 | |||
455 | # | ||
456 | # ARCnet devices | ||
457 | # | ||
458 | # CONFIG_ARCNET is not set | ||
459 | |||
460 | # | ||
461 | # PHY device support | ||
462 | # | ||
463 | # CONFIG_PHYLIB is not set | ||
464 | |||
465 | # | ||
466 | # Ethernet (10 or 100Mbit) | ||
467 | # | ||
468 | CONFIG_NET_ETHERNET=y | ||
469 | CONFIG_MII=y | ||
470 | # CONFIG_HAPPYMEAL is not set | ||
471 | # CONFIG_SUNGEM is not set | ||
472 | # CONFIG_CASSINI is not set | ||
473 | # CONFIG_NET_VENDOR_3COM is not set | ||
474 | |||
475 | # | ||
476 | # Tulip family network device support | ||
477 | # | ||
478 | # CONFIG_NET_TULIP is not set | ||
479 | # CONFIG_HP100 is not set | ||
480 | # CONFIG_NET_PCI is not set | ||
481 | |||
482 | # | ||
483 | # Ethernet (1000 Mbit) | ||
484 | # | ||
485 | # CONFIG_ACENIC is not set | ||
486 | # CONFIG_DL2K is not set | ||
487 | CONFIG_E1000=m | ||
488 | # CONFIG_E1000_NAPI is not set | ||
489 | # CONFIG_NS83820 is not set | ||
490 | # CONFIG_HAMACHI is not set | ||
491 | # CONFIG_YELLOWFIN is not set | ||
492 | # CONFIG_R8169 is not set | ||
493 | # CONFIG_SIS190 is not set | ||
494 | CONFIG_SKGE=m | ||
495 | # CONFIG_SK98LIN is not set | ||
496 | # CONFIG_TIGON3 is not set | ||
497 | # CONFIG_BNX2 is not set | ||
498 | # CONFIG_SPIDER_NET is not set | ||
499 | # CONFIG_MV643XX_ETH is not set | ||
500 | |||
501 | # | ||
502 | # Ethernet (10000 Mbit) | ||
503 | # | ||
504 | # CONFIG_CHELSIO_T1 is not set | ||
505 | # CONFIG_IXGB is not set | ||
506 | # CONFIG_S2IO is not set | ||
507 | |||
508 | # | ||
509 | # Token Ring devices | ||
510 | # | ||
511 | # CONFIG_TR is not set | ||
512 | |||
513 | # | ||
514 | # Wireless LAN (non-hamradio) | ||
515 | # | ||
516 | # CONFIG_NET_RADIO is not set | ||
517 | |||
518 | # | ||
519 | # Wan interfaces | ||
520 | # | ||
521 | # CONFIG_WAN is not set | ||
522 | # CONFIG_FDDI is not set | ||
523 | # CONFIG_HIPPI is not set | ||
524 | # CONFIG_PPP is not set | ||
525 | # CONFIG_SLIP is not set | ||
526 | # CONFIG_SHAPER is not set | ||
527 | # CONFIG_NETCONSOLE is not set | ||
528 | # CONFIG_NETPOLL is not set | ||
529 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
530 | |||
531 | # | ||
532 | # ISDN subsystem | ||
533 | # | ||
534 | # CONFIG_ISDN is not set | ||
535 | |||
536 | # | ||
537 | # Telephony Support | ||
538 | # | ||
539 | # CONFIG_PHONE is not set | ||
540 | |||
541 | # | ||
542 | # Input device support | ||
543 | # | ||
544 | CONFIG_INPUT=y | ||
545 | |||
546 | # | ||
547 | # Userland interfaces | ||
548 | # | ||
549 | CONFIG_INPUT_MOUSEDEV=y | ||
550 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
551 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
552 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
553 | # CONFIG_INPUT_JOYDEV is not set | ||
554 | # CONFIG_INPUT_TSDEV is not set | ||
555 | # CONFIG_INPUT_EVDEV is not set | ||
556 | # CONFIG_INPUT_EVBUG is not set | ||
557 | |||
558 | # | ||
559 | # Input Device Drivers | ||
560 | # | ||
561 | # CONFIG_INPUT_KEYBOARD is not set | ||
562 | # CONFIG_INPUT_MOUSE is not set | ||
563 | # CONFIG_INPUT_JOYSTICK is not set | ||
564 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
565 | # CONFIG_INPUT_MISC is not set | ||
566 | |||
567 | # | ||
568 | # Hardware I/O ports | ||
569 | # | ||
570 | CONFIG_SERIO=y | ||
571 | # CONFIG_SERIO_I8042 is not set | ||
572 | CONFIG_SERIO_SERPORT=y | ||
573 | # CONFIG_SERIO_PCIPS2 is not set | ||
574 | # CONFIG_SERIO_RAW is not set | ||
575 | # CONFIG_GAMEPORT is not set | ||
576 | |||
577 | # | ||
578 | # Character devices | ||
579 | # | ||
580 | CONFIG_VT=y | ||
581 | CONFIG_VT_CONSOLE=y | ||
582 | CONFIG_HW_CONSOLE=y | ||
583 | CONFIG_SERIAL_NONSTANDARD=y | ||
584 | # CONFIG_ROCKETPORT is not set | ||
585 | # CONFIG_CYCLADES is not set | ||
586 | # CONFIG_DIGIEPCA is not set | ||
587 | # CONFIG_MOXA_SMARTIO is not set | ||
588 | # CONFIG_ISI is not set | ||
589 | # CONFIG_SYNCLINK is not set | ||
590 | # CONFIG_SYNCLINKMP is not set | ||
591 | # CONFIG_N_HDLC is not set | ||
592 | # CONFIG_SPECIALIX is not set | ||
593 | # CONFIG_SX is not set | ||
594 | # CONFIG_STALDRV is not set | ||
595 | |||
596 | # | ||
597 | # Serial drivers | ||
598 | # | ||
599 | CONFIG_SERIAL_8250=y | ||
600 | CONFIG_SERIAL_8250_CONSOLE=y | ||
601 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
602 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
603 | |||
604 | # | ||
605 | # Non-8250 serial port support | ||
606 | # | ||
607 | CONFIG_SERIAL_CORE=y | ||
608 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
609 | # CONFIG_SERIAL_JSM is not set | ||
610 | CONFIG_UNIX98_PTYS=y | ||
611 | # CONFIG_LEGACY_PTYS is not set | ||
612 | |||
613 | # | ||
614 | # IPMI | ||
615 | # | ||
616 | # CONFIG_IPMI_HANDLER is not set | ||
617 | |||
618 | # | ||
619 | # Watchdog Cards | ||
620 | # | ||
621 | CONFIG_WATCHDOG=y | ||
622 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
623 | |||
624 | # | ||
625 | # Watchdog Device Drivers | ||
626 | # | ||
627 | # CONFIG_SOFT_WATCHDOG is not set | ||
628 | CONFIG_WATCHDOG_RTAS=y | ||
629 | |||
630 | # | ||
631 | # PCI-based Watchdog Cards | ||
632 | # | ||
633 | # CONFIG_PCIPCWATCHDOG is not set | ||
634 | # CONFIG_WDTPCI is not set | ||
635 | # CONFIG_RTC is not set | ||
636 | # CONFIG_DTLK is not set | ||
637 | # CONFIG_R3964 is not set | ||
638 | # CONFIG_APPLICOM is not set | ||
639 | |||
640 | # | ||
641 | # Ftape, the floppy tape device driver | ||
642 | # | ||
643 | # CONFIG_AGP is not set | ||
644 | # CONFIG_DRM is not set | ||
645 | # CONFIG_RAW_DRIVER is not set | ||
646 | # CONFIG_HANGCHECK_TIMER is not set | ||
647 | |||
648 | # | ||
649 | # TPM devices | ||
650 | # | ||
651 | # CONFIG_TCG_TPM is not set | ||
652 | |||
653 | # | ||
654 | # I2C support | ||
655 | # | ||
656 | CONFIG_I2C=y | ||
657 | # CONFIG_I2C_CHARDEV is not set | ||
658 | |||
659 | # | ||
660 | # I2C Algorithms | ||
661 | # | ||
662 | CONFIG_I2C_ALGOBIT=y | ||
663 | # CONFIG_I2C_ALGOPCF is not set | ||
664 | # CONFIG_I2C_ALGOPCA is not set | ||
665 | |||
666 | # | ||
667 | # I2C Hardware Bus support | ||
668 | # | ||
669 | # CONFIG_I2C_ALI1535 is not set | ||
670 | # CONFIG_I2C_ALI1563 is not set | ||
671 | # CONFIG_I2C_ALI15X3 is not set | ||
672 | # CONFIG_I2C_AMD756 is not set | ||
673 | # CONFIG_I2C_AMD8111 is not set | ||
674 | # CONFIG_I2C_I801 is not set | ||
675 | # CONFIG_I2C_I810 is not set | ||
676 | # CONFIG_I2C_PIIX4 is not set | ||
677 | # CONFIG_I2C_NFORCE2 is not set | ||
678 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
679 | # CONFIG_I2C_PROSAVAGE is not set | ||
680 | # CONFIG_I2C_SAVAGE4 is not set | ||
681 | # CONFIG_SCx200_ACB is not set | ||
682 | # CONFIG_I2C_SIS5595 is not set | ||
683 | # CONFIG_I2C_SIS630 is not set | ||
684 | # CONFIG_I2C_SIS96X is not set | ||
685 | # CONFIG_I2C_STUB is not set | ||
686 | # CONFIG_I2C_VIA is not set | ||
687 | # CONFIG_I2C_VIAPRO is not set | ||
688 | # CONFIG_I2C_VOODOO3 is not set | ||
689 | # CONFIG_I2C_PCA_ISA is not set | ||
690 | |||
691 | # | ||
692 | # Miscellaneous I2C Chip support | ||
693 | # | ||
694 | # CONFIG_SENSORS_DS1337 is not set | ||
695 | # CONFIG_SENSORS_DS1374 is not set | ||
696 | # CONFIG_SENSORS_EEPROM is not set | ||
697 | # CONFIG_SENSORS_PCF8574 is not set | ||
698 | # CONFIG_SENSORS_PCA9539 is not set | ||
699 | # CONFIG_SENSORS_PCF8591 is not set | ||
700 | # CONFIG_SENSORS_RTC8564 is not set | ||
701 | # CONFIG_SENSORS_MAX6875 is not set | ||
702 | # CONFIG_I2C_DEBUG_CORE is not set | ||
703 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
704 | # CONFIG_I2C_DEBUG_BUS is not set | ||
705 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
706 | |||
707 | # | ||
708 | # Dallas's 1-wire bus | ||
709 | # | ||
710 | # CONFIG_W1 is not set | ||
711 | |||
712 | # | ||
713 | # Hardware Monitoring support | ||
714 | # | ||
715 | # CONFIG_HWMON is not set | ||
716 | # CONFIG_HWMON_VID is not set | ||
717 | |||
718 | # | ||
719 | # Misc devices | ||
720 | # | ||
721 | |||
722 | # | ||
723 | # Multimedia Capabilities Port drivers | ||
724 | # | ||
725 | |||
726 | # | ||
727 | # Multimedia devices | ||
728 | # | ||
729 | # CONFIG_VIDEO_DEV is not set | ||
730 | |||
731 | # | ||
732 | # Digital Video Broadcasting Devices | ||
733 | # | ||
734 | # CONFIG_DVB is not set | ||
735 | |||
736 | # | ||
737 | # Graphics support | ||
738 | # | ||
739 | # CONFIG_FB is not set | ||
740 | |||
741 | # | ||
742 | # Console display driver support | ||
743 | # | ||
744 | # CONFIG_VGA_CONSOLE is not set | ||
745 | CONFIG_DUMMY_CONSOLE=y | ||
746 | |||
747 | # | ||
748 | # Sound | ||
749 | # | ||
750 | # CONFIG_SOUND is not set | ||
751 | |||
752 | # | ||
753 | # USB support | ||
754 | # | ||
755 | CONFIG_USB_ARCH_HAS_HCD=y | ||
756 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
757 | # CONFIG_USB is not set | ||
758 | |||
759 | # | ||
760 | # USB Gadget Support | ||
761 | # | ||
762 | # CONFIG_USB_GADGET is not set | ||
763 | |||
764 | # | ||
765 | # MMC/SD Card support | ||
766 | # | ||
767 | # CONFIG_MMC is not set | ||
768 | |||
769 | # | ||
770 | # InfiniBand support | ||
771 | # | ||
772 | # CONFIG_INFINIBAND is not set | ||
773 | |||
774 | # | ||
775 | # SN Devices | ||
776 | # | ||
777 | |||
778 | # | ||
779 | # File systems | ||
780 | # | ||
781 | CONFIG_EXT2_FS=y | ||
782 | # CONFIG_EXT2_FS_XATTR is not set | ||
783 | # CONFIG_EXT2_FS_XIP is not set | ||
784 | CONFIG_EXT3_FS=y | ||
785 | CONFIG_EXT3_FS_XATTR=y | ||
786 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
787 | # CONFIG_EXT3_FS_SECURITY is not set | ||
788 | CONFIG_JBD=y | ||
789 | # CONFIG_JBD_DEBUG is not set | ||
790 | CONFIG_FS_MBCACHE=y | ||
791 | # CONFIG_REISERFS_FS is not set | ||
792 | # CONFIG_JFS_FS is not set | ||
793 | CONFIG_FS_POSIX_ACL=y | ||
794 | # CONFIG_XFS_FS is not set | ||
795 | # CONFIG_MINIX_FS is not set | ||
796 | # CONFIG_ROMFS_FS is not set | ||
797 | CONFIG_INOTIFY=y | ||
798 | # CONFIG_QUOTA is not set | ||
799 | CONFIG_DNOTIFY=y | ||
800 | # CONFIG_AUTOFS_FS is not set | ||
801 | # CONFIG_AUTOFS4_FS is not set | ||
802 | # CONFIG_FUSE_FS is not set | ||
803 | |||
804 | # | ||
805 | # CD-ROM/DVD Filesystems | ||
806 | # | ||
807 | CONFIG_ISO9660_FS=m | ||
808 | CONFIG_JOLIET=y | ||
809 | # CONFIG_ZISOFS is not set | ||
810 | CONFIG_UDF_FS=m | ||
811 | CONFIG_UDF_NLS=y | ||
812 | |||
813 | # | ||
814 | # DOS/FAT/NT Filesystems | ||
815 | # | ||
816 | CONFIG_FAT_FS=m | ||
817 | CONFIG_MSDOS_FS=m | ||
818 | CONFIG_VFAT_FS=m | ||
819 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
820 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
821 | # CONFIG_NTFS_FS is not set | ||
822 | |||
823 | # | ||
824 | # Pseudo filesystems | ||
825 | # | ||
826 | CONFIG_PROC_FS=y | ||
827 | CONFIG_PROC_KCORE=y | ||
828 | CONFIG_SYSFS=y | ||
829 | CONFIG_TMPFS=y | ||
830 | CONFIG_HUGETLBFS=y | ||
831 | CONFIG_HUGETLB_PAGE=y | ||
832 | CONFIG_RAMFS=y | ||
833 | # CONFIG_RELAYFS_FS is not set | ||
834 | |||
835 | # | ||
836 | # Miscellaneous filesystems | ||
837 | # | ||
838 | # CONFIG_ADFS_FS is not set | ||
839 | # CONFIG_AFFS_FS is not set | ||
840 | # CONFIG_HFS_FS is not set | ||
841 | # CONFIG_HFSPLUS_FS is not set | ||
842 | # CONFIG_BEFS_FS is not set | ||
843 | # CONFIG_BFS_FS is not set | ||
844 | # CONFIG_EFS_FS is not set | ||
845 | # CONFIG_CRAMFS is not set | ||
846 | # CONFIG_VXFS_FS is not set | ||
847 | # CONFIG_HPFS_FS is not set | ||
848 | # CONFIG_QNX4FS_FS is not set | ||
849 | # CONFIG_SYSV_FS is not set | ||
850 | # CONFIG_UFS_FS is not set | ||
851 | |||
852 | # | ||
853 | # Network File Systems | ||
854 | # | ||
855 | CONFIG_NFS_FS=m | ||
856 | CONFIG_NFS_V3=y | ||
857 | CONFIG_NFS_V3_ACL=y | ||
858 | # CONFIG_NFS_V4 is not set | ||
859 | # CONFIG_NFS_DIRECTIO is not set | ||
860 | CONFIG_NFSD=m | ||
861 | CONFIG_NFSD_V2_ACL=y | ||
862 | CONFIG_NFSD_V3=y | ||
863 | CONFIG_NFSD_V3_ACL=y | ||
864 | # CONFIG_NFSD_V4 is not set | ||
865 | CONFIG_NFSD_TCP=y | ||
866 | CONFIG_LOCKD=m | ||
867 | CONFIG_LOCKD_V4=y | ||
868 | CONFIG_EXPORTFS=m | ||
869 | CONFIG_NFS_ACL_SUPPORT=m | ||
870 | CONFIG_NFS_COMMON=y | ||
871 | CONFIG_SUNRPC=m | ||
872 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
873 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
874 | # CONFIG_SMB_FS is not set | ||
875 | # CONFIG_CIFS is not set | ||
876 | # CONFIG_NCP_FS is not set | ||
877 | # CONFIG_CODA_FS is not set | ||
878 | # CONFIG_AFS_FS is not set | ||
879 | # CONFIG_9P_FS is not set | ||
880 | |||
881 | # | ||
882 | # Partition Types | ||
883 | # | ||
884 | CONFIG_PARTITION_ADVANCED=y | ||
885 | # CONFIG_ACORN_PARTITION is not set | ||
886 | # CONFIG_OSF_PARTITION is not set | ||
887 | # CONFIG_AMIGA_PARTITION is not set | ||
888 | # CONFIG_ATARI_PARTITION is not set | ||
889 | # CONFIG_MAC_PARTITION is not set | ||
890 | CONFIG_MSDOS_PARTITION=y | ||
891 | # CONFIG_BSD_DISKLABEL is not set | ||
892 | # CONFIG_MINIX_SUBPARTITION is not set | ||
893 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
894 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
895 | # CONFIG_LDM_PARTITION is not set | ||
896 | # CONFIG_SGI_PARTITION is not set | ||
897 | # CONFIG_ULTRIX_PARTITION is not set | ||
898 | # CONFIG_SUN_PARTITION is not set | ||
899 | CONFIG_EFI_PARTITION=y | ||
900 | |||
901 | # | ||
902 | # Native Language Support | ||
903 | # | ||
904 | CONFIG_NLS=m | ||
905 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
906 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
907 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
908 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
909 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
910 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
911 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
912 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
913 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
914 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
915 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
916 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
917 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
918 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
919 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
920 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
921 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
922 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
923 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
924 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
925 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
926 | # CONFIG_NLS_ISO8859_8 is not set | ||
927 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
928 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
929 | # CONFIG_NLS_ASCII is not set | ||
930 | CONFIG_NLS_ISO8859_1=m | ||
931 | CONFIG_NLS_ISO8859_2=m | ||
932 | CONFIG_NLS_ISO8859_3=m | ||
933 | CONFIG_NLS_ISO8859_4=m | ||
934 | CONFIG_NLS_ISO8859_5=m | ||
935 | CONFIG_NLS_ISO8859_6=m | ||
936 | CONFIG_NLS_ISO8859_7=m | ||
937 | CONFIG_NLS_ISO8859_9=m | ||
938 | CONFIG_NLS_ISO8859_13=m | ||
939 | CONFIG_NLS_ISO8859_14=m | ||
940 | CONFIG_NLS_ISO8859_15=m | ||
941 | # CONFIG_NLS_KOI8_R is not set | ||
942 | # CONFIG_NLS_KOI8_U is not set | ||
943 | # CONFIG_NLS_UTF8 is not set | ||
944 | |||
945 | # | ||
946 | # Profiling support | ||
947 | # | ||
948 | # CONFIG_PROFILING is not set | ||
949 | |||
950 | # | ||
951 | # Kernel hacking | ||
952 | # | ||
953 | # CONFIG_PRINTK_TIME is not set | ||
954 | CONFIG_DEBUG_KERNEL=y | ||
955 | CONFIG_MAGIC_SYSRQ=y | ||
956 | CONFIG_LOG_BUF_SHIFT=15 | ||
957 | CONFIG_DETECT_SOFTLOCKUP=y | ||
958 | # CONFIG_SCHEDSTATS is not set | ||
959 | # CONFIG_DEBUG_SLAB is not set | ||
960 | # CONFIG_DEBUG_SPINLOCK is not set | ||
961 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
962 | # CONFIG_DEBUG_KOBJECT is not set | ||
963 | # CONFIG_DEBUG_INFO is not set | ||
964 | CONFIG_DEBUG_FS=y | ||
965 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
966 | # CONFIG_KPROBES is not set | ||
967 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
968 | CONFIG_DEBUGGER=y | ||
969 | # CONFIG_XMON is not set | ||
970 | # CONFIG_PPCDBG is not set | ||
971 | CONFIG_IRQSTACKS=y | ||
972 | |||
973 | # | ||
974 | # Security options | ||
975 | # | ||
976 | # CONFIG_KEYS is not set | ||
977 | # CONFIG_SECURITY is not set | ||
978 | |||
979 | # | ||
980 | # Cryptographic options | ||
981 | # | ||
982 | CONFIG_CRYPTO=y | ||
983 | CONFIG_CRYPTO_HMAC=y | ||
984 | # CONFIG_CRYPTO_NULL is not set | ||
985 | # CONFIG_CRYPTO_MD4 is not set | ||
986 | CONFIG_CRYPTO_MD5=m | ||
987 | CONFIG_CRYPTO_SHA1=m | ||
988 | # CONFIG_CRYPTO_SHA256 is not set | ||
989 | # CONFIG_CRYPTO_SHA512 is not set | ||
990 | # CONFIG_CRYPTO_WP512 is not set | ||
991 | # CONFIG_CRYPTO_TGR192 is not set | ||
992 | CONFIG_CRYPTO_DES=m | ||
993 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
994 | # CONFIG_CRYPTO_TWOFISH is not set | ||
995 | # CONFIG_CRYPTO_SERPENT is not set | ||
996 | # CONFIG_CRYPTO_AES is not set | ||
997 | # CONFIG_CRYPTO_CAST5 is not set | ||
998 | # CONFIG_CRYPTO_CAST6 is not set | ||
999 | # CONFIG_CRYPTO_TEA is not set | ||
1000 | # CONFIG_CRYPTO_ARC4 is not set | ||
1001 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1002 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1003 | CONFIG_CRYPTO_DEFLATE=m | ||
1004 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1005 | # CONFIG_CRYPTO_CRC32C is not set | ||
1006 | # CONFIG_CRYPTO_TEST is not set | ||
1007 | |||
1008 | # | ||
1009 | # Hardware crypto devices | ||
1010 | # | ||
1011 | |||
1012 | # | ||
1013 | # Library routines | ||
1014 | # | ||
1015 | # CONFIG_CRC_CCITT is not set | ||
1016 | # CONFIG_CRC16 is not set | ||
1017 | CONFIG_CRC32=y | ||
1018 | # CONFIG_LIBCRC32C is not set | ||
1019 | CONFIG_ZLIB_INFLATE=m | ||
1020 | CONFIG_ZLIB_DEFLATE=m | ||
1021 | CONFIG_TEXTSEARCH=y | ||
1022 | CONFIG_TEXTSEARCH_KMP=m | ||
1023 | CONFIG_TEXTSEARCH_BM=m | ||
1024 | CONFIG_TEXTSEARCH_FSM=m | ||
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig new file mode 100644 index 000000000000..6323065fbf2c --- /dev/null +++ b/arch/powerpc/configs/g5_defconfig | |||
@@ -0,0 +1,1392 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.14-rc4 | ||
4 | # Thu Oct 20 08:30:23 2005 | ||
5 | # | ||
6 | CONFIG_64BIT=y | ||
7 | CONFIG_MMU=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_GENERIC_ISA_DMA=y | ||
11 | CONFIG_EARLY_PRINTK=y | ||
12 | CONFIG_COMPAT=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
16 | |||
17 | # | ||
18 | # Code maturity level options | ||
19 | # | ||
20 | CONFIG_EXPERIMENTAL=y | ||
21 | CONFIG_CLEAN_COMPILE=y | ||
22 | CONFIG_LOCK_KERNEL=y | ||
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
24 | |||
25 | # | ||
26 | # General setup | ||
27 | # | ||
28 | CONFIG_LOCALVERSION="" | ||
29 | CONFIG_LOCALVERSION_AUTO=y | ||
30 | CONFIG_SWAP=y | ||
31 | CONFIG_SYSVIPC=y | ||
32 | CONFIG_POSIX_MQUEUE=y | ||
33 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
34 | CONFIG_SYSCTL=y | ||
35 | # CONFIG_AUDIT is not set | ||
36 | CONFIG_HOTPLUG=y | ||
37 | CONFIG_KOBJECT_UEVENT=y | ||
38 | CONFIG_IKCONFIG=y | ||
39 | CONFIG_IKCONFIG_PROC=y | ||
40 | # CONFIG_CPUSETS is not set | ||
41 | CONFIG_INITRAMFS_SOURCE="" | ||
42 | # CONFIG_EMBEDDED is not set | ||
43 | CONFIG_KALLSYMS=y | ||
44 | # CONFIG_KALLSYMS_ALL is not set | ||
45 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
46 | CONFIG_PRINTK=y | ||
47 | CONFIG_BUG=y | ||
48 | CONFIG_BASE_FULL=y | ||
49 | CONFIG_FUTEX=y | ||
50 | CONFIG_EPOLL=y | ||
51 | CONFIG_SHMEM=y | ||
52 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
53 | CONFIG_CC_ALIGN_LABELS=0 | ||
54 | CONFIG_CC_ALIGN_LOOPS=0 | ||
55 | CONFIG_CC_ALIGN_JUMPS=0 | ||
56 | # CONFIG_TINY_SHMEM is not set | ||
57 | CONFIG_BASE_SMALL=0 | ||
58 | |||
59 | # | ||
60 | # Loadable module support | ||
61 | # | ||
62 | CONFIG_MODULES=y | ||
63 | CONFIG_MODULE_UNLOAD=y | ||
64 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
65 | CONFIG_OBSOLETE_MODPARM=y | ||
66 | CONFIG_MODVERSIONS=y | ||
67 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
68 | CONFIG_KMOD=y | ||
69 | CONFIG_STOP_MACHINE=y | ||
70 | CONFIG_SYSVIPC_COMPAT=y | ||
71 | |||
72 | # | ||
73 | # Platform support | ||
74 | # | ||
75 | # CONFIG_PPC_ISERIES is not set | ||
76 | CONFIG_PPC_MULTIPLATFORM=y | ||
77 | # CONFIG_PPC_PSERIES is not set | ||
78 | # CONFIG_PPC_BPA is not set | ||
79 | CONFIG_PPC_PMAC=y | ||
80 | # CONFIG_PPC_MAPLE is not set | ||
81 | CONFIG_PPC=y | ||
82 | CONFIG_PPC64=y | ||
83 | CONFIG_PPC_OF=y | ||
84 | CONFIG_MPIC=y | ||
85 | CONFIG_ALTIVEC=y | ||
86 | CONFIG_KEXEC=y | ||
87 | CONFIG_U3_DART=y | ||
88 | CONFIG_PPC_PMAC64=y | ||
89 | CONFIG_BOOTX_TEXT=y | ||
90 | CONFIG_POWER4_ONLY=y | ||
91 | CONFIG_IOMMU_VMERGE=y | ||
92 | CONFIG_SMP=y | ||
93 | CONFIG_NR_CPUS=2 | ||
94 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | ||
95 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
96 | CONFIG_SELECT_MEMORY_MODEL=y | ||
97 | CONFIG_FLATMEM_MANUAL=y | ||
98 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
99 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
100 | CONFIG_FLATMEM=y | ||
101 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
102 | # CONFIG_SPARSEMEM_STATIC is not set | ||
103 | # CONFIG_NUMA is not set | ||
104 | # CONFIG_SCHED_SMT is not set | ||
105 | CONFIG_PREEMPT_NONE=y | ||
106 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
107 | # CONFIG_PREEMPT is not set | ||
108 | # CONFIG_PREEMPT_BKL is not set | ||
109 | # CONFIG_HZ_100 is not set | ||
110 | CONFIG_HZ_250=y | ||
111 | # CONFIG_HZ_1000 is not set | ||
112 | CONFIG_HZ=250 | ||
113 | CONFIG_GENERIC_HARDIRQS=y | ||
114 | CONFIG_SECCOMP=y | ||
115 | CONFIG_BINFMT_ELF=y | ||
116 | # CONFIG_BINFMT_MISC is not set | ||
117 | # CONFIG_HOTPLUG_CPU is not set | ||
118 | CONFIG_PROC_DEVICETREE=y | ||
119 | # CONFIG_CMDLINE_BOOL is not set | ||
120 | CONFIG_ISA_DMA_API=y | ||
121 | |||
122 | # | ||
123 | # Bus Options | ||
124 | # | ||
125 | CONFIG_PCI=y | ||
126 | CONFIG_PCI_DOMAINS=y | ||
127 | CONFIG_PCI_LEGACY_PROC=y | ||
128 | # CONFIG_PCI_DEBUG is not set | ||
129 | |||
130 | # | ||
131 | # PCCARD (PCMCIA/CardBus) support | ||
132 | # | ||
133 | # CONFIG_PCCARD is not set | ||
134 | |||
135 | # | ||
136 | # PCI Hotplug Support | ||
137 | # | ||
138 | # CONFIG_HOTPLUG_PCI is not set | ||
139 | |||
140 | # | ||
141 | # Networking | ||
142 | # | ||
143 | CONFIG_NET=y | ||
144 | |||
145 | # | ||
146 | # Networking options | ||
147 | # | ||
148 | CONFIG_PACKET=y | ||
149 | # CONFIG_PACKET_MMAP is not set | ||
150 | CONFIG_UNIX=y | ||
151 | CONFIG_XFRM=y | ||
152 | CONFIG_XFRM_USER=m | ||
153 | CONFIG_NET_KEY=m | ||
154 | CONFIG_INET=y | ||
155 | CONFIG_IP_MULTICAST=y | ||
156 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
157 | CONFIG_IP_FIB_HASH=y | ||
158 | # CONFIG_IP_PNP is not set | ||
159 | CONFIG_NET_IPIP=y | ||
160 | # CONFIG_NET_IPGRE is not set | ||
161 | # CONFIG_IP_MROUTE is not set | ||
162 | # CONFIG_ARPD is not set | ||
163 | CONFIG_SYN_COOKIES=y | ||
164 | CONFIG_INET_AH=m | ||
165 | CONFIG_INET_ESP=m | ||
166 | CONFIG_INET_IPCOMP=m | ||
167 | CONFIG_INET_TUNNEL=y | ||
168 | CONFIG_INET_DIAG=y | ||
169 | CONFIG_INET_TCP_DIAG=y | ||
170 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
171 | CONFIG_TCP_CONG_BIC=y | ||
172 | |||
173 | # | ||
174 | # IP: Virtual Server Configuration | ||
175 | # | ||
176 | # CONFIG_IP_VS is not set | ||
177 | # CONFIG_IPV6 is not set | ||
178 | CONFIG_NETFILTER=y | ||
179 | # CONFIG_NETFILTER_DEBUG is not set | ||
180 | # CONFIG_NETFILTER_NETLINK is not set | ||
181 | |||
182 | # | ||
183 | # IP: Netfilter Configuration | ||
184 | # | ||
185 | CONFIG_IP_NF_CONNTRACK=m | ||
186 | CONFIG_IP_NF_CT_ACCT=y | ||
187 | CONFIG_IP_NF_CONNTRACK_MARK=y | ||
188 | CONFIG_IP_NF_CONNTRACK_EVENTS=y | ||
189 | CONFIG_IP_NF_CT_PROTO_SCTP=m | ||
190 | CONFIG_IP_NF_FTP=m | ||
191 | CONFIG_IP_NF_IRC=m | ||
192 | # CONFIG_IP_NF_NETBIOS_NS is not set | ||
193 | CONFIG_IP_NF_TFTP=m | ||
194 | CONFIG_IP_NF_AMANDA=m | ||
195 | # CONFIG_IP_NF_PPTP is not set | ||
196 | CONFIG_IP_NF_QUEUE=m | ||
197 | CONFIG_IP_NF_IPTABLES=m | ||
198 | CONFIG_IP_NF_MATCH_LIMIT=m | ||
199 | CONFIG_IP_NF_MATCH_IPRANGE=m | ||
200 | CONFIG_IP_NF_MATCH_MAC=m | ||
201 | CONFIG_IP_NF_MATCH_PKTTYPE=m | ||
202 | CONFIG_IP_NF_MATCH_MARK=m | ||
203 | CONFIG_IP_NF_MATCH_MULTIPORT=m | ||
204 | CONFIG_IP_NF_MATCH_TOS=m | ||
205 | CONFIG_IP_NF_MATCH_RECENT=m | ||
206 | CONFIG_IP_NF_MATCH_ECN=m | ||
207 | CONFIG_IP_NF_MATCH_DSCP=m | ||
208 | CONFIG_IP_NF_MATCH_AH_ESP=m | ||
209 | CONFIG_IP_NF_MATCH_LENGTH=m | ||
210 | CONFIG_IP_NF_MATCH_TTL=m | ||
211 | CONFIG_IP_NF_MATCH_TCPMSS=m | ||
212 | CONFIG_IP_NF_MATCH_HELPER=m | ||
213 | CONFIG_IP_NF_MATCH_STATE=m | ||
214 | CONFIG_IP_NF_MATCH_CONNTRACK=m | ||
215 | CONFIG_IP_NF_MATCH_OWNER=m | ||
216 | CONFIG_IP_NF_MATCH_ADDRTYPE=m | ||
217 | CONFIG_IP_NF_MATCH_REALM=m | ||
218 | CONFIG_IP_NF_MATCH_SCTP=m | ||
219 | # CONFIG_IP_NF_MATCH_DCCP is not set | ||
220 | CONFIG_IP_NF_MATCH_COMMENT=m | ||
221 | CONFIG_IP_NF_MATCH_CONNMARK=m | ||
222 | CONFIG_IP_NF_MATCH_CONNBYTES=m | ||
223 | CONFIG_IP_NF_MATCH_HASHLIMIT=m | ||
224 | CONFIG_IP_NF_MATCH_STRING=m | ||
225 | CONFIG_IP_NF_FILTER=m | ||
226 | CONFIG_IP_NF_TARGET_REJECT=m | ||
227 | CONFIG_IP_NF_TARGET_LOG=m | ||
228 | CONFIG_IP_NF_TARGET_ULOG=m | ||
229 | CONFIG_IP_NF_TARGET_TCPMSS=m | ||
230 | CONFIG_IP_NF_TARGET_NFQUEUE=m | ||
231 | CONFIG_IP_NF_NAT=m | ||
232 | CONFIG_IP_NF_NAT_NEEDED=y | ||
233 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
234 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
235 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
236 | CONFIG_IP_NF_TARGET_SAME=m | ||
237 | CONFIG_IP_NF_NAT_SNMP_BASIC=m | ||
238 | CONFIG_IP_NF_NAT_IRC=m | ||
239 | CONFIG_IP_NF_NAT_FTP=m | ||
240 | CONFIG_IP_NF_NAT_TFTP=m | ||
241 | CONFIG_IP_NF_NAT_AMANDA=m | ||
242 | CONFIG_IP_NF_MANGLE=m | ||
243 | CONFIG_IP_NF_TARGET_TOS=m | ||
244 | CONFIG_IP_NF_TARGET_ECN=m | ||
245 | CONFIG_IP_NF_TARGET_DSCP=m | ||
246 | CONFIG_IP_NF_TARGET_MARK=m | ||
247 | CONFIG_IP_NF_TARGET_CLASSIFY=m | ||
248 | CONFIG_IP_NF_TARGET_TTL=m | ||
249 | CONFIG_IP_NF_TARGET_CONNMARK=m | ||
250 | CONFIG_IP_NF_TARGET_CLUSTERIP=m | ||
251 | CONFIG_IP_NF_RAW=m | ||
252 | CONFIG_IP_NF_TARGET_NOTRACK=m | ||
253 | CONFIG_IP_NF_ARPTABLES=m | ||
254 | CONFIG_IP_NF_ARPFILTER=m | ||
255 | CONFIG_IP_NF_ARP_MANGLE=m | ||
256 | |||
257 | # | ||
258 | # DCCP Configuration (EXPERIMENTAL) | ||
259 | # | ||
260 | # CONFIG_IP_DCCP is not set | ||
261 | |||
262 | # | ||
263 | # SCTP Configuration (EXPERIMENTAL) | ||
264 | # | ||
265 | # CONFIG_IP_SCTP is not set | ||
266 | # CONFIG_ATM is not set | ||
267 | # CONFIG_BRIDGE is not set | ||
268 | # CONFIG_VLAN_8021Q is not set | ||
269 | # CONFIG_DECNET is not set | ||
270 | CONFIG_LLC=y | ||
271 | # CONFIG_LLC2 is not set | ||
272 | # CONFIG_IPX is not set | ||
273 | # CONFIG_ATALK is not set | ||
274 | # CONFIG_X25 is not set | ||
275 | # CONFIG_LAPB is not set | ||
276 | # CONFIG_NET_DIVERT is not set | ||
277 | # CONFIG_ECONET is not set | ||
278 | # CONFIG_WAN_ROUTER is not set | ||
279 | # CONFIG_NET_SCHED is not set | ||
280 | CONFIG_NET_CLS_ROUTE=y | ||
281 | |||
282 | # | ||
283 | # Network testing | ||
284 | # | ||
285 | # CONFIG_NET_PKTGEN is not set | ||
286 | # CONFIG_HAMRADIO is not set | ||
287 | # CONFIG_IRDA is not set | ||
288 | # CONFIG_BT is not set | ||
289 | # CONFIG_IEEE80211 is not set | ||
290 | |||
291 | # | ||
292 | # Device Drivers | ||
293 | # | ||
294 | |||
295 | # | ||
296 | # Generic Driver Options | ||
297 | # | ||
298 | CONFIG_STANDALONE=y | ||
299 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
300 | CONFIG_FW_LOADER=y | ||
301 | # CONFIG_DEBUG_DRIVER is not set | ||
302 | |||
303 | # | ||
304 | # Connector - unified userspace <-> kernelspace linker | ||
305 | # | ||
306 | # CONFIG_CONNECTOR is not set | ||
307 | |||
308 | # | ||
309 | # Memory Technology Devices (MTD) | ||
310 | # | ||
311 | # CONFIG_MTD is not set | ||
312 | |||
313 | # | ||
314 | # Parallel port support | ||
315 | # | ||
316 | # CONFIG_PARPORT is not set | ||
317 | |||
318 | # | ||
319 | # Plug and Play support | ||
320 | # | ||
321 | |||
322 | # | ||
323 | # Block devices | ||
324 | # | ||
325 | # CONFIG_BLK_DEV_FD is not set | ||
326 | # CONFIG_BLK_CPQ_DA is not set | ||
327 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
328 | # CONFIG_BLK_DEV_DAC960 is not set | ||
329 | # CONFIG_BLK_DEV_UMEM is not set | ||
330 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
331 | CONFIG_BLK_DEV_LOOP=y | ||
332 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
333 | CONFIG_BLK_DEV_NBD=m | ||
334 | # CONFIG_BLK_DEV_SX8 is not set | ||
335 | # CONFIG_BLK_DEV_UB is not set | ||
336 | CONFIG_BLK_DEV_RAM=y | ||
337 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
338 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
339 | CONFIG_BLK_DEV_INITRD=y | ||
340 | CONFIG_CDROM_PKTCDVD=m | ||
341 | CONFIG_CDROM_PKTCDVD_BUFFERS=8 | ||
342 | # CONFIG_CDROM_PKTCDVD_WCACHE is not set | ||
343 | |||
344 | # | ||
345 | # IO Schedulers | ||
346 | # | ||
347 | CONFIG_IOSCHED_NOOP=y | ||
348 | CONFIG_IOSCHED_AS=y | ||
349 | CONFIG_IOSCHED_DEADLINE=y | ||
350 | CONFIG_IOSCHED_CFQ=y | ||
351 | # CONFIG_ATA_OVER_ETH is not set | ||
352 | |||
353 | # | ||
354 | # ATA/ATAPI/MFM/RLL support | ||
355 | # | ||
356 | CONFIG_IDE=y | ||
357 | CONFIG_BLK_DEV_IDE=y | ||
358 | |||
359 | # | ||
360 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
361 | # | ||
362 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
363 | CONFIG_BLK_DEV_IDEDISK=y | ||
364 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
365 | CONFIG_BLK_DEV_IDECD=y | ||
366 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
367 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
368 | # CONFIG_BLK_DEV_IDESCSI is not set | ||
369 | # CONFIG_IDE_TASK_IOCTL is not set | ||
370 | |||
371 | # | ||
372 | # IDE chipset support/bugfixes | ||
373 | # | ||
374 | CONFIG_IDE_GENERIC=y | ||
375 | CONFIG_BLK_DEV_IDEPCI=y | ||
376 | # CONFIG_IDEPCI_SHARE_IRQ is not set | ||
377 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
378 | # CONFIG_BLK_DEV_GENERIC is not set | ||
379 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
380 | # CONFIG_BLK_DEV_SL82C105 is not set | ||
381 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
382 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
383 | CONFIG_IDEDMA_PCI_AUTO=y | ||
384 | # CONFIG_IDEDMA_ONLYDISK is not set | ||
385 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
386 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
387 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
388 | # CONFIG_BLK_DEV_CMD64X is not set | ||
389 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
390 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
391 | # CONFIG_BLK_DEV_CS5520 is not set | ||
392 | # CONFIG_BLK_DEV_CS5530 is not set | ||
393 | # CONFIG_BLK_DEV_HPT34X is not set | ||
394 | # CONFIG_BLK_DEV_HPT366 is not set | ||
395 | # CONFIG_BLK_DEV_SC1200 is not set | ||
396 | # CONFIG_BLK_DEV_PIIX is not set | ||
397 | # CONFIG_BLK_DEV_IT821X is not set | ||
398 | # CONFIG_BLK_DEV_NS87415 is not set | ||
399 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
400 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
401 | # CONFIG_BLK_DEV_SVWKS is not set | ||
402 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
403 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
404 | # CONFIG_BLK_DEV_TRM290 is not set | ||
405 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
406 | CONFIG_BLK_DEV_IDE_PMAC=y | ||
407 | CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y | ||
408 | CONFIG_BLK_DEV_IDEDMA_PMAC=y | ||
409 | # CONFIG_BLK_DEV_IDE_PMAC_BLINK is not set | ||
410 | # CONFIG_IDE_ARM is not set | ||
411 | CONFIG_BLK_DEV_IDEDMA=y | ||
412 | # CONFIG_IDEDMA_IVB is not set | ||
413 | CONFIG_IDEDMA_AUTO=y | ||
414 | # CONFIG_BLK_DEV_HD is not set | ||
415 | |||
416 | # | ||
417 | # SCSI device support | ||
418 | # | ||
419 | # CONFIG_RAID_ATTRS is not set | ||
420 | CONFIG_SCSI=y | ||
421 | CONFIG_SCSI_PROC_FS=y | ||
422 | |||
423 | # | ||
424 | # SCSI support type (disk, tape, CD-ROM) | ||
425 | # | ||
426 | CONFIG_BLK_DEV_SD=y | ||
427 | CONFIG_CHR_DEV_ST=y | ||
428 | # CONFIG_CHR_DEV_OSST is not set | ||
429 | CONFIG_BLK_DEV_SR=y | ||
430 | CONFIG_BLK_DEV_SR_VENDOR=y | ||
431 | CONFIG_CHR_DEV_SG=y | ||
432 | # CONFIG_CHR_DEV_SCH is not set | ||
433 | |||
434 | # | ||
435 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
436 | # | ||
437 | CONFIG_SCSI_MULTI_LUN=y | ||
438 | CONFIG_SCSI_CONSTANTS=y | ||
439 | # CONFIG_SCSI_LOGGING is not set | ||
440 | |||
441 | # | ||
442 | # SCSI Transport Attributes | ||
443 | # | ||
444 | CONFIG_SCSI_SPI_ATTRS=y | ||
445 | # CONFIG_SCSI_FC_ATTRS is not set | ||
446 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
447 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
448 | |||
449 | # | ||
450 | # SCSI low-level drivers | ||
451 | # | ||
452 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
453 | # CONFIG_SCSI_3W_9XXX is not set | ||
454 | # CONFIG_SCSI_ACARD is not set | ||
455 | # CONFIG_SCSI_AACRAID is not set | ||
456 | # CONFIG_SCSI_AIC7XXX is not set | ||
457 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
458 | # CONFIG_SCSI_AIC79XX is not set | ||
459 | # CONFIG_MEGARAID_NEWGEN is not set | ||
460 | # CONFIG_MEGARAID_LEGACY is not set | ||
461 | # CONFIG_MEGARAID_SAS is not set | ||
462 | CONFIG_SCSI_SATA=y | ||
463 | # CONFIG_SCSI_SATA_AHCI is not set | ||
464 | CONFIG_SCSI_SATA_SVW=y | ||
465 | # CONFIG_SCSI_ATA_PIIX is not set | ||
466 | # CONFIG_SCSI_SATA_MV is not set | ||
467 | # CONFIG_SCSI_SATA_NV is not set | ||
468 | # CONFIG_SCSI_SATA_PROMISE is not set | ||
469 | # CONFIG_SCSI_SATA_QSTOR is not set | ||
470 | # CONFIG_SCSI_SATA_SX4 is not set | ||
471 | # CONFIG_SCSI_SATA_SIL is not set | ||
472 | # CONFIG_SCSI_SATA_SIS is not set | ||
473 | # CONFIG_SCSI_SATA_ULI is not set | ||
474 | # CONFIG_SCSI_SATA_VIA is not set | ||
475 | # CONFIG_SCSI_SATA_VITESSE is not set | ||
476 | # CONFIG_SCSI_BUSLOGIC is not set | ||
477 | # CONFIG_SCSI_DMX3191D is not set | ||
478 | # CONFIG_SCSI_EATA is not set | ||
479 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
480 | # CONFIG_SCSI_GDTH is not set | ||
481 | # CONFIG_SCSI_IPS is not set | ||
482 | # CONFIG_SCSI_INITIO is not set | ||
483 | # CONFIG_SCSI_INIA100 is not set | ||
484 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
485 | # CONFIG_SCSI_IPR is not set | ||
486 | # CONFIG_SCSI_QLOGIC_FC is not set | ||
487 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
488 | CONFIG_SCSI_QLA2XXX=y | ||
489 | # CONFIG_SCSI_QLA21XX is not set | ||
490 | # CONFIG_SCSI_QLA22XX is not set | ||
491 | # CONFIG_SCSI_QLA2300 is not set | ||
492 | # CONFIG_SCSI_QLA2322 is not set | ||
493 | # CONFIG_SCSI_QLA6312 is not set | ||
494 | # CONFIG_SCSI_QLA24XX is not set | ||
495 | # CONFIG_SCSI_LPFC is not set | ||
496 | # CONFIG_SCSI_DC395x is not set | ||
497 | # CONFIG_SCSI_DC390T is not set | ||
498 | # CONFIG_SCSI_DEBUG is not set | ||
499 | |||
500 | # | ||
501 | # Multi-device support (RAID and LVM) | ||
502 | # | ||
503 | CONFIG_MD=y | ||
504 | CONFIG_BLK_DEV_MD=y | ||
505 | CONFIG_MD_LINEAR=y | ||
506 | CONFIG_MD_RAID0=y | ||
507 | CONFIG_MD_RAID1=y | ||
508 | CONFIG_MD_RAID10=m | ||
509 | CONFIG_MD_RAID5=y | ||
510 | CONFIG_MD_RAID6=m | ||
511 | CONFIG_MD_MULTIPATH=m | ||
512 | CONFIG_MD_FAULTY=m | ||
513 | CONFIG_BLK_DEV_DM=y | ||
514 | CONFIG_DM_CRYPT=m | ||
515 | CONFIG_DM_SNAPSHOT=m | ||
516 | CONFIG_DM_MIRROR=m | ||
517 | CONFIG_DM_ZERO=m | ||
518 | # CONFIG_DM_MULTIPATH is not set | ||
519 | |||
520 | # | ||
521 | # Fusion MPT device support | ||
522 | # | ||
523 | # CONFIG_FUSION is not set | ||
524 | # CONFIG_FUSION_SPI is not set | ||
525 | # CONFIG_FUSION_FC is not set | ||
526 | # CONFIG_FUSION_SAS is not set | ||
527 | |||
528 | # | ||
529 | # IEEE 1394 (FireWire) support | ||
530 | # | ||
531 | CONFIG_IEEE1394=y | ||
532 | |||
533 | # | ||
534 | # Subsystem Options | ||
535 | # | ||
536 | # CONFIG_IEEE1394_VERBOSEDEBUG is not set | ||
537 | CONFIG_IEEE1394_OUI_DB=y | ||
538 | CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y | ||
539 | CONFIG_IEEE1394_CONFIG_ROM_IP1394=y | ||
540 | # CONFIG_IEEE1394_EXPORT_FULL_API is not set | ||
541 | |||
542 | # | ||
543 | # Device Drivers | ||
544 | # | ||
545 | # CONFIG_IEEE1394_PCILYNX is not set | ||
546 | CONFIG_IEEE1394_OHCI1394=y | ||
547 | |||
548 | # | ||
549 | # Protocol Drivers | ||
550 | # | ||
551 | CONFIG_IEEE1394_VIDEO1394=m | ||
552 | CONFIG_IEEE1394_SBP2=m | ||
553 | # CONFIG_IEEE1394_SBP2_PHYS_DMA is not set | ||
554 | CONFIG_IEEE1394_ETH1394=m | ||
555 | CONFIG_IEEE1394_DV1394=m | ||
556 | CONFIG_IEEE1394_RAWIO=y | ||
557 | # CONFIG_IEEE1394_CMP is not set | ||
558 | |||
559 | # | ||
560 | # I2O device support | ||
561 | # | ||
562 | # CONFIG_I2O is not set | ||
563 | |||
564 | # | ||
565 | # Macintosh device drivers | ||
566 | # | ||
567 | CONFIG_ADB_PMU=y | ||
568 | CONFIG_PMAC_SMU=y | ||
569 | CONFIG_THERM_PM72=y | ||
570 | |||
571 | # | ||
572 | # Network device support | ||
573 | # | ||
574 | CONFIG_NETDEVICES=y | ||
575 | CONFIG_DUMMY=m | ||
576 | CONFIG_BONDING=m | ||
577 | # CONFIG_EQUALIZER is not set | ||
578 | CONFIG_TUN=m | ||
579 | |||
580 | # | ||
581 | # ARCnet devices | ||
582 | # | ||
583 | # CONFIG_ARCNET is not set | ||
584 | |||
585 | # | ||
586 | # PHY device support | ||
587 | # | ||
588 | # CONFIG_PHYLIB is not set | ||
589 | |||
590 | # | ||
591 | # Ethernet (10 or 100Mbit) | ||
592 | # | ||
593 | CONFIG_NET_ETHERNET=y | ||
594 | CONFIG_MII=y | ||
595 | # CONFIG_HAPPYMEAL is not set | ||
596 | CONFIG_SUNGEM=y | ||
597 | # CONFIG_CASSINI is not set | ||
598 | # CONFIG_NET_VENDOR_3COM is not set | ||
599 | |||
600 | # | ||
601 | # Tulip family network device support | ||
602 | # | ||
603 | # CONFIG_NET_TULIP is not set | ||
604 | # CONFIG_HP100 is not set | ||
605 | # CONFIG_NET_PCI is not set | ||
606 | |||
607 | # | ||
608 | # Ethernet (1000 Mbit) | ||
609 | # | ||
610 | CONFIG_ACENIC=y | ||
611 | CONFIG_ACENIC_OMIT_TIGON_I=y | ||
612 | # CONFIG_DL2K is not set | ||
613 | CONFIG_E1000=y | ||
614 | # CONFIG_E1000_NAPI is not set | ||
615 | # CONFIG_NS83820 is not set | ||
616 | # CONFIG_HAMACHI is not set | ||
617 | # CONFIG_YELLOWFIN is not set | ||
618 | # CONFIG_R8169 is not set | ||
619 | # CONFIG_SIS190 is not set | ||
620 | # CONFIG_SKGE is not set | ||
621 | # CONFIG_SK98LIN is not set | ||
622 | CONFIG_TIGON3=m | ||
623 | # CONFIG_BNX2 is not set | ||
624 | # CONFIG_MV643XX_ETH is not set | ||
625 | |||
626 | # | ||
627 | # Ethernet (10000 Mbit) | ||
628 | # | ||
629 | # CONFIG_CHELSIO_T1 is not set | ||
630 | # CONFIG_IXGB is not set | ||
631 | # CONFIG_S2IO is not set | ||
632 | |||
633 | # | ||
634 | # Token Ring devices | ||
635 | # | ||
636 | CONFIG_TR=y | ||
637 | CONFIG_IBMOL=y | ||
638 | # CONFIG_3C359 is not set | ||
639 | # CONFIG_TMS380TR is not set | ||
640 | |||
641 | # | ||
642 | # Wireless LAN (non-hamradio) | ||
643 | # | ||
644 | # CONFIG_NET_RADIO is not set | ||
645 | |||
646 | # | ||
647 | # Wan interfaces | ||
648 | # | ||
649 | # CONFIG_WAN is not set | ||
650 | # CONFIG_FDDI is not set | ||
651 | # CONFIG_HIPPI is not set | ||
652 | CONFIG_PPP=m | ||
653 | # CONFIG_PPP_MULTILINK is not set | ||
654 | # CONFIG_PPP_FILTER is not set | ||
655 | CONFIG_PPP_ASYNC=m | ||
656 | CONFIG_PPP_SYNC_TTY=m | ||
657 | CONFIG_PPP_DEFLATE=m | ||
658 | CONFIG_PPP_BSDCOMP=m | ||
659 | CONFIG_PPPOE=m | ||
660 | # CONFIG_SLIP is not set | ||
661 | # CONFIG_NET_FC is not set | ||
662 | # CONFIG_SHAPER is not set | ||
663 | # CONFIG_NETCONSOLE is not set | ||
664 | # CONFIG_NETPOLL is not set | ||
665 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
666 | |||
667 | # | ||
668 | # ISDN subsystem | ||
669 | # | ||
670 | # CONFIG_ISDN is not set | ||
671 | |||
672 | # | ||
673 | # Telephony Support | ||
674 | # | ||
675 | # CONFIG_PHONE is not set | ||
676 | |||
677 | # | ||
678 | # Input device support | ||
679 | # | ||
680 | CONFIG_INPUT=y | ||
681 | |||
682 | # | ||
683 | # Userland interfaces | ||
684 | # | ||
685 | CONFIG_INPUT_MOUSEDEV=y | ||
686 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
687 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
688 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
689 | CONFIG_INPUT_JOYDEV=m | ||
690 | # CONFIG_INPUT_TSDEV is not set | ||
691 | CONFIG_INPUT_EVDEV=y | ||
692 | # CONFIG_INPUT_EVBUG is not set | ||
693 | |||
694 | # | ||
695 | # Input Device Drivers | ||
696 | # | ||
697 | CONFIG_INPUT_KEYBOARD=y | ||
698 | # CONFIG_KEYBOARD_ATKBD is not set | ||
699 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
700 | # CONFIG_KEYBOARD_LKKBD is not set | ||
701 | # CONFIG_KEYBOARD_XTKBD is not set | ||
702 | # CONFIG_KEYBOARD_NEWTON is not set | ||
703 | CONFIG_INPUT_MOUSE=y | ||
704 | # CONFIG_MOUSE_PS2 is not set | ||
705 | # CONFIG_MOUSE_SERIAL is not set | ||
706 | # CONFIG_MOUSE_VSXXXAA is not set | ||
707 | # CONFIG_INPUT_JOYSTICK is not set | ||
708 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
709 | # CONFIG_INPUT_MISC is not set | ||
710 | |||
711 | # | ||
712 | # Hardware I/O ports | ||
713 | # | ||
714 | CONFIG_SERIO=y | ||
715 | # CONFIG_SERIO_I8042 is not set | ||
716 | # CONFIG_SERIO_SERPORT is not set | ||
717 | # CONFIG_SERIO_PCIPS2 is not set | ||
718 | # CONFIG_SERIO_RAW is not set | ||
719 | # CONFIG_GAMEPORT is not set | ||
720 | |||
721 | # | ||
722 | # Character devices | ||
723 | # | ||
724 | CONFIG_VT=y | ||
725 | CONFIG_VT_CONSOLE=y | ||
726 | CONFIG_HW_CONSOLE=y | ||
727 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
728 | |||
729 | # | ||
730 | # Serial drivers | ||
731 | # | ||
732 | # CONFIG_SERIAL_8250 is not set | ||
733 | |||
734 | # | ||
735 | # Non-8250 serial port support | ||
736 | # | ||
737 | # CONFIG_SERIAL_PMACZILOG is not set | ||
738 | # CONFIG_SERIAL_JSM is not set | ||
739 | CONFIG_UNIX98_PTYS=y | ||
740 | CONFIG_LEGACY_PTYS=y | ||
741 | CONFIG_LEGACY_PTY_COUNT=256 | ||
742 | |||
743 | # | ||
744 | # IPMI | ||
745 | # | ||
746 | # CONFIG_IPMI_HANDLER is not set | ||
747 | |||
748 | # | ||
749 | # Watchdog Cards | ||
750 | # | ||
751 | # CONFIG_WATCHDOG is not set | ||
752 | # CONFIG_RTC is not set | ||
753 | # CONFIG_DTLK is not set | ||
754 | # CONFIG_R3964 is not set | ||
755 | # CONFIG_APPLICOM is not set | ||
756 | |||
757 | # | ||
758 | # Ftape, the floppy tape device driver | ||
759 | # | ||
760 | CONFIG_AGP=m | ||
761 | CONFIG_AGP_UNINORTH=m | ||
762 | # CONFIG_DRM is not set | ||
763 | CONFIG_RAW_DRIVER=y | ||
764 | CONFIG_MAX_RAW_DEVS=256 | ||
765 | # CONFIG_HANGCHECK_TIMER is not set | ||
766 | |||
767 | # | ||
768 | # TPM devices | ||
769 | # | ||
770 | # CONFIG_TCG_TPM is not set | ||
771 | |||
772 | # | ||
773 | # I2C support | ||
774 | # | ||
775 | CONFIG_I2C=y | ||
776 | CONFIG_I2C_CHARDEV=y | ||
777 | |||
778 | # | ||
779 | # I2C Algorithms | ||
780 | # | ||
781 | CONFIG_I2C_ALGOBIT=y | ||
782 | # CONFIG_I2C_ALGOPCF is not set | ||
783 | # CONFIG_I2C_ALGOPCA is not set | ||
784 | |||
785 | # | ||
786 | # I2C Hardware Bus support | ||
787 | # | ||
788 | # CONFIG_I2C_ALI1535 is not set | ||
789 | # CONFIG_I2C_ALI1563 is not set | ||
790 | # CONFIG_I2C_ALI15X3 is not set | ||
791 | # CONFIG_I2C_AMD756 is not set | ||
792 | # CONFIG_I2C_AMD8111 is not set | ||
793 | # CONFIG_I2C_I801 is not set | ||
794 | # CONFIG_I2C_I810 is not set | ||
795 | # CONFIG_I2C_PIIX4 is not set | ||
796 | CONFIG_I2C_KEYWEST=y | ||
797 | CONFIG_I2C_PMAC_SMU=y | ||
798 | # CONFIG_I2C_NFORCE2 is not set | ||
799 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
800 | # CONFIG_I2C_PROSAVAGE is not set | ||
801 | # CONFIG_I2C_SAVAGE4 is not set | ||
802 | # CONFIG_SCx200_ACB is not set | ||
803 | # CONFIG_I2C_SIS5595 is not set | ||
804 | # CONFIG_I2C_SIS630 is not set | ||
805 | # CONFIG_I2C_SIS96X is not set | ||
806 | # CONFIG_I2C_STUB is not set | ||
807 | # CONFIG_I2C_VIA is not set | ||
808 | # CONFIG_I2C_VIAPRO is not set | ||
809 | # CONFIG_I2C_VOODOO3 is not set | ||
810 | # CONFIG_I2C_PCA_ISA is not set | ||
811 | |||
812 | # | ||
813 | # Miscellaneous I2C Chip support | ||
814 | # | ||
815 | # CONFIG_SENSORS_DS1337 is not set | ||
816 | # CONFIG_SENSORS_DS1374 is not set | ||
817 | # CONFIG_SENSORS_EEPROM is not set | ||
818 | # CONFIG_SENSORS_PCF8574 is not set | ||
819 | # CONFIG_SENSORS_PCA9539 is not set | ||
820 | # CONFIG_SENSORS_PCF8591 is not set | ||
821 | # CONFIG_SENSORS_RTC8564 is not set | ||
822 | # CONFIG_SENSORS_MAX6875 is not set | ||
823 | # CONFIG_I2C_DEBUG_CORE is not set | ||
824 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
825 | # CONFIG_I2C_DEBUG_BUS is not set | ||
826 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
827 | |||
828 | # | ||
829 | # Dallas's 1-wire bus | ||
830 | # | ||
831 | # CONFIG_W1 is not set | ||
832 | |||
833 | # | ||
834 | # Hardware Monitoring support | ||
835 | # | ||
836 | # CONFIG_HWMON is not set | ||
837 | # CONFIG_HWMON_VID is not set | ||
838 | |||
839 | # | ||
840 | # Misc devices | ||
841 | # | ||
842 | |||
843 | # | ||
844 | # Multimedia Capabilities Port drivers | ||
845 | # | ||
846 | |||
847 | # | ||
848 | # Multimedia devices | ||
849 | # | ||
850 | # CONFIG_VIDEO_DEV is not set | ||
851 | |||
852 | # | ||
853 | # Digital Video Broadcasting Devices | ||
854 | # | ||
855 | # CONFIG_DVB is not set | ||
856 | |||
857 | # | ||
858 | # Graphics support | ||
859 | # | ||
860 | CONFIG_FB=y | ||
861 | CONFIG_FB_CFB_FILLRECT=y | ||
862 | CONFIG_FB_CFB_COPYAREA=y | ||
863 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
864 | CONFIG_FB_SOFT_CURSOR=y | ||
865 | CONFIG_FB_MACMODES=y | ||
866 | CONFIG_FB_MODE_HELPERS=y | ||
867 | CONFIG_FB_TILEBLITTING=y | ||
868 | # CONFIG_FB_CIRRUS is not set | ||
869 | # CONFIG_FB_PM2 is not set | ||
870 | # CONFIG_FB_CYBER2000 is not set | ||
871 | CONFIG_FB_OF=y | ||
872 | # CONFIG_FB_CONTROL is not set | ||
873 | # CONFIG_FB_PLATINUM is not set | ||
874 | # CONFIG_FB_VALKYRIE is not set | ||
875 | # CONFIG_FB_CT65550 is not set | ||
876 | # CONFIG_FB_ASILIANT is not set | ||
877 | # CONFIG_FB_IMSTT is not set | ||
878 | # CONFIG_FB_VGA16 is not set | ||
879 | # CONFIG_FB_NVIDIA is not set | ||
880 | CONFIG_FB_RIVA=y | ||
881 | # CONFIG_FB_RIVA_I2C is not set | ||
882 | # CONFIG_FB_RIVA_DEBUG is not set | ||
883 | # CONFIG_FB_MATROX is not set | ||
884 | # CONFIG_FB_RADEON_OLD is not set | ||
885 | CONFIG_FB_RADEON=y | ||
886 | CONFIG_FB_RADEON_I2C=y | ||
887 | # CONFIG_FB_RADEON_DEBUG is not set | ||
888 | # CONFIG_FB_ATY128 is not set | ||
889 | # CONFIG_FB_ATY is not set | ||
890 | # CONFIG_FB_SAVAGE is not set | ||
891 | # CONFIG_FB_SIS is not set | ||
892 | # CONFIG_FB_NEOMAGIC is not set | ||
893 | # CONFIG_FB_KYRO is not set | ||
894 | # CONFIG_FB_3DFX is not set | ||
895 | # CONFIG_FB_VOODOO1 is not set | ||
896 | # CONFIG_FB_CYBLA is not set | ||
897 | # CONFIG_FB_TRIDENT is not set | ||
898 | # CONFIG_FB_S1D13XXX is not set | ||
899 | # CONFIG_FB_VIRTUAL is not set | ||
900 | |||
901 | # | ||
902 | # Console display driver support | ||
903 | # | ||
904 | # CONFIG_VGA_CONSOLE is not set | ||
905 | CONFIG_DUMMY_CONSOLE=y | ||
906 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
907 | # CONFIG_FONTS is not set | ||
908 | CONFIG_FONT_8x8=y | ||
909 | CONFIG_FONT_8x16=y | ||
910 | |||
911 | # | ||
912 | # Logo configuration | ||
913 | # | ||
914 | CONFIG_LOGO=y | ||
915 | CONFIG_LOGO_LINUX_MONO=y | ||
916 | CONFIG_LOGO_LINUX_VGA16=y | ||
917 | CONFIG_LOGO_LINUX_CLUT224=y | ||
918 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
919 | CONFIG_BACKLIGHT_CLASS_DEVICE=m | ||
920 | CONFIG_BACKLIGHT_DEVICE=y | ||
921 | CONFIG_LCD_CLASS_DEVICE=m | ||
922 | CONFIG_LCD_DEVICE=y | ||
923 | |||
924 | # | ||
925 | # Sound | ||
926 | # | ||
927 | # CONFIG_SOUND is not set | ||
928 | |||
929 | # | ||
930 | # USB support | ||
931 | # | ||
932 | CONFIG_USB_ARCH_HAS_HCD=y | ||
933 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
934 | CONFIG_USB=y | ||
935 | # CONFIG_USB_DEBUG is not set | ||
936 | |||
937 | # | ||
938 | # Miscellaneous USB options | ||
939 | # | ||
940 | CONFIG_USB_DEVICEFS=y | ||
941 | # CONFIG_USB_BANDWIDTH is not set | ||
942 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
943 | # CONFIG_USB_OTG is not set | ||
944 | |||
945 | # | ||
946 | # USB Host Controller Drivers | ||
947 | # | ||
948 | CONFIG_USB_EHCI_HCD=y | ||
949 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | ||
950 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | ||
951 | # CONFIG_USB_ISP116X_HCD is not set | ||
952 | CONFIG_USB_OHCI_HCD=y | ||
953 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
954 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
955 | # CONFIG_USB_UHCI_HCD is not set | ||
956 | # CONFIG_USB_SL811_HCD is not set | ||
957 | |||
958 | # | ||
959 | # USB Device Class drivers | ||
960 | # | ||
961 | # CONFIG_USB_BLUETOOTH_TTY is not set | ||
962 | CONFIG_USB_ACM=m | ||
963 | CONFIG_USB_PRINTER=y | ||
964 | |||
965 | # | ||
966 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
967 | # | ||
968 | CONFIG_USB_STORAGE=y | ||
969 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
970 | CONFIG_USB_STORAGE_DATAFAB=y | ||
971 | CONFIG_USB_STORAGE_FREECOM=y | ||
972 | CONFIG_USB_STORAGE_ISD200=y | ||
973 | CONFIG_USB_STORAGE_DPCM=y | ||
974 | # CONFIG_USB_STORAGE_USBAT is not set | ||
975 | CONFIG_USB_STORAGE_SDDR09=y | ||
976 | CONFIG_USB_STORAGE_SDDR55=y | ||
977 | CONFIG_USB_STORAGE_JUMPSHOT=y | ||
978 | # CONFIG_USB_STORAGE_ONETOUCH is not set | ||
979 | |||
980 | # | ||
981 | # USB Input Devices | ||
982 | # | ||
983 | CONFIG_USB_HID=y | ||
984 | CONFIG_USB_HIDINPUT=y | ||
985 | CONFIG_HID_FF=y | ||
986 | CONFIG_HID_PID=y | ||
987 | CONFIG_LOGITECH_FF=y | ||
988 | CONFIG_THRUSTMASTER_FF=y | ||
989 | CONFIG_USB_HIDDEV=y | ||
990 | # CONFIG_USB_AIPTEK is not set | ||
991 | # CONFIG_USB_WACOM is not set | ||
992 | # CONFIG_USB_ACECAD is not set | ||
993 | # CONFIG_USB_KBTAB is not set | ||
994 | # CONFIG_USB_POWERMATE is not set | ||
995 | # CONFIG_USB_MTOUCH is not set | ||
996 | # CONFIG_USB_ITMTOUCH is not set | ||
997 | # CONFIG_USB_EGALAX is not set | ||
998 | # CONFIG_USB_YEALINK is not set | ||
999 | # CONFIG_USB_XPAD is not set | ||
1000 | # CONFIG_USB_ATI_REMOTE is not set | ||
1001 | # CONFIG_USB_KEYSPAN_REMOTE is not set | ||
1002 | # CONFIG_USB_APPLETOUCH is not set | ||
1003 | |||
1004 | # | ||
1005 | # USB Imaging devices | ||
1006 | # | ||
1007 | # CONFIG_USB_MDC800 is not set | ||
1008 | # CONFIG_USB_MICROTEK is not set | ||
1009 | |||
1010 | # | ||
1011 | # USB Multimedia devices | ||
1012 | # | ||
1013 | # CONFIG_USB_DABUSB is not set | ||
1014 | |||
1015 | # | ||
1016 | # Video4Linux support is needed for USB Multimedia device support | ||
1017 | # | ||
1018 | |||
1019 | # | ||
1020 | # USB Network Adapters | ||
1021 | # | ||
1022 | CONFIG_USB_CATC=m | ||
1023 | CONFIG_USB_KAWETH=m | ||
1024 | CONFIG_USB_PEGASUS=m | ||
1025 | CONFIG_USB_RTL8150=m | ||
1026 | CONFIG_USB_USBNET=m | ||
1027 | # CONFIG_USB_NET_AX8817X is not set | ||
1028 | CONFIG_USB_NET_CDCETHER=m | ||
1029 | # CONFIG_USB_NET_GL620A is not set | ||
1030 | # CONFIG_USB_NET_NET1080 is not set | ||
1031 | # CONFIG_USB_NET_PLUSB is not set | ||
1032 | # CONFIG_USB_NET_RNDIS_HOST is not set | ||
1033 | # CONFIG_USB_NET_CDC_SUBSET is not set | ||
1034 | # CONFIG_USB_NET_ZAURUS is not set | ||
1035 | CONFIG_USB_MON=y | ||
1036 | |||
1037 | # | ||
1038 | # USB port drivers | ||
1039 | # | ||
1040 | |||
1041 | # | ||
1042 | # USB Serial Converter support | ||
1043 | # | ||
1044 | CONFIG_USB_SERIAL=m | ||
1045 | CONFIG_USB_SERIAL_GENERIC=y | ||
1046 | # CONFIG_USB_SERIAL_AIRPRIME is not set | ||
1047 | CONFIG_USB_SERIAL_BELKIN=m | ||
1048 | CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m | ||
1049 | # CONFIG_USB_SERIAL_CP2101 is not set | ||
1050 | CONFIG_USB_SERIAL_CYPRESS_M8=m | ||
1051 | CONFIG_USB_SERIAL_EMPEG=m | ||
1052 | CONFIG_USB_SERIAL_FTDI_SIO=m | ||
1053 | CONFIG_USB_SERIAL_VISOR=m | ||
1054 | CONFIG_USB_SERIAL_IPAQ=m | ||
1055 | CONFIG_USB_SERIAL_IR=m | ||
1056 | CONFIG_USB_SERIAL_EDGEPORT=m | ||
1057 | CONFIG_USB_SERIAL_EDGEPORT_TI=m | ||
1058 | CONFIG_USB_SERIAL_GARMIN=m | ||
1059 | CONFIG_USB_SERIAL_IPW=m | ||
1060 | CONFIG_USB_SERIAL_KEYSPAN_PDA=m | ||
1061 | CONFIG_USB_SERIAL_KEYSPAN=m | ||
1062 | CONFIG_USB_SERIAL_KEYSPAN_MPR=y | ||
1063 | CONFIG_USB_SERIAL_KEYSPAN_USA28=y | ||
1064 | CONFIG_USB_SERIAL_KEYSPAN_USA28X=y | ||
1065 | CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y | ||
1066 | CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y | ||
1067 | CONFIG_USB_SERIAL_KEYSPAN_USA19=y | ||
1068 | CONFIG_USB_SERIAL_KEYSPAN_USA18X=y | ||
1069 | CONFIG_USB_SERIAL_KEYSPAN_USA19W=y | ||
1070 | CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y | ||
1071 | CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y | ||
1072 | CONFIG_USB_SERIAL_KEYSPAN_USA49W=y | ||
1073 | CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y | ||
1074 | CONFIG_USB_SERIAL_KLSI=m | ||
1075 | CONFIG_USB_SERIAL_KOBIL_SCT=m | ||
1076 | CONFIG_USB_SERIAL_MCT_U232=m | ||
1077 | CONFIG_USB_SERIAL_PL2303=m | ||
1078 | # CONFIG_USB_SERIAL_HP4X is not set | ||
1079 | CONFIG_USB_SERIAL_SAFE=m | ||
1080 | CONFIG_USB_SERIAL_SAFE_PADDED=y | ||
1081 | CONFIG_USB_SERIAL_TI=m | ||
1082 | CONFIG_USB_SERIAL_CYBERJACK=m | ||
1083 | CONFIG_USB_SERIAL_XIRCOM=m | ||
1084 | CONFIG_USB_SERIAL_OMNINET=m | ||
1085 | CONFIG_USB_EZUSB=y | ||
1086 | |||
1087 | # | ||
1088 | # USB Miscellaneous drivers | ||
1089 | # | ||
1090 | # CONFIG_USB_EMI62 is not set | ||
1091 | # CONFIG_USB_EMI26 is not set | ||
1092 | # CONFIG_USB_AUERSWALD is not set | ||
1093 | # CONFIG_USB_RIO500 is not set | ||
1094 | # CONFIG_USB_LEGOTOWER is not set | ||
1095 | # CONFIG_USB_LCD is not set | ||
1096 | # CONFIG_USB_LED is not set | ||
1097 | # CONFIG_USB_CYTHERM is not set | ||
1098 | # CONFIG_USB_PHIDGETKIT is not set | ||
1099 | # CONFIG_USB_PHIDGETSERVO is not set | ||
1100 | # CONFIG_USB_IDMOUSE is not set | ||
1101 | # CONFIG_USB_SISUSBVGA is not set | ||
1102 | # CONFIG_USB_LD is not set | ||
1103 | # CONFIG_USB_TEST is not set | ||
1104 | |||
1105 | # | ||
1106 | # USB DSL modem support | ||
1107 | # | ||
1108 | |||
1109 | # | ||
1110 | # USB Gadget Support | ||
1111 | # | ||
1112 | # CONFIG_USB_GADGET is not set | ||
1113 | |||
1114 | # | ||
1115 | # MMC/SD Card support | ||
1116 | # | ||
1117 | # CONFIG_MMC is not set | ||
1118 | |||
1119 | # | ||
1120 | # InfiniBand support | ||
1121 | # | ||
1122 | # CONFIG_INFINIBAND is not set | ||
1123 | |||
1124 | # | ||
1125 | # SN Devices | ||
1126 | # | ||
1127 | |||
1128 | # | ||
1129 | # File systems | ||
1130 | # | ||
1131 | CONFIG_EXT2_FS=y | ||
1132 | CONFIG_EXT2_FS_XATTR=y | ||
1133 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
1134 | CONFIG_EXT2_FS_SECURITY=y | ||
1135 | CONFIG_EXT2_FS_XIP=y | ||
1136 | CONFIG_FS_XIP=y | ||
1137 | CONFIG_EXT3_FS=y | ||
1138 | CONFIG_EXT3_FS_XATTR=y | ||
1139 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
1140 | CONFIG_EXT3_FS_SECURITY=y | ||
1141 | CONFIG_JBD=y | ||
1142 | # CONFIG_JBD_DEBUG is not set | ||
1143 | CONFIG_FS_MBCACHE=y | ||
1144 | CONFIG_REISERFS_FS=y | ||
1145 | # CONFIG_REISERFS_CHECK is not set | ||
1146 | # CONFIG_REISERFS_PROC_INFO is not set | ||
1147 | CONFIG_REISERFS_FS_XATTR=y | ||
1148 | CONFIG_REISERFS_FS_POSIX_ACL=y | ||
1149 | CONFIG_REISERFS_FS_SECURITY=y | ||
1150 | # CONFIG_JFS_FS is not set | ||
1151 | CONFIG_FS_POSIX_ACL=y | ||
1152 | CONFIG_XFS_FS=m | ||
1153 | CONFIG_XFS_EXPORT=y | ||
1154 | # CONFIG_XFS_QUOTA is not set | ||
1155 | CONFIG_XFS_SECURITY=y | ||
1156 | CONFIG_XFS_POSIX_ACL=y | ||
1157 | # CONFIG_XFS_RT is not set | ||
1158 | # CONFIG_MINIX_FS is not set | ||
1159 | # CONFIG_ROMFS_FS is not set | ||
1160 | CONFIG_INOTIFY=y | ||
1161 | # CONFIG_QUOTA is not set | ||
1162 | CONFIG_DNOTIFY=y | ||
1163 | CONFIG_AUTOFS_FS=m | ||
1164 | # CONFIG_AUTOFS4_FS is not set | ||
1165 | # CONFIG_FUSE_FS is not set | ||
1166 | |||
1167 | # | ||
1168 | # CD-ROM/DVD Filesystems | ||
1169 | # | ||
1170 | CONFIG_ISO9660_FS=y | ||
1171 | CONFIG_JOLIET=y | ||
1172 | CONFIG_ZISOFS=y | ||
1173 | CONFIG_ZISOFS_FS=y | ||
1174 | CONFIG_UDF_FS=m | ||
1175 | CONFIG_UDF_NLS=y | ||
1176 | |||
1177 | # | ||
1178 | # DOS/FAT/NT Filesystems | ||
1179 | # | ||
1180 | CONFIG_FAT_FS=y | ||
1181 | CONFIG_MSDOS_FS=y | ||
1182 | CONFIG_VFAT_FS=y | ||
1183 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1184 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
1185 | # CONFIG_NTFS_FS is not set | ||
1186 | |||
1187 | # | ||
1188 | # Pseudo filesystems | ||
1189 | # | ||
1190 | CONFIG_PROC_FS=y | ||
1191 | CONFIG_PROC_KCORE=y | ||
1192 | CONFIG_SYSFS=y | ||
1193 | CONFIG_TMPFS=y | ||
1194 | CONFIG_HUGETLBFS=y | ||
1195 | CONFIG_HUGETLB_PAGE=y | ||
1196 | CONFIG_RAMFS=y | ||
1197 | # CONFIG_RELAYFS_FS is not set | ||
1198 | |||
1199 | # | ||
1200 | # Miscellaneous filesystems | ||
1201 | # | ||
1202 | # CONFIG_ADFS_FS is not set | ||
1203 | # CONFIG_AFFS_FS is not set | ||
1204 | CONFIG_HFS_FS=m | ||
1205 | CONFIG_HFSPLUS_FS=m | ||
1206 | # CONFIG_BEFS_FS is not set | ||
1207 | # CONFIG_BFS_FS is not set | ||
1208 | # CONFIG_EFS_FS is not set | ||
1209 | CONFIG_CRAMFS=y | ||
1210 | # CONFIG_VXFS_FS is not set | ||
1211 | # CONFIG_HPFS_FS is not set | ||
1212 | # CONFIG_QNX4FS_FS is not set | ||
1213 | # CONFIG_SYSV_FS is not set | ||
1214 | # CONFIG_UFS_FS is not set | ||
1215 | |||
1216 | # | ||
1217 | # Network File Systems | ||
1218 | # | ||
1219 | CONFIG_NFS_FS=y | ||
1220 | CONFIG_NFS_V3=y | ||
1221 | CONFIG_NFS_V3_ACL=y | ||
1222 | CONFIG_NFS_V4=y | ||
1223 | # CONFIG_NFS_DIRECTIO is not set | ||
1224 | CONFIG_NFSD=y | ||
1225 | CONFIG_NFSD_V2_ACL=y | ||
1226 | CONFIG_NFSD_V3=y | ||
1227 | CONFIG_NFSD_V3_ACL=y | ||
1228 | CONFIG_NFSD_V4=y | ||
1229 | CONFIG_NFSD_TCP=y | ||
1230 | CONFIG_LOCKD=y | ||
1231 | CONFIG_LOCKD_V4=y | ||
1232 | CONFIG_EXPORTFS=y | ||
1233 | CONFIG_NFS_ACL_SUPPORT=y | ||
1234 | CONFIG_NFS_COMMON=y | ||
1235 | CONFIG_SUNRPC=y | ||
1236 | CONFIG_SUNRPC_GSS=y | ||
1237 | CONFIG_RPCSEC_GSS_KRB5=y | ||
1238 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1239 | # CONFIG_SMB_FS is not set | ||
1240 | CONFIG_CIFS=m | ||
1241 | # CONFIG_CIFS_STATS is not set | ||
1242 | # CONFIG_CIFS_XATTR is not set | ||
1243 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
1244 | # CONFIG_NCP_FS is not set | ||
1245 | # CONFIG_CODA_FS is not set | ||
1246 | # CONFIG_AFS_FS is not set | ||
1247 | # CONFIG_9P_FS is not set | ||
1248 | |||
1249 | # | ||
1250 | # Partition Types | ||
1251 | # | ||
1252 | CONFIG_PARTITION_ADVANCED=y | ||
1253 | # CONFIG_ACORN_PARTITION is not set | ||
1254 | # CONFIG_OSF_PARTITION is not set | ||
1255 | # CONFIG_AMIGA_PARTITION is not set | ||
1256 | # CONFIG_ATARI_PARTITION is not set | ||
1257 | CONFIG_MAC_PARTITION=y | ||
1258 | CONFIG_MSDOS_PARTITION=y | ||
1259 | # CONFIG_BSD_DISKLABEL is not set | ||
1260 | # CONFIG_MINIX_SUBPARTITION is not set | ||
1261 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
1262 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
1263 | # CONFIG_LDM_PARTITION is not set | ||
1264 | # CONFIG_SGI_PARTITION is not set | ||
1265 | # CONFIG_ULTRIX_PARTITION is not set | ||
1266 | # CONFIG_SUN_PARTITION is not set | ||
1267 | # CONFIG_EFI_PARTITION is not set | ||
1268 | |||
1269 | # | ||
1270 | # Native Language Support | ||
1271 | # | ||
1272 | CONFIG_NLS=y | ||
1273 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1274 | CONFIG_NLS_CODEPAGE_437=y | ||
1275 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1276 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1277 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1278 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1279 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1280 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1281 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1282 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1283 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1284 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1285 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1286 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1287 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1288 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1289 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1290 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1291 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1292 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1293 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1294 | # CONFIG_NLS_ISO8859_8 is not set | ||
1295 | CONFIG_NLS_CODEPAGE_1250=y | ||
1296 | CONFIG_NLS_CODEPAGE_1251=y | ||
1297 | CONFIG_NLS_ASCII=y | ||
1298 | CONFIG_NLS_ISO8859_1=y | ||
1299 | # CONFIG_NLS_ISO8859_2 is not set | ||
1300 | # CONFIG_NLS_ISO8859_3 is not set | ||
1301 | # CONFIG_NLS_ISO8859_4 is not set | ||
1302 | # CONFIG_NLS_ISO8859_5 is not set | ||
1303 | # CONFIG_NLS_ISO8859_6 is not set | ||
1304 | # CONFIG_NLS_ISO8859_7 is not set | ||
1305 | # CONFIG_NLS_ISO8859_9 is not set | ||
1306 | # CONFIG_NLS_ISO8859_13 is not set | ||
1307 | # CONFIG_NLS_ISO8859_14 is not set | ||
1308 | CONFIG_NLS_ISO8859_15=y | ||
1309 | # CONFIG_NLS_KOI8_R is not set | ||
1310 | # CONFIG_NLS_KOI8_U is not set | ||
1311 | CONFIG_NLS_UTF8=y | ||
1312 | |||
1313 | # | ||
1314 | # Profiling support | ||
1315 | # | ||
1316 | CONFIG_PROFILING=y | ||
1317 | CONFIG_OPROFILE=y | ||
1318 | |||
1319 | # | ||
1320 | # Kernel hacking | ||
1321 | # | ||
1322 | # CONFIG_PRINTK_TIME is not set | ||
1323 | CONFIG_DEBUG_KERNEL=y | ||
1324 | CONFIG_MAGIC_SYSRQ=y | ||
1325 | CONFIG_LOG_BUF_SHIFT=17 | ||
1326 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1327 | # CONFIG_SCHEDSTATS is not set | ||
1328 | # CONFIG_DEBUG_SLAB is not set | ||
1329 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1330 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1331 | # CONFIG_DEBUG_KOBJECT is not set | ||
1332 | # CONFIG_DEBUG_INFO is not set | ||
1333 | CONFIG_DEBUG_FS=y | ||
1334 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
1335 | # CONFIG_KPROBES is not set | ||
1336 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
1337 | # CONFIG_DEBUGGER is not set | ||
1338 | # CONFIG_PPCDBG is not set | ||
1339 | CONFIG_IRQSTACKS=y | ||
1340 | |||
1341 | # | ||
1342 | # Security options | ||
1343 | # | ||
1344 | # CONFIG_KEYS is not set | ||
1345 | # CONFIG_SECURITY is not set | ||
1346 | |||
1347 | # | ||
1348 | # Cryptographic options | ||
1349 | # | ||
1350 | CONFIG_CRYPTO=y | ||
1351 | CONFIG_CRYPTO_HMAC=y | ||
1352 | CONFIG_CRYPTO_NULL=m | ||
1353 | CONFIG_CRYPTO_MD4=m | ||
1354 | CONFIG_CRYPTO_MD5=y | ||
1355 | CONFIG_CRYPTO_SHA1=m | ||
1356 | CONFIG_CRYPTO_SHA256=m | ||
1357 | CONFIG_CRYPTO_SHA512=m | ||
1358 | CONFIG_CRYPTO_WP512=m | ||
1359 | # CONFIG_CRYPTO_TGR192 is not set | ||
1360 | CONFIG_CRYPTO_DES=y | ||
1361 | CONFIG_CRYPTO_BLOWFISH=m | ||
1362 | CONFIG_CRYPTO_TWOFISH=m | ||
1363 | CONFIG_CRYPTO_SERPENT=m | ||
1364 | CONFIG_CRYPTO_AES=m | ||
1365 | CONFIG_CRYPTO_CAST5=m | ||
1366 | CONFIG_CRYPTO_CAST6=m | ||
1367 | CONFIG_CRYPTO_TEA=m | ||
1368 | CONFIG_CRYPTO_ARC4=m | ||
1369 | CONFIG_CRYPTO_KHAZAD=m | ||
1370 | CONFIG_CRYPTO_ANUBIS=m | ||
1371 | CONFIG_CRYPTO_DEFLATE=m | ||
1372 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1373 | CONFIG_CRYPTO_CRC32C=m | ||
1374 | CONFIG_CRYPTO_TEST=m | ||
1375 | |||
1376 | # | ||
1377 | # Hardware crypto devices | ||
1378 | # | ||
1379 | |||
1380 | # | ||
1381 | # Library routines | ||
1382 | # | ||
1383 | CONFIG_CRC_CCITT=m | ||
1384 | # CONFIG_CRC16 is not set | ||
1385 | CONFIG_CRC32=y | ||
1386 | CONFIG_LIBCRC32C=m | ||
1387 | CONFIG_ZLIB_INFLATE=y | ||
1388 | CONFIG_ZLIB_DEFLATE=m | ||
1389 | CONFIG_TEXTSEARCH=y | ||
1390 | CONFIG_TEXTSEARCH_KMP=m | ||
1391 | CONFIG_TEXTSEARCH_BM=m | ||
1392 | CONFIG_TEXTSEARCH_FSM=m | ||
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig new file mode 100644 index 000000000000..62e92c7e9e27 --- /dev/null +++ b/arch/powerpc/configs/iseries_defconfig | |||
@@ -0,0 +1,998 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.14-rc4 | ||
4 | # Thu Oct 20 08:30:56 2005 | ||
5 | # | ||
6 | CONFIG_64BIT=y | ||
7 | CONFIG_MMU=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_GENERIC_ISA_DMA=y | ||
11 | CONFIG_EARLY_PRINTK=y | ||
12 | CONFIG_COMPAT=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
16 | |||
17 | # | ||
18 | # Code maturity level options | ||
19 | # | ||
20 | CONFIG_EXPERIMENTAL=y | ||
21 | CONFIG_CLEAN_COMPILE=y | ||
22 | CONFIG_LOCK_KERNEL=y | ||
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
24 | |||
25 | # | ||
26 | # General setup | ||
27 | # | ||
28 | CONFIG_LOCALVERSION="" | ||
29 | CONFIG_LOCALVERSION_AUTO=y | ||
30 | CONFIG_SWAP=y | ||
31 | CONFIG_SYSVIPC=y | ||
32 | CONFIG_POSIX_MQUEUE=y | ||
33 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
34 | CONFIG_SYSCTL=y | ||
35 | CONFIG_AUDIT=y | ||
36 | CONFIG_AUDITSYSCALL=y | ||
37 | CONFIG_HOTPLUG=y | ||
38 | CONFIG_KOBJECT_UEVENT=y | ||
39 | CONFIG_IKCONFIG=y | ||
40 | CONFIG_IKCONFIG_PROC=y | ||
41 | # CONFIG_CPUSETS is not set | ||
42 | CONFIG_INITRAMFS_SOURCE="" | ||
43 | # CONFIG_EMBEDDED is not set | ||
44 | CONFIG_KALLSYMS=y | ||
45 | # CONFIG_KALLSYMS_ALL is not set | ||
46 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
47 | CONFIG_PRINTK=y | ||
48 | CONFIG_BUG=y | ||
49 | CONFIG_BASE_FULL=y | ||
50 | CONFIG_FUTEX=y | ||
51 | CONFIG_EPOLL=y | ||
52 | CONFIG_SHMEM=y | ||
53 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
54 | CONFIG_CC_ALIGN_LABELS=0 | ||
55 | CONFIG_CC_ALIGN_LOOPS=0 | ||
56 | CONFIG_CC_ALIGN_JUMPS=0 | ||
57 | # CONFIG_TINY_SHMEM is not set | ||
58 | CONFIG_BASE_SMALL=0 | ||
59 | |||
60 | # | ||
61 | # Loadable module support | ||
62 | # | ||
63 | CONFIG_MODULES=y | ||
64 | CONFIG_MODULE_UNLOAD=y | ||
65 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
66 | CONFIG_OBSOLETE_MODPARM=y | ||
67 | CONFIG_MODVERSIONS=y | ||
68 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
69 | CONFIG_KMOD=y | ||
70 | CONFIG_STOP_MACHINE=y | ||
71 | CONFIG_SYSVIPC_COMPAT=y | ||
72 | |||
73 | # | ||
74 | # Platform support | ||
75 | # | ||
76 | CONFIG_PPC_ISERIES=y | ||
77 | # CONFIG_PPC_MULTIPLATFORM is not set | ||
78 | CONFIG_PPC=y | ||
79 | CONFIG_PPC64=y | ||
80 | CONFIG_IBMVIO=y | ||
81 | # CONFIG_POWER4_ONLY is not set | ||
82 | CONFIG_IOMMU_VMERGE=y | ||
83 | CONFIG_SMP=y | ||
84 | CONFIG_NR_CPUS=32 | ||
85 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | ||
86 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
87 | CONFIG_SELECT_MEMORY_MODEL=y | ||
88 | CONFIG_FLATMEM_MANUAL=y | ||
89 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
90 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
91 | CONFIG_FLATMEM=y | ||
92 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
93 | # CONFIG_SPARSEMEM_STATIC is not set | ||
94 | # CONFIG_NUMA is not set | ||
95 | # CONFIG_SCHED_SMT is not set | ||
96 | CONFIG_PREEMPT_NONE=y | ||
97 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
98 | # CONFIG_PREEMPT is not set | ||
99 | # CONFIG_PREEMPT_BKL is not set | ||
100 | # CONFIG_HZ_100 is not set | ||
101 | CONFIG_HZ_250=y | ||
102 | # CONFIG_HZ_1000 is not set | ||
103 | CONFIG_HZ=250 | ||
104 | CONFIG_GENERIC_HARDIRQS=y | ||
105 | CONFIG_LPARCFG=y | ||
106 | CONFIG_SECCOMP=y | ||
107 | CONFIG_BINFMT_ELF=y | ||
108 | # CONFIG_BINFMT_MISC is not set | ||
109 | CONFIG_ISA_DMA_API=y | ||
110 | |||
111 | # | ||
112 | # Bus Options | ||
113 | # | ||
114 | CONFIG_PCI=y | ||
115 | CONFIG_PCI_DOMAINS=y | ||
116 | CONFIG_PCI_LEGACY_PROC=y | ||
117 | # CONFIG_PCI_DEBUG is not set | ||
118 | |||
119 | # | ||
120 | # PCCARD (PCMCIA/CardBus) support | ||
121 | # | ||
122 | # CONFIG_PCCARD is not set | ||
123 | |||
124 | # | ||
125 | # PCI Hotplug Support | ||
126 | # | ||
127 | # CONFIG_HOTPLUG_PCI is not set | ||
128 | |||
129 | # | ||
130 | # Networking | ||
131 | # | ||
132 | CONFIG_NET=y | ||
133 | |||
134 | # | ||
135 | # Networking options | ||
136 | # | ||
137 | CONFIG_PACKET=y | ||
138 | # CONFIG_PACKET_MMAP is not set | ||
139 | CONFIG_UNIX=y | ||
140 | CONFIG_XFRM=y | ||
141 | CONFIG_XFRM_USER=m | ||
142 | CONFIG_NET_KEY=m | ||
143 | CONFIG_INET=y | ||
144 | CONFIG_IP_MULTICAST=y | ||
145 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
146 | CONFIG_IP_FIB_HASH=y | ||
147 | # CONFIG_IP_PNP is not set | ||
148 | CONFIG_NET_IPIP=y | ||
149 | # CONFIG_NET_IPGRE is not set | ||
150 | # CONFIG_IP_MROUTE is not set | ||
151 | # CONFIG_ARPD is not set | ||
152 | CONFIG_SYN_COOKIES=y | ||
153 | CONFIG_INET_AH=m | ||
154 | CONFIG_INET_ESP=m | ||
155 | CONFIG_INET_IPCOMP=m | ||
156 | CONFIG_INET_TUNNEL=y | ||
157 | CONFIG_INET_DIAG=y | ||
158 | CONFIG_INET_TCP_DIAG=y | ||
159 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
160 | CONFIG_TCP_CONG_BIC=y | ||
161 | |||
162 | # | ||
163 | # IP: Virtual Server Configuration | ||
164 | # | ||
165 | # CONFIG_IP_VS is not set | ||
166 | # CONFIG_IPV6 is not set | ||
167 | CONFIG_NETFILTER=y | ||
168 | # CONFIG_NETFILTER_DEBUG is not set | ||
169 | # CONFIG_NETFILTER_NETLINK is not set | ||
170 | |||
171 | # | ||
172 | # IP: Netfilter Configuration | ||
173 | # | ||
174 | CONFIG_IP_NF_CONNTRACK=m | ||
175 | CONFIG_IP_NF_CT_ACCT=y | ||
176 | CONFIG_IP_NF_CONNTRACK_MARK=y | ||
177 | CONFIG_IP_NF_CONNTRACK_EVENTS=y | ||
178 | CONFIG_IP_NF_CT_PROTO_SCTP=m | ||
179 | CONFIG_IP_NF_FTP=m | ||
180 | CONFIG_IP_NF_IRC=m | ||
181 | # CONFIG_IP_NF_NETBIOS_NS is not set | ||
182 | CONFIG_IP_NF_TFTP=m | ||
183 | CONFIG_IP_NF_AMANDA=m | ||
184 | # CONFIG_IP_NF_PPTP is not set | ||
185 | CONFIG_IP_NF_QUEUE=m | ||
186 | CONFIG_IP_NF_IPTABLES=m | ||
187 | CONFIG_IP_NF_MATCH_LIMIT=m | ||
188 | CONFIG_IP_NF_MATCH_IPRANGE=m | ||
189 | CONFIG_IP_NF_MATCH_MAC=m | ||
190 | CONFIG_IP_NF_MATCH_PKTTYPE=m | ||
191 | CONFIG_IP_NF_MATCH_MARK=m | ||
192 | CONFIG_IP_NF_MATCH_MULTIPORT=m | ||
193 | CONFIG_IP_NF_MATCH_TOS=m | ||
194 | CONFIG_IP_NF_MATCH_RECENT=m | ||
195 | CONFIG_IP_NF_MATCH_ECN=m | ||
196 | CONFIG_IP_NF_MATCH_DSCP=m | ||
197 | CONFIG_IP_NF_MATCH_AH_ESP=m | ||
198 | CONFIG_IP_NF_MATCH_LENGTH=m | ||
199 | CONFIG_IP_NF_MATCH_TTL=m | ||
200 | CONFIG_IP_NF_MATCH_TCPMSS=m | ||
201 | CONFIG_IP_NF_MATCH_HELPER=m | ||
202 | CONFIG_IP_NF_MATCH_STATE=m | ||
203 | CONFIG_IP_NF_MATCH_CONNTRACK=m | ||
204 | CONFIG_IP_NF_MATCH_OWNER=m | ||
205 | CONFIG_IP_NF_MATCH_ADDRTYPE=m | ||
206 | CONFIG_IP_NF_MATCH_REALM=m | ||
207 | CONFIG_IP_NF_MATCH_SCTP=m | ||
208 | # CONFIG_IP_NF_MATCH_DCCP is not set | ||
209 | CONFIG_IP_NF_MATCH_COMMENT=m | ||
210 | CONFIG_IP_NF_MATCH_CONNMARK=m | ||
211 | CONFIG_IP_NF_MATCH_CONNBYTES=m | ||
212 | CONFIG_IP_NF_MATCH_HASHLIMIT=m | ||
213 | CONFIG_IP_NF_MATCH_STRING=m | ||
214 | CONFIG_IP_NF_FILTER=m | ||
215 | CONFIG_IP_NF_TARGET_REJECT=m | ||
216 | CONFIG_IP_NF_TARGET_LOG=m | ||
217 | CONFIG_IP_NF_TARGET_ULOG=m | ||
218 | CONFIG_IP_NF_TARGET_TCPMSS=m | ||
219 | CONFIG_IP_NF_TARGET_NFQUEUE=m | ||
220 | CONFIG_IP_NF_NAT=m | ||
221 | CONFIG_IP_NF_NAT_NEEDED=y | ||
222 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
223 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
224 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
225 | CONFIG_IP_NF_TARGET_SAME=m | ||
226 | CONFIG_IP_NF_NAT_SNMP_BASIC=m | ||
227 | CONFIG_IP_NF_NAT_IRC=m | ||
228 | CONFIG_IP_NF_NAT_FTP=m | ||
229 | CONFIG_IP_NF_NAT_TFTP=m | ||
230 | CONFIG_IP_NF_NAT_AMANDA=m | ||
231 | CONFIG_IP_NF_MANGLE=m | ||
232 | CONFIG_IP_NF_TARGET_TOS=m | ||
233 | CONFIG_IP_NF_TARGET_ECN=m | ||
234 | CONFIG_IP_NF_TARGET_DSCP=m | ||
235 | CONFIG_IP_NF_TARGET_MARK=m | ||
236 | CONFIG_IP_NF_TARGET_CLASSIFY=m | ||
237 | CONFIG_IP_NF_TARGET_TTL=m | ||
238 | CONFIG_IP_NF_TARGET_CONNMARK=m | ||
239 | CONFIG_IP_NF_TARGET_CLUSTERIP=m | ||
240 | CONFIG_IP_NF_RAW=m | ||
241 | CONFIG_IP_NF_TARGET_NOTRACK=m | ||
242 | CONFIG_IP_NF_ARPTABLES=m | ||
243 | CONFIG_IP_NF_ARPFILTER=m | ||
244 | CONFIG_IP_NF_ARP_MANGLE=m | ||
245 | |||
246 | # | ||
247 | # DCCP Configuration (EXPERIMENTAL) | ||
248 | # | ||
249 | # CONFIG_IP_DCCP is not set | ||
250 | |||
251 | # | ||
252 | # SCTP Configuration (EXPERIMENTAL) | ||
253 | # | ||
254 | # CONFIG_IP_SCTP is not set | ||
255 | # CONFIG_ATM is not set | ||
256 | # CONFIG_BRIDGE is not set | ||
257 | # CONFIG_VLAN_8021Q is not set | ||
258 | # CONFIG_DECNET is not set | ||
259 | CONFIG_LLC=y | ||
260 | # CONFIG_LLC2 is not set | ||
261 | # CONFIG_IPX is not set | ||
262 | # CONFIG_ATALK is not set | ||
263 | # CONFIG_X25 is not set | ||
264 | # CONFIG_LAPB is not set | ||
265 | # CONFIG_NET_DIVERT is not set | ||
266 | # CONFIG_ECONET is not set | ||
267 | # CONFIG_WAN_ROUTER is not set | ||
268 | # CONFIG_NET_SCHED is not set | ||
269 | CONFIG_NET_CLS_ROUTE=y | ||
270 | |||
271 | # | ||
272 | # Network testing | ||
273 | # | ||
274 | # CONFIG_NET_PKTGEN is not set | ||
275 | # CONFIG_HAMRADIO is not set | ||
276 | # CONFIG_IRDA is not set | ||
277 | # CONFIG_BT is not set | ||
278 | # CONFIG_IEEE80211 is not set | ||
279 | |||
280 | # | ||
281 | # Device Drivers | ||
282 | # | ||
283 | |||
284 | # | ||
285 | # Generic Driver Options | ||
286 | # | ||
287 | CONFIG_STANDALONE=y | ||
288 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
289 | CONFIG_FW_LOADER=m | ||
290 | # CONFIG_DEBUG_DRIVER is not set | ||
291 | |||
292 | # | ||
293 | # Connector - unified userspace <-> kernelspace linker | ||
294 | # | ||
295 | # CONFIG_CONNECTOR is not set | ||
296 | |||
297 | # | ||
298 | # Memory Technology Devices (MTD) | ||
299 | # | ||
300 | # CONFIG_MTD is not set | ||
301 | |||
302 | # | ||
303 | # Parallel port support | ||
304 | # | ||
305 | # CONFIG_PARPORT is not set | ||
306 | |||
307 | # | ||
308 | # Plug and Play support | ||
309 | # | ||
310 | |||
311 | # | ||
312 | # Block devices | ||
313 | # | ||
314 | # CONFIG_BLK_DEV_FD is not set | ||
315 | # CONFIG_BLK_CPQ_DA is not set | ||
316 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
317 | # CONFIG_BLK_DEV_DAC960 is not set | ||
318 | # CONFIG_BLK_DEV_UMEM is not set | ||
319 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
320 | CONFIG_BLK_DEV_LOOP=y | ||
321 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
322 | CONFIG_BLK_DEV_NBD=m | ||
323 | # CONFIG_BLK_DEV_SX8 is not set | ||
324 | CONFIG_BLK_DEV_RAM=y | ||
325 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
326 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
327 | CONFIG_BLK_DEV_INITRD=y | ||
328 | # CONFIG_CDROM_PKTCDVD is not set | ||
329 | |||
330 | # | ||
331 | # IO Schedulers | ||
332 | # | ||
333 | CONFIG_IOSCHED_NOOP=y | ||
334 | CONFIG_IOSCHED_AS=y | ||
335 | CONFIG_IOSCHED_DEADLINE=y | ||
336 | CONFIG_IOSCHED_CFQ=y | ||
337 | # CONFIG_ATA_OVER_ETH is not set | ||
338 | |||
339 | # | ||
340 | # ATA/ATAPI/MFM/RLL support | ||
341 | # | ||
342 | # CONFIG_IDE is not set | ||
343 | |||
344 | # | ||
345 | # SCSI device support | ||
346 | # | ||
347 | # CONFIG_RAID_ATTRS is not set | ||
348 | CONFIG_SCSI=y | ||
349 | CONFIG_SCSI_PROC_FS=y | ||
350 | |||
351 | # | ||
352 | # SCSI support type (disk, tape, CD-ROM) | ||
353 | # | ||
354 | CONFIG_BLK_DEV_SD=y | ||
355 | CONFIG_CHR_DEV_ST=y | ||
356 | # CONFIG_CHR_DEV_OSST is not set | ||
357 | CONFIG_BLK_DEV_SR=y | ||
358 | CONFIG_BLK_DEV_SR_VENDOR=y | ||
359 | CONFIG_CHR_DEV_SG=y | ||
360 | # 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=y | ||
366 | CONFIG_SCSI_CONSTANTS=y | ||
367 | # CONFIG_SCSI_LOGGING is not set | ||
368 | |||
369 | # | ||
370 | # SCSI Transport Attributes | ||
371 | # | ||
372 | CONFIG_SCSI_SPI_ATTRS=y | ||
373 | CONFIG_SCSI_FC_ATTRS=y | ||
374 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
375 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
376 | |||
377 | # | ||
378 | # SCSI low-level drivers | ||
379 | # | ||
380 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
381 | # CONFIG_SCSI_3W_9XXX is not set | ||
382 | # CONFIG_SCSI_ACARD is not set | ||
383 | # CONFIG_SCSI_AACRAID is not set | ||
384 | # CONFIG_SCSI_AIC7XXX is not set | ||
385 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
386 | # CONFIG_SCSI_AIC79XX is not set | ||
387 | # CONFIG_MEGARAID_NEWGEN is not set | ||
388 | # CONFIG_MEGARAID_LEGACY is not set | ||
389 | # CONFIG_MEGARAID_SAS is not set | ||
390 | # CONFIG_SCSI_SATA is not set | ||
391 | # CONFIG_SCSI_BUSLOGIC is not set | ||
392 | # CONFIG_SCSI_DMX3191D is not set | ||
393 | # CONFIG_SCSI_EATA is not set | ||
394 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
395 | # CONFIG_SCSI_GDTH is not set | ||
396 | # CONFIG_SCSI_IPS is not set | ||
397 | CONFIG_SCSI_IBMVSCSI=m | ||
398 | # CONFIG_SCSI_INITIO is not set | ||
399 | # CONFIG_SCSI_INIA100 is not set | ||
400 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
401 | # CONFIG_SCSI_IPR is not set | ||
402 | # CONFIG_SCSI_QLOGIC_FC is not set | ||
403 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
404 | CONFIG_SCSI_QLA2XXX=y | ||
405 | # CONFIG_SCSI_QLA21XX is not set | ||
406 | # CONFIG_SCSI_QLA22XX is not set | ||
407 | # CONFIG_SCSI_QLA2300 is not set | ||
408 | # CONFIG_SCSI_QLA2322 is not set | ||
409 | # CONFIG_SCSI_QLA6312 is not set | ||
410 | # CONFIG_SCSI_QLA24XX is not set | ||
411 | # CONFIG_SCSI_LPFC is not set | ||
412 | # CONFIG_SCSI_DC395x is not set | ||
413 | # CONFIG_SCSI_DC390T is not set | ||
414 | # CONFIG_SCSI_DEBUG is not set | ||
415 | |||
416 | # | ||
417 | # Multi-device support (RAID and LVM) | ||
418 | # | ||
419 | CONFIG_MD=y | ||
420 | CONFIG_BLK_DEV_MD=y | ||
421 | CONFIG_MD_LINEAR=y | ||
422 | CONFIG_MD_RAID0=y | ||
423 | CONFIG_MD_RAID1=y | ||
424 | CONFIG_MD_RAID10=m | ||
425 | CONFIG_MD_RAID5=y | ||
426 | CONFIG_MD_RAID6=m | ||
427 | CONFIG_MD_MULTIPATH=m | ||
428 | CONFIG_MD_FAULTY=m | ||
429 | CONFIG_BLK_DEV_DM=y | ||
430 | CONFIG_DM_CRYPT=m | ||
431 | CONFIG_DM_SNAPSHOT=m | ||
432 | CONFIG_DM_MIRROR=m | ||
433 | CONFIG_DM_ZERO=m | ||
434 | # CONFIG_DM_MULTIPATH is not set | ||
435 | |||
436 | # | ||
437 | # Fusion MPT device support | ||
438 | # | ||
439 | # CONFIG_FUSION is not set | ||
440 | # CONFIG_FUSION_SPI is not set | ||
441 | # CONFIG_FUSION_FC is not set | ||
442 | # CONFIG_FUSION_SAS is not set | ||
443 | |||
444 | # | ||
445 | # IEEE 1394 (FireWire) support | ||
446 | # | ||
447 | # CONFIG_IEEE1394 is not set | ||
448 | |||
449 | # | ||
450 | # I2O device support | ||
451 | # | ||
452 | # CONFIG_I2O is not set | ||
453 | |||
454 | # | ||
455 | # Macintosh device drivers | ||
456 | # | ||
457 | |||
458 | # | ||
459 | # Network device support | ||
460 | # | ||
461 | CONFIG_NETDEVICES=y | ||
462 | CONFIG_DUMMY=m | ||
463 | CONFIG_BONDING=m | ||
464 | # CONFIG_EQUALIZER is not set | ||
465 | CONFIG_TUN=m | ||
466 | |||
467 | # | ||
468 | # ARCnet devices | ||
469 | # | ||
470 | # CONFIG_ARCNET is not set | ||
471 | |||
472 | # | ||
473 | # PHY device support | ||
474 | # | ||
475 | # CONFIG_PHYLIB is not set | ||
476 | |||
477 | # | ||
478 | # Ethernet (10 or 100Mbit) | ||
479 | # | ||
480 | CONFIG_NET_ETHERNET=y | ||
481 | CONFIG_MII=y | ||
482 | # CONFIG_HAPPYMEAL is not set | ||
483 | # CONFIG_SUNGEM is not set | ||
484 | # CONFIG_CASSINI is not set | ||
485 | # CONFIG_NET_VENDOR_3COM is not set | ||
486 | |||
487 | # | ||
488 | # Tulip family network device support | ||
489 | # | ||
490 | # CONFIG_NET_TULIP is not set | ||
491 | # CONFIG_HP100 is not set | ||
492 | CONFIG_NET_PCI=y | ||
493 | CONFIG_PCNET32=y | ||
494 | # CONFIG_AMD8111_ETH is not set | ||
495 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
496 | # CONFIG_B44 is not set | ||
497 | # CONFIG_FORCEDETH is not set | ||
498 | # CONFIG_DGRS is not set | ||
499 | # CONFIG_EEPRO100 is not set | ||
500 | CONFIG_E100=y | ||
501 | # CONFIG_FEALNX is not set | ||
502 | # CONFIG_NATSEMI is not set | ||
503 | # CONFIG_NE2K_PCI is not set | ||
504 | # CONFIG_8139CP is not set | ||
505 | # CONFIG_8139TOO is not set | ||
506 | # CONFIG_SIS900 is not set | ||
507 | # CONFIG_EPIC100 is not set | ||
508 | # CONFIG_SUNDANCE is not set | ||
509 | # CONFIG_VIA_RHINE is not set | ||
510 | |||
511 | # | ||
512 | # Ethernet (1000 Mbit) | ||
513 | # | ||
514 | CONFIG_ACENIC=m | ||
515 | # CONFIG_ACENIC_OMIT_TIGON_I is not set | ||
516 | # CONFIG_DL2K is not set | ||
517 | CONFIG_E1000=m | ||
518 | # CONFIG_E1000_NAPI is not set | ||
519 | # CONFIG_NS83820 is not set | ||
520 | # CONFIG_HAMACHI is not set | ||
521 | # CONFIG_YELLOWFIN is not set | ||
522 | # CONFIG_R8169 is not set | ||
523 | # CONFIG_SIS190 is not set | ||
524 | # CONFIG_SKGE is not set | ||
525 | # CONFIG_SK98LIN is not set | ||
526 | # CONFIG_VIA_VELOCITY is not set | ||
527 | # CONFIG_TIGON3 is not set | ||
528 | # CONFIG_BNX2 is not set | ||
529 | |||
530 | # | ||
531 | # Ethernet (10000 Mbit) | ||
532 | # | ||
533 | # CONFIG_CHELSIO_T1 is not set | ||
534 | # CONFIG_IXGB is not set | ||
535 | # CONFIG_S2IO is not set | ||
536 | |||
537 | # | ||
538 | # Token Ring devices | ||
539 | # | ||
540 | CONFIG_TR=y | ||
541 | CONFIG_IBMOL=y | ||
542 | # CONFIG_3C359 is not set | ||
543 | # CONFIG_TMS380TR is not set | ||
544 | |||
545 | # | ||
546 | # Wireless LAN (non-hamradio) | ||
547 | # | ||
548 | # CONFIG_NET_RADIO is not set | ||
549 | |||
550 | # | ||
551 | # Wan interfaces | ||
552 | # | ||
553 | # CONFIG_WAN is not set | ||
554 | CONFIG_ISERIES_VETH=y | ||
555 | # CONFIG_FDDI is not set | ||
556 | # CONFIG_HIPPI is not set | ||
557 | CONFIG_PPP=m | ||
558 | # CONFIG_PPP_MULTILINK is not set | ||
559 | # CONFIG_PPP_FILTER is not set | ||
560 | CONFIG_PPP_ASYNC=m | ||
561 | CONFIG_PPP_SYNC_TTY=m | ||
562 | CONFIG_PPP_DEFLATE=m | ||
563 | CONFIG_PPP_BSDCOMP=m | ||
564 | CONFIG_PPPOE=m | ||
565 | # CONFIG_SLIP is not set | ||
566 | # CONFIG_NET_FC is not set | ||
567 | # CONFIG_SHAPER is not set | ||
568 | CONFIG_NETCONSOLE=y | ||
569 | CONFIG_NETPOLL=y | ||
570 | CONFIG_NETPOLL_RX=y | ||
571 | CONFIG_NETPOLL_TRAP=y | ||
572 | CONFIG_NET_POLL_CONTROLLER=y | ||
573 | |||
574 | # | ||
575 | # ISDN subsystem | ||
576 | # | ||
577 | # CONFIG_ISDN is not set | ||
578 | |||
579 | # | ||
580 | # Telephony Support | ||
581 | # | ||
582 | # CONFIG_PHONE is not set | ||
583 | |||
584 | # | ||
585 | # Input device support | ||
586 | # | ||
587 | CONFIG_INPUT=y | ||
588 | |||
589 | # | ||
590 | # Userland interfaces | ||
591 | # | ||
592 | CONFIG_INPUT_MOUSEDEV=y | ||
593 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
594 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
595 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
596 | # CONFIG_INPUT_JOYDEV is not set | ||
597 | # CONFIG_INPUT_TSDEV is not set | ||
598 | # CONFIG_INPUT_EVDEV is not set | ||
599 | # CONFIG_INPUT_EVBUG is not set | ||
600 | |||
601 | # | ||
602 | # Input Device Drivers | ||
603 | # | ||
604 | # CONFIG_INPUT_KEYBOARD is not set | ||
605 | # CONFIG_INPUT_MOUSE is not set | ||
606 | # CONFIG_INPUT_JOYSTICK is not set | ||
607 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
608 | # CONFIG_INPUT_MISC is not set | ||
609 | |||
610 | # | ||
611 | # Hardware I/O ports | ||
612 | # | ||
613 | # CONFIG_SERIO is not set | ||
614 | # CONFIG_GAMEPORT is not set | ||
615 | |||
616 | # | ||
617 | # Character devices | ||
618 | # | ||
619 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
620 | |||
621 | # | ||
622 | # Serial drivers | ||
623 | # | ||
624 | # CONFIG_SERIAL_8250 is not set | ||
625 | |||
626 | # | ||
627 | # Non-8250 serial port support | ||
628 | # | ||
629 | CONFIG_SERIAL_CORE=m | ||
630 | CONFIG_SERIAL_ICOM=m | ||
631 | # CONFIG_SERIAL_JSM is not set | ||
632 | CONFIG_UNIX98_PTYS=y | ||
633 | CONFIG_LEGACY_PTYS=y | ||
634 | CONFIG_LEGACY_PTY_COUNT=256 | ||
635 | |||
636 | # | ||
637 | # IPMI | ||
638 | # | ||
639 | # CONFIG_IPMI_HANDLER is not set | ||
640 | |||
641 | # | ||
642 | # Watchdog Cards | ||
643 | # | ||
644 | # CONFIG_WATCHDOG is not set | ||
645 | # CONFIG_RTC is not set | ||
646 | # CONFIG_DTLK is not set | ||
647 | # CONFIG_R3964 is not set | ||
648 | # CONFIG_APPLICOM is not set | ||
649 | |||
650 | # | ||
651 | # Ftape, the floppy tape device driver | ||
652 | # | ||
653 | # CONFIG_AGP is not set | ||
654 | # CONFIG_DRM is not set | ||
655 | CONFIG_RAW_DRIVER=y | ||
656 | CONFIG_MAX_RAW_DEVS=256 | ||
657 | # CONFIG_HANGCHECK_TIMER is not set | ||
658 | |||
659 | # | ||
660 | # TPM devices | ||
661 | # | ||
662 | # CONFIG_TCG_TPM is not set | ||
663 | |||
664 | # | ||
665 | # I2C support | ||
666 | # | ||
667 | # CONFIG_I2C is not set | ||
668 | |||
669 | # | ||
670 | # Dallas's 1-wire bus | ||
671 | # | ||
672 | # CONFIG_W1 is not set | ||
673 | |||
674 | # | ||
675 | # Hardware Monitoring support | ||
676 | # | ||
677 | # CONFIG_HWMON is not set | ||
678 | # CONFIG_HWMON_VID is not set | ||
679 | |||
680 | # | ||
681 | # Misc devices | ||
682 | # | ||
683 | |||
684 | # | ||
685 | # Multimedia Capabilities Port drivers | ||
686 | # | ||
687 | |||
688 | # | ||
689 | # Multimedia devices | ||
690 | # | ||
691 | # CONFIG_VIDEO_DEV is not set | ||
692 | |||
693 | # | ||
694 | # Digital Video Broadcasting Devices | ||
695 | # | ||
696 | # CONFIG_DVB is not set | ||
697 | |||
698 | # | ||
699 | # Graphics support | ||
700 | # | ||
701 | # CONFIG_FB is not set | ||
702 | |||
703 | # | ||
704 | # Sound | ||
705 | # | ||
706 | # CONFIG_SOUND is not set | ||
707 | |||
708 | # | ||
709 | # USB support | ||
710 | # | ||
711 | CONFIG_USB_ARCH_HAS_HCD=y | ||
712 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
713 | # CONFIG_USB is not set | ||
714 | |||
715 | # | ||
716 | # USB Gadget Support | ||
717 | # | ||
718 | # CONFIG_USB_GADGET is not set | ||
719 | |||
720 | # | ||
721 | # MMC/SD Card support | ||
722 | # | ||
723 | # CONFIG_MMC is not set | ||
724 | |||
725 | # | ||
726 | # InfiniBand support | ||
727 | # | ||
728 | # CONFIG_INFINIBAND is not set | ||
729 | |||
730 | # | ||
731 | # SN Devices | ||
732 | # | ||
733 | |||
734 | # | ||
735 | # File systems | ||
736 | # | ||
737 | CONFIG_EXT2_FS=y | ||
738 | CONFIG_EXT2_FS_XATTR=y | ||
739 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
740 | CONFIG_EXT2_FS_SECURITY=y | ||
741 | CONFIG_EXT2_FS_XIP=y | ||
742 | CONFIG_FS_XIP=y | ||
743 | CONFIG_EXT3_FS=y | ||
744 | CONFIG_EXT3_FS_XATTR=y | ||
745 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
746 | CONFIG_EXT3_FS_SECURITY=y | ||
747 | CONFIG_JBD=y | ||
748 | # CONFIG_JBD_DEBUG is not set | ||
749 | CONFIG_FS_MBCACHE=y | ||
750 | CONFIG_REISERFS_FS=y | ||
751 | # CONFIG_REISERFS_CHECK is not set | ||
752 | # CONFIG_REISERFS_PROC_INFO is not set | ||
753 | CONFIG_REISERFS_FS_XATTR=y | ||
754 | CONFIG_REISERFS_FS_POSIX_ACL=y | ||
755 | CONFIG_REISERFS_FS_SECURITY=y | ||
756 | CONFIG_JFS_FS=m | ||
757 | CONFIG_JFS_POSIX_ACL=y | ||
758 | CONFIG_JFS_SECURITY=y | ||
759 | # CONFIG_JFS_DEBUG is not set | ||
760 | # CONFIG_JFS_STATISTICS is not set | ||
761 | CONFIG_FS_POSIX_ACL=y | ||
762 | CONFIG_XFS_FS=m | ||
763 | CONFIG_XFS_EXPORT=y | ||
764 | # CONFIG_XFS_QUOTA is not set | ||
765 | CONFIG_XFS_SECURITY=y | ||
766 | CONFIG_XFS_POSIX_ACL=y | ||
767 | # CONFIG_XFS_RT is not set | ||
768 | # CONFIG_MINIX_FS is not set | ||
769 | # CONFIG_ROMFS_FS is not set | ||
770 | CONFIG_INOTIFY=y | ||
771 | # CONFIG_QUOTA is not set | ||
772 | CONFIG_DNOTIFY=y | ||
773 | CONFIG_AUTOFS_FS=m | ||
774 | # CONFIG_AUTOFS4_FS is not set | ||
775 | # CONFIG_FUSE_FS is not set | ||
776 | |||
777 | # | ||
778 | # CD-ROM/DVD Filesystems | ||
779 | # | ||
780 | CONFIG_ISO9660_FS=y | ||
781 | CONFIG_JOLIET=y | ||
782 | CONFIG_ZISOFS=y | ||
783 | CONFIG_ZISOFS_FS=y | ||
784 | CONFIG_UDF_FS=m | ||
785 | CONFIG_UDF_NLS=y | ||
786 | |||
787 | # | ||
788 | # DOS/FAT/NT Filesystems | ||
789 | # | ||
790 | CONFIG_FAT_FS=y | ||
791 | CONFIG_MSDOS_FS=y | ||
792 | CONFIG_VFAT_FS=y | ||
793 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
794 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
795 | # CONFIG_NTFS_FS is not set | ||
796 | |||
797 | # | ||
798 | # Pseudo filesystems | ||
799 | # | ||
800 | CONFIG_PROC_FS=y | ||
801 | CONFIG_PROC_KCORE=y | ||
802 | CONFIG_SYSFS=y | ||
803 | CONFIG_TMPFS=y | ||
804 | # CONFIG_HUGETLBFS is not set | ||
805 | # CONFIG_HUGETLB_PAGE is not set | ||
806 | CONFIG_RAMFS=y | ||
807 | # CONFIG_RELAYFS_FS is not set | ||
808 | |||
809 | # | ||
810 | # Miscellaneous filesystems | ||
811 | # | ||
812 | # CONFIG_ADFS_FS is not set | ||
813 | # CONFIG_AFFS_FS is not set | ||
814 | # CONFIG_HFS_FS is not set | ||
815 | # CONFIG_HFSPLUS_FS is not set | ||
816 | # CONFIG_BEFS_FS is not set | ||
817 | # CONFIG_BFS_FS is not set | ||
818 | # CONFIG_EFS_FS is not set | ||
819 | CONFIG_CRAMFS=y | ||
820 | # CONFIG_VXFS_FS is not set | ||
821 | # CONFIG_HPFS_FS is not set | ||
822 | # CONFIG_QNX4FS_FS is not set | ||
823 | # CONFIG_SYSV_FS is not set | ||
824 | # CONFIG_UFS_FS is not set | ||
825 | |||
826 | # | ||
827 | # Network File Systems | ||
828 | # | ||
829 | CONFIG_NFS_FS=y | ||
830 | CONFIG_NFS_V3=y | ||
831 | CONFIG_NFS_V3_ACL=y | ||
832 | CONFIG_NFS_V4=y | ||
833 | # CONFIG_NFS_DIRECTIO is not set | ||
834 | CONFIG_NFSD=m | ||
835 | CONFIG_NFSD_V2_ACL=y | ||
836 | CONFIG_NFSD_V3=y | ||
837 | CONFIG_NFSD_V3_ACL=y | ||
838 | CONFIG_NFSD_V4=y | ||
839 | CONFIG_NFSD_TCP=y | ||
840 | CONFIG_LOCKD=y | ||
841 | CONFIG_LOCKD_V4=y | ||
842 | CONFIG_EXPORTFS=m | ||
843 | CONFIG_NFS_ACL_SUPPORT=y | ||
844 | CONFIG_NFS_COMMON=y | ||
845 | CONFIG_SUNRPC=y | ||
846 | CONFIG_SUNRPC_GSS=y | ||
847 | CONFIG_RPCSEC_GSS_KRB5=y | ||
848 | CONFIG_RPCSEC_GSS_SPKM3=m | ||
849 | # CONFIG_SMB_FS is not set | ||
850 | CONFIG_CIFS=m | ||
851 | # CONFIG_CIFS_STATS is not set | ||
852 | CONFIG_CIFS_XATTR=y | ||
853 | CONFIG_CIFS_POSIX=y | ||
854 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
855 | # CONFIG_NCP_FS is not set | ||
856 | # CONFIG_CODA_FS is not set | ||
857 | # CONFIG_AFS_FS is not set | ||
858 | # CONFIG_9P_FS is not set | ||
859 | |||
860 | # | ||
861 | # Partition Types | ||
862 | # | ||
863 | # CONFIG_PARTITION_ADVANCED is not set | ||
864 | CONFIG_MSDOS_PARTITION=y | ||
865 | |||
866 | # | ||
867 | # Native Language Support | ||
868 | # | ||
869 | CONFIG_NLS=y | ||
870 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
871 | CONFIG_NLS_CODEPAGE_437=y | ||
872 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
873 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
874 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
875 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
876 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
877 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
878 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
879 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
880 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
881 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
882 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
883 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
884 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
885 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
886 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
887 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
888 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
889 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
890 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
891 | # CONFIG_NLS_ISO8859_8 is not set | ||
892 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
893 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
894 | CONFIG_NLS_ASCII=y | ||
895 | CONFIG_NLS_ISO8859_1=y | ||
896 | # CONFIG_NLS_ISO8859_2 is not set | ||
897 | # CONFIG_NLS_ISO8859_3 is not set | ||
898 | # CONFIG_NLS_ISO8859_4 is not set | ||
899 | # CONFIG_NLS_ISO8859_5 is not set | ||
900 | # CONFIG_NLS_ISO8859_6 is not set | ||
901 | # CONFIG_NLS_ISO8859_7 is not set | ||
902 | # CONFIG_NLS_ISO8859_9 is not set | ||
903 | # CONFIG_NLS_ISO8859_13 is not set | ||
904 | # CONFIG_NLS_ISO8859_14 is not set | ||
905 | # CONFIG_NLS_ISO8859_15 is not set | ||
906 | # CONFIG_NLS_KOI8_R is not set | ||
907 | # CONFIG_NLS_KOI8_U is not set | ||
908 | # CONFIG_NLS_UTF8 is not set | ||
909 | |||
910 | # | ||
911 | # iSeries device drivers | ||
912 | # | ||
913 | CONFIG_VIOCONS=y | ||
914 | CONFIG_VIODASD=y | ||
915 | CONFIG_VIOCD=m | ||
916 | CONFIG_VIOTAPE=m | ||
917 | CONFIG_VIOPATH=y | ||
918 | |||
919 | # | ||
920 | # Profiling support | ||
921 | # | ||
922 | CONFIG_PROFILING=y | ||
923 | CONFIG_OPROFILE=y | ||
924 | |||
925 | # | ||
926 | # Kernel hacking | ||
927 | # | ||
928 | # CONFIG_PRINTK_TIME is not set | ||
929 | CONFIG_DEBUG_KERNEL=y | ||
930 | CONFIG_MAGIC_SYSRQ=y | ||
931 | CONFIG_LOG_BUF_SHIFT=17 | ||
932 | CONFIG_DETECT_SOFTLOCKUP=y | ||
933 | # CONFIG_SCHEDSTATS is not set | ||
934 | # CONFIG_DEBUG_SLAB is not set | ||
935 | # CONFIG_DEBUG_SPINLOCK is not set | ||
936 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
937 | # CONFIG_DEBUG_KOBJECT is not set | ||
938 | # CONFIG_DEBUG_INFO is not set | ||
939 | CONFIG_DEBUG_FS=y | ||
940 | CONFIG_DEBUG_STACKOVERFLOW=y | ||
941 | # CONFIG_KPROBES is not set | ||
942 | CONFIG_DEBUG_STACK_USAGE=y | ||
943 | # CONFIG_DEBUGGER is not set | ||
944 | # CONFIG_PPCDBG is not set | ||
945 | CONFIG_IRQSTACKS=y | ||
946 | |||
947 | # | ||
948 | # Security options | ||
949 | # | ||
950 | # CONFIG_KEYS is not set | ||
951 | # CONFIG_SECURITY is not set | ||
952 | |||
953 | # | ||
954 | # Cryptographic options | ||
955 | # | ||
956 | CONFIG_CRYPTO=y | ||
957 | CONFIG_CRYPTO_HMAC=y | ||
958 | CONFIG_CRYPTO_NULL=m | ||
959 | CONFIG_CRYPTO_MD4=m | ||
960 | CONFIG_CRYPTO_MD5=y | ||
961 | CONFIG_CRYPTO_SHA1=m | ||
962 | CONFIG_CRYPTO_SHA256=m | ||
963 | CONFIG_CRYPTO_SHA512=m | ||
964 | CONFIG_CRYPTO_WP512=m | ||
965 | CONFIG_CRYPTO_TGR192=m | ||
966 | CONFIG_CRYPTO_DES=y | ||
967 | CONFIG_CRYPTO_BLOWFISH=m | ||
968 | CONFIG_CRYPTO_TWOFISH=m | ||
969 | CONFIG_CRYPTO_SERPENT=m | ||
970 | CONFIG_CRYPTO_AES=m | ||
971 | CONFIG_CRYPTO_CAST5=m | ||
972 | CONFIG_CRYPTO_CAST6=m | ||
973 | CONFIG_CRYPTO_TEA=m | ||
974 | CONFIG_CRYPTO_ARC4=m | ||
975 | CONFIG_CRYPTO_KHAZAD=m | ||
976 | CONFIG_CRYPTO_ANUBIS=m | ||
977 | CONFIG_CRYPTO_DEFLATE=m | ||
978 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
979 | CONFIG_CRYPTO_CRC32C=m | ||
980 | CONFIG_CRYPTO_TEST=m | ||
981 | |||
982 | # | ||
983 | # Hardware crypto devices | ||
984 | # | ||
985 | |||
986 | # | ||
987 | # Library routines | ||
988 | # | ||
989 | CONFIG_CRC_CCITT=m | ||
990 | # CONFIG_CRC16 is not set | ||
991 | CONFIG_CRC32=y | ||
992 | CONFIG_LIBCRC32C=m | ||
993 | CONFIG_ZLIB_INFLATE=y | ||
994 | CONFIG_ZLIB_DEFLATE=m | ||
995 | CONFIG_TEXTSEARCH=y | ||
996 | CONFIG_TEXTSEARCH_KMP=m | ||
997 | CONFIG_TEXTSEARCH_BM=m | ||
998 | CONFIG_TEXTSEARCH_FSM=m | ||
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig new file mode 100644 index 000000000000..7b480f3d1406 --- /dev/null +++ b/arch/powerpc/configs/maple_defconfig | |||
@@ -0,0 +1,1062 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.14-rc4 | ||
4 | # Thu Oct 20 08:31:24 2005 | ||
5 | # | ||
6 | CONFIG_64BIT=y | ||
7 | CONFIG_MMU=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_GENERIC_ISA_DMA=y | ||
11 | CONFIG_EARLY_PRINTK=y | ||
12 | CONFIG_COMPAT=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
16 | |||
17 | # | ||
18 | # Code maturity level options | ||
19 | # | ||
20 | CONFIG_EXPERIMENTAL=y | ||
21 | CONFIG_CLEAN_COMPILE=y | ||
22 | CONFIG_LOCK_KERNEL=y | ||
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
24 | |||
25 | # | ||
26 | # General setup | ||
27 | # | ||
28 | CONFIG_LOCALVERSION="" | ||
29 | CONFIG_LOCALVERSION_AUTO=y | ||
30 | CONFIG_SWAP=y | ||
31 | CONFIG_SYSVIPC=y | ||
32 | CONFIG_POSIX_MQUEUE=y | ||
33 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
34 | CONFIG_SYSCTL=y | ||
35 | # CONFIG_AUDIT is not set | ||
36 | # CONFIG_HOTPLUG is not set | ||
37 | CONFIG_KOBJECT_UEVENT=y | ||
38 | CONFIG_IKCONFIG=y | ||
39 | CONFIG_IKCONFIG_PROC=y | ||
40 | # CONFIG_CPUSETS is not set | ||
41 | CONFIG_INITRAMFS_SOURCE="" | ||
42 | # CONFIG_EMBEDDED is not set | ||
43 | CONFIG_KALLSYMS=y | ||
44 | CONFIG_KALLSYMS_ALL=y | ||
45 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
46 | CONFIG_PRINTK=y | ||
47 | CONFIG_BUG=y | ||
48 | CONFIG_BASE_FULL=y | ||
49 | CONFIG_FUTEX=y | ||
50 | CONFIG_EPOLL=y | ||
51 | CONFIG_SHMEM=y | ||
52 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
53 | CONFIG_CC_ALIGN_LABELS=0 | ||
54 | CONFIG_CC_ALIGN_LOOPS=0 | ||
55 | CONFIG_CC_ALIGN_JUMPS=0 | ||
56 | # CONFIG_TINY_SHMEM is not set | ||
57 | CONFIG_BASE_SMALL=0 | ||
58 | |||
59 | # | ||
60 | # Loadable module support | ||
61 | # | ||
62 | CONFIG_MODULES=y | ||
63 | CONFIG_MODULE_UNLOAD=y | ||
64 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
65 | CONFIG_OBSOLETE_MODPARM=y | ||
66 | CONFIG_MODVERSIONS=y | ||
67 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
68 | CONFIG_KMOD=y | ||
69 | CONFIG_STOP_MACHINE=y | ||
70 | CONFIG_SYSVIPC_COMPAT=y | ||
71 | |||
72 | # | ||
73 | # Platform support | ||
74 | # | ||
75 | # CONFIG_PPC_ISERIES is not set | ||
76 | CONFIG_PPC_MULTIPLATFORM=y | ||
77 | # CONFIG_PPC_PSERIES is not set | ||
78 | # CONFIG_PPC_BPA is not set | ||
79 | # CONFIG_PPC_PMAC is not set | ||
80 | CONFIG_PPC_MAPLE=y | ||
81 | CONFIG_PPC=y | ||
82 | CONFIG_PPC64=y | ||
83 | CONFIG_PPC_OF=y | ||
84 | CONFIG_MPIC=y | ||
85 | # CONFIG_ALTIVEC is not set | ||
86 | CONFIG_KEXEC=y | ||
87 | CONFIG_U3_DART=y | ||
88 | CONFIG_MPIC_BROKEN_U3=y | ||
89 | CONFIG_BOOTX_TEXT=y | ||
90 | CONFIG_POWER4_ONLY=y | ||
91 | CONFIG_IOMMU_VMERGE=y | ||
92 | CONFIG_SMP=y | ||
93 | CONFIG_NR_CPUS=2 | ||
94 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | ||
95 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
96 | CONFIG_SELECT_MEMORY_MODEL=y | ||
97 | CONFIG_FLATMEM_MANUAL=y | ||
98 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
99 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
100 | CONFIG_FLATMEM=y | ||
101 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
102 | # CONFIG_SPARSEMEM_STATIC is not set | ||
103 | # CONFIG_NUMA is not set | ||
104 | # CONFIG_SCHED_SMT is not set | ||
105 | CONFIG_PREEMPT_NONE=y | ||
106 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
107 | # CONFIG_PREEMPT is not set | ||
108 | # CONFIG_PREEMPT_BKL is not set | ||
109 | # CONFIG_HZ_100 is not set | ||
110 | CONFIG_HZ_250=y | ||
111 | # CONFIG_HZ_1000 is not set | ||
112 | CONFIG_HZ=250 | ||
113 | CONFIG_GENERIC_HARDIRQS=y | ||
114 | CONFIG_SECCOMP=y | ||
115 | CONFIG_BINFMT_ELF=y | ||
116 | # CONFIG_BINFMT_MISC is not set | ||
117 | CONFIG_PROC_DEVICETREE=y | ||
118 | # CONFIG_CMDLINE_BOOL is not set | ||
119 | CONFIG_ISA_DMA_API=y | ||
120 | |||
121 | # | ||
122 | # Bus Options | ||
123 | # | ||
124 | CONFIG_PCI=y | ||
125 | CONFIG_PCI_DOMAINS=y | ||
126 | CONFIG_PCI_LEGACY_PROC=y | ||
127 | # CONFIG_PCI_DEBUG is not set | ||
128 | |||
129 | # | ||
130 | # PCCARD (PCMCIA/CardBus) support | ||
131 | # | ||
132 | # CONFIG_PCCARD is not set | ||
133 | |||
134 | # | ||
135 | # PCI Hotplug Support | ||
136 | # | ||
137 | # CONFIG_HOTPLUG_PCI is not set | ||
138 | |||
139 | # | ||
140 | # Networking | ||
141 | # | ||
142 | CONFIG_NET=y | ||
143 | |||
144 | # | ||
145 | # Networking options | ||
146 | # | ||
147 | CONFIG_PACKET=y | ||
148 | CONFIG_PACKET_MMAP=y | ||
149 | CONFIG_UNIX=y | ||
150 | # CONFIG_NET_KEY is not set | ||
151 | CONFIG_INET=y | ||
152 | CONFIG_IP_MULTICAST=y | ||
153 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
154 | CONFIG_IP_FIB_HASH=y | ||
155 | CONFIG_IP_PNP=y | ||
156 | CONFIG_IP_PNP_DHCP=y | ||
157 | # CONFIG_IP_PNP_BOOTP is not set | ||
158 | # CONFIG_IP_PNP_RARP is not set | ||
159 | # CONFIG_NET_IPIP is not set | ||
160 | # CONFIG_NET_IPGRE is not set | ||
161 | # CONFIG_IP_MROUTE is not set | ||
162 | # CONFIG_ARPD is not set | ||
163 | # CONFIG_SYN_COOKIES is not set | ||
164 | # CONFIG_INET_AH is not set | ||
165 | # CONFIG_INET_ESP is not set | ||
166 | # CONFIG_INET_IPCOMP is not set | ||
167 | # CONFIG_INET_TUNNEL is not set | ||
168 | CONFIG_INET_DIAG=y | ||
169 | CONFIG_INET_TCP_DIAG=y | ||
170 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
171 | CONFIG_TCP_CONG_BIC=y | ||
172 | # CONFIG_IPV6 is not set | ||
173 | # CONFIG_NETFILTER is not set | ||
174 | |||
175 | # | ||
176 | # DCCP Configuration (EXPERIMENTAL) | ||
177 | # | ||
178 | # CONFIG_IP_DCCP is not set | ||
179 | |||
180 | # | ||
181 | # SCTP Configuration (EXPERIMENTAL) | ||
182 | # | ||
183 | # CONFIG_IP_SCTP is not set | ||
184 | # CONFIG_ATM is not set | ||
185 | # CONFIG_BRIDGE is not set | ||
186 | # CONFIG_VLAN_8021Q is not set | ||
187 | # CONFIG_DECNET is not set | ||
188 | # CONFIG_LLC2 is not set | ||
189 | # CONFIG_IPX is not set | ||
190 | # CONFIG_ATALK is not set | ||
191 | # CONFIG_X25 is not set | ||
192 | # CONFIG_LAPB is not set | ||
193 | # CONFIG_NET_DIVERT is not set | ||
194 | # CONFIG_ECONET is not set | ||
195 | # CONFIG_WAN_ROUTER is not set | ||
196 | # CONFIG_NET_SCHED is not set | ||
197 | # CONFIG_NET_CLS_ROUTE is not set | ||
198 | |||
199 | # | ||
200 | # Network testing | ||
201 | # | ||
202 | # CONFIG_NET_PKTGEN is not set | ||
203 | # CONFIG_HAMRADIO is not set | ||
204 | # CONFIG_IRDA is not set | ||
205 | # CONFIG_BT is not set | ||
206 | # CONFIG_IEEE80211 is not set | ||
207 | |||
208 | # | ||
209 | # Device Drivers | ||
210 | # | ||
211 | |||
212 | # | ||
213 | # Generic Driver Options | ||
214 | # | ||
215 | CONFIG_STANDALONE=y | ||
216 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
217 | # CONFIG_FW_LOADER is not set | ||
218 | # CONFIG_DEBUG_DRIVER is not set | ||
219 | |||
220 | # | ||
221 | # Connector - unified userspace <-> kernelspace linker | ||
222 | # | ||
223 | # CONFIG_CONNECTOR is not set | ||
224 | |||
225 | # | ||
226 | # Memory Technology Devices (MTD) | ||
227 | # | ||
228 | # CONFIG_MTD is not set | ||
229 | |||
230 | # | ||
231 | # Parallel port support | ||
232 | # | ||
233 | # CONFIG_PARPORT is not set | ||
234 | |||
235 | # | ||
236 | # Plug and Play support | ||
237 | # | ||
238 | |||
239 | # | ||
240 | # Block devices | ||
241 | # | ||
242 | # CONFIG_BLK_DEV_FD is not set | ||
243 | # CONFIG_BLK_CPQ_DA is not set | ||
244 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
245 | # CONFIG_BLK_DEV_DAC960 is not set | ||
246 | # CONFIG_BLK_DEV_UMEM is not set | ||
247 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
248 | # CONFIG_BLK_DEV_LOOP is not set | ||
249 | # CONFIG_BLK_DEV_NBD is not set | ||
250 | # CONFIG_BLK_DEV_SX8 is not set | ||
251 | # CONFIG_BLK_DEV_UB is not set | ||
252 | CONFIG_BLK_DEV_RAM=y | ||
253 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
254 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
255 | # CONFIG_BLK_DEV_INITRD is not set | ||
256 | # CONFIG_CDROM_PKTCDVD is not set | ||
257 | |||
258 | # | ||
259 | # IO Schedulers | ||
260 | # | ||
261 | CONFIG_IOSCHED_NOOP=y | ||
262 | CONFIG_IOSCHED_AS=y | ||
263 | CONFIG_IOSCHED_DEADLINE=y | ||
264 | CONFIG_IOSCHED_CFQ=y | ||
265 | # CONFIG_ATA_OVER_ETH is not set | ||
266 | |||
267 | # | ||
268 | # ATA/ATAPI/MFM/RLL support | ||
269 | # | ||
270 | CONFIG_IDE=y | ||
271 | CONFIG_BLK_DEV_IDE=y | ||
272 | |||
273 | # | ||
274 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
275 | # | ||
276 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
277 | CONFIG_BLK_DEV_IDEDISK=y | ||
278 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
279 | CONFIG_BLK_DEV_IDECD=y | ||
280 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
281 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
282 | CONFIG_IDE_TASK_IOCTL=y | ||
283 | |||
284 | # | ||
285 | # IDE chipset support/bugfixes | ||
286 | # | ||
287 | CONFIG_IDE_GENERIC=y | ||
288 | CONFIG_BLK_DEV_IDEPCI=y | ||
289 | CONFIG_IDEPCI_SHARE_IRQ=y | ||
290 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
291 | CONFIG_BLK_DEV_GENERIC=y | ||
292 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
293 | # CONFIG_BLK_DEV_SL82C105 is not set | ||
294 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
295 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
296 | CONFIG_IDEDMA_PCI_AUTO=y | ||
297 | # CONFIG_IDEDMA_ONLYDISK is not set | ||
298 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
299 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
300 | CONFIG_BLK_DEV_AMD74XX=y | ||
301 | # CONFIG_BLK_DEV_CMD64X is not set | ||
302 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
303 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
304 | # CONFIG_BLK_DEV_CS5520 is not set | ||
305 | # CONFIG_BLK_DEV_CS5530 is not set | ||
306 | # CONFIG_BLK_DEV_HPT34X is not set | ||
307 | # CONFIG_BLK_DEV_HPT366 is not set | ||
308 | # CONFIG_BLK_DEV_SC1200 is not set | ||
309 | # CONFIG_BLK_DEV_PIIX is not set | ||
310 | # CONFIG_BLK_DEV_IT821X is not set | ||
311 | # CONFIG_BLK_DEV_NS87415 is not set | ||
312 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
313 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
314 | # CONFIG_BLK_DEV_SVWKS is not set | ||
315 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
316 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
317 | # CONFIG_BLK_DEV_TRM290 is not set | ||
318 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
319 | # CONFIG_IDE_ARM is not set | ||
320 | CONFIG_BLK_DEV_IDEDMA=y | ||
321 | # CONFIG_IDEDMA_IVB is not set | ||
322 | CONFIG_IDEDMA_AUTO=y | ||
323 | # CONFIG_BLK_DEV_HD is not set | ||
324 | |||
325 | # | ||
326 | # SCSI device support | ||
327 | # | ||
328 | # CONFIG_RAID_ATTRS is not set | ||
329 | # CONFIG_SCSI is not set | ||
330 | |||
331 | # | ||
332 | # Multi-device support (RAID and LVM) | ||
333 | # | ||
334 | # CONFIG_MD is not set | ||
335 | |||
336 | # | ||
337 | # Fusion MPT device support | ||
338 | # | ||
339 | # CONFIG_FUSION is not set | ||
340 | |||
341 | # | ||
342 | # IEEE 1394 (FireWire) support | ||
343 | # | ||
344 | # CONFIG_IEEE1394 is not set | ||
345 | |||
346 | # | ||
347 | # I2O device support | ||
348 | # | ||
349 | # CONFIG_I2O is not set | ||
350 | |||
351 | # | ||
352 | # Macintosh device drivers | ||
353 | # | ||
354 | |||
355 | # | ||
356 | # Network device support | ||
357 | # | ||
358 | CONFIG_NETDEVICES=y | ||
359 | # CONFIG_DUMMY is not set | ||
360 | # CONFIG_BONDING is not set | ||
361 | # CONFIG_EQUALIZER is not set | ||
362 | # CONFIG_TUN is not set | ||
363 | |||
364 | # | ||
365 | # ARCnet devices | ||
366 | # | ||
367 | # CONFIG_ARCNET is not set | ||
368 | |||
369 | # | ||
370 | # PHY device support | ||
371 | # | ||
372 | # CONFIG_PHYLIB is not set | ||
373 | |||
374 | # | ||
375 | # Ethernet (10 or 100Mbit) | ||
376 | # | ||
377 | CONFIG_NET_ETHERNET=y | ||
378 | CONFIG_MII=y | ||
379 | # CONFIG_HAPPYMEAL is not set | ||
380 | # CONFIG_SUNGEM is not set | ||
381 | # CONFIG_CASSINI is not set | ||
382 | # CONFIG_NET_VENDOR_3COM is not set | ||
383 | |||
384 | # | ||
385 | # Tulip family network device support | ||
386 | # | ||
387 | # CONFIG_NET_TULIP is not set | ||
388 | # CONFIG_HP100 is not set | ||
389 | CONFIG_NET_PCI=y | ||
390 | # CONFIG_PCNET32 is not set | ||
391 | CONFIG_AMD8111_ETH=y | ||
392 | # CONFIG_AMD8111E_NAPI is not set | ||
393 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
394 | # CONFIG_B44 is not set | ||
395 | # CONFIG_FORCEDETH is not set | ||
396 | # CONFIG_DGRS is not set | ||
397 | # CONFIG_EEPRO100 is not set | ||
398 | # CONFIG_E100 is not set | ||
399 | # CONFIG_FEALNX is not set | ||
400 | # CONFIG_NATSEMI is not set | ||
401 | # CONFIG_NE2K_PCI is not set | ||
402 | # CONFIG_8139CP is not set | ||
403 | # CONFIG_8139TOO is not set | ||
404 | # CONFIG_SIS900 is not set | ||
405 | # CONFIG_EPIC100 is not set | ||
406 | # CONFIG_SUNDANCE is not set | ||
407 | # CONFIG_VIA_RHINE is not set | ||
408 | |||
409 | # | ||
410 | # Ethernet (1000 Mbit) | ||
411 | # | ||
412 | # CONFIG_ACENIC is not set | ||
413 | # CONFIG_DL2K is not set | ||
414 | CONFIG_E1000=y | ||
415 | # CONFIG_E1000_NAPI is not set | ||
416 | # CONFIG_NS83820 is not set | ||
417 | # CONFIG_HAMACHI is not set | ||
418 | # CONFIG_YELLOWFIN is not set | ||
419 | # CONFIG_R8169 is not set | ||
420 | # CONFIG_SIS190 is not set | ||
421 | # CONFIG_SKGE is not set | ||
422 | # CONFIG_SK98LIN is not set | ||
423 | # CONFIG_VIA_VELOCITY is not set | ||
424 | # CONFIG_TIGON3 is not set | ||
425 | # CONFIG_BNX2 is not set | ||
426 | # CONFIG_MV643XX_ETH is not set | ||
427 | |||
428 | # | ||
429 | # Ethernet (10000 Mbit) | ||
430 | # | ||
431 | # CONFIG_CHELSIO_T1 is not set | ||
432 | # CONFIG_IXGB is not set | ||
433 | # CONFIG_S2IO is not set | ||
434 | |||
435 | # | ||
436 | # Token Ring devices | ||
437 | # | ||
438 | # CONFIG_TR is not set | ||
439 | |||
440 | # | ||
441 | # Wireless LAN (non-hamradio) | ||
442 | # | ||
443 | # CONFIG_NET_RADIO is not set | ||
444 | |||
445 | # | ||
446 | # Wan interfaces | ||
447 | # | ||
448 | # CONFIG_WAN is not set | ||
449 | # CONFIG_FDDI is not set | ||
450 | # CONFIG_HIPPI is not set | ||
451 | # CONFIG_PPP is not set | ||
452 | # CONFIG_SLIP is not set | ||
453 | # CONFIG_SHAPER is not set | ||
454 | # CONFIG_NETCONSOLE is not set | ||
455 | # CONFIG_NETPOLL is not set | ||
456 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
457 | |||
458 | # | ||
459 | # ISDN subsystem | ||
460 | # | ||
461 | # CONFIG_ISDN is not set | ||
462 | |||
463 | # | ||
464 | # Telephony Support | ||
465 | # | ||
466 | # CONFIG_PHONE is not set | ||
467 | |||
468 | # | ||
469 | # Input device support | ||
470 | # | ||
471 | CONFIG_INPUT=y | ||
472 | |||
473 | # | ||
474 | # Userland interfaces | ||
475 | # | ||
476 | CONFIG_INPUT_MOUSEDEV=y | ||
477 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
478 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1600 | ||
479 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1200 | ||
480 | # CONFIG_INPUT_JOYDEV is not set | ||
481 | # CONFIG_INPUT_TSDEV is not set | ||
482 | # CONFIG_INPUT_EVDEV is not set | ||
483 | # CONFIG_INPUT_EVBUG is not set | ||
484 | |||
485 | # | ||
486 | # Input Device Drivers | ||
487 | # | ||
488 | # CONFIG_INPUT_KEYBOARD is not set | ||
489 | # CONFIG_INPUT_MOUSE is not set | ||
490 | # CONFIG_INPUT_JOYSTICK is not set | ||
491 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
492 | # CONFIG_INPUT_MISC is not set | ||
493 | |||
494 | # | ||
495 | # Hardware I/O ports | ||
496 | # | ||
497 | # CONFIG_SERIO is not set | ||
498 | # CONFIG_GAMEPORT is not set | ||
499 | |||
500 | # | ||
501 | # Character devices | ||
502 | # | ||
503 | CONFIG_VT=y | ||
504 | CONFIG_VT_CONSOLE=y | ||
505 | CONFIG_HW_CONSOLE=y | ||
506 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
507 | |||
508 | # | ||
509 | # Serial drivers | ||
510 | # | ||
511 | CONFIG_SERIAL_8250=y | ||
512 | CONFIG_SERIAL_8250_CONSOLE=y | ||
513 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
514 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
515 | |||
516 | # | ||
517 | # Non-8250 serial port support | ||
518 | # | ||
519 | CONFIG_SERIAL_CORE=y | ||
520 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
521 | # CONFIG_SERIAL_JSM is not set | ||
522 | CONFIG_UNIX98_PTYS=y | ||
523 | CONFIG_LEGACY_PTYS=y | ||
524 | CONFIG_LEGACY_PTY_COUNT=256 | ||
525 | |||
526 | # | ||
527 | # IPMI | ||
528 | # | ||
529 | # CONFIG_IPMI_HANDLER is not set | ||
530 | |||
531 | # | ||
532 | # Watchdog Cards | ||
533 | # | ||
534 | # CONFIG_WATCHDOG is not set | ||
535 | # CONFIG_RTC is not set | ||
536 | # CONFIG_DTLK is not set | ||
537 | # CONFIG_R3964 is not set | ||
538 | # CONFIG_APPLICOM is not set | ||
539 | |||
540 | # | ||
541 | # Ftape, the floppy tape device driver | ||
542 | # | ||
543 | # CONFIG_AGP is not set | ||
544 | # CONFIG_DRM is not set | ||
545 | # CONFIG_RAW_DRIVER is not set | ||
546 | # CONFIG_HANGCHECK_TIMER is not set | ||
547 | |||
548 | # | ||
549 | # TPM devices | ||
550 | # | ||
551 | # CONFIG_TCG_TPM is not set | ||
552 | |||
553 | # | ||
554 | # I2C support | ||
555 | # | ||
556 | CONFIG_I2C=y | ||
557 | CONFIG_I2C_CHARDEV=y | ||
558 | |||
559 | # | ||
560 | # I2C Algorithms | ||
561 | # | ||
562 | CONFIG_I2C_ALGOBIT=y | ||
563 | # CONFIG_I2C_ALGOPCF is not set | ||
564 | # CONFIG_I2C_ALGOPCA is not set | ||
565 | |||
566 | # | ||
567 | # I2C Hardware Bus support | ||
568 | # | ||
569 | # CONFIG_I2C_ALI1535 is not set | ||
570 | # CONFIG_I2C_ALI1563 is not set | ||
571 | # CONFIG_I2C_ALI15X3 is not set | ||
572 | # CONFIG_I2C_AMD756 is not set | ||
573 | CONFIG_I2C_AMD8111=y | ||
574 | # CONFIG_I2C_I801 is not set | ||
575 | # CONFIG_I2C_I810 is not set | ||
576 | # CONFIG_I2C_PIIX4 is not set | ||
577 | # CONFIG_I2C_NFORCE2 is not set | ||
578 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
579 | # CONFIG_I2C_PROSAVAGE is not set | ||
580 | # CONFIG_I2C_SAVAGE4 is not set | ||
581 | # CONFIG_SCx200_ACB is not set | ||
582 | # CONFIG_I2C_SIS5595 is not set | ||
583 | # CONFIG_I2C_SIS630 is not set | ||
584 | # CONFIG_I2C_SIS96X is not set | ||
585 | # CONFIG_I2C_STUB is not set | ||
586 | # CONFIG_I2C_VIA is not set | ||
587 | # CONFIG_I2C_VIAPRO is not set | ||
588 | # CONFIG_I2C_VOODOO3 is not set | ||
589 | # CONFIG_I2C_PCA_ISA is not set | ||
590 | |||
591 | # | ||
592 | # Miscellaneous I2C Chip support | ||
593 | # | ||
594 | # CONFIG_SENSORS_DS1337 is not set | ||
595 | # CONFIG_SENSORS_DS1374 is not set | ||
596 | # CONFIG_SENSORS_EEPROM is not set | ||
597 | # CONFIG_SENSORS_PCF8574 is not set | ||
598 | # CONFIG_SENSORS_PCA9539 is not set | ||
599 | # CONFIG_SENSORS_PCF8591 is not set | ||
600 | # CONFIG_SENSORS_RTC8564 is not set | ||
601 | # CONFIG_SENSORS_MAX6875 is not set | ||
602 | # CONFIG_I2C_DEBUG_CORE is not set | ||
603 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
604 | # CONFIG_I2C_DEBUG_BUS is not set | ||
605 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
606 | |||
607 | # | ||
608 | # Dallas's 1-wire bus | ||
609 | # | ||
610 | # CONFIG_W1 is not set | ||
611 | |||
612 | # | ||
613 | # Hardware Monitoring support | ||
614 | # | ||
615 | # CONFIG_HWMON is not set | ||
616 | # CONFIG_HWMON_VID is not set | ||
617 | |||
618 | # | ||
619 | # Misc devices | ||
620 | # | ||
621 | |||
622 | # | ||
623 | # Multimedia Capabilities Port drivers | ||
624 | # | ||
625 | |||
626 | # | ||
627 | # Multimedia devices | ||
628 | # | ||
629 | # CONFIG_VIDEO_DEV is not set | ||
630 | |||
631 | # | ||
632 | # Digital Video Broadcasting Devices | ||
633 | # | ||
634 | # CONFIG_DVB is not set | ||
635 | |||
636 | # | ||
637 | # Graphics support | ||
638 | # | ||
639 | # CONFIG_FB is not set | ||
640 | |||
641 | # | ||
642 | # Console display driver support | ||
643 | # | ||
644 | # CONFIG_VGA_CONSOLE is not set | ||
645 | CONFIG_DUMMY_CONSOLE=y | ||
646 | |||
647 | # | ||
648 | # Sound | ||
649 | # | ||
650 | # CONFIG_SOUND is not set | ||
651 | |||
652 | # | ||
653 | # USB support | ||
654 | # | ||
655 | CONFIG_USB_ARCH_HAS_HCD=y | ||
656 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
657 | CONFIG_USB=y | ||
658 | # CONFIG_USB_DEBUG is not set | ||
659 | |||
660 | # | ||
661 | # Miscellaneous USB options | ||
662 | # | ||
663 | CONFIG_USB_DEVICEFS=y | ||
664 | # CONFIG_USB_BANDWIDTH is not set | ||
665 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
666 | # CONFIG_USB_OTG is not set | ||
667 | |||
668 | # | ||
669 | # USB Host Controller Drivers | ||
670 | # | ||
671 | CONFIG_USB_EHCI_HCD=y | ||
672 | CONFIG_USB_EHCI_SPLIT_ISO=y | ||
673 | CONFIG_USB_EHCI_ROOT_HUB_TT=y | ||
674 | # CONFIG_USB_ISP116X_HCD is not set | ||
675 | CONFIG_USB_OHCI_HCD=y | ||
676 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
677 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
678 | CONFIG_USB_UHCI_HCD=y | ||
679 | # CONFIG_USB_SL811_HCD is not set | ||
680 | |||
681 | # | ||
682 | # USB Device Class drivers | ||
683 | # | ||
684 | # CONFIG_USB_BLUETOOTH_TTY is not set | ||
685 | # CONFIG_USB_ACM is not set | ||
686 | # CONFIG_USB_PRINTER is not set | ||
687 | |||
688 | # | ||
689 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
690 | # | ||
691 | # CONFIG_USB_STORAGE is not set | ||
692 | |||
693 | # | ||
694 | # USB Input Devices | ||
695 | # | ||
696 | CONFIG_USB_HID=y | ||
697 | CONFIG_USB_HIDINPUT=y | ||
698 | # CONFIG_HID_FF is not set | ||
699 | # CONFIG_USB_HIDDEV is not set | ||
700 | # CONFIG_USB_AIPTEK is not set | ||
701 | # CONFIG_USB_WACOM is not set | ||
702 | # CONFIG_USB_ACECAD is not set | ||
703 | # CONFIG_USB_KBTAB is not set | ||
704 | # CONFIG_USB_POWERMATE is not set | ||
705 | # CONFIG_USB_MTOUCH is not set | ||
706 | # CONFIG_USB_ITMTOUCH is not set | ||
707 | # CONFIG_USB_EGALAX is not set | ||
708 | # CONFIG_USB_YEALINK is not set | ||
709 | # CONFIG_USB_XPAD is not set | ||
710 | # CONFIG_USB_ATI_REMOTE is not set | ||
711 | # CONFIG_USB_KEYSPAN_REMOTE is not set | ||
712 | # CONFIG_USB_APPLETOUCH is not set | ||
713 | |||
714 | # | ||
715 | # USB Imaging devices | ||
716 | # | ||
717 | # CONFIG_USB_MDC800 is not set | ||
718 | |||
719 | # | ||
720 | # USB Multimedia devices | ||
721 | # | ||
722 | # CONFIG_USB_DABUSB is not set | ||
723 | |||
724 | # | ||
725 | # Video4Linux support is needed for USB Multimedia device support | ||
726 | # | ||
727 | |||
728 | # | ||
729 | # USB Network Adapters | ||
730 | # | ||
731 | # CONFIG_USB_CATC is not set | ||
732 | # CONFIG_USB_KAWETH is not set | ||
733 | CONFIG_USB_PEGASUS=y | ||
734 | # CONFIG_USB_RTL8150 is not set | ||
735 | # CONFIG_USB_USBNET is not set | ||
736 | CONFIG_USB_MON=y | ||
737 | |||
738 | # | ||
739 | # USB port drivers | ||
740 | # | ||
741 | |||
742 | # | ||
743 | # USB Serial Converter support | ||
744 | # | ||
745 | CONFIG_USB_SERIAL=y | ||
746 | # CONFIG_USB_SERIAL_CONSOLE is not set | ||
747 | CONFIG_USB_SERIAL_GENERIC=y | ||
748 | # CONFIG_USB_SERIAL_AIRPRIME is not set | ||
749 | # CONFIG_USB_SERIAL_BELKIN is not set | ||
750 | # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set | ||
751 | # CONFIG_USB_SERIAL_CP2101 is not set | ||
752 | CONFIG_USB_SERIAL_CYPRESS_M8=m | ||
753 | # CONFIG_USB_SERIAL_EMPEG is not set | ||
754 | # CONFIG_USB_SERIAL_FTDI_SIO is not set | ||
755 | # CONFIG_USB_SERIAL_VISOR is not set | ||
756 | # CONFIG_USB_SERIAL_IPAQ is not set | ||
757 | # CONFIG_USB_SERIAL_IR is not set | ||
758 | # CONFIG_USB_SERIAL_EDGEPORT is not set | ||
759 | # CONFIG_USB_SERIAL_EDGEPORT_TI is not set | ||
760 | CONFIG_USB_SERIAL_GARMIN=m | ||
761 | CONFIG_USB_SERIAL_IPW=m | ||
762 | # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set | ||
763 | CONFIG_USB_SERIAL_KEYSPAN=y | ||
764 | CONFIG_USB_SERIAL_KEYSPAN_MPR=y | ||
765 | CONFIG_USB_SERIAL_KEYSPAN_USA28=y | ||
766 | CONFIG_USB_SERIAL_KEYSPAN_USA28X=y | ||
767 | CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y | ||
768 | CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y | ||
769 | CONFIG_USB_SERIAL_KEYSPAN_USA19=y | ||
770 | CONFIG_USB_SERIAL_KEYSPAN_USA18X=y | ||
771 | CONFIG_USB_SERIAL_KEYSPAN_USA19W=y | ||
772 | CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y | ||
773 | CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y | ||
774 | CONFIG_USB_SERIAL_KEYSPAN_USA49W=y | ||
775 | CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y | ||
776 | # CONFIG_USB_SERIAL_KLSI is not set | ||
777 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set | ||
778 | # CONFIG_USB_SERIAL_MCT_U232 is not set | ||
779 | # CONFIG_USB_SERIAL_PL2303 is not set | ||
780 | # CONFIG_USB_SERIAL_HP4X is not set | ||
781 | # CONFIG_USB_SERIAL_SAFE is not set | ||
782 | CONFIG_USB_SERIAL_TI=m | ||
783 | # CONFIG_USB_SERIAL_CYBERJACK is not set | ||
784 | # CONFIG_USB_SERIAL_XIRCOM is not set | ||
785 | # CONFIG_USB_SERIAL_OMNINET is not set | ||
786 | CONFIG_USB_EZUSB=y | ||
787 | |||
788 | # | ||
789 | # USB Miscellaneous drivers | ||
790 | # | ||
791 | # CONFIG_USB_EMI62 is not set | ||
792 | # CONFIG_USB_EMI26 is not set | ||
793 | # CONFIG_USB_AUERSWALD is not set | ||
794 | # CONFIG_USB_RIO500 is not set | ||
795 | # CONFIG_USB_LEGOTOWER is not set | ||
796 | # CONFIG_USB_LCD is not set | ||
797 | # CONFIG_USB_LED is not set | ||
798 | # CONFIG_USB_CYTHERM is not set | ||
799 | # CONFIG_USB_PHIDGETKIT is not set | ||
800 | # CONFIG_USB_PHIDGETSERVO is not set | ||
801 | # CONFIG_USB_IDMOUSE is not set | ||
802 | # CONFIG_USB_SISUSBVGA is not set | ||
803 | # CONFIG_USB_LD is not set | ||
804 | # CONFIG_USB_TEST is not set | ||
805 | |||
806 | # | ||
807 | # USB DSL modem support | ||
808 | # | ||
809 | |||
810 | # | ||
811 | # USB Gadget Support | ||
812 | # | ||
813 | # CONFIG_USB_GADGET is not set | ||
814 | |||
815 | # | ||
816 | # MMC/SD Card support | ||
817 | # | ||
818 | # CONFIG_MMC is not set | ||
819 | |||
820 | # | ||
821 | # InfiniBand support | ||
822 | # | ||
823 | # CONFIG_INFINIBAND is not set | ||
824 | |||
825 | # | ||
826 | # SN Devices | ||
827 | # | ||
828 | |||
829 | # | ||
830 | # File systems | ||
831 | # | ||
832 | CONFIG_EXT2_FS=y | ||
833 | # CONFIG_EXT2_FS_XATTR is not set | ||
834 | CONFIG_EXT2_FS_XIP=y | ||
835 | CONFIG_FS_XIP=y | ||
836 | CONFIG_EXT3_FS=y | ||
837 | # CONFIG_EXT3_FS_XATTR is not set | ||
838 | CONFIG_JBD=y | ||
839 | # CONFIG_JBD_DEBUG is not set | ||
840 | # CONFIG_REISERFS_FS is not set | ||
841 | # CONFIG_JFS_FS is not set | ||
842 | CONFIG_FS_POSIX_ACL=y | ||
843 | # CONFIG_XFS_FS is not set | ||
844 | # CONFIG_MINIX_FS is not set | ||
845 | # CONFIG_ROMFS_FS is not set | ||
846 | CONFIG_INOTIFY=y | ||
847 | # CONFIG_QUOTA is not set | ||
848 | CONFIG_DNOTIFY=y | ||
849 | # CONFIG_AUTOFS_FS is not set | ||
850 | # CONFIG_AUTOFS4_FS is not set | ||
851 | # CONFIG_FUSE_FS is not set | ||
852 | |||
853 | # | ||
854 | # CD-ROM/DVD Filesystems | ||
855 | # | ||
856 | # CONFIG_ISO9660_FS is not set | ||
857 | # CONFIG_UDF_FS is not set | ||
858 | |||
859 | # | ||
860 | # DOS/FAT/NT Filesystems | ||
861 | # | ||
862 | CONFIG_FAT_FS=y | ||
863 | CONFIG_MSDOS_FS=y | ||
864 | CONFIG_VFAT_FS=y | ||
865 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
866 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
867 | # CONFIG_NTFS_FS is not set | ||
868 | |||
869 | # | ||
870 | # Pseudo filesystems | ||
871 | # | ||
872 | CONFIG_PROC_FS=y | ||
873 | CONFIG_PROC_KCORE=y | ||
874 | CONFIG_SYSFS=y | ||
875 | CONFIG_TMPFS=y | ||
876 | CONFIG_HUGETLBFS=y | ||
877 | CONFIG_HUGETLB_PAGE=y | ||
878 | CONFIG_RAMFS=y | ||
879 | # CONFIG_RELAYFS_FS is not set | ||
880 | |||
881 | # | ||
882 | # Miscellaneous filesystems | ||
883 | # | ||
884 | # CONFIG_ADFS_FS is not set | ||
885 | # CONFIG_AFFS_FS is not set | ||
886 | # CONFIG_HFS_FS is not set | ||
887 | # CONFIG_HFSPLUS_FS is not set | ||
888 | # CONFIG_BEFS_FS is not set | ||
889 | # CONFIG_BFS_FS is not set | ||
890 | # CONFIG_EFS_FS is not set | ||
891 | CONFIG_CRAMFS=y | ||
892 | # CONFIG_VXFS_FS is not set | ||
893 | # CONFIG_HPFS_FS is not set | ||
894 | # CONFIG_QNX4FS_FS is not set | ||
895 | # CONFIG_SYSV_FS is not set | ||
896 | # CONFIG_UFS_FS is not set | ||
897 | |||
898 | # | ||
899 | # Network File Systems | ||
900 | # | ||
901 | CONFIG_NFS_FS=y | ||
902 | CONFIG_NFS_V3=y | ||
903 | CONFIG_NFS_V3_ACL=y | ||
904 | CONFIG_NFS_V4=y | ||
905 | # CONFIG_NFS_DIRECTIO is not set | ||
906 | # CONFIG_NFSD is not set | ||
907 | CONFIG_ROOT_NFS=y | ||
908 | CONFIG_LOCKD=y | ||
909 | CONFIG_LOCKD_V4=y | ||
910 | CONFIG_NFS_ACL_SUPPORT=y | ||
911 | CONFIG_NFS_COMMON=y | ||
912 | CONFIG_SUNRPC=y | ||
913 | CONFIG_SUNRPC_GSS=y | ||
914 | CONFIG_RPCSEC_GSS_KRB5=y | ||
915 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
916 | # CONFIG_SMB_FS is not set | ||
917 | # CONFIG_CIFS is not set | ||
918 | # CONFIG_NCP_FS is not set | ||
919 | # CONFIG_CODA_FS is not set | ||
920 | # CONFIG_AFS_FS is not set | ||
921 | # CONFIG_9P_FS is not set | ||
922 | |||
923 | # | ||
924 | # Partition Types | ||
925 | # | ||
926 | CONFIG_PARTITION_ADVANCED=y | ||
927 | # CONFIG_ACORN_PARTITION is not set | ||
928 | # CONFIG_OSF_PARTITION is not set | ||
929 | # CONFIG_AMIGA_PARTITION is not set | ||
930 | # CONFIG_ATARI_PARTITION is not set | ||
931 | CONFIG_MAC_PARTITION=y | ||
932 | CONFIG_MSDOS_PARTITION=y | ||
933 | # CONFIG_BSD_DISKLABEL is not set | ||
934 | # CONFIG_MINIX_SUBPARTITION is not set | ||
935 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
936 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
937 | # CONFIG_LDM_PARTITION is not set | ||
938 | # CONFIG_SGI_PARTITION is not set | ||
939 | # CONFIG_ULTRIX_PARTITION is not set | ||
940 | # CONFIG_SUN_PARTITION is not set | ||
941 | # CONFIG_EFI_PARTITION is not set | ||
942 | |||
943 | # | ||
944 | # Native Language Support | ||
945 | # | ||
946 | CONFIG_NLS=y | ||
947 | CONFIG_NLS_DEFAULT="utf-8" | ||
948 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
949 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
950 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
951 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
952 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
953 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
954 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
955 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
956 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
957 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
958 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
959 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
960 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
961 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
962 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
963 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
964 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
965 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
966 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
967 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
968 | # CONFIG_NLS_ISO8859_8 is not set | ||
969 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
970 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
971 | # CONFIG_NLS_ASCII is not set | ||
972 | # CONFIG_NLS_ISO8859_1 is not set | ||
973 | # CONFIG_NLS_ISO8859_2 is not set | ||
974 | # CONFIG_NLS_ISO8859_3 is not set | ||
975 | # CONFIG_NLS_ISO8859_4 is not set | ||
976 | # CONFIG_NLS_ISO8859_5 is not set | ||
977 | # CONFIG_NLS_ISO8859_6 is not set | ||
978 | # CONFIG_NLS_ISO8859_7 is not set | ||
979 | # CONFIG_NLS_ISO8859_9 is not set | ||
980 | # CONFIG_NLS_ISO8859_13 is not set | ||
981 | # CONFIG_NLS_ISO8859_14 is not set | ||
982 | # CONFIG_NLS_ISO8859_15 is not set | ||
983 | # CONFIG_NLS_KOI8_R is not set | ||
984 | # CONFIG_NLS_KOI8_U is not set | ||
985 | CONFIG_NLS_UTF8=y | ||
986 | |||
987 | # | ||
988 | # Profiling support | ||
989 | # | ||
990 | # CONFIG_PROFILING is not set | ||
991 | |||
992 | # | ||
993 | # Kernel hacking | ||
994 | # | ||
995 | # CONFIG_PRINTK_TIME is not set | ||
996 | CONFIG_DEBUG_KERNEL=y | ||
997 | CONFIG_MAGIC_SYSRQ=y | ||
998 | CONFIG_LOG_BUF_SHIFT=17 | ||
999 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1000 | # CONFIG_SCHEDSTATS is not set | ||
1001 | CONFIG_DEBUG_SLAB=y | ||
1002 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1003 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
1004 | # CONFIG_DEBUG_KOBJECT is not set | ||
1005 | # CONFIG_DEBUG_INFO is not set | ||
1006 | CONFIG_DEBUG_FS=y | ||
1007 | CONFIG_DEBUG_STACKOVERFLOW=y | ||
1008 | # CONFIG_KPROBES is not set | ||
1009 | CONFIG_DEBUG_STACK_USAGE=y | ||
1010 | CONFIG_DEBUGGER=y | ||
1011 | CONFIG_XMON=y | ||
1012 | CONFIG_XMON_DEFAULT=y | ||
1013 | # CONFIG_PPCDBG is not set | ||
1014 | # CONFIG_IRQSTACKS is not set | ||
1015 | |||
1016 | # | ||
1017 | # Security options | ||
1018 | # | ||
1019 | # CONFIG_KEYS is not set | ||
1020 | # CONFIG_SECURITY is not set | ||
1021 | |||
1022 | # | ||
1023 | # Cryptographic options | ||
1024 | # | ||
1025 | CONFIG_CRYPTO=y | ||
1026 | # CONFIG_CRYPTO_HMAC is not set | ||
1027 | # CONFIG_CRYPTO_NULL is not set | ||
1028 | # CONFIG_CRYPTO_MD4 is not set | ||
1029 | CONFIG_CRYPTO_MD5=y | ||
1030 | # CONFIG_CRYPTO_SHA1 is not set | ||
1031 | # CONFIG_CRYPTO_SHA256 is not set | ||
1032 | # CONFIG_CRYPTO_SHA512 is not set | ||
1033 | # CONFIG_CRYPTO_WP512 is not set | ||
1034 | # CONFIG_CRYPTO_TGR192 is not set | ||
1035 | CONFIG_CRYPTO_DES=y | ||
1036 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1037 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1038 | # CONFIG_CRYPTO_SERPENT is not set | ||
1039 | # CONFIG_CRYPTO_AES is not set | ||
1040 | # CONFIG_CRYPTO_CAST5 is not set | ||
1041 | # CONFIG_CRYPTO_CAST6 is not set | ||
1042 | # CONFIG_CRYPTO_TEA is not set | ||
1043 | # CONFIG_CRYPTO_ARC4 is not set | ||
1044 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1045 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1046 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1047 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1048 | # CONFIG_CRYPTO_CRC32C is not set | ||
1049 | # CONFIG_CRYPTO_TEST is not set | ||
1050 | |||
1051 | # | ||
1052 | # Hardware crypto devices | ||
1053 | # | ||
1054 | |||
1055 | # | ||
1056 | # Library routines | ||
1057 | # | ||
1058 | CONFIG_CRC_CCITT=y | ||
1059 | # CONFIG_CRC16 is not set | ||
1060 | CONFIG_CRC32=y | ||
1061 | # CONFIG_LIBCRC32C is not set | ||
1062 | CONFIG_ZLIB_INFLATE=y | ||
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig new file mode 100644 index 000000000000..9f09dff9e11a --- /dev/null +++ b/arch/powerpc/configs/pseries_defconfig | |||
@@ -0,0 +1,1371 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.14-rc4 | ||
4 | # Thu Oct 20 08:32:17 2005 | ||
5 | # | ||
6 | CONFIG_64BIT=y | ||
7 | CONFIG_MMU=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_GENERIC_ISA_DMA=y | ||
11 | CONFIG_EARLY_PRINTK=y | ||
12 | CONFIG_COMPAT=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
16 | |||
17 | # | ||
18 | # Code maturity level options | ||
19 | # | ||
20 | CONFIG_EXPERIMENTAL=y | ||
21 | CONFIG_CLEAN_COMPILE=y | ||
22 | CONFIG_LOCK_KERNEL=y | ||
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
24 | |||
25 | # | ||
26 | # General setup | ||
27 | # | ||
28 | CONFIG_LOCALVERSION="" | ||
29 | CONFIG_LOCALVERSION_AUTO=y | ||
30 | CONFIG_SWAP=y | ||
31 | CONFIG_SYSVIPC=y | ||
32 | CONFIG_POSIX_MQUEUE=y | ||
33 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
34 | CONFIG_SYSCTL=y | ||
35 | CONFIG_AUDIT=y | ||
36 | CONFIG_AUDITSYSCALL=y | ||
37 | CONFIG_HOTPLUG=y | ||
38 | CONFIG_KOBJECT_UEVENT=y | ||
39 | CONFIG_IKCONFIG=y | ||
40 | CONFIG_IKCONFIG_PROC=y | ||
41 | CONFIG_CPUSETS=y | ||
42 | CONFIG_INITRAMFS_SOURCE="" | ||
43 | # CONFIG_EMBEDDED is not set | ||
44 | CONFIG_KALLSYMS=y | ||
45 | CONFIG_KALLSYMS_ALL=y | ||
46 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
47 | CONFIG_PRINTK=y | ||
48 | CONFIG_BUG=y | ||
49 | CONFIG_BASE_FULL=y | ||
50 | CONFIG_FUTEX=y | ||
51 | CONFIG_EPOLL=y | ||
52 | CONFIG_SHMEM=y | ||
53 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
54 | CONFIG_CC_ALIGN_LABELS=0 | ||
55 | CONFIG_CC_ALIGN_LOOPS=0 | ||
56 | CONFIG_CC_ALIGN_JUMPS=0 | ||
57 | # CONFIG_TINY_SHMEM is not set | ||
58 | CONFIG_BASE_SMALL=0 | ||
59 | |||
60 | # | ||
61 | # Loadable module support | ||
62 | # | ||
63 | CONFIG_MODULES=y | ||
64 | CONFIG_MODULE_UNLOAD=y | ||
65 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
66 | CONFIG_OBSOLETE_MODPARM=y | ||
67 | CONFIG_MODVERSIONS=y | ||
68 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
69 | CONFIG_KMOD=y | ||
70 | CONFIG_STOP_MACHINE=y | ||
71 | CONFIG_SYSVIPC_COMPAT=y | ||
72 | |||
73 | # | ||
74 | # Platform support | ||
75 | # | ||
76 | # CONFIG_PPC_ISERIES is not set | ||
77 | CONFIG_PPC_MULTIPLATFORM=y | ||
78 | CONFIG_PPC_PSERIES=y | ||
79 | # CONFIG_PPC_BPA is not set | ||
80 | # CONFIG_PPC_PMAC is not set | ||
81 | # CONFIG_PPC_MAPLE is not set | ||
82 | CONFIG_PPC=y | ||
83 | CONFIG_PPC64=y | ||
84 | CONFIG_PPC_OF=y | ||
85 | CONFIG_XICS=y | ||
86 | CONFIG_MPIC=y | ||
87 | CONFIG_ALTIVEC=y | ||
88 | CONFIG_PPC_SPLPAR=y | ||
89 | CONFIG_KEXEC=y | ||
90 | CONFIG_IBMVIO=y | ||
91 | # CONFIG_U3_DART is not set | ||
92 | # CONFIG_BOOTX_TEXT is not set | ||
93 | # CONFIG_POWER4_ONLY is not set | ||
94 | CONFIG_IOMMU_VMERGE=y | ||
95 | CONFIG_SMP=y | ||
96 | CONFIG_NR_CPUS=128 | ||
97 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | ||
98 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
99 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y | ||
100 | CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y | ||
101 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | ||
102 | CONFIG_SELECT_MEMORY_MODEL=y | ||
103 | # CONFIG_FLATMEM_MANUAL is not set | ||
104 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
105 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
106 | CONFIG_DISCONTIGMEM=y | ||
107 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
108 | CONFIG_NEED_MULTIPLE_NODES=y | ||
109 | # CONFIG_SPARSEMEM_STATIC is not set | ||
110 | CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y | ||
111 | CONFIG_NODES_SPAN_OTHER_NODES=y | ||
112 | CONFIG_NUMA=y | ||
113 | CONFIG_SCHED_SMT=y | ||
114 | CONFIG_PREEMPT_NONE=y | ||
115 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
116 | # CONFIG_PREEMPT is not set | ||
117 | # CONFIG_PREEMPT_BKL is not set | ||
118 | # CONFIG_HZ_100 is not set | ||
119 | CONFIG_HZ_250=y | ||
120 | # CONFIG_HZ_1000 is not set | ||
121 | CONFIG_HZ=250 | ||
122 | CONFIG_EEH=y | ||
123 | CONFIG_GENERIC_HARDIRQS=y | ||
124 | CONFIG_PPC_RTAS=y | ||
125 | CONFIG_RTAS_PROC=y | ||
126 | CONFIG_RTAS_FLASH=m | ||
127 | CONFIG_SCANLOG=m | ||
128 | CONFIG_LPARCFG=y | ||
129 | CONFIG_SECCOMP=y | ||
130 | CONFIG_BINFMT_ELF=y | ||
131 | # CONFIG_BINFMT_MISC is not set | ||
132 | CONFIG_HOTPLUG_CPU=y | ||
133 | CONFIG_PROC_DEVICETREE=y | ||
134 | # CONFIG_CMDLINE_BOOL is not set | ||
135 | CONFIG_ISA_DMA_API=y | ||
136 | |||
137 | # | ||
138 | # Bus Options | ||
139 | # | ||
140 | CONFIG_PCI=y | ||
141 | CONFIG_PCI_DOMAINS=y | ||
142 | CONFIG_PCI_LEGACY_PROC=y | ||
143 | # CONFIG_PCI_DEBUG is not set | ||
144 | |||
145 | # | ||
146 | # PCCARD (PCMCIA/CardBus) support | ||
147 | # | ||
148 | # CONFIG_PCCARD is not set | ||
149 | |||
150 | # | ||
151 | # PCI Hotplug Support | ||
152 | # | ||
153 | CONFIG_HOTPLUG_PCI=m | ||
154 | # CONFIG_HOTPLUG_PCI_FAKE is not set | ||
155 | # CONFIG_HOTPLUG_PCI_CPCI is not set | ||
156 | # CONFIG_HOTPLUG_PCI_SHPC is not set | ||
157 | CONFIG_HOTPLUG_PCI_RPA=m | ||
158 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m | ||
159 | |||
160 | # | ||
161 | # Networking | ||
162 | # | ||
163 | CONFIG_NET=y | ||
164 | |||
165 | # | ||
166 | # Networking options | ||
167 | # | ||
168 | CONFIG_PACKET=y | ||
169 | # CONFIG_PACKET_MMAP is not set | ||
170 | CONFIG_UNIX=y | ||
171 | CONFIG_XFRM=y | ||
172 | CONFIG_XFRM_USER=m | ||
173 | CONFIG_NET_KEY=m | ||
174 | CONFIG_INET=y | ||
175 | CONFIG_IP_MULTICAST=y | ||
176 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
177 | CONFIG_IP_FIB_HASH=y | ||
178 | # CONFIG_IP_PNP is not set | ||
179 | CONFIG_NET_IPIP=y | ||
180 | # CONFIG_NET_IPGRE is not set | ||
181 | # CONFIG_IP_MROUTE is not set | ||
182 | # CONFIG_ARPD is not set | ||
183 | CONFIG_SYN_COOKIES=y | ||
184 | CONFIG_INET_AH=m | ||
185 | CONFIG_INET_ESP=m | ||
186 | CONFIG_INET_IPCOMP=m | ||
187 | CONFIG_INET_TUNNEL=y | ||
188 | CONFIG_INET_DIAG=y | ||
189 | CONFIG_INET_TCP_DIAG=y | ||
190 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
191 | CONFIG_TCP_CONG_BIC=y | ||
192 | |||
193 | # | ||
194 | # IP: Virtual Server Configuration | ||
195 | # | ||
196 | # CONFIG_IP_VS is not set | ||
197 | # CONFIG_IPV6 is not set | ||
198 | CONFIG_NETFILTER=y | ||
199 | # CONFIG_NETFILTER_DEBUG is not set | ||
200 | CONFIG_NETFILTER_NETLINK=y | ||
201 | CONFIG_NETFILTER_NETLINK_QUEUE=m | ||
202 | CONFIG_NETFILTER_NETLINK_LOG=m | ||
203 | |||
204 | # | ||
205 | # IP: Netfilter Configuration | ||
206 | # | ||
207 | CONFIG_IP_NF_CONNTRACK=m | ||
208 | CONFIG_IP_NF_CT_ACCT=y | ||
209 | CONFIG_IP_NF_CONNTRACK_MARK=y | ||
210 | CONFIG_IP_NF_CONNTRACK_EVENTS=y | ||
211 | CONFIG_IP_NF_CONNTRACK_NETLINK=m | ||
212 | CONFIG_IP_NF_CT_PROTO_SCTP=m | ||
213 | CONFIG_IP_NF_FTP=m | ||
214 | CONFIG_IP_NF_IRC=m | ||
215 | # CONFIG_IP_NF_NETBIOS_NS is not set | ||
216 | CONFIG_IP_NF_TFTP=m | ||
217 | CONFIG_IP_NF_AMANDA=m | ||
218 | # CONFIG_IP_NF_PPTP is not set | ||
219 | CONFIG_IP_NF_QUEUE=m | ||
220 | CONFIG_IP_NF_IPTABLES=m | ||
221 | CONFIG_IP_NF_MATCH_LIMIT=m | ||
222 | CONFIG_IP_NF_MATCH_IPRANGE=m | ||
223 | CONFIG_IP_NF_MATCH_MAC=m | ||
224 | CONFIG_IP_NF_MATCH_PKTTYPE=m | ||
225 | CONFIG_IP_NF_MATCH_MARK=m | ||
226 | CONFIG_IP_NF_MATCH_MULTIPORT=m | ||
227 | CONFIG_IP_NF_MATCH_TOS=m | ||
228 | CONFIG_IP_NF_MATCH_RECENT=m | ||
229 | CONFIG_IP_NF_MATCH_ECN=m | ||
230 | CONFIG_IP_NF_MATCH_DSCP=m | ||
231 | CONFIG_IP_NF_MATCH_AH_ESP=m | ||
232 | CONFIG_IP_NF_MATCH_LENGTH=m | ||
233 | CONFIG_IP_NF_MATCH_TTL=m | ||
234 | CONFIG_IP_NF_MATCH_TCPMSS=m | ||
235 | CONFIG_IP_NF_MATCH_HELPER=m | ||
236 | CONFIG_IP_NF_MATCH_STATE=m | ||
237 | CONFIG_IP_NF_MATCH_CONNTRACK=m | ||
238 | CONFIG_IP_NF_MATCH_OWNER=m | ||
239 | CONFIG_IP_NF_MATCH_ADDRTYPE=m | ||
240 | CONFIG_IP_NF_MATCH_REALM=m | ||
241 | CONFIG_IP_NF_MATCH_SCTP=m | ||
242 | # CONFIG_IP_NF_MATCH_DCCP is not set | ||
243 | CONFIG_IP_NF_MATCH_COMMENT=m | ||
244 | CONFIG_IP_NF_MATCH_CONNMARK=m | ||
245 | CONFIG_IP_NF_MATCH_CONNBYTES=m | ||
246 | CONFIG_IP_NF_MATCH_HASHLIMIT=m | ||
247 | CONFIG_IP_NF_MATCH_STRING=m | ||
248 | CONFIG_IP_NF_FILTER=m | ||
249 | CONFIG_IP_NF_TARGET_REJECT=m | ||
250 | CONFIG_IP_NF_TARGET_LOG=m | ||
251 | CONFIG_IP_NF_TARGET_ULOG=m | ||
252 | CONFIG_IP_NF_TARGET_TCPMSS=m | ||
253 | CONFIG_IP_NF_TARGET_NFQUEUE=m | ||
254 | CONFIG_IP_NF_NAT=m | ||
255 | CONFIG_IP_NF_NAT_NEEDED=y | ||
256 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
257 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
258 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
259 | CONFIG_IP_NF_TARGET_SAME=m | ||
260 | CONFIG_IP_NF_NAT_SNMP_BASIC=m | ||
261 | CONFIG_IP_NF_NAT_IRC=m | ||
262 | CONFIG_IP_NF_NAT_FTP=m | ||
263 | CONFIG_IP_NF_NAT_TFTP=m | ||
264 | CONFIG_IP_NF_NAT_AMANDA=m | ||
265 | CONFIG_IP_NF_MANGLE=m | ||
266 | CONFIG_IP_NF_TARGET_TOS=m | ||
267 | CONFIG_IP_NF_TARGET_ECN=m | ||
268 | CONFIG_IP_NF_TARGET_DSCP=m | ||
269 | CONFIG_IP_NF_TARGET_MARK=m | ||
270 | CONFIG_IP_NF_TARGET_CLASSIFY=m | ||
271 | CONFIG_IP_NF_TARGET_TTL=m | ||
272 | CONFIG_IP_NF_TARGET_CONNMARK=m | ||
273 | CONFIG_IP_NF_TARGET_CLUSTERIP=m | ||
274 | CONFIG_IP_NF_RAW=m | ||
275 | CONFIG_IP_NF_TARGET_NOTRACK=m | ||
276 | CONFIG_IP_NF_ARPTABLES=m | ||
277 | CONFIG_IP_NF_ARPFILTER=m | ||
278 | CONFIG_IP_NF_ARP_MANGLE=m | ||
279 | |||
280 | # | ||
281 | # DCCP Configuration (EXPERIMENTAL) | ||
282 | # | ||
283 | # CONFIG_IP_DCCP is not set | ||
284 | |||
285 | # | ||
286 | # SCTP Configuration (EXPERIMENTAL) | ||
287 | # | ||
288 | # CONFIG_IP_SCTP is not set | ||
289 | # CONFIG_ATM is not set | ||
290 | # CONFIG_BRIDGE is not set | ||
291 | # CONFIG_VLAN_8021Q is not set | ||
292 | # CONFIG_DECNET is not set | ||
293 | CONFIG_LLC=y | ||
294 | # CONFIG_LLC2 is not set | ||
295 | # CONFIG_IPX is not set | ||
296 | # CONFIG_ATALK is not set | ||
297 | # CONFIG_X25 is not set | ||
298 | # CONFIG_LAPB is not set | ||
299 | # CONFIG_NET_DIVERT is not set | ||
300 | # CONFIG_ECONET is not set | ||
301 | # CONFIG_WAN_ROUTER is not set | ||
302 | # CONFIG_NET_SCHED is not set | ||
303 | CONFIG_NET_CLS_ROUTE=y | ||
304 | |||
305 | # | ||
306 | # Network testing | ||
307 | # | ||
308 | # CONFIG_NET_PKTGEN is not set | ||
309 | # CONFIG_HAMRADIO is not set | ||
310 | # CONFIG_IRDA is not set | ||
311 | # CONFIG_BT is not set | ||
312 | # CONFIG_IEEE80211 is not set | ||
313 | |||
314 | # | ||
315 | # Device Drivers | ||
316 | # | ||
317 | |||
318 | # | ||
319 | # Generic Driver Options | ||
320 | # | ||
321 | CONFIG_STANDALONE=y | ||
322 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
323 | CONFIG_FW_LOADER=y | ||
324 | # CONFIG_DEBUG_DRIVER is not set | ||
325 | |||
326 | # | ||
327 | # Connector - unified userspace <-> kernelspace linker | ||
328 | # | ||
329 | # CONFIG_CONNECTOR is not set | ||
330 | |||
331 | # | ||
332 | # Memory Technology Devices (MTD) | ||
333 | # | ||
334 | # CONFIG_MTD is not set | ||
335 | |||
336 | # | ||
337 | # Parallel port support | ||
338 | # | ||
339 | CONFIG_PARPORT=m | ||
340 | CONFIG_PARPORT_PC=m | ||
341 | # CONFIG_PARPORT_SERIAL is not set | ||
342 | # CONFIG_PARPORT_PC_FIFO is not set | ||
343 | # CONFIG_PARPORT_PC_SUPERIO is not set | ||
344 | # CONFIG_PARPORT_GSC is not set | ||
345 | # CONFIG_PARPORT_1284 is not set | ||
346 | |||
347 | # | ||
348 | # Plug and Play support | ||
349 | # | ||
350 | |||
351 | # | ||
352 | # Block devices | ||
353 | # | ||
354 | CONFIG_BLK_DEV_FD=m | ||
355 | # CONFIG_PARIDE is not set | ||
356 | # CONFIG_BLK_CPQ_DA is not set | ||
357 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
358 | # CONFIG_BLK_DEV_DAC960 is not set | ||
359 | # CONFIG_BLK_DEV_UMEM is not set | ||
360 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
361 | CONFIG_BLK_DEV_LOOP=y | ||
362 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
363 | CONFIG_BLK_DEV_NBD=m | ||
364 | # CONFIG_BLK_DEV_SX8 is not set | ||
365 | # CONFIG_BLK_DEV_UB is not set | ||
366 | CONFIG_BLK_DEV_RAM=y | ||
367 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
368 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
369 | CONFIG_BLK_DEV_INITRD=y | ||
370 | # CONFIG_CDROM_PKTCDVD is not set | ||
371 | |||
372 | # | ||
373 | # IO Schedulers | ||
374 | # | ||
375 | CONFIG_IOSCHED_NOOP=y | ||
376 | CONFIG_IOSCHED_AS=y | ||
377 | CONFIG_IOSCHED_DEADLINE=y | ||
378 | CONFIG_IOSCHED_CFQ=y | ||
379 | # CONFIG_ATA_OVER_ETH is not set | ||
380 | |||
381 | # | ||
382 | # ATA/ATAPI/MFM/RLL support | ||
383 | # | ||
384 | CONFIG_IDE=y | ||
385 | CONFIG_BLK_DEV_IDE=y | ||
386 | |||
387 | # | ||
388 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
389 | # | ||
390 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
391 | CONFIG_BLK_DEV_IDEDISK=y | ||
392 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
393 | CONFIG_BLK_DEV_IDECD=y | ||
394 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
395 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
396 | # CONFIG_BLK_DEV_IDESCSI is not set | ||
397 | # CONFIG_IDE_TASK_IOCTL is not set | ||
398 | |||
399 | # | ||
400 | # IDE chipset support/bugfixes | ||
401 | # | ||
402 | CONFIG_IDE_GENERIC=y | ||
403 | CONFIG_BLK_DEV_IDEPCI=y | ||
404 | CONFIG_IDEPCI_SHARE_IRQ=y | ||
405 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
406 | CONFIG_BLK_DEV_GENERIC=y | ||
407 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
408 | CONFIG_BLK_DEV_SL82C105=y | ||
409 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
410 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
411 | CONFIG_IDEDMA_PCI_AUTO=y | ||
412 | # CONFIG_IDEDMA_ONLYDISK is not set | ||
413 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
414 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
415 | CONFIG_BLK_DEV_AMD74XX=y | ||
416 | # CONFIG_BLK_DEV_CMD64X is not set | ||
417 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
418 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
419 | # CONFIG_BLK_DEV_CS5520 is not set | ||
420 | # CONFIG_BLK_DEV_CS5530 is not set | ||
421 | # CONFIG_BLK_DEV_HPT34X is not set | ||
422 | # CONFIG_BLK_DEV_HPT366 is not set | ||
423 | # CONFIG_BLK_DEV_SC1200 is not set | ||
424 | # CONFIG_BLK_DEV_PIIX is not set | ||
425 | # CONFIG_BLK_DEV_IT821X is not set | ||
426 | # CONFIG_BLK_DEV_NS87415 is not set | ||
427 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
428 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
429 | # CONFIG_BLK_DEV_SVWKS is not set | ||
430 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
431 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
432 | # CONFIG_BLK_DEV_TRM290 is not set | ||
433 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
434 | # CONFIG_IDE_ARM is not set | ||
435 | CONFIG_BLK_DEV_IDEDMA=y | ||
436 | # CONFIG_IDEDMA_IVB is not set | ||
437 | CONFIG_IDEDMA_AUTO=y | ||
438 | # CONFIG_BLK_DEV_HD is not set | ||
439 | |||
440 | # | ||
441 | # SCSI device support | ||
442 | # | ||
443 | # CONFIG_RAID_ATTRS is not set | ||
444 | CONFIG_SCSI=y | ||
445 | CONFIG_SCSI_PROC_FS=y | ||
446 | |||
447 | # | ||
448 | # SCSI support type (disk, tape, CD-ROM) | ||
449 | # | ||
450 | CONFIG_BLK_DEV_SD=y | ||
451 | CONFIG_CHR_DEV_ST=y | ||
452 | # CONFIG_CHR_DEV_OSST is not set | ||
453 | CONFIG_BLK_DEV_SR=y | ||
454 | CONFIG_BLK_DEV_SR_VENDOR=y | ||
455 | CONFIG_CHR_DEV_SG=y | ||
456 | # CONFIG_CHR_DEV_SCH is not set | ||
457 | |||
458 | # | ||
459 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
460 | # | ||
461 | CONFIG_SCSI_MULTI_LUN=y | ||
462 | CONFIG_SCSI_CONSTANTS=y | ||
463 | # CONFIG_SCSI_LOGGING is not set | ||
464 | |||
465 | # | ||
466 | # SCSI Transport Attributes | ||
467 | # | ||
468 | CONFIG_SCSI_SPI_ATTRS=y | ||
469 | CONFIG_SCSI_FC_ATTRS=y | ||
470 | CONFIG_SCSI_ISCSI_ATTRS=m | ||
471 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
472 | |||
473 | # | ||
474 | # SCSI low-level drivers | ||
475 | # | ||
476 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
477 | # CONFIG_SCSI_3W_9XXX is not set | ||
478 | # CONFIG_SCSI_ACARD is not set | ||
479 | # CONFIG_SCSI_AACRAID is not set | ||
480 | # CONFIG_SCSI_AIC7XXX is not set | ||
481 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
482 | # CONFIG_SCSI_AIC79XX is not set | ||
483 | # CONFIG_MEGARAID_NEWGEN is not set | ||
484 | # CONFIG_MEGARAID_LEGACY is not set | ||
485 | # CONFIG_MEGARAID_SAS is not set | ||
486 | # CONFIG_SCSI_SATA is not set | ||
487 | # CONFIG_SCSI_BUSLOGIC is not set | ||
488 | # CONFIG_SCSI_DMX3191D is not set | ||
489 | # CONFIG_SCSI_EATA is not set | ||
490 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
491 | # CONFIG_SCSI_GDTH is not set | ||
492 | # CONFIG_SCSI_IPS is not set | ||
493 | CONFIG_SCSI_IBMVSCSI=y | ||
494 | # CONFIG_SCSI_INITIO is not set | ||
495 | # CONFIG_SCSI_INIA100 is not set | ||
496 | # CONFIG_SCSI_PPA is not set | ||
497 | # CONFIG_SCSI_IMM is not set | ||
498 | CONFIG_SCSI_SYM53C8XX_2=y | ||
499 | CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 | ||
500 | CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 | ||
501 | CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 | ||
502 | # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set | ||
503 | CONFIG_SCSI_IPR=y | ||
504 | CONFIG_SCSI_IPR_TRACE=y | ||
505 | CONFIG_SCSI_IPR_DUMP=y | ||
506 | # CONFIG_SCSI_QLOGIC_FC is not set | ||
507 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
508 | CONFIG_SCSI_QLA2XXX=y | ||
509 | CONFIG_SCSI_QLA21XX=m | ||
510 | CONFIG_SCSI_QLA22XX=m | ||
511 | CONFIG_SCSI_QLA2300=m | ||
512 | CONFIG_SCSI_QLA2322=m | ||
513 | CONFIG_SCSI_QLA6312=m | ||
514 | CONFIG_SCSI_QLA24XX=m | ||
515 | CONFIG_SCSI_LPFC=m | ||
516 | # CONFIG_SCSI_DC395x is not set | ||
517 | # CONFIG_SCSI_DC390T is not set | ||
518 | # CONFIG_SCSI_DEBUG is not set | ||
519 | |||
520 | # | ||
521 | # Multi-device support (RAID and LVM) | ||
522 | # | ||
523 | CONFIG_MD=y | ||
524 | CONFIG_BLK_DEV_MD=y | ||
525 | CONFIG_MD_LINEAR=y | ||
526 | CONFIG_MD_RAID0=y | ||
527 | CONFIG_MD_RAID1=y | ||
528 | CONFIG_MD_RAID10=m | ||
529 | CONFIG_MD_RAID5=y | ||
530 | CONFIG_MD_RAID6=m | ||
531 | CONFIG_MD_MULTIPATH=m | ||
532 | CONFIG_MD_FAULTY=m | ||
533 | CONFIG_BLK_DEV_DM=y | ||
534 | CONFIG_DM_CRYPT=m | ||
535 | CONFIG_DM_SNAPSHOT=m | ||
536 | CONFIG_DM_MIRROR=m | ||
537 | CONFIG_DM_ZERO=m | ||
538 | CONFIG_DM_MULTIPATH=m | ||
539 | CONFIG_DM_MULTIPATH_EMC=m | ||
540 | |||
541 | # | ||
542 | # Fusion MPT device support | ||
543 | # | ||
544 | # CONFIG_FUSION is not set | ||
545 | # CONFIG_FUSION_SPI is not set | ||
546 | # CONFIG_FUSION_FC is not set | ||
547 | # CONFIG_FUSION_SAS is not set | ||
548 | |||
549 | # | ||
550 | # IEEE 1394 (FireWire) support | ||
551 | # | ||
552 | # CONFIG_IEEE1394 is not set | ||
553 | |||
554 | # | ||
555 | # I2O device support | ||
556 | # | ||
557 | # CONFIG_I2O is not set | ||
558 | |||
559 | # | ||
560 | # Macintosh device drivers | ||
561 | # | ||
562 | |||
563 | # | ||
564 | # Network device support | ||
565 | # | ||
566 | CONFIG_NETDEVICES=y | ||
567 | CONFIG_DUMMY=m | ||
568 | CONFIG_BONDING=m | ||
569 | # CONFIG_EQUALIZER is not set | ||
570 | CONFIG_TUN=m | ||
571 | |||
572 | # | ||
573 | # ARCnet devices | ||
574 | # | ||
575 | # CONFIG_ARCNET is not set | ||
576 | |||
577 | # | ||
578 | # PHY device support | ||
579 | # | ||
580 | # CONFIG_PHYLIB is not set | ||
581 | |||
582 | # | ||
583 | # Ethernet (10 or 100Mbit) | ||
584 | # | ||
585 | CONFIG_NET_ETHERNET=y | ||
586 | CONFIG_MII=y | ||
587 | # CONFIG_HAPPYMEAL is not set | ||
588 | # CONFIG_SUNGEM is not set | ||
589 | # CONFIG_CASSINI is not set | ||
590 | CONFIG_NET_VENDOR_3COM=y | ||
591 | CONFIG_VORTEX=y | ||
592 | # CONFIG_TYPHOON is not set | ||
593 | |||
594 | # | ||
595 | # Tulip family network device support | ||
596 | # | ||
597 | # CONFIG_NET_TULIP is not set | ||
598 | # CONFIG_HP100 is not set | ||
599 | CONFIG_IBMVETH=y | ||
600 | CONFIG_NET_PCI=y | ||
601 | CONFIG_PCNET32=y | ||
602 | # CONFIG_AMD8111_ETH is not set | ||
603 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
604 | # CONFIG_B44 is not set | ||
605 | # CONFIG_FORCEDETH is not set | ||
606 | # CONFIG_DGRS is not set | ||
607 | # CONFIG_EEPRO100 is not set | ||
608 | CONFIG_E100=y | ||
609 | # CONFIG_FEALNX is not set | ||
610 | # CONFIG_NATSEMI is not set | ||
611 | # CONFIG_NE2K_PCI is not set | ||
612 | # CONFIG_8139CP is not set | ||
613 | # CONFIG_8139TOO is not set | ||
614 | # CONFIG_SIS900 is not set | ||
615 | # CONFIG_EPIC100 is not set | ||
616 | # CONFIG_SUNDANCE is not set | ||
617 | # CONFIG_VIA_RHINE is not set | ||
618 | # CONFIG_NET_POCKET is not set | ||
619 | |||
620 | # | ||
621 | # Ethernet (1000 Mbit) | ||
622 | # | ||
623 | CONFIG_ACENIC=y | ||
624 | CONFIG_ACENIC_OMIT_TIGON_I=y | ||
625 | # CONFIG_DL2K is not set | ||
626 | CONFIG_E1000=y | ||
627 | # CONFIG_E1000_NAPI is not set | ||
628 | # CONFIG_NS83820 is not set | ||
629 | # CONFIG_HAMACHI is not set | ||
630 | # CONFIG_YELLOWFIN is not set | ||
631 | # CONFIG_R8169 is not set | ||
632 | # CONFIG_SIS190 is not set | ||
633 | # CONFIG_SKGE is not set | ||
634 | # CONFIG_SK98LIN is not set | ||
635 | # CONFIG_VIA_VELOCITY is not set | ||
636 | CONFIG_TIGON3=y | ||
637 | # CONFIG_BNX2 is not set | ||
638 | # CONFIG_MV643XX_ETH is not set | ||
639 | |||
640 | # | ||
641 | # Ethernet (10000 Mbit) | ||
642 | # | ||
643 | # CONFIG_CHELSIO_T1 is not set | ||
644 | CONFIG_IXGB=m | ||
645 | # CONFIG_IXGB_NAPI is not set | ||
646 | CONFIG_S2IO=m | ||
647 | # CONFIG_S2IO_NAPI is not set | ||
648 | # CONFIG_2BUFF_MODE is not set | ||
649 | |||
650 | # | ||
651 | # Token Ring devices | ||
652 | # | ||
653 | CONFIG_TR=y | ||
654 | CONFIG_IBMOL=y | ||
655 | # CONFIG_3C359 is not set | ||
656 | # CONFIG_TMS380TR is not set | ||
657 | |||
658 | # | ||
659 | # Wireless LAN (non-hamradio) | ||
660 | # | ||
661 | # CONFIG_NET_RADIO is not set | ||
662 | |||
663 | # | ||
664 | # Wan interfaces | ||
665 | # | ||
666 | # CONFIG_WAN is not set | ||
667 | # CONFIG_FDDI is not set | ||
668 | # CONFIG_HIPPI is not set | ||
669 | # CONFIG_PLIP is not set | ||
670 | CONFIG_PPP=m | ||
671 | # CONFIG_PPP_MULTILINK is not set | ||
672 | # CONFIG_PPP_FILTER is not set | ||
673 | CONFIG_PPP_ASYNC=m | ||
674 | CONFIG_PPP_SYNC_TTY=m | ||
675 | CONFIG_PPP_DEFLATE=m | ||
676 | CONFIG_PPP_BSDCOMP=m | ||
677 | CONFIG_PPPOE=m | ||
678 | # CONFIG_SLIP is not set | ||
679 | # CONFIG_NET_FC is not set | ||
680 | # CONFIG_SHAPER is not set | ||
681 | CONFIG_NETCONSOLE=y | ||
682 | CONFIG_NETPOLL=y | ||
683 | CONFIG_NETPOLL_RX=y | ||
684 | CONFIG_NETPOLL_TRAP=y | ||
685 | CONFIG_NET_POLL_CONTROLLER=y | ||
686 | |||
687 | # | ||
688 | # ISDN subsystem | ||
689 | # | ||
690 | # CONFIG_ISDN is not set | ||
691 | |||
692 | # | ||
693 | # Telephony Support | ||
694 | # | ||
695 | # CONFIG_PHONE is not set | ||
696 | |||
697 | # | ||
698 | # Input device support | ||
699 | # | ||
700 | CONFIG_INPUT=y | ||
701 | |||
702 | # | ||
703 | # Userland interfaces | ||
704 | # | ||
705 | CONFIG_INPUT_MOUSEDEV=y | ||
706 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
707 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
708 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
709 | # CONFIG_INPUT_JOYDEV is not set | ||
710 | # CONFIG_INPUT_TSDEV is not set | ||
711 | # CONFIG_INPUT_EVDEV is not set | ||
712 | # CONFIG_INPUT_EVBUG is not set | ||
713 | |||
714 | # | ||
715 | # Input Device Drivers | ||
716 | # | ||
717 | CONFIG_INPUT_KEYBOARD=y | ||
718 | CONFIG_KEYBOARD_ATKBD=y | ||
719 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
720 | # CONFIG_KEYBOARD_LKKBD is not set | ||
721 | # CONFIG_KEYBOARD_XTKBD is not set | ||
722 | # CONFIG_KEYBOARD_NEWTON is not set | ||
723 | CONFIG_INPUT_MOUSE=y | ||
724 | CONFIG_MOUSE_PS2=y | ||
725 | # CONFIG_MOUSE_SERIAL is not set | ||
726 | # CONFIG_MOUSE_VSXXXAA is not set | ||
727 | # CONFIG_INPUT_JOYSTICK is not set | ||
728 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
729 | CONFIG_INPUT_MISC=y | ||
730 | CONFIG_INPUT_PCSPKR=m | ||
731 | # CONFIG_INPUT_UINPUT is not set | ||
732 | |||
733 | # | ||
734 | # Hardware I/O ports | ||
735 | # | ||
736 | CONFIG_SERIO=y | ||
737 | CONFIG_SERIO_I8042=y | ||
738 | # CONFIG_SERIO_SERPORT is not set | ||
739 | # CONFIG_SERIO_PARKBD is not set | ||
740 | # CONFIG_SERIO_PCIPS2 is not set | ||
741 | CONFIG_SERIO_LIBPS2=y | ||
742 | # CONFIG_SERIO_RAW is not set | ||
743 | # CONFIG_GAMEPORT is not set | ||
744 | |||
745 | # | ||
746 | # Character devices | ||
747 | # | ||
748 | CONFIG_VT=y | ||
749 | CONFIG_VT_CONSOLE=y | ||
750 | CONFIG_HW_CONSOLE=y | ||
751 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
752 | |||
753 | # | ||
754 | # Serial drivers | ||
755 | # | ||
756 | CONFIG_SERIAL_8250=y | ||
757 | CONFIG_SERIAL_8250_CONSOLE=y | ||
758 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
759 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
760 | |||
761 | # | ||
762 | # Non-8250 serial port support | ||
763 | # | ||
764 | CONFIG_SERIAL_CORE=y | ||
765 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
766 | CONFIG_SERIAL_ICOM=m | ||
767 | # CONFIG_SERIAL_JSM is not set | ||
768 | CONFIG_UNIX98_PTYS=y | ||
769 | CONFIG_LEGACY_PTYS=y | ||
770 | CONFIG_LEGACY_PTY_COUNT=256 | ||
771 | # CONFIG_PRINTER is not set | ||
772 | # CONFIG_PPDEV is not set | ||
773 | # CONFIG_TIPAR is not set | ||
774 | CONFIG_HVC_CONSOLE=y | ||
775 | CONFIG_HVCS=m | ||
776 | |||
777 | # | ||
778 | # IPMI | ||
779 | # | ||
780 | # CONFIG_IPMI_HANDLER is not set | ||
781 | |||
782 | # | ||
783 | # Watchdog Cards | ||
784 | # | ||
785 | # CONFIG_WATCHDOG is not set | ||
786 | # CONFIG_RTC is not set | ||
787 | # CONFIG_DTLK is not set | ||
788 | # CONFIG_R3964 is not set | ||
789 | # CONFIG_APPLICOM is not set | ||
790 | |||
791 | # | ||
792 | # Ftape, the floppy tape device driver | ||
793 | # | ||
794 | # CONFIG_AGP is not set | ||
795 | # CONFIG_DRM is not set | ||
796 | CONFIG_RAW_DRIVER=y | ||
797 | CONFIG_MAX_RAW_DEVS=1024 | ||
798 | # CONFIG_HANGCHECK_TIMER is not set | ||
799 | |||
800 | # | ||
801 | # TPM devices | ||
802 | # | ||
803 | # CONFIG_TCG_TPM is not set | ||
804 | |||
805 | # | ||
806 | # I2C support | ||
807 | # | ||
808 | CONFIG_I2C=y | ||
809 | # CONFIG_I2C_CHARDEV is not set | ||
810 | |||
811 | # | ||
812 | # I2C Algorithms | ||
813 | # | ||
814 | CONFIG_I2C_ALGOBIT=y | ||
815 | # CONFIG_I2C_ALGOPCF is not set | ||
816 | # CONFIG_I2C_ALGOPCA is not set | ||
817 | |||
818 | # | ||
819 | # I2C Hardware Bus support | ||
820 | # | ||
821 | # CONFIG_I2C_ALI1535 is not set | ||
822 | # CONFIG_I2C_ALI1563 is not set | ||
823 | # CONFIG_I2C_ALI15X3 is not set | ||
824 | # CONFIG_I2C_AMD756 is not set | ||
825 | # CONFIG_I2C_AMD8111 is not set | ||
826 | # CONFIG_I2C_I801 is not set | ||
827 | # CONFIG_I2C_I810 is not set | ||
828 | # CONFIG_I2C_PIIX4 is not set | ||
829 | # CONFIG_I2C_NFORCE2 is not set | ||
830 | # CONFIG_I2C_PARPORT is not set | ||
831 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
832 | # CONFIG_I2C_PROSAVAGE is not set | ||
833 | # CONFIG_I2C_SAVAGE4 is not set | ||
834 | # CONFIG_SCx200_ACB is not set | ||
835 | # CONFIG_I2C_SIS5595 is not set | ||
836 | # CONFIG_I2C_SIS630 is not set | ||
837 | # CONFIG_I2C_SIS96X is not set | ||
838 | # CONFIG_I2C_STUB is not set | ||
839 | # CONFIG_I2C_VIA is not set | ||
840 | # CONFIG_I2C_VIAPRO is not set | ||
841 | # CONFIG_I2C_VOODOO3 is not set | ||
842 | # CONFIG_I2C_PCA_ISA is not set | ||
843 | |||
844 | # | ||
845 | # Miscellaneous I2C Chip support | ||
846 | # | ||
847 | # CONFIG_SENSORS_DS1337 is not set | ||
848 | # CONFIG_SENSORS_DS1374 is not set | ||
849 | # CONFIG_SENSORS_EEPROM is not set | ||
850 | # CONFIG_SENSORS_PCF8574 is not set | ||
851 | # CONFIG_SENSORS_PCA9539 is not set | ||
852 | # CONFIG_SENSORS_PCF8591 is not set | ||
853 | # CONFIG_SENSORS_RTC8564 is not set | ||
854 | # CONFIG_SENSORS_MAX6875 is not set | ||
855 | # CONFIG_I2C_DEBUG_CORE is not set | ||
856 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
857 | # CONFIG_I2C_DEBUG_BUS is not set | ||
858 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
859 | |||
860 | # | ||
861 | # Dallas's 1-wire bus | ||
862 | # | ||
863 | # CONFIG_W1 is not set | ||
864 | |||
865 | # | ||
866 | # Hardware Monitoring support | ||
867 | # | ||
868 | # CONFIG_HWMON is not set | ||
869 | # CONFIG_HWMON_VID is not set | ||
870 | |||
871 | # | ||
872 | # Misc devices | ||
873 | # | ||
874 | |||
875 | # | ||
876 | # Multimedia Capabilities Port drivers | ||
877 | # | ||
878 | |||
879 | # | ||
880 | # Multimedia devices | ||
881 | # | ||
882 | # CONFIG_VIDEO_DEV is not set | ||
883 | |||
884 | # | ||
885 | # Digital Video Broadcasting Devices | ||
886 | # | ||
887 | # CONFIG_DVB is not set | ||
888 | |||
889 | # | ||
890 | # Graphics support | ||
891 | # | ||
892 | CONFIG_FB=y | ||
893 | CONFIG_FB_CFB_FILLRECT=y | ||
894 | CONFIG_FB_CFB_COPYAREA=y | ||
895 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
896 | CONFIG_FB_SOFT_CURSOR=y | ||
897 | CONFIG_FB_MACMODES=y | ||
898 | CONFIG_FB_MODE_HELPERS=y | ||
899 | CONFIG_FB_TILEBLITTING=y | ||
900 | # CONFIG_FB_CIRRUS is not set | ||
901 | # CONFIG_FB_PM2 is not set | ||
902 | # CONFIG_FB_CYBER2000 is not set | ||
903 | CONFIG_FB_OF=y | ||
904 | # CONFIG_FB_CT65550 is not set | ||
905 | # CONFIG_FB_ASILIANT is not set | ||
906 | # CONFIG_FB_IMSTT is not set | ||
907 | # CONFIG_FB_VGA16 is not set | ||
908 | # CONFIG_FB_NVIDIA is not set | ||
909 | # CONFIG_FB_RIVA is not set | ||
910 | CONFIG_FB_MATROX=y | ||
911 | CONFIG_FB_MATROX_MILLENIUM=y | ||
912 | CONFIG_FB_MATROX_MYSTIQUE=y | ||
913 | CONFIG_FB_MATROX_G=y | ||
914 | # CONFIG_FB_MATROX_I2C is not set | ||
915 | CONFIG_FB_MATROX_MULTIHEAD=y | ||
916 | # CONFIG_FB_RADEON_OLD is not set | ||
917 | CONFIG_FB_RADEON=y | ||
918 | CONFIG_FB_RADEON_I2C=y | ||
919 | # CONFIG_FB_RADEON_DEBUG is not set | ||
920 | # CONFIG_FB_ATY128 is not set | ||
921 | # CONFIG_FB_ATY is not set | ||
922 | # CONFIG_FB_SAVAGE is not set | ||
923 | # CONFIG_FB_SIS is not set | ||
924 | # CONFIG_FB_NEOMAGIC is not set | ||
925 | # CONFIG_FB_KYRO is not set | ||
926 | # CONFIG_FB_3DFX is not set | ||
927 | # CONFIG_FB_VOODOO1 is not set | ||
928 | # CONFIG_FB_CYBLA is not set | ||
929 | # CONFIG_FB_TRIDENT is not set | ||
930 | # CONFIG_FB_S1D13XXX is not set | ||
931 | # CONFIG_FB_VIRTUAL is not set | ||
932 | |||
933 | # | ||
934 | # Console display driver support | ||
935 | # | ||
936 | # CONFIG_VGA_CONSOLE is not set | ||
937 | CONFIG_DUMMY_CONSOLE=y | ||
938 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
939 | # CONFIG_FONTS is not set | ||
940 | CONFIG_FONT_8x8=y | ||
941 | CONFIG_FONT_8x16=y | ||
942 | |||
943 | # | ||
944 | # Logo configuration | ||
945 | # | ||
946 | CONFIG_LOGO=y | ||
947 | CONFIG_LOGO_LINUX_MONO=y | ||
948 | CONFIG_LOGO_LINUX_VGA16=y | ||
949 | CONFIG_LOGO_LINUX_CLUT224=y | ||
950 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
951 | CONFIG_BACKLIGHT_CLASS_DEVICE=m | ||
952 | CONFIG_BACKLIGHT_DEVICE=y | ||
953 | CONFIG_LCD_CLASS_DEVICE=m | ||
954 | CONFIG_LCD_DEVICE=y | ||
955 | |||
956 | # | ||
957 | # Sound | ||
958 | # | ||
959 | # CONFIG_SOUND is not set | ||
960 | |||
961 | # | ||
962 | # USB support | ||
963 | # | ||
964 | CONFIG_USB_ARCH_HAS_HCD=y | ||
965 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
966 | CONFIG_USB=y | ||
967 | # CONFIG_USB_DEBUG is not set | ||
968 | |||
969 | # | ||
970 | # Miscellaneous USB options | ||
971 | # | ||
972 | CONFIG_USB_DEVICEFS=y | ||
973 | # CONFIG_USB_BANDWIDTH is not set | ||
974 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
975 | # CONFIG_USB_OTG is not set | ||
976 | |||
977 | # | ||
978 | # USB Host Controller Drivers | ||
979 | # | ||
980 | CONFIG_USB_EHCI_HCD=y | ||
981 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | ||
982 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | ||
983 | # CONFIG_USB_ISP116X_HCD is not set | ||
984 | CONFIG_USB_OHCI_HCD=y | ||
985 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
986 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
987 | # CONFIG_USB_UHCI_HCD is not set | ||
988 | # CONFIG_USB_SL811_HCD is not set | ||
989 | |||
990 | # | ||
991 | # USB Device Class drivers | ||
992 | # | ||
993 | # CONFIG_USB_BLUETOOTH_TTY is not set | ||
994 | # CONFIG_USB_ACM is not set | ||
995 | # CONFIG_USB_PRINTER is not set | ||
996 | |||
997 | # | ||
998 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
999 | # | ||
1000 | CONFIG_USB_STORAGE=y | ||
1001 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
1002 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
1003 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
1004 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
1005 | # CONFIG_USB_STORAGE_DPCM is not set | ||
1006 | # CONFIG_USB_STORAGE_USBAT is not set | ||
1007 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
1008 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
1009 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
1010 | |||
1011 | # | ||
1012 | # USB Input Devices | ||
1013 | # | ||
1014 | CONFIG_USB_HID=y | ||
1015 | CONFIG_USB_HIDINPUT=y | ||
1016 | # CONFIG_HID_FF is not set | ||
1017 | CONFIG_USB_HIDDEV=y | ||
1018 | # CONFIG_USB_AIPTEK is not set | ||
1019 | # CONFIG_USB_WACOM is not set | ||
1020 | # CONFIG_USB_ACECAD is not set | ||
1021 | # CONFIG_USB_KBTAB is not set | ||
1022 | # CONFIG_USB_POWERMATE is not set | ||
1023 | # CONFIG_USB_MTOUCH is not set | ||
1024 | # CONFIG_USB_ITMTOUCH is not set | ||
1025 | # CONFIG_USB_EGALAX is not set | ||
1026 | # CONFIG_USB_YEALINK is not set | ||
1027 | # CONFIG_USB_XPAD is not set | ||
1028 | # CONFIG_USB_ATI_REMOTE is not set | ||
1029 | # CONFIG_USB_KEYSPAN_REMOTE is not set | ||
1030 | # CONFIG_USB_APPLETOUCH is not set | ||
1031 | |||
1032 | # | ||
1033 | # USB Imaging devices | ||
1034 | # | ||
1035 | # CONFIG_USB_MDC800 is not set | ||
1036 | # CONFIG_USB_MICROTEK is not set | ||
1037 | |||
1038 | # | ||
1039 | # USB Multimedia devices | ||
1040 | # | ||
1041 | # CONFIG_USB_DABUSB is not set | ||
1042 | |||
1043 | # | ||
1044 | # Video4Linux support is needed for USB Multimedia device support | ||
1045 | # | ||
1046 | |||
1047 | # | ||
1048 | # USB Network Adapters | ||
1049 | # | ||
1050 | # CONFIG_USB_CATC is not set | ||
1051 | # CONFIG_USB_KAWETH is not set | ||
1052 | # CONFIG_USB_PEGASUS is not set | ||
1053 | # CONFIG_USB_RTL8150 is not set | ||
1054 | # CONFIG_USB_USBNET is not set | ||
1055 | CONFIG_USB_MON=y | ||
1056 | |||
1057 | # | ||
1058 | # USB port drivers | ||
1059 | # | ||
1060 | # CONFIG_USB_USS720 is not set | ||
1061 | |||
1062 | # | ||
1063 | # USB Serial Converter support | ||
1064 | # | ||
1065 | # CONFIG_USB_SERIAL is not set | ||
1066 | |||
1067 | # | ||
1068 | # USB Miscellaneous drivers | ||
1069 | # | ||
1070 | # CONFIG_USB_EMI62 is not set | ||
1071 | # CONFIG_USB_EMI26 is not set | ||
1072 | # CONFIG_USB_AUERSWALD is not set | ||
1073 | # CONFIG_USB_RIO500 is not set | ||
1074 | # CONFIG_USB_LEGOTOWER is not set | ||
1075 | # CONFIG_USB_LCD is not set | ||
1076 | # CONFIG_USB_LED is not set | ||
1077 | # CONFIG_USB_CYTHERM is not set | ||
1078 | # CONFIG_USB_PHIDGETKIT is not set | ||
1079 | # CONFIG_USB_PHIDGETSERVO is not set | ||
1080 | # CONFIG_USB_IDMOUSE is not set | ||
1081 | # CONFIG_USB_SISUSBVGA is not set | ||
1082 | # CONFIG_USB_LD is not set | ||
1083 | # CONFIG_USB_TEST is not set | ||
1084 | |||
1085 | # | ||
1086 | # USB DSL modem support | ||
1087 | # | ||
1088 | |||
1089 | # | ||
1090 | # USB Gadget Support | ||
1091 | # | ||
1092 | # CONFIG_USB_GADGET is not set | ||
1093 | |||
1094 | # | ||
1095 | # MMC/SD Card support | ||
1096 | # | ||
1097 | # CONFIG_MMC is not set | ||
1098 | |||
1099 | # | ||
1100 | # InfiniBand support | ||
1101 | # | ||
1102 | CONFIG_INFINIBAND=m | ||
1103 | # CONFIG_INFINIBAND_USER_MAD is not set | ||
1104 | # CONFIG_INFINIBAND_USER_ACCESS is not set | ||
1105 | CONFIG_INFINIBAND_MTHCA=m | ||
1106 | # CONFIG_INFINIBAND_MTHCA_DEBUG is not set | ||
1107 | CONFIG_INFINIBAND_IPOIB=m | ||
1108 | # CONFIG_INFINIBAND_IPOIB_DEBUG is not set | ||
1109 | |||
1110 | # | ||
1111 | # SN Devices | ||
1112 | # | ||
1113 | |||
1114 | # | ||
1115 | # File systems | ||
1116 | # | ||
1117 | CONFIG_EXT2_FS=y | ||
1118 | CONFIG_EXT2_FS_XATTR=y | ||
1119 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
1120 | CONFIG_EXT2_FS_SECURITY=y | ||
1121 | CONFIG_EXT2_FS_XIP=y | ||
1122 | CONFIG_FS_XIP=y | ||
1123 | CONFIG_EXT3_FS=y | ||
1124 | CONFIG_EXT3_FS_XATTR=y | ||
1125 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
1126 | CONFIG_EXT3_FS_SECURITY=y | ||
1127 | CONFIG_JBD=y | ||
1128 | # CONFIG_JBD_DEBUG is not set | ||
1129 | CONFIG_FS_MBCACHE=y | ||
1130 | CONFIG_REISERFS_FS=y | ||
1131 | # CONFIG_REISERFS_CHECK is not set | ||
1132 | # CONFIG_REISERFS_PROC_INFO is not set | ||
1133 | CONFIG_REISERFS_FS_XATTR=y | ||
1134 | CONFIG_REISERFS_FS_POSIX_ACL=y | ||
1135 | CONFIG_REISERFS_FS_SECURITY=y | ||
1136 | CONFIG_JFS_FS=m | ||
1137 | CONFIG_JFS_POSIX_ACL=y | ||
1138 | CONFIG_JFS_SECURITY=y | ||
1139 | # CONFIG_JFS_DEBUG is not set | ||
1140 | # CONFIG_JFS_STATISTICS is not set | ||
1141 | CONFIG_FS_POSIX_ACL=y | ||
1142 | CONFIG_XFS_FS=m | ||
1143 | CONFIG_XFS_EXPORT=y | ||
1144 | # CONFIG_XFS_QUOTA is not set | ||
1145 | CONFIG_XFS_SECURITY=y | ||
1146 | CONFIG_XFS_POSIX_ACL=y | ||
1147 | # CONFIG_XFS_RT is not set | ||
1148 | # CONFIG_MINIX_FS is not set | ||
1149 | # CONFIG_ROMFS_FS is not set | ||
1150 | CONFIG_INOTIFY=y | ||
1151 | # CONFIG_QUOTA is not set | ||
1152 | CONFIG_DNOTIFY=y | ||
1153 | CONFIG_AUTOFS_FS=m | ||
1154 | # CONFIG_AUTOFS4_FS is not set | ||
1155 | # CONFIG_FUSE_FS is not set | ||
1156 | |||
1157 | # | ||
1158 | # CD-ROM/DVD Filesystems | ||
1159 | # | ||
1160 | CONFIG_ISO9660_FS=y | ||
1161 | CONFIG_JOLIET=y | ||
1162 | CONFIG_ZISOFS=y | ||
1163 | CONFIG_ZISOFS_FS=y | ||
1164 | CONFIG_UDF_FS=m | ||
1165 | CONFIG_UDF_NLS=y | ||
1166 | |||
1167 | # | ||
1168 | # DOS/FAT/NT Filesystems | ||
1169 | # | ||
1170 | CONFIG_FAT_FS=y | ||
1171 | CONFIG_MSDOS_FS=y | ||
1172 | CONFIG_VFAT_FS=y | ||
1173 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1174 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
1175 | # CONFIG_NTFS_FS is not set | ||
1176 | |||
1177 | # | ||
1178 | # Pseudo filesystems | ||
1179 | # | ||
1180 | CONFIG_PROC_FS=y | ||
1181 | CONFIG_PROC_KCORE=y | ||
1182 | CONFIG_SYSFS=y | ||
1183 | CONFIG_TMPFS=y | ||
1184 | CONFIG_HUGETLBFS=y | ||
1185 | CONFIG_HUGETLB_PAGE=y | ||
1186 | CONFIG_RAMFS=y | ||
1187 | # CONFIG_RELAYFS_FS is not set | ||
1188 | |||
1189 | # | ||
1190 | # Miscellaneous filesystems | ||
1191 | # | ||
1192 | # CONFIG_ADFS_FS is not set | ||
1193 | # CONFIG_AFFS_FS is not set | ||
1194 | # CONFIG_HFS_FS is not set | ||
1195 | # CONFIG_HFSPLUS_FS is not set | ||
1196 | # CONFIG_BEFS_FS is not set | ||
1197 | # CONFIG_BFS_FS is not set | ||
1198 | # CONFIG_EFS_FS is not set | ||
1199 | CONFIG_CRAMFS=y | ||
1200 | # CONFIG_VXFS_FS is not set | ||
1201 | # CONFIG_HPFS_FS is not set | ||
1202 | # CONFIG_QNX4FS_FS is not set | ||
1203 | # CONFIG_SYSV_FS is not set | ||
1204 | # CONFIG_UFS_FS is not set | ||
1205 | |||
1206 | # | ||
1207 | # Network File Systems | ||
1208 | # | ||
1209 | CONFIG_NFS_FS=y | ||
1210 | CONFIG_NFS_V3=y | ||
1211 | CONFIG_NFS_V3_ACL=y | ||
1212 | CONFIG_NFS_V4=y | ||
1213 | # CONFIG_NFS_DIRECTIO is not set | ||
1214 | CONFIG_NFSD=y | ||
1215 | CONFIG_NFSD_V2_ACL=y | ||
1216 | CONFIG_NFSD_V3=y | ||
1217 | CONFIG_NFSD_V3_ACL=y | ||
1218 | CONFIG_NFSD_V4=y | ||
1219 | CONFIG_NFSD_TCP=y | ||
1220 | CONFIG_LOCKD=y | ||
1221 | CONFIG_LOCKD_V4=y | ||
1222 | CONFIG_EXPORTFS=y | ||
1223 | CONFIG_NFS_ACL_SUPPORT=y | ||
1224 | CONFIG_NFS_COMMON=y | ||
1225 | CONFIG_SUNRPC=y | ||
1226 | CONFIG_SUNRPC_GSS=y | ||
1227 | CONFIG_RPCSEC_GSS_KRB5=y | ||
1228 | CONFIG_RPCSEC_GSS_SPKM3=m | ||
1229 | # CONFIG_SMB_FS is not set | ||
1230 | CONFIG_CIFS=m | ||
1231 | # CONFIG_CIFS_STATS is not set | ||
1232 | CONFIG_CIFS_XATTR=y | ||
1233 | CONFIG_CIFS_POSIX=y | ||
1234 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
1235 | # CONFIG_NCP_FS is not set | ||
1236 | # CONFIG_CODA_FS is not set | ||
1237 | # CONFIG_AFS_FS is not set | ||
1238 | # CONFIG_9P_FS is not set | ||
1239 | |||
1240 | # | ||
1241 | # Partition Types | ||
1242 | # | ||
1243 | # CONFIG_PARTITION_ADVANCED is not set | ||
1244 | CONFIG_MSDOS_PARTITION=y | ||
1245 | |||
1246 | # | ||
1247 | # Native Language Support | ||
1248 | # | ||
1249 | CONFIG_NLS=y | ||
1250 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1251 | CONFIG_NLS_CODEPAGE_437=y | ||
1252 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1253 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1254 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1255 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1256 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1257 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1258 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1259 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1260 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1261 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1262 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1263 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1264 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1265 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1266 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1267 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1268 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1269 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1270 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1271 | # CONFIG_NLS_ISO8859_8 is not set | ||
1272 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1273 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1274 | CONFIG_NLS_ASCII=y | ||
1275 | CONFIG_NLS_ISO8859_1=y | ||
1276 | # CONFIG_NLS_ISO8859_2 is not set | ||
1277 | # CONFIG_NLS_ISO8859_3 is not set | ||
1278 | # CONFIG_NLS_ISO8859_4 is not set | ||
1279 | # CONFIG_NLS_ISO8859_5 is not set | ||
1280 | # CONFIG_NLS_ISO8859_6 is not set | ||
1281 | # CONFIG_NLS_ISO8859_7 is not set | ||
1282 | # CONFIG_NLS_ISO8859_9 is not set | ||
1283 | # CONFIG_NLS_ISO8859_13 is not set | ||
1284 | # CONFIG_NLS_ISO8859_14 is not set | ||
1285 | # CONFIG_NLS_ISO8859_15 is not set | ||
1286 | # CONFIG_NLS_KOI8_R is not set | ||
1287 | # CONFIG_NLS_KOI8_U is not set | ||
1288 | # CONFIG_NLS_UTF8 is not set | ||
1289 | |||
1290 | # | ||
1291 | # Profiling support | ||
1292 | # | ||
1293 | CONFIG_PROFILING=y | ||
1294 | CONFIG_OPROFILE=y | ||
1295 | |||
1296 | # | ||
1297 | # Kernel hacking | ||
1298 | # | ||
1299 | # CONFIG_PRINTK_TIME is not set | ||
1300 | CONFIG_DEBUG_KERNEL=y | ||
1301 | CONFIG_MAGIC_SYSRQ=y | ||
1302 | CONFIG_LOG_BUF_SHIFT=17 | ||
1303 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1304 | # CONFIG_SCHEDSTATS is not set | ||
1305 | # CONFIG_DEBUG_SLAB is not set | ||
1306 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1307 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1308 | # CONFIG_DEBUG_KOBJECT is not set | ||
1309 | # CONFIG_DEBUG_INFO is not set | ||
1310 | CONFIG_DEBUG_FS=y | ||
1311 | CONFIG_DEBUG_STACKOVERFLOW=y | ||
1312 | # CONFIG_KPROBES is not set | ||
1313 | CONFIG_DEBUG_STACK_USAGE=y | ||
1314 | CONFIG_DEBUGGER=y | ||
1315 | CONFIG_XMON=y | ||
1316 | CONFIG_XMON_DEFAULT=y | ||
1317 | # CONFIG_PPCDBG is not set | ||
1318 | CONFIG_IRQSTACKS=y | ||
1319 | |||
1320 | # | ||
1321 | # Security options | ||
1322 | # | ||
1323 | # CONFIG_KEYS is not set | ||
1324 | # CONFIG_SECURITY is not set | ||
1325 | |||
1326 | # | ||
1327 | # Cryptographic options | ||
1328 | # | ||
1329 | CONFIG_CRYPTO=y | ||
1330 | CONFIG_CRYPTO_HMAC=y | ||
1331 | CONFIG_CRYPTO_NULL=m | ||
1332 | CONFIG_CRYPTO_MD4=m | ||
1333 | CONFIG_CRYPTO_MD5=y | ||
1334 | CONFIG_CRYPTO_SHA1=m | ||
1335 | CONFIG_CRYPTO_SHA256=m | ||
1336 | CONFIG_CRYPTO_SHA512=m | ||
1337 | CONFIG_CRYPTO_WP512=m | ||
1338 | CONFIG_CRYPTO_TGR192=m | ||
1339 | CONFIG_CRYPTO_DES=y | ||
1340 | CONFIG_CRYPTO_BLOWFISH=m | ||
1341 | CONFIG_CRYPTO_TWOFISH=m | ||
1342 | CONFIG_CRYPTO_SERPENT=m | ||
1343 | CONFIG_CRYPTO_AES=m | ||
1344 | CONFIG_CRYPTO_CAST5=m | ||
1345 | CONFIG_CRYPTO_CAST6=m | ||
1346 | CONFIG_CRYPTO_TEA=m | ||
1347 | CONFIG_CRYPTO_ARC4=m | ||
1348 | CONFIG_CRYPTO_KHAZAD=m | ||
1349 | CONFIG_CRYPTO_ANUBIS=m | ||
1350 | CONFIG_CRYPTO_DEFLATE=m | ||
1351 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1352 | CONFIG_CRYPTO_CRC32C=m | ||
1353 | CONFIG_CRYPTO_TEST=m | ||
1354 | |||
1355 | # | ||
1356 | # Hardware crypto devices | ||
1357 | # | ||
1358 | |||
1359 | # | ||
1360 | # Library routines | ||
1361 | # | ||
1362 | CONFIG_CRC_CCITT=m | ||
1363 | # CONFIG_CRC16 is not set | ||
1364 | CONFIG_CRC32=y | ||
1365 | CONFIG_LIBCRC32C=m | ||
1366 | CONFIG_ZLIB_INFLATE=y | ||
1367 | CONFIG_ZLIB_DEFLATE=m | ||
1368 | CONFIG_TEXTSEARCH=y | ||
1369 | CONFIG_TEXTSEARCH_KMP=m | ||
1370 | CONFIG_TEXTSEARCH_BM=m | ||
1371 | CONFIG_TEXTSEARCH_FSM=m | ||
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 572d4f5eaacb..b3ae2993efb8 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -13,12 +13,15 @@ endif | |||
13 | obj-y := semaphore.o cputable.o ptrace.o syscalls.o \ | 13 | obj-y := semaphore.o cputable.o ptrace.o syscalls.o \ |
14 | signal_32.o pmc.o | 14 | signal_32.o pmc.o |
15 | obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ | 15 | obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ |
16 | ptrace32.o systbl.o | 16 | signal_64.o ptrace32.o systbl.o |
17 | obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o | 17 | obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o |
18 | obj-$(CONFIG_POWER4) += idle_power4.o | 18 | obj-$(CONFIG_POWER4) += idle_power4.o |
19 | obj-$(CONFIG_PPC_OF) += of_device.o | 19 | obj-$(CONFIG_PPC_OF) += of_device.o |
20 | obj-$(CONFIG_PPC_RTAS) += rtas.o | 20 | obj-$(CONFIG_PPC_RTAS) += rtas.o |
21 | obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o | ||
22 | obj-$(CONFIG_RTAS_PROC) += rtas-proc.o | ||
21 | obj-$(CONFIG_IBMVIO) += vio.o | 23 | obj-$(CONFIG_IBMVIO) += vio.o |
24 | obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o | ||
22 | 25 | ||
23 | ifeq ($(CONFIG_PPC_MERGE),y) | 26 | ifeq ($(CONFIG_PPC_MERGE),y) |
24 | 27 | ||
@@ -38,6 +41,7 @@ obj-$(CONFIG_PPC_OF) += prom_init.o | |||
38 | obj-$(CONFIG_MODULES) += ppc_ksyms.o | 41 | obj-$(CONFIG_MODULES) += ppc_ksyms.o |
39 | obj-$(CONFIG_BOOTX_TEXT) += btext.o | 42 | obj-$(CONFIG_BOOTX_TEXT) += btext.o |
40 | obj-$(CONFIG_6xx) += idle_6xx.o | 43 | obj-$(CONFIG_6xx) += idle_6xx.o |
44 | obj-$(CONFIG_SMP) += smp.o | ||
41 | 45 | ||
42 | ifeq ($(CONFIG_PPC_ISERIES),y) | 46 | ifeq ($(CONFIG_PPC_ISERIES),y) |
43 | $(obj)/head_64.o: $(obj)/lparmap.s | 47 | $(obj)/head_64.o: $(obj)/lparmap.s |
@@ -46,8 +50,9 @@ endif | |||
46 | 50 | ||
47 | else | 51 | else |
48 | # stuff used from here for ARCH=ppc or ARCH=ppc64 | 52 | # stuff used from here for ARCH=ppc or ARCH=ppc64 |
53 | smpobj-$(CONFIG_SMP) += smp.o | ||
49 | obj-$(CONFIG_PPC64) += traps.o process.o init_task.o time.o \ | 54 | obj-$(CONFIG_PPC64) += traps.o process.o init_task.o time.o \ |
50 | setup-common.o | 55 | setup-common.o $(smpobj-y) |
51 | 56 | ||
52 | 57 | ||
53 | endif | 58 | endif |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 330cd783206f..b75757251994 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #ifdef CONFIG_PPC64 | 40 | #ifdef CONFIG_PPC64 |
41 | #include <asm/paca.h> | 41 | #include <asm/paca.h> |
42 | #include <asm/lppaca.h> | 42 | #include <asm/lppaca.h> |
43 | #include <asm/iSeries/HvLpEvent.h> | 43 | #include <asm/iseries/hv_lp_event.h> |
44 | #include <asm/cache.h> | 44 | #include <asm/cache.h> |
45 | #include <asm/systemcfg.h> | 45 | #include <asm/systemcfg.h> |
46 | #include <asm/compat.h> | 46 | #include <asm/compat.h> |
@@ -125,6 +125,9 @@ int main(void) | |||
125 | DEFINE(PACASLBCACHE, offsetof(struct paca_struct, slb_cache)); | 125 | DEFINE(PACASLBCACHE, offsetof(struct paca_struct, slb_cache)); |
126 | DEFINE(PACASLBCACHEPTR, offsetof(struct paca_struct, slb_cache_ptr)); | 126 | DEFINE(PACASLBCACHEPTR, offsetof(struct paca_struct, slb_cache_ptr)); |
127 | DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id)); | 127 | DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id)); |
128 | #ifdef CONFIG_PPC_64K_PAGES | ||
129 | DEFINE(PACAPGDIR, offsetof(struct paca_struct, pgdir)); | ||
130 | #endif | ||
128 | #ifdef CONFIG_HUGETLB_PAGE | 131 | #ifdef CONFIG_HUGETLB_PAGE |
129 | DEFINE(PACALOWHTLBAREAS, offsetof(struct paca_struct, context.low_htlb_areas)); | 132 | DEFINE(PACALOWHTLBAREAS, offsetof(struct paca_struct, context.low_htlb_areas)); |
130 | DEFINE(PACAHIGHHTLBAREAS, offsetof(struct paca_struct, context.high_htlb_areas)); | 133 | DEFINE(PACAHIGHHTLBAREAS, offsetof(struct paca_struct, context.high_htlb_areas)); |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index b91345fa0805..cc4e9eb1c13f 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -240,7 +240,7 @@ struct cpu_spec cpu_specs[] = { | |||
240 | .oprofile_model = &op_model_power4, | 240 | .oprofile_model = &op_model_power4, |
241 | #endif | 241 | #endif |
242 | }, | 242 | }, |
243 | { /* Power5 */ | 243 | { /* Power5 GR */ |
244 | .pvr_mask = 0xffff0000, | 244 | .pvr_mask = 0xffff0000, |
245 | .pvr_value = 0x003a0000, | 245 | .pvr_value = 0x003a0000, |
246 | .cpu_name = "POWER5 (gr)", | 246 | .cpu_name = "POWER5 (gr)", |
@@ -255,7 +255,7 @@ struct cpu_spec cpu_specs[] = { | |||
255 | .oprofile_model = &op_model_power4, | 255 | .oprofile_model = &op_model_power4, |
256 | #endif | 256 | #endif |
257 | }, | 257 | }, |
258 | { /* Power5 */ | 258 | { /* Power5 GS */ |
259 | .pvr_mask = 0xffff0000, | 259 | .pvr_mask = 0xffff0000, |
260 | .pvr_value = 0x003b0000, | 260 | .pvr_value = 0x003b0000, |
261 | .cpu_name = "POWER5 (gs)", | 261 | .cpu_name = "POWER5 (gs)", |
@@ -929,6 +929,16 @@ struct cpu_spec cpu_specs[] = { | |||
929 | .icache_bsize = 32, | 929 | .icache_bsize = 32, |
930 | .dcache_bsize = 32, | 930 | .dcache_bsize = 32, |
931 | }, | 931 | }, |
932 | { /* 440SPe Rev. A */ | ||
933 | .pvr_mask = 0xff000fff, | ||
934 | .pvr_value = 0x53000890, | ||
935 | .cpu_name = "440SPe Rev. A", | ||
936 | .cpu_features = CPU_FTR_SPLIT_ID_CACHE | | ||
937 | CPU_FTR_USE_TB, | ||
938 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, | ||
939 | .icache_bsize = 32, | ||
940 | .dcache_bsize = 32, | ||
941 | }, | ||
932 | #endif /* CONFIG_44x */ | 942 | #endif /* CONFIG_44x */ |
933 | #ifdef CONFIG_FSL_BOOKE | 943 | #ifdef CONFIG_FSL_BOOKE |
934 | { /* e200z5 */ | 944 | { /* e200z5 */ |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 147215a0d6c0..16ab40daa738 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <asm/cputable.h> | 35 | #include <asm/cputable.h> |
36 | #include <asm/setup.h> | 36 | #include <asm/setup.h> |
37 | #include <asm/hvcall.h> | 37 | #include <asm/hvcall.h> |
38 | #include <asm/iSeries/LparMap.h> | 38 | #include <asm/iseries/lpar_map.h> |
39 | #include <asm/thread_info.h> | 39 | #include <asm/thread_info.h> |
40 | 40 | ||
41 | #ifdef CONFIG_PPC_ISERIES | 41 | #ifdef CONFIG_PPC_ISERIES |
@@ -195,11 +195,11 @@ exception_marker: | |||
195 | #define EX_R12 24 | 195 | #define EX_R12 24 |
196 | #define EX_R13 32 | 196 | #define EX_R13 32 |
197 | #define EX_SRR0 40 | 197 | #define EX_SRR0 40 |
198 | #define EX_R3 40 /* SLB miss saves R3, but not SRR0 */ | ||
199 | #define EX_DAR 48 | 198 | #define EX_DAR 48 |
200 | #define EX_LR 48 /* SLB miss saves LR, but not DAR */ | ||
201 | #define EX_DSISR 56 | 199 | #define EX_DSISR 56 |
202 | #define EX_CCR 60 | 200 | #define EX_CCR 60 |
201 | #define EX_R3 64 | ||
202 | #define EX_LR 72 | ||
203 | 203 | ||
204 | #define EXCEPTION_PROLOG_PSERIES(area, label) \ | 204 | #define EXCEPTION_PROLOG_PSERIES(area, label) \ |
205 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | 205 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ |
@@ -419,17 +419,22 @@ data_access_slb_pSeries: | |||
419 | mtspr SPRN_SPRG1,r13 | 419 | mtspr SPRN_SPRG1,r13 |
420 | RUNLATCH_ON(r13) | 420 | RUNLATCH_ON(r13) |
421 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | 421 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ |
422 | std r3,PACA_EXSLB+EX_R3(r13) | ||
423 | mfspr r3,SPRN_DAR | ||
422 | std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */ | 424 | std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */ |
425 | mfcr r9 | ||
426 | #ifdef __DISABLED__ | ||
427 | /* Keep that around for when we re-implement dynamic VSIDs */ | ||
428 | cmpdi r3,0 | ||
429 | bge slb_miss_user_pseries | ||
430 | #endif /* __DISABLED__ */ | ||
423 | std r10,PACA_EXSLB+EX_R10(r13) | 431 | std r10,PACA_EXSLB+EX_R10(r13) |
424 | std r11,PACA_EXSLB+EX_R11(r13) | 432 | std r11,PACA_EXSLB+EX_R11(r13) |
425 | std r12,PACA_EXSLB+EX_R12(r13) | 433 | std r12,PACA_EXSLB+EX_R12(r13) |
426 | std r3,PACA_EXSLB+EX_R3(r13) | 434 | mfspr r10,SPRN_SPRG1 |
427 | mfspr r9,SPRN_SPRG1 | 435 | std r10,PACA_EXSLB+EX_R13(r13) |
428 | std r9,PACA_EXSLB+EX_R13(r13) | ||
429 | mfcr r9 | ||
430 | mfspr r12,SPRN_SRR1 /* and SRR1 */ | 436 | mfspr r12,SPRN_SRR1 /* and SRR1 */ |
431 | mfspr r3,SPRN_DAR | 437 | b .slb_miss_realmode /* Rel. branch works in real mode */ |
432 | b .do_slb_miss /* Rel. branch works in real mode */ | ||
433 | 438 | ||
434 | STD_EXCEPTION_PSERIES(0x400, instruction_access) | 439 | STD_EXCEPTION_PSERIES(0x400, instruction_access) |
435 | 440 | ||
@@ -440,17 +445,22 @@ instruction_access_slb_pSeries: | |||
440 | mtspr SPRN_SPRG1,r13 | 445 | mtspr SPRN_SPRG1,r13 |
441 | RUNLATCH_ON(r13) | 446 | RUNLATCH_ON(r13) |
442 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ | 447 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ |
448 | std r3,PACA_EXSLB+EX_R3(r13) | ||
449 | mfspr r3,SPRN_SRR0 /* SRR0 is faulting address */ | ||
443 | std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */ | 450 | std r9,PACA_EXSLB+EX_R9(r13) /* save r9 - r12 */ |
451 | mfcr r9 | ||
452 | #ifdef __DISABLED__ | ||
453 | /* Keep that around for when we re-implement dynamic VSIDs */ | ||
454 | cmpdi r3,0 | ||
455 | bge slb_miss_user_pseries | ||
456 | #endif /* __DISABLED__ */ | ||
444 | std r10,PACA_EXSLB+EX_R10(r13) | 457 | std r10,PACA_EXSLB+EX_R10(r13) |
445 | std r11,PACA_EXSLB+EX_R11(r13) | 458 | std r11,PACA_EXSLB+EX_R11(r13) |
446 | std r12,PACA_EXSLB+EX_R12(r13) | 459 | std r12,PACA_EXSLB+EX_R12(r13) |
447 | std r3,PACA_EXSLB+EX_R3(r13) | 460 | mfspr r10,SPRN_SPRG1 |
448 | mfspr r9,SPRN_SPRG1 | 461 | std r10,PACA_EXSLB+EX_R13(r13) |
449 | std r9,PACA_EXSLB+EX_R13(r13) | ||
450 | mfcr r9 | ||
451 | mfspr r12,SPRN_SRR1 /* and SRR1 */ | 462 | mfspr r12,SPRN_SRR1 /* and SRR1 */ |
452 | mfspr r3,SPRN_SRR0 /* SRR0 is faulting address */ | 463 | b .slb_miss_realmode /* Rel. branch works in real mode */ |
453 | b .do_slb_miss /* Rel. branch works in real mode */ | ||
454 | 464 | ||
455 | STD_EXCEPTION_PSERIES(0x500, hardware_interrupt) | 465 | STD_EXCEPTION_PSERIES(0x500, hardware_interrupt) |
456 | STD_EXCEPTION_PSERIES(0x600, alignment) | 466 | STD_EXCEPTION_PSERIES(0x600, alignment) |
@@ -509,6 +519,38 @@ _GLOBAL(do_stab_bolted_pSeries) | |||
509 | EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted) | 519 | EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted) |
510 | 520 | ||
511 | /* | 521 | /* |
522 | * We have some room here we use that to put | ||
523 | * the peries slb miss user trampoline code so it's reasonably | ||
524 | * away from slb_miss_user_common to avoid problems with rfid | ||
525 | * | ||
526 | * This is used for when the SLB miss handler has to go virtual, | ||
527 | * which doesn't happen for now anymore but will once we re-implement | ||
528 | * dynamic VSIDs for shared page tables | ||
529 | */ | ||
530 | #ifdef __DISABLED__ | ||
531 | slb_miss_user_pseries: | ||
532 | std r10,PACA_EXGEN+EX_R10(r13) | ||
533 | std r11,PACA_EXGEN+EX_R11(r13) | ||
534 | std r12,PACA_EXGEN+EX_R12(r13) | ||
535 | mfspr r10,SPRG1 | ||
536 | ld r11,PACA_EXSLB+EX_R9(r13) | ||
537 | ld r12,PACA_EXSLB+EX_R3(r13) | ||
538 | std r10,PACA_EXGEN+EX_R13(r13) | ||
539 | std r11,PACA_EXGEN+EX_R9(r13) | ||
540 | std r12,PACA_EXGEN+EX_R3(r13) | ||
541 | clrrdi r12,r13,32 | ||
542 | mfmsr r10 | ||
543 | mfspr r11,SRR0 /* save SRR0 */ | ||
544 | ori r12,r12,slb_miss_user_common@l /* virt addr of handler */ | ||
545 | ori r10,r10,MSR_IR|MSR_DR|MSR_RI | ||
546 | mtspr SRR0,r12 | ||
547 | mfspr r12,SRR1 /* and SRR1 */ | ||
548 | mtspr SRR1,r10 | ||
549 | rfid | ||
550 | b . /* prevent spec. execution */ | ||
551 | #endif /* __DISABLED__ */ | ||
552 | |||
553 | /* | ||
512 | * Vectors for the FWNMI option. Share common code. | 554 | * Vectors for the FWNMI option. Share common code. |
513 | */ | 555 | */ |
514 | .globl system_reset_fwnmi | 556 | .globl system_reset_fwnmi |
@@ -559,22 +601,59 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | |||
559 | .globl data_access_slb_iSeries | 601 | .globl data_access_slb_iSeries |
560 | data_access_slb_iSeries: | 602 | data_access_slb_iSeries: |
561 | mtspr SPRN_SPRG1,r13 /* save r13 */ | 603 | mtspr SPRN_SPRG1,r13 /* save r13 */ |
562 | EXCEPTION_PROLOG_ISERIES_1(PACA_EXSLB) | 604 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ |
563 | std r3,PACA_EXSLB+EX_R3(r13) | 605 | std r3,PACA_EXSLB+EX_R3(r13) |
564 | ld r12,PACALPPACA+LPPACASRR1(r13) | ||
565 | mfspr r3,SPRN_DAR | 606 | mfspr r3,SPRN_DAR |
566 | b .do_slb_miss | 607 | std r9,PACA_EXSLB+EX_R9(r13) |
608 | mfcr r9 | ||
609 | #ifdef __DISABLED__ | ||
610 | cmpdi r3,0 | ||
611 | bge slb_miss_user_iseries | ||
612 | #endif | ||
613 | std r10,PACA_EXSLB+EX_R10(r13) | ||
614 | std r11,PACA_EXSLB+EX_R11(r13) | ||
615 | std r12,PACA_EXSLB+EX_R12(r13) | ||
616 | mfspr r10,SPRN_SPRG1 | ||
617 | std r10,PACA_EXSLB+EX_R13(r13) | ||
618 | ld r12,PACALPPACA+LPPACASRR1(r13); | ||
619 | b .slb_miss_realmode | ||
567 | 620 | ||
568 | STD_EXCEPTION_ISERIES(0x400, instruction_access, PACA_EXGEN) | 621 | STD_EXCEPTION_ISERIES(0x400, instruction_access, PACA_EXGEN) |
569 | 622 | ||
570 | .globl instruction_access_slb_iSeries | 623 | .globl instruction_access_slb_iSeries |
571 | instruction_access_slb_iSeries: | 624 | instruction_access_slb_iSeries: |
572 | mtspr SPRN_SPRG1,r13 /* save r13 */ | 625 | mtspr SPRN_SPRG1,r13 /* save r13 */ |
573 | EXCEPTION_PROLOG_ISERIES_1(PACA_EXSLB) | 626 | mfspr r13,SPRN_SPRG3 /* get paca address into r13 */ |
574 | std r3,PACA_EXSLB+EX_R3(r13) | 627 | std r3,PACA_EXSLB+EX_R3(r13) |
575 | ld r12,PACALPPACA+LPPACASRR1(r13) | 628 | ld r3,PACALPPACA+LPPACASRR0(r13) /* get SRR0 value */ |
576 | ld r3,PACALPPACA+LPPACASRR0(r13) | 629 | std r9,PACA_EXSLB+EX_R9(r13) |
577 | b .do_slb_miss | 630 | mfcr r9 |
631 | #ifdef __DISABLED__ | ||
632 | cmpdi r3,0 | ||
633 | bge .slb_miss_user_iseries | ||
634 | #endif | ||
635 | std r10,PACA_EXSLB+EX_R10(r13) | ||
636 | std r11,PACA_EXSLB+EX_R11(r13) | ||
637 | std r12,PACA_EXSLB+EX_R12(r13) | ||
638 | mfspr r10,SPRN_SPRG1 | ||
639 | std r10,PACA_EXSLB+EX_R13(r13) | ||
640 | ld r12,PACALPPACA+LPPACASRR1(r13); | ||
641 | b .slb_miss_realmode | ||
642 | |||
643 | #ifdef __DISABLED__ | ||
644 | slb_miss_user_iseries: | ||
645 | std r10,PACA_EXGEN+EX_R10(r13) | ||
646 | std r11,PACA_EXGEN+EX_R11(r13) | ||
647 | std r12,PACA_EXGEN+EX_R12(r13) | ||
648 | mfspr r10,SPRG1 | ||
649 | ld r11,PACA_EXSLB+EX_R9(r13) | ||
650 | ld r12,PACA_EXSLB+EX_R3(r13) | ||
651 | std r10,PACA_EXGEN+EX_R13(r13) | ||
652 | std r11,PACA_EXGEN+EX_R9(r13) | ||
653 | std r12,PACA_EXGEN+EX_R3(r13) | ||
654 | EXCEPTION_PROLOG_ISERIES_2 | ||
655 | b slb_miss_user_common | ||
656 | #endif | ||
578 | 657 | ||
579 | MASKABLE_EXCEPTION_ISERIES(0x500, hardware_interrupt) | 658 | MASKABLE_EXCEPTION_ISERIES(0x500, hardware_interrupt) |
580 | STD_EXCEPTION_ISERIES(0x600, alignment, PACA_EXGEN) | 659 | STD_EXCEPTION_ISERIES(0x600, alignment, PACA_EXGEN) |
@@ -809,6 +888,126 @@ instruction_access_common: | |||
809 | li r5,0x400 | 888 | li r5,0x400 |
810 | b .do_hash_page /* Try to handle as hpte fault */ | 889 | b .do_hash_page /* Try to handle as hpte fault */ |
811 | 890 | ||
891 | /* | ||
892 | * Here is the common SLB miss user that is used when going to virtual | ||
893 | * mode for SLB misses, that is currently not used | ||
894 | */ | ||
895 | #ifdef __DISABLED__ | ||
896 | .align 7 | ||
897 | .globl slb_miss_user_common | ||
898 | slb_miss_user_common: | ||
899 | mflr r10 | ||
900 | std r3,PACA_EXGEN+EX_DAR(r13) | ||
901 | stw r9,PACA_EXGEN+EX_CCR(r13) | ||
902 | std r10,PACA_EXGEN+EX_LR(r13) | ||
903 | std r11,PACA_EXGEN+EX_SRR0(r13) | ||
904 | bl .slb_allocate_user | ||
905 | |||
906 | ld r10,PACA_EXGEN+EX_LR(r13) | ||
907 | ld r3,PACA_EXGEN+EX_R3(r13) | ||
908 | lwz r9,PACA_EXGEN+EX_CCR(r13) | ||
909 | ld r11,PACA_EXGEN+EX_SRR0(r13) | ||
910 | mtlr r10 | ||
911 | beq- slb_miss_fault | ||
912 | |||
913 | andi. r10,r12,MSR_RI /* check for unrecoverable exception */ | ||
914 | beq- unrecov_user_slb | ||
915 | mfmsr r10 | ||
916 | |||
917 | .machine push | ||
918 | .machine "power4" | ||
919 | mtcrf 0x80,r9 | ||
920 | .machine pop | ||
921 | |||
922 | clrrdi r10,r10,2 /* clear RI before setting SRR0/1 */ | ||
923 | mtmsrd r10,1 | ||
924 | |||
925 | mtspr SRR0,r11 | ||
926 | mtspr SRR1,r12 | ||
927 | |||
928 | ld r9,PACA_EXGEN+EX_R9(r13) | ||
929 | ld r10,PACA_EXGEN+EX_R10(r13) | ||
930 | ld r11,PACA_EXGEN+EX_R11(r13) | ||
931 | ld r12,PACA_EXGEN+EX_R12(r13) | ||
932 | ld r13,PACA_EXGEN+EX_R13(r13) | ||
933 | rfid | ||
934 | b . | ||
935 | |||
936 | slb_miss_fault: | ||
937 | EXCEPTION_PROLOG_COMMON(0x380, PACA_EXGEN) | ||
938 | ld r4,PACA_EXGEN+EX_DAR(r13) | ||
939 | li r5,0 | ||
940 | std r4,_DAR(r1) | ||
941 | std r5,_DSISR(r1) | ||
942 | b .handle_page_fault | ||
943 | |||
944 | unrecov_user_slb: | ||
945 | EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN) | ||
946 | DISABLE_INTS | ||
947 | bl .save_nvgprs | ||
948 | 1: addi r3,r1,STACK_FRAME_OVERHEAD | ||
949 | bl .unrecoverable_exception | ||
950 | b 1b | ||
951 | |||
952 | #endif /* __DISABLED__ */ | ||
953 | |||
954 | |||
955 | /* | ||
956 | * r13 points to the PACA, r9 contains the saved CR, | ||
957 | * r12 contain the saved SRR1, SRR0 is still ready for return | ||
958 | * r3 has the faulting address | ||
959 | * r9 - r13 are saved in paca->exslb. | ||
960 | * r3 is saved in paca->slb_r3 | ||
961 | * We assume we aren't going to take any exceptions during this procedure. | ||
962 | */ | ||
963 | _GLOBAL(slb_miss_realmode) | ||
964 | mflr r10 | ||
965 | |||
966 | stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */ | ||
967 | std r10,PACA_EXSLB+EX_LR(r13) /* save LR */ | ||
968 | |||
969 | bl .slb_allocate_realmode | ||
970 | |||
971 | /* All done -- return from exception. */ | ||
972 | |||
973 | ld r10,PACA_EXSLB+EX_LR(r13) | ||
974 | ld r3,PACA_EXSLB+EX_R3(r13) | ||
975 | lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */ | ||
976 | #ifdef CONFIG_PPC_ISERIES | ||
977 | ld r11,PACALPPACA+LPPACASRR0(r13) /* get SRR0 value */ | ||
978 | #endif /* CONFIG_PPC_ISERIES */ | ||
979 | |||
980 | mtlr r10 | ||
981 | |||
982 | andi. r10,r12,MSR_RI /* check for unrecoverable exception */ | ||
983 | beq- unrecov_slb | ||
984 | |||
985 | .machine push | ||
986 | .machine "power4" | ||
987 | mtcrf 0x80,r9 | ||
988 | mtcrf 0x01,r9 /* slb_allocate uses cr0 and cr7 */ | ||
989 | .machine pop | ||
990 | |||
991 | #ifdef CONFIG_PPC_ISERIES | ||
992 | mtspr SPRN_SRR0,r11 | ||
993 | mtspr SPRN_SRR1,r12 | ||
994 | #endif /* CONFIG_PPC_ISERIES */ | ||
995 | ld r9,PACA_EXSLB+EX_R9(r13) | ||
996 | ld r10,PACA_EXSLB+EX_R10(r13) | ||
997 | ld r11,PACA_EXSLB+EX_R11(r13) | ||
998 | ld r12,PACA_EXSLB+EX_R12(r13) | ||
999 | ld r13,PACA_EXSLB+EX_R13(r13) | ||
1000 | rfid | ||
1001 | b . /* prevent speculative execution */ | ||
1002 | |||
1003 | unrecov_slb: | ||
1004 | EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB) | ||
1005 | DISABLE_INTS | ||
1006 | bl .save_nvgprs | ||
1007 | 1: addi r3,r1,STACK_FRAME_OVERHEAD | ||
1008 | bl .unrecoverable_exception | ||
1009 | b 1b | ||
1010 | |||
812 | .align 7 | 1011 | .align 7 |
813 | .globl hardware_interrupt_common | 1012 | .globl hardware_interrupt_common |
814 | .globl hardware_interrupt_entry | 1013 | .globl hardware_interrupt_entry |
@@ -1139,62 +1338,6 @@ _GLOBAL(do_stab_bolted) | |||
1139 | b . /* prevent speculative execution */ | 1338 | b . /* prevent speculative execution */ |
1140 | 1339 | ||
1141 | /* | 1340 | /* |
1142 | * r13 points to the PACA, r9 contains the saved CR, | ||
1143 | * r11 and r12 contain the saved SRR0 and SRR1. | ||
1144 | * r3 has the faulting address | ||
1145 | * r9 - r13 are saved in paca->exslb. | ||
1146 | * r3 is saved in paca->slb_r3 | ||
1147 | * We assume we aren't going to take any exceptions during this procedure. | ||
1148 | */ | ||
1149 | _GLOBAL(do_slb_miss) | ||
1150 | mflr r10 | ||
1151 | |||
1152 | stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */ | ||
1153 | std r10,PACA_EXSLB+EX_LR(r13) /* save LR */ | ||
1154 | |||
1155 | bl .slb_allocate /* handle it */ | ||
1156 | |||
1157 | /* All done -- return from exception. */ | ||
1158 | |||
1159 | ld r10,PACA_EXSLB+EX_LR(r13) | ||
1160 | ld r3,PACA_EXSLB+EX_R3(r13) | ||
1161 | lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */ | ||
1162 | #ifdef CONFIG_PPC_ISERIES | ||
1163 | ld r11,PACALPPACA+LPPACASRR0(r13) /* get SRR0 value */ | ||
1164 | #endif /* CONFIG_PPC_ISERIES */ | ||
1165 | |||
1166 | mtlr r10 | ||
1167 | |||
1168 | andi. r10,r12,MSR_RI /* check for unrecoverable exception */ | ||
1169 | beq- unrecov_slb | ||
1170 | |||
1171 | .machine push | ||
1172 | .machine "power4" | ||
1173 | mtcrf 0x80,r9 | ||
1174 | mtcrf 0x01,r9 /* slb_allocate uses cr0 and cr7 */ | ||
1175 | .machine pop | ||
1176 | |||
1177 | #ifdef CONFIG_PPC_ISERIES | ||
1178 | mtspr SPRN_SRR0,r11 | ||
1179 | mtspr SPRN_SRR1,r12 | ||
1180 | #endif /* CONFIG_PPC_ISERIES */ | ||
1181 | ld r9,PACA_EXSLB+EX_R9(r13) | ||
1182 | ld r10,PACA_EXSLB+EX_R10(r13) | ||
1183 | ld r11,PACA_EXSLB+EX_R11(r13) | ||
1184 | ld r12,PACA_EXSLB+EX_R12(r13) | ||
1185 | ld r13,PACA_EXSLB+EX_R13(r13) | ||
1186 | rfid | ||
1187 | b . /* prevent speculative execution */ | ||
1188 | |||
1189 | unrecov_slb: | ||
1190 | EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB) | ||
1191 | DISABLE_INTS | ||
1192 | bl .save_nvgprs | ||
1193 | 1: addi r3,r1,STACK_FRAME_OVERHEAD | ||
1194 | bl .unrecoverable_exception | ||
1195 | b 1b | ||
1196 | |||
1197 | /* | ||
1198 | * Space for CPU0's segment table. | 1341 | * Space for CPU0's segment table. |
1199 | * | 1342 | * |
1200 | * On iSeries, the hypervisor must fill in at least one entry before | 1343 | * On iSeries, the hypervisor must fill in at least one entry before |
@@ -1569,7 +1712,10 @@ _GLOBAL(__secondary_start) | |||
1569 | #endif | 1712 | #endif |
1570 | /* Initialize the first segment table (or SLB) entry */ | 1713 | /* Initialize the first segment table (or SLB) entry */ |
1571 | ld r3,PACASTABVIRT(r13) /* get addr of segment table */ | 1714 | ld r3,PACASTABVIRT(r13) /* get addr of segment table */ |
1715 | BEGIN_FTR_SECTION | ||
1572 | bl .stab_initialize | 1716 | bl .stab_initialize |
1717 | END_FTR_SECTION_IFCLR(CPU_FTR_SLB) | ||
1718 | bl .slb_initialize | ||
1573 | 1719 | ||
1574 | /* Initialize the kernel stack. Just a repeat for iSeries. */ | 1720 | /* Initialize the kernel stack. Just a repeat for iSeries. */ |
1575 | LOADADDR(r3,current_set) | 1721 | LOADADDR(r3,current_set) |
@@ -1914,24 +2060,6 @@ _GLOBAL(hmt_start_secondary) | |||
1914 | blr | 2060 | blr |
1915 | #endif | 2061 | #endif |
1916 | 2062 | ||
1917 | #if defined(CONFIG_KEXEC) || defined(CONFIG_SMP) | ||
1918 | _GLOBAL(smp_release_cpus) | ||
1919 | /* All secondary cpus are spinning on a common | ||
1920 | * spinloop, release them all now so they can start | ||
1921 | * to spin on their individual paca spinloops. | ||
1922 | * For non SMP kernels, the secondary cpus never | ||
1923 | * get out of the common spinloop. | ||
1924 | * XXX This does nothing useful on iSeries, secondaries are | ||
1925 | * already waiting on their paca. | ||
1926 | */ | ||
1927 | li r3,1 | ||
1928 | LOADADDR(r5,__secondary_hold_spinloop) | ||
1929 | std r3,0(r5) | ||
1930 | sync | ||
1931 | blr | ||
1932 | #endif /* CONFIG_SMP */ | ||
1933 | |||
1934 | |||
1935 | /* | 2063 | /* |
1936 | * We put a few things here that have to be page-aligned. | 2064 | * We put a few things here that have to be page-aligned. |
1937 | * This stuff goes at the beginning of the bss, which is page-aligned. | 2065 | * This stuff goes at the beginning of the bss, which is page-aligned. |
diff --git a/arch/powerpc/kernel/lparmap.c b/arch/powerpc/kernel/lparmap.c index b81de286df5e..5a05a797485f 100644 --- a/arch/powerpc/kernel/lparmap.c +++ b/arch/powerpc/kernel/lparmap.c | |||
@@ -8,7 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | #include <asm/mmu.h> | 9 | #include <asm/mmu.h> |
10 | #include <asm/page.h> | 10 | #include <asm/page.h> |
11 | #include <asm/iSeries/LparMap.h> | 11 | #include <asm/iseries/lpar_map.h> |
12 | 12 | ||
13 | const struct LparMap __attribute__((__section__(".text"))) xLparMap = { | 13 | const struct LparMap __attribute__((__section__(".text"))) xLparMap = { |
14 | .xNumberEsids = HvEsidsToMap, | 14 | .xNumberEsids = HvEsidsToMap, |
@@ -25,7 +25,7 @@ const struct LparMap __attribute__((__section__(".text"))) xLparMap = { | |||
25 | .xRanges = { | 25 | .xRanges = { |
26 | { .xPages = HvPagesToMap, | 26 | { .xPages = HvPagesToMap, |
27 | .xOffset = 0, | 27 | .xOffset = 0, |
28 | .xVPN = KERNEL_VSID(KERNELBASE) << (SID_SHIFT - PAGE_SHIFT), | 28 | .xVPN = KERNEL_VSID(KERNELBASE) << (SID_SHIFT - HW_PAGE_SHIFT), |
29 | }, | 29 | }, |
30 | }, | 30 | }, |
31 | }; | 31 | }; |
diff --git a/arch/powerpc/kernel/ppc32.h b/arch/powerpc/kernel/ppc32.h new file mode 100644 index 000000000000..90e562771791 --- /dev/null +++ b/arch/powerpc/kernel/ppc32.h | |||
@@ -0,0 +1,138 @@ | |||
1 | #ifndef _PPC64_PPC32_H | ||
2 | #define _PPC64_PPC32_H | ||
3 | |||
4 | #include <linux/compat.h> | ||
5 | #include <asm/siginfo.h> | ||
6 | #include <asm/signal.h> | ||
7 | |||
8 | /* | ||
9 | * Data types and macros for providing 32b PowerPC support. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version | ||
14 | * 2 of the License, or (at your option) any later version. | ||
15 | */ | ||
16 | |||
17 | /* These are here to support 32-bit syscalls on a 64-bit kernel. */ | ||
18 | |||
19 | typedef struct compat_siginfo { | ||
20 | int si_signo; | ||
21 | int si_errno; | ||
22 | int si_code; | ||
23 | |||
24 | union { | ||
25 | int _pad[SI_PAD_SIZE32]; | ||
26 | |||
27 | /* kill() */ | ||
28 | struct { | ||
29 | compat_pid_t _pid; /* sender's pid */ | ||
30 | compat_uid_t _uid; /* sender's uid */ | ||
31 | } _kill; | ||
32 | |||
33 | /* POSIX.1b timers */ | ||
34 | struct { | ||
35 | compat_timer_t _tid; /* timer id */ | ||
36 | int _overrun; /* overrun count */ | ||
37 | compat_sigval_t _sigval; /* same as below */ | ||
38 | int _sys_private; /* not to be passed to user */ | ||
39 | } _timer; | ||
40 | |||
41 | /* POSIX.1b signals */ | ||
42 | struct { | ||
43 | compat_pid_t _pid; /* sender's pid */ | ||
44 | compat_uid_t _uid; /* sender's uid */ | ||
45 | compat_sigval_t _sigval; | ||
46 | } _rt; | ||
47 | |||
48 | /* SIGCHLD */ | ||
49 | struct { | ||
50 | compat_pid_t _pid; /* which child */ | ||
51 | compat_uid_t _uid; /* sender's uid */ | ||
52 | int _status; /* exit code */ | ||
53 | compat_clock_t _utime; | ||
54 | compat_clock_t _stime; | ||
55 | } _sigchld; | ||
56 | |||
57 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */ | ||
58 | struct { | ||
59 | unsigned int _addr; /* faulting insn/memory ref. */ | ||
60 | } _sigfault; | ||
61 | |||
62 | /* SIGPOLL */ | ||
63 | struct { | ||
64 | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | ||
65 | int _fd; | ||
66 | } _sigpoll; | ||
67 | } _sifields; | ||
68 | } compat_siginfo_t; | ||
69 | |||
70 | #define __old_sigaction32 old_sigaction32 | ||
71 | |||
72 | struct __old_sigaction32 { | ||
73 | compat_uptr_t sa_handler; | ||
74 | compat_old_sigset_t sa_mask; | ||
75 | unsigned int sa_flags; | ||
76 | compat_uptr_t sa_restorer; /* not used by Linux/SPARC yet */ | ||
77 | }; | ||
78 | |||
79 | |||
80 | |||
81 | struct sigaction32 { | ||
82 | compat_uptr_t sa_handler; /* Really a pointer, but need to deal with 32 bits */ | ||
83 | unsigned int sa_flags; | ||
84 | compat_uptr_t sa_restorer; /* Another 32 bit pointer */ | ||
85 | compat_sigset_t sa_mask; /* A 32 bit mask */ | ||
86 | }; | ||
87 | |||
88 | typedef struct sigaltstack_32 { | ||
89 | unsigned int ss_sp; | ||
90 | int ss_flags; | ||
91 | compat_size_t ss_size; | ||
92 | } stack_32_t; | ||
93 | |||
94 | struct pt_regs32 { | ||
95 | unsigned int gpr[32]; | ||
96 | unsigned int nip; | ||
97 | unsigned int msr; | ||
98 | unsigned int orig_gpr3; /* Used for restarting system calls */ | ||
99 | unsigned int ctr; | ||
100 | unsigned int link; | ||
101 | unsigned int xer; | ||
102 | unsigned int ccr; | ||
103 | unsigned int mq; /* 601 only (not used at present) */ | ||
104 | unsigned int trap; /* Reason for being here */ | ||
105 | unsigned int dar; /* Fault registers */ | ||
106 | unsigned int dsisr; | ||
107 | unsigned int result; /* Result of a system call */ | ||
108 | }; | ||
109 | |||
110 | struct sigcontext32 { | ||
111 | unsigned int _unused[4]; | ||
112 | int signal; | ||
113 | compat_uptr_t handler; | ||
114 | unsigned int oldmask; | ||
115 | compat_uptr_t regs; /* 4 byte pointer to the pt_regs32 structure. */ | ||
116 | }; | ||
117 | |||
118 | struct mcontext32 { | ||
119 | elf_gregset_t32 mc_gregs; | ||
120 | elf_fpregset_t mc_fregs; | ||
121 | unsigned int mc_pad[2]; | ||
122 | elf_vrregset_t32 mc_vregs __attribute__((__aligned__(16))); | ||
123 | }; | ||
124 | |||
125 | struct ucontext32 { | ||
126 | unsigned int uc_flags; | ||
127 | unsigned int uc_link; | ||
128 | stack_32_t uc_stack; | ||
129 | int uc_pad[7]; | ||
130 | compat_uptr_t uc_regs; /* points to uc_mcontext field */ | ||
131 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ | ||
132 | /* glibc has 1024-bit signal masks, ours are 64-bit */ | ||
133 | int uc_maskext[30]; | ||
134 | int uc_pad2[3]; | ||
135 | struct mcontext32 uc_mcontext; | ||
136 | }; | ||
137 | |||
138 | #endif /* _PPC64_PPC32_H */ | ||
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 8bc540337ba0..47d6f7e2ea9f 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -81,15 +81,6 @@ EXPORT_SYMBOL(_prep_type); | |||
81 | EXPORT_SYMBOL(ucSystemType); | 81 | EXPORT_SYMBOL(ucSystemType); |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | #if !defined(__INLINE_BITOPS) | ||
85 | EXPORT_SYMBOL(set_bit); | ||
86 | EXPORT_SYMBOL(clear_bit); | ||
87 | EXPORT_SYMBOL(change_bit); | ||
88 | EXPORT_SYMBOL(test_and_set_bit); | ||
89 | EXPORT_SYMBOL(test_and_clear_bit); | ||
90 | EXPORT_SYMBOL(test_and_change_bit); | ||
91 | #endif /* __INLINE_BITOPS */ | ||
92 | |||
93 | EXPORT_SYMBOL(strcpy); | 84 | EXPORT_SYMBOL(strcpy); |
94 | EXPORT_SYMBOL(strncpy); | 85 | EXPORT_SYMBOL(strncpy); |
95 | EXPORT_SYMBOL(strcat); | 86 | EXPORT_SYMBOL(strcat); |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 8f85dabe4df3..7f64f0464d44 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -48,8 +48,8 @@ | |||
48 | #include <asm/prom.h> | 48 | #include <asm/prom.h> |
49 | #ifdef CONFIG_PPC64 | 49 | #ifdef CONFIG_PPC64 |
50 | #include <asm/firmware.h> | 50 | #include <asm/firmware.h> |
51 | #include <asm/plpar_wrappers.h> | ||
52 | #include <asm/time.h> | 51 | #include <asm/time.h> |
52 | #include <asm/machdep.h> | ||
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | extern unsigned long _get_SP(void); | 55 | extern unsigned long _get_SP(void); |
@@ -201,27 +201,15 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs) | |||
201 | } | 201 | } |
202 | #endif /* CONFIG_SPE */ | 202 | #endif /* CONFIG_SPE */ |
203 | 203 | ||
204 | static void set_dabr_spr(unsigned long val) | ||
205 | { | ||
206 | mtspr(SPRN_DABR, val); | ||
207 | } | ||
208 | |||
209 | int set_dabr(unsigned long dabr) | 204 | int set_dabr(unsigned long dabr) |
210 | { | 205 | { |
211 | int ret = 0; | ||
212 | |||
213 | #ifdef CONFIG_PPC64 | 206 | #ifdef CONFIG_PPC64 |
214 | if (firmware_has_feature(FW_FEATURE_XDABR)) { | 207 | if (ppc_md.set_dabr) |
215 | /* We want to catch accesses from kernel and userspace */ | 208 | return ppc_md.set_dabr(dabr); |
216 | unsigned long flags = H_DABRX_KERNEL|H_DABRX_USER; | ||
217 | ret = plpar_set_xdabr(dabr, flags); | ||
218 | } else if (firmware_has_feature(FW_FEATURE_DABR)) { | ||
219 | ret = plpar_set_dabr(dabr); | ||
220 | } else | ||
221 | #endif | 209 | #endif |
222 | set_dabr_spr(dabr); | ||
223 | 210 | ||
224 | return ret; | 211 | mtspr(SPRN_DABR, dabr); |
212 | return 0; | ||
225 | } | 213 | } |
226 | 214 | ||
227 | #ifdef CONFIG_PPC64 | 215 | #ifdef CONFIG_PPC64 |
@@ -566,12 +554,10 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
566 | #ifdef CONFIG_PPC64 | 554 | #ifdef CONFIG_PPC64 |
567 | if (cpu_has_feature(CPU_FTR_SLB)) { | 555 | if (cpu_has_feature(CPU_FTR_SLB)) { |
568 | unsigned long sp_vsid = get_kernel_vsid(sp); | 556 | unsigned long sp_vsid = get_kernel_vsid(sp); |
557 | unsigned long llp = mmu_psize_defs[mmu_linear_psize].sllp; | ||
569 | 558 | ||
570 | sp_vsid <<= SLB_VSID_SHIFT; | 559 | sp_vsid <<= SLB_VSID_SHIFT; |
571 | sp_vsid |= SLB_VSID_KERNEL; | 560 | sp_vsid |= SLB_VSID_KERNEL | llp; |
572 | if (cpu_has_feature(CPU_FTR_16M_PAGE)) | ||
573 | sp_vsid |= SLB_VSID_L; | ||
574 | |||
575 | p->thread.ksp_vsid = sp_vsid; | 561 | p->thread.ksp_vsid = sp_vsid; |
576 | } | 562 | } |
577 | 563 | ||
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 2eccd0e159e3..3675ef4bac90 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -724,10 +724,10 @@ static inline char *find_flat_dt_string(u32 offset) | |||
724 | * used to extract the memory informations at boot before we can | 724 | * used to extract the memory informations at boot before we can |
725 | * unflatten the tree | 725 | * unflatten the tree |
726 | */ | 726 | */ |
727 | static int __init scan_flat_dt(int (*it)(unsigned long node, | 727 | int __init of_scan_flat_dt(int (*it)(unsigned long node, |
728 | const char *uname, int depth, | 728 | const char *uname, int depth, |
729 | void *data), | 729 | void *data), |
730 | void *data) | 730 | void *data) |
731 | { | 731 | { |
732 | unsigned long p = ((unsigned long)initial_boot_params) + | 732 | unsigned long p = ((unsigned long)initial_boot_params) + |
733 | initial_boot_params->off_dt_struct; | 733 | initial_boot_params->off_dt_struct; |
@@ -784,8 +784,8 @@ static int __init scan_flat_dt(int (*it)(unsigned long node, | |||
784 | * This function can be used within scan_flattened_dt callback to get | 784 | * This function can be used within scan_flattened_dt callback to get |
785 | * access to properties | 785 | * access to properties |
786 | */ | 786 | */ |
787 | static void* __init get_flat_dt_prop(unsigned long node, const char *name, | 787 | void* __init of_get_flat_dt_prop(unsigned long node, const char *name, |
788 | unsigned long *size) | 788 | unsigned long *size) |
789 | { | 789 | { |
790 | unsigned long p = node; | 790 | unsigned long p = node; |
791 | 791 | ||
@@ -1087,7 +1087,7 @@ void __init unflatten_device_tree(void) | |||
1087 | static int __init early_init_dt_scan_cpus(unsigned long node, | 1087 | static int __init early_init_dt_scan_cpus(unsigned long node, |
1088 | const char *uname, int depth, void *data) | 1088 | const char *uname, int depth, void *data) |
1089 | { | 1089 | { |
1090 | char *type = get_flat_dt_prop(node, "device_type", NULL); | 1090 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); |
1091 | u32 *prop; | 1091 | u32 *prop; |
1092 | unsigned long size = 0; | 1092 | unsigned long size = 0; |
1093 | 1093 | ||
@@ -1095,19 +1095,6 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
1095 | if (type == NULL || strcmp(type, "cpu") != 0) | 1095 | if (type == NULL || strcmp(type, "cpu") != 0) |
1096 | return 0; | 1096 | return 0; |
1097 | 1097 | ||
1098 | #ifdef CONFIG_PPC_PSERIES | ||
1099 | /* On LPAR, look for the first ibm,pft-size property for the hash table size | ||
1100 | */ | ||
1101 | if (systemcfg->platform == PLATFORM_PSERIES_LPAR && ppc64_pft_size == 0) { | ||
1102 | u32 *pft_size; | ||
1103 | pft_size = get_flat_dt_prop(node, "ibm,pft-size", NULL); | ||
1104 | if (pft_size != NULL) { | ||
1105 | /* pft_size[0] is the NUMA CEC cookie */ | ||
1106 | ppc64_pft_size = pft_size[1]; | ||
1107 | } | ||
1108 | } | ||
1109 | #endif | ||
1110 | |||
1111 | boot_cpuid = 0; | 1098 | boot_cpuid = 0; |
1112 | boot_cpuid_phys = 0; | 1099 | boot_cpuid_phys = 0; |
1113 | if (initial_boot_params && initial_boot_params->version >= 2) { | 1100 | if (initial_boot_params && initial_boot_params->version >= 2) { |
@@ -1117,8 +1104,9 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
1117 | boot_cpuid_phys = initial_boot_params->boot_cpuid_phys; | 1104 | boot_cpuid_phys = initial_boot_params->boot_cpuid_phys; |
1118 | } else { | 1105 | } else { |
1119 | /* Check if it's the boot-cpu, set it's hw index now */ | 1106 | /* Check if it's the boot-cpu, set it's hw index now */ |
1120 | if (get_flat_dt_prop(node, "linux,boot-cpu", NULL) != NULL) { | 1107 | if (of_get_flat_dt_prop(node, |
1121 | prop = get_flat_dt_prop(node, "reg", NULL); | 1108 | "linux,boot-cpu", NULL) != NULL) { |
1109 | prop = of_get_flat_dt_prop(node, "reg", NULL); | ||
1122 | if (prop != NULL) | 1110 | if (prop != NULL) |
1123 | boot_cpuid_phys = *prop; | 1111 | boot_cpuid_phys = *prop; |
1124 | } | 1112 | } |
@@ -1127,14 +1115,14 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
1127 | 1115 | ||
1128 | #ifdef CONFIG_ALTIVEC | 1116 | #ifdef CONFIG_ALTIVEC |
1129 | /* Check if we have a VMX and eventually update CPU features */ | 1117 | /* Check if we have a VMX and eventually update CPU features */ |
1130 | prop = (u32 *)get_flat_dt_prop(node, "ibm,vmx", &size); | 1118 | prop = (u32 *)of_get_flat_dt_prop(node, "ibm,vmx", &size); |
1131 | if (prop && (*prop) > 0) { | 1119 | if (prop && (*prop) > 0) { |
1132 | cur_cpu_spec->cpu_features |= CPU_FTR_ALTIVEC; | 1120 | cur_cpu_spec->cpu_features |= CPU_FTR_ALTIVEC; |
1133 | cur_cpu_spec->cpu_user_features |= PPC_FEATURE_HAS_ALTIVEC; | 1121 | cur_cpu_spec->cpu_user_features |= PPC_FEATURE_HAS_ALTIVEC; |
1134 | } | 1122 | } |
1135 | 1123 | ||
1136 | /* Same goes for Apple's "altivec" property */ | 1124 | /* Same goes for Apple's "altivec" property */ |
1137 | prop = (u32 *)get_flat_dt_prop(node, "altivec", NULL); | 1125 | prop = (u32 *)of_get_flat_dt_prop(node, "altivec", NULL); |
1138 | if (prop) { | 1126 | if (prop) { |
1139 | cur_cpu_spec->cpu_features |= CPU_FTR_ALTIVEC; | 1127 | cur_cpu_spec->cpu_features |= CPU_FTR_ALTIVEC; |
1140 | cur_cpu_spec->cpu_user_features |= PPC_FEATURE_HAS_ALTIVEC; | 1128 | cur_cpu_spec->cpu_user_features |= PPC_FEATURE_HAS_ALTIVEC; |
@@ -1147,7 +1135,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
1147 | * this by looking at the size of the ibm,ppc-interrupt-server#s | 1135 | * this by looking at the size of the ibm,ppc-interrupt-server#s |
1148 | * property | 1136 | * property |
1149 | */ | 1137 | */ |
1150 | prop = (u32 *)get_flat_dt_prop(node, "ibm,ppc-interrupt-server#s", | 1138 | prop = (u32 *)of_get_flat_dt_prop(node, "ibm,ppc-interrupt-server#s", |
1151 | &size); | 1139 | &size); |
1152 | cur_cpu_spec->cpu_features &= ~CPU_FTR_SMT; | 1140 | cur_cpu_spec->cpu_features &= ~CPU_FTR_SMT; |
1153 | if (prop && ((size / sizeof(u32)) > 1)) | 1141 | if (prop && ((size / sizeof(u32)) > 1)) |
@@ -1170,7 +1158,7 @@ static int __init early_init_dt_scan_chosen(unsigned long node, | |||
1170 | return 0; | 1158 | return 0; |
1171 | 1159 | ||
1172 | /* get platform type */ | 1160 | /* get platform type */ |
1173 | prop = (u32 *)get_flat_dt_prop(node, "linux,platform", NULL); | 1161 | prop = (u32 *)of_get_flat_dt_prop(node, "linux,platform", NULL); |
1174 | if (prop == NULL) | 1162 | if (prop == NULL) |
1175 | return 0; | 1163 | return 0; |
1176 | #ifdef CONFIG_PPC64 | 1164 | #ifdef CONFIG_PPC64 |
@@ -1183,21 +1171,21 @@ static int __init early_init_dt_scan_chosen(unsigned long node, | |||
1183 | 1171 | ||
1184 | #ifdef CONFIG_PPC64 | 1172 | #ifdef CONFIG_PPC64 |
1185 | /* check if iommu is forced on or off */ | 1173 | /* check if iommu is forced on or off */ |
1186 | if (get_flat_dt_prop(node, "linux,iommu-off", NULL) != NULL) | 1174 | if (of_get_flat_dt_prop(node, "linux,iommu-off", NULL) != NULL) |
1187 | iommu_is_off = 1; | 1175 | iommu_is_off = 1; |
1188 | if (get_flat_dt_prop(node, "linux,iommu-force-on", NULL) != NULL) | 1176 | if (of_get_flat_dt_prop(node, "linux,iommu-force-on", NULL) != NULL) |
1189 | iommu_force_on = 1; | 1177 | iommu_force_on = 1; |
1190 | #endif | 1178 | #endif |
1191 | 1179 | ||
1192 | lprop = get_flat_dt_prop(node, "linux,memory-limit", NULL); | 1180 | lprop = of_get_flat_dt_prop(node, "linux,memory-limit", NULL); |
1193 | if (lprop) | 1181 | if (lprop) |
1194 | memory_limit = *lprop; | 1182 | memory_limit = *lprop; |
1195 | 1183 | ||
1196 | #ifdef CONFIG_PPC64 | 1184 | #ifdef CONFIG_PPC64 |
1197 | lprop = get_flat_dt_prop(node, "linux,tce-alloc-start", NULL); | 1185 | lprop = of_get_flat_dt_prop(node, "linux,tce-alloc-start", NULL); |
1198 | if (lprop) | 1186 | if (lprop) |
1199 | tce_alloc_start = *lprop; | 1187 | tce_alloc_start = *lprop; |
1200 | lprop = get_flat_dt_prop(node, "linux,tce-alloc-end", NULL); | 1188 | lprop = of_get_flat_dt_prop(node, "linux,tce-alloc-end", NULL); |
1201 | if (lprop) | 1189 | if (lprop) |
1202 | tce_alloc_end = *lprop; | 1190 | tce_alloc_end = *lprop; |
1203 | #endif | 1191 | #endif |
@@ -1209,9 +1197,9 @@ static int __init early_init_dt_scan_chosen(unsigned long node, | |||
1209 | { | 1197 | { |
1210 | u64 *basep, *entryp; | 1198 | u64 *basep, *entryp; |
1211 | 1199 | ||
1212 | basep = get_flat_dt_prop(node, "linux,rtas-base", NULL); | 1200 | basep = of_get_flat_dt_prop(node, "linux,rtas-base", NULL); |
1213 | entryp = get_flat_dt_prop(node, "linux,rtas-entry", NULL); | 1201 | entryp = of_get_flat_dt_prop(node, "linux,rtas-entry", NULL); |
1214 | prop = get_flat_dt_prop(node, "linux,rtas-size", NULL); | 1202 | prop = of_get_flat_dt_prop(node, "linux,rtas-size", NULL); |
1215 | if (basep && entryp && prop) { | 1203 | if (basep && entryp && prop) { |
1216 | rtas.base = *basep; | 1204 | rtas.base = *basep; |
1217 | rtas.entry = *entryp; | 1205 | rtas.entry = *entryp; |
@@ -1232,11 +1220,11 @@ static int __init early_init_dt_scan_root(unsigned long node, | |||
1232 | if (depth != 0) | 1220 | if (depth != 0) |
1233 | return 0; | 1221 | return 0; |
1234 | 1222 | ||
1235 | prop = get_flat_dt_prop(node, "#size-cells", NULL); | 1223 | prop = of_get_flat_dt_prop(node, "#size-cells", NULL); |
1236 | dt_root_size_cells = (prop == NULL) ? 1 : *prop; | 1224 | dt_root_size_cells = (prop == NULL) ? 1 : *prop; |
1237 | DBG("dt_root_size_cells = %x\n", dt_root_size_cells); | 1225 | DBG("dt_root_size_cells = %x\n", dt_root_size_cells); |
1238 | 1226 | ||
1239 | prop = get_flat_dt_prop(node, "#address-cells", NULL); | 1227 | prop = of_get_flat_dt_prop(node, "#address-cells", NULL); |
1240 | dt_root_addr_cells = (prop == NULL) ? 2 : *prop; | 1228 | dt_root_addr_cells = (prop == NULL) ? 2 : *prop; |
1241 | DBG("dt_root_addr_cells = %x\n", dt_root_addr_cells); | 1229 | DBG("dt_root_addr_cells = %x\n", dt_root_addr_cells); |
1242 | 1230 | ||
@@ -1271,7 +1259,7 @@ static unsigned long __init dt_mem_next_cell(int s, cell_t **cellp) | |||
1271 | static int __init early_init_dt_scan_memory(unsigned long node, | 1259 | static int __init early_init_dt_scan_memory(unsigned long node, |
1272 | const char *uname, int depth, void *data) | 1260 | const char *uname, int depth, void *data) |
1273 | { | 1261 | { |
1274 | char *type = get_flat_dt_prop(node, "device_type", NULL); | 1262 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); |
1275 | cell_t *reg, *endp; | 1263 | cell_t *reg, *endp; |
1276 | unsigned long l; | 1264 | unsigned long l; |
1277 | 1265 | ||
@@ -1279,13 +1267,13 @@ static int __init early_init_dt_scan_memory(unsigned long node, | |||
1279 | if (type == NULL || strcmp(type, "memory") != 0) | 1267 | if (type == NULL || strcmp(type, "memory") != 0) |
1280 | return 0; | 1268 | return 0; |
1281 | 1269 | ||
1282 | reg = (cell_t *)get_flat_dt_prop(node, "reg", &l); | 1270 | reg = (cell_t *)of_get_flat_dt_prop(node, "reg", &l); |
1283 | if (reg == NULL) | 1271 | if (reg == NULL) |
1284 | return 0; | 1272 | return 0; |
1285 | 1273 | ||
1286 | endp = reg + (l / sizeof(cell_t)); | 1274 | endp = reg + (l / sizeof(cell_t)); |
1287 | 1275 | ||
1288 | DBG("memory scan node %s ..., reg size %ld, data: %x %x %x %x, ...\n", | 1276 | DBG("memory scan node %s, reg size %ld, data: %x %x %x %x,\n", |
1289 | uname, l, reg[0], reg[1], reg[2], reg[3]); | 1277 | uname, l, reg[0], reg[1], reg[2], reg[3]); |
1290 | 1278 | ||
1291 | while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) { | 1279 | while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) { |
@@ -1343,12 +1331,12 @@ void __init early_init_devtree(void *params) | |||
1343 | * device-tree, including the platform type, initrd location and | 1331 | * device-tree, including the platform type, initrd location and |
1344 | * size, TCE reserve, and more ... | 1332 | * size, TCE reserve, and more ... |
1345 | */ | 1333 | */ |
1346 | scan_flat_dt(early_init_dt_scan_chosen, NULL); | 1334 | of_scan_flat_dt(early_init_dt_scan_chosen, NULL); |
1347 | 1335 | ||
1348 | /* Scan memory nodes and rebuild LMBs */ | 1336 | /* Scan memory nodes and rebuild LMBs */ |
1349 | lmb_init(); | 1337 | lmb_init(); |
1350 | scan_flat_dt(early_init_dt_scan_root, NULL); | 1338 | of_scan_flat_dt(early_init_dt_scan_root, NULL); |
1351 | scan_flat_dt(early_init_dt_scan_memory, NULL); | 1339 | of_scan_flat_dt(early_init_dt_scan_memory, NULL); |
1352 | lmb_enforce_memory_limit(memory_limit); | 1340 | lmb_enforce_memory_limit(memory_limit); |
1353 | lmb_analyze(); | 1341 | lmb_analyze(); |
1354 | #ifdef CONFIG_PPC64 | 1342 | #ifdef CONFIG_PPC64 |
@@ -1363,10 +1351,10 @@ void __init early_init_devtree(void *params) | |||
1363 | 1351 | ||
1364 | DBG("Scanning CPUs ...\n"); | 1352 | DBG("Scanning CPUs ...\n"); |
1365 | 1353 | ||
1366 | /* Retreive hash table size from flattened tree plus other | 1354 | /* Retreive CPU related informations from the flat tree |
1367 | * CPU related informations (altivec support, boot CPU ID, ...) | 1355 | * (altivec support, boot CPU ID, ...) |
1368 | */ | 1356 | */ |
1369 | scan_flat_dt(early_init_dt_scan_cpus, NULL); | 1357 | of_scan_flat_dt(early_init_dt_scan_cpus, NULL); |
1370 | 1358 | ||
1371 | DBG(" <- early_init_devtree()\n"); | 1359 | DBG(" <- early_init_devtree()\n"); |
1372 | } | 1360 | } |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 9750b3cd8ecd..c758b6624d7b 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -2000,7 +2000,7 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2000 | #endif | 2000 | #endif |
2001 | 2001 | ||
2002 | /* | 2002 | /* |
2003 | * On pSeries and BPA, copy the CPU hold code | 2003 | * Copy the CPU hold code |
2004 | */ | 2004 | */ |
2005 | if (RELOC(of_platform) != PLATFORM_POWERMAC) | 2005 | if (RELOC(of_platform) != PLATFORM_POWERMAC) |
2006 | copy_and_flush(0, KERNELBASE + offset, 0x100, 0); | 2006 | copy_and_flush(0, KERNELBASE + offset, 0x100, 0); |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 568ea335d616..3d2abd95c7ae 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -248,46 +248,10 @@ void ptrace_disable(struct task_struct *child) | |||
248 | clear_single_step(child); | 248 | clear_single_step(child); |
249 | } | 249 | } |
250 | 250 | ||
251 | long sys_ptrace(long request, long pid, long addr, long data) | 251 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) |
252 | { | 252 | { |
253 | struct task_struct *child; | ||
254 | int ret = -EPERM; | 253 | int ret = -EPERM; |
255 | 254 | ||
256 | lock_kernel(); | ||
257 | if (request == PTRACE_TRACEME) { | ||
258 | /* are we already being traced? */ | ||
259 | if (current->ptrace & PT_PTRACED) | ||
260 | goto out; | ||
261 | ret = security_ptrace(current->parent, current); | ||
262 | if (ret) | ||
263 | goto out; | ||
264 | /* set the ptrace bit in the process flags. */ | ||
265 | current->ptrace |= PT_PTRACED; | ||
266 | ret = 0; | ||
267 | goto out; | ||
268 | } | ||
269 | ret = -ESRCH; | ||
270 | read_lock(&tasklist_lock); | ||
271 | child = find_task_by_pid(pid); | ||
272 | if (child) | ||
273 | get_task_struct(child); | ||
274 | read_unlock(&tasklist_lock); | ||
275 | if (!child) | ||
276 | goto out; | ||
277 | |||
278 | ret = -EPERM; | ||
279 | if (pid == 1) /* you may not mess with init */ | ||
280 | goto out_tsk; | ||
281 | |||
282 | if (request == PTRACE_ATTACH) { | ||
283 | ret = ptrace_attach(child); | ||
284 | goto out_tsk; | ||
285 | } | ||
286 | |||
287 | ret = ptrace_check_attach(child, request == PTRACE_KILL); | ||
288 | if (ret < 0) | ||
289 | goto out_tsk; | ||
290 | |||
291 | switch (request) { | 255 | switch (request) { |
292 | /* when I and D space are separate, these will need to be fixed. */ | 256 | /* when I and D space are separate, these will need to be fixed. */ |
293 | case PTRACE_PEEKTEXT: /* read word at location addr. */ | 257 | case PTRACE_PEEKTEXT: /* read word at location addr. */ |
@@ -540,10 +504,7 @@ long sys_ptrace(long request, long pid, long addr, long data) | |||
540 | ret = ptrace_request(child, request, addr, data); | 504 | ret = ptrace_request(child, request, addr, data); |
541 | break; | 505 | break; |
542 | } | 506 | } |
543 | out_tsk: | 507 | |
544 | put_task_struct(child); | ||
545 | out: | ||
546 | unlock_kernel(); | ||
547 | return ret; | 508 | return ret; |
548 | } | 509 | } |
549 | 510 | ||
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c new file mode 100644 index 000000000000..5bdd5b079d96 --- /dev/null +++ b/arch/powerpc/kernel/rtas-proc.c | |||
@@ -0,0 +1,808 @@ | |||
1 | /* | ||
2 | * arch/ppc64/kernel/rtas-proc.c | ||
3 | * Copyright (C) 2000 Tilmann Bitterberg | ||
4 | * (tilmann@bitterberg.de) | ||
5 | * | ||
6 | * RTAS (Runtime Abstraction Services) stuff | ||
7 | * Intention is to provide a clean user interface | ||
8 | * to use the RTAS. | ||
9 | * | ||
10 | * TODO: | ||
11 | * Split off a header file and maybe move it to a different | ||
12 | * location. Write Documentation on what the /proc/rtas/ entries | ||
13 | * actually do. | ||
14 | */ | ||
15 | |||
16 | #include <linux/errno.h> | ||
17 | #include <linux/sched.h> | ||
18 | #include <linux/proc_fs.h> | ||
19 | #include <linux/stat.h> | ||
20 | #include <linux/ctype.h> | ||
21 | #include <linux/time.h> | ||
22 | #include <linux/string.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/seq_file.h> | ||
25 | #include <linux/bitops.h> | ||
26 | #include <linux/rtc.h> | ||
27 | |||
28 | #include <asm/uaccess.h> | ||
29 | #include <asm/processor.h> | ||
30 | #include <asm/io.h> | ||
31 | #include <asm/prom.h> | ||
32 | #include <asm/rtas.h> | ||
33 | #include <asm/machdep.h> /* for ppc_md */ | ||
34 | #include <asm/time.h> | ||
35 | #include <asm/systemcfg.h> | ||
36 | |||
37 | /* Token for Sensors */ | ||
38 | #define KEY_SWITCH 0x0001 | ||
39 | #define ENCLOSURE_SWITCH 0x0002 | ||
40 | #define THERMAL_SENSOR 0x0003 | ||
41 | #define LID_STATUS 0x0004 | ||
42 | #define POWER_SOURCE 0x0005 | ||
43 | #define BATTERY_VOLTAGE 0x0006 | ||
44 | #define BATTERY_REMAINING 0x0007 | ||
45 | #define BATTERY_PERCENTAGE 0x0008 | ||
46 | #define EPOW_SENSOR 0x0009 | ||
47 | #define BATTERY_CYCLESTATE 0x000a | ||
48 | #define BATTERY_CHARGING 0x000b | ||
49 | |||
50 | /* IBM specific sensors */ | ||
51 | #define IBM_SURVEILLANCE 0x2328 /* 9000 */ | ||
52 | #define IBM_FANRPM 0x2329 /* 9001 */ | ||
53 | #define IBM_VOLTAGE 0x232a /* 9002 */ | ||
54 | #define IBM_DRCONNECTOR 0x232b /* 9003 */ | ||
55 | #define IBM_POWERSUPPLY 0x232c /* 9004 */ | ||
56 | |||
57 | /* Status return values */ | ||
58 | #define SENSOR_CRITICAL_HIGH 13 | ||
59 | #define SENSOR_WARNING_HIGH 12 | ||
60 | #define SENSOR_NORMAL 11 | ||
61 | #define SENSOR_WARNING_LOW 10 | ||
62 | #define SENSOR_CRITICAL_LOW 9 | ||
63 | #define SENSOR_SUCCESS 0 | ||
64 | #define SENSOR_HW_ERROR -1 | ||
65 | #define SENSOR_BUSY -2 | ||
66 | #define SENSOR_NOT_EXIST -3 | ||
67 | #define SENSOR_DR_ENTITY -9000 | ||
68 | |||
69 | /* Location Codes */ | ||
70 | #define LOC_SCSI_DEV_ADDR 'A' | ||
71 | #define LOC_SCSI_DEV_LOC 'B' | ||
72 | #define LOC_CPU 'C' | ||
73 | #define LOC_DISKETTE 'D' | ||
74 | #define LOC_ETHERNET 'E' | ||
75 | #define LOC_FAN 'F' | ||
76 | #define LOC_GRAPHICS 'G' | ||
77 | /* reserved / not used 'H' */ | ||
78 | #define LOC_IO_ADAPTER 'I' | ||
79 | /* reserved / not used 'J' */ | ||
80 | #define LOC_KEYBOARD 'K' | ||
81 | #define LOC_LCD 'L' | ||
82 | #define LOC_MEMORY 'M' | ||
83 | #define LOC_NV_MEMORY 'N' | ||
84 | #define LOC_MOUSE 'O' | ||
85 | #define LOC_PLANAR 'P' | ||
86 | #define LOC_OTHER_IO 'Q' | ||
87 | #define LOC_PARALLEL 'R' | ||
88 | #define LOC_SERIAL 'S' | ||
89 | #define LOC_DEAD_RING 'T' | ||
90 | #define LOC_RACKMOUNTED 'U' /* for _u_nit is rack mounted */ | ||
91 | #define LOC_VOLTAGE 'V' | ||
92 | #define LOC_SWITCH_ADAPTER 'W' | ||
93 | #define LOC_OTHER 'X' | ||
94 | #define LOC_FIRMWARE 'Y' | ||
95 | #define LOC_SCSI 'Z' | ||
96 | |||
97 | /* Tokens for indicators */ | ||
98 | #define TONE_FREQUENCY 0x0001 /* 0 - 1000 (HZ)*/ | ||
99 | #define TONE_VOLUME 0x0002 /* 0 - 100 (%) */ | ||
100 | #define SYSTEM_POWER_STATE 0x0003 | ||
101 | #define WARNING_LIGHT 0x0004 | ||
102 | #define DISK_ACTIVITY_LIGHT 0x0005 | ||
103 | #define HEX_DISPLAY_UNIT 0x0006 | ||
104 | #define BATTERY_WARNING_TIME 0x0007 | ||
105 | #define CONDITION_CYCLE_REQUEST 0x0008 | ||
106 | #define SURVEILLANCE_INDICATOR 0x2328 /* 9000 */ | ||
107 | #define DR_ACTION 0x2329 /* 9001 */ | ||
108 | #define DR_INDICATOR 0x232a /* 9002 */ | ||
109 | /* 9003 - 9004: Vendor specific */ | ||
110 | /* 9006 - 9999: Vendor specific */ | ||
111 | |||
112 | /* other */ | ||
113 | #define MAX_SENSORS 17 /* I only know of 17 sensors */ | ||
114 | #define MAX_LINELENGTH 256 | ||
115 | #define SENSOR_PREFIX "ibm,sensor-" | ||
116 | #define cel_to_fahr(x) ((x*9/5)+32) | ||
117 | |||
118 | |||
119 | /* Globals */ | ||
120 | static struct rtas_sensors sensors; | ||
121 | static struct device_node *rtas_node = NULL; | ||
122 | static unsigned long power_on_time = 0; /* Save the time the user set */ | ||
123 | static char progress_led[MAX_LINELENGTH]; | ||
124 | |||
125 | static unsigned long rtas_tone_frequency = 1000; | ||
126 | static unsigned long rtas_tone_volume = 0; | ||
127 | |||
128 | /* ****************STRUCTS******************************************* */ | ||
129 | struct individual_sensor { | ||
130 | unsigned int token; | ||
131 | unsigned int quant; | ||
132 | }; | ||
133 | |||
134 | struct rtas_sensors { | ||
135 | struct individual_sensor sensor[MAX_SENSORS]; | ||
136 | unsigned int quant; | ||
137 | }; | ||
138 | |||
139 | /* ****************************************************************** */ | ||
140 | /* Declarations */ | ||
141 | static int ppc_rtas_sensors_show(struct seq_file *m, void *v); | ||
142 | static int ppc_rtas_clock_show(struct seq_file *m, void *v); | ||
143 | static ssize_t ppc_rtas_clock_write(struct file *file, | ||
144 | const char __user *buf, size_t count, loff_t *ppos); | ||
145 | static int ppc_rtas_progress_show(struct seq_file *m, void *v); | ||
146 | static ssize_t ppc_rtas_progress_write(struct file *file, | ||
147 | const char __user *buf, size_t count, loff_t *ppos); | ||
148 | static int ppc_rtas_poweron_show(struct seq_file *m, void *v); | ||
149 | static ssize_t ppc_rtas_poweron_write(struct file *file, | ||
150 | const char __user *buf, size_t count, loff_t *ppos); | ||
151 | |||
152 | static ssize_t ppc_rtas_tone_freq_write(struct file *file, | ||
153 | const char __user *buf, size_t count, loff_t *ppos); | ||
154 | static int ppc_rtas_tone_freq_show(struct seq_file *m, void *v); | ||
155 | static ssize_t ppc_rtas_tone_volume_write(struct file *file, | ||
156 | const char __user *buf, size_t count, loff_t *ppos); | ||
157 | static int ppc_rtas_tone_volume_show(struct seq_file *m, void *v); | ||
158 | static int ppc_rtas_rmo_buf_show(struct seq_file *m, void *v); | ||
159 | |||
160 | static int sensors_open(struct inode *inode, struct file *file) | ||
161 | { | ||
162 | return single_open(file, ppc_rtas_sensors_show, NULL); | ||
163 | } | ||
164 | |||
165 | struct file_operations ppc_rtas_sensors_operations = { | ||
166 | .open = sensors_open, | ||
167 | .read = seq_read, | ||
168 | .llseek = seq_lseek, | ||
169 | .release = single_release, | ||
170 | }; | ||
171 | |||
172 | static int poweron_open(struct inode *inode, struct file *file) | ||
173 | { | ||
174 | return single_open(file, ppc_rtas_poweron_show, NULL); | ||
175 | } | ||
176 | |||
177 | struct file_operations ppc_rtas_poweron_operations = { | ||
178 | .open = poweron_open, | ||
179 | .read = seq_read, | ||
180 | .llseek = seq_lseek, | ||
181 | .write = ppc_rtas_poweron_write, | ||
182 | .release = single_release, | ||
183 | }; | ||
184 | |||
185 | static int progress_open(struct inode *inode, struct file *file) | ||
186 | { | ||
187 | return single_open(file, ppc_rtas_progress_show, NULL); | ||
188 | } | ||
189 | |||
190 | struct file_operations ppc_rtas_progress_operations = { | ||
191 | .open = progress_open, | ||
192 | .read = seq_read, | ||
193 | .llseek = seq_lseek, | ||
194 | .write = ppc_rtas_progress_write, | ||
195 | .release = single_release, | ||
196 | }; | ||
197 | |||
198 | static int clock_open(struct inode *inode, struct file *file) | ||
199 | { | ||
200 | return single_open(file, ppc_rtas_clock_show, NULL); | ||
201 | } | ||
202 | |||
203 | struct file_operations ppc_rtas_clock_operations = { | ||
204 | .open = clock_open, | ||
205 | .read = seq_read, | ||
206 | .llseek = seq_lseek, | ||
207 | .write = ppc_rtas_clock_write, | ||
208 | .release = single_release, | ||
209 | }; | ||
210 | |||
211 | static int tone_freq_open(struct inode *inode, struct file *file) | ||
212 | { | ||
213 | return single_open(file, ppc_rtas_tone_freq_show, NULL); | ||
214 | } | ||
215 | |||
216 | struct file_operations ppc_rtas_tone_freq_operations = { | ||
217 | .open = tone_freq_open, | ||
218 | .read = seq_read, | ||
219 | .llseek = seq_lseek, | ||
220 | .write = ppc_rtas_tone_freq_write, | ||
221 | .release = single_release, | ||
222 | }; | ||
223 | |||
224 | static int tone_volume_open(struct inode *inode, struct file *file) | ||
225 | { | ||
226 | return single_open(file, ppc_rtas_tone_volume_show, NULL); | ||
227 | } | ||
228 | |||
229 | struct file_operations ppc_rtas_tone_volume_operations = { | ||
230 | .open = tone_volume_open, | ||
231 | .read = seq_read, | ||
232 | .llseek = seq_lseek, | ||
233 | .write = ppc_rtas_tone_volume_write, | ||
234 | .release = single_release, | ||
235 | }; | ||
236 | |||
237 | static int rmo_buf_open(struct inode *inode, struct file *file) | ||
238 | { | ||
239 | return single_open(file, ppc_rtas_rmo_buf_show, NULL); | ||
240 | } | ||
241 | |||
242 | struct file_operations ppc_rtas_rmo_buf_ops = { | ||
243 | .open = rmo_buf_open, | ||
244 | .read = seq_read, | ||
245 | .llseek = seq_lseek, | ||
246 | .release = single_release, | ||
247 | }; | ||
248 | |||
249 | static int ppc_rtas_find_all_sensors(void); | ||
250 | static void ppc_rtas_process_sensor(struct seq_file *m, | ||
251 | struct individual_sensor *s, int state, int error, char *loc); | ||
252 | static char *ppc_rtas_process_error(int error); | ||
253 | static void get_location_code(struct seq_file *m, | ||
254 | struct individual_sensor *s, char *loc); | ||
255 | static void check_location_string(struct seq_file *m, char *c); | ||
256 | static void check_location(struct seq_file *m, char *c); | ||
257 | |||
258 | static int __init proc_rtas_init(void) | ||
259 | { | ||
260 | struct proc_dir_entry *entry; | ||
261 | |||
262 | if (!(systemcfg->platform & PLATFORM_PSERIES)) | ||
263 | return 1; | ||
264 | |||
265 | rtas_node = of_find_node_by_name(NULL, "rtas"); | ||
266 | if (rtas_node == NULL) | ||
267 | return 1; | ||
268 | |||
269 | entry = create_proc_entry("ppc64/rtas/progress", S_IRUGO|S_IWUSR, NULL); | ||
270 | if (entry) | ||
271 | entry->proc_fops = &ppc_rtas_progress_operations; | ||
272 | |||
273 | entry = create_proc_entry("ppc64/rtas/clock", S_IRUGO|S_IWUSR, NULL); | ||
274 | if (entry) | ||
275 | entry->proc_fops = &ppc_rtas_clock_operations; | ||
276 | |||
277 | entry = create_proc_entry("ppc64/rtas/poweron", S_IWUSR|S_IRUGO, NULL); | ||
278 | if (entry) | ||
279 | entry->proc_fops = &ppc_rtas_poweron_operations; | ||
280 | |||
281 | entry = create_proc_entry("ppc64/rtas/sensors", S_IRUGO, NULL); | ||
282 | if (entry) | ||
283 | entry->proc_fops = &ppc_rtas_sensors_operations; | ||
284 | |||
285 | entry = create_proc_entry("ppc64/rtas/frequency", S_IWUSR|S_IRUGO, | ||
286 | NULL); | ||
287 | if (entry) | ||
288 | entry->proc_fops = &ppc_rtas_tone_freq_operations; | ||
289 | |||
290 | entry = create_proc_entry("ppc64/rtas/volume", S_IWUSR|S_IRUGO, NULL); | ||
291 | if (entry) | ||
292 | entry->proc_fops = &ppc_rtas_tone_volume_operations; | ||
293 | |||
294 | entry = create_proc_entry("ppc64/rtas/rmo_buffer", S_IRUSR, NULL); | ||
295 | if (entry) | ||
296 | entry->proc_fops = &ppc_rtas_rmo_buf_ops; | ||
297 | |||
298 | return 0; | ||
299 | } | ||
300 | |||
301 | __initcall(proc_rtas_init); | ||
302 | |||
303 | static int parse_number(const char __user *p, size_t count, unsigned long *val) | ||
304 | { | ||
305 | char buf[40]; | ||
306 | char *end; | ||
307 | |||
308 | if (count > 39) | ||
309 | return -EINVAL; | ||
310 | |||
311 | if (copy_from_user(buf, p, count)) | ||
312 | return -EFAULT; | ||
313 | |||
314 | buf[count] = 0; | ||
315 | |||
316 | *val = simple_strtoul(buf, &end, 10); | ||
317 | if (*end && *end != '\n') | ||
318 | return -EINVAL; | ||
319 | |||
320 | return 0; | ||
321 | } | ||
322 | |||
323 | /* ****************************************************************** */ | ||
324 | /* POWER-ON-TIME */ | ||
325 | /* ****************************************************************** */ | ||
326 | static ssize_t ppc_rtas_poweron_write(struct file *file, | ||
327 | const char __user *buf, size_t count, loff_t *ppos) | ||
328 | { | ||
329 | struct rtc_time tm; | ||
330 | unsigned long nowtime; | ||
331 | int error = parse_number(buf, count, &nowtime); | ||
332 | if (error) | ||
333 | return error; | ||
334 | |||
335 | power_on_time = nowtime; /* save the time */ | ||
336 | |||
337 | to_tm(nowtime, &tm); | ||
338 | |||
339 | error = rtas_call(rtas_token("set-time-for-power-on"), 7, 1, NULL, | ||
340 | tm.tm_year, tm.tm_mon, tm.tm_mday, | ||
341 | tm.tm_hour, tm.tm_min, tm.tm_sec, 0 /* nano */); | ||
342 | if (error) | ||
343 | printk(KERN_WARNING "error: setting poweron time returned: %s\n", | ||
344 | ppc_rtas_process_error(error)); | ||
345 | return count; | ||
346 | } | ||
347 | /* ****************************************************************** */ | ||
348 | static int ppc_rtas_poweron_show(struct seq_file *m, void *v) | ||
349 | { | ||
350 | if (power_on_time == 0) | ||
351 | seq_printf(m, "Power on time not set\n"); | ||
352 | else | ||
353 | seq_printf(m, "%lu\n",power_on_time); | ||
354 | return 0; | ||
355 | } | ||
356 | |||
357 | /* ****************************************************************** */ | ||
358 | /* PROGRESS */ | ||
359 | /* ****************************************************************** */ | ||
360 | static ssize_t ppc_rtas_progress_write(struct file *file, | ||
361 | const char __user *buf, size_t count, loff_t *ppos) | ||
362 | { | ||
363 | unsigned long hex; | ||
364 | |||
365 | if (count >= MAX_LINELENGTH) | ||
366 | count = MAX_LINELENGTH -1; | ||
367 | if (copy_from_user(progress_led, buf, count)) { /* save the string */ | ||
368 | return -EFAULT; | ||
369 | } | ||
370 | progress_led[count] = 0; | ||
371 | |||
372 | /* Lets see if the user passed hexdigits */ | ||
373 | hex = simple_strtoul(progress_led, NULL, 10); | ||
374 | |||
375 | rtas_progress ((char *)progress_led, hex); | ||
376 | return count; | ||
377 | |||
378 | /* clear the line */ | ||
379 | /* rtas_progress(" ", 0xffff);*/ | ||
380 | } | ||
381 | /* ****************************************************************** */ | ||
382 | static int ppc_rtas_progress_show(struct seq_file *m, void *v) | ||
383 | { | ||
384 | if (progress_led) | ||
385 | seq_printf(m, "%s\n", progress_led); | ||
386 | return 0; | ||
387 | } | ||
388 | |||
389 | /* ****************************************************************** */ | ||
390 | /* CLOCK */ | ||
391 | /* ****************************************************************** */ | ||
392 | static ssize_t ppc_rtas_clock_write(struct file *file, | ||
393 | const char __user *buf, size_t count, loff_t *ppos) | ||
394 | { | ||
395 | struct rtc_time tm; | ||
396 | unsigned long nowtime; | ||
397 | int error = parse_number(buf, count, &nowtime); | ||
398 | if (error) | ||
399 | return error; | ||
400 | |||
401 | to_tm(nowtime, &tm); | ||
402 | error = rtas_call(rtas_token("set-time-of-day"), 7, 1, NULL, | ||
403 | tm.tm_year, tm.tm_mon, tm.tm_mday, | ||
404 | tm.tm_hour, tm.tm_min, tm.tm_sec, 0); | ||
405 | if (error) | ||
406 | printk(KERN_WARNING "error: setting the clock returned: %s\n", | ||
407 | ppc_rtas_process_error(error)); | ||
408 | return count; | ||
409 | } | ||
410 | /* ****************************************************************** */ | ||
411 | static int ppc_rtas_clock_show(struct seq_file *m, void *v) | ||
412 | { | ||
413 | int ret[8]; | ||
414 | int error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret); | ||
415 | |||
416 | if (error) { | ||
417 | printk(KERN_WARNING "error: reading the clock returned: %s\n", | ||
418 | ppc_rtas_process_error(error)); | ||
419 | seq_printf(m, "0"); | ||
420 | } else { | ||
421 | unsigned int year, mon, day, hour, min, sec; | ||
422 | year = ret[0]; mon = ret[1]; day = ret[2]; | ||
423 | hour = ret[3]; min = ret[4]; sec = ret[5]; | ||
424 | seq_printf(m, "%lu\n", | ||
425 | mktime(year, mon, day, hour, min, sec)); | ||
426 | } | ||
427 | return 0; | ||
428 | } | ||
429 | |||
430 | /* ****************************************************************** */ | ||
431 | /* SENSOR STUFF */ | ||
432 | /* ****************************************************************** */ | ||
433 | static int ppc_rtas_sensors_show(struct seq_file *m, void *v) | ||
434 | { | ||
435 | int i,j; | ||
436 | int state, error; | ||
437 | int get_sensor_state = rtas_token("get-sensor-state"); | ||
438 | |||
439 | seq_printf(m, "RTAS (RunTime Abstraction Services) Sensor Information\n"); | ||
440 | seq_printf(m, "Sensor\t\tValue\t\tCondition\tLocation\n"); | ||
441 | seq_printf(m, "********************************************************\n"); | ||
442 | |||
443 | if (ppc_rtas_find_all_sensors() != 0) { | ||
444 | seq_printf(m, "\nNo sensors are available\n"); | ||
445 | return 0; | ||
446 | } | ||
447 | |||
448 | for (i=0; i<sensors.quant; i++) { | ||
449 | struct individual_sensor *p = &sensors.sensor[i]; | ||
450 | char rstr[64]; | ||
451 | char *loc; | ||
452 | int llen, offs; | ||
453 | |||
454 | sprintf (rstr, SENSOR_PREFIX"%04d", p->token); | ||
455 | loc = (char *) get_property(rtas_node, rstr, &llen); | ||
456 | |||
457 | /* A sensor may have multiple instances */ | ||
458 | for (j = 0, offs = 0; j <= p->quant; j++) { | ||
459 | error = rtas_call(get_sensor_state, 2, 2, &state, | ||
460 | p->token, j); | ||
461 | |||
462 | ppc_rtas_process_sensor(m, p, state, error, loc); | ||
463 | seq_putc(m, '\n'); | ||
464 | if (loc) { | ||
465 | offs += strlen(loc) + 1; | ||
466 | loc += strlen(loc) + 1; | ||
467 | if (offs >= llen) | ||
468 | loc = NULL; | ||
469 | } | ||
470 | } | ||
471 | } | ||
472 | return 0; | ||
473 | } | ||
474 | |||
475 | /* ****************************************************************** */ | ||
476 | |||
477 | static int ppc_rtas_find_all_sensors(void) | ||
478 | { | ||
479 | unsigned int *utmp; | ||
480 | int len, i; | ||
481 | |||
482 | utmp = (unsigned int *) get_property(rtas_node, "rtas-sensors", &len); | ||
483 | if (utmp == NULL) { | ||
484 | printk (KERN_ERR "error: could not get rtas-sensors\n"); | ||
485 | return 1; | ||
486 | } | ||
487 | |||
488 | sensors.quant = len / 8; /* int + int */ | ||
489 | |||
490 | for (i=0; i<sensors.quant; i++) { | ||
491 | sensors.sensor[i].token = *utmp++; | ||
492 | sensors.sensor[i].quant = *utmp++; | ||
493 | } | ||
494 | return 0; | ||
495 | } | ||
496 | |||
497 | /* ****************************************************************** */ | ||
498 | /* | ||
499 | * Builds a string of what rtas returned | ||
500 | */ | ||
501 | static char *ppc_rtas_process_error(int error) | ||
502 | { | ||
503 | switch (error) { | ||
504 | case SENSOR_CRITICAL_HIGH: | ||
505 | return "(critical high)"; | ||
506 | case SENSOR_WARNING_HIGH: | ||
507 | return "(warning high)"; | ||
508 | case SENSOR_NORMAL: | ||
509 | return "(normal)"; | ||
510 | case SENSOR_WARNING_LOW: | ||
511 | return "(warning low)"; | ||
512 | case SENSOR_CRITICAL_LOW: | ||
513 | return "(critical low)"; | ||
514 | case SENSOR_SUCCESS: | ||
515 | return "(read ok)"; | ||
516 | case SENSOR_HW_ERROR: | ||
517 | return "(hardware error)"; | ||
518 | case SENSOR_BUSY: | ||
519 | return "(busy)"; | ||
520 | case SENSOR_NOT_EXIST: | ||
521 | return "(non existent)"; | ||
522 | case SENSOR_DR_ENTITY: | ||
523 | return "(dr entity removed)"; | ||
524 | default: | ||
525 | return "(UNKNOWN)"; | ||
526 | } | ||
527 | } | ||
528 | |||
529 | /* ****************************************************************** */ | ||
530 | /* | ||
531 | * Builds a string out of what the sensor said | ||
532 | */ | ||
533 | |||
534 | static void ppc_rtas_process_sensor(struct seq_file *m, | ||
535 | struct individual_sensor *s, int state, int error, char *loc) | ||
536 | { | ||
537 | /* Defined return vales */ | ||
538 | const char * key_switch[] = { "Off\t", "Normal\t", "Secure\t", | ||
539 | "Maintenance" }; | ||
540 | const char * enclosure_switch[] = { "Closed", "Open" }; | ||
541 | const char * lid_status[] = { " ", "Open", "Closed" }; | ||
542 | const char * power_source[] = { "AC\t", "Battery", | ||
543 | "AC & Battery" }; | ||
544 | const char * battery_remaining[] = { "Very Low", "Low", "Mid", "High" }; | ||
545 | const char * epow_sensor[] = { | ||
546 | "EPOW Reset", "Cooling warning", "Power warning", | ||
547 | "System shutdown", "System halt", "EPOW main enclosure", | ||
548 | "EPOW power off" }; | ||
549 | const char * battery_cyclestate[] = { "None", "In progress", | ||
550 | "Requested" }; | ||
551 | const char * battery_charging[] = { "Charging", "Discharching", | ||
552 | "No current flow" }; | ||
553 | const char * ibm_drconnector[] = { "Empty", "Present", "Unusable", | ||
554 | "Exchange" }; | ||
555 | |||
556 | int have_strings = 0; | ||
557 | int num_states = 0; | ||
558 | int temperature = 0; | ||
559 | int unknown = 0; | ||
560 | |||
561 | /* What kind of sensor do we have here? */ | ||
562 | |||
563 | switch (s->token) { | ||
564 | case KEY_SWITCH: | ||
565 | seq_printf(m, "Key switch:\t"); | ||
566 | num_states = sizeof(key_switch) / sizeof(char *); | ||
567 | if (state < num_states) { | ||
568 | seq_printf(m, "%s\t", key_switch[state]); | ||
569 | have_strings = 1; | ||
570 | } | ||
571 | break; | ||
572 | case ENCLOSURE_SWITCH: | ||
573 | seq_printf(m, "Enclosure switch:\t"); | ||
574 | num_states = sizeof(enclosure_switch) / sizeof(char *); | ||
575 | if (state < num_states) { | ||
576 | seq_printf(m, "%s\t", | ||
577 | enclosure_switch[state]); | ||
578 | have_strings = 1; | ||
579 | } | ||
580 | break; | ||
581 | case THERMAL_SENSOR: | ||
582 | seq_printf(m, "Temp. (C/F):\t"); | ||
583 | temperature = 1; | ||
584 | break; | ||
585 | case LID_STATUS: | ||
586 | seq_printf(m, "Lid status:\t"); | ||
587 | num_states = sizeof(lid_status) / sizeof(char *); | ||
588 | if (state < num_states) { | ||
589 | seq_printf(m, "%s\t", lid_status[state]); | ||
590 | have_strings = 1; | ||
591 | } | ||
592 | break; | ||
593 | case POWER_SOURCE: | ||
594 | seq_printf(m, "Power source:\t"); | ||
595 | num_states = sizeof(power_source) / sizeof(char *); | ||
596 | if (state < num_states) { | ||
597 | seq_printf(m, "%s\t", | ||
598 | power_source[state]); | ||
599 | have_strings = 1; | ||
600 | } | ||
601 | break; | ||
602 | case BATTERY_VOLTAGE: | ||
603 | seq_printf(m, "Battery voltage:\t"); | ||
604 | break; | ||
605 | case BATTERY_REMAINING: | ||
606 | seq_printf(m, "Battery remaining:\t"); | ||
607 | num_states = sizeof(battery_remaining) / sizeof(char *); | ||
608 | if (state < num_states) | ||
609 | { | ||
610 | seq_printf(m, "%s\t", | ||
611 | battery_remaining[state]); | ||
612 | have_strings = 1; | ||
613 | } | ||
614 | break; | ||
615 | case BATTERY_PERCENTAGE: | ||
616 | seq_printf(m, "Battery percentage:\t"); | ||
617 | break; | ||
618 | case EPOW_SENSOR: | ||
619 | seq_printf(m, "EPOW Sensor:\t"); | ||
620 | num_states = sizeof(epow_sensor) / sizeof(char *); | ||
621 | if (state < num_states) { | ||
622 | seq_printf(m, "%s\t", epow_sensor[state]); | ||
623 | have_strings = 1; | ||
624 | } | ||
625 | break; | ||
626 | case BATTERY_CYCLESTATE: | ||
627 | seq_printf(m, "Battery cyclestate:\t"); | ||
628 | num_states = sizeof(battery_cyclestate) / | ||
629 | sizeof(char *); | ||
630 | if (state < num_states) { | ||
631 | seq_printf(m, "%s\t", | ||
632 | battery_cyclestate[state]); | ||
633 | have_strings = 1; | ||
634 | } | ||
635 | break; | ||
636 | case BATTERY_CHARGING: | ||
637 | seq_printf(m, "Battery Charging:\t"); | ||
638 | num_states = sizeof(battery_charging) / sizeof(char *); | ||
639 | if (state < num_states) { | ||
640 | seq_printf(m, "%s\t", | ||
641 | battery_charging[state]); | ||
642 | have_strings = 1; | ||
643 | } | ||
644 | break; | ||
645 | case IBM_SURVEILLANCE: | ||
646 | seq_printf(m, "Surveillance:\t"); | ||
647 | break; | ||
648 | case IBM_FANRPM: | ||
649 | seq_printf(m, "Fan (rpm):\t"); | ||
650 | break; | ||
651 | case IBM_VOLTAGE: | ||
652 | seq_printf(m, "Voltage (mv):\t"); | ||
653 | break; | ||
654 | case IBM_DRCONNECTOR: | ||
655 | seq_printf(m, "DR connector:\t"); | ||
656 | num_states = sizeof(ibm_drconnector) / sizeof(char *); | ||
657 | if (state < num_states) { | ||
658 | seq_printf(m, "%s\t", | ||
659 | ibm_drconnector[state]); | ||
660 | have_strings = 1; | ||
661 | } | ||
662 | break; | ||
663 | case IBM_POWERSUPPLY: | ||
664 | seq_printf(m, "Powersupply:\t"); | ||
665 | break; | ||
666 | default: | ||
667 | seq_printf(m, "Unknown sensor (type %d), ignoring it\n", | ||
668 | s->token); | ||
669 | unknown = 1; | ||
670 | have_strings = 1; | ||
671 | break; | ||
672 | } | ||
673 | if (have_strings == 0) { | ||
674 | if (temperature) { | ||
675 | seq_printf(m, "%4d /%4d\t", state, cel_to_fahr(state)); | ||
676 | } else | ||
677 | seq_printf(m, "%10d\t", state); | ||
678 | } | ||
679 | if (unknown == 0) { | ||
680 | seq_printf(m, "%s\t", ppc_rtas_process_error(error)); | ||
681 | get_location_code(m, s, loc); | ||
682 | } | ||
683 | } | ||
684 | |||
685 | /* ****************************************************************** */ | ||
686 | |||
687 | static void check_location(struct seq_file *m, char *c) | ||
688 | { | ||
689 | switch (c[0]) { | ||
690 | case LOC_PLANAR: | ||
691 | seq_printf(m, "Planar #%c", c[1]); | ||
692 | break; | ||
693 | case LOC_CPU: | ||
694 | seq_printf(m, "CPU #%c", c[1]); | ||
695 | break; | ||
696 | case LOC_FAN: | ||
697 | seq_printf(m, "Fan #%c", c[1]); | ||
698 | break; | ||
699 | case LOC_RACKMOUNTED: | ||
700 | seq_printf(m, "Rack #%c", c[1]); | ||
701 | break; | ||
702 | case LOC_VOLTAGE: | ||
703 | seq_printf(m, "Voltage #%c", c[1]); | ||
704 | break; | ||
705 | case LOC_LCD: | ||
706 | seq_printf(m, "LCD #%c", c[1]); | ||
707 | break; | ||
708 | case '.': | ||
709 | seq_printf(m, "- %c", c[1]); | ||
710 | break; | ||
711 | default: | ||
712 | seq_printf(m, "Unknown location"); | ||
713 | break; | ||
714 | } | ||
715 | } | ||
716 | |||
717 | |||
718 | /* ****************************************************************** */ | ||
719 | /* | ||
720 | * Format: | ||
721 | * ${LETTER}${NUMBER}[[-/]${LETTER}${NUMBER} [ ... ] ] | ||
722 | * the '.' may be an abbrevation | ||
723 | */ | ||
724 | static void check_location_string(struct seq_file *m, char *c) | ||
725 | { | ||
726 | while (*c) { | ||
727 | if (isalpha(*c) || *c == '.') | ||
728 | check_location(m, c); | ||
729 | else if (*c == '/' || *c == '-') | ||
730 | seq_printf(m, " at "); | ||
731 | c++; | ||
732 | } | ||
733 | } | ||
734 | |||
735 | |||
736 | /* ****************************************************************** */ | ||
737 | |||
738 | static void get_location_code(struct seq_file *m, struct individual_sensor *s, char *loc) | ||
739 | { | ||
740 | if (!loc || !*loc) { | ||
741 | seq_printf(m, "---");/* does not have a location */ | ||
742 | } else { | ||
743 | check_location_string(m, loc); | ||
744 | } | ||
745 | seq_putc(m, ' '); | ||
746 | } | ||
747 | /* ****************************************************************** */ | ||
748 | /* INDICATORS - Tone Frequency */ | ||
749 | /* ****************************************************************** */ | ||
750 | static ssize_t ppc_rtas_tone_freq_write(struct file *file, | ||
751 | const char __user *buf, size_t count, loff_t *ppos) | ||
752 | { | ||
753 | unsigned long freq; | ||
754 | int error = parse_number(buf, count, &freq); | ||
755 | if (error) | ||
756 | return error; | ||
757 | |||
758 | rtas_tone_frequency = freq; /* save it for later */ | ||
759 | error = rtas_call(rtas_token("set-indicator"), 3, 1, NULL, | ||
760 | TONE_FREQUENCY, 0, freq); | ||
761 | if (error) | ||
762 | printk(KERN_WARNING "error: setting tone frequency returned: %s\n", | ||
763 | ppc_rtas_process_error(error)); | ||
764 | return count; | ||
765 | } | ||
766 | /* ****************************************************************** */ | ||
767 | static int ppc_rtas_tone_freq_show(struct seq_file *m, void *v) | ||
768 | { | ||
769 | seq_printf(m, "%lu\n", rtas_tone_frequency); | ||
770 | return 0; | ||
771 | } | ||
772 | /* ****************************************************************** */ | ||
773 | /* INDICATORS - Tone Volume */ | ||
774 | /* ****************************************************************** */ | ||
775 | static ssize_t ppc_rtas_tone_volume_write(struct file *file, | ||
776 | const char __user *buf, size_t count, loff_t *ppos) | ||
777 | { | ||
778 | unsigned long volume; | ||
779 | int error = parse_number(buf, count, &volume); | ||
780 | if (error) | ||
781 | return error; | ||
782 | |||
783 | if (volume > 100) | ||
784 | volume = 100; | ||
785 | |||
786 | rtas_tone_volume = volume; /* save it for later */ | ||
787 | error = rtas_call(rtas_token("set-indicator"), 3, 1, NULL, | ||
788 | TONE_VOLUME, 0, volume); | ||
789 | if (error) | ||
790 | printk(KERN_WARNING "error: setting tone volume returned: %s\n", | ||
791 | ppc_rtas_process_error(error)); | ||
792 | return count; | ||
793 | } | ||
794 | /* ****************************************************************** */ | ||
795 | static int ppc_rtas_tone_volume_show(struct seq_file *m, void *v) | ||
796 | { | ||
797 | seq_printf(m, "%lu\n", rtas_tone_volume); | ||
798 | return 0; | ||
799 | } | ||
800 | |||
801 | #define RMO_READ_BUF_MAX 30 | ||
802 | |||
803 | /* RTAS Userspace access */ | ||
804 | static int ppc_rtas_rmo_buf_show(struct seq_file *m, void *v) | ||
805 | { | ||
806 | seq_printf(m, "%016lx %x\n", rtas_rmo_buf, RTAS_RMOBUF_MAX); | ||
807 | return 0; | ||
808 | } | ||
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 4d22eeeeb91d..b7fc2d884950 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -43,6 +43,13 @@ char rtas_data_buf[RTAS_DATA_BUF_SIZE] __cacheline_aligned; | |||
43 | unsigned long rtas_rmo_buf; | 43 | unsigned long rtas_rmo_buf; |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * If non-NULL, this gets called when the kernel terminates. | ||
47 | * This is done like this so rtas_flash can be a module. | ||
48 | */ | ||
49 | void (*rtas_flash_term_hook)(int); | ||
50 | EXPORT_SYMBOL(rtas_flash_term_hook); | ||
51 | |||
52 | /* | ||
46 | * call_rtas_display_status and call_rtas_display_status_delay | 53 | * call_rtas_display_status and call_rtas_display_status_delay |
47 | * are designed only for very early low-level debugging, which | 54 | * are designed only for very early low-level debugging, which |
48 | * is why the token is hard-coded to 10. | 55 | * is why the token is hard-coded to 10. |
@@ -206,6 +213,7 @@ void rtas_progress(char *s, unsigned short hex) | |||
206 | 213 | ||
207 | spin_unlock(&progress_lock); | 214 | spin_unlock(&progress_lock); |
208 | } | 215 | } |
216 | EXPORT_SYMBOL(rtas_progress); /* needed by rtas_flash module */ | ||
209 | 217 | ||
210 | int rtas_token(const char *service) | 218 | int rtas_token(const char *service) |
211 | { | 219 | { |
@@ -492,6 +500,8 @@ int rtas_set_indicator(int indicator, int index, int new_value) | |||
492 | 500 | ||
493 | void rtas_restart(char *cmd) | 501 | void rtas_restart(char *cmd) |
494 | { | 502 | { |
503 | if (rtas_flash_term_hook) | ||
504 | rtas_flash_term_hook(SYS_RESTART); | ||
495 | printk("RTAS system-reboot returned %d\n", | 505 | printk("RTAS system-reboot returned %d\n", |
496 | rtas_call(rtas_token("system-reboot"), 0, 1, NULL)); | 506 | rtas_call(rtas_token("system-reboot"), 0, 1, NULL)); |
497 | for (;;); | 507 | for (;;); |
@@ -499,6 +509,8 @@ void rtas_restart(char *cmd) | |||
499 | 509 | ||
500 | void rtas_power_off(void) | 510 | void rtas_power_off(void) |
501 | { | 511 | { |
512 | if (rtas_flash_term_hook) | ||
513 | rtas_flash_term_hook(SYS_POWER_OFF); | ||
502 | /* allow power on only with power button press */ | 514 | /* allow power on only with power button press */ |
503 | printk("RTAS power-off returned %d\n", | 515 | printk("RTAS power-off returned %d\n", |
504 | rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1)); | 516 | rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1)); |
@@ -507,7 +519,12 @@ void rtas_power_off(void) | |||
507 | 519 | ||
508 | void rtas_halt(void) | 520 | void rtas_halt(void) |
509 | { | 521 | { |
510 | rtas_power_off(); | 522 | if (rtas_flash_term_hook) |
523 | rtas_flash_term_hook(SYS_HALT); | ||
524 | /* allow power on only with power button press */ | ||
525 | printk("RTAS power-off returned %d\n", | ||
526 | rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1)); | ||
527 | for (;;); | ||
511 | } | 528 | } |
512 | 529 | ||
513 | /* Must be in the RMO region, so we place it here */ | 530 | /* Must be in the RMO region, so we place it here */ |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c new file mode 100644 index 000000000000..50500093c97f --- /dev/null +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -0,0 +1,834 @@ | |||
1 | /* | ||
2 | * c 2001 PPC 64 Team, IBM Corp | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * /proc/ppc64/rtas/firmware_flash interface | ||
10 | * | ||
11 | * This file implements a firmware_flash interface to pump a firmware | ||
12 | * image into the kernel. At reboot time rtas_restart() will see the | ||
13 | * firmware image and flash it as it reboots (see rtas.c). | ||
14 | */ | ||
15 | |||
16 | #include <linux/module.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/proc_fs.h> | ||
19 | #include <asm/delay.h> | ||
20 | #include <asm/uaccess.h> | ||
21 | #include <asm/rtas.h> | ||
22 | #include <asm/abs_addr.h> | ||
23 | |||
24 | #define MODULE_VERS "1.0" | ||
25 | #define MODULE_NAME "rtas_flash" | ||
26 | |||
27 | #define FIRMWARE_FLASH_NAME "firmware_flash" | ||
28 | #define FIRMWARE_UPDATE_NAME "firmware_update" | ||
29 | #define MANAGE_FLASH_NAME "manage_flash" | ||
30 | #define VALIDATE_FLASH_NAME "validate_flash" | ||
31 | |||
32 | /* General RTAS Status Codes */ | ||
33 | #define RTAS_RC_SUCCESS 0 | ||
34 | #define RTAS_RC_HW_ERR -1 | ||
35 | #define RTAS_RC_BUSY -2 | ||
36 | |||
37 | /* Flash image status values */ | ||
38 | #define FLASH_AUTH -9002 /* RTAS Not Service Authority Partition */ | ||
39 | #define FLASH_NO_OP -1099 /* No operation initiated by user */ | ||
40 | #define FLASH_IMG_SHORT -1005 /* Flash image shorter than expected */ | ||
41 | #define FLASH_IMG_BAD_LEN -1004 /* Bad length value in flash list block */ | ||
42 | #define FLASH_IMG_NULL_DATA -1003 /* Bad data value in flash list block */ | ||
43 | #define FLASH_IMG_READY 0 /* Firmware img ready for flash on reboot */ | ||
44 | |||
45 | /* Manage image status values */ | ||
46 | #define MANAGE_AUTH -9002 /* RTAS Not Service Authority Partition */ | ||
47 | #define MANAGE_ACTIVE_ERR -9001 /* RTAS Cannot Overwrite Active Img */ | ||
48 | #define MANAGE_NO_OP -1099 /* No operation initiated by user */ | ||
49 | #define MANAGE_PARAM_ERR -3 /* RTAS Parameter Error */ | ||
50 | #define MANAGE_HW_ERR -1 /* RTAS Hardware Error */ | ||
51 | |||
52 | /* Validate image status values */ | ||
53 | #define VALIDATE_AUTH -9002 /* RTAS Not Service Authority Partition */ | ||
54 | #define VALIDATE_NO_OP -1099 /* No operation initiated by the user */ | ||
55 | #define VALIDATE_INCOMPLETE -1002 /* User copied < VALIDATE_BUF_SIZE */ | ||
56 | #define VALIDATE_READY -1001 /* Firmware image ready for validation */ | ||
57 | #define VALIDATE_PARAM_ERR -3 /* RTAS Parameter Error */ | ||
58 | #define VALIDATE_HW_ERR -1 /* RTAS Hardware Error */ | ||
59 | #define VALIDATE_TMP_UPDATE 0 /* Validate Return Status */ | ||
60 | #define VALIDATE_FLASH_AUTH 1 /* Validate Return Status */ | ||
61 | #define VALIDATE_INVALID_IMG 2 /* Validate Return Status */ | ||
62 | #define VALIDATE_CUR_UNKNOWN 3 /* Validate Return Status */ | ||
63 | #define VALIDATE_TMP_COMMIT_DL 4 /* Validate Return Status */ | ||
64 | #define VALIDATE_TMP_COMMIT 5 /* Validate Return Status */ | ||
65 | #define VALIDATE_TMP_UPDATE_DL 6 /* Validate Return Status */ | ||
66 | |||
67 | /* ibm,manage-flash-image operation tokens */ | ||
68 | #define RTAS_REJECT_TMP_IMG 0 | ||
69 | #define RTAS_COMMIT_TMP_IMG 1 | ||
70 | |||
71 | /* Array sizes */ | ||
72 | #define VALIDATE_BUF_SIZE 4096 | ||
73 | #define RTAS_MSG_MAXLEN 64 | ||
74 | |||
75 | struct flash_block { | ||
76 | char *data; | ||
77 | unsigned long length; | ||
78 | }; | ||
79 | |||
80 | /* This struct is very similar but not identical to | ||
81 | * that needed by the rtas flash update. | ||
82 | * All we need to do for rtas is rewrite num_blocks | ||
83 | * into a version/length and translate the pointers | ||
84 | * to absolute. | ||
85 | */ | ||
86 | #define FLASH_BLOCKS_PER_NODE ((PAGE_SIZE - 16) / sizeof(struct flash_block)) | ||
87 | struct flash_block_list { | ||
88 | unsigned long num_blocks; | ||
89 | struct flash_block_list *next; | ||
90 | struct flash_block blocks[FLASH_BLOCKS_PER_NODE]; | ||
91 | }; | ||
92 | struct flash_block_list_header { /* just the header of flash_block_list */ | ||
93 | unsigned long num_blocks; | ||
94 | struct flash_block_list *next; | ||
95 | }; | ||
96 | |||
97 | static struct flash_block_list_header rtas_firmware_flash_list = {0, NULL}; | ||
98 | |||
99 | #define FLASH_BLOCK_LIST_VERSION (1UL) | ||
100 | |||
101 | /* Local copy of the flash block list. | ||
102 | * We only allow one open of the flash proc file and create this | ||
103 | * list as we go. This list will be put in the | ||
104 | * rtas_firmware_flash_list var once it is fully read. | ||
105 | * | ||
106 | * For convenience as we build the list we use virtual addrs, | ||
107 | * we do not fill in the version number, and the length field | ||
108 | * is treated as the number of entries currently in the block | ||
109 | * (i.e. not a byte count). This is all fixed on release. | ||
110 | */ | ||
111 | |||
112 | /* Status int must be first member of struct */ | ||
113 | struct rtas_update_flash_t | ||
114 | { | ||
115 | int status; /* Flash update status */ | ||
116 | struct flash_block_list *flist; /* Local copy of flash block list */ | ||
117 | }; | ||
118 | |||
119 | /* Status int must be first member of struct */ | ||
120 | struct rtas_manage_flash_t | ||
121 | { | ||
122 | int status; /* Returned status */ | ||
123 | unsigned int op; /* Reject or commit image */ | ||
124 | }; | ||
125 | |||
126 | /* Status int must be first member of struct */ | ||
127 | struct rtas_validate_flash_t | ||
128 | { | ||
129 | int status; /* Returned status */ | ||
130 | char buf[VALIDATE_BUF_SIZE]; /* Candidate image buffer */ | ||
131 | unsigned int buf_size; /* Size of image buf */ | ||
132 | unsigned int update_results; /* Update results token */ | ||
133 | }; | ||
134 | |||
135 | static DEFINE_SPINLOCK(flash_file_open_lock); | ||
136 | static struct proc_dir_entry *firmware_flash_pde; | ||
137 | static struct proc_dir_entry *firmware_update_pde; | ||
138 | static struct proc_dir_entry *validate_pde; | ||
139 | static struct proc_dir_entry *manage_pde; | ||
140 | |||
141 | /* Do simple sanity checks on the flash image. */ | ||
142 | static int flash_list_valid(struct flash_block_list *flist) | ||
143 | { | ||
144 | struct flash_block_list *f; | ||
145 | int i; | ||
146 | unsigned long block_size, image_size; | ||
147 | |||
148 | /* Paranoid self test here. We also collect the image size. */ | ||
149 | image_size = 0; | ||
150 | for (f = flist; f; f = f->next) { | ||
151 | for (i = 0; i < f->num_blocks; i++) { | ||
152 | if (f->blocks[i].data == NULL) { | ||
153 | return FLASH_IMG_NULL_DATA; | ||
154 | } | ||
155 | block_size = f->blocks[i].length; | ||
156 | if (block_size <= 0 || block_size > PAGE_SIZE) { | ||
157 | return FLASH_IMG_BAD_LEN; | ||
158 | } | ||
159 | image_size += block_size; | ||
160 | } | ||
161 | } | ||
162 | |||
163 | if (image_size < (256 << 10)) { | ||
164 | if (image_size < 2) | ||
165 | return FLASH_NO_OP; | ||
166 | } | ||
167 | |||
168 | printk(KERN_INFO "FLASH: flash image with %ld bytes stored for hardware flash on reboot\n", image_size); | ||
169 | |||
170 | return FLASH_IMG_READY; | ||
171 | } | ||
172 | |||
173 | static void free_flash_list(struct flash_block_list *f) | ||
174 | { | ||
175 | struct flash_block_list *next; | ||
176 | int i; | ||
177 | |||
178 | while (f) { | ||
179 | for (i = 0; i < f->num_blocks; i++) | ||
180 | free_page((unsigned long)(f->blocks[i].data)); | ||
181 | next = f->next; | ||
182 | free_page((unsigned long)f); | ||
183 | f = next; | ||
184 | } | ||
185 | } | ||
186 | |||
187 | static int rtas_flash_release(struct inode *inode, struct file *file) | ||
188 | { | ||
189 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | ||
190 | struct rtas_update_flash_t *uf; | ||
191 | |||
192 | uf = (struct rtas_update_flash_t *) dp->data; | ||
193 | if (uf->flist) { | ||
194 | /* File was opened in write mode for a new flash attempt */ | ||
195 | /* Clear saved list */ | ||
196 | if (rtas_firmware_flash_list.next) { | ||
197 | free_flash_list(rtas_firmware_flash_list.next); | ||
198 | rtas_firmware_flash_list.next = NULL; | ||
199 | } | ||
200 | |||
201 | if (uf->status != FLASH_AUTH) | ||
202 | uf->status = flash_list_valid(uf->flist); | ||
203 | |||
204 | if (uf->status == FLASH_IMG_READY) | ||
205 | rtas_firmware_flash_list.next = uf->flist; | ||
206 | else | ||
207 | free_flash_list(uf->flist); | ||
208 | |||
209 | uf->flist = NULL; | ||
210 | } | ||
211 | |||
212 | atomic_dec(&dp->count); | ||
213 | return 0; | ||
214 | } | ||
215 | |||
216 | static void get_flash_status_msg(int status, char *buf) | ||
217 | { | ||
218 | char *msg; | ||
219 | |||
220 | switch (status) { | ||
221 | case FLASH_AUTH: | ||
222 | msg = "error: this partition does not have service authority\n"; | ||
223 | break; | ||
224 | case FLASH_NO_OP: | ||
225 | msg = "info: no firmware image for flash\n"; | ||
226 | break; | ||
227 | case FLASH_IMG_SHORT: | ||
228 | msg = "error: flash image short\n"; | ||
229 | break; | ||
230 | case FLASH_IMG_BAD_LEN: | ||
231 | msg = "error: internal error bad length\n"; | ||
232 | break; | ||
233 | case FLASH_IMG_NULL_DATA: | ||
234 | msg = "error: internal error null data\n"; | ||
235 | break; | ||
236 | case FLASH_IMG_READY: | ||
237 | msg = "ready: firmware image ready for flash on reboot\n"; | ||
238 | break; | ||
239 | default: | ||
240 | sprintf(buf, "error: unexpected status value %d\n", status); | ||
241 | return; | ||
242 | } | ||
243 | |||
244 | strcpy(buf, msg); | ||
245 | } | ||
246 | |||
247 | /* Reading the proc file will show status (not the firmware contents) */ | ||
248 | static ssize_t rtas_flash_read(struct file *file, char __user *buf, | ||
249 | size_t count, loff_t *ppos) | ||
250 | { | ||
251 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | ||
252 | struct rtas_update_flash_t *uf; | ||
253 | char msg[RTAS_MSG_MAXLEN]; | ||
254 | int msglen; | ||
255 | |||
256 | uf = (struct rtas_update_flash_t *) dp->data; | ||
257 | |||
258 | if (!strcmp(dp->name, FIRMWARE_FLASH_NAME)) { | ||
259 | get_flash_status_msg(uf->status, msg); | ||
260 | } else { /* FIRMWARE_UPDATE_NAME */ | ||
261 | sprintf(msg, "%d\n", uf->status); | ||
262 | } | ||
263 | msglen = strlen(msg); | ||
264 | if (msglen > count) | ||
265 | msglen = count; | ||
266 | |||
267 | if (ppos && *ppos != 0) | ||
268 | return 0; /* be cheap */ | ||
269 | |||
270 | if (!access_ok(VERIFY_WRITE, buf, msglen)) | ||
271 | return -EINVAL; | ||
272 | |||
273 | if (copy_to_user(buf, msg, msglen)) | ||
274 | return -EFAULT; | ||
275 | |||
276 | if (ppos) | ||
277 | *ppos = msglen; | ||
278 | return msglen; | ||
279 | } | ||
280 | |||
281 | /* We could be much more efficient here. But to keep this function | ||
282 | * simple we allocate a page to the block list no matter how small the | ||
283 | * count is. If the system is low on memory it will be just as well | ||
284 | * that we fail.... | ||
285 | */ | ||
286 | static ssize_t rtas_flash_write(struct file *file, const char __user *buffer, | ||
287 | size_t count, loff_t *off) | ||
288 | { | ||
289 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | ||
290 | struct rtas_update_flash_t *uf; | ||
291 | char *p; | ||
292 | int next_free; | ||
293 | struct flash_block_list *fl; | ||
294 | |||
295 | uf = (struct rtas_update_flash_t *) dp->data; | ||
296 | |||
297 | if (uf->status == FLASH_AUTH || count == 0) | ||
298 | return count; /* discard data */ | ||
299 | |||
300 | /* In the case that the image is not ready for flashing, the memory | ||
301 | * allocated for the block list will be freed upon the release of the | ||
302 | * proc file | ||
303 | */ | ||
304 | if (uf->flist == NULL) { | ||
305 | uf->flist = (struct flash_block_list *) get_zeroed_page(GFP_KERNEL); | ||
306 | if (!uf->flist) | ||
307 | return -ENOMEM; | ||
308 | } | ||
309 | |||
310 | fl = uf->flist; | ||
311 | while (fl->next) | ||
312 | fl = fl->next; /* seek to last block_list for append */ | ||
313 | next_free = fl->num_blocks; | ||
314 | if (next_free == FLASH_BLOCKS_PER_NODE) { | ||
315 | /* Need to allocate another block_list */ | ||
316 | fl->next = (struct flash_block_list *)get_zeroed_page(GFP_KERNEL); | ||
317 | if (!fl->next) | ||
318 | return -ENOMEM; | ||
319 | fl = fl->next; | ||
320 | next_free = 0; | ||
321 | } | ||
322 | |||
323 | if (count > PAGE_SIZE) | ||
324 | count = PAGE_SIZE; | ||
325 | p = (char *)get_zeroed_page(GFP_KERNEL); | ||
326 | if (!p) | ||
327 | return -ENOMEM; | ||
328 | |||
329 | if(copy_from_user(p, buffer, count)) { | ||
330 | free_page((unsigned long)p); | ||
331 | return -EFAULT; | ||
332 | } | ||
333 | fl->blocks[next_free].data = p; | ||
334 | fl->blocks[next_free].length = count; | ||
335 | fl->num_blocks++; | ||
336 | |||
337 | return count; | ||
338 | } | ||
339 | |||
340 | static int rtas_excl_open(struct inode *inode, struct file *file) | ||
341 | { | ||
342 | struct proc_dir_entry *dp = PDE(inode); | ||
343 | |||
344 | /* Enforce exclusive open with use count of PDE */ | ||
345 | spin_lock(&flash_file_open_lock); | ||
346 | if (atomic_read(&dp->count) > 1) { | ||
347 | spin_unlock(&flash_file_open_lock); | ||
348 | return -EBUSY; | ||
349 | } | ||
350 | |||
351 | atomic_inc(&dp->count); | ||
352 | spin_unlock(&flash_file_open_lock); | ||
353 | |||
354 | return 0; | ||
355 | } | ||
356 | |||
357 | static int rtas_excl_release(struct inode *inode, struct file *file) | ||
358 | { | ||
359 | struct proc_dir_entry *dp = PDE(inode); | ||
360 | |||
361 | atomic_dec(&dp->count); | ||
362 | |||
363 | return 0; | ||
364 | } | ||
365 | |||
366 | static void manage_flash(struct rtas_manage_flash_t *args_buf) | ||
367 | { | ||
368 | unsigned int wait_time; | ||
369 | s32 rc; | ||
370 | |||
371 | while (1) { | ||
372 | rc = rtas_call(rtas_token("ibm,manage-flash-image"), 1, | ||
373 | 1, NULL, args_buf->op); | ||
374 | if (rc == RTAS_RC_BUSY) | ||
375 | udelay(1); | ||
376 | else if (rtas_is_extended_busy(rc)) { | ||
377 | wait_time = rtas_extended_busy_delay_time(rc); | ||
378 | udelay(wait_time * 1000); | ||
379 | } else | ||
380 | break; | ||
381 | } | ||
382 | |||
383 | args_buf->status = rc; | ||
384 | } | ||
385 | |||
386 | static ssize_t manage_flash_read(struct file *file, char __user *buf, | ||
387 | size_t count, loff_t *ppos) | ||
388 | { | ||
389 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | ||
390 | struct rtas_manage_flash_t *args_buf; | ||
391 | char msg[RTAS_MSG_MAXLEN]; | ||
392 | int msglen; | ||
393 | |||
394 | args_buf = (struct rtas_manage_flash_t *) dp->data; | ||
395 | if (args_buf == NULL) | ||
396 | return 0; | ||
397 | |||
398 | msglen = sprintf(msg, "%d\n", args_buf->status); | ||
399 | if (msglen > count) | ||
400 | msglen = count; | ||
401 | |||
402 | if (ppos && *ppos != 0) | ||
403 | return 0; /* be cheap */ | ||
404 | |||
405 | if (!access_ok(VERIFY_WRITE, buf, msglen)) | ||
406 | return -EINVAL; | ||
407 | |||
408 | if (copy_to_user(buf, msg, msglen)) | ||
409 | return -EFAULT; | ||
410 | |||
411 | if (ppos) | ||
412 | *ppos = msglen; | ||
413 | return msglen; | ||
414 | } | ||
415 | |||
416 | static ssize_t manage_flash_write(struct file *file, const char __user *buf, | ||
417 | size_t count, loff_t *off) | ||
418 | { | ||
419 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | ||
420 | struct rtas_manage_flash_t *args_buf; | ||
421 | const char reject_str[] = "0"; | ||
422 | const char commit_str[] = "1"; | ||
423 | char stkbuf[10]; | ||
424 | int op; | ||
425 | |||
426 | args_buf = (struct rtas_manage_flash_t *) dp->data; | ||
427 | if ((args_buf->status == MANAGE_AUTH) || (count == 0)) | ||
428 | return count; | ||
429 | |||
430 | op = -1; | ||
431 | if (buf) { | ||
432 | if (count > 9) count = 9; | ||
433 | if (copy_from_user (stkbuf, buf, count)) { | ||
434 | return -EFAULT; | ||
435 | } | ||
436 | if (strncmp(stkbuf, reject_str, strlen(reject_str)) == 0) | ||
437 | op = RTAS_REJECT_TMP_IMG; | ||
438 | else if (strncmp(stkbuf, commit_str, strlen(commit_str)) == 0) | ||
439 | op = RTAS_COMMIT_TMP_IMG; | ||
440 | } | ||
441 | |||
442 | if (op == -1) /* buf is empty, or contains invalid string */ | ||
443 | return -EINVAL; | ||
444 | |||
445 | args_buf->op = op; | ||
446 | manage_flash(args_buf); | ||
447 | |||
448 | return count; | ||
449 | } | ||
450 | |||
451 | static void validate_flash(struct rtas_validate_flash_t *args_buf) | ||
452 | { | ||
453 | int token = rtas_token("ibm,validate-flash-image"); | ||
454 | unsigned int wait_time; | ||
455 | int update_results; | ||
456 | s32 rc; | ||
457 | |||
458 | rc = 0; | ||
459 | while(1) { | ||
460 | spin_lock(&rtas_data_buf_lock); | ||
461 | memcpy(rtas_data_buf, args_buf->buf, VALIDATE_BUF_SIZE); | ||
462 | rc = rtas_call(token, 2, 2, &update_results, | ||
463 | (u32) __pa(rtas_data_buf), args_buf->buf_size); | ||
464 | memcpy(args_buf->buf, rtas_data_buf, VALIDATE_BUF_SIZE); | ||
465 | spin_unlock(&rtas_data_buf_lock); | ||
466 | |||
467 | if (rc == RTAS_RC_BUSY) | ||
468 | udelay(1); | ||
469 | else if (rtas_is_extended_busy(rc)) { | ||
470 | wait_time = rtas_extended_busy_delay_time(rc); | ||
471 | udelay(wait_time * 1000); | ||
472 | } else | ||
473 | break; | ||
474 | } | ||
475 | |||
476 | args_buf->status = rc; | ||
477 | args_buf->update_results = update_results; | ||
478 | } | ||
479 | |||
480 | static int get_validate_flash_msg(struct rtas_validate_flash_t *args_buf, | ||
481 | char *msg) | ||
482 | { | ||
483 | int n; | ||
484 | |||
485 | if (args_buf->status >= VALIDATE_TMP_UPDATE) { | ||
486 | n = sprintf(msg, "%d\n", args_buf->update_results); | ||
487 | if ((args_buf->update_results >= VALIDATE_CUR_UNKNOWN) || | ||
488 | (args_buf->update_results == VALIDATE_TMP_UPDATE)) | ||
489 | n += sprintf(msg + n, "%s\n", args_buf->buf); | ||
490 | } else { | ||
491 | n = sprintf(msg, "%d\n", args_buf->status); | ||
492 | } | ||
493 | return n; | ||
494 | } | ||
495 | |||
496 | static ssize_t validate_flash_read(struct file *file, char __user *buf, | ||
497 | size_t count, loff_t *ppos) | ||
498 | { | ||
499 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | ||
500 | struct rtas_validate_flash_t *args_buf; | ||
501 | char msg[RTAS_MSG_MAXLEN]; | ||
502 | int msglen; | ||
503 | |||
504 | args_buf = (struct rtas_validate_flash_t *) dp->data; | ||
505 | |||
506 | if (ppos && *ppos != 0) | ||
507 | return 0; /* be cheap */ | ||
508 | |||
509 | msglen = get_validate_flash_msg(args_buf, msg); | ||
510 | if (msglen > count) | ||
511 | msglen = count; | ||
512 | |||
513 | if (!access_ok(VERIFY_WRITE, buf, msglen)) | ||
514 | return -EINVAL; | ||
515 | |||
516 | if (copy_to_user(buf, msg, msglen)) | ||
517 | return -EFAULT; | ||
518 | |||
519 | if (ppos) | ||
520 | *ppos = msglen; | ||
521 | return msglen; | ||
522 | } | ||
523 | |||
524 | static ssize_t validate_flash_write(struct file *file, const char __user *buf, | ||
525 | size_t count, loff_t *off) | ||
526 | { | ||
527 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | ||
528 | struct rtas_validate_flash_t *args_buf; | ||
529 | int rc; | ||
530 | |||
531 | args_buf = (struct rtas_validate_flash_t *) dp->data; | ||
532 | |||
533 | if (dp->data == NULL) { | ||
534 | dp->data = kmalloc(sizeof(struct rtas_validate_flash_t), | ||
535 | GFP_KERNEL); | ||
536 | if (dp->data == NULL) | ||
537 | return -ENOMEM; | ||
538 | } | ||
539 | |||
540 | /* We are only interested in the first 4K of the | ||
541 | * candidate image */ | ||
542 | if ((*off >= VALIDATE_BUF_SIZE) || | ||
543 | (args_buf->status == VALIDATE_AUTH)) { | ||
544 | *off += count; | ||
545 | return count; | ||
546 | } | ||
547 | |||
548 | if (*off + count >= VALIDATE_BUF_SIZE) { | ||
549 | count = VALIDATE_BUF_SIZE - *off; | ||
550 | args_buf->status = VALIDATE_READY; | ||
551 | } else { | ||
552 | args_buf->status = VALIDATE_INCOMPLETE; | ||
553 | } | ||
554 | |||
555 | if (!access_ok(VERIFY_READ, buf, count)) { | ||
556 | rc = -EFAULT; | ||
557 | goto done; | ||
558 | } | ||
559 | if (copy_from_user(args_buf->buf + *off, buf, count)) { | ||
560 | rc = -EFAULT; | ||
561 | goto done; | ||
562 | } | ||
563 | |||
564 | *off += count; | ||
565 | rc = count; | ||
566 | done: | ||
567 | if (rc < 0) { | ||
568 | kfree(dp->data); | ||
569 | dp->data = NULL; | ||
570 | } | ||
571 | return rc; | ||
572 | } | ||
573 | |||
574 | static int validate_flash_release(struct inode *inode, struct file *file) | ||
575 | { | ||
576 | struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); | ||
577 | struct rtas_validate_flash_t *args_buf; | ||
578 | |||
579 | args_buf = (struct rtas_validate_flash_t *) dp->data; | ||
580 | |||
581 | if (args_buf->status == VALIDATE_READY) { | ||
582 | args_buf->buf_size = VALIDATE_BUF_SIZE; | ||
583 | validate_flash(args_buf); | ||
584 | } | ||
585 | |||
586 | /* The matching atomic_inc was in rtas_excl_open() */ | ||
587 | atomic_dec(&dp->count); | ||
588 | |||
589 | return 0; | ||
590 | } | ||
591 | |||
592 | static void rtas_flash_firmware(int reboot_type) | ||
593 | { | ||
594 | unsigned long image_size; | ||
595 | struct flash_block_list *f, *next, *flist; | ||
596 | unsigned long rtas_block_list; | ||
597 | int i, status, update_token; | ||
598 | |||
599 | if (rtas_firmware_flash_list.next == NULL) | ||
600 | return; /* nothing to do */ | ||
601 | |||
602 | if (reboot_type != SYS_RESTART) { | ||
603 | printk(KERN_ALERT "FLASH: firmware flash requires a reboot\n"); | ||
604 | printk(KERN_ALERT "FLASH: the firmware image will NOT be flashed\n"); | ||
605 | return; | ||
606 | } | ||
607 | |||
608 | update_token = rtas_token("ibm,update-flash-64-and-reboot"); | ||
609 | if (update_token == RTAS_UNKNOWN_SERVICE) { | ||
610 | printk(KERN_ALERT "FLASH: ibm,update-flash-64-and-reboot " | ||
611 | "is not available -- not a service partition?\n"); | ||
612 | printk(KERN_ALERT "FLASH: firmware will not be flashed\n"); | ||
613 | return; | ||
614 | } | ||
615 | |||
616 | /* NOTE: the "first" block list is a global var with no data | ||
617 | * blocks in the kernel data segment. We do this because | ||
618 | * we want to ensure this block_list addr is under 4GB. | ||
619 | */ | ||
620 | rtas_firmware_flash_list.num_blocks = 0; | ||
621 | flist = (struct flash_block_list *)&rtas_firmware_flash_list; | ||
622 | rtas_block_list = virt_to_abs(flist); | ||
623 | if (rtas_block_list >= 4UL*1024*1024*1024) { | ||
624 | printk(KERN_ALERT "FLASH: kernel bug...flash list header addr above 4GB\n"); | ||
625 | return; | ||
626 | } | ||
627 | |||
628 | printk(KERN_ALERT "FLASH: preparing saved firmware image for flash\n"); | ||
629 | /* Update the block_list in place. */ | ||
630 | image_size = 0; | ||
631 | for (f = flist; f; f = next) { | ||
632 | /* Translate data addrs to absolute */ | ||
633 | for (i = 0; i < f->num_blocks; i++) { | ||
634 | f->blocks[i].data = (char *)virt_to_abs(f->blocks[i].data); | ||
635 | image_size += f->blocks[i].length; | ||
636 | } | ||
637 | next = f->next; | ||
638 | /* Don't translate NULL pointer for last entry */ | ||
639 | if (f->next) | ||
640 | f->next = (struct flash_block_list *)virt_to_abs(f->next); | ||
641 | else | ||
642 | f->next = NULL; | ||
643 | /* make num_blocks into the version/length field */ | ||
644 | f->num_blocks = (FLASH_BLOCK_LIST_VERSION << 56) | ((f->num_blocks+1)*16); | ||
645 | } | ||
646 | |||
647 | printk(KERN_ALERT "FLASH: flash image is %ld bytes\n", image_size); | ||
648 | printk(KERN_ALERT "FLASH: performing flash and reboot\n"); | ||
649 | rtas_progress("Flashing \n", 0x0); | ||
650 | rtas_progress("Please Wait... ", 0x0); | ||
651 | printk(KERN_ALERT "FLASH: this will take several minutes. Do not power off!\n"); | ||
652 | status = rtas_call(update_token, 1, 1, NULL, rtas_block_list); | ||
653 | switch (status) { /* should only get "bad" status */ | ||
654 | case 0: | ||
655 | printk(KERN_ALERT "FLASH: success\n"); | ||
656 | break; | ||
657 | case -1: | ||
658 | printk(KERN_ALERT "FLASH: hardware error. Firmware may not be not flashed\n"); | ||
659 | break; | ||
660 | case -3: | ||
661 | printk(KERN_ALERT "FLASH: image is corrupt or not correct for this platform. Firmware not flashed\n"); | ||
662 | break; | ||
663 | case -4: | ||
664 | printk(KERN_ALERT "FLASH: flash failed when partially complete. System may not reboot\n"); | ||
665 | break; | ||
666 | default: | ||
667 | printk(KERN_ALERT "FLASH: unknown flash return code %d\n", status); | ||
668 | break; | ||
669 | } | ||
670 | } | ||
671 | |||
672 | static void remove_flash_pde(struct proc_dir_entry *dp) | ||
673 | { | ||
674 | if (dp) { | ||
675 | if (dp->data != NULL) | ||
676 | kfree(dp->data); | ||
677 | dp->owner = NULL; | ||
678 | remove_proc_entry(dp->name, dp->parent); | ||
679 | } | ||
680 | } | ||
681 | |||
682 | static int initialize_flash_pde_data(const char *rtas_call_name, | ||
683 | size_t buf_size, | ||
684 | struct proc_dir_entry *dp) | ||
685 | { | ||
686 | int *status; | ||
687 | int token; | ||
688 | |||
689 | dp->data = kmalloc(buf_size, GFP_KERNEL); | ||
690 | if (dp->data == NULL) { | ||
691 | remove_flash_pde(dp); | ||
692 | return -ENOMEM; | ||
693 | } | ||
694 | |||
695 | memset(dp->data, 0, buf_size); | ||
696 | |||
697 | /* | ||
698 | * This code assumes that the status int is the first member of the | ||
699 | * struct | ||
700 | */ | ||
701 | status = (int *) dp->data; | ||
702 | token = rtas_token(rtas_call_name); | ||
703 | if (token == RTAS_UNKNOWN_SERVICE) | ||
704 | *status = FLASH_AUTH; | ||
705 | else | ||
706 | *status = FLASH_NO_OP; | ||
707 | |||
708 | return 0; | ||
709 | } | ||
710 | |||
711 | static struct proc_dir_entry *create_flash_pde(const char *filename, | ||
712 | struct file_operations *fops) | ||
713 | { | ||
714 | struct proc_dir_entry *ent = NULL; | ||
715 | |||
716 | ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL); | ||
717 | if (ent != NULL) { | ||
718 | ent->nlink = 1; | ||
719 | ent->proc_fops = fops; | ||
720 | ent->owner = THIS_MODULE; | ||
721 | } | ||
722 | |||
723 | return ent; | ||
724 | } | ||
725 | |||
726 | static struct file_operations rtas_flash_operations = { | ||
727 | .read = rtas_flash_read, | ||
728 | .write = rtas_flash_write, | ||
729 | .open = rtas_excl_open, | ||
730 | .release = rtas_flash_release, | ||
731 | }; | ||
732 | |||
733 | static struct file_operations manage_flash_operations = { | ||
734 | .read = manage_flash_read, | ||
735 | .write = manage_flash_write, | ||
736 | .open = rtas_excl_open, | ||
737 | .release = rtas_excl_release, | ||
738 | }; | ||
739 | |||
740 | static struct file_operations validate_flash_operations = { | ||
741 | .read = validate_flash_read, | ||
742 | .write = validate_flash_write, | ||
743 | .open = rtas_excl_open, | ||
744 | .release = validate_flash_release, | ||
745 | }; | ||
746 | |||
747 | int __init rtas_flash_init(void) | ||
748 | { | ||
749 | int rc; | ||
750 | |||
751 | if (rtas_token("ibm,update-flash-64-and-reboot") == | ||
752 | RTAS_UNKNOWN_SERVICE) { | ||
753 | printk(KERN_ERR "rtas_flash: no firmware flash support\n"); | ||
754 | return 1; | ||
755 | } | ||
756 | |||
757 | firmware_flash_pde = create_flash_pde("ppc64/rtas/" | ||
758 | FIRMWARE_FLASH_NAME, | ||
759 | &rtas_flash_operations); | ||
760 | if (firmware_flash_pde == NULL) { | ||
761 | rc = -ENOMEM; | ||
762 | goto cleanup; | ||
763 | } | ||
764 | |||
765 | rc = initialize_flash_pde_data("ibm,update-flash-64-and-reboot", | ||
766 | sizeof(struct rtas_update_flash_t), | ||
767 | firmware_flash_pde); | ||
768 | if (rc != 0) | ||
769 | goto cleanup; | ||
770 | |||
771 | firmware_update_pde = create_flash_pde("ppc64/rtas/" | ||
772 | FIRMWARE_UPDATE_NAME, | ||
773 | &rtas_flash_operations); | ||
774 | if (firmware_update_pde == NULL) { | ||
775 | rc = -ENOMEM; | ||
776 | goto cleanup; | ||
777 | } | ||
778 | |||
779 | rc = initialize_flash_pde_data("ibm,update-flash-64-and-reboot", | ||
780 | sizeof(struct rtas_update_flash_t), | ||
781 | firmware_update_pde); | ||
782 | if (rc != 0) | ||
783 | goto cleanup; | ||
784 | |||
785 | validate_pde = create_flash_pde("ppc64/rtas/" VALIDATE_FLASH_NAME, | ||
786 | &validate_flash_operations); | ||
787 | if (validate_pde == NULL) { | ||
788 | rc = -ENOMEM; | ||
789 | goto cleanup; | ||
790 | } | ||
791 | |||
792 | rc = initialize_flash_pde_data("ibm,validate-flash-image", | ||
793 | sizeof(struct rtas_validate_flash_t), | ||
794 | validate_pde); | ||
795 | if (rc != 0) | ||
796 | goto cleanup; | ||
797 | |||
798 | manage_pde = create_flash_pde("ppc64/rtas/" MANAGE_FLASH_NAME, | ||
799 | &manage_flash_operations); | ||
800 | if (manage_pde == NULL) { | ||
801 | rc = -ENOMEM; | ||
802 | goto cleanup; | ||
803 | } | ||
804 | |||
805 | rc = initialize_flash_pde_data("ibm,manage-flash-image", | ||
806 | sizeof(struct rtas_manage_flash_t), | ||
807 | manage_pde); | ||
808 | if (rc != 0) | ||
809 | goto cleanup; | ||
810 | |||
811 | rtas_flash_term_hook = rtas_flash_firmware; | ||
812 | return 0; | ||
813 | |||
814 | cleanup: | ||
815 | remove_flash_pde(firmware_flash_pde); | ||
816 | remove_flash_pde(firmware_update_pde); | ||
817 | remove_flash_pde(validate_pde); | ||
818 | remove_flash_pde(manage_pde); | ||
819 | |||
820 | return rc; | ||
821 | } | ||
822 | |||
823 | void __exit rtas_flash_cleanup(void) | ||
824 | { | ||
825 | rtas_flash_term_hook = NULL; | ||
826 | remove_flash_pde(firmware_flash_pde); | ||
827 | remove_flash_pde(firmware_update_pde); | ||
828 | remove_flash_pde(validate_pde); | ||
829 | remove_flash_pde(manage_pde); | ||
830 | } | ||
831 | |||
832 | module_init(rtas_flash_init); | ||
833 | module_exit(rtas_flash_cleanup); | ||
834 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 1292460fcde2..d43fa8c0e5ac 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -170,12 +170,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
170 | } | 170 | } |
171 | 171 | ||
172 | #ifdef CONFIG_SMP | 172 | #ifdef CONFIG_SMP |
173 | #ifdef CONFIG_PPC64 /* XXX for now */ | ||
174 | pvr = per_cpu(pvr, cpu_id); | 173 | pvr = per_cpu(pvr, cpu_id); |
175 | #else | 174 | #else |
176 | pvr = cpu_data[cpu_id].pvr; | ||
177 | #endif | ||
178 | #else | ||
179 | pvr = mfspr(SPRN_PVR); | 175 | pvr = mfspr(SPRN_PVR); |
180 | #endif | 176 | #endif |
181 | maj = (pvr >> 8) & 0xFF; | 177 | maj = (pvr >> 8) & 0xFF; |
@@ -201,11 +197,11 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
201 | #ifdef CONFIG_TAU_AVERAGE | 197 | #ifdef CONFIG_TAU_AVERAGE |
202 | /* more straightforward, but potentially misleading */ | 198 | /* more straightforward, but potentially misleading */ |
203 | seq_printf(m, "temperature \t: %u C (uncalibrated)\n", | 199 | seq_printf(m, "temperature \t: %u C (uncalibrated)\n", |
204 | cpu_temp(i)); | 200 | cpu_temp(cpu_id)); |
205 | #else | 201 | #else |
206 | /* show the actual temp sensor range */ | 202 | /* show the actual temp sensor range */ |
207 | u32 temp; | 203 | u32 temp; |
208 | temp = cpu_temp_both(i); | 204 | temp = cpu_temp_both(cpu_id); |
209 | seq_printf(m, "temperature \t: %u-%u C (uncalibrated)\n", | 205 | seq_printf(m, "temperature \t: %u-%u C (uncalibrated)\n", |
210 | temp & 0xff, temp >> 16); | 206 | temp & 0xff, temp >> 16); |
211 | #endif | 207 | #endif |
@@ -408,3 +404,118 @@ static int __init set_preferred_console(void) | |||
408 | } | 404 | } |
409 | console_initcall(set_preferred_console); | 405 | console_initcall(set_preferred_console); |
410 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | 406 | #endif /* CONFIG_PPC_MULTIPLATFORM */ |
407 | |||
408 | #ifdef CONFIG_SMP | ||
409 | |||
410 | /** | ||
411 | * setup_cpu_maps - initialize the following cpu maps: | ||
412 | * cpu_possible_map | ||
413 | * cpu_present_map | ||
414 | * cpu_sibling_map | ||
415 | * | ||
416 | * Having the possible map set up early allows us to restrict allocations | ||
417 | * of things like irqstacks to num_possible_cpus() rather than NR_CPUS. | ||
418 | * | ||
419 | * We do not initialize the online map here; cpus set their own bits in | ||
420 | * cpu_online_map as they come up. | ||
421 | * | ||
422 | * This function is valid only for Open Firmware systems. finish_device_tree | ||
423 | * must be called before using this. | ||
424 | * | ||
425 | * While we're here, we may as well set the "physical" cpu ids in the paca. | ||
426 | */ | ||
427 | void __init smp_setup_cpu_maps(void) | ||
428 | { | ||
429 | struct device_node *dn = NULL; | ||
430 | int cpu = 0; | ||
431 | int swap_cpuid = 0; | ||
432 | |||
433 | while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) { | ||
434 | int *intserv; | ||
435 | int j, len = sizeof(u32), nthreads = 1; | ||
436 | |||
437 | intserv = (int *)get_property(dn, "ibm,ppc-interrupt-server#s", | ||
438 | &len); | ||
439 | if (intserv) | ||
440 | nthreads = len / sizeof(int); | ||
441 | else { | ||
442 | intserv = (int *) get_property(dn, "reg", NULL); | ||
443 | if (!intserv) | ||
444 | intserv = &cpu; /* assume logical == phys */ | ||
445 | } | ||
446 | |||
447 | for (j = 0; j < nthreads && cpu < NR_CPUS; j++) { | ||
448 | cpu_set(cpu, cpu_present_map); | ||
449 | set_hard_smp_processor_id(cpu, intserv[j]); | ||
450 | |||
451 | if (intserv[j] == boot_cpuid_phys) | ||
452 | swap_cpuid = cpu; | ||
453 | cpu_set(cpu, cpu_possible_map); | ||
454 | cpu++; | ||
455 | } | ||
456 | } | ||
457 | |||
458 | /* Swap CPU id 0 with boot_cpuid_phys, so we can always assume that | ||
459 | * boot cpu is logical 0. | ||
460 | */ | ||
461 | if (boot_cpuid_phys != get_hard_smp_processor_id(0)) { | ||
462 | u32 tmp; | ||
463 | tmp = get_hard_smp_processor_id(0); | ||
464 | set_hard_smp_processor_id(0, boot_cpuid_phys); | ||
465 | set_hard_smp_processor_id(swap_cpuid, tmp); | ||
466 | } | ||
467 | |||
468 | #ifdef CONFIG_PPC64 | ||
469 | /* | ||
470 | * On pSeries LPAR, we need to know how many cpus | ||
471 | * could possibly be added to this partition. | ||
472 | */ | ||
473 | if (systemcfg->platform == PLATFORM_PSERIES_LPAR && | ||
474 | (dn = of_find_node_by_path("/rtas"))) { | ||
475 | int num_addr_cell, num_size_cell, maxcpus; | ||
476 | unsigned int *ireg; | ||
477 | |||
478 | num_addr_cell = prom_n_addr_cells(dn); | ||
479 | num_size_cell = prom_n_size_cells(dn); | ||
480 | |||
481 | ireg = (unsigned int *) | ||
482 | get_property(dn, "ibm,lrdr-capacity", NULL); | ||
483 | |||
484 | if (!ireg) | ||
485 | goto out; | ||
486 | |||
487 | maxcpus = ireg[num_addr_cell + num_size_cell]; | ||
488 | |||
489 | /* Double maxcpus for processors which have SMT capability */ | ||
490 | if (cpu_has_feature(CPU_FTR_SMT)) | ||
491 | maxcpus *= 2; | ||
492 | |||
493 | if (maxcpus > NR_CPUS) { | ||
494 | printk(KERN_WARNING | ||
495 | "Partition configured for %d cpus, " | ||
496 | "operating system maximum is %d.\n", | ||
497 | maxcpus, NR_CPUS); | ||
498 | maxcpus = NR_CPUS; | ||
499 | } else | ||
500 | printk(KERN_INFO "Partition configured for %d cpus.\n", | ||
501 | maxcpus); | ||
502 | |||
503 | for (cpu = 0; cpu < maxcpus; cpu++) | ||
504 | cpu_set(cpu, cpu_possible_map); | ||
505 | out: | ||
506 | of_node_put(dn); | ||
507 | } | ||
508 | |||
509 | /* | ||
510 | * Do the sibling map; assume only two threads per processor. | ||
511 | */ | ||
512 | for_each_cpu(cpu) { | ||
513 | cpu_set(cpu, cpu_sibling_map[cpu]); | ||
514 | if (cpu_has_feature(CPU_FTR_SMT)) | ||
515 | cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]); | ||
516 | } | ||
517 | |||
518 | systemcfg->processorCount = num_present_cpus(); | ||
519 | #endif /* CONFIG_PPC64 */ | ||
520 | } | ||
521 | #endif /* CONFIG_SMP */ | ||
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 9680ae99b084..b45eedbb4b3a 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -288,6 +288,8 @@ void __init setup_arch(char **cmdline_p) | |||
288 | unflatten_device_tree(); | 288 | unflatten_device_tree(); |
289 | finish_device_tree(); | 289 | finish_device_tree(); |
290 | 290 | ||
291 | smp_setup_cpu_maps(); | ||
292 | |||
291 | #ifdef CONFIG_BOOTX_TEXT | 293 | #ifdef CONFIG_BOOTX_TEXT |
292 | init_boot_display(); | 294 | init_boot_display(); |
293 | #endif | 295 | #endif |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 40c48100bf1b..b0994050024f 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -56,7 +56,7 @@ | |||
56 | #include <asm/page.h> | 56 | #include <asm/page.h> |
57 | #include <asm/mmu.h> | 57 | #include <asm/mmu.h> |
58 | #include <asm/lmb.h> | 58 | #include <asm/lmb.h> |
59 | #include <asm/iSeries/ItLpNaca.h> | 59 | #include <asm/iseries/it_lp_naca.h> |
60 | #include <asm/firmware.h> | 60 | #include <asm/firmware.h> |
61 | #include <asm/systemcfg.h> | 61 | #include <asm/systemcfg.h> |
62 | #include <asm/xmon.h> | 62 | #include <asm/xmon.h> |
@@ -103,8 +103,6 @@ extern void htab_initialize(void); | |||
103 | extern void early_init_devtree(void *flat_dt); | 103 | extern void early_init_devtree(void *flat_dt); |
104 | extern void unflatten_device_tree(void); | 104 | extern void unflatten_device_tree(void); |
105 | 105 | ||
106 | extern void smp_release_cpus(void); | ||
107 | |||
108 | int have_of = 1; | 106 | int have_of = 1; |
109 | int boot_cpuid = 0; | 107 | int boot_cpuid = 0; |
110 | int boot_cpuid_phys = 0; | 108 | int boot_cpuid_phys = 0; |
@@ -183,120 +181,14 @@ static int __init early_smt_enabled(char *p) | |||
183 | } | 181 | } |
184 | early_param("smt-enabled", early_smt_enabled); | 182 | early_param("smt-enabled", early_smt_enabled); |
185 | 183 | ||
186 | /** | 184 | #else |
187 | * setup_cpu_maps - initialize the following cpu maps: | 185 | #define check_smt_enabled() |
188 | * cpu_possible_map | ||
189 | * cpu_present_map | ||
190 | * cpu_sibling_map | ||
191 | * | ||
192 | * Having the possible map set up early allows us to restrict allocations | ||
193 | * of things like irqstacks to num_possible_cpus() rather than NR_CPUS. | ||
194 | * | ||
195 | * We do not initialize the online map here; cpus set their own bits in | ||
196 | * cpu_online_map as they come up. | ||
197 | * | ||
198 | * This function is valid only for Open Firmware systems. finish_device_tree | ||
199 | * must be called before using this. | ||
200 | * | ||
201 | * While we're here, we may as well set the "physical" cpu ids in the paca. | ||
202 | */ | ||
203 | static void __init setup_cpu_maps(void) | ||
204 | { | ||
205 | struct device_node *dn = NULL; | ||
206 | int cpu = 0; | ||
207 | int swap_cpuid = 0; | ||
208 | |||
209 | check_smt_enabled(); | ||
210 | |||
211 | while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) { | ||
212 | u32 *intserv; | ||
213 | int j, len = sizeof(u32), nthreads; | ||
214 | |||
215 | intserv = (u32 *)get_property(dn, "ibm,ppc-interrupt-server#s", | ||
216 | &len); | ||
217 | if (!intserv) | ||
218 | intserv = (u32 *)get_property(dn, "reg", NULL); | ||
219 | |||
220 | nthreads = len / sizeof(u32); | ||
221 | |||
222 | for (j = 0; j < nthreads && cpu < NR_CPUS; j++) { | ||
223 | cpu_set(cpu, cpu_present_map); | ||
224 | set_hard_smp_processor_id(cpu, intserv[j]); | ||
225 | |||
226 | if (intserv[j] == boot_cpuid_phys) | ||
227 | swap_cpuid = cpu; | ||
228 | cpu_set(cpu, cpu_possible_map); | ||
229 | cpu++; | ||
230 | } | ||
231 | } | ||
232 | |||
233 | /* Swap CPU id 0 with boot_cpuid_phys, so we can always assume that | ||
234 | * boot cpu is logical 0. | ||
235 | */ | ||
236 | if (boot_cpuid_phys != get_hard_smp_processor_id(0)) { | ||
237 | u32 tmp; | ||
238 | tmp = get_hard_smp_processor_id(0); | ||
239 | set_hard_smp_processor_id(0, boot_cpuid_phys); | ||
240 | set_hard_smp_processor_id(swap_cpuid, tmp); | ||
241 | } | ||
242 | |||
243 | /* | ||
244 | * On pSeries LPAR, we need to know how many cpus | ||
245 | * could possibly be added to this partition. | ||
246 | */ | ||
247 | if (systemcfg->platform == PLATFORM_PSERIES_LPAR && | ||
248 | (dn = of_find_node_by_path("/rtas"))) { | ||
249 | int num_addr_cell, num_size_cell, maxcpus; | ||
250 | unsigned int *ireg; | ||
251 | |||
252 | num_addr_cell = prom_n_addr_cells(dn); | ||
253 | num_size_cell = prom_n_size_cells(dn); | ||
254 | |||
255 | ireg = (unsigned int *) | ||
256 | get_property(dn, "ibm,lrdr-capacity", NULL); | ||
257 | |||
258 | if (!ireg) | ||
259 | goto out; | ||
260 | |||
261 | maxcpus = ireg[num_addr_cell + num_size_cell]; | ||
262 | |||
263 | /* Double maxcpus for processors which have SMT capability */ | ||
264 | if (cpu_has_feature(CPU_FTR_SMT)) | ||
265 | maxcpus *= 2; | ||
266 | |||
267 | if (maxcpus > NR_CPUS) { | ||
268 | printk(KERN_WARNING | ||
269 | "Partition configured for %d cpus, " | ||
270 | "operating system maximum is %d.\n", | ||
271 | maxcpus, NR_CPUS); | ||
272 | maxcpus = NR_CPUS; | ||
273 | } else | ||
274 | printk(KERN_INFO "Partition configured for %d cpus.\n", | ||
275 | maxcpus); | ||
276 | |||
277 | for (cpu = 0; cpu < maxcpus; cpu++) | ||
278 | cpu_set(cpu, cpu_possible_map); | ||
279 | out: | ||
280 | of_node_put(dn); | ||
281 | } | ||
282 | |||
283 | /* | ||
284 | * Do the sibling map; assume only two threads per processor. | ||
285 | */ | ||
286 | for_each_cpu(cpu) { | ||
287 | cpu_set(cpu, cpu_sibling_map[cpu]); | ||
288 | if (cpu_has_feature(CPU_FTR_SMT)) | ||
289 | cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]); | ||
290 | } | ||
291 | |||
292 | systemcfg->processorCount = num_present_cpus(); | ||
293 | } | ||
294 | #endif /* CONFIG_SMP */ | 186 | #endif /* CONFIG_SMP */ |
295 | 187 | ||
296 | extern struct machdep_calls pSeries_md; | 188 | extern struct machdep_calls pSeries_md; |
297 | extern struct machdep_calls pmac_md; | 189 | extern struct machdep_calls pmac_md; |
298 | extern struct machdep_calls maple_md; | 190 | extern struct machdep_calls maple_md; |
299 | extern struct machdep_calls bpa_md; | 191 | extern struct machdep_calls cell_md; |
300 | extern struct machdep_calls iseries_md; | 192 | extern struct machdep_calls iseries_md; |
301 | 193 | ||
302 | /* Ultimately, stuff them in an elf section like initcalls... */ | 194 | /* Ultimately, stuff them in an elf section like initcalls... */ |
@@ -310,8 +202,8 @@ static struct machdep_calls __initdata *machines[] = { | |||
310 | #ifdef CONFIG_PPC_MAPLE | 202 | #ifdef CONFIG_PPC_MAPLE |
311 | &maple_md, | 203 | &maple_md, |
312 | #endif /* CONFIG_PPC_MAPLE */ | 204 | #endif /* CONFIG_PPC_MAPLE */ |
313 | #ifdef CONFIG_PPC_BPA | 205 | #ifdef CONFIG_PPC_CELL |
314 | &bpa_md, | 206 | &cell_md, |
315 | #endif | 207 | #endif |
316 | #ifdef CONFIG_PPC_ISERIES | 208 | #ifdef CONFIG_PPC_ISERIES |
317 | &iseries_md, | 209 | &iseries_md, |
@@ -385,21 +277,49 @@ void __init early_setup(unsigned long dt_ptr) | |||
385 | DBG("Found, Initializing memory management...\n"); | 277 | DBG("Found, Initializing memory management...\n"); |
386 | 278 | ||
387 | /* | 279 | /* |
388 | * Initialize stab / SLB management | 280 | * Initialize the MMU Hash table and create the linear mapping |
281 | * of memory. Has to be done before stab/slb initialization as | ||
282 | * this is currently where the page size encoding is obtained | ||
389 | */ | 283 | */ |
390 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | 284 | htab_initialize(); |
391 | stab_initialize(lpaca->stab_real); | ||
392 | 285 | ||
393 | /* | 286 | /* |
394 | * Initialize the MMU Hash table and create the linear mapping | 287 | * Initialize stab / SLB management except on iSeries |
395 | * of memory | ||
396 | */ | 288 | */ |
397 | htab_initialize(); | 289 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) { |
290 | if (cpu_has_feature(CPU_FTR_SLB)) | ||
291 | slb_initialize(); | ||
292 | else | ||
293 | stab_initialize(lpaca->stab_real); | ||
294 | } | ||
398 | 295 | ||
399 | DBG(" <- early_setup()\n"); | 296 | DBG(" <- early_setup()\n"); |
400 | } | 297 | } |
401 | 298 | ||
402 | 299 | ||
300 | #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC) | ||
301 | void smp_release_cpus(void) | ||
302 | { | ||
303 | extern unsigned long __secondary_hold_spinloop; | ||
304 | |||
305 | DBG(" -> smp_release_cpus()\n"); | ||
306 | |||
307 | /* All secondary cpus are spinning on a common spinloop, release them | ||
308 | * all now so they can start to spin on their individual paca | ||
309 | * spinloops. For non SMP kernels, the secondary cpus never get out | ||
310 | * of the common spinloop. | ||
311 | * This is useless but harmless on iSeries, secondaries are already | ||
312 | * waiting on their paca spinloops. */ | ||
313 | |||
314 | __secondary_hold_spinloop = 1; | ||
315 | mb(); | ||
316 | |||
317 | DBG(" <- smp_release_cpus()\n"); | ||
318 | } | ||
319 | #else | ||
320 | #define smp_release_cpus() | ||
321 | #endif /* CONFIG_SMP || CONFIG_KEXEC */ | ||
322 | |||
403 | /* | 323 | /* |
404 | * Initialize some remaining members of the ppc64_caches and systemcfg structures | 324 | * Initialize some remaining members of the ppc64_caches and systemcfg structures |
405 | * (at least until we get rid of them completely). This is mostly some | 325 | * (at least until we get rid of them completely). This is mostly some |
@@ -589,17 +509,13 @@ void __init setup_system(void) | |||
589 | 509 | ||
590 | parse_early_param(); | 510 | parse_early_param(); |
591 | 511 | ||
592 | #ifdef CONFIG_SMP | 512 | check_smt_enabled(); |
593 | /* | 513 | smp_setup_cpu_maps(); |
594 | * iSeries has already initialized the cpu maps at this point. | ||
595 | */ | ||
596 | setup_cpu_maps(); | ||
597 | 514 | ||
598 | /* Release secondary cpus out of their spinloops at 0x60 now that | 515 | /* Release secondary cpus out of their spinloops at 0x60 now that |
599 | * we can map physical -> logical CPU ids | 516 | * we can map physical -> logical CPU ids |
600 | */ | 517 | */ |
601 | smp_release_cpus(); | 518 | smp_release_cpus(); |
602 | #endif | ||
603 | 519 | ||
604 | printk("Starting Linux PPC64 %s\n", system_utsname.version); | 520 | printk("Starting Linux PPC64 %s\n", system_utsname.version); |
605 | 521 | ||
@@ -631,23 +547,6 @@ static int ppc64_panic_event(struct notifier_block *this, | |||
631 | return NOTIFY_DONE; | 547 | return NOTIFY_DONE; |
632 | } | 548 | } |
633 | 549 | ||
634 | #ifdef CONFIG_PPC_ISERIES | ||
635 | /* | ||
636 | * On iSeries we just parse the mem=X option from the command line. | ||
637 | * On pSeries it's a bit more complicated, see prom_init_mem() | ||
638 | */ | ||
639 | static int __init early_parsemem(char *p) | ||
640 | { | ||
641 | if (!p) | ||
642 | return 0; | ||
643 | |||
644 | memory_limit = ALIGN(memparse(p, &p), PAGE_SIZE); | ||
645 | |||
646 | return 0; | ||
647 | } | ||
648 | early_param("mem", early_parsemem); | ||
649 | #endif /* CONFIG_PPC_ISERIES */ | ||
650 | |||
651 | #ifdef CONFIG_IRQSTACKS | 550 | #ifdef CONFIG_IRQSTACKS |
652 | static void __init irqstack_early_init(void) | 551 | static void __init irqstack_early_init(void) |
653 | { | 552 | { |
@@ -658,10 +557,12 @@ static void __init irqstack_early_init(void) | |||
658 | * SLB misses on them. | 557 | * SLB misses on them. |
659 | */ | 558 | */ |
660 | for_each_cpu(i) { | 559 | for_each_cpu(i) { |
661 | softirq_ctx[i] = (struct thread_info *)__va(lmb_alloc_base(THREAD_SIZE, | 560 | softirq_ctx[i] = (struct thread_info *) |
662 | THREAD_SIZE, 0x10000000)); | 561 | __va(lmb_alloc_base(THREAD_SIZE, |
663 | hardirq_ctx[i] = (struct thread_info *)__va(lmb_alloc_base(THREAD_SIZE, | 562 | THREAD_SIZE, 0x10000000)); |
664 | THREAD_SIZE, 0x10000000)); | 563 | hardirq_ctx[i] = (struct thread_info *) |
564 | __va(lmb_alloc_base(THREAD_SIZE, | ||
565 | THREAD_SIZE, 0x10000000)); | ||
665 | } | 566 | } |
666 | } | 567 | } |
667 | #else | 568 | #else |
@@ -689,8 +590,8 @@ static void __init emergency_stack_init(void) | |||
689 | limit = min(0x10000000UL, lmb.rmo_size); | 590 | limit = min(0x10000000UL, lmb.rmo_size); |
690 | 591 | ||
691 | for_each_cpu(i) | 592 | for_each_cpu(i) |
692 | paca[i].emergency_sp = __va(lmb_alloc_base(PAGE_SIZE, 128, | 593 | paca[i].emergency_sp = |
693 | limit)) + PAGE_SIZE; | 594 | __va(lmb_alloc_base(HW_PAGE_SIZE, 128, limit)) + HW_PAGE_SIZE; |
694 | } | 595 | } |
695 | 596 | ||
696 | /* | 597 | /* |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 444c3e81884c..876c57c11365 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
44 | #include <asm/cacheflush.h> | 44 | #include <asm/cacheflush.h> |
45 | #ifdef CONFIG_PPC64 | 45 | #ifdef CONFIG_PPC64 |
46 | #include <asm/ppc32.h> | 46 | #include "ppc32.h" |
47 | #include <asm/ppcdebug.h> | 47 | #include <asm/ppcdebug.h> |
48 | #include <asm/unistd.h> | 48 | #include <asm/unistd.h> |
49 | #include <asm/vdso.h> | 49 | #include <asm/vdso.h> |
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c new file mode 100644 index 000000000000..ec9d0984b6a0 --- /dev/null +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -0,0 +1,581 @@ | |||
1 | /* | ||
2 | * linux/arch/ppc64/kernel/signal.c | ||
3 | * | ||
4 | * PowerPC version | ||
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | ||
6 | * | ||
7 | * Derived from "arch/i386/kernel/signal.c" | ||
8 | * Copyright (C) 1991, 1992 Linus Torvalds | ||
9 | * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version | ||
14 | * 2 of the License, or (at your option) any later version. | ||
15 | */ | ||
16 | |||
17 | #include <linux/config.h> | ||
18 | #include <linux/sched.h> | ||
19 | #include <linux/mm.h> | ||
20 | #include <linux/smp.h> | ||
21 | #include <linux/smp_lock.h> | ||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/signal.h> | ||
24 | #include <linux/errno.h> | ||
25 | #include <linux/wait.h> | ||
26 | #include <linux/unistd.h> | ||
27 | #include <linux/stddef.h> | ||
28 | #include <linux/elf.h> | ||
29 | #include <linux/ptrace.h> | ||
30 | #include <linux/module.h> | ||
31 | |||
32 | #include <asm/sigcontext.h> | ||
33 | #include <asm/ucontext.h> | ||
34 | #include <asm/uaccess.h> | ||
35 | #include <asm/pgtable.h> | ||
36 | #include <asm/ppcdebug.h> | ||
37 | #include <asm/unistd.h> | ||
38 | #include <asm/cacheflush.h> | ||
39 | #include <asm/vdso.h> | ||
40 | |||
41 | #define DEBUG_SIG 0 | ||
42 | |||
43 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | ||
44 | |||
45 | #define GP_REGS_SIZE min(sizeof(elf_gregset_t), sizeof(struct pt_regs)) | ||
46 | #define FP_REGS_SIZE sizeof(elf_fpregset_t) | ||
47 | |||
48 | #define TRAMP_TRACEBACK 3 | ||
49 | #define TRAMP_SIZE 6 | ||
50 | |||
51 | /* | ||
52 | * When we have signals to deliver, we set up on the user stack, | ||
53 | * going down from the original stack pointer: | ||
54 | * 1) a rt_sigframe struct which contains the ucontext | ||
55 | * 2) a gap of __SIGNAL_FRAMESIZE bytes which acts as a dummy caller | ||
56 | * frame for the signal handler. | ||
57 | */ | ||
58 | |||
59 | struct rt_sigframe { | ||
60 | /* sys_rt_sigreturn requires the ucontext be the first field */ | ||
61 | struct ucontext uc; | ||
62 | unsigned long _unused[2]; | ||
63 | unsigned int tramp[TRAMP_SIZE]; | ||
64 | struct siginfo *pinfo; | ||
65 | void *puc; | ||
66 | struct siginfo info; | ||
67 | /* 64 bit ABI allows for 288 bytes below sp before decrementing it. */ | ||
68 | char abigap[288]; | ||
69 | } __attribute__ ((aligned (16))); | ||
70 | |||
71 | |||
72 | /* | ||
73 | * Atomically swap in the new signal mask, and wait for a signal. | ||
74 | */ | ||
75 | long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, int p3, int p4, | ||
76 | int p6, int p7, struct pt_regs *regs) | ||
77 | { | ||
78 | sigset_t saveset, newset; | ||
79 | |||
80 | /* XXX: Don't preclude handling different sized sigset_t's. */ | ||
81 | if (sigsetsize != sizeof(sigset_t)) | ||
82 | return -EINVAL; | ||
83 | |||
84 | if (copy_from_user(&newset, unewset, sizeof(newset))) | ||
85 | return -EFAULT; | ||
86 | sigdelsetmask(&newset, ~_BLOCKABLE); | ||
87 | |||
88 | spin_lock_irq(¤t->sighand->siglock); | ||
89 | saveset = current->blocked; | ||
90 | current->blocked = newset; | ||
91 | recalc_sigpending(); | ||
92 | spin_unlock_irq(¤t->sighand->siglock); | ||
93 | |||
94 | regs->result = -EINTR; | ||
95 | regs->gpr[3] = EINTR; | ||
96 | regs->ccr |= 0x10000000; | ||
97 | while (1) { | ||
98 | current->state = TASK_INTERRUPTIBLE; | ||
99 | schedule(); | ||
100 | if (do_signal(&saveset, regs)) | ||
101 | return 0; | ||
102 | } | ||
103 | } | ||
104 | |||
105 | long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, unsigned long r5, | ||
106 | unsigned long r6, unsigned long r7, unsigned long r8, | ||
107 | struct pt_regs *regs) | ||
108 | { | ||
109 | return do_sigaltstack(uss, uoss, regs->gpr[1]); | ||
110 | } | ||
111 | |||
112 | |||
113 | /* | ||
114 | * Set up the sigcontext for the signal frame. | ||
115 | */ | ||
116 | |||
117 | static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, | ||
118 | int signr, sigset_t *set, unsigned long handler) | ||
119 | { | ||
120 | /* When CONFIG_ALTIVEC is set, we _always_ setup v_regs even if the | ||
121 | * process never used altivec yet (MSR_VEC is zero in pt_regs of | ||
122 | * the context). This is very important because we must ensure we | ||
123 | * don't lose the VRSAVE content that may have been set prior to | ||
124 | * the process doing its first vector operation | ||
125 | * Userland shall check AT_HWCAP to know wether it can rely on the | ||
126 | * v_regs pointer or not | ||
127 | */ | ||
128 | #ifdef CONFIG_ALTIVEC | ||
129 | elf_vrreg_t __user *v_regs = (elf_vrreg_t __user *)(((unsigned long)sc->vmx_reserve + 15) & ~0xful); | ||
130 | #endif | ||
131 | long err = 0; | ||
132 | |||
133 | flush_fp_to_thread(current); | ||
134 | |||
135 | /* Make sure signal doesn't get spurrious FP exceptions */ | ||
136 | current->thread.fpscr.val = 0; | ||
137 | |||
138 | #ifdef CONFIG_ALTIVEC | ||
139 | err |= __put_user(v_regs, &sc->v_regs); | ||
140 | |||
141 | /* save altivec registers */ | ||
142 | if (current->thread.used_vr) { | ||
143 | flush_altivec_to_thread(current); | ||
144 | /* Copy 33 vec registers (vr0..31 and vscr) to the stack */ | ||
145 | err |= __copy_to_user(v_regs, current->thread.vr, 33 * sizeof(vector128)); | ||
146 | /* set MSR_VEC in the MSR value in the frame to indicate that sc->v_reg) | ||
147 | * contains valid data. | ||
148 | */ | ||
149 | regs->msr |= MSR_VEC; | ||
150 | } | ||
151 | /* We always copy to/from vrsave, it's 0 if we don't have or don't | ||
152 | * use altivec. | ||
153 | */ | ||
154 | err |= __put_user(current->thread.vrsave, (u32 __user *)&v_regs[33]); | ||
155 | #else /* CONFIG_ALTIVEC */ | ||
156 | err |= __put_user(0, &sc->v_regs); | ||
157 | #endif /* CONFIG_ALTIVEC */ | ||
158 | err |= __put_user(&sc->gp_regs, &sc->regs); | ||
159 | err |= __copy_to_user(&sc->gp_regs, regs, GP_REGS_SIZE); | ||
160 | err |= __copy_to_user(&sc->fp_regs, ¤t->thread.fpr, FP_REGS_SIZE); | ||
161 | err |= __put_user(signr, &sc->signal); | ||
162 | err |= __put_user(handler, &sc->handler); | ||
163 | if (set != NULL) | ||
164 | err |= __put_user(set->sig[0], &sc->oldmask); | ||
165 | |||
166 | return err; | ||
167 | } | ||
168 | |||
169 | /* | ||
170 | * Restore the sigcontext from the signal frame. | ||
171 | */ | ||
172 | |||
173 | static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig, | ||
174 | struct sigcontext __user *sc) | ||
175 | { | ||
176 | #ifdef CONFIG_ALTIVEC | ||
177 | elf_vrreg_t __user *v_regs; | ||
178 | #endif | ||
179 | unsigned long err = 0; | ||
180 | unsigned long save_r13 = 0; | ||
181 | elf_greg_t *gregs = (elf_greg_t *)regs; | ||
182 | #ifdef CONFIG_ALTIVEC | ||
183 | unsigned long msr; | ||
184 | #endif | ||
185 | int i; | ||
186 | |||
187 | /* If this is not a signal return, we preserve the TLS in r13 */ | ||
188 | if (!sig) | ||
189 | save_r13 = regs->gpr[13]; | ||
190 | |||
191 | /* copy everything before MSR */ | ||
192 | err |= __copy_from_user(regs, &sc->gp_regs, | ||
193 | PT_MSR*sizeof(unsigned long)); | ||
194 | |||
195 | /* skip MSR and SOFTE */ | ||
196 | for (i = PT_MSR+1; i <= PT_RESULT; i++) { | ||
197 | if (i == PT_SOFTE) | ||
198 | continue; | ||
199 | err |= __get_user(gregs[i], &sc->gp_regs[i]); | ||
200 | } | ||
201 | |||
202 | if (!sig) | ||
203 | regs->gpr[13] = save_r13; | ||
204 | err |= __copy_from_user(¤t->thread.fpr, &sc->fp_regs, FP_REGS_SIZE); | ||
205 | if (set != NULL) | ||
206 | err |= __get_user(set->sig[0], &sc->oldmask); | ||
207 | |||
208 | #ifdef CONFIG_ALTIVEC | ||
209 | err |= __get_user(v_regs, &sc->v_regs); | ||
210 | err |= __get_user(msr, &sc->gp_regs[PT_MSR]); | ||
211 | if (err) | ||
212 | return err; | ||
213 | /* Copy 33 vec registers (vr0..31 and vscr) from the stack */ | ||
214 | if (v_regs != 0 && (msr & MSR_VEC) != 0) | ||
215 | err |= __copy_from_user(current->thread.vr, v_regs, | ||
216 | 33 * sizeof(vector128)); | ||
217 | else if (current->thread.used_vr) | ||
218 | memset(current->thread.vr, 0, 33 * sizeof(vector128)); | ||
219 | /* Always get VRSAVE back */ | ||
220 | if (v_regs != 0) | ||
221 | err |= __get_user(current->thread.vrsave, (u32 __user *)&v_regs[33]); | ||
222 | else | ||
223 | current->thread.vrsave = 0; | ||
224 | #endif /* CONFIG_ALTIVEC */ | ||
225 | |||
226 | #ifndef CONFIG_SMP | ||
227 | preempt_disable(); | ||
228 | if (last_task_used_math == current) | ||
229 | last_task_used_math = NULL; | ||
230 | if (last_task_used_altivec == current) | ||
231 | last_task_used_altivec = NULL; | ||
232 | preempt_enable(); | ||
233 | #endif | ||
234 | /* Force reload of FP/VEC */ | ||
235 | regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC); | ||
236 | |||
237 | return err; | ||
238 | } | ||
239 | |||
240 | /* | ||
241 | * Allocate space for the signal frame | ||
242 | */ | ||
243 | static inline void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, | ||
244 | size_t frame_size) | ||
245 | { | ||
246 | unsigned long newsp; | ||
247 | |||
248 | /* Default to using normal stack */ | ||
249 | newsp = regs->gpr[1]; | ||
250 | |||
251 | if (ka->sa.sa_flags & SA_ONSTACK) { | ||
252 | if (! on_sig_stack(regs->gpr[1])) | ||
253 | newsp = (current->sas_ss_sp + current->sas_ss_size); | ||
254 | } | ||
255 | |||
256 | return (void __user *)((newsp - frame_size) & -16ul); | ||
257 | } | ||
258 | |||
259 | /* | ||
260 | * Setup the trampoline code on the stack | ||
261 | */ | ||
262 | static long setup_trampoline(unsigned int syscall, unsigned int __user *tramp) | ||
263 | { | ||
264 | int i; | ||
265 | long err = 0; | ||
266 | |||
267 | /* addi r1, r1, __SIGNAL_FRAMESIZE # Pop the dummy stackframe */ | ||
268 | err |= __put_user(0x38210000UL | (__SIGNAL_FRAMESIZE & 0xffff), &tramp[0]); | ||
269 | /* li r0, __NR_[rt_]sigreturn| */ | ||
270 | err |= __put_user(0x38000000UL | (syscall & 0xffff), &tramp[1]); | ||
271 | /* sc */ | ||
272 | err |= __put_user(0x44000002UL, &tramp[2]); | ||
273 | |||
274 | /* Minimal traceback info */ | ||
275 | for (i=TRAMP_TRACEBACK; i < TRAMP_SIZE ;i++) | ||
276 | err |= __put_user(0, &tramp[i]); | ||
277 | |||
278 | if (!err) | ||
279 | flush_icache_range((unsigned long) &tramp[0], | ||
280 | (unsigned long) &tramp[TRAMP_SIZE]); | ||
281 | |||
282 | return err; | ||
283 | } | ||
284 | |||
285 | /* | ||
286 | * Restore the user process's signal mask (also used by signal32.c) | ||
287 | */ | ||
288 | void restore_sigmask(sigset_t *set) | ||
289 | { | ||
290 | sigdelsetmask(set, ~_BLOCKABLE); | ||
291 | spin_lock_irq(¤t->sighand->siglock); | ||
292 | current->blocked = *set; | ||
293 | recalc_sigpending(); | ||
294 | spin_unlock_irq(¤t->sighand->siglock); | ||
295 | } | ||
296 | |||
297 | |||
298 | /* | ||
299 | * Handle {get,set,swap}_context operations | ||
300 | */ | ||
301 | int sys_swapcontext(struct ucontext __user *old_ctx, | ||
302 | struct ucontext __user *new_ctx, | ||
303 | long ctx_size, long r6, long r7, long r8, struct pt_regs *regs) | ||
304 | { | ||
305 | unsigned char tmp; | ||
306 | sigset_t set; | ||
307 | |||
308 | /* Context size is for future use. Right now, we only make sure | ||
309 | * we are passed something we understand | ||
310 | */ | ||
311 | if (ctx_size < sizeof(struct ucontext)) | ||
312 | return -EINVAL; | ||
313 | |||
314 | if (old_ctx != NULL) { | ||
315 | if (!access_ok(VERIFY_WRITE, old_ctx, sizeof(*old_ctx)) | ||
316 | || setup_sigcontext(&old_ctx->uc_mcontext, regs, 0, NULL, 0) | ||
317 | || __copy_to_user(&old_ctx->uc_sigmask, | ||
318 | ¤t->blocked, sizeof(sigset_t))) | ||
319 | return -EFAULT; | ||
320 | } | ||
321 | if (new_ctx == NULL) | ||
322 | return 0; | ||
323 | if (!access_ok(VERIFY_READ, new_ctx, sizeof(*new_ctx)) | ||
324 | || __get_user(tmp, (u8 __user *) new_ctx) | ||
325 | || __get_user(tmp, (u8 __user *) (new_ctx + 1) - 1)) | ||
326 | return -EFAULT; | ||
327 | |||
328 | /* | ||
329 | * If we get a fault copying the context into the kernel's | ||
330 | * image of the user's registers, we can't just return -EFAULT | ||
331 | * because the user's registers will be corrupted. For instance | ||
332 | * the NIP value may have been updated but not some of the | ||
333 | * other registers. Given that we have done the access_ok | ||
334 | * and successfully read the first and last bytes of the region | ||
335 | * above, this should only happen in an out-of-memory situation | ||
336 | * or if another thread unmaps the region containing the context. | ||
337 | * We kill the task with a SIGSEGV in this situation. | ||
338 | */ | ||
339 | |||
340 | if (__copy_from_user(&set, &new_ctx->uc_sigmask, sizeof(set))) | ||
341 | do_exit(SIGSEGV); | ||
342 | restore_sigmask(&set); | ||
343 | if (restore_sigcontext(regs, NULL, 0, &new_ctx->uc_mcontext)) | ||
344 | do_exit(SIGSEGV); | ||
345 | |||
346 | /* This returns like rt_sigreturn */ | ||
347 | return 0; | ||
348 | } | ||
349 | |||
350 | |||
351 | /* | ||
352 | * Do a signal return; undo the signal stack. | ||
353 | */ | ||
354 | |||
355 | int sys_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5, | ||
356 | unsigned long r6, unsigned long r7, unsigned long r8, | ||
357 | struct pt_regs *regs) | ||
358 | { | ||
359 | struct ucontext __user *uc = (struct ucontext __user *)regs->gpr[1]; | ||
360 | sigset_t set; | ||
361 | |||
362 | /* Always make any pending restarted system calls return -EINTR */ | ||
363 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | ||
364 | |||
365 | if (!access_ok(VERIFY_READ, uc, sizeof(*uc))) | ||
366 | goto badframe; | ||
367 | |||
368 | if (__copy_from_user(&set, &uc->uc_sigmask, sizeof(set))) | ||
369 | goto badframe; | ||
370 | restore_sigmask(&set); | ||
371 | if (restore_sigcontext(regs, NULL, 1, &uc->uc_mcontext)) | ||
372 | goto badframe; | ||
373 | |||
374 | /* do_sigaltstack expects a __user pointer and won't modify | ||
375 | * what's in there anyway | ||
376 | */ | ||
377 | do_sigaltstack(&uc->uc_stack, NULL, regs->gpr[1]); | ||
378 | |||
379 | return regs->result; | ||
380 | |||
381 | badframe: | ||
382 | #if DEBUG_SIG | ||
383 | printk("badframe in sys_rt_sigreturn, regs=%p uc=%p &uc->uc_mcontext=%p\n", | ||
384 | regs, uc, &uc->uc_mcontext); | ||
385 | #endif | ||
386 | force_sig(SIGSEGV, current); | ||
387 | return 0; | ||
388 | } | ||
389 | |||
390 | static int setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info, | ||
391 | sigset_t *set, struct pt_regs *regs) | ||
392 | { | ||
393 | /* Handler is *really* a pointer to the function descriptor for | ||
394 | * the signal routine. The first entry in the function | ||
395 | * descriptor is the entry address of signal and the second | ||
396 | * entry is the TOC value we need to use. | ||
397 | */ | ||
398 | func_descr_t __user *funct_desc_ptr; | ||
399 | struct rt_sigframe __user *frame; | ||
400 | unsigned long newsp = 0; | ||
401 | long err = 0; | ||
402 | |||
403 | frame = get_sigframe(ka, regs, sizeof(*frame)); | ||
404 | |||
405 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) | ||
406 | goto badframe; | ||
407 | |||
408 | err |= __put_user(&frame->info, &frame->pinfo); | ||
409 | err |= __put_user(&frame->uc, &frame->puc); | ||
410 | err |= copy_siginfo_to_user(&frame->info, info); | ||
411 | if (err) | ||
412 | goto badframe; | ||
413 | |||
414 | /* Create the ucontext. */ | ||
415 | err |= __put_user(0, &frame->uc.uc_flags); | ||
416 | err |= __put_user(0, &frame->uc.uc_link); | ||
417 | err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp); | ||
418 | err |= __put_user(sas_ss_flags(regs->gpr[1]), | ||
419 | &frame->uc.uc_stack.ss_flags); | ||
420 | err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); | ||
421 | err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, signr, NULL, | ||
422 | (unsigned long)ka->sa.sa_handler); | ||
423 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); | ||
424 | if (err) | ||
425 | goto badframe; | ||
426 | |||
427 | /* Set up to return from userspace. */ | ||
428 | if (vdso64_rt_sigtramp && current->thread.vdso_base) { | ||
429 | regs->link = current->thread.vdso_base + vdso64_rt_sigtramp; | ||
430 | } else { | ||
431 | err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]); | ||
432 | if (err) | ||
433 | goto badframe; | ||
434 | regs->link = (unsigned long) &frame->tramp[0]; | ||
435 | } | ||
436 | funct_desc_ptr = (func_descr_t __user *) ka->sa.sa_handler; | ||
437 | |||
438 | /* Allocate a dummy caller frame for the signal handler. */ | ||
439 | newsp = (unsigned long)frame - __SIGNAL_FRAMESIZE; | ||
440 | err |= put_user(regs->gpr[1], (unsigned long __user *)newsp); | ||
441 | |||
442 | /* Set up "regs" so we "return" to the signal handler. */ | ||
443 | err |= get_user(regs->nip, &funct_desc_ptr->entry); | ||
444 | regs->gpr[1] = newsp; | ||
445 | err |= get_user(regs->gpr[2], &funct_desc_ptr->toc); | ||
446 | regs->gpr[3] = signr; | ||
447 | regs->result = 0; | ||
448 | if (ka->sa.sa_flags & SA_SIGINFO) { | ||
449 | err |= get_user(regs->gpr[4], (unsigned long __user *)&frame->pinfo); | ||
450 | err |= get_user(regs->gpr[5], (unsigned long __user *)&frame->puc); | ||
451 | regs->gpr[6] = (unsigned long) frame; | ||
452 | } else { | ||
453 | regs->gpr[4] = (unsigned long)&frame->uc.uc_mcontext; | ||
454 | } | ||
455 | if (err) | ||
456 | goto badframe; | ||
457 | |||
458 | if (test_thread_flag(TIF_SINGLESTEP)) | ||
459 | ptrace_notify(SIGTRAP); | ||
460 | |||
461 | return 1; | ||
462 | |||
463 | badframe: | ||
464 | #if DEBUG_SIG | ||
465 | printk("badframe in setup_rt_frame, regs=%p frame=%p newsp=%lx\n", | ||
466 | regs, frame, newsp); | ||
467 | #endif | ||
468 | force_sigsegv(signr, current); | ||
469 | return 0; | ||
470 | } | ||
471 | |||
472 | |||
473 | /* | ||
474 | * OK, we're invoking a handler | ||
475 | */ | ||
476 | static int handle_signal(unsigned long sig, struct k_sigaction *ka, | ||
477 | siginfo_t *info, sigset_t *oldset, struct pt_regs *regs) | ||
478 | { | ||
479 | int ret; | ||
480 | |||
481 | /* Set up Signal Frame */ | ||
482 | ret = setup_rt_frame(sig, ka, info, oldset, regs); | ||
483 | |||
484 | if (ret) { | ||
485 | spin_lock_irq(¤t->sighand->siglock); | ||
486 | sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); | ||
487 | if (!(ka->sa.sa_flags & SA_NODEFER)) | ||
488 | sigaddset(¤t->blocked,sig); | ||
489 | recalc_sigpending(); | ||
490 | spin_unlock_irq(¤t->sighand->siglock); | ||
491 | } | ||
492 | |||
493 | return ret; | ||
494 | } | ||
495 | |||
496 | static inline void syscall_restart(struct pt_regs *regs, struct k_sigaction *ka) | ||
497 | { | ||
498 | switch ((int)regs->result) { | ||
499 | case -ERESTART_RESTARTBLOCK: | ||
500 | case -ERESTARTNOHAND: | ||
501 | /* ERESTARTNOHAND means that the syscall should only be | ||
502 | * restarted if there was no handler for the signal, and since | ||
503 | * we only get here if there is a handler, we dont restart. | ||
504 | */ | ||
505 | regs->result = -EINTR; | ||
506 | break; | ||
507 | case -ERESTARTSYS: | ||
508 | /* ERESTARTSYS means to restart the syscall if there is no | ||
509 | * handler or the handler was registered with SA_RESTART | ||
510 | */ | ||
511 | if (!(ka->sa.sa_flags & SA_RESTART)) { | ||
512 | regs->result = -EINTR; | ||
513 | break; | ||
514 | } | ||
515 | /* fallthrough */ | ||
516 | case -ERESTARTNOINTR: | ||
517 | /* ERESTARTNOINTR means that the syscall should be | ||
518 | * called again after the signal handler returns. | ||
519 | */ | ||
520 | regs->gpr[3] = regs->orig_gpr3; | ||
521 | regs->nip -= 4; | ||
522 | regs->result = 0; | ||
523 | break; | ||
524 | } | ||
525 | } | ||
526 | |||
527 | /* | ||
528 | * Note that 'init' is a special process: it doesn't get signals it doesn't | ||
529 | * want to handle. Thus you cannot kill init even with a SIGKILL even by | ||
530 | * mistake. | ||
531 | */ | ||
532 | int do_signal(sigset_t *oldset, struct pt_regs *regs) | ||
533 | { | ||
534 | siginfo_t info; | ||
535 | int signr; | ||
536 | struct k_sigaction ka; | ||
537 | |||
538 | /* | ||
539 | * If the current thread is 32 bit - invoke the | ||
540 | * 32 bit signal handling code | ||
541 | */ | ||
542 | if (test_thread_flag(TIF_32BIT)) | ||
543 | return do_signal32(oldset, regs); | ||
544 | |||
545 | if (!oldset) | ||
546 | oldset = ¤t->blocked; | ||
547 | |||
548 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | ||
549 | if (signr > 0) { | ||
550 | /* Whee! Actually deliver the signal. */ | ||
551 | if (TRAP(regs) == 0x0C00) | ||
552 | syscall_restart(regs, &ka); | ||
553 | |||
554 | /* | ||
555 | * Reenable the DABR before delivering the signal to | ||
556 | * user space. The DABR will have been cleared if it | ||
557 | * triggered inside the kernel. | ||
558 | */ | ||
559 | if (current->thread.dabr) | ||
560 | set_dabr(current->thread.dabr); | ||
561 | |||
562 | return handle_signal(signr, &ka, &info, oldset, regs); | ||
563 | } | ||
564 | |||
565 | if (TRAP(regs) == 0x0C00) { /* System Call! */ | ||
566 | if ((int)regs->result == -ERESTARTNOHAND || | ||
567 | (int)regs->result == -ERESTARTSYS || | ||
568 | (int)regs->result == -ERESTARTNOINTR) { | ||
569 | regs->gpr[3] = regs->orig_gpr3; | ||
570 | regs->nip -= 4; /* Back up & retry system call */ | ||
571 | regs->result = 0; | ||
572 | } else if ((int)regs->result == -ERESTART_RESTARTBLOCK) { | ||
573 | regs->gpr[0] = __NR_restart_syscall; | ||
574 | regs->nip -= 4; | ||
575 | regs->result = 0; | ||
576 | } | ||
577 | } | ||
578 | |||
579 | return 0; | ||
580 | } | ||
581 | EXPORT_SYMBOL(do_signal); | ||
diff --git a/arch/powerpc/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c new file mode 100644 index 000000000000..9adef3bddad4 --- /dev/null +++ b/arch/powerpc/kernel/smp-tbsync.c | |||
@@ -0,0 +1,171 @@ | |||
1 | /* | ||
2 | * Smp timebase synchronization for ppc. | ||
3 | * | ||
4 | * Copyright (C) 2003 Samuel Rydh (samuel@ibrium.se) | ||
5 | * | ||
6 | */ | ||
7 | |||
8 | #include <linux/config.h> | ||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/sched.h> | ||
11 | #include <linux/smp.h> | ||
12 | #include <linux/unistd.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <asm/atomic.h> | ||
15 | #include <asm/smp.h> | ||
16 | #include <asm/time.h> | ||
17 | |||
18 | #define NUM_ITER 300 | ||
19 | |||
20 | enum { | ||
21 | kExit=0, kSetAndTest, kTest | ||
22 | }; | ||
23 | |||
24 | static struct { | ||
25 | volatile u64 tb; | ||
26 | volatile u64 mark; | ||
27 | volatile int cmd; | ||
28 | volatile int handshake; | ||
29 | int filler[2]; | ||
30 | |||
31 | volatile int ack; | ||
32 | int filler2[7]; | ||
33 | |||
34 | volatile int race_result; | ||
35 | } *tbsync; | ||
36 | |||
37 | static volatile int running; | ||
38 | |||
39 | static void __devinit enter_contest(u64 mark, long add) | ||
40 | { | ||
41 | while (get_tb() < mark) | ||
42 | tbsync->race_result = add; | ||
43 | } | ||
44 | |||
45 | void __devinit smp_generic_take_timebase(void) | ||
46 | { | ||
47 | int cmd; | ||
48 | u64 tb; | ||
49 | |||
50 | local_irq_disable(); | ||
51 | while (!running) | ||
52 | barrier(); | ||
53 | rmb(); | ||
54 | |||
55 | for (;;) { | ||
56 | tbsync->ack = 1; | ||
57 | while (!tbsync->handshake) | ||
58 | barrier(); | ||
59 | rmb(); | ||
60 | |||
61 | cmd = tbsync->cmd; | ||
62 | tb = tbsync->tb; | ||
63 | mb(); | ||
64 | tbsync->ack = 0; | ||
65 | if (cmd == kExit) | ||
66 | break; | ||
67 | |||
68 | while (tbsync->handshake) | ||
69 | barrier(); | ||
70 | if (cmd == kSetAndTest) | ||
71 | set_tb(tb >> 32, tb & 0xfffffffful); | ||
72 | enter_contest(tbsync->mark, -1); | ||
73 | } | ||
74 | local_irq_enable(); | ||
75 | } | ||
76 | |||
77 | static int __devinit start_contest(int cmd, long offset, int num) | ||
78 | { | ||
79 | int i, score=0; | ||
80 | u64 tb; | ||
81 | long mark; | ||
82 | |||
83 | tbsync->cmd = cmd; | ||
84 | |||
85 | local_irq_disable(); | ||
86 | for (i = -3; i < num; ) { | ||
87 | tb = get_tb() + 400; | ||
88 | tbsync->tb = tb + offset; | ||
89 | tbsync->mark = mark = tb + 400; | ||
90 | |||
91 | wmb(); | ||
92 | |||
93 | tbsync->handshake = 1; | ||
94 | while (tbsync->ack) | ||
95 | barrier(); | ||
96 | |||
97 | while (get_tb() <= tb) | ||
98 | barrier(); | ||
99 | tbsync->handshake = 0; | ||
100 | enter_contest(mark, 1); | ||
101 | |||
102 | while (!tbsync->ack) | ||
103 | barrier(); | ||
104 | |||
105 | if (i++ > 0) | ||
106 | score += tbsync->race_result; | ||
107 | } | ||
108 | local_irq_enable(); | ||
109 | return score; | ||
110 | } | ||
111 | |||
112 | void __devinit smp_generic_give_timebase(void) | ||
113 | { | ||
114 | int i, score, score2, old, min=0, max=5000, offset=1000; | ||
115 | |||
116 | printk("Synchronizing timebase\n"); | ||
117 | |||
118 | /* if this fails then this kernel won't work anyway... */ | ||
119 | tbsync = kmalloc( sizeof(*tbsync), GFP_KERNEL ); | ||
120 | memset( tbsync, 0, sizeof(*tbsync) ); | ||
121 | mb(); | ||
122 | running = 1; | ||
123 | |||
124 | while (!tbsync->ack) | ||
125 | barrier(); | ||
126 | |||
127 | printk("Got ack\n"); | ||
128 | |||
129 | /* binary search */ | ||
130 | for (old = -1; old != offset ; offset = (min+max) / 2) { | ||
131 | score = start_contest(kSetAndTest, offset, NUM_ITER); | ||
132 | |||
133 | printk("score %d, offset %d\n", score, offset ); | ||
134 | |||
135 | if( score > 0 ) | ||
136 | max = offset; | ||
137 | else | ||
138 | min = offset; | ||
139 | old = offset; | ||
140 | } | ||
141 | score = start_contest(kSetAndTest, min, NUM_ITER); | ||
142 | score2 = start_contest(kSetAndTest, max, NUM_ITER); | ||
143 | |||
144 | printk("Min %d (score %d), Max %d (score %d)\n", | ||
145 | min, score, max, score2); | ||
146 | score = abs(score); | ||
147 | score2 = abs(score2); | ||
148 | offset = (score < score2) ? min : max; | ||
149 | |||
150 | /* guard against inaccurate mttb */ | ||
151 | for (i = 0; i < 10; i++) { | ||
152 | start_contest(kSetAndTest, offset, NUM_ITER/10); | ||
153 | |||
154 | if ((score2 = start_contest(kTest, offset, NUM_ITER)) < 0) | ||
155 | score2 = -score2; | ||
156 | if (score2 <= score || score2 < 20) | ||
157 | break; | ||
158 | } | ||
159 | printk("Final offset: %d (%d/%d)\n", offset, score2, NUM_ITER ); | ||
160 | |||
161 | /* exiting */ | ||
162 | tbsync->cmd = kExit; | ||
163 | wmb(); | ||
164 | tbsync->handshake = 1; | ||
165 | while (tbsync->ack) | ||
166 | barrier(); | ||
167 | tbsync->handshake = 0; | ||
168 | kfree(tbsync); | ||
169 | tbsync = NULL; | ||
170 | running = 0; | ||
171 | } | ||
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c new file mode 100644 index 000000000000..1794a694a928 --- /dev/null +++ b/arch/powerpc/kernel/smp.c | |||
@@ -0,0 +1,565 @@ | |||
1 | /* | ||
2 | * SMP support for ppc. | ||
3 | * | ||
4 | * Written by Cort Dougan (cort@cs.nmt.edu) borrowing a great | ||
5 | * deal of code from the sparc and intel versions. | ||
6 | * | ||
7 | * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu> | ||
8 | * | ||
9 | * PowerPC-64 Support added by Dave Engebretsen, Peter Bergner, and | ||
10 | * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version | ||
15 | * 2 of the License, or (at your option) any later version. | ||
16 | */ | ||
17 | |||
18 | #undef DEBUG | ||
19 | |||
20 | #include <linux/config.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/module.h> | ||
23 | #include <linux/sched.h> | ||
24 | #include <linux/smp.h> | ||
25 | #include <linux/interrupt.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/init.h> | ||
28 | #include <linux/spinlock.h> | ||
29 | #include <linux/cache.h> | ||
30 | #include <linux/err.h> | ||
31 | #include <linux/sysdev.h> | ||
32 | #include <linux/cpu.h> | ||
33 | #include <linux/notifier.h> | ||
34 | |||
35 | #include <asm/ptrace.h> | ||
36 | #include <asm/atomic.h> | ||
37 | #include <asm/irq.h> | ||
38 | #include <asm/page.h> | ||
39 | #include <asm/pgtable.h> | ||
40 | #include <asm/prom.h> | ||
41 | #include <asm/smp.h> | ||
42 | #include <asm/time.h> | ||
43 | #include <asm/xmon.h> | ||
44 | #include <asm/machdep.h> | ||
45 | #include <asm/cputable.h> | ||
46 | #include <asm/system.h> | ||
47 | #include <asm/mpic.h> | ||
48 | #ifdef CONFIG_PPC64 | ||
49 | #include <asm/paca.h> | ||
50 | #endif | ||
51 | |||
52 | int smp_hw_index[NR_CPUS]; | ||
53 | struct thread_info *secondary_ti; | ||
54 | |||
55 | #ifdef DEBUG | ||
56 | #define DBG(fmt...) udbg_printf(fmt) | ||
57 | #else | ||
58 | #define DBG(fmt...) | ||
59 | #endif | ||
60 | |||
61 | cpumask_t cpu_possible_map = CPU_MASK_NONE; | ||
62 | cpumask_t cpu_online_map = CPU_MASK_NONE; | ||
63 | cpumask_t cpu_sibling_map[NR_CPUS] = { [0 ... NR_CPUS-1] = CPU_MASK_NONE }; | ||
64 | |||
65 | EXPORT_SYMBOL(cpu_online_map); | ||
66 | EXPORT_SYMBOL(cpu_possible_map); | ||
67 | |||
68 | /* SMP operations for this machine */ | ||
69 | struct smp_ops_t *smp_ops; | ||
70 | |||
71 | static volatile unsigned int cpu_callin_map[NR_CPUS]; | ||
72 | |||
73 | void smp_call_function_interrupt(void); | ||
74 | |||
75 | int smt_enabled_at_boot = 1; | ||
76 | |||
77 | #ifdef CONFIG_MPIC | ||
78 | int __init smp_mpic_probe(void) | ||
79 | { | ||
80 | int nr_cpus; | ||
81 | |||
82 | DBG("smp_mpic_probe()...\n"); | ||
83 | |||
84 | nr_cpus = cpus_weight(cpu_possible_map); | ||
85 | |||
86 | DBG("nr_cpus: %d\n", nr_cpus); | ||
87 | |||
88 | if (nr_cpus > 1) | ||
89 | mpic_request_ipis(); | ||
90 | |||
91 | return nr_cpus; | ||
92 | } | ||
93 | |||
94 | void __devinit smp_mpic_setup_cpu(int cpu) | ||
95 | { | ||
96 | mpic_setup_this_cpu(); | ||
97 | } | ||
98 | #endif /* CONFIG_MPIC */ | ||
99 | |||
100 | #ifdef CONFIG_PPC64 | ||
101 | void __devinit smp_generic_kick_cpu(int nr) | ||
102 | { | ||
103 | BUG_ON(nr < 0 || nr >= NR_CPUS); | ||
104 | |||
105 | /* | ||
106 | * The processor is currently spinning, waiting for the | ||
107 | * cpu_start field to become non-zero After we set cpu_start, | ||
108 | * the processor will continue on to secondary_start | ||
109 | */ | ||
110 | paca[nr].cpu_start = 1; | ||
111 | smp_mb(); | ||
112 | } | ||
113 | #endif | ||
114 | |||
115 | void smp_message_recv(int msg, struct pt_regs *regs) | ||
116 | { | ||
117 | switch(msg) { | ||
118 | case PPC_MSG_CALL_FUNCTION: | ||
119 | smp_call_function_interrupt(); | ||
120 | break; | ||
121 | case PPC_MSG_RESCHEDULE: | ||
122 | /* XXX Do we have to do this? */ | ||
123 | set_need_resched(); | ||
124 | break; | ||
125 | #ifdef CONFIG_DEBUGGER | ||
126 | case PPC_MSG_DEBUGGER_BREAK: | ||
127 | debugger_ipi(regs); | ||
128 | break; | ||
129 | #endif | ||
130 | default: | ||
131 | printk("SMP %d: smp_message_recv(): unknown msg %d\n", | ||
132 | smp_processor_id(), msg); | ||
133 | break; | ||
134 | } | ||
135 | } | ||
136 | |||
137 | void smp_send_reschedule(int cpu) | ||
138 | { | ||
139 | smp_ops->message_pass(cpu, PPC_MSG_RESCHEDULE); | ||
140 | } | ||
141 | |||
142 | #ifdef CONFIG_DEBUGGER | ||
143 | void smp_send_debugger_break(int cpu) | ||
144 | { | ||
145 | smp_ops->message_pass(cpu, PPC_MSG_DEBUGGER_BREAK); | ||
146 | } | ||
147 | #endif | ||
148 | |||
149 | static void stop_this_cpu(void *dummy) | ||
150 | { | ||
151 | local_irq_disable(); | ||
152 | while (1) | ||
153 | ; | ||
154 | } | ||
155 | |||
156 | void smp_send_stop(void) | ||
157 | { | ||
158 | smp_call_function(stop_this_cpu, NULL, 1, 0); | ||
159 | } | ||
160 | |||
161 | /* | ||
162 | * Structure and data for smp_call_function(). This is designed to minimise | ||
163 | * static memory requirements. It also looks cleaner. | ||
164 | * Stolen from the i386 version. | ||
165 | */ | ||
166 | static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock); | ||
167 | |||
168 | static struct call_data_struct { | ||
169 | void (*func) (void *info); | ||
170 | void *info; | ||
171 | atomic_t started; | ||
172 | atomic_t finished; | ||
173 | int wait; | ||
174 | } *call_data; | ||
175 | |||
176 | /* delay of at least 8 seconds */ | ||
177 | #define SMP_CALL_TIMEOUT 8 | ||
178 | |||
179 | /* | ||
180 | * This function sends a 'generic call function' IPI to all other CPUs | ||
181 | * in the system. | ||
182 | * | ||
183 | * [SUMMARY] Run a function on all other CPUs. | ||
184 | * <func> The function to run. This must be fast and non-blocking. | ||
185 | * <info> An arbitrary pointer to pass to the function. | ||
186 | * <nonatomic> currently unused. | ||
187 | * <wait> If true, wait (atomically) until function has completed on other CPUs. | ||
188 | * [RETURNS] 0 on success, else a negative status code. Does not return until | ||
189 | * remote CPUs are nearly ready to execute <<func>> or are or have executed. | ||
190 | * | ||
191 | * You must not call this function with disabled interrupts or from a | ||
192 | * hardware interrupt handler or from a bottom half handler. | ||
193 | */ | ||
194 | int smp_call_function (void (*func) (void *info), void *info, int nonatomic, | ||
195 | int wait) | ||
196 | { | ||
197 | struct call_data_struct data; | ||
198 | int ret = -1, cpus; | ||
199 | u64 timeout; | ||
200 | |||
201 | /* Can deadlock when called with interrupts disabled */ | ||
202 | WARN_ON(irqs_disabled()); | ||
203 | |||
204 | data.func = func; | ||
205 | data.info = info; | ||
206 | atomic_set(&data.started, 0); | ||
207 | data.wait = wait; | ||
208 | if (wait) | ||
209 | atomic_set(&data.finished, 0); | ||
210 | |||
211 | spin_lock(&call_lock); | ||
212 | /* Must grab online cpu count with preempt disabled, otherwise | ||
213 | * it can change. */ | ||
214 | cpus = num_online_cpus() - 1; | ||
215 | if (!cpus) { | ||
216 | ret = 0; | ||
217 | goto out; | ||
218 | } | ||
219 | |||
220 | call_data = &data; | ||
221 | smp_wmb(); | ||
222 | /* Send a message to all other CPUs and wait for them to respond */ | ||
223 | smp_ops->message_pass(MSG_ALL_BUT_SELF, PPC_MSG_CALL_FUNCTION); | ||
224 | |||
225 | timeout = get_tb() + (u64) SMP_CALL_TIMEOUT * tb_ticks_per_sec; | ||
226 | |||
227 | /* Wait for response */ | ||
228 | while (atomic_read(&data.started) != cpus) { | ||
229 | HMT_low(); | ||
230 | if (get_tb() >= timeout) { | ||
231 | printk("smp_call_function on cpu %d: other cpus not " | ||
232 | "responding (%d)\n", smp_processor_id(), | ||
233 | atomic_read(&data.started)); | ||
234 | debugger(NULL); | ||
235 | goto out; | ||
236 | } | ||
237 | } | ||
238 | |||
239 | if (wait) { | ||
240 | while (atomic_read(&data.finished) != cpus) { | ||
241 | HMT_low(); | ||
242 | if (get_tb() >= timeout) { | ||
243 | printk("smp_call_function on cpu %d: other " | ||
244 | "cpus not finishing (%d/%d)\n", | ||
245 | smp_processor_id(), | ||
246 | atomic_read(&data.finished), | ||
247 | atomic_read(&data.started)); | ||
248 | debugger(NULL); | ||
249 | goto out; | ||
250 | } | ||
251 | } | ||
252 | } | ||
253 | |||
254 | ret = 0; | ||
255 | |||
256 | out: | ||
257 | call_data = NULL; | ||
258 | HMT_medium(); | ||
259 | spin_unlock(&call_lock); | ||
260 | return ret; | ||
261 | } | ||
262 | |||
263 | EXPORT_SYMBOL(smp_call_function); | ||
264 | |||
265 | void smp_call_function_interrupt(void) | ||
266 | { | ||
267 | void (*func) (void *info); | ||
268 | void *info; | ||
269 | int wait; | ||
270 | |||
271 | /* call_data will be NULL if the sender timed out while | ||
272 | * waiting on us to receive the call. | ||
273 | */ | ||
274 | if (!call_data) | ||
275 | return; | ||
276 | |||
277 | func = call_data->func; | ||
278 | info = call_data->info; | ||
279 | wait = call_data->wait; | ||
280 | |||
281 | if (!wait) | ||
282 | smp_mb__before_atomic_inc(); | ||
283 | |||
284 | /* | ||
285 | * Notify initiating CPU that I've grabbed the data and am | ||
286 | * about to execute the function | ||
287 | */ | ||
288 | atomic_inc(&call_data->started); | ||
289 | /* | ||
290 | * At this point the info structure may be out of scope unless wait==1 | ||
291 | */ | ||
292 | (*func)(info); | ||
293 | if (wait) { | ||
294 | smp_mb__before_atomic_inc(); | ||
295 | atomic_inc(&call_data->finished); | ||
296 | } | ||
297 | } | ||
298 | |||
299 | extern struct gettimeofday_struct do_gtod; | ||
300 | |||
301 | struct thread_info *current_set[NR_CPUS]; | ||
302 | |||
303 | DECLARE_PER_CPU(unsigned int, pvr); | ||
304 | |||
305 | static void __devinit smp_store_cpu_info(int id) | ||
306 | { | ||
307 | per_cpu(pvr, id) = mfspr(SPRN_PVR); | ||
308 | } | ||
309 | |||
310 | static void __init smp_create_idle(unsigned int cpu) | ||
311 | { | ||
312 | struct task_struct *p; | ||
313 | |||
314 | /* create a process for the processor */ | ||
315 | p = fork_idle(cpu); | ||
316 | if (IS_ERR(p)) | ||
317 | panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); | ||
318 | #ifdef CONFIG_PPC64 | ||
319 | paca[cpu].__current = p; | ||
320 | #endif | ||
321 | current_set[cpu] = p->thread_info; | ||
322 | p->thread_info->cpu = cpu; | ||
323 | } | ||
324 | |||
325 | void __init smp_prepare_cpus(unsigned int max_cpus) | ||
326 | { | ||
327 | unsigned int cpu; | ||
328 | |||
329 | DBG("smp_prepare_cpus\n"); | ||
330 | |||
331 | /* | ||
332 | * setup_cpu may need to be called on the boot cpu. We havent | ||
333 | * spun any cpus up but lets be paranoid. | ||
334 | */ | ||
335 | BUG_ON(boot_cpuid != smp_processor_id()); | ||
336 | |||
337 | /* Fixup boot cpu */ | ||
338 | smp_store_cpu_info(boot_cpuid); | ||
339 | cpu_callin_map[boot_cpuid] = 1; | ||
340 | |||
341 | max_cpus = smp_ops->probe(); | ||
342 | |||
343 | smp_space_timers(max_cpus); | ||
344 | |||
345 | for_each_cpu(cpu) | ||
346 | if (cpu != boot_cpuid) | ||
347 | smp_create_idle(cpu); | ||
348 | } | ||
349 | |||
350 | void __devinit smp_prepare_boot_cpu(void) | ||
351 | { | ||
352 | BUG_ON(smp_processor_id() != boot_cpuid); | ||
353 | |||
354 | cpu_set(boot_cpuid, cpu_online_map); | ||
355 | #ifdef CONFIG_PPC64 | ||
356 | paca[boot_cpuid].__current = current; | ||
357 | #endif | ||
358 | current_set[boot_cpuid] = current->thread_info; | ||
359 | } | ||
360 | |||
361 | #ifdef CONFIG_HOTPLUG_CPU | ||
362 | /* State of each CPU during hotplug phases */ | ||
363 | DEFINE_PER_CPU(int, cpu_state) = { 0 }; | ||
364 | |||
365 | int generic_cpu_disable(void) | ||
366 | { | ||
367 | unsigned int cpu = smp_processor_id(); | ||
368 | |||
369 | if (cpu == boot_cpuid) | ||
370 | return -EBUSY; | ||
371 | |||
372 | systemcfg->processorCount--; | ||
373 | cpu_clear(cpu, cpu_online_map); | ||
374 | fixup_irqs(cpu_online_map); | ||
375 | return 0; | ||
376 | } | ||
377 | |||
378 | int generic_cpu_enable(unsigned int cpu) | ||
379 | { | ||
380 | /* Do the normal bootup if we haven't | ||
381 | * already bootstrapped. */ | ||
382 | if (system_state != SYSTEM_RUNNING) | ||
383 | return -ENOSYS; | ||
384 | |||
385 | /* get the target out of it's holding state */ | ||
386 | per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; | ||
387 | smp_wmb(); | ||
388 | |||
389 | while (!cpu_online(cpu)) | ||
390 | cpu_relax(); | ||
391 | |||
392 | fixup_irqs(cpu_online_map); | ||
393 | /* counter the irq disable in fixup_irqs */ | ||
394 | local_irq_enable(); | ||
395 | return 0; | ||
396 | } | ||
397 | |||
398 | void generic_cpu_die(unsigned int cpu) | ||
399 | { | ||
400 | int i; | ||
401 | |||
402 | for (i = 0; i < 100; i++) { | ||
403 | smp_rmb(); | ||
404 | if (per_cpu(cpu_state, cpu) == CPU_DEAD) | ||
405 | return; | ||
406 | msleep(100); | ||
407 | } | ||
408 | printk(KERN_ERR "CPU%d didn't die...\n", cpu); | ||
409 | } | ||
410 | |||
411 | void generic_mach_cpu_die(void) | ||
412 | { | ||
413 | unsigned int cpu; | ||
414 | |||
415 | local_irq_disable(); | ||
416 | cpu = smp_processor_id(); | ||
417 | printk(KERN_DEBUG "CPU%d offline\n", cpu); | ||
418 | __get_cpu_var(cpu_state) = CPU_DEAD; | ||
419 | smp_wmb(); | ||
420 | while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) | ||
421 | cpu_relax(); | ||
422 | |||
423 | flush_tlb_pending(); | ||
424 | cpu_set(cpu, cpu_online_map); | ||
425 | local_irq_enable(); | ||
426 | } | ||
427 | #endif | ||
428 | |||
429 | static int __devinit cpu_enable(unsigned int cpu) | ||
430 | { | ||
431 | if (smp_ops->cpu_enable) | ||
432 | return smp_ops->cpu_enable(cpu); | ||
433 | |||
434 | return -ENOSYS; | ||
435 | } | ||
436 | |||
437 | int __devinit __cpu_up(unsigned int cpu) | ||
438 | { | ||
439 | int c; | ||
440 | |||
441 | secondary_ti = current_set[cpu]; | ||
442 | if (!cpu_enable(cpu)) | ||
443 | return 0; | ||
444 | |||
445 | if (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu)) | ||
446 | return -EINVAL; | ||
447 | |||
448 | #ifdef CONFIG_PPC64 | ||
449 | paca[cpu].default_decr = tb_ticks_per_jiffy; | ||
450 | #endif | ||
451 | |||
452 | /* Make sure callin-map entry is 0 (can be leftover a CPU | ||
453 | * hotplug | ||
454 | */ | ||
455 | cpu_callin_map[cpu] = 0; | ||
456 | |||
457 | /* The information for processor bringup must | ||
458 | * be written out to main store before we release | ||
459 | * the processor. | ||
460 | */ | ||
461 | smp_mb(); | ||
462 | |||
463 | /* wake up cpus */ | ||
464 | DBG("smp: kicking cpu %d\n", cpu); | ||
465 | smp_ops->kick_cpu(cpu); | ||
466 | |||
467 | /* | ||
468 | * wait to see if the cpu made a callin (is actually up). | ||
469 | * use this value that I found through experimentation. | ||
470 | * -- Cort | ||
471 | */ | ||
472 | if (system_state < SYSTEM_RUNNING) | ||
473 | for (c = 5000; c && !cpu_callin_map[cpu]; c--) | ||
474 | udelay(100); | ||
475 | #ifdef CONFIG_HOTPLUG_CPU | ||
476 | else | ||
477 | /* | ||
478 | * CPUs can take much longer to come up in the | ||
479 | * hotplug case. Wait five seconds. | ||
480 | */ | ||
481 | for (c = 25; c && !cpu_callin_map[cpu]; c--) { | ||
482 | msleep(200); | ||
483 | } | ||
484 | #endif | ||
485 | |||
486 | if (!cpu_callin_map[cpu]) { | ||
487 | printk("Processor %u is stuck.\n", cpu); | ||
488 | return -ENOENT; | ||
489 | } | ||
490 | |||
491 | printk("Processor %u found.\n", cpu); | ||
492 | |||
493 | if (smp_ops->give_timebase) | ||
494 | smp_ops->give_timebase(); | ||
495 | |||
496 | /* Wait until cpu puts itself in the online map */ | ||
497 | while (!cpu_online(cpu)) | ||
498 | cpu_relax(); | ||
499 | |||
500 | return 0; | ||
501 | } | ||
502 | |||
503 | |||
504 | /* Activate a secondary processor. */ | ||
505 | int __devinit start_secondary(void *unused) | ||
506 | { | ||
507 | unsigned int cpu = smp_processor_id(); | ||
508 | |||
509 | atomic_inc(&init_mm.mm_count); | ||
510 | current->active_mm = &init_mm; | ||
511 | |||
512 | smp_store_cpu_info(cpu); | ||
513 | set_dec(tb_ticks_per_jiffy); | ||
514 | cpu_callin_map[cpu] = 1; | ||
515 | |||
516 | smp_ops->setup_cpu(cpu); | ||
517 | if (smp_ops->take_timebase) | ||
518 | smp_ops->take_timebase(); | ||
519 | |||
520 | spin_lock(&call_lock); | ||
521 | cpu_set(cpu, cpu_online_map); | ||
522 | spin_unlock(&call_lock); | ||
523 | |||
524 | local_irq_enable(); | ||
525 | |||
526 | cpu_idle(); | ||
527 | return 0; | ||
528 | } | ||
529 | |||
530 | int setup_profiling_timer(unsigned int multiplier) | ||
531 | { | ||
532 | return 0; | ||
533 | } | ||
534 | |||
535 | void __init smp_cpus_done(unsigned int max_cpus) | ||
536 | { | ||
537 | cpumask_t old_mask; | ||
538 | |||
539 | /* We want the setup_cpu() here to be called from CPU 0, but our | ||
540 | * init thread may have been "borrowed" by another CPU in the meantime | ||
541 | * se we pin us down to CPU 0 for a short while | ||
542 | */ | ||
543 | old_mask = current->cpus_allowed; | ||
544 | set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid)); | ||
545 | |||
546 | smp_ops->setup_cpu(boot_cpuid); | ||
547 | |||
548 | set_cpus_allowed(current, old_mask); | ||
549 | } | ||
550 | |||
551 | #ifdef CONFIG_HOTPLUG_CPU | ||
552 | int __cpu_disable(void) | ||
553 | { | ||
554 | if (smp_ops->cpu_disable) | ||
555 | return smp_ops->cpu_disable(); | ||
556 | |||
557 | return -ENOSYS; | ||
558 | } | ||
559 | |||
560 | void __cpu_die(unsigned int cpu) | ||
561 | { | ||
562 | if (smp_ops->cpu_die) | ||
563 | smp_ops->cpu_die(cpu); | ||
564 | } | ||
565 | #endif | ||
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 23436b6c1881..b1c89bc4bf90 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -66,9 +66,10 @@ | |||
66 | #include <asm/firmware.h> | 66 | #include <asm/firmware.h> |
67 | #endif | 67 | #endif |
68 | #ifdef CONFIG_PPC_ISERIES | 68 | #ifdef CONFIG_PPC_ISERIES |
69 | #include <asm/iSeries/ItLpQueue.h> | 69 | #include <asm/iseries/it_lp_queue.h> |
70 | #include <asm/iSeries/HvCallXm.h> | 70 | #include <asm/iseries/hv_call_xm.h> |
71 | #endif | 71 | #endif |
72 | #include <asm/smp.h> | ||
72 | 73 | ||
73 | /* keep track of when we need to update the rtc */ | 74 | /* keep track of when we need to update the rtc */ |
74 | time_t last_rtc_update; | 75 | time_t last_rtc_update; |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 5d638ecddbd0..07e5ee40b870 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -147,8 +147,8 @@ int die(const char *str, struct pt_regs *regs, long err) | |||
147 | printk("POWERMAC "); | 147 | printk("POWERMAC "); |
148 | nl = 1; | 148 | nl = 1; |
149 | break; | 149 | break; |
150 | case PLATFORM_BPA: | 150 | case PLATFORM_CELL: |
151 | printk("BPA "); | 151 | printk("CELL "); |
152 | nl = 1; | 152 | nl = 1; |
153 | break; | 153 | break; |
154 | } | 154 | } |
@@ -749,22 +749,22 @@ static int check_bug_trap(struct pt_regs *regs) | |||
749 | if (bug->line & BUG_WARNING_TRAP) { | 749 | if (bug->line & BUG_WARNING_TRAP) { |
750 | /* this is a WARN_ON rather than BUG/BUG_ON */ | 750 | /* this is a WARN_ON rather than BUG/BUG_ON */ |
751 | #ifdef CONFIG_XMON | 751 | #ifdef CONFIG_XMON |
752 | xmon_printf(KERN_ERR "Badness in %s at %s:%d\n", | 752 | xmon_printf(KERN_ERR "Badness in %s at %s:%ld\n", |
753 | bug->function, bug->file, | 753 | bug->function, bug->file, |
754 | bug->line & ~BUG_WARNING_TRAP); | 754 | bug->line & ~BUG_WARNING_TRAP); |
755 | #endif /* CONFIG_XMON */ | 755 | #endif /* CONFIG_XMON */ |
756 | printk(KERN_ERR "Badness in %s at %s:%d\n", | 756 | printk(KERN_ERR "Badness in %s at %s:%ld\n", |
757 | bug->function, bug->file, | 757 | bug->function, bug->file, |
758 | bug->line & ~BUG_WARNING_TRAP); | 758 | bug->line & ~BUG_WARNING_TRAP); |
759 | dump_stack(); | 759 | dump_stack(); |
760 | return 1; | 760 | return 1; |
761 | } | 761 | } |
762 | #ifdef CONFIG_XMON | 762 | #ifdef CONFIG_XMON |
763 | xmon_printf(KERN_CRIT "kernel BUG in %s at %s:%d!\n", | 763 | xmon_printf(KERN_CRIT "kernel BUG in %s at %s:%ld!\n", |
764 | bug->function, bug->file, bug->line); | 764 | bug->function, bug->file, bug->line); |
765 | xmon(regs); | 765 | xmon(regs); |
766 | #endif /* CONFIG_XMON */ | 766 | #endif /* CONFIG_XMON */ |
767 | printk(KERN_CRIT "kernel BUG in %s at %s:%d!\n", | 767 | printk(KERN_CRIT "kernel BUG in %s at %s:%ld!\n", |
768 | bug->function, bug->file, bug->line); | 768 | bug->function, bug->file, bug->line); |
769 | 769 | ||
770 | return 0; | 770 | return 0; |
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index d4dfcfbce272..7fa7b15fd8e6 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -3,9 +3,12 @@ | |||
3 | #include <asm/page.h> | 3 | #include <asm/page.h> |
4 | #else | 4 | #else |
5 | #define PAGE_SIZE 4096 | 5 | #define PAGE_SIZE 4096 |
6 | #define KERNELBASE CONFIG_KERNEL_START | ||
6 | #endif | 7 | #endif |
7 | #include <asm-generic/vmlinux.lds.h> | 8 | #include <asm-generic/vmlinux.lds.h> |
8 | 9 | ||
10 | ENTRY(_stext) | ||
11 | |||
9 | #ifdef CONFIG_PPC64 | 12 | #ifdef CONFIG_PPC64 |
10 | OUTPUT_ARCH(powerpc:common64) | 13 | OUTPUT_ARCH(powerpc:common64) |
11 | jiffies = jiffies_64; | 14 | jiffies = jiffies_64; |
@@ -21,33 +24,9 @@ SECTIONS | |||
21 | *(.exit.data) | 24 | *(.exit.data) |
22 | } | 25 | } |
23 | 26 | ||
27 | . = KERNELBASE; | ||
24 | 28 | ||
25 | /* Read-only sections, merged into text segment: */ | 29 | /* Read-only sections, merged into text segment: */ |
26 | #ifdef CONFIG_PPC32 | ||
27 | . = + SIZEOF_HEADERS; | ||
28 | .interp : { *(.interp) } | ||
29 | .hash : { *(.hash) } | ||
30 | .dynsym : { *(.dynsym) } | ||
31 | .dynstr : { *(.dynstr) } | ||
32 | .rel.text : { *(.rel.text) } | ||
33 | .rela.text : { *(.rela.text) } | ||
34 | .rel.data : { *(.rel.data) } | ||
35 | .rela.data : { *(.rela.data) } | ||
36 | .rel.rodata : { *(.rel.rodata) } | ||
37 | .rela.rodata : { *(.rela.rodata) } | ||
38 | .rel.got : { *(.rel.got) } | ||
39 | .rela.got : { *(.rela.got) } | ||
40 | .rel.ctors : { *(.rel.ctors) } | ||
41 | .rela.ctors : { *(.rela.ctors) } | ||
42 | .rel.dtors : { *(.rel.dtors) } | ||
43 | .rela.dtors : { *(.rela.dtors) } | ||
44 | .rel.bss : { *(.rel.bss) } | ||
45 | .rela.bss : { *(.rela.bss) } | ||
46 | .rel.plt : { *(.rel.plt) } | ||
47 | .rela.plt : { *(.rela.plt) } | ||
48 | /* .init : { *(.init) } =0*/ | ||
49 | .plt : { *(.plt) } | ||
50 | #endif | ||
51 | .text : { | 30 | .text : { |
52 | *(.text .text.*) | 31 | *(.text .text.*) |
53 | SCHED_TEXT | 32 | SCHED_TEXT |
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index e6b2be3bcec1..34f5c2e074c9 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile | |||
@@ -3,13 +3,14 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | ifeq ($(CONFIG_PPC_MERGE),y) | 5 | ifeq ($(CONFIG_PPC_MERGE),y) |
6 | obj-y := string.o | 6 | obj-y := string.o strcase.o |
7 | obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o | ||
7 | endif | 8 | endif |
8 | 9 | ||
9 | obj-y += strcase.o | 10 | obj-y += bitops.o |
10 | obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o | ||
11 | obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ | 11 | obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ |
12 | memcpy_64.o usercopy_64.o mem_64.o | 12 | memcpy_64.o usercopy_64.o mem_64.o string.o \ |
13 | strcase.o | ||
13 | obj-$(CONFIG_PPC_ISERIES) += e2a.o | 14 | obj-$(CONFIG_PPC_ISERIES) += e2a.o |
14 | obj-$(CONFIG_XMON) += sstep.o | 15 | obj-$(CONFIG_XMON) += sstep.o |
15 | 16 | ||
diff --git a/arch/powerpc/lib/bitops.c b/arch/powerpc/lib/bitops.c new file mode 100644 index 000000000000..b67ce3004ebf --- /dev/null +++ b/arch/powerpc/lib/bitops.c | |||
@@ -0,0 +1,150 @@ | |||
1 | #include <linux/types.h> | ||
2 | #include <linux/module.h> | ||
3 | #include <asm/byteorder.h> | ||
4 | #include <asm/bitops.h> | ||
5 | |||
6 | /** | ||
7 | * find_next_bit - find the next set bit in a memory region | ||
8 | * @addr: The address to base the search on | ||
9 | * @offset: The bitnumber to start searching at | ||
10 | * @size: The maximum size to search | ||
11 | */ | ||
12 | unsigned long find_next_bit(const unsigned long *addr, unsigned long size, | ||
13 | unsigned long offset) | ||
14 | { | ||
15 | const unsigned long *p = addr + BITOP_WORD(offset); | ||
16 | unsigned long result = offset & ~(BITS_PER_LONG-1); | ||
17 | unsigned long tmp; | ||
18 | |||
19 | if (offset >= size) | ||
20 | return size; | ||
21 | size -= result; | ||
22 | offset %= BITS_PER_LONG; | ||
23 | if (offset) { | ||
24 | tmp = *(p++); | ||
25 | tmp &= (~0UL << offset); | ||
26 | if (size < BITS_PER_LONG) | ||
27 | goto found_first; | ||
28 | if (tmp) | ||
29 | goto found_middle; | ||
30 | size -= BITS_PER_LONG; | ||
31 | result += BITS_PER_LONG; | ||
32 | } | ||
33 | while (size & ~(BITS_PER_LONG-1)) { | ||
34 | if ((tmp = *(p++))) | ||
35 | goto found_middle; | ||
36 | result += BITS_PER_LONG; | ||
37 | size -= BITS_PER_LONG; | ||
38 | } | ||
39 | if (!size) | ||
40 | return result; | ||
41 | tmp = *p; | ||
42 | |||
43 | found_first: | ||
44 | tmp &= (~0UL >> (64 - size)); | ||
45 | if (tmp == 0UL) /* Are any bits set? */ | ||
46 | return result + size; /* Nope. */ | ||
47 | found_middle: | ||
48 | return result + __ffs(tmp); | ||
49 | } | ||
50 | EXPORT_SYMBOL(find_next_bit); | ||
51 | |||
52 | /* | ||
53 | * This implementation of find_{first,next}_zero_bit was stolen from | ||
54 | * Linus' asm-alpha/bitops.h. | ||
55 | */ | ||
56 | unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size, | ||
57 | unsigned long offset) | ||
58 | { | ||
59 | const unsigned long *p = addr + BITOP_WORD(offset); | ||
60 | unsigned long result = offset & ~(BITS_PER_LONG-1); | ||
61 | unsigned long tmp; | ||
62 | |||
63 | if (offset >= size) | ||
64 | return size; | ||
65 | size -= result; | ||
66 | offset %= BITS_PER_LONG; | ||
67 | if (offset) { | ||
68 | tmp = *(p++); | ||
69 | tmp |= ~0UL >> (BITS_PER_LONG - offset); | ||
70 | if (size < BITS_PER_LONG) | ||
71 | goto found_first; | ||
72 | if (~tmp) | ||
73 | goto found_middle; | ||
74 | size -= BITS_PER_LONG; | ||
75 | result += BITS_PER_LONG; | ||
76 | } | ||
77 | while (size & ~(BITS_PER_LONG-1)) { | ||
78 | if (~(tmp = *(p++))) | ||
79 | goto found_middle; | ||
80 | result += BITS_PER_LONG; | ||
81 | size -= BITS_PER_LONG; | ||
82 | } | ||
83 | if (!size) | ||
84 | return result; | ||
85 | tmp = *p; | ||
86 | |||
87 | found_first: | ||
88 | tmp |= ~0UL << size; | ||
89 | if (tmp == ~0UL) /* Are any bits zero? */ | ||
90 | return result + size; /* Nope. */ | ||
91 | found_middle: | ||
92 | return result + ffz(tmp); | ||
93 | } | ||
94 | EXPORT_SYMBOL(find_next_zero_bit); | ||
95 | |||
96 | static inline unsigned int ext2_ilog2(unsigned int x) | ||
97 | { | ||
98 | int lz; | ||
99 | |||
100 | asm("cntlzw %0,%1": "=r"(lz):"r"(x)); | ||
101 | return 31 - lz; | ||
102 | } | ||
103 | |||
104 | static inline unsigned int ext2_ffz(unsigned int x) | ||
105 | { | ||
106 | u32 rc; | ||
107 | if ((x = ~x) == 0) | ||
108 | return 32; | ||
109 | rc = ext2_ilog2(x & -x); | ||
110 | return rc; | ||
111 | } | ||
112 | |||
113 | unsigned long find_next_zero_le_bit(const unsigned long *addr, | ||
114 | unsigned long size, unsigned long offset) | ||
115 | { | ||
116 | const unsigned int *p = ((const unsigned int *)addr) + (offset >> 5); | ||
117 | unsigned int result = offset & ~31; | ||
118 | unsigned int tmp; | ||
119 | |||
120 | if (offset >= size) | ||
121 | return size; | ||
122 | size -= result; | ||
123 | offset &= 31; | ||
124 | if (offset) { | ||
125 | tmp = cpu_to_le32p(p++); | ||
126 | tmp |= ~0U >> (32 - offset); /* bug or feature ? */ | ||
127 | if (size < 32) | ||
128 | goto found_first; | ||
129 | if (tmp != ~0) | ||
130 | goto found_middle; | ||
131 | size -= 32; | ||
132 | result += 32; | ||
133 | } | ||
134 | while (size >= 32) { | ||
135 | if ((tmp = cpu_to_le32p(p++)) != ~0) | ||
136 | goto found_middle; | ||
137 | result += 32; | ||
138 | size -= 32; | ||
139 | } | ||
140 | if (!size) | ||
141 | return result; | ||
142 | tmp = cpu_to_le32p(p); | ||
143 | found_first: | ||
144 | tmp |= ~0 << size; | ||
145 | if (tmp == ~0) /* Are any bits zero? */ | ||
146 | return result + size; /* Nope. */ | ||
147 | found_middle: | ||
148 | return result + ext2_ffz(tmp); | ||
149 | } | ||
150 | EXPORT_SYMBOL(find_next_zero_le_bit); | ||
diff --git a/arch/powerpc/lib/copypage_64.S b/arch/powerpc/lib/copypage_64.S index 733d61618bbf..40523b140109 100644 --- a/arch/powerpc/lib/copypage_64.S +++ b/arch/powerpc/lib/copypage_64.S | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/processor.h> | 11 | #include <asm/processor.h> |
12 | #include <asm/ppc_asm.h> | 12 | #include <asm/ppc_asm.h> |
13 | 13 | ||
14 | _GLOBAL(copy_page) | 14 | _GLOBAL(copy_4K_page) |
15 | std r31,-8(1) | 15 | std r31,-8(1) |
16 | std r30,-16(1) | 16 | std r30,-16(1) |
17 | std r29,-24(1) | 17 | std r29,-24(1) |
diff --git a/arch/powerpc/lib/copyuser_64.S b/arch/powerpc/lib/copyuser_64.S index a0b3fbbd6fb1..6d69ef39b7df 100644 --- a/arch/powerpc/lib/copyuser_64.S +++ b/arch/powerpc/lib/copyuser_64.S | |||
@@ -24,7 +24,7 @@ _GLOBAL(__copy_tofrom_user) | |||
24 | std r4,-16(r1) | 24 | std r4,-16(r1) |
25 | std r5,-8(r1) | 25 | std r5,-8(r1) |
26 | dcbt 0,r4 | 26 | dcbt 0,r4 |
27 | beq .Lcopy_page | 27 | beq .Lcopy_page_4K |
28 | andi. r6,r6,7 | 28 | andi. r6,r6,7 |
29 | mtcrf 0x01,r5 | 29 | mtcrf 0x01,r5 |
30 | blt cr1,.Lshort_copy | 30 | blt cr1,.Lshort_copy |
@@ -366,7 +366,7 @@ _GLOBAL(__copy_tofrom_user) | |||
366 | * above (following the .Ldst_aligned label) but it runs slightly | 366 | * above (following the .Ldst_aligned label) but it runs slightly |
367 | * slower on POWER3. | 367 | * slower on POWER3. |
368 | */ | 368 | */ |
369 | .Lcopy_page: | 369 | .Lcopy_page_4K: |
370 | std r31,-32(1) | 370 | std r31,-32(1) |
371 | std r30,-40(1) | 371 | std r30,-40(1) |
372 | std r29,-48(1) | 372 | std r29,-48(1) |
diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c index 3794715b2972..2a912f411eb4 100644 --- a/arch/powerpc/lib/locks.c +++ b/arch/powerpc/lib/locks.c | |||
@@ -22,7 +22,7 @@ | |||
22 | /* waiting for a spinlock... */ | 22 | /* waiting for a spinlock... */ |
23 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) | 23 | #if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES) |
24 | #include <asm/hvcall.h> | 24 | #include <asm/hvcall.h> |
25 | #include <asm/iSeries/HvCall.h> | 25 | #include <asm/iseries/hv_call.h> |
26 | 26 | ||
27 | void __spin_yield(raw_spinlock_t *lock) | 27 | void __spin_yield(raw_spinlock_t *lock) |
28 | { | 28 | { |
diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S index d6ed9102eeea..e0d02c4a2615 100644 --- a/arch/powerpc/mm/hash_low_64.S +++ b/arch/powerpc/mm/hash_low_64.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * ppc64 MMU hashtable management routines | 2 | * ppc64 MMU hashtable management routines |
3 | * | 3 | * |
4 | * (c) Copyright IBM Corp. 2003 | 4 | * (c) Copyright IBM Corp. 2003, 2005 |
5 | * | 5 | * |
6 | * Maintained by: Benjamin Herrenschmidt | 6 | * Maintained by: Benjamin Herrenschmidt |
7 | * <benh@kernel.crashing.org> | 7 | * <benh@kernel.crashing.org> |
@@ -10,6 +10,7 @@ | |||
10 | * described in the kernel's COPYING file. | 10 | * described in the kernel's COPYING file. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
13 | #include <asm/reg.h> | 14 | #include <asm/reg.h> |
14 | #include <asm/pgtable.h> | 15 | #include <asm/pgtable.h> |
15 | #include <asm/mmu.h> | 16 | #include <asm/mmu.h> |
@@ -42,14 +43,24 @@ | |||
42 | /* Save non-volatile offsets */ | 43 | /* Save non-volatile offsets */ |
43 | #define STK_REG(i) (112 + ((i)-14)*8) | 44 | #define STK_REG(i) (112 + ((i)-14)*8) |
44 | 45 | ||
46 | |||
47 | #ifndef CONFIG_PPC_64K_PAGES | ||
48 | |||
49 | /***************************************************************************** | ||
50 | * * | ||
51 | * 4K SW & 4K HW pages implementation * | ||
52 | * * | ||
53 | *****************************************************************************/ | ||
54 | |||
55 | |||
45 | /* | 56 | /* |
46 | * _hash_page(unsigned long ea, unsigned long access, unsigned long vsid, | 57 | * _hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid, |
47 | * pte_t *ptep, unsigned long trap, int local) | 58 | * pte_t *ptep, unsigned long trap, int local) |
48 | * | 59 | * |
49 | * Adds a page to the hash table. This is the non-LPAR version for now | 60 | * Adds a 4K page to the hash table in a segment of 4K pages only |
50 | */ | 61 | */ |
51 | 62 | ||
52 | _GLOBAL(__hash_page) | 63 | _GLOBAL(__hash_page_4K) |
53 | mflr r0 | 64 | mflr r0 |
54 | std r0,16(r1) | 65 | std r0,16(r1) |
55 | stdu r1,-STACKFRAMESIZE(r1) | 66 | stdu r1,-STACKFRAMESIZE(r1) |
@@ -88,7 +99,8 @@ _GLOBAL(__hash_page) | |||
88 | /* If so, just bail out and refault if needed. Someone else | 99 | /* If so, just bail out and refault if needed. Someone else |
89 | * is changing this PTE anyway and might hash it. | 100 | * is changing this PTE anyway and might hash it. |
90 | */ | 101 | */ |
91 | bne- bail_ok | 102 | bne- htab_bail_ok |
103 | |||
92 | /* Prepare new PTE value (turn access RW into DIRTY, then | 104 | /* Prepare new PTE value (turn access RW into DIRTY, then |
93 | * add BUSY,HASHPTE and ACCESSED) | 105 | * add BUSY,HASHPTE and ACCESSED) |
94 | */ | 106 | */ |
@@ -118,10 +130,10 @@ _GLOBAL(__hash_page) | |||
118 | 130 | ||
119 | /* Convert linux PTE bits into HW equivalents */ | 131 | /* Convert linux PTE bits into HW equivalents */ |
120 | andi. r3,r30,0x1fe /* Get basic set of flags */ | 132 | andi. r3,r30,0x1fe /* Get basic set of flags */ |
121 | xori r3,r3,HW_NO_EXEC /* _PAGE_EXEC -> NOEXEC */ | 133 | xori r3,r3,HPTE_R_N /* _PAGE_EXEC -> NOEXEC */ |
122 | rlwinm r0,r30,32-9+1,30,30 /* _PAGE_RW -> _PAGE_USER (r0) */ | 134 | rlwinm r0,r30,32-9+1,30,30 /* _PAGE_RW -> _PAGE_USER (r0) */ |
123 | rlwinm r4,r30,32-7+1,30,30 /* _PAGE_DIRTY -> _PAGE_USER (r4) */ | 135 | rlwinm r4,r30,32-7+1,30,30 /* _PAGE_DIRTY -> _PAGE_USER (r4) */ |
124 | and r0,r0,r4 /* _PAGE_RW & _PAGE_DIRTY -> r0 bit 30 */ | 136 | and r0,r0,r4 /* _PAGE_RW & _PAGE_DIRTY ->r0 bit 30*/ |
125 | andc r0,r30,r0 /* r0 = pte & ~r0 */ | 137 | andc r0,r30,r0 /* r0 = pte & ~r0 */ |
126 | rlwimi r3,r0,32-1,31,31 /* Insert result into PP lsb */ | 138 | rlwimi r3,r0,32-1,31,31 /* Insert result into PP lsb */ |
127 | 139 | ||
@@ -158,19 +170,21 @@ htab_insert_pte: | |||
158 | andc r30,r30,r0 | 170 | andc r30,r30,r0 |
159 | ori r30,r30,_PAGE_HASHPTE | 171 | ori r30,r30,_PAGE_HASHPTE |
160 | 172 | ||
161 | /* page number in r5 */ | 173 | /* physical address r5 */ |
162 | rldicl r5,r31,64-PTE_SHIFT,PTE_SHIFT | 174 | rldicl r5,r31,64-PTE_RPN_SHIFT,PTE_RPN_SHIFT |
175 | sldi r5,r5,PAGE_SHIFT | ||
163 | 176 | ||
164 | /* Calculate primary group hash */ | 177 | /* Calculate primary group hash */ |
165 | and r0,r28,r27 | 178 | and r0,r28,r27 |
166 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ | 179 | rldicr r3,r0,3,63-3 /* r3 = (hash & mask) << 3 */ |
167 | 180 | ||
168 | /* Call ppc_md.hpte_insert */ | 181 | /* Call ppc_md.hpte_insert */ |
169 | ld r7,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 182 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ |
170 | mr r4,r29 /* Retreive va */ | 183 | mr r4,r29 /* Retreive va */ |
171 | li r6,0 /* no vflags */ | 184 | li r7,0 /* !bolted, !secondary */ |
185 | li r8,MMU_PAGE_4K /* page size */ | ||
172 | _GLOBAL(htab_call_hpte_insert1) | 186 | _GLOBAL(htab_call_hpte_insert1) |
173 | bl . /* Will be patched by htab_finish_init() */ | 187 | bl . /* Patched by htab_finish_init() */ |
174 | cmpdi 0,r3,0 | 188 | cmpdi 0,r3,0 |
175 | bge htab_pte_insert_ok /* Insertion successful */ | 189 | bge htab_pte_insert_ok /* Insertion successful */ |
176 | cmpdi 0,r3,-2 /* Critical failure */ | 190 | cmpdi 0,r3,-2 /* Critical failure */ |
@@ -178,19 +192,21 @@ _GLOBAL(htab_call_hpte_insert1) | |||
178 | 192 | ||
179 | /* Now try secondary slot */ | 193 | /* Now try secondary slot */ |
180 | 194 | ||
181 | /* page number in r5 */ | 195 | /* physical address r5 */ |
182 | rldicl r5,r31,64-PTE_SHIFT,PTE_SHIFT | 196 | rldicl r5,r31,64-PTE_RPN_SHIFT,PTE_RPN_SHIFT |
197 | sldi r5,r5,PAGE_SHIFT | ||
183 | 198 | ||
184 | /* Calculate secondary group hash */ | 199 | /* Calculate secondary group hash */ |
185 | andc r0,r27,r28 | 200 | andc r0,r27,r28 |
186 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ | 201 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ |
187 | 202 | ||
188 | /* Call ppc_md.hpte_insert */ | 203 | /* Call ppc_md.hpte_insert */ |
189 | ld r7,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 204 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ |
190 | mr r4,r29 /* Retreive va */ | 205 | mr r4,r29 /* Retreive va */ |
191 | li r6,HPTE_V_SECONDARY@l /* secondary slot */ | 206 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ |
207 | li r8,MMU_PAGE_4K /* page size */ | ||
192 | _GLOBAL(htab_call_hpte_insert2) | 208 | _GLOBAL(htab_call_hpte_insert2) |
193 | bl . /* Will be patched by htab_finish_init() */ | 209 | bl . /* Patched by htab_finish_init() */ |
194 | cmpdi 0,r3,0 | 210 | cmpdi 0,r3,0 |
195 | bge+ htab_pte_insert_ok /* Insertion successful */ | 211 | bge+ htab_pte_insert_ok /* Insertion successful */ |
196 | cmpdi 0,r3,-2 /* Critical failure */ | 212 | cmpdi 0,r3,-2 /* Critical failure */ |
@@ -207,14 +223,14 @@ _GLOBAL(htab_call_hpte_insert2) | |||
207 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ | 223 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ |
208 | /* Call ppc_md.hpte_remove */ | 224 | /* Call ppc_md.hpte_remove */ |
209 | _GLOBAL(htab_call_hpte_remove) | 225 | _GLOBAL(htab_call_hpte_remove) |
210 | bl . /* Will be patched by htab_finish_init() */ | 226 | bl . /* Patched by htab_finish_init() */ |
211 | 227 | ||
212 | /* Try all again */ | 228 | /* Try all again */ |
213 | b htab_insert_pte | 229 | b htab_insert_pte |
214 | 230 | ||
215 | bail_ok: | 231 | htab_bail_ok: |
216 | li r3,0 | 232 | li r3,0 |
217 | b bail | 233 | b htab_bail |
218 | 234 | ||
219 | htab_pte_insert_ok: | 235 | htab_pte_insert_ok: |
220 | /* Insert slot number & secondary bit in PTE */ | 236 | /* Insert slot number & secondary bit in PTE */ |
@@ -227,7 +243,7 @@ htab_write_out_pte: | |||
227 | ld r6,STK_PARM(r6)(r1) | 243 | ld r6,STK_PARM(r6)(r1) |
228 | std r30,0(r6) | 244 | std r30,0(r6) |
229 | li r3, 0 | 245 | li r3, 0 |
230 | bail: | 246 | htab_bail: |
231 | ld r27,STK_REG(r27)(r1) | 247 | ld r27,STK_REG(r27)(r1) |
232 | ld r28,STK_REG(r28)(r1) | 248 | ld r28,STK_REG(r28)(r1) |
233 | ld r29,STK_REG(r29)(r1) | 249 | ld r29,STK_REG(r29)(r1) |
@@ -256,10 +272,10 @@ htab_modify_pte: | |||
256 | 272 | ||
257 | /* Call ppc_md.hpte_updatepp */ | 273 | /* Call ppc_md.hpte_updatepp */ |
258 | mr r5,r29 /* va */ | 274 | mr r5,r29 /* va */ |
259 | li r6,0 /* large is 0 */ | 275 | li r6,MMU_PAGE_4K /* page size */ |
260 | ld r7,STK_PARM(r8)(r1) /* get "local" param */ | 276 | ld r7,STK_PARM(r8)(r1) /* get "local" param */ |
261 | _GLOBAL(htab_call_hpte_updatepp) | 277 | _GLOBAL(htab_call_hpte_updatepp) |
262 | bl . /* Will be patched by htab_finish_init() */ | 278 | bl . /* Patched by htab_finish_init() */ |
263 | 279 | ||
264 | /* if we failed because typically the HPTE wasn't really here | 280 | /* if we failed because typically the HPTE wasn't really here |
265 | * we try an insertion. | 281 | * we try an insertion. |
@@ -276,13 +292,556 @@ htab_wrong_access: | |||
276 | /* Bail out clearing reservation */ | 292 | /* Bail out clearing reservation */ |
277 | stdcx. r31,0,r6 | 293 | stdcx. r31,0,r6 |
278 | li r3,1 | 294 | li r3,1 |
279 | b bail | 295 | b htab_bail |
296 | |||
297 | htab_pte_insert_failure: | ||
298 | /* Bail out restoring old PTE */ | ||
299 | ld r6,STK_PARM(r6)(r1) | ||
300 | std r31,0(r6) | ||
301 | li r3,-1 | ||
302 | b htab_bail | ||
303 | |||
304 | |||
305 | #else /* CONFIG_PPC_64K_PAGES */ | ||
306 | |||
307 | |||
308 | /***************************************************************************** | ||
309 | * * | ||
310 | * 64K SW & 4K or 64K HW in a 4K segment pages implementation * | ||
311 | * * | ||
312 | *****************************************************************************/ | ||
313 | |||
314 | /* _hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid, | ||
315 | * pte_t *ptep, unsigned long trap, int local) | ||
316 | */ | ||
317 | |||
318 | /* | ||
319 | * For now, we do NOT implement Admixed pages | ||
320 | */ | ||
321 | _GLOBAL(__hash_page_4K) | ||
322 | mflr r0 | ||
323 | std r0,16(r1) | ||
324 | stdu r1,-STACKFRAMESIZE(r1) | ||
325 | /* Save all params that we need after a function call */ | ||
326 | std r6,STK_PARM(r6)(r1) | ||
327 | std r8,STK_PARM(r8)(r1) | ||
328 | |||
329 | /* Add _PAGE_PRESENT to access */ | ||
330 | ori r4,r4,_PAGE_PRESENT | ||
331 | |||
332 | /* Save non-volatile registers. | ||
333 | * r31 will hold "old PTE" | ||
334 | * r30 is "new PTE" | ||
335 | * r29 is "va" | ||
336 | * r28 is a hash value | ||
337 | * r27 is hashtab mask (maybe dynamic patched instead ?) | ||
338 | * r26 is the hidx mask | ||
339 | * r25 is the index in combo page | ||
340 | */ | ||
341 | std r25,STK_REG(r25)(r1) | ||
342 | std r26,STK_REG(r26)(r1) | ||
343 | std r27,STK_REG(r27)(r1) | ||
344 | std r28,STK_REG(r28)(r1) | ||
345 | std r29,STK_REG(r29)(r1) | ||
346 | std r30,STK_REG(r30)(r1) | ||
347 | std r31,STK_REG(r31)(r1) | ||
348 | |||
349 | /* Step 1: | ||
350 | * | ||
351 | * Check permissions, atomically mark the linux PTE busy | ||
352 | * and hashed. | ||
353 | */ | ||
354 | 1: | ||
355 | ldarx r31,0,r6 | ||
356 | /* Check access rights (access & ~(pte_val(*ptep))) */ | ||
357 | andc. r0,r4,r31 | ||
358 | bne- htab_wrong_access | ||
359 | /* Check if PTE is busy */ | ||
360 | andi. r0,r31,_PAGE_BUSY | ||
361 | /* If so, just bail out and refault if needed. Someone else | ||
362 | * is changing this PTE anyway and might hash it. | ||
363 | */ | ||
364 | bne- htab_bail_ok | ||
365 | /* Prepare new PTE value (turn access RW into DIRTY, then | ||
366 | * add BUSY and ACCESSED) | ||
367 | */ | ||
368 | rlwinm r30,r4,32-9+7,31-7,31-7 /* _PAGE_RW -> _PAGE_DIRTY */ | ||
369 | or r30,r30,r31 | ||
370 | ori r30,r30,_PAGE_BUSY | _PAGE_ACCESSED | _PAGE_HASHPTE | ||
371 | /* Write the linux PTE atomically (setting busy) */ | ||
372 | stdcx. r30,0,r6 | ||
373 | bne- 1b | ||
374 | isync | ||
375 | |||
376 | /* Step 2: | ||
377 | * | ||
378 | * Insert/Update the HPTE in the hash table. At this point, | ||
379 | * r4 (access) is re-useable, we use it for the new HPTE flags | ||
380 | */ | ||
381 | |||
382 | /* Load the hidx index */ | ||
383 | rldicl r25,r3,64-12,60 | ||
384 | |||
385 | /* Calc va and put it in r29 */ | ||
386 | rldicr r29,r5,28,63-28 /* r29 = (vsid << 28) */ | ||
387 | rldicl r3,r3,0,36 /* r3 = (ea & 0x0fffffff) */ | ||
388 | or r29,r3,r29 /* r29 = va | ||
389 | |||
390 | /* Calculate hash value for primary slot and store it in r28 */ | ||
391 | rldicl r5,r5,0,25 /* vsid & 0x0000007fffffffff */ | ||
392 | rldicl r0,r3,64-12,48 /* (ea >> 12) & 0xffff */ | ||
393 | xor r28,r5,r0 | ||
394 | |||
395 | /* Convert linux PTE bits into HW equivalents */ | ||
396 | andi. r3,r30,0x1fe /* Get basic set of flags */ | ||
397 | xori r3,r3,HPTE_R_N /* _PAGE_EXEC -> NOEXEC */ | ||
398 | rlwinm r0,r30,32-9+1,30,30 /* _PAGE_RW -> _PAGE_USER (r0) */ | ||
399 | rlwinm r4,r30,32-7+1,30,30 /* _PAGE_DIRTY -> _PAGE_USER (r4) */ | ||
400 | and r0,r0,r4 /* _PAGE_RW & _PAGE_DIRTY ->r0 bit 30*/ | ||
401 | andc r0,r30,r0 /* r0 = pte & ~r0 */ | ||
402 | rlwimi r3,r0,32-1,31,31 /* Insert result into PP lsb */ | ||
403 | |||
404 | /* We eventually do the icache sync here (maybe inline that | ||
405 | * code rather than call a C function...) | ||
406 | */ | ||
407 | BEGIN_FTR_SECTION | ||
408 | mr r4,r30 | ||
409 | mr r5,r7 | ||
410 | bl .hash_page_do_lazy_icache | ||
411 | END_FTR_SECTION(CPU_FTR_NOEXECUTE|CPU_FTR_COHERENT_ICACHE, CPU_FTR_NOEXECUTE) | ||
412 | |||
413 | /* At this point, r3 contains new PP bits, save them in | ||
414 | * place of "access" in the param area (sic) | ||
415 | */ | ||
416 | std r3,STK_PARM(r4)(r1) | ||
417 | |||
418 | /* Get htab_hash_mask */ | ||
419 | ld r4,htab_hash_mask@got(2) | ||
420 | ld r27,0(r4) /* htab_hash_mask -> r27 */ | ||
421 | |||
422 | /* Check if we may already be in the hashtable, in this case, we | ||
423 | * go to out-of-line code to try to modify the HPTE. We look for | ||
424 | * the bit at (1 >> (index + 32)) | ||
425 | */ | ||
426 | andi. r0,r31,_PAGE_HASHPTE | ||
427 | li r26,0 /* Default hidx */ | ||
428 | beq htab_insert_pte | ||
429 | ld r6,STK_PARM(r6)(r1) | ||
430 | ori r26,r6,0x8000 /* Load the hidx mask */ | ||
431 | ld r26,0(r26) | ||
432 | addi r5,r25,36 /* Check actual HPTE_SUB bit, this */ | ||
433 | rldcr. r0,r31,r5,0 /* must match pgtable.h definition */ | ||
434 | bne htab_modify_pte | ||
435 | |||
436 | htab_insert_pte: | ||
437 | /* real page number in r5, PTE RPN value + index */ | ||
438 | rldicl r5,r31,64-PTE_RPN_SHIFT,PTE_RPN_SHIFT | ||
439 | sldi r5,r5,PAGE_SHIFT-HW_PAGE_SHIFT | ||
440 | add r5,r5,r25 | ||
441 | sldi r5,r5,HW_PAGE_SHIFT | ||
442 | |||
443 | /* Calculate primary group hash */ | ||
444 | and r0,r28,r27 | ||
445 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ | ||
446 | |||
447 | /* Call ppc_md.hpte_insert */ | ||
448 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | ||
449 | mr r4,r29 /* Retreive va */ | ||
450 | li r7,0 /* !bolted, !secondary */ | ||
451 | li r8,MMU_PAGE_4K /* page size */ | ||
452 | _GLOBAL(htab_call_hpte_insert1) | ||
453 | bl . /* patched by htab_finish_init() */ | ||
454 | cmpdi 0,r3,0 | ||
455 | bge htab_pte_insert_ok /* Insertion successful */ | ||
456 | cmpdi 0,r3,-2 /* Critical failure */ | ||
457 | beq- htab_pte_insert_failure | ||
458 | |||
459 | /* Now try secondary slot */ | ||
460 | |||
461 | /* real page number in r5, PTE RPN value + index */ | ||
462 | rldicl r5,r31,64-PTE_RPN_SHIFT,PTE_RPN_SHIFT | ||
463 | sldi r5,r5,PAGE_SHIFT-HW_PAGE_SHIFT | ||
464 | add r5,r5,r25 | ||
465 | sldi r5,r5,HW_PAGE_SHIFT | ||
466 | |||
467 | /* Calculate secondary group hash */ | ||
468 | andc r0,r27,r28 | ||
469 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ | ||
470 | |||
471 | /* Call ppc_md.hpte_insert */ | ||
472 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | ||
473 | mr r4,r29 /* Retreive va */ | ||
474 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ | ||
475 | li r8,MMU_PAGE_4K /* page size */ | ||
476 | _GLOBAL(htab_call_hpte_insert2) | ||
477 | bl . /* patched by htab_finish_init() */ | ||
478 | cmpdi 0,r3,0 | ||
479 | bge+ htab_pte_insert_ok /* Insertion successful */ | ||
480 | cmpdi 0,r3,-2 /* Critical failure */ | ||
481 | beq- htab_pte_insert_failure | ||
482 | |||
483 | /* Both are full, we need to evict something */ | ||
484 | mftb r0 | ||
485 | /* Pick a random group based on TB */ | ||
486 | andi. r0,r0,1 | ||
487 | mr r5,r28 | ||
488 | bne 2f | ||
489 | not r5,r5 | ||
490 | 2: and r0,r5,r27 | ||
491 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ | ||
492 | /* Call ppc_md.hpte_remove */ | ||
493 | _GLOBAL(htab_call_hpte_remove) | ||
494 | bl . /* patched by htab_finish_init() */ | ||
495 | |||
496 | /* Try all again */ | ||
497 | b htab_insert_pte | ||
498 | |||
499 | htab_bail_ok: | ||
500 | li r3,0 | ||
501 | b htab_bail | ||
502 | |||
503 | htab_pte_insert_ok: | ||
504 | /* Insert slot number & secondary bit in PTE second half, | ||
505 | * clear _PAGE_BUSY and set approriate HPTE slot bit | ||
506 | */ | ||
507 | ld r6,STK_PARM(r6)(r1) | ||
508 | li r0,_PAGE_BUSY | ||
509 | andc r30,r30,r0 | ||
510 | /* HPTE SUB bit */ | ||
511 | li r0,1 | ||
512 | subfic r5,r25,27 /* Must match bit position in */ | ||
513 | sld r0,r0,r5 /* pgtable.h */ | ||
514 | or r30,r30,r0 | ||
515 | /* hindx */ | ||
516 | sldi r5,r25,2 | ||
517 | sld r3,r3,r5 | ||
518 | li r4,0xf | ||
519 | sld r4,r4,r5 | ||
520 | andc r26,r26,r4 | ||
521 | or r26,r26,r3 | ||
522 | ori r5,r6,0x8000 | ||
523 | std r26,0(r5) | ||
524 | lwsync | ||
525 | std r30,0(r6) | ||
526 | li r3, 0 | ||
527 | htab_bail: | ||
528 | ld r25,STK_REG(r25)(r1) | ||
529 | ld r26,STK_REG(r26)(r1) | ||
530 | ld r27,STK_REG(r27)(r1) | ||
531 | ld r28,STK_REG(r28)(r1) | ||
532 | ld r29,STK_REG(r29)(r1) | ||
533 | ld r30,STK_REG(r30)(r1) | ||
534 | ld r31,STK_REG(r31)(r1) | ||
535 | addi r1,r1,STACKFRAMESIZE | ||
536 | ld r0,16(r1) | ||
537 | mtlr r0 | ||
538 | blr | ||
539 | |||
540 | htab_modify_pte: | ||
541 | /* Keep PP bits in r4 and slot idx from the PTE around in r3 */ | ||
542 | mr r4,r3 | ||
543 | sldi r5,r25,2 | ||
544 | srd r3,r26,r5 | ||
545 | |||
546 | /* Secondary group ? if yes, get a inverted hash value */ | ||
547 | mr r5,r28 | ||
548 | andi. r0,r3,0x8 /* page secondary ? */ | ||
549 | beq 1f | ||
550 | not r5,r5 | ||
551 | 1: andi. r3,r3,0x7 /* extract idx alone */ | ||
552 | |||
553 | /* Calculate proper slot value for ppc_md.hpte_updatepp */ | ||
554 | and r0,r5,r27 | ||
555 | rldicr r0,r0,3,63-3 /* r0 = (hash & mask) << 3 */ | ||
556 | add r3,r0,r3 /* add slot idx */ | ||
557 | |||
558 | /* Call ppc_md.hpte_updatepp */ | ||
559 | mr r5,r29 /* va */ | ||
560 | li r6,MMU_PAGE_4K /* page size */ | ||
561 | ld r7,STK_PARM(r8)(r1) /* get "local" param */ | ||
562 | _GLOBAL(htab_call_hpte_updatepp) | ||
563 | bl . /* patched by htab_finish_init() */ | ||
564 | |||
565 | /* if we failed because typically the HPTE wasn't really here | ||
566 | * we try an insertion. | ||
567 | */ | ||
568 | cmpdi 0,r3,-1 | ||
569 | beq- htab_insert_pte | ||
570 | |||
571 | /* Clear the BUSY bit and Write out the PTE */ | ||
572 | li r0,_PAGE_BUSY | ||
573 | andc r30,r30,r0 | ||
574 | ld r6,STK_PARM(r6)(r1) | ||
575 | std r30,0(r6) | ||
576 | li r3,0 | ||
577 | b htab_bail | ||
578 | |||
579 | htab_wrong_access: | ||
580 | /* Bail out clearing reservation */ | ||
581 | stdcx. r31,0,r6 | ||
582 | li r3,1 | ||
583 | b htab_bail | ||
280 | 584 | ||
281 | htab_pte_insert_failure: | 585 | htab_pte_insert_failure: |
282 | /* Bail out restoring old PTE */ | 586 | /* Bail out restoring old PTE */ |
283 | ld r6,STK_PARM(r6)(r1) | 587 | ld r6,STK_PARM(r6)(r1) |
284 | std r31,0(r6) | 588 | std r31,0(r6) |
285 | li r3,-1 | 589 | li r3,-1 |
286 | b bail | 590 | b htab_bail |
591 | |||
592 | |||
593 | /***************************************************************************** | ||
594 | * * | ||
595 | * 64K SW & 64K HW in a 64K segment pages implementation * | ||
596 | * * | ||
597 | *****************************************************************************/ | ||
598 | |||
599 | _GLOBAL(__hash_page_64K) | ||
600 | mflr r0 | ||
601 | std r0,16(r1) | ||
602 | stdu r1,-STACKFRAMESIZE(r1) | ||
603 | /* Save all params that we need after a function call */ | ||
604 | std r6,STK_PARM(r6)(r1) | ||
605 | std r8,STK_PARM(r8)(r1) | ||
606 | |||
607 | /* Add _PAGE_PRESENT to access */ | ||
608 | ori r4,r4,_PAGE_PRESENT | ||
609 | |||
610 | /* Save non-volatile registers. | ||
611 | * r31 will hold "old PTE" | ||
612 | * r30 is "new PTE" | ||
613 | * r29 is "va" | ||
614 | * r28 is a hash value | ||
615 | * r27 is hashtab mask (maybe dynamic patched instead ?) | ||
616 | */ | ||
617 | std r27,STK_REG(r27)(r1) | ||
618 | std r28,STK_REG(r28)(r1) | ||
619 | std r29,STK_REG(r29)(r1) | ||
620 | std r30,STK_REG(r30)(r1) | ||
621 | std r31,STK_REG(r31)(r1) | ||
622 | |||
623 | /* Step 1: | ||
624 | * | ||
625 | * Check permissions, atomically mark the linux PTE busy | ||
626 | * and hashed. | ||
627 | */ | ||
628 | 1: | ||
629 | ldarx r31,0,r6 | ||
630 | /* Check access rights (access & ~(pte_val(*ptep))) */ | ||
631 | andc. r0,r4,r31 | ||
632 | bne- ht64_wrong_access | ||
633 | /* Check if PTE is busy */ | ||
634 | andi. r0,r31,_PAGE_BUSY | ||
635 | /* If so, just bail out and refault if needed. Someone else | ||
636 | * is changing this PTE anyway and might hash it. | ||
637 | */ | ||
638 | bne- ht64_bail_ok | ||
639 | /* Prepare new PTE value (turn access RW into DIRTY, then | ||
640 | * add BUSY,HASHPTE and ACCESSED) | ||
641 | */ | ||
642 | rlwinm r30,r4,32-9+7,31-7,31-7 /* _PAGE_RW -> _PAGE_DIRTY */ | ||
643 | or r30,r30,r31 | ||
644 | ori r30,r30,_PAGE_BUSY | _PAGE_ACCESSED | _PAGE_HASHPTE | ||
645 | /* Write the linux PTE atomically (setting busy) */ | ||
646 | stdcx. r30,0,r6 | ||
647 | bne- 1b | ||
648 | isync | ||
649 | |||
650 | /* Step 2: | ||
651 | * | ||
652 | * Insert/Update the HPTE in the hash table. At this point, | ||
653 | * r4 (access) is re-useable, we use it for the new HPTE flags | ||
654 | */ | ||
655 | |||
656 | /* Calc va and put it in r29 */ | ||
657 | rldicr r29,r5,28,63-28 | ||
658 | rldicl r3,r3,0,36 | ||
659 | or r29,r3,r29 | ||
660 | |||
661 | /* Calculate hash value for primary slot and store it in r28 */ | ||
662 | rldicl r5,r5,0,25 /* vsid & 0x0000007fffffffff */ | ||
663 | rldicl r0,r3,64-16,52 /* (ea >> 16) & 0xfff */ | ||
664 | xor r28,r5,r0 | ||
665 | |||
666 | /* Convert linux PTE bits into HW equivalents */ | ||
667 | andi. r3,r30,0x1fe /* Get basic set of flags */ | ||
668 | xori r3,r3,HPTE_R_N /* _PAGE_EXEC -> NOEXEC */ | ||
669 | rlwinm r0,r30,32-9+1,30,30 /* _PAGE_RW -> _PAGE_USER (r0) */ | ||
670 | rlwinm r4,r30,32-7+1,30,30 /* _PAGE_DIRTY -> _PAGE_USER (r4) */ | ||
671 | and r0,r0,r4 /* _PAGE_RW & _PAGE_DIRTY ->r0 bit 30*/ | ||
672 | andc r0,r30,r0 /* r0 = pte & ~r0 */ | ||
673 | rlwimi r3,r0,32-1,31,31 /* Insert result into PP lsb */ | ||
674 | |||
675 | /* We eventually do the icache sync here (maybe inline that | ||
676 | * code rather than call a C function...) | ||
677 | */ | ||
678 | BEGIN_FTR_SECTION | ||
679 | mr r4,r30 | ||
680 | mr r5,r7 | ||
681 | bl .hash_page_do_lazy_icache | ||
682 | END_FTR_SECTION(CPU_FTR_NOEXECUTE|CPU_FTR_COHERENT_ICACHE, CPU_FTR_NOEXECUTE) | ||
683 | |||
684 | /* At this point, r3 contains new PP bits, save them in | ||
685 | * place of "access" in the param area (sic) | ||
686 | */ | ||
687 | std r3,STK_PARM(r4)(r1) | ||
688 | |||
689 | /* Get htab_hash_mask */ | ||
690 | ld r4,htab_hash_mask@got(2) | ||
691 | ld r27,0(r4) /* htab_hash_mask -> r27 */ | ||
692 | |||
693 | /* Check if we may already be in the hashtable, in this case, we | ||
694 | * go to out-of-line code to try to modify the HPTE | ||
695 | */ | ||
696 | andi. r0,r31,_PAGE_HASHPTE | ||
697 | bne ht64_modify_pte | ||
698 | |||
699 | ht64_insert_pte: | ||
700 | /* Clear hpte bits in new pte (we also clear BUSY btw) and | ||
701 | * add _PAGE_HASHPTE | ||
702 | */ | ||
703 | lis r0,_PAGE_HPTEFLAGS@h | ||
704 | ori r0,r0,_PAGE_HPTEFLAGS@l | ||
705 | andc r30,r30,r0 | ||
706 | ori r30,r30,_PAGE_HASHPTE | ||
707 | |||
708 | /* Phyical address in r5 */ | ||
709 | rldicl r5,r31,64-PTE_RPN_SHIFT,PTE_RPN_SHIFT | ||
710 | sldi r5,r5,PAGE_SHIFT | ||
711 | |||
712 | /* Calculate primary group hash */ | ||
713 | and r0,r28,r27 | ||
714 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ | ||
715 | |||
716 | /* Call ppc_md.hpte_insert */ | ||
717 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | ||
718 | mr r4,r29 /* Retreive va */ | ||
719 | li r7,0 /* !bolted, !secondary */ | ||
720 | li r8,MMU_PAGE_64K | ||
721 | _GLOBAL(ht64_call_hpte_insert1) | ||
722 | bl . /* patched by htab_finish_init() */ | ||
723 | cmpdi 0,r3,0 | ||
724 | bge ht64_pte_insert_ok /* Insertion successful */ | ||
725 | cmpdi 0,r3,-2 /* Critical failure */ | ||
726 | beq- ht64_pte_insert_failure | ||
727 | |||
728 | /* Now try secondary slot */ | ||
729 | |||
730 | /* Phyical address in r5 */ | ||
731 | rldicl r5,r31,64-PTE_RPN_SHIFT,PTE_RPN_SHIFT | ||
732 | sldi r5,r5,PAGE_SHIFT | ||
733 | |||
734 | /* Calculate secondary group hash */ | ||
735 | andc r0,r27,r28 | ||
736 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ | ||
737 | |||
738 | /* Call ppc_md.hpte_insert */ | ||
739 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | ||
740 | mr r4,r29 /* Retreive va */ | ||
741 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ | ||
742 | li r8,MMU_PAGE_64K | ||
743 | _GLOBAL(ht64_call_hpte_insert2) | ||
744 | bl . /* patched by htab_finish_init() */ | ||
745 | cmpdi 0,r3,0 | ||
746 | bge+ ht64_pte_insert_ok /* Insertion successful */ | ||
747 | cmpdi 0,r3,-2 /* Critical failure */ | ||
748 | beq- ht64_pte_insert_failure | ||
749 | |||
750 | /* Both are full, we need to evict something */ | ||
751 | mftb r0 | ||
752 | /* Pick a random group based on TB */ | ||
753 | andi. r0,r0,1 | ||
754 | mr r5,r28 | ||
755 | bne 2f | ||
756 | not r5,r5 | ||
757 | 2: and r0,r5,r27 | ||
758 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ | ||
759 | /* Call ppc_md.hpte_remove */ | ||
760 | _GLOBAL(ht64_call_hpte_remove) | ||
761 | bl . /* patched by htab_finish_init() */ | ||
762 | |||
763 | /* Try all again */ | ||
764 | b ht64_insert_pte | ||
765 | |||
766 | ht64_bail_ok: | ||
767 | li r3,0 | ||
768 | b ht64_bail | ||
769 | |||
770 | ht64_pte_insert_ok: | ||
771 | /* Insert slot number & secondary bit in PTE */ | ||
772 | rldimi r30,r3,12,63-15 | ||
773 | |||
774 | /* Write out the PTE with a normal write | ||
775 | * (maybe add eieio may be good still ?) | ||
776 | */ | ||
777 | ht64_write_out_pte: | ||
778 | ld r6,STK_PARM(r6)(r1) | ||
779 | std r30,0(r6) | ||
780 | li r3, 0 | ||
781 | ht64_bail: | ||
782 | ld r27,STK_REG(r27)(r1) | ||
783 | ld r28,STK_REG(r28)(r1) | ||
784 | ld r29,STK_REG(r29)(r1) | ||
785 | ld r30,STK_REG(r30)(r1) | ||
786 | ld r31,STK_REG(r31)(r1) | ||
787 | addi r1,r1,STACKFRAMESIZE | ||
788 | ld r0,16(r1) | ||
789 | mtlr r0 | ||
790 | blr | ||
791 | |||
792 | ht64_modify_pte: | ||
793 | /* Keep PP bits in r4 and slot idx from the PTE around in r3 */ | ||
794 | mr r4,r3 | ||
795 | rlwinm r3,r31,32-12,29,31 | ||
796 | |||
797 | /* Secondary group ? if yes, get a inverted hash value */ | ||
798 | mr r5,r28 | ||
799 | andi. r0,r31,_PAGE_F_SECOND | ||
800 | beq 1f | ||
801 | not r5,r5 | ||
802 | 1: | ||
803 | /* Calculate proper slot value for ppc_md.hpte_updatepp */ | ||
804 | and r0,r5,r27 | ||
805 | rldicr r0,r0,3,63-3 /* r0 = (hash & mask) << 3 */ | ||
806 | add r3,r0,r3 /* add slot idx */ | ||
807 | |||
808 | /* Call ppc_md.hpte_updatepp */ | ||
809 | mr r5,r29 /* va */ | ||
810 | li r6,MMU_PAGE_64K | ||
811 | ld r7,STK_PARM(r8)(r1) /* get "local" param */ | ||
812 | _GLOBAL(ht64_call_hpte_updatepp) | ||
813 | bl . /* patched by htab_finish_init() */ | ||
814 | |||
815 | /* if we failed because typically the HPTE wasn't really here | ||
816 | * we try an insertion. | ||
817 | */ | ||
818 | cmpdi 0,r3,-1 | ||
819 | beq- ht64_insert_pte | ||
820 | |||
821 | /* Clear the BUSY bit and Write out the PTE */ | ||
822 | li r0,_PAGE_BUSY | ||
823 | andc r30,r30,r0 | ||
824 | b ht64_write_out_pte | ||
825 | |||
826 | ht64_wrong_access: | ||
827 | /* Bail out clearing reservation */ | ||
828 | stdcx. r31,0,r6 | ||
829 | li r3,1 | ||
830 | b ht64_bail | ||
831 | |||
832 | ht64_pte_insert_failure: | ||
833 | /* Bail out restoring old PTE */ | ||
834 | ld r6,STK_PARM(r6)(r1) | ||
835 | std r31,0(r6) | ||
836 | li r3,-1 | ||
837 | b ht64_bail | ||
838 | |||
839 | |||
840 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
287 | 841 | ||
288 | 842 | ||
843 | /***************************************************************************** | ||
844 | * * | ||
845 | * Huge pages implementation is in hugetlbpage.c * | ||
846 | * * | ||
847 | *****************************************************************************/ | ||
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index 174d14576c28..d96bcfe4c6f6 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c | |||
@@ -9,6 +9,9 @@ | |||
9 | * as published by the Free Software Foundation; either version | 9 | * as published by the Free Software Foundation; either version |
10 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
11 | */ | 11 | */ |
12 | |||
13 | #undef DEBUG_LOW | ||
14 | |||
12 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
13 | #include <linux/bitops.h> | 16 | #include <linux/bitops.h> |
14 | #include <linux/threads.h> | 17 | #include <linux/threads.h> |
@@ -22,11 +25,84 @@ | |||
22 | #include <asm/tlbflush.h> | 25 | #include <asm/tlbflush.h> |
23 | #include <asm/tlb.h> | 26 | #include <asm/tlb.h> |
24 | #include <asm/cputable.h> | 27 | #include <asm/cputable.h> |
28 | #include <asm/udbg.h> | ||
29 | |||
30 | #ifdef DEBUG_LOW | ||
31 | #define DBG_LOW(fmt...) udbg_printf(fmt) | ||
32 | #else | ||
33 | #define DBG_LOW(fmt...) | ||
34 | #endif | ||
25 | 35 | ||
26 | #define HPTE_LOCK_BIT 3 | 36 | #define HPTE_LOCK_BIT 3 |
27 | 37 | ||
28 | static DEFINE_SPINLOCK(native_tlbie_lock); | 38 | static DEFINE_SPINLOCK(native_tlbie_lock); |
29 | 39 | ||
40 | static inline void __tlbie(unsigned long va, unsigned int psize) | ||
41 | { | ||
42 | unsigned int penc; | ||
43 | |||
44 | /* clear top 16 bits, non SLS segment */ | ||
45 | va &= ~(0xffffULL << 48); | ||
46 | |||
47 | switch (psize) { | ||
48 | case MMU_PAGE_4K: | ||
49 | va &= ~0xffful; | ||
50 | asm volatile("tlbie %0,0" : : "r" (va) : "memory"); | ||
51 | break; | ||
52 | default: | ||
53 | penc = mmu_psize_defs[psize].penc; | ||
54 | va &= ~((1ul << mmu_psize_defs[psize].shift) - 1); | ||
55 | va |= (0x7f >> (8 - penc)) << 12; | ||
56 | asm volatile("tlbie %0,1" : : "r" (va) : "memory"); | ||
57 | break; | ||
58 | } | ||
59 | } | ||
60 | |||
61 | static inline void __tlbiel(unsigned long va, unsigned int psize) | ||
62 | { | ||
63 | unsigned int penc; | ||
64 | |||
65 | /* clear top 16 bits, non SLS segment */ | ||
66 | va &= ~(0xffffULL << 48); | ||
67 | |||
68 | switch (psize) { | ||
69 | case MMU_PAGE_4K: | ||
70 | va &= ~0xffful; | ||
71 | asm volatile(".long 0x7c000224 | (%0 << 11) | (0 << 21)" | ||
72 | : : "r"(va) : "memory"); | ||
73 | break; | ||
74 | default: | ||
75 | penc = mmu_psize_defs[psize].penc; | ||
76 | va &= ~((1ul << mmu_psize_defs[psize].shift) - 1); | ||
77 | va |= (0x7f >> (8 - penc)) << 12; | ||
78 | asm volatile(".long 0x7c000224 | (%0 << 11) | (1 << 21)" | ||
79 | : : "r"(va) : "memory"); | ||
80 | break; | ||
81 | } | ||
82 | |||
83 | } | ||
84 | |||
85 | static inline void tlbie(unsigned long va, int psize, int local) | ||
86 | { | ||
87 | unsigned int use_local = local && cpu_has_feature(CPU_FTR_TLBIEL); | ||
88 | int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); | ||
89 | |||
90 | if (use_local) | ||
91 | use_local = mmu_psize_defs[psize].tlbiel; | ||
92 | if (lock_tlbie && !use_local) | ||
93 | spin_lock(&native_tlbie_lock); | ||
94 | asm volatile("ptesync": : :"memory"); | ||
95 | if (use_local) { | ||
96 | __tlbiel(va, psize); | ||
97 | asm volatile("ptesync": : :"memory"); | ||
98 | } else { | ||
99 | __tlbie(va, psize); | ||
100 | asm volatile("eieio; tlbsync; ptesync": : :"memory"); | ||
101 | } | ||
102 | if (lock_tlbie && !use_local) | ||
103 | spin_unlock(&native_tlbie_lock); | ||
104 | } | ||
105 | |||
30 | static inline void native_lock_hpte(hpte_t *hptep) | 106 | static inline void native_lock_hpte(hpte_t *hptep) |
31 | { | 107 | { |
32 | unsigned long *word = &hptep->v; | 108 | unsigned long *word = &hptep->v; |
@@ -48,13 +124,19 @@ static inline void native_unlock_hpte(hpte_t *hptep) | |||
48 | } | 124 | } |
49 | 125 | ||
50 | long native_hpte_insert(unsigned long hpte_group, unsigned long va, | 126 | long native_hpte_insert(unsigned long hpte_group, unsigned long va, |
51 | unsigned long prpn, unsigned long vflags, | 127 | unsigned long pa, unsigned long rflags, |
52 | unsigned long rflags) | 128 | unsigned long vflags, int psize) |
53 | { | 129 | { |
54 | hpte_t *hptep = htab_address + hpte_group; | 130 | hpte_t *hptep = htab_address + hpte_group; |
55 | unsigned long hpte_v, hpte_r; | 131 | unsigned long hpte_v, hpte_r; |
56 | int i; | 132 | int i; |
57 | 133 | ||
134 | if (!(vflags & HPTE_V_BOLTED)) { | ||
135 | DBG_LOW(" insert(group=%lx, va=%016lx, pa=%016lx," | ||
136 | " rflags=%lx, vflags=%lx, psize=%d)\n", | ||
137 | hpte_group, va, pa, rflags, vflags, psize); | ||
138 | } | ||
139 | |||
58 | for (i = 0; i < HPTES_PER_GROUP; i++) { | 140 | for (i = 0; i < HPTES_PER_GROUP; i++) { |
59 | if (! (hptep->v & HPTE_V_VALID)) { | 141 | if (! (hptep->v & HPTE_V_VALID)) { |
60 | /* retry with lock held */ | 142 | /* retry with lock held */ |
@@ -70,10 +152,13 @@ long native_hpte_insert(unsigned long hpte_group, unsigned long va, | |||
70 | if (i == HPTES_PER_GROUP) | 152 | if (i == HPTES_PER_GROUP) |
71 | return -1; | 153 | return -1; |
72 | 154 | ||
73 | hpte_v = (va >> 23) << HPTE_V_AVPN_SHIFT | vflags | HPTE_V_VALID; | 155 | hpte_v = hpte_encode_v(va, psize) | vflags | HPTE_V_VALID; |
74 | if (vflags & HPTE_V_LARGE) | 156 | hpte_r = hpte_encode_r(pa, psize) | rflags; |
75 | va &= ~(1UL << HPTE_V_AVPN_SHIFT); | 157 | |
76 | hpte_r = (prpn << HPTE_R_RPN_SHIFT) | rflags; | 158 | if (!(vflags & HPTE_V_BOLTED)) { |
159 | DBG_LOW(" i=%x hpte_v=%016lx, hpte_r=%016lx\n", | ||
160 | i, hpte_v, hpte_r); | ||
161 | } | ||
77 | 162 | ||
78 | hptep->r = hpte_r; | 163 | hptep->r = hpte_r; |
79 | /* Guarantee the second dword is visible before the valid bit */ | 164 | /* Guarantee the second dword is visible before the valid bit */ |
@@ -96,6 +181,8 @@ static long native_hpte_remove(unsigned long hpte_group) | |||
96 | int slot_offset; | 181 | int slot_offset; |
97 | unsigned long hpte_v; | 182 | unsigned long hpte_v; |
98 | 183 | ||
184 | DBG_LOW(" remove(group=%lx)\n", hpte_group); | ||
185 | |||
99 | /* pick a random entry to start at */ | 186 | /* pick a random entry to start at */ |
100 | slot_offset = mftb() & 0x7; | 187 | slot_offset = mftb() & 0x7; |
101 | 188 | ||
@@ -126,34 +213,51 @@ static long native_hpte_remove(unsigned long hpte_group) | |||
126 | return i; | 213 | return i; |
127 | } | 214 | } |
128 | 215 | ||
129 | static inline void set_pp_bit(unsigned long pp, hpte_t *addr) | 216 | static long native_hpte_updatepp(unsigned long slot, unsigned long newpp, |
217 | unsigned long va, int psize, int local) | ||
130 | { | 218 | { |
131 | unsigned long old; | 219 | hpte_t *hptep = htab_address + slot; |
132 | unsigned long *p = &addr->r; | 220 | unsigned long hpte_v, want_v; |
133 | 221 | int ret = 0; | |
134 | __asm__ __volatile__( | 222 | |
135 | "1: ldarx %0,0,%3\n\ | 223 | want_v = hpte_encode_v(va, psize); |
136 | rldimi %0,%2,0,61\n\ | 224 | |
137 | stdcx. %0,0,%3\n\ | 225 | DBG_LOW(" update(va=%016lx, avpnv=%016lx, hash=%016lx, newpp=%x)", |
138 | bne 1b" | 226 | va, want_v & HPTE_V_AVPN, slot, newpp); |
139 | : "=&r" (old), "=m" (*p) | 227 | |
140 | : "r" (pp), "r" (p), "m" (*p) | 228 | native_lock_hpte(hptep); |
141 | : "cc"); | 229 | |
230 | hpte_v = hptep->v; | ||
231 | |||
232 | /* Even if we miss, we need to invalidate the TLB */ | ||
233 | if (!HPTE_V_COMPARE(hpte_v, want_v) || !(hpte_v & HPTE_V_VALID)) { | ||
234 | DBG_LOW(" -> miss\n"); | ||
235 | native_unlock_hpte(hptep); | ||
236 | ret = -1; | ||
237 | } else { | ||
238 | DBG_LOW(" -> hit\n"); | ||
239 | /* Update the HPTE */ | ||
240 | hptep->r = (hptep->r & ~(HPTE_R_PP | HPTE_R_N)) | | ||
241 | (newpp & (HPTE_R_PP | HPTE_R_N)); | ||
242 | native_unlock_hpte(hptep); | ||
243 | } | ||
244 | |||
245 | /* Ensure it is out of the tlb too. */ | ||
246 | tlbie(va, psize, local); | ||
247 | |||
248 | return ret; | ||
142 | } | 249 | } |
143 | 250 | ||
144 | /* | 251 | static long native_hpte_find(unsigned long va, int psize) |
145 | * Only works on small pages. Yes its ugly to have to check each slot in | ||
146 | * the group but we only use this during bootup. | ||
147 | */ | ||
148 | static long native_hpte_find(unsigned long vpn) | ||
149 | { | 252 | { |
150 | hpte_t *hptep; | 253 | hpte_t *hptep; |
151 | unsigned long hash; | 254 | unsigned long hash; |
152 | unsigned long i, j; | 255 | unsigned long i, j; |
153 | long slot; | 256 | long slot; |
154 | unsigned long hpte_v; | 257 | unsigned long want_v, hpte_v; |
155 | 258 | ||
156 | hash = hpt_hash(vpn, 0); | 259 | hash = hpt_hash(va, mmu_psize_defs[psize].shift); |
260 | want_v = hpte_encode_v(va, psize); | ||
157 | 261 | ||
158 | for (j = 0; j < 2; j++) { | 262 | for (j = 0; j < 2; j++) { |
159 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; | 263 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; |
@@ -161,7 +265,7 @@ static long native_hpte_find(unsigned long vpn) | |||
161 | hptep = htab_address + slot; | 265 | hptep = htab_address + slot; |
162 | hpte_v = hptep->v; | 266 | hpte_v = hptep->v; |
163 | 267 | ||
164 | if ((HPTE_V_AVPN_VAL(hpte_v) == (vpn >> 11)) | 268 | if (HPTE_V_COMPARE(hpte_v, want_v) |
165 | && (hpte_v & HPTE_V_VALID) | 269 | && (hpte_v & HPTE_V_VALID) |
166 | && ( !!(hpte_v & HPTE_V_SECONDARY) == j)) { | 270 | && ( !!(hpte_v & HPTE_V_SECONDARY) == j)) { |
167 | /* HPTE matches */ | 271 | /* HPTE matches */ |
@@ -177,127 +281,101 @@ static long native_hpte_find(unsigned long vpn) | |||
177 | return -1; | 281 | return -1; |
178 | } | 282 | } |
179 | 283 | ||
180 | static long native_hpte_updatepp(unsigned long slot, unsigned long newpp, | ||
181 | unsigned long va, int large, int local) | ||
182 | { | ||
183 | hpte_t *hptep = htab_address + slot; | ||
184 | unsigned long hpte_v; | ||
185 | unsigned long avpn = va >> 23; | ||
186 | int ret = 0; | ||
187 | |||
188 | if (large) | ||
189 | avpn &= ~1; | ||
190 | |||
191 | native_lock_hpte(hptep); | ||
192 | |||
193 | hpte_v = hptep->v; | ||
194 | |||
195 | /* Even if we miss, we need to invalidate the TLB */ | ||
196 | if ((HPTE_V_AVPN_VAL(hpte_v) != avpn) | ||
197 | || !(hpte_v & HPTE_V_VALID)) { | ||
198 | native_unlock_hpte(hptep); | ||
199 | ret = -1; | ||
200 | } else { | ||
201 | set_pp_bit(newpp, hptep); | ||
202 | native_unlock_hpte(hptep); | ||
203 | } | ||
204 | |||
205 | /* Ensure it is out of the tlb too */ | ||
206 | if (cpu_has_feature(CPU_FTR_TLBIEL) && !large && local) { | ||
207 | tlbiel(va); | ||
208 | } else { | ||
209 | int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); | ||
210 | |||
211 | if (lock_tlbie) | ||
212 | spin_lock(&native_tlbie_lock); | ||
213 | tlbie(va, large); | ||
214 | if (lock_tlbie) | ||
215 | spin_unlock(&native_tlbie_lock); | ||
216 | } | ||
217 | |||
218 | return ret; | ||
219 | } | ||
220 | |||
221 | /* | 284 | /* |
222 | * Update the page protection bits. Intended to be used to create | 285 | * Update the page protection bits. Intended to be used to create |
223 | * guard pages for kernel data structures on pages which are bolted | 286 | * guard pages for kernel data structures on pages which are bolted |
224 | * in the HPT. Assumes pages being operated on will not be stolen. | 287 | * in the HPT. Assumes pages being operated on will not be stolen. |
225 | * Does not work on large pages. | ||
226 | * | 288 | * |
227 | * No need to lock here because we should be the only user. | 289 | * No need to lock here because we should be the only user. |
228 | */ | 290 | */ |
229 | static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea) | 291 | static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea, |
292 | int psize) | ||
230 | { | 293 | { |
231 | unsigned long vsid, va, vpn, flags = 0; | 294 | unsigned long vsid, va; |
232 | long slot; | 295 | long slot; |
233 | hpte_t *hptep; | 296 | hpte_t *hptep; |
234 | int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); | ||
235 | 297 | ||
236 | vsid = get_kernel_vsid(ea); | 298 | vsid = get_kernel_vsid(ea); |
237 | va = (vsid << 28) | (ea & 0x0fffffff); | 299 | va = (vsid << 28) | (ea & 0x0fffffff); |
238 | vpn = va >> PAGE_SHIFT; | ||
239 | 300 | ||
240 | slot = native_hpte_find(vpn); | 301 | slot = native_hpte_find(va, psize); |
241 | if (slot == -1) | 302 | if (slot == -1) |
242 | panic("could not find page to bolt\n"); | 303 | panic("could not find page to bolt\n"); |
243 | hptep = htab_address + slot; | 304 | hptep = htab_address + slot; |
244 | 305 | ||
245 | set_pp_bit(newpp, hptep); | 306 | /* Update the HPTE */ |
307 | hptep->r = (hptep->r & ~(HPTE_R_PP | HPTE_R_N)) | | ||
308 | (newpp & (HPTE_R_PP | HPTE_R_N)); | ||
246 | 309 | ||
247 | /* Ensure it is out of the tlb too */ | 310 | /* Ensure it is out of the tlb too. */ |
248 | if (lock_tlbie) | 311 | tlbie(va, psize, 0); |
249 | spin_lock_irqsave(&native_tlbie_lock, flags); | ||
250 | tlbie(va, 0); | ||
251 | if (lock_tlbie) | ||
252 | spin_unlock_irqrestore(&native_tlbie_lock, flags); | ||
253 | } | 312 | } |
254 | 313 | ||
255 | static void native_hpte_invalidate(unsigned long slot, unsigned long va, | 314 | static void native_hpte_invalidate(unsigned long slot, unsigned long va, |
256 | int large, int local) | 315 | int psize, int local) |
257 | { | 316 | { |
258 | hpte_t *hptep = htab_address + slot; | 317 | hpte_t *hptep = htab_address + slot; |
259 | unsigned long hpte_v; | 318 | unsigned long hpte_v; |
260 | unsigned long avpn = va >> 23; | 319 | unsigned long want_v; |
261 | unsigned long flags; | 320 | unsigned long flags; |
262 | int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); | ||
263 | |||
264 | if (large) | ||
265 | avpn &= ~1; | ||
266 | 321 | ||
267 | local_irq_save(flags); | 322 | local_irq_save(flags); |
268 | native_lock_hpte(hptep); | ||
269 | 323 | ||
324 | DBG_LOW(" invalidate(va=%016lx, hash: %x)\n", va, slot); | ||
325 | |||
326 | want_v = hpte_encode_v(va, psize); | ||
327 | native_lock_hpte(hptep); | ||
270 | hpte_v = hptep->v; | 328 | hpte_v = hptep->v; |
271 | 329 | ||
272 | /* Even if we miss, we need to invalidate the TLB */ | 330 | /* Even if we miss, we need to invalidate the TLB */ |
273 | if ((HPTE_V_AVPN_VAL(hpte_v) != avpn) | 331 | if (!HPTE_V_COMPARE(hpte_v, want_v) || !(hpte_v & HPTE_V_VALID)) |
274 | || !(hpte_v & HPTE_V_VALID)) { | ||
275 | native_unlock_hpte(hptep); | 332 | native_unlock_hpte(hptep); |
276 | } else { | 333 | else |
277 | /* Invalidate the hpte. NOTE: this also unlocks it */ | 334 | /* Invalidate the hpte. NOTE: this also unlocks it */ |
278 | hptep->v = 0; | 335 | hptep->v = 0; |
279 | } | ||
280 | 336 | ||
281 | /* Invalidate the tlb */ | 337 | /* Invalidate the TLB */ |
282 | if (cpu_has_feature(CPU_FTR_TLBIEL) && !large && local) { | 338 | tlbie(va, psize, local); |
283 | tlbiel(va); | 339 | |
284 | } else { | ||
285 | if (lock_tlbie) | ||
286 | spin_lock(&native_tlbie_lock); | ||
287 | tlbie(va, large); | ||
288 | if (lock_tlbie) | ||
289 | spin_unlock(&native_tlbie_lock); | ||
290 | } | ||
291 | local_irq_restore(flags); | 340 | local_irq_restore(flags); |
292 | } | 341 | } |
293 | 342 | ||
294 | /* | 343 | /* |
344 | * XXX This need fixing based on page size. It's only used by | ||
345 | * native_hpte_clear() for now which needs fixing too so they | ||
346 | * make a good pair... | ||
347 | */ | ||
348 | static unsigned long slot2va(unsigned long hpte_v, unsigned long slot) | ||
349 | { | ||
350 | unsigned long avpn = HPTE_V_AVPN_VAL(hpte_v); | ||
351 | unsigned long va; | ||
352 | |||
353 | va = avpn << 23; | ||
354 | |||
355 | if (! (hpte_v & HPTE_V_LARGE)) { | ||
356 | unsigned long vpi, pteg; | ||
357 | |||
358 | pteg = slot / HPTES_PER_GROUP; | ||
359 | if (hpte_v & HPTE_V_SECONDARY) | ||
360 | pteg = ~pteg; | ||
361 | |||
362 | vpi = ((va >> 28) ^ pteg) & htab_hash_mask; | ||
363 | |||
364 | va |= vpi << PAGE_SHIFT; | ||
365 | } | ||
366 | |||
367 | return va; | ||
368 | } | ||
369 | |||
370 | /* | ||
295 | * clear all mappings on kexec. All cpus are in real mode (or they will | 371 | * clear all mappings on kexec. All cpus are in real mode (or they will |
296 | * be when they isi), and we are the only one left. We rely on our kernel | 372 | * be when they isi), and we are the only one left. We rely on our kernel |
297 | * mapping being 0xC0's and the hardware ignoring those two real bits. | 373 | * mapping being 0xC0's and the hardware ignoring those two real bits. |
298 | * | 374 | * |
299 | * TODO: add batching support when enabled. remember, no dynamic memory here, | 375 | * TODO: add batching support when enabled. remember, no dynamic memory here, |
300 | * athough there is the control page available... | 376 | * athough there is the control page available... |
377 | * | ||
378 | * XXX FIXME: 4k only for now ! | ||
301 | */ | 379 | */ |
302 | static void native_hpte_clear(void) | 380 | static void native_hpte_clear(void) |
303 | { | 381 | { |
@@ -327,7 +405,7 @@ static void native_hpte_clear(void) | |||
327 | 405 | ||
328 | if (hpte_v & HPTE_V_VALID) { | 406 | if (hpte_v & HPTE_V_VALID) { |
329 | hptep->v = 0; | 407 | hptep->v = 0; |
330 | tlbie(slot2va(hpte_v, slot), hpte_v & HPTE_V_LARGE); | 408 | tlbie(slot2va(hpte_v, slot), MMU_PAGE_4K, 0); |
331 | } | 409 | } |
332 | } | 410 | } |
333 | 411 | ||
@@ -335,59 +413,59 @@ static void native_hpte_clear(void) | |||
335 | local_irq_restore(flags); | 413 | local_irq_restore(flags); |
336 | } | 414 | } |
337 | 415 | ||
416 | /* | ||
417 | * Batched hash table flush, we batch the tlbie's to avoid taking/releasing | ||
418 | * the lock all the time | ||
419 | */ | ||
338 | static void native_flush_hash_range(unsigned long number, int local) | 420 | static void native_flush_hash_range(unsigned long number, int local) |
339 | { | 421 | { |
340 | unsigned long va, vpn, hash, secondary, slot, flags, avpn; | 422 | unsigned long va, hash, index, hidx, shift, slot; |
341 | int i, j; | ||
342 | hpte_t *hptep; | 423 | hpte_t *hptep; |
343 | unsigned long hpte_v; | 424 | unsigned long hpte_v; |
425 | unsigned long want_v; | ||
426 | unsigned long flags; | ||
427 | real_pte_t pte; | ||
344 | struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); | 428 | struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); |
345 | unsigned long large = batch->large; | 429 | unsigned long psize = batch->psize; |
430 | int i; | ||
346 | 431 | ||
347 | local_irq_save(flags); | 432 | local_irq_save(flags); |
348 | 433 | ||
349 | j = 0; | ||
350 | for (i = 0; i < number; i++) { | 434 | for (i = 0; i < number; i++) { |
351 | va = batch->vaddr[j]; | 435 | va = batch->vaddr[i]; |
352 | if (large) | 436 | pte = batch->pte[i]; |
353 | vpn = va >> HPAGE_SHIFT; | 437 | |
354 | else | 438 | pte_iterate_hashed_subpages(pte, psize, va, index, shift) { |
355 | vpn = va >> PAGE_SHIFT; | 439 | hash = hpt_hash(va, shift); |
356 | hash = hpt_hash(vpn, large); | 440 | hidx = __rpte_to_hidx(pte, index); |
357 | secondary = (pte_val(batch->pte[i]) & _PAGE_SECONDARY) >> 15; | 441 | if (hidx & _PTEIDX_SECONDARY) |
358 | if (secondary) | 442 | hash = ~hash; |
359 | hash = ~hash; | 443 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; |
360 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; | 444 | slot += hidx & _PTEIDX_GROUP_IX; |
361 | slot += (pte_val(batch->pte[i]) & _PAGE_GROUP_IX) >> 12; | 445 | hptep = htab_address + slot; |
362 | 446 | want_v = hpte_encode_v(va, psize); | |
363 | hptep = htab_address + slot; | 447 | native_lock_hpte(hptep); |
364 | 448 | hpte_v = hptep->v; | |
365 | avpn = va >> 23; | 449 | if (!HPTE_V_COMPARE(hpte_v, want_v) || |
366 | if (large) | 450 | !(hpte_v & HPTE_V_VALID)) |
367 | avpn &= ~0x1UL; | 451 | native_unlock_hpte(hptep); |
368 | 452 | else | |
369 | native_lock_hpte(hptep); | 453 | hptep->v = 0; |
370 | 454 | } pte_iterate_hashed_end(); | |
371 | hpte_v = hptep->v; | ||
372 | |||
373 | /* Even if we miss, we need to invalidate the TLB */ | ||
374 | if ((HPTE_V_AVPN_VAL(hpte_v) != avpn) | ||
375 | || !(hpte_v & HPTE_V_VALID)) { | ||
376 | native_unlock_hpte(hptep); | ||
377 | } else { | ||
378 | /* Invalidate the hpte. NOTE: this also unlocks it */ | ||
379 | hptep->v = 0; | ||
380 | } | ||
381 | |||
382 | j++; | ||
383 | } | 455 | } |
384 | 456 | ||
385 | if (cpu_has_feature(CPU_FTR_TLBIEL) && !large && local) { | 457 | if (cpu_has_feature(CPU_FTR_TLBIEL) && |
458 | mmu_psize_defs[psize].tlbiel && local) { | ||
386 | asm volatile("ptesync":::"memory"); | 459 | asm volatile("ptesync":::"memory"); |
387 | 460 | for (i = 0; i < number; i++) { | |
388 | for (i = 0; i < j; i++) | 461 | va = batch->vaddr[i]; |
389 | __tlbiel(batch->vaddr[i]); | 462 | pte = batch->pte[i]; |
390 | 463 | ||
464 | pte_iterate_hashed_subpages(pte, psize, va, index, | ||
465 | shift) { | ||
466 | __tlbiel(va, psize); | ||
467 | } pte_iterate_hashed_end(); | ||
468 | } | ||
391 | asm volatile("ptesync":::"memory"); | 469 | asm volatile("ptesync":::"memory"); |
392 | } else { | 470 | } else { |
393 | int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); | 471 | int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); |
@@ -396,10 +474,15 @@ static void native_flush_hash_range(unsigned long number, int local) | |||
396 | spin_lock(&native_tlbie_lock); | 474 | spin_lock(&native_tlbie_lock); |
397 | 475 | ||
398 | asm volatile("ptesync":::"memory"); | 476 | asm volatile("ptesync":::"memory"); |
399 | 477 | for (i = 0; i < number; i++) { | |
400 | for (i = 0; i < j; i++) | 478 | va = batch->vaddr[i]; |
401 | __tlbie(batch->vaddr[i], large); | 479 | pte = batch->pte[i]; |
402 | 480 | ||
481 | pte_iterate_hashed_subpages(pte, psize, va, index, | ||
482 | shift) { | ||
483 | __tlbie(va, psize); | ||
484 | } pte_iterate_hashed_end(); | ||
485 | } | ||
403 | asm volatile("eieio; tlbsync; ptesync":::"memory"); | 486 | asm volatile("eieio; tlbsync; ptesync":::"memory"); |
404 | 487 | ||
405 | if (lock_tlbie) | 488 | if (lock_tlbie) |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 6e9e05cce02c..f15dfb92dec0 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #undef DEBUG | 21 | #undef DEBUG |
22 | #undef DEBUG_LOW | ||
22 | 23 | ||
23 | #include <linux/config.h> | 24 | #include <linux/config.h> |
24 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
@@ -59,6 +60,15 @@ | |||
59 | #define DBG(fmt...) | 60 | #define DBG(fmt...) |
60 | #endif | 61 | #endif |
61 | 62 | ||
63 | #ifdef DEBUG_LOW | ||
64 | #define DBG_LOW(fmt...) udbg_printf(fmt) | ||
65 | #else | ||
66 | #define DBG_LOW(fmt...) | ||
67 | #endif | ||
68 | |||
69 | #define KB (1024) | ||
70 | #define MB (1024*KB) | ||
71 | |||
62 | /* | 72 | /* |
63 | * Note: pte --> Linux PTE | 73 | * Note: pte --> Linux PTE |
64 | * HPTE --> PowerPC Hashed Page Table Entry | 74 | * HPTE --> PowerPC Hashed Page Table Entry |
@@ -77,91 +87,292 @@ extern unsigned long dart_tablebase; | |||
77 | 87 | ||
78 | hpte_t *htab_address; | 88 | hpte_t *htab_address; |
79 | unsigned long htab_hash_mask; | 89 | unsigned long htab_hash_mask; |
80 | |||
81 | unsigned long _SDR1; | 90 | unsigned long _SDR1; |
91 | struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; | ||
92 | int mmu_linear_psize = MMU_PAGE_4K; | ||
93 | int mmu_virtual_psize = MMU_PAGE_4K; | ||
94 | #ifdef CONFIG_HUGETLB_PAGE | ||
95 | int mmu_huge_psize = MMU_PAGE_16M; | ||
96 | unsigned int HPAGE_SHIFT; | ||
97 | #endif | ||
82 | 98 | ||
83 | #define KB (1024) | 99 | /* There are definitions of page sizes arrays to be used when none |
84 | #define MB (1024*KB) | 100 | * is provided by the firmware. |
85 | 101 | */ | |
86 | static inline void loop_forever(void) | ||
87 | { | ||
88 | volatile unsigned long x = 1; | ||
89 | for(;x;x|=1) | ||
90 | ; | ||
91 | } | ||
92 | 102 | ||
93 | static inline void create_pte_mapping(unsigned long start, unsigned long end, | 103 | /* Pre-POWER4 CPUs (4k pages only) |
94 | unsigned long mode, int large) | 104 | */ |
105 | struct mmu_psize_def mmu_psize_defaults_old[] = { | ||
106 | [MMU_PAGE_4K] = { | ||
107 | .shift = 12, | ||
108 | .sllp = 0, | ||
109 | .penc = 0, | ||
110 | .avpnm = 0, | ||
111 | .tlbiel = 0, | ||
112 | }, | ||
113 | }; | ||
114 | |||
115 | /* POWER4, GPUL, POWER5 | ||
116 | * | ||
117 | * Support for 16Mb large pages | ||
118 | */ | ||
119 | struct mmu_psize_def mmu_psize_defaults_gp[] = { | ||
120 | [MMU_PAGE_4K] = { | ||
121 | .shift = 12, | ||
122 | .sllp = 0, | ||
123 | .penc = 0, | ||
124 | .avpnm = 0, | ||
125 | .tlbiel = 1, | ||
126 | }, | ||
127 | [MMU_PAGE_16M] = { | ||
128 | .shift = 24, | ||
129 | .sllp = SLB_VSID_L, | ||
130 | .penc = 0, | ||
131 | .avpnm = 0x1UL, | ||
132 | .tlbiel = 0, | ||
133 | }, | ||
134 | }; | ||
135 | |||
136 | |||
137 | int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | ||
138 | unsigned long pstart, unsigned long mode, int psize) | ||
95 | { | 139 | { |
96 | unsigned long addr; | 140 | unsigned long vaddr, paddr; |
97 | unsigned int step; | 141 | unsigned int step, shift; |
98 | unsigned long tmp_mode; | 142 | unsigned long tmp_mode; |
99 | unsigned long vflags; | 143 | int ret = 0; |
100 | 144 | ||
101 | if (large) { | 145 | shift = mmu_psize_defs[psize].shift; |
102 | step = 16*MB; | 146 | step = 1 << shift; |
103 | vflags = HPTE_V_BOLTED | HPTE_V_LARGE; | ||
104 | } else { | ||
105 | step = 4*KB; | ||
106 | vflags = HPTE_V_BOLTED; | ||
107 | } | ||
108 | 147 | ||
109 | for (addr = start; addr < end; addr += step) { | 148 | for (vaddr = vstart, paddr = pstart; vaddr < vend; |
149 | vaddr += step, paddr += step) { | ||
110 | unsigned long vpn, hash, hpteg; | 150 | unsigned long vpn, hash, hpteg; |
111 | unsigned long vsid = get_kernel_vsid(addr); | 151 | unsigned long vsid = get_kernel_vsid(vaddr); |
112 | unsigned long va = (vsid << 28) | (addr & 0xfffffff); | 152 | unsigned long va = (vsid << 28) | (vaddr & 0x0fffffff); |
113 | int ret = -1; | ||
114 | |||
115 | if (large) | ||
116 | vpn = va >> HPAGE_SHIFT; | ||
117 | else | ||
118 | vpn = va >> PAGE_SHIFT; | ||
119 | |||
120 | 153 | ||
154 | vpn = va >> shift; | ||
121 | tmp_mode = mode; | 155 | tmp_mode = mode; |
122 | 156 | ||
123 | /* Make non-kernel text non-executable */ | 157 | /* Make non-kernel text non-executable */ |
124 | if (!in_kernel_text(addr)) | 158 | if (!in_kernel_text(vaddr)) |
125 | tmp_mode = mode | HW_NO_EXEC; | 159 | tmp_mode = mode | HPTE_R_N; |
126 | |||
127 | hash = hpt_hash(vpn, large); | ||
128 | 160 | ||
161 | hash = hpt_hash(va, shift); | ||
129 | hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP); | 162 | hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP); |
130 | 163 | ||
164 | /* The crap below can be cleaned once ppd_md.probe() can | ||
165 | * set up the hash callbacks, thus we can just used the | ||
166 | * normal insert callback here. | ||
167 | */ | ||
131 | #ifdef CONFIG_PPC_ISERIES | 168 | #ifdef CONFIG_PPC_ISERIES |
132 | if (systemcfg->platform & PLATFORM_ISERIES_LPAR) | 169 | if (systemcfg->platform == PLATFORM_ISERIES_LPAR) |
133 | ret = iSeries_hpte_bolt_or_insert(hpteg, va, | 170 | ret = iSeries_hpte_insert(hpteg, va, |
134 | virt_to_abs(addr) >> PAGE_SHIFT, | 171 | virt_to_abs(paddr), |
135 | vflags, tmp_mode); | 172 | tmp_mode, |
173 | HPTE_V_BOLTED, | ||
174 | psize); | ||
136 | else | 175 | else |
137 | #endif | 176 | #endif |
138 | #ifdef CONFIG_PPC_PSERIES | 177 | #ifdef CONFIG_PPC_PSERIES |
139 | if (systemcfg->platform & PLATFORM_LPAR) | 178 | if (systemcfg->platform & PLATFORM_LPAR) |
140 | ret = pSeries_lpar_hpte_insert(hpteg, va, | 179 | ret = pSeries_lpar_hpte_insert(hpteg, va, |
141 | virt_to_abs(addr) >> PAGE_SHIFT, | 180 | virt_to_abs(paddr), |
142 | vflags, tmp_mode); | 181 | tmp_mode, |
182 | HPTE_V_BOLTED, | ||
183 | psize); | ||
143 | else | 184 | else |
144 | #endif | 185 | #endif |
145 | #ifdef CONFIG_PPC_MULTIPLATFORM | 186 | #ifdef CONFIG_PPC_MULTIPLATFORM |
146 | ret = native_hpte_insert(hpteg, va, | 187 | ret = native_hpte_insert(hpteg, va, |
147 | virt_to_abs(addr) >> PAGE_SHIFT, | 188 | virt_to_abs(paddr), |
148 | vflags, tmp_mode); | 189 | tmp_mode, HPTE_V_BOLTED, |
190 | psize); | ||
149 | #endif | 191 | #endif |
192 | if (ret < 0) | ||
193 | break; | ||
194 | } | ||
195 | return ret < 0 ? ret : 0; | ||
196 | } | ||
150 | 197 | ||
151 | if (ret == -1) { | 198 | static int __init htab_dt_scan_page_sizes(unsigned long node, |
152 | ppc64_terminate_msg(0x20, "create_pte_mapping"); | 199 | const char *uname, int depth, |
153 | loop_forever(); | 200 | void *data) |
201 | { | ||
202 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); | ||
203 | u32 *prop; | ||
204 | unsigned long size = 0; | ||
205 | |||
206 | /* We are scanning "cpu" nodes only */ | ||
207 | if (type == NULL || strcmp(type, "cpu") != 0) | ||
208 | return 0; | ||
209 | |||
210 | prop = (u32 *)of_get_flat_dt_prop(node, | ||
211 | "ibm,segment-page-sizes", &size); | ||
212 | if (prop != NULL) { | ||
213 | DBG("Page sizes from device-tree:\n"); | ||
214 | size /= 4; | ||
215 | cur_cpu_spec->cpu_features &= ~(CPU_FTR_16M_PAGE); | ||
216 | while(size > 0) { | ||
217 | unsigned int shift = prop[0]; | ||
218 | unsigned int slbenc = prop[1]; | ||
219 | unsigned int lpnum = prop[2]; | ||
220 | unsigned int lpenc = 0; | ||
221 | struct mmu_psize_def *def; | ||
222 | int idx = -1; | ||
223 | |||
224 | size -= 3; prop += 3; | ||
225 | while(size > 0 && lpnum) { | ||
226 | if (prop[0] == shift) | ||
227 | lpenc = prop[1]; | ||
228 | prop += 2; size -= 2; | ||
229 | lpnum--; | ||
230 | } | ||
231 | switch(shift) { | ||
232 | case 0xc: | ||
233 | idx = MMU_PAGE_4K; | ||
234 | break; | ||
235 | case 0x10: | ||
236 | idx = MMU_PAGE_64K; | ||
237 | break; | ||
238 | case 0x14: | ||
239 | idx = MMU_PAGE_1M; | ||
240 | break; | ||
241 | case 0x18: | ||
242 | idx = MMU_PAGE_16M; | ||
243 | cur_cpu_spec->cpu_features |= CPU_FTR_16M_PAGE; | ||
244 | break; | ||
245 | case 0x22: | ||
246 | idx = MMU_PAGE_16G; | ||
247 | break; | ||
248 | } | ||
249 | if (idx < 0) | ||
250 | continue; | ||
251 | def = &mmu_psize_defs[idx]; | ||
252 | def->shift = shift; | ||
253 | if (shift <= 23) | ||
254 | def->avpnm = 0; | ||
255 | else | ||
256 | def->avpnm = (1 << (shift - 23)) - 1; | ||
257 | def->sllp = slbenc; | ||
258 | def->penc = lpenc; | ||
259 | /* We don't know for sure what's up with tlbiel, so | ||
260 | * for now we only set it for 4K and 64K pages | ||
261 | */ | ||
262 | if (idx == MMU_PAGE_4K || idx == MMU_PAGE_64K) | ||
263 | def->tlbiel = 1; | ||
264 | else | ||
265 | def->tlbiel = 0; | ||
266 | |||
267 | DBG(" %d: shift=%02x, sllp=%04x, avpnm=%08x, " | ||
268 | "tlbiel=%d, penc=%d\n", | ||
269 | idx, shift, def->sllp, def->avpnm, def->tlbiel, | ||
270 | def->penc); | ||
154 | } | 271 | } |
272 | return 1; | ||
273 | } | ||
274 | return 0; | ||
275 | } | ||
276 | |||
277 | |||
278 | static void __init htab_init_page_sizes(void) | ||
279 | { | ||
280 | int rc; | ||
281 | |||
282 | /* Default to 4K pages only */ | ||
283 | memcpy(mmu_psize_defs, mmu_psize_defaults_old, | ||
284 | sizeof(mmu_psize_defaults_old)); | ||
285 | |||
286 | /* | ||
287 | * Try to find the available page sizes in the device-tree | ||
288 | */ | ||
289 | rc = of_scan_flat_dt(htab_dt_scan_page_sizes, NULL); | ||
290 | if (rc != 0) /* Found */ | ||
291 | goto found; | ||
292 | |||
293 | /* | ||
294 | * Not in the device-tree, let's fallback on known size | ||
295 | * list for 16M capable GP & GR | ||
296 | */ | ||
297 | if ((systemcfg->platform != PLATFORM_ISERIES_LPAR) && | ||
298 | cpu_has_feature(CPU_FTR_16M_PAGE)) | ||
299 | memcpy(mmu_psize_defs, mmu_psize_defaults_gp, | ||
300 | sizeof(mmu_psize_defaults_gp)); | ||
301 | found: | ||
302 | /* | ||
303 | * Pick a size for the linear mapping. Currently, we only support | ||
304 | * 16M, 1M and 4K which is the default | ||
305 | */ | ||
306 | if (mmu_psize_defs[MMU_PAGE_16M].shift) | ||
307 | mmu_linear_psize = MMU_PAGE_16M; | ||
308 | else if (mmu_psize_defs[MMU_PAGE_1M].shift) | ||
309 | mmu_linear_psize = MMU_PAGE_1M; | ||
310 | |||
311 | /* | ||
312 | * Pick a size for the ordinary pages. Default is 4K, we support | ||
313 | * 64K if cache inhibited large pages are supported by the | ||
314 | * processor | ||
315 | */ | ||
316 | #ifdef CONFIG_PPC_64K_PAGES | ||
317 | if (mmu_psize_defs[MMU_PAGE_64K].shift && | ||
318 | cpu_has_feature(CPU_FTR_CI_LARGE_PAGE)) | ||
319 | mmu_virtual_psize = MMU_PAGE_64K; | ||
320 | #endif | ||
321 | |||
322 | printk(KERN_INFO "Page orders: linear mapping = %d, others = %d\n", | ||
323 | mmu_psize_defs[mmu_linear_psize].shift, | ||
324 | mmu_psize_defs[mmu_virtual_psize].shift); | ||
325 | |||
326 | #ifdef CONFIG_HUGETLB_PAGE | ||
327 | /* Init large page size. Currently, we pick 16M or 1M depending | ||
328 | * on what is available | ||
329 | */ | ||
330 | if (mmu_psize_defs[MMU_PAGE_16M].shift) | ||
331 | mmu_huge_psize = MMU_PAGE_16M; | ||
332 | /* With 4k/4level pagetables, we can't (for now) cope with a | ||
333 | * huge page size < PMD_SIZE */ | ||
334 | else if (mmu_psize_defs[MMU_PAGE_1M].shift) | ||
335 | mmu_huge_psize = MMU_PAGE_1M; | ||
336 | |||
337 | /* Calculate HPAGE_SHIFT and sanity check it */ | ||
338 | if (mmu_psize_defs[mmu_huge_psize].shift > MIN_HUGEPTE_SHIFT && | ||
339 | mmu_psize_defs[mmu_huge_psize].shift < SID_SHIFT) | ||
340 | HPAGE_SHIFT = mmu_psize_defs[mmu_huge_psize].shift; | ||
341 | else | ||
342 | HPAGE_SHIFT = 0; /* No huge pages dude ! */ | ||
343 | #endif /* CONFIG_HUGETLB_PAGE */ | ||
344 | } | ||
345 | |||
346 | static int __init htab_dt_scan_pftsize(unsigned long node, | ||
347 | const char *uname, int depth, | ||
348 | void *data) | ||
349 | { | ||
350 | char *type = of_get_flat_dt_prop(node, "device_type", NULL); | ||
351 | u32 *prop; | ||
352 | |||
353 | /* We are scanning "cpu" nodes only */ | ||
354 | if (type == NULL || strcmp(type, "cpu") != 0) | ||
355 | return 0; | ||
356 | |||
357 | prop = (u32 *)of_get_flat_dt_prop(node, "ibm,pft-size", NULL); | ||
358 | if (prop != NULL) { | ||
359 | /* pft_size[0] is the NUMA CEC cookie */ | ||
360 | ppc64_pft_size = prop[1]; | ||
361 | return 1; | ||
155 | } | 362 | } |
363 | return 0; | ||
156 | } | 364 | } |
157 | 365 | ||
158 | static unsigned long get_hashtable_size(void) | 366 | static unsigned long __init htab_get_table_size(void) |
159 | { | 367 | { |
160 | unsigned long rnd_mem_size, pteg_count; | 368 | unsigned long rnd_mem_size, pteg_count; |
161 | 369 | ||
162 | /* If hash size wasn't obtained in prom.c, we calculate it now based on | 370 | /* If hash size isn't already provided by the platform, we try to |
163 | * the total RAM size | 371 | * retreive it from the device-tree. If it's not there neither, we |
372 | * calculate it now based on the total RAM size | ||
164 | */ | 373 | */ |
374 | if (ppc64_pft_size == 0) | ||
375 | of_scan_flat_dt(htab_dt_scan_pftsize, NULL); | ||
165 | if (ppc64_pft_size) | 376 | if (ppc64_pft_size) |
166 | return 1UL << ppc64_pft_size; | 377 | return 1UL << ppc64_pft_size; |
167 | 378 | ||
@@ -181,17 +392,21 @@ void __init htab_initialize(void) | |||
181 | unsigned long table, htab_size_bytes; | 392 | unsigned long table, htab_size_bytes; |
182 | unsigned long pteg_count; | 393 | unsigned long pteg_count; |
183 | unsigned long mode_rw; | 394 | unsigned long mode_rw; |
184 | int i, use_largepages = 0; | ||
185 | unsigned long base = 0, size = 0; | 395 | unsigned long base = 0, size = 0; |
396 | int i; | ||
397 | |||
186 | extern unsigned long tce_alloc_start, tce_alloc_end; | 398 | extern unsigned long tce_alloc_start, tce_alloc_end; |
187 | 399 | ||
188 | DBG(" -> htab_initialize()\n"); | 400 | DBG(" -> htab_initialize()\n"); |
189 | 401 | ||
402 | /* Initialize page sizes */ | ||
403 | htab_init_page_sizes(); | ||
404 | |||
190 | /* | 405 | /* |
191 | * Calculate the required size of the htab. We want the number of | 406 | * Calculate the required size of the htab. We want the number of |
192 | * PTEGs to equal one half the number of real pages. | 407 | * PTEGs to equal one half the number of real pages. |
193 | */ | 408 | */ |
194 | htab_size_bytes = get_hashtable_size(); | 409 | htab_size_bytes = htab_get_table_size(); |
195 | pteg_count = htab_size_bytes >> 7; | 410 | pteg_count = htab_size_bytes >> 7; |
196 | 411 | ||
197 | /* For debug, make the HTAB 1/8 as big as it normally would be. */ | 412 | /* For debug, make the HTAB 1/8 as big as it normally would be. */ |
@@ -211,14 +426,11 @@ void __init htab_initialize(void) | |||
211 | * the absolute address space. | 426 | * the absolute address space. |
212 | */ | 427 | */ |
213 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); | 428 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); |
429 | BUG_ON(table == 0); | ||
214 | 430 | ||
215 | DBG("Hash table allocated at %lx, size: %lx\n", table, | 431 | DBG("Hash table allocated at %lx, size: %lx\n", table, |
216 | htab_size_bytes); | 432 | htab_size_bytes); |
217 | 433 | ||
218 | if ( !table ) { | ||
219 | ppc64_terminate_msg(0x20, "hpt space"); | ||
220 | loop_forever(); | ||
221 | } | ||
222 | htab_address = abs_to_virt(table); | 434 | htab_address = abs_to_virt(table); |
223 | 435 | ||
224 | /* htab absolute addr + encoded htabsize */ | 436 | /* htab absolute addr + encoded htabsize */ |
@@ -234,8 +446,6 @@ void __init htab_initialize(void) | |||
234 | * _NOT_ map it to avoid cache paradoxes as it's remapped non | 446 | * _NOT_ map it to avoid cache paradoxes as it's remapped non |
235 | * cacheable later on | 447 | * cacheable later on |
236 | */ | 448 | */ |
237 | if (cpu_has_feature(CPU_FTR_16M_PAGE)) | ||
238 | use_largepages = 1; | ||
239 | 449 | ||
240 | /* create bolted the linear mapping in the hash table */ | 450 | /* create bolted the linear mapping in the hash table */ |
241 | for (i=0; i < lmb.memory.cnt; i++) { | 451 | for (i=0; i < lmb.memory.cnt; i++) { |
@@ -246,27 +456,32 @@ void __init htab_initialize(void) | |||
246 | 456 | ||
247 | #ifdef CONFIG_U3_DART | 457 | #ifdef CONFIG_U3_DART |
248 | /* Do not map the DART space. Fortunately, it will be aligned | 458 | /* Do not map the DART space. Fortunately, it will be aligned |
249 | * in such a way that it will not cross two lmb regions and will | 459 | * in such a way that it will not cross two lmb regions and |
250 | * fit within a single 16Mb page. | 460 | * will fit within a single 16Mb page. |
251 | * The DART space is assumed to be a full 16Mb region even if we | 461 | * The DART space is assumed to be a full 16Mb region even if |
252 | * only use 2Mb of that space. We will use more of it later for | 462 | * we only use 2Mb of that space. We will use more of it later |
253 | * AGP GART. We have to use a full 16Mb large page. | 463 | * for AGP GART. We have to use a full 16Mb large page. |
254 | */ | 464 | */ |
255 | DBG("DART base: %lx\n", dart_tablebase); | 465 | DBG("DART base: %lx\n", dart_tablebase); |
256 | 466 | ||
257 | if (dart_tablebase != 0 && dart_tablebase >= base | 467 | if (dart_tablebase != 0 && dart_tablebase >= base |
258 | && dart_tablebase < (base + size)) { | 468 | && dart_tablebase < (base + size)) { |
259 | if (base != dart_tablebase) | 469 | if (base != dart_tablebase) |
260 | create_pte_mapping(base, dart_tablebase, mode_rw, | 470 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, |
261 | use_largepages); | 471 | base, mode_rw, |
472 | mmu_linear_psize)); | ||
262 | if ((base + size) > (dart_tablebase + 16*MB)) | 473 | if ((base + size) > (dart_tablebase + 16*MB)) |
263 | create_pte_mapping(dart_tablebase + 16*MB, base + size, | 474 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, |
264 | mode_rw, use_largepages); | 475 | base + size, |
476 | dart_tablebase+16*MB, | ||
477 | mode_rw, | ||
478 | mmu_linear_psize)); | ||
265 | continue; | 479 | continue; |
266 | } | 480 | } |
267 | #endif /* CONFIG_U3_DART */ | 481 | #endif /* CONFIG_U3_DART */ |
268 | create_pte_mapping(base, base + size, mode_rw, use_largepages); | 482 | BUG_ON(htab_bolt_mapping(base, base + size, base, |
269 | } | 483 | mode_rw, mmu_linear_psize)); |
484 | } | ||
270 | 485 | ||
271 | /* | 486 | /* |
272 | * If we have a memory_limit and we've allocated TCEs then we need to | 487 | * If we have a memory_limit and we've allocated TCEs then we need to |
@@ -282,8 +497,9 @@ void __init htab_initialize(void) | |||
282 | if (base + size >= tce_alloc_start) | 497 | if (base + size >= tce_alloc_start) |
283 | tce_alloc_start = base + size + 1; | 498 | tce_alloc_start = base + size + 1; |
284 | 499 | ||
285 | create_pte_mapping(tce_alloc_start, tce_alloc_end, | 500 | BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, |
286 | mode_rw, use_largepages); | 501 | tce_alloc_start, mode_rw, |
502 | mmu_linear_psize)); | ||
287 | } | 503 | } |
288 | 504 | ||
289 | DBG(" <- htab_initialize()\n"); | 505 | DBG(" <- htab_initialize()\n"); |
@@ -298,9 +514,6 @@ unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap) | |||
298 | { | 514 | { |
299 | struct page *page; | 515 | struct page *page; |
300 | 516 | ||
301 | if (!pfn_valid(pte_pfn(pte))) | ||
302 | return pp; | ||
303 | |||
304 | page = pte_page(pte); | 517 | page = pte_page(pte); |
305 | 518 | ||
306 | /* page is dirty */ | 519 | /* page is dirty */ |
@@ -309,7 +522,7 @@ unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap) | |||
309 | __flush_dcache_icache(page_address(page)); | 522 | __flush_dcache_icache(page_address(page)); |
310 | set_bit(PG_arch_1, &page->flags); | 523 | set_bit(PG_arch_1, &page->flags); |
311 | } else | 524 | } else |
312 | pp |= HW_NO_EXEC; | 525 | pp |= HPTE_R_N; |
313 | } | 526 | } |
314 | return pp; | 527 | return pp; |
315 | } | 528 | } |
@@ -325,94 +538,169 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) | |||
325 | unsigned long vsid; | 538 | unsigned long vsid; |
326 | struct mm_struct *mm; | 539 | struct mm_struct *mm; |
327 | pte_t *ptep; | 540 | pte_t *ptep; |
328 | int ret; | ||
329 | int user_region = 0; | ||
330 | int local = 0; | ||
331 | cpumask_t tmp; | 541 | cpumask_t tmp; |
542 | int rc, user_region = 0, local = 0; | ||
332 | 543 | ||
333 | if ((ea & ~REGION_MASK) >= PGTABLE_RANGE) | 544 | DBG_LOW("hash_page(ea=%016lx, access=%lx, trap=%lx\n", |
334 | return 1; | 545 | ea, access, trap); |
335 | 546 | ||
547 | if ((ea & ~REGION_MASK) >= PGTABLE_RANGE) { | ||
548 | DBG_LOW(" out of pgtable range !\n"); | ||
549 | return 1; | ||
550 | } | ||
551 | |||
552 | /* Get region & vsid */ | ||
336 | switch (REGION_ID(ea)) { | 553 | switch (REGION_ID(ea)) { |
337 | case USER_REGION_ID: | 554 | case USER_REGION_ID: |
338 | user_region = 1; | 555 | user_region = 1; |
339 | mm = current->mm; | 556 | mm = current->mm; |
340 | if (! mm) | 557 | if (! mm) { |
558 | DBG_LOW(" user region with no mm !\n"); | ||
341 | return 1; | 559 | return 1; |
342 | 560 | } | |
343 | vsid = get_vsid(mm->context.id, ea); | 561 | vsid = get_vsid(mm->context.id, ea); |
344 | break; | 562 | break; |
345 | case VMALLOC_REGION_ID: | 563 | case VMALLOC_REGION_ID: |
346 | mm = &init_mm; | 564 | mm = &init_mm; |
347 | vsid = get_kernel_vsid(ea); | 565 | vsid = get_kernel_vsid(ea); |
348 | break; | 566 | break; |
349 | #if 0 | ||
350 | case KERNEL_REGION_ID: | ||
351 | /* | ||
352 | * Should never get here - entire 0xC0... region is bolted. | ||
353 | * Send the problem up to do_page_fault | ||
354 | */ | ||
355 | #endif | ||
356 | default: | 567 | default: |
357 | /* Not a valid range | 568 | /* Not a valid range |
358 | * Send the problem up to do_page_fault | 569 | * Send the problem up to do_page_fault |
359 | */ | 570 | */ |
360 | return 1; | 571 | return 1; |
361 | break; | ||
362 | } | 572 | } |
573 | DBG_LOW(" mm=%p, mm->pgdir=%p, vsid=%016lx\n", mm, mm->pgd, vsid); | ||
363 | 574 | ||
575 | /* Get pgdir */ | ||
364 | pgdir = mm->pgd; | 576 | pgdir = mm->pgd; |
365 | |||
366 | if (pgdir == NULL) | 577 | if (pgdir == NULL) |
367 | return 1; | 578 | return 1; |
368 | 579 | ||
580 | /* Check CPU locality */ | ||
369 | tmp = cpumask_of_cpu(smp_processor_id()); | 581 | tmp = cpumask_of_cpu(smp_processor_id()); |
370 | if (user_region && cpus_equal(mm->cpu_vm_mask, tmp)) | 582 | if (user_region && cpus_equal(mm->cpu_vm_mask, tmp)) |
371 | local = 1; | 583 | local = 1; |
372 | 584 | ||
373 | /* Is this a huge page ? */ | 585 | /* Handle hugepage regions */ |
374 | if (unlikely(in_hugepage_area(mm->context, ea))) | 586 | if (unlikely(in_hugepage_area(mm->context, ea))) { |
375 | ret = hash_huge_page(mm, access, ea, vsid, local); | 587 | DBG_LOW(" -> huge page !\n"); |
376 | else { | 588 | return hash_huge_page(mm, access, ea, vsid, local); |
377 | ptep = find_linux_pte(pgdir, ea); | 589 | } |
378 | if (ptep == NULL) | 590 | |
379 | return 1; | 591 | /* Get PTE and page size from page tables */ |
380 | ret = __hash_page(ea, access, vsid, ptep, trap, local); | 592 | ptep = find_linux_pte(pgdir, ea); |
593 | if (ptep == NULL || !pte_present(*ptep)) { | ||
594 | DBG_LOW(" no PTE !\n"); | ||
595 | return 1; | ||
596 | } | ||
597 | |||
598 | #ifndef CONFIG_PPC_64K_PAGES | ||
599 | DBG_LOW(" i-pte: %016lx\n", pte_val(*ptep)); | ||
600 | #else | ||
601 | DBG_LOW(" i-pte: %016lx %016lx\n", pte_val(*ptep), | ||
602 | pte_val(*(ptep + PTRS_PER_PTE))); | ||
603 | #endif | ||
604 | /* Pre-check access permissions (will be re-checked atomically | ||
605 | * in __hash_page_XX but this pre-check is a fast path | ||
606 | */ | ||
607 | if (access & ~pte_val(*ptep)) { | ||
608 | DBG_LOW(" no access !\n"); | ||
609 | return 1; | ||
381 | } | 610 | } |
382 | 611 | ||
383 | return ret; | 612 | /* Do actual hashing */ |
613 | #ifndef CONFIG_PPC_64K_PAGES | ||
614 | rc = __hash_page_4K(ea, access, vsid, ptep, trap, local); | ||
615 | #else | ||
616 | if (mmu_virtual_psize == MMU_PAGE_64K) | ||
617 | rc = __hash_page_64K(ea, access, vsid, ptep, trap, local); | ||
618 | else | ||
619 | rc = __hash_page_4K(ea, access, vsid, ptep, trap, local); | ||
620 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
621 | |||
622 | #ifndef CONFIG_PPC_64K_PAGES | ||
623 | DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep)); | ||
624 | #else | ||
625 | DBG_LOW(" o-pte: %016lx %016lx\n", pte_val(*ptep), | ||
626 | pte_val(*(ptep + PTRS_PER_PTE))); | ||
627 | #endif | ||
628 | DBG_LOW(" -> rc=%d\n", rc); | ||
629 | return rc; | ||
384 | } | 630 | } |
385 | 631 | ||
386 | void flush_hash_page(unsigned long va, pte_t pte, int local) | 632 | void hash_preload(struct mm_struct *mm, unsigned long ea, |
633 | unsigned long access, unsigned long trap) | ||
387 | { | 634 | { |
388 | unsigned long vpn, hash, secondary, slot; | 635 | unsigned long vsid; |
389 | unsigned long huge = pte_huge(pte); | 636 | void *pgdir; |
637 | pte_t *ptep; | ||
638 | cpumask_t mask; | ||
639 | unsigned long flags; | ||
640 | int local = 0; | ||
641 | |||
642 | /* We don't want huge pages prefaulted for now | ||
643 | */ | ||
644 | if (unlikely(in_hugepage_area(mm->context, ea))) | ||
645 | return; | ||
646 | |||
647 | DBG_LOW("hash_preload(mm=%p, mm->pgdir=%p, ea=%016lx, access=%lx," | ||
648 | " trap=%lx\n", mm, mm->pgd, ea, access, trap); | ||
390 | 649 | ||
391 | if (huge) | 650 | /* Get PTE, VSID, access mask */ |
392 | vpn = va >> HPAGE_SHIFT; | 651 | pgdir = mm->pgd; |
652 | if (pgdir == NULL) | ||
653 | return; | ||
654 | ptep = find_linux_pte(pgdir, ea); | ||
655 | if (!ptep) | ||
656 | return; | ||
657 | vsid = get_vsid(mm->context.id, ea); | ||
658 | |||
659 | /* Hash it in */ | ||
660 | local_irq_save(flags); | ||
661 | mask = cpumask_of_cpu(smp_processor_id()); | ||
662 | if (cpus_equal(mm->cpu_vm_mask, mask)) | ||
663 | local = 1; | ||
664 | #ifndef CONFIG_PPC_64K_PAGES | ||
665 | __hash_page_4K(ea, access, vsid, ptep, trap, local); | ||
666 | #else | ||
667 | if (mmu_virtual_psize == MMU_PAGE_64K) | ||
668 | __hash_page_64K(ea, access, vsid, ptep, trap, local); | ||
393 | else | 669 | else |
394 | vpn = va >> PAGE_SHIFT; | 670 | __hash_page_4K(ea, access, vsid, ptep, trap, local); |
395 | hash = hpt_hash(vpn, huge); | 671 | #endif /* CONFIG_PPC_64K_PAGES */ |
396 | secondary = (pte_val(pte) & _PAGE_SECONDARY) >> 15; | 672 | local_irq_restore(flags); |
397 | if (secondary) | 673 | } |
398 | hash = ~hash; | 674 | |
399 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; | 675 | void flush_hash_page(unsigned long va, real_pte_t pte, int psize, int local) |
400 | slot += (pte_val(pte) & _PAGE_GROUP_IX) >> 12; | 676 | { |
401 | 677 | unsigned long hash, index, shift, hidx, slot; | |
402 | ppc_md.hpte_invalidate(slot, va, huge, local); | 678 | |
679 | DBG_LOW("flush_hash_page(va=%016x)\n", va); | ||
680 | pte_iterate_hashed_subpages(pte, psize, va, index, shift) { | ||
681 | hash = hpt_hash(va, shift); | ||
682 | hidx = __rpte_to_hidx(pte, index); | ||
683 | if (hidx & _PTEIDX_SECONDARY) | ||
684 | hash = ~hash; | ||
685 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; | ||
686 | slot += hidx & _PTEIDX_GROUP_IX; | ||
687 | DBG_LOW(" sub %d: hash=%x, hidx=%x\n", index, slot, hidx); | ||
688 | ppc_md.hpte_invalidate(slot, va, psize, local); | ||
689 | } pte_iterate_hashed_end(); | ||
403 | } | 690 | } |
404 | 691 | ||
405 | void flush_hash_range(unsigned long number, int local) | 692 | void flush_hash_range(unsigned long number, int local) |
406 | { | 693 | { |
407 | if (ppc_md.flush_hash_range) { | 694 | if (ppc_md.flush_hash_range) |
408 | ppc_md.flush_hash_range(number, local); | 695 | ppc_md.flush_hash_range(number, local); |
409 | } else { | 696 | else { |
410 | int i; | 697 | int i; |
411 | struct ppc64_tlb_batch *batch = | 698 | struct ppc64_tlb_batch *batch = |
412 | &__get_cpu_var(ppc64_tlb_batch); | 699 | &__get_cpu_var(ppc64_tlb_batch); |
413 | 700 | ||
414 | for (i = 0; i < number; i++) | 701 | for (i = 0; i < number; i++) |
415 | flush_hash_page(batch->vaddr[i], batch->pte[i], local); | 702 | flush_hash_page(batch->vaddr[i], batch->pte[i], |
703 | batch->psize, local); | ||
416 | } | 704 | } |
417 | } | 705 | } |
418 | 706 | ||
@@ -452,6 +740,18 @@ void __init htab_finish_init(void) | |||
452 | extern unsigned int *htab_call_hpte_remove; | 740 | extern unsigned int *htab_call_hpte_remove; |
453 | extern unsigned int *htab_call_hpte_updatepp; | 741 | extern unsigned int *htab_call_hpte_updatepp; |
454 | 742 | ||
743 | #ifdef CONFIG_PPC_64K_PAGES | ||
744 | extern unsigned int *ht64_call_hpte_insert1; | ||
745 | extern unsigned int *ht64_call_hpte_insert2; | ||
746 | extern unsigned int *ht64_call_hpte_remove; | ||
747 | extern unsigned int *ht64_call_hpte_updatepp; | ||
748 | |||
749 | make_bl(ht64_call_hpte_insert1, ppc_md.hpte_insert); | ||
750 | make_bl(ht64_call_hpte_insert2, ppc_md.hpte_insert); | ||
751 | make_bl(ht64_call_hpte_remove, ppc_md.hpte_remove); | ||
752 | make_bl(ht64_call_hpte_updatepp, ppc_md.hpte_updatepp); | ||
753 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
754 | |||
455 | make_bl(htab_call_hpte_insert1, ppc_md.hpte_insert); | 755 | make_bl(htab_call_hpte_insert1, ppc_md.hpte_insert); |
456 | make_bl(htab_call_hpte_insert2, ppc_md.hpte_insert); | 756 | make_bl(htab_call_hpte_insert2, ppc_md.hpte_insert); |
457 | make_bl(htab_call_hpte_remove, ppc_md.hpte_remove); | 757 | make_bl(htab_call_hpte_remove, ppc_md.hpte_remove); |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 0ea0994ed974..426c269e552e 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -47,10 +47,25 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
47 | pu = pud_offset(pg, addr); | 47 | pu = pud_offset(pg, addr); |
48 | if (!pud_none(*pu)) { | 48 | if (!pud_none(*pu)) { |
49 | pm = pmd_offset(pu, addr); | 49 | pm = pmd_offset(pu, addr); |
50 | #ifdef CONFIG_PPC_64K_PAGES | ||
51 | /* Currently, we use the normal PTE offset within full | ||
52 | * size PTE pages, thus our huge PTEs are scattered in | ||
53 | * the PTE page and we do waste some. We may change | ||
54 | * that in the future, but the current mecanism keeps | ||
55 | * things much simpler | ||
56 | */ | ||
57 | if (!pmd_none(*pm)) { | ||
58 | /* Note: pte_offset_* are all equivalent on | ||
59 | * ppc64 as we don't have HIGHMEM | ||
60 | */ | ||
61 | pt = pte_offset_kernel(pm, addr); | ||
62 | return pt; | ||
63 | } | ||
64 | #else /* CONFIG_PPC_64K_PAGES */ | ||
65 | /* On 4k pages, we put huge PTEs in the PMD page */ | ||
50 | pt = (pte_t *)pm; | 66 | pt = (pte_t *)pm; |
51 | BUG_ON(!pmd_none(*pm) | ||
52 | && !(pte_present(*pt) && pte_huge(*pt))); | ||
53 | return pt; | 67 | return pt; |
68 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
54 | } | 69 | } |
55 | } | 70 | } |
56 | 71 | ||
@@ -74,9 +89,16 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | |||
74 | if (pu) { | 89 | if (pu) { |
75 | pm = pmd_alloc(mm, pu, addr); | 90 | pm = pmd_alloc(mm, pu, addr); |
76 | if (pm) { | 91 | if (pm) { |
92 | #ifdef CONFIG_PPC_64K_PAGES | ||
93 | /* See comment in huge_pte_offset. Note that if we ever | ||
94 | * want to put the page size in the PMD, we would have | ||
95 | * to open code our own pte_alloc* function in order | ||
96 | * to populate and set the size atomically | ||
97 | */ | ||
98 | pt = pte_alloc_map(mm, pm, addr); | ||
99 | #else /* CONFIG_PPC_64K_PAGES */ | ||
77 | pt = (pte_t *)pm; | 100 | pt = (pte_t *)pm; |
78 | BUG_ON(!pmd_none(*pm) | 101 | #endif /* CONFIG_PPC_64K_PAGES */ |
79 | && !(pte_present(*pt) && pte_huge(*pt))); | ||
80 | return pt; | 102 | return pt; |
81 | } | 103 | } |
82 | } | 104 | } |
@@ -84,35 +106,29 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | |||
84 | return NULL; | 106 | return NULL; |
85 | } | 107 | } |
86 | 108 | ||
87 | #define HUGEPTE_BATCH_SIZE (HPAGE_SIZE / PMD_SIZE) | ||
88 | |||
89 | void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, | 109 | void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, |
90 | pte_t *ptep, pte_t pte) | 110 | pte_t *ptep, pte_t pte) |
91 | { | 111 | { |
92 | int i; | ||
93 | |||
94 | if (pte_present(*ptep)) { | 112 | if (pte_present(*ptep)) { |
95 | pte_clear(mm, addr, ptep); | 113 | /* We open-code pte_clear because we need to pass the right |
114 | * argument to hpte_update (huge / !huge) | ||
115 | */ | ||
116 | unsigned long old = pte_update(ptep, ~0UL); | ||
117 | if (old & _PAGE_HASHPTE) | ||
118 | hpte_update(mm, addr & HPAGE_MASK, ptep, old, 1); | ||
96 | flush_tlb_pending(); | 119 | flush_tlb_pending(); |
97 | } | 120 | } |
98 | 121 | *ptep = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); | |
99 | for (i = 0; i < HUGEPTE_BATCH_SIZE; i++) { | ||
100 | *ptep = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); | ||
101 | ptep++; | ||
102 | } | ||
103 | } | 122 | } |
104 | 123 | ||
105 | pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | 124 | pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, |
106 | pte_t *ptep) | 125 | pte_t *ptep) |
107 | { | 126 | { |
108 | unsigned long old = pte_update(ptep, ~0UL); | 127 | unsigned long old = pte_update(ptep, ~0UL); |
109 | int i; | ||
110 | 128 | ||
111 | if (old & _PAGE_HASHPTE) | 129 | if (old & _PAGE_HASHPTE) |
112 | hpte_update(mm, addr, old, 0); | 130 | hpte_update(mm, addr & HPAGE_MASK, ptep, old, 1); |
113 | 131 | *ptep = __pte(0); | |
114 | for (i = 1; i < HUGEPTE_BATCH_SIZE; i++) | ||
115 | ptep[i] = __pte(0); | ||
116 | 132 | ||
117 | return __pte(old); | 133 | return __pte(old); |
118 | } | 134 | } |
@@ -196,6 +212,12 @@ static int prepare_high_area_for_htlb(struct mm_struct *mm, unsigned long area) | |||
196 | 212 | ||
197 | BUG_ON(area >= NUM_HIGH_AREAS); | 213 | BUG_ON(area >= NUM_HIGH_AREAS); |
198 | 214 | ||
215 | /* Hack, so that each addresses is controlled by exactly one | ||
216 | * of the high or low area bitmaps, the first high area starts | ||
217 | * at 4GB, not 0 */ | ||
218 | if (start == 0) | ||
219 | start = 0x100000000UL; | ||
220 | |||
199 | /* Check no VMAs are in the region */ | 221 | /* Check no VMAs are in the region */ |
200 | vma = find_vma(mm, start); | 222 | vma = find_vma(mm, start); |
201 | if (vma && (vma->vm_start < end)) | 223 | if (vma && (vma->vm_start < end)) |
@@ -563,6 +585,8 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
563 | int lastshift; | 585 | int lastshift; |
564 | u16 areamask, curareas; | 586 | u16 areamask, curareas; |
565 | 587 | ||
588 | if (HPAGE_SHIFT == 0) | ||
589 | return -EINVAL; | ||
566 | if (len & ~HPAGE_MASK) | 590 | if (len & ~HPAGE_MASK) |
567 | return -EINVAL; | 591 | return -EINVAL; |
568 | 592 | ||
@@ -619,19 +643,15 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access, | |||
619 | unsigned long ea, unsigned long vsid, int local) | 643 | unsigned long ea, unsigned long vsid, int local) |
620 | { | 644 | { |
621 | pte_t *ptep; | 645 | pte_t *ptep; |
622 | unsigned long va, vpn; | 646 | unsigned long old_pte, new_pte; |
623 | pte_t old_pte, new_pte; | 647 | unsigned long va, rflags, pa; |
624 | unsigned long rflags, prpn; | ||
625 | long slot; | 648 | long slot; |
626 | int err = 1; | 649 | int err = 1; |
627 | 650 | ||
628 | spin_lock(&mm->page_table_lock); | ||
629 | |||
630 | ptep = huge_pte_offset(mm, ea); | 651 | ptep = huge_pte_offset(mm, ea); |
631 | 652 | ||
632 | /* Search the Linux page table for a match with va */ | 653 | /* Search the Linux page table for a match with va */ |
633 | va = (vsid << 28) | (ea & 0x0fffffff); | 654 | va = (vsid << 28) | (ea & 0x0fffffff); |
634 | vpn = va >> HPAGE_SHIFT; | ||
635 | 655 | ||
636 | /* | 656 | /* |
637 | * If no pte found or not present, send the problem up to | 657 | * If no pte found or not present, send the problem up to |
@@ -640,8 +660,6 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access, | |||
640 | if (unlikely(!ptep || pte_none(*ptep))) | 660 | if (unlikely(!ptep || pte_none(*ptep))) |
641 | goto out; | 661 | goto out; |
642 | 662 | ||
643 | /* BUG_ON(pte_bad(*ptep)); */ | ||
644 | |||
645 | /* | 663 | /* |
646 | * Check the user's access rights to the page. If access should be | 664 | * Check the user's access rights to the page. If access should be |
647 | * prevented then send the problem up to do_page_fault. | 665 | * prevented then send the problem up to do_page_fault. |
@@ -661,58 +679,64 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access, | |||
661 | */ | 679 | */ |
662 | 680 | ||
663 | 681 | ||
664 | old_pte = *ptep; | 682 | do { |
665 | new_pte = old_pte; | 683 | old_pte = pte_val(*ptep); |
666 | 684 | if (old_pte & _PAGE_BUSY) | |
667 | rflags = 0x2 | (! (pte_val(new_pte) & _PAGE_RW)); | 685 | goto out; |
686 | new_pte = old_pte | _PAGE_BUSY | | ||
687 | _PAGE_ACCESSED | _PAGE_HASHPTE; | ||
688 | } while(old_pte != __cmpxchg_u64((unsigned long *)ptep, | ||
689 | old_pte, new_pte)); | ||
690 | |||
691 | rflags = 0x2 | (!(new_pte & _PAGE_RW)); | ||
668 | /* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */ | 692 | /* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */ |
669 | rflags |= ((pte_val(new_pte) & _PAGE_EXEC) ? 0 : HW_NO_EXEC); | 693 | rflags |= ((new_pte & _PAGE_EXEC) ? 0 : HPTE_R_N); |
670 | 694 | ||
671 | /* Check if pte already has an hpte (case 2) */ | 695 | /* Check if pte already has an hpte (case 2) */ |
672 | if (unlikely(pte_val(old_pte) & _PAGE_HASHPTE)) { | 696 | if (unlikely(old_pte & _PAGE_HASHPTE)) { |
673 | /* There MIGHT be an HPTE for this pte */ | 697 | /* There MIGHT be an HPTE for this pte */ |
674 | unsigned long hash, slot; | 698 | unsigned long hash, slot; |
675 | 699 | ||
676 | hash = hpt_hash(vpn, 1); | 700 | hash = hpt_hash(va, HPAGE_SHIFT); |
677 | if (pte_val(old_pte) & _PAGE_SECONDARY) | 701 | if (old_pte & _PAGE_F_SECOND) |
678 | hash = ~hash; | 702 | hash = ~hash; |
679 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; | 703 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; |
680 | slot += (pte_val(old_pte) & _PAGE_GROUP_IX) >> 12; | 704 | slot += (old_pte & _PAGE_F_GIX) >> 12; |
681 | 705 | ||
682 | if (ppc_md.hpte_updatepp(slot, rflags, va, 1, local) == -1) | 706 | if (ppc_md.hpte_updatepp(slot, rflags, va, 1, local) == -1) |
683 | pte_val(old_pte) &= ~_PAGE_HPTEFLAGS; | 707 | old_pte &= ~_PAGE_HPTEFLAGS; |
684 | } | 708 | } |
685 | 709 | ||
686 | if (likely(!(pte_val(old_pte) & _PAGE_HASHPTE))) { | 710 | if (likely(!(old_pte & _PAGE_HASHPTE))) { |
687 | unsigned long hash = hpt_hash(vpn, 1); | 711 | unsigned long hash = hpt_hash(va, HPAGE_SHIFT); |
688 | unsigned long hpte_group; | 712 | unsigned long hpte_group; |
689 | 713 | ||
690 | prpn = pte_pfn(old_pte); | 714 | pa = pte_pfn(__pte(old_pte)) << PAGE_SHIFT; |
691 | 715 | ||
692 | repeat: | 716 | repeat: |
693 | hpte_group = ((hash & htab_hash_mask) * | 717 | hpte_group = ((hash & htab_hash_mask) * |
694 | HPTES_PER_GROUP) & ~0x7UL; | 718 | HPTES_PER_GROUP) & ~0x7UL; |
695 | 719 | ||
696 | /* Update the linux pte with the HPTE slot */ | 720 | /* clear HPTE slot informations in new PTE */ |
697 | pte_val(new_pte) &= ~_PAGE_HPTEFLAGS; | 721 | new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HASHPTE; |
698 | pte_val(new_pte) |= _PAGE_HASHPTE; | ||
699 | 722 | ||
700 | /* Add in WIMG bits */ | 723 | /* Add in WIMG bits */ |
701 | /* XXX We should store these in the pte */ | 724 | /* XXX We should store these in the pte */ |
725 | /* --BenH: I think they are ... */ | ||
702 | rflags |= _PAGE_COHERENT; | 726 | rflags |= _PAGE_COHERENT; |
703 | 727 | ||
704 | slot = ppc_md.hpte_insert(hpte_group, va, prpn, | 728 | /* Insert into the hash table, primary slot */ |
705 | HPTE_V_LARGE, rflags); | 729 | slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 0, |
730 | mmu_huge_psize); | ||
706 | 731 | ||
707 | /* Primary is full, try the secondary */ | 732 | /* Primary is full, try the secondary */ |
708 | if (unlikely(slot == -1)) { | 733 | if (unlikely(slot == -1)) { |
709 | pte_val(new_pte) |= _PAGE_SECONDARY; | 734 | new_pte |= _PAGE_F_SECOND; |
710 | hpte_group = ((~hash & htab_hash_mask) * | 735 | hpte_group = ((~hash & htab_hash_mask) * |
711 | HPTES_PER_GROUP) & ~0x7UL; | 736 | HPTES_PER_GROUP) & ~0x7UL; |
712 | slot = ppc_md.hpte_insert(hpte_group, va, prpn, | 737 | slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, |
713 | HPTE_V_LARGE | | ||
714 | HPTE_V_SECONDARY, | 738 | HPTE_V_SECONDARY, |
715 | rflags); | 739 | mmu_huge_psize); |
716 | if (slot == -1) { | 740 | if (slot == -1) { |
717 | if (mftb() & 0x1) | 741 | if (mftb() & 0x1) |
718 | hpte_group = ((hash & htab_hash_mask) * | 742 | hpte_group = ((hash & htab_hash_mask) * |
@@ -726,20 +750,18 @@ repeat: | |||
726 | if (unlikely(slot == -2)) | 750 | if (unlikely(slot == -2)) |
727 | panic("hash_huge_page: pte_insert failed\n"); | 751 | panic("hash_huge_page: pte_insert failed\n"); |
728 | 752 | ||
729 | pte_val(new_pte) |= (slot<<12) & _PAGE_GROUP_IX; | 753 | new_pte |= (slot << 12) & _PAGE_F_GIX; |
730 | |||
731 | /* | ||
732 | * No need to use ldarx/stdcx here because all who | ||
733 | * might be updating the pte will hold the | ||
734 | * page_table_lock | ||
735 | */ | ||
736 | *ptep = new_pte; | ||
737 | } | 754 | } |
738 | 755 | ||
756 | /* | ||
757 | * No need to use ldarx/stdcx here because all who | ||
758 | * might be updating the pte will hold the | ||
759 | * page_table_lock | ||
760 | */ | ||
761 | *ptep = __pte(new_pte & ~_PAGE_BUSY); | ||
762 | |||
739 | err = 0; | 763 | err = 0; |
740 | 764 | ||
741 | out: | 765 | out: |
742 | spin_unlock(&mm->page_table_lock); | ||
743 | |||
744 | return err; | 766 | return err; |
745 | } | 767 | } |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index b0fc822ec29f..dfe7fa37b41a 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -188,12 +188,21 @@ static void zero_ctor(void *addr, kmem_cache_t *cache, unsigned long flags) | |||
188 | memset(addr, 0, kmem_cache_size(cache)); | 188 | memset(addr, 0, kmem_cache_size(cache)); |
189 | } | 189 | } |
190 | 190 | ||
191 | #ifdef CONFIG_PPC_64K_PAGES | ||
192 | static const int pgtable_cache_size[2] = { | ||
193 | PTE_TABLE_SIZE, PGD_TABLE_SIZE | ||
194 | }; | ||
195 | static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = { | ||
196 | "pte_pmd_cache", "pgd_cache", | ||
197 | }; | ||
198 | #else | ||
191 | static const int pgtable_cache_size[2] = { | 199 | static const int pgtable_cache_size[2] = { |
192 | PTE_TABLE_SIZE, PMD_TABLE_SIZE | 200 | PTE_TABLE_SIZE, PMD_TABLE_SIZE |
193 | }; | 201 | }; |
194 | static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = { | 202 | static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = { |
195 | "pgd_pte_cache", "pud_pmd_cache", | 203 | "pgd_pte_cache", "pud_pmd_cache", |
196 | }; | 204 | }; |
205 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
197 | 206 | ||
198 | kmem_cache_t *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)]; | 207 | kmem_cache_t *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)]; |
199 | 208 | ||
@@ -201,19 +210,14 @@ void pgtable_cache_init(void) | |||
201 | { | 210 | { |
202 | int i; | 211 | int i; |
203 | 212 | ||
204 | BUILD_BUG_ON(PTE_TABLE_SIZE != pgtable_cache_size[PTE_CACHE_NUM]); | ||
205 | BUILD_BUG_ON(PMD_TABLE_SIZE != pgtable_cache_size[PMD_CACHE_NUM]); | ||
206 | BUILD_BUG_ON(PUD_TABLE_SIZE != pgtable_cache_size[PUD_CACHE_NUM]); | ||
207 | BUILD_BUG_ON(PGD_TABLE_SIZE != pgtable_cache_size[PGD_CACHE_NUM]); | ||
208 | |||
209 | for (i = 0; i < ARRAY_SIZE(pgtable_cache_size); i++) { | 213 | for (i = 0; i < ARRAY_SIZE(pgtable_cache_size); i++) { |
210 | int size = pgtable_cache_size[i]; | 214 | int size = pgtable_cache_size[i]; |
211 | const char *name = pgtable_cache_name[i]; | 215 | const char *name = pgtable_cache_name[i]; |
212 | 216 | ||
213 | pgtable_cache[i] = kmem_cache_create(name, | 217 | pgtable_cache[i] = kmem_cache_create(name, |
214 | size, size, | 218 | size, size, |
215 | SLAB_HWCACHE_ALIGN | 219 | SLAB_HWCACHE_ALIGN | |
216 | | SLAB_MUST_HWCACHE_ALIGN, | 220 | SLAB_MUST_HWCACHE_ALIGN, |
217 | zero_ctor, | 221 | zero_ctor, |
218 | NULL); | 222 | NULL); |
219 | if (! pgtable_cache[i]) | 223 | if (! pgtable_cache[i]) |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 117b00012e14..7faa46b71f21 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -61,6 +61,9 @@ int init_bootmem_done; | |||
61 | int mem_init_done; | 61 | int mem_init_done; |
62 | unsigned long memory_limit; | 62 | unsigned long memory_limit; |
63 | 63 | ||
64 | extern void hash_preload(struct mm_struct *mm, unsigned long ea, | ||
65 | unsigned long access, unsigned long trap); | ||
66 | |||
64 | /* | 67 | /* |
65 | * This is called by /dev/mem to know if a given address has to | 68 | * This is called by /dev/mem to know if a given address has to |
66 | * be mapped non-cacheable or not | 69 | * be mapped non-cacheable or not |
@@ -493,18 +496,10 @@ EXPORT_SYMBOL(flush_icache_user_range); | |||
493 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | 496 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, |
494 | pte_t pte) | 497 | pte_t pte) |
495 | { | 498 | { |
496 | /* handle i-cache coherency */ | 499 | #ifdef CONFIG_PPC_STD_MMU |
497 | unsigned long pfn = pte_pfn(pte); | 500 | unsigned long access = 0, trap; |
498 | #ifdef CONFIG_PPC32 | ||
499 | pmd_t *pmd; | ||
500 | #else | ||
501 | unsigned long vsid; | ||
502 | void *pgdir; | ||
503 | pte_t *ptep; | ||
504 | int local = 0; | ||
505 | cpumask_t tmp; | ||
506 | unsigned long flags; | ||
507 | #endif | 501 | #endif |
502 | unsigned long pfn = pte_pfn(pte); | ||
508 | 503 | ||
509 | /* handle i-cache coherency */ | 504 | /* handle i-cache coherency */ |
510 | if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE) && | 505 | if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE) && |
@@ -535,30 +530,21 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | |||
535 | /* We only want HPTEs for linux PTEs that have _PAGE_ACCESSED set */ | 530 | /* We only want HPTEs for linux PTEs that have _PAGE_ACCESSED set */ |
536 | if (!pte_young(pte) || address >= TASK_SIZE) | 531 | if (!pte_young(pte) || address >= TASK_SIZE) |
537 | return; | 532 | return; |
538 | #ifdef CONFIG_PPC32 | ||
539 | if (Hash == 0) | ||
540 | return; | ||
541 | pmd = pmd_offset(pgd_offset(vma->vm_mm, address), address); | ||
542 | if (!pmd_none(*pmd)) | ||
543 | add_hash_page(vma->vm_mm->context, address, pmd_val(*pmd)); | ||
544 | #else | ||
545 | pgdir = vma->vm_mm->pgd; | ||
546 | if (pgdir == NULL) | ||
547 | return; | ||
548 | 533 | ||
549 | ptep = find_linux_pte(pgdir, address); | 534 | /* We try to figure out if we are coming from an instruction |
550 | if (!ptep) | 535 | * access fault and pass that down to __hash_page so we avoid |
536 | * double-faulting on execution of fresh text. We have to test | ||
537 | * for regs NULL since init will get here first thing at boot | ||
538 | * | ||
539 | * We also avoid filling the hash if not coming from a fault | ||
540 | */ | ||
541 | if (current->thread.regs == NULL) | ||
551 | return; | 542 | return; |
552 | 543 | trap = TRAP(current->thread.regs); | |
553 | vsid = get_vsid(vma->vm_mm->context.id, address); | 544 | if (trap == 0x400) |
554 | 545 | access |= _PAGE_EXEC; | |
555 | local_irq_save(flags); | 546 | else if (trap != 0x300) |
556 | tmp = cpumask_of_cpu(smp_processor_id()); | 547 | return; |
557 | if (cpus_equal(vma->vm_mm->cpu_vm_mask, tmp)) | 548 | hash_preload(vma->vm_mm, address, access, trap); |
558 | local = 1; | 549 | #endif /* CONFIG_PPC_STD_MMU */ |
559 | |||
560 | __hash_page(address, 0, vsid, ptep, 0x300, local); | ||
561 | local_irq_restore(flags); | ||
562 | #endif | ||
563 | #endif | ||
564 | } | 550 | } |
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index b79a78206135..51b786940971 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c | |||
@@ -101,7 +101,6 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags) | |||
101 | pud_t *pudp; | 101 | pud_t *pudp; |
102 | pmd_t *pmdp; | 102 | pmd_t *pmdp; |
103 | pte_t *ptep; | 103 | pte_t *ptep; |
104 | unsigned long vsid; | ||
105 | 104 | ||
106 | if (mem_init_done) { | 105 | if (mem_init_done) { |
107 | pgdp = pgd_offset_k(ea); | 106 | pgdp = pgd_offset_k(ea); |
@@ -117,28 +116,15 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags) | |||
117 | set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, | 116 | set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, |
118 | __pgprot(flags))); | 117 | __pgprot(flags))); |
119 | } else { | 118 | } else { |
120 | unsigned long va, vpn, hash, hpteg; | ||
121 | |||
122 | /* | 119 | /* |
123 | * If the mm subsystem is not fully up, we cannot create a | 120 | * If the mm subsystem is not fully up, we cannot create a |
124 | * linux page table entry for this mapping. Simply bolt an | 121 | * linux page table entry for this mapping. Simply bolt an |
125 | * entry in the hardware page table. | 122 | * entry in the hardware page table. |
123 | * | ||
126 | */ | 124 | */ |
127 | vsid = get_kernel_vsid(ea); | 125 | if (htab_bolt_mapping(ea, ea + PAGE_SIZE, pa, flags, |
128 | va = (vsid << 28) | (ea & 0xFFFFFFF); | 126 | mmu_virtual_psize)) |
129 | vpn = va >> PAGE_SHIFT; | 127 | panic("Can't map bolted IO mapping"); |
130 | |||
131 | hash = hpt_hash(vpn, 0); | ||
132 | |||
133 | hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP); | ||
134 | |||
135 | /* Panic if a pte grpup is full */ | ||
136 | if (ppc_md.hpte_insert(hpteg, va, pa >> PAGE_SHIFT, | ||
137 | HPTE_V_BOLTED, | ||
138 | _PAGE_NO_CACHE|_PAGE_GUARDED|PP_RWXX) | ||
139 | == -1) { | ||
140 | panic("map_io_page: could not insert mapping"); | ||
141 | } | ||
142 | } | 128 | } |
143 | return 0; | 129 | return 0; |
144 | } | 130 | } |
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c index cef9e83cc7e9..ed7fcfe5fd37 100644 --- a/arch/powerpc/mm/ppc_mmu_32.c +++ b/arch/powerpc/mm/ppc_mmu_32.c | |||
@@ -179,6 +179,21 @@ void __init setbat(int index, unsigned long virt, unsigned long phys, | |||
179 | } | 179 | } |
180 | 180 | ||
181 | /* | 181 | /* |
182 | * Preload a translation in the hash table | ||
183 | */ | ||
184 | void hash_preload(struct mm_struct *mm, unsigned long ea, | ||
185 | unsigned long access, unsigned long trap) | ||
186 | { | ||
187 | pmd_t *pmd; | ||
188 | |||
189 | if (Hash == 0) | ||
190 | return; | ||
191 | pmd = pmd_offset(pgd_offset(mm, ea), ea); | ||
192 | if (!pmd_none(*pmd)) | ||
193 | add_hash_page(mm->context, ea, pmd_val(*pmd)); | ||
194 | } | ||
195 | |||
196 | /* | ||
182 | * Initialize the hash table and patch the instructions in hashtable.S. | 197 | * Initialize the hash table and patch the instructions in hashtable.S. |
183 | */ | 198 | */ |
184 | void __init MMU_init_hw(void) | 199 | void __init MMU_init_hw(void) |
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index 0473953f6a37..60e852f2f8e5 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c | |||
@@ -14,14 +14,32 @@ | |||
14 | * 2 of the License, or (at your option) any later version. | 14 | * 2 of the License, or (at your option) any later version. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #undef DEBUG | ||
18 | |||
17 | #include <linux/config.h> | 19 | #include <linux/config.h> |
18 | #include <asm/pgtable.h> | 20 | #include <asm/pgtable.h> |
19 | #include <asm/mmu.h> | 21 | #include <asm/mmu.h> |
20 | #include <asm/mmu_context.h> | 22 | #include <asm/mmu_context.h> |
21 | #include <asm/paca.h> | 23 | #include <asm/paca.h> |
22 | #include <asm/cputable.h> | 24 | #include <asm/cputable.h> |
25 | #include <asm/cacheflush.h> | ||
26 | |||
27 | #ifdef DEBUG | ||
28 | #define DBG(fmt...) udbg_printf(fmt) | ||
29 | #else | ||
30 | #define DBG(fmt...) | ||
31 | #endif | ||
23 | 32 | ||
24 | extern void slb_allocate(unsigned long ea); | 33 | extern void slb_allocate_realmode(unsigned long ea); |
34 | extern void slb_allocate_user(unsigned long ea); | ||
35 | |||
36 | static void slb_allocate(unsigned long ea) | ||
37 | { | ||
38 | /* Currently, we do real mode for all SLBs including user, but | ||
39 | * that will change if we bring back dynamic VSIDs | ||
40 | */ | ||
41 | slb_allocate_realmode(ea); | ||
42 | } | ||
25 | 43 | ||
26 | static inline unsigned long mk_esid_data(unsigned long ea, unsigned long slot) | 44 | static inline unsigned long mk_esid_data(unsigned long ea, unsigned long slot) |
27 | { | 45 | { |
@@ -46,13 +64,15 @@ static void slb_flush_and_rebolt(void) | |||
46 | { | 64 | { |
47 | /* If you change this make sure you change SLB_NUM_BOLTED | 65 | /* If you change this make sure you change SLB_NUM_BOLTED |
48 | * appropriately too. */ | 66 | * appropriately too. */ |
49 | unsigned long ksp_flags = SLB_VSID_KERNEL; | 67 | unsigned long linear_llp, virtual_llp, lflags, vflags; |
50 | unsigned long ksp_esid_data; | 68 | unsigned long ksp_esid_data; |
51 | 69 | ||
52 | WARN_ON(!irqs_disabled()); | 70 | WARN_ON(!irqs_disabled()); |
53 | 71 | ||
54 | if (cpu_has_feature(CPU_FTR_16M_PAGE)) | 72 | linear_llp = mmu_psize_defs[mmu_linear_psize].sllp; |
55 | ksp_flags |= SLB_VSID_L; | 73 | virtual_llp = mmu_psize_defs[mmu_virtual_psize].sllp; |
74 | lflags = SLB_VSID_KERNEL | linear_llp; | ||
75 | vflags = SLB_VSID_KERNEL | virtual_llp; | ||
56 | 76 | ||
57 | ksp_esid_data = mk_esid_data(get_paca()->kstack, 2); | 77 | ksp_esid_data = mk_esid_data(get_paca()->kstack, 2); |
58 | if ((ksp_esid_data & ESID_MASK) == KERNELBASE) | 78 | if ((ksp_esid_data & ESID_MASK) == KERNELBASE) |
@@ -67,9 +87,9 @@ static void slb_flush_and_rebolt(void) | |||
67 | /* Slot 2 - kernel stack */ | 87 | /* Slot 2 - kernel stack */ |
68 | "slbmte %2,%3\n" | 88 | "slbmte %2,%3\n" |
69 | "isync" | 89 | "isync" |
70 | :: "r"(mk_vsid_data(VMALLOCBASE, SLB_VSID_KERNEL)), | 90 | :: "r"(mk_vsid_data(VMALLOCBASE, vflags)), |
71 | "r"(mk_esid_data(VMALLOCBASE, 1)), | 91 | "r"(mk_esid_data(VMALLOCBASE, 1)), |
72 | "r"(mk_vsid_data(ksp_esid_data, ksp_flags)), | 92 | "r"(mk_vsid_data(ksp_esid_data, lflags)), |
73 | "r"(ksp_esid_data) | 93 | "r"(ksp_esid_data) |
74 | : "memory"); | 94 | : "memory"); |
75 | } | 95 | } |
@@ -102,6 +122,9 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm) | |||
102 | 122 | ||
103 | get_paca()->slb_cache_ptr = 0; | 123 | get_paca()->slb_cache_ptr = 0; |
104 | get_paca()->context = mm->context; | 124 | get_paca()->context = mm->context; |
125 | #ifdef CONFIG_PPC_64K_PAGES | ||
126 | get_paca()->pgdir = mm->pgd; | ||
127 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
105 | 128 | ||
106 | /* | 129 | /* |
107 | * preload some userspace segments into the SLB. | 130 | * preload some userspace segments into the SLB. |
@@ -131,28 +154,77 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm) | |||
131 | slb_allocate(unmapped_base); | 154 | slb_allocate(unmapped_base); |
132 | } | 155 | } |
133 | 156 | ||
157 | static inline void patch_slb_encoding(unsigned int *insn_addr, | ||
158 | unsigned int immed) | ||
159 | { | ||
160 | /* Assume the instruction had a "0" immediate value, just | ||
161 | * "or" in the new value | ||
162 | */ | ||
163 | *insn_addr |= immed; | ||
164 | flush_icache_range((unsigned long)insn_addr, 4+ | ||
165 | (unsigned long)insn_addr); | ||
166 | } | ||
167 | |||
134 | void slb_initialize(void) | 168 | void slb_initialize(void) |
135 | { | 169 | { |
170 | unsigned long linear_llp, virtual_llp; | ||
171 | static int slb_encoding_inited; | ||
172 | extern unsigned int *slb_miss_kernel_load_linear; | ||
173 | extern unsigned int *slb_miss_kernel_load_virtual; | ||
174 | extern unsigned int *slb_miss_user_load_normal; | ||
175 | #ifdef CONFIG_HUGETLB_PAGE | ||
176 | extern unsigned int *slb_miss_user_load_huge; | ||
177 | unsigned long huge_llp; | ||
178 | |||
179 | huge_llp = mmu_psize_defs[mmu_huge_psize].sllp; | ||
180 | #endif | ||
181 | |||
182 | /* Prepare our SLB miss handler based on our page size */ | ||
183 | linear_llp = mmu_psize_defs[mmu_linear_psize].sllp; | ||
184 | virtual_llp = mmu_psize_defs[mmu_virtual_psize].sllp; | ||
185 | if (!slb_encoding_inited) { | ||
186 | slb_encoding_inited = 1; | ||
187 | patch_slb_encoding(slb_miss_kernel_load_linear, | ||
188 | SLB_VSID_KERNEL | linear_llp); | ||
189 | patch_slb_encoding(slb_miss_kernel_load_virtual, | ||
190 | SLB_VSID_KERNEL | virtual_llp); | ||
191 | patch_slb_encoding(slb_miss_user_load_normal, | ||
192 | SLB_VSID_USER | virtual_llp); | ||
193 | |||
194 | DBG("SLB: linear LLP = %04x\n", linear_llp); | ||
195 | DBG("SLB: virtual LLP = %04x\n", virtual_llp); | ||
196 | #ifdef CONFIG_HUGETLB_PAGE | ||
197 | patch_slb_encoding(slb_miss_user_load_huge, | ||
198 | SLB_VSID_USER | huge_llp); | ||
199 | DBG("SLB: huge LLP = %04x\n", huge_llp); | ||
200 | #endif | ||
201 | } | ||
202 | |||
136 | /* On iSeries the bolted entries have already been set up by | 203 | /* On iSeries the bolted entries have already been set up by |
137 | * the hypervisor from the lparMap data in head.S */ | 204 | * the hypervisor from the lparMap data in head.S */ |
138 | #ifndef CONFIG_PPC_ISERIES | 205 | #ifndef CONFIG_PPC_ISERIES |
139 | unsigned long flags = SLB_VSID_KERNEL; | 206 | { |
207 | unsigned long lflags, vflags; | ||
140 | 208 | ||
141 | /* Invalidate the entire SLB (even slot 0) & all the ERATS */ | 209 | lflags = SLB_VSID_KERNEL | linear_llp; |
142 | if (cpu_has_feature(CPU_FTR_16M_PAGE)) | 210 | vflags = SLB_VSID_KERNEL | virtual_llp; |
143 | flags |= SLB_VSID_L; | ||
144 | 211 | ||
145 | asm volatile("isync":::"memory"); | 212 | /* Invalidate the entire SLB (even slot 0) & all the ERATS */ |
146 | asm volatile("slbmte %0,%0"::"r" (0) : "memory"); | 213 | asm volatile("isync":::"memory"); |
214 | asm volatile("slbmte %0,%0"::"r" (0) : "memory"); | ||
147 | asm volatile("isync; slbia; isync":::"memory"); | 215 | asm volatile("isync; slbia; isync":::"memory"); |
148 | create_slbe(KERNELBASE, flags, 0); | 216 | create_slbe(KERNELBASE, lflags, 0); |
149 | create_slbe(VMALLOCBASE, SLB_VSID_KERNEL, 1); | 217 | |
218 | /* VMALLOC space has 4K pages always for now */ | ||
219 | create_slbe(VMALLOCBASE, vflags, 1); | ||
220 | |||
150 | /* We don't bolt the stack for the time being - we're in boot, | 221 | /* We don't bolt the stack for the time being - we're in boot, |
151 | * so the stack is in the bolted segment. By the time it goes | 222 | * so the stack is in the bolted segment. By the time it goes |
152 | * elsewhere, we'll call _switch() which will bolt in the new | 223 | * elsewhere, we'll call _switch() which will bolt in the new |
153 | * one. */ | 224 | * one. */ |
154 | asm volatile("isync":::"memory"); | 225 | asm volatile("isync":::"memory"); |
155 | #endif | 226 | } |
227 | #endif /* CONFIG_PPC_ISERIES */ | ||
156 | 228 | ||
157 | get_paca()->stab_rr = SLB_NUM_BOLTED; | 229 | get_paca()->stab_rr = SLB_NUM_BOLTED; |
158 | } | 230 | } |
diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S index a3a03da503bc..950ffc5848c7 100644 --- a/arch/powerpc/mm/slb_low.S +++ b/arch/powerpc/mm/slb_low.S | |||
@@ -18,61 +18,28 @@ | |||
18 | 18 | ||
19 | #include <linux/config.h> | 19 | #include <linux/config.h> |
20 | #include <asm/processor.h> | 20 | #include <asm/processor.h> |
21 | #include <asm/page.h> | ||
22 | #include <asm/mmu.h> | ||
23 | #include <asm/ppc_asm.h> | 21 | #include <asm/ppc_asm.h> |
24 | #include <asm/asm-offsets.h> | 22 | #include <asm/asm-offsets.h> |
25 | #include <asm/cputable.h> | 23 | #include <asm/cputable.h> |
24 | #include <asm/page.h> | ||
25 | #include <asm/mmu.h> | ||
26 | #include <asm/pgtable.h> | ||
26 | 27 | ||
27 | /* void slb_allocate(unsigned long ea); | 28 | /* void slb_allocate_realmode(unsigned long ea); |
28 | * | 29 | * |
29 | * Create an SLB entry for the given EA (user or kernel). | 30 | * Create an SLB entry for the given EA (user or kernel). |
30 | * r3 = faulting address, r13 = PACA | 31 | * r3 = faulting address, r13 = PACA |
31 | * r9, r10, r11 are clobbered by this function | 32 | * r9, r10, r11 are clobbered by this function |
32 | * No other registers are examined or changed. | 33 | * No other registers are examined or changed. |
33 | */ | 34 | */ |
34 | _GLOBAL(slb_allocate) | 35 | _GLOBAL(slb_allocate_realmode) |
35 | /* | 36 | /* r3 = faulting address */ |
36 | * First find a slot, round robin. Previously we tried to find | ||
37 | * a free slot first but that took too long. Unfortunately we | ||
38 | * dont have any LRU information to help us choose a slot. | ||
39 | */ | ||
40 | #ifdef CONFIG_PPC_ISERIES | ||
41 | /* | ||
42 | * On iSeries, the "bolted" stack segment can be cast out on | ||
43 | * shared processor switch so we need to check for a miss on | ||
44 | * it and restore it to the right slot. | ||
45 | */ | ||
46 | ld r9,PACAKSAVE(r13) | ||
47 | clrrdi r9,r9,28 | ||
48 | clrrdi r11,r3,28 | ||
49 | li r10,SLB_NUM_BOLTED-1 /* Stack goes in last bolted slot */ | ||
50 | cmpld r9,r11 | ||
51 | beq 3f | ||
52 | #endif /* CONFIG_PPC_ISERIES */ | ||
53 | |||
54 | ld r10,PACASTABRR(r13) | ||
55 | addi r10,r10,1 | ||
56 | /* use a cpu feature mask if we ever change our slb size */ | ||
57 | cmpldi r10,SLB_NUM_ENTRIES | ||
58 | |||
59 | blt+ 4f | ||
60 | li r10,SLB_NUM_BOLTED | ||
61 | |||
62 | 4: | ||
63 | std r10,PACASTABRR(r13) | ||
64 | 3: | ||
65 | /* r3 = faulting address, r10 = entry */ | ||
66 | 37 | ||
67 | srdi r9,r3,60 /* get region */ | 38 | srdi r9,r3,60 /* get region */ |
68 | srdi r3,r3,28 /* get esid */ | 39 | srdi r10,r3,28 /* get esid */ |
69 | cmpldi cr7,r9,0xc /* cmp KERNELBASE for later use */ | 40 | cmpldi cr7,r9,0xc /* cmp KERNELBASE for later use */ |
70 | 41 | ||
71 | rldimi r10,r3,28,0 /* r10= ESID<<28 | entry */ | 42 | /* r3 = address, r10 = esid, cr7 = <>KERNELBASE */ |
72 | oris r10,r10,SLB_ESID_V@h /* r10 |= SLB_ESID_V */ | ||
73 | |||
74 | /* r3 = esid, r10 = esid_data, cr7 = <>KERNELBASE */ | ||
75 | |||
76 | blt cr7,0f /* user or kernel? */ | 43 | blt cr7,0f /* user or kernel? */ |
77 | 44 | ||
78 | /* kernel address: proto-VSID = ESID */ | 45 | /* kernel address: proto-VSID = ESID */ |
@@ -81,43 +48,166 @@ _GLOBAL(slb_allocate) | |||
81 | * top segment. That's ok, the scramble below will translate | 48 | * top segment. That's ok, the scramble below will translate |
82 | * it to VSID 0, which is reserved as a bad VSID - one which | 49 | * it to VSID 0, which is reserved as a bad VSID - one which |
83 | * will never have any pages in it. */ | 50 | * will never have any pages in it. */ |
84 | li r11,SLB_VSID_KERNEL | ||
85 | BEGIN_FTR_SECTION | ||
86 | bne cr7,9f | ||
87 | li r11,(SLB_VSID_KERNEL|SLB_VSID_L) | ||
88 | END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE) | ||
89 | b 9f | ||
90 | 51 | ||
91 | 0: /* user address: proto-VSID = context<<15 | ESID */ | 52 | /* Check if hitting the linear mapping of the vmalloc/ioremap |
92 | srdi. r9,r3,USER_ESID_BITS | 53 | * kernel space |
54 | */ | ||
55 | bne cr7,1f | ||
56 | |||
57 | /* Linear mapping encoding bits, the "li" instruction below will | ||
58 | * be patched by the kernel at boot | ||
59 | */ | ||
60 | _GLOBAL(slb_miss_kernel_load_linear) | ||
61 | li r11,0 | ||
62 | b slb_finish_load | ||
63 | |||
64 | 1: /* vmalloc/ioremap mapping encoding bits, the "li" instruction below | ||
65 | * will be patched by the kernel at boot | ||
66 | */ | ||
67 | _GLOBAL(slb_miss_kernel_load_virtual) | ||
68 | li r11,0 | ||
69 | b slb_finish_load | ||
70 | |||
71 | |||
72 | 0: /* user address: proto-VSID = context << 15 | ESID. First check | ||
73 | * if the address is within the boundaries of the user region | ||
74 | */ | ||
75 | srdi. r9,r10,USER_ESID_BITS | ||
93 | bne- 8f /* invalid ea bits set */ | 76 | bne- 8f /* invalid ea bits set */ |
94 | 77 | ||
78 | /* Figure out if the segment contains huge pages */ | ||
95 | #ifdef CONFIG_HUGETLB_PAGE | 79 | #ifdef CONFIG_HUGETLB_PAGE |
96 | BEGIN_FTR_SECTION | 80 | BEGIN_FTR_SECTION |
81 | b 1f | ||
82 | END_FTR_SECTION_IFCLR(CPU_FTR_16M_PAGE) | ||
83 | cmpldi r10,16 | ||
84 | |||
85 | lhz r9,PACALOWHTLBAREAS(r13) | ||
86 | mr r11,r10 | ||
87 | blt 5f | ||
88 | |||
97 | lhz r9,PACAHIGHHTLBAREAS(r13) | 89 | lhz r9,PACAHIGHHTLBAREAS(r13) |
98 | srdi r11,r3,(HTLB_AREA_SHIFT-SID_SHIFT) | 90 | srdi r11,r10,(HTLB_AREA_SHIFT-SID_SHIFT) |
99 | srd r9,r9,r11 | 91 | |
100 | lhz r11,PACALOWHTLBAREAS(r13) | 92 | 5: srd r9,r9,r11 |
101 | srd r11,r11,r3 | 93 | andi. r9,r9,1 |
102 | or r9,r9,r11 | 94 | beq 1f |
103 | END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE) | 95 | _GLOBAL(slb_miss_user_load_huge) |
96 | li r11,0 | ||
97 | b 2f | ||
98 | 1: | ||
104 | #endif /* CONFIG_HUGETLB_PAGE */ | 99 | #endif /* CONFIG_HUGETLB_PAGE */ |
105 | 100 | ||
106 | li r11,SLB_VSID_USER | 101 | _GLOBAL(slb_miss_user_load_normal) |
102 | li r11,0 | ||
107 | 103 | ||
108 | #ifdef CONFIG_HUGETLB_PAGE | 104 | 2: |
109 | BEGIN_FTR_SECTION | 105 | ld r9,PACACONTEXTID(r13) |
110 | rldimi r11,r9,8,55 /* shift masked bit into SLB_VSID_L */ | 106 | rldimi r10,r9,USER_ESID_BITS,0 |
111 | END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE) | 107 | b slb_finish_load |
112 | #endif /* CONFIG_HUGETLB_PAGE */ | ||
113 | 108 | ||
109 | 8: /* invalid EA */ | ||
110 | li r10,0 /* BAD_VSID */ | ||
111 | li r11,SLB_VSID_USER /* flags don't much matter */ | ||
112 | b slb_finish_load | ||
113 | |||
114 | #ifdef __DISABLED__ | ||
115 | |||
116 | /* void slb_allocate_user(unsigned long ea); | ||
117 | * | ||
118 | * Create an SLB entry for the given EA (user or kernel). | ||
119 | * r3 = faulting address, r13 = PACA | ||
120 | * r9, r10, r11 are clobbered by this function | ||
121 | * No other registers are examined or changed. | ||
122 | * | ||
123 | * It is called with translation enabled in order to be able to walk the | ||
124 | * page tables. This is not currently used. | ||
125 | */ | ||
126 | _GLOBAL(slb_allocate_user) | ||
127 | /* r3 = faulting address */ | ||
128 | srdi r10,r3,28 /* get esid */ | ||
129 | |||
130 | crset 4*cr7+lt /* set "user" flag for later */ | ||
131 | |||
132 | /* check if we fit in the range covered by the pagetables*/ | ||
133 | srdi. r9,r3,PGTABLE_EADDR_SIZE | ||
134 | crnot 4*cr0+eq,4*cr0+eq | ||
135 | beqlr | ||
136 | |||
137 | /* now we need to get to the page tables in order to get the page | ||
138 | * size encoding from the PMD. In the future, we'll be able to deal | ||
139 | * with 1T segments too by getting the encoding from the PGD instead | ||
140 | */ | ||
141 | ld r9,PACAPGDIR(r13) | ||
142 | cmpldi cr0,r9,0 | ||
143 | beqlr | ||
144 | rlwinm r11,r10,8,25,28 | ||
145 | ldx r9,r9,r11 /* get pgd_t */ | ||
146 | cmpldi cr0,r9,0 | ||
147 | beqlr | ||
148 | rlwinm r11,r10,3,17,28 | ||
149 | ldx r9,r9,r11 /* get pmd_t */ | ||
150 | cmpldi cr0,r9,0 | ||
151 | beqlr | ||
152 | |||
153 | /* build vsid flags */ | ||
154 | andi. r11,r9,SLB_VSID_LLP | ||
155 | ori r11,r11,SLB_VSID_USER | ||
156 | |||
157 | /* get context to calculate proto-VSID */ | ||
114 | ld r9,PACACONTEXTID(r13) | 158 | ld r9,PACACONTEXTID(r13) |
115 | rldimi r3,r9,USER_ESID_BITS,0 | 159 | rldimi r10,r9,USER_ESID_BITS,0 |
160 | |||
161 | /* fall through slb_finish_load */ | ||
162 | |||
163 | #endif /* __DISABLED__ */ | ||
164 | |||
165 | |||
166 | /* | ||
167 | * Finish loading of an SLB entry and return | ||
168 | * | ||
169 | * r3 = EA, r10 = proto-VSID, r11 = flags, clobbers r9, cr7 = <>KERNELBASE | ||
170 | */ | ||
171 | slb_finish_load: | ||
172 | ASM_VSID_SCRAMBLE(r10,r9) | ||
173 | rldimi r11,r10,SLB_VSID_SHIFT,16 /* combine VSID and flags */ | ||
174 | |||
175 | /* r3 = EA, r11 = VSID data */ | ||
176 | /* | ||
177 | * Find a slot, round robin. Previously we tried to find a | ||
178 | * free slot first but that took too long. Unfortunately we | ||
179 | * dont have any LRU information to help us choose a slot. | ||
180 | */ | ||
181 | #ifdef CONFIG_PPC_ISERIES | ||
182 | /* | ||
183 | * On iSeries, the "bolted" stack segment can be cast out on | ||
184 | * shared processor switch so we need to check for a miss on | ||
185 | * it and restore it to the right slot. | ||
186 | */ | ||
187 | ld r9,PACAKSAVE(r13) | ||
188 | clrrdi r9,r9,28 | ||
189 | clrrdi r3,r3,28 | ||
190 | li r10,SLB_NUM_BOLTED-1 /* Stack goes in last bolted slot */ | ||
191 | cmpld r9,r3 | ||
192 | beq 3f | ||
193 | #endif /* CONFIG_PPC_ISERIES */ | ||
194 | |||
195 | ld r10,PACASTABRR(r13) | ||
196 | addi r10,r10,1 | ||
197 | /* use a cpu feature mask if we ever change our slb size */ | ||
198 | cmpldi r10,SLB_NUM_ENTRIES | ||
199 | |||
200 | blt+ 4f | ||
201 | li r10,SLB_NUM_BOLTED | ||
116 | 202 | ||
117 | 9: /* r3 = protovsid, r11 = flags, r10 = esid_data, cr7 = <>KERNELBASE */ | 203 | 4: |
118 | ASM_VSID_SCRAMBLE(r3,r9) | 204 | std r10,PACASTABRR(r13) |
205 | |||
206 | 3: | ||
207 | rldimi r3,r10,0,36 /* r3= EA[0:35] | entry */ | ||
208 | oris r10,r3,SLB_ESID_V@h /* r3 |= SLB_ESID_V */ | ||
119 | 209 | ||
120 | rldimi r11,r3,SLB_VSID_SHIFT,16 /* combine VSID and flags */ | 210 | /* r3 = ESID data, r11 = VSID data */ |
121 | 211 | ||
122 | /* | 212 | /* |
123 | * No need for an isync before or after this slbmte. The exception | 213 | * No need for an isync before or after this slbmte. The exception |
@@ -125,7 +215,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE) | |||
125 | */ | 215 | */ |
126 | slbmte r11,r10 | 216 | slbmte r11,r10 |
127 | 217 | ||
128 | bgelr cr7 /* we're done for kernel addresses */ | 218 | /* we're done for kernel addresses */ |
219 | crclr 4*cr0+eq /* set result to "success" */ | ||
220 | bgelr cr7 | ||
129 | 221 | ||
130 | /* Update the slb cache */ | 222 | /* Update the slb cache */ |
131 | lhz r3,PACASLBCACHEPTR(r13) /* offset = paca->slb_cache_ptr */ | 223 | lhz r3,PACASLBCACHEPTR(r13) /* offset = paca->slb_cache_ptr */ |
@@ -143,9 +235,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_16M_PAGE) | |||
143 | li r3,SLB_CACHE_ENTRIES+1 | 235 | li r3,SLB_CACHE_ENTRIES+1 |
144 | 2: | 236 | 2: |
145 | sth r3,PACASLBCACHEPTR(r13) /* paca->slb_cache_ptr = offset */ | 237 | sth r3,PACASLBCACHEPTR(r13) /* paca->slb_cache_ptr = offset */ |
238 | crclr 4*cr0+eq /* set result to "success" */ | ||
146 | blr | 239 | blr |
147 | 240 | ||
148 | 8: /* invalid EA */ | ||
149 | li r3,0 /* BAD_VSID */ | ||
150 | li r11,SLB_VSID_USER /* flags don't much matter */ | ||
151 | b 9b | ||
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 1b83f002bf27..fa325dbf98fc 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
@@ -26,7 +26,6 @@ struct stab_entry { | |||
26 | unsigned long vsid_data; | 26 | unsigned long vsid_data; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | /* Both the segment table and SLB code uses the following cache */ | ||
30 | #define NR_STAB_CACHE_ENTRIES 8 | 29 | #define NR_STAB_CACHE_ENTRIES 8 |
31 | DEFINE_PER_CPU(long, stab_cache_ptr); | 30 | DEFINE_PER_CPU(long, stab_cache_ptr); |
32 | DEFINE_PER_CPU(long, stab_cache[NR_STAB_CACHE_ENTRIES]); | 31 | DEFINE_PER_CPU(long, stab_cache[NR_STAB_CACHE_ENTRIES]); |
@@ -186,7 +185,7 @@ void switch_stab(struct task_struct *tsk, struct mm_struct *mm) | |||
186 | /* Never flush the first entry. */ | 185 | /* Never flush the first entry. */ |
187 | ste += 1; | 186 | ste += 1; |
188 | for (entry = 1; | 187 | for (entry = 1; |
189 | entry < (PAGE_SIZE / sizeof(struct stab_entry)); | 188 | entry < (HW_PAGE_SIZE / sizeof(struct stab_entry)); |
190 | entry++, ste++) { | 189 | entry++, ste++) { |
191 | unsigned long ea; | 190 | unsigned long ea; |
192 | ea = ste->esid_data & ESID_MASK; | 191 | ea = ste->esid_data & ESID_MASK; |
@@ -200,6 +199,10 @@ void switch_stab(struct task_struct *tsk, struct mm_struct *mm) | |||
200 | 199 | ||
201 | __get_cpu_var(stab_cache_ptr) = 0; | 200 | __get_cpu_var(stab_cache_ptr) = 0; |
202 | 201 | ||
202 | #ifdef CONFIG_PPC_64K_PAGES | ||
203 | get_paca()->pgdir = mm->pgd; | ||
204 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
205 | |||
203 | /* Now preload some entries for the new task */ | 206 | /* Now preload some entries for the new task */ |
204 | if (test_tsk_thread_flag(tsk, TIF_32BIT)) | 207 | if (test_tsk_thread_flag(tsk, TIF_32BIT)) |
205 | unmapped_base = TASK_UNMAPPED_BASE_USER32; | 208 | unmapped_base = TASK_UNMAPPED_BASE_USER32; |
@@ -223,8 +226,6 @@ void switch_stab(struct task_struct *tsk, struct mm_struct *mm) | |||
223 | asm volatile("sync" : : : "memory"); | 226 | asm volatile("sync" : : : "memory"); |
224 | } | 227 | } |
225 | 228 | ||
226 | extern void slb_initialize(void); | ||
227 | |||
228 | /* | 229 | /* |
229 | * Allocate segment tables for secondary CPUs. These must all go in | 230 | * Allocate segment tables for secondary CPUs. These must all go in |
230 | * the first (bolted) segment, so that do_stab_bolted won't get a | 231 | * the first (bolted) segment, so that do_stab_bolted won't get a |
@@ -243,18 +244,21 @@ void stabs_alloc(void) | |||
243 | if (cpu == 0) | 244 | if (cpu == 0) |
244 | continue; /* stab for CPU 0 is statically allocated */ | 245 | continue; /* stab for CPU 0 is statically allocated */ |
245 | 246 | ||
246 | newstab = lmb_alloc_base(PAGE_SIZE, PAGE_SIZE, 1<<SID_SHIFT); | 247 | newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE, |
248 | 1<<SID_SHIFT); | ||
247 | if (! newstab) | 249 | if (! newstab) |
248 | panic("Unable to allocate segment table for CPU %d.\n", | 250 | panic("Unable to allocate segment table for CPU %d.\n", |
249 | cpu); | 251 | cpu); |
250 | 252 | ||
251 | newstab += KERNELBASE; | 253 | newstab += KERNELBASE; |
252 | 254 | ||
253 | memset((void *)newstab, 0, PAGE_SIZE); | 255 | memset((void *)newstab, 0, HW_PAGE_SIZE); |
254 | 256 | ||
255 | paca[cpu].stab_addr = newstab; | 257 | paca[cpu].stab_addr = newstab; |
256 | paca[cpu].stab_real = virt_to_abs(newstab); | 258 | paca[cpu].stab_real = virt_to_abs(newstab); |
257 | printk(KERN_DEBUG "Segment table for CPU %d at 0x%lx virtual, 0x%lx absolute\n", cpu, paca[cpu].stab_addr, paca[cpu].stab_real); | 259 | printk(KERN_DEBUG "Segment table for CPU %d at 0x%lx " |
260 | "virtual, 0x%lx absolute\n", | ||
261 | cpu, paca[cpu].stab_addr, paca[cpu].stab_real); | ||
258 | } | 262 | } |
259 | } | 263 | } |
260 | 264 | ||
@@ -267,13 +271,9 @@ void stab_initialize(unsigned long stab) | |||
267 | { | 271 | { |
268 | unsigned long vsid = get_kernel_vsid(KERNELBASE); | 272 | unsigned long vsid = get_kernel_vsid(KERNELBASE); |
269 | 273 | ||
270 | if (cpu_has_feature(CPU_FTR_SLB)) { | 274 | asm volatile("isync; slbia; isync":::"memory"); |
271 | slb_initialize(); | 275 | make_ste(stab, GET_ESID(KERNELBASE), vsid); |
272 | } else { | ||
273 | asm volatile("isync; slbia; isync":::"memory"); | ||
274 | make_ste(stab, GET_ESID(KERNELBASE), vsid); | ||
275 | 276 | ||
276 | /* Order update */ | 277 | /* Order update */ |
277 | asm volatile("sync":::"memory"); | 278 | asm volatile("sync":::"memory"); |
278 | } | ||
279 | } | 279 | } |
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c index 09ab81a10f4f..53e31b834ace 100644 --- a/arch/powerpc/mm/tlb_64.c +++ b/arch/powerpc/mm/tlb_64.c | |||
@@ -21,6 +21,7 @@ | |||
21 | * as published by the Free Software Foundation; either version | 21 | * as published by the Free Software Foundation; either version |
22 | * 2 of the License, or (at your option) any later version. | 22 | * 2 of the License, or (at your option) any later version. |
23 | */ | 23 | */ |
24 | |||
24 | #include <linux/config.h> | 25 | #include <linux/config.h> |
25 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
26 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
@@ -30,7 +31,7 @@ | |||
30 | #include <asm/pgalloc.h> | 31 | #include <asm/pgalloc.h> |
31 | #include <asm/tlbflush.h> | 32 | #include <asm/tlbflush.h> |
32 | #include <asm/tlb.h> | 33 | #include <asm/tlb.h> |
33 | #include <linux/highmem.h> | 34 | #include <asm/bug.h> |
34 | 35 | ||
35 | DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); | 36 | DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); |
36 | 37 | ||
@@ -126,28 +127,46 @@ void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf) | |||
126 | * (if we remove it we should clear the _PTE_HPTEFLAGS bits). | 127 | * (if we remove it we should clear the _PTE_HPTEFLAGS bits). |
127 | */ | 128 | */ |
128 | void hpte_update(struct mm_struct *mm, unsigned long addr, | 129 | void hpte_update(struct mm_struct *mm, unsigned long addr, |
129 | unsigned long pte, int wrprot) | 130 | pte_t *ptep, unsigned long pte, int huge) |
130 | { | 131 | { |
131 | struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); | 132 | struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); |
132 | unsigned long vsid; | 133 | unsigned long vsid; |
134 | unsigned int psize = mmu_virtual_psize; | ||
133 | int i; | 135 | int i; |
134 | 136 | ||
135 | i = batch->index; | 137 | i = batch->index; |
136 | 138 | ||
139 | /* We mask the address for the base page size. Huge pages will | ||
140 | * have applied their own masking already | ||
141 | */ | ||
142 | addr &= PAGE_MASK; | ||
143 | |||
144 | /* Get page size (maybe move back to caller) */ | ||
145 | if (huge) { | ||
146 | #ifdef CONFIG_HUGETLB_PAGE | ||
147 | psize = mmu_huge_psize; | ||
148 | #else | ||
149 | BUG(); | ||
150 | #endif | ||
151 | } | ||
152 | |||
137 | /* | 153 | /* |
138 | * This can happen when we are in the middle of a TLB batch and | 154 | * This can happen when we are in the middle of a TLB batch and |
139 | * we encounter memory pressure (eg copy_page_range when it tries | 155 | * we encounter memory pressure (eg copy_page_range when it tries |
140 | * to allocate a new pte). If we have to reclaim memory and end | 156 | * to allocate a new pte). If we have to reclaim memory and end |
141 | * up scanning and resetting referenced bits then our batch context | 157 | * up scanning and resetting referenced bits then our batch context |
142 | * will change mid stream. | 158 | * will change mid stream. |
159 | * | ||
160 | * We also need to ensure only one page size is present in a given | ||
161 | * batch | ||
143 | */ | 162 | */ |
144 | if (i != 0 && (mm != batch->mm || batch->large != pte_huge(pte))) { | 163 | if (i != 0 && (mm != batch->mm || batch->psize != psize)) { |
145 | flush_tlb_pending(); | 164 | flush_tlb_pending(); |
146 | i = 0; | 165 | i = 0; |
147 | } | 166 | } |
148 | if (i == 0) { | 167 | if (i == 0) { |
149 | batch->mm = mm; | 168 | batch->mm = mm; |
150 | batch->large = pte_huge(pte); | 169 | batch->psize = psize; |
151 | } | 170 | } |
152 | if (addr < KERNELBASE) { | 171 | if (addr < KERNELBASE) { |
153 | vsid = get_vsid(mm->context.id, addr); | 172 | vsid = get_vsid(mm->context.id, addr); |
@@ -155,7 +174,7 @@ void hpte_update(struct mm_struct *mm, unsigned long addr, | |||
155 | } else | 174 | } else |
156 | vsid = get_kernel_vsid(addr); | 175 | vsid = get_kernel_vsid(addr); |
157 | batch->vaddr[i] = (vsid << 28 ) | (addr & 0x0fffffff); | 176 | batch->vaddr[i] = (vsid << 28 ) | (addr & 0x0fffffff); |
158 | batch->pte[i] = __pte(pte); | 177 | batch->pte[i] = __real_pte(__pte(pte), ptep); |
159 | batch->index = ++i; | 178 | batch->index = ++i; |
160 | if (i >= PPC64_TLB_BATCH_NR) | 179 | if (i >= PPC64_TLB_BATCH_NR) |
161 | flush_tlb_pending(); | 180 | flush_tlb_pending(); |
@@ -177,7 +196,8 @@ void __flush_tlb_pending(struct ppc64_tlb_batch *batch) | |||
177 | local = 1; | 196 | local = 1; |
178 | 197 | ||
179 | if (i == 1) | 198 | if (i == 1) |
180 | flush_hash_page(batch->vaddr[0], batch->pte[0], local); | 199 | flush_hash_page(batch->vaddr[0], batch->pte[0], |
200 | batch->psize, local); | ||
181 | else | 201 | else |
182 | flush_hash_range(i, local); | 202 | flush_hash_range(i, local); |
183 | batch->index = 0; | 203 | batch->index = 0; |
diff --git a/arch/powerpc/oprofile/Kconfig b/arch/powerpc/oprofile/Kconfig index 19d37730b664..eb2dece76a54 100644 --- a/arch/powerpc/oprofile/Kconfig +++ b/arch/powerpc/oprofile/Kconfig | |||
@@ -1,7 +1,3 @@ | |||
1 | |||
2 | menu "Profiling support" | ||
3 | depends on EXPERIMENTAL | ||
4 | |||
5 | config PROFILING | 1 | config PROFILING |
6 | bool "Profiling support (EXPERIMENTAL)" | 2 | bool "Profiling support (EXPERIMENTAL)" |
7 | help | 3 | help |
@@ -19,5 +15,3 @@ config OPROFILE | |||
19 | 15 | ||
20 | If unsure, say N. | 16 | If unsure, say N. |
21 | 17 | ||
22 | endmenu | ||
23 | |||
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile index 172c0db63504..8836b3a00668 100644 --- a/arch/powerpc/platforms/Makefile +++ b/arch/powerpc/platforms/Makefile | |||
@@ -11,3 +11,4 @@ obj-$(CONFIG_85xx) += 85xx/ | |||
11 | obj-$(CONFIG_PPC_PSERIES) += pseries/ | 11 | obj-$(CONFIG_PPC_PSERIES) += pseries/ |
12 | obj-$(CONFIG_PPC_ISERIES) += iseries/ | 12 | obj-$(CONFIG_PPC_ISERIES) += iseries/ |
13 | obj-$(CONFIG_PPC_MAPLE) += maple/ | 13 | obj-$(CONFIG_PPC_MAPLE) += maple/ |
14 | obj-$(CONFIG_PPC_CELL) += cell/ | ||
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile new file mode 100644 index 000000000000..55e094b96bc0 --- /dev/null +++ b/arch/powerpc/platforms/cell/Makefile | |||
@@ -0,0 +1,2 @@ | |||
1 | obj-y += interrupt.o iommu.o setup.o spider-pic.o | ||
2 | obj-$(CONFIG_SMP) += smp.o | ||
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c new file mode 100644 index 000000000000..7fbe78a9327d --- /dev/null +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
@@ -0,0 +1,284 @@ | |||
1 | /* | ||
2 | * Cell Internal Interrupt Controller | ||
3 | * | ||
4 | * (C) Copyright IBM Deutschland Entwicklung GmbH 2005 | ||
5 | * | ||
6 | * Author: Arnd Bergmann <arndb@de.ibm.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2, or (at your option) | ||
11 | * any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | */ | ||
22 | |||
23 | #include <linux/config.h> | ||
24 | #include <linux/interrupt.h> | ||
25 | #include <linux/irq.h> | ||
26 | #include <linux/percpu.h> | ||
27 | #include <linux/types.h> | ||
28 | |||
29 | #include <asm/io.h> | ||
30 | #include <asm/pgtable.h> | ||
31 | #include <asm/prom.h> | ||
32 | #include <asm/ptrace.h> | ||
33 | |||
34 | #include "interrupt.h" | ||
35 | |||
36 | struct iic_pending_bits { | ||
37 | u32 data; | ||
38 | u8 flags; | ||
39 | u8 class; | ||
40 | u8 source; | ||
41 | u8 prio; | ||
42 | }; | ||
43 | |||
44 | enum iic_pending_flags { | ||
45 | IIC_VALID = 0x80, | ||
46 | IIC_IPI = 0x40, | ||
47 | }; | ||
48 | |||
49 | struct iic_regs { | ||
50 | struct iic_pending_bits pending; | ||
51 | struct iic_pending_bits pending_destr; | ||
52 | u64 generate; | ||
53 | u64 prio; | ||
54 | }; | ||
55 | |||
56 | struct iic { | ||
57 | struct iic_regs __iomem *regs; | ||
58 | }; | ||
59 | |||
60 | static DEFINE_PER_CPU(struct iic, iic); | ||
61 | |||
62 | void iic_local_enable(void) | ||
63 | { | ||
64 | out_be64(&__get_cpu_var(iic).regs->prio, 0xff); | ||
65 | } | ||
66 | |||
67 | void iic_local_disable(void) | ||
68 | { | ||
69 | out_be64(&__get_cpu_var(iic).regs->prio, 0x0); | ||
70 | } | ||
71 | |||
72 | static unsigned int iic_startup(unsigned int irq) | ||
73 | { | ||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | static void iic_enable(unsigned int irq) | ||
78 | { | ||
79 | iic_local_enable(); | ||
80 | } | ||
81 | |||
82 | static void iic_disable(unsigned int irq) | ||
83 | { | ||
84 | } | ||
85 | |||
86 | static void iic_end(unsigned int irq) | ||
87 | { | ||
88 | iic_local_enable(); | ||
89 | } | ||
90 | |||
91 | static struct hw_interrupt_type iic_pic = { | ||
92 | .typename = " CELL-IIC ", | ||
93 | .startup = iic_startup, | ||
94 | .enable = iic_enable, | ||
95 | .disable = iic_disable, | ||
96 | .end = iic_end, | ||
97 | }; | ||
98 | |||
99 | static int iic_external_get_irq(struct iic_pending_bits pending) | ||
100 | { | ||
101 | int irq; | ||
102 | unsigned char node, unit; | ||
103 | |||
104 | node = pending.source >> 4; | ||
105 | unit = pending.source & 0xf; | ||
106 | irq = -1; | ||
107 | |||
108 | /* | ||
109 | * This mapping is specific to the Cell Broadband | ||
110 | * Engine. We might need to get the numbers | ||
111 | * from the device tree to support future CPUs. | ||
112 | */ | ||
113 | switch (unit) { | ||
114 | case 0x00: | ||
115 | case 0x0b: | ||
116 | /* | ||
117 | * One of these units can be connected | ||
118 | * to an external interrupt controller. | ||
119 | */ | ||
120 | if (pending.prio > 0x3f || | ||
121 | pending.class != 2) | ||
122 | break; | ||
123 | irq = IIC_EXT_OFFSET | ||
124 | + spider_get_irq(pending.prio + node * IIC_NODE_STRIDE) | ||
125 | + node * IIC_NODE_STRIDE; | ||
126 | break; | ||
127 | case 0x01 ... 0x04: | ||
128 | case 0x07 ... 0x0a: | ||
129 | /* | ||
130 | * These units are connected to the SPEs | ||
131 | */ | ||
132 | if (pending.class > 2) | ||
133 | break; | ||
134 | irq = IIC_SPE_OFFSET | ||
135 | + pending.class * IIC_CLASS_STRIDE | ||
136 | + node * IIC_NODE_STRIDE | ||
137 | + unit; | ||
138 | break; | ||
139 | } | ||
140 | if (irq == -1) | ||
141 | printk(KERN_WARNING "Unexpected interrupt class %02x, " | ||
142 | "source %02x, prio %02x, cpu %02x\n", pending.class, | ||
143 | pending.source, pending.prio, smp_processor_id()); | ||
144 | return irq; | ||
145 | } | ||
146 | |||
147 | /* Get an IRQ number from the pending state register of the IIC */ | ||
148 | int iic_get_irq(struct pt_regs *regs) | ||
149 | { | ||
150 | struct iic *iic; | ||
151 | int irq; | ||
152 | struct iic_pending_bits pending; | ||
153 | |||
154 | iic = &__get_cpu_var(iic); | ||
155 | *(unsigned long *) &pending = | ||
156 | in_be64((unsigned long __iomem *) &iic->regs->pending_destr); | ||
157 | |||
158 | irq = -1; | ||
159 | if (pending.flags & IIC_VALID) { | ||
160 | if (pending.flags & IIC_IPI) { | ||
161 | irq = IIC_IPI_OFFSET + (pending.prio >> 4); | ||
162 | /* | ||
163 | if (irq > 0x80) | ||
164 | printk(KERN_WARNING "Unexpected IPI prio %02x" | ||
165 | "on CPU %02x\n", pending.prio, | ||
166 | smp_processor_id()); | ||
167 | */ | ||
168 | } else { | ||
169 | irq = iic_external_get_irq(pending); | ||
170 | } | ||
171 | } | ||
172 | return irq; | ||
173 | } | ||
174 | |||
175 | static struct iic_regs __iomem *find_iic(int cpu) | ||
176 | { | ||
177 | struct device_node *np; | ||
178 | int nodeid = cpu / 2; | ||
179 | unsigned long regs; | ||
180 | struct iic_regs __iomem *iic_regs; | ||
181 | |||
182 | for (np = of_find_node_by_type(NULL, "cpu"); | ||
183 | np; | ||
184 | np = of_find_node_by_type(np, "cpu")) { | ||
185 | if (nodeid == *(int *)get_property(np, "node-id", NULL)) | ||
186 | break; | ||
187 | } | ||
188 | |||
189 | if (!np) { | ||
190 | printk(KERN_WARNING "IIC: CPU %d not found\n", cpu); | ||
191 | iic_regs = NULL; | ||
192 | } else { | ||
193 | regs = *(long *)get_property(np, "iic", NULL); | ||
194 | |||
195 | /* hack until we have decided on the devtree info */ | ||
196 | regs += 0x400; | ||
197 | if (cpu & 1) | ||
198 | regs += 0x20; | ||
199 | |||
200 | printk(KERN_DEBUG "IIC for CPU %d at %lx\n", cpu, regs); | ||
201 | iic_regs = __ioremap(regs, sizeof(struct iic_regs), | ||
202 | _PAGE_NO_CACHE); | ||
203 | } | ||
204 | return iic_regs; | ||
205 | } | ||
206 | |||
207 | #ifdef CONFIG_SMP | ||
208 | |||
209 | /* Use the highest interrupt priorities for IPI */ | ||
210 | static inline int iic_ipi_to_irq(int ipi) | ||
211 | { | ||
212 | return IIC_IPI_OFFSET + IIC_NUM_IPIS - 1 - ipi; | ||
213 | } | ||
214 | |||
215 | static inline int iic_irq_to_ipi(int irq) | ||
216 | { | ||
217 | return IIC_NUM_IPIS - 1 - (irq - IIC_IPI_OFFSET); | ||
218 | } | ||
219 | |||
220 | void iic_setup_cpu(void) | ||
221 | { | ||
222 | out_be64(&__get_cpu_var(iic).regs->prio, 0xff); | ||
223 | } | ||
224 | |||
225 | void iic_cause_IPI(int cpu, int mesg) | ||
226 | { | ||
227 | out_be64(&per_cpu(iic, cpu).regs->generate, (IIC_NUM_IPIS - 1 - mesg) << 4); | ||
228 | } | ||
229 | |||
230 | static irqreturn_t iic_ipi_action(int irq, void *dev_id, struct pt_regs *regs) | ||
231 | { | ||
232 | smp_message_recv(iic_irq_to_ipi(irq), regs); | ||
233 | return IRQ_HANDLED; | ||
234 | } | ||
235 | |||
236 | static void iic_request_ipi(int ipi, const char *name) | ||
237 | { | ||
238 | int irq; | ||
239 | |||
240 | irq = iic_ipi_to_irq(ipi); | ||
241 | /* IPIs are marked SA_INTERRUPT as they must run with irqs | ||
242 | * disabled */ | ||
243 | get_irq_desc(irq)->handler = &iic_pic; | ||
244 | get_irq_desc(irq)->status |= IRQ_PER_CPU; | ||
245 | request_irq(irq, iic_ipi_action, SA_INTERRUPT, name, NULL); | ||
246 | } | ||
247 | |||
248 | void iic_request_IPIs(void) | ||
249 | { | ||
250 | iic_request_ipi(PPC_MSG_CALL_FUNCTION, "IPI-call"); | ||
251 | iic_request_ipi(PPC_MSG_RESCHEDULE, "IPI-resched"); | ||
252 | #ifdef CONFIG_DEBUGGER | ||
253 | iic_request_ipi(PPC_MSG_DEBUGGER_BREAK, "IPI-debug"); | ||
254 | #endif /* CONFIG_DEBUGGER */ | ||
255 | } | ||
256 | #endif /* CONFIG_SMP */ | ||
257 | |||
258 | static void iic_setup_spe_handlers(void) | ||
259 | { | ||
260 | int be, isrc; | ||
261 | |||
262 | /* Assume two threads per BE are present */ | ||
263 | for (be=0; be < num_present_cpus() / 2; be++) { | ||
264 | for (isrc = 0; isrc < IIC_CLASS_STRIDE * 3; isrc++) { | ||
265 | int irq = IIC_NODE_STRIDE * be + IIC_SPE_OFFSET + isrc; | ||
266 | get_irq_desc(irq)->handler = &iic_pic; | ||
267 | } | ||
268 | } | ||
269 | } | ||
270 | |||
271 | void iic_init_IRQ(void) | ||
272 | { | ||
273 | int cpu, irq_offset; | ||
274 | struct iic *iic; | ||
275 | |||
276 | irq_offset = 0; | ||
277 | for_each_cpu(cpu) { | ||
278 | iic = &per_cpu(iic, cpu); | ||
279 | iic->regs = find_iic(cpu); | ||
280 | if (iic->regs) | ||
281 | out_be64(&iic->regs->prio, 0xff); | ||
282 | } | ||
283 | iic_setup_spe_handlers(); | ||
284 | } | ||
diff --git a/arch/powerpc/platforms/cell/interrupt.h b/arch/powerpc/platforms/cell/interrupt.h new file mode 100644 index 000000000000..37d58e6fd0c6 --- /dev/null +++ b/arch/powerpc/platforms/cell/interrupt.h | |||
@@ -0,0 +1,62 @@ | |||
1 | #ifndef ASM_CELL_PIC_H | ||
2 | #define ASM_CELL_PIC_H | ||
3 | #ifdef __KERNEL__ | ||
4 | /* | ||
5 | * Mapping of IIC pending bits into per-node | ||
6 | * interrupt numbers. | ||
7 | * | ||
8 | * IRQ FF CC SS PP FF CC SS PP Description | ||
9 | * | ||
10 | * 00-3f 80 02 +0 00 - 80 02 +0 3f South Bridge | ||
11 | * 00-3f 80 02 +b 00 - 80 02 +b 3f South Bridge | ||
12 | * 41-4a 80 00 +1 ** - 80 00 +a ** SPU Class 0 | ||
13 | * 51-5a 80 01 +1 ** - 80 01 +a ** SPU Class 1 | ||
14 | * 61-6a 80 02 +1 ** - 80 02 +a ** SPU Class 2 | ||
15 | * 70-7f C0 ** ** 00 - C0 ** ** 0f IPI | ||
16 | * | ||
17 | * F flags | ||
18 | * C class | ||
19 | * S source | ||
20 | * P Priority | ||
21 | * + node number | ||
22 | * * don't care | ||
23 | * | ||
24 | * A node consists of a Cell Broadband Engine and an optional | ||
25 | * south bridge device providing a maximum of 64 IRQs. | ||
26 | * The south bridge may be connected to either IOIF0 | ||
27 | * or IOIF1. | ||
28 | * Each SPE is represented as three IRQ lines, one per | ||
29 | * interrupt class. | ||
30 | * 16 IRQ numbers are reserved for inter processor | ||
31 | * interruptions, although these are only used in the | ||
32 | * range of the first node. | ||
33 | * | ||
34 | * This scheme needs 128 IRQ numbers per BIF node ID, | ||
35 | * which means that with the total of 512 lines | ||
36 | * available, we can have a maximum of four nodes. | ||
37 | */ | ||
38 | |||
39 | enum { | ||
40 | IIC_EXT_OFFSET = 0x00, /* Start of south bridge IRQs */ | ||
41 | IIC_NUM_EXT = 0x40, /* Number of south bridge IRQs */ | ||
42 | IIC_SPE_OFFSET = 0x40, /* Start of SPE interrupts */ | ||
43 | IIC_CLASS_STRIDE = 0x10, /* SPE IRQs per class */ | ||
44 | IIC_IPI_OFFSET = 0x70, /* Start of IPI IRQs */ | ||
45 | IIC_NUM_IPIS = 0x10, /* IRQs reserved for IPI */ | ||
46 | IIC_NODE_STRIDE = 0x80, /* Total IRQs per node */ | ||
47 | }; | ||
48 | |||
49 | extern void iic_init_IRQ(void); | ||
50 | extern int iic_get_irq(struct pt_regs *regs); | ||
51 | extern void iic_cause_IPI(int cpu, int mesg); | ||
52 | extern void iic_request_IPIs(void); | ||
53 | extern void iic_setup_cpu(void); | ||
54 | extern void iic_local_enable(void); | ||
55 | extern void iic_local_disable(void); | ||
56 | |||
57 | |||
58 | extern void spider_init_IRQ(void); | ||
59 | extern int spider_get_irq(unsigned long int_pending); | ||
60 | |||
61 | #endif | ||
62 | #endif /* ASM_CELL_PIC_H */ | ||
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c new file mode 100644 index 000000000000..74f999b4ac9e --- /dev/null +++ b/arch/powerpc/platforms/cell/iommu.c | |||
@@ -0,0 +1,381 @@ | |||
1 | /* | ||
2 | * IOMMU implementation for Cell Broadband Processor Architecture | ||
3 | * We just establish a linear mapping at boot by setting all the | ||
4 | * IOPT cache entries in the CPU. | ||
5 | * The mapping functions should be identical to pci_direct_iommu, | ||
6 | * except for the handling of the high order bit that is required | ||
7 | * by the Spider bridge. These should be split into a separate | ||
8 | * file at the point where we get a different bridge chip. | ||
9 | * | ||
10 | * Copyright (C) 2005 IBM Deutschland Entwicklung GmbH, | ||
11 | * Arnd Bergmann <arndb@de.ibm.com> | ||
12 | * | ||
13 | * Based on linear mapping | ||
14 | * Copyright (C) 2003 Benjamin Herrenschmidt (benh@kernel.crashing.org) | ||
15 | * | ||
16 | * This program is free software; you can redistribute it and/or | ||
17 | * modify it under the terms of the GNU General Public License | ||
18 | * as published by the Free Software Foundation; either version | ||
19 | * 2 of the License, or (at your option) any later version. | ||
20 | */ | ||
21 | |||
22 | #undef DEBUG | ||
23 | |||
24 | #include <linux/kernel.h> | ||
25 | #include <linux/pci.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/string.h> | ||
28 | #include <linux/init.h> | ||
29 | #include <linux/bootmem.h> | ||
30 | #include <linux/mm.h> | ||
31 | #include <linux/dma-mapping.h> | ||
32 | |||
33 | #include <asm/sections.h> | ||
34 | #include <asm/iommu.h> | ||
35 | #include <asm/io.h> | ||
36 | #include <asm/prom.h> | ||
37 | #include <asm/pci-bridge.h> | ||
38 | #include <asm/machdep.h> | ||
39 | #include <asm/pmac_feature.h> | ||
40 | #include <asm/abs_addr.h> | ||
41 | #include <asm/system.h> | ||
42 | #include <asm/ppc-pci.h> | ||
43 | |||
44 | #include "iommu.h" | ||
45 | |||
46 | static inline unsigned long | ||
47 | get_iopt_entry(unsigned long real_address, unsigned long ioid, | ||
48 | unsigned long prot) | ||
49 | { | ||
50 | return (prot & IOPT_PROT_MASK) | ||
51 | | (IOPT_COHERENT) | ||
52 | | (IOPT_ORDER_VC) | ||
53 | | (real_address & IOPT_RPN_MASK) | ||
54 | | (ioid & IOPT_IOID_MASK); | ||
55 | } | ||
56 | |||
57 | typedef struct { | ||
58 | unsigned long val; | ||
59 | } ioste; | ||
60 | |||
61 | static inline ioste | ||
62 | mk_ioste(unsigned long val) | ||
63 | { | ||
64 | ioste ioste = { .val = val, }; | ||
65 | return ioste; | ||
66 | } | ||
67 | |||
68 | static inline ioste | ||
69 | get_iost_entry(unsigned long iopt_base, unsigned long io_address, unsigned page_size) | ||
70 | { | ||
71 | unsigned long ps; | ||
72 | unsigned long iostep; | ||
73 | unsigned long nnpt; | ||
74 | unsigned long shift; | ||
75 | |||
76 | switch (page_size) { | ||
77 | case 0x1000000: | ||
78 | ps = IOST_PS_16M; | ||
79 | nnpt = 0; /* one page per segment */ | ||
80 | shift = 5; /* segment has 16 iopt entries */ | ||
81 | break; | ||
82 | |||
83 | case 0x100000: | ||
84 | ps = IOST_PS_1M; | ||
85 | nnpt = 0; /* one page per segment */ | ||
86 | shift = 1; /* segment has 256 iopt entries */ | ||
87 | break; | ||
88 | |||
89 | case 0x10000: | ||
90 | ps = IOST_PS_64K; | ||
91 | nnpt = 0x07; /* 8 pages per io page table */ | ||
92 | shift = 0; /* all entries are used */ | ||
93 | break; | ||
94 | |||
95 | case 0x1000: | ||
96 | ps = IOST_PS_4K; | ||
97 | nnpt = 0x7f; /* 128 pages per io page table */ | ||
98 | shift = 0; /* all entries are used */ | ||
99 | break; | ||
100 | |||
101 | default: /* not a known compile time constant */ | ||
102 | { | ||
103 | /* BUILD_BUG_ON() is not usable here */ | ||
104 | extern void __get_iost_entry_bad_page_size(void); | ||
105 | __get_iost_entry_bad_page_size(); | ||
106 | } | ||
107 | break; | ||
108 | } | ||
109 | |||
110 | iostep = iopt_base + | ||
111 | /* need 8 bytes per iopte */ | ||
112 | (((io_address / page_size * 8) | ||
113 | /* align io page tables on 4k page boundaries */ | ||
114 | << shift) | ||
115 | /* nnpt+1 pages go into each iopt */ | ||
116 | & ~(nnpt << 12)); | ||
117 | |||
118 | nnpt++; /* this seems to work, but the documentation is not clear | ||
119 | about wether we put nnpt or nnpt-1 into the ioste bits. | ||
120 | In theory, this can't work for 4k pages. */ | ||
121 | return mk_ioste(IOST_VALID_MASK | ||
122 | | (iostep & IOST_PT_BASE_MASK) | ||
123 | | ((nnpt << 5) & IOST_NNPT_MASK) | ||
124 | | (ps & IOST_PS_MASK)); | ||
125 | } | ||
126 | |||
127 | /* compute the address of an io pte */ | ||
128 | static inline unsigned long | ||
129 | get_ioptep(ioste iost_entry, unsigned long io_address) | ||
130 | { | ||
131 | unsigned long iopt_base; | ||
132 | unsigned long page_size; | ||
133 | unsigned long page_number; | ||
134 | unsigned long iopt_offset; | ||
135 | |||
136 | iopt_base = iost_entry.val & IOST_PT_BASE_MASK; | ||
137 | page_size = iost_entry.val & IOST_PS_MASK; | ||
138 | |||
139 | /* decode page size to compute page number */ | ||
140 | page_number = (io_address & 0x0fffffff) >> (10 + 2 * page_size); | ||
141 | /* page number is an offset into the io page table */ | ||
142 | iopt_offset = (page_number << 3) & 0x7fff8ul; | ||
143 | return iopt_base + iopt_offset; | ||
144 | } | ||
145 | |||
146 | /* compute the tag field of the iopt cache entry */ | ||
147 | static inline unsigned long | ||
148 | get_ioc_tag(ioste iost_entry, unsigned long io_address) | ||
149 | { | ||
150 | unsigned long iopte = get_ioptep(iost_entry, io_address); | ||
151 | |||
152 | return IOPT_VALID_MASK | ||
153 | | ((iopte & 0x00000000000000ff8ul) >> 3) | ||
154 | | ((iopte & 0x0000003fffffc0000ul) >> 9); | ||
155 | } | ||
156 | |||
157 | /* compute the hashed 6 bit index for the 4-way associative pte cache */ | ||
158 | static inline unsigned long | ||
159 | get_ioc_hash(ioste iost_entry, unsigned long io_address) | ||
160 | { | ||
161 | unsigned long iopte = get_ioptep(iost_entry, io_address); | ||
162 | |||
163 | return ((iopte & 0x000000000000001f8ul) >> 3) | ||
164 | ^ ((iopte & 0x00000000000020000ul) >> 17) | ||
165 | ^ ((iopte & 0x00000000000010000ul) >> 15) | ||
166 | ^ ((iopte & 0x00000000000008000ul) >> 13) | ||
167 | ^ ((iopte & 0x00000000000004000ul) >> 11) | ||
168 | ^ ((iopte & 0x00000000000002000ul) >> 9) | ||
169 | ^ ((iopte & 0x00000000000001000ul) >> 7); | ||
170 | } | ||
171 | |||
172 | /* same as above, but pretend that we have a simpler 1-way associative | ||
173 | pte cache with an 8 bit index */ | ||
174 | static inline unsigned long | ||
175 | get_ioc_hash_1way(ioste iost_entry, unsigned long io_address) | ||
176 | { | ||
177 | unsigned long iopte = get_ioptep(iost_entry, io_address); | ||
178 | |||
179 | return ((iopte & 0x000000000000001f8ul) >> 3) | ||
180 | ^ ((iopte & 0x00000000000020000ul) >> 17) | ||
181 | ^ ((iopte & 0x00000000000010000ul) >> 15) | ||
182 | ^ ((iopte & 0x00000000000008000ul) >> 13) | ||
183 | ^ ((iopte & 0x00000000000004000ul) >> 11) | ||
184 | ^ ((iopte & 0x00000000000002000ul) >> 9) | ||
185 | ^ ((iopte & 0x00000000000001000ul) >> 7) | ||
186 | ^ ((iopte & 0x0000000000000c000ul) >> 8); | ||
187 | } | ||
188 | |||
189 | static inline ioste | ||
190 | get_iost_cache(void __iomem *base, unsigned long index) | ||
191 | { | ||
192 | unsigned long __iomem *p = (base + IOC_ST_CACHE_DIR); | ||
193 | return mk_ioste(in_be64(&p[index])); | ||
194 | } | ||
195 | |||
196 | static inline void | ||
197 | set_iost_cache(void __iomem *base, unsigned long index, ioste ste) | ||
198 | { | ||
199 | unsigned long __iomem *p = (base + IOC_ST_CACHE_DIR); | ||
200 | pr_debug("ioste %02lx was %016lx, store %016lx", index, | ||
201 | get_iost_cache(base, index).val, ste.val); | ||
202 | out_be64(&p[index], ste.val); | ||
203 | pr_debug(" now %016lx\n", get_iost_cache(base, index).val); | ||
204 | } | ||
205 | |||
206 | static inline unsigned long | ||
207 | get_iopt_cache(void __iomem *base, unsigned long index, unsigned long *tag) | ||
208 | { | ||
209 | unsigned long __iomem *tags = (void *)(base + IOC_PT_CACHE_DIR); | ||
210 | unsigned long __iomem *p = (void *)(base + IOC_PT_CACHE_REG); | ||
211 | |||
212 | *tag = tags[index]; | ||
213 | rmb(); | ||
214 | return *p; | ||
215 | } | ||
216 | |||
217 | static inline void | ||
218 | set_iopt_cache(void __iomem *base, unsigned long index, | ||
219 | unsigned long tag, unsigned long val) | ||
220 | { | ||
221 | unsigned long __iomem *tags = base + IOC_PT_CACHE_DIR; | ||
222 | unsigned long __iomem *p = base + IOC_PT_CACHE_REG; | ||
223 | pr_debug("iopt %02lx was v%016lx/t%016lx, store v%016lx/t%016lx\n", | ||
224 | index, get_iopt_cache(base, index, &oldtag), oldtag, val, tag); | ||
225 | |||
226 | out_be64(p, val); | ||
227 | out_be64(&tags[index], tag); | ||
228 | } | ||
229 | |||
230 | static inline void | ||
231 | set_iost_origin(void __iomem *base) | ||
232 | { | ||
233 | unsigned long __iomem *p = base + IOC_ST_ORIGIN; | ||
234 | unsigned long origin = IOSTO_ENABLE | IOSTO_SW; | ||
235 | |||
236 | pr_debug("iost_origin %016lx, now %016lx\n", in_be64(p), origin); | ||
237 | out_be64(p, origin); | ||
238 | } | ||
239 | |||
240 | static inline void | ||
241 | set_iocmd_config(void __iomem *base) | ||
242 | { | ||
243 | unsigned long __iomem *p = base + 0xc00; | ||
244 | unsigned long conf; | ||
245 | |||
246 | conf = in_be64(p); | ||
247 | pr_debug("iost_conf %016lx, now %016lx\n", conf, conf | IOCMD_CONF_TE); | ||
248 | out_be64(p, conf | IOCMD_CONF_TE); | ||
249 | } | ||
250 | |||
251 | /* FIXME: get these from the device tree */ | ||
252 | #define ioc_base 0x20000511000ull | ||
253 | #define ioc_mmio_base 0x20000510000ull | ||
254 | #define ioid 0x48a | ||
255 | #define iopt_phys_offset (- 0x20000000) /* We have a 512MB offset from the SB */ | ||
256 | #define io_page_size 0x1000000 | ||
257 | |||
258 | static unsigned long map_iopt_entry(unsigned long address) | ||
259 | { | ||
260 | switch (address >> 20) { | ||
261 | case 0x600: | ||
262 | address = 0x24020000000ull; /* spider i/o */ | ||
263 | break; | ||
264 | default: | ||
265 | address += iopt_phys_offset; | ||
266 | break; | ||
267 | } | ||
268 | |||
269 | return get_iopt_entry(address, ioid, IOPT_PROT_RW); | ||
270 | } | ||
271 | |||
272 | static void iommu_bus_setup_null(struct pci_bus *b) { } | ||
273 | static void iommu_dev_setup_null(struct pci_dev *d) { } | ||
274 | |||
275 | /* initialize the iommu to support a simple linear mapping | ||
276 | * for each DMA window used by any device. For now, we | ||
277 | * happen to know that there is only one DMA window in use, | ||
278 | * starting at iopt_phys_offset. */ | ||
279 | static void cell_map_iommu(void) | ||
280 | { | ||
281 | unsigned long address; | ||
282 | void __iomem *base; | ||
283 | ioste ioste; | ||
284 | unsigned long index; | ||
285 | |||
286 | base = __ioremap(ioc_base, 0x1000, _PAGE_NO_CACHE); | ||
287 | pr_debug("%lx mapped to %p\n", ioc_base, base); | ||
288 | set_iocmd_config(base); | ||
289 | iounmap(base); | ||
290 | |||
291 | base = __ioremap(ioc_mmio_base, 0x1000, _PAGE_NO_CACHE); | ||
292 | pr_debug("%lx mapped to %p\n", ioc_mmio_base, base); | ||
293 | |||
294 | set_iost_origin(base); | ||
295 | |||
296 | for (address = 0; address < 0x100000000ul; address += io_page_size) { | ||
297 | ioste = get_iost_entry(0x10000000000ul, address, io_page_size); | ||
298 | if ((address & 0xfffffff) == 0) /* segment start */ | ||
299 | set_iost_cache(base, address >> 28, ioste); | ||
300 | index = get_ioc_hash_1way(ioste, address); | ||
301 | pr_debug("addr %08lx, index %02lx, ioste %016lx\n", | ||
302 | address, index, ioste.val); | ||
303 | set_iopt_cache(base, | ||
304 | get_ioc_hash_1way(ioste, address), | ||
305 | get_ioc_tag(ioste, address), | ||
306 | map_iopt_entry(address)); | ||
307 | } | ||
308 | iounmap(base); | ||
309 | } | ||
310 | |||
311 | |||
312 | static void *cell_alloc_coherent(struct device *hwdev, size_t size, | ||
313 | dma_addr_t *dma_handle, gfp_t flag) | ||
314 | { | ||
315 | void *ret; | ||
316 | |||
317 | ret = (void *)__get_free_pages(flag, get_order(size)); | ||
318 | if (ret != NULL) { | ||
319 | memset(ret, 0, size); | ||
320 | *dma_handle = virt_to_abs(ret) | CELL_DMA_VALID; | ||
321 | } | ||
322 | return ret; | ||
323 | } | ||
324 | |||
325 | static void cell_free_coherent(struct device *hwdev, size_t size, | ||
326 | void *vaddr, dma_addr_t dma_handle) | ||
327 | { | ||
328 | free_pages((unsigned long)vaddr, get_order(size)); | ||
329 | } | ||
330 | |||
331 | static dma_addr_t cell_map_single(struct device *hwdev, void *ptr, | ||
332 | size_t size, enum dma_data_direction direction) | ||
333 | { | ||
334 | return virt_to_abs(ptr) | CELL_DMA_VALID; | ||
335 | } | ||
336 | |||
337 | static void cell_unmap_single(struct device *hwdev, dma_addr_t dma_addr, | ||
338 | size_t size, enum dma_data_direction direction) | ||
339 | { | ||
340 | } | ||
341 | |||
342 | static int cell_map_sg(struct device *hwdev, struct scatterlist *sg, | ||
343 | int nents, enum dma_data_direction direction) | ||
344 | { | ||
345 | int i; | ||
346 | |||
347 | for (i = 0; i < nents; i++, sg++) { | ||
348 | sg->dma_address = (page_to_phys(sg->page) + sg->offset) | ||
349 | | CELL_DMA_VALID; | ||
350 | sg->dma_length = sg->length; | ||
351 | } | ||
352 | |||
353 | return nents; | ||
354 | } | ||
355 | |||
356 | static void cell_unmap_sg(struct device *hwdev, struct scatterlist *sg, | ||
357 | int nents, enum dma_data_direction direction) | ||
358 | { | ||
359 | } | ||
360 | |||
361 | static int cell_dma_supported(struct device *dev, u64 mask) | ||
362 | { | ||
363 | return mask < 0x100000000ull; | ||
364 | } | ||
365 | |||
366 | void cell_init_iommu(void) | ||
367 | { | ||
368 | cell_map_iommu(); | ||
369 | |||
370 | /* Direct I/O, IOMMU off */ | ||
371 | ppc_md.iommu_dev_setup = iommu_dev_setup_null; | ||
372 | ppc_md.iommu_bus_setup = iommu_bus_setup_null; | ||
373 | |||
374 | pci_dma_ops.alloc_coherent = cell_alloc_coherent; | ||
375 | pci_dma_ops.free_coherent = cell_free_coherent; | ||
376 | pci_dma_ops.map_single = cell_map_single; | ||
377 | pci_dma_ops.unmap_single = cell_unmap_single; | ||
378 | pci_dma_ops.map_sg = cell_map_sg; | ||
379 | pci_dma_ops.unmap_sg = cell_unmap_sg; | ||
380 | pci_dma_ops.dma_supported = cell_dma_supported; | ||
381 | } | ||
diff --git a/arch/powerpc/platforms/cell/iommu.h b/arch/powerpc/platforms/cell/iommu.h new file mode 100644 index 000000000000..490d77abfe85 --- /dev/null +++ b/arch/powerpc/platforms/cell/iommu.h | |||
@@ -0,0 +1,65 @@ | |||
1 | #ifndef CELL_IOMMU_H | ||
2 | #define CELL_IOMMU_H | ||
3 | |||
4 | /* some constants */ | ||
5 | enum { | ||
6 | /* segment table entries */ | ||
7 | IOST_VALID_MASK = 0x8000000000000000ul, | ||
8 | IOST_TAG_MASK = 0x3000000000000000ul, | ||
9 | IOST_PT_BASE_MASK = 0x000003fffffff000ul, | ||
10 | IOST_NNPT_MASK = 0x0000000000000fe0ul, | ||
11 | IOST_PS_MASK = 0x000000000000000ful, | ||
12 | |||
13 | IOST_PS_4K = 0x1, | ||
14 | IOST_PS_64K = 0x3, | ||
15 | IOST_PS_1M = 0x5, | ||
16 | IOST_PS_16M = 0x7, | ||
17 | |||
18 | /* iopt tag register */ | ||
19 | IOPT_VALID_MASK = 0x0000000200000000ul, | ||
20 | IOPT_TAG_MASK = 0x00000001fffffffful, | ||
21 | |||
22 | /* iopt cache register */ | ||
23 | IOPT_PROT_MASK = 0xc000000000000000ul, | ||
24 | IOPT_PROT_NONE = 0x0000000000000000ul, | ||
25 | IOPT_PROT_READ = 0x4000000000000000ul, | ||
26 | IOPT_PROT_WRITE = 0x8000000000000000ul, | ||
27 | IOPT_PROT_RW = 0xc000000000000000ul, | ||
28 | IOPT_COHERENT = 0x2000000000000000ul, | ||
29 | |||
30 | IOPT_ORDER_MASK = 0x1800000000000000ul, | ||
31 | /* order access to same IOID/VC on same address */ | ||
32 | IOPT_ORDER_ADDR = 0x0800000000000000ul, | ||
33 | /* similar, but only after a write access */ | ||
34 | IOPT_ORDER_WRITES = 0x1000000000000000ul, | ||
35 | /* Order all accesses to same IOID/VC */ | ||
36 | IOPT_ORDER_VC = 0x1800000000000000ul, | ||
37 | |||
38 | IOPT_RPN_MASK = 0x000003fffffff000ul, | ||
39 | IOPT_HINT_MASK = 0x0000000000000800ul, | ||
40 | IOPT_IOID_MASK = 0x00000000000007fful, | ||
41 | |||
42 | IOSTO_ENABLE = 0x8000000000000000ul, | ||
43 | IOSTO_ORIGIN = 0x000003fffffff000ul, | ||
44 | IOSTO_HW = 0x0000000000000800ul, | ||
45 | IOSTO_SW = 0x0000000000000400ul, | ||
46 | |||
47 | IOCMD_CONF_TE = 0x0000800000000000ul, | ||
48 | |||
49 | /* memory mapped registers */ | ||
50 | IOC_PT_CACHE_DIR = 0x000, | ||
51 | IOC_ST_CACHE_DIR = 0x800, | ||
52 | IOC_PT_CACHE_REG = 0x910, | ||
53 | IOC_ST_ORIGIN = 0x918, | ||
54 | IOC_CONF = 0x930, | ||
55 | |||
56 | /* The high bit needs to be set on every DMA address, | ||
57 | only 2GB are addressable */ | ||
58 | CELL_DMA_VALID = 0x80000000, | ||
59 | CELL_DMA_MASK = 0x7fffffff, | ||
60 | }; | ||
61 | |||
62 | |||
63 | void cell_init_iommu(void); | ||
64 | |||
65 | #endif | ||
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c new file mode 100644 index 000000000000..9a495634d0c2 --- /dev/null +++ b/arch/powerpc/platforms/cell/setup.c | |||
@@ -0,0 +1,141 @@ | |||
1 | /* | ||
2 | * linux/arch/powerpc/platforms/cell/cell_setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | ||
5 | * Adapted from 'alpha' version by Gary Thomas | ||
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | ||
7 | * Modified by PPC64 Team, IBM Corp | ||
8 | * Modified by Cell Team, IBM Deutschland Entwicklung GmbH | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License | ||
12 | * as published by the Free Software Foundation; either version | ||
13 | * 2 of the License, or (at your option) any later version. | ||
14 | */ | ||
15 | #undef DEBUG | ||
16 | |||
17 | #include <linux/config.h> | ||
18 | #include <linux/sched.h> | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/mm.h> | ||
21 | #include <linux/stddef.h> | ||
22 | #include <linux/unistd.h> | ||
23 | #include <linux/slab.h> | ||
24 | #include <linux/user.h> | ||
25 | #include <linux/reboot.h> | ||
26 | #include <linux/init.h> | ||
27 | #include <linux/delay.h> | ||
28 | #include <linux/irq.h> | ||
29 | #include <linux/seq_file.h> | ||
30 | #include <linux/root_dev.h> | ||
31 | #include <linux/console.h> | ||
32 | |||
33 | #include <asm/mmu.h> | ||
34 | #include <asm/processor.h> | ||
35 | #include <asm/io.h> | ||
36 | #include <asm/pgtable.h> | ||
37 | #include <asm/prom.h> | ||
38 | #include <asm/rtas.h> | ||
39 | #include <asm/pci-bridge.h> | ||
40 | #include <asm/iommu.h> | ||
41 | #include <asm/dma.h> | ||
42 | #include <asm/machdep.h> | ||
43 | #include <asm/time.h> | ||
44 | #include <asm/nvram.h> | ||
45 | #include <asm/cputable.h> | ||
46 | #include <asm/ppc-pci.h> | ||
47 | #include <asm/irq.h> | ||
48 | |||
49 | #include "interrupt.h" | ||
50 | #include "iommu.h" | ||
51 | |||
52 | #ifdef DEBUG | ||
53 | #define DBG(fmt...) udbg_printf(fmt) | ||
54 | #else | ||
55 | #define DBG(fmt...) | ||
56 | #endif | ||
57 | |||
58 | void cell_show_cpuinfo(struct seq_file *m) | ||
59 | { | ||
60 | struct device_node *root; | ||
61 | const char *model = ""; | ||
62 | |||
63 | root = of_find_node_by_path("/"); | ||
64 | if (root) | ||
65 | model = get_property(root, "model", NULL); | ||
66 | seq_printf(m, "machine\t\t: CHRP %s\n", model); | ||
67 | of_node_put(root); | ||
68 | } | ||
69 | |||
70 | static void cell_progress(char *s, unsigned short hex) | ||
71 | { | ||
72 | printk("*** %04x : %s\n", hex, s ? s : ""); | ||
73 | } | ||
74 | |||
75 | static void __init cell_setup_arch(void) | ||
76 | { | ||
77 | ppc_md.init_IRQ = iic_init_IRQ; | ||
78 | ppc_md.get_irq = iic_get_irq; | ||
79 | |||
80 | #ifdef CONFIG_SMP | ||
81 | smp_init_cell(); | ||
82 | #endif | ||
83 | |||
84 | /* init to some ~sane value until calibrate_delay() runs */ | ||
85 | loops_per_jiffy = 50000000; | ||
86 | |||
87 | if (ROOT_DEV == 0) { | ||
88 | printk("No ramdisk, default root is /dev/hda2\n"); | ||
89 | ROOT_DEV = Root_HDA2; | ||
90 | } | ||
91 | |||
92 | /* Find and initialize PCI host bridges */ | ||
93 | init_pci_config_tokens(); | ||
94 | find_and_init_phbs(); | ||
95 | spider_init_IRQ(); | ||
96 | #ifdef CONFIG_DUMMY_CONSOLE | ||
97 | conswitchp = &dummy_con; | ||
98 | #endif | ||
99 | |||
100 | mmio_nvram_init(); | ||
101 | } | ||
102 | |||
103 | /* | ||
104 | * Early initialization. Relocation is on but do not reference unbolted pages | ||
105 | */ | ||
106 | static void __init cell_init_early(void) | ||
107 | { | ||
108 | DBG(" -> cell_init_early()\n"); | ||
109 | |||
110 | hpte_init_native(); | ||
111 | |||
112 | cell_init_iommu(); | ||
113 | |||
114 | ppc64_interrupt_controller = IC_CELL_PIC; | ||
115 | |||
116 | DBG(" <- cell_init_early()\n"); | ||
117 | } | ||
118 | |||
119 | |||
120 | static int __init cell_probe(int platform) | ||
121 | { | ||
122 | if (platform != PLATFORM_CELL) | ||
123 | return 0; | ||
124 | |||
125 | return 1; | ||
126 | } | ||
127 | |||
128 | struct machdep_calls __initdata cell_md = { | ||
129 | .probe = cell_probe, | ||
130 | .setup_arch = cell_setup_arch, | ||
131 | .init_early = cell_init_early, | ||
132 | .show_cpuinfo = cell_show_cpuinfo, | ||
133 | .restart = rtas_restart, | ||
134 | .power_off = rtas_power_off, | ||
135 | .halt = rtas_halt, | ||
136 | .get_boot_time = rtas_get_boot_time, | ||
137 | .get_rtc_time = rtas_get_rtc_time, | ||
138 | .set_rtc_time = rtas_set_rtc_time, | ||
139 | .calibrate_decr = generic_calibrate_decr, | ||
140 | .progress = cell_progress, | ||
141 | }; | ||
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c new file mode 100644 index 000000000000..de96eadf419d --- /dev/null +++ b/arch/powerpc/platforms/cell/smp.c | |||
@@ -0,0 +1,230 @@ | |||
1 | /* | ||
2 | * SMP support for BPA machines. | ||
3 | * | ||
4 | * Dave Engebretsen, Peter Bergner, and | ||
5 | * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com | ||
6 | * | ||
7 | * Plus various changes from other IBM teams... | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version | ||
12 | * 2 of the License, or (at your option) any later version. | ||
13 | */ | ||
14 | |||
15 | #undef DEBUG | ||
16 | |||
17 | #include <linux/config.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/module.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/smp.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/delay.h> | ||
24 | #include <linux/init.h> | ||
25 | #include <linux/spinlock.h> | ||
26 | #include <linux/cache.h> | ||
27 | #include <linux/err.h> | ||
28 | #include <linux/sysdev.h> | ||
29 | #include <linux/cpu.h> | ||
30 | |||
31 | #include <asm/ptrace.h> | ||
32 | #include <asm/atomic.h> | ||
33 | #include <asm/irq.h> | ||
34 | #include <asm/page.h> | ||
35 | #include <asm/pgtable.h> | ||
36 | #include <asm/io.h> | ||
37 | #include <asm/prom.h> | ||
38 | #include <asm/smp.h> | ||
39 | #include <asm/paca.h> | ||
40 | #include <asm/time.h> | ||
41 | #include <asm/machdep.h> | ||
42 | #include <asm/cputable.h> | ||
43 | #include <asm/firmware.h> | ||
44 | #include <asm/system.h> | ||
45 | #include <asm/rtas.h> | ||
46 | |||
47 | #include "interrupt.h" | ||
48 | |||
49 | #ifdef DEBUG | ||
50 | #define DBG(fmt...) udbg_printf(fmt) | ||
51 | #else | ||
52 | #define DBG(fmt...) | ||
53 | #endif | ||
54 | |||
55 | /* | ||
56 | * The primary thread of each non-boot processor is recorded here before | ||
57 | * smp init. | ||
58 | */ | ||
59 | static cpumask_t of_spin_map; | ||
60 | |||
61 | extern void pSeries_secondary_smp_init(unsigned long); | ||
62 | |||
63 | /** | ||
64 | * smp_startup_cpu() - start the given cpu | ||
65 | * | ||
66 | * At boot time, there is nothing to do for primary threads which were | ||
67 | * started from Open Firmware. For anything else, call RTAS with the | ||
68 | * appropriate start location. | ||
69 | * | ||
70 | * Returns: | ||
71 | * 0 - failure | ||
72 | * 1 - success | ||
73 | */ | ||
74 | static inline int __devinit smp_startup_cpu(unsigned int lcpu) | ||
75 | { | ||
76 | int status; | ||
77 | unsigned long start_here = __pa((u32)*((unsigned long *) | ||
78 | pSeries_secondary_smp_init)); | ||
79 | unsigned int pcpu; | ||
80 | int start_cpu; | ||
81 | |||
82 | if (cpu_isset(lcpu, of_spin_map)) | ||
83 | /* Already started by OF and sitting in spin loop */ | ||
84 | return 1; | ||
85 | |||
86 | pcpu = get_hard_smp_processor_id(lcpu); | ||
87 | |||
88 | /* Fixup atomic count: it exited inside IRQ handler. */ | ||
89 | paca[lcpu].__current->thread_info->preempt_count = 0; | ||
90 | |||
91 | /* | ||
92 | * If the RTAS start-cpu token does not exist then presume the | ||
93 | * cpu is already spinning. | ||
94 | */ | ||
95 | start_cpu = rtas_token("start-cpu"); | ||
96 | if (start_cpu == RTAS_UNKNOWN_SERVICE) | ||
97 | return 1; | ||
98 | |||
99 | status = rtas_call(start_cpu, 3, 1, NULL, pcpu, start_here, lcpu); | ||
100 | if (status != 0) { | ||
101 | printk(KERN_ERR "start-cpu failed: %i\n", status); | ||
102 | return 0; | ||
103 | } | ||
104 | |||
105 | return 1; | ||
106 | } | ||
107 | |||
108 | static void smp_iic_message_pass(int target, int msg) | ||
109 | { | ||
110 | unsigned int i; | ||
111 | |||
112 | if (target < NR_CPUS) { | ||
113 | iic_cause_IPI(target, msg); | ||
114 | } else { | ||
115 | for_each_online_cpu(i) { | ||
116 | if (target == MSG_ALL_BUT_SELF | ||
117 | && i == smp_processor_id()) | ||
118 | continue; | ||
119 | iic_cause_IPI(i, msg); | ||
120 | } | ||
121 | } | ||
122 | } | ||
123 | |||
124 | static int __init smp_iic_probe(void) | ||
125 | { | ||
126 | iic_request_IPIs(); | ||
127 | |||
128 | return cpus_weight(cpu_possible_map); | ||
129 | } | ||
130 | |||
131 | static void __devinit smp_iic_setup_cpu(int cpu) | ||
132 | { | ||
133 | if (cpu != boot_cpuid) | ||
134 | iic_setup_cpu(); | ||
135 | } | ||
136 | |||
137 | static DEFINE_SPINLOCK(timebase_lock); | ||
138 | static unsigned long timebase = 0; | ||
139 | |||
140 | static void __devinit cell_give_timebase(void) | ||
141 | { | ||
142 | spin_lock(&timebase_lock); | ||
143 | rtas_call(rtas_token("freeze-time-base"), 0, 1, NULL); | ||
144 | timebase = get_tb(); | ||
145 | spin_unlock(&timebase_lock); | ||
146 | |||
147 | while (timebase) | ||
148 | barrier(); | ||
149 | rtas_call(rtas_token("thaw-time-base"), 0, 1, NULL); | ||
150 | } | ||
151 | |||
152 | static void __devinit cell_take_timebase(void) | ||
153 | { | ||
154 | while (!timebase) | ||
155 | barrier(); | ||
156 | spin_lock(&timebase_lock); | ||
157 | set_tb(timebase >> 32, timebase & 0xffffffff); | ||
158 | timebase = 0; | ||
159 | spin_unlock(&timebase_lock); | ||
160 | } | ||
161 | |||
162 | static void __devinit smp_cell_kick_cpu(int nr) | ||
163 | { | ||
164 | BUG_ON(nr < 0 || nr >= NR_CPUS); | ||
165 | |||
166 | if (!smp_startup_cpu(nr)) | ||
167 | return; | ||
168 | |||
169 | /* | ||
170 | * The processor is currently spinning, waiting for the | ||
171 | * cpu_start field to become non-zero After we set cpu_start, | ||
172 | * the processor will continue on to secondary_start | ||
173 | */ | ||
174 | paca[nr].cpu_start = 1; | ||
175 | } | ||
176 | |||
177 | static int smp_cell_cpu_bootable(unsigned int nr) | ||
178 | { | ||
179 | /* Special case - we inhibit secondary thread startup | ||
180 | * during boot if the user requests it. Odd-numbered | ||
181 | * cpus are assumed to be secondary threads. | ||
182 | */ | ||
183 | if (system_state < SYSTEM_RUNNING && | ||
184 | cpu_has_feature(CPU_FTR_SMT) && | ||
185 | !smt_enabled_at_boot && nr % 2 != 0) | ||
186 | return 0; | ||
187 | |||
188 | return 1; | ||
189 | } | ||
190 | static struct smp_ops_t bpa_iic_smp_ops = { | ||
191 | .message_pass = smp_iic_message_pass, | ||
192 | .probe = smp_iic_probe, | ||
193 | .kick_cpu = smp_cell_kick_cpu, | ||
194 | .setup_cpu = smp_iic_setup_cpu, | ||
195 | .cpu_bootable = smp_cell_cpu_bootable, | ||
196 | }; | ||
197 | |||
198 | /* This is called very early */ | ||
199 | void __init smp_init_cell(void) | ||
200 | { | ||
201 | int i; | ||
202 | |||
203 | DBG(" -> smp_init_cell()\n"); | ||
204 | |||
205 | smp_ops = &bpa_iic_smp_ops; | ||
206 | |||
207 | /* Mark threads which are still spinning in hold loops. */ | ||
208 | if (cpu_has_feature(CPU_FTR_SMT)) { | ||
209 | for_each_present_cpu(i) { | ||
210 | if (i % 2 == 0) | ||
211 | /* | ||
212 | * Even-numbered logical cpus correspond to | ||
213 | * primary threads. | ||
214 | */ | ||
215 | cpu_set(i, of_spin_map); | ||
216 | } | ||
217 | } else { | ||
218 | of_spin_map = cpu_present_map; | ||
219 | } | ||
220 | |||
221 | cpu_clear(boot_cpuid, of_spin_map); | ||
222 | |||
223 | /* Non-lpar has additional take/give timebase */ | ||
224 | if (rtas_token("freeze-time-base") != RTAS_UNKNOWN_SERVICE) { | ||
225 | smp_ops->give_timebase = cell_give_timebase; | ||
226 | smp_ops->take_timebase = cell_take_timebase; | ||
227 | } | ||
228 | |||
229 | DBG(" <- smp_init_cell()\n"); | ||
230 | } | ||
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c new file mode 100644 index 000000000000..e74132188bdf --- /dev/null +++ b/arch/powerpc/platforms/cell/spider-pic.c | |||
@@ -0,0 +1,191 @@ | |||
1 | /* | ||
2 | * External Interrupt Controller on Spider South Bridge | ||
3 | * | ||
4 | * (C) Copyright IBM Deutschland Entwicklung GmbH 2005 | ||
5 | * | ||
6 | * Author: Arnd Bergmann <arndb@de.ibm.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2, or (at your option) | ||
11 | * any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | */ | ||
22 | |||
23 | #include <linux/interrupt.h> | ||
24 | #include <linux/irq.h> | ||
25 | |||
26 | #include <asm/pgtable.h> | ||
27 | #include <asm/prom.h> | ||
28 | #include <asm/io.h> | ||
29 | |||
30 | #include "interrupt.h" | ||
31 | |||
32 | /* register layout taken from Spider spec, table 7.4-4 */ | ||
33 | enum { | ||
34 | TIR_DEN = 0x004, /* Detection Enable Register */ | ||
35 | TIR_MSK = 0x084, /* Mask Level Register */ | ||
36 | TIR_EDC = 0x0c0, /* Edge Detection Clear Register */ | ||
37 | TIR_PNDA = 0x100, /* Pending Register A */ | ||
38 | TIR_PNDB = 0x104, /* Pending Register B */ | ||
39 | TIR_CS = 0x144, /* Current Status Register */ | ||
40 | TIR_LCSA = 0x150, /* Level Current Status Register A */ | ||
41 | TIR_LCSB = 0x154, /* Level Current Status Register B */ | ||
42 | TIR_LCSC = 0x158, /* Level Current Status Register C */ | ||
43 | TIR_LCSD = 0x15c, /* Level Current Status Register D */ | ||
44 | TIR_CFGA = 0x200, /* Setting Register A0 */ | ||
45 | TIR_CFGB = 0x204, /* Setting Register B0 */ | ||
46 | /* 0x208 ... 0x3ff Setting Register An/Bn */ | ||
47 | TIR_PPNDA = 0x400, /* Packet Pending Register A */ | ||
48 | TIR_PPNDB = 0x404, /* Packet Pending Register B */ | ||
49 | TIR_PIERA = 0x408, /* Packet Output Error Register A */ | ||
50 | TIR_PIERB = 0x40c, /* Packet Output Error Register B */ | ||
51 | TIR_PIEN = 0x444, /* Packet Output Enable Register */ | ||
52 | TIR_PIPND = 0x454, /* Packet Output Pending Register */ | ||
53 | TIRDID = 0x484, /* Spider Device ID Register */ | ||
54 | REISTIM = 0x500, /* Reissue Command Timeout Time Setting */ | ||
55 | REISTIMEN = 0x504, /* Reissue Command Timeout Setting */ | ||
56 | REISWAITEN = 0x508, /* Reissue Wait Control*/ | ||
57 | }; | ||
58 | |||
59 | static void __iomem *spider_pics[4]; | ||
60 | |||
61 | static void __iomem *spider_get_pic(int irq) | ||
62 | { | ||
63 | int node = irq / IIC_NODE_STRIDE; | ||
64 | irq %= IIC_NODE_STRIDE; | ||
65 | |||
66 | if (irq >= IIC_EXT_OFFSET && | ||
67 | irq < IIC_EXT_OFFSET + IIC_NUM_EXT && | ||
68 | spider_pics) | ||
69 | return spider_pics[node]; | ||
70 | return NULL; | ||
71 | } | ||
72 | |||
73 | static int spider_get_nr(unsigned int irq) | ||
74 | { | ||
75 | return (irq % IIC_NODE_STRIDE) - IIC_EXT_OFFSET; | ||
76 | } | ||
77 | |||
78 | static void __iomem *spider_get_irq_config(int irq) | ||
79 | { | ||
80 | void __iomem *pic; | ||
81 | pic = spider_get_pic(irq); | ||
82 | return pic + TIR_CFGA + 8 * spider_get_nr(irq); | ||
83 | } | ||
84 | |||
85 | static void spider_enable_irq(unsigned int irq) | ||
86 | { | ||
87 | void __iomem *cfg = spider_get_irq_config(irq); | ||
88 | irq = spider_get_nr(irq); | ||
89 | |||
90 | out_be32(cfg, in_be32(cfg) | 0x3107000eu); | ||
91 | out_be32(cfg + 4, in_be32(cfg + 4) | 0x00020000u | irq); | ||
92 | } | ||
93 | |||
94 | static void spider_disable_irq(unsigned int irq) | ||
95 | { | ||
96 | void __iomem *cfg = spider_get_irq_config(irq); | ||
97 | irq = spider_get_nr(irq); | ||
98 | |||
99 | out_be32(cfg, in_be32(cfg) & ~0x30000000u); | ||
100 | } | ||
101 | |||
102 | static unsigned int spider_startup_irq(unsigned int irq) | ||
103 | { | ||
104 | spider_enable_irq(irq); | ||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | static void spider_shutdown_irq(unsigned int irq) | ||
109 | { | ||
110 | spider_disable_irq(irq); | ||
111 | } | ||
112 | |||
113 | static void spider_end_irq(unsigned int irq) | ||
114 | { | ||
115 | spider_enable_irq(irq); | ||
116 | } | ||
117 | |||
118 | static void spider_ack_irq(unsigned int irq) | ||
119 | { | ||
120 | spider_disable_irq(irq); | ||
121 | iic_local_enable(); | ||
122 | } | ||
123 | |||
124 | static struct hw_interrupt_type spider_pic = { | ||
125 | .typename = " SPIDER ", | ||
126 | .startup = spider_startup_irq, | ||
127 | .shutdown = spider_shutdown_irq, | ||
128 | .enable = spider_enable_irq, | ||
129 | .disable = spider_disable_irq, | ||
130 | .ack = spider_ack_irq, | ||
131 | .end = spider_end_irq, | ||
132 | }; | ||
133 | |||
134 | |||
135 | int spider_get_irq(unsigned long int_pending) | ||
136 | { | ||
137 | void __iomem *regs = spider_get_pic(int_pending); | ||
138 | unsigned long cs; | ||
139 | int irq; | ||
140 | |||
141 | cs = in_be32(regs + TIR_CS); | ||
142 | |||
143 | irq = cs >> 24; | ||
144 | if (irq != 63) | ||
145 | return irq; | ||
146 | |||
147 | return -1; | ||
148 | } | ||
149 | |||
150 | void spider_init_IRQ(void) | ||
151 | { | ||
152 | int node; | ||
153 | struct device_node *dn; | ||
154 | unsigned int *property; | ||
155 | long spiderpic; | ||
156 | int n; | ||
157 | |||
158 | /* FIXME: detect multiple PICs as soon as the device tree has them */ | ||
159 | for (node = 0; node < 1; node++) { | ||
160 | dn = of_find_node_by_path("/"); | ||
161 | n = prom_n_addr_cells(dn); | ||
162 | property = (unsigned int *) get_property(dn, | ||
163 | "platform-spider-pic", NULL); | ||
164 | |||
165 | if (!property) | ||
166 | continue; | ||
167 | for (spiderpic = 0; n > 0; --n) | ||
168 | spiderpic = (spiderpic << 32) + *property++; | ||
169 | printk(KERN_DEBUG "SPIDER addr: %lx\n", spiderpic); | ||
170 | spider_pics[node] = __ioremap(spiderpic, 0x800, _PAGE_NO_CACHE); | ||
171 | for (n = 0; n < IIC_NUM_EXT; n++) { | ||
172 | int irq = n + IIC_EXT_OFFSET + node * IIC_NODE_STRIDE; | ||
173 | get_irq_desc(irq)->handler = &spider_pic; | ||
174 | |||
175 | /* do not mask any interrupts because of level */ | ||
176 | out_be32(spider_pics[node] + TIR_MSK, 0x0); | ||
177 | |||
178 | /* disable edge detection clear */ | ||
179 | /* out_be32(spider_pics[node] + TIR_EDC, 0x0); */ | ||
180 | |||
181 | /* enable interrupt packets to be output */ | ||
182 | out_be32(spider_pics[node] + TIR_PIEN, | ||
183 | in_be32(spider_pics[node] + TIR_PIEN) | 0x1); | ||
184 | |||
185 | /* Enable the interrupt detection enable bit. Do this last! */ | ||
186 | out_be32(spider_pics[node] + TIR_DEN, | ||
187 | in_be32(spider_pics[node] +TIR_DEN) | 0x1); | ||
188 | |||
189 | } | ||
190 | } | ||
191 | } | ||
diff --git a/arch/powerpc/platforms/chrp/nvram.c b/arch/powerpc/platforms/chrp/nvram.c index 4ac7125aa09c..150f67d6f90c 100644 --- a/arch/powerpc/platforms/chrp/nvram.c +++ b/arch/powerpc/platforms/chrp/nvram.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
18 | #include <asm/prom.h> | 18 | #include <asm/prom.h> |
19 | #include <asm/machdep.h> | 19 | #include <asm/machdep.h> |
20 | #include <asm/rtas.h> | ||
20 | #include "chrp.h" | 21 | #include "chrp.h" |
21 | 22 | ||
22 | static unsigned int nvram_size; | 23 | static unsigned int nvram_size; |
@@ -25,7 +26,8 @@ static DEFINE_SPINLOCK(nvram_lock); | |||
25 | 26 | ||
26 | static unsigned char chrp_nvram_read(int addr) | 27 | static unsigned char chrp_nvram_read(int addr) |
27 | { | 28 | { |
28 | unsigned long done, flags; | 29 | unsigned int done; |
30 | unsigned long flags; | ||
29 | unsigned char ret; | 31 | unsigned char ret; |
30 | 32 | ||
31 | if (addr >= nvram_size) { | 33 | if (addr >= nvram_size) { |
@@ -34,7 +36,8 @@ static unsigned char chrp_nvram_read(int addr) | |||
34 | return 0xff; | 36 | return 0xff; |
35 | } | 37 | } |
36 | spin_lock_irqsave(&nvram_lock, flags); | 38 | spin_lock_irqsave(&nvram_lock, flags); |
37 | if ((call_rtas("nvram-fetch", 3, 2, &done, addr, __pa(nvram_buf), 1) != 0) || 1 != done) | 39 | if ((rtas_call(rtas_token("nvram-fetch"), 3, 2, &done, addr, |
40 | __pa(nvram_buf), 1) != 0) || 1 != done) | ||
38 | ret = 0xff; | 41 | ret = 0xff; |
39 | else | 42 | else |
40 | ret = nvram_buf[0]; | 43 | ret = nvram_buf[0]; |
@@ -45,7 +48,8 @@ static unsigned char chrp_nvram_read(int addr) | |||
45 | 48 | ||
46 | static void chrp_nvram_write(int addr, unsigned char val) | 49 | static void chrp_nvram_write(int addr, unsigned char val) |
47 | { | 50 | { |
48 | unsigned long done, flags; | 51 | unsigned int done; |
52 | unsigned long flags; | ||
49 | 53 | ||
50 | if (addr >= nvram_size) { | 54 | if (addr >= nvram_size) { |
51 | printk(KERN_DEBUG "%s: write addr %d > nvram_size %u\n", | 55 | printk(KERN_DEBUG "%s: write addr %d > nvram_size %u\n", |
@@ -54,7 +58,8 @@ static void chrp_nvram_write(int addr, unsigned char val) | |||
54 | } | 58 | } |
55 | spin_lock_irqsave(&nvram_lock, flags); | 59 | spin_lock_irqsave(&nvram_lock, flags); |
56 | nvram_buf[0] = val; | 60 | nvram_buf[0] = val; |
57 | if ((call_rtas("nvram-store", 3, 2, &done, addr, __pa(nvram_buf), 1) != 0) || 1 != done) | 61 | if ((rtas_call(rtas_token("nvram-store"), 3, 2, &done, addr, |
62 | __pa(nvram_buf), 1) != 0) || 1 != done) | ||
58 | printk(KERN_DEBUG "rtas IO error storing 0x%02x at %d", val, addr); | 63 | printk(KERN_DEBUG "rtas IO error storing 0x%02x at %d", val, addr); |
59 | spin_unlock_irqrestore(&nvram_lock, flags); | 64 | spin_unlock_irqrestore(&nvram_lock, flags); |
60 | } | 65 | } |
diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c index a9052305c35d..29c86781c493 100644 --- a/arch/powerpc/platforms/chrp/pegasos_eth.c +++ b/arch/powerpc/platforms/chrp/pegasos_eth.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/platform_device.h> | ||
17 | #include <linux/mv643xx.h> | 18 | #include <linux/mv643xx.h> |
18 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
19 | 20 | ||
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c index 31ee49c25014..bb2315997d45 100644 --- a/arch/powerpc/platforms/chrp/smp.c +++ b/arch/powerpc/platforms/chrp/smp.c | |||
@@ -35,43 +35,6 @@ | |||
35 | #include <asm/smp.h> | 35 | #include <asm/smp.h> |
36 | #include <asm/mpic.h> | 36 | #include <asm/mpic.h> |
37 | 37 | ||
38 | extern unsigned long smp_chrp_cpu_nr; | ||
39 | |||
40 | static int __init smp_chrp_probe(void) | ||
41 | { | ||
42 | struct device_node *cpus = NULL; | ||
43 | unsigned int *reg; | ||
44 | int reglen; | ||
45 | int ncpus = 0; | ||
46 | int cpuid; | ||
47 | unsigned int phys; | ||
48 | |||
49 | /* Count CPUs in the device-tree */ | ||
50 | cpuid = 1; /* the boot cpu is logical cpu 0 */ | ||
51 | while ((cpus = of_find_node_by_type(cpus, "cpu")) != NULL) { | ||
52 | phys = ncpus; | ||
53 | reg = (unsigned int *) get_property(cpus, "reg", ®len); | ||
54 | if (reg && reglen >= sizeof(unsigned int)) | ||
55 | /* hmmm, not having a reg property would be bad */ | ||
56 | phys = *reg; | ||
57 | if (phys != boot_cpuid_phys) { | ||
58 | set_hard_smp_processor_id(cpuid, phys); | ||
59 | ++cpuid; | ||
60 | } | ||
61 | ++ncpus; | ||
62 | } | ||
63 | |||
64 | printk(KERN_INFO "CHRP SMP probe found %d cpus\n", ncpus); | ||
65 | |||
66 | /* Nothing more to do if less than 2 of them */ | ||
67 | if (ncpus <= 1) | ||
68 | return 1; | ||
69 | |||
70 | mpic_request_ipis(); | ||
71 | |||
72 | return ncpus; | ||
73 | } | ||
74 | |||
75 | static void __devinit smp_chrp_kick_cpu(int nr) | 38 | static void __devinit smp_chrp_kick_cpu(int nr) |
76 | { | 39 | { |
77 | *(unsigned long *)KERNELBASE = nr; | 40 | *(unsigned long *)KERNELBASE = nr; |
@@ -114,7 +77,7 @@ void __devinit smp_chrp_take_timebase(void) | |||
114 | /* CHRP with openpic */ | 77 | /* CHRP with openpic */ |
115 | struct smp_ops_t chrp_smp_ops = { | 78 | struct smp_ops_t chrp_smp_ops = { |
116 | .message_pass = smp_mpic_message_pass, | 79 | .message_pass = smp_mpic_message_pass, |
117 | .probe = smp_chrp_probe, | 80 | .probe = smp_mpic_probe, |
118 | .kick_cpu = smp_chrp_kick_cpu, | 81 | .kick_cpu = smp_chrp_kick_cpu, |
119 | .setup_cpu = smp_chrp_setup_cpu, | 82 | .setup_cpu = smp_chrp_setup_cpu, |
120 | .give_timebase = smp_chrp_give_timebase, | 83 | .give_timebase = smp_chrp_give_timebase, |
diff --git a/arch/powerpc/platforms/iseries/call_hpt.h b/arch/powerpc/platforms/iseries/call_hpt.h index 321f3bb7a8f5..a843b0f87b72 100644 --- a/arch/powerpc/platforms/iseries/call_hpt.h +++ b/arch/powerpc/platforms/iseries/call_hpt.h | |||
@@ -23,8 +23,8 @@ | |||
23 | * drive the hypervisor from the OS. | 23 | * drive the hypervisor from the OS. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <asm/iSeries/HvCallSc.h> | 26 | #include <asm/iseries/hv_call_sc.h> |
27 | #include <asm/iSeries/HvTypes.h> | 27 | #include <asm/iseries/hv_types.h> |
28 | #include <asm/mmu.h> | 28 | #include <asm/mmu.h> |
29 | 29 | ||
30 | #define HvCallHptGetHptAddress HvCallHpt + 0 | 30 | #define HvCallHptGetHptAddress HvCallHpt + 0 |
diff --git a/arch/powerpc/platforms/iseries/call_pci.h b/arch/powerpc/platforms/iseries/call_pci.h index a86e065b9577..59d4e0ad5cf3 100644 --- a/arch/powerpc/platforms/iseries/call_pci.h +++ b/arch/powerpc/platforms/iseries/call_pci.h | |||
@@ -25,8 +25,8 @@ | |||
25 | #ifndef _PLATFORMS_ISERIES_CALL_PCI_H | 25 | #ifndef _PLATFORMS_ISERIES_CALL_PCI_H |
26 | #define _PLATFORMS_ISERIES_CALL_PCI_H | 26 | #define _PLATFORMS_ISERIES_CALL_PCI_H |
27 | 27 | ||
28 | #include <asm/iSeries/HvCallSc.h> | 28 | #include <asm/iseries/hv_call_sc.h> |
29 | #include <asm/iSeries/HvTypes.h> | 29 | #include <asm/iseries/hv_types.h> |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * DSA == Direct Select Address | 32 | * DSA == Direct Select Address |
diff --git a/arch/powerpc/platforms/iseries/call_sm.h b/arch/powerpc/platforms/iseries/call_sm.h index ef223166cf22..c7e251619f48 100644 --- a/arch/powerpc/platforms/iseries/call_sm.h +++ b/arch/powerpc/platforms/iseries/call_sm.h | |||
@@ -23,8 +23,8 @@ | |||
23 | * drive the hypervisor from the OS. | 23 | * drive the hypervisor from the OS. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <asm/iSeries/HvCallSc.h> | 26 | #include <asm/iseries/hv_call_sc.h> |
27 | #include <asm/iSeries/HvTypes.h> | 27 | #include <asm/iseries/hv_types.h> |
28 | 28 | ||
29 | #define HvCallSmGet64BitsOfAccessMap HvCallSm + 11 | 29 | #define HvCallSmGet64BitsOfAccessMap HvCallSm + 11 |
30 | 30 | ||
diff --git a/arch/powerpc/platforms/iseries/htab.c b/arch/powerpc/platforms/iseries/htab.c index b3c6c3374ca6..30bdcf3925d9 100644 --- a/arch/powerpc/platforms/iseries/htab.c +++ b/arch/powerpc/platforms/iseries/htab.c | |||
@@ -39,15 +39,16 @@ static inline void iSeries_hunlock(unsigned long slot) | |||
39 | spin_unlock(&iSeries_hlocks[(slot >> 4) & 0x3f]); | 39 | spin_unlock(&iSeries_hlocks[(slot >> 4) & 0x3f]); |
40 | } | 40 | } |
41 | 41 | ||
42 | static long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va, | 42 | long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va, |
43 | unsigned long prpn, unsigned long vflags, | 43 | unsigned long pa, unsigned long rflags, |
44 | unsigned long rflags) | 44 | unsigned long vflags, int psize) |
45 | { | 45 | { |
46 | unsigned long arpn; | ||
47 | long slot; | 46 | long slot; |
48 | hpte_t lhpte; | 47 | hpte_t lhpte; |
49 | int secondary = 0; | 48 | int secondary = 0; |
50 | 49 | ||
50 | BUG_ON(psize != MMU_PAGE_4K); | ||
51 | |||
51 | /* | 52 | /* |
52 | * The hypervisor tries both primary and secondary. | 53 | * The hypervisor tries both primary and secondary. |
53 | * If we are being called to insert in the secondary, | 54 | * If we are being called to insert in the secondary, |
@@ -59,8 +60,19 @@ static long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va, | |||
59 | 60 | ||
60 | iSeries_hlock(hpte_group); | 61 | iSeries_hlock(hpte_group); |
61 | 62 | ||
62 | slot = HvCallHpt_findValid(&lhpte, va >> PAGE_SHIFT); | 63 | slot = HvCallHpt_findValid(&lhpte, va >> HW_PAGE_SHIFT); |
63 | BUG_ON(lhpte.v & HPTE_V_VALID); | 64 | if (unlikely(lhpte.v & HPTE_V_VALID)) { |
65 | if (vflags & HPTE_V_BOLTED) { | ||
66 | HvCallHpt_setSwBits(slot, 0x10, 0); | ||
67 | HvCallHpt_setPp(slot, PP_RWXX); | ||
68 | iSeries_hunlock(hpte_group); | ||
69 | if (slot < 0) | ||
70 | return 0x8 | (slot & 7); | ||
71 | else | ||
72 | return slot & 7; | ||
73 | } | ||
74 | BUG(); | ||
75 | } | ||
64 | 76 | ||
65 | if (slot == -1) { /* No available entry found in either group */ | 77 | if (slot == -1) { /* No available entry found in either group */ |
66 | iSeries_hunlock(hpte_group); | 78 | iSeries_hunlock(hpte_group); |
@@ -73,10 +85,9 @@ static long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va, | |||
73 | slot &= 0x7fffffffffffffff; | 85 | slot &= 0x7fffffffffffffff; |
74 | } | 86 | } |
75 | 87 | ||
76 | arpn = phys_to_abs(prpn << PAGE_SHIFT) >> PAGE_SHIFT; | ||
77 | 88 | ||
78 | lhpte.v = (va >> 23) << HPTE_V_AVPN_SHIFT | vflags | HPTE_V_VALID; | 89 | lhpte.v = hpte_encode_v(va, MMU_PAGE_4K) | vflags | HPTE_V_VALID; |
79 | lhpte.r = (arpn << HPTE_R_RPN_SHIFT) | rflags; | 90 | lhpte.r = hpte_encode_r(phys_to_abs(pa), MMU_PAGE_4K) | rflags; |
80 | 91 | ||
81 | /* Now fill in the actual HPTE */ | 92 | /* Now fill in the actual HPTE */ |
82 | HvCallHpt_addValidate(slot, secondary, &lhpte); | 93 | HvCallHpt_addValidate(slot, secondary, &lhpte); |
@@ -86,25 +97,6 @@ static long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va, | |||
86 | return (secondary << 3) | (slot & 7); | 97 | return (secondary << 3) | (slot & 7); |
87 | } | 98 | } |
88 | 99 | ||
89 | long iSeries_hpte_bolt_or_insert(unsigned long hpte_group, | ||
90 | unsigned long va, unsigned long prpn, unsigned long vflags, | ||
91 | unsigned long rflags) | ||
92 | { | ||
93 | long slot; | ||
94 | hpte_t lhpte; | ||
95 | |||
96 | slot = HvCallHpt_findValid(&lhpte, va >> PAGE_SHIFT); | ||
97 | |||
98 | if (lhpte.v & HPTE_V_VALID) { | ||
99 | /* Bolt the existing HPTE */ | ||
100 | HvCallHpt_setSwBits(slot, 0x10, 0); | ||
101 | HvCallHpt_setPp(slot, PP_RWXX); | ||
102 | return 0; | ||
103 | } | ||
104 | |||
105 | return iSeries_hpte_insert(hpte_group, va, prpn, vflags, rflags); | ||
106 | } | ||
107 | |||
108 | static unsigned long iSeries_hpte_getword0(unsigned long slot) | 100 | static unsigned long iSeries_hpte_getword0(unsigned long slot) |
109 | { | 101 | { |
110 | hpte_t hpte; | 102 | hpte_t hpte; |
@@ -150,15 +142,17 @@ static long iSeries_hpte_remove(unsigned long hpte_group) | |||
150 | * bits 61..63 : PP2,PP1,PP0 | 142 | * bits 61..63 : PP2,PP1,PP0 |
151 | */ | 143 | */ |
152 | static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp, | 144 | static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp, |
153 | unsigned long va, int large, int local) | 145 | unsigned long va, int psize, int local) |
154 | { | 146 | { |
155 | hpte_t hpte; | 147 | hpte_t hpte; |
156 | unsigned long avpn = va >> 23; | 148 | unsigned long want_v; |
157 | 149 | ||
158 | iSeries_hlock(slot); | 150 | iSeries_hlock(slot); |
159 | 151 | ||
160 | HvCallHpt_get(&hpte, slot); | 152 | HvCallHpt_get(&hpte, slot); |
161 | if ((HPTE_V_AVPN_VAL(hpte.v) == avpn) && (hpte.v & HPTE_V_VALID)) { | 153 | want_v = hpte_encode_v(va, MMU_PAGE_4K); |
154 | |||
155 | if (HPTE_V_COMPARE(hpte.v, want_v) && (hpte.v & HPTE_V_VALID)) { | ||
162 | /* | 156 | /* |
163 | * Hypervisor expects bits as NPPP, which is | 157 | * Hypervisor expects bits as NPPP, which is |
164 | * different from how they are mapped in our PP. | 158 | * different from how they are mapped in our PP. |
@@ -210,14 +204,17 @@ static long iSeries_hpte_find(unsigned long vpn) | |||
210 | * | 204 | * |
211 | * No need to lock here because we should be the only user. | 205 | * No need to lock here because we should be the only user. |
212 | */ | 206 | */ |
213 | static void iSeries_hpte_updateboltedpp(unsigned long newpp, unsigned long ea) | 207 | static void iSeries_hpte_updateboltedpp(unsigned long newpp, unsigned long ea, |
208 | int psize) | ||
214 | { | 209 | { |
215 | unsigned long vsid,va,vpn; | 210 | unsigned long vsid,va,vpn; |
216 | long slot; | 211 | long slot; |
217 | 212 | ||
213 | BUG_ON(psize != MMU_PAGE_4K); | ||
214 | |||
218 | vsid = get_kernel_vsid(ea); | 215 | vsid = get_kernel_vsid(ea); |
219 | va = (vsid << 28) | (ea & 0x0fffffff); | 216 | va = (vsid << 28) | (ea & 0x0fffffff); |
220 | vpn = va >> PAGE_SHIFT; | 217 | vpn = va >> HW_PAGE_SHIFT; |
221 | slot = iSeries_hpte_find(vpn); | 218 | slot = iSeries_hpte_find(vpn); |
222 | if (slot == -1) | 219 | if (slot == -1) |
223 | panic("updateboltedpp: Could not find page to bolt\n"); | 220 | panic("updateboltedpp: Could not find page to bolt\n"); |
@@ -225,7 +222,7 @@ static void iSeries_hpte_updateboltedpp(unsigned long newpp, unsigned long ea) | |||
225 | } | 222 | } |
226 | 223 | ||
227 | static void iSeries_hpte_invalidate(unsigned long slot, unsigned long va, | 224 | static void iSeries_hpte_invalidate(unsigned long slot, unsigned long va, |
228 | int large, int local) | 225 | int psize, int local) |
229 | { | 226 | { |
230 | unsigned long hpte_v; | 227 | unsigned long hpte_v; |
231 | unsigned long avpn = va >> 23; | 228 | unsigned long avpn = va >> 23; |
diff --git a/arch/powerpc/platforms/iseries/hvlog.c b/arch/powerpc/platforms/iseries/hvlog.c index f61e2e9ac9ec..f476d71194fa 100644 --- a/arch/powerpc/platforms/iseries/hvlog.c +++ b/arch/powerpc/platforms/iseries/hvlog.c | |||
@@ -9,9 +9,9 @@ | |||
9 | 9 | ||
10 | #include <asm/page.h> | 10 | #include <asm/page.h> |
11 | #include <asm/abs_addr.h> | 11 | #include <asm/abs_addr.h> |
12 | #include <asm/iSeries/HvCall.h> | 12 | #include <asm/iseries/hv_call.h> |
13 | #include <asm/iSeries/HvCallSc.h> | 13 | #include <asm/iseries/hv_call_sc.h> |
14 | #include <asm/iSeries/HvTypes.h> | 14 | #include <asm/iseries/hv_types.h> |
15 | 15 | ||
16 | 16 | ||
17 | void HvCall_writeLogBuffer(const void *buffer, u64 len) | 17 | void HvCall_writeLogBuffer(const void *buffer, u64 len) |
@@ -22,7 +22,7 @@ void HvCall_writeLogBuffer(const void *buffer, u64 len) | |||
22 | 22 | ||
23 | while (len) { | 23 | while (len) { |
24 | hv_buf.addr = cur; | 24 | hv_buf.addr = cur; |
25 | left_this_page = ((cur & PAGE_MASK) + PAGE_SIZE) - cur; | 25 | left_this_page = ((cur & HW_PAGE_MASK) + HW_PAGE_SIZE) - cur; |
26 | if (left_this_page > len) | 26 | if (left_this_page > len) |
27 | left_this_page = len; | 27 | left_this_page = len; |
28 | hv_buf.len = left_this_page; | 28 | hv_buf.len = left_this_page; |
@@ -30,6 +30,6 @@ void HvCall_writeLogBuffer(const void *buffer, u64 len) | |||
30 | HvCall2(HvCallBaseWriteLogBuffer, | 30 | HvCall2(HvCallBaseWriteLogBuffer, |
31 | virt_to_abs(&hv_buf), | 31 | virt_to_abs(&hv_buf), |
32 | left_this_page); | 32 | left_this_page); |
33 | cur = (cur & PAGE_MASK) + PAGE_SIZE; | 33 | cur = (cur & HW_PAGE_MASK) + HW_PAGE_SIZE; |
34 | } | 34 | } |
35 | } | 35 | } |
diff --git a/arch/powerpc/platforms/iseries/hvlpconfig.c b/arch/powerpc/platforms/iseries/hvlpconfig.c index dc28621aea0d..663a1affb4bb 100644 --- a/arch/powerpc/platforms/iseries/hvlpconfig.c +++ b/arch/powerpc/platforms/iseries/hvlpconfig.c | |||
@@ -17,7 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <asm/iSeries/HvLpConfig.h> | 20 | #include <asm/iseries/hv_lp_config.h> |
21 | 21 | ||
22 | HvLpIndex HvLpConfig_getLpIndex_outline(void) | 22 | HvLpIndex HvLpConfig_getLpIndex_outline(void) |
23 | { | 23 | { |
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index 1db26d8be640..bf081b345820 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <asm/machdep.h> | 32 | #include <asm/machdep.h> |
33 | #include <asm/abs_addr.h> | 33 | #include <asm/abs_addr.h> |
34 | #include <asm/pci-bridge.h> | 34 | #include <asm/pci-bridge.h> |
35 | #include <asm/iSeries/HvCallXm.h> | 35 | #include <asm/iseries/hv_call_xm.h> |
36 | 36 | ||
37 | extern struct list_head iSeries_Global_Device_List; | 37 | extern struct list_head iSeries_Global_Device_List; |
38 | 38 | ||
@@ -43,9 +43,12 @@ static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages, | |||
43 | u64 rc; | 43 | u64 rc; |
44 | union tce_entry tce; | 44 | union tce_entry tce; |
45 | 45 | ||
46 | index <<= TCE_PAGE_FACTOR; | ||
47 | npages <<= TCE_PAGE_FACTOR; | ||
48 | |||
46 | while (npages--) { | 49 | while (npages--) { |
47 | tce.te_word = 0; | 50 | tce.te_word = 0; |
48 | tce.te_bits.tb_rpn = virt_to_abs(uaddr) >> PAGE_SHIFT; | 51 | tce.te_bits.tb_rpn = virt_to_abs(uaddr) >> TCE_SHIFT; |
49 | 52 | ||
50 | if (tbl->it_type == TCE_VB) { | 53 | if (tbl->it_type == TCE_VB) { |
51 | /* Virtual Bus */ | 54 | /* Virtual Bus */ |
@@ -66,7 +69,7 @@ static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages, | |||
66 | panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx\n", | 69 | panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx\n", |
67 | rc); | 70 | rc); |
68 | index++; | 71 | index++; |
69 | uaddr += PAGE_SIZE; | 72 | uaddr += TCE_PAGE_SIZE; |
70 | } | 73 | } |
71 | } | 74 | } |
72 | 75 | ||
@@ -74,6 +77,9 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages) | |||
74 | { | 77 | { |
75 | u64 rc; | 78 | u64 rc; |
76 | 79 | ||
80 | npages <<= TCE_PAGE_FACTOR; | ||
81 | index <<= TCE_PAGE_FACTOR; | ||
82 | |||
77 | while (npages--) { | 83 | while (npages--) { |
78 | rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, 0); | 84 | rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, 0); |
79 | if (rc) | 85 | if (rc) |
@@ -83,27 +89,6 @@ static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages) | |||
83 | } | 89 | } |
84 | } | 90 | } |
85 | 91 | ||
86 | #ifdef CONFIG_PCI | ||
87 | /* | ||
88 | * This function compares the known tables to find an iommu_table | ||
89 | * that has already been built for hardware TCEs. | ||
90 | */ | ||
91 | static struct iommu_table *iommu_table_find(struct iommu_table * tbl) | ||
92 | { | ||
93 | struct pci_dn *pdn; | ||
94 | |||
95 | list_for_each_entry(pdn, &iSeries_Global_Device_List, Device_List) { | ||
96 | struct iommu_table *it = pdn->iommu_table; | ||
97 | if ((it != NULL) && | ||
98 | (it->it_type == TCE_PCI) && | ||
99 | (it->it_offset == tbl->it_offset) && | ||
100 | (it->it_index == tbl->it_index) && | ||
101 | (it->it_size == tbl->it_size)) | ||
102 | return it; | ||
103 | } | ||
104 | return NULL; | ||
105 | } | ||
106 | |||
107 | /* | 92 | /* |
108 | * Call Hv with the architected data structure to get TCE table info. | 93 | * Call Hv with the architected data structure to get TCE table info. |
109 | * info. Put the returned data into the Linux representation of the | 94 | * info. Put the returned data into the Linux representation of the |
@@ -113,8 +98,10 @@ static struct iommu_table *iommu_table_find(struct iommu_table * tbl) | |||
113 | * 2. TCE table per Bus. | 98 | * 2. TCE table per Bus. |
114 | * 3. TCE Table per IOA. | 99 | * 3. TCE Table per IOA. |
115 | */ | 100 | */ |
116 | static void iommu_table_getparms(struct pci_dn *pdn, | 101 | void iommu_table_getparms_iSeries(unsigned long busno, |
117 | struct iommu_table* tbl) | 102 | unsigned char slotno, |
103 | unsigned char virtbus, | ||
104 | struct iommu_table* tbl) | ||
118 | { | 105 | { |
119 | struct iommu_table_cb *parms; | 106 | struct iommu_table_cb *parms; |
120 | 107 | ||
@@ -124,9 +111,9 @@ static void iommu_table_getparms(struct pci_dn *pdn, | |||
124 | 111 | ||
125 | memset(parms, 0, sizeof(*parms)); | 112 | memset(parms, 0, sizeof(*parms)); |
126 | 113 | ||
127 | parms->itc_busno = pdn->busno; | 114 | parms->itc_busno = busno; |
128 | parms->itc_slotno = pdn->LogicalSlot; | 115 | parms->itc_slotno = slotno; |
129 | parms->itc_virtbus = 0; | 116 | parms->itc_virtbus = virtbus; |
130 | 117 | ||
131 | HvCallXm_getTceTableParms(iseries_hv_addr(parms)); | 118 | HvCallXm_getTceTableParms(iseries_hv_addr(parms)); |
132 | 119 | ||
@@ -134,17 +121,40 @@ static void iommu_table_getparms(struct pci_dn *pdn, | |||
134 | panic("PCI_DMA: parms->size is zero, parms is 0x%p", parms); | 121 | panic("PCI_DMA: parms->size is zero, parms is 0x%p", parms); |
135 | 122 | ||
136 | /* itc_size is in pages worth of table, it_size is in # of entries */ | 123 | /* itc_size is in pages worth of table, it_size is in # of entries */ |
137 | tbl->it_size = (parms->itc_size * PAGE_SIZE) / sizeof(union tce_entry); | 124 | tbl->it_size = ((parms->itc_size * TCE_PAGE_SIZE) / |
125 | sizeof(union tce_entry)) >> TCE_PAGE_FACTOR; | ||
138 | tbl->it_busno = parms->itc_busno; | 126 | tbl->it_busno = parms->itc_busno; |
139 | tbl->it_offset = parms->itc_offset; | 127 | tbl->it_offset = parms->itc_offset >> TCE_PAGE_FACTOR; |
140 | tbl->it_index = parms->itc_index; | 128 | tbl->it_index = parms->itc_index; |
141 | tbl->it_blocksize = 1; | 129 | tbl->it_blocksize = 1; |
142 | tbl->it_type = TCE_PCI; | 130 | tbl->it_type = virtbus ? TCE_VB : TCE_PCI; |
143 | 131 | ||
144 | kfree(parms); | 132 | kfree(parms); |
145 | } | 133 | } |
146 | 134 | ||
147 | 135 | ||
136 | #ifdef CONFIG_PCI | ||
137 | /* | ||
138 | * This function compares the known tables to find an iommu_table | ||
139 | * that has already been built for hardware TCEs. | ||
140 | */ | ||
141 | static struct iommu_table *iommu_table_find(struct iommu_table * tbl) | ||
142 | { | ||
143 | struct pci_dn *pdn; | ||
144 | |||
145 | list_for_each_entry(pdn, &iSeries_Global_Device_List, Device_List) { | ||
146 | struct iommu_table *it = pdn->iommu_table; | ||
147 | if ((it != NULL) && | ||
148 | (it->it_type == TCE_PCI) && | ||
149 | (it->it_offset == tbl->it_offset) && | ||
150 | (it->it_index == tbl->it_index) && | ||
151 | (it->it_size == tbl->it_size)) | ||
152 | return it; | ||
153 | } | ||
154 | return NULL; | ||
155 | } | ||
156 | |||
157 | |||
148 | void iommu_devnode_init_iSeries(struct device_node *dn) | 158 | void iommu_devnode_init_iSeries(struct device_node *dn) |
149 | { | 159 | { |
150 | struct iommu_table *tbl; | 160 | struct iommu_table *tbl; |
@@ -152,7 +162,7 @@ void iommu_devnode_init_iSeries(struct device_node *dn) | |||
152 | 162 | ||
153 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); | 163 | tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); |
154 | 164 | ||
155 | iommu_table_getparms(pdn, tbl); | 165 | iommu_table_getparms_iSeries(pdn->busno, pdn->LogicalSlot, 0, tbl); |
156 | 166 | ||
157 | /* Look for existing tce table */ | 167 | /* Look for existing tce table */ |
158 | pdn->iommu_table = iommu_table_find(tbl); | 168 | pdn->iommu_table = iommu_table_find(tbl); |
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index 937ac99b9d33..c1135912cc05 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c | |||
@@ -36,9 +36,9 @@ | |||
36 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
37 | 37 | ||
38 | #include <asm/ppcdebug.h> | 38 | #include <asm/ppcdebug.h> |
39 | #include <asm/iSeries/HvTypes.h> | 39 | #include <asm/iseries/hv_types.h> |
40 | #include <asm/iSeries/HvLpEvent.h> | 40 | #include <asm/iseries/hv_lp_event.h> |
41 | #include <asm/iSeries/HvCallXm.h> | 41 | #include <asm/iseries/hv_call_xm.h> |
42 | 42 | ||
43 | #include "irq.h" | 43 | #include "irq.h" |
44 | #include "call_pci.h" | 44 | #include "call_pci.h" |
diff --git a/arch/powerpc/platforms/iseries/ksyms.c b/arch/powerpc/platforms/iseries/ksyms.c index f271b3539721..a2200842f4e5 100644 --- a/arch/powerpc/platforms/iseries/ksyms.c +++ b/arch/powerpc/platforms/iseries/ksyms.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | 10 | ||
11 | #include <asm/hw_irq.h> | 11 | #include <asm/hw_irq.h> |
12 | #include <asm/iSeries/HvCallSc.h> | 12 | #include <asm/iseries/hv_call_sc.h> |
13 | 13 | ||
14 | EXPORT_SYMBOL(HvCall0); | 14 | EXPORT_SYMBOL(HvCall0); |
15 | EXPORT_SYMBOL(HvCall1); | 15 | EXPORT_SYMBOL(HvCall1); |
diff --git a/arch/powerpc/platforms/iseries/lpardata.c b/arch/powerpc/platforms/iseries/lpardata.c index ed2ffee6f731..bb8c91537f35 100644 --- a/arch/powerpc/platforms/iseries/lpardata.c +++ b/arch/powerpc/platforms/iseries/lpardata.c | |||
@@ -13,16 +13,16 @@ | |||
13 | #include <linux/bitops.h> | 13 | #include <linux/bitops.h> |
14 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
15 | #include <asm/ptrace.h> | 15 | #include <asm/ptrace.h> |
16 | #include <asm/naca.h> | ||
17 | #include <asm/abs_addr.h> | 16 | #include <asm/abs_addr.h> |
18 | #include <asm/iSeries/ItLpNaca.h> | 17 | #include <asm/iseries/it_lp_naca.h> |
19 | #include <asm/lppaca.h> | 18 | #include <asm/lppaca.h> |
20 | #include <asm/iSeries/ItLpRegSave.h> | 19 | #include <asm/iseries/it_lp_reg_save.h> |
21 | #include <asm/paca.h> | 20 | #include <asm/paca.h> |
22 | #include <asm/iSeries/LparMap.h> | 21 | #include <asm/iseries/lpar_map.h> |
23 | #include <asm/iSeries/ItExtVpdPanel.h> | 22 | #include <asm/iseries/it_exp_vpd_panel.h> |
24 | #include <asm/iSeries/ItLpQueue.h> | 23 | #include <asm/iseries/it_lp_queue.h> |
25 | 24 | ||
25 | #include "naca.h" | ||
26 | #include "vpd_areas.h" | 26 | #include "vpd_areas.h" |
27 | #include "spcomm_area.h" | 27 | #include "spcomm_area.h" |
28 | #include "ipl_parms.h" | 28 | #include "ipl_parms.h" |
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c index 54c7753dbe05..e9fb98bf895f 100644 --- a/arch/powerpc/platforms/iseries/lpevents.c +++ b/arch/powerpc/platforms/iseries/lpevents.c | |||
@@ -17,10 +17,10 @@ | |||
17 | 17 | ||
18 | #include <asm/system.h> | 18 | #include <asm/system.h> |
19 | #include <asm/paca.h> | 19 | #include <asm/paca.h> |
20 | #include <asm/iSeries/ItLpQueue.h> | 20 | #include <asm/iseries/it_lp_queue.h> |
21 | #include <asm/iSeries/HvLpEvent.h> | 21 | #include <asm/iseries/hv_lp_event.h> |
22 | #include <asm/iSeries/HvCallEvent.h> | 22 | #include <asm/iseries/hv_call_event.h> |
23 | #include <asm/iSeries/ItLpNaca.h> | 23 | #include <asm/iseries/it_lp_naca.h> |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * The LpQueue is used to pass event data from the hypervisor to | 26 | * The LpQueue is used to pass event data from the hypervisor to |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index e5de31aa0015..49e7e4b85847 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
@@ -38,10 +38,10 @@ | |||
38 | #include <asm/uaccess.h> | 38 | #include <asm/uaccess.h> |
39 | #include <asm/paca.h> | 39 | #include <asm/paca.h> |
40 | #include <asm/abs_addr.h> | 40 | #include <asm/abs_addr.h> |
41 | #include <asm/iSeries/vio.h> | 41 | #include <asm/iseries/vio.h> |
42 | #include <asm/iSeries/mf.h> | 42 | #include <asm/iseries/mf.h> |
43 | #include <asm/iSeries/HvLpConfig.h> | 43 | #include <asm/iseries/hv_lp_config.h> |
44 | #include <asm/iSeries/ItLpQueue.h> | 44 | #include <asm/iseries/it_lp_queue.h> |
45 | 45 | ||
46 | #include "setup.h" | 46 | #include "setup.h" |
47 | 47 | ||
diff --git a/arch/powerpc/platforms/iseries/naca.h b/arch/powerpc/platforms/iseries/naca.h new file mode 100644 index 000000000000..ab2372eb8d2e --- /dev/null +++ b/arch/powerpc/platforms/iseries/naca.h | |||
@@ -0,0 +1,24 @@ | |||
1 | #ifndef _PLATFORMS_ISERIES_NACA_H | ||
2 | #define _PLATFORMS_ISERIES_NACA_H | ||
3 | |||
4 | /* | ||
5 | * c 2001 PPC 64 Team, IBM Corp | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version | ||
10 | * 2 of the License, or (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <asm/types.h> | ||
14 | |||
15 | struct naca_struct { | ||
16 | /* Kernel only data - undefined for user space */ | ||
17 | void *xItVpdAreas; /* VPD Data 0x00 */ | ||
18 | void *xRamDisk; /* iSeries ramdisk 0x08 */ | ||
19 | u64 xRamDiskSize; /* In pages 0x10 */ | ||
20 | }; | ||
21 | |||
22 | extern struct naca_struct naca; | ||
23 | |||
24 | #endif /* _PLATFORMS_ISERIES_NACA_H */ | ||
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 959e59fd9c11..7d7d5884343f 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -36,8 +36,8 @@ | |||
36 | #include <asm/iommu.h> | 36 | #include <asm/iommu.h> |
37 | #include <asm/abs_addr.h> | 37 | #include <asm/abs_addr.h> |
38 | 38 | ||
39 | #include <asm/iSeries/HvCallXm.h> | 39 | #include <asm/iseries/hv_call_xm.h> |
40 | #include <asm/iSeries/mf.h> | 40 | #include <asm/iseries/mf.h> |
41 | 41 | ||
42 | #include <asm/ppc-pci.h> | 42 | #include <asm/ppc-pci.h> |
43 | 43 | ||
diff --git a/arch/powerpc/platforms/iseries/proc.c b/arch/powerpc/platforms/iseries/proc.c index 6f1929cac66b..e68b6b5fa89f 100644 --- a/arch/powerpc/platforms/iseries/proc.c +++ b/arch/powerpc/platforms/iseries/proc.c | |||
@@ -24,8 +24,8 @@ | |||
24 | #include <asm/processor.h> | 24 | #include <asm/processor.h> |
25 | #include <asm/time.h> | 25 | #include <asm/time.h> |
26 | #include <asm/lppaca.h> | 26 | #include <asm/lppaca.h> |
27 | #include <asm/iSeries/ItLpQueue.h> | 27 | #include <asm/iseries/it_lp_queue.h> |
28 | #include <asm/iSeries/HvCallXm.h> | 28 | #include <asm/iseries/hv_call_xm.h> |
29 | 29 | ||
30 | #include "processor_vpd.h" | 30 | #include "processor_vpd.h" |
31 | #include "main_store.h" | 31 | #include "main_store.h" |
diff --git a/arch/powerpc/platforms/iseries/release_data.h b/arch/powerpc/platforms/iseries/release_data.h index c68b9c3e5caf..66189fd2e32d 100644 --- a/arch/powerpc/platforms/iseries/release_data.h +++ b/arch/powerpc/platforms/iseries/release_data.h | |||
@@ -24,7 +24,7 @@ | |||
24 | * address of the OS's NACA). | 24 | * address of the OS's NACA). |
25 | */ | 25 | */ |
26 | #include <asm/types.h> | 26 | #include <asm/types.h> |
27 | #include <asm/naca.h> | 27 | #include "naca.h" |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * When we IPL a secondary partition, we will check if if the | 30 | * When we IPL a secondary partition, we will check if if the |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 1544c6f10a38..c5207064977d 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/kdev_t.h> | 27 | #include <linux/kdev_t.h> |
28 | #include <linux/major.h> | 28 | #include <linux/major.h> |
29 | #include <linux/root_dev.h> | 29 | #include <linux/root_dev.h> |
30 | #include <linux/kernel.h> | ||
30 | 31 | ||
31 | #include <asm/processor.h> | 32 | #include <asm/processor.h> |
32 | #include <asm/machdep.h> | 33 | #include <asm/machdep.h> |
@@ -40,19 +41,19 @@ | |||
40 | #include <asm/firmware.h> | 41 | #include <asm/firmware.h> |
41 | 42 | ||
42 | #include <asm/time.h> | 43 | #include <asm/time.h> |
43 | #include <asm/naca.h> | ||
44 | #include <asm/paca.h> | 44 | #include <asm/paca.h> |
45 | #include <asm/cache.h> | 45 | #include <asm/cache.h> |
46 | #include <asm/sections.h> | 46 | #include <asm/sections.h> |
47 | #include <asm/abs_addr.h> | 47 | #include <asm/abs_addr.h> |
48 | #include <asm/iSeries/HvLpConfig.h> | 48 | #include <asm/iseries/hv_lp_config.h> |
49 | #include <asm/iSeries/HvCallEvent.h> | 49 | #include <asm/iseries/hv_call_event.h> |
50 | #include <asm/iSeries/HvCallXm.h> | 50 | #include <asm/iseries/hv_call_xm.h> |
51 | #include <asm/iSeries/ItLpQueue.h> | 51 | #include <asm/iseries/it_lp_queue.h> |
52 | #include <asm/iSeries/mf.h> | 52 | #include <asm/iseries/mf.h> |
53 | #include <asm/iSeries/HvLpEvent.h> | 53 | #include <asm/iseries/hv_lp_event.h> |
54 | #include <asm/iSeries/LparMap.h> | 54 | #include <asm/iseries/lpar_map.h> |
55 | 55 | ||
56 | #include "naca.h" | ||
56 | #include "setup.h" | 57 | #include "setup.h" |
57 | #include "irq.h" | 58 | #include "irq.h" |
58 | #include "vpd_areas.h" | 59 | #include "vpd_areas.h" |
@@ -94,6 +95,8 @@ extern unsigned long iSeries_recal_titan; | |||
94 | 95 | ||
95 | static int mf_initialized; | 96 | static int mf_initialized; |
96 | 97 | ||
98 | static unsigned long cmd_mem_limit; | ||
99 | |||
97 | struct MemoryBlock { | 100 | struct MemoryBlock { |
98 | unsigned long absStart; | 101 | unsigned long absStart; |
99 | unsigned long absEnd; | 102 | unsigned long absEnd; |
@@ -317,11 +320,11 @@ static void __init iSeries_init_early(void) | |||
317 | */ | 320 | */ |
318 | if (naca.xRamDisk) { | 321 | if (naca.xRamDisk) { |
319 | initrd_start = (unsigned long)__va(naca.xRamDisk); | 322 | initrd_start = (unsigned long)__va(naca.xRamDisk); |
320 | initrd_end = initrd_start + naca.xRamDiskSize * PAGE_SIZE; | 323 | initrd_end = initrd_start + naca.xRamDiskSize * HW_PAGE_SIZE; |
321 | initrd_below_start_ok = 1; // ramdisk in kernel space | 324 | initrd_below_start_ok = 1; // ramdisk in kernel space |
322 | ROOT_DEV = Root_RAM0; | 325 | ROOT_DEV = Root_RAM0; |
323 | if (((rd_size * 1024) / PAGE_SIZE) < naca.xRamDiskSize) | 326 | if (((rd_size * 1024) / HW_PAGE_SIZE) < naca.xRamDiskSize) |
324 | rd_size = (naca.xRamDiskSize * PAGE_SIZE) / 1024; | 327 | rd_size = (naca.xRamDiskSize * HW_PAGE_SIZE) / 1024; |
325 | } else | 328 | } else |
326 | #endif /* CONFIG_BLK_DEV_INITRD */ | 329 | #endif /* CONFIG_BLK_DEV_INITRD */ |
327 | { | 330 | { |
@@ -341,23 +344,6 @@ static void __init iSeries_init_early(void) | |||
341 | */ | 344 | */ |
342 | iommu_init_early_iSeries(); | 345 | iommu_init_early_iSeries(); |
343 | 346 | ||
344 | iSeries_get_cmdline(); | ||
345 | |||
346 | /* Save unparsed command line copy for /proc/cmdline */ | ||
347 | strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); | ||
348 | |||
349 | /* Parse early parameters, in particular mem=x */ | ||
350 | parse_early_param(); | ||
351 | |||
352 | if (memory_limit) { | ||
353 | if (memory_limit < systemcfg->physicalMemorySize) | ||
354 | systemcfg->physicalMemorySize = memory_limit; | ||
355 | else { | ||
356 | printk("Ignoring mem=%lu >= ram_top.\n", memory_limit); | ||
357 | memory_limit = 0; | ||
358 | } | ||
359 | } | ||
360 | |||
361 | /* Initialize machine-dependency vectors */ | 347 | /* Initialize machine-dependency vectors */ |
362 | #ifdef CONFIG_SMP | 348 | #ifdef CONFIG_SMP |
363 | smp_init_iSeries(); | 349 | smp_init_iSeries(); |
@@ -484,13 +470,14 @@ static void __init build_iSeries_Memory_Map(void) | |||
484 | */ | 470 | */ |
485 | hptFirstChunk = (u32)addr_to_chunk(HvCallHpt_getHptAddress()); | 471 | hptFirstChunk = (u32)addr_to_chunk(HvCallHpt_getHptAddress()); |
486 | hptSizePages = (u32)HvCallHpt_getHptPages(); | 472 | hptSizePages = (u32)HvCallHpt_getHptPages(); |
487 | hptSizeChunks = hptSizePages >> (MSCHUNKS_CHUNK_SHIFT - PAGE_SHIFT); | 473 | hptSizeChunks = hptSizePages >> |
474 | (MSCHUNKS_CHUNK_SHIFT - HW_PAGE_SHIFT); | ||
488 | hptLastChunk = hptFirstChunk + hptSizeChunks - 1; | 475 | hptLastChunk = hptFirstChunk + hptSizeChunks - 1; |
489 | 476 | ||
490 | printk("HPT absolute addr = %016lx, size = %dK\n", | 477 | printk("HPT absolute addr = %016lx, size = %dK\n", |
491 | chunk_to_addr(hptFirstChunk), hptSizeChunks * 256); | 478 | chunk_to_addr(hptFirstChunk), hptSizeChunks * 256); |
492 | 479 | ||
493 | ppc64_pft_size = __ilog2(hptSizePages * PAGE_SIZE); | 480 | ppc64_pft_size = __ilog2(hptSizePages * HW_PAGE_SIZE); |
494 | 481 | ||
495 | /* | 482 | /* |
496 | * The actual hashed page table is in the hypervisor, | 483 | * The actual hashed page table is in the hypervisor, |
@@ -643,7 +630,7 @@ static void __init iSeries_fixup_klimit(void) | |||
643 | */ | 630 | */ |
644 | if (naca.xRamDisk) | 631 | if (naca.xRamDisk) |
645 | klimit = KERNELBASE + (u64)naca.xRamDisk + | 632 | klimit = KERNELBASE + (u64)naca.xRamDisk + |
646 | (naca.xRamDiskSize * PAGE_SIZE); | 633 | (naca.xRamDiskSize * HW_PAGE_SIZE); |
647 | else { | 634 | else { |
648 | /* | 635 | /* |
649 | * No ram disk was included - check and see if there | 636 | * No ram disk was included - check and see if there |
@@ -971,6 +958,8 @@ void build_flat_dt(struct iseries_flat_dt *dt) | |||
971 | /* /chosen */ | 958 | /* /chosen */ |
972 | dt_start_node(dt, "chosen"); | 959 | dt_start_node(dt, "chosen"); |
973 | dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR); | 960 | dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR); |
961 | if (cmd_mem_limit) | ||
962 | dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit); | ||
974 | dt_end_node(dt); | 963 | dt_end_node(dt); |
975 | 964 | ||
976 | dt_cpus(dt); | 965 | dt_cpus(dt); |
@@ -990,7 +979,27 @@ void * __init iSeries_early_setup(void) | |||
990 | */ | 979 | */ |
991 | build_iSeries_Memory_Map(); | 980 | build_iSeries_Memory_Map(); |
992 | 981 | ||
982 | iSeries_get_cmdline(); | ||
983 | |||
984 | /* Save unparsed command line copy for /proc/cmdline */ | ||
985 | strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); | ||
986 | |||
987 | /* Parse early parameters, in particular mem=x */ | ||
988 | parse_early_param(); | ||
989 | |||
993 | build_flat_dt(&iseries_dt); | 990 | build_flat_dt(&iseries_dt); |
994 | 991 | ||
995 | return (void *) __pa(&iseries_dt); | 992 | return (void *) __pa(&iseries_dt); |
996 | } | 993 | } |
994 | |||
995 | /* | ||
996 | * On iSeries we just parse the mem=X option from the command line. | ||
997 | * On pSeries it's a bit more complicated, see prom_init_mem() | ||
998 | */ | ||
999 | static int __init early_parsemem(char *p) | ||
1000 | { | ||
1001 | if (p) | ||
1002 | cmd_mem_limit = ALIGN(memparse(p, &p), PAGE_SIZE); | ||
1003 | return 0; | ||
1004 | } | ||
1005 | early_param("mem", early_parsemem); | ||
diff --git a/arch/powerpc/platforms/iseries/smp.c b/arch/powerpc/platforms/iseries/smp.c index f720916682f6..3336bad67724 100644 --- a/arch/powerpc/platforms/iseries/smp.c +++ b/arch/powerpc/platforms/iseries/smp.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | #include <asm/smp.h> | 39 | #include <asm/smp.h> |
40 | #include <asm/paca.h> | 40 | #include <asm/paca.h> |
41 | #include <asm/iSeries/HvCall.h> | 41 | #include <asm/iseries/hv_call.h> |
42 | #include <asm/time.h> | 42 | #include <asm/time.h> |
43 | #include <asm/ppcdebug.h> | 43 | #include <asm/ppcdebug.h> |
44 | #include <asm/machdep.h> | 44 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/iseries/vio.c b/arch/powerpc/platforms/iseries/vio.c index c0f7d2e9153f..384360ee06ec 100644 --- a/arch/powerpc/platforms/iseries/vio.c +++ b/arch/powerpc/platforms/iseries/vio.c | |||
@@ -17,10 +17,10 @@ | |||
17 | #include <asm/tce.h> | 17 | #include <asm/tce.h> |
18 | #include <asm/abs_addr.h> | 18 | #include <asm/abs_addr.h> |
19 | #include <asm/page.h> | 19 | #include <asm/page.h> |
20 | #include <asm/iSeries/vio.h> | 20 | #include <asm/iseries/vio.h> |
21 | #include <asm/iSeries/HvTypes.h> | 21 | #include <asm/iseries/hv_types.h> |
22 | #include <asm/iSeries/HvLpConfig.h> | 22 | #include <asm/iseries/hv_lp_config.h> |
23 | #include <asm/iSeries/HvCallXm.h> | 23 | #include <asm/iseries/hv_call_xm.h> |
24 | 24 | ||
25 | struct device *iSeries_vio_dev = &vio_bus_device.dev; | 25 | struct device *iSeries_vio_dev = &vio_bus_device.dev; |
26 | EXPORT_SYMBOL(iSeries_vio_dev); | 26 | EXPORT_SYMBOL(iSeries_vio_dev); |
@@ -30,41 +30,14 @@ static struct iommu_table vio_iommu_table; | |||
30 | 30 | ||
31 | static void __init iommu_vio_init(void) | 31 | static void __init iommu_vio_init(void) |
32 | { | 32 | { |
33 | struct iommu_table *t; | 33 | iommu_table_getparms_iSeries(255, 0, 0xff, &veth_iommu_table); |
34 | struct iommu_table_cb cb; | 34 | veth_iommu_table.it_size /= 2; |
35 | unsigned long cbp; | 35 | vio_iommu_table = veth_iommu_table; |
36 | unsigned long itc_entries; | 36 | vio_iommu_table.it_offset += veth_iommu_table.it_size; |
37 | 37 | ||
38 | cb.itc_busno = 255; /* Bus 255 is the virtual bus */ | 38 | if (!iommu_init_table(&veth_iommu_table)) |
39 | cb.itc_virtbus = 0xff; /* Ask for virtual bus */ | ||
40 | |||
41 | cbp = virt_to_abs(&cb); | ||
42 | HvCallXm_getTceTableParms(cbp); | ||
43 | |||
44 | itc_entries = cb.itc_size * PAGE_SIZE / sizeof(union tce_entry); | ||
45 | veth_iommu_table.it_size = itc_entries / 2; | ||
46 | veth_iommu_table.it_busno = cb.itc_busno; | ||
47 | veth_iommu_table.it_offset = cb.itc_offset; | ||
48 | veth_iommu_table.it_index = cb.itc_index; | ||
49 | veth_iommu_table.it_type = TCE_VB; | ||
50 | veth_iommu_table.it_blocksize = 1; | ||
51 | |||
52 | t = iommu_init_table(&veth_iommu_table); | ||
53 | |||
54 | if (!t) | ||
55 | printk("Virtual Bus VETH TCE table failed.\n"); | 39 | printk("Virtual Bus VETH TCE table failed.\n"); |
56 | 40 | if (!iommu_init_table(&vio_iommu_table)) | |
57 | vio_iommu_table.it_size = itc_entries - veth_iommu_table.it_size; | ||
58 | vio_iommu_table.it_busno = cb.itc_busno; | ||
59 | vio_iommu_table.it_offset = cb.itc_offset + | ||
60 | veth_iommu_table.it_size; | ||
61 | vio_iommu_table.it_index = cb.itc_index; | ||
62 | vio_iommu_table.it_type = TCE_VB; | ||
63 | vio_iommu_table.it_blocksize = 1; | ||
64 | |||
65 | t = iommu_init_table(&vio_iommu_table); | ||
66 | |||
67 | if (!t) | ||
68 | printk("Virtual Bus VIO TCE table failed.\n"); | 41 | printk("Virtual Bus VIO TCE table failed.\n"); |
69 | } | 42 | } |
70 | 43 | ||
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c index c0c767bd37f1..842672695598 100644 --- a/arch/powerpc/platforms/iseries/viopath.c +++ b/arch/powerpc/platforms/iseries/viopath.c | |||
@@ -41,12 +41,12 @@ | |||
41 | 41 | ||
42 | #include <asm/system.h> | 42 | #include <asm/system.h> |
43 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
44 | #include <asm/iSeries/HvTypes.h> | 44 | #include <asm/iseries/hv_types.h> |
45 | #include <asm/iSeries/ItExtVpdPanel.h> | 45 | #include <asm/iseries/it_exp_vpd_panel.h> |
46 | #include <asm/iSeries/HvLpEvent.h> | 46 | #include <asm/iseries/hv_lp_event.h> |
47 | #include <asm/iSeries/HvLpConfig.h> | 47 | #include <asm/iseries/hv_lp_config.h> |
48 | #include <asm/iSeries/mf.h> | 48 | #include <asm/iseries/mf.h> |
49 | #include <asm/iSeries/vio.h> | 49 | #include <asm/iseries/vio.h> |
50 | 50 | ||
51 | /* Status of the path to each other partition in the system. | 51 | /* Status of the path to each other partition in the system. |
52 | * This is overkill, since we will only ever establish connections | 52 | * This is overkill, since we will only ever establish connections |
@@ -68,7 +68,8 @@ static DEFINE_SPINLOCK(statuslock); | |||
68 | * For each kind of event we allocate a buffer that is | 68 | * For each kind of event we allocate a buffer that is |
69 | * guaranteed not to cross a page boundary | 69 | * guaranteed not to cross a page boundary |
70 | */ | 70 | */ |
71 | static unsigned char event_buffer[VIO_MAX_SUBTYPES * 256] __page_aligned; | 71 | static unsigned char event_buffer[VIO_MAX_SUBTYPES * 256] |
72 | __attribute__((__aligned__(4096))); | ||
72 | static atomic_t event_buffer_available[VIO_MAX_SUBTYPES]; | 73 | static atomic_t event_buffer_available[VIO_MAX_SUBTYPES]; |
73 | static int event_buffer_initialised; | 74 | static int event_buffer_initialised; |
74 | 75 | ||
@@ -116,12 +117,12 @@ static int proc_viopath_show(struct seq_file *m, void *v) | |||
116 | HvLpEvent_Rc hvrc; | 117 | HvLpEvent_Rc hvrc; |
117 | DECLARE_MUTEX_LOCKED(Semaphore); | 118 | DECLARE_MUTEX_LOCKED(Semaphore); |
118 | 119 | ||
119 | buf = kmalloc(PAGE_SIZE, GFP_KERNEL); | 120 | buf = kmalloc(HW_PAGE_SIZE, GFP_KERNEL); |
120 | if (!buf) | 121 | if (!buf) |
121 | return 0; | 122 | return 0; |
122 | memset(buf, 0, PAGE_SIZE); | 123 | memset(buf, 0, HW_PAGE_SIZE); |
123 | 124 | ||
124 | handle = dma_map_single(iSeries_vio_dev, buf, PAGE_SIZE, | 125 | handle = dma_map_single(iSeries_vio_dev, buf, HW_PAGE_SIZE, |
125 | DMA_FROM_DEVICE); | 126 | DMA_FROM_DEVICE); |
126 | 127 | ||
127 | hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp, | 128 | hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp, |
@@ -131,7 +132,7 @@ static int proc_viopath_show(struct seq_file *m, void *v) | |||
131 | viopath_sourceinst(viopath_hostLp), | 132 | viopath_sourceinst(viopath_hostLp), |
132 | viopath_targetinst(viopath_hostLp), | 133 | viopath_targetinst(viopath_hostLp), |
133 | (u64)(unsigned long)&Semaphore, VIOVERSION << 16, | 134 | (u64)(unsigned long)&Semaphore, VIOVERSION << 16, |
134 | ((u64)handle) << 32, PAGE_SIZE, 0, 0); | 135 | ((u64)handle) << 32, HW_PAGE_SIZE, 0, 0); |
135 | 136 | ||
136 | if (hvrc != HvLpEvent_Rc_Good) | 137 | if (hvrc != HvLpEvent_Rc_Good) |
137 | printk(VIOPATH_KERN_WARN "hv error on op %d\n", (int)hvrc); | 138 | printk(VIOPATH_KERN_WARN "hv error on op %d\n", (int)hvrc); |
@@ -140,7 +141,7 @@ static int proc_viopath_show(struct seq_file *m, void *v) | |||
140 | 141 | ||
141 | vlanMap = HvLpConfig_getVirtualLanIndexMap(); | 142 | vlanMap = HvLpConfig_getVirtualLanIndexMap(); |
142 | 143 | ||
143 | buf[PAGE_SIZE-1] = '\0'; | 144 | buf[HW_PAGE_SIZE-1] = '\0'; |
144 | seq_printf(m, "%s", buf); | 145 | seq_printf(m, "%s", buf); |
145 | seq_printf(m, "AVAILABLE_VETH=%x\n", vlanMap); | 146 | seq_printf(m, "AVAILABLE_VETH=%x\n", vlanMap); |
146 | seq_printf(m, "SRLNBR=%c%c%c%c%c%c%c\n", | 147 | seq_printf(m, "SRLNBR=%c%c%c%c%c%c%c\n", |
@@ -152,7 +153,8 @@ static int proc_viopath_show(struct seq_file *m, void *v) | |||
152 | e2a(xItExtVpdPanel.systemSerial[4]), | 153 | e2a(xItExtVpdPanel.systemSerial[4]), |
153 | e2a(xItExtVpdPanel.systemSerial[5])); | 154 | e2a(xItExtVpdPanel.systemSerial[5])); |
154 | 155 | ||
155 | dma_unmap_single(iSeries_vio_dev, handle, PAGE_SIZE, DMA_FROM_DEVICE); | 156 | dma_unmap_single(iSeries_vio_dev, handle, HW_PAGE_SIZE, |
157 | DMA_FROM_DEVICE); | ||
156 | kfree(buf); | 158 | kfree(buf); |
157 | 159 | ||
158 | return 0; | 160 | return 0; |
diff --git a/arch/powerpc/platforms/iseries/vpdinfo.c b/arch/powerpc/platforms/iseries/vpdinfo.c index 9c318849dee7..23a6d1e5b429 100644 --- a/arch/powerpc/platforms/iseries/vpdinfo.c +++ b/arch/powerpc/platforms/iseries/vpdinfo.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <asm/resource.h> | 32 | #include <asm/resource.h> |
33 | #include <asm/abs_addr.h> | 33 | #include <asm/abs_addr.h> |
34 | #include <asm/pci-bridge.h> | 34 | #include <asm/pci-bridge.h> |
35 | #include <asm/iSeries/HvTypes.h> | 35 | #include <asm/iseries/hv_types.h> |
36 | 36 | ||
37 | #include "pci.h" | 37 | #include "pci.h" |
38 | #include "call_pci.h" | 38 | #include "call_pci.h" |
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 0037a8c8c81f..83a49e80ac29 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -576,7 +576,7 @@ void __init pmac_pic_init(void) | |||
576 | #endif /* CONFIG_PPC32 */ | 576 | #endif /* CONFIG_PPC32 */ |
577 | } | 577 | } |
578 | 578 | ||
579 | #ifdef CONFIG_PM | 579 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) |
580 | /* | 580 | /* |
581 | * These procedures are used in implementing sleep on the powerbooks. | 581 | * These procedures are used in implementing sleep on the powerbooks. |
582 | * sleep_save_intrs() saves the states of all interrupt enables | 582 | * sleep_save_intrs() saves the states of all interrupt enables |
@@ -643,7 +643,7 @@ static int pmacpic_resume(struct sys_device *sysdev) | |||
643 | return 0; | 643 | return 0; |
644 | } | 644 | } |
645 | 645 | ||
646 | #endif /* CONFIG_PM */ | 646 | #endif /* CONFIG_PM && CONFIG_PPC32 */ |
647 | 647 | ||
648 | static struct sysdev_class pmacpic_sysclass = { | 648 | static struct sysdev_class pmacpic_sysclass = { |
649 | set_kset_name("pmac_pic"), | 649 | set_kset_name("pmac_pic"), |
@@ -655,10 +655,10 @@ static struct sys_device device_pmacpic = { | |||
655 | }; | 655 | }; |
656 | 656 | ||
657 | static struct sysdev_driver driver_pmacpic = { | 657 | static struct sysdev_driver driver_pmacpic = { |
658 | #ifdef CONFIG_PM | 658 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) |
659 | .suspend = &pmacpic_suspend, | 659 | .suspend = &pmacpic_suspend, |
660 | .resume = &pmacpic_resume, | 660 | .resume = &pmacpic_resume, |
661 | #endif /* CONFIG_PM */ | 661 | #endif /* CONFIG_PM && CONFIG_PPC32 */ |
662 | }; | 662 | }; |
663 | 663 | ||
664 | static int __init init_pmacpic_sysfs(void) | 664 | static int __init init_pmacpic_sysfs(void) |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 6f62af597291..80b58c1ec412 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -75,6 +75,7 @@ | |||
75 | #include <asm/smu.h> | 75 | #include <asm/smu.h> |
76 | #include <asm/pmc.h> | 76 | #include <asm/pmc.h> |
77 | #include <asm/mpic.h> | 77 | #include <asm/mpic.h> |
78 | #include <asm/lmb.h> | ||
78 | 79 | ||
79 | #include "pmac.h" | 80 | #include "pmac.h" |
80 | 81 | ||
@@ -350,7 +351,7 @@ void __init pmac_setup_arch(void) | |||
350 | find_via_pmu(); | 351 | find_via_pmu(); |
351 | smu_init(); | 352 | smu_init(); |
352 | 353 | ||
353 | #ifdef CONFIG_NVRAM | 354 | #if defined(CONFIG_NVRAM) || defined(CONFIG_PPC64) |
354 | pmac_nvram_init(); | 355 | pmac_nvram_init(); |
355 | #endif | 356 | #endif |
356 | 357 | ||
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index 2d57f588151d..e3fc3407bb1f 100644 --- a/arch/powerpc/platforms/pseries/Kconfig +++ b/arch/powerpc/platforms/pseries/Kconfig | |||
@@ -21,15 +21,6 @@ config EEH | |||
21 | depends on PPC_PSERIES | 21 | depends on PPC_PSERIES |
22 | default y if !EMBEDDED | 22 | default y if !EMBEDDED |
23 | 23 | ||
24 | config RTAS_PROC | ||
25 | bool "Proc interface to RTAS" | ||
26 | depends on PPC_RTAS | ||
27 | default y | ||
28 | |||
29 | config RTAS_FLASH | ||
30 | tristate "Firmware flash interface" | ||
31 | depends on PPC64 && RTAS_PROC | ||
32 | |||
33 | config SCANLOG | 24 | config SCANLOG |
34 | tristate "Scanlog dump interface" | 25 | tristate "Scanlog dump interface" |
35 | depends on RTAS_PROC && PPC_PSERIES | 26 | depends on RTAS_PROC && PPC_PSERIES |
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile index 5ef494e3a70f..b9938fece781 100644 --- a/arch/powerpc/platforms/pseries/Makefile +++ b/arch/powerpc/platforms/pseries/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ | 1 | obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ |
2 | setup.o iommu.o rtas-fw.o ras.o | 2 | setup.o iommu.o ras.o rtasd.o |
3 | obj-$(CONFIG_SMP) += smp.o | 3 | obj-$(CONFIG_SMP) += smp.o |
4 | obj-$(CONFIG_IBMVIO) += vio.o | 4 | obj-$(CONFIG_IBMVIO) += vio.o |
5 | obj-$(CONFIG_XICS) += xics.o | 5 | obj-$(CONFIG_XICS) += xics.o |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 9e90d41131d8..513e27231493 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -42,13 +42,14 @@ | |||
42 | #include <asm/pci-bridge.h> | 42 | #include <asm/pci-bridge.h> |
43 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
44 | #include <asm/abs_addr.h> | 44 | #include <asm/abs_addr.h> |
45 | #include <asm/plpar_wrappers.h> | ||
46 | #include <asm/pSeries_reconfig.h> | 45 | #include <asm/pSeries_reconfig.h> |
47 | #include <asm/systemcfg.h> | 46 | #include <asm/systemcfg.h> |
48 | #include <asm/firmware.h> | 47 | #include <asm/firmware.h> |
49 | #include <asm/tce.h> | 48 | #include <asm/tce.h> |
50 | #include <asm/ppc-pci.h> | 49 | #include <asm/ppc-pci.h> |
51 | 50 | ||
51 | #include "plpar_wrappers.h" | ||
52 | |||
52 | #define DBG(fmt...) | 53 | #define DBG(fmt...) |
53 | 54 | ||
54 | extern int is_python(struct device_node *); | 55 | extern int is_python(struct device_node *); |
@@ -498,7 +499,7 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti | |||
498 | 499 | ||
499 | switch (action) { | 500 | switch (action) { |
500 | case PSERIES_RECONFIG_REMOVE: | 501 | case PSERIES_RECONFIG_REMOVE: |
501 | if (pci->iommu_table && | 502 | if (pci && pci->iommu_table && |
502 | get_property(np, "ibm,dma-window", NULL)) | 503 | get_property(np, "ibm,dma-window", NULL)) |
503 | iommu_free_table(np); | 504 | iommu_free_table(np); |
504 | break; | 505 | break; |
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 268d8362dde7..ab0c6dd6ec94 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define DEBUG | 22 | #undef DEBUG_LOW |
23 | 23 | ||
24 | #include <linux/config.h> | 24 | #include <linux/config.h> |
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
@@ -38,12 +38,13 @@ | |||
38 | #include <asm/prom.h> | 38 | #include <asm/prom.h> |
39 | #include <asm/abs_addr.h> | 39 | #include <asm/abs_addr.h> |
40 | #include <asm/cputable.h> | 40 | #include <asm/cputable.h> |
41 | #include <asm/plpar_wrappers.h> | ||
42 | 41 | ||
43 | #ifdef DEBUG | 42 | #include "plpar_wrappers.h" |
44 | #define DBG(fmt...) udbg_printf(fmt) | 43 | |
44 | #ifdef DEBUG_LOW | ||
45 | #define DBG_LOW(fmt...) do { udbg_printf(fmt); } while(0) | ||
45 | #else | 46 | #else |
46 | #define DBG(fmt...) | 47 | #define DBG_LOW(fmt...) do { } while(0) |
47 | #endif | 48 | #endif |
48 | 49 | ||
49 | /* in pSeries_hvCall.S */ | 50 | /* in pSeries_hvCall.S */ |
@@ -260,27 +261,24 @@ out: | |||
260 | void vpa_init(int cpu) | 261 | void vpa_init(int cpu) |
261 | { | 262 | { |
262 | int hwcpu = get_hard_smp_processor_id(cpu); | 263 | int hwcpu = get_hard_smp_processor_id(cpu); |
263 | unsigned long vpa = (unsigned long)&(paca[cpu].lppaca); | 264 | unsigned long vpa = __pa(&paca[cpu].lppaca); |
264 | long ret; | 265 | long ret; |
265 | unsigned long flags; | ||
266 | |||
267 | /* Register the Virtual Processor Area (VPA) */ | ||
268 | flags = 1UL << (63 - 18); | ||
269 | 266 | ||
270 | if (cpu_has_feature(CPU_FTR_ALTIVEC)) | 267 | if (cpu_has_feature(CPU_FTR_ALTIVEC)) |
271 | paca[cpu].lppaca.vmxregs_in_use = 1; | 268 | paca[cpu].lppaca.vmxregs_in_use = 1; |
272 | 269 | ||
273 | ret = register_vpa(flags, hwcpu, __pa(vpa)); | 270 | ret = register_vpa(hwcpu, vpa); |
274 | 271 | ||
275 | if (ret) | 272 | if (ret) |
276 | printk(KERN_ERR "WARNING: vpa_init: VPA registration for " | 273 | printk(KERN_ERR "WARNING: vpa_init: VPA registration for " |
277 | "cpu %d (hw %d) of area %lx returns %ld\n", | 274 | "cpu %d (hw %d) of area %lx returns %ld\n", |
278 | cpu, hwcpu, __pa(vpa), ret); | 275 | cpu, hwcpu, vpa, ret); |
279 | } | 276 | } |
280 | 277 | ||
281 | long pSeries_lpar_hpte_insert(unsigned long hpte_group, | 278 | long pSeries_lpar_hpte_insert(unsigned long hpte_group, |
282 | unsigned long va, unsigned long prpn, | 279 | unsigned long va, unsigned long pa, |
283 | unsigned long vflags, unsigned long rflags) | 280 | unsigned long rflags, unsigned long vflags, |
281 | int psize) | ||
284 | { | 282 | { |
285 | unsigned long lpar_rc; | 283 | unsigned long lpar_rc; |
286 | unsigned long flags; | 284 | unsigned long flags; |
@@ -288,11 +286,28 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group, | |||
288 | unsigned long hpte_v, hpte_r; | 286 | unsigned long hpte_v, hpte_r; |
289 | unsigned long dummy0, dummy1; | 287 | unsigned long dummy0, dummy1; |
290 | 288 | ||
291 | hpte_v = ((va >> 23) << HPTE_V_AVPN_SHIFT) | vflags | HPTE_V_VALID; | 289 | if (!(vflags & HPTE_V_BOLTED)) |
292 | if (vflags & HPTE_V_LARGE) | 290 | DBG_LOW("hpte_insert(group=%lx, va=%016lx, pa=%016lx, " |
293 | hpte_v &= ~(1UL << HPTE_V_AVPN_SHIFT); | 291 | "rflags=%lx, vflags=%lx, psize=%d)\n", |
294 | 292 | hpte_group, va, pa, rflags, vflags, psize); | |
295 | hpte_r = (prpn << HPTE_R_RPN_SHIFT) | rflags; | 293 | |
294 | hpte_v = hpte_encode_v(va, psize) | vflags | HPTE_V_VALID; | ||
295 | hpte_r = hpte_encode_r(pa, psize) | rflags; | ||
296 | |||
297 | if (!(vflags & HPTE_V_BOLTED)) | ||
298 | DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r); | ||
299 | |||
300 | #if 1 | ||
301 | { | ||
302 | int i; | ||
303 | for (i=0;i<8;i++) { | ||
304 | unsigned long w0, w1; | ||
305 | plpar_pte_read(0, hpte_group, &w0, &w1); | ||
306 | BUG_ON (HPTE_V_COMPARE(hpte_v, w0) | ||
307 | && (w0 & HPTE_V_VALID)); | ||
308 | } | ||
309 | } | ||
310 | #endif | ||
296 | 311 | ||
297 | /* Now fill in the actual HPTE */ | 312 | /* Now fill in the actual HPTE */ |
298 | /* Set CEC cookie to 0 */ | 313 | /* Set CEC cookie to 0 */ |
@@ -302,23 +317,30 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group, | |||
302 | /* Exact = 0 */ | 317 | /* Exact = 0 */ |
303 | flags = 0; | 318 | flags = 0; |
304 | 319 | ||
305 | /* XXX why is this here? - Anton */ | 320 | /* Make pHyp happy */ |
306 | if (rflags & (_PAGE_GUARDED|_PAGE_NO_CACHE)) | 321 | if (rflags & (_PAGE_GUARDED|_PAGE_NO_CACHE)) |
307 | hpte_r &= ~_PAGE_COHERENT; | 322 | hpte_r &= ~_PAGE_COHERENT; |
308 | 323 | ||
309 | lpar_rc = plpar_hcall(H_ENTER, flags, hpte_group, hpte_v, | 324 | lpar_rc = plpar_hcall(H_ENTER, flags, hpte_group, hpte_v, |
310 | hpte_r, &slot, &dummy0, &dummy1); | 325 | hpte_r, &slot, &dummy0, &dummy1); |
311 | 326 | if (unlikely(lpar_rc == H_PTEG_Full)) { | |
312 | if (unlikely(lpar_rc == H_PTEG_Full)) | 327 | if (!(vflags & HPTE_V_BOLTED)) |
328 | DBG_LOW(" full\n"); | ||
313 | return -1; | 329 | return -1; |
330 | } | ||
314 | 331 | ||
315 | /* | 332 | /* |
316 | * Since we try and ioremap PHBs we don't own, the pte insert | 333 | * Since we try and ioremap PHBs we don't own, the pte insert |
317 | * will fail. However we must catch the failure in hash_page | 334 | * will fail. However we must catch the failure in hash_page |
318 | * or we will loop forever, so return -2 in this case. | 335 | * or we will loop forever, so return -2 in this case. |
319 | */ | 336 | */ |
320 | if (unlikely(lpar_rc != H_Success)) | 337 | if (unlikely(lpar_rc != H_Success)) { |
338 | if (!(vflags & HPTE_V_BOLTED)) | ||
339 | DBG_LOW(" lpar err %d\n", lpar_rc); | ||
321 | return -2; | 340 | return -2; |
341 | } | ||
342 | if (!(vflags & HPTE_V_BOLTED)) | ||
343 | DBG_LOW(" -> slot: %d\n", slot & 7); | ||
322 | 344 | ||
323 | /* Because of iSeries, we have to pass down the secondary | 345 | /* Because of iSeries, we have to pass down the secondary |
324 | * bucket bit here as well | 346 | * bucket bit here as well |
@@ -343,10 +365,8 @@ static long pSeries_lpar_hpte_remove(unsigned long hpte_group) | |||
343 | /* don't remove a bolted entry */ | 365 | /* don't remove a bolted entry */ |
344 | lpar_rc = plpar_pte_remove(H_ANDCOND, hpte_group + slot_offset, | 366 | lpar_rc = plpar_pte_remove(H_ANDCOND, hpte_group + slot_offset, |
345 | (0x1UL << 4), &dummy1, &dummy2); | 367 | (0x1UL << 4), &dummy1, &dummy2); |
346 | |||
347 | if (lpar_rc == H_Success) | 368 | if (lpar_rc == H_Success) |
348 | return i; | 369 | return i; |
349 | |||
350 | BUG_ON(lpar_rc != H_Not_Found); | 370 | BUG_ON(lpar_rc != H_Not_Found); |
351 | 371 | ||
352 | slot_offset++; | 372 | slot_offset++; |
@@ -374,20 +394,28 @@ static void pSeries_lpar_hptab_clear(void) | |||
374 | * We can probably optimize here and assume the high bits of newpp are | 394 | * We can probably optimize here and assume the high bits of newpp are |
375 | * already zero. For now I am paranoid. | 395 | * already zero. For now I am paranoid. |
376 | */ | 396 | */ |
377 | static long pSeries_lpar_hpte_updatepp(unsigned long slot, unsigned long newpp, | 397 | static long pSeries_lpar_hpte_updatepp(unsigned long slot, |
378 | unsigned long va, int large, int local) | 398 | unsigned long newpp, |
399 | unsigned long va, | ||
400 | int psize, int local) | ||
379 | { | 401 | { |
380 | unsigned long lpar_rc; | 402 | unsigned long lpar_rc; |
381 | unsigned long flags = (newpp & 7) | H_AVPN; | 403 | unsigned long flags = (newpp & 7) | H_AVPN; |
382 | unsigned long avpn = va >> 23; | 404 | unsigned long want_v; |
383 | 405 | ||
384 | if (large) | 406 | want_v = hpte_encode_v(va, psize); |
385 | avpn &= ~0x1UL; | ||
386 | 407 | ||
387 | lpar_rc = plpar_pte_protect(flags, slot, (avpn << 7)); | 408 | DBG_LOW(" update: avpnv=%016lx, hash=%016lx, f=%x, psize: %d ... ", |
409 | want_v & HPTE_V_AVPN, slot, flags, psize); | ||
388 | 410 | ||
389 | if (lpar_rc == H_Not_Found) | 411 | lpar_rc = plpar_pte_protect(flags, slot, want_v & HPTE_V_AVPN); |
412 | |||
413 | if (lpar_rc == H_Not_Found) { | ||
414 | DBG_LOW("not found !\n"); | ||
390 | return -1; | 415 | return -1; |
416 | } | ||
417 | |||
418 | DBG_LOW("ok\n"); | ||
391 | 419 | ||
392 | BUG_ON(lpar_rc != H_Success); | 420 | BUG_ON(lpar_rc != H_Success); |
393 | 421 | ||
@@ -413,21 +441,22 @@ static unsigned long pSeries_lpar_hpte_getword0(unsigned long slot) | |||
413 | return dword0; | 441 | return dword0; |
414 | } | 442 | } |
415 | 443 | ||
416 | static long pSeries_lpar_hpte_find(unsigned long vpn) | 444 | static long pSeries_lpar_hpte_find(unsigned long va, int psize) |
417 | { | 445 | { |
418 | unsigned long hash; | 446 | unsigned long hash; |
419 | unsigned long i, j; | 447 | unsigned long i, j; |
420 | long slot; | 448 | long slot; |
421 | unsigned long hpte_v; | 449 | unsigned long want_v, hpte_v; |
422 | 450 | ||
423 | hash = hpt_hash(vpn, 0); | 451 | hash = hpt_hash(va, mmu_psize_defs[psize].shift); |
452 | want_v = hpte_encode_v(va, psize); | ||
424 | 453 | ||
425 | for (j = 0; j < 2; j++) { | 454 | for (j = 0; j < 2; j++) { |
426 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; | 455 | slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; |
427 | for (i = 0; i < HPTES_PER_GROUP; i++) { | 456 | for (i = 0; i < HPTES_PER_GROUP; i++) { |
428 | hpte_v = pSeries_lpar_hpte_getword0(slot); | 457 | hpte_v = pSeries_lpar_hpte_getword0(slot); |
429 | 458 | ||
430 | if ((HPTE_V_AVPN_VAL(hpte_v) == (vpn >> 11)) | 459 | if (HPTE_V_COMPARE(hpte_v, want_v) |
431 | && (hpte_v & HPTE_V_VALID) | 460 | && (hpte_v & HPTE_V_VALID) |
432 | && (!!(hpte_v & HPTE_V_SECONDARY) == j)) { | 461 | && (!!(hpte_v & HPTE_V_SECONDARY) == j)) { |
433 | /* HPTE matches */ | 462 | /* HPTE matches */ |
@@ -444,17 +473,15 @@ static long pSeries_lpar_hpte_find(unsigned long vpn) | |||
444 | } | 473 | } |
445 | 474 | ||
446 | static void pSeries_lpar_hpte_updateboltedpp(unsigned long newpp, | 475 | static void pSeries_lpar_hpte_updateboltedpp(unsigned long newpp, |
447 | unsigned long ea) | 476 | unsigned long ea, |
477 | int psize) | ||
448 | { | 478 | { |
449 | unsigned long lpar_rc; | 479 | unsigned long lpar_rc, slot, vsid, va, flags; |
450 | unsigned long vsid, va, vpn, flags; | ||
451 | long slot; | ||
452 | 480 | ||
453 | vsid = get_kernel_vsid(ea); | 481 | vsid = get_kernel_vsid(ea); |
454 | va = (vsid << 28) | (ea & 0x0fffffff); | 482 | va = (vsid << 28) | (ea & 0x0fffffff); |
455 | vpn = va >> PAGE_SHIFT; | ||
456 | 483 | ||
457 | slot = pSeries_lpar_hpte_find(vpn); | 484 | slot = pSeries_lpar_hpte_find(va, psize); |
458 | BUG_ON(slot == -1); | 485 | BUG_ON(slot == -1); |
459 | 486 | ||
460 | flags = newpp & 7; | 487 | flags = newpp & 7; |
@@ -464,18 +491,18 @@ static void pSeries_lpar_hpte_updateboltedpp(unsigned long newpp, | |||
464 | } | 491 | } |
465 | 492 | ||
466 | static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va, | 493 | static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va, |
467 | int large, int local) | 494 | int psize, int local) |
468 | { | 495 | { |
469 | unsigned long avpn = va >> 23; | 496 | unsigned long want_v; |
470 | unsigned long lpar_rc; | 497 | unsigned long lpar_rc; |
471 | unsigned long dummy1, dummy2; | 498 | unsigned long dummy1, dummy2; |
472 | 499 | ||
473 | if (large) | 500 | DBG_LOW(" inval : slot=%lx, va=%016lx, psize: %d, local: %d", |
474 | avpn &= ~0x1UL; | 501 | slot, va, psize, local); |
475 | |||
476 | lpar_rc = plpar_pte_remove(H_AVPN, slot, (avpn << 7), &dummy1, | ||
477 | &dummy2); | ||
478 | 502 | ||
503 | want_v = hpte_encode_v(va, psize); | ||
504 | lpar_rc = plpar_pte_remove(H_AVPN, slot, want_v & HPTE_V_AVPN, | ||
505 | &dummy1, &dummy2); | ||
479 | if (lpar_rc == H_Not_Found) | 506 | if (lpar_rc == H_Not_Found) |
480 | return; | 507 | return; |
481 | 508 | ||
@@ -497,7 +524,8 @@ void pSeries_lpar_flush_hash_range(unsigned long number, int local) | |||
497 | spin_lock_irqsave(&pSeries_lpar_tlbie_lock, flags); | 524 | spin_lock_irqsave(&pSeries_lpar_tlbie_lock, flags); |
498 | 525 | ||
499 | for (i = 0; i < number; i++) | 526 | for (i = 0; i < number; i++) |
500 | flush_hash_page(batch->vaddr[i], batch->pte[i], local); | 527 | flush_hash_page(batch->vaddr[i], batch->pte[i], |
528 | batch->psize, local); | ||
501 | 529 | ||
502 | if (lock_tlbie) | 530 | if (lock_tlbie) |
503 | spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags); | 531 | spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags); |
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h new file mode 100644 index 000000000000..382f8c5b0e7c --- /dev/null +++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h | |||
@@ -0,0 +1,120 @@ | |||
1 | #ifndef _PSERIES_PLPAR_WRAPPERS_H | ||
2 | #define _PSERIES_PLPAR_WRAPPERS_H | ||
3 | |||
4 | #include <asm/hvcall.h> | ||
5 | |||
6 | static inline long poll_pending(void) | ||
7 | { | ||
8 | unsigned long dummy; | ||
9 | return plpar_hcall(H_POLL_PENDING, 0, 0, 0, 0, &dummy, &dummy, &dummy); | ||
10 | } | ||
11 | |||
12 | static inline long prod_processor(void) | ||
13 | { | ||
14 | plpar_hcall_norets(H_PROD); | ||
15 | return 0; | ||
16 | } | ||
17 | |||
18 | static inline long cede_processor(void) | ||
19 | { | ||
20 | plpar_hcall_norets(H_CEDE); | ||
21 | return 0; | ||
22 | } | ||
23 | |||
24 | static inline long vpa_call(unsigned long flags, unsigned long cpu, | ||
25 | unsigned long vpa) | ||
26 | { | ||
27 | /* flags are in bits 16-18 (counting from most significant bit) */ | ||
28 | flags = flags << (63 - 18); | ||
29 | |||
30 | return plpar_hcall_norets(H_REGISTER_VPA, flags, cpu, vpa); | ||
31 | } | ||
32 | |||
33 | static inline long unregister_vpa(unsigned long cpu, unsigned long vpa) | ||
34 | { | ||
35 | return vpa_call(0x5, cpu, vpa); | ||
36 | } | ||
37 | |||
38 | static inline long register_vpa(unsigned long cpu, unsigned long vpa) | ||
39 | { | ||
40 | return vpa_call(0x1, cpu, vpa); | ||
41 | } | ||
42 | |||
43 | extern void vpa_init(int cpu); | ||
44 | |||
45 | static inline long plpar_pte_remove(unsigned long flags, unsigned long ptex, | ||
46 | unsigned long avpn, unsigned long *old_pteh_ret, | ||
47 | unsigned long *old_ptel_ret) | ||
48 | { | ||
49 | unsigned long dummy; | ||
50 | return plpar_hcall(H_REMOVE, flags, ptex, avpn, 0, old_pteh_ret, | ||
51 | old_ptel_ret, &dummy); | ||
52 | } | ||
53 | |||
54 | static inline long plpar_pte_read(unsigned long flags, unsigned long ptex, | ||
55 | unsigned long *old_pteh_ret, unsigned long *old_ptel_ret) | ||
56 | { | ||
57 | unsigned long dummy; | ||
58 | return plpar_hcall(H_READ, flags, ptex, 0, 0, old_pteh_ret, | ||
59 | old_ptel_ret, &dummy); | ||
60 | } | ||
61 | |||
62 | static inline long plpar_pte_protect(unsigned long flags, unsigned long ptex, | ||
63 | unsigned long avpn) | ||
64 | { | ||
65 | return plpar_hcall_norets(H_PROTECT, flags, ptex, avpn); | ||
66 | } | ||
67 | |||
68 | static inline long plpar_tce_get(unsigned long liobn, unsigned long ioba, | ||
69 | unsigned long *tce_ret) | ||
70 | { | ||
71 | unsigned long dummy; | ||
72 | return plpar_hcall(H_GET_TCE, liobn, ioba, 0, 0, tce_ret, &dummy, | ||
73 | &dummy); | ||
74 | } | ||
75 | |||
76 | static inline long plpar_tce_put(unsigned long liobn, unsigned long ioba, | ||
77 | unsigned long tceval) | ||
78 | { | ||
79 | return plpar_hcall_norets(H_PUT_TCE, liobn, ioba, tceval); | ||
80 | } | ||
81 | |||
82 | static inline long plpar_tce_put_indirect(unsigned long liobn, | ||
83 | unsigned long ioba, unsigned long page, unsigned long count) | ||
84 | { | ||
85 | return plpar_hcall_norets(H_PUT_TCE_INDIRECT, liobn, ioba, page, count); | ||
86 | } | ||
87 | |||
88 | static inline long plpar_tce_stuff(unsigned long liobn, unsigned long ioba, | ||
89 | unsigned long tceval, unsigned long count) | ||
90 | { | ||
91 | return plpar_hcall_norets(H_STUFF_TCE, liobn, ioba, tceval, count); | ||
92 | } | ||
93 | |||
94 | static inline long plpar_get_term_char(unsigned long termno, | ||
95 | unsigned long *len_ret, char *buf_ret) | ||
96 | { | ||
97 | unsigned long *lbuf = (unsigned long *)buf_ret; /* TODO: alignment? */ | ||
98 | return plpar_hcall(H_GET_TERM_CHAR, termno, 0, 0, 0, len_ret, | ||
99 | lbuf + 0, lbuf + 1); | ||
100 | } | ||
101 | |||
102 | static inline long plpar_put_term_char(unsigned long termno, unsigned long len, | ||
103 | const char *buffer) | ||
104 | { | ||
105 | unsigned long *lbuf = (unsigned long *)buffer; /* TODO: alignment? */ | ||
106 | return plpar_hcall_norets(H_PUT_TERM_CHAR, termno, len, lbuf[0], | ||
107 | lbuf[1]); | ||
108 | } | ||
109 | |||
110 | static inline long plpar_set_xdabr(unsigned long address, unsigned long flags) | ||
111 | { | ||
112 | return plpar_hcall_norets(H_SET_XDABR, address, flags); | ||
113 | } | ||
114 | |||
115 | static inline long plpar_set_dabr(unsigned long val) | ||
116 | { | ||
117 | return plpar_hcall_norets(H_SET_DABR, val); | ||
118 | } | ||
119 | |||
120 | #endif /* _PSERIES_PLPAR_WRAPPERS_H */ | ||
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c index 58c61219d08e..d7d400339458 100644 --- a/arch/powerpc/platforms/pseries/reconfig.c +++ b/arch/powerpc/platforms/pseries/reconfig.c | |||
@@ -286,10 +286,8 @@ static struct property *new_property(const char *name, const int length, | |||
286 | return new; | 286 | return new; |
287 | 287 | ||
288 | cleanup: | 288 | cleanup: |
289 | if (new->name) | 289 | kfree(new->name); |
290 | kfree(new->name); | 290 | kfree(new->value); |
291 | if (new->value) | ||
292 | kfree(new->value); | ||
293 | kfree(new); | 291 | kfree(new); |
294 | return NULL; | 292 | return NULL; |
295 | } | 293 | } |
diff --git a/arch/powerpc/platforms/pseries/rtas-fw.c b/arch/powerpc/platforms/pseries/rtas-fw.c deleted file mode 100644 index 15d81d758ca0..000000000000 --- a/arch/powerpc/platforms/pseries/rtas-fw.c +++ /dev/null | |||
@@ -1,138 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Procedures for firmware flash updates on pSeries systems. | ||
4 | * | ||
5 | * Peter Bergner, IBM March 2001. | ||
6 | * Copyright (C) 2001 IBM. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | * 2 of the License, or (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #include <stdarg.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/spinlock.h> | ||
18 | #include <linux/module.h> | ||
19 | #include <linux/init.h> | ||
20 | |||
21 | #include <asm/prom.h> | ||
22 | #include <asm/rtas.h> | ||
23 | #include <asm/semaphore.h> | ||
24 | #include <asm/machdep.h> | ||
25 | #include <asm/page.h> | ||
26 | #include <asm/param.h> | ||
27 | #include <asm/system.h> | ||
28 | #include <asm/abs_addr.h> | ||
29 | #include <asm/udbg.h> | ||
30 | #include <asm/delay.h> | ||
31 | #include <asm/uaccess.h> | ||
32 | #include <asm/systemcfg.h> | ||
33 | |||
34 | #include "rtas-fw.h" | ||
35 | |||
36 | struct flash_block_list_header rtas_firmware_flash_list = {0, NULL}; | ||
37 | |||
38 | #define FLASH_BLOCK_LIST_VERSION (1UL) | ||
39 | |||
40 | static void rtas_flash_firmware(void) | ||
41 | { | ||
42 | unsigned long image_size; | ||
43 | struct flash_block_list *f, *next, *flist; | ||
44 | unsigned long rtas_block_list; | ||
45 | int i, status, update_token; | ||
46 | |||
47 | update_token = rtas_token("ibm,update-flash-64-and-reboot"); | ||
48 | if (update_token == RTAS_UNKNOWN_SERVICE) { | ||
49 | printk(KERN_ALERT "FLASH: ibm,update-flash-64-and-reboot is not available -- not a service partition?\n"); | ||
50 | printk(KERN_ALERT "FLASH: firmware will not be flashed\n"); | ||
51 | return; | ||
52 | } | ||
53 | |||
54 | /* NOTE: the "first" block list is a global var with no data | ||
55 | * blocks in the kernel data segment. We do this because | ||
56 | * we want to ensure this block_list addr is under 4GB. | ||
57 | */ | ||
58 | rtas_firmware_flash_list.num_blocks = 0; | ||
59 | flist = (struct flash_block_list *)&rtas_firmware_flash_list; | ||
60 | rtas_block_list = virt_to_abs(flist); | ||
61 | if (rtas_block_list >= 4UL*1024*1024*1024) { | ||
62 | printk(KERN_ALERT "FLASH: kernel bug...flash list header addr above 4GB\n"); | ||
63 | return; | ||
64 | } | ||
65 | |||
66 | printk(KERN_ALERT "FLASH: preparing saved firmware image for flash\n"); | ||
67 | /* Update the block_list in place. */ | ||
68 | image_size = 0; | ||
69 | for (f = flist; f; f = next) { | ||
70 | /* Translate data addrs to absolute */ | ||
71 | for (i = 0; i < f->num_blocks; i++) { | ||
72 | f->blocks[i].data = (char *)virt_to_abs(f->blocks[i].data); | ||
73 | image_size += f->blocks[i].length; | ||
74 | } | ||
75 | next = f->next; | ||
76 | /* Don't translate NULL pointer for last entry */ | ||
77 | if (f->next) | ||
78 | f->next = (struct flash_block_list *)virt_to_abs(f->next); | ||
79 | else | ||
80 | f->next = NULL; | ||
81 | /* make num_blocks into the version/length field */ | ||
82 | f->num_blocks = (FLASH_BLOCK_LIST_VERSION << 56) | ((f->num_blocks+1)*16); | ||
83 | } | ||
84 | |||
85 | printk(KERN_ALERT "FLASH: flash image is %ld bytes\n", image_size); | ||
86 | printk(KERN_ALERT "FLASH: performing flash and reboot\n"); | ||
87 | rtas_progress("Flashing \n", 0x0); | ||
88 | rtas_progress("Please Wait... ", 0x0); | ||
89 | printk(KERN_ALERT "FLASH: this will take several minutes. Do not power off!\n"); | ||
90 | status = rtas_call(update_token, 1, 1, NULL, rtas_block_list); | ||
91 | switch (status) { /* should only get "bad" status */ | ||
92 | case 0: | ||
93 | printk(KERN_ALERT "FLASH: success\n"); | ||
94 | break; | ||
95 | case -1: | ||
96 | printk(KERN_ALERT "FLASH: hardware error. Firmware may not be not flashed\n"); | ||
97 | break; | ||
98 | case -3: | ||
99 | printk(KERN_ALERT "FLASH: image is corrupt or not correct for this platform. Firmware not flashed\n"); | ||
100 | break; | ||
101 | case -4: | ||
102 | printk(KERN_ALERT "FLASH: flash failed when partially complete. System may not reboot\n"); | ||
103 | break; | ||
104 | default: | ||
105 | printk(KERN_ALERT "FLASH: unknown flash return code %d\n", status); | ||
106 | break; | ||
107 | } | ||
108 | } | ||
109 | |||
110 | void rtas_flash_bypass_warning(void) | ||
111 | { | ||
112 | printk(KERN_ALERT "FLASH: firmware flash requires a reboot\n"); | ||
113 | printk(KERN_ALERT "FLASH: the firmware image will NOT be flashed\n"); | ||
114 | } | ||
115 | |||
116 | |||
117 | void rtas_fw_restart(char *cmd) | ||
118 | { | ||
119 | if (rtas_firmware_flash_list.next) | ||
120 | rtas_flash_firmware(); | ||
121 | rtas_restart(cmd); | ||
122 | } | ||
123 | |||
124 | void rtas_fw_power_off(void) | ||
125 | { | ||
126 | if (rtas_firmware_flash_list.next) | ||
127 | rtas_flash_bypass_warning(); | ||
128 | rtas_power_off(); | ||
129 | } | ||
130 | |||
131 | void rtas_fw_halt(void) | ||
132 | { | ||
133 | if (rtas_firmware_flash_list.next) | ||
134 | rtas_flash_bypass_warning(); | ||
135 | rtas_halt(); | ||
136 | } | ||
137 | |||
138 | EXPORT_SYMBOL(rtas_firmware_flash_list); | ||
diff --git a/arch/powerpc/platforms/pseries/rtas-fw.h b/arch/powerpc/platforms/pseries/rtas-fw.h deleted file mode 100644 index e70fa69974a3..000000000000 --- a/arch/powerpc/platforms/pseries/rtas-fw.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | void rtas_fw_restart(char *cmd); | ||
2 | void rtas_fw_power_off(void); | ||
3 | void rtas_fw_halt(void); | ||
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c new file mode 100644 index 000000000000..e26b0420b6dd --- /dev/null +++ b/arch/powerpc/platforms/pseries/rtasd.c | |||
@@ -0,0 +1,527 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 Anton Blanchard <anton@au.ibm.com>, IBM | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * Communication to userspace based on kernel/printk.c | ||
10 | */ | ||
11 | |||
12 | #include <linux/types.h> | ||
13 | #include <linux/errno.h> | ||
14 | #include <linux/sched.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/poll.h> | ||
17 | #include <linux/proc_fs.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/vmalloc.h> | ||
20 | #include <linux/spinlock.h> | ||
21 | #include <linux/cpu.h> | ||
22 | #include <linux/delay.h> | ||
23 | |||
24 | #include <asm/uaccess.h> | ||
25 | #include <asm/io.h> | ||
26 | #include <asm/rtas.h> | ||
27 | #include <asm/prom.h> | ||
28 | #include <asm/nvram.h> | ||
29 | #include <asm/atomic.h> | ||
30 | #include <asm/systemcfg.h> | ||
31 | |||
32 | #if 0 | ||
33 | #define DEBUG(A...) printk(KERN_ERR A) | ||
34 | #else | ||
35 | #define DEBUG(A...) | ||
36 | #endif | ||
37 | |||
38 | static DEFINE_SPINLOCK(rtasd_log_lock); | ||
39 | |||
40 | DECLARE_WAIT_QUEUE_HEAD(rtas_log_wait); | ||
41 | |||
42 | static char *rtas_log_buf; | ||
43 | static unsigned long rtas_log_start; | ||
44 | static unsigned long rtas_log_size; | ||
45 | |||
46 | static int surveillance_timeout = -1; | ||
47 | static unsigned int rtas_event_scan_rate; | ||
48 | static unsigned int rtas_error_log_max; | ||
49 | static unsigned int rtas_error_log_buffer_max; | ||
50 | |||
51 | static int full_rtas_msgs = 0; | ||
52 | |||
53 | extern int no_logging; | ||
54 | |||
55 | volatile int error_log_cnt = 0; | ||
56 | |||
57 | /* | ||
58 | * Since we use 32 bit RTAS, the physical address of this must be below | ||
59 | * 4G or else bad things happen. Allocate this in the kernel data and | ||
60 | * make it big enough. | ||
61 | */ | ||
62 | static unsigned char logdata[RTAS_ERROR_LOG_MAX]; | ||
63 | |||
64 | static int get_eventscan_parms(void); | ||
65 | |||
66 | static char *rtas_type[] = { | ||
67 | "Unknown", "Retry", "TCE Error", "Internal Device Failure", | ||
68 | "Timeout", "Data Parity", "Address Parity", "Cache Parity", | ||
69 | "Address Invalid", "ECC Uncorrected", "ECC Corrupted", | ||
70 | }; | ||
71 | |||
72 | static char *rtas_event_type(int type) | ||
73 | { | ||
74 | if ((type > 0) && (type < 11)) | ||
75 | return rtas_type[type]; | ||
76 | |||
77 | switch (type) { | ||
78 | case RTAS_TYPE_EPOW: | ||
79 | return "EPOW"; | ||
80 | case RTAS_TYPE_PLATFORM: | ||
81 | return "Platform Error"; | ||
82 | case RTAS_TYPE_IO: | ||
83 | return "I/O Event"; | ||
84 | case RTAS_TYPE_INFO: | ||
85 | return "Platform Information Event"; | ||
86 | case RTAS_TYPE_DEALLOC: | ||
87 | return "Resource Deallocation Event"; | ||
88 | case RTAS_TYPE_DUMP: | ||
89 | return "Dump Notification Event"; | ||
90 | } | ||
91 | |||
92 | return rtas_type[0]; | ||
93 | } | ||
94 | |||
95 | /* To see this info, grep RTAS /var/log/messages and each entry | ||
96 | * will be collected together with obvious begin/end. | ||
97 | * There will be a unique identifier on the begin and end lines. | ||
98 | * This will persist across reboots. | ||
99 | * | ||
100 | * format of error logs returned from RTAS: | ||
101 | * bytes (size) : contents | ||
102 | * -------------------------------------------------------- | ||
103 | * 0-7 (8) : rtas_error_log | ||
104 | * 8-47 (40) : extended info | ||
105 | * 48-51 (4) : vendor id | ||
106 | * 52-1023 (vendor specific) : location code and debug data | ||
107 | */ | ||
108 | static void printk_log_rtas(char *buf, int len) | ||
109 | { | ||
110 | |||
111 | int i,j,n = 0; | ||
112 | int perline = 16; | ||
113 | char buffer[64]; | ||
114 | char * str = "RTAS event"; | ||
115 | |||
116 | if (full_rtas_msgs) { | ||
117 | printk(RTAS_DEBUG "%d -------- %s begin --------\n", | ||
118 | error_log_cnt, str); | ||
119 | |||
120 | /* | ||
121 | * Print perline bytes on each line, each line will start | ||
122 | * with RTAS and a changing number, so syslogd will | ||
123 | * print lines that are otherwise the same. Separate every | ||
124 | * 4 bytes with a space. | ||
125 | */ | ||
126 | for (i = 0; i < len; i++) { | ||
127 | j = i % perline; | ||
128 | if (j == 0) { | ||
129 | memset(buffer, 0, sizeof(buffer)); | ||
130 | n = sprintf(buffer, "RTAS %d:", i/perline); | ||
131 | } | ||
132 | |||
133 | if ((i % 4) == 0) | ||
134 | n += sprintf(buffer+n, " "); | ||
135 | |||
136 | n += sprintf(buffer+n, "%02x", (unsigned char)buf[i]); | ||
137 | |||
138 | if (j == (perline-1)) | ||
139 | printk(KERN_DEBUG "%s\n", buffer); | ||
140 | } | ||
141 | if ((i % perline) != 0) | ||
142 | printk(KERN_DEBUG "%s\n", buffer); | ||
143 | |||
144 | printk(RTAS_DEBUG "%d -------- %s end ----------\n", | ||
145 | error_log_cnt, str); | ||
146 | } else { | ||
147 | struct rtas_error_log *errlog = (struct rtas_error_log *)buf; | ||
148 | |||
149 | printk(RTAS_DEBUG "event: %d, Type: %s, Severity: %d\n", | ||
150 | error_log_cnt, rtas_event_type(errlog->type), | ||
151 | errlog->severity); | ||
152 | } | ||
153 | } | ||
154 | |||
155 | static int log_rtas_len(char * buf) | ||
156 | { | ||
157 | int len; | ||
158 | struct rtas_error_log *err; | ||
159 | |||
160 | /* rtas fixed header */ | ||
161 | len = 8; | ||
162 | err = (struct rtas_error_log *)buf; | ||
163 | if (err->extended_log_length) { | ||
164 | |||
165 | /* extended header */ | ||
166 | len += err->extended_log_length; | ||
167 | } | ||
168 | |||
169 | if (rtas_error_log_max == 0) { | ||
170 | get_eventscan_parms(); | ||
171 | } | ||
172 | if (len > rtas_error_log_max) | ||
173 | len = rtas_error_log_max; | ||
174 | |||
175 | return len; | ||
176 | } | ||
177 | |||
178 | /* | ||
179 | * First write to nvram, if fatal error, that is the only | ||
180 | * place we log the info. The error will be picked up | ||
181 | * on the next reboot by rtasd. If not fatal, run the | ||
182 | * method for the type of error. Currently, only RTAS | ||
183 | * errors have methods implemented, but in the future | ||
184 | * there might be a need to store data in nvram before a | ||
185 | * call to panic(). | ||
186 | * | ||
187 | * XXX We write to nvram periodically, to indicate error has | ||
188 | * been written and sync'd, but there is a possibility | ||
189 | * that if we don't shutdown correctly, a duplicate error | ||
190 | * record will be created on next reboot. | ||
191 | */ | ||
192 | void pSeries_log_error(char *buf, unsigned int err_type, int fatal) | ||
193 | { | ||
194 | unsigned long offset; | ||
195 | unsigned long s; | ||
196 | int len = 0; | ||
197 | |||
198 | DEBUG("logging event\n"); | ||
199 | if (buf == NULL) | ||
200 | return; | ||
201 | |||
202 | spin_lock_irqsave(&rtasd_log_lock, s); | ||
203 | |||
204 | /* get length and increase count */ | ||
205 | switch (err_type & ERR_TYPE_MASK) { | ||
206 | case ERR_TYPE_RTAS_LOG: | ||
207 | len = log_rtas_len(buf); | ||
208 | if (!(err_type & ERR_FLAG_BOOT)) | ||
209 | error_log_cnt++; | ||
210 | break; | ||
211 | case ERR_TYPE_KERNEL_PANIC: | ||
212 | default: | ||
213 | spin_unlock_irqrestore(&rtasd_log_lock, s); | ||
214 | return; | ||
215 | } | ||
216 | |||
217 | /* Write error to NVRAM */ | ||
218 | if (!no_logging && !(err_type & ERR_FLAG_BOOT)) | ||
219 | nvram_write_error_log(buf, len, err_type); | ||
220 | |||
221 | /* | ||
222 | * rtas errors can occur during boot, and we do want to capture | ||
223 | * those somewhere, even if nvram isn't ready (why not?), and even | ||
224 | * if rtasd isn't ready. Put them into the boot log, at least. | ||
225 | */ | ||
226 | if ((err_type & ERR_TYPE_MASK) == ERR_TYPE_RTAS_LOG) | ||
227 | printk_log_rtas(buf, len); | ||
228 | |||
229 | /* Check to see if we need to or have stopped logging */ | ||
230 | if (fatal || no_logging) { | ||
231 | no_logging = 1; | ||
232 | spin_unlock_irqrestore(&rtasd_log_lock, s); | ||
233 | return; | ||
234 | } | ||
235 | |||
236 | /* call type specific method for error */ | ||
237 | switch (err_type & ERR_TYPE_MASK) { | ||
238 | case ERR_TYPE_RTAS_LOG: | ||
239 | offset = rtas_error_log_buffer_max * | ||
240 | ((rtas_log_start+rtas_log_size) & LOG_NUMBER_MASK); | ||
241 | |||
242 | /* First copy over sequence number */ | ||
243 | memcpy(&rtas_log_buf[offset], (void *) &error_log_cnt, sizeof(int)); | ||
244 | |||
245 | /* Second copy over error log data */ | ||
246 | offset += sizeof(int); | ||
247 | memcpy(&rtas_log_buf[offset], buf, len); | ||
248 | |||
249 | if (rtas_log_size < LOG_NUMBER) | ||
250 | rtas_log_size += 1; | ||
251 | else | ||
252 | rtas_log_start += 1; | ||
253 | |||
254 | spin_unlock_irqrestore(&rtasd_log_lock, s); | ||
255 | wake_up_interruptible(&rtas_log_wait); | ||
256 | break; | ||
257 | case ERR_TYPE_KERNEL_PANIC: | ||
258 | default: | ||
259 | spin_unlock_irqrestore(&rtasd_log_lock, s); | ||
260 | return; | ||
261 | } | ||
262 | |||
263 | } | ||
264 | |||
265 | |||
266 | static int rtas_log_open(struct inode * inode, struct file * file) | ||
267 | { | ||
268 | return 0; | ||
269 | } | ||
270 | |||
271 | static int rtas_log_release(struct inode * inode, struct file * file) | ||
272 | { | ||
273 | return 0; | ||
274 | } | ||
275 | |||
276 | /* This will check if all events are logged, if they are then, we | ||
277 | * know that we can safely clear the events in NVRAM. | ||
278 | * Next we'll sit and wait for something else to log. | ||
279 | */ | ||
280 | static ssize_t rtas_log_read(struct file * file, char __user * buf, | ||
281 | size_t count, loff_t *ppos) | ||
282 | { | ||
283 | int error; | ||
284 | char *tmp; | ||
285 | unsigned long s; | ||
286 | unsigned long offset; | ||
287 | |||
288 | if (!buf || count < rtas_error_log_buffer_max) | ||
289 | return -EINVAL; | ||
290 | |||
291 | count = rtas_error_log_buffer_max; | ||
292 | |||
293 | if (!access_ok(VERIFY_WRITE, buf, count)) | ||
294 | return -EFAULT; | ||
295 | |||
296 | tmp = kmalloc(count, GFP_KERNEL); | ||
297 | if (!tmp) | ||
298 | return -ENOMEM; | ||
299 | |||
300 | |||
301 | spin_lock_irqsave(&rtasd_log_lock, s); | ||
302 | /* if it's 0, then we know we got the last one (the one in NVRAM) */ | ||
303 | if (rtas_log_size == 0 && !no_logging) | ||
304 | nvram_clear_error_log(); | ||
305 | spin_unlock_irqrestore(&rtasd_log_lock, s); | ||
306 | |||
307 | |||
308 | error = wait_event_interruptible(rtas_log_wait, rtas_log_size); | ||
309 | if (error) | ||
310 | goto out; | ||
311 | |||
312 | spin_lock_irqsave(&rtasd_log_lock, s); | ||
313 | offset = rtas_error_log_buffer_max * (rtas_log_start & LOG_NUMBER_MASK); | ||
314 | memcpy(tmp, &rtas_log_buf[offset], count); | ||
315 | |||
316 | rtas_log_start += 1; | ||
317 | rtas_log_size -= 1; | ||
318 | spin_unlock_irqrestore(&rtasd_log_lock, s); | ||
319 | |||
320 | error = copy_to_user(buf, tmp, count) ? -EFAULT : count; | ||
321 | out: | ||
322 | kfree(tmp); | ||
323 | return error; | ||
324 | } | ||
325 | |||
326 | static unsigned int rtas_log_poll(struct file *file, poll_table * wait) | ||
327 | { | ||
328 | poll_wait(file, &rtas_log_wait, wait); | ||
329 | if (rtas_log_size) | ||
330 | return POLLIN | POLLRDNORM; | ||
331 | return 0; | ||
332 | } | ||
333 | |||
334 | struct file_operations proc_rtas_log_operations = { | ||
335 | .read = rtas_log_read, | ||
336 | .poll = rtas_log_poll, | ||
337 | .open = rtas_log_open, | ||
338 | .release = rtas_log_release, | ||
339 | }; | ||
340 | |||
341 | static int enable_surveillance(int timeout) | ||
342 | { | ||
343 | int error; | ||
344 | |||
345 | error = rtas_set_indicator(SURVEILLANCE_TOKEN, 0, timeout); | ||
346 | |||
347 | if (error == 0) | ||
348 | return 0; | ||
349 | |||
350 | if (error == -EINVAL) { | ||
351 | printk(KERN_INFO "rtasd: surveillance not supported\n"); | ||
352 | return 0; | ||
353 | } | ||
354 | |||
355 | printk(KERN_ERR "rtasd: could not update surveillance\n"); | ||
356 | return -1; | ||
357 | } | ||
358 | |||
359 | static int get_eventscan_parms(void) | ||
360 | { | ||
361 | struct device_node *node; | ||
362 | int *ip; | ||
363 | |||
364 | node = of_find_node_by_path("/rtas"); | ||
365 | |||
366 | ip = (int *)get_property(node, "rtas-event-scan-rate", NULL); | ||
367 | if (ip == NULL) { | ||
368 | printk(KERN_ERR "rtasd: no rtas-event-scan-rate\n"); | ||
369 | of_node_put(node); | ||
370 | return -1; | ||
371 | } | ||
372 | rtas_event_scan_rate = *ip; | ||
373 | DEBUG("rtas-event-scan-rate %d\n", rtas_event_scan_rate); | ||
374 | |||
375 | /* Make room for the sequence number */ | ||
376 | rtas_error_log_max = rtas_get_error_log_max(); | ||
377 | rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int); | ||
378 | |||
379 | of_node_put(node); | ||
380 | |||
381 | return 0; | ||
382 | } | ||
383 | |||
384 | static void do_event_scan(int event_scan) | ||
385 | { | ||
386 | int error; | ||
387 | do { | ||
388 | memset(logdata, 0, rtas_error_log_max); | ||
389 | error = rtas_call(event_scan, 4, 1, NULL, | ||
390 | RTAS_EVENT_SCAN_ALL_EVENTS, 0, | ||
391 | __pa(logdata), rtas_error_log_max); | ||
392 | if (error == -1) { | ||
393 | printk(KERN_ERR "event-scan failed\n"); | ||
394 | break; | ||
395 | } | ||
396 | |||
397 | if (error == 0) | ||
398 | pSeries_log_error(logdata, ERR_TYPE_RTAS_LOG, 0); | ||
399 | |||
400 | } while(error == 0); | ||
401 | } | ||
402 | |||
403 | static void do_event_scan_all_cpus(long delay) | ||
404 | { | ||
405 | int cpu; | ||
406 | |||
407 | lock_cpu_hotplug(); | ||
408 | cpu = first_cpu(cpu_online_map); | ||
409 | for (;;) { | ||
410 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | ||
411 | do_event_scan(rtas_token("event-scan")); | ||
412 | set_cpus_allowed(current, CPU_MASK_ALL); | ||
413 | |||
414 | /* Drop hotplug lock, and sleep for the specified delay */ | ||
415 | unlock_cpu_hotplug(); | ||
416 | msleep_interruptible(delay); | ||
417 | lock_cpu_hotplug(); | ||
418 | |||
419 | cpu = next_cpu(cpu, cpu_online_map); | ||
420 | if (cpu == NR_CPUS) | ||
421 | break; | ||
422 | } | ||
423 | unlock_cpu_hotplug(); | ||
424 | } | ||
425 | |||
426 | static int rtasd(void *unused) | ||
427 | { | ||
428 | unsigned int err_type; | ||
429 | int event_scan = rtas_token("event-scan"); | ||
430 | int rc; | ||
431 | |||
432 | daemonize("rtasd"); | ||
433 | |||
434 | if (event_scan == RTAS_UNKNOWN_SERVICE || get_eventscan_parms() == -1) | ||
435 | goto error; | ||
436 | |||
437 | rtas_log_buf = vmalloc(rtas_error_log_buffer_max*LOG_NUMBER); | ||
438 | if (!rtas_log_buf) { | ||
439 | printk(KERN_ERR "rtasd: no memory\n"); | ||
440 | goto error; | ||
441 | } | ||
442 | |||
443 | printk(KERN_INFO "RTAS daemon started\n"); | ||
444 | |||
445 | DEBUG("will sleep for %d milliseconds\n", (30000/rtas_event_scan_rate)); | ||
446 | |||
447 | /* See if we have any error stored in NVRAM */ | ||
448 | memset(logdata, 0, rtas_error_log_max); | ||
449 | |||
450 | rc = nvram_read_error_log(logdata, rtas_error_log_max, &err_type); | ||
451 | |||
452 | /* We can use rtas_log_buf now */ | ||
453 | no_logging = 0; | ||
454 | |||
455 | if (!rc) { | ||
456 | if (err_type != ERR_FLAG_ALREADY_LOGGED) { | ||
457 | pSeries_log_error(logdata, err_type | ERR_FLAG_BOOT, 0); | ||
458 | } | ||
459 | } | ||
460 | |||
461 | /* First pass. */ | ||
462 | do_event_scan_all_cpus(1000); | ||
463 | |||
464 | if (surveillance_timeout != -1) { | ||
465 | DEBUG("enabling surveillance\n"); | ||
466 | enable_surveillance(surveillance_timeout); | ||
467 | DEBUG("surveillance enabled\n"); | ||
468 | } | ||
469 | |||
470 | /* Delay should be at least one second since some | ||
471 | * machines have problems if we call event-scan too | ||
472 | * quickly. */ | ||
473 | for (;;) | ||
474 | do_event_scan_all_cpus(30000/rtas_event_scan_rate); | ||
475 | |||
476 | error: | ||
477 | /* Should delete proc entries */ | ||
478 | return -EINVAL; | ||
479 | } | ||
480 | |||
481 | static int __init rtas_init(void) | ||
482 | { | ||
483 | struct proc_dir_entry *entry; | ||
484 | |||
485 | /* No RTAS, only warn if we are on a pSeries box */ | ||
486 | if (rtas_token("event-scan") == RTAS_UNKNOWN_SERVICE) { | ||
487 | if (systemcfg->platform & PLATFORM_PSERIES) | ||
488 | printk(KERN_INFO "rtasd: no event-scan on system\n"); | ||
489 | return 1; | ||
490 | } | ||
491 | |||
492 | entry = create_proc_entry("ppc64/rtas/error_log", S_IRUSR, NULL); | ||
493 | if (entry) | ||
494 | entry->proc_fops = &proc_rtas_log_operations; | ||
495 | else | ||
496 | printk(KERN_ERR "Failed to create error_log proc entry\n"); | ||
497 | |||
498 | if (kernel_thread(rtasd, NULL, CLONE_FS) < 0) | ||
499 | printk(KERN_ERR "Failed to start RTAS daemon\n"); | ||
500 | |||
501 | return 0; | ||
502 | } | ||
503 | |||
504 | static int __init surveillance_setup(char *str) | ||
505 | { | ||
506 | int i; | ||
507 | |||
508 | if (get_option(&str,&i)) { | ||
509 | if (i >= 0 && i <= 255) | ||
510 | surveillance_timeout = i; | ||
511 | } | ||
512 | |||
513 | return 1; | ||
514 | } | ||
515 | |||
516 | static int __init rtasmsgs_setup(char *str) | ||
517 | { | ||
518 | if (strcmp(str, "on") == 0) | ||
519 | full_rtas_msgs = 1; | ||
520 | else if (strcmp(str, "off") == 0) | ||
521 | full_rtas_msgs = 0; | ||
522 | |||
523 | return 1; | ||
524 | } | ||
525 | __initcall(rtas_init); | ||
526 | __setup("surveillance=", surveillance_setup); | ||
527 | __setup("rtasmsgs=", rtasmsgs_setup); | ||
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 10cb0f2d9b5b..65bee939eecc 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -58,7 +58,6 @@ | |||
58 | #include <asm/irq.h> | 58 | #include <asm/irq.h> |
59 | #include <asm/time.h> | 59 | #include <asm/time.h> |
60 | #include <asm/nvram.h> | 60 | #include <asm/nvram.h> |
61 | #include <asm/plpar_wrappers.h> | ||
62 | #include "xics.h" | 61 | #include "xics.h" |
63 | #include <asm/firmware.h> | 62 | #include <asm/firmware.h> |
64 | #include <asm/pmc.h> | 63 | #include <asm/pmc.h> |
@@ -67,7 +66,7 @@ | |||
67 | #include <asm/i8259.h> | 66 | #include <asm/i8259.h> |
68 | #include <asm/udbg.h> | 67 | #include <asm/udbg.h> |
69 | 68 | ||
70 | #include "rtas-fw.h" | 69 | #include "plpar_wrappers.h" |
71 | 70 | ||
72 | #ifdef DEBUG | 71 | #ifdef DEBUG |
73 | #define DBG(fmt...) udbg_printf(fmt) | 72 | #define DBG(fmt...) udbg_printf(fmt) |
@@ -352,6 +351,16 @@ static void pSeries_mach_cpu_die(void) | |||
352 | for(;;); | 351 | for(;;); |
353 | } | 352 | } |
354 | 353 | ||
354 | static int pseries_set_dabr(unsigned long dabr) | ||
355 | { | ||
356 | if (firmware_has_feature(FW_FEATURE_XDABR)) { | ||
357 | /* We want to catch accesses from kernel and userspace */ | ||
358 | return plpar_set_xdabr(dabr, H_DABRX_KERNEL | H_DABRX_USER); | ||
359 | } | ||
360 | |||
361 | return plpar_set_dabr(dabr); | ||
362 | } | ||
363 | |||
355 | 364 | ||
356 | /* | 365 | /* |
357 | * Early initialization. Relocation is on but do not reference unbolted pages | 366 | * Early initialization. Relocation is on but do not reference unbolted pages |
@@ -387,6 +396,8 @@ static void __init pSeries_init_early(void) | |||
387 | DBG("Hello World !\n"); | 396 | DBG("Hello World !\n"); |
388 | } | 397 | } |
389 | 398 | ||
399 | if (firmware_has_feature(FW_FEATURE_XDABR | FW_FEATURE_DABR)) | ||
400 | ppc_md.set_dabr = pseries_set_dabr; | ||
390 | 401 | ||
391 | iommu_init_early_pSeries(); | 402 | iommu_init_early_pSeries(); |
392 | 403 | ||
@@ -591,9 +602,9 @@ struct machdep_calls __initdata pSeries_md = { | |||
591 | .pcibios_fixup = pSeries_final_fixup, | 602 | .pcibios_fixup = pSeries_final_fixup, |
592 | .pci_probe_mode = pSeries_pci_probe_mode, | 603 | .pci_probe_mode = pSeries_pci_probe_mode, |
593 | .irq_bus_setup = pSeries_irq_bus_setup, | 604 | .irq_bus_setup = pSeries_irq_bus_setup, |
594 | .restart = rtas_fw_restart, | 605 | .restart = rtas_restart, |
595 | .power_off = rtas_fw_power_off, | 606 | .power_off = rtas_power_off, |
596 | .halt = rtas_fw_halt, | 607 | .halt = rtas_halt, |
597 | .panic = rtas_os_term, | 608 | .panic = rtas_os_term, |
598 | .cpu_die = pSeries_mach_cpu_die, | 609 | .cpu_die = pSeries_mach_cpu_die, |
599 | .get_boot_time = rtas_get_boot_time, | 610 | .get_boot_time = rtas_get_boot_time, |
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 9c9458ddfc25..7a243e8ccd7e 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -44,10 +44,11 @@ | |||
44 | #include <asm/firmware.h> | 44 | #include <asm/firmware.h> |
45 | #include <asm/system.h> | 45 | #include <asm/system.h> |
46 | #include <asm/rtas.h> | 46 | #include <asm/rtas.h> |
47 | #include <asm/plpar_wrappers.h> | ||
48 | #include <asm/pSeries_reconfig.h> | 47 | #include <asm/pSeries_reconfig.h> |
49 | #include <asm/mpic.h> | 48 | #include <asm/mpic.h> |
50 | 49 | ||
50 | #include "plpar_wrappers.h" | ||
51 | |||
51 | #ifdef DEBUG | 52 | #ifdef DEBUG |
52 | #define DBG(fmt...) udbg_printf(fmt) | 53 | #define DBG(fmt...) udbg_printf(fmt) |
53 | #else | 54 | #else |
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index 8acd21dee05d..6b7efcfc352a 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile | |||
@@ -5,3 +5,4 @@ obj-$(CONFIG_PPC_MPC106) += grackle.o | |||
5 | obj-$(CONFIG_BOOKE) += dcr.o | 5 | obj-$(CONFIG_BOOKE) += dcr.o |
6 | obj-$(CONFIG_40x) += dcr.o | 6 | obj-$(CONFIG_40x) += dcr.o |
7 | obj-$(CONFIG_U3_DART) += u3_iommu.o | 7 | obj-$(CONFIG_U3_DART) += u3_iommu.o |
8 | obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o | ||
diff --git a/arch/powerpc/sysdev/dart.h b/arch/powerpc/sysdev/dart.h new file mode 100644 index 000000000000..ea8f0d9eed8a --- /dev/null +++ b/arch/powerpc/sysdev/dart.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #ifndef _POWERPC_SYSDEV_DART_H | ||
20 | #define _POWERPC_SYSDEV_DART_H | ||
21 | |||
22 | |||
23 | /* physical base of DART registers */ | ||
24 | #define DART_BASE 0xf8033000UL | ||
25 | |||
26 | /* Offset from base to control register */ | ||
27 | #define DARTCNTL 0 | ||
28 | /* Offset from base to exception register */ | ||
29 | #define DARTEXCP 0x10 | ||
30 | /* Offset from base to TLB tag registers */ | ||
31 | #define DARTTAG 0x1000 | ||
32 | |||
33 | |||
34 | /* Control Register fields */ | ||
35 | |||
36 | /* base address of table (pfn) */ | ||
37 | #define DARTCNTL_BASE_MASK 0xfffff | ||
38 | #define DARTCNTL_BASE_SHIFT 12 | ||
39 | |||
40 | #define DARTCNTL_FLUSHTLB 0x400 | ||
41 | #define DARTCNTL_ENABLE 0x200 | ||
42 | |||
43 | /* size of table in pages */ | ||
44 | #define DARTCNTL_SIZE_MASK 0x1ff | ||
45 | #define DARTCNTL_SIZE_SHIFT 0 | ||
46 | |||
47 | |||
48 | /* DART table fields */ | ||
49 | |||
50 | #define DARTMAP_VALID 0x80000000 | ||
51 | #define DARTMAP_RPNMASK 0x00ffffff | ||
52 | |||
53 | |||
54 | #define DART_PAGE_SHIFT 12 | ||
55 | #define DART_PAGE_SIZE (1 << DART_PAGE_SHIFT) | ||
56 | #define DART_PAGE_FACTOR (PAGE_SHIFT - DART_PAGE_SHIFT) | ||
57 | |||
58 | |||
59 | #endif /* _POWERPC_SYSDEV_DART_H */ | ||
diff --git a/arch/powerpc/sysdev/mmio_nvram.c b/arch/powerpc/sysdev/mmio_nvram.c new file mode 100644 index 000000000000..74e0d31a3559 --- /dev/null +++ b/arch/powerpc/sysdev/mmio_nvram.c | |||
@@ -0,0 +1,118 @@ | |||
1 | /* | ||
2 | * memory mapped NVRAM | ||
3 | * | ||
4 | * (C) Copyright IBM Corp. 2005 | ||
5 | * | ||
6 | * Authors : Utz Bacher <utz.bacher@de.ibm.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2, or (at your option) | ||
11 | * any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | */ | ||
22 | |||
23 | #include <linux/fs.h> | ||
24 | #include <linux/init.h> | ||
25 | #include <linux/kernel.h> | ||
26 | #include <linux/spinlock.h> | ||
27 | #include <linux/types.h> | ||
28 | |||
29 | #include <asm/machdep.h> | ||
30 | #include <asm/nvram.h> | ||
31 | #include <asm/prom.h> | ||
32 | |||
33 | static void __iomem *mmio_nvram_start; | ||
34 | static long mmio_nvram_len; | ||
35 | static spinlock_t mmio_nvram_lock = SPIN_LOCK_UNLOCKED; | ||
36 | |||
37 | static ssize_t mmio_nvram_read(char *buf, size_t count, loff_t *index) | ||
38 | { | ||
39 | unsigned long flags; | ||
40 | |||
41 | if (*index >= mmio_nvram_len) | ||
42 | return 0; | ||
43 | if (*index + count > mmio_nvram_len) | ||
44 | count = mmio_nvram_len - *index; | ||
45 | |||
46 | spin_lock_irqsave(&mmio_nvram_lock, flags); | ||
47 | |||
48 | memcpy_fromio(buf, mmio_nvram_start + *index, count); | ||
49 | |||
50 | spin_unlock_irqrestore(&mmio_nvram_lock, flags); | ||
51 | |||
52 | *index += count; | ||
53 | return count; | ||
54 | } | ||
55 | |||
56 | static ssize_t mmio_nvram_write(char *buf, size_t count, loff_t *index) | ||
57 | { | ||
58 | unsigned long flags; | ||
59 | |||
60 | if (*index >= mmio_nvram_len) | ||
61 | return 0; | ||
62 | if (*index + count > mmio_nvram_len) | ||
63 | count = mmio_nvram_len - *index; | ||
64 | |||
65 | spin_lock_irqsave(&mmio_nvram_lock, flags); | ||
66 | |||
67 | memcpy_toio(mmio_nvram_start + *index, buf, count); | ||
68 | |||
69 | spin_unlock_irqrestore(&mmio_nvram_lock, flags); | ||
70 | |||
71 | *index += count; | ||
72 | return count; | ||
73 | } | ||
74 | |||
75 | static ssize_t mmio_nvram_get_size(void) | ||
76 | { | ||
77 | return mmio_nvram_len; | ||
78 | } | ||
79 | |||
80 | int __init mmio_nvram_init(void) | ||
81 | { | ||
82 | struct device_node *nvram_node; | ||
83 | unsigned long *buffer; | ||
84 | int proplen; | ||
85 | unsigned long nvram_addr; | ||
86 | int ret; | ||
87 | |||
88 | ret = -ENODEV; | ||
89 | nvram_node = of_find_node_by_type(NULL, "nvram"); | ||
90 | if (!nvram_node) | ||
91 | goto out; | ||
92 | |||
93 | ret = -EIO; | ||
94 | buffer = (unsigned long *)get_property(nvram_node, "reg", &proplen); | ||
95 | if (proplen != 2*sizeof(unsigned long)) | ||
96 | goto out; | ||
97 | |||
98 | ret = -ENODEV; | ||
99 | nvram_addr = buffer[0]; | ||
100 | mmio_nvram_len = buffer[1]; | ||
101 | if ( (!mmio_nvram_len) || (!nvram_addr) ) | ||
102 | goto out; | ||
103 | |||
104 | mmio_nvram_start = ioremap(nvram_addr, mmio_nvram_len); | ||
105 | if (!mmio_nvram_start) | ||
106 | goto out; | ||
107 | |||
108 | printk(KERN_INFO "mmio NVRAM, %luk mapped to %p\n", | ||
109 | mmio_nvram_len >> 10, mmio_nvram_start); | ||
110 | |||
111 | ppc_md.nvram_read = mmio_nvram_read; | ||
112 | ppc_md.nvram_write = mmio_nvram_write; | ||
113 | ppc_md.nvram_size = mmio_nvram_get_size; | ||
114 | |||
115 | out: | ||
116 | of_node_put(nvram_node); | ||
117 | return ret; | ||
118 | } | ||
diff --git a/arch/powerpc/sysdev/u3_iommu.c b/arch/powerpc/sysdev/u3_iommu.c index fba871a1bda5..607722178c1a 100644 --- a/arch/powerpc/sysdev/u3_iommu.c +++ b/arch/powerpc/sysdev/u3_iommu.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/u3_iommu.c | 2 | * arch/powerpc/sysdev/u3_iommu.c |
3 | * | 3 | * |
4 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 4 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation |
5 | * | 5 | * |
@@ -44,9 +44,10 @@ | |||
44 | #include <asm/abs_addr.h> | 44 | #include <asm/abs_addr.h> |
45 | #include <asm/cacheflush.h> | 45 | #include <asm/cacheflush.h> |
46 | #include <asm/lmb.h> | 46 | #include <asm/lmb.h> |
47 | #include <asm/dart.h> | ||
48 | #include <asm/ppc-pci.h> | 47 | #include <asm/ppc-pci.h> |
49 | 48 | ||
49 | #include "dart.h" | ||
50 | |||
50 | extern int iommu_force_on; | 51 | extern int iommu_force_on; |
51 | 52 | ||
52 | /* Physical base address and size of the DART table */ | 53 | /* Physical base address and size of the DART table */ |