diff options
Diffstat (limited to 'arch')
112 files changed, 2425 insertions, 1394 deletions
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S index 71470e9d93ba..76bf071e376c 100644 --- a/arch/alpha/kernel/vmlinux.lds.S +++ b/arch/alpha/kernel/vmlinux.lds.S | |||
@@ -48,13 +48,7 @@ SECTIONS | |||
48 | . = ALIGN(8); | 48 | . = ALIGN(8); |
49 | __initcall_start = .; | 49 | __initcall_start = .; |
50 | .initcall.init : { | 50 | .initcall.init : { |
51 | *(.initcall1.init) | 51 | INITCALLS |
52 | *(.initcall2.init) | ||
53 | *(.initcall3.init) | ||
54 | *(.initcall4.init) | ||
55 | *(.initcall5.init) | ||
56 | *(.initcall6.init) | ||
57 | *(.initcall7.init) | ||
58 | } | 52 | } |
59 | __initcall_end = .; | 53 | __initcall_end = .; |
60 | 54 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 2a0b2c8a1fe0..6f4f8bf36071 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -174,11 +174,13 @@ libs-y := arch/arm/lib/ $(libs-y) | |||
174 | 174 | ||
175 | # Default target when executing plain make | 175 | # Default target when executing plain make |
176 | ifeq ($(CONFIG_XIP_KERNEL),y) | 176 | ifeq ($(CONFIG_XIP_KERNEL),y) |
177 | all: xipImage | 177 | KBUILD_IMAGE := xipImage |
178 | else | 178 | else |
179 | all: zImage | 179 | KBUILD_IMAGE := zImage |
180 | endif | 180 | endif |
181 | 181 | ||
182 | all: $(KBUILD_IMAGE) | ||
183 | |||
182 | boot := arch/arm/boot | 184 | boot := arch/arm/boot |
183 | 185 | ||
184 | # Update machine arch and proc symlinks if something which affects | 186 | # Update machine arch and proc symlinks if something which affects |
diff --git a/arch/arm/configs/realview-smp_defconfig b/arch/arm/configs/realview-smp_defconfig new file mode 100644 index 000000000000..ffd905ff19f1 --- /dev/null +++ b/arch/arm/configs/realview-smp_defconfig | |||
@@ -0,0 +1,994 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.19-rc3 | ||
4 | # Wed Oct 25 14:12:00 2006 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | # CONFIG_GENERIC_TIME is not set | ||
8 | CONFIG_MMU=y | ||
9 | CONFIG_GENERIC_HARDIRQS=y | ||
10 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
11 | CONFIG_HARDIRQS_SW_RESEND=y | ||
12 | CONFIG_GENERIC_IRQ_PROBE=y | ||
13 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
14 | CONFIG_GENERIC_HWEIGHT=y | ||
15 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
16 | CONFIG_VECTORS_BASE=0xffff0000 | ||
17 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
18 | |||
19 | # | ||
20 | # Code maturity level options | ||
21 | # | ||
22 | CONFIG_EXPERIMENTAL=y | ||
23 | CONFIG_LOCK_KERNEL=y | ||
24 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
25 | |||
26 | # | ||
27 | # General setup | ||
28 | # | ||
29 | CONFIG_LOCALVERSION="" | ||
30 | CONFIG_LOCALVERSION_AUTO=y | ||
31 | # CONFIG_SWAP is not set | ||
32 | CONFIG_SYSVIPC=y | ||
33 | # CONFIG_IPC_NS is not set | ||
34 | # CONFIG_POSIX_MQUEUE is not set | ||
35 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
36 | # CONFIG_TASKSTATS is not set | ||
37 | # CONFIG_UTS_NS is not set | ||
38 | # CONFIG_AUDIT is not set | ||
39 | # CONFIG_IKCONFIG is not set | ||
40 | # CONFIG_CPUSETS is not set | ||
41 | # CONFIG_RELAY is not set | ||
42 | CONFIG_INITRAMFS_SOURCE="" | ||
43 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
44 | CONFIG_SYSCTL=y | ||
45 | # CONFIG_EMBEDDED is not set | ||
46 | CONFIG_UID16=y | ||
47 | # CONFIG_SYSCTL_SYSCALL is not set | ||
48 | CONFIG_KALLSYMS=y | ||
49 | CONFIG_KALLSYMS_ALL=y | ||
50 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
51 | CONFIG_HOTPLUG=y | ||
52 | CONFIG_PRINTK=y | ||
53 | CONFIG_BUG=y | ||
54 | CONFIG_ELF_CORE=y | ||
55 | CONFIG_BASE_FULL=y | ||
56 | CONFIG_FUTEX=y | ||
57 | CONFIG_EPOLL=y | ||
58 | CONFIG_SHMEM=y | ||
59 | CONFIG_SLAB=y | ||
60 | CONFIG_VM_EVENT_COUNTERS=y | ||
61 | CONFIG_RT_MUTEXES=y | ||
62 | # CONFIG_TINY_SHMEM is not set | ||
63 | CONFIG_BASE_SMALL=0 | ||
64 | # CONFIG_SLOB is not set | ||
65 | |||
66 | # | ||
67 | # Loadable module support | ||
68 | # | ||
69 | CONFIG_MODULES=y | ||
70 | CONFIG_MODULE_UNLOAD=y | ||
71 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
72 | # CONFIG_MODVERSIONS is not set | ||
73 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
74 | # CONFIG_KMOD is not set | ||
75 | CONFIG_STOP_MACHINE=y | ||
76 | |||
77 | # | ||
78 | # Block layer | ||
79 | # | ||
80 | CONFIG_BLOCK=y | ||
81 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
82 | |||
83 | # | ||
84 | # IO Schedulers | ||
85 | # | ||
86 | CONFIG_IOSCHED_NOOP=y | ||
87 | # CONFIG_IOSCHED_AS is not set | ||
88 | CONFIG_IOSCHED_DEADLINE=y | ||
89 | # CONFIG_IOSCHED_CFQ is not set | ||
90 | # CONFIG_DEFAULT_AS is not set | ||
91 | CONFIG_DEFAULT_DEADLINE=y | ||
92 | # CONFIG_DEFAULT_CFQ is not set | ||
93 | # CONFIG_DEFAULT_NOOP is not set | ||
94 | CONFIG_DEFAULT_IOSCHED="deadline" | ||
95 | |||
96 | # | ||
97 | # System Type | ||
98 | # | ||
99 | # CONFIG_ARCH_AAEC2000 is not set | ||
100 | # CONFIG_ARCH_INTEGRATOR is not set | ||
101 | CONFIG_ARCH_REALVIEW=y | ||
102 | # CONFIG_ARCH_VERSATILE is not set | ||
103 | # CONFIG_ARCH_AT91 is not set | ||
104 | # CONFIG_ARCH_CLPS7500 is not set | ||
105 | # CONFIG_ARCH_CLPS711X is not set | ||
106 | # CONFIG_ARCH_CO285 is not set | ||
107 | # CONFIG_ARCH_EBSA110 is not set | ||
108 | # CONFIG_ARCH_EP93XX is not set | ||
109 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
110 | # CONFIG_ARCH_NETX is not set | ||
111 | # CONFIG_ARCH_H720X is not set | ||
112 | # CONFIG_ARCH_IMX is not set | ||
113 | # CONFIG_ARCH_IOP32X is not set | ||
114 | # CONFIG_ARCH_IOP33X is not set | ||
115 | # CONFIG_ARCH_IXP4XX is not set | ||
116 | # CONFIG_ARCH_IXP2000 is not set | ||
117 | # CONFIG_ARCH_IXP23XX is not set | ||
118 | # CONFIG_ARCH_L7200 is not set | ||
119 | # CONFIG_ARCH_PNX4008 is not set | ||
120 | # CONFIG_ARCH_PXA is not set | ||
121 | # CONFIG_ARCH_RPC is not set | ||
122 | # CONFIG_ARCH_SA1100 is not set | ||
123 | # CONFIG_ARCH_S3C2410 is not set | ||
124 | # CONFIG_ARCH_SHARK is not set | ||
125 | # CONFIG_ARCH_LH7A40X is not set | ||
126 | # CONFIG_ARCH_OMAP is not set | ||
127 | |||
128 | # | ||
129 | # RealView platform type | ||
130 | # | ||
131 | CONFIG_MACH_REALVIEW_EB=y | ||
132 | CONFIG_REALVIEW_MPCORE=y | ||
133 | |||
134 | # | ||
135 | # Processor Type | ||
136 | # | ||
137 | CONFIG_CPU_32=y | ||
138 | # CONFIG_CPU_ARM926T is not set | ||
139 | CONFIG_CPU_V6=y | ||
140 | CONFIG_CPU_32v6K=y | ||
141 | CONFIG_CPU_32v6=y | ||
142 | CONFIG_CPU_ABRT_EV6=y | ||
143 | CONFIG_CPU_CACHE_V6=y | ||
144 | CONFIG_CPU_CACHE_VIPT=y | ||
145 | CONFIG_CPU_COPY_V6=y | ||
146 | CONFIG_CPU_TLB_V6=y | ||
147 | CONFIG_CPU_CP15=y | ||
148 | CONFIG_CPU_CP15_MMU=y | ||
149 | |||
150 | # | ||
151 | # Processor Features | ||
152 | # | ||
153 | CONFIG_ARM_THUMB=y | ||
154 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
155 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
156 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
157 | # CONFIG_CPU_BPREDICT_DISABLE is not set | ||
158 | CONFIG_HAS_TLS_REG=y | ||
159 | CONFIG_ARM_GIC=y | ||
160 | CONFIG_ICST307=y | ||
161 | |||
162 | # | ||
163 | # Bus support | ||
164 | # | ||
165 | CONFIG_ARM_AMBA=y | ||
166 | |||
167 | # | ||
168 | # PCCARD (PCMCIA/CardBus) support | ||
169 | # | ||
170 | # CONFIG_PCCARD is not set | ||
171 | |||
172 | # | ||
173 | # Kernel Features | ||
174 | # | ||
175 | CONFIG_SMP=y | ||
176 | CONFIG_NR_CPUS=4 | ||
177 | CONFIG_HOTPLUG_CPU=y | ||
178 | CONFIG_LOCAL_TIMERS=y | ||
179 | # CONFIG_PREEMPT is not set | ||
180 | # CONFIG_NO_IDLE_HZ is not set | ||
181 | CONFIG_HZ=100 | ||
182 | # CONFIG_AEABI is not set | ||
183 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
184 | CONFIG_SELECT_MEMORY_MODEL=y | ||
185 | CONFIG_FLATMEM_MANUAL=y | ||
186 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
187 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
188 | CONFIG_FLATMEM=y | ||
189 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
190 | # CONFIG_SPARSEMEM_STATIC is not set | ||
191 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
192 | # CONFIG_RESOURCES_64BIT is not set | ||
193 | CONFIG_ALIGNMENT_TRAP=y | ||
194 | |||
195 | # | ||
196 | # Boot options | ||
197 | # | ||
198 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
199 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
200 | CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M" | ||
201 | # CONFIG_XIP_KERNEL is not set | ||
202 | |||
203 | # | ||
204 | # Floating point emulation | ||
205 | # | ||
206 | |||
207 | # | ||
208 | # At least one emulation must be selected | ||
209 | # | ||
210 | CONFIG_FPE_NWFPE=y | ||
211 | # CONFIG_FPE_NWFPE_XP is not set | ||
212 | # CONFIG_FPE_FASTFPE is not set | ||
213 | CONFIG_VFP=y | ||
214 | |||
215 | # | ||
216 | # Userspace binary formats | ||
217 | # | ||
218 | CONFIG_BINFMT_ELF=y | ||
219 | # CONFIG_BINFMT_AOUT is not set | ||
220 | # CONFIG_BINFMT_MISC is not set | ||
221 | # CONFIG_ARTHUR is not set | ||
222 | |||
223 | # | ||
224 | # Power management options | ||
225 | # | ||
226 | # CONFIG_PM is not set | ||
227 | # CONFIG_APM is not set | ||
228 | |||
229 | # | ||
230 | # Networking | ||
231 | # | ||
232 | CONFIG_NET=y | ||
233 | |||
234 | # | ||
235 | # Networking options | ||
236 | # | ||
237 | # CONFIG_NETDEBUG is not set | ||
238 | CONFIG_PACKET=y | ||
239 | # CONFIG_PACKET_MMAP is not set | ||
240 | CONFIG_UNIX=y | ||
241 | # CONFIG_NET_KEY is not set | ||
242 | CONFIG_INET=y | ||
243 | # CONFIG_IP_MULTICAST is not set | ||
244 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
245 | CONFIG_IP_FIB_HASH=y | ||
246 | CONFIG_IP_PNP=y | ||
247 | CONFIG_IP_PNP_DHCP=y | ||
248 | CONFIG_IP_PNP_BOOTP=y | ||
249 | # CONFIG_IP_PNP_RARP is not set | ||
250 | # CONFIG_NET_IPIP is not set | ||
251 | # CONFIG_NET_IPGRE is not set | ||
252 | # CONFIG_ARPD is not set | ||
253 | # CONFIG_SYN_COOKIES is not set | ||
254 | # CONFIG_INET_AH is not set | ||
255 | # CONFIG_INET_ESP is not set | ||
256 | # CONFIG_INET_IPCOMP is not set | ||
257 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
258 | # CONFIG_INET_TUNNEL is not set | ||
259 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
260 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
261 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
262 | CONFIG_INET_DIAG=y | ||
263 | CONFIG_INET_TCP_DIAG=y | ||
264 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
265 | CONFIG_TCP_CONG_CUBIC=y | ||
266 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
267 | # CONFIG_IPV6 is not set | ||
268 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
269 | # CONFIG_INET6_TUNNEL is not set | ||
270 | # CONFIG_NETWORK_SECMARK is not set | ||
271 | # CONFIG_NETFILTER is not set | ||
272 | |||
273 | # | ||
274 | # DCCP Configuration (EXPERIMENTAL) | ||
275 | # | ||
276 | # CONFIG_IP_DCCP is not set | ||
277 | |||
278 | # | ||
279 | # SCTP Configuration (EXPERIMENTAL) | ||
280 | # | ||
281 | # CONFIG_IP_SCTP is not set | ||
282 | |||
283 | # | ||
284 | # TIPC Configuration (EXPERIMENTAL) | ||
285 | # | ||
286 | # CONFIG_TIPC is not set | ||
287 | # CONFIG_ATM is not set | ||
288 | # CONFIG_BRIDGE is not set | ||
289 | # CONFIG_VLAN_8021Q is not set | ||
290 | # CONFIG_DECNET is not set | ||
291 | # CONFIG_LLC2 is not set | ||
292 | # CONFIG_IPX is not set | ||
293 | # CONFIG_ATALK is not set | ||
294 | # CONFIG_X25 is not set | ||
295 | # CONFIG_LAPB is not set | ||
296 | # CONFIG_ECONET is not set | ||
297 | # CONFIG_WAN_ROUTER is not set | ||
298 | |||
299 | # | ||
300 | # QoS and/or fair queueing | ||
301 | # | ||
302 | # CONFIG_NET_SCHED is not set | ||
303 | |||
304 | # | ||
305 | # Network testing | ||
306 | # | ||
307 | # CONFIG_NET_PKTGEN is not set | ||
308 | # CONFIG_HAMRADIO is not set | ||
309 | # CONFIG_IRDA is not set | ||
310 | # CONFIG_BT is not set | ||
311 | # CONFIG_IEEE80211 is not set | ||
312 | |||
313 | # | ||
314 | # Device Drivers | ||
315 | # | ||
316 | |||
317 | # | ||
318 | # Generic Driver Options | ||
319 | # | ||
320 | CONFIG_STANDALONE=y | ||
321 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
322 | # CONFIG_FW_LOADER is not set | ||
323 | # CONFIG_DEBUG_DRIVER is not set | ||
324 | # CONFIG_SYS_HYPERVISOR 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=y | ||
335 | # CONFIG_MTD_DEBUG is not set | ||
336 | # CONFIG_MTD_CONCAT is not set | ||
337 | CONFIG_MTD_PARTITIONS=y | ||
338 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
339 | CONFIG_MTD_CMDLINE_PARTS=y | ||
340 | # CONFIG_MTD_AFS_PARTS is not set | ||
341 | |||
342 | # | ||
343 | # User Modules And Translation Layers | ||
344 | # | ||
345 | CONFIG_MTD_CHAR=y | ||
346 | CONFIG_MTD_BLOCK=y | ||
347 | # CONFIG_FTL is not set | ||
348 | # CONFIG_NFTL is not set | ||
349 | # CONFIG_INFTL is not set | ||
350 | # CONFIG_RFD_FTL is not set | ||
351 | # CONFIG_SSFDC is not set | ||
352 | |||
353 | # | ||
354 | # RAM/ROM/Flash chip drivers | ||
355 | # | ||
356 | CONFIG_MTD_CFI=y | ||
357 | # CONFIG_MTD_JEDECPROBE is not set | ||
358 | CONFIG_MTD_GEN_PROBE=y | ||
359 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
360 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
361 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
362 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
363 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
364 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
365 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
366 | CONFIG_MTD_CFI_I1=y | ||
367 | CONFIG_MTD_CFI_I2=y | ||
368 | # CONFIG_MTD_CFI_I4 is not set | ||
369 | # CONFIG_MTD_CFI_I8 is not set | ||
370 | CONFIG_MTD_CFI_INTELEXT=y | ||
371 | CONFIG_MTD_CFI_AMDSTD=y | ||
372 | # CONFIG_MTD_CFI_STAA is not set | ||
373 | CONFIG_MTD_CFI_UTIL=y | ||
374 | # CONFIG_MTD_RAM is not set | ||
375 | # CONFIG_MTD_ROM is not set | ||
376 | # CONFIG_MTD_ABSENT is not set | ||
377 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
378 | |||
379 | # | ||
380 | # Mapping drivers for chip access | ||
381 | # | ||
382 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
383 | # CONFIG_MTD_PHYSMAP is not set | ||
384 | CONFIG_MTD_ARM_INTEGRATOR=y | ||
385 | # CONFIG_MTD_PLATRAM is not set | ||
386 | |||
387 | # | ||
388 | # Self-contained MTD device drivers | ||
389 | # | ||
390 | # CONFIG_MTD_SLRAM is not set | ||
391 | # CONFIG_MTD_PHRAM is not set | ||
392 | # CONFIG_MTD_MTDRAM is not set | ||
393 | # CONFIG_MTD_BLOCK2MTD is not set | ||
394 | |||
395 | # | ||
396 | # Disk-On-Chip Device Drivers | ||
397 | # | ||
398 | # CONFIG_MTD_DOC2000 is not set | ||
399 | # CONFIG_MTD_DOC2001 is not set | ||
400 | # CONFIG_MTD_DOC2001PLUS is not set | ||
401 | |||
402 | # | ||
403 | # NAND Flash Device Drivers | ||
404 | # | ||
405 | # CONFIG_MTD_NAND is not set | ||
406 | |||
407 | # | ||
408 | # OneNAND Flash Device Drivers | ||
409 | # | ||
410 | # CONFIG_MTD_ONENAND is not set | ||
411 | |||
412 | # | ||
413 | # Parallel port support | ||
414 | # | ||
415 | # CONFIG_PARPORT is not set | ||
416 | |||
417 | # | ||
418 | # Plug and Play support | ||
419 | # | ||
420 | |||
421 | # | ||
422 | # Block devices | ||
423 | # | ||
424 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
425 | # CONFIG_BLK_DEV_LOOP is not set | ||
426 | # CONFIG_BLK_DEV_NBD is not set | ||
427 | # CONFIG_BLK_DEV_RAM is not set | ||
428 | CONFIG_BLK_DEV_INITRD=y | ||
429 | # CONFIG_CDROM_PKTCDVD is not set | ||
430 | # CONFIG_ATA_OVER_ETH is not set | ||
431 | |||
432 | # | ||
433 | # SCSI device support | ||
434 | # | ||
435 | # CONFIG_RAID_ATTRS is not set | ||
436 | # CONFIG_SCSI is not set | ||
437 | # CONFIG_SCSI_NETLINK is not set | ||
438 | |||
439 | # | ||
440 | # Multi-device support (RAID and LVM) | ||
441 | # | ||
442 | # CONFIG_MD is not set | ||
443 | |||
444 | # | ||
445 | # Fusion MPT device support | ||
446 | # | ||
447 | # CONFIG_FUSION is not set | ||
448 | |||
449 | # | ||
450 | # IEEE 1394 (FireWire) support | ||
451 | # | ||
452 | |||
453 | # | ||
454 | # I2O device support | ||
455 | # | ||
456 | |||
457 | # | ||
458 | # Network device support | ||
459 | # | ||
460 | CONFIG_NETDEVICES=y | ||
461 | # CONFIG_DUMMY is not set | ||
462 | # CONFIG_BONDING is not set | ||
463 | # CONFIG_EQUALIZER is not set | ||
464 | # CONFIG_TUN is not set | ||
465 | |||
466 | # | ||
467 | # PHY device support | ||
468 | # | ||
469 | # CONFIG_PHYLIB is not set | ||
470 | |||
471 | # | ||
472 | # Ethernet (10 or 100Mbit) | ||
473 | # | ||
474 | CONFIG_NET_ETHERNET=y | ||
475 | CONFIG_MII=y | ||
476 | CONFIG_SMC91X=y | ||
477 | # CONFIG_DM9000 is not set | ||
478 | |||
479 | # | ||
480 | # Ethernet (1000 Mbit) | ||
481 | # | ||
482 | |||
483 | # | ||
484 | # Ethernet (10000 Mbit) | ||
485 | # | ||
486 | |||
487 | # | ||
488 | # Token Ring devices | ||
489 | # | ||
490 | |||
491 | # | ||
492 | # Wireless LAN (non-hamradio) | ||
493 | # | ||
494 | # CONFIG_NET_RADIO is not set | ||
495 | |||
496 | # | ||
497 | # Wan interfaces | ||
498 | # | ||
499 | # CONFIG_WAN is not set | ||
500 | # CONFIG_PPP is not set | ||
501 | # CONFIG_SLIP is not set | ||
502 | # CONFIG_SHAPER is not set | ||
503 | # CONFIG_NETCONSOLE is not set | ||
504 | # CONFIG_NETPOLL is not set | ||
505 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
506 | |||
507 | # | ||
508 | # ISDN subsystem | ||
509 | # | ||
510 | # CONFIG_ISDN is not set | ||
511 | |||
512 | # | ||
513 | # Input device support | ||
514 | # | ||
515 | CONFIG_INPUT=y | ||
516 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
517 | |||
518 | # | ||
519 | # Userland interfaces | ||
520 | # | ||
521 | CONFIG_INPUT_MOUSEDEV=y | ||
522 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
523 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
524 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
525 | # CONFIG_INPUT_JOYDEV is not set | ||
526 | # CONFIG_INPUT_TSDEV is not set | ||
527 | # CONFIG_INPUT_EVDEV is not set | ||
528 | # CONFIG_INPUT_EVBUG is not set | ||
529 | |||
530 | # | ||
531 | # Input Device Drivers | ||
532 | # | ||
533 | CONFIG_INPUT_KEYBOARD=y | ||
534 | CONFIG_KEYBOARD_ATKBD=y | ||
535 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
536 | # CONFIG_KEYBOARD_LKKBD is not set | ||
537 | # CONFIG_KEYBOARD_XTKBD is not set | ||
538 | # CONFIG_KEYBOARD_NEWTON is not set | ||
539 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
540 | CONFIG_INPUT_MOUSE=y | ||
541 | CONFIG_MOUSE_PS2=y | ||
542 | # CONFIG_MOUSE_SERIAL is not set | ||
543 | # CONFIG_MOUSE_VSXXXAA is not set | ||
544 | # CONFIG_INPUT_JOYSTICK is not set | ||
545 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
546 | # CONFIG_INPUT_MISC is not set | ||
547 | |||
548 | # | ||
549 | # Hardware I/O ports | ||
550 | # | ||
551 | CONFIG_SERIO=y | ||
552 | # CONFIG_SERIO_SERPORT is not set | ||
553 | CONFIG_SERIO_AMBAKMI=y | ||
554 | CONFIG_SERIO_LIBPS2=y | ||
555 | # CONFIG_SERIO_RAW is not set | ||
556 | # CONFIG_GAMEPORT is not set | ||
557 | |||
558 | # | ||
559 | # Character devices | ||
560 | # | ||
561 | CONFIG_VT=y | ||
562 | CONFIG_VT_CONSOLE=y | ||
563 | CONFIG_HW_CONSOLE=y | ||
564 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
565 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
566 | |||
567 | # | ||
568 | # Serial drivers | ||
569 | # | ||
570 | # CONFIG_SERIAL_8250 is not set | ||
571 | |||
572 | # | ||
573 | # Non-8250 serial port support | ||
574 | # | ||
575 | # CONFIG_SERIAL_AMBA_PL010 is not set | ||
576 | CONFIG_SERIAL_AMBA_PL011=y | ||
577 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | ||
578 | CONFIG_SERIAL_CORE=y | ||
579 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
580 | CONFIG_UNIX98_PTYS=y | ||
581 | CONFIG_LEGACY_PTYS=y | ||
582 | CONFIG_LEGACY_PTY_COUNT=16 | ||
583 | |||
584 | # | ||
585 | # IPMI | ||
586 | # | ||
587 | # CONFIG_IPMI_HANDLER is not set | ||
588 | |||
589 | # | ||
590 | # Watchdog Cards | ||
591 | # | ||
592 | # CONFIG_WATCHDOG is not set | ||
593 | # CONFIG_HW_RANDOM is not set | ||
594 | # CONFIG_NVRAM is not set | ||
595 | # CONFIG_DTLK is not set | ||
596 | # CONFIG_R3964 is not set | ||
597 | |||
598 | # | ||
599 | # Ftape, the floppy tape device driver | ||
600 | # | ||
601 | # CONFIG_RAW_DRIVER is not set | ||
602 | |||
603 | # | ||
604 | # TPM devices | ||
605 | # | ||
606 | # CONFIG_TCG_TPM is not set | ||
607 | |||
608 | # | ||
609 | # I2C support | ||
610 | # | ||
611 | # CONFIG_I2C is not set | ||
612 | |||
613 | # | ||
614 | # SPI support | ||
615 | # | ||
616 | # CONFIG_SPI is not set | ||
617 | # CONFIG_SPI_MASTER is not set | ||
618 | |||
619 | # | ||
620 | # Dallas's 1-wire bus | ||
621 | # | ||
622 | # CONFIG_W1 is not set | ||
623 | |||
624 | # | ||
625 | # Hardware Monitoring support | ||
626 | # | ||
627 | # CONFIG_HWMON is not set | ||
628 | # CONFIG_HWMON_VID is not set | ||
629 | |||
630 | # | ||
631 | # Misc devices | ||
632 | # | ||
633 | # CONFIG_SGI_IOC4 is not set | ||
634 | # CONFIG_TIFM_CORE is not set | ||
635 | |||
636 | # | ||
637 | # LED devices | ||
638 | # | ||
639 | # CONFIG_NEW_LEDS is not set | ||
640 | |||
641 | # | ||
642 | # LED drivers | ||
643 | # | ||
644 | |||
645 | # | ||
646 | # LED Triggers | ||
647 | # | ||
648 | |||
649 | # | ||
650 | # Multimedia devices | ||
651 | # | ||
652 | # CONFIG_VIDEO_DEV is not set | ||
653 | |||
654 | # | ||
655 | # Digital Video Broadcasting Devices | ||
656 | # | ||
657 | # CONFIG_DVB is not set | ||
658 | |||
659 | # | ||
660 | # Graphics support | ||
661 | # | ||
662 | # CONFIG_FIRMWARE_EDID is not set | ||
663 | CONFIG_FB=y | ||
664 | CONFIG_FB_CFB_FILLRECT=y | ||
665 | CONFIG_FB_CFB_COPYAREA=y | ||
666 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
667 | # CONFIG_FB_MACMODES is not set | ||
668 | # CONFIG_FB_BACKLIGHT is not set | ||
669 | # CONFIG_FB_MODE_HELPERS is not set | ||
670 | # CONFIG_FB_TILEBLITTING is not set | ||
671 | CONFIG_FB_ARMCLCD=y | ||
672 | # CONFIG_FB_S1D13XXX is not set | ||
673 | # CONFIG_FB_VIRTUAL is not set | ||
674 | |||
675 | # | ||
676 | # Console display driver support | ||
677 | # | ||
678 | # CONFIG_VGA_CONSOLE is not set | ||
679 | CONFIG_DUMMY_CONSOLE=y | ||
680 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
681 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | ||
682 | # CONFIG_FONTS is not set | ||
683 | CONFIG_FONT_8x8=y | ||
684 | CONFIG_FONT_8x16=y | ||
685 | |||
686 | # | ||
687 | # Logo configuration | ||
688 | # | ||
689 | CONFIG_LOGO=y | ||
690 | # CONFIG_LOGO_LINUX_MONO is not set | ||
691 | # CONFIG_LOGO_LINUX_VGA16 is not set | ||
692 | CONFIG_LOGO_LINUX_CLUT224=y | ||
693 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
694 | |||
695 | # | ||
696 | # Sound | ||
697 | # | ||
698 | CONFIG_SOUND=y | ||
699 | |||
700 | # | ||
701 | # Advanced Linux Sound Architecture | ||
702 | # | ||
703 | CONFIG_SND=y | ||
704 | CONFIG_SND_TIMER=y | ||
705 | CONFIG_SND_PCM=y | ||
706 | # CONFIG_SND_SEQUENCER is not set | ||
707 | CONFIG_SND_OSSEMUL=y | ||
708 | CONFIG_SND_MIXER_OSS=y | ||
709 | CONFIG_SND_PCM_OSS=y | ||
710 | CONFIG_SND_PCM_OSS_PLUGINS=y | ||
711 | # CONFIG_SND_DYNAMIC_MINORS is not set | ||
712 | CONFIG_SND_SUPPORT_OLD_API=y | ||
713 | CONFIG_SND_VERBOSE_PROCFS=y | ||
714 | # CONFIG_SND_VERBOSE_PRINTK is not set | ||
715 | # CONFIG_SND_DEBUG is not set | ||
716 | |||
717 | # | ||
718 | # Generic devices | ||
719 | # | ||
720 | CONFIG_SND_AC97_CODEC=m | ||
721 | CONFIG_SND_AC97_BUS=m | ||
722 | # CONFIG_SND_DUMMY is not set | ||
723 | # CONFIG_SND_MTPAV is not set | ||
724 | # CONFIG_SND_SERIAL_U16550 is not set | ||
725 | # CONFIG_SND_MPU401 is not set | ||
726 | |||
727 | # | ||
728 | # ALSA ARM devices | ||
729 | # | ||
730 | CONFIG_SND_ARMAACI=m | ||
731 | |||
732 | # | ||
733 | # Open Sound System | ||
734 | # | ||
735 | # CONFIG_SOUND_PRIME is not set | ||
736 | |||
737 | # | ||
738 | # USB support | ||
739 | # | ||
740 | CONFIG_USB_ARCH_HAS_HCD=y | ||
741 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
742 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
743 | # CONFIG_USB is not set | ||
744 | |||
745 | # | ||
746 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
747 | # | ||
748 | |||
749 | # | ||
750 | # USB Gadget Support | ||
751 | # | ||
752 | # CONFIG_USB_GADGET is not set | ||
753 | |||
754 | # | ||
755 | # MMC/SD Card support | ||
756 | # | ||
757 | CONFIG_MMC=y | ||
758 | # CONFIG_MMC_DEBUG is not set | ||
759 | CONFIG_MMC_BLOCK=y | ||
760 | CONFIG_MMC_ARMMMCI=y | ||
761 | # CONFIG_MMC_TIFM_SD is not set | ||
762 | |||
763 | # | ||
764 | # Real Time Clock | ||
765 | # | ||
766 | CONFIG_RTC_LIB=y | ||
767 | CONFIG_RTC_CLASS=y | ||
768 | CONFIG_RTC_HCTOSYS=y | ||
769 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
770 | # CONFIG_RTC_DEBUG is not set | ||
771 | |||
772 | # | ||
773 | # RTC interfaces | ||
774 | # | ||
775 | CONFIG_RTC_INTF_SYSFS=y | ||
776 | CONFIG_RTC_INTF_PROC=y | ||
777 | CONFIG_RTC_INTF_DEV=y | ||
778 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y | ||
779 | |||
780 | # | ||
781 | # RTC drivers | ||
782 | # | ||
783 | # CONFIG_RTC_DRV_DS1553 is not set | ||
784 | # CONFIG_RTC_DRV_DS1742 is not set | ||
785 | # CONFIG_RTC_DRV_M48T86 is not set | ||
786 | CONFIG_RTC_DRV_PL031=y | ||
787 | # CONFIG_RTC_DRV_TEST is not set | ||
788 | # CONFIG_RTC_DRV_V3020 is not set | ||
789 | |||
790 | # | ||
791 | # File systems | ||
792 | # | ||
793 | CONFIG_EXT2_FS=y | ||
794 | # CONFIG_EXT2_FS_XATTR is not set | ||
795 | # CONFIG_EXT2_FS_XIP is not set | ||
796 | # CONFIG_EXT3_FS is not set | ||
797 | # CONFIG_EXT4DEV_FS is not set | ||
798 | # CONFIG_REISERFS_FS is not set | ||
799 | # CONFIG_JFS_FS is not set | ||
800 | # CONFIG_FS_POSIX_ACL is not set | ||
801 | # CONFIG_XFS_FS is not set | ||
802 | # CONFIG_GFS2_FS is not set | ||
803 | # CONFIG_OCFS2_FS is not set | ||
804 | # CONFIG_MINIX_FS is not set | ||
805 | # CONFIG_ROMFS_FS is not set | ||
806 | CONFIG_INOTIFY=y | ||
807 | # CONFIG_INOTIFY_USER is not set | ||
808 | # CONFIG_QUOTA is not set | ||
809 | CONFIG_DNOTIFY=y | ||
810 | # CONFIG_AUTOFS_FS is not set | ||
811 | # CONFIG_AUTOFS4_FS is not set | ||
812 | # CONFIG_FUSE_FS is not set | ||
813 | |||
814 | # | ||
815 | # CD-ROM/DVD Filesystems | ||
816 | # | ||
817 | # CONFIG_ISO9660_FS is not set | ||
818 | # CONFIG_UDF_FS is not set | ||
819 | |||
820 | # | ||
821 | # DOS/FAT/NT Filesystems | ||
822 | # | ||
823 | CONFIG_FAT_FS=y | ||
824 | # CONFIG_MSDOS_FS is not set | ||
825 | CONFIG_VFAT_FS=y | ||
826 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
827 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
828 | # CONFIG_NTFS_FS is not set | ||
829 | |||
830 | # | ||
831 | # Pseudo filesystems | ||
832 | # | ||
833 | CONFIG_PROC_FS=y | ||
834 | CONFIG_PROC_SYSCTL=y | ||
835 | CONFIG_SYSFS=y | ||
836 | CONFIG_TMPFS=y | ||
837 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
838 | # CONFIG_HUGETLB_PAGE is not set | ||
839 | CONFIG_RAMFS=y | ||
840 | # CONFIG_CONFIGFS_FS is not set | ||
841 | |||
842 | # | ||
843 | # Miscellaneous filesystems | ||
844 | # | ||
845 | # CONFIG_ADFS_FS is not set | ||
846 | # CONFIG_AFFS_FS is not set | ||
847 | # CONFIG_HFS_FS is not set | ||
848 | # CONFIG_HFSPLUS_FS is not set | ||
849 | # CONFIG_BEFS_FS is not set | ||
850 | # CONFIG_BFS_FS is not set | ||
851 | # CONFIG_EFS_FS is not set | ||
852 | # CONFIG_JFFS_FS is not set | ||
853 | # CONFIG_JFFS2_FS is not set | ||
854 | CONFIG_CRAMFS=y | ||
855 | # CONFIG_VXFS_FS is not set | ||
856 | # CONFIG_HPFS_FS is not set | ||
857 | # CONFIG_QNX4FS_FS is not set | ||
858 | # CONFIG_SYSV_FS is not set | ||
859 | # CONFIG_UFS_FS is not set | ||
860 | |||
861 | # | ||
862 | # Network File Systems | ||
863 | # | ||
864 | CONFIG_NFS_FS=y | ||
865 | CONFIG_NFS_V3=y | ||
866 | # CONFIG_NFS_V3_ACL is not set | ||
867 | # CONFIG_NFS_V4 is not set | ||
868 | # CONFIG_NFS_DIRECTIO is not set | ||
869 | # CONFIG_NFSD is not set | ||
870 | CONFIG_ROOT_NFS=y | ||
871 | CONFIG_LOCKD=y | ||
872 | CONFIG_LOCKD_V4=y | ||
873 | CONFIG_NFS_COMMON=y | ||
874 | CONFIG_SUNRPC=y | ||
875 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
876 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
877 | # CONFIG_SMB_FS is not set | ||
878 | # CONFIG_CIFS is not set | ||
879 | # CONFIG_NCP_FS is not set | ||
880 | # CONFIG_CODA_FS is not set | ||
881 | # CONFIG_AFS_FS is not set | ||
882 | # CONFIG_9P_FS is not set | ||
883 | |||
884 | # | ||
885 | # Partition Types | ||
886 | # | ||
887 | # CONFIG_PARTITION_ADVANCED is not set | ||
888 | CONFIG_MSDOS_PARTITION=y | ||
889 | |||
890 | # | ||
891 | # Native Language Support | ||
892 | # | ||
893 | CONFIG_NLS=y | ||
894 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
895 | CONFIG_NLS_CODEPAGE_437=y | ||
896 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
897 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
898 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
899 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
900 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
901 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
902 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
903 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
904 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
905 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
906 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
907 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
908 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
909 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
910 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
911 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
912 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
913 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
914 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
915 | # CONFIG_NLS_ISO8859_8 is not set | ||
916 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
917 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
918 | # CONFIG_NLS_ASCII is not set | ||
919 | CONFIG_NLS_ISO8859_1=y | ||
920 | # CONFIG_NLS_ISO8859_2 is not set | ||
921 | # CONFIG_NLS_ISO8859_3 is not set | ||
922 | # CONFIG_NLS_ISO8859_4 is not set | ||
923 | # CONFIG_NLS_ISO8859_5 is not set | ||
924 | # CONFIG_NLS_ISO8859_6 is not set | ||
925 | # CONFIG_NLS_ISO8859_7 is not set | ||
926 | # CONFIG_NLS_ISO8859_9 is not set | ||
927 | # CONFIG_NLS_ISO8859_13 is not set | ||
928 | # CONFIG_NLS_ISO8859_14 is not set | ||
929 | # CONFIG_NLS_ISO8859_15 is not set | ||
930 | # CONFIG_NLS_KOI8_R is not set | ||
931 | # CONFIG_NLS_KOI8_U is not set | ||
932 | # CONFIG_NLS_UTF8 is not set | ||
933 | |||
934 | # | ||
935 | # Profiling support | ||
936 | # | ||
937 | # CONFIG_PROFILING is not set | ||
938 | |||
939 | # | ||
940 | # Kernel hacking | ||
941 | # | ||
942 | # CONFIG_PRINTK_TIME is not set | ||
943 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
944 | CONFIG_MAGIC_SYSRQ=y | ||
945 | # CONFIG_UNUSED_SYMBOLS is not set | ||
946 | CONFIG_DEBUG_KERNEL=y | ||
947 | CONFIG_LOG_BUF_SHIFT=14 | ||
948 | CONFIG_DETECT_SOFTLOCKUP=y | ||
949 | # CONFIG_SCHEDSTATS is not set | ||
950 | # CONFIG_DEBUG_SLAB is not set | ||
951 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
952 | # CONFIG_RT_MUTEX_TESTER is not set | ||
953 | CONFIG_DEBUG_SPINLOCK=y | ||
954 | CONFIG_DEBUG_MUTEXES=y | ||
955 | CONFIG_DEBUG_RWSEMS=y | ||
956 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
957 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
958 | # CONFIG_DEBUG_KOBJECT is not set | ||
959 | CONFIG_DEBUG_BUGVERBOSE=y | ||
960 | # CONFIG_DEBUG_INFO is not set | ||
961 | # CONFIG_DEBUG_FS is not set | ||
962 | # CONFIG_DEBUG_VM is not set | ||
963 | # CONFIG_DEBUG_LIST is not set | ||
964 | CONFIG_FRAME_POINTER=y | ||
965 | # CONFIG_UNWIND_INFO is not set | ||
966 | CONFIG_FORCED_INLINING=y | ||
967 | # CONFIG_HEADERS_CHECK is not set | ||
968 | # CONFIG_RCU_TORTURE_TEST is not set | ||
969 | CONFIG_DEBUG_USER=y | ||
970 | # CONFIG_DEBUG_WAITQ is not set | ||
971 | CONFIG_DEBUG_ERRORS=y | ||
972 | CONFIG_DEBUG_LL=y | ||
973 | # CONFIG_DEBUG_ICEDCC is not set | ||
974 | |||
975 | # | ||
976 | # Security options | ||
977 | # | ||
978 | # CONFIG_KEYS is not set | ||
979 | # CONFIG_SECURITY is not set | ||
980 | |||
981 | # | ||
982 | # Cryptographic options | ||
983 | # | ||
984 | # CONFIG_CRYPTO is not set | ||
985 | |||
986 | # | ||
987 | # Library routines | ||
988 | # | ||
989 | # CONFIG_CRC_CCITT is not set | ||
990 | # CONFIG_CRC16 is not set | ||
991 | CONFIG_CRC32=y | ||
992 | # CONFIG_LIBCRC32C is not set | ||
993 | CONFIG_ZLIB_INFLATE=y | ||
994 | CONFIG_PLIST=y | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 421329f5e18e..a07d202143c3 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/module.h> | ||
10 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
@@ -19,6 +20,7 @@ | |||
19 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
20 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
21 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/irq.h> | ||
22 | 24 | ||
23 | #include <asm/atomic.h> | 25 | #include <asm/atomic.h> |
24 | #include <asm/cacheflush.h> | 26 | #include <asm/cacheflush.h> |
@@ -474,25 +476,26 @@ void show_local_irqs(struct seq_file *p) | |||
474 | seq_putc(p, '\n'); | 476 | seq_putc(p, '\n'); |
475 | } | 477 | } |
476 | 478 | ||
477 | static void ipi_timer(struct pt_regs *regs) | 479 | static void ipi_timer(void) |
478 | { | 480 | { |
479 | int user = user_mode(regs); | ||
480 | |||
481 | irq_enter(); | 481 | irq_enter(); |
482 | profile_tick(CPU_PROFILING, regs); | 482 | profile_tick(CPU_PROFILING); |
483 | update_process_times(user); | 483 | update_process_times(user_mode(get_irq_regs())); |
484 | irq_exit(); | 484 | irq_exit(); |
485 | } | 485 | } |
486 | 486 | ||
487 | #ifdef CONFIG_LOCAL_TIMERS | 487 | #ifdef CONFIG_LOCAL_TIMERS |
488 | asmlinkage void do_local_timer(struct pt_regs *regs) | 488 | asmlinkage void do_local_timer(struct pt_regs *regs) |
489 | { | 489 | { |
490 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
490 | int cpu = smp_processor_id(); | 491 | int cpu = smp_processor_id(); |
491 | 492 | ||
492 | if (local_timer_ack()) { | 493 | if (local_timer_ack()) { |
493 | irq_stat[cpu].local_timer_irqs++; | 494 | irq_stat[cpu].local_timer_irqs++; |
494 | ipi_timer(regs); | 495 | ipi_timer(); |
495 | } | 496 | } |
497 | |||
498 | set_irq_regs(old_regs); | ||
496 | } | 499 | } |
497 | #endif | 500 | #endif |
498 | 501 | ||
@@ -551,6 +554,7 @@ asmlinkage void do_IPI(struct pt_regs *regs) | |||
551 | { | 554 | { |
552 | unsigned int cpu = smp_processor_id(); | 555 | unsigned int cpu = smp_processor_id(); |
553 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); | 556 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); |
557 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
554 | 558 | ||
555 | ipi->ipi_count++; | 559 | ipi->ipi_count++; |
556 | 560 | ||
@@ -574,7 +578,7 @@ asmlinkage void do_IPI(struct pt_regs *regs) | |||
574 | 578 | ||
575 | switch (nextmsg) { | 579 | switch (nextmsg) { |
576 | case IPI_TIMER: | 580 | case IPI_TIMER: |
577 | ipi_timer(regs); | 581 | ipi_timer(); |
578 | break; | 582 | break; |
579 | 583 | ||
580 | case IPI_RESCHEDULE: | 584 | case IPI_RESCHEDULE: |
@@ -599,6 +603,8 @@ asmlinkage void do_IPI(struct pt_regs *regs) | |||
599 | } | 603 | } |
600 | } while (msgs); | 604 | } while (msgs); |
601 | } | 605 | } |
606 | |||
607 | set_irq_regs(old_regs); | ||
602 | } | 608 | } |
603 | 609 | ||
604 | void smp_send_reschedule(int cpu) | 610 | void smp_send_reschedule(int cpu) |
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index c03cab5c4c79..0c5a6091a93c 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -327,13 +327,12 @@ EXPORT_SYMBOL(restore_time_delta); | |||
327 | */ | 327 | */ |
328 | void timer_tick(void) | 328 | void timer_tick(void) |
329 | { | 329 | { |
330 | struct pt_regs *regs = get_irq_regs(); | ||
331 | profile_tick(CPU_PROFILING); | 330 | profile_tick(CPU_PROFILING); |
332 | do_leds(); | 331 | do_leds(); |
333 | do_set_rtc(); | 332 | do_set_rtc(); |
334 | do_timer(1); | 333 | do_timer(1); |
335 | #ifndef CONFIG_SMP | 334 | #ifndef CONFIG_SMP |
336 | update_process_times(user_mode(regs)); | 335 | update_process_times(user_mode(get_irq_regs())); |
337 | #endif | 336 | #endif |
338 | } | 337 | } |
339 | 338 | ||
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 3ca574ee2772..a8fa75ea07a9 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -45,13 +45,7 @@ SECTIONS | |||
45 | *(.early_param.init) | 45 | *(.early_param.init) |
46 | __early_end = .; | 46 | __early_end = .; |
47 | __initcall_start = .; | 47 | __initcall_start = .; |
48 | *(.initcall1.init) | 48 | INITCALLS |
49 | *(.initcall2.init) | ||
50 | *(.initcall3.init) | ||
51 | *(.initcall4.init) | ||
52 | *(.initcall5.init) | ||
53 | *(.initcall6.init) | ||
54 | *(.initcall7.init) | ||
55 | __initcall_end = .; | 49 | __initcall_end = .; |
56 | __con_initcall_start = .; | 50 | __con_initcall_start = .; |
57 | *(.con_initcall.init) | 51 | *(.con_initcall.init) |
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index a2c94a47b2b2..2499a7707e3c 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c | |||
@@ -85,7 +85,7 @@ n2100_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
85 | irq = IRQ_IOP32X_XINT0; | 85 | irq = IRQ_IOP32X_XINT0; |
86 | } else if (PCI_SLOT(dev->devfn) == 2) { | 86 | } else if (PCI_SLOT(dev->devfn) == 2) { |
87 | /* RTL8110SB #2 */ | 87 | /* RTL8110SB #2 */ |
88 | irq = IRQ_IOP32X_XINT1; | 88 | irq = IRQ_IOP32X_XINT3; |
89 | } else if (PCI_SLOT(dev->devfn) == 3) { | 89 | } else if (PCI_SLOT(dev->devfn) == 3) { |
90 | /* Sil3512 */ | 90 | /* Sil3512 */ |
91 | irq = IRQ_IOP32X_XINT2; | 91 | irq = IRQ_IOP32X_XINT2; |
diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c index 90a4130114a6..78f4c1346044 100644 --- a/arch/arm/mach-sa1100/cpu-sa1110.c +++ b/arch/arm/mach-sa1100/cpu-sa1110.c | |||
@@ -83,7 +83,7 @@ static struct sdram_params sdram_tbl[] __initdata = { | |||
83 | .refresh = 64000, | 83 | .refresh = 64000, |
84 | .cas_latency = 3, | 84 | .cas_latency = 3, |
85 | }, { /* Samsung K4S281632B-1H */ | 85 | }, { /* Samsung K4S281632B-1H */ |
86 | .name = "K4S281632b-1H", | 86 | .name = "K4S281632B-1H", |
87 | .rows = 12, | 87 | .rows = 12, |
88 | .tck = 10, | 88 | .tck = 10, |
89 | .trp = 20, | 89 | .trp = 20, |
diff --git a/arch/arm/vfp/vfpdouble.c b/arch/arm/vfp/vfpdouble.c index 4fc05ee0a2ef..e44b9ed0f81f 100644 --- a/arch/arm/vfp/vfpdouble.c +++ b/arch/arm/vfp/vfpdouble.c | |||
@@ -56,7 +56,7 @@ static void vfp_double_normalise_denormal(struct vfp_double *vd) | |||
56 | { | 56 | { |
57 | int bits = 31 - fls(vd->significand >> 32); | 57 | int bits = 31 - fls(vd->significand >> 32); |
58 | if (bits == 31) | 58 | if (bits == 31) |
59 | bits = 62 - fls(vd->significand); | 59 | bits = 63 - fls(vd->significand); |
60 | 60 | ||
61 | vfp_double_dump("normalise_denormal: in", vd); | 61 | vfp_double_dump("normalise_denormal: in", vd); |
62 | 62 | ||
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index a657a28f08db..f08eafbddcc1 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -148,6 +148,7 @@ static void vfp_raise_exceptions(u32 exceptions, u32 inst, u32 fpscr, struct pt_ | |||
148 | /* | 148 | /* |
149 | * These are arranged in priority order, least to highest. | 149 | * These are arranged in priority order, least to highest. |
150 | */ | 150 | */ |
151 | RAISE(FPSCR_DZC, FPSCR_DZE, FPE_FLTDIV); | ||
151 | RAISE(FPSCR_IXC, FPSCR_IXE, FPE_FLTRES); | 152 | RAISE(FPSCR_IXC, FPSCR_IXE, FPE_FLTRES); |
152 | RAISE(FPSCR_UFC, FPSCR_UFE, FPE_FLTUND); | 153 | RAISE(FPSCR_UFC, FPSCR_UFE, FPE_FLTUND); |
153 | RAISE(FPSCR_OFC, FPSCR_OFE, FPE_FLTOVF); | 154 | RAISE(FPSCR_OFC, FPSCR_OFE, FPE_FLTOVF); |
diff --git a/arch/avr32/kernel/vmlinux.lds.c b/arch/avr32/kernel/vmlinux.lds.c index cdd627c6b7dc..5c4424e362b5 100644 --- a/arch/avr32/kernel/vmlinux.lds.c +++ b/arch/avr32/kernel/vmlinux.lds.c | |||
@@ -38,13 +38,7 @@ SECTIONS | |||
38 | __setup_end = .; | 38 | __setup_end = .; |
39 | . = ALIGN(4); | 39 | . = ALIGN(4); |
40 | __initcall_start = .; | 40 | __initcall_start = .; |
41 | *(.initcall1.init) | 41 | INITCALLS |
42 | *(.initcall2.init) | ||
43 | *(.initcall3.init) | ||
44 | *(.initcall4.init) | ||
45 | *(.initcall5.init) | ||
46 | *(.initcall6.init) | ||
47 | *(.initcall7.init) | ||
48 | __initcall_end = .; | 42 | __initcall_end = .; |
49 | __con_initcall_start = .; | 43 | __con_initcall_start = .; |
50 | *(.con_initcall.init) | 44 | *(.con_initcall.init) |
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index ba096ebb0b15..2449637e6fc0 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c | |||
@@ -2051,7 +2051,6 @@ static void cryptocop_job_queue_close(void) | |||
2051 | spin_lock_irqsave(&cryptocop_process_lock, process_flags); | 2051 | spin_lock_irqsave(&cryptocop_process_lock, process_flags); |
2052 | 2052 | ||
2053 | /* Empty the job queue. */ | 2053 | /* Empty the job queue. */ |
2054 | spin_lock_irqsave(&cryptocop_process_lock, process_flags); | ||
2055 | for (i = 0; i < cryptocop_prio_no_prios; i++){ | 2054 | for (i = 0; i < cryptocop_prio_no_prios; i++){ |
2056 | if (!list_empty(&(cryptocop_job_queues[i].jobs))){ | 2055 | if (!list_empty(&(cryptocop_job_queues[i].jobs))){ |
2057 | list_for_each_safe(node, tmp, &(cryptocop_job_queues[i].jobs)) { | 2056 | list_for_each_safe(node, tmp, &(cryptocop_job_queues[i].jobs)) { |
diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S index f474534ba78a..9c1fb12367fa 100644 --- a/arch/frv/kernel/vmlinux.lds.S +++ b/arch/frv/kernel/vmlinux.lds.S | |||
@@ -44,13 +44,7 @@ SECTIONS | |||
44 | 44 | ||
45 | __initcall_start = .; | 45 | __initcall_start = .; |
46 | .initcall.init : { | 46 | .initcall.init : { |
47 | *(.initcall1.init) | 47 | INITCALLS |
48 | *(.initcall2.init) | ||
49 | *(.initcall3.init) | ||
50 | *(.initcall4.init) | ||
51 | *(.initcall5.init) | ||
52 | *(.initcall6.init) | ||
53 | *(.initcall7.init) | ||
54 | } | 48 | } |
55 | __initcall_end = .; | 49 | __initcall_end = .; |
56 | __con_initcall_start = .; | 50 | __con_initcall_start = .; |
diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S index 6406c388f88a..756325dd480e 100644 --- a/arch/h8300/kernel/vmlinux.lds.S +++ b/arch/h8300/kernel/vmlinux.lds.S | |||
@@ -118,13 +118,7 @@ SECTIONS | |||
118 | . = ALIGN(0x4) ; | 118 | . = ALIGN(0x4) ; |
119 | ___setup_end = .; | 119 | ___setup_end = .; |
120 | ___initcall_start = .; | 120 | ___initcall_start = .; |
121 | *(.initcall1.init) | 121 | INITCALLS |
122 | *(.initcall2.init) | ||
123 | *(.initcall3.init) | ||
124 | *(.initcall4.init) | ||
125 | *(.initcall5.init) | ||
126 | *(.initcall6.init) | ||
127 | *(.initcall7.init) | ||
128 | ___initcall_end = .; | 122 | ___initcall_end = .; |
129 | ___con_initcall_start = .; | 123 | ___con_initcall_start = .; |
130 | *(.con_initcall.init) | 124 | *(.con_initcall.init) |
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index 2af65858d322..a60358fe9a49 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c | |||
@@ -198,7 +198,7 @@ | |||
198 | * (APM) BIOS Interface Specification, Revision 1.2, February 1996. | 198 | * (APM) BIOS Interface Specification, Revision 1.2, February 1996. |
199 | * | 199 | * |
200 | * [This document is available from Microsoft at: | 200 | * [This document is available from Microsoft at: |
201 | * http://www.microsoft.com/hwdev/busbios/amp_12.htm] | 201 | * http://www.microsoft.com/whdc/archive/amp_12.mspx] |
202 | */ | 202 | */ |
203 | 203 | ||
204 | #include <linux/module.h> | 204 | #include <linux/module.h> |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 519e63c3c130..141041dde74d 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -846,7 +846,7 @@ efi_find_max_pfn(unsigned long start, unsigned long end, void *arg) | |||
846 | static int __init | 846 | static int __init |
847 | efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg) | 847 | efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg) |
848 | { | 848 | { |
849 | memory_present(0, start, end); | 849 | memory_present(0, PFN_UP(start), PFN_DOWN(end)); |
850 | return 0; | 850 | return 0; |
851 | } | 851 | } |
852 | 852 | ||
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S index 1e7ac1c44ddc..adc1f232afee 100644 --- a/arch/i386/kernel/vmlinux.lds.S +++ b/arch/i386/kernel/vmlinux.lds.S | |||
@@ -126,13 +126,7 @@ SECTIONS | |||
126 | __setup_end = .; | 126 | __setup_end = .; |
127 | __initcall_start = .; | 127 | __initcall_start = .; |
128 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { | 128 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { |
129 | *(.initcall1.init) | 129 | INITCALLS |
130 | *(.initcall2.init) | ||
131 | *(.initcall3.init) | ||
132 | *(.initcall4.init) | ||
133 | *(.initcall5.init) | ||
134 | *(.initcall6.init) | ||
135 | *(.initcall7.init) | ||
136 | } | 130 | } |
137 | __initcall_end = .; | 131 | __initcall_end = .; |
138 | __con_initcall_start = .; | 132 | __con_initcall_start = .; |
diff --git a/arch/i386/mach-visws/visws_apic.c b/arch/i386/mach-visws/visws_apic.c index 07097ed48890..38c2b13124d9 100644 --- a/arch/i386/mach-visws/visws_apic.c +++ b/arch/i386/mach-visws/visws_apic.c | |||
@@ -122,7 +122,7 @@ static void end_cobalt_irq(unsigned int irq) | |||
122 | spin_unlock_irqrestore(&cobalt_lock, flags); | 122 | spin_unlock_irqrestore(&cobalt_lock, flags); |
123 | } | 123 | } |
124 | 124 | ||
125 | static struct hw_interrupt_type cobalt_irq_type = { | 125 | static struct irq_chip cobalt_irq_type = { |
126 | .typename = "Cobalt-APIC", | 126 | .typename = "Cobalt-APIC", |
127 | .startup = startup_cobalt_irq, | 127 | .startup = startup_cobalt_irq, |
128 | .shutdown = disable_cobalt_irq, | 128 | .shutdown = disable_cobalt_irq, |
@@ -159,7 +159,7 @@ static void end_piix4_master_irq(unsigned int irq) | |||
159 | spin_unlock_irqrestore(&cobalt_lock, flags); | 159 | spin_unlock_irqrestore(&cobalt_lock, flags); |
160 | } | 160 | } |
161 | 161 | ||
162 | static struct hw_interrupt_type piix4_master_irq_type = { | 162 | static struct irq_chip piix4_master_irq_type = { |
163 | .typename = "PIIX4-master", | 163 | .typename = "PIIX4-master", |
164 | .startup = startup_piix4_master_irq, | 164 | .startup = startup_piix4_master_irq, |
165 | .ack = ack_cobalt_irq, | 165 | .ack = ack_cobalt_irq, |
@@ -167,9 +167,8 @@ static struct hw_interrupt_type piix4_master_irq_type = { | |||
167 | }; | 167 | }; |
168 | 168 | ||
169 | 169 | ||
170 | static struct hw_interrupt_type piix4_virtual_irq_type = { | 170 | static struct irq_chip piix4_virtual_irq_type = { |
171 | .typename = "PIIX4-virtual", | 171 | .typename = "PIIX4-virtual", |
172 | .startup = startup_8259A_irq, | ||
173 | .shutdown = disable_8259A_irq, | 172 | .shutdown = disable_8259A_irq, |
174 | .enable = enable_8259A_irq, | 173 | .enable = enable_8259A_irq, |
175 | .disable = disable_8259A_irq, | 174 | .disable = disable_8259A_irq, |
diff --git a/arch/i386/pci/fixup.c b/arch/i386/pci/fixup.c index 908b410f4c93..c1949ff38d61 100644 --- a/arch/i386/pci/fixup.c +++ b/arch/i386/pci/fixup.c | |||
@@ -343,6 +343,61 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PC, pcie_ro | |||
343 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PC1, pcie_rootport_aspm_quirk ); | 343 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PC1, pcie_rootport_aspm_quirk ); |
344 | 344 | ||
345 | /* | 345 | /* |
346 | * Fixup to mark boot BIOS video selected by BIOS before it changes | ||
347 | * | ||
348 | * From information provided by "Jon Smirl" <jonsmirl@gmail.com> | ||
349 | * | ||
350 | * The standard boot ROM sequence for an x86 machine uses the BIOS | ||
351 | * to select an initial video card for boot display. This boot video | ||
352 | * card will have it's BIOS copied to C0000 in system RAM. | ||
353 | * IORESOURCE_ROM_SHADOW is used to associate the boot video | ||
354 | * card with this copy. On laptops this copy has to be used since | ||
355 | * the main ROM may be compressed or combined with another image. | ||
356 | * See pci_map_rom() for use of this flag. IORESOURCE_ROM_SHADOW | ||
357 | * is marked here since the boot video device will be the only enabled | ||
358 | * video device at this point. | ||
359 | */ | ||
360 | |||
361 | static void __devinit pci_fixup_video(struct pci_dev *pdev) | ||
362 | { | ||
363 | struct pci_dev *bridge; | ||
364 | struct pci_bus *bus; | ||
365 | u16 config; | ||
366 | |||
367 | if ((pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) | ||
368 | return; | ||
369 | |||
370 | /* Is VGA routed to us? */ | ||
371 | bus = pdev->bus; | ||
372 | while (bus) { | ||
373 | bridge = bus->self; | ||
374 | |||
375 | /* | ||
376 | * From information provided by | ||
377 | * "David Miller" <davem@davemloft.net> | ||
378 | * The bridge control register is valid for PCI header | ||
379 | * type BRIDGE, or CARDBUS. Host to PCI controllers use | ||
380 | * PCI header type NORMAL. | ||
381 | */ | ||
382 | if (bridge | ||
383 | &&((bridge->hdr_type == PCI_HEADER_TYPE_BRIDGE) | ||
384 | ||(bridge->hdr_type == PCI_HEADER_TYPE_CARDBUS))) { | ||
385 | pci_read_config_word(bridge, PCI_BRIDGE_CONTROL, | ||
386 | &config); | ||
387 | if (!(config & PCI_BRIDGE_CTL_VGA)) | ||
388 | return; | ||
389 | } | ||
390 | bus = bus->parent; | ||
391 | } | ||
392 | pci_read_config_word(pdev, PCI_COMMAND, &config); | ||
393 | if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { | ||
394 | pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; | ||
395 | printk(KERN_DEBUG "Boot video device is %s\n", pci_name(pdev)); | ||
396 | } | ||
397 | } | ||
398 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_video); | ||
399 | |||
400 | /* | ||
346 | * Some Toshiba laptops need extra code to enable their TI TSB43AB22/A. | 401 | * Some Toshiba laptops need extra code to enable their TI TSB43AB22/A. |
347 | * | 402 | * |
348 | * We pretend to bring them out of full D3 state, and restore the proper | 403 | * We pretend to bring them out of full D3 state, and restore the proper |
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index b3b2e389d6b2..d6083a0936f4 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S | |||
@@ -128,13 +128,7 @@ SECTIONS | |||
128 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) | 128 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) |
129 | { | 129 | { |
130 | __initcall_start = .; | 130 | __initcall_start = .; |
131 | *(.initcall1.init) | 131 | INITCALLS |
132 | *(.initcall2.init) | ||
133 | *(.initcall3.init) | ||
134 | *(.initcall4.init) | ||
135 | *(.initcall5.init) | ||
136 | *(.initcall6.init) | ||
137 | *(.initcall7.init) | ||
138 | __initcall_end = .; | 132 | __initcall_end = .; |
139 | } | 133 | } |
140 | 134 | ||
diff --git a/arch/ia64/pci/Makefile b/arch/ia64/pci/Makefile index e66889e6922a..fb14dc520d2d 100644 --- a/arch/ia64/pci/Makefile +++ b/arch/ia64/pci/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the ia64-specific parts of the pci bus | 2 | # Makefile for the ia64-specific parts of the pci bus |
3 | # | 3 | # |
4 | obj-y := pci.o | 4 | obj-y := pci.o fixup.o |
diff --git a/arch/ia64/pci/fixup.c b/arch/ia64/pci/fixup.c new file mode 100644 index 000000000000..245dc1fedc24 --- /dev/null +++ b/arch/ia64/pci/fixup.c | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * Exceptions for specific devices. Usually work-arounds for fatal design flaws. | ||
3 | * Derived from fixup.c of i386 tree. | ||
4 | */ | ||
5 | |||
6 | #include <linux/pci.h> | ||
7 | #include <linux/init.h> | ||
8 | |||
9 | #include <asm/machvec.h> | ||
10 | |||
11 | /* | ||
12 | * Fixup to mark boot BIOS video selected by BIOS before it changes | ||
13 | * | ||
14 | * From information provided by "Jon Smirl" <jonsmirl@gmail.com> | ||
15 | * | ||
16 | * The standard boot ROM sequence for an x86 machine uses the BIOS | ||
17 | * to select an initial video card for boot display. This boot video | ||
18 | * card will have it's BIOS copied to C0000 in system RAM. | ||
19 | * IORESOURCE_ROM_SHADOW is used to associate the boot video | ||
20 | * card with this copy. On laptops this copy has to be used since | ||
21 | * the main ROM may be compressed or combined with another image. | ||
22 | * See pci_map_rom() for use of this flag. IORESOURCE_ROM_SHADOW | ||
23 | * is marked here since the boot video device will be the only enabled | ||
24 | * video device at this point. | ||
25 | */ | ||
26 | |||
27 | static void __devinit pci_fixup_video(struct pci_dev *pdev) | ||
28 | { | ||
29 | struct pci_dev *bridge; | ||
30 | struct pci_bus *bus; | ||
31 | u16 config; | ||
32 | |||
33 | if ((strcmp(platform_name, "dig") != 0) | ||
34 | && (strcmp(platform_name, "hpzx1") != 0)) | ||
35 | return; | ||
36 | /* Maybe, this machine supports legacy memory map. */ | ||
37 | |||
38 | if ((pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) | ||
39 | return; | ||
40 | |||
41 | /* Is VGA routed to us? */ | ||
42 | bus = pdev->bus; | ||
43 | while (bus) { | ||
44 | bridge = bus->self; | ||
45 | |||
46 | /* | ||
47 | * From information provided by | ||
48 | * "David Miller" <davem@davemloft.net> | ||
49 | * The bridge control register is valid for PCI header | ||
50 | * type BRIDGE, or CARDBUS. Host to PCI controllers use | ||
51 | * PCI header type NORMAL. | ||
52 | */ | ||
53 | if (bridge | ||
54 | &&((bridge->hdr_type == PCI_HEADER_TYPE_BRIDGE) | ||
55 | ||(bridge->hdr_type == PCI_HEADER_TYPE_CARDBUS))) { | ||
56 | pci_read_config_word(bridge, PCI_BRIDGE_CONTROL, | ||
57 | &config); | ||
58 | if (!(config & PCI_BRIDGE_CTL_VGA)) | ||
59 | return; | ||
60 | } | ||
61 | bus = bus->parent; | ||
62 | } | ||
63 | pci_read_config_word(pdev, PCI_COMMAND, &config); | ||
64 | if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { | ||
65 | pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; | ||
66 | printk(KERN_DEBUG "Boot video device is %s\n", pci_name(pdev)); | ||
67 | } | ||
68 | } | ||
69 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_video); | ||
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S index 13c7bb698e37..358b9cee2c65 100644 --- a/arch/m32r/kernel/vmlinux.lds.S +++ b/arch/m32r/kernel/vmlinux.lds.S | |||
@@ -83,13 +83,7 @@ SECTIONS | |||
83 | __setup_end = .; | 83 | __setup_end = .; |
84 | __initcall_start = .; | 84 | __initcall_start = .; |
85 | .initcall.init : { | 85 | .initcall.init : { |
86 | *(.initcall1.init) | 86 | INITCALLS |
87 | *(.initcall2.init) | ||
88 | *(.initcall3.init) | ||
89 | *(.initcall4.init) | ||
90 | *(.initcall5.init) | ||
91 | *(.initcall6.init) | ||
92 | *(.initcall7.init) | ||
93 | } | 87 | } |
94 | __initcall_end = .; | 88 | __initcall_end = .; |
95 | __con_initcall_start = .; | 89 | __con_initcall_start = .; |
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds index 69d1d3d30c78..d2794452b195 100644 --- a/arch/m68k/kernel/vmlinux-std.lds +++ b/arch/m68k/kernel/vmlinux-std.lds | |||
@@ -54,13 +54,7 @@ SECTIONS | |||
54 | __setup_end = .; | 54 | __setup_end = .; |
55 | __initcall_start = .; | 55 | __initcall_start = .; |
56 | .initcall.init : { | 56 | .initcall.init : { |
57 | *(.initcall1.init) | 57 | INITCALLS |
58 | *(.initcall2.init) | ||
59 | *(.initcall3.init) | ||
60 | *(.initcall4.init) | ||
61 | *(.initcall5.init) | ||
62 | *(.initcall6.init) | ||
63 | *(.initcall7.init) | ||
64 | } | 58 | } |
65 | __initcall_end = .; | 59 | __initcall_end = .; |
66 | __con_initcall_start = .; | 60 | __con_initcall_start = .; |
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds index 65cc39c24185..2550b4ae2732 100644 --- a/arch/m68k/kernel/vmlinux-sun3.lds +++ b/arch/m68k/kernel/vmlinux-sun3.lds | |||
@@ -48,13 +48,7 @@ __init_begin = .; | |||
48 | __setup_end = .; | 48 | __setup_end = .; |
49 | __initcall_start = .; | 49 | __initcall_start = .; |
50 | .initcall.init : { | 50 | .initcall.init : { |
51 | *(.initcall1.init) | 51 | INITCALLS |
52 | *(.initcall2.init) | ||
53 | *(.initcall3.init) | ||
54 | *(.initcall4.init) | ||
55 | *(.initcall5.init) | ||
56 | *(.initcall6.init) | ||
57 | *(.initcall7.init) | ||
58 | } | 52 | } |
59 | __initcall_end = .; | 53 | __initcall_end = .; |
60 | __con_initcall_start = .; | 54 | __con_initcall_start = .; |
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S index ccd2ceb05cfb..58afa8be604e 100644 --- a/arch/m68knommu/kernel/vmlinux.lds.S +++ b/arch/m68knommu/kernel/vmlinux.lds.S | |||
@@ -140,13 +140,7 @@ SECTIONS { | |||
140 | *(.init.setup) | 140 | *(.init.setup) |
141 | __setup_end = .; | 141 | __setup_end = .; |
142 | __initcall_start = .; | 142 | __initcall_start = .; |
143 | *(.initcall1.init) | 143 | INITCALLS |
144 | *(.initcall2.init) | ||
145 | *(.initcall3.init) | ||
146 | *(.initcall4.init) | ||
147 | *(.initcall5.init) | ||
148 | *(.initcall6.init) | ||
149 | *(.initcall7.init) | ||
150 | __initcall_end = .; | 144 | __initcall_end = .; |
151 | __con_initcall_start = .; | 145 | __con_initcall_start = .; |
152 | *(.con_initcall.init) | 146 | *(.con_initcall.init) |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 14af6cce2fa2..74ba76378113 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -408,7 +408,7 @@ config MOMENCO_OCELOT_C | |||
408 | select SWAP_IO_SPACE | 408 | select SWAP_IO_SPACE |
409 | select SYS_HAS_CPU_RM7000 | 409 | select SYS_HAS_CPU_RM7000 |
410 | select SYS_SUPPORTS_32BIT_KERNEL | 410 | select SYS_SUPPORTS_32BIT_KERNEL |
411 | select SYS_SUPPORTS_64BIT_KERNEL | 411 | select SYS_SUPPORTS_64BIT_KERNEL if BROKEN |
412 | select SYS_SUPPORTS_BIG_ENDIAN | 412 | select SYS_SUPPORTS_BIG_ENDIAN |
413 | help | 413 | help |
414 | The Ocelot is a MIPS-based Single Board Computer (SBC) made by | 414 | The Ocelot is a MIPS-based Single Board Computer (SBC) made by |
@@ -1690,6 +1690,7 @@ config NR_CPUS | |||
1690 | depends on SMP | 1690 | depends on SMP |
1691 | default "64" if SGI_IP27 | 1691 | default "64" if SGI_IP27 |
1692 | default "2" | 1692 | default "2" |
1693 | default "8" if MIPS_MT_SMTC | ||
1693 | help | 1694 | help |
1694 | This allows you to specify the maximum number of CPUs which this | 1695 | This allows you to specify the maximum number of CPUs which this |
1695 | kernel will support. The maximum supported value is 32 for 32-bit | 1696 | kernel will support. The maximum supported value is 32 for 32-bit |
diff --git a/arch/mips/au1000/common/prom.c b/arch/mips/au1000/common/prom.c index b4b010a2fe36..6fce60af005d 100644 --- a/arch/mips/au1000/common/prom.c +++ b/arch/mips/au1000/common/prom.c | |||
@@ -47,7 +47,7 @@ extern int prom_argc; | |||
47 | extern char **prom_argv, **prom_envp; | 47 | extern char **prom_argv, **prom_envp; |
48 | 48 | ||
49 | 49 | ||
50 | char * prom_getcmdline(void) | 50 | char * __init_or_module prom_getcmdline(void) |
51 | { | 51 | { |
52 | return &(arcs_cmdline[0]); | 52 | return &(arcs_cmdline[0]); |
53 | } | 53 | } |
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c index 377ae0d8ff00..919172db560c 100644 --- a/arch/mips/au1000/common/setup.c +++ b/arch/mips/au1000/common/setup.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #include <asm/mach-au1x00/au1000.h> | 43 | #include <asm/mach-au1x00/au1000.h> |
44 | #include <asm/time.h> | 44 | #include <asm/time.h> |
45 | 45 | ||
46 | extern char * __init prom_getcmdline(void); | 46 | extern char * prom_getcmdline(void); |
47 | extern void __init board_setup(void); | 47 | extern void __init board_setup(void); |
48 | extern void au1000_restart(char *); | 48 | extern void au1000_restart(char *); |
49 | extern void au1000_halt(void); | 49 | extern void au1000_halt(void); |
diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c index 94f09194d63d..fa1c62f05515 100644 --- a/arch/mips/au1000/common/time.c +++ b/arch/mips/au1000/common/time.c | |||
@@ -53,9 +53,6 @@ static unsigned long r4k_cur; /* What counter should be at next timer irq */ | |||
53 | int no_au1xxx_32khz; | 53 | int no_au1xxx_32khz; |
54 | extern int allow_au1k_wait; /* default off for CP0 Counter */ | 54 | extern int allow_au1k_wait; /* default off for CP0 Counter */ |
55 | 55 | ||
56 | /* Cycle counter value at the previous timer interrupt.. */ | ||
57 | static unsigned int timerhi = 0, timerlo = 0; | ||
58 | |||
59 | #ifdef CONFIG_PM | 56 | #ifdef CONFIG_PM |
60 | #if HZ < 100 || HZ > 1000 | 57 | #if HZ < 100 || HZ > 1000 |
61 | #error "unsupported HZ value! Must be in [100,1000]" | 58 | #error "unsupported HZ value! Must be in [100,1000]" |
@@ -82,7 +79,6 @@ unsigned long wtimer; | |||
82 | void mips_timer_interrupt(void) | 79 | void mips_timer_interrupt(void) |
83 | { | 80 | { |
84 | int irq = 63; | 81 | int irq = 63; |
85 | unsigned long count; | ||
86 | 82 | ||
87 | irq_enter(); | 83 | irq_enter(); |
88 | kstat_this_cpu.irqs[irq]++; | 84 | kstat_this_cpu.irqs[irq]++; |
@@ -91,10 +87,6 @@ void mips_timer_interrupt(void) | |||
91 | goto null; | 87 | goto null; |
92 | 88 | ||
93 | do { | 89 | do { |
94 | count = read_c0_count(); | ||
95 | timerhi += (count < timerlo); /* Wrap around */ | ||
96 | timerlo = count; | ||
97 | |||
98 | kstat_this_cpu.irqs[irq]++; | 90 | kstat_this_cpu.irqs[irq]++; |
99 | do_timer(1); | 91 | do_timer(1); |
100 | #ifndef CONFIG_SMP | 92 | #ifndef CONFIG_SMP |
@@ -231,7 +223,6 @@ wakeup_counter0_set(int ticks) | |||
231 | */ | 223 | */ |
232 | unsigned long cal_r4koff(void) | 224 | unsigned long cal_r4koff(void) |
233 | { | 225 | { |
234 | unsigned long count; | ||
235 | unsigned long cpu_speed; | 226 | unsigned long cpu_speed; |
236 | unsigned long flags; | 227 | unsigned long flags; |
237 | unsigned long counter; | 228 | unsigned long counter; |
@@ -258,7 +249,7 @@ unsigned long cal_r4koff(void) | |||
258 | 249 | ||
259 | #if defined(CONFIG_AU1000_USE32K) | 250 | #if defined(CONFIG_AU1000_USE32K) |
260 | { | 251 | { |
261 | unsigned long start, end; | 252 | unsigned long start, end, count; |
262 | 253 | ||
263 | start = au_readl(SYS_RTCREAD); | 254 | start = au_readl(SYS_RTCREAD); |
264 | start += 2; | 255 | start += 2; |
@@ -282,7 +273,6 @@ unsigned long cal_r4koff(void) | |||
282 | #else | 273 | #else |
283 | cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * | 274 | cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * |
284 | AU1000_SRC_CLK; | 275 | AU1000_SRC_CLK; |
285 | count = cpu_speed / 2; | ||
286 | #endif | 276 | #endif |
287 | } | 277 | } |
288 | else { | 278 | else { |
@@ -291,98 +281,15 @@ unsigned long cal_r4koff(void) | |||
291 | * NOTE: some old silicon doesn't allow reading the PLL. | 281 | * NOTE: some old silicon doesn't allow reading the PLL. |
292 | */ | 282 | */ |
293 | cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * AU1000_SRC_CLK; | 283 | cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * AU1000_SRC_CLK; |
294 | count = cpu_speed / 2; | ||
295 | no_au1xxx_32khz = 1; | 284 | no_au1xxx_32khz = 1; |
296 | } | 285 | } |
297 | mips_hpt_frequency = count; | 286 | mips_hpt_frequency = cpu_speed; |
298 | // Equation: Baudrate = CPU / (SD * 2 * CLKDIV * 16) | 287 | // Equation: Baudrate = CPU / (SD * 2 * CLKDIV * 16) |
299 | set_au1x00_uart_baud_base(cpu_speed / (2 * ((int)(au_readl(SYS_POWERCTRL)&0x03) + 2) * 16)); | 288 | set_au1x00_uart_baud_base(cpu_speed / (2 * ((int)(au_readl(SYS_POWERCTRL)&0x03) + 2) * 16)); |
300 | spin_unlock_irqrestore(&time_lock, flags); | 289 | spin_unlock_irqrestore(&time_lock, flags); |
301 | return (cpu_speed / HZ); | 290 | return (cpu_speed / HZ); |
302 | } | 291 | } |
303 | 292 | ||
304 | /* This is for machines which generate the exact clock. */ | ||
305 | #define USECS_PER_JIFFY (1000000/HZ) | ||
306 | #define USECS_PER_JIFFY_FRAC (0x100000000LL*1000000/HZ&0xffffffff) | ||
307 | |||
308 | static unsigned long | ||
309 | div64_32(unsigned long v1, unsigned long v2, unsigned long v3) | ||
310 | { | ||
311 | unsigned long r0; | ||
312 | do_div64_32(r0, v1, v2, v3); | ||
313 | return r0; | ||
314 | } | ||
315 | |||
316 | static unsigned long do_fast_cp0_gettimeoffset(void) | ||
317 | { | ||
318 | u32 count; | ||
319 | unsigned long res, tmp; | ||
320 | unsigned long r0; | ||
321 | |||
322 | /* Last jiffy when do_fast_gettimeoffset() was called. */ | ||
323 | static unsigned long last_jiffies=0; | ||
324 | unsigned long quotient; | ||
325 | |||
326 | /* | ||
327 | * Cached "1/(clocks per usec)*2^32" value. | ||
328 | * It has to be recalculated once each jiffy. | ||
329 | */ | ||
330 | static unsigned long cached_quotient=0; | ||
331 | |||
332 | tmp = jiffies; | ||
333 | |||
334 | quotient = cached_quotient; | ||
335 | |||
336 | if (tmp && last_jiffies != tmp) { | ||
337 | last_jiffies = tmp; | ||
338 | if (last_jiffies != 0) { | ||
339 | r0 = div64_32(timerhi, timerlo, tmp); | ||
340 | quotient = div64_32(USECS_PER_JIFFY, USECS_PER_JIFFY_FRAC, r0); | ||
341 | cached_quotient = quotient; | ||
342 | } | ||
343 | } | ||
344 | |||
345 | /* Get last timer tick in absolute kernel time */ | ||
346 | count = read_c0_count(); | ||
347 | |||
348 | /* .. relative to previous jiffy (32 bits is enough) */ | ||
349 | count -= timerlo; | ||
350 | |||
351 | __asm__("multu\t%1,%2\n\t" | ||
352 | "mfhi\t%0" | ||
353 | : "=r" (res) | ||
354 | : "r" (count), "r" (quotient) | ||
355 | : "hi", "lo", GCC_REG_ACCUM); | ||
356 | |||
357 | /* | ||
358 | * Due to possible jiffies inconsistencies, we need to check | ||
359 | * the result so that we'll get a timer that is monotonic. | ||
360 | */ | ||
361 | if (res >= USECS_PER_JIFFY) | ||
362 | res = USECS_PER_JIFFY-1; | ||
363 | |||
364 | return res; | ||
365 | } | ||
366 | |||
367 | #ifdef CONFIG_PM | ||
368 | static unsigned long do_fast_pm_gettimeoffset(void) | ||
369 | { | ||
370 | unsigned long pc0; | ||
371 | unsigned long offset; | ||
372 | |||
373 | pc0 = au_readl(SYS_TOYREAD); | ||
374 | au_sync(); | ||
375 | offset = pc0 - last_pc0; | ||
376 | if (offset > 2*MATCH20_INC) { | ||
377 | printk("huge offset %x, last_pc0 %x last_match20 %x pc0 %x\n", | ||
378 | (unsigned)offset, (unsigned)last_pc0, | ||
379 | (unsigned)last_match20, (unsigned)pc0); | ||
380 | } | ||
381 | offset = (unsigned long)((offset * 305) / 10); | ||
382 | return offset; | ||
383 | } | ||
384 | #endif | ||
385 | |||
386 | void __init plat_timer_setup(struct irqaction *irq) | 293 | void __init plat_timer_setup(struct irqaction *irq) |
387 | { | 294 | { |
388 | unsigned int est_freq; | 295 | unsigned int est_freq; |
@@ -420,7 +327,6 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
420 | unsigned int c0_status; | 327 | unsigned int c0_status; |
421 | 328 | ||
422 | printk("WARNING: no 32KHz clock found.\n"); | 329 | printk("WARNING: no 32KHz clock found.\n"); |
423 | do_gettimeoffset = do_fast_cp0_gettimeoffset; | ||
424 | 330 | ||
425 | /* Ensure we get CPO_COUNTER interrupts. | 331 | /* Ensure we get CPO_COUNTER interrupts. |
426 | */ | 332 | */ |
@@ -445,19 +351,11 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
445 | while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20); | 351 | while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20); |
446 | startup_match20_interrupt(counter0_irq); | 352 | startup_match20_interrupt(counter0_irq); |
447 | 353 | ||
448 | do_gettimeoffset = do_fast_pm_gettimeoffset; | ||
449 | |||
450 | /* We can use the real 'wait' instruction. | 354 | /* We can use the real 'wait' instruction. |
451 | */ | 355 | */ |
452 | allow_au1k_wait = 1; | 356 | allow_au1k_wait = 1; |
453 | } | 357 | } |
454 | 358 | ||
455 | #else | ||
456 | /* We have to do this here instead of in timer_init because | ||
457 | * the generic code in arch/mips/kernel/time.c will write | ||
458 | * over our function pointer. | ||
459 | */ | ||
460 | do_gettimeoffset = do_fast_cp0_gettimeoffset; | ||
461 | #endif | 359 | #endif |
462 | } | 360 | } |
463 | 361 | ||
diff --git a/arch/mips/dec/time.c b/arch/mips/dec/time.c index 4cf0c06e2414..69e424e9ab6f 100644 --- a/arch/mips/dec/time.c +++ b/arch/mips/dec/time.c | |||
@@ -160,11 +160,6 @@ static unsigned int dec_ioasic_hpt_read(void) | |||
160 | return ioasic_read(IO_REG_FCTR); | 160 | return ioasic_read(IO_REG_FCTR); |
161 | } | 161 | } |
162 | 162 | ||
163 | static void dec_ioasic_hpt_init(unsigned int count) | ||
164 | { | ||
165 | ioasic_write(IO_REG_FCTR, ioasic_read(IO_REG_FCTR) - count); | ||
166 | } | ||
167 | |||
168 | 163 | ||
169 | void __init dec_time_init(void) | 164 | void __init dec_time_init(void) |
170 | { | 165 | { |
@@ -174,11 +169,9 @@ void __init dec_time_init(void) | |||
174 | mips_timer_state = dec_timer_state; | 169 | mips_timer_state = dec_timer_state; |
175 | mips_timer_ack = dec_timer_ack; | 170 | mips_timer_ack = dec_timer_ack; |
176 | 171 | ||
177 | if (!cpu_has_counter && IOASIC) { | 172 | if (!cpu_has_counter && IOASIC) |
178 | /* For pre-R4k systems we use the I/O ASIC's counter. */ | 173 | /* For pre-R4k systems we use the I/O ASIC's counter. */ |
179 | mips_hpt_read = dec_ioasic_hpt_read; | 174 | mips_hpt_read = dec_ioasic_hpt_read; |
180 | mips_hpt_init = dec_ioasic_hpt_init; | ||
181 | } | ||
182 | 175 | ||
183 | /* Set up the rate of periodic DS1287 interrupts. */ | 176 | /* Set up the rate of periodic DS1287 interrupts. */ |
184 | CMOS_WRITE(RTC_REF_CLCK_32KHZ | (16 - __ffs(HZ)), RTC_REG_A); | 177 | CMOS_WRITE(RTC_REF_CLCK_32KHZ | (16 - __ffs(HZ)), RTC_REG_A); |
diff --git a/arch/mips/emma2rh/common/irq_emma2rh.c b/arch/mips/emma2rh/common/irq_emma2rh.c index 7c930860c921..197ed4c2ba04 100644 --- a/arch/mips/emma2rh/common/irq_emma2rh.c +++ b/arch/mips/emma2rh/common/irq_emma2rh.c | |||
@@ -97,7 +97,7 @@ void emma2rh_irq_init(u32 irq_base) | |||
97 | irq_desc[i].status = IRQ_DISABLED; | 97 | irq_desc[i].status = IRQ_DISABLED; |
98 | irq_desc[i].action = NULL; | 98 | irq_desc[i].action = NULL; |
99 | irq_desc[i].depth = 1; | 99 | irq_desc[i].depth = 1; |
100 | irq_desc[i].handler = &emma2rh_irq_controller; | 100 | irq_desc[i].chip = &emma2rh_irq_controller; |
101 | } | 101 | } |
102 | 102 | ||
103 | emma2rh_irq_base = irq_base; | 103 | emma2rh_irq_base = irq_base; |
diff --git a/arch/mips/emma2rh/markeins/irq_markeins.c b/arch/mips/emma2rh/markeins/irq_markeins.c index f23ae9fcffa0..0b36eb001e62 100644 --- a/arch/mips/emma2rh/markeins/irq_markeins.c +++ b/arch/mips/emma2rh/markeins/irq_markeins.c | |||
@@ -86,7 +86,7 @@ void emma2rh_sw_irq_init(u32 irq_base) | |||
86 | irq_desc[i].status = IRQ_DISABLED; | 86 | irq_desc[i].status = IRQ_DISABLED; |
87 | irq_desc[i].action = NULL; | 87 | irq_desc[i].action = NULL; |
88 | irq_desc[i].depth = 2; | 88 | irq_desc[i].depth = 2; |
89 | irq_desc[i].handler = &emma2rh_sw_irq_controller; | 89 | irq_desc[i].chip = &emma2rh_sw_irq_controller; |
90 | } | 90 | } |
91 | 91 | ||
92 | emma2rh_sw_irq_base = irq_base; | 92 | emma2rh_sw_irq_base = irq_base; |
@@ -166,7 +166,7 @@ void emma2rh_gpio_irq_init(u32 irq_base) | |||
166 | irq_desc[i].status = IRQ_DISABLED; | 166 | irq_desc[i].status = IRQ_DISABLED; |
167 | irq_desc[i].action = NULL; | 167 | irq_desc[i].action = NULL; |
168 | irq_desc[i].depth = 2; | 168 | irq_desc[i].depth = 2; |
169 | irq_desc[i].handler = &emma2rh_gpio_irq_controller; | 169 | irq_desc[i].chip = &emma2rh_gpio_irq_controller; |
170 | } | 170 | } |
171 | 171 | ||
172 | emma2rh_gpio_irq_base = irq_base; | 172 | emma2rh_gpio_irq_base = irq_base; |
diff --git a/arch/mips/emma2rh/markeins/platform.c b/arch/mips/emma2rh/markeins/platform.c index 15cc61df3622..11567702b155 100644 --- a/arch/mips/emma2rh/markeins/platform.c +++ b/arch/mips/emma2rh/markeins/platform.c | |||
@@ -44,18 +44,45 @@ | |||
44 | #define I2C_EMMA2RH "emma2rh-iic" /* must be in sync with IIC driver */ | 44 | #define I2C_EMMA2RH "emma2rh-iic" /* must be in sync with IIC driver */ |
45 | 45 | ||
46 | static struct resource i2c_emma_resources_0[] = { | 46 | static struct resource i2c_emma_resources_0[] = { |
47 | { NULL, EMMA2RH_IRQ_PIIC0, EMMA2RH_IRQ_PIIC0, IORESOURCE_IRQ }, | 47 | { |
48 | { NULL, KSEG1ADDR(EMMA2RH_PIIC0_BASE), KSEG1ADDR(EMMA2RH_PIIC0_BASE + 0x1000), 0 }, | 48 | .name = NULL, |
49 | .start = EMMA2RH_IRQ_PIIC0, | ||
50 | .end = EMMA2RH_IRQ_PIIC0, | ||
51 | .flags = IORESOURCE_IRQ | ||
52 | }, { | ||
53 | .name = NULL, | ||
54 | .start = EMMA2RH_PIIC0_BASE, | ||
55 | .end = EMMA2RH_PIIC0_BASE + 0x1000, | ||
56 | .flags = 0 | ||
57 | }, | ||
49 | }; | 58 | }; |
50 | 59 | ||
51 | struct resource i2c_emma_resources_1[] = { | 60 | struct resource i2c_emma_resources_1[] = { |
52 | { NULL, EMMA2RH_IRQ_PIIC1, EMMA2RH_IRQ_PIIC1, IORESOURCE_IRQ }, | 61 | { |
53 | { NULL, KSEG1ADDR(EMMA2RH_PIIC1_BASE), KSEG1ADDR(EMMA2RH_PIIC1_BASE + 0x1000), 0 }, | 62 | .name = NULL, |
63 | .start = EMMA2RH_IRQ_PIIC1, | ||
64 | .end = EMMA2RH_IRQ_PIIC1, | ||
65 | .flags = IORESOURCE_IRQ | ||
66 | }, { | ||
67 | .name = NULL, | ||
68 | .start = EMMA2RH_PIIC1_BASE, | ||
69 | .end = EMMA2RH_PIIC1_BASE + 0x1000, | ||
70 | .flags = 0 | ||
71 | }, | ||
54 | }; | 72 | }; |
55 | 73 | ||
56 | struct resource i2c_emma_resources_2[] = { | 74 | struct resource i2c_emma_resources_2[] = { |
57 | { NULL, EMMA2RH_IRQ_PIIC2, EMMA2RH_IRQ_PIIC2, IORESOURCE_IRQ }, | 75 | { |
58 | { NULL, KSEG1ADDR(EMMA2RH_PIIC2_BASE), KSEG1ADDR(EMMA2RH_PIIC2_BASE + 0x1000), 0 }, | 76 | .name = NULL, |
77 | .start = EMMA2RH_IRQ_PIIC2, | ||
78 | .end = EMMA2RH_IRQ_PIIC2, | ||
79 | .flags = IORESOURCE_IRQ | ||
80 | }, { | ||
81 | .name = NULL, | ||
82 | .start = EMMA2RH_PIIC2_BASE, | ||
83 | .end = EMMA2RH_PIIC2_BASE + 0x1000, | ||
84 | .flags = 0 | ||
85 | }, | ||
59 | }; | 86 | }; |
60 | 87 | ||
61 | struct platform_device i2c_emma_devices[] = { | 88 | struct platform_device i2c_emma_devices[] = { |
@@ -83,32 +110,29 @@ struct platform_device i2c_emma_devices[] = { | |||
83 | #define EMMA2RH_SERIAL_FLAGS UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | 110 | #define EMMA2RH_SERIAL_FLAGS UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
84 | 111 | ||
85 | static struct plat_serial8250_port platform_serial_ports[] = { | 112 | static struct plat_serial8250_port platform_serial_ports[] = { |
86 | [0] = { | 113 | [0] = { |
87 | .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3), | 114 | .membase= (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3), |
88 | .irq = EMMA2RH_IRQ_PFUR0, | 115 | .irq = EMMA2RH_IRQ_PFUR0, |
89 | .uartclk = EMMA2RH_SERIAL_CLOCK, | 116 | .uartclk = EMMA2RH_SERIAL_CLOCK, |
90 | .regshift = 4, | 117 | .regshift = 4, |
91 | .iotype = UPIO_MEM, | 118 | .iotype = UPIO_MEM, |
92 | .flags = EMMA2RH_SERIAL_FLAGS, | 119 | .flags = EMMA2RH_SERIAL_FLAGS, |
93 | }, | 120 | }, [1] = { |
94 | [1] = { | 121 | .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR1_BASE + 3), |
95 | .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR1_BASE + 3), | 122 | .irq = EMMA2RH_IRQ_PFUR1, |
96 | .irq = EMMA2RH_IRQ_PFUR1, | 123 | .uartclk = EMMA2RH_SERIAL_CLOCK, |
97 | .uartclk = EMMA2RH_SERIAL_CLOCK, | 124 | .regshift = 4, |
98 | .regshift = 4, | 125 | .iotype = UPIO_MEM, |
99 | .iotype = UPIO_MEM, | 126 | .flags = EMMA2RH_SERIAL_FLAGS, |
100 | .flags = EMMA2RH_SERIAL_FLAGS, | 127 | }, [2] = { |
101 | }, | 128 | .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR2_BASE + 3), |
102 | [2] = { | 129 | .irq = EMMA2RH_IRQ_PFUR2, |
103 | .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR2_BASE + 3), | 130 | .uartclk = EMMA2RH_SERIAL_CLOCK, |
104 | .irq = EMMA2RH_IRQ_PFUR2, | 131 | .regshift = 4, |
105 | .uartclk = EMMA2RH_SERIAL_CLOCK, | 132 | .iotype = UPIO_MEM, |
106 | .regshift = 4, | 133 | .flags = EMMA2RH_SERIAL_FLAGS, |
107 | .iotype = UPIO_MEM, | 134 | }, [3] = { |
108 | .flags = EMMA2RH_SERIAL_FLAGS, | 135 | .flags = 0, |
109 | }, | ||
110 | [3] = { | ||
111 | .flags = 0, | ||
112 | }, | 136 | }, |
113 | }; | 137 | }; |
114 | 138 | ||
diff --git a/arch/mips/jmr3927/rbhma3100/irq.c b/arch/mips/jmr3927/rbhma3100/irq.c index 39a0243bed9a..de4a238c28be 100644 --- a/arch/mips/jmr3927/rbhma3100/irq.c +++ b/arch/mips/jmr3927/rbhma3100/irq.c | |||
@@ -288,6 +288,8 @@ static void tx_branch_likely_bug_fixup(void) | |||
288 | 288 | ||
289 | static void jmr3927_spurious(void) | 289 | static void jmr3927_spurious(void) |
290 | { | 290 | { |
291 | struct pt_regs * regs = get_irq_regs(); | ||
292 | |||
291 | #ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND | 293 | #ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND |
292 | tx_branch_likely_bug_fixup(); | 294 | tx_branch_likely_bug_fixup(); |
293 | #endif | 295 | #endif |
@@ -297,6 +299,7 @@ static void jmr3927_spurious(void) | |||
297 | 299 | ||
298 | asmlinkage void plat_irq_dispatch(void) | 300 | asmlinkage void plat_irq_dispatch(void) |
299 | { | 301 | { |
302 | struct pt_regs * regs = get_irq_regs(); | ||
300 | int irq; | 303 | int irq; |
301 | 304 | ||
302 | #ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND | 305 | #ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND |
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c index 025434054ed0..16e5dfe7aa8a 100644 --- a/arch/mips/jmr3927/rbhma3100/setup.c +++ b/arch/mips/jmr3927/rbhma3100/setup.c | |||
@@ -170,12 +170,20 @@ static void jmr3927_machine_power_off(void) | |||
170 | while (1); | 170 | while (1); |
171 | } | 171 | } |
172 | 172 | ||
173 | static unsigned int jmr3927_hpt_read(void) | ||
174 | { | ||
175 | /* We assume this function is called xtime_lock held. */ | ||
176 | return jiffies * (JMR3927_TIMER_CLK / HZ) + jmr3927_tmrptr->trr; | ||
177 | } | ||
178 | |||
173 | #define USE_RTC_DS1742 | 179 | #define USE_RTC_DS1742 |
174 | #ifdef USE_RTC_DS1742 | 180 | #ifdef USE_RTC_DS1742 |
175 | extern void rtc_ds1742_init(unsigned long base); | 181 | extern void rtc_ds1742_init(unsigned long base); |
176 | #endif | 182 | #endif |
177 | static void __init jmr3927_time_init(void) | 183 | static void __init jmr3927_time_init(void) |
178 | { | 184 | { |
185 | mips_hpt_read = jmr3927_hpt_read; | ||
186 | mips_hpt_frequency = JMR3927_TIMER_CLK; | ||
179 | #ifdef USE_RTC_DS1742 | 187 | #ifdef USE_RTC_DS1742 |
180 | if (jmr3927_have_nvram()) { | 188 | if (jmr3927_have_nvram()) { |
181 | rtc_ds1742_init(JMR3927_IOC_NVRAMB_ADDR); | 189 | rtc_ds1742_init(JMR3927_IOC_NVRAMB_ADDR); |
@@ -183,12 +191,8 @@ static void __init jmr3927_time_init(void) | |||
183 | #endif | 191 | #endif |
184 | } | 192 | } |
185 | 193 | ||
186 | unsigned long jmr3927_do_gettimeoffset(void); | ||
187 | |||
188 | void __init plat_timer_setup(struct irqaction *irq) | 194 | void __init plat_timer_setup(struct irqaction *irq) |
189 | { | 195 | { |
190 | do_gettimeoffset = jmr3927_do_gettimeoffset; | ||
191 | |||
192 | jmr3927_tmrptr->cpra = JMR3927_TIMER_CLK / HZ; | 196 | jmr3927_tmrptr->cpra = JMR3927_TIMER_CLK / HZ; |
193 | jmr3927_tmrptr->itmr = TXx927_TMTITMR_TIIE | TXx927_TMTITMR_TZCE; | 197 | jmr3927_tmrptr->itmr = TXx927_TMTITMR_TIIE | TXx927_TMTITMR_TZCE; |
194 | jmr3927_tmrptr->ccdr = JMR3927_TIMER_CCD; | 198 | jmr3927_tmrptr->ccdr = JMR3927_TIMER_CCD; |
@@ -200,34 +204,6 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
200 | 204 | ||
201 | #define USECS_PER_JIFFY (1000000/HZ) | 205 | #define USECS_PER_JIFFY (1000000/HZ) |
202 | 206 | ||
203 | unsigned long jmr3927_do_gettimeoffset(void) | ||
204 | { | ||
205 | unsigned long count; | ||
206 | unsigned long res = 0; | ||
207 | |||
208 | /* MUST read TRR before TISR. */ | ||
209 | count = jmr3927_tmrptr->trr; | ||
210 | |||
211 | if (jmr3927_tmrptr->tisr & TXx927_TMTISR_TIIS) { | ||
212 | /* timer interrupt is pending. use Max value. */ | ||
213 | res = USECS_PER_JIFFY - 1; | ||
214 | } else { | ||
215 | /* convert to usec */ | ||
216 | /* res = count / (JMR3927_TIMER_CLK / 1000000); */ | ||
217 | res = (count << 7) / ((JMR3927_TIMER_CLK << 7) / 1000000); | ||
218 | |||
219 | /* | ||
220 | * Due to possible jiffies inconsistencies, we need to check | ||
221 | * the result so that we'll get a timer that is monotonic. | ||
222 | */ | ||
223 | if (res >= USECS_PER_JIFFY) | ||
224 | res = USECS_PER_JIFFY-1; | ||
225 | } | ||
226 | |||
227 | return res; | ||
228 | } | ||
229 | |||
230 | |||
231 | //#undef DO_WRITE_THROUGH | 207 | //#undef DO_WRITE_THROUGH |
232 | #define DO_WRITE_THROUGH | 208 | #define DO_WRITE_THROUGH |
233 | #define DO_ENABLE_CACHE | 209 | #define DO_ENABLE_CACHE |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 720fac3435d5..a95f37de080e 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -654,6 +654,8 @@ einval: li v0, -EINVAL | |||
654 | sys sys_set_robust_list 2 | 654 | sys sys_set_robust_list 2 |
655 | sys sys_get_robust_list 3 /* 4310 */ | 655 | sys sys_get_robust_list 3 /* 4310 */ |
656 | sys sys_ni_syscall 0 | 656 | sys sys_ni_syscall 0 |
657 | sys sys_getcpu 3 | ||
658 | sys sys_epoll_pwait 6 | ||
657 | .endm | 659 | .endm |
658 | 660 | ||
659 | /* We pre-compute the number of _instruction_ bytes needed to | 661 | /* We pre-compute the number of _instruction_ bytes needed to |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 3a34f62c8b1b..8fb0f60f657b 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
@@ -469,3 +469,5 @@ sys_call_table: | |||
469 | PTR sys_set_robust_list | 469 | PTR sys_set_robust_list |
470 | PTR sys_get_robust_list | 470 | PTR sys_get_robust_list |
471 | PTR sys_ni_syscall /* 5270 */ | 471 | PTR sys_ni_syscall /* 5270 */ |
472 | PTR sys_getcpu | ||
473 | PTR sys_epoll_pwait | ||
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 67b92a1d6c72..0da5ca2040ff 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -395,3 +395,5 @@ EXPORT(sysn32_call_table) | |||
395 | PTR compat_sys_set_robust_list | 395 | PTR compat_sys_set_robust_list |
396 | PTR compat_sys_get_robust_list | 396 | PTR compat_sys_get_robust_list |
397 | PTR sys_ni_syscall | 397 | PTR sys_ni_syscall |
398 | PTR sys_getcpu | ||
399 | PTR sys_epoll_pwait | ||
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 2875c4a3fa58..b9d00cae8b5f 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -517,4 +517,6 @@ sys_call_table: | |||
517 | PTR compat_sys_set_robust_list | 517 | PTR compat_sys_set_robust_list |
518 | PTR compat_sys_get_robust_list /* 4310 */ | 518 | PTR compat_sys_get_robust_list /* 4310 */ |
519 | PTR sys_ni_syscall | 519 | PTR sys_ni_syscall |
520 | PTR sys_getcpu | ||
521 | PTR sys_epoll_pwait | ||
520 | .size sys_call_table,.-sys_call_table | 522 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index 3b5f3b632622..2ac19a6cbf68 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c | |||
@@ -140,15 +140,90 @@ static struct irqaction irq_call = { | |||
140 | .name = "IPI_call" | 140 | .name = "IPI_call" |
141 | }; | 141 | }; |
142 | 142 | ||
143 | static void __init smp_copy_vpe_config(void) | ||
144 | { | ||
145 | write_vpe_c0_status( | ||
146 | (read_c0_status() & ~(ST0_IM | ST0_IE | ST0_KSU)) | ST0_CU0); | ||
147 | |||
148 | /* set config to be the same as vpe0, particularly kseg0 coherency alg */ | ||
149 | write_vpe_c0_config( read_c0_config()); | ||
150 | |||
151 | /* make sure there are no software interrupts pending */ | ||
152 | write_vpe_c0_cause(0); | ||
153 | |||
154 | /* Propagate Config7 */ | ||
155 | write_vpe_c0_config7(read_c0_config7()); | ||
156 | |||
157 | write_vpe_c0_count(read_c0_count()); | ||
158 | } | ||
159 | |||
160 | static unsigned int __init smp_vpe_init(unsigned int tc, unsigned int mvpconf0, | ||
161 | unsigned int ncpu) | ||
162 | { | ||
163 | if (tc > ((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT)) | ||
164 | return ncpu; | ||
165 | |||
166 | /* Deactivate all but VPE 0 */ | ||
167 | if (tc != 0) { | ||
168 | unsigned long tmp = read_vpe_c0_vpeconf0(); | ||
169 | |||
170 | tmp &= ~VPECONF0_VPA; | ||
171 | |||
172 | /* master VPE */ | ||
173 | tmp |= VPECONF0_MVP; | ||
174 | write_vpe_c0_vpeconf0(tmp); | ||
175 | |||
176 | /* Record this as available CPU */ | ||
177 | cpu_set(tc, phys_cpu_present_map); | ||
178 | __cpu_number_map[tc] = ++ncpu; | ||
179 | __cpu_logical_map[ncpu] = tc; | ||
180 | } | ||
181 | |||
182 | /* Disable multi-threading with TC's */ | ||
183 | write_vpe_c0_vpecontrol(read_vpe_c0_vpecontrol() & ~VPECONTROL_TE); | ||
184 | |||
185 | if (tc != 0) | ||
186 | smp_copy_vpe_config(); | ||
187 | |||
188 | return ncpu; | ||
189 | } | ||
190 | |||
191 | static void __init smp_tc_init(unsigned int tc, unsigned int mvpconf0) | ||
192 | { | ||
193 | unsigned long tmp; | ||
194 | |||
195 | if (!tc) | ||
196 | return; | ||
197 | |||
198 | /* bind a TC to each VPE, May as well put all excess TC's | ||
199 | on the last VPE */ | ||
200 | if (tc >= (((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT)+1)) | ||
201 | write_tc_c0_tcbind(read_tc_c0_tcbind() | ((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT)); | ||
202 | else { | ||
203 | write_tc_c0_tcbind(read_tc_c0_tcbind() | tc); | ||
204 | |||
205 | /* and set XTC */ | ||
206 | write_vpe_c0_vpeconf0(read_vpe_c0_vpeconf0() | (tc << VPECONF0_XTC_SHIFT)); | ||
207 | } | ||
208 | |||
209 | tmp = read_tc_c0_tcstatus(); | ||
210 | |||
211 | /* mark not allocated and not dynamically allocatable */ | ||
212 | tmp &= ~(TCSTATUS_A | TCSTATUS_DA); | ||
213 | tmp |= TCSTATUS_IXMT; /* interrupt exempt */ | ||
214 | write_tc_c0_tcstatus(tmp); | ||
215 | |||
216 | write_tc_c0_tchalt(TCHALT_H); | ||
217 | } | ||
218 | |||
143 | /* | 219 | /* |
144 | * Common setup before any secondaries are started | 220 | * Common setup before any secondaries are started |
145 | * Make sure all CPU's are in a sensible state before we boot any of the | 221 | * Make sure all CPU's are in a sensible state before we boot any of the |
146 | * secondarys | 222 | * secondarys |
147 | */ | 223 | */ |
148 | void plat_smp_setup(void) | 224 | void __init plat_smp_setup(void) |
149 | { | 225 | { |
150 | unsigned long val; | 226 | unsigned int mvpconf0, ntc, tc, ncpu = 0; |
151 | int i, num; | ||
152 | 227 | ||
153 | #ifdef CONFIG_MIPS_MT_FPAFF | 228 | #ifdef CONFIG_MIPS_MT_FPAFF |
154 | /* If we have an FPU, enroll ourselves in the FPU-full mask */ | 229 | /* If we have an FPU, enroll ourselves in the FPU-full mask */ |
@@ -167,75 +242,16 @@ void plat_smp_setup(void) | |||
167 | /* Put MVPE's into 'configuration state' */ | 242 | /* Put MVPE's into 'configuration state' */ |
168 | set_c0_mvpcontrol(MVPCONTROL_VPC); | 243 | set_c0_mvpcontrol(MVPCONTROL_VPC); |
169 | 244 | ||
170 | val = read_c0_mvpconf0(); | 245 | mvpconf0 = read_c0_mvpconf0(); |
246 | ntc = (mvpconf0 & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT; | ||
171 | 247 | ||
172 | /* we'll always have more TC's than VPE's, so loop setting everything | 248 | /* we'll always have more TC's than VPE's, so loop setting everything |
173 | to a sensible state */ | 249 | to a sensible state */ |
174 | for (i = 0, num = 0; i <= ((val & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT); i++) { | 250 | for (tc = 0; tc <= ntc; tc++) { |
175 | settc(i); | 251 | settc(tc); |
176 | |||
177 | /* VPE's */ | ||
178 | if (i <= ((val & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT)) { | ||
179 | |||
180 | /* deactivate all but vpe0 */ | ||
181 | if (i != 0) { | ||
182 | unsigned long tmp = read_vpe_c0_vpeconf0(); | ||
183 | |||
184 | tmp &= ~VPECONF0_VPA; | ||
185 | |||
186 | /* master VPE */ | ||
187 | tmp |= VPECONF0_MVP; | ||
188 | write_vpe_c0_vpeconf0(tmp); | ||
189 | |||
190 | /* Record this as available CPU */ | ||
191 | cpu_set(i, phys_cpu_present_map); | ||
192 | __cpu_number_map[i] = ++num; | ||
193 | __cpu_logical_map[num] = i; | ||
194 | } | ||
195 | |||
196 | /* disable multi-threading with TC's */ | ||
197 | write_vpe_c0_vpecontrol(read_vpe_c0_vpecontrol() & ~VPECONTROL_TE); | ||
198 | |||
199 | if (i != 0) { | ||
200 | write_vpe_c0_status((read_c0_status() & ~(ST0_IM | ST0_IE | ST0_KSU)) | ST0_CU0); | ||
201 | 252 | ||
202 | /* set config to be the same as vpe0, particularly kseg0 coherency alg */ | 253 | smp_tc_init(tc, mvpconf0); |
203 | write_vpe_c0_config( read_c0_config()); | 254 | ncpu = smp_vpe_init(tc, mvpconf0, ncpu); |
204 | |||
205 | /* make sure there are no software interrupts pending */ | ||
206 | write_vpe_c0_cause(0); | ||
207 | |||
208 | /* Propagate Config7 */ | ||
209 | write_vpe_c0_config7(read_c0_config7()); | ||
210 | } | ||
211 | |||
212 | } | ||
213 | |||
214 | /* TC's */ | ||
215 | |||
216 | if (i != 0) { | ||
217 | unsigned long tmp; | ||
218 | |||
219 | /* bind a TC to each VPE, May as well put all excess TC's | ||
220 | on the last VPE */ | ||
221 | if ( i >= (((val & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT)+1) ) | ||
222 | write_tc_c0_tcbind(read_tc_c0_tcbind() | ((val & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) ); | ||
223 | else { | ||
224 | write_tc_c0_tcbind( read_tc_c0_tcbind() | i); | ||
225 | |||
226 | /* and set XTC */ | ||
227 | write_vpe_c0_vpeconf0( read_vpe_c0_vpeconf0() | (i << VPECONF0_XTC_SHIFT)); | ||
228 | } | ||
229 | |||
230 | tmp = read_tc_c0_tcstatus(); | ||
231 | |||
232 | /* mark not allocated and not dynamically allocatable */ | ||
233 | tmp &= ~(TCSTATUS_A | TCSTATUS_DA); | ||
234 | tmp |= TCSTATUS_IXMT; /* interrupt exempt */ | ||
235 | write_tc_c0_tcstatus(tmp); | ||
236 | |||
237 | write_tc_c0_tchalt(TCHALT_H); | ||
238 | } | ||
239 | } | 255 | } |
240 | 256 | ||
241 | /* Release config state */ | 257 | /* Release config state */ |
@@ -243,7 +259,7 @@ void plat_smp_setup(void) | |||
243 | 259 | ||
244 | /* We'll wait until starting the secondaries before starting MVPE */ | 260 | /* We'll wait until starting the secondaries before starting MVPE */ |
245 | 261 | ||
246 | printk(KERN_INFO "Detected %i available secondary CPU(s)\n", num); | 262 | printk(KERN_INFO "Detected %i available secondary CPU(s)\n", ncpu); |
247 | } | 263 | } |
248 | 264 | ||
249 | void __init plat_prepare_cpus(unsigned int max_cpus) | 265 | void __init plat_prepare_cpus(unsigned int max_cpus) |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index debe86c2f691..e535f86efa2f 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * Free Software Foundation; either version 2 of the License, or (at your | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
12 | * option) any later version. | 12 | * option) any later version. |
13 | */ | 13 | */ |
14 | #include <linux/clocksource.h> | ||
14 | #include <linux/types.h> | 15 | #include <linux/types.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
@@ -67,15 +68,9 @@ int (*rtc_mips_set_time)(unsigned long) = null_rtc_set_time; | |||
67 | int (*rtc_mips_set_mmss)(unsigned long); | 68 | int (*rtc_mips_set_mmss)(unsigned long); |
68 | 69 | ||
69 | 70 | ||
70 | /* usecs per counter cycle, shifted to left by 32 bits */ | ||
71 | static unsigned int sll32_usecs_per_cycle; | ||
72 | |||
73 | /* how many counter cycles in a jiffy */ | 71 | /* how many counter cycles in a jiffy */ |
74 | static unsigned long cycles_per_jiffy __read_mostly; | 72 | static unsigned long cycles_per_jiffy __read_mostly; |
75 | 73 | ||
76 | /* Cycle counter value at the previous timer interrupt.. */ | ||
77 | static unsigned int timerhi, timerlo; | ||
78 | |||
79 | /* expirelo is the count value for next CPU timer interrupt */ | 74 | /* expirelo is the count value for next CPU timer interrupt */ |
80 | static unsigned int expirelo; | 75 | static unsigned int expirelo; |
81 | 76 | ||
@@ -93,7 +88,7 @@ static unsigned int null_hpt_read(void) | |||
93 | return 0; | 88 | return 0; |
94 | } | 89 | } |
95 | 90 | ||
96 | static void null_hpt_init(unsigned int count) | 91 | static void __init null_hpt_init(void) |
97 | { | 92 | { |
98 | /* nothing */ | 93 | /* nothing */ |
99 | } | 94 | } |
@@ -128,186 +123,18 @@ static unsigned int c0_hpt_read(void) | |||
128 | return read_c0_count(); | 123 | return read_c0_count(); |
129 | } | 124 | } |
130 | 125 | ||
131 | /* For use solely as a high precision timer. */ | ||
132 | static void c0_hpt_init(unsigned int count) | ||
133 | { | ||
134 | write_c0_count(read_c0_count() - count); | ||
135 | } | ||
136 | |||
137 | /* For use both as a high precision timer and an interrupt source. */ | 126 | /* For use both as a high precision timer and an interrupt source. */ |
138 | static void c0_hpt_timer_init(unsigned int count) | 127 | static void __init c0_hpt_timer_init(void) |
139 | { | 128 | { |
140 | count = read_c0_count() - count; | 129 | expirelo = read_c0_count() + cycles_per_jiffy; |
141 | expirelo = (count / cycles_per_jiffy + 1) * cycles_per_jiffy; | ||
142 | write_c0_count(expirelo - cycles_per_jiffy); | ||
143 | write_c0_compare(expirelo); | 130 | write_c0_compare(expirelo); |
144 | write_c0_count(count); | ||
145 | } | 131 | } |
146 | 132 | ||
147 | int (*mips_timer_state)(void); | 133 | int (*mips_timer_state)(void); |
148 | void (*mips_timer_ack)(void); | 134 | void (*mips_timer_ack)(void); |
149 | unsigned int (*mips_hpt_read)(void); | 135 | unsigned int (*mips_hpt_read)(void); |
150 | void (*mips_hpt_init)(unsigned int); | 136 | void (*mips_hpt_init)(void) __initdata = null_hpt_init; |
151 | 137 | unsigned int mips_hpt_mask = 0xffffffff; | |
152 | /* | ||
153 | * Gettimeoffset routines. These routines returns the time duration | ||
154 | * since last timer interrupt in usecs. | ||
155 | * | ||
156 | * If the exact CPU counter frequency is known, use fixed_rate_gettimeoffset. | ||
157 | * Otherwise use calibrate_gettimeoffset() | ||
158 | * | ||
159 | * If the CPU does not have the counter register, you can either supply | ||
160 | * your own gettimeoffset() routine, or use null_gettimeoffset(), which | ||
161 | * gives the same resolution as HZ. | ||
162 | */ | ||
163 | |||
164 | static unsigned long null_gettimeoffset(void) | ||
165 | { | ||
166 | return 0; | ||
167 | } | ||
168 | |||
169 | |||
170 | /* The function pointer to one of the gettimeoffset funcs. */ | ||
171 | unsigned long (*do_gettimeoffset)(void) = null_gettimeoffset; | ||
172 | |||
173 | |||
174 | static unsigned long fixed_rate_gettimeoffset(void) | ||
175 | { | ||
176 | u32 count; | ||
177 | unsigned long res; | ||
178 | |||
179 | /* Get last timer tick in absolute kernel time */ | ||
180 | count = mips_hpt_read(); | ||
181 | |||
182 | /* .. relative to previous jiffy (32 bits is enough) */ | ||
183 | count -= timerlo; | ||
184 | |||
185 | __asm__("multu %1,%2" | ||
186 | : "=h" (res) | ||
187 | : "r" (count), "r" (sll32_usecs_per_cycle) | ||
188 | : "lo", GCC_REG_ACCUM); | ||
189 | |||
190 | /* | ||
191 | * Due to possible jiffies inconsistencies, we need to check | ||
192 | * the result so that we'll get a timer that is monotonic. | ||
193 | */ | ||
194 | if (res >= USECS_PER_JIFFY) | ||
195 | res = USECS_PER_JIFFY - 1; | ||
196 | |||
197 | return res; | ||
198 | } | ||
199 | |||
200 | |||
201 | /* | ||
202 | * Cached "1/(clocks per usec) * 2^32" value. | ||
203 | * It has to be recalculated once each jiffy. | ||
204 | */ | ||
205 | static unsigned long cached_quotient; | ||
206 | |||
207 | /* Last jiffy when calibrate_divXX_gettimeoffset() was called. */ | ||
208 | static unsigned long last_jiffies; | ||
209 | |||
210 | /* | ||
211 | * This is moved from dec/time.c:do_ioasic_gettimeoffset() by Maciej. | ||
212 | */ | ||
213 | static unsigned long calibrate_div32_gettimeoffset(void) | ||
214 | { | ||
215 | u32 count; | ||
216 | unsigned long res, tmp; | ||
217 | unsigned long quotient; | ||
218 | |||
219 | tmp = jiffies; | ||
220 | |||
221 | quotient = cached_quotient; | ||
222 | |||
223 | if (last_jiffies != tmp) { | ||
224 | last_jiffies = tmp; | ||
225 | if (last_jiffies != 0) { | ||
226 | unsigned long r0; | ||
227 | do_div64_32(r0, timerhi, timerlo, tmp); | ||
228 | do_div64_32(quotient, USECS_PER_JIFFY, | ||
229 | USECS_PER_JIFFY_FRAC, r0); | ||
230 | cached_quotient = quotient; | ||
231 | } | ||
232 | } | ||
233 | |||
234 | /* Get last timer tick in absolute kernel time */ | ||
235 | count = mips_hpt_read(); | ||
236 | |||
237 | /* .. relative to previous jiffy (32 bits is enough) */ | ||
238 | count -= timerlo; | ||
239 | |||
240 | __asm__("multu %1,%2" | ||
241 | : "=h" (res) | ||
242 | : "r" (count), "r" (quotient) | ||
243 | : "lo", GCC_REG_ACCUM); | ||
244 | |||
245 | /* | ||
246 | * Due to possible jiffies inconsistencies, we need to check | ||
247 | * the result so that we'll get a timer that is monotonic. | ||
248 | */ | ||
249 | if (res >= USECS_PER_JIFFY) | ||
250 | res = USECS_PER_JIFFY - 1; | ||
251 | |||
252 | return res; | ||
253 | } | ||
254 | |||
255 | static unsigned long calibrate_div64_gettimeoffset(void) | ||
256 | { | ||
257 | u32 count; | ||
258 | unsigned long res, tmp; | ||
259 | unsigned long quotient; | ||
260 | |||
261 | tmp = jiffies; | ||
262 | |||
263 | quotient = cached_quotient; | ||
264 | |||
265 | if (last_jiffies != tmp) { | ||
266 | last_jiffies = tmp; | ||
267 | if (last_jiffies) { | ||
268 | unsigned long r0; | ||
269 | __asm__(".set push\n\t" | ||
270 | ".set mips3\n\t" | ||
271 | "lwu %0,%3\n\t" | ||
272 | "dsll32 %1,%2,0\n\t" | ||
273 | "or %1,%1,%0\n\t" | ||
274 | "ddivu $0,%1,%4\n\t" | ||
275 | "mflo %1\n\t" | ||
276 | "dsll32 %0,%5,0\n\t" | ||
277 | "or %0,%0,%6\n\t" | ||
278 | "ddivu $0,%0,%1\n\t" | ||
279 | "mflo %0\n\t" | ||
280 | ".set pop" | ||
281 | : "=&r" (quotient), "=&r" (r0) | ||
282 | : "r" (timerhi), "m" (timerlo), | ||
283 | "r" (tmp), "r" (USECS_PER_JIFFY), | ||
284 | "r" (USECS_PER_JIFFY_FRAC) | ||
285 | : "hi", "lo", GCC_REG_ACCUM); | ||
286 | cached_quotient = quotient; | ||
287 | } | ||
288 | } | ||
289 | |||
290 | /* Get last timer tick in absolute kernel time */ | ||
291 | count = mips_hpt_read(); | ||
292 | |||
293 | /* .. relative to previous jiffy (32 bits is enough) */ | ||
294 | count -= timerlo; | ||
295 | |||
296 | __asm__("multu %1,%2" | ||
297 | : "=h" (res) | ||
298 | : "r" (count), "r" (quotient) | ||
299 | : "lo", GCC_REG_ACCUM); | ||
300 | |||
301 | /* | ||
302 | * Due to possible jiffies inconsistencies, we need to check | ||
303 | * the result so that we'll get a timer that is monotonic. | ||
304 | */ | ||
305 | if (res >= USECS_PER_JIFFY) | ||
306 | res = USECS_PER_JIFFY - 1; | ||
307 | |||
308 | return res; | ||
309 | } | ||
310 | |||
311 | 138 | ||
312 | /* last time when xtime and rtc are sync'ed up */ | 139 | /* last time when xtime and rtc are sync'ed up */ |
313 | static long last_rtc_update; | 140 | static long last_rtc_update; |
@@ -334,18 +161,10 @@ void local_timer_interrupt(int irq, void *dev_id) | |||
334 | */ | 161 | */ |
335 | irqreturn_t timer_interrupt(int irq, void *dev_id) | 162 | irqreturn_t timer_interrupt(int irq, void *dev_id) |
336 | { | 163 | { |
337 | unsigned long j; | ||
338 | unsigned int count; | ||
339 | |||
340 | write_seqlock(&xtime_lock); | 164 | write_seqlock(&xtime_lock); |
341 | 165 | ||
342 | count = mips_hpt_read(); | ||
343 | mips_timer_ack(); | 166 | mips_timer_ack(); |
344 | 167 | ||
345 | /* Update timerhi/timerlo for intra-jiffy calibration. */ | ||
346 | timerhi += count < timerlo; /* Wrap around */ | ||
347 | timerlo = count; | ||
348 | |||
349 | /* | 168 | /* |
350 | * call the generic timer interrupt handling | 169 | * call the generic timer interrupt handling |
351 | */ | 170 | */ |
@@ -368,47 +187,6 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
368 | } | 187 | } |
369 | } | 188 | } |
370 | 189 | ||
371 | /* | ||
372 | * If jiffies has overflown in this timer_interrupt, we must | ||
373 | * update the timer[hi]/[lo] to make fast gettimeoffset funcs | ||
374 | * quotient calc still valid. -arca | ||
375 | * | ||
376 | * The first timer interrupt comes late as interrupts are | ||
377 | * enabled long after timers are initialized. Therefore the | ||
378 | * high precision timer is fast, leading to wrong gettimeoffset() | ||
379 | * calculations. We deal with it by setting it based on the | ||
380 | * number of its ticks between the second and the third interrupt. | ||
381 | * That is still somewhat imprecise, but it's a good estimate. | ||
382 | * --macro | ||
383 | */ | ||
384 | j = jiffies; | ||
385 | if (j < 4) { | ||
386 | static unsigned int prev_count; | ||
387 | static int hpt_initialized; | ||
388 | |||
389 | switch (j) { | ||
390 | case 0: | ||
391 | timerhi = timerlo = 0; | ||
392 | mips_hpt_init(count); | ||
393 | break; | ||
394 | case 2: | ||
395 | prev_count = count; | ||
396 | break; | ||
397 | case 3: | ||
398 | if (!hpt_initialized) { | ||
399 | unsigned int c3 = 3 * (count - prev_count); | ||
400 | |||
401 | timerhi = 0; | ||
402 | timerlo = c3; | ||
403 | mips_hpt_init(count - c3); | ||
404 | hpt_initialized = 1; | ||
405 | } | ||
406 | break; | ||
407 | default: | ||
408 | break; | ||
409 | } | ||
410 | } | ||
411 | |||
412 | write_sequnlock(&xtime_lock); | 190 | write_sequnlock(&xtime_lock); |
413 | 191 | ||
414 | /* | 192 | /* |
@@ -476,12 +254,11 @@ asmlinkage void ll_local_timer_interrupt(int irq) | |||
476 | * 1) board_time_init() - | 254 | * 1) board_time_init() - |
477 | * a) (optional) set up RTC routines, | 255 | * a) (optional) set up RTC routines, |
478 | * b) (optional) calibrate and set the mips_hpt_frequency | 256 | * b) (optional) calibrate and set the mips_hpt_frequency |
479 | * (only needed if you intended to use fixed_rate_gettimeoffset | 257 | * (only needed if you intended to use cpu counter as timer interrupt |
480 | * or use cpu counter as timer interrupt source) | 258 | * source) |
481 | * 2) setup xtime based on rtc_mips_get_time(). | 259 | * 2) setup xtime based on rtc_mips_get_time(). |
482 | * 3) choose a appropriate gettimeoffset routine. | 260 | * 3) calculate a couple of cached variables for later usage |
483 | * 4) calculate a couple of cached variables for later usage | 261 | * 4) plat_timer_setup() - |
484 | * 5) plat_timer_setup() - | ||
485 | * a) (optional) over-write any choices made above by time_init(). | 262 | * a) (optional) over-write any choices made above by time_init(). |
486 | * b) machine specific code should setup the timer irqaction. | 263 | * b) machine specific code should setup the timer irqaction. |
487 | * c) enable the timer interrupt | 264 | * c) enable the timer interrupt |
@@ -533,13 +310,48 @@ static unsigned int __init calibrate_hpt(void) | |||
533 | } while (--i); | 310 | } while (--i); |
534 | hpt_end = mips_hpt_read(); | 311 | hpt_end = mips_hpt_read(); |
535 | 312 | ||
536 | hpt_count = hpt_end - hpt_start; | 313 | hpt_count = (hpt_end - hpt_start) & mips_hpt_mask; |
537 | hz = HZ; | 314 | hz = HZ; |
538 | frequency = (u64)hpt_count * (u64)hz; | 315 | frequency = (u64)hpt_count * (u64)hz; |
539 | 316 | ||
540 | return frequency >> log_2_loops; | 317 | return frequency >> log_2_loops; |
541 | } | 318 | } |
542 | 319 | ||
320 | static cycle_t read_mips_hpt(void) | ||
321 | { | ||
322 | return (cycle_t)mips_hpt_read(); | ||
323 | } | ||
324 | |||
325 | static struct clocksource clocksource_mips = { | ||
326 | .name = "MIPS", | ||
327 | .read = read_mips_hpt, | ||
328 | .is_continuous = 1, | ||
329 | }; | ||
330 | |||
331 | static void __init init_mips_clocksource(void) | ||
332 | { | ||
333 | u64 temp; | ||
334 | u32 shift; | ||
335 | |||
336 | if (!mips_hpt_frequency || mips_hpt_read == null_hpt_read) | ||
337 | return; | ||
338 | |||
339 | /* Calclate a somewhat reasonable rating value */ | ||
340 | clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; | ||
341 | /* Find a shift value */ | ||
342 | for (shift = 32; shift > 0; shift--) { | ||
343 | temp = (u64) NSEC_PER_SEC << shift; | ||
344 | do_div(temp, mips_hpt_frequency); | ||
345 | if ((temp >> 32) == 0) | ||
346 | break; | ||
347 | } | ||
348 | clocksource_mips.shift = shift; | ||
349 | clocksource_mips.mult = (u32)temp; | ||
350 | clocksource_mips.mask = mips_hpt_mask; | ||
351 | |||
352 | clocksource_register(&clocksource_mips); | ||
353 | } | ||
354 | |||
543 | void __init time_init(void) | 355 | void __init time_init(void) |
544 | { | 356 | { |
545 | if (board_time_init) | 357 | if (board_time_init) |
@@ -555,41 +367,21 @@ void __init time_init(void) | |||
555 | -xtime.tv_sec, -xtime.tv_nsec); | 367 | -xtime.tv_sec, -xtime.tv_nsec); |
556 | 368 | ||
557 | /* Choose appropriate high precision timer routines. */ | 369 | /* Choose appropriate high precision timer routines. */ |
558 | if (!cpu_has_counter && !mips_hpt_read) { | 370 | if (!cpu_has_counter && !mips_hpt_read) |
559 | /* No high precision timer -- sorry. */ | 371 | /* No high precision timer -- sorry. */ |
560 | mips_hpt_read = null_hpt_read; | 372 | mips_hpt_read = null_hpt_read; |
561 | mips_hpt_init = null_hpt_init; | 373 | else if (!mips_hpt_frequency && !mips_timer_state) { |
562 | } else if (!mips_hpt_frequency && !mips_timer_state) { | ||
563 | /* A high precision timer of unknown frequency. */ | 374 | /* A high precision timer of unknown frequency. */ |
564 | if (!mips_hpt_read) { | 375 | if (!mips_hpt_read) |
565 | /* No external high precision timer -- use R4k. */ | 376 | /* No external high precision timer -- use R4k. */ |
566 | mips_hpt_read = c0_hpt_read; | 377 | mips_hpt_read = c0_hpt_read; |
567 | mips_hpt_init = c0_hpt_init; | ||
568 | } | ||
569 | |||
570 | if (cpu_has_mips32r1 || cpu_has_mips32r2 || | ||
571 | (current_cpu_data.isa_level == MIPS_CPU_ISA_I) || | ||
572 | (current_cpu_data.isa_level == MIPS_CPU_ISA_II)) | ||
573 | /* | ||
574 | * We need to calibrate the counter but we don't have | ||
575 | * 64-bit division. | ||
576 | */ | ||
577 | do_gettimeoffset = calibrate_div32_gettimeoffset; | ||
578 | else | ||
579 | /* | ||
580 | * We need to calibrate the counter but we *do* have | ||
581 | * 64-bit division. | ||
582 | */ | ||
583 | do_gettimeoffset = calibrate_div64_gettimeoffset; | ||
584 | } else { | 378 | } else { |
585 | /* We know counter frequency. Or we can get it. */ | 379 | /* We know counter frequency. Or we can get it. */ |
586 | if (!mips_hpt_read) { | 380 | if (!mips_hpt_read) { |
587 | /* No external high precision timer -- use R4k. */ | 381 | /* No external high precision timer -- use R4k. */ |
588 | mips_hpt_read = c0_hpt_read; | 382 | mips_hpt_read = c0_hpt_read; |
589 | 383 | ||
590 | if (mips_timer_state) | 384 | if (!mips_timer_state) { |
591 | mips_hpt_init = c0_hpt_init; | ||
592 | else { | ||
593 | /* No external timer interrupt -- use R4k. */ | 385 | /* No external timer interrupt -- use R4k. */ |
594 | mips_hpt_init = c0_hpt_timer_init; | 386 | mips_hpt_init = c0_hpt_timer_init; |
595 | mips_timer_ack = c0_timer_ack; | 387 | mips_timer_ack = c0_timer_ack; |
@@ -598,16 +390,9 @@ void __init time_init(void) | |||
598 | if (!mips_hpt_frequency) | 390 | if (!mips_hpt_frequency) |
599 | mips_hpt_frequency = calibrate_hpt(); | 391 | mips_hpt_frequency = calibrate_hpt(); |
600 | 392 | ||
601 | do_gettimeoffset = fixed_rate_gettimeoffset; | ||
602 | |||
603 | /* Calculate cache parameters. */ | 393 | /* Calculate cache parameters. */ |
604 | cycles_per_jiffy = (mips_hpt_frequency + HZ / 2) / HZ; | 394 | cycles_per_jiffy = (mips_hpt_frequency + HZ / 2) / HZ; |
605 | 395 | ||
606 | /* sll32_usecs_per_cycle = 10^6 * 2^32 / mips_counter_freq */ | ||
607 | do_div64_32(sll32_usecs_per_cycle, | ||
608 | 1000000, mips_hpt_frequency / 2, | ||
609 | mips_hpt_frequency); | ||
610 | |||
611 | /* Report the high precision timer rate for a reference. */ | 396 | /* Report the high precision timer rate for a reference. */ |
612 | printk("Using %u.%03u MHz high precision timer.\n", | 397 | printk("Using %u.%03u MHz high precision timer.\n", |
613 | ((mips_hpt_frequency + 500) / 1000) / 1000, | 398 | ((mips_hpt_frequency + 500) / 1000) / 1000, |
@@ -619,7 +404,7 @@ void __init time_init(void) | |||
619 | mips_timer_ack = null_timer_ack; | 404 | mips_timer_ack = null_timer_ack; |
620 | 405 | ||
621 | /* This sets up the high precision timer for the first interrupt. */ | 406 | /* This sets up the high precision timer for the first interrupt. */ |
622 | mips_hpt_init(mips_hpt_read()); | 407 | mips_hpt_init(); |
623 | 408 | ||
624 | /* | 409 | /* |
625 | * Call board specific timer interrupt setup. | 410 | * Call board specific timer interrupt setup. |
@@ -633,6 +418,8 @@ void __init time_init(void) | |||
633 | * is not invoked accidentally. | 418 | * is not invoked accidentally. |
634 | */ | 419 | */ |
635 | plat_timer_setup(&timer_irqaction); | 420 | plat_timer_setup(&timer_irqaction); |
421 | |||
422 | init_mips_clocksource(); | ||
636 | } | 423 | } |
637 | 424 | ||
638 | #define FEBRUARY 2 | 425 | #define FEBRUARY 2 |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index cce8313ec27d..9fda1b8be3a7 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -1111,7 +1111,7 @@ static struct shadow_registers { | |||
1111 | static void mips_srs_init(void) | 1111 | static void mips_srs_init(void) |
1112 | { | 1112 | { |
1113 | shadow_registers.sr_supported = ((read_c0_srsctl() >> 26) & 0x0f) + 1; | 1113 | shadow_registers.sr_supported = ((read_c0_srsctl() >> 26) & 0x0f) + 1; |
1114 | printk(KERN_INFO "%d MIPSR2 register sets available\n", | 1114 | printk(KERN_INFO "%ld MIPSR2 register sets available\n", |
1115 | shadow_registers.sr_supported); | 1115 | shadow_registers.sr_supported); |
1116 | shadow_registers.sr_allocated = 1; /* Set 0 used by kernel */ | 1116 | shadow_registers.sr_allocated = 1; /* Set 0 used by kernel */ |
1117 | } | 1117 | } |
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 0bb9cd889456..25ed3337ce35 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -91,13 +91,7 @@ SECTIONS | |||
91 | 91 | ||
92 | __initcall_start = .; | 92 | __initcall_start = .; |
93 | .initcall.init : { | 93 | .initcall.init : { |
94 | *(.initcall1.init) | 94 | INITCALLS |
95 | *(.initcall2.init) | ||
96 | *(.initcall3.init) | ||
97 | *(.initcall4.init) | ||
98 | *(.initcall5.init) | ||
99 | *(.initcall6.init) | ||
100 | *(.initcall7.init) | ||
101 | } | 95 | } |
102 | __initcall_end = .; | 96 | __initcall_end = .; |
103 | 97 | ||
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index c079e2ae02a1..d817c60c5ca5 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c | |||
@@ -208,7 +208,8 @@ static unsigned int __init estimate_cpu_frequency(void) | |||
208 | count = 6000000; | 208 | count = 6000000; |
209 | #endif | 209 | #endif |
210 | #if defined(CONFIG_MIPS_ATLAS) || defined(CONFIG_MIPS_MALTA) | 210 | #if defined(CONFIG_MIPS_ATLAS) || defined(CONFIG_MIPS_MALTA) |
211 | unsigned int flags; | 211 | unsigned long flags; |
212 | unsigned int start; | ||
212 | 213 | ||
213 | local_irq_save(flags); | 214 | local_irq_save(flags); |
214 | 215 | ||
@@ -217,13 +218,13 @@ static unsigned int __init estimate_cpu_frequency(void) | |||
217 | while (!(CMOS_READ(RTC_REG_A) & RTC_UIP)); | 218 | while (!(CMOS_READ(RTC_REG_A) & RTC_UIP)); |
218 | 219 | ||
219 | /* Start r4k counter. */ | 220 | /* Start r4k counter. */ |
220 | write_c0_count(0); | 221 | start = read_c0_count(); |
221 | 222 | ||
222 | /* Read counter exactly on falling edge of update flag */ | 223 | /* Read counter exactly on falling edge of update flag */ |
223 | while (CMOS_READ(RTC_REG_A) & RTC_UIP); | 224 | while (CMOS_READ(RTC_REG_A) & RTC_UIP); |
224 | while (!(CMOS_READ(RTC_REG_A) & RTC_UIP)); | 225 | while (!(CMOS_READ(RTC_REG_A) & RTC_UIP)); |
225 | 226 | ||
226 | count = read_c0_count(); | 227 | count = read_c0_count() - start; |
227 | 228 | ||
228 | /* restore interrupts */ | 229 | /* restore interrupts */ |
229 | local_irq_restore(flags); | 230 | local_irq_restore(flags); |
diff --git a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c index 5537558f19f7..ea49a775bf28 100644 --- a/arch/mips/mm/c-sb1.c +++ b/arch/mips/mm/c-sb1.c | |||
@@ -49,6 +49,15 @@ static unsigned short dcache_sets; | |||
49 | static unsigned int icache_range_cutoff; | 49 | static unsigned int icache_range_cutoff; |
50 | static unsigned int dcache_range_cutoff; | 50 | static unsigned int dcache_range_cutoff; |
51 | 51 | ||
52 | static inline void sb1_on_each_cpu(void (*func) (void *info), void *info, | ||
53 | int retry, int wait) | ||
54 | { | ||
55 | preempt_disable(); | ||
56 | smp_call_function(func, info, retry, wait); | ||
57 | func(info); | ||
58 | preempt_enable(); | ||
59 | } | ||
60 | |||
52 | /* | 61 | /* |
53 | * The dcache is fully coherent to the system, with one | 62 | * The dcache is fully coherent to the system, with one |
54 | * big caveat: the instruction stream. In other words, | 63 | * big caveat: the instruction stream. In other words, |
@@ -226,7 +235,7 @@ static void sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr, | |||
226 | args.vma = vma; | 235 | args.vma = vma; |
227 | args.addr = addr; | 236 | args.addr = addr; |
228 | args.pfn = pfn; | 237 | args.pfn = pfn; |
229 | on_each_cpu(sb1_flush_cache_page_ipi, (void *) &args, 1, 1); | 238 | sb1_on_each_cpu(sb1_flush_cache_page_ipi, (void *) &args, 1, 1); |
230 | } | 239 | } |
231 | #else | 240 | #else |
232 | void sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) | 241 | void sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) |
@@ -249,7 +258,7 @@ void sb1___flush_cache_all_ipi(void *ignored) | |||
249 | 258 | ||
250 | static void sb1___flush_cache_all(void) | 259 | static void sb1___flush_cache_all(void) |
251 | { | 260 | { |
252 | on_each_cpu(sb1___flush_cache_all_ipi, 0, 1, 1); | 261 | sb1_on_each_cpu(sb1___flush_cache_all_ipi, 0, 1, 1); |
253 | } | 262 | } |
254 | #else | 263 | #else |
255 | void sb1___flush_cache_all(void) | 264 | void sb1___flush_cache_all(void) |
@@ -299,7 +308,7 @@ void sb1_flush_icache_range(unsigned long start, unsigned long end) | |||
299 | 308 | ||
300 | args.start = start; | 309 | args.start = start; |
301 | args.end = end; | 310 | args.end = end; |
302 | on_each_cpu(sb1_flush_icache_range_ipi, &args, 1, 1); | 311 | sb1_on_each_cpu(sb1_flush_icache_range_ipi, &args, 1, 1); |
303 | } | 312 | } |
304 | #else | 313 | #else |
305 | void sb1_flush_icache_range(unsigned long start, unsigned long end) | 314 | void sb1_flush_icache_range(unsigned long start, unsigned long end) |
@@ -326,7 +335,7 @@ static void sb1_flush_cache_sigtramp_ipi(void *info) | |||
326 | 335 | ||
327 | static void sb1_flush_cache_sigtramp(unsigned long addr) | 336 | static void sb1_flush_cache_sigtramp(unsigned long addr) |
328 | { | 337 | { |
329 | on_each_cpu(sb1_flush_cache_sigtramp_ipi, (void *) addr, 1, 1); | 338 | sb1_on_each_cpu(sb1_flush_cache_sigtramp_ipi, (void *) addr, 1, 1); |
330 | } | 339 | } |
331 | #else | 340 | #else |
332 | void sb1_flush_cache_sigtramp(unsigned long addr) | 341 | void sb1_flush_cache_sigtramp(unsigned long addr) |
@@ -444,7 +453,6 @@ static __init void probe_cache_sizes(void) | |||
444 | void sb1_cache_init(void) | 453 | void sb1_cache_init(void) |
445 | { | 454 | { |
446 | extern char except_vec2_sb1; | 455 | extern char except_vec2_sb1; |
447 | extern char handle_vec2_sb1; | ||
448 | 456 | ||
449 | /* Special cache error handler for SB1 */ | 457 | /* Special cache error handler for SB1 */ |
450 | set_uncached_handler (0x100, &except_vec2_sb1, 0x80); | 458 | set_uncached_handler (0x100, &except_vec2_sb1, 0x80); |
diff --git a/arch/mips/momentum/ocelot_g/ocelot_pld.h b/arch/mips/momentum/ocelot_g/ocelot_pld.h index fcb8275e219d..95e0534026d0 100644 --- a/arch/mips/momentum/ocelot_g/ocelot_pld.h +++ b/arch/mips/momentum/ocelot_g/ocelot_pld.h | |||
@@ -23,8 +23,8 @@ | |||
23 | #define OCELOT_REG_INTSET (12) | 23 | #define OCELOT_REG_INTSET (12) |
24 | #define OCELOT_REG_INTCLR (13) | 24 | #define OCELOT_REG_INTCLR (13) |
25 | 25 | ||
26 | #define OCELOT_PLD_WRITE(x, y) writeb(x, OCELOT_CS0_ADDR + OCELOT_REG_##y) | 26 | #define __PLD_REG_TO_ADDR(reg) ((void *) OCELOT_CS0_ADDR + OCELOT_REG_##reg) |
27 | #define OCELOT_PLD_READ(x) readb(OCELOT_CS0_ADDR + OCELOT_REG_##x) | 27 | #define OCELOT_PLD_WRITE(x, reg) writeb(x, __PLD_REG_TO_ADDR(reg)) |
28 | 28 | #define OCELOT_PLD_READ(reg) readb(__PLD_REG_TO_ADDR(reg)) | |
29 | 29 | ||
30 | #endif /* __MOMENCO_OCELOT_PLD_H__ */ | 30 | #endif /* __MOMENCO_OCELOT_PLD_H__ */ |
diff --git a/arch/mips/momentum/ocelot_g/setup.c b/arch/mips/momentum/ocelot_g/setup.c index 56ec47039c16..d288f7b01842 100644 --- a/arch/mips/momentum/ocelot_g/setup.c +++ b/arch/mips/momentum/ocelot_g/setup.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <asm/gt64240.h> | 57 | #include <asm/gt64240.h> |
58 | #include <asm/irq.h> | 58 | #include <asm/irq.h> |
59 | #include <asm/pci.h> | 59 | #include <asm/pci.h> |
60 | #include <asm/pgtable.h> | ||
60 | #include <asm/processor.h> | 61 | #include <asm/processor.h> |
61 | #include <asm/reboot.h> | 62 | #include <asm/reboot.h> |
62 | #include <linux/bootmem.h> | 63 | #include <linux/bootmem.h> |
@@ -160,6 +161,10 @@ static void __init setup_l3cache(unsigned long size) | |||
160 | printk("Done\n"); | 161 | printk("Done\n"); |
161 | } | 162 | } |
162 | 163 | ||
164 | void __init plat_timer_setup(struct irqaction *irq) | ||
165 | { | ||
166 | } | ||
167 | |||
163 | void __init plat_mem_setup(void) | 168 | void __init plat_mem_setup(void) |
164 | { | 169 | { |
165 | void (*l3func)(unsigned long) = (void *) KSEG1ADDR(setup_l3cache); | 170 | void (*l3func)(unsigned long) = (void *) KSEG1ADDR(setup_l3cache); |
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index dd0aec9c3ce1..1fb240c57bac 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c | |||
@@ -31,16 +31,18 @@ | |||
31 | #define M_COUNTER_OVERFLOW (1UL << 31) | 31 | #define M_COUNTER_OVERFLOW (1UL << 31) |
32 | 32 | ||
33 | #ifdef CONFIG_MIPS_MT_SMP | 33 | #ifdef CONFIG_MIPS_MT_SMP |
34 | #define WHAT (M_TC_EN_VPE | M_PERFCTL_VPEID(smp_processor_id())) | 34 | #define WHAT (M_TC_EN_VPE | M_PERFCTL_VPEID(smp_processor_id())) |
35 | #define vpe_id() smp_processor_id() | ||
35 | #else | 36 | #else |
36 | #define WHAT 0 | 37 | #define WHAT 0 |
38 | #define vpe_id() smp_processor_id() | ||
37 | #endif | 39 | #endif |
38 | 40 | ||
39 | #define __define_perf_accessors(r, n, np) \ | 41 | #define __define_perf_accessors(r, n, np) \ |
40 | \ | 42 | \ |
41 | static inline unsigned int r_c0_ ## r ## n(void) \ | 43 | static inline unsigned int r_c0_ ## r ## n(void) \ |
42 | { \ | 44 | { \ |
43 | unsigned int cpu = smp_processor_id(); \ | 45 | unsigned int cpu = vpe_id(); \ |
44 | \ | 46 | \ |
45 | switch (cpu) { \ | 47 | switch (cpu) { \ |
46 | case 0: \ | 48 | case 0: \ |
@@ -55,7 +57,7 @@ static inline unsigned int r_c0_ ## r ## n(void) \ | |||
55 | \ | 57 | \ |
56 | static inline void w_c0_ ## r ## n(unsigned int value) \ | 58 | static inline void w_c0_ ## r ## n(unsigned int value) \ |
57 | { \ | 59 | { \ |
58 | unsigned int cpu = smp_processor_id(); \ | 60 | unsigned int cpu = vpe_id(); \ |
59 | \ | 61 | \ |
60 | switch (cpu) { \ | 62 | switch (cpu) { \ |
61 | case 0: \ | 63 | case 0: \ |
@@ -218,7 +220,7 @@ static inline int n_counters(void) | |||
218 | { | 220 | { |
219 | int counters = __n_counters(); | 221 | int counters = __n_counters(); |
220 | 222 | ||
221 | #ifndef CONFIG_SMP | 223 | #ifdef CONFIG_MIPS_MT_SMP |
222 | if (current_cpu_data.cputype == CPU_34K) | 224 | if (current_cpu_data.cputype == CPU_34K) |
223 | return counters >> 1; | 225 | return counters >> 1; |
224 | #endif | 226 | #endif |
diff --git a/arch/mips/philips/pnx8550/common/time.c b/arch/mips/philips/pnx8550/common/time.c index 0af655b1f330..65c440e8480b 100644 --- a/arch/mips/philips/pnx8550/common/time.c +++ b/arch/mips/philips/pnx8550/common/time.c | |||
@@ -41,8 +41,8 @@ extern unsigned int mips_hpt_frequency; | |||
41 | * 1) board_time_init() - | 41 | * 1) board_time_init() - |
42 | * a) (optional) set up RTC routines, | 42 | * a) (optional) set up RTC routines, |
43 | * b) (optional) calibrate and set the mips_hpt_frequency | 43 | * b) (optional) calibrate and set the mips_hpt_frequency |
44 | * (only needed if you intended to use fixed_rate_gettimeoffset | 44 | * (only needed if you intended to use cpu counter as timer interrupt |
45 | * or use cpu counter as timer interrupt source) | 45 | * source) |
46 | */ | 46 | */ |
47 | 47 | ||
48 | void pnx8550_time_init(void) | 48 | void pnx8550_time_init(void) |
diff --git a/arch/mips/pmc-sierra/yosemite/i2c-yosemite.c b/arch/mips/pmc-sierra/yosemite/i2c-yosemite.c index 416da22b3bf4..85b14c73c226 100644 --- a/arch/mips/pmc-sierra/yosemite/i2c-yosemite.c +++ b/arch/mips/pmc-sierra/yosemite/i2c-yosemite.c | |||
@@ -74,7 +74,7 @@ static int titan_i2c_poll(void) | |||
74 | int titan_i2c_xfer(unsigned int slave_addr, titan_i2c_command * cmd, | 74 | int titan_i2c_xfer(unsigned int slave_addr, titan_i2c_command * cmd, |
75 | int size, unsigned int *addr) | 75 | int size, unsigned int *addr) |
76 | { | 76 | { |
77 | int loop = 0, bytes, i; | 77 | int loop, bytes = 0, i; |
78 | unsigned int *write_data, data, *read_data; | 78 | unsigned int *write_data, data, *read_data; |
79 | unsigned long reg_val, val; | 79 | unsigned long reg_val, val; |
80 | 80 | ||
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c index 65fa3a23ea5e..3cc0436db6cf 100644 --- a/arch/mips/pmc-sierra/yosemite/smp.c +++ b/arch/mips/pmc-sierra/yosemite/smp.c | |||
@@ -3,9 +3,7 @@ | |||
3 | 3 | ||
4 | #include <asm/pmon.h> | 4 | #include <asm/pmon.h> |
5 | #include <asm/titan_dep.h> | 5 | #include <asm/titan_dep.h> |
6 | 6 | #include <asm/time.h> | |
7 | extern unsigned int (*mips_hpt_read)(void); | ||
8 | extern void (*mips_hpt_init)(unsigned int); | ||
9 | 7 | ||
10 | #define LAUNCHSTACK_SIZE 256 | 8 | #define LAUNCHSTACK_SIZE 256 |
11 | 9 | ||
@@ -101,7 +99,7 @@ void prom_cpus_done(void) | |||
101 | */ | 99 | */ |
102 | void prom_init_secondary(void) | 100 | void prom_init_secondary(void) |
103 | { | 101 | { |
104 | mips_hpt_init(mips_hpt_read()); | 102 | mips_hpt_init(); |
105 | 103 | ||
106 | set_c0_status(ST0_CO | ST0_IE | ST0_IM); | 104 | set_c0_status(ST0_CO | ST0_IE | ST0_IM); |
107 | } | 105 | } |
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c index 4e870fc4469b..c965705f3427 100644 --- a/arch/mips/sgi-ip27/ip27-timer.c +++ b/arch/mips/sgi-ip27/ip27-timer.c | |||
@@ -134,13 +134,6 @@ again: | |||
134 | irq_exit(); | 134 | irq_exit(); |
135 | } | 135 | } |
136 | 136 | ||
137 | unsigned long ip27_do_gettimeoffset(void) | ||
138 | { | ||
139 | unsigned long ct_cur1; | ||
140 | ct_cur1 = REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT) + CYCLES_PER_JIFFY; | ||
141 | return (ct_cur1 - ct_cur[0]) * NSEC_PER_CYCLE / 1000; | ||
142 | } | ||
143 | |||
144 | /* Includes for ioc3_init(). */ | 137 | /* Includes for ioc3_init(). */ |
145 | #include <asm/sn/types.h> | 138 | #include <asm/sn/types.h> |
146 | #include <asm/sn/sn0/addrs.h> | 139 | #include <asm/sn/sn0/addrs.h> |
@@ -248,12 +241,17 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
248 | setup_irq(irqno, &rt_irqaction); | 241 | setup_irq(irqno, &rt_irqaction); |
249 | } | 242 | } |
250 | 243 | ||
244 | static unsigned int ip27_hpt_read(void) | ||
245 | { | ||
246 | return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT); | ||
247 | } | ||
248 | |||
251 | void __init ip27_time_init(void) | 249 | void __init ip27_time_init(void) |
252 | { | 250 | { |
251 | mips_hpt_read = ip27_hpt_read; | ||
252 | mips_hpt_frequency = CYCLES_PER_SEC; | ||
253 | xtime.tv_sec = get_m48t35_time(); | 253 | xtime.tv_sec = get_m48t35_time(); |
254 | xtime.tv_nsec = 0; | 254 | xtime.tv_nsec = 0; |
255 | |||
256 | do_gettimeoffset = ip27_do_gettimeoffset; | ||
257 | } | 255 | } |
258 | 256 | ||
259 | void __init cpu_time_init(void) | 257 | void __init cpu_time_init(void) |
diff --git a/arch/mips/sibyte/bcm1480/time.c b/arch/mips/sibyte/bcm1480/time.c index bf12af46132e..e136bde5248e 100644 --- a/arch/mips/sibyte/bcm1480/time.c +++ b/arch/mips/sibyte/bcm1480/time.c | |||
@@ -47,6 +47,12 @@ | |||
47 | #define IMR_IP3_VAL K_BCM1480_INT_MAP_I1 | 47 | #define IMR_IP3_VAL K_BCM1480_INT_MAP_I1 |
48 | #define IMR_IP4_VAL K_BCM1480_INT_MAP_I2 | 48 | #define IMR_IP4_VAL K_BCM1480_INT_MAP_I2 |
49 | 49 | ||
50 | #ifdef CONFIG_SIMULATION | ||
51 | #define BCM1480_HPT_VALUE 50000 | ||
52 | #else | ||
53 | #define BCM1480_HPT_VALUE 1000000 | ||
54 | #endif | ||
55 | |||
50 | extern int bcm1480_steal_irq(int irq); | 56 | extern int bcm1480_steal_irq(int irq); |
51 | 57 | ||
52 | void bcm1480_time_init(void) | 58 | void bcm1480_time_init(void) |
@@ -59,11 +65,6 @@ void bcm1480_time_init(void) | |||
59 | BUG(); | 65 | BUG(); |
60 | } | 66 | } |
61 | 67 | ||
62 | if (!cpu) { | ||
63 | /* Use our own gettimeoffset() routine */ | ||
64 | do_gettimeoffset = bcm1480_gettimeoffset; | ||
65 | } | ||
66 | |||
67 | bcm1480_mask_irq(cpu, irq); | 68 | bcm1480_mask_irq(cpu, irq); |
68 | 69 | ||
69 | /* Map the timer interrupt to ip[4] of this cpu */ | 70 | /* Map the timer interrupt to ip[4] of this cpu */ |
@@ -74,11 +75,7 @@ void bcm1480_time_init(void) | |||
74 | /* Disable the timer and set up the count */ | 75 | /* Disable the timer and set up the count */ |
75 | __raw_writeq(0, IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); | 76 | __raw_writeq(0, IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); |
76 | __raw_writeq( | 77 | __raw_writeq( |
77 | #ifndef CONFIG_SIMULATION | 78 | BCM1480_HPT_VALUE/HZ |
78 | 1000000/HZ | ||
79 | #else | ||
80 | 50000/HZ | ||
81 | #endif | ||
82 | , IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT))); | 79 | , IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT))); |
83 | 80 | ||
84 | /* Set the timer running */ | 81 | /* Set the timer running */ |
@@ -122,16 +119,16 @@ void bcm1480_timer_interrupt(void) | |||
122 | } | 119 | } |
123 | } | 120 | } |
124 | 121 | ||
125 | /* | 122 | static unsigned int bcm1480_hpt_read(void) |
126 | * We use our own do_gettimeoffset() instead of the generic one, | ||
127 | * because the generic one does not work for SMP case. | ||
128 | * In addition, since we use general timer 0 for system time, | ||
129 | * we can get accurate intra-jiffy offset without calibration. | ||
130 | */ | ||
131 | unsigned long bcm1480_gettimeoffset(void) | ||
132 | { | 123 | { |
124 | /* We assume this function is called xtime_lock held. */ | ||
133 | unsigned long count = | 125 | unsigned long count = |
134 | __raw_readq(IOADDR(A_SCD_TIMER_REGISTER(0, R_SCD_TIMER_CNT))); | 126 | __raw_readq(IOADDR(A_SCD_TIMER_REGISTER(0, R_SCD_TIMER_CNT))); |
127 | return (jiffies + 1) * (BCM1480_HPT_VALUE / HZ) - count; | ||
128 | } | ||
135 | 129 | ||
136 | return 1000000/HZ - count; | 130 | void __init bcm1480_hpt_setup(void) |
131 | { | ||
132 | mips_hpt_read = bcm1480_hpt_read; | ||
133 | mips_hpt_frequency = BCM1480_HPT_VALUE; | ||
137 | } | 134 | } |
diff --git a/arch/mips/sibyte/sb1250/time.c b/arch/mips/sibyte/sb1250/time.c index 0ccf1796dd78..bcb74f2c1948 100644 --- a/arch/mips/sibyte/sb1250/time.c +++ b/arch/mips/sibyte/sb1250/time.c | |||
@@ -47,15 +47,11 @@ | |||
47 | 47 | ||
48 | #define SB1250_HPT_NUM 3 | 48 | #define SB1250_HPT_NUM 3 |
49 | #define SB1250_HPT_VALUE M_SCD_TIMER_CNT /* max value */ | 49 | #define SB1250_HPT_VALUE M_SCD_TIMER_CNT /* max value */ |
50 | #define SB1250_HPT_SHIFT ((sizeof(unsigned int)*8)-V_SCD_TIMER_WIDTH) | ||
51 | 50 | ||
52 | 51 | ||
53 | extern int sb1250_steal_irq(int irq); | 52 | extern int sb1250_steal_irq(int irq); |
54 | 53 | ||
55 | static unsigned int sb1250_hpt_read(void); | 54 | static unsigned int sb1250_hpt_read(void); |
56 | static void sb1250_hpt_init(unsigned int); | ||
57 | |||
58 | static unsigned int hpt_offset; | ||
59 | 55 | ||
60 | void __init sb1250_hpt_setup(void) | 56 | void __init sb1250_hpt_setup(void) |
61 | { | 57 | { |
@@ -69,13 +65,9 @@ void __init sb1250_hpt_setup(void) | |||
69 | __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, | 65 | __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, |
70 | IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CFG))); | 66 | IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CFG))); |
71 | 67 | ||
72 | /* | 68 | mips_hpt_frequency = V_SCD_TIMER_FREQ; |
73 | * we need to fill 32 bits, so just use the upper 23 bits and pretend | ||
74 | * the timer is going 512Mhz instead of 1Mhz | ||
75 | */ | ||
76 | mips_hpt_frequency = V_SCD_TIMER_FREQ << SB1250_HPT_SHIFT; | ||
77 | mips_hpt_init = sb1250_hpt_init; | ||
78 | mips_hpt_read = sb1250_hpt_read; | 69 | mips_hpt_read = sb1250_hpt_read; |
70 | mips_hpt_mask = M_SCD_TIMER_INIT; | ||
79 | } | 71 | } |
80 | } | 72 | } |
81 | 73 | ||
@@ -149,11 +141,7 @@ void sb1250_timer_interrupt(void) | |||
149 | 141 | ||
150 | /* | 142 | /* |
151 | * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over | 143 | * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over |
152 | * again. There's no easy way to set to a specific value so store init value | 144 | * again. |
153 | * in hpt_offset and subtract each time. | ||
154 | * | ||
155 | * Note: Timer isn't full 32bits so shift it into the upper part making | ||
156 | * it appear to run at a higher frequency. | ||
157 | */ | 145 | */ |
158 | static unsigned int sb1250_hpt_read(void) | 146 | static unsigned int sb1250_hpt_read(void) |
159 | { | 147 | { |
@@ -161,13 +149,5 @@ static unsigned int sb1250_hpt_read(void) | |||
161 | 149 | ||
162 | count = G_SCD_TIMER_CNT(__raw_readq(IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CNT)))); | 150 | count = G_SCD_TIMER_CNT(__raw_readq(IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CNT)))); |
163 | 151 | ||
164 | count = (SB1250_HPT_VALUE - count) << SB1250_HPT_SHIFT; | 152 | return SB1250_HPT_VALUE - count; |
165 | |||
166 | return count - hpt_offset; | ||
167 | } | ||
168 | |||
169 | static void sb1250_hpt_init(unsigned int count) | ||
170 | { | ||
171 | hpt_offset = count; | ||
172 | return; | ||
173 | } | 153 | } |
diff --git a/arch/mips/tx4927/common/smsc_fdc37m81x.c b/arch/mips/tx4927/common/smsc_fdc37m81x.c new file mode 100644 index 000000000000..33f517bc9a08 --- /dev/null +++ b/arch/mips/tx4927/common/smsc_fdc37m81x.c | |||
@@ -0,0 +1,172 @@ | |||
1 | /* | ||
2 | * Interface for smsc fdc48m81x Super IO chip | ||
3 | * | ||
4 | * Author: MontaVista Software, Inc. source@mvista.com | ||
5 | * | ||
6 | * 2001-2003 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | * | ||
11 | * Copyright 2004 (c) MontaVista Software, Inc. | ||
12 | */ | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <asm/io.h> | ||
16 | #include <asm/tx4927/smsc_fdc37m81x.h> | ||
17 | |||
18 | #define DEBUG | ||
19 | |||
20 | /* Common Registers */ | ||
21 | #define SMSC_FDC37M81X_CONFIG_INDEX 0x00 | ||
22 | #define SMSC_FDC37M81X_CONFIG_DATA 0x01 | ||
23 | #define SMSC_FDC37M81X_CONF 0x02 | ||
24 | #define SMSC_FDC37M81X_INDEX 0x03 | ||
25 | #define SMSC_FDC37M81X_DNUM 0x07 | ||
26 | #define SMSC_FDC37M81X_DID 0x20 | ||
27 | #define SMSC_FDC37M81X_DREV 0x21 | ||
28 | #define SMSC_FDC37M81X_PCNT 0x22 | ||
29 | #define SMSC_FDC37M81X_PMGT 0x23 | ||
30 | #define SMSC_FDC37M81X_OSC 0x24 | ||
31 | #define SMSC_FDC37M81X_CONFPA0 0x26 | ||
32 | #define SMSC_FDC37M81X_CONFPA1 0x27 | ||
33 | #define SMSC_FDC37M81X_TEST4 0x2B | ||
34 | #define SMSC_FDC37M81X_TEST5 0x2C | ||
35 | #define SMSC_FDC37M81X_TEST1 0x2D | ||
36 | #define SMSC_FDC37M81X_TEST2 0x2E | ||
37 | #define SMSC_FDC37M81X_TEST3 0x2F | ||
38 | |||
39 | /* Logical device numbers */ | ||
40 | #define SMSC_FDC37M81X_FDD 0x00 | ||
41 | #define SMSC_FDC37M81X_SERIAL1 0x04 | ||
42 | #define SMSC_FDC37M81X_SERIAL2 0x05 | ||
43 | #define SMSC_FDC37M81X_KBD 0x07 | ||
44 | |||
45 | /* Logical device Config Registers */ | ||
46 | #define SMSC_FDC37M81X_ACTIVE 0x30 | ||
47 | #define SMSC_FDC37M81X_BASEADDR0 0x60 | ||
48 | #define SMSC_FDC37M81X_BASEADDR1 0x61 | ||
49 | #define SMSC_FDC37M81X_INT 0x70 | ||
50 | #define SMSC_FDC37M81X_INT2 0x72 | ||
51 | #define SMSC_FDC37M81X_MODE 0xF0 | ||
52 | |||
53 | /* Chip Config Values */ | ||
54 | #define SMSC_FDC37M81X_CONFIG_ENTER 0x55 | ||
55 | #define SMSC_FDC37M81X_CONFIG_EXIT 0xaa | ||
56 | #define SMSC_FDC37M81X_CHIP_ID 0x4d | ||
57 | |||
58 | static unsigned long g_smsc_fdc37m81x_base = 0; | ||
59 | |||
60 | static inline unsigned char smsc_fdc37m81x_rd(unsigned char index) | ||
61 | { | ||
62 | outb(index, g_smsc_fdc37m81x_base + SMSC_FDC37M81X_CONFIG_INDEX); | ||
63 | |||
64 | return inb(g_smsc_fdc37m81x_base + SMSC_FDC37M81X_CONFIG_DATA); | ||
65 | } | ||
66 | |||
67 | static inline void smsc_dc37m81x_wr(unsigned char index, unsigned char data) | ||
68 | { | ||
69 | outb(index, g_smsc_fdc37m81x_base + SMSC_FDC37M81X_CONFIG_INDEX); | ||
70 | outb(data, g_smsc_fdc37m81x_base + SMSC_FDC37M81X_CONFIG_DATA); | ||
71 | } | ||
72 | |||
73 | void smsc_fdc37m81x_config_beg(void) | ||
74 | { | ||
75 | if (g_smsc_fdc37m81x_base) { | ||
76 | outb(SMSC_FDC37M81X_CONFIG_ENTER, | ||
77 | g_smsc_fdc37m81x_base + SMSC_FDC37M81X_CONFIG_INDEX); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | void smsc_fdc37m81x_config_end(void) | ||
82 | { | ||
83 | if (g_smsc_fdc37m81x_base) | ||
84 | outb(SMSC_FDC37M81X_CONFIG_EXIT, | ||
85 | g_smsc_fdc37m81x_base + SMSC_FDC37M81X_CONFIG_INDEX); | ||
86 | } | ||
87 | |||
88 | u8 smsc_fdc37m81x_config_get(u8 reg) | ||
89 | { | ||
90 | u8 val = 0; | ||
91 | |||
92 | if (g_smsc_fdc37m81x_base) | ||
93 | val = smsc_fdc37m81x_rd(reg); | ||
94 | |||
95 | return val; | ||
96 | } | ||
97 | |||
98 | void smsc_fdc37m81x_config_set(u8 reg, u8 val) | ||
99 | { | ||
100 | if (g_smsc_fdc37m81x_base) | ||
101 | smsc_dc37m81x_wr(reg, val); | ||
102 | } | ||
103 | |||
104 | unsigned long __init smsc_fdc37m81x_init(unsigned long port) | ||
105 | { | ||
106 | const int field = sizeof(unsigned long) * 2; | ||
107 | u8 chip_id; | ||
108 | |||
109 | if (g_smsc_fdc37m81x_base) | ||
110 | printk("smsc_fdc37m81x_init() stepping on old base=0x%0*lx\n", | ||
111 | field, g_smsc_fdc37m81x_base); | ||
112 | |||
113 | g_smsc_fdc37m81x_base = port; | ||
114 | |||
115 | smsc_fdc37m81x_config_beg(); | ||
116 | |||
117 | chip_id = smsc_fdc37m81x_rd(SMSC_FDC37M81X_DID); | ||
118 | if (chip_id == SMSC_FDC37M81X_CHIP_ID) | ||
119 | smsc_fdc37m81x_config_end(); | ||
120 | else { | ||
121 | printk("smsc_fdc37m81x_init() unknow chip id 0x%02x\n", | ||
122 | chip_id); | ||
123 | g_smsc_fdc37m81x_base = 0; | ||
124 | } | ||
125 | |||
126 | return g_smsc_fdc37m81x_base; | ||
127 | } | ||
128 | |||
129 | #ifdef DEBUG | ||
130 | void smsc_fdc37m81x_config_dump_one(char *key, u8 dev, u8 reg) | ||
131 | { | ||
132 | printk("%s: dev=0x%02x reg=0x%02x val=0x%02x\n", key, dev, reg, | ||
133 | smsc_fdc37m81x_rd(reg)); | ||
134 | } | ||
135 | |||
136 | void smsc_fdc37m81x_config_dump(void) | ||
137 | { | ||
138 | u8 orig; | ||
139 | char *fname = "smsc_fdc37m81x_config_dump()"; | ||
140 | |||
141 | smsc_fdc37m81x_config_beg(); | ||
142 | |||
143 | orig = smsc_fdc37m81x_rd(SMSC_FDC37M81X_DNUM); | ||
144 | |||
145 | printk("%s: common\n", fname); | ||
146 | smsc_fdc37m81x_config_dump_one(fname, SMSC_FDC37M81X_NONE, | ||
147 | SMSC_FDC37M81X_DNUM); | ||
148 | smsc_fdc37m81x_config_dump_one(fname, SMSC_FDC37M81X_NONE, | ||
149 | SMSC_FDC37M81X_DID); | ||
150 | smsc_fdc37m81x_config_dump_one(fname, SMSC_FDC37M81X_NONE, | ||
151 | SMSC_FDC37M81X_DREV); | ||
152 | smsc_fdc37m81x_config_dump_one(fname, SMSC_FDC37M81X_NONE, | ||
153 | SMSC_FDC37M81X_PCNT); | ||
154 | smsc_fdc37m81x_config_dump_one(fname, SMSC_FDC37M81X_NONE, | ||
155 | SMSC_FDC37M81X_PMGT); | ||
156 | |||
157 | printk("%s: keyboard\n", fname); | ||
158 | smsc_dc37m81x_wr(SMSC_FDC37M81X_DNUM, SMSC_FDC37M81X_KBD); | ||
159 | smsc_fdc37m81x_config_dump_one(fname, SMSC_FDC37M81X_KBD, | ||
160 | SMSC_FDC37M81X_ACTIVE); | ||
161 | smsc_fdc37m81x_config_dump_one(fname, SMSC_FDC37M81X_KBD, | ||
162 | SMSC_FDC37M81X_INT); | ||
163 | smsc_fdc37m81x_config_dump_one(fname, SMSC_FDC37M81X_KBD, | ||
164 | SMSC_FDC37M81X_INT2); | ||
165 | smsc_fdc37m81x_config_dump_one(fname, SMSC_FDC37M81X_KBD, | ||
166 | SMSC_FDC37M81X_LDCR_F0); | ||
167 | |||
168 | smsc_dc37m81x_wr(SMSC_FDC37M81X_DNUM, orig); | ||
169 | |||
170 | smsc_fdc37m81x_config_end(); | ||
171 | } | ||
172 | #endif | ||
diff --git a/arch/mips/tx4927/common/tx4927_setup.c b/arch/mips/tx4927/common/tx4927_setup.c index 4658b2ae4833..941c441729b0 100644 --- a/arch/mips/tx4927/common/tx4927_setup.c +++ b/arch/mips/tx4927/common/tx4927_setup.c | |||
@@ -112,8 +112,6 @@ void print_cp0(char *key, int num, char *name, u32 val) | |||
112 | return; | 112 | return; |
113 | } | 113 | } |
114 | 114 | ||
115 | indent: Standard input:25: Error:Unexpected end of file | ||
116 | |||
117 | void | 115 | void |
118 | dump_cp0(char *key) | 116 | dump_cp0(char *key) |
119 | { | 117 | { |
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c b/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c index b926e6a75c29..08b20cdfd7b3 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c | |||
@@ -36,14 +36,18 @@ void __init txx9_spi_init(unsigned long base, int (*cs_func)(int chipid, int on) | |||
36 | 36 | ||
37 | static DECLARE_WAIT_QUEUE_HEAD(txx9_spi_wait); | 37 | static DECLARE_WAIT_QUEUE_HEAD(txx9_spi_wait); |
38 | 38 | ||
39 | static void txx9_spi_interrupt(int irq, void *dev_id) | 39 | static irqreturn_t txx9_spi_interrupt(int irq, void *dev_id) |
40 | { | 40 | { |
41 | /* disable rx intr */ | 41 | /* disable rx intr */ |
42 | tx4938_spiptr->cr0 &= ~TXx9_SPCR0_RBSIE; | 42 | tx4938_spiptr->cr0 &= ~TXx9_SPCR0_RBSIE; |
43 | wake_up(&txx9_spi_wait); | 43 | wake_up(&txx9_spi_wait); |
44 | |||
45 | return IRQ_HANDLED; | ||
44 | } | 46 | } |
47 | |||
45 | static struct irqaction txx9_spi_action = { | 48 | static struct irqaction txx9_spi_action = { |
46 | txx9_spi_interrupt, 0, 0, "spi", NULL, NULL, | 49 | .handler = txx9_spi_interrupt, |
50 | .name = "spi", | ||
47 | }; | 51 | }; |
48 | 52 | ||
49 | void __init txx9_spi_irqinit(int irc_irq) | 53 | void __init txx9_spi_irqinit(int irc_irq) |
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index b3677fc8eef5..7b943b45f7cd 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S | |||
@@ -153,13 +153,7 @@ SECTIONS | |||
153 | __setup_end = .; | 153 | __setup_end = .; |
154 | __initcall_start = .; | 154 | __initcall_start = .; |
155 | .initcall.init : { | 155 | .initcall.init : { |
156 | *(.initcall1.init) | 156 | INITCALLS |
157 | *(.initcall2.init) | ||
158 | *(.initcall3.init) | ||
159 | *(.initcall4.init) | ||
160 | *(.initcall5.init) | ||
161 | *(.initcall6.init) | ||
162 | *(.initcall7.init) | ||
163 | } | 157 | } |
164 | __initcall_end = .; | 158 | __initcall_end = .; |
165 | __con_initcall_start = .; | 159 | __con_initcall_start = .; |
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index cb0e8d46c3e8..e8342d867536 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -108,13 +108,7 @@ SECTIONS | |||
108 | 108 | ||
109 | .initcall.init : { | 109 | .initcall.init : { |
110 | __initcall_start = .; | 110 | __initcall_start = .; |
111 | *(.initcall1.init) | 111 | INITCALLS |
112 | *(.initcall2.init) | ||
113 | *(.initcall3.init) | ||
114 | *(.initcall4.init) | ||
115 | *(.initcall5.init) | ||
116 | *(.initcall6.init) | ||
117 | *(.initcall7.init) | ||
118 | __initcall_end = .; | 112 | __initcall_end = .; |
119 | } | 113 | } |
120 | 114 | ||
diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S index 095fd3323323..16e8661e1fec 100644 --- a/arch/ppc/kernel/vmlinux.lds.S +++ b/arch/ppc/kernel/vmlinux.lds.S | |||
@@ -115,13 +115,7 @@ SECTIONS | |||
115 | __setup_end = .; | 115 | __setup_end = .; |
116 | __initcall_start = .; | 116 | __initcall_start = .; |
117 | .initcall.init : { | 117 | .initcall.init : { |
118 | *(.initcall1.init) | 118 | INITCALLS |
119 | *(.initcall2.init) | ||
120 | *(.initcall3.init) | ||
121 | *(.initcall4.init) | ||
122 | *(.initcall5.init) | ||
123 | *(.initcall6.init) | ||
124 | *(.initcall7.init) | ||
125 | } | 119 | } |
126 | __initcall_end = .; | 120 | __initcall_end = .; |
127 | 121 | ||
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index 45c9fa7d7545..af1e8fc7d985 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -310,6 +310,7 @@ appldata_interval_handler(ctl_table *ctl, int write, struct file *filp, | |||
310 | if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) { | 310 | if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) { |
311 | return -EFAULT; | 311 | return -EFAULT; |
312 | } | 312 | } |
313 | interval = 0; | ||
313 | sscanf(buf, "%i", &interval); | 314 | sscanf(buf, "%i", &interval); |
314 | if (interval <= 0) { | 315 | if (interval <= 0) { |
315 | P_ERROR("Timer CPU interval has to be > 0!\n"); | 316 | P_ERROR("Timer CPU interval has to be > 0!\n"); |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 2001767e1dc7..5b33f823863a 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -757,7 +757,9 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args) | |||
757 | put_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp))) | 757 | put_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp))) |
758 | error = -EFAULT; | 758 | error = -EFAULT; |
759 | } | 759 | } |
760 | copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)); | 760 | if (copy_to_user(args->__unused, tmp.__unused, |
761 | sizeof(tmp.__unused))) | ||
762 | error = -EFAULT; | ||
761 | } | 763 | } |
762 | return error; | 764 | return error; |
763 | } | 765 | } |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index d49b876a83bf..861888ab8c13 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -169,12 +169,12 @@ sys32_sigaction(int sig, const struct old_sigaction32 __user *act, | |||
169 | compat_old_sigset_t mask; | 169 | compat_old_sigset_t mask; |
170 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | 170 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || |
171 | __get_user(sa_handler, &act->sa_handler) || | 171 | __get_user(sa_handler, &act->sa_handler) || |
172 | __get_user(sa_restorer, &act->sa_restorer)) | 172 | __get_user(sa_restorer, &act->sa_restorer) || |
173 | __get_user(new_ka.sa.sa_flags, &act->sa_flags) || | ||
174 | __get_user(mask, &act->sa_mask)) | ||
173 | return -EFAULT; | 175 | return -EFAULT; |
174 | new_ka.sa.sa_handler = (__sighandler_t) sa_handler; | 176 | new_ka.sa.sa_handler = (__sighandler_t) sa_handler; |
175 | new_ka.sa.sa_restorer = (void (*)(void)) sa_restorer; | 177 | new_ka.sa.sa_restorer = (void (*)(void)) sa_restorer; |
176 | __get_user(new_ka.sa.sa_flags, &act->sa_flags); | ||
177 | __get_user(mask, &act->sa_mask); | ||
178 | siginitset(&new_ka.sa.sa_mask, mask); | 178 | siginitset(&new_ka.sa.sa_mask, mask); |
179 | } | 179 | } |
180 | 180 | ||
@@ -185,10 +185,10 @@ sys32_sigaction(int sig, const struct old_sigaction32 __user *act, | |||
185 | sa_restorer = (unsigned long) old_ka.sa.sa_restorer; | 185 | sa_restorer = (unsigned long) old_ka.sa.sa_restorer; |
186 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || | 186 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || |
187 | __put_user(sa_handler, &oact->sa_handler) || | 187 | __put_user(sa_handler, &oact->sa_handler) || |
188 | __put_user(sa_restorer, &oact->sa_restorer)) | 188 | __put_user(sa_restorer, &oact->sa_restorer) || |
189 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || | ||
190 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) | ||
189 | return -EFAULT; | 191 | return -EFAULT; |
190 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | ||
191 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); | ||
192 | } | 192 | } |
193 | 193 | ||
194 | return ret; | 194 | return ret; |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index cb0efae6802f..71e54ef0931e 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -1664,4 +1664,4 @@ sys_getcpu_wrapper: | |||
1664 | llgtr %r2,%r2 # unsigned * | 1664 | llgtr %r2,%r2 # unsigned * |
1665 | llgtr %r3,%r3 # unsigned * | 1665 | llgtr %r3,%r3 # unsigned * |
1666 | llgtr %r4,%r4 # struct getcpu_cache * | 1666 | llgtr %r4,%r4 # struct getcpu_cache * |
1667 | jg sys_tee | 1667 | jg sys_getcpu |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 4392a77cbae8..4c8a7954ef48 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -80,10 +80,10 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
80 | old_sigset_t mask; | 80 | old_sigset_t mask; |
81 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | 81 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || |
82 | __get_user(new_ka.sa.sa_handler, &act->sa_handler) || | 82 | __get_user(new_ka.sa.sa_handler, &act->sa_handler) || |
83 | __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) | 83 | __get_user(new_ka.sa.sa_restorer, &act->sa_restorer) || |
84 | __get_user(new_ka.sa.sa_flags, &act->sa_flags) || | ||
85 | __get_user(mask, &act->sa_mask)) | ||
84 | return -EFAULT; | 86 | return -EFAULT; |
85 | __get_user(new_ka.sa.sa_flags, &act->sa_flags); | ||
86 | __get_user(mask, &act->sa_mask); | ||
87 | siginitset(&new_ka.sa.sa_mask, mask); | 87 | siginitset(&new_ka.sa.sa_mask, mask); |
88 | } | 88 | } |
89 | 89 | ||
@@ -92,10 +92,10 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
92 | if (!ret && oact) { | 92 | if (!ret && oact) { |
93 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || | 93 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || |
94 | __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || | 94 | __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || |
95 | __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) | 95 | __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer) || |
96 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || | ||
97 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) | ||
96 | return -EFAULT; | 98 | return -EFAULT; |
97 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | ||
98 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); | ||
99 | } | 99 | } |
100 | 100 | ||
101 | return ret; | 101 | return ret; |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 66375a5e3d12..92ecffbc8d82 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -462,7 +462,8 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) | |||
462 | local_irq_enable(); | 462 | local_irq_enable(); |
463 | 463 | ||
464 | if (regs->psw.mask & PSW_MASK_PSTATE) { | 464 | if (regs->psw.mask & PSW_MASK_PSTATE) { |
465 | get_user(*((__u16 *) opcode), (__u16 __user *) location); | 465 | if (get_user(*((__u16 *) opcode), (__u16 __user *) location)) |
466 | return; | ||
466 | if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) { | 467 | if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) { |
467 | if (current->ptrace & PT_PTRACED) | 468 | if (current->ptrace & PT_PTRACED) |
468 | force_sig(SIGTRAP, current); | 469 | force_sig(SIGTRAP, current); |
@@ -470,20 +471,25 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) | |||
470 | signal = SIGILL; | 471 | signal = SIGILL; |
471 | #ifdef CONFIG_MATHEMU | 472 | #ifdef CONFIG_MATHEMU |
472 | } else if (opcode[0] == 0xb3) { | 473 | } else if (opcode[0] == 0xb3) { |
473 | get_user(*((__u16 *) (opcode+2)), location+1); | 474 | if (get_user(*((__u16 *) (opcode+2)), location+1)) |
475 | return; | ||
474 | signal = math_emu_b3(opcode, regs); | 476 | signal = math_emu_b3(opcode, regs); |
475 | } else if (opcode[0] == 0xed) { | 477 | } else if (opcode[0] == 0xed) { |
476 | get_user(*((__u32 *) (opcode+2)), | 478 | if (get_user(*((__u32 *) (opcode+2)), |
477 | (__u32 __user *)(location+1)); | 479 | (__u32 __user *)(location+1))) |
480 | return; | ||
478 | signal = math_emu_ed(opcode, regs); | 481 | signal = math_emu_ed(opcode, regs); |
479 | } else if (*((__u16 *) opcode) == 0xb299) { | 482 | } else if (*((__u16 *) opcode) == 0xb299) { |
480 | get_user(*((__u16 *) (opcode+2)), location+1); | 483 | if (get_user(*((__u16 *) (opcode+2)), location+1)) |
484 | return; | ||
481 | signal = math_emu_srnm(opcode, regs); | 485 | signal = math_emu_srnm(opcode, regs); |
482 | } else if (*((__u16 *) opcode) == 0xb29c) { | 486 | } else if (*((__u16 *) opcode) == 0xb29c) { |
483 | get_user(*((__u16 *) (opcode+2)), location+1); | 487 | if (get_user(*((__u16 *) (opcode+2)), location+1)) |
488 | return; | ||
484 | signal = math_emu_stfpc(opcode, regs); | 489 | signal = math_emu_stfpc(opcode, regs); |
485 | } else if (*((__u16 *) opcode) == 0xb29d) { | 490 | } else if (*((__u16 *) opcode) == 0xb29d) { |
486 | get_user(*((__u16 *) (opcode+2)), location+1); | 491 | if (get_user(*((__u16 *) (opcode+2)), location+1)) |
492 | return; | ||
487 | signal = math_emu_lfpc(opcode, regs); | 493 | signal = math_emu_lfpc(opcode, regs); |
488 | #endif | 494 | #endif |
489 | } else | 495 | } else |
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index af9e69a03011..fe0f2e97ba7b 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S | |||
@@ -83,13 +83,7 @@ SECTIONS | |||
83 | __setup_end = .; | 83 | __setup_end = .; |
84 | __initcall_start = .; | 84 | __initcall_start = .; |
85 | .initcall.init : { | 85 | .initcall.init : { |
86 | *(.initcall1.init) | 86 | INITCALLS |
87 | *(.initcall2.init) | ||
88 | *(.initcall3.init) | ||
89 | *(.initcall4.init) | ||
90 | *(.initcall5.init) | ||
91 | *(.initcall6.init) | ||
92 | *(.initcall7.init) | ||
93 | } | 87 | } |
94 | __initcall_end = .; | 88 | __initcall_end = .; |
95 | __con_initcall_start = .; | 89 | __con_initcall_start = .; |
diff --git a/arch/sh/boards/renesas/hs7751rvoip/setup.c b/arch/sh/boards/renesas/hs7751rvoip/setup.c index 1d997ffd7931..f7d0e304d899 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/setup.c +++ b/arch/sh/boards/renesas/hs7751rvoip/setup.c | |||
@@ -15,12 +15,16 @@ | |||
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/machvec.h> | 16 | #include <asm/machvec.h> |
17 | 17 | ||
18 | static void __init hs7751rvoip_init_irq(void) | 18 | static struct ipr_data hs77501rvoip_ipr_map[] = { |
19 | { | ||
20 | #if defined(CONFIG_HS7751RVOIP_CODEC) | 19 | #if defined(CONFIG_HS7751RVOIP_CODEC) |
21 | make_ipr_irq(DMTE0_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | 20 | { DMTE0_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
22 | make_ipr_irq(DMTE1_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | 21 | { DMTE1_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
23 | #endif | 22 | #endif |
23 | }; | ||
24 | |||
25 | static void __init hs7751rvoip_init_irq(void) | ||
26 | { | ||
27 | make_ipr_irq(hs77501rvoip_ipr_map, ARRAY_SIZE(hs77501rvoip_ipr_map)); | ||
24 | 28 | ||
25 | init_hs7751rvoip_IRQ(); | 29 | init_hs7751rvoip_IRQ(); |
26 | } | 30 | } |
diff --git a/arch/sh/boards/renesas/sh7710voipgw/setup.c b/arch/sh/boards/renesas/sh7710voipgw/setup.c index e57e7afab8c6..180810b12107 100644 --- a/arch/sh/boards/renesas/sh7710voipgw/setup.c +++ b/arch/sh/boards/renesas/sh7710voipgw/setup.c | |||
@@ -13,6 +13,51 @@ | |||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
15 | 15 | ||
16 | static struct ipr_data sh7710voipgw_ipr_map[] = { | ||
17 | { TIMER2_IRQ, TIMER2_IPR_ADDR, TIMER2_IPR_POS, TIMER2_PRIORITY }, | ||
18 | { WDT_IRQ, WDT_IPR_ADDR, WDT_IPR_POS, WDT_PRIORITY }, | ||
19 | |||
20 | /* SCIF0 */ | ||
21 | { SCIF0_ERI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY }, | ||
22 | { SCIF0_RXI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY }, | ||
23 | { SCIF0_BRI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY }, | ||
24 | { SCIF0_TXI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY }, | ||
25 | |||
26 | /* DMAC-1 */ | ||
27 | { DMTE0_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, | ||
28 | { DMTE1_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, | ||
29 | { DMTE2_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, | ||
30 | { DMTE3_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, | ||
31 | |||
32 | /* DMAC-2 */ | ||
33 | { DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY }, | ||
34 | { DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY }, | ||
35 | |||
36 | /* IPSEC */ | ||
37 | { IPSEC_IRQ, IPSEC_IPR_ADDR, IPSEC_IPR_POS, IPSEC_PRIORITY }, | ||
38 | |||
39 | /* EDMAC */ | ||
40 | { EDMAC0_IRQ, EDMAC0_IPR_ADDR, EDMAC0_IPR_POS, EDMAC0_PRIORITY }, | ||
41 | { EDMAC1_IRQ, EDMAC1_IPR_ADDR, EDMAC1_IPR_POS, EDMAC1_PRIORITY }, | ||
42 | { EDMAC2_IRQ, EDMAC2_IPR_ADDR, EDMAC2_IPR_POS, EDMAC2_PRIORITY }, | ||
43 | |||
44 | /* SIOF0 */ | ||
45 | { SIOF0_ERI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
46 | { SIOF0_TXI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
47 | { SIOF0_RXI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
48 | { SIOF0_CCI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
49 | |||
50 | /* SIOF1 */ | ||
51 | { SIOF1_ERI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, SIOF1_PRIORITY }, | ||
52 | { SIOF1_TXI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, SIOF1_PRIORITY }, | ||
53 | { SIOF1_RXI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, SIOF1_PRIORITY }, | ||
54 | { SIOF1_CCI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, SIOF1_PRIORITY }, | ||
55 | |||
56 | /* SLIC IRQ's */ | ||
57 | { IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, IRQ1_PRIORITY }, | ||
58 | { IRQ2_IRQ, IRQ2_IPR_ADDR, IRQ2_IPR_POS, IRQ2_PRIORITY }, | ||
59 | }; | ||
60 | |||
16 | /* | 61 | /* |
17 | * Initialize IRQ setting | 62 | * Initialize IRQ setting |
18 | */ | 63 | */ |
@@ -37,65 +82,7 @@ static void __init sh7710voipgw_init_irq(void) | |||
37 | */ | 82 | */ |
38 | ctrl_outw(0x2aa, INTC_ICR1); | 83 | ctrl_outw(0x2aa, INTC_ICR1); |
39 | 84 | ||
40 | /* Now make IPR interrupts */ | 85 | make_ipr_irq(sh7710voipgw_ipr_map, ARRAY_SIZE(sh7710voipgw_ipr_map)); |
41 | make_ipr_irq(TIMER2_IRQ, TIMER2_IPR_ADDR, | ||
42 | TIMER2_IPR_POS, TIMER2_PRIORITY); | ||
43 | make_ipr_irq(WDT_IRQ, WDT_IPR_ADDR, WDT_IPR_POS, WDT_PRIORITY); | ||
44 | |||
45 | /* SCIF0 */ | ||
46 | make_ipr_irq(SCIF0_ERI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, | ||
47 | SCIF0_PRIORITY); | ||
48 | make_ipr_irq(SCIF0_RXI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, | ||
49 | SCIF0_PRIORITY); | ||
50 | make_ipr_irq(SCIF0_BRI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, | ||
51 | SCIF0_PRIORITY); | ||
52 | make_ipr_irq(SCIF0_TXI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, | ||
53 | SCIF0_PRIORITY); | ||
54 | |||
55 | /* DMAC-1 */ | ||
56 | make_ipr_irq(DMTE0_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
57 | make_ipr_irq(DMTE1_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
58 | make_ipr_irq(DMTE2_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
59 | make_ipr_irq(DMTE3_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
60 | |||
61 | /* DMAC-2 */ | ||
62 | make_ipr_irq(DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY); | ||
63 | make_ipr_irq(DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY); | ||
64 | |||
65 | /* IPSEC */ | ||
66 | make_ipr_irq(IPSEC_IRQ, IPSEC_IPR_ADDR, IPSEC_IPR_POS, IPSEC_PRIORITY); | ||
67 | |||
68 | /* EDMAC */ | ||
69 | make_ipr_irq(EDMAC0_IRQ, EDMAC0_IPR_ADDR, EDMAC0_IPR_POS, | ||
70 | EDMAC0_PRIORITY); | ||
71 | make_ipr_irq(EDMAC1_IRQ, EDMAC1_IPR_ADDR, EDMAC1_IPR_POS, | ||
72 | EDMAC1_PRIORITY); | ||
73 | make_ipr_irq(EDMAC2_IRQ, EDMAC2_IPR_ADDR, EDMAC2_IPR_POS, | ||
74 | EDMAC2_PRIORITY); | ||
75 | |||
76 | /* SIOF0 */ | ||
77 | make_ipr_irq(SIOF0_ERI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, | ||
78 | SIOF0_PRIORITY); | ||
79 | make_ipr_irq(SIOF0_TXI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, | ||
80 | SIOF0_PRIORITY); | ||
81 | make_ipr_irq(SIOF0_RXI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, | ||
82 | SIOF0_PRIORITY); | ||
83 | make_ipr_irq(SIOF0_CCI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, | ||
84 | SIOF0_PRIORITY); | ||
85 | |||
86 | /* SIOF1 */ | ||
87 | make_ipr_irq(SIOF1_ERI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, | ||
88 | SIOF1_PRIORITY); | ||
89 | make_ipr_irq(SIOF1_TXI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, | ||
90 | SIOF1_PRIORITY); | ||
91 | make_ipr_irq(SIOF1_RXI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, | ||
92 | SIOF1_PRIORITY); | ||
93 | make_ipr_irq(SIOF1_CCI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, | ||
94 | SIOF1_PRIORITY); | ||
95 | |||
96 | /* SLIC IRQ's */ | ||
97 | make_ipr_irq(IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, IRQ1_PRIORITY); | ||
98 | make_ipr_irq(IRQ2_IRQ, IRQ2_IPR_ADDR, IRQ2_IPR_POS, IRQ2_PRIORITY); | ||
99 | } | 86 | } |
100 | 87 | ||
101 | /* | 88 | /* |
diff --git a/arch/sh/boards/se/7300/irq.c b/arch/sh/boards/se/7300/irq.c index ad1034f98a29..1279d776d60f 100644 --- a/arch/sh/boards/se/7300/irq.c +++ b/arch/sh/boards/se/7300/irq.c | |||
@@ -13,6 +13,17 @@ | |||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/se7300.h> | 14 | #include <asm/se7300.h> |
15 | 15 | ||
16 | static struct ipr_data se7300_ipr_map[] = { | ||
17 | /* PC_IRQ[0-3] -> IRQ0 (32) */ | ||
18 | { IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, 0x0f - IRQ0_IRQ }, | ||
19 | /* A_IRQ[0-3] -> IRQ1 (33) */ | ||
20 | { IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, 0x0f - IRQ1_IRQ }, | ||
21 | { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
22 | { DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
23 | { DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
24 | { VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
25 | }; | ||
26 | |||
16 | /* | 27 | /* |
17 | * Initialize IRQ setting | 28 | * Initialize IRQ setting |
18 | */ | 29 | */ |
@@ -23,14 +34,7 @@ init_7300se_IRQ(void) | |||
23 | ctrl_outw(0xa000, INTC_ICR1); /* IRQ mode; IRQ0,1 enable. */ | 34 | ctrl_outw(0xa000, INTC_ICR1); /* IRQ mode; IRQ0,1 enable. */ |
24 | ctrl_outw(0x0000, PORT_PFCR); /* use F for IRQ[3:0] and SIU. */ | 35 | ctrl_outw(0x0000, PORT_PFCR); /* use F for IRQ[3:0] and SIU. */ |
25 | 36 | ||
26 | /* PC_IRQ[0-3] -> IRQ0 (32) */ | 37 | make_ipr_irq(se7300_ipr_map, ARRAY_SIZE(se7300_ipr_map)); |
27 | make_ipr_irq(IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, 0x0f - IRQ0_IRQ); | ||
28 | /* A_IRQ[0-3] -> IRQ1 (33) */ | ||
29 | make_ipr_irq(IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, 0x0f - IRQ1_IRQ); | ||
30 | make_ipr_irq(SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY); | ||
31 | make_ipr_irq(DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
32 | make_ipr_irq(DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
33 | make_ipr_irq(VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
34 | 38 | ||
35 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ | 39 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ |
36 | } | 40 | } |
diff --git a/arch/sh/boards/se/73180/irq.c b/arch/sh/boards/se/73180/irq.c index 2c62b8ea350e..e7200c56bb45 100644 --- a/arch/sh/boards/se/73180/irq.c +++ b/arch/sh/boards/se/73180/irq.c | |||
@@ -87,13 +87,38 @@ shmse_irq_demux(int irq) | |||
87 | return irq; | 87 | return irq; |
88 | } | 88 | } |
89 | 89 | ||
90 | static struct ipr_data se73180_siof0_ipr_map[] = { | ||
91 | { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
92 | }; | ||
93 | static struct ipr_data se73180_vpu_ipr_map[] = { | ||
94 | { VPU_IRQ, VPU_IPR_ADDR, VPU_IPR_POS, 8 }, | ||
95 | }; | ||
96 | static struct ipr_data se73180_other_ipr_map[] = { | ||
97 | { DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
98 | { DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
99 | { DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY }, | ||
100 | { IIC0_ALI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
101 | { IIC0_TACKI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
102 | { IIC0_WAITI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
103 | { IIC0_DTEI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
104 | { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
105 | { SIU_IRQ, SIU_IPR_ADDR, SIU_IPR_POS, SIU_PRIORITY }, | ||
106 | |||
107 | /* VIO interrupt */ | ||
108 | { CEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
109 | { BEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
110 | { VEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
111 | |||
112 | { LCDC_IRQ, LCDC_IPR_ADDR, LCDC_IPR_POS, LCDC_PRIORITY }, | ||
113 | }; | ||
114 | |||
90 | /* | 115 | /* |
91 | * Initialize IRQ setting | 116 | * Initialize IRQ setting |
92 | */ | 117 | */ |
93 | void __init | 118 | void __init |
94 | init_73180se_IRQ(void) | 119 | init_73180se_IRQ(void) |
95 | { | 120 | { |
96 | make_ipr_irq(SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY); | 121 | make_ipr_irq(se73180_siof0_ipr_map, ARRAY_SIZE(se73180_siof0_ipr_map)); |
97 | 122 | ||
98 | ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */ | 123 | ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */ |
99 | ctrl_outw(0x2000, 0xb07fffec); /* mrshpc irq enable */ | 124 | ctrl_outw(0x2000, 0xb07fffec); /* mrshpc irq enable */ |
@@ -101,27 +126,11 @@ init_73180se_IRQ(void) | |||
101 | ctrl_outw(2 << ((7 - 5) * 2), INTC_ICR1); /* low-level irq */ | 126 | ctrl_outw(2 << ((7 - 5) * 2), INTC_ICR1); /* low-level irq */ |
102 | make_intreq_irq(10); | 127 | make_intreq_irq(10); |
103 | 128 | ||
104 | make_ipr_irq(VPU_IRQ, VPU_IPR_ADDR, VPU_IPR_POS, 8); | 129 | make_ipr_irq(se73180_vpu_ipr_map, ARRAY_SIZE(se73180_vpu_ipr_map)); |
105 | 130 | ||
106 | ctrl_outb(0x0f, INTC_IMCR5); /* enable SCIF IRQ */ | 131 | ctrl_outb(0x0f, INTC_IMCR5); /* enable SCIF IRQ */ |
107 | 132 | ||
108 | make_ipr_irq(DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | 133 | make_ipr_irq(se73180_other_ipr_map, ARRAY_SIZE(se73180_other_ipr_map)); |
109 | make_ipr_irq(DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
110 | make_ipr_irq(DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY); | ||
111 | make_ipr_irq(IIC0_ALI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY); | ||
112 | make_ipr_irq(IIC0_TACKI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, | ||
113 | IIC0_PRIORITY); | ||
114 | make_ipr_irq(IIC0_WAITI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, | ||
115 | IIC0_PRIORITY); | ||
116 | make_ipr_irq(IIC0_DTEI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY); | ||
117 | make_ipr_irq(SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY); | ||
118 | make_ipr_irq(SIU_IRQ, SIU_IPR_ADDR, SIU_IPR_POS, SIU_PRIORITY); | ||
119 | |||
120 | /* VIO interrupt */ | ||
121 | make_ipr_irq(CEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
122 | make_ipr_irq(BEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
123 | make_ipr_irq(VEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
124 | 134 | ||
125 | make_ipr_irq(LCDC_IRQ, LCDC_IPR_ADDR, LCDC_IPR_POS, LCDC_PRIORITY); | ||
126 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ | 135 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ |
127 | } | 136 | } |
diff --git a/arch/sh/boards/se/7343/irq.c b/arch/sh/boards/se/7343/irq.c index 288b62f59419..360153ecc55b 100644 --- a/arch/sh/boards/se/7343/irq.c +++ b/arch/sh/boards/se/7343/irq.c | |||
@@ -102,6 +102,51 @@ shmse_irq_demux(int irq) | |||
102 | static struct irqaction irq5 = { no_action, 0, CPU_MASK_NONE, "IRQ5-cascade", | 102 | static struct irqaction irq5 = { no_action, 0, CPU_MASK_NONE, "IRQ5-cascade", |
103 | NULL, NULL}; | 103 | NULL, NULL}; |
104 | 104 | ||
105 | static struct ipr_data se7343_irq5_ipr_map[] = { | ||
106 | { IRQ5_IRQ, IRQ5_IPR_ADDR+2, IRQ5_IPR_POS, IRQ5_PRIORITY }, | ||
107 | }; | ||
108 | static struct ipr_data se7343_siof0_vpu_ipr_map[] = { | ||
109 | { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
110 | { VPU_IRQ, VPU_IPR_ADDR, VPU_IPR_POS, 8 }, | ||
111 | }; | ||
112 | static struct ipr_data se7343_other_ipr_map[] = { | ||
113 | { DMTE0_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
114 | { DMTE1_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
115 | { DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
116 | { DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
117 | { DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY }, | ||
118 | { DMTE5_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY }, | ||
119 | |||
120 | /* I2C block */ | ||
121 | { IIC0_ALI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
122 | { IIC0_TACKI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
123 | { IIC0_WAITI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
124 | { IIC0_DTEI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
125 | |||
126 | { IIC1_ALI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY }, | ||
127 | { IIC1_TACKI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY }, | ||
128 | { IIC1_WAITI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY }, | ||
129 | { IIC1_DTEI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY }, | ||
130 | |||
131 | /* SIOF */ | ||
132 | { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
133 | |||
134 | /* SIU */ | ||
135 | { SIU_IRQ, SIU_IPR_ADDR, SIU_IPR_POS, SIU_PRIORITY }, | ||
136 | |||
137 | /* VIO interrupt */ | ||
138 | { CEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
139 | { BEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
140 | { VEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
141 | |||
142 | /*MFI interrupt*/ | ||
143 | |||
144 | { MFI_IRQ, MFI_IPR_ADDR, MFI_IPR_POS, MFI_PRIORITY }, | ||
145 | |||
146 | /* LCD controller */ | ||
147 | { LCDC_IRQ, LCDC_IPR_ADDR, LCDC_IPR_POS, LCDC_PRIORITY }, | ||
148 | }; | ||
149 | |||
105 | /* | 150 | /* |
106 | * Initialize IRQ setting | 151 | * Initialize IRQ setting |
107 | */ | 152 | */ |
@@ -138,54 +183,17 @@ init_7343se_IRQ(void) | |||
138 | /* Setup all external interrupts to be active low */ | 183 | /* Setup all external interrupts to be active low */ |
139 | ctrl_outw(0xaaaa, INTC_ICR1); | 184 | ctrl_outw(0xaaaa, INTC_ICR1); |
140 | 185 | ||
141 | make_ipr_irq(IRQ5_IRQ, IRQ5_IPR_ADDR+2, IRQ5_IPR_POS, IRQ5_PRIORITY); | 186 | make_ipr_irq(se7343_irq5_ipr_map, ARRAY_SIZE(se7343_irq5_ipr_map)); |
187 | |||
142 | setup_irq(IRQ5_IRQ, &irq5); | 188 | setup_irq(IRQ5_IRQ, &irq5); |
143 | /* Set port control to use IRQ5 */ | 189 | /* Set port control to use IRQ5 */ |
144 | *(u16 *)0xA4050108 &= ~0xc; | 190 | *(u16 *)0xA4050108 &= ~0xc; |
145 | 191 | ||
146 | make_ipr_irq(SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY); | 192 | make_ipr_irq(se7343_siof0_vpu_ipr_map, ARRAY_SIZE(se7343_siof0_vpu_ipr_map)); |
147 | make_ipr_irq(VPU_IRQ, VPU_IPR_ADDR, VPU_IPR_POS, 8); | ||
148 | 193 | ||
149 | ctrl_outb(0x0f, INTC_IMCR5); /* enable SCIF IRQ */ | 194 | ctrl_outb(0x0f, INTC_IMCR5); /* enable SCIF IRQ */ |
150 | 195 | ||
151 | make_ipr_irq(DMTE0_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | 196 | make_ipr_irq(se7343_other_ipr_map, ARRAY_SIZE(se7343_other_ipr_map)); |
152 | make_ipr_irq(DMTE1_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
153 | make_ipr_irq(DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
154 | make_ipr_irq(DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
155 | make_ipr_irq(DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY); | ||
156 | make_ipr_irq(DMTE5_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY); | ||
157 | |||
158 | /* I2C block */ | ||
159 | make_ipr_irq(IIC0_ALI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY); | ||
160 | make_ipr_irq(IIC0_TACKI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, | ||
161 | IIC0_PRIORITY); | ||
162 | make_ipr_irq(IIC0_WAITI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, | ||
163 | IIC0_PRIORITY); | ||
164 | make_ipr_irq(IIC0_DTEI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY); | ||
165 | |||
166 | make_ipr_irq(IIC1_ALI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY); | ||
167 | make_ipr_irq(IIC1_TACKI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, | ||
168 | IIC1_PRIORITY); | ||
169 | make_ipr_irq(IIC1_WAITI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, | ||
170 | IIC1_PRIORITY); | ||
171 | make_ipr_irq(IIC1_DTEI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY); | ||
172 | |||
173 | /* SIOF */ | ||
174 | make_ipr_irq(SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY); | ||
175 | 197 | ||
176 | /* SIU */ | ||
177 | make_ipr_irq(SIU_IRQ, SIU_IPR_ADDR, SIU_IPR_POS, SIU_PRIORITY); | ||
178 | |||
179 | /* VIO interrupt */ | ||
180 | make_ipr_irq(CEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
181 | make_ipr_irq(BEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
182 | make_ipr_irq(VEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
183 | |||
184 | /*MFI interrupt*/ | ||
185 | |||
186 | make_ipr_irq(MFI_IRQ, MFI_IPR_ADDR, MFI_IPR_POS, MFI_PRIORITY); | ||
187 | |||
188 | /* LCD controller */ | ||
189 | make_ipr_irq(LCDC_IRQ, LCDC_IPR_ADDR, LCDC_IPR_POS, LCDC_PRIORITY); | ||
190 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ | 198 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ |
191 | } | 199 | } |
diff --git a/arch/sh/boards/se/770x/irq.c b/arch/sh/boards/se/770x/irq.c index cff6700bbafd..fcd7cd7fa05f 100644 --- a/arch/sh/boards/se/770x/irq.c +++ b/arch/sh/boards/se/770x/irq.c | |||
@@ -13,6 +13,48 @@ | |||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/se.h> | 14 | #include <asm/se.h> |
15 | 15 | ||
16 | static struct ipr_data se770x_ipr_map[] = { | ||
17 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
18 | /* This is default value */ | ||
19 | { 0xf-0x2, BCR_ILCRA, 2, 0x2 }, | ||
20 | { 0xf-0xa, BCR_ILCRA, 1, 0xa }, | ||
21 | { 0xf-0x5, BCR_ILCRB, 0, 0x5 }, | ||
22 | { 0xf-0x8, BCR_ILCRC, 1, 0x8 }, | ||
23 | { 0xf-0xc, BCR_ILCRC, 0, 0xc }, | ||
24 | { 0xf-0xe, BCR_ILCRD, 3, 0xe }, | ||
25 | { 0xf-0x3, BCR_ILCRD, 1, 0x3 }, /* LAN */ | ||
26 | { 0xf-0xd, BCR_ILCRE, 2, 0xd }, | ||
27 | { 0xf-0x9, BCR_ILCRE, 1, 0x9 }, | ||
28 | { 0xf-0x1, BCR_ILCRE, 0, 0x1 }, | ||
29 | { 0xf-0xf, BCR_ILCRF, 3, 0xf }, | ||
30 | { 0xf-0xb, BCR_ILCRF, 1, 0xb }, | ||
31 | { 0xf-0x7, BCR_ILCRG, 3, 0x7 }, | ||
32 | { 0xf-0x6, BCR_ILCRG, 2, 0x6 }, | ||
33 | { 0xf-0x4, BCR_ILCRG, 1, 0x4 }, | ||
34 | #else | ||
35 | { 14, BCR_ILCRA, 2, 0x0f-14 }, | ||
36 | { 12, BCR_ILCRA, 1, 0x0f-12 }, | ||
37 | { 8, BCR_ILCRB, 1, 0x0f- 8 }, | ||
38 | { 6, BCR_ILCRC, 3, 0x0f- 6 }, | ||
39 | { 5, BCR_ILCRC, 2, 0x0f- 5 }, | ||
40 | { 4, BCR_ILCRC, 1, 0x0f- 4 }, | ||
41 | { 3, BCR_ILCRC, 0, 0x0f- 3 }, | ||
42 | { 1, BCR_ILCRD, 3, 0x0f- 1 }, | ||
43 | |||
44 | { 10, BCR_ILCRD, 1, 0x0f-10 }, /* LAN */ | ||
45 | |||
46 | { 0, BCR_ILCRE, 3, 0x0f- 0 }, /* PCIRQ3 */ | ||
47 | { 11, BCR_ILCRE, 2, 0x0f-11 }, /* PCIRQ2 */ | ||
48 | { 9, BCR_ILCRE, 1, 0x0f- 9 }, /* PCIRQ1 */ | ||
49 | { 7, BCR_ILCRE, 0, 0x0f- 7 }, /* PCIRQ0 */ | ||
50 | |||
51 | /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ | ||
52 | /* NOTE: #2 and #13 are not used on PC */ | ||
53 | { 13, BCR_ILCRG, 1, 0x0f-13 }, /* SLOTIRQ2 */ | ||
54 | { 2, BCR_ILCRG, 0, 0x0f- 2 }, /* SLOTIRQ1 */ | ||
55 | #endif | ||
56 | }; | ||
57 | |||
16 | /* | 58 | /* |
17 | * Initialize IRQ setting | 59 | * Initialize IRQ setting |
18 | */ | 60 | */ |
@@ -38,42 +80,6 @@ void __init init_se_IRQ(void) | |||
38 | ctrl_outw(0, BCR_ILCRE); | 80 | ctrl_outw(0, BCR_ILCRE); |
39 | ctrl_outw(0, BCR_ILCRF); | 81 | ctrl_outw(0, BCR_ILCRF); |
40 | ctrl_outw(0, BCR_ILCRG); | 82 | ctrl_outw(0, BCR_ILCRG); |
41 | /* This is default value */ | ||
42 | make_ipr_irq(0xf-0x2, BCR_ILCRA, 2, 0x2); | ||
43 | make_ipr_irq(0xf-0xa, BCR_ILCRA, 1, 0xa); | ||
44 | make_ipr_irq(0xf-0x5, BCR_ILCRB, 0, 0x5); | ||
45 | make_ipr_irq(0xf-0x8, BCR_ILCRC, 1, 0x8); | ||
46 | make_ipr_irq(0xf-0xc, BCR_ILCRC, 0, 0xc); | ||
47 | make_ipr_irq(0xf-0xe, BCR_ILCRD, 3, 0xe); | ||
48 | make_ipr_irq(0xf-0x3, BCR_ILCRD, 1, 0x3); /* LAN */ | ||
49 | make_ipr_irq(0xf-0xd, BCR_ILCRE, 2, 0xd); | ||
50 | make_ipr_irq(0xf-0x9, BCR_ILCRE, 1, 0x9); | ||
51 | make_ipr_irq(0xf-0x1, BCR_ILCRE, 0, 0x1); | ||
52 | make_ipr_irq(0xf-0xf, BCR_ILCRF, 3, 0xf); | ||
53 | make_ipr_irq(0xf-0xb, BCR_ILCRF, 1, 0xb); | ||
54 | make_ipr_irq(0xf-0x7, BCR_ILCRG, 3, 0x7); | ||
55 | make_ipr_irq(0xf-0x6, BCR_ILCRG, 2, 0x6); | ||
56 | make_ipr_irq(0xf-0x4, BCR_ILCRG, 1, 0x4); | ||
57 | #else | ||
58 | make_ipr_irq(14, BCR_ILCRA, 2, 0x0f-14); | ||
59 | make_ipr_irq(12, BCR_ILCRA, 1, 0x0f-12); | ||
60 | make_ipr_irq( 8, BCR_ILCRB, 1, 0x0f- 8); | ||
61 | make_ipr_irq( 6, BCR_ILCRC, 3, 0x0f- 6); | ||
62 | make_ipr_irq( 5, BCR_ILCRC, 2, 0x0f- 5); | ||
63 | make_ipr_irq( 4, BCR_ILCRC, 1, 0x0f- 4); | ||
64 | make_ipr_irq( 3, BCR_ILCRC, 0, 0x0f- 3); | ||
65 | make_ipr_irq( 1, BCR_ILCRD, 3, 0x0f- 1); | ||
66 | |||
67 | make_ipr_irq(10, BCR_ILCRD, 1, 0x0f-10); /* LAN */ | ||
68 | |||
69 | make_ipr_irq( 0, BCR_ILCRE, 3, 0x0f- 0); /* PCIRQ3 */ | ||
70 | make_ipr_irq(11, BCR_ILCRE, 2, 0x0f-11); /* PCIRQ2 */ | ||
71 | make_ipr_irq( 9, BCR_ILCRE, 1, 0x0f- 9); /* PCIRQ1 */ | ||
72 | make_ipr_irq( 7, BCR_ILCRE, 0, 0x0f- 7); /* PCIRQ0 */ | ||
73 | |||
74 | /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ | ||
75 | /* NOTE: #2 and #13 are not used on PC */ | ||
76 | make_ipr_irq(13, BCR_ILCRG, 1, 0x0f-13); /* SLOTIRQ2 */ | ||
77 | make_ipr_irq( 2, BCR_ILCRG, 0, 0x0f- 2); /* SLOTIRQ1 */ | ||
78 | #endif | 83 | #endif |
84 | make_ipr_irq(se770x_ipr_map, ARRAY_SIZE(se770x_ipr_map)); | ||
79 | } | 85 | } |
diff --git a/arch/sh/boards/se/7751/irq.c b/arch/sh/boards/se/7751/irq.c index c607b0a48479..e4c63a48296c 100644 --- a/arch/sh/boards/se/7751/irq.c +++ b/arch/sh/boards/se/7751/irq.c | |||
@@ -14,53 +14,50 @@ | |||
14 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
15 | #include <asm/se7751.h> | 15 | #include <asm/se7751.h> |
16 | 16 | ||
17 | /* | 17 | static struct ipr_data se7751_ipr_map[] = { |
18 | * Initialize IRQ setting | ||
19 | */ | ||
20 | void __init init_7751se_IRQ(void) | ||
21 | { | ||
22 | |||
23 | /* Leave old Solution Engine code in for reference. */ | 18 | /* Leave old Solution Engine code in for reference. */ |
24 | #if defined(CONFIG_SH_SOLUTION_ENGINE) | 19 | #if defined(CONFIG_SH_SOLUTION_ENGINE) |
25 | /* | 20 | /* |
26 | * Super I/O (Just mimic PC): | 21 | * Super I/O (Just mimic PC): |
27 | * 1: keyboard | 22 | * 1: keyboard |
28 | * 3: serial 0 | 23 | * 3: serial 0 |
29 | * 4: serial 1 | 24 | * 4: serial 1 |
30 | * 5: printer | 25 | * 5: printer |
31 | * 6: floppy | 26 | * 6: floppy |
32 | * 8: rtc | 27 | * 8: rtc |
33 | * 12: mouse | 28 | * 12: mouse |
34 | * 14: ide0 | 29 | * 14: ide0 |
35 | */ | 30 | */ |
36 | make_ipr_irq(14, BCR_ILCRA, 2, 0x0f-14); | 31 | { 14, BCR_ILCRA, 2, 0x0f-14 }, |
37 | make_ipr_irq(12, BCR_ILCRA, 1, 0x0f-12); | 32 | { 12, BCR_ILCRA, 1, 0x0f-12 }, |
38 | make_ipr_irq( 8, BCR_ILCRB, 1, 0x0f- 8); | 33 | { 8, BCR_ILCRB, 1, 0x0f- 8 }, |
39 | make_ipr_irq( 6, BCR_ILCRC, 3, 0x0f- 6); | 34 | { 6, BCR_ILCRC, 3, 0x0f- 6 }, |
40 | make_ipr_irq( 5, BCR_ILCRC, 2, 0x0f- 5); | 35 | { 5, BCR_ILCRC, 2, 0x0f- 5 }, |
41 | make_ipr_irq( 4, BCR_ILCRC, 1, 0x0f- 4); | 36 | { 4, BCR_ILCRC, 1, 0x0f- 4 }, |
42 | make_ipr_irq( 3, BCR_ILCRC, 0, 0x0f- 3); | 37 | { 3, BCR_ILCRC, 0, 0x0f- 3 }, |
43 | make_ipr_irq( 1, BCR_ILCRD, 3, 0x0f- 1); | 38 | { 1, BCR_ILCRD, 3, 0x0f- 1 }, |
44 | 39 | ||
45 | make_ipr_irq(10, BCR_ILCRD, 1, 0x0f-10); /* LAN */ | 40 | { 10, BCR_ILCRD, 1, 0x0f-10 }, /* LAN */ |
46 | 41 | ||
47 | make_ipr_irq( 0, BCR_ILCRE, 3, 0x0f- 0); /* PCIRQ3 */ | 42 | { 0, BCR_ILCRE, 3, 0x0f- 0 }, /* PCIRQ3 */ |
48 | make_ipr_irq(11, BCR_ILCRE, 2, 0x0f-11); /* PCIRQ2 */ | 43 | { 11, BCR_ILCRE, 2, 0x0f-11 }, /* PCIRQ2 */ |
49 | make_ipr_irq( 9, BCR_ILCRE, 1, 0x0f- 9); /* PCIRQ1 */ | 44 | { 9, BCR_ILCRE, 1, 0x0f- 9 }, /* PCIRQ1 */ |
50 | make_ipr_irq( 7, BCR_ILCRE, 0, 0x0f- 7); /* PCIRQ0 */ | 45 | { 7, BCR_ILCRE, 0, 0x0f- 7 }, /* PCIRQ0 */ |
51 | 46 | ||
52 | /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ | 47 | /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ |
53 | /* NOTE: #2 and #13 are not used on PC */ | 48 | /* NOTE: #2 and #13 are not used on PC */ |
54 | make_ipr_irq(13, BCR_ILCRG, 1, 0x0f-13); /* SLOTIRQ2 */ | 49 | { 13, BCR_ILCRG, 1, 0x0f-13 }, /* SLOTIRQ2 */ |
55 | make_ipr_irq( 2, BCR_ILCRG, 0, 0x0f- 2); /* SLOTIRQ1 */ | 50 | { 2, BCR_ILCRG, 0, 0x0f- 2 }, /* SLOTIRQ1 */ |
56 | |||
57 | #elif defined(CONFIG_SH_7751_SOLUTION_ENGINE) | 51 | #elif defined(CONFIG_SH_7751_SOLUTION_ENGINE) |
58 | 52 | { 13, BCR_ILCRD, 3, 2 }, | |
59 | make_ipr_irq(13, BCR_ILCRD, 3, 2); | 53 | /* Add additional entries here as drivers are added and tested. */ |
60 | |||
61 | /* Add additional calls to make_ipr_irq() as drivers are added | ||
62 | * and tested. | ||
63 | */ | ||
64 | #endif | 54 | #endif |
55 | }; | ||
65 | 56 | ||
57 | /* | ||
58 | * Initialize IRQ setting | ||
59 | */ | ||
60 | void __init init_7751se_IRQ(void) | ||
61 | { | ||
62 | make_ipr_irq(se7751_ipr_map, ARRAY_SIZE(se7751_ipr_map)); | ||
66 | } | 63 | } |
diff --git a/arch/sh/boards/sh03/setup.c b/arch/sh/boards/sh03/setup.c index 137e2ba9243e..5ad1e19771be 100644 --- a/arch/sh/boards/sh03/setup.c +++ b/arch/sh/boards/sh03/setup.c | |||
@@ -14,14 +14,17 @@ | |||
14 | #include <asm/sh03/sh03.h> | 14 | #include <asm/sh03/sh03.h> |
15 | #include <asm/addrspace.h> | 15 | #include <asm/addrspace.h> |
16 | 16 | ||
17 | static struct ipr_data sh03_ipr_map[] = { | ||
18 | { IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY }, | ||
19 | { IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY }, | ||
20 | { IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY }, | ||
21 | { IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY }, | ||
22 | }; | ||
23 | |||
17 | static void __init init_sh03_IRQ(void) | 24 | static void __init init_sh03_IRQ(void) |
18 | { | 25 | { |
19 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); | 26 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); |
20 | 27 | make_ipr_irq(sh03_ipr_map, ARRAY_SIZE(sh03_ipr_map)); | |
21 | make_ipr_irq(IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY); | ||
22 | make_ipr_irq(IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY); | ||
23 | make_ipr_irq(IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY); | ||
24 | make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); | ||
25 | } | 28 | } |
26 | 29 | ||
27 | extern void *cf_io_base; | 30 | extern void *cf_io_base; |
diff --git a/arch/sh/boards/snapgear/setup.c b/arch/sh/boards/snapgear/setup.c index 540d0bf16446..650fb3645947 100644 --- a/arch/sh/boards/snapgear/setup.c +++ b/arch/sh/boards/snapgear/setup.c | |||
@@ -68,6 +68,13 @@ module_init(eraseconfig_init); | |||
68 | * IRL3 = crypto | 68 | * IRL3 = crypto |
69 | */ | 69 | */ |
70 | 70 | ||
71 | static struct ipr_data snapgear_ipr_map[] = { | ||
72 | make_ipr_irq(IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY); | ||
73 | make_ipr_irq(IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY); | ||
74 | make_ipr_irq(IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY); | ||
75 | make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); | ||
76 | }; | ||
77 | |||
71 | static void __init init_snapgear_IRQ(void) | 78 | static void __init init_snapgear_IRQ(void) |
72 | { | 79 | { |
73 | /* enable individual interrupt mode for externals */ | 80 | /* enable individual interrupt mode for externals */ |
@@ -75,10 +82,7 @@ static void __init init_snapgear_IRQ(void) | |||
75 | 82 | ||
76 | printk("Setup SnapGear IRQ/IPR ...\n"); | 83 | printk("Setup SnapGear IRQ/IPR ...\n"); |
77 | 84 | ||
78 | make_ipr_irq(IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY); | 85 | make_ipr_irq(snapgear_ipr_map, ARRAY_SIZE(snapgear_ipr_map)); |
79 | make_ipr_irq(IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY); | ||
80 | make_ipr_irq(IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY); | ||
81 | make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); | ||
82 | } | 86 | } |
83 | 87 | ||
84 | /* | 88 | /* |
diff --git a/arch/sh/boards/titan/setup.c b/arch/sh/boards/titan/setup.c index 52b66d8b8d2a..a6046d93758b 100644 --- a/arch/sh/boards/titan/setup.c +++ b/arch/sh/boards/titan/setup.c | |||
@@ -9,15 +9,19 @@ | |||
9 | 9 | ||
10 | extern void __init pcibios_init_platform(void); | 10 | extern void __init pcibios_init_platform(void); |
11 | 11 | ||
12 | static struct ipr_data titan_ipr_map[] = { | ||
13 | { TITAN_IRQ_WAN, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY }, | ||
14 | { TITAN_IRQ_LAN, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY }, | ||
15 | { TITAN_IRQ_MPCIA, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY }, | ||
16 | { TITAN_IRQ_USB, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY }, | ||
17 | }; | ||
18 | |||
12 | static void __init init_titan_irq(void) | 19 | static void __init init_titan_irq(void) |
13 | { | 20 | { |
14 | /* enable individual interrupt mode for externals */ | 21 | /* enable individual interrupt mode for externals */ |
15 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); | 22 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); |
16 | 23 | ||
17 | make_ipr_irq( TITAN_IRQ_WAN, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY); /* PCIRQ0 */ | 24 | make_ipr_irq(titan_ipr_map, ARRAY_SIZE(titan_ipr_map)); |
18 | make_ipr_irq( TITAN_IRQ_LAN, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY); /* PCIRQ1 */ | ||
19 | make_ipr_irq( TITAN_IRQ_MPCIA, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY); /* PCIRQ2 */ | ||
20 | make_ipr_irq( TITAN_IRQ_USB, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); /* PCIRQ3 */ | ||
21 | } | 25 | } |
22 | 26 | ||
23 | struct sh_machine_vector mv_titan __initmv = { | 27 | struct sh_machine_vector mv_titan __initmv = { |
diff --git a/arch/sh/configs/r7780rp_defconfig b/arch/sh/configs/r7780rp_defconfig index 2470364948e7..34e2046c3213 100644 --- a/arch/sh/configs/r7780rp_defconfig +++ b/arch/sh/configs/r7780rp_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.18 | 3 | # Linux kernel version: 2.6.19-rc3 |
4 | # Tue Oct 3 11:32:47 2006 | 4 | # Tue Oct 31 12:32:06 2006 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
@@ -10,6 +10,7 @@ CONFIG_GENERIC_HWEIGHT=y | |||
10 | CONFIG_GENERIC_HARDIRQS=y | 10 | CONFIG_GENERIC_HARDIRQS=y |
11 | CONFIG_GENERIC_IRQ_PROBE=y | 11 | CONFIG_GENERIC_IRQ_PROBE=y |
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 12 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
13 | # CONFIG_GENERIC_TIME is not set | ||
13 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 14 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
14 | 15 | ||
15 | # | 16 | # |
@@ -178,7 +179,7 @@ CONFIG_MMU=y | |||
178 | CONFIG_PAGE_OFFSET=0x80000000 | 179 | CONFIG_PAGE_OFFSET=0x80000000 |
179 | CONFIG_MEMORY_START=0x08000000 | 180 | CONFIG_MEMORY_START=0x08000000 |
180 | CONFIG_MEMORY_SIZE=0x08000000 | 181 | CONFIG_MEMORY_SIZE=0x08000000 |
181 | CONFIG_32BIT=y | 182 | # CONFIG_32BIT is not set |
182 | CONFIG_VSYSCALL=y | 183 | CONFIG_VSYSCALL=y |
183 | CONFIG_HUGETLB_PAGE_SIZE_64K=y | 184 | CONFIG_HUGETLB_PAGE_SIZE_64K=y |
184 | # CONFIG_HUGETLB_PAGE_SIZE_1MB is not set | 185 | # CONFIG_HUGETLB_PAGE_SIZE_1MB is not set |
@@ -229,9 +230,7 @@ CONFIG_SH_PCLK_FREQ=32000000 | |||
229 | # | 230 | # |
230 | # DMA support | 231 | # DMA support |
231 | # | 232 | # |
232 | CONFIG_SH_DMA=y | 233 | # CONFIG_SH_DMA is not set |
233 | CONFIG_NR_ONCHIP_DMA_CHANNELS=6 | ||
234 | # CONFIG_NR_DMA_CHANNELS_BOOL is not set | ||
235 | 234 | ||
236 | # | 235 | # |
237 | # Companion Chips | 236 | # Companion Chips |
@@ -259,7 +258,7 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000 | |||
259 | CONFIG_BOOT_LINK_OFFSET=0x00800000 | 258 | CONFIG_BOOT_LINK_OFFSET=0x00800000 |
260 | # CONFIG_UBC_WAKEUP is not set | 259 | # CONFIG_UBC_WAKEUP is not set |
261 | CONFIG_CMDLINE_BOOL=y | 260 | CONFIG_CMDLINE_BOOL=y |
262 | CONFIG_CMDLINE="mem=128M console=ttySC0,115200 root=/dev/hda1" | 261 | CONFIG_CMDLINE="mem=128M console=ttySC0,115200 root=/dev/sda1" |
263 | 262 | ||
264 | # | 263 | # |
265 | # Bus options | 264 | # Bus options |
@@ -336,6 +335,7 @@ CONFIG_IP_PNP_DHCP=y | |||
336 | # CONFIG_INET_TUNNEL is not set | 335 | # CONFIG_INET_TUNNEL is not set |
337 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 336 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
338 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 337 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
338 | CONFIG_INET_XFRM_MODE_BEET=y | ||
339 | CONFIG_INET_DIAG=y | 339 | CONFIG_INET_DIAG=y |
340 | CONFIG_INET_TCP_DIAG=y | 340 | CONFIG_INET_TCP_DIAG=y |
341 | # CONFIG_TCP_CONG_ADVANCED is not set | 341 | # CONFIG_TCP_CONG_ADVANCED is not set |
@@ -441,76 +441,28 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
441 | # CONFIG_ATA_OVER_ETH is not set | 441 | # CONFIG_ATA_OVER_ETH is not set |
442 | 442 | ||
443 | # | 443 | # |
444 | # Misc devices | ||
445 | # | ||
446 | # CONFIG_SGI_IOC4 is not set | ||
447 | # CONFIG_TIFM_CORE is not set | ||
448 | |||
449 | # | ||
444 | # ATA/ATAPI/MFM/RLL support | 450 | # ATA/ATAPI/MFM/RLL support |
445 | # | 451 | # |
446 | CONFIG_IDE=m | 452 | # CONFIG_IDE is not set |
447 | CONFIG_IDE_MAX_HWIFS=4 | ||
448 | CONFIG_BLK_DEV_IDE=m | ||
449 | |||
450 | # | ||
451 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
452 | # | ||
453 | CONFIG_BLK_DEV_IDE_SATA=y | ||
454 | CONFIG_BLK_DEV_IDEDISK=m | ||
455 | CONFIG_IDEDISK_MULTI_MODE=y | ||
456 | # CONFIG_BLK_DEV_IDECD is not set | ||
457 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
458 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
459 | CONFIG_BLK_DEV_IDESCSI=m | ||
460 | # CONFIG_IDE_TASK_IOCTL is not set | ||
461 | |||
462 | # | ||
463 | # IDE chipset support/bugfixes | ||
464 | # | ||
465 | CONFIG_IDE_GENERIC=m | ||
466 | CONFIG_BLK_DEV_IDEPCI=y | ||
467 | CONFIG_IDEPCI_SHARE_IRQ=y | ||
468 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
469 | CONFIG_BLK_DEV_GENERIC=m | ||
470 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
471 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
472 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
473 | CONFIG_IDEDMA_PCI_AUTO=y | ||
474 | # CONFIG_IDEDMA_ONLYDISK is not set | ||
475 | CONFIG_BLK_DEV_AEC62XX=m | ||
476 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
477 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
478 | # CONFIG_BLK_DEV_CMD64X is not set | ||
479 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
480 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
481 | # CONFIG_BLK_DEV_CS5520 is not set | ||
482 | # CONFIG_BLK_DEV_CS5530 is not set | ||
483 | # CONFIG_BLK_DEV_HPT34X is not set | ||
484 | # CONFIG_BLK_DEV_HPT366 is not set | ||
485 | # CONFIG_BLK_DEV_SC1200 is not set | ||
486 | # CONFIG_BLK_DEV_PIIX is not set | ||
487 | # CONFIG_BLK_DEV_IT821X is not set | ||
488 | # CONFIG_BLK_DEV_NS87415 is not set | ||
489 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
490 | CONFIG_BLK_DEV_PDC202XX_NEW=m | ||
491 | # CONFIG_BLK_DEV_SVWKS is not set | ||
492 | CONFIG_BLK_DEV_SIIMAGE=m | ||
493 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
494 | # CONFIG_BLK_DEV_TRM290 is not set | ||
495 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
496 | # CONFIG_IDE_ARM is not set | ||
497 | CONFIG_BLK_DEV_IDEDMA=y | ||
498 | # CONFIG_IDEDMA_IVB is not set | ||
499 | CONFIG_IDEDMA_AUTO=y | ||
500 | # CONFIG_BLK_DEV_HD is not set | ||
501 | 453 | ||
502 | # | 454 | # |
503 | # SCSI device support | 455 | # SCSI device support |
504 | # | 456 | # |
505 | # CONFIG_RAID_ATTRS is not set | 457 | # CONFIG_RAID_ATTRS is not set |
506 | CONFIG_SCSI=m | 458 | CONFIG_SCSI=y |
507 | # CONFIG_SCSI_NETLINK is not set | 459 | # CONFIG_SCSI_NETLINK is not set |
508 | CONFIG_SCSI_PROC_FS=y | 460 | CONFIG_SCSI_PROC_FS=y |
509 | 461 | ||
510 | # | 462 | # |
511 | # SCSI support type (disk, tape, CD-ROM) | 463 | # SCSI support type (disk, tape, CD-ROM) |
512 | # | 464 | # |
513 | CONFIG_BLK_DEV_SD=m | 465 | CONFIG_BLK_DEV_SD=y |
514 | # CONFIG_CHR_DEV_ST is not set | 466 | # CONFIG_CHR_DEV_ST is not set |
515 | # CONFIG_CHR_DEV_OSST is not set | 467 | # CONFIG_CHR_DEV_OSST is not set |
516 | # CONFIG_BLK_DEV_SR is not set | 468 | # CONFIG_BLK_DEV_SR is not set |
@@ -561,6 +513,7 @@ CONFIG_CHR_DEV_SG=m | |||
561 | # CONFIG_SCSI_IPR is not set | 513 | # CONFIG_SCSI_IPR is not set |
562 | # CONFIG_SCSI_QLOGIC_1280 is not set | 514 | # CONFIG_SCSI_QLOGIC_1280 is not set |
563 | # CONFIG_SCSI_QLA_FC is not set | 515 | # CONFIG_SCSI_QLA_FC is not set |
516 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
564 | # CONFIG_SCSI_LPFC is not set | 517 | # CONFIG_SCSI_LPFC is not set |
565 | # CONFIG_SCSI_DC395x is not set | 518 | # CONFIG_SCSI_DC395x is not set |
566 | # CONFIG_SCSI_DC390T is not set | 519 | # CONFIG_SCSI_DC390T is not set |
@@ -570,7 +523,55 @@ CONFIG_CHR_DEV_SG=m | |||
570 | # | 523 | # |
571 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | 524 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
572 | # | 525 | # |
573 | # CONFIG_ATA is not set | 526 | CONFIG_ATA=y |
527 | # CONFIG_SATA_AHCI is not set | ||
528 | # CONFIG_SATA_SVW is not set | ||
529 | # CONFIG_ATA_PIIX is not set | ||
530 | # CONFIG_SATA_MV is not set | ||
531 | # CONFIG_SATA_NV is not set | ||
532 | # CONFIG_PDC_ADMA is not set | ||
533 | # CONFIG_SATA_QSTOR is not set | ||
534 | # CONFIG_SATA_PROMISE is not set | ||
535 | # CONFIG_SATA_SX4 is not set | ||
536 | CONFIG_SATA_SIL=y | ||
537 | # CONFIG_SATA_SIL24 is not set | ||
538 | # CONFIG_SATA_SIS is not set | ||
539 | # CONFIG_SATA_ULI is not set | ||
540 | # CONFIG_SATA_VIA is not set | ||
541 | # CONFIG_SATA_VITESSE is not set | ||
542 | # CONFIG_PATA_ALI is not set | ||
543 | # CONFIG_PATA_AMD is not set | ||
544 | # CONFIG_PATA_ARTOP is not set | ||
545 | # CONFIG_PATA_ATIIXP is not set | ||
546 | # CONFIG_PATA_CMD64X is not set | ||
547 | # CONFIG_PATA_CS5520 is not set | ||
548 | # CONFIG_PATA_CS5530 is not set | ||
549 | # CONFIG_PATA_CYPRESS is not set | ||
550 | # CONFIG_PATA_EFAR is not set | ||
551 | # CONFIG_ATA_GENERIC is not set | ||
552 | # CONFIG_PATA_HPT366 is not set | ||
553 | # CONFIG_PATA_HPT37X is not set | ||
554 | # CONFIG_PATA_HPT3X2N is not set | ||
555 | # CONFIG_PATA_HPT3X3 is not set | ||
556 | # CONFIG_PATA_IT821X is not set | ||
557 | # CONFIG_PATA_JMICRON is not set | ||
558 | # CONFIG_PATA_TRIFLEX is not set | ||
559 | # CONFIG_PATA_MPIIX is not set | ||
560 | # CONFIG_PATA_OLDPIIX is not set | ||
561 | # CONFIG_PATA_NETCELL is not set | ||
562 | # CONFIG_PATA_NS87410 is not set | ||
563 | # CONFIG_PATA_OPTI is not set | ||
564 | # CONFIG_PATA_OPTIDMA is not set | ||
565 | # CONFIG_PATA_PDC_OLD is not set | ||
566 | # CONFIG_PATA_RADISYS is not set | ||
567 | # CONFIG_PATA_RZ1000 is not set | ||
568 | # CONFIG_PATA_SC1200 is not set | ||
569 | # CONFIG_PATA_SERVERWORKS is not set | ||
570 | # CONFIG_PATA_PDC2027X is not set | ||
571 | # CONFIG_PATA_SIL680 is not set | ||
572 | # CONFIG_PATA_SIS is not set | ||
573 | # CONFIG_PATA_VIA is not set | ||
574 | # CONFIG_PATA_WINBOND is not set | ||
574 | 575 | ||
575 | # | 576 | # |
576 | # Multi-device support (RAID and LVM) | 577 | # Multi-device support (RAID and LVM) |
@@ -840,7 +841,6 @@ CONFIG_HW_RANDOM=y | |||
840 | # TPM devices | 841 | # TPM devices |
841 | # | 842 | # |
842 | # CONFIG_TCG_TPM is not set | 843 | # CONFIG_TCG_TPM is not set |
843 | # CONFIG_TELCLOCK is not set | ||
844 | 844 | ||
845 | # | 845 | # |
846 | # I2C support | 846 | # I2C support |
@@ -856,6 +856,7 @@ CONFIG_HW_RANDOM=y | |||
856 | # | 856 | # |
857 | # Dallas's 1-wire bus | 857 | # Dallas's 1-wire bus |
858 | # | 858 | # |
859 | # CONFIG_W1 is not set | ||
859 | 860 | ||
860 | # | 861 | # |
861 | # Hardware Monitoring support | 862 | # Hardware Monitoring support |
@@ -868,14 +869,9 @@ CONFIG_HWMON=y | |||
868 | # CONFIG_HWMON_DEBUG_CHIP is not set | 869 | # CONFIG_HWMON_DEBUG_CHIP is not set |
869 | 870 | ||
870 | # | 871 | # |
871 | # Misc devices | ||
872 | # | ||
873 | |||
874 | # | ||
875 | # Multimedia devices | 872 | # Multimedia devices |
876 | # | 873 | # |
877 | # CONFIG_VIDEO_DEV is not set | 874 | # CONFIG_VIDEO_DEV is not set |
878 | CONFIG_VIDEO_V4L2=y | ||
879 | 875 | ||
880 | # | 876 | # |
881 | # Digital Video Broadcasting Devices | 877 | # Digital Video Broadcasting Devices |
@@ -959,7 +955,29 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
959 | # | 955 | # |
960 | # Real Time Clock | 956 | # Real Time Clock |
961 | # | 957 | # |
962 | # CONFIG_RTC_CLASS is not set | 958 | CONFIG_RTC_LIB=y |
959 | CONFIG_RTC_CLASS=y | ||
960 | CONFIG_RTC_HCTOSYS=y | ||
961 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
962 | # CONFIG_RTC_DEBUG is not set | ||
963 | |||
964 | # | ||
965 | # RTC interfaces | ||
966 | # | ||
967 | CONFIG_RTC_INTF_SYSFS=y | ||
968 | CONFIG_RTC_INTF_PROC=y | ||
969 | CONFIG_RTC_INTF_DEV=y | ||
970 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
971 | |||
972 | # | ||
973 | # RTC drivers | ||
974 | # | ||
975 | # CONFIG_RTC_DRV_DS1553 is not set | ||
976 | # CONFIG_RTC_DRV_DS1742 is not set | ||
977 | # CONFIG_RTC_DRV_M48T86 is not set | ||
978 | CONFIG_RTC_DRV_SH=y | ||
979 | # CONFIG_RTC_DRV_TEST is not set | ||
980 | # CONFIG_RTC_DRV_V3020 is not set | ||
963 | 981 | ||
964 | # | 982 | # |
965 | # DMA Engine support | 983 | # DMA Engine support |
@@ -984,6 +1002,7 @@ CONFIG_EXT3_FS=y | |||
984 | CONFIG_EXT3_FS_XATTR=y | 1002 | CONFIG_EXT3_FS_XATTR=y |
985 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 1003 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
986 | # CONFIG_EXT3_FS_SECURITY is not set | 1004 | # CONFIG_EXT3_FS_SECURITY is not set |
1005 | # CONFIG_EXT4DEV_FS is not set | ||
987 | CONFIG_JBD=y | 1006 | CONFIG_JBD=y |
988 | # CONFIG_JBD_DEBUG is not set | 1007 | # CONFIG_JBD_DEBUG is not set |
989 | CONFIG_FS_MBCACHE=y | 1008 | CONFIG_FS_MBCACHE=y |
@@ -991,6 +1010,7 @@ CONFIG_FS_MBCACHE=y | |||
991 | # CONFIG_JFS_FS is not set | 1010 | # CONFIG_JFS_FS is not set |
992 | CONFIG_FS_POSIX_ACL=y | 1011 | CONFIG_FS_POSIX_ACL=y |
993 | # CONFIG_XFS_FS is not set | 1012 | # CONFIG_XFS_FS is not set |
1013 | # CONFIG_GFS2_FS is not set | ||
994 | # CONFIG_OCFS2_FS is not set | 1014 | # CONFIG_OCFS2_FS is not set |
995 | CONFIG_MINIX_FS=y | 1015 | CONFIG_MINIX_FS=y |
996 | # CONFIG_ROMFS_FS is not set | 1016 | # CONFIG_ROMFS_FS is not set |
@@ -1027,7 +1047,8 @@ CONFIG_PROC_FS=y | |||
1027 | CONFIG_PROC_KCORE=y | 1047 | CONFIG_PROC_KCORE=y |
1028 | CONFIG_PROC_SYSCTL=y | 1048 | CONFIG_PROC_SYSCTL=y |
1029 | CONFIG_SYSFS=y | 1049 | CONFIG_SYSFS=y |
1030 | # CONFIG_TMPFS is not set | 1050 | CONFIG_TMPFS=y |
1051 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
1031 | CONFIG_HUGETLBFS=y | 1052 | CONFIG_HUGETLBFS=y |
1032 | CONFIG_HUGETLB_PAGE=y | 1053 | CONFIG_HUGETLB_PAGE=y |
1033 | CONFIG_RAMFS=y | 1054 | CONFIG_RAMFS=y |
@@ -1159,6 +1180,7 @@ CONFIG_DEBUG_FS=y | |||
1159 | # CONFIG_DEBUG_LIST is not set | 1180 | # CONFIG_DEBUG_LIST is not set |
1160 | CONFIG_FRAME_POINTER=y | 1181 | CONFIG_FRAME_POINTER=y |
1161 | CONFIG_FORCED_INLINING=y | 1182 | CONFIG_FORCED_INLINING=y |
1183 | # CONFIG_HEADERS_CHECK is not set | ||
1162 | # CONFIG_RCU_TORTURE_TEST is not set | 1184 | # CONFIG_RCU_TORTURE_TEST is not set |
1163 | # CONFIG_SH_STANDARD_BIOS is not set | 1185 | # CONFIG_SH_STANDARD_BIOS is not set |
1164 | # CONFIG_EARLY_SCIF_CONSOLE is not set | 1186 | # CONFIG_EARLY_SCIF_CONSOLE is not set |
@@ -1178,9 +1200,9 @@ CONFIG_FORCED_INLINING=y | |||
1178 | # | 1200 | # |
1179 | CONFIG_CRYPTO=y | 1201 | CONFIG_CRYPTO=y |
1180 | CONFIG_CRYPTO_ALGAPI=y | 1202 | CONFIG_CRYPTO_ALGAPI=y |
1181 | CONFIG_CRYPTO_BLKCIPHER=m | 1203 | CONFIG_CRYPTO_BLKCIPHER=y |
1182 | CONFIG_CRYPTO_HASH=y | 1204 | CONFIG_CRYPTO_HASH=y |
1183 | CONFIG_CRYPTO_MANAGER=m | 1205 | CONFIG_CRYPTO_MANAGER=y |
1184 | CONFIG_CRYPTO_HMAC=y | 1206 | CONFIG_CRYPTO_HMAC=y |
1185 | # CONFIG_CRYPTO_NULL is not set | 1207 | # CONFIG_CRYPTO_NULL is not set |
1186 | # CONFIG_CRYPTO_MD4 is not set | 1208 | # CONFIG_CRYPTO_MD4 is not set |
@@ -1191,7 +1213,7 @@ CONFIG_CRYPTO_MD5=y | |||
1191 | # CONFIG_CRYPTO_WP512 is not set | 1213 | # CONFIG_CRYPTO_WP512 is not set |
1192 | # CONFIG_CRYPTO_TGR192 is not set | 1214 | # CONFIG_CRYPTO_TGR192 is not set |
1193 | CONFIG_CRYPTO_ECB=m | 1215 | CONFIG_CRYPTO_ECB=m |
1194 | CONFIG_CRYPTO_CBC=m | 1216 | CONFIG_CRYPTO_CBC=y |
1195 | CONFIG_CRYPTO_DES=y | 1217 | CONFIG_CRYPTO_DES=y |
1196 | # CONFIG_CRYPTO_BLOWFISH is not set | 1218 | # CONFIG_CRYPTO_BLOWFISH is not set |
1197 | # CONFIG_CRYPTO_TWOFISH is not set | 1219 | # CONFIG_CRYPTO_TWOFISH is not set |
diff --git a/arch/sh/configs/titan_defconfig b/arch/sh/configs/titan_defconfig index 5e8175461138..41049cf14b79 100644 --- a/arch/sh/configs/titan_defconfig +++ b/arch/sh/configs/titan_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.18 | 3 | # Linux kernel version: 2.6.19-rc3 |
4 | # Tue Oct 3 12:59:14 2006 | 4 | # Mon Oct 30 18:04:49 2006 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
@@ -10,6 +10,7 @@ CONFIG_GENERIC_HWEIGHT=y | |||
10 | CONFIG_GENERIC_HARDIRQS=y | 10 | CONFIG_GENERIC_HARDIRQS=y |
11 | CONFIG_GENERIC_IRQ_PROBE=y | 11 | CONFIG_GENERIC_IRQ_PROBE=y |
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 12 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
13 | # CONFIG_GENERIC_TIME is not set | ||
13 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 14 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
14 | 15 | ||
15 | # | 16 | # |
@@ -23,7 +24,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
23 | # General setup | 24 | # General setup |
24 | # | 25 | # |
25 | CONFIG_LOCALVERSION="" | 26 | CONFIG_LOCALVERSION="" |
26 | CONFIG_LOCALVERSION_AUTO=y | 27 | # CONFIG_LOCALVERSION_AUTO is not set |
27 | CONFIG_SWAP=y | 28 | CONFIG_SWAP=y |
28 | CONFIG_SYSVIPC=y | 29 | CONFIG_SYSVIPC=y |
29 | # CONFIG_IPC_NS is not set | 30 | # CONFIG_IPC_NS is not set |
@@ -236,8 +237,8 @@ CONFIG_HZ_250=y | |||
236 | CONFIG_HZ=250 | 237 | CONFIG_HZ=250 |
237 | # CONFIG_KEXEC is not set | 238 | # CONFIG_KEXEC is not set |
238 | # CONFIG_SMP is not set | 239 | # CONFIG_SMP is not set |
239 | CONFIG_PREEMPT_NONE=y | 240 | # CONFIG_PREEMPT_NONE is not set |
240 | # CONFIG_PREEMPT_VOLUNTARY is not set | 241 | CONFIG_PREEMPT_VOLUNTARY=y |
241 | # CONFIG_PREEMPT is not set | 242 | # CONFIG_PREEMPT is not set |
242 | 243 | ||
243 | # | 244 | # |
@@ -247,7 +248,7 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000 | |||
247 | CONFIG_BOOT_LINK_OFFSET=0x009e0000 | 248 | CONFIG_BOOT_LINK_OFFSET=0x009e0000 |
248 | # CONFIG_UBC_WAKEUP is not set | 249 | # CONFIG_UBC_WAKEUP is not set |
249 | CONFIG_CMDLINE_BOOL=y | 250 | CONFIG_CMDLINE_BOOL=y |
250 | CONFIG_CMDLINE="console=ttySC1,38400N81 root=/dev/nfs ip=:::::eth1:autoconf" | 251 | CONFIG_CMDLINE="console=ttySC1,38400N81 root=/dev/nfs ip=:::::eth1:autoconf rw" |
251 | 252 | ||
252 | # | 253 | # |
253 | # Bus options | 254 | # Bus options |
@@ -334,6 +335,7 @@ CONFIG_INET_XFRM_TUNNEL=y | |||
334 | CONFIG_INET_TUNNEL=y | 335 | CONFIG_INET_TUNNEL=y |
335 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 336 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
336 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 337 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
338 | CONFIG_INET_XFRM_MODE_BEET=y | ||
337 | CONFIG_INET_DIAG=m | 339 | CONFIG_INET_DIAG=m |
338 | CONFIG_INET_TCP_DIAG=m | 340 | CONFIG_INET_TCP_DIAG=m |
339 | # CONFIG_TCP_CONG_ADVANCED is not set | 341 | # CONFIG_TCP_CONG_ADVANCED is not set |
@@ -355,9 +357,10 @@ CONFIG_INET6_XFRM_TUNNEL=y | |||
355 | CONFIG_INET6_TUNNEL=y | 357 | CONFIG_INET6_TUNNEL=y |
356 | CONFIG_INET6_XFRM_MODE_TRANSPORT=y | 358 | CONFIG_INET6_XFRM_MODE_TRANSPORT=y |
357 | CONFIG_INET6_XFRM_MODE_TUNNEL=y | 359 | CONFIG_INET6_XFRM_MODE_TUNNEL=y |
360 | CONFIG_INET6_XFRM_MODE_BEET=y | ||
358 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | 361 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set |
362 | CONFIG_IPV6_SIT=m | ||
359 | CONFIG_IPV6_TUNNEL=y | 363 | CONFIG_IPV6_TUNNEL=y |
360 | # CONFIG_IPV6_SUBTREES is not set | ||
361 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | 364 | # CONFIG_IPV6_MULTIPLE_TABLES is not set |
362 | # CONFIG_NETWORK_SECMARK is not set | 365 | # CONFIG_NETWORK_SECMARK is not set |
363 | CONFIG_NETFILTER=y | 366 | CONFIG_NETFILTER=y |
@@ -714,6 +717,12 @@ CONFIG_BLK_DEV_INITRD=y | |||
714 | CONFIG_ATA_OVER_ETH=m | 717 | CONFIG_ATA_OVER_ETH=m |
715 | 718 | ||
716 | # | 719 | # |
720 | # Misc devices | ||
721 | # | ||
722 | # CONFIG_SGI_IOC4 is not set | ||
723 | # CONFIG_TIFM_CORE is not set | ||
724 | |||
725 | # | ||
717 | # ATA/ATAPI/MFM/RLL support | 726 | # ATA/ATAPI/MFM/RLL support |
718 | # | 727 | # |
719 | # CONFIG_IDE is not set | 728 | # CONFIG_IDE is not set |
@@ -778,9 +787,9 @@ CONFIG_CHR_DEV_SG=m | |||
778 | # CONFIG_SCSI_INIA100 is not set | 787 | # CONFIG_SCSI_INIA100 is not set |
779 | # CONFIG_SCSI_STEX is not set | 788 | # CONFIG_SCSI_STEX is not set |
780 | # CONFIG_SCSI_SYM53C8XX_2 is not set | 789 | # CONFIG_SCSI_SYM53C8XX_2 is not set |
781 | # CONFIG_SCSI_IPR is not set | ||
782 | # CONFIG_SCSI_QLOGIC_1280 is not set | 790 | # CONFIG_SCSI_QLOGIC_1280 is not set |
783 | # CONFIG_SCSI_QLA_FC is not set | 791 | # CONFIG_SCSI_QLA_FC is not set |
792 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
784 | # CONFIG_SCSI_LPFC is not set | 793 | # CONFIG_SCSI_LPFC is not set |
785 | # CONFIG_SCSI_DC395x is not set | 794 | # CONFIG_SCSI_DC395x is not set |
786 | # CONFIG_SCSI_DC390T is not set | 795 | # CONFIG_SCSI_DC390T is not set |
@@ -1095,7 +1104,6 @@ CONFIG_HW_RANDOM=y | |||
1095 | # TPM devices | 1104 | # TPM devices |
1096 | # | 1105 | # |
1097 | # CONFIG_TCG_TPM is not set | 1106 | # CONFIG_TCG_TPM is not set |
1098 | # CONFIG_TELCLOCK is not set | ||
1099 | 1107 | ||
1100 | # | 1108 | # |
1101 | # I2C support | 1109 | # I2C support |
@@ -1124,14 +1132,9 @@ CONFIG_HWMON=y | |||
1124 | # CONFIG_HWMON_DEBUG_CHIP is not set | 1132 | # CONFIG_HWMON_DEBUG_CHIP is not set |
1125 | 1133 | ||
1126 | # | 1134 | # |
1127 | # Misc devices | ||
1128 | # | ||
1129 | |||
1130 | # | ||
1131 | # Multimedia devices | 1135 | # Multimedia devices |
1132 | # | 1136 | # |
1133 | # CONFIG_VIDEO_DEV is not set | 1137 | # CONFIG_VIDEO_DEV is not set |
1134 | CONFIG_VIDEO_V4L2=y | ||
1135 | 1138 | ||
1136 | # | 1139 | # |
1137 | # Digital Video Broadcasting Devices | 1140 | # Digital Video Broadcasting Devices |
@@ -1177,9 +1180,9 @@ CONFIG_USB_DEVICEFS=y | |||
1177 | # USB Host Controller Drivers | 1180 | # USB Host Controller Drivers |
1178 | # | 1181 | # |
1179 | CONFIG_USB_EHCI_HCD=y | 1182 | CONFIG_USB_EHCI_HCD=y |
1180 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | 1183 | CONFIG_USB_EHCI_SPLIT_ISO=y |
1181 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 1184 | CONFIG_USB_EHCI_ROOT_HUB_TT=y |
1182 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 1185 | CONFIG_USB_EHCI_TT_NEWSCHED=y |
1183 | # CONFIG_USB_ISP116X_HCD is not set | 1186 | # CONFIG_USB_ISP116X_HCD is not set |
1184 | CONFIG_USB_OHCI_HCD=y | 1187 | CONFIG_USB_OHCI_HCD=y |
1185 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | 1188 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set |
@@ -1235,7 +1238,6 @@ CONFIG_USB_STORAGE=y | |||
1235 | # CONFIG_USB_ATI_REMOTE2 is not set | 1238 | # CONFIG_USB_ATI_REMOTE2 is not set |
1236 | # CONFIG_USB_KEYSPAN_REMOTE is not set | 1239 | # CONFIG_USB_KEYSPAN_REMOTE is not set |
1237 | # CONFIG_USB_APPLETOUCH is not set | 1240 | # CONFIG_USB_APPLETOUCH is not set |
1238 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1239 | 1241 | ||
1240 | # | 1242 | # |
1241 | # USB Imaging devices | 1243 | # USB Imaging devices |
@@ -1246,11 +1248,20 @@ CONFIG_USB_STORAGE=y | |||
1246 | # | 1248 | # |
1247 | # USB Network Adapters | 1249 | # USB Network Adapters |
1248 | # | 1250 | # |
1249 | # CONFIG_USB_CATC is not set | 1251 | CONFIG_USB_CATC=m |
1250 | # CONFIG_USB_KAWETH is not set | 1252 | CONFIG_USB_KAWETH=m |
1251 | # CONFIG_USB_PEGASUS is not set | 1253 | CONFIG_USB_PEGASUS=m |
1252 | # CONFIG_USB_RTL8150 is not set | 1254 | CONFIG_USB_RTL8150=m |
1253 | # CONFIG_USB_USBNET is not set | 1255 | CONFIG_USB_USBNET=m |
1256 | CONFIG_USB_NET_AX8817X=m | ||
1257 | CONFIG_USB_NET_CDCETHER=m | ||
1258 | # CONFIG_USB_NET_GL620A is not set | ||
1259 | CONFIG_USB_NET_NET1080=m | ||
1260 | CONFIG_USB_NET_PLUSB=m | ||
1261 | # CONFIG_USB_NET_MCS7830 is not set | ||
1262 | # CONFIG_USB_NET_RNDIS_HOST is not set | ||
1263 | # CONFIG_USB_NET_CDC_SUBSET is not set | ||
1264 | CONFIG_USB_NET_ZAURUS=m | ||
1254 | CONFIG_USB_MON=y | 1265 | CONFIG_USB_MON=y |
1255 | 1266 | ||
1256 | # | 1267 | # |
@@ -1285,6 +1296,7 @@ CONFIG_USB_SERIAL_ARK3116=m | |||
1285 | # CONFIG_USB_SERIAL_KLSI is not set | 1296 | # CONFIG_USB_SERIAL_KLSI is not set |
1286 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set | 1297 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set |
1287 | # CONFIG_USB_SERIAL_MCT_U232 is not set | 1298 | # CONFIG_USB_SERIAL_MCT_U232 is not set |
1299 | # CONFIG_USB_SERIAL_MOS7720 is not set | ||
1288 | # CONFIG_USB_SERIAL_MOS7840 is not set | 1300 | # CONFIG_USB_SERIAL_MOS7840 is not set |
1289 | # CONFIG_USB_SERIAL_NAVMAN is not set | 1301 | # CONFIG_USB_SERIAL_NAVMAN is not set |
1290 | CONFIG_USB_SERIAL_PL2303=m | 1302 | CONFIG_USB_SERIAL_PL2303=m |
@@ -1316,6 +1328,7 @@ CONFIG_USB_SERIAL_PL2303=m | |||
1316 | # CONFIG_USB_APPLEDISPLAY is not set | 1328 | # CONFIG_USB_APPLEDISPLAY is not set |
1317 | # CONFIG_USB_SISUSBVGA is not set | 1329 | # CONFIG_USB_SISUSBVGA is not set |
1318 | # CONFIG_USB_LD is not set | 1330 | # CONFIG_USB_LD is not set |
1331 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1319 | # CONFIG_USB_TEST is not set | 1332 | # CONFIG_USB_TEST is not set |
1320 | 1333 | ||
1321 | # | 1334 | # |
@@ -1357,7 +1370,26 @@ CONFIG_USB_SERIAL_PL2303=m | |||
1357 | # | 1370 | # |
1358 | # Real Time Clock | 1371 | # Real Time Clock |
1359 | # | 1372 | # |
1360 | # CONFIG_RTC_CLASS is not set | 1373 | CONFIG_RTC_LIB=m |
1374 | CONFIG_RTC_CLASS=m | ||
1375 | |||
1376 | # | ||
1377 | # RTC interfaces | ||
1378 | # | ||
1379 | CONFIG_RTC_INTF_SYSFS=m | ||
1380 | CONFIG_RTC_INTF_PROC=m | ||
1381 | CONFIG_RTC_INTF_DEV=m | ||
1382 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
1383 | |||
1384 | # | ||
1385 | # RTC drivers | ||
1386 | # | ||
1387 | # CONFIG_RTC_DRV_DS1553 is not set | ||
1388 | # CONFIG_RTC_DRV_DS1742 is not set | ||
1389 | # CONFIG_RTC_DRV_M48T86 is not set | ||
1390 | CONFIG_RTC_DRV_SH=m | ||
1391 | # CONFIG_RTC_DRV_TEST is not set | ||
1392 | # CONFIG_RTC_DRV_V3020 is not set | ||
1361 | 1393 | ||
1362 | # | 1394 | # |
1363 | # DMA Engine support | 1395 | # DMA Engine support |
@@ -1380,8 +1412,12 @@ CONFIG_EXT2_FS=y | |||
1380 | # CONFIG_EXT2_FS_XIP is not set | 1412 | # CONFIG_EXT2_FS_XIP is not set |
1381 | CONFIG_EXT3_FS=y | 1413 | CONFIG_EXT3_FS=y |
1382 | # CONFIG_EXT3_FS_XATTR is not set | 1414 | # CONFIG_EXT3_FS_XATTR is not set |
1415 | CONFIG_EXT4DEV_FS=m | ||
1416 | # CONFIG_EXT4DEV_FS_XATTR is not set | ||
1383 | CONFIG_JBD=y | 1417 | CONFIG_JBD=y |
1384 | # CONFIG_JBD_DEBUG is not set | 1418 | # CONFIG_JBD_DEBUG is not set |
1419 | CONFIG_JBD2=m | ||
1420 | # CONFIG_JBD2_DEBUG is not set | ||
1385 | CONFIG_REISERFS_FS=m | 1421 | CONFIG_REISERFS_FS=m |
1386 | # CONFIG_REISERFS_CHECK is not set | 1422 | # CONFIG_REISERFS_CHECK is not set |
1387 | # CONFIG_REISERFS_PROC_INFO is not set | 1423 | # CONFIG_REISERFS_PROC_INFO is not set |
@@ -1393,9 +1429,10 @@ CONFIG_XFS_FS=m | |||
1393 | # CONFIG_XFS_SECURITY is not set | 1429 | # CONFIG_XFS_SECURITY is not set |
1394 | # CONFIG_XFS_POSIX_ACL is not set | 1430 | # CONFIG_XFS_POSIX_ACL is not set |
1395 | # CONFIG_XFS_RT is not set | 1431 | # CONFIG_XFS_RT is not set |
1432 | # CONFIG_GFS2_FS is not set | ||
1396 | # CONFIG_OCFS2_FS is not set | 1433 | # CONFIG_OCFS2_FS is not set |
1397 | # CONFIG_MINIX_FS is not set | 1434 | # CONFIG_MINIX_FS is not set |
1398 | # CONFIG_ROMFS_FS is not set | 1435 | CONFIG_ROMFS_FS=y |
1399 | CONFIG_INOTIFY=y | 1436 | CONFIG_INOTIFY=y |
1400 | CONFIG_INOTIFY_USER=y | 1437 | CONFIG_INOTIFY_USER=y |
1401 | # CONFIG_QUOTA is not set | 1438 | # CONFIG_QUOTA is not set |
@@ -1480,7 +1517,12 @@ CONFIG_SUNRPC=y | |||
1480 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 1517 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
1481 | CONFIG_SMB_FS=m | 1518 | CONFIG_SMB_FS=m |
1482 | # CONFIG_SMB_NLS_DEFAULT is not set | 1519 | # CONFIG_SMB_NLS_DEFAULT is not set |
1483 | # CONFIG_CIFS is not set | 1520 | CONFIG_CIFS=m |
1521 | # CONFIG_CIFS_STATS is not set | ||
1522 | CONFIG_CIFS_WEAK_PW_HASH=y | ||
1523 | # CONFIG_CIFS_XATTR is not set | ||
1524 | # CONFIG_CIFS_DEBUG2 is not set | ||
1525 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
1484 | # CONFIG_NCP_FS is not set | 1526 | # CONFIG_NCP_FS is not set |
1485 | # CONFIG_CODA_FS is not set | 1527 | # CONFIG_CODA_FS is not set |
1486 | # CONFIG_AFS_FS is not set | 1528 | # CONFIG_AFS_FS is not set |
@@ -1583,9 +1625,10 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
1583 | # CONFIG_DEBUG_LIST is not set | 1625 | # CONFIG_DEBUG_LIST is not set |
1584 | # CONFIG_FRAME_POINTER is not set | 1626 | # CONFIG_FRAME_POINTER is not set |
1585 | # CONFIG_FORCED_INLINING is not set | 1627 | # CONFIG_FORCED_INLINING is not set |
1628 | # CONFIG_HEADERS_CHECK is not set | ||
1586 | # CONFIG_RCU_TORTURE_TEST is not set | 1629 | # CONFIG_RCU_TORTURE_TEST is not set |
1587 | # CONFIG_SH_STANDARD_BIOS is not set | 1630 | # CONFIG_SH_STANDARD_BIOS is not set |
1588 | CONFIG_EARLY_SCIF_CONSOLE=y | 1631 | # CONFIG_EARLY_SCIF_CONSOLE is not set |
1589 | # CONFIG_EARLY_PRINTK is not set | 1632 | # CONFIG_EARLY_PRINTK is not set |
1590 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1633 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
1591 | # CONFIG_DEBUG_STACK_USAGE is not set | 1634 | # CONFIG_DEBUG_STACK_USAGE is not set |
@@ -1605,7 +1648,7 @@ CONFIG_CRYPTO=y | |||
1605 | CONFIG_CRYPTO_ALGAPI=y | 1648 | CONFIG_CRYPTO_ALGAPI=y |
1606 | CONFIG_CRYPTO_BLKCIPHER=y | 1649 | CONFIG_CRYPTO_BLKCIPHER=y |
1607 | CONFIG_CRYPTO_HASH=y | 1650 | CONFIG_CRYPTO_HASH=y |
1608 | CONFIG_CRYPTO_MANAGER=m | 1651 | CONFIG_CRYPTO_MANAGER=y |
1609 | CONFIG_CRYPTO_HMAC=y | 1652 | CONFIG_CRYPTO_HMAC=y |
1610 | CONFIG_CRYPTO_NULL=m | 1653 | CONFIG_CRYPTO_NULL=m |
1611 | CONFIG_CRYPTO_MD4=m | 1654 | CONFIG_CRYPTO_MD4=m |
@@ -1615,7 +1658,7 @@ CONFIG_CRYPTO_SHA256=m | |||
1615 | CONFIG_CRYPTO_SHA512=m | 1658 | CONFIG_CRYPTO_SHA512=m |
1616 | CONFIG_CRYPTO_WP512=m | 1659 | CONFIG_CRYPTO_WP512=m |
1617 | CONFIG_CRYPTO_TGR192=m | 1660 | CONFIG_CRYPTO_TGR192=m |
1618 | CONFIG_CRYPTO_ECB=m | 1661 | CONFIG_CRYPTO_ECB=y |
1619 | CONFIG_CRYPTO_CBC=y | 1662 | CONFIG_CRYPTO_CBC=y |
1620 | CONFIG_CRYPTO_DES=y | 1663 | CONFIG_CRYPTO_DES=y |
1621 | CONFIG_CRYPTO_BLOWFISH=m | 1664 | CONFIG_CRYPTO_BLOWFISH=m |
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c index d8ece20bb2cf..660786013350 100644 --- a/arch/sh/drivers/dma/dma-sh.c +++ b/arch/sh/drivers/dma/dma-sh.c | |||
@@ -19,23 +19,34 @@ | |||
19 | #include <asm/io.h> | 19 | #include <asm/io.h> |
20 | #include "dma-sh.h" | 20 | #include "dma-sh.h" |
21 | 21 | ||
22 | static inline unsigned int get_dmte_irq(unsigned int chan) | ||
23 | { | ||
24 | unsigned int irq = 0; | ||
25 | 22 | ||
23 | |||
24 | #ifdef CONFIG_CPU_SH4 | ||
25 | static struct ipr_data dmae_ipr_map[] = { | ||
26 | { DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, | ||
27 | }; | ||
28 | #endif | ||
29 | static struct ipr_data dmte_ipr_map[] = { | ||
26 | /* | 30 | /* |
27 | * Normally we could just do DMTE0_IRQ + chan outright, though in the | 31 | * Normally we could just do DMTE0_IRQ + chan outright, though in the |
28 | * case of the 7751R, the DMTE IRQs for channels > 4 start right above | 32 | * case of the 7751R, the DMTE IRQs for channels > 4 start right above |
29 | * the SCIF | 33 | * the SCIF |
30 | */ | 34 | */ |
31 | if (chan < 4) { | 35 | { DMTE0_IRQ + 0, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
32 | irq = DMTE0_IRQ + chan; | 36 | { DMTE0_IRQ + 1, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
33 | } else { | 37 | { DMTE0_IRQ + 2, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
34 | #ifdef DMTE4_IRQ | 38 | { DMTE0_IRQ + 3, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
35 | irq = DMTE4_IRQ + chan - 4; | 39 | { DMTE4_IRQ + 0, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
36 | #endif | 40 | { DMTE4_IRQ + 1, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
37 | } | 41 | { DMTE4_IRQ + 2, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
42 | { DMTE4_IRQ + 3, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, | ||
43 | }; | ||
38 | 44 | ||
45 | static inline unsigned int get_dmte_irq(unsigned int chan) | ||
46 | { | ||
47 | unsigned int irq = 0; | ||
48 | if (chan < ARRAY_SIZE(dmte_ipr_map)) | ||
49 | irq = dmte_ipr_map[chan].irq; | ||
39 | return irq; | 50 | return irq; |
40 | } | 51 | } |
41 | 52 | ||
@@ -258,17 +269,16 @@ static int __init sh_dmac_init(void) | |||
258 | int i; | 269 | int i; |
259 | 270 | ||
260 | #ifdef CONFIG_CPU_SH4 | 271 | #ifdef CONFIG_CPU_SH4 |
261 | make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | 272 | make_ipr_irq(dmae_ipr_map, ARRAY_SIZE(dmae_ipr_map)); |
262 | i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0); | 273 | i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0); |
263 | if (unlikely(i < 0)) | 274 | if (unlikely(i < 0)) |
264 | return i; | 275 | return i; |
265 | #endif | 276 | #endif |
266 | 277 | ||
267 | for (i = 0; i < info->nr_channels; i++) { | 278 | i = info->nr_channels; |
268 | int irq = get_dmte_irq(i); | 279 | if (i > ARRAY_SIZE(dmte_ipr_map)) |
269 | 280 | i = ARRAY_SIZE(dmte_ipr_map); | |
270 | make_ipr_irq(irq, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | 281 | make_ipr_irq(dmte_ipr_map, i); |
271 | } | ||
272 | 282 | ||
273 | /* | 283 | /* |
274 | * Initialize DMAOR, and clean up any error flags that may have | 284 | * Initialize DMAOR, and clean up any error flags that may have |
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c index f7997312ef98..a0089563cbfc 100644 --- a/arch/sh/kernel/cpu/irq/ipr.c +++ b/arch/sh/kernel/cpu/irq/ipr.c | |||
@@ -23,24 +23,21 @@ | |||
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | #include <asm/machvec.h> | 24 | #include <asm/machvec.h> |
25 | 25 | ||
26 | struct ipr_data { | ||
27 | unsigned int addr; /* Address of Interrupt Priority Register */ | ||
28 | int shift; /* Shifts of the 16-bit data */ | ||
29 | int priority; /* The priority */ | ||
30 | }; | ||
31 | 26 | ||
32 | static void disable_ipr_irq(unsigned int irq) | 27 | static void disable_ipr_irq(unsigned int irq) |
33 | { | 28 | { |
34 | struct ipr_data *p = get_irq_chip_data(irq); | 29 | struct ipr_data *p = get_irq_chip_data(irq); |
30 | int shift = p->shift*4; | ||
35 | /* Set the priority in IPR to 0 */ | 31 | /* Set the priority in IPR to 0 */ |
36 | ctrl_outw(ctrl_inw(p->addr) & (0xffff ^ (0xf << p->shift)), p->addr); | 32 | ctrl_outw(ctrl_inw(p->addr) & (0xffff ^ (0xf << shift)), p->addr); |
37 | } | 33 | } |
38 | 34 | ||
39 | static void enable_ipr_irq(unsigned int irq) | 35 | static void enable_ipr_irq(unsigned int irq) |
40 | { | 36 | { |
41 | struct ipr_data *p = get_irq_chip_data(irq); | 37 | struct ipr_data *p = get_irq_chip_data(irq); |
38 | int shift = p->shift*4; | ||
42 | /* Set priority in IPR back to original value */ | 39 | /* Set priority in IPR back to original value */ |
43 | ctrl_outw(ctrl_inw(p->addr) | (p->priority << p->shift), p->addr); | 40 | ctrl_outw(ctrl_inw(p->addr) | (p->priority << shift), p->addr); |
44 | } | 41 | } |
45 | 42 | ||
46 | static struct irq_chip ipr_irq_chip = { | 43 | static struct irq_chip ipr_irq_chip = { |
@@ -50,67 +47,57 @@ static struct irq_chip ipr_irq_chip = { | |||
50 | .mask_ack = disable_ipr_irq, | 47 | .mask_ack = disable_ipr_irq, |
51 | }; | 48 | }; |
52 | 49 | ||
53 | void make_ipr_irq(unsigned int irq, unsigned int addr, int pos, int priority) | 50 | void make_ipr_irq(struct ipr_data *table, unsigned int nr_irqs) |
54 | { | 51 | { |
55 | struct ipr_data ipr_data; | 52 | int i; |
56 | |||
57 | disable_irq_nosync(irq); | ||
58 | |||
59 | ipr_data.addr = addr; | ||
60 | ipr_data.shift = pos*4; /* POSition (0-3) x 4 means shift */ | ||
61 | ipr_data.priority = priority; | ||
62 | 53 | ||
63 | set_irq_chip_and_handler_name(irq, &ipr_irq_chip, | 54 | for (i = 0; i < nr_irqs; i++) { |
55 | unsigned int irq = table[i].irq; | ||
56 | disable_irq_nosync(irq); | ||
57 | set_irq_chip_and_handler_name(irq, &ipr_irq_chip, | ||
64 | handle_level_irq, "level"); | 58 | handle_level_irq, "level"); |
65 | set_irq_chip_data(irq, &ipr_data); | 59 | set_irq_chip_data(irq, &table[i]); |
66 | 60 | enable_ipr_irq(irq); | |
67 | enable_ipr_irq(irq); | 61 | } |
68 | } | 62 | } |
63 | EXPORT_SYMBOL(make_ipr_irq); | ||
69 | 64 | ||
70 | /* XXX: This needs to die a horrible death.. */ | 65 | static struct ipr_data sys_ipr_map[] = { |
71 | void __init init_IRQ(void) | ||
72 | { | ||
73 | #ifndef CONFIG_CPU_SUBTYPE_SH7780 | 66 | #ifndef CONFIG_CPU_SUBTYPE_SH7780 |
74 | make_ipr_irq(TIMER_IRQ, TIMER_IPR_ADDR, TIMER_IPR_POS, TIMER_PRIORITY); | 67 | { TIMER_IRQ, TIMER_IPR_ADDR, TIMER_IPR_POS, TIMER_PRIORITY }, |
75 | make_ipr_irq(TIMER1_IRQ, TIMER1_IPR_ADDR, TIMER1_IPR_POS, TIMER1_PRIORITY); | 68 | { TIMER1_IRQ, TIMER1_IPR_ADDR, TIMER1_IPR_POS, TIMER1_PRIORITY }, |
76 | #ifdef RTC_IRQ | 69 | #ifdef RTC_IRQ |
77 | make_ipr_irq(RTC_IRQ, RTC_IPR_ADDR, RTC_IPR_POS, RTC_PRIORITY); | 70 | { RTC_IRQ, RTC_IPR_ADDR, RTC_IPR_POS, RTC_PRIORITY }, |
78 | #endif | 71 | #endif |
79 | |||
80 | #ifdef SCI_ERI_IRQ | 72 | #ifdef SCI_ERI_IRQ |
81 | make_ipr_irq(SCI_ERI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY); | 73 | { SCI_ERI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY }, |
82 | make_ipr_irq(SCI_RXI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY); | 74 | { SCI_RXI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY }, |
83 | make_ipr_irq(SCI_TXI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY); | 75 | { SCI_TXI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY }, |
84 | #endif | 76 | #endif |
85 | |||
86 | #ifdef SCIF1_ERI_IRQ | 77 | #ifdef SCIF1_ERI_IRQ |
87 | make_ipr_irq(SCIF1_ERI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY); | 78 | { SCIF1_ERI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY }, |
88 | make_ipr_irq(SCIF1_RXI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY); | 79 | { SCIF1_RXI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY }, |
89 | make_ipr_irq(SCIF1_BRI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY); | 80 | { SCIF1_BRI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY }, |
90 | make_ipr_irq(SCIF1_TXI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY); | 81 | { SCIF1_TXI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY }, |
91 | #endif | 82 | #endif |
92 | |||
93 | #if defined(CONFIG_CPU_SUBTYPE_SH7300) | 83 | #if defined(CONFIG_CPU_SUBTYPE_SH7300) |
94 | make_ipr_irq(SCIF0_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY); | 84 | { SCIF0_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY }, |
95 | make_ipr_irq(DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | 85 | { DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, |
96 | make_ipr_irq(DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | 86 | { DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, |
97 | make_ipr_irq(VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | 87 | { VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, |
98 | #endif | 88 | #endif |
99 | |||
100 | #ifdef SCIF_ERI_IRQ | 89 | #ifdef SCIF_ERI_IRQ |
101 | make_ipr_irq(SCIF_ERI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY); | 90 | { SCIF_ERI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY }, |
102 | make_ipr_irq(SCIF_RXI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY); | 91 | { SCIF_RXI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY }, |
103 | make_ipr_irq(SCIF_BRI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY); | 92 | { SCIF_BRI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY }, |
104 | make_ipr_irq(SCIF_TXI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY); | 93 | { SCIF_TXI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY }, |
105 | #endif | 94 | #endif |
106 | |||
107 | #ifdef IRDA_ERI_IRQ | 95 | #ifdef IRDA_ERI_IRQ |
108 | make_ipr_irq(IRDA_ERI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY); | 96 | { IRDA_ERI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY }, |
109 | make_ipr_irq(IRDA_RXI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY); | 97 | { IRDA_RXI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY }, |
110 | make_ipr_irq(IRDA_BRI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY); | 98 | { IRDA_BRI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY }, |
111 | make_ipr_irq(IRDA_TXI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY); | 99 | { IRDA_TXI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY }, |
112 | #endif | 100 | #endif |
113 | |||
114 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | 101 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ |
115 | defined(CONFIG_CPU_SUBTYPE_SH7706) || \ | 102 | defined(CONFIG_CPU_SUBTYPE_SH7706) || \ |
116 | defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) | 103 | defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) |
@@ -124,14 +111,19 @@ void __init init_IRQ(void) | |||
124 | * You should set corresponding bits of PFC to "00" | 111 | * You should set corresponding bits of PFC to "00" |
125 | * to enable these interrupts. | 112 | * to enable these interrupts. |
126 | */ | 113 | */ |
127 | make_ipr_irq(IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, IRQ0_PRIORITY); | 114 | { IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, IRQ0_PRIORITY }, |
128 | make_ipr_irq(IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, IRQ1_PRIORITY); | 115 | { IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, IRQ1_PRIORITY }, |
129 | make_ipr_irq(IRQ2_IRQ, IRQ2_IPR_ADDR, IRQ2_IPR_POS, IRQ2_PRIORITY); | 116 | { IRQ2_IRQ, IRQ2_IPR_ADDR, IRQ2_IPR_POS, IRQ2_PRIORITY }, |
130 | make_ipr_irq(IRQ3_IRQ, IRQ3_IPR_ADDR, IRQ3_IPR_POS, IRQ3_PRIORITY); | 117 | { IRQ3_IRQ, IRQ3_IPR_ADDR, IRQ3_IPR_POS, IRQ3_PRIORITY }, |
131 | make_ipr_irq(IRQ4_IRQ, IRQ4_IPR_ADDR, IRQ4_IPR_POS, IRQ4_PRIORITY); | 118 | { IRQ4_IRQ, IRQ4_IPR_ADDR, IRQ4_IPR_POS, IRQ4_PRIORITY }, |
132 | make_ipr_irq(IRQ5_IRQ, IRQ5_IPR_ADDR, IRQ5_IPR_POS, IRQ5_PRIORITY); | 119 | { IRQ5_IRQ, IRQ5_IPR_ADDR, IRQ5_IPR_POS, IRQ5_PRIORITY }, |
133 | #endif | 120 | #endif |
134 | #endif | 121 | #endif |
122 | }; | ||
123 | |||
124 | void __init init_IRQ(void) | ||
125 | { | ||
126 | make_ipr_irq(sys_ipr_map, ARRAY_SIZE(sys_ipr_map)); | ||
135 | 127 | ||
136 | #ifdef CONFIG_CPU_HAS_PINT_IRQ | 128 | #ifdef CONFIG_CPU_HAS_PINT_IRQ |
137 | init_IRQ_pint(); | 129 | init_IRQ_pint(); |
@@ -153,5 +145,3 @@ int ipr_irq_demux(int irq) | |||
153 | return irq; | 145 | return irq; |
154 | } | 146 | } |
155 | #endif | 147 | #endif |
156 | |||
157 | EXPORT_SYMBOL(make_ipr_irq); | ||
diff --git a/arch/sh/kernel/cpu/irq/pint.c b/arch/sh/kernel/cpu/irq/pint.c index 17f47b373d6e..f60007783a21 100644 --- a/arch/sh/kernel/cpu/irq/pint.c +++ b/arch/sh/kernel/cpu/irq/pint.c | |||
@@ -84,12 +84,16 @@ void make_pint_irq(unsigned int irq) | |||
84 | disable_pint_irq(irq); | 84 | disable_pint_irq(irq); |
85 | } | 85 | } |
86 | 86 | ||
87 | static struct ipr_data pint_ipr_map[] = { | ||
88 | { PINT0_IRQ, PINT0_IPR_ADDR, PINT0_IPR_POS, PINT0_PRIORITY }, | ||
89 | { PINT8_IRQ, PINT8_IPR_ADDR, PINT8_IPR_POS, PINT8_PRIORITY }, | ||
90 | }; | ||
91 | |||
87 | void __init init_IRQ_pint(void) | 92 | void __init init_IRQ_pint(void) |
88 | { | 93 | { |
89 | int i; | 94 | int i; |
90 | 95 | ||
91 | make_ipr_irq(PINT0_IRQ, PINT0_IPR_ADDR, PINT0_IPR_POS, PINT0_PRIORITY); | 96 | make_ipr_irq(pint_ipr_map, ARRAY_SIZE(pint_ipr_map)); |
92 | make_ipr_irq(PINT8_IRQ, PINT8_IPR_ADDR, PINT8_IPR_POS, PINT8_PRIORITY); | ||
93 | 97 | ||
94 | enable_irq(PINT0_IRQ); | 98 | enable_irq(PINT0_IRQ); |
95 | enable_irq(PINT8_IRQ); | 99 | enable_irq(PINT8_IRQ); |
diff --git a/arch/sh/kernel/syscalls.S b/arch/sh/kernel/syscalls.S index 768334e95075..ca81976e9e34 100644 --- a/arch/sh/kernel/syscalls.S +++ b/arch/sh/kernel/syscalls.S | |||
@@ -351,3 +351,6 @@ ENTRY(sys_call_table) | |||
351 | .long sys_sync_file_range | 351 | .long sys_sync_file_range |
352 | .long sys_tee /* 315 */ | 352 | .long sys_tee /* 315 */ |
353 | .long sys_vmsplice | 353 | .long sys_vmsplice |
354 | .long sys_move_pages | ||
355 | .long sys_getcpu | ||
356 | .long sys_epoll_pwait | ||
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S index 5eb930918186..77b4026d5688 100644 --- a/arch/sh/kernel/vmlinux.lds.S +++ b/arch/sh/kernel/vmlinux.lds.S | |||
@@ -76,13 +76,7 @@ SECTIONS | |||
76 | __setup_end = .; | 76 | __setup_end = .; |
77 | __initcall_start = .; | 77 | __initcall_start = .; |
78 | .initcall.init : { | 78 | .initcall.init : { |
79 | *(.initcall1.init) | 79 | INITCALLS |
80 | *(.initcall2.init) | ||
81 | *(.initcall3.init) | ||
82 | *(.initcall4.init) | ||
83 | *(.initcall5.init) | ||
84 | *(.initcall6.init) | ||
85 | *(.initcall7.init) | ||
86 | } | 80 | } |
87 | __initcall_end = .; | 81 | __initcall_end = .; |
88 | __con_initcall_start = .; | 82 | __con_initcall_start = .; |
diff --git a/arch/sh64/kernel/vmlinux.lds.S b/arch/sh64/kernel/vmlinux.lds.S index a8fcc3a71585..95c4d753e357 100644 --- a/arch/sh64/kernel/vmlinux.lds.S +++ b/arch/sh64/kernel/vmlinux.lds.S | |||
@@ -108,13 +108,7 @@ SECTIONS | |||
108 | __setup_end = .; | 108 | __setup_end = .; |
109 | __initcall_start = .; | 109 | __initcall_start = .; |
110 | .initcall.init : C_PHYS(.initcall.init) { | 110 | .initcall.init : C_PHYS(.initcall.init) { |
111 | *(.initcall1.init) | 111 | INITCALLS |
112 | *(.initcall2.init) | ||
113 | *(.initcall3.init) | ||
114 | *(.initcall4.init) | ||
115 | *(.initcall5.init) | ||
116 | *(.initcall6.init) | ||
117 | *(.initcall7.init) | ||
118 | } | 112 | } |
119 | __initcall_end = .; | 113 | __initcall_end = .; |
120 | __con_initcall_start = .; | 114 | __con_initcall_start = .; |
diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c index 75ac24d229b1..ba58c3a061fd 100644 --- a/arch/sparc/kernel/ebus.c +++ b/arch/sparc/kernel/ebus.c | |||
@@ -237,12 +237,12 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d | |||
237 | dev->ofdev.node = dp; | 237 | dev->ofdev.node = dp; |
238 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; | 238 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; |
239 | dev->ofdev.dev.bus = &ebus_bus_type; | 239 | dev->ofdev.dev.bus = &ebus_bus_type; |
240 | strcpy(dev->ofdev.dev.bus_id, dp->path_component_name); | 240 | sprintf(dev->ofdev.dev.bus_id, "ebus[%08x]", dp->node); |
241 | 241 | ||
242 | /* Register with core */ | 242 | /* Register with core */ |
243 | if (of_device_register(&dev->ofdev) != 0) | 243 | if (of_device_register(&dev->ofdev) != 0) |
244 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", | 244 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", |
245 | dev->ofdev.dev.bus_id); | 245 | dp->path_component_name); |
246 | 246 | ||
247 | if ((dp = dp->child) != NULL) { | 247 | if ((dp = dp->child) != NULL) { |
248 | dev->children = (struct linux_ebus_child *) | 248 | dev->children = (struct linux_ebus_child *) |
@@ -332,12 +332,12 @@ void __init ebus_init(void) | |||
332 | ebus->ofdev.node = dp; | 332 | ebus->ofdev.node = dp; |
333 | ebus->ofdev.dev.parent = &pdev->dev; | 333 | ebus->ofdev.dev.parent = &pdev->dev; |
334 | ebus->ofdev.dev.bus = &ebus_bus_type; | 334 | ebus->ofdev.dev.bus = &ebus_bus_type; |
335 | strcpy(ebus->ofdev.dev.bus_id, dp->path_component_name); | 335 | sprintf(ebus->ofdev.dev.bus_id, "ebus%d", num_ebus); |
336 | 336 | ||
337 | /* Register with core */ | 337 | /* Register with core */ |
338 | if (of_device_register(&ebus->ofdev) != 0) | 338 | if (of_device_register(&ebus->ofdev) != 0) |
339 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", | 339 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", |
340 | ebus->ofdev.dev.bus_id); | 340 | dp->path_component_name); |
341 | 341 | ||
342 | 342 | ||
343 | nd = dp->child; | 343 | nd = dp->child; |
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index 74bef2a2d37f..46200c43ffb1 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c | |||
@@ -651,7 +651,7 @@ build_resources: | |||
651 | if (!parent) | 651 | if (!parent) |
652 | strcpy(op->dev.bus_id, "root"); | 652 | strcpy(op->dev.bus_id, "root"); |
653 | else | 653 | else |
654 | strcpy(op->dev.bus_id, dp->path_component_name); | 654 | sprintf(op->dev.bus_id, "%08x", dp->node); |
655 | 655 | ||
656 | if (of_device_register(op)) { | 656 | if (of_device_register(op)) { |
657 | printk("%s: Could not register of device.\n", | 657 | printk("%s: Could not register of device.\n", |
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S index 1dd78c84888a..5cc5ff7f8824 100644 --- a/arch/sparc/kernel/vmlinux.lds.S +++ b/arch/sparc/kernel/vmlinux.lds.S | |||
@@ -49,13 +49,7 @@ SECTIONS | |||
49 | __setup_end = .; | 49 | __setup_end = .; |
50 | __initcall_start = .; | 50 | __initcall_start = .; |
51 | .initcall.init : { | 51 | .initcall.init : { |
52 | *(.initcall1.init) | 52 | INITCALLS |
53 | *(.initcall2.init) | ||
54 | *(.initcall3.init) | ||
55 | *(.initcall4.init) | ||
56 | *(.initcall5.init) | ||
57 | *(.initcall6.init) | ||
58 | *(.initcall7.init) | ||
59 | } | 53 | } |
60 | __initcall_end = .; | 54 | __initcall_end = .; |
61 | __con_initcall_start = .; | 55 | __con_initcall_start = .; |
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c index 2df25c2b4071..35bf895fdeee 100644 --- a/arch/sparc64/kernel/ebus.c +++ b/arch/sparc64/kernel/ebus.c | |||
@@ -389,12 +389,12 @@ static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_de | |||
389 | dev->ofdev.node = dp; | 389 | dev->ofdev.node = dp; |
390 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; | 390 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; |
391 | dev->ofdev.dev.bus = &ebus_bus_type; | 391 | dev->ofdev.dev.bus = &ebus_bus_type; |
392 | strcpy(dev->ofdev.dev.bus_id, dp->path_component_name); | 392 | sprintf(dev->ofdev.dev.bus_id, "ebus[%08x]", dp->node); |
393 | 393 | ||
394 | /* Register with core */ | 394 | /* Register with core */ |
395 | if (of_device_register(&dev->ofdev) != 0) | 395 | if (of_device_register(&dev->ofdev) != 0) |
396 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", | 396 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", |
397 | dev->ofdev.dev.bus_id); | 397 | dp->path_component_name); |
398 | 398 | ||
399 | dp = dp->child; | 399 | dp = dp->child; |
400 | if (dp) { | 400 | if (dp) { |
@@ -494,12 +494,12 @@ void __init ebus_init(void) | |||
494 | ebus->ofdev.node = dp; | 494 | ebus->ofdev.node = dp; |
495 | ebus->ofdev.dev.parent = &pdev->dev; | 495 | ebus->ofdev.dev.parent = &pdev->dev; |
496 | ebus->ofdev.dev.bus = &ebus_bus_type; | 496 | ebus->ofdev.dev.bus = &ebus_bus_type; |
497 | strcpy(ebus->ofdev.dev.bus_id, dp->path_component_name); | 497 | sprintf(ebus->ofdev.dev.bus_id, "ebus%d", num_ebus); |
498 | 498 | ||
499 | /* Register with core */ | 499 | /* Register with core */ |
500 | if (of_device_register(&ebus->ofdev) != 0) | 500 | if (of_device_register(&ebus->ofdev) != 0) |
501 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", | 501 | printk(KERN_DEBUG "ebus: device registration error for %s!\n", |
502 | ebus->ofdev.dev.bus_id); | 502 | dp->path_component_name); |
503 | 503 | ||
504 | 504 | ||
505 | child = dp->child; | 505 | child = dp->child; |
diff --git a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c index 0f3aec72ef5f..f028e68b23f2 100644 --- a/arch/sparc64/kernel/isa.c +++ b/arch/sparc64/kernel/isa.c | |||
@@ -115,12 +115,12 @@ static void __init isa_fill_devices(struct sparc_isa_bridge *isa_br) | |||
115 | isa_dev->ofdev.node = dp; | 115 | isa_dev->ofdev.node = dp; |
116 | isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; | 116 | isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; |
117 | isa_dev->ofdev.dev.bus = &isa_bus_type; | 117 | isa_dev->ofdev.dev.bus = &isa_bus_type; |
118 | strcpy(isa_dev->ofdev.dev.bus_id, dp->path_component_name); | 118 | sprintf(isa_dev->ofdev.dev.bus_id, "isa[%08x]", dp->node); |
119 | 119 | ||
120 | /* Register with core */ | 120 | /* Register with core */ |
121 | if (of_device_register(&isa_dev->ofdev) != 0) { | 121 | if (of_device_register(&isa_dev->ofdev) != 0) { |
122 | printk(KERN_DEBUG "isa: device registration error for %s!\n", | 122 | printk(KERN_DEBUG "isa: device registration error for %s!\n", |
123 | isa_dev->ofdev.dev.bus_id); | 123 | dp->path_component_name); |
124 | kfree(isa_dev); | 124 | kfree(isa_dev); |
125 | goto next_sibling; | 125 | goto next_sibling; |
126 | } | 126 | } |
@@ -191,12 +191,12 @@ void __init isa_init(void) | |||
191 | isa_br->ofdev.node = dp; | 191 | isa_br->ofdev.node = dp; |
192 | isa_br->ofdev.dev.parent = &pdev->dev; | 192 | isa_br->ofdev.dev.parent = &pdev->dev; |
193 | isa_br->ofdev.dev.bus = &isa_bus_type; | 193 | isa_br->ofdev.dev.bus = &isa_bus_type; |
194 | strcpy(isa_br->ofdev.dev.bus_id, dp->path_component_name); | 194 | sprintf(isa_br->ofdev.dev.bus_id, "isa%d", index); |
195 | 195 | ||
196 | /* Register with core */ | 196 | /* Register with core */ |
197 | if (of_device_register(&isa_br->ofdev) != 0) { | 197 | if (of_device_register(&isa_br->ofdev) != 0) { |
198 | printk(KERN_DEBUG "isa: device registration error for %s!\n", | 198 | printk(KERN_DEBUG "isa: device registration error for %s!\n", |
199 | isa_br->ofdev.dev.bus_id); | 199 | dp->path_component_name); |
200 | kfree(isa_br); | 200 | kfree(isa_br); |
201 | return; | 201 | return; |
202 | } | 202 | } |
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index 983ca5f485cf..8cc14fc6b6f1 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -861,7 +861,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp, | |||
861 | if (!parent) | 861 | if (!parent) |
862 | strcpy(op->dev.bus_id, "root"); | 862 | strcpy(op->dev.bus_id, "root"); |
863 | else | 863 | else |
864 | sprintf(op->dev.bus_id, "%s@%08x", dp->name, dp->node); | 864 | sprintf(op->dev.bus_id, "%08x", dp->node); |
865 | 865 | ||
866 | if (of_device_register(op)) { | 866 | if (of_device_register(op)) { |
867 | printk("%s: Could not register of device.\n", | 867 | printk("%s: Could not register of device.\n", |
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index c60efb3cb22e..0917c24c4f08 100644 --- a/arch/sparc64/kernel/prom.c +++ b/arch/sparc64/kernel/prom.c | |||
@@ -793,7 +793,7 @@ static unsigned int schizo_irq_build(struct device_node *dp, | |||
793 | return virt_irq; | 793 | return virt_irq; |
794 | } | 794 | } |
795 | 795 | ||
796 | static void schizo_irq_trans_init(struct device_node *dp) | 796 | static void __schizo_irq_trans_init(struct device_node *dp, int is_tomatillo) |
797 | { | 797 | { |
798 | struct linux_prom64_registers *regs; | 798 | struct linux_prom64_registers *regs; |
799 | struct schizo_irq_data *irq_data; | 799 | struct schizo_irq_data *irq_data; |
@@ -807,11 +807,24 @@ static void schizo_irq_trans_init(struct device_node *dp) | |||
807 | dp->irq_trans->data = irq_data; | 807 | dp->irq_trans->data = irq_data; |
808 | 808 | ||
809 | irq_data->pbm_regs = regs[0].phys_addr; | 809 | irq_data->pbm_regs = regs[0].phys_addr; |
810 | irq_data->sync_reg = regs[3].phys_addr + 0x1a18UL; | 810 | if (is_tomatillo) |
811 | irq_data->sync_reg = regs[3].phys_addr + 0x1a18UL; | ||
812 | else | ||
813 | irq_data->sync_reg = 0UL; | ||
811 | irq_data->portid = of_getintprop_default(dp, "portid", 0); | 814 | irq_data->portid = of_getintprop_default(dp, "portid", 0); |
812 | irq_data->chip_version = of_getintprop_default(dp, "version#", 0); | 815 | irq_data->chip_version = of_getintprop_default(dp, "version#", 0); |
813 | } | 816 | } |
814 | 817 | ||
818 | static void schizo_irq_trans_init(struct device_node *dp) | ||
819 | { | ||
820 | __schizo_irq_trans_init(dp, 0); | ||
821 | } | ||
822 | |||
823 | static void tomatillo_irq_trans_init(struct device_node *dp) | ||
824 | { | ||
825 | __schizo_irq_trans_init(dp, 1); | ||
826 | } | ||
827 | |||
815 | static unsigned int pci_sun4v_irq_build(struct device_node *dp, | 828 | static unsigned int pci_sun4v_irq_build(struct device_node *dp, |
816 | unsigned int devino, | 829 | unsigned int devino, |
817 | void *_data) | 830 | void *_data) |
@@ -1050,8 +1063,8 @@ static struct irq_trans pci_irq_trans_table[] = { | |||
1050 | { "pci108e,8001", schizo_irq_trans_init }, | 1063 | { "pci108e,8001", schizo_irq_trans_init }, |
1051 | { "SUNW,schizo+", schizo_irq_trans_init }, | 1064 | { "SUNW,schizo+", schizo_irq_trans_init }, |
1052 | { "pci108e,8002", schizo_irq_trans_init }, | 1065 | { "pci108e,8002", schizo_irq_trans_init }, |
1053 | { "SUNW,tomatillo", schizo_irq_trans_init }, | 1066 | { "SUNW,tomatillo", tomatillo_irq_trans_init }, |
1054 | { "pci108e,a801", schizo_irq_trans_init }, | 1067 | { "pci108e,a801", tomatillo_irq_trans_init }, |
1055 | { "SUNW,sun4v-pci", pci_sun4v_irq_trans_init }, | 1068 | { "SUNW,sun4v-pci", pci_sun4v_irq_trans_init }, |
1056 | }; | 1069 | }; |
1057 | #endif | 1070 | #endif |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 68420e2dad0e..fe1796c939c3 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -87,6 +87,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p) | |||
87 | i + 1, | 87 | i + 1, |
88 | p->trapstack[i].tstate, p->trapstack[i].tpc, | 88 | p->trapstack[i].tstate, p->trapstack[i].tpc, |
89 | p->trapstack[i].tnpc, p->trapstack[i].tt); | 89 | p->trapstack[i].tnpc, p->trapstack[i].tt); |
90 | print_symbol("TRAPLOG: TPC<%s>\n", p->trapstack[i].tpc); | ||
90 | } | 91 | } |
91 | } | 92 | } |
92 | 93 | ||
@@ -1134,6 +1135,9 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in | |||
1134 | printk("%s" "ERROR(%d): TPC[%lx] TNPC[%lx] O7[%lx] TSTATE[%lx]\n", | 1135 | printk("%s" "ERROR(%d): TPC[%lx] TNPC[%lx] O7[%lx] TSTATE[%lx]\n", |
1135 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), | 1136 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), |
1136 | regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); | 1137 | regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); |
1138 | printk("%s" "ERROR(%d): ", | ||
1139 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id()); | ||
1140 | print_symbol("TPC<%s>\n", regs->tpc); | ||
1137 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", | 1141 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", |
1138 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), | 1142 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), |
1139 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, | 1143 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, |
@@ -1741,6 +1745,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
1741 | smp_processor_id(), | 1745 | smp_processor_id(), |
1742 | (type & 0x1) ? 'I' : 'D', | 1746 | (type & 0x1) ? 'I' : 'D', |
1743 | regs->tpc); | 1747 | regs->tpc); |
1748 | print_symbol(KERN_EMERG "TPC<%s>\n", regs->tpc); | ||
1744 | panic("Irrecoverable Cheetah+ parity error."); | 1749 | panic("Irrecoverable Cheetah+ parity error."); |
1745 | } | 1750 | } |
1746 | 1751 | ||
@@ -1748,6 +1753,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
1748 | smp_processor_id(), | 1753 | smp_processor_id(), |
1749 | (type & 0x1) ? 'I' : 'D', | 1754 | (type & 0x1) ? 'I' : 'D', |
1750 | regs->tpc); | 1755 | regs->tpc); |
1756 | print_symbol(KERN_WARNING "TPC<%s>\n", regs->tpc); | ||
1751 | } | 1757 | } |
1752 | 1758 | ||
1753 | struct sun4v_error_entry { | 1759 | struct sun4v_error_entry { |
@@ -1946,6 +1952,7 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl) | |||
1946 | 1952 | ||
1947 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", | 1953 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", |
1948 | regs->tpc, tl); | 1954 | regs->tpc, tl); |
1955 | print_symbol(KERN_EMERG "SUN4V-ITLB: TPC<%s>\n", regs->tpc); | ||
1949 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " | 1956 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " |
1950 | "pte[%lx] error[%lx]\n", | 1957 | "pte[%lx] error[%lx]\n", |
1951 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, | 1958 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, |
@@ -1966,6 +1973,7 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) | |||
1966 | 1973 | ||
1967 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", | 1974 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", |
1968 | regs->tpc, tl); | 1975 | regs->tpc, tl); |
1976 | print_symbol(KERN_EMERG "SUN4V-DTLB: TPC<%s>\n", regs->tpc); | ||
1969 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " | 1977 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " |
1970 | "pte[%lx] error[%lx]\n", | 1978 | "pte[%lx] error[%lx]\n", |
1971 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, | 1979 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, |
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S index b097379a49a8..bd9de8c2a2aa 100644 --- a/arch/sparc64/kernel/vmlinux.lds.S +++ b/arch/sparc64/kernel/vmlinux.lds.S | |||
@@ -57,13 +57,7 @@ SECTIONS | |||
57 | __setup_end = .; | 57 | __setup_end = .; |
58 | __initcall_start = .; | 58 | __initcall_start = .; |
59 | .initcall.init : { | 59 | .initcall.init : { |
60 | *(.initcall1.init) | 60 | INITCALLS |
61 | *(.initcall2.init) | ||
62 | *(.initcall3.init) | ||
63 | *(.initcall4.init) | ||
64 | *(.initcall5.init) | ||
65 | *(.initcall6.init) | ||
66 | *(.initcall7.init) | ||
67 | } | 61 | } |
68 | __initcall_end = .; | 62 | __initcall_end = .; |
69 | __con_initcall_start = .; | 63 | __con_initcall_start = .; |
diff --git a/arch/um/Makefile b/arch/um/Makefile index c8016a98483b..5d5ed726faa0 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -64,9 +64,14 @@ CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ | |||
64 | 64 | ||
65 | AFLAGS += $(ARCH_INCLUDE) | 65 | AFLAGS += $(ARCH_INCLUDE) |
66 | 66 | ||
67 | USER_CFLAGS := $(patsubst -I%,,$(CFLAGS)) | 67 | USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ |
68 | USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \ | 68 | $(patsubst -I%,,$(CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ |
69 | $(MODE_INCLUDE) -D_FILE_OFFSET_BITS=64 | 69 | -D_FILE_OFFSET_BITS=64 |
70 | |||
71 | include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) | ||
72 | |||
73 | #This will adjust *FLAGS accordingly to the platform. | ||
74 | include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) | ||
70 | 75 | ||
71 | # -Derrno=kernel_errno - This turns all kernel references to errno into | 76 | # -Derrno=kernel_errno - This turns all kernel references to errno into |
72 | # kernel_errno to separate them from the libc errno. This allows -fno-common | 77 | # kernel_errno to separate them from the libc errno. This allows -fno-common |
@@ -74,15 +79,11 @@ USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \ | |||
74 | # errnos. | 79 | # errnos. |
75 | # These apply to kernelspace only. | 80 | # These apply to kernelspace only. |
76 | 81 | ||
77 | CFLAGS += -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ | 82 | KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ |
78 | -Dmktime=kernel_mktime | 83 | -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) |
84 | CFLAGS += $(KERNEL_DEFINES) | ||
79 | CFLAGS += $(call cc-option,-fno-unit-at-a-time,) | 85 | CFLAGS += $(call cc-option,-fno-unit-at-a-time,) |
80 | 86 | ||
81 | include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) | ||
82 | |||
83 | #This will adjust *FLAGS accordingly to the platform. | ||
84 | include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) | ||
85 | |||
86 | # These are needed for clean and mrproper, since in that case .config is not | 87 | # These are needed for clean and mrproper, since in that case .config is not |
87 | # included; the values here are meaningless | 88 | # included; the values here are meaningless |
88 | 89 | ||
diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386 index b65ca115ef77..c9f1c5b24c9a 100644 --- a/arch/um/Makefile-i386 +++ b/arch/um/Makefile-i386 | |||
@@ -16,7 +16,6 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -S | |||
16 | ifeq ("$(origin SUBARCH)", "command line") | 16 | ifeq ("$(origin SUBARCH)", "command line") |
17 | ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") | 17 | ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") |
18 | CFLAGS += $(call cc-option,-m32) | 18 | CFLAGS += $(call cc-option,-m32) |
19 | USER_CFLAGS += $(call cc-option,-m32) | ||
20 | AFLAGS += $(call cc-option,-m32) | 19 | AFLAGS += $(call cc-option,-m32) |
21 | LINK-y += $(call cc-option,-m32) | 20 | LINK-y += $(call cc-option,-m32) |
22 | UML_OBJCOPYFLAGS += -F $(ELF_FORMAT) | 21 | UML_OBJCOPYFLAGS += -F $(ELF_FORMAT) |
@@ -25,7 +24,7 @@ export LDFLAGS HOSTCFLAGS HOSTLDFLAGS UML_OBJCOPYFLAGS | |||
25 | endif | 24 | endif |
26 | endif | 25 | endif |
27 | 26 | ||
28 | CFLAGS += -U__$(SUBARCH)__ -U$(SUBARCH) | 27 | ARCH_KERNEL_DEFINES += -U__$(SUBARCH)__ -U$(SUBARCH) |
29 | 28 | ||
30 | # First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y. | 29 | # First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y. |
31 | include $(srctree)/arch/i386/Makefile.cpu | 30 | include $(srctree)/arch/i386/Makefile.cpu |
@@ -38,4 +37,3 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) | |||
38 | cflags-y += -ffreestanding | 37 | cflags-y += -ffreestanding |
39 | 38 | ||
40 | CFLAGS += $(cflags-y) | 39 | CFLAGS += $(cflags-y) |
41 | USER_CFLAGS += $(cflags-y) | ||
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index d278682dd799..69ecea63fdae 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 | |||
@@ -8,8 +8,8 @@ _extra_flags_ = -fno-builtin -m64 | |||
8 | 8 | ||
9 | #We #undef __x86_64__ for kernelspace, not for userspace where | 9 | #We #undef __x86_64__ for kernelspace, not for userspace where |
10 | #it's needed for headers to work! | 10 | #it's needed for headers to work! |
11 | CFLAGS += -U__$(SUBARCH)__ $(_extra_flags_) | 11 | ARCH_KERNEL_DEFINES = -U__$(SUBARCH)__ |
12 | USER_CFLAGS += $(_extra_flags_) | 12 | CFLAGS += $(_extra_flags_) |
13 | 13 | ||
14 | CHECKFLAGS += -m64 | 14 | CHECKFLAGS += -m64 |
15 | AFLAGS += -m64 | 15 | AFLAGS += -m64 |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index bc458f57921b..49c047b75cc5 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -106,10 +106,15 @@ static inline void ubd_set_bit(__u64 bit, unsigned char *data) | |||
106 | 106 | ||
107 | #define DRIVER_NAME "uml-blkdev" | 107 | #define DRIVER_NAME "uml-blkdev" |
108 | 108 | ||
109 | /* Can be taken in interrupt context, and is passed to the block layer to lock | ||
110 | * the request queue. Kernel side code knows that. */ | ||
109 | static DEFINE_SPINLOCK(ubd_io_lock); | 111 | static DEFINE_SPINLOCK(ubd_io_lock); |
110 | static DEFINE_SPINLOCK(ubd_lock); | ||
111 | 112 | ||
112 | static void (*do_ubd)(void); | 113 | static DEFINE_MUTEX(ubd_lock); |
114 | |||
115 | /* XXX - this made sense in 2.4 days, now it's only used as a boolean, and | ||
116 | * probably it doesn't make sense even for that. */ | ||
117 | static int do_ubd; | ||
113 | 118 | ||
114 | static int ubd_open(struct inode * inode, struct file * filp); | 119 | static int ubd_open(struct inode * inode, struct file * filp); |
115 | static int ubd_release(struct inode * inode, struct file * file); | 120 | static int ubd_release(struct inode * inode, struct file * file); |
@@ -117,7 +122,7 @@ static int ubd_ioctl(struct inode * inode, struct file * file, | |||
117 | unsigned int cmd, unsigned long arg); | 122 | unsigned int cmd, unsigned long arg); |
118 | static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo); | 123 | static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo); |
119 | 124 | ||
120 | #define MAX_DEV (8) | 125 | #define MAX_DEV (16) |
121 | 126 | ||
122 | static struct block_device_operations ubd_blops = { | 127 | static struct block_device_operations ubd_blops = { |
123 | .owner = THIS_MODULE, | 128 | .owner = THIS_MODULE, |
@@ -150,8 +155,9 @@ static struct gendisk *fake_gendisk[MAX_DEV]; | |||
150 | static struct openflags global_openflags = OPEN_FLAGS; | 155 | static struct openflags global_openflags = OPEN_FLAGS; |
151 | 156 | ||
152 | struct cow { | 157 | struct cow { |
153 | /* This is the backing file, actually */ | 158 | /* backing file name */ |
154 | char *file; | 159 | char *file; |
160 | /* backing file fd */ | ||
155 | int fd; | 161 | int fd; |
156 | unsigned long *bitmap; | 162 | unsigned long *bitmap; |
157 | unsigned long bitmap_len; | 163 | unsigned long bitmap_len; |
@@ -160,14 +166,16 @@ struct cow { | |||
160 | }; | 166 | }; |
161 | 167 | ||
162 | struct ubd { | 168 | struct ubd { |
169 | /* name (and fd, below) of the file opened for writing, either the | ||
170 | * backing or the cow file. */ | ||
163 | char *file; | 171 | char *file; |
164 | int count; | 172 | int count; |
165 | int fd; | 173 | int fd; |
166 | __u64 size; | 174 | __u64 size; |
167 | struct openflags boot_openflags; | 175 | struct openflags boot_openflags; |
168 | struct openflags openflags; | 176 | struct openflags openflags; |
169 | int shared; | 177 | unsigned shared:1; |
170 | int no_cow; | 178 | unsigned no_cow:1; |
171 | struct cow cow; | 179 | struct cow cow; |
172 | struct platform_device pdev; | 180 | struct platform_device pdev; |
173 | }; | 181 | }; |
@@ -192,18 +200,7 @@ struct ubd { | |||
192 | .cow = DEFAULT_COW, \ | 200 | .cow = DEFAULT_COW, \ |
193 | } | 201 | } |
194 | 202 | ||
195 | struct ubd ubd_dev[MAX_DEV] = { [ 0 ... MAX_DEV - 1 ] = DEFAULT_UBD }; | 203 | struct ubd ubd_devs[MAX_DEV] = { [ 0 ... MAX_DEV - 1 ] = DEFAULT_UBD }; |
196 | |||
197 | static int ubd0_init(void) | ||
198 | { | ||
199 | struct ubd *dev = &ubd_dev[0]; | ||
200 | |||
201 | if(dev->file == NULL) | ||
202 | dev->file = "root_fs"; | ||
203 | return(0); | ||
204 | } | ||
205 | |||
206 | __initcall(ubd0_init); | ||
207 | 204 | ||
208 | /* Only changed by fake_ide_setup which is a setup */ | 205 | /* Only changed by fake_ide_setup which is a setup */ |
209 | static int fake_ide = 0; | 206 | static int fake_ide = 0; |
@@ -277,7 +274,7 @@ static int parse_unit(char **ptr) | |||
277 | return(-1); | 274 | return(-1); |
278 | *ptr = end; | 275 | *ptr = end; |
279 | } | 276 | } |
280 | else if (('a' <= *str) && (*str <= 'h')) { | 277 | else if (('a' <= *str) && (*str <= 'z')) { |
281 | n = *str - 'a'; | 278 | n = *str - 'a'; |
282 | str++; | 279 | str++; |
283 | *ptr = str; | 280 | *ptr = str; |
@@ -285,9 +282,13 @@ static int parse_unit(char **ptr) | |||
285 | return(n); | 282 | return(n); |
286 | } | 283 | } |
287 | 284 | ||
285 | /* If *index_out == -1 at exit, the passed option was a general one; | ||
286 | * otherwise, the str pointer is used (and owned) inside ubd_devs array, so it | ||
287 | * should not be freed on exit. | ||
288 | */ | ||
288 | static int ubd_setup_common(char *str, int *index_out) | 289 | static int ubd_setup_common(char *str, int *index_out) |
289 | { | 290 | { |
290 | struct ubd *dev; | 291 | struct ubd *ubd_dev; |
291 | struct openflags flags = global_openflags; | 292 | struct openflags flags = global_openflags; |
292 | char *backing_file; | 293 | char *backing_file; |
293 | int n, err, i; | 294 | int n, err, i; |
@@ -311,7 +312,7 @@ static int ubd_setup_common(char *str, int *index_out) | |||
311 | } | 312 | } |
312 | 313 | ||
313 | err = 1; | 314 | err = 1; |
314 | spin_lock(&ubd_lock); | 315 | mutex_lock(&ubd_lock); |
315 | if(fake_major != MAJOR_NR){ | 316 | if(fake_major != MAJOR_NR){ |
316 | printk(KERN_ERR "Can't assign a fake major twice\n"); | 317 | printk(KERN_ERR "Can't assign a fake major twice\n"); |
317 | goto out1; | 318 | goto out1; |
@@ -323,7 +324,7 @@ static int ubd_setup_common(char *str, int *index_out) | |||
323 | major); | 324 | major); |
324 | err = 0; | 325 | err = 0; |
325 | out1: | 326 | out1: |
326 | spin_unlock(&ubd_lock); | 327 | mutex_unlock(&ubd_lock); |
327 | return(err); | 328 | return(err); |
328 | } | 329 | } |
329 | 330 | ||
@@ -340,10 +341,10 @@ static int ubd_setup_common(char *str, int *index_out) | |||
340 | } | 341 | } |
341 | 342 | ||
342 | err = 1; | 343 | err = 1; |
343 | spin_lock(&ubd_lock); | 344 | mutex_lock(&ubd_lock); |
344 | 345 | ||
345 | dev = &ubd_dev[n]; | 346 | ubd_dev = &ubd_devs[n]; |
346 | if(dev->file != NULL){ | 347 | if(ubd_dev->file != NULL){ |
347 | printk(KERN_ERR "ubd_setup : device already configured\n"); | 348 | printk(KERN_ERR "ubd_setup : device already configured\n"); |
348 | goto out; | 349 | goto out; |
349 | } | 350 | } |
@@ -360,10 +361,10 @@ static int ubd_setup_common(char *str, int *index_out) | |||
360 | flags.s = 1; | 361 | flags.s = 1; |
361 | break; | 362 | break; |
362 | case 'd': | 363 | case 'd': |
363 | dev->no_cow = 1; | 364 | ubd_dev->no_cow = 1; |
364 | break; | 365 | break; |
365 | case 'c': | 366 | case 'c': |
366 | dev->shared = 1; | 367 | ubd_dev->shared = 1; |
367 | break; | 368 | break; |
368 | case '=': | 369 | case '=': |
369 | str++; | 370 | str++; |
@@ -390,7 +391,7 @@ break_loop: | |||
390 | } | 391 | } |
391 | 392 | ||
392 | if(backing_file){ | 393 | if(backing_file){ |
393 | if(dev->no_cow) | 394 | if(ubd_dev->no_cow) |
394 | printk(KERN_ERR "Can't specify both 'd' and a " | 395 | printk(KERN_ERR "Can't specify both 'd' and a " |
395 | "cow file\n"); | 396 | "cow file\n"); |
396 | else { | 397 | else { |
@@ -398,11 +399,11 @@ break_loop: | |||
398 | backing_file++; | 399 | backing_file++; |
399 | } | 400 | } |
400 | } | 401 | } |
401 | dev->file = str; | 402 | ubd_dev->file = str; |
402 | dev->cow.file = backing_file; | 403 | ubd_dev->cow.file = backing_file; |
403 | dev->boot_openflags = flags; | 404 | ubd_dev->boot_openflags = flags; |
404 | out: | 405 | out: |
405 | spin_unlock(&ubd_lock); | 406 | mutex_unlock(&ubd_lock); |
406 | return(err); | 407 | return(err); |
407 | } | 408 | } |
408 | 409 | ||
@@ -472,8 +473,9 @@ int thread_fd = -1; | |||
472 | 473 | ||
473 | /* Changed by ubd_handler, which is serialized because interrupts only | 474 | /* Changed by ubd_handler, which is serialized because interrupts only |
474 | * happen on CPU 0. | 475 | * happen on CPU 0. |
476 | * XXX: currently unused. | ||
475 | */ | 477 | */ |
476 | int intr_count = 0; | 478 | static int intr_count = 0; |
477 | 479 | ||
478 | /* call ubd_finish if you need to serialize */ | 480 | /* call ubd_finish if you need to serialize */ |
479 | static void __ubd_finish(struct request *req, int error) | 481 | static void __ubd_finish(struct request *req, int error) |
@@ -493,6 +495,8 @@ static void __ubd_finish(struct request *req, int error) | |||
493 | end_request(req, 1); | 495 | end_request(req, 1); |
494 | } | 496 | } |
495 | 497 | ||
498 | /* Callable only from interrupt context - otherwise you need to do | ||
499 | * spin_lock_irq()/spin_lock_irqsave() */ | ||
496 | static inline void ubd_finish(struct request *req, int error) | 500 | static inline void ubd_finish(struct request *req, int error) |
497 | { | 501 | { |
498 | spin_lock(&ubd_io_lock); | 502 | spin_lock(&ubd_io_lock); |
@@ -500,14 +504,15 @@ static inline void ubd_finish(struct request *req, int error) | |||
500 | spin_unlock(&ubd_io_lock); | 504 | spin_unlock(&ubd_io_lock); |
501 | } | 505 | } |
502 | 506 | ||
503 | /* Called without ubd_io_lock held */ | 507 | /* XXX - move this inside ubd_intr. */ |
508 | /* Called without ubd_io_lock held, and only in interrupt context. */ | ||
504 | static void ubd_handler(void) | 509 | static void ubd_handler(void) |
505 | { | 510 | { |
506 | struct io_thread_req req; | 511 | struct io_thread_req req; |
507 | struct request *rq = elv_next_request(ubd_queue); | 512 | struct request *rq = elv_next_request(ubd_queue); |
508 | int n; | 513 | int n; |
509 | 514 | ||
510 | do_ubd = NULL; | 515 | do_ubd = 0; |
511 | intr_count++; | 516 | intr_count++; |
512 | n = os_read_file(thread_fd, &req, sizeof(req)); | 517 | n = os_read_file(thread_fd, &req, sizeof(req)); |
513 | if(n != sizeof(req)){ | 518 | if(n != sizeof(req)){ |
@@ -521,7 +526,9 @@ static void ubd_handler(void) | |||
521 | 526 | ||
522 | ubd_finish(rq, req.error); | 527 | ubd_finish(rq, req.error); |
523 | reactivate_fd(thread_fd, UBD_IRQ); | 528 | reactivate_fd(thread_fd, UBD_IRQ); |
529 | spin_lock(&ubd_io_lock); | ||
524 | do_ubd_request(ubd_queue); | 530 | do_ubd_request(ubd_queue); |
531 | spin_unlock(&ubd_io_lock); | ||
525 | } | 532 | } |
526 | 533 | ||
527 | static irqreturn_t ubd_intr(int irq, void *dev) | 534 | static irqreturn_t ubd_intr(int irq, void *dev) |
@@ -541,87 +548,90 @@ void kill_io_thread(void) | |||
541 | 548 | ||
542 | __uml_exitcall(kill_io_thread); | 549 | __uml_exitcall(kill_io_thread); |
543 | 550 | ||
544 | static int ubd_file_size(struct ubd *dev, __u64 *size_out) | 551 | static inline int ubd_file_size(struct ubd *ubd_dev, __u64 *size_out) |
545 | { | 552 | { |
546 | char *file; | 553 | char *file; |
547 | 554 | ||
548 | file = dev->cow.file ? dev->cow.file : dev->file; | 555 | file = ubd_dev->cow.file ? ubd_dev->cow.file : ubd_dev->file; |
549 | return(os_file_size(file, size_out)); | 556 | return(os_file_size(file, size_out)); |
550 | } | 557 | } |
551 | 558 | ||
552 | static void ubd_close(struct ubd *dev) | 559 | static void ubd_close_dev(struct ubd *ubd_dev) |
553 | { | 560 | { |
554 | os_close_file(dev->fd); | 561 | os_close_file(ubd_dev->fd); |
555 | if(dev->cow.file == NULL) | 562 | if(ubd_dev->cow.file == NULL) |
556 | return; | 563 | return; |
557 | 564 | ||
558 | os_close_file(dev->cow.fd); | 565 | os_close_file(ubd_dev->cow.fd); |
559 | vfree(dev->cow.bitmap); | 566 | vfree(ubd_dev->cow.bitmap); |
560 | dev->cow.bitmap = NULL; | 567 | ubd_dev->cow.bitmap = NULL; |
561 | } | 568 | } |
562 | 569 | ||
563 | static int ubd_open_dev(struct ubd *dev) | 570 | static int ubd_open_dev(struct ubd *ubd_dev) |
564 | { | 571 | { |
565 | struct openflags flags; | 572 | struct openflags flags; |
566 | char **back_ptr; | 573 | char **back_ptr; |
567 | int err, create_cow, *create_ptr; | 574 | int err, create_cow, *create_ptr; |
575 | int fd; | ||
568 | 576 | ||
569 | dev->openflags = dev->boot_openflags; | 577 | ubd_dev->openflags = ubd_dev->boot_openflags; |
570 | create_cow = 0; | 578 | create_cow = 0; |
571 | create_ptr = (dev->cow.file != NULL) ? &create_cow : NULL; | 579 | create_ptr = (ubd_dev->cow.file != NULL) ? &create_cow : NULL; |
572 | back_ptr = dev->no_cow ? NULL : &dev->cow.file; | 580 | back_ptr = ubd_dev->no_cow ? NULL : &ubd_dev->cow.file; |
573 | dev->fd = open_ubd_file(dev->file, &dev->openflags, dev->shared, | 581 | |
574 | back_ptr, &dev->cow.bitmap_offset, | 582 | fd = open_ubd_file(ubd_dev->file, &ubd_dev->openflags, ubd_dev->shared, |
575 | &dev->cow.bitmap_len, &dev->cow.data_offset, | 583 | back_ptr, &ubd_dev->cow.bitmap_offset, |
584 | &ubd_dev->cow.bitmap_len, &ubd_dev->cow.data_offset, | ||
576 | create_ptr); | 585 | create_ptr); |
577 | 586 | ||
578 | if((dev->fd == -ENOENT) && create_cow){ | 587 | if((fd == -ENOENT) && create_cow){ |
579 | dev->fd = create_cow_file(dev->file, dev->cow.file, | 588 | fd = create_cow_file(ubd_dev->file, ubd_dev->cow.file, |
580 | dev->openflags, 1 << 9, PAGE_SIZE, | 589 | ubd_dev->openflags, 1 << 9, PAGE_SIZE, |
581 | &dev->cow.bitmap_offset, | 590 | &ubd_dev->cow.bitmap_offset, |
582 | &dev->cow.bitmap_len, | 591 | &ubd_dev->cow.bitmap_len, |
583 | &dev->cow.data_offset); | 592 | &ubd_dev->cow.data_offset); |
584 | if(dev->fd >= 0){ | 593 | if(fd >= 0){ |
585 | printk(KERN_INFO "Creating \"%s\" as COW file for " | 594 | printk(KERN_INFO "Creating \"%s\" as COW file for " |
586 | "\"%s\"\n", dev->file, dev->cow.file); | 595 | "\"%s\"\n", ubd_dev->file, ubd_dev->cow.file); |
587 | } | 596 | } |
588 | } | 597 | } |
589 | 598 | ||
590 | if(dev->fd < 0){ | 599 | if(fd < 0){ |
591 | printk("Failed to open '%s', errno = %d\n", dev->file, | 600 | printk("Failed to open '%s', errno = %d\n", ubd_dev->file, |
592 | -dev->fd); | 601 | -fd); |
593 | return(dev->fd); | 602 | return fd; |
594 | } | 603 | } |
604 | ubd_dev->fd = fd; | ||
595 | 605 | ||
596 | if(dev->cow.file != NULL){ | 606 | if(ubd_dev->cow.file != NULL){ |
597 | err = -ENOMEM; | 607 | err = -ENOMEM; |
598 | dev->cow.bitmap = (void *) vmalloc(dev->cow.bitmap_len); | 608 | ubd_dev->cow.bitmap = (void *) vmalloc(ubd_dev->cow.bitmap_len); |
599 | if(dev->cow.bitmap == NULL){ | 609 | if(ubd_dev->cow.bitmap == NULL){ |
600 | printk(KERN_ERR "Failed to vmalloc COW bitmap\n"); | 610 | printk(KERN_ERR "Failed to vmalloc COW bitmap\n"); |
601 | goto error; | 611 | goto error; |
602 | } | 612 | } |
603 | flush_tlb_kernel_vm(); | 613 | flush_tlb_kernel_vm(); |
604 | 614 | ||
605 | err = read_cow_bitmap(dev->fd, dev->cow.bitmap, | 615 | err = read_cow_bitmap(ubd_dev->fd, ubd_dev->cow.bitmap, |
606 | dev->cow.bitmap_offset, | 616 | ubd_dev->cow.bitmap_offset, |
607 | dev->cow.bitmap_len); | 617 | ubd_dev->cow.bitmap_len); |
608 | if(err < 0) | 618 | if(err < 0) |
609 | goto error; | 619 | goto error; |
610 | 620 | ||
611 | flags = dev->openflags; | 621 | flags = ubd_dev->openflags; |
612 | flags.w = 0; | 622 | flags.w = 0; |
613 | err = open_ubd_file(dev->cow.file, &flags, dev->shared, NULL, | 623 | err = open_ubd_file(ubd_dev->cow.file, &flags, ubd_dev->shared, NULL, |
614 | NULL, NULL, NULL, NULL); | 624 | NULL, NULL, NULL, NULL); |
615 | if(err < 0) goto error; | 625 | if(err < 0) goto error; |
616 | dev->cow.fd = err; | 626 | ubd_dev->cow.fd = err; |
617 | } | 627 | } |
618 | return(0); | 628 | return(0); |
619 | error: | 629 | error: |
620 | os_close_file(dev->fd); | 630 | os_close_file(ubd_dev->fd); |
621 | return(err); | 631 | return(err); |
622 | } | 632 | } |
623 | 633 | ||
624 | static int ubd_new_disk(int major, u64 size, int unit, | 634 | static int ubd_disk_register(int major, u64 size, int unit, |
625 | struct gendisk **disk_out) | 635 | struct gendisk **disk_out) |
626 | 636 | ||
627 | { | 637 | { |
@@ -642,13 +652,13 @@ static int ubd_new_disk(int major, u64 size, int unit, | |||
642 | 652 | ||
643 | /* sysfs register (not for ide fake devices) */ | 653 | /* sysfs register (not for ide fake devices) */ |
644 | if (major == MAJOR_NR) { | 654 | if (major == MAJOR_NR) { |
645 | ubd_dev[unit].pdev.id = unit; | 655 | ubd_devs[unit].pdev.id = unit; |
646 | ubd_dev[unit].pdev.name = DRIVER_NAME; | 656 | ubd_devs[unit].pdev.name = DRIVER_NAME; |
647 | platform_device_register(&ubd_dev[unit].pdev); | 657 | platform_device_register(&ubd_devs[unit].pdev); |
648 | disk->driverfs_dev = &ubd_dev[unit].pdev.dev; | 658 | disk->driverfs_dev = &ubd_devs[unit].pdev.dev; |
649 | } | 659 | } |
650 | 660 | ||
651 | disk->private_data = &ubd_dev[unit]; | 661 | disk->private_data = &ubd_devs[unit]; |
652 | disk->queue = ubd_queue; | 662 | disk->queue = ubd_queue; |
653 | add_disk(disk); | 663 | add_disk(disk); |
654 | 664 | ||
@@ -660,25 +670,25 @@ static int ubd_new_disk(int major, u64 size, int unit, | |||
660 | 670 | ||
661 | static int ubd_add(int n) | 671 | static int ubd_add(int n) |
662 | { | 672 | { |
663 | struct ubd *dev = &ubd_dev[n]; | 673 | struct ubd *ubd_dev = &ubd_devs[n]; |
664 | int err; | 674 | int err; |
665 | 675 | ||
666 | err = -ENODEV; | 676 | err = -ENODEV; |
667 | if(dev->file == NULL) | 677 | if(ubd_dev->file == NULL) |
668 | goto out; | 678 | goto out; |
669 | 679 | ||
670 | err = ubd_file_size(dev, &dev->size); | 680 | err = ubd_file_size(ubd_dev, &ubd_dev->size); |
671 | if(err < 0) | 681 | if(err < 0) |
672 | goto out; | 682 | goto out; |
673 | 683 | ||
674 | dev->size = ROUND_BLOCK(dev->size); | 684 | ubd_dev->size = ROUND_BLOCK(ubd_dev->size); |
675 | 685 | ||
676 | err = ubd_new_disk(MAJOR_NR, dev->size, n, &ubd_gendisk[n]); | 686 | err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]); |
677 | if(err) | 687 | if(err) |
678 | goto out; | 688 | goto out; |
679 | 689 | ||
680 | if(fake_major != MAJOR_NR) | 690 | if(fake_major != MAJOR_NR) |
681 | ubd_new_disk(fake_major, dev->size, n, | 691 | ubd_disk_register(fake_major, ubd_dev->size, n, |
682 | &fake_gendisk[n]); | 692 | &fake_gendisk[n]); |
683 | 693 | ||
684 | /* perhaps this should also be under the "if (fake_major)" above */ | 694 | /* perhaps this should also be under the "if (fake_major)" above */ |
@@ -693,32 +703,41 @@ out: | |||
693 | 703 | ||
694 | static int ubd_config(char *str) | 704 | static int ubd_config(char *str) |
695 | { | 705 | { |
696 | int n, err; | 706 | int n, ret; |
697 | 707 | ||
698 | str = kstrdup(str, GFP_KERNEL); | 708 | str = kstrdup(str, GFP_KERNEL); |
699 | if(str == NULL){ | 709 | if (str == NULL) { |
700 | printk(KERN_ERR "ubd_config failed to strdup string\n"); | 710 | printk(KERN_ERR "ubd_config failed to strdup string\n"); |
701 | return(1); | 711 | ret = 1; |
712 | goto out; | ||
702 | } | 713 | } |
703 | err = ubd_setup_common(str, &n); | 714 | ret = ubd_setup_common(str, &n); |
704 | if(err){ | 715 | if (ret) { |
705 | kfree(str); | 716 | ret = -1; |
706 | return(-1); | 717 | goto err_free; |
718 | } | ||
719 | if (n == -1) { | ||
720 | ret = 0; | ||
721 | goto err_free; | ||
707 | } | 722 | } |
708 | if(n == -1) return(0); | ||
709 | 723 | ||
710 | spin_lock(&ubd_lock); | 724 | mutex_lock(&ubd_lock); |
711 | err = ubd_add(n); | 725 | ret = ubd_add(n); |
712 | if(err) | 726 | if (ret) |
713 | ubd_dev[n].file = NULL; | 727 | ubd_devs[n].file = NULL; |
714 | spin_unlock(&ubd_lock); | 728 | mutex_unlock(&ubd_lock); |
715 | 729 | ||
716 | return(err); | 730 | out: |
731 | return ret; | ||
732 | |||
733 | err_free: | ||
734 | kfree(str); | ||
735 | goto out; | ||
717 | } | 736 | } |
718 | 737 | ||
719 | static int ubd_get_config(char *name, char *str, int size, char **error_out) | 738 | static int ubd_get_config(char *name, char *str, int size, char **error_out) |
720 | { | 739 | { |
721 | struct ubd *dev; | 740 | struct ubd *ubd_dev; |
722 | int n, len = 0; | 741 | int n, len = 0; |
723 | 742 | ||
724 | n = parse_unit(&name); | 743 | n = parse_unit(&name); |
@@ -727,24 +746,24 @@ static int ubd_get_config(char *name, char *str, int size, char **error_out) | |||
727 | return(-1); | 746 | return(-1); |
728 | } | 747 | } |
729 | 748 | ||
730 | dev = &ubd_dev[n]; | 749 | ubd_dev = &ubd_devs[n]; |
731 | spin_lock(&ubd_lock); | 750 | mutex_lock(&ubd_lock); |
732 | 751 | ||
733 | if(dev->file == NULL){ | 752 | if(ubd_dev->file == NULL){ |
734 | CONFIG_CHUNK(str, size, len, "", 1); | 753 | CONFIG_CHUNK(str, size, len, "", 1); |
735 | goto out; | 754 | goto out; |
736 | } | 755 | } |
737 | 756 | ||
738 | CONFIG_CHUNK(str, size, len, dev->file, 0); | 757 | CONFIG_CHUNK(str, size, len, ubd_dev->file, 0); |
739 | 758 | ||
740 | if(dev->cow.file != NULL){ | 759 | if(ubd_dev->cow.file != NULL){ |
741 | CONFIG_CHUNK(str, size, len, ",", 0); | 760 | CONFIG_CHUNK(str, size, len, ",", 0); |
742 | CONFIG_CHUNK(str, size, len, dev->cow.file, 1); | 761 | CONFIG_CHUNK(str, size, len, ubd_dev->cow.file, 1); |
743 | } | 762 | } |
744 | else CONFIG_CHUNK(str, size, len, "", 1); | 763 | else CONFIG_CHUNK(str, size, len, "", 1); |
745 | 764 | ||
746 | out: | 765 | out: |
747 | spin_unlock(&ubd_lock); | 766 | mutex_unlock(&ubd_lock); |
748 | return(len); | 767 | return(len); |
749 | } | 768 | } |
750 | 769 | ||
@@ -760,22 +779,22 @@ static int ubd_id(char **str, int *start_out, int *end_out) | |||
760 | 779 | ||
761 | static int ubd_remove(int n) | 780 | static int ubd_remove(int n) |
762 | { | 781 | { |
763 | struct ubd *dev; | 782 | struct ubd *ubd_dev; |
764 | int err = -ENODEV; | 783 | int err = -ENODEV; |
765 | 784 | ||
766 | spin_lock(&ubd_lock); | 785 | mutex_lock(&ubd_lock); |
767 | 786 | ||
768 | if(ubd_gendisk[n] == NULL) | 787 | if(ubd_gendisk[n] == NULL) |
769 | goto out; | 788 | goto out; |
770 | 789 | ||
771 | dev = &ubd_dev[n]; | 790 | ubd_dev = &ubd_devs[n]; |
772 | 791 | ||
773 | if(dev->file == NULL) | 792 | if(ubd_dev->file == NULL) |
774 | goto out; | 793 | goto out; |
775 | 794 | ||
776 | /* you cannot remove a open disk */ | 795 | /* you cannot remove a open disk */ |
777 | err = -EBUSY; | 796 | err = -EBUSY; |
778 | if(dev->count > 0) | 797 | if(ubd_dev->count > 0) |
779 | goto out; | 798 | goto out; |
780 | 799 | ||
781 | del_gendisk(ubd_gendisk[n]); | 800 | del_gendisk(ubd_gendisk[n]); |
@@ -788,14 +807,15 @@ static int ubd_remove(int n) | |||
788 | fake_gendisk[n] = NULL; | 807 | fake_gendisk[n] = NULL; |
789 | } | 808 | } |
790 | 809 | ||
791 | platform_device_unregister(&dev->pdev); | 810 | platform_device_unregister(&ubd_dev->pdev); |
792 | *dev = ((struct ubd) DEFAULT_UBD); | 811 | *ubd_dev = ((struct ubd) DEFAULT_UBD); |
793 | err = 0; | 812 | err = 0; |
794 | out: | 813 | out: |
795 | spin_unlock(&ubd_lock); | 814 | mutex_unlock(&ubd_lock); |
796 | return err; | 815 | return err; |
797 | } | 816 | } |
798 | 817 | ||
818 | /* All these are called by mconsole in process context and without ubd-specific locks. */ | ||
799 | static struct mc_device ubd_mc = { | 819 | static struct mc_device ubd_mc = { |
800 | .name = "ubd", | 820 | .name = "ubd", |
801 | .config = ubd_config, | 821 | .config = ubd_config, |
@@ -804,7 +824,7 @@ static struct mc_device ubd_mc = { | |||
804 | .remove = ubd_remove, | 824 | .remove = ubd_remove, |
805 | }; | 825 | }; |
806 | 826 | ||
807 | static int ubd_mc_init(void) | 827 | static int __init ubd_mc_init(void) |
808 | { | 828 | { |
809 | mconsole_register_dev(&ubd_mc); | 829 | mconsole_register_dev(&ubd_mc); |
810 | return 0; | 830 | return 0; |
@@ -812,13 +832,24 @@ static int ubd_mc_init(void) | |||
812 | 832 | ||
813 | __initcall(ubd_mc_init); | 833 | __initcall(ubd_mc_init); |
814 | 834 | ||
835 | static int __init ubd0_init(void) | ||
836 | { | ||
837 | struct ubd *ubd_dev = &ubd_devs[0]; | ||
838 | |||
839 | if(ubd_dev->file == NULL) | ||
840 | ubd_dev->file = "root_fs"; | ||
841 | return(0); | ||
842 | } | ||
843 | |||
844 | __initcall(ubd0_init); | ||
845 | |||
815 | static struct platform_driver ubd_driver = { | 846 | static struct platform_driver ubd_driver = { |
816 | .driver = { | 847 | .driver = { |
817 | .name = DRIVER_NAME, | 848 | .name = DRIVER_NAME, |
818 | }, | 849 | }, |
819 | }; | 850 | }; |
820 | 851 | ||
821 | int ubd_init(void) | 852 | static int __init ubd_init(void) |
822 | { | 853 | { |
823 | int i; | 854 | int i; |
824 | 855 | ||
@@ -846,7 +877,7 @@ int ubd_init(void) | |||
846 | 877 | ||
847 | late_initcall(ubd_init); | 878 | late_initcall(ubd_init); |
848 | 879 | ||
849 | int ubd_driver_init(void){ | 880 | static int __init ubd_driver_init(void){ |
850 | unsigned long stack; | 881 | unsigned long stack; |
851 | int err; | 882 | int err; |
852 | 883 | ||
@@ -867,7 +898,7 @@ int ubd_driver_init(void){ | |||
867 | return(0); | 898 | return(0); |
868 | } | 899 | } |
869 | err = um_request_irq(UBD_IRQ, thread_fd, IRQ_READ, ubd_intr, | 900 | err = um_request_irq(UBD_IRQ, thread_fd, IRQ_READ, ubd_intr, |
870 | IRQF_DISABLED, "ubd", ubd_dev); | 901 | IRQF_DISABLED, "ubd", ubd_devs); |
871 | if(err != 0) | 902 | if(err != 0) |
872 | printk(KERN_ERR "um_request_irq failed - errno = %d\n", -err); | 903 | printk(KERN_ERR "um_request_irq failed - errno = %d\n", -err); |
873 | return 0; | 904 | return 0; |
@@ -878,24 +909,24 @@ device_initcall(ubd_driver_init); | |||
878 | static int ubd_open(struct inode *inode, struct file *filp) | 909 | static int ubd_open(struct inode *inode, struct file *filp) |
879 | { | 910 | { |
880 | struct gendisk *disk = inode->i_bdev->bd_disk; | 911 | struct gendisk *disk = inode->i_bdev->bd_disk; |
881 | struct ubd *dev = disk->private_data; | 912 | struct ubd *ubd_dev = disk->private_data; |
882 | int err = 0; | 913 | int err = 0; |
883 | 914 | ||
884 | if(dev->count == 0){ | 915 | if(ubd_dev->count == 0){ |
885 | err = ubd_open_dev(dev); | 916 | err = ubd_open_dev(ubd_dev); |
886 | if(err){ | 917 | if(err){ |
887 | printk(KERN_ERR "%s: Can't open \"%s\": errno = %d\n", | 918 | printk(KERN_ERR "%s: Can't open \"%s\": errno = %d\n", |
888 | disk->disk_name, dev->file, -err); | 919 | disk->disk_name, ubd_dev->file, -err); |
889 | goto out; | 920 | goto out; |
890 | } | 921 | } |
891 | } | 922 | } |
892 | dev->count++; | 923 | ubd_dev->count++; |
893 | set_disk_ro(disk, !dev->openflags.w); | 924 | set_disk_ro(disk, !ubd_dev->openflags.w); |
894 | 925 | ||
895 | /* This should no more be needed. And it didn't work anyway to exclude | 926 | /* This should no more be needed. And it didn't work anyway to exclude |
896 | * read-write remounting of filesystems.*/ | 927 | * read-write remounting of filesystems.*/ |
897 | /*if((filp->f_mode & FMODE_WRITE) && !dev->openflags.w){ | 928 | /*if((filp->f_mode & FMODE_WRITE) && !ubd_dev->openflags.w){ |
898 | if(--dev->count == 0) ubd_close(dev); | 929 | if(--ubd_dev->count == 0) ubd_close_dev(ubd_dev); |
899 | err = -EROFS; | 930 | err = -EROFS; |
900 | }*/ | 931 | }*/ |
901 | out: | 932 | out: |
@@ -905,10 +936,10 @@ static int ubd_open(struct inode *inode, struct file *filp) | |||
905 | static int ubd_release(struct inode * inode, struct file * file) | 936 | static int ubd_release(struct inode * inode, struct file * file) |
906 | { | 937 | { |
907 | struct gendisk *disk = inode->i_bdev->bd_disk; | 938 | struct gendisk *disk = inode->i_bdev->bd_disk; |
908 | struct ubd *dev = disk->private_data; | 939 | struct ubd *ubd_dev = disk->private_data; |
909 | 940 | ||
910 | if(--dev->count == 0) | 941 | if(--ubd_dev->count == 0) |
911 | ubd_close(dev); | 942 | ubd_close_dev(ubd_dev); |
912 | return(0); | 943 | return(0); |
913 | } | 944 | } |
914 | 945 | ||
@@ -976,12 +1007,12 @@ static void cowify_req(struct io_thread_req *req, unsigned long *bitmap, | |||
976 | static int prepare_request(struct request *req, struct io_thread_req *io_req) | 1007 | static int prepare_request(struct request *req, struct io_thread_req *io_req) |
977 | { | 1008 | { |
978 | struct gendisk *disk = req->rq_disk; | 1009 | struct gendisk *disk = req->rq_disk; |
979 | struct ubd *dev = disk->private_data; | 1010 | struct ubd *ubd_dev = disk->private_data; |
980 | __u64 offset; | 1011 | __u64 offset; |
981 | int len; | 1012 | int len; |
982 | 1013 | ||
983 | /* This should be impossible now */ | 1014 | /* This should be impossible now */ |
984 | if((rq_data_dir(req) == WRITE) && !dev->openflags.w){ | 1015 | if((rq_data_dir(req) == WRITE) && !ubd_dev->openflags.w){ |
985 | printk("Write attempted on readonly ubd device %s\n", | 1016 | printk("Write attempted on readonly ubd device %s\n", |
986 | disk->disk_name); | 1017 | disk->disk_name); |
987 | end_request(req, 0); | 1018 | end_request(req, 0); |
@@ -991,8 +1022,8 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req) | |||
991 | offset = ((__u64) req->sector) << 9; | 1022 | offset = ((__u64) req->sector) << 9; |
992 | len = req->current_nr_sectors << 9; | 1023 | len = req->current_nr_sectors << 9; |
993 | 1024 | ||
994 | io_req->fds[0] = (dev->cow.file != NULL) ? dev->cow.fd : dev->fd; | 1025 | io_req->fds[0] = (ubd_dev->cow.file != NULL) ? ubd_dev->cow.fd : ubd_dev->fd; |
995 | io_req->fds[1] = dev->fd; | 1026 | io_req->fds[1] = ubd_dev->fd; |
996 | io_req->cow_offset = -1; | 1027 | io_req->cow_offset = -1; |
997 | io_req->offset = offset; | 1028 | io_req->offset = offset; |
998 | io_req->length = len; | 1029 | io_req->length = len; |
@@ -1001,13 +1032,13 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req) | |||
1001 | 1032 | ||
1002 | io_req->op = (rq_data_dir(req) == READ) ? UBD_READ : UBD_WRITE; | 1033 | io_req->op = (rq_data_dir(req) == READ) ? UBD_READ : UBD_WRITE; |
1003 | io_req->offsets[0] = 0; | 1034 | io_req->offsets[0] = 0; |
1004 | io_req->offsets[1] = dev->cow.data_offset; | 1035 | io_req->offsets[1] = ubd_dev->cow.data_offset; |
1005 | io_req->buffer = req->buffer; | 1036 | io_req->buffer = req->buffer; |
1006 | io_req->sectorsize = 1 << 9; | 1037 | io_req->sectorsize = 1 << 9; |
1007 | 1038 | ||
1008 | if(dev->cow.file != NULL) | 1039 | if(ubd_dev->cow.file != NULL) |
1009 | cowify_req(io_req, dev->cow.bitmap, dev->cow.bitmap_offset, | 1040 | cowify_req(io_req, ubd_dev->cow.bitmap, ubd_dev->cow.bitmap_offset, |
1010 | dev->cow.bitmap_len); | 1041 | ubd_dev->cow.bitmap_len); |
1011 | 1042 | ||
1012 | return(0); | 1043 | return(0); |
1013 | } | 1044 | } |
@@ -1033,7 +1064,7 @@ static void do_ubd_request(request_queue_t *q) | |||
1033 | return; | 1064 | return; |
1034 | err = prepare_request(req, &io_req); | 1065 | err = prepare_request(req, &io_req); |
1035 | if(!err){ | 1066 | if(!err){ |
1036 | do_ubd = ubd_handler; | 1067 | do_ubd = 1; |
1037 | n = os_write_file(thread_fd, (char *) &io_req, | 1068 | n = os_write_file(thread_fd, (char *) &io_req, |
1038 | sizeof(io_req)); | 1069 | sizeof(io_req)); |
1039 | if(n != sizeof(io_req)) | 1070 | if(n != sizeof(io_req)) |
@@ -1045,18 +1076,18 @@ static void do_ubd_request(request_queue_t *q) | |||
1045 | 1076 | ||
1046 | static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo) | 1077 | static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo) |
1047 | { | 1078 | { |
1048 | struct ubd *dev = bdev->bd_disk->private_data; | 1079 | struct ubd *ubd_dev = bdev->bd_disk->private_data; |
1049 | 1080 | ||
1050 | geo->heads = 128; | 1081 | geo->heads = 128; |
1051 | geo->sectors = 32; | 1082 | geo->sectors = 32; |
1052 | geo->cylinders = dev->size / (128 * 32 * 512); | 1083 | geo->cylinders = ubd_dev->size / (128 * 32 * 512); |
1053 | return 0; | 1084 | return 0; |
1054 | } | 1085 | } |
1055 | 1086 | ||
1056 | static int ubd_ioctl(struct inode * inode, struct file * file, | 1087 | static int ubd_ioctl(struct inode * inode, struct file * file, |
1057 | unsigned int cmd, unsigned long arg) | 1088 | unsigned int cmd, unsigned long arg) |
1058 | { | 1089 | { |
1059 | struct ubd *dev = inode->i_bdev->bd_disk->private_data; | 1090 | struct ubd *ubd_dev = inode->i_bdev->bd_disk->private_data; |
1060 | struct hd_driveid ubd_id = { | 1091 | struct hd_driveid ubd_id = { |
1061 | .cyls = 0, | 1092 | .cyls = 0, |
1062 | .heads = 128, | 1093 | .heads = 128, |
@@ -1066,7 +1097,7 @@ static int ubd_ioctl(struct inode * inode, struct file * file, | |||
1066 | switch (cmd) { | 1097 | switch (cmd) { |
1067 | struct cdrom_volctrl volume; | 1098 | struct cdrom_volctrl volume; |
1068 | case HDIO_GET_IDENTITY: | 1099 | case HDIO_GET_IDENTITY: |
1069 | ubd_id.cyls = dev->size / (128 * 32 * 512); | 1100 | ubd_id.cyls = ubd_dev->size / (128 * 32 * 512); |
1070 | if(copy_to_user((char __user *) arg, (char *) &ubd_id, | 1101 | if(copy_to_user((char __user *) arg, (char *) &ubd_id, |
1071 | sizeof(ubd_id))) | 1102 | sizeof(ubd_id))) |
1072 | return(-EFAULT); | 1103 | return(-EFAULT); |
@@ -1353,8 +1384,8 @@ void do_io(struct io_thread_req *req) | |||
1353 | */ | 1384 | */ |
1354 | int kernel_fd = -1; | 1385 | int kernel_fd = -1; |
1355 | 1386 | ||
1356 | /* Only changed by the io thread */ | 1387 | /* Only changed by the io thread. XXX: currently unused. */ |
1357 | int io_count = 0; | 1388 | static int io_count = 0; |
1358 | 1389 | ||
1359 | int io_thread(void *arg) | 1390 | int io_thread(void *arg) |
1360 | { | 1391 | { |
diff --git a/arch/um/include/mconsole_kern.h b/arch/um/include/mconsole_kern.h index d0b690197fd7..1ea6d928e1cd 100644 --- a/arch/um/include/mconsole_kern.h +++ b/arch/um/include/mconsole_kern.h | |||
@@ -14,6 +14,7 @@ struct mconsole_entry { | |||
14 | struct mc_request request; | 14 | struct mc_request request; |
15 | }; | 15 | }; |
16 | 16 | ||
17 | /* All these methods are called in process context. */ | ||
17 | struct mc_device { | 18 | struct mc_device { |
18 | struct list_head list; | 19 | struct list_head list; |
19 | char *name; | 20 | char *name; |
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S index 68ed24df5c8f..e36f92b463ce 100644 --- a/arch/um/kernel/dyn.lds.S +++ b/arch/um/kernel/dyn.lds.S | |||
@@ -14,6 +14,7 @@ SECTIONS | |||
14 | * is remapped.*/ | 14 | * is remapped.*/ |
15 | __binary_start = .; | 15 | __binary_start = .; |
16 | . = ALIGN(4096); /* Init code and data */ | 16 | . = ALIGN(4096); /* Init code and data */ |
17 | _text = .; | ||
17 | _stext = .; | 18 | _stext = .; |
18 | __init_begin = .; | 19 | __init_begin = .; |
19 | .init.text : { | 20 | .init.text : { |
diff --git a/arch/um/kernel/tt/tracer.c b/arch/um/kernel/tt/tracer.c index 9882342206ec..b9195355075a 100644 --- a/arch/um/kernel/tt/tracer.c +++ b/arch/um/kernel/tt/tracer.c | |||
@@ -176,7 +176,6 @@ struct { | |||
176 | int signal_index[32]; | 176 | int signal_index[32]; |
177 | int nsignals = 0; | 177 | int nsignals = 0; |
178 | int debug_trace = 0; | 178 | int debug_trace = 0; |
179 | extern int io_nsignals, io_count, intr_count; | ||
180 | 179 | ||
181 | extern void signal_usr1(int sig); | 180 | extern void signal_usr1(int sig); |
182 | 181 | ||
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S index 8eca47a6ff08..f6301274cf3c 100644 --- a/arch/um/kernel/uml.lds.S +++ b/arch/um/kernel/uml.lds.S | |||
@@ -25,6 +25,7 @@ SECTIONS | |||
25 | . = ALIGN(4096); /* Init code and data */ | 25 | . = ALIGN(4096); /* Init code and data */ |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | _text = .; | ||
28 | _stext = .; | 29 | _stext = .; |
29 | __init_begin = .; | 30 | __init_begin = .; |
30 | .init.text : { | 31 | .init.text : { |
diff --git a/arch/um/os-Linux/sys-i386/tls.c b/arch/um/os-Linux/sys-i386/tls.c index 6e945ab45843..256532034c62 100644 --- a/arch/um/os-Linux/sys-i386/tls.c +++ b/arch/um/os-Linux/sys-i386/tls.c | |||
@@ -1,6 +1,9 @@ | |||
1 | #include <errno.h> | 1 | #include <errno.h> |
2 | #include <linux/unistd.h> | 2 | #include <linux/unistd.h> |
3 | |||
3 | #include <sys/syscall.h> | 4 | #include <sys/syscall.h> |
5 | #include <unistd.h> | ||
6 | |||
4 | #include "sysdep/tls.h" | 7 | #include "sysdep/tls.h" |
5 | #include "user_util.h" | 8 | #include "user_util.h" |
6 | 9 | ||
diff --git a/arch/um/os-Linux/tls.c b/arch/um/os-Linux/tls.c index a2de2580b8af..9f7999f27c77 100644 --- a/arch/um/os-Linux/tls.c +++ b/arch/um/os-Linux/tls.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <errno.h> | 1 | #include <errno.h> |
2 | #include <sys/ptrace.h> | 2 | #include <sys/ptrace.h> |
3 | #include <sys/syscall.h> | 3 | #include <sys/syscall.h> |
4 | #include <unistd.h> | ||
4 | #include <asm/ldt.h> | 5 | #include <asm/ldt.h> |
5 | #include "sysdep/tls.h" | 6 | #include "sysdep/tls.h" |
6 | #include "uml-config.h" | 7 | #include "uml-config.h" |
diff --git a/arch/um/sys-i386/unmap.c b/arch/um/sys-i386/unmap.c index 8e55cd5d3d07..1b0ad0e4adcd 100644 --- a/arch/um/sys-i386/unmap.c +++ b/arch/um/sys-i386/unmap.c | |||
@@ -5,17 +5,20 @@ | |||
5 | 5 | ||
6 | #include <linux/mman.h> | 6 | #include <linux/mman.h> |
7 | #include <asm/unistd.h> | 7 | #include <asm/unistd.h> |
8 | #include <sys/syscall.h> | ||
9 | 8 | ||
9 | static int errno; | ||
10 | |||
11 | static inline _syscall2(int,munmap,void *,start,size_t,len) | ||
12 | static inline _syscall6(void *,mmap2,void *,addr,size_t,len,int,prot,int,flags,int,fd,off_t,offset) | ||
10 | int switcheroo(int fd, int prot, void *from, void *to, int size) | 13 | int switcheroo(int fd, int prot, void *from, void *to, int size) |
11 | { | 14 | { |
12 | if (syscall(__NR_munmap, to, size) < 0){ | 15 | if(munmap(to, size) < 0){ |
13 | return(-1); | 16 | return(-1); |
14 | } | 17 | } |
15 | if (syscall(__NR_mmap2, to, size, prot, MAP_SHARED | MAP_FIXED, fd, 0) == (void*) -1 ){ | 18 | if(mmap2(to, size, prot, MAP_SHARED | MAP_FIXED, fd, 0) == (void*) -1 ){ |
16 | return(-1); | 19 | return(-1); |
17 | } | 20 | } |
18 | if (syscall(__NR_munmap, from, size) < 0){ | 21 | if(munmap(from, size) < 0){ |
19 | return(-1); | 22 | return(-1); |
20 | } | 23 | } |
21 | return(0); | 24 | return(0); |
diff --git a/arch/um/sys-x86_64/unmap.c b/arch/um/sys-x86_64/unmap.c index 57c9286a701b..f4a4bffd8a18 100644 --- a/arch/um/sys-x86_64/unmap.c +++ b/arch/um/sys-x86_64/unmap.c | |||
@@ -5,17 +5,20 @@ | |||
5 | 5 | ||
6 | #include <linux/mman.h> | 6 | #include <linux/mman.h> |
7 | #include <asm/unistd.h> | 7 | #include <asm/unistd.h> |
8 | #include <sys/syscall.h> | ||
9 | 8 | ||
9 | static int errno; | ||
10 | |||
11 | static inline _syscall2(int,munmap,void *,start,size_t,len) | ||
12 | static inline _syscall6(void *,mmap,void *,addr,size_t,len,int,prot,int,flags,int,fd,off_t,offset) | ||
10 | int switcheroo(int fd, int prot, void *from, void *to, int size) | 13 | int switcheroo(int fd, int prot, void *from, void *to, int size) |
11 | { | 14 | { |
12 | if (syscall(__NR_munmap, to, size) < 0){ | 15 | if(munmap(to, size) < 0){ |
13 | return(-1); | 16 | return(-1); |
14 | } | 17 | } |
15 | if (syscall(__NR_mmap, to, size, prot, MAP_SHARED | MAP_FIXED, fd, 0) == (void*) -1){ | 18 | if(mmap(to, size, prot, MAP_SHARED | MAP_FIXED, fd, 0) == (void*) -1){ |
16 | return(-1); | 19 | return(-1); |
17 | } | 20 | } |
18 | if (syscall(__NR_munmap, from, size) < 0){ | 21 | if(munmap(from, size) < 0){ |
19 | return(-1); | 22 | return(-1); |
20 | } | 23 | } |
21 | return(0); | 24 | return(0); |
diff --git a/arch/v850/kernel/vmlinux.lds.S b/arch/v850/kernel/vmlinux.lds.S index 63399219cd9f..88d087f527c9 100644 --- a/arch/v850/kernel/vmlinux.lds.S +++ b/arch/v850/kernel/vmlinux.lds.S | |||
@@ -140,13 +140,7 @@ | |||
140 | ___setup_end = . ; \ | 140 | ___setup_end = . ; \ |
141 | ___initcall_start = . ; \ | 141 | ___initcall_start = . ; \ |
142 | *(.initcall.init) \ | 142 | *(.initcall.init) \ |
143 | *(.initcall1.init) \ | 143 | INITCALLS \ |
144 | *(.initcall2.init) \ | ||
145 | *(.initcall3.init) \ | ||
146 | *(.initcall4.init) \ | ||
147 | *(.initcall5.init) \ | ||
148 | *(.initcall6.init) \ | ||
149 | *(.initcall7.init) \ | ||
150 | . = ALIGN (4) ; \ | 144 | . = ALIGN (4) ; \ |
151 | ___initcall_end = . ; \ | 145 | ___initcall_end = . ; \ |
152 | ___con_initcall_start = .; \ | 146 | ___con_initcall_start = .; \ |
diff --git a/arch/x86_64/ia32/ia32_signal.c b/arch/x86_64/ia32/ia32_signal.c index a6ba9951e86c..0e0a266d976f 100644 --- a/arch/x86_64/ia32/ia32_signal.c +++ b/arch/x86_64/ia32/ia32_signal.c | |||
@@ -579,6 +579,11 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
579 | regs->rsp = (unsigned long) frame; | 579 | regs->rsp = (unsigned long) frame; |
580 | regs->rip = (unsigned long) ka->sa.sa_handler; | 580 | regs->rip = (unsigned long) ka->sa.sa_handler; |
581 | 581 | ||
582 | /* Make -mregparm=3 work */ | ||
583 | regs->rax = sig; | ||
584 | regs->rdx = (unsigned long) &frame->info; | ||
585 | regs->rcx = (unsigned long) &frame->uc; | ||
586 | |||
582 | asm volatile("movl %0,%%ds" :: "r" (__USER32_DS)); | 587 | asm volatile("movl %0,%%ds" :: "r" (__USER32_DS)); |
583 | asm volatile("movl %0,%%es" :: "r" (__USER32_DS)); | 588 | asm volatile("movl %0,%%es" :: "r" (__USER32_DS)); |
584 | 589 | ||
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S index 1283614c9b24..edb24aa714b4 100644 --- a/arch/x86_64/kernel/vmlinux.lds.S +++ b/arch/x86_64/kernel/vmlinux.lds.S | |||
@@ -175,13 +175,7 @@ SECTIONS | |||
175 | __setup_end = .; | 175 | __setup_end = .; |
176 | __initcall_start = .; | 176 | __initcall_start = .; |
177 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { | 177 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { |
178 | *(.initcall1.init) | 178 | INITCALLS |
179 | *(.initcall2.init) | ||
180 | *(.initcall3.init) | ||
181 | *(.initcall4.init) | ||
182 | *(.initcall5.init) | ||
183 | *(.initcall6.init) | ||
184 | *(.initcall7.init) | ||
185 | } | 179 | } |
186 | __initcall_end = .; | 180 | __initcall_end = .; |
187 | __con_initcall_start = .; | 181 | __con_initcall_start = .; |
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index 7732f4254d21..e61093b34c26 100644 --- a/arch/x86_64/pci/mmconfig.c +++ b/arch/x86_64/pci/mmconfig.c | |||
@@ -220,7 +220,7 @@ void __init pci_mmcfg_init(int type) | |||
220 | 220 | ||
221 | pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL); | 221 | pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL); |
222 | if (pci_mmcfg_virt == NULL) { | 222 | if (pci_mmcfg_virt == NULL) { |
223 | printk("PCI: Can not allocate memory for mmconfig structures\n"); | 223 | printk(KERN_ERR "PCI: Can not allocate memory for mmconfig structures\n"); |
224 | return; | 224 | return; |
225 | } | 225 | } |
226 | for (i = 0; i < pci_mmcfg_config_num; ++i) { | 226 | for (i = 0; i < pci_mmcfg_config_num; ++i) { |
@@ -228,7 +228,8 @@ void __init pci_mmcfg_init(int type) | |||
228 | pci_mmcfg_virt[i].virt = ioremap_nocache(pci_mmcfg_config[i].base_address, | 228 | pci_mmcfg_virt[i].virt = ioremap_nocache(pci_mmcfg_config[i].base_address, |
229 | MMCONFIG_APER_MAX); | 229 | MMCONFIG_APER_MAX); |
230 | if (!pci_mmcfg_virt[i].virt) { | 230 | if (!pci_mmcfg_virt[i].virt) { |
231 | printk("PCI: Cannot map mmconfig aperture for segment %d\n", | 231 | printk(KERN_ERR "PCI: Cannot map mmconfig aperture for " |
232 | "segment %d\n", | ||
232 | pci_mmcfg_config[i].pci_segment_group_number); | 233 | pci_mmcfg_config[i].pci_segment_group_number); |
233 | return; | 234 | return; |
234 | } | 235 | } |
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index ab6cdbd5eb68..cfe75f528725 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S | |||
@@ -184,13 +184,7 @@ SECTIONS | |||
184 | 184 | ||
185 | __initcall_start = .; | 185 | __initcall_start = .; |
186 | .initcall.init : { | 186 | .initcall.init : { |
187 | *(.initcall1.init) | 187 | INITCALLS |
188 | *(.initcall2.init) | ||
189 | *(.initcall3.init) | ||
190 | *(.initcall4.init) | ||
191 | *(.initcall5.init) | ||
192 | *(.initcall6.init) | ||
193 | *(.initcall7.init) | ||
194 | } | 188 | } |
195 | __initcall_end = .; | 189 | __initcall_end = .; |
196 | 190 | ||