diff options
Diffstat (limited to 'arch')
672 files changed, 11165 insertions, 10500 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 26a28419caf..366ec06a518 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -274,6 +274,9 @@ config ARCH_WANT_OLD_COMPAT_IPC | |||
274 | config GENERIC_KERNEL_THREAD | 274 | config GENERIC_KERNEL_THREAD |
275 | bool | 275 | bool |
276 | 276 | ||
277 | config GENERIC_KERNEL_EXECVE | ||
278 | bool | ||
279 | |||
277 | config HAVE_ARCH_SECCOMP_FILTER | 280 | config HAVE_ARCH_SECCOMP_FILTER |
278 | bool | 281 | bool |
279 | help | 282 | help |
@@ -319,4 +322,23 @@ config HAVE_IRQ_TIME_ACCOUNTING | |||
319 | config HAVE_ARCH_TRANSPARENT_HUGEPAGE | 322 | config HAVE_ARCH_TRANSPARENT_HUGEPAGE |
320 | bool | 323 | bool |
321 | 324 | ||
325 | config HAVE_MOD_ARCH_SPECIFIC | ||
326 | bool | ||
327 | help | ||
328 | The arch uses struct mod_arch_specific to store data. Many arches | ||
329 | just need a simple module loader without arch specific data - those | ||
330 | should not enable this. | ||
331 | |||
332 | config MODULES_USE_ELF_RELA | ||
333 | bool | ||
334 | help | ||
335 | Modules only use ELF RELA relocations. Modules with ELF REL | ||
336 | relocations will give an error. | ||
337 | |||
338 | config MODULES_USE_ELF_REL | ||
339 | bool | ||
340 | help | ||
341 | Modules only use ELF REL relocations. Modules with ELF RELA | ||
342 | relocations will give an error. | ||
343 | |||
322 | source "kernel/gcov/Kconfig" | 344 | source "kernel/gcov/Kconfig" |
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 7da91246e27..5dd7f5db24d 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -21,6 +21,9 @@ config ALPHA | |||
21 | select GENERIC_STRNCPY_FROM_USER | 21 | select GENERIC_STRNCPY_FROM_USER |
22 | select GENERIC_STRNLEN_USER | 22 | select GENERIC_STRNLEN_USER |
23 | select GENERIC_KERNEL_THREAD | 23 | select GENERIC_KERNEL_THREAD |
24 | select GENERIC_KERNEL_EXECVE | ||
25 | select HAVE_MOD_ARCH_SPECIFIC | ||
26 | select MODULES_USE_ELF_RELA | ||
24 | help | 27 | help |
25 | The Alpha is a 64-bit general-purpose processor designed and | 28 | The Alpha is a 64-bit general-purpose processor designed and |
26 | marketed by the Digital Equipment Corporation of blessed memory, | 29 | marketed by the Digital Equipment Corporation of blessed memory, |
diff --git a/arch/alpha/include/asm/module.h b/arch/alpha/include/asm/module.h index 7b63743c534..9cd13b55155 100644 --- a/arch/alpha/include/asm/module.h +++ b/arch/alpha/include/asm/module.h | |||
@@ -1,19 +1,13 @@ | |||
1 | #ifndef _ALPHA_MODULE_H | 1 | #ifndef _ALPHA_MODULE_H |
2 | #define _ALPHA_MODULE_H | 2 | #define _ALPHA_MODULE_H |
3 | 3 | ||
4 | #include <asm-generic/module.h> | ||
5 | |||
4 | struct mod_arch_specific | 6 | struct mod_arch_specific |
5 | { | 7 | { |
6 | unsigned int gotsecindex; | 8 | unsigned int gotsecindex; |
7 | }; | 9 | }; |
8 | 10 | ||
9 | #define Elf_Sym Elf64_Sym | ||
10 | #define Elf_Shdr Elf64_Shdr | ||
11 | #define Elf_Ehdr Elf64_Ehdr | ||
12 | #define Elf_Phdr Elf64_Phdr | ||
13 | #define Elf_Dyn Elf64_Dyn | ||
14 | #define Elf_Rel Elf64_Rel | ||
15 | #define Elf_Rela Elf64_Rela | ||
16 | |||
17 | #define ARCH_SHF_SMALL SHF_ALPHA_GPREL | 11 | #define ARCH_SHF_SMALL SHF_ALPHA_GPREL |
18 | 12 | ||
19 | #ifdef MODULE | 13 | #ifdef MODULE |
diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h index 28335bd40e4..4554ecbff7c 100644 --- a/arch/alpha/include/asm/thread_info.h +++ b/arch/alpha/include/asm/thread_info.h | |||
@@ -84,7 +84,6 @@ register struct thread_info *__current_thread_info __asm__("$8"); | |||
84 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 84 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
85 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 85 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
86 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 86 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
87 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
88 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 87 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
89 | 88 | ||
90 | /* Work to do on interrupt/exception return. */ | 89 | /* Work to do on interrupt/exception return. */ |
@@ -117,5 +116,7 @@ register struct thread_info *__current_thread_info __asm__("$8"); | |||
117 | (int __user *)(value)); \ | 116 | (int __user *)(value)); \ |
118 | }) | 117 | }) |
119 | 118 | ||
119 | #define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) | ||
120 | |||
120 | #endif /* __KERNEL__ */ | 121 | #endif /* __KERNEL__ */ |
121 | #endif /* _ALPHA_THREAD_INFO_H */ | 122 | #endif /* _ALPHA_THREAD_INFO_H */ |
diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index 3cb6c118898..7826e227e4d 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h | |||
@@ -482,7 +482,6 @@ | |||
482 | #define __ARCH_WANT_SYS_SIGPENDING | 482 | #define __ARCH_WANT_SYS_SIGPENDING |
483 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 483 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
484 | #define __ARCH_WANT_SYS_EXECVE | 484 | #define __ARCH_WANT_SYS_EXECVE |
485 | #define __ARCH_WANT_KERNEL_EXECVE | ||
486 | 485 | ||
487 | /* "Conditional" syscalls. What we want is | 486 | /* "Conditional" syscalls. What we want is |
488 | 487 | ||
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index 7e43e1156d1..a7607832dd4 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S | |||
@@ -311,7 +311,7 @@ entSys: | |||
311 | 311 | ||
312 | .align 4 | 312 | .align 4 |
313 | ret_from_sys_call: | 313 | ret_from_sys_call: |
314 | cmovne $26, 0, $19 /* $19 = 0 => non-restartable */ | 314 | cmovne $26, 0, $18 /* $18 = 0 => non-restartable */ |
315 | ldq $0, SP_OFF($sp) | 315 | ldq $0, SP_OFF($sp) |
316 | and $0, 8, $0 | 316 | and $0, 8, $0 |
317 | beq $0, ret_to_kernel | 317 | beq $0, ret_to_kernel |
@@ -320,8 +320,8 @@ ret_to_user: | |||
320 | sampling and the rti. */ | 320 | sampling and the rti. */ |
321 | lda $16, 7 | 321 | lda $16, 7 |
322 | call_pal PAL_swpipl | 322 | call_pal PAL_swpipl |
323 | ldl $5, TI_FLAGS($8) | 323 | ldl $17, TI_FLAGS($8) |
324 | and $5, _TIF_WORK_MASK, $2 | 324 | and $17, _TIF_WORK_MASK, $2 |
325 | bne $2, work_pending | 325 | bne $2, work_pending |
326 | restore_all: | 326 | restore_all: |
327 | RESTORE_ALL | 327 | RESTORE_ALL |
@@ -341,10 +341,10 @@ $syscall_error: | |||
341 | * frame to indicate that a negative return value wasn't an | 341 | * frame to indicate that a negative return value wasn't an |
342 | * error number.. | 342 | * error number.. |
343 | */ | 343 | */ |
344 | ldq $19, 0($sp) /* old syscall nr (zero if success) */ | 344 | ldq $18, 0($sp) /* old syscall nr (zero if success) */ |
345 | beq $19, $ret_success | 345 | beq $18, $ret_success |
346 | 346 | ||
347 | ldq $20, 72($sp) /* .. and this a3 */ | 347 | ldq $19, 72($sp) /* .. and this a3 */ |
348 | subq $31, $0, $0 /* with error in v0 */ | 348 | subq $31, $0, $0 /* with error in v0 */ |
349 | addq $31, 1, $1 /* set a3 for errno return */ | 349 | addq $31, 1, $1 /* set a3 for errno return */ |
350 | stq $0, 0($sp) | 350 | stq $0, 0($sp) |
@@ -362,51 +362,35 @@ $ret_success: | |||
362 | * Do all cleanup when returning from all interrupts and system calls. | 362 | * Do all cleanup when returning from all interrupts and system calls. |
363 | * | 363 | * |
364 | * Arguments: | 364 | * Arguments: |
365 | * $5: TI_FLAGS. | ||
366 | * $8: current. | 365 | * $8: current. |
367 | * $19: The old syscall number, or zero if this is not a return | 366 | * $17: TI_FLAGS. |
367 | * $18: The old syscall number, or zero if this is not a return | ||
368 | * from a syscall that errored and is possibly restartable. | 368 | * from a syscall that errored and is possibly restartable. |
369 | * $20: The old a3 value | 369 | * $19: The old a3 value |
370 | */ | 370 | */ |
371 | 371 | ||
372 | .align 4 | 372 | .align 4 |
373 | .ent work_pending | 373 | .ent work_pending |
374 | work_pending: | 374 | work_pending: |
375 | and $5, _TIF_NEED_RESCHED, $2 | 375 | and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, $2 |
376 | beq $2, $work_notifysig | 376 | bne $2, $work_notifysig |
377 | 377 | ||
378 | $work_resched: | 378 | $work_resched: |
379 | subq $sp, 16, $sp | 379 | /* |
380 | stq $19, 0($sp) /* save syscall nr */ | 380 | * We can get here only if we returned from syscall without SIGPENDING |
381 | stq $20, 8($sp) /* and error indication (a3) */ | 381 | * or got through work_notifysig already. Either case means no syscall |
382 | * restarts for us, so let $18 and $19 burn. | ||
383 | */ | ||
382 | jsr $26, schedule | 384 | jsr $26, schedule |
383 | ldq $19, 0($sp) | 385 | mov 0, $18 |
384 | ldq $20, 8($sp) | 386 | br ret_to_user |
385 | addq $sp, 16, $sp | ||
386 | /* Make sure need_resched and sigpending don't change between | ||
387 | sampling and the rti. */ | ||
388 | lda $16, 7 | ||
389 | call_pal PAL_swpipl | ||
390 | ldl $5, TI_FLAGS($8) | ||
391 | and $5, _TIF_WORK_MASK, $2 | ||
392 | beq $2, restore_all | ||
393 | and $5, _TIF_NEED_RESCHED, $2 | ||
394 | bne $2, $work_resched | ||
395 | 387 | ||
396 | $work_notifysig: | 388 | $work_notifysig: |
397 | mov $sp, $16 | 389 | mov $sp, $16 |
398 | bsr $1, do_switch_stack | 390 | bsr $1, do_switch_stack |
399 | mov $sp, $17 | 391 | jsr $26, do_work_pending |
400 | mov $5, $18 | ||
401 | mov $19, $9 /* save old syscall number */ | ||
402 | mov $20, $10 /* save old a3 */ | ||
403 | and $5, _TIF_SIGPENDING, $2 | ||
404 | cmovne $2, 0, $9 /* we don't want double syscall restarts */ | ||
405 | jsr $26, do_notify_resume | ||
406 | mov $9, $19 | ||
407 | mov $10, $20 | ||
408 | bsr $1, undo_switch_stack | 392 | bsr $1, undo_switch_stack |
409 | br ret_to_user | 393 | br restore_all |
410 | .end work_pending | 394 | .end work_pending |
411 | 395 | ||
412 | /* | 396 | /* |
@@ -418,11 +402,10 @@ $work_notifysig: | |||
418 | strace: | 402 | strace: |
419 | /* set up signal stack, call syscall_trace */ | 403 | /* set up signal stack, call syscall_trace */ |
420 | bsr $1, do_switch_stack | 404 | bsr $1, do_switch_stack |
421 | jsr $26, syscall_trace | 405 | jsr $26, syscall_trace_enter /* returns the syscall number */ |
422 | bsr $1, undo_switch_stack | 406 | bsr $1, undo_switch_stack |
423 | 407 | ||
424 | /* get the system call number and the arguments back.. */ | 408 | /* get the arguments back.. */ |
425 | ldq $0, 0($sp) | ||
426 | ldq $16, SP_OFF+24($sp) | 409 | ldq $16, SP_OFF+24($sp) |
427 | ldq $17, SP_OFF+32($sp) | 410 | ldq $17, SP_OFF+32($sp) |
428 | ldq $18, SP_OFF+40($sp) | 411 | ldq $18, SP_OFF+40($sp) |
@@ -449,15 +432,15 @@ $strace_success: | |||
449 | stq $0, 0($sp) /* save return value */ | 432 | stq $0, 0($sp) /* save return value */ |
450 | 433 | ||
451 | bsr $1, do_switch_stack | 434 | bsr $1, do_switch_stack |
452 | jsr $26, syscall_trace | 435 | jsr $26, syscall_trace_leave |
453 | bsr $1, undo_switch_stack | 436 | bsr $1, undo_switch_stack |
454 | br $31, ret_from_sys_call | 437 | br $31, ret_from_sys_call |
455 | 438 | ||
456 | .align 3 | 439 | .align 3 |
457 | $strace_error: | 440 | $strace_error: |
458 | ldq $19, 0($sp) /* old syscall nr (zero if success) */ | 441 | ldq $18, 0($sp) /* old syscall nr (zero if success) */ |
459 | beq $19, $strace_success | 442 | beq $18, $strace_success |
460 | ldq $20, 72($sp) /* .. and this a3 */ | 443 | ldq $19, 72($sp) /* .. and this a3 */ |
461 | 444 | ||
462 | subq $31, $0, $0 /* with error in v0 */ | 445 | subq $31, $0, $0 /* with error in v0 */ |
463 | addq $31, 1, $1 /* set a3 for errno return */ | 446 | addq $31, 1, $1 /* set a3 for errno return */ |
@@ -465,11 +448,11 @@ $strace_error: | |||
465 | stq $1, 72($sp) /* a3 for return */ | 448 | stq $1, 72($sp) /* a3 for return */ |
466 | 449 | ||
467 | bsr $1, do_switch_stack | 450 | bsr $1, do_switch_stack |
468 | mov $19, $9 /* save old syscall number */ | 451 | mov $18, $9 /* save old syscall number */ |
469 | mov $20, $10 /* save old a3 */ | 452 | mov $19, $10 /* save old a3 */ |
470 | jsr $26, syscall_trace | 453 | jsr $26, syscall_trace_leave |
471 | mov $9, $19 | 454 | mov $9, $18 |
472 | mov $10, $20 | 455 | mov $10, $19 |
473 | bsr $1, undo_switch_stack | 456 | bsr $1, undo_switch_stack |
474 | 457 | ||
475 | mov $31, $26 /* tell "ret_from_sys_call" we can restart */ | 458 | mov $31, $26 /* tell "ret_from_sys_call" we can restart */ |
@@ -620,24 +603,9 @@ ret_from_kernel_thread: | |||
620 | mov $9, $27 | 603 | mov $9, $27 |
621 | mov $10, $16 | 604 | mov $10, $16 |
622 | jsr $26, ($9) | 605 | jsr $26, ($9) |
623 | ldgp $gp, 0($26) | ||
624 | mov $0, $16 | ||
625 | mov $31, $26 | ||
626 | jmp $31, sys_exit | ||
627 | .end ret_from_kernel_thread | ||
628 | |||
629 | .globl ret_from_kernel_execve | ||
630 | .align 4 | ||
631 | .ent ret_from_kernel_execve | ||
632 | ret_from_kernel_execve: | ||
633 | mov $16, $sp | ||
634 | /* Avoid the HAE being gratuitously wrong, to avoid restoring it. */ | ||
635 | ldq $2, alpha_mv+HAE_CACHE | ||
636 | stq $2, 152($sp) /* HAE */ | ||
637 | mov $31, $19 /* to disable syscall restarts */ | 606 | mov $31, $19 /* to disable syscall restarts */ |
638 | br $31, ret_to_user | 607 | br $31, ret_to_user |
639 | 608 | .end ret_from_kernel_thread | |
640 | .end ret_from_kernel_execve | ||
641 | 609 | ||
642 | 610 | ||
643 | /* | 611 | /* |
@@ -698,7 +666,7 @@ sys_sigreturn: | |||
698 | lda $sp, -SWITCH_STACK_SIZE($sp) | 666 | lda $sp, -SWITCH_STACK_SIZE($sp) |
699 | jsr $26, do_sigreturn | 667 | jsr $26, do_sigreturn |
700 | bne $9, 1f | 668 | bne $9, 1f |
701 | jsr $26, syscall_trace | 669 | jsr $26, syscall_trace_leave |
702 | 1: br $1, undo_switch_stack | 670 | 1: br $1, undo_switch_stack |
703 | br ret_from_sys_call | 671 | br ret_from_sys_call |
704 | .end sys_sigreturn | 672 | .end sys_sigreturn |
@@ -715,7 +683,7 @@ sys_rt_sigreturn: | |||
715 | lda $sp, -SWITCH_STACK_SIZE($sp) | 683 | lda $sp, -SWITCH_STACK_SIZE($sp) |
716 | jsr $26, do_rt_sigreturn | 684 | jsr $26, do_rt_sigreturn |
717 | bne $9, 1f | 685 | bne $9, 1f |
718 | jsr $26, syscall_trace | 686 | jsr $26, syscall_trace_leave |
719 | 1: br $1, undo_switch_stack | 687 | 1: br $1, undo_switch_stack |
720 | br ret_from_sys_call | 688 | br ret_from_sys_call |
721 | .end sys_rt_sigreturn | 689 | .end sys_rt_sigreturn |
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 63e77e3944c..9eb090582cf 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -449,7 +449,7 @@ osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags) | |||
449 | { | 449 | { |
450 | int retval; | 450 | int retval; |
451 | struct cdfs_args tmp; | 451 | struct cdfs_args tmp; |
452 | char *devname; | 452 | struct filename *devname; |
453 | 453 | ||
454 | retval = -EFAULT; | 454 | retval = -EFAULT; |
455 | if (copy_from_user(&tmp, args, sizeof(tmp))) | 455 | if (copy_from_user(&tmp, args, sizeof(tmp))) |
@@ -458,7 +458,7 @@ osf_ufs_mount(char *dirname, struct ufs_args __user *args, int flags) | |||
458 | retval = PTR_ERR(devname); | 458 | retval = PTR_ERR(devname); |
459 | if (IS_ERR(devname)) | 459 | if (IS_ERR(devname)) |
460 | goto out; | 460 | goto out; |
461 | retval = do_mount(devname, dirname, "ext2", flags, NULL); | 461 | retval = do_mount(devname->name, dirname, "ext2", flags, NULL); |
462 | putname(devname); | 462 | putname(devname); |
463 | out: | 463 | out: |
464 | return retval; | 464 | return retval; |
@@ -469,7 +469,7 @@ osf_cdfs_mount(char *dirname, struct cdfs_args __user *args, int flags) | |||
469 | { | 469 | { |
470 | int retval; | 470 | int retval; |
471 | struct cdfs_args tmp; | 471 | struct cdfs_args tmp; |
472 | char *devname; | 472 | struct filename *devname; |
473 | 473 | ||
474 | retval = -EFAULT; | 474 | retval = -EFAULT; |
475 | if (copy_from_user(&tmp, args, sizeof(tmp))) | 475 | if (copy_from_user(&tmp, args, sizeof(tmp))) |
@@ -478,7 +478,7 @@ osf_cdfs_mount(char *dirname, struct cdfs_args __user *args, int flags) | |||
478 | retval = PTR_ERR(devname); | 478 | retval = PTR_ERR(devname); |
479 | if (IS_ERR(devname)) | 479 | if (IS_ERR(devname)) |
480 | goto out; | 480 | goto out; |
481 | retval = do_mount(devname, dirname, "iso9660", flags, NULL); | 481 | retval = do_mount(devname->name, dirname, "iso9660", flags, NULL); |
482 | putname(devname); | 482 | putname(devname); |
483 | out: | 483 | out: |
484 | return retval; | 484 | return retval; |
@@ -499,7 +499,7 @@ SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, const char __user *, path, | |||
499 | int, flag, void __user *, data) | 499 | int, flag, void __user *, data) |
500 | { | 500 | { |
501 | int retval; | 501 | int retval; |
502 | char *name; | 502 | struct filename *name; |
503 | 503 | ||
504 | name = getname(path); | 504 | name = getname(path); |
505 | retval = PTR_ERR(name); | 505 | retval = PTR_ERR(name); |
@@ -507,13 +507,13 @@ SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, const char __user *, path, | |||
507 | goto out; | 507 | goto out; |
508 | switch (typenr) { | 508 | switch (typenr) { |
509 | case 1: | 509 | case 1: |
510 | retval = osf_ufs_mount(name, data, flag); | 510 | retval = osf_ufs_mount(name->name, data, flag); |
511 | break; | 511 | break; |
512 | case 6: | 512 | case 6: |
513 | retval = osf_cdfs_mount(name, data, flag); | 513 | retval = osf_cdfs_mount(name->name, data, flag); |
514 | break; | 514 | break; |
515 | case 9: | 515 | case 9: |
516 | retval = osf_procfs_mount(name, data, flag); | 516 | retval = osf_procfs_mount(name->name, data, flag); |
517 | break; | 517 | break; |
518 | default: | 518 | default: |
519 | retval = -EINVAL; | 519 | retval = -EINVAL; |
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index 54616f496ae..2a4a80ff4a2 100644 --- a/arch/alpha/kernel/ptrace.c +++ b/arch/alpha/kernel/ptrace.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/user.h> | 13 | #include <linux/user.h> |
14 | #include <linux/security.h> | 14 | #include <linux/security.h> |
15 | #include <linux/signal.h> | 15 | #include <linux/signal.h> |
16 | #include <linux/tracehook.h> | ||
16 | 17 | ||
17 | #include <asm/uaccess.h> | 18 | #include <asm/uaccess.h> |
18 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
@@ -312,25 +313,18 @@ long arch_ptrace(struct task_struct *child, long request, | |||
312 | return ret; | 313 | return ret; |
313 | } | 314 | } |
314 | 315 | ||
316 | asmlinkage unsigned long syscall_trace_enter(void) | ||
317 | { | ||
318 | unsigned long ret = 0; | ||
319 | if (test_thread_flag(TIF_SYSCALL_TRACE) && | ||
320 | tracehook_report_syscall_entry(current_pt_regs())) | ||
321 | ret = -1UL; | ||
322 | return ret ?: current_pt_regs()->r0; | ||
323 | } | ||
324 | |||
315 | asmlinkage void | 325 | asmlinkage void |
316 | syscall_trace(void) | 326 | syscall_trace_leave(void) |
317 | { | 327 | { |
318 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 328 | if (test_thread_flag(TIF_SYSCALL_TRACE)) |
319 | return; | 329 | tracehook_report_syscall_exit(current_pt_regs(), 0); |
320 | if (!(current->ptrace & PT_PTRACED)) | ||
321 | return; | ||
322 | /* The 0x80 provides a way for the tracing parent to distinguish | ||
323 | between a syscall stop and SIGTRAP delivery */ | ||
324 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | ||
325 | ? 0x80 : 0)); | ||
326 | |||
327 | /* | ||
328 | * This isn't the same as continuing with a signal, but it will do | ||
329 | * for normal use. strace only continues with a signal if the | ||
330 | * stopping signal is not SIGTRAP. -brl | ||
331 | */ | ||
332 | if (current->exit_code) { | ||
333 | send_sig(current->exit_code, current, 1); | ||
334 | current->exit_code = 0; | ||
335 | } | ||
336 | } | 330 | } |
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index a8c97d42ec8..32575f85507 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c | |||
@@ -298,8 +298,9 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size) | |||
298 | 298 | ||
299 | static long | 299 | static long |
300 | setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, | 300 | setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, |
301 | struct switch_stack *sw, unsigned long mask, unsigned long sp) | 301 | unsigned long mask, unsigned long sp) |
302 | { | 302 | { |
303 | struct switch_stack *sw = (struct switch_stack *)regs - 1; | ||
303 | long i, err = 0; | 304 | long i, err = 0; |
304 | 305 | ||
305 | err |= __put_user(on_sig_stack((unsigned long)sc), &sc->sc_onstack); | 306 | err |= __put_user(on_sig_stack((unsigned long)sc), &sc->sc_onstack); |
@@ -354,7 +355,7 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, | |||
354 | 355 | ||
355 | static int | 356 | static int |
356 | setup_frame(int sig, struct k_sigaction *ka, sigset_t *set, | 357 | setup_frame(int sig, struct k_sigaction *ka, sigset_t *set, |
357 | struct pt_regs *regs, struct switch_stack * sw) | 358 | struct pt_regs *regs) |
358 | { | 359 | { |
359 | unsigned long oldsp, r26, err = 0; | 360 | unsigned long oldsp, r26, err = 0; |
360 | struct sigframe __user *frame; | 361 | struct sigframe __user *frame; |
@@ -364,7 +365,7 @@ setup_frame(int sig, struct k_sigaction *ka, sigset_t *set, | |||
364 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) | 365 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) |
365 | return -EFAULT; | 366 | return -EFAULT; |
366 | 367 | ||
367 | err |= setup_sigcontext(&frame->sc, regs, sw, set->sig[0], oldsp); | 368 | err |= setup_sigcontext(&frame->sc, regs, set->sig[0], oldsp); |
368 | if (err) | 369 | if (err) |
369 | return -EFAULT; | 370 | return -EFAULT; |
370 | 371 | ||
@@ -401,7 +402,7 @@ setup_frame(int sig, struct k_sigaction *ka, sigset_t *set, | |||
401 | 402 | ||
402 | static int | 403 | static int |
403 | setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | 404 | setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, |
404 | sigset_t *set, struct pt_regs *regs, struct switch_stack * sw) | 405 | sigset_t *set, struct pt_regs *regs) |
405 | { | 406 | { |
406 | unsigned long oldsp, r26, err = 0; | 407 | unsigned long oldsp, r26, err = 0; |
407 | struct rt_sigframe __user *frame; | 408 | struct rt_sigframe __user *frame; |
@@ -420,7 +421,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
420 | err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp); | 421 | err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp); |
421 | err |= __put_user(sas_ss_flags(oldsp), &frame->uc.uc_stack.ss_flags); | 422 | err |= __put_user(sas_ss_flags(oldsp), &frame->uc.uc_stack.ss_flags); |
422 | err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); | 423 | err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); |
423 | err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, sw, | 424 | err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, |
424 | set->sig[0], oldsp); | 425 | set->sig[0], oldsp); |
425 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); | 426 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); |
426 | if (err) | 427 | if (err) |
@@ -464,15 +465,15 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
464 | */ | 465 | */ |
465 | static inline void | 466 | static inline void |
466 | handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info, | 467 | handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info, |
467 | struct pt_regs * regs, struct switch_stack *sw) | 468 | struct pt_regs * regs) |
468 | { | 469 | { |
469 | sigset_t *oldset = sigmask_to_save(); | 470 | sigset_t *oldset = sigmask_to_save(); |
470 | int ret; | 471 | int ret; |
471 | 472 | ||
472 | if (ka->sa.sa_flags & SA_SIGINFO) | 473 | if (ka->sa.sa_flags & SA_SIGINFO) |
473 | ret = setup_rt_frame(sig, ka, info, oldset, regs, sw); | 474 | ret = setup_rt_frame(sig, ka, info, oldset, regs); |
474 | else | 475 | else |
475 | ret = setup_frame(sig, ka, oldset, regs, sw); | 476 | ret = setup_frame(sig, ka, oldset, regs); |
476 | 477 | ||
477 | if (ret) { | 478 | if (ret) { |
478 | force_sigsegv(sig, current); | 479 | force_sigsegv(sig, current); |
@@ -519,8 +520,7 @@ syscall_restart(unsigned long r0, unsigned long r19, | |||
519 | * all (if we get here from anything but a syscall return, it will be 0) | 520 | * all (if we get here from anything but a syscall return, it will be 0) |
520 | */ | 521 | */ |
521 | static void | 522 | static void |
522 | do_signal(struct pt_regs * regs, struct switch_stack * sw, | 523 | do_signal(struct pt_regs *regs, unsigned long r0, unsigned long r19) |
523 | unsigned long r0, unsigned long r19) | ||
524 | { | 524 | { |
525 | siginfo_t info; | 525 | siginfo_t info; |
526 | int signr; | 526 | int signr; |
@@ -537,7 +537,7 @@ do_signal(struct pt_regs * regs, struct switch_stack * sw, | |||
537 | /* Whee! Actually deliver the signal. */ | 537 | /* Whee! Actually deliver the signal. */ |
538 | if (r0) | 538 | if (r0) |
539 | syscall_restart(r0, r19, regs, &ka); | 539 | syscall_restart(r0, r19, regs, &ka); |
540 | handle_signal(signr, &ka, &info, regs, sw); | 540 | handle_signal(signr, &ka, &info, regs); |
541 | if (single_stepping) | 541 | if (single_stepping) |
542 | ptrace_set_bpt(current); /* re-set bpt */ | 542 | ptrace_set_bpt(current); /* re-set bpt */ |
543 | return; | 543 | return; |
@@ -568,15 +568,23 @@ do_signal(struct pt_regs * regs, struct switch_stack * sw, | |||
568 | } | 568 | } |
569 | 569 | ||
570 | void | 570 | void |
571 | do_notify_resume(struct pt_regs *regs, struct switch_stack *sw, | 571 | do_work_pending(struct pt_regs *regs, unsigned long thread_flags, |
572 | unsigned long thread_info_flags, | ||
573 | unsigned long r0, unsigned long r19) | 572 | unsigned long r0, unsigned long r19) |
574 | { | 573 | { |
575 | if (thread_info_flags & _TIF_SIGPENDING) | 574 | do { |
576 | do_signal(regs, sw, r0, r19); | 575 | if (thread_flags & _TIF_NEED_RESCHED) { |
577 | 576 | schedule(); | |
578 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 577 | } else { |
579 | clear_thread_flag(TIF_NOTIFY_RESUME); | 578 | local_irq_enable(); |
580 | tracehook_notify_resume(regs); | 579 | if (thread_flags & _TIF_SIGPENDING) { |
581 | } | 580 | do_signal(regs, r0, r19); |
581 | r0 = 0; | ||
582 | } else { | ||
583 | clear_thread_flag(TIF_NOTIFY_RESUME); | ||
584 | tracehook_notify_resume(regs); | ||
585 | } | ||
586 | } | ||
587 | local_irq_disable(); | ||
588 | thread_flags = current_thread_info()->flags; | ||
589 | } while (thread_flags & _TIF_WORK_MASK); | ||
582 | } | 590 | } |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 767aae8277f..73067efd484 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1,58 +1,60 @@ | |||
1 | config ARM | 1 | config ARM |
2 | bool | 2 | bool |
3 | default y | 3 | default y |
4 | select ARCH_BINFMT_ELF_RANDOMIZE_PIE | ||
5 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE | ||
4 | select ARCH_HAVE_CUSTOM_GPIO_H | 6 | select ARCH_HAVE_CUSTOM_GPIO_H |
5 | select HAVE_AOUT | 7 | select ARCH_WANT_IPC_PARSE_VERSION |
6 | select HAVE_DMA_API_DEBUG | 8 | select CPU_PM if (SUSPEND || CPU_IDLE) |
7 | select HAVE_IDE if PCI || ISA || PCMCIA | 9 | select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN |
8 | select HAVE_DMA_ATTRS | ||
9 | select HAVE_DMA_CONTIGUOUS if MMU | ||
10 | select HAVE_MEMBLOCK | ||
11 | select RTC_LIB | ||
12 | select SYS_SUPPORTS_APM_EMULATION | ||
13 | select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI) | 10 | select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI) |
14 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE | 11 | select GENERIC_CLOCKEVENTS_BROADCAST if SMP |
15 | select HAVE_OPROFILE if (HAVE_PERF_EVENTS) | 12 | select GENERIC_IRQ_PROBE |
13 | select GENERIC_IRQ_SHOW | ||
14 | select GENERIC_KERNEL_THREAD | ||
15 | select GENERIC_KERNEL_EXECVE | ||
16 | select GENERIC_PCI_IOMAP | ||
17 | select GENERIC_SMP_IDLE_THREAD | ||
18 | select GENERIC_STRNCPY_FROM_USER | ||
19 | select GENERIC_STRNLEN_USER | ||
20 | select HARDIRQS_SW_RESEND | ||
21 | select HAVE_AOUT | ||
16 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL | 22 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL |
17 | select HAVE_ARCH_KGDB | 23 | select HAVE_ARCH_KGDB |
18 | select HAVE_ARCH_TRACEHOOK | 24 | select HAVE_ARCH_TRACEHOOK |
19 | select HAVE_SYSCALL_TRACEPOINTS | 25 | select HAVE_BPF_JIT |
20 | select HAVE_KPROBES if !XIP_KERNEL | 26 | select HAVE_C_RECORDMCOUNT |
21 | select HAVE_KRETPROBES if (HAVE_KPROBES) | 27 | select HAVE_DEBUG_KMEMLEAK |
22 | select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) | 28 | select HAVE_DMA_API_DEBUG |
23 | select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL) | 29 | select HAVE_DMA_ATTRS |
30 | select HAVE_DMA_CONTIGUOUS if MMU | ||
24 | select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL) | 31 | select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL) |
32 | select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL) | ||
25 | select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL) | 33 | select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL) |
26 | select ARCH_BINFMT_ELF_RANDOMIZE_PIE | 34 | select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) |
27 | select HAVE_GENERIC_DMA_COHERENT | 35 | select HAVE_GENERIC_DMA_COHERENT |
28 | select HAVE_DEBUG_KMEMLEAK | 36 | select HAVE_GENERIC_HARDIRQS |
37 | select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) | ||
38 | select HAVE_IDE if PCI || ISA || PCMCIA | ||
39 | select HAVE_IRQ_WORK | ||
29 | select HAVE_KERNEL_GZIP | 40 | select HAVE_KERNEL_GZIP |
30 | select HAVE_KERNEL_LZO | ||
31 | select HAVE_KERNEL_LZMA | 41 | select HAVE_KERNEL_LZMA |
42 | select HAVE_KERNEL_LZO | ||
32 | select HAVE_KERNEL_XZ | 43 | select HAVE_KERNEL_XZ |
33 | select HAVE_IRQ_WORK | 44 | select HAVE_KPROBES if !XIP_KERNEL |
45 | select HAVE_KRETPROBES if (HAVE_KPROBES) | ||
46 | select HAVE_MEMBLOCK | ||
47 | select HAVE_OPROFILE if (HAVE_PERF_EVENTS) | ||
34 | select HAVE_PERF_EVENTS | 48 | select HAVE_PERF_EVENTS |
35 | select PERF_USE_VMALLOC | ||
36 | select HAVE_REGS_AND_STACK_ACCESS_API | 49 | select HAVE_REGS_AND_STACK_ACCESS_API |
37 | select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) | 50 | select HAVE_SYSCALL_TRACEPOINTS |
38 | select HAVE_C_RECORDMCOUNT | ||
39 | select HAVE_GENERIC_HARDIRQS | ||
40 | select HARDIRQS_SW_RESEND | ||
41 | select GENERIC_IRQ_PROBE | ||
42 | select GENERIC_IRQ_SHOW | ||
43 | select HAVE_UID16 | 51 | select HAVE_UID16 |
44 | select ARCH_WANT_IPC_PARSE_VERSION | ||
45 | select HARDIRQS_SW_RESEND | ||
46 | select CPU_PM if (SUSPEND || CPU_IDLE) | ||
47 | select GENERIC_PCI_IOMAP | ||
48 | select HAVE_BPF_JIT | ||
49 | select GENERIC_SMP_IDLE_THREAD | ||
50 | select KTIME_SCALAR | 52 | select KTIME_SCALAR |
51 | select GENERIC_CLOCKEVENTS_BROADCAST if SMP | 53 | select PERF_USE_VMALLOC |
52 | select GENERIC_STRNCPY_FROM_USER | 54 | select RTC_LIB |
53 | select GENERIC_STRNLEN_USER | 55 | select SYS_SUPPORTS_APM_EMULATION |
54 | select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN | 56 | select HAVE_MOD_ARCH_SPECIFIC if ARM_UNWIND |
55 | select GENERIC_KERNEL_THREAD | 57 | select MODULES_USE_ELF_REL |
56 | help | 58 | help |
57 | The ARM series is a line of low-power-consumption RISC chip designs | 59 | The ARM series is a line of low-power-consumption RISC chip designs |
58 | licensed by ARM Ltd and targeted at embedded applications and | 60 | licensed by ARM Ltd and targeted at embedded applications and |
@@ -68,9 +70,9 @@ config NEED_SG_DMA_LENGTH | |||
68 | bool | 70 | bool |
69 | 71 | ||
70 | config ARM_DMA_USE_IOMMU | 72 | config ARM_DMA_USE_IOMMU |
71 | select NEED_SG_DMA_LENGTH | ||
72 | select ARM_HAS_SG_CHAIN | ||
73 | bool | 73 | bool |
74 | select ARM_HAS_SG_CHAIN | ||
75 | select NEED_SG_DMA_LENGTH | ||
74 | 76 | ||
75 | config HAVE_PWM | 77 | config HAVE_PWM |
76 | bool | 78 | bool |
@@ -262,69 +264,69 @@ choice | |||
262 | 264 | ||
263 | config ARCH_MULTIPLATFORM | 265 | config ARCH_MULTIPLATFORM |
264 | bool "Allow multiple platforms to be selected" | 266 | bool "Allow multiple platforms to be selected" |
267 | depends on MMU | ||
265 | select ARM_PATCH_PHYS_VIRT | 268 | select ARM_PATCH_PHYS_VIRT |
266 | select AUTO_ZRELADDR | 269 | select AUTO_ZRELADDR |
267 | select COMMON_CLK | 270 | select COMMON_CLK |
268 | select MULTI_IRQ_HANDLER | 271 | select MULTI_IRQ_HANDLER |
269 | select SPARSE_IRQ | 272 | select SPARSE_IRQ |
270 | select USE_OF | 273 | select USE_OF |
271 | depends on MMU | ||
272 | 274 | ||
273 | config ARCH_INTEGRATOR | 275 | config ARCH_INTEGRATOR |
274 | bool "ARM Ltd. Integrator family" | 276 | bool "ARM Ltd. Integrator family" |
275 | select ARM_AMBA | ||
276 | select ARCH_HAS_CPUFREQ | 277 | select ARCH_HAS_CPUFREQ |
278 | select ARM_AMBA | ||
277 | select COMMON_CLK | 279 | select COMMON_CLK |
278 | select COMMON_CLK_VERSATILE | 280 | select COMMON_CLK_VERSATILE |
281 | select GENERIC_CLOCKEVENTS | ||
279 | select HAVE_TCM | 282 | select HAVE_TCM |
280 | select ICST | 283 | select ICST |
281 | select GENERIC_CLOCKEVENTS | 284 | select MULTI_IRQ_HANDLER |
285 | select NEED_MACH_MEMORY_H | ||
282 | select PLAT_VERSATILE | 286 | select PLAT_VERSATILE |
283 | select PLAT_VERSATILE_FPGA_IRQ | 287 | select PLAT_VERSATILE_FPGA_IRQ |
284 | select NEED_MACH_MEMORY_H | ||
285 | select SPARSE_IRQ | 288 | select SPARSE_IRQ |
286 | select MULTI_IRQ_HANDLER | ||
287 | help | 289 | help |
288 | Support for ARM's Integrator platform. | 290 | Support for ARM's Integrator platform. |
289 | 291 | ||
290 | config ARCH_REALVIEW | 292 | config ARCH_REALVIEW |
291 | bool "ARM Ltd. RealView family" | 293 | bool "ARM Ltd. RealView family" |
294 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
292 | select ARM_AMBA | 295 | select ARM_AMBA |
296 | select ARM_TIMER_SP804 | ||
293 | select COMMON_CLK | 297 | select COMMON_CLK |
294 | select COMMON_CLK_VERSATILE | 298 | select COMMON_CLK_VERSATILE |
295 | select ICST | ||
296 | select GENERIC_CLOCKEVENTS | 299 | select GENERIC_CLOCKEVENTS |
297 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
298 | select PLAT_VERSATILE | ||
299 | select PLAT_VERSATILE_CLCD | ||
300 | select ARM_TIMER_SP804 | ||
301 | select GPIO_PL061 if GPIOLIB | 300 | select GPIO_PL061 if GPIOLIB |
301 | select ICST | ||
302 | select NEED_MACH_MEMORY_H | 302 | select NEED_MACH_MEMORY_H |
303 | select PLAT_VERSATILE | ||
304 | select PLAT_VERSATILE_CLCD | ||
303 | help | 305 | help |
304 | This enables support for ARM Ltd RealView boards. | 306 | This enables support for ARM Ltd RealView boards. |
305 | 307 | ||
306 | config ARCH_VERSATILE | 308 | config ARCH_VERSATILE |
307 | bool "ARM Ltd. Versatile family" | 309 | bool "ARM Ltd. Versatile family" |
310 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
308 | select ARM_AMBA | 311 | select ARM_AMBA |
312 | select ARM_TIMER_SP804 | ||
309 | select ARM_VIC | 313 | select ARM_VIC |
310 | select CLKDEV_LOOKUP | 314 | select CLKDEV_LOOKUP |
315 | select GENERIC_CLOCKEVENTS | ||
311 | select HAVE_MACH_CLKDEV | 316 | select HAVE_MACH_CLKDEV |
312 | select ICST | 317 | select ICST |
313 | select GENERIC_CLOCKEVENTS | ||
314 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
315 | select PLAT_VERSATILE | 318 | select PLAT_VERSATILE |
316 | select PLAT_VERSATILE_CLOCK | ||
317 | select PLAT_VERSATILE_CLCD | 319 | select PLAT_VERSATILE_CLCD |
320 | select PLAT_VERSATILE_CLOCK | ||
318 | select PLAT_VERSATILE_FPGA_IRQ | 321 | select PLAT_VERSATILE_FPGA_IRQ |
319 | select ARM_TIMER_SP804 | ||
320 | help | 322 | help |
321 | This enables support for ARM Ltd Versatile board. | 323 | This enables support for ARM Ltd Versatile board. |
322 | 324 | ||
323 | config ARCH_AT91 | 325 | config ARCH_AT91 |
324 | bool "Atmel AT91" | 326 | bool "Atmel AT91" |
325 | select ARCH_REQUIRE_GPIOLIB | 327 | select ARCH_REQUIRE_GPIOLIB |
326 | select HAVE_CLK | ||
327 | select CLKDEV_LOOKUP | 328 | select CLKDEV_LOOKUP |
329 | select HAVE_CLK | ||
328 | select IRQ_DOMAIN | 330 | select IRQ_DOMAIN |
329 | select NEED_MACH_GPIO_H | 331 | select NEED_MACH_GPIO_H |
330 | select NEED_MACH_IO_H if PCCARD | 332 | select NEED_MACH_IO_H if PCCARD |
@@ -349,43 +351,43 @@ config ARCH_BCM2835 | |||
349 | This enables support for the Broadcom BCM2835 SoC. This SoC is | 351 | This enables support for the Broadcom BCM2835 SoC. This SoC is |
350 | use in the Raspberry Pi, and Roku 2 devices. | 352 | use in the Raspberry Pi, and Roku 2 devices. |
351 | 353 | ||
352 | config ARCH_CLPS711X | ||
353 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" | ||
354 | select CPU_ARM720T | ||
355 | select ARCH_USES_GETTIMEOFFSET | ||
356 | select COMMON_CLK | ||
357 | select CLKDEV_LOOKUP | ||
358 | select NEED_MACH_MEMORY_H | ||
359 | help | ||
360 | Support for Cirrus Logic 711x/721x/731x based boards. | ||
361 | |||
362 | config ARCH_CNS3XXX | 354 | config ARCH_CNS3XXX |
363 | bool "Cavium Networks CNS3XXX family" | 355 | bool "Cavium Networks CNS3XXX family" |
356 | select ARM_GIC | ||
364 | select CPU_V6K | 357 | select CPU_V6K |
365 | select GENERIC_CLOCKEVENTS | 358 | select GENERIC_CLOCKEVENTS |
366 | select ARM_GIC | ||
367 | select MIGHT_HAVE_CACHE_L2X0 | 359 | select MIGHT_HAVE_CACHE_L2X0 |
368 | select MIGHT_HAVE_PCI | 360 | select MIGHT_HAVE_PCI |
369 | select PCI_DOMAINS if PCI | 361 | select PCI_DOMAINS if PCI |
370 | help | 362 | help |
371 | Support for Cavium Networks CNS3XXX platform. | 363 | Support for Cavium Networks CNS3XXX platform. |
372 | 364 | ||
365 | config ARCH_CLPS711X | ||
366 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" | ||
367 | select ARCH_USES_GETTIMEOFFSET | ||
368 | select CLKDEV_LOOKUP | ||
369 | select COMMON_CLK | ||
370 | select CPU_ARM720T | ||
371 | select NEED_MACH_MEMORY_H | ||
372 | help | ||
373 | Support for Cirrus Logic 711x/721x/731x based boards. | ||
374 | |||
373 | config ARCH_GEMINI | 375 | config ARCH_GEMINI |
374 | bool "Cortina Systems Gemini" | 376 | bool "Cortina Systems Gemini" |
375 | select CPU_FA526 | ||
376 | select ARCH_REQUIRE_GPIOLIB | 377 | select ARCH_REQUIRE_GPIOLIB |
377 | select ARCH_USES_GETTIMEOFFSET | 378 | select ARCH_USES_GETTIMEOFFSET |
379 | select CPU_FA526 | ||
378 | help | 380 | help |
379 | Support for the Cortina Systems Gemini family SoCs | 381 | Support for the Cortina Systems Gemini family SoCs |
380 | 382 | ||
381 | config ARCH_SIRF | 383 | config ARCH_SIRF |
382 | bool "CSR SiRF" | 384 | bool "CSR SiRF" |
383 | select NO_IOPORT | ||
384 | select ARCH_REQUIRE_GPIOLIB | 385 | select ARCH_REQUIRE_GPIOLIB |
385 | select GENERIC_CLOCKEVENTS | ||
386 | select COMMON_CLK | 386 | select COMMON_CLK |
387 | select GENERIC_CLOCKEVENTS | ||
387 | select GENERIC_IRQ_CHIP | 388 | select GENERIC_IRQ_CHIP |
388 | select MIGHT_HAVE_CACHE_L2X0 | 389 | select MIGHT_HAVE_CACHE_L2X0 |
390 | select NO_IOPORT | ||
389 | select PINCTRL | 391 | select PINCTRL |
390 | select PINCTRL_SIRF | 392 | select PINCTRL_SIRF |
391 | select USE_OF | 393 | select USE_OF |
@@ -394,12 +396,12 @@ config ARCH_SIRF | |||
394 | 396 | ||
395 | config ARCH_EBSA110 | 397 | config ARCH_EBSA110 |
396 | bool "EBSA-110" | 398 | bool "EBSA-110" |
399 | select ARCH_USES_GETTIMEOFFSET | ||
397 | select CPU_SA110 | 400 | select CPU_SA110 |
398 | select ISA | 401 | select ISA |
399 | select NO_IOPORT | ||
400 | select ARCH_USES_GETTIMEOFFSET | ||
401 | select NEED_MACH_IO_H | 402 | select NEED_MACH_IO_H |
402 | select NEED_MACH_MEMORY_H | 403 | select NEED_MACH_MEMORY_H |
404 | select NO_IOPORT | ||
403 | help | 405 | help |
404 | This is an evaluation board for the StrongARM processor available | 406 | This is an evaluation board for the StrongARM processor available |
405 | from Digital. It has limited hardware on-board, including an | 407 | from Digital. It has limited hardware on-board, including an |
@@ -408,13 +410,13 @@ config ARCH_EBSA110 | |||
408 | 410 | ||
409 | config ARCH_EP93XX | 411 | config ARCH_EP93XX |
410 | bool "EP93xx-based" | 412 | bool "EP93xx-based" |
411 | select CPU_ARM920T | 413 | select ARCH_HAS_HOLES_MEMORYMODEL |
414 | select ARCH_REQUIRE_GPIOLIB | ||
415 | select ARCH_USES_GETTIMEOFFSET | ||
412 | select ARM_AMBA | 416 | select ARM_AMBA |
413 | select ARM_VIC | 417 | select ARM_VIC |
414 | select CLKDEV_LOOKUP | 418 | select CLKDEV_LOOKUP |
415 | select ARCH_REQUIRE_GPIOLIB | 419 | select CPU_ARM920T |
416 | select ARCH_HAS_HOLES_MEMORYMODEL | ||
417 | select ARCH_USES_GETTIMEOFFSET | ||
418 | select NEED_MACH_MEMORY_H | 420 | select NEED_MACH_MEMORY_H |
419 | help | 421 | help |
420 | This enables support for the Cirrus EP93xx series of CPUs. | 422 | This enables support for the Cirrus EP93xx series of CPUs. |
@@ -433,10 +435,10 @@ config ARCH_FOOTBRIDGE | |||
433 | 435 | ||
434 | config ARCH_MXC | 436 | config ARCH_MXC |
435 | bool "Freescale MXC/iMX-based" | 437 | bool "Freescale MXC/iMX-based" |
436 | select GENERIC_CLOCKEVENTS | ||
437 | select ARCH_REQUIRE_GPIOLIB | 438 | select ARCH_REQUIRE_GPIOLIB |
438 | select CLKDEV_LOOKUP | 439 | select CLKDEV_LOOKUP |
439 | select CLKSRC_MMIO | 440 | select CLKSRC_MMIO |
441 | select GENERIC_CLOCKEVENTS | ||
440 | select GENERIC_IRQ_CHIP | 442 | select GENERIC_IRQ_CHIP |
441 | select MULTI_IRQ_HANDLER | 443 | select MULTI_IRQ_HANDLER |
442 | select SPARSE_IRQ | 444 | select SPARSE_IRQ |
@@ -446,11 +448,11 @@ config ARCH_MXC | |||
446 | 448 | ||
447 | config ARCH_MXS | 449 | config ARCH_MXS |
448 | bool "Freescale MXS-based" | 450 | bool "Freescale MXS-based" |
449 | select GENERIC_CLOCKEVENTS | ||
450 | select ARCH_REQUIRE_GPIOLIB | 451 | select ARCH_REQUIRE_GPIOLIB |
451 | select CLKDEV_LOOKUP | 452 | select CLKDEV_LOOKUP |
452 | select CLKSRC_MMIO | 453 | select CLKSRC_MMIO |
453 | select COMMON_CLK | 454 | select COMMON_CLK |
455 | select GENERIC_CLOCKEVENTS | ||
454 | select HAVE_CLK_PREPARE | 456 | select HAVE_CLK_PREPARE |
455 | select MULTI_IRQ_HANDLER | 457 | select MULTI_IRQ_HANDLER |
456 | select PINCTRL | 458 | select PINCTRL |
@@ -461,43 +463,43 @@ config ARCH_MXS | |||
461 | 463 | ||
462 | config ARCH_NETX | 464 | config ARCH_NETX |
463 | bool "Hilscher NetX based" | 465 | bool "Hilscher NetX based" |
466 | select ARM_VIC | ||
464 | select CLKSRC_MMIO | 467 | select CLKSRC_MMIO |
465 | select CPU_ARM926T | 468 | select CPU_ARM926T |
466 | select ARM_VIC | ||
467 | select GENERIC_CLOCKEVENTS | 469 | select GENERIC_CLOCKEVENTS |
468 | help | 470 | help |
469 | This enables support for systems based on the Hilscher NetX Soc | 471 | This enables support for systems based on the Hilscher NetX Soc |
470 | 472 | ||
471 | config ARCH_H720X | 473 | config ARCH_H720X |
472 | bool "Hynix HMS720x-based" | 474 | bool "Hynix HMS720x-based" |
475 | select ARCH_USES_GETTIMEOFFSET | ||
473 | select CPU_ARM720T | 476 | select CPU_ARM720T |
474 | select ISA_DMA_API | 477 | select ISA_DMA_API |
475 | select ARCH_USES_GETTIMEOFFSET | ||
476 | help | 478 | help |
477 | This enables support for systems based on the Hynix HMS720x | 479 | This enables support for systems based on the Hynix HMS720x |
478 | 480 | ||
479 | config ARCH_IOP13XX | 481 | config ARCH_IOP13XX |
480 | bool "IOP13xx-based" | 482 | bool "IOP13xx-based" |
481 | depends on MMU | 483 | depends on MMU |
482 | select CPU_XSC3 | ||
483 | select PLAT_IOP | ||
484 | select PCI | ||
485 | select ARCH_SUPPORTS_MSI | 484 | select ARCH_SUPPORTS_MSI |
486 | select VMSPLIT_1G | 485 | select CPU_XSC3 |
487 | select NEED_MACH_MEMORY_H | 486 | select NEED_MACH_MEMORY_H |
488 | select NEED_RET_TO_USER | 487 | select NEED_RET_TO_USER |
488 | select PCI | ||
489 | select PLAT_IOP | ||
490 | select VMSPLIT_1G | ||
489 | help | 491 | help |
490 | Support for Intel's IOP13XX (XScale) family of processors. | 492 | Support for Intel's IOP13XX (XScale) family of processors. |
491 | 493 | ||
492 | config ARCH_IOP32X | 494 | config ARCH_IOP32X |
493 | bool "IOP32x-based" | 495 | bool "IOP32x-based" |
494 | depends on MMU | 496 | depends on MMU |
497 | select ARCH_REQUIRE_GPIOLIB | ||
495 | select CPU_XSCALE | 498 | select CPU_XSCALE |
496 | select NEED_MACH_GPIO_H | 499 | select NEED_MACH_GPIO_H |
497 | select NEED_RET_TO_USER | 500 | select NEED_RET_TO_USER |
498 | select PLAT_IOP | ||
499 | select PCI | 501 | select PCI |
500 | select ARCH_REQUIRE_GPIOLIB | 502 | select PLAT_IOP |
501 | help | 503 | help |
502 | Support for Intel's 80219 and IOP32X (XScale) family of | 504 | Support for Intel's 80219 and IOP32X (XScale) family of |
503 | processors. | 505 | processors. |
@@ -505,12 +507,12 @@ config ARCH_IOP32X | |||
505 | config ARCH_IOP33X | 507 | config ARCH_IOP33X |
506 | bool "IOP33x-based" | 508 | bool "IOP33x-based" |
507 | depends on MMU | 509 | depends on MMU |
510 | select ARCH_REQUIRE_GPIOLIB | ||
508 | select CPU_XSCALE | 511 | select CPU_XSCALE |
509 | select NEED_MACH_GPIO_H | 512 | select NEED_MACH_GPIO_H |
510 | select NEED_RET_TO_USER | 513 | select NEED_RET_TO_USER |
511 | select PLAT_IOP | ||
512 | select PCI | 514 | select PCI |
513 | select ARCH_REQUIRE_GPIOLIB | 515 | select PLAT_IOP |
514 | help | 516 | help |
515 | Support for Intel's IOP33X (XScale) family of processors. | 517 | Support for Intel's IOP33X (XScale) family of processors. |
516 | 518 | ||
@@ -518,20 +520,20 @@ config ARCH_IXP4XX | |||
518 | bool "IXP4xx-based" | 520 | bool "IXP4xx-based" |
519 | depends on MMU | 521 | depends on MMU |
520 | select ARCH_HAS_DMA_SET_COHERENT_MASK | 522 | select ARCH_HAS_DMA_SET_COHERENT_MASK |
523 | select ARCH_REQUIRE_GPIOLIB | ||
521 | select CLKSRC_MMIO | 524 | select CLKSRC_MMIO |
522 | select CPU_XSCALE | 525 | select CPU_XSCALE |
523 | select ARCH_REQUIRE_GPIOLIB | 526 | select DMABOUNCE if PCI |
524 | select GENERIC_CLOCKEVENTS | 527 | select GENERIC_CLOCKEVENTS |
525 | select MIGHT_HAVE_PCI | 528 | select MIGHT_HAVE_PCI |
526 | select NEED_MACH_IO_H | 529 | select NEED_MACH_IO_H |
527 | select DMABOUNCE if PCI | ||
528 | help | 530 | help |
529 | Support for Intel's IXP4XX (XScale) family of processors. | 531 | Support for Intel's IXP4XX (XScale) family of processors. |
530 | 532 | ||
531 | config ARCH_DOVE | 533 | config ARCH_DOVE |
532 | bool "Marvell Dove" | 534 | bool "Marvell Dove" |
533 | select CPU_V7 | ||
534 | select ARCH_REQUIRE_GPIOLIB | 535 | select ARCH_REQUIRE_GPIOLIB |
536 | select CPU_V7 | ||
535 | select GENERIC_CLOCKEVENTS | 537 | select GENERIC_CLOCKEVENTS |
536 | select MIGHT_HAVE_PCI | 538 | select MIGHT_HAVE_PCI |
537 | select PLAT_ORION_LEGACY | 539 | select PLAT_ORION_LEGACY |
@@ -541,36 +543,21 @@ config ARCH_DOVE | |||
541 | 543 | ||
542 | config ARCH_KIRKWOOD | 544 | config ARCH_KIRKWOOD |
543 | bool "Marvell Kirkwood" | 545 | bool "Marvell Kirkwood" |
544 | select CPU_FEROCEON | ||
545 | select PCI | ||
546 | select ARCH_REQUIRE_GPIOLIB | 546 | select ARCH_REQUIRE_GPIOLIB |
547 | select CPU_FEROCEON | ||
547 | select GENERIC_CLOCKEVENTS | 548 | select GENERIC_CLOCKEVENTS |
549 | select PCI | ||
548 | select PLAT_ORION_LEGACY | 550 | select PLAT_ORION_LEGACY |
549 | help | 551 | help |
550 | Support for the following Marvell Kirkwood series SoCs: | 552 | Support for the following Marvell Kirkwood series SoCs: |
551 | 88F6180, 88F6192 and 88F6281. | 553 | 88F6180, 88F6192 and 88F6281. |
552 | 554 | ||
553 | config ARCH_LPC32XX | ||
554 | bool "NXP LPC32XX" | ||
555 | select CLKSRC_MMIO | ||
556 | select CPU_ARM926T | ||
557 | select ARCH_REQUIRE_GPIOLIB | ||
558 | select HAVE_IDE | ||
559 | select ARM_AMBA | ||
560 | select USB_ARCH_HAS_OHCI | ||
561 | select CLKDEV_LOOKUP | ||
562 | select GENERIC_CLOCKEVENTS | ||
563 | select USE_OF | ||
564 | select HAVE_PWM | ||
565 | help | ||
566 | Support for the NXP LPC32XX family of processors | ||
567 | |||
568 | config ARCH_MV78XX0 | 555 | config ARCH_MV78XX0 |
569 | bool "Marvell MV78xx0" | 556 | bool "Marvell MV78xx0" |
570 | select CPU_FEROCEON | ||
571 | select PCI | ||
572 | select ARCH_REQUIRE_GPIOLIB | 557 | select ARCH_REQUIRE_GPIOLIB |
558 | select CPU_FEROCEON | ||
573 | select GENERIC_CLOCKEVENTS | 559 | select GENERIC_CLOCKEVENTS |
560 | select PCI | ||
574 | select PLAT_ORION_LEGACY | 561 | select PLAT_ORION_LEGACY |
575 | help | 562 | help |
576 | Support for the following Marvell MV78xx0 series SoCs: | 563 | Support for the following Marvell MV78xx0 series SoCs: |
@@ -579,10 +566,10 @@ config ARCH_MV78XX0 | |||
579 | config ARCH_ORION5X | 566 | config ARCH_ORION5X |
580 | bool "Marvell Orion" | 567 | bool "Marvell Orion" |
581 | depends on MMU | 568 | depends on MMU |
582 | select CPU_FEROCEON | ||
583 | select PCI | ||
584 | select ARCH_REQUIRE_GPIOLIB | 569 | select ARCH_REQUIRE_GPIOLIB |
570 | select CPU_FEROCEON | ||
585 | select GENERIC_CLOCKEVENTS | 571 | select GENERIC_CLOCKEVENTS |
572 | select PCI | ||
586 | select PLAT_ORION_LEGACY | 573 | select PLAT_ORION_LEGACY |
587 | help | 574 | help |
588 | Support for the following Marvell Orion 5x series SoCs: | 575 | Support for the following Marvell Orion 5x series SoCs: |
@@ -594,33 +581,33 @@ config ARCH_MMP | |||
594 | depends on MMU | 581 | depends on MMU |
595 | select ARCH_REQUIRE_GPIOLIB | 582 | select ARCH_REQUIRE_GPIOLIB |
596 | select CLKDEV_LOOKUP | 583 | select CLKDEV_LOOKUP |
584 | select GENERIC_ALLOCATOR | ||
597 | select GENERIC_CLOCKEVENTS | 585 | select GENERIC_CLOCKEVENTS |
598 | select GPIO_PXA | 586 | select GPIO_PXA |
599 | select IRQ_DOMAIN | 587 | select IRQ_DOMAIN |
588 | select NEED_MACH_GPIO_H | ||
600 | select PLAT_PXA | 589 | select PLAT_PXA |
601 | select SPARSE_IRQ | 590 | select SPARSE_IRQ |
602 | select GENERIC_ALLOCATOR | ||
603 | select NEED_MACH_GPIO_H | ||
604 | help | 591 | help |
605 | Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line. | 592 | Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line. |
606 | 593 | ||
607 | config ARCH_KS8695 | 594 | config ARCH_KS8695 |
608 | bool "Micrel/Kendin KS8695" | 595 | bool "Micrel/Kendin KS8695" |
609 | select CPU_ARM922T | ||
610 | select ARCH_REQUIRE_GPIOLIB | 596 | select ARCH_REQUIRE_GPIOLIB |
611 | select NEED_MACH_MEMORY_H | ||
612 | select CLKSRC_MMIO | 597 | select CLKSRC_MMIO |
598 | select CPU_ARM922T | ||
613 | select GENERIC_CLOCKEVENTS | 599 | select GENERIC_CLOCKEVENTS |
600 | select NEED_MACH_MEMORY_H | ||
614 | help | 601 | help |
615 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based | 602 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based |
616 | System-on-Chip devices. | 603 | System-on-Chip devices. |
617 | 604 | ||
618 | config ARCH_W90X900 | 605 | config ARCH_W90X900 |
619 | bool "Nuvoton W90X900 CPU" | 606 | bool "Nuvoton W90X900 CPU" |
620 | select CPU_ARM926T | ||
621 | select ARCH_REQUIRE_GPIOLIB | 607 | select ARCH_REQUIRE_GPIOLIB |
622 | select CLKDEV_LOOKUP | 608 | select CLKDEV_LOOKUP |
623 | select CLKSRC_MMIO | 609 | select CLKSRC_MMIO |
610 | select CPU_ARM926T | ||
624 | select GENERIC_CLOCKEVENTS | 611 | select GENERIC_CLOCKEVENTS |
625 | help | 612 | help |
626 | Support for Nuvoton (Winbond logic dept.) ARM9 processor, | 613 | Support for Nuvoton (Winbond logic dept.) ARM9 processor, |
@@ -631,18 +618,33 @@ config ARCH_W90X900 | |||
631 | <http://www.nuvoton.com/hq/enu/ProductAndSales/ProductLines/ | 618 | <http://www.nuvoton.com/hq/enu/ProductAndSales/ProductLines/ |
632 | ConsumerElectronicsIC/ARMMicrocontroller/ARMMicrocontroller> | 619 | ConsumerElectronicsIC/ARMMicrocontroller/ARMMicrocontroller> |
633 | 620 | ||
621 | config ARCH_LPC32XX | ||
622 | bool "NXP LPC32XX" | ||
623 | select ARCH_REQUIRE_GPIOLIB | ||
624 | select ARM_AMBA | ||
625 | select CLKDEV_LOOKUP | ||
626 | select CLKSRC_MMIO | ||
627 | select CPU_ARM926T | ||
628 | select GENERIC_CLOCKEVENTS | ||
629 | select HAVE_IDE | ||
630 | select HAVE_PWM | ||
631 | select USB_ARCH_HAS_OHCI | ||
632 | select USE_OF | ||
633 | help | ||
634 | Support for the NXP LPC32XX family of processors | ||
635 | |||
634 | config ARCH_TEGRA | 636 | config ARCH_TEGRA |
635 | bool "NVIDIA Tegra" | 637 | bool "NVIDIA Tegra" |
638 | select ARCH_HAS_CPUFREQ | ||
636 | select CLKDEV_LOOKUP | 639 | select CLKDEV_LOOKUP |
637 | select CLKSRC_MMIO | 640 | select CLKSRC_MMIO |
641 | select COMMON_CLK | ||
638 | select GENERIC_CLOCKEVENTS | 642 | select GENERIC_CLOCKEVENTS |
639 | select GENERIC_GPIO | 643 | select GENERIC_GPIO |
640 | select HAVE_CLK | 644 | select HAVE_CLK |
641 | select HAVE_SMP | 645 | select HAVE_SMP |
642 | select MIGHT_HAVE_CACHE_L2X0 | 646 | select MIGHT_HAVE_CACHE_L2X0 |
643 | select ARCH_HAS_CPUFREQ | ||
644 | select USE_OF | 647 | select USE_OF |
645 | select COMMON_CLK | ||
646 | help | 648 | help |
647 | This enables support for NVIDIA Tegra based systems (Tegra APX, | 649 | This enables support for NVIDIA Tegra based systems (Tegra APX, |
648 | Tegra 6xx and Tegra 2 series). | 650 | Tegra 6xx and Tegra 2 series). |
@@ -650,29 +652,29 @@ config ARCH_TEGRA | |||
650 | config ARCH_PXA | 652 | config ARCH_PXA |
651 | bool "PXA2xx/PXA3xx-based" | 653 | bool "PXA2xx/PXA3xx-based" |
652 | depends on MMU | 654 | depends on MMU |
653 | select ARCH_MTD_XIP | ||
654 | select ARCH_HAS_CPUFREQ | 655 | select ARCH_HAS_CPUFREQ |
656 | select ARCH_MTD_XIP | ||
657 | select ARCH_REQUIRE_GPIOLIB | ||
658 | select ARM_CPU_SUSPEND if PM | ||
659 | select AUTO_ZRELADDR | ||
655 | select CLKDEV_LOOKUP | 660 | select CLKDEV_LOOKUP |
656 | select CLKSRC_MMIO | 661 | select CLKSRC_MMIO |
657 | select ARCH_REQUIRE_GPIOLIB | ||
658 | select GENERIC_CLOCKEVENTS | 662 | select GENERIC_CLOCKEVENTS |
659 | select GPIO_PXA | 663 | select GPIO_PXA |
660 | select PLAT_PXA | ||
661 | select SPARSE_IRQ | ||
662 | select AUTO_ZRELADDR | ||
663 | select MULTI_IRQ_HANDLER | ||
664 | select ARM_CPU_SUSPEND if PM | ||
665 | select HAVE_IDE | 664 | select HAVE_IDE |
665 | select MULTI_IRQ_HANDLER | ||
666 | select NEED_MACH_GPIO_H | 666 | select NEED_MACH_GPIO_H |
667 | select PLAT_PXA | ||
668 | select SPARSE_IRQ | ||
667 | help | 669 | help |
668 | Support for Intel/Marvell's PXA2xx/PXA3xx processor line. | 670 | Support for Intel/Marvell's PXA2xx/PXA3xx processor line. |
669 | 671 | ||
670 | config ARCH_MSM | 672 | config ARCH_MSM |
671 | bool "Qualcomm MSM" | 673 | bool "Qualcomm MSM" |
672 | select HAVE_CLK | ||
673 | select GENERIC_CLOCKEVENTS | ||
674 | select ARCH_REQUIRE_GPIOLIB | 674 | select ARCH_REQUIRE_GPIOLIB |
675 | select CLKDEV_LOOKUP | 675 | select CLKDEV_LOOKUP |
676 | select GENERIC_CLOCKEVENTS | ||
677 | select HAVE_CLK | ||
676 | help | 678 | help |
677 | Support for Qualcomm MSM/QSD based systems. This runs on the | 679 | Support for Qualcomm MSM/QSD based systems. This runs on the |
678 | apps processor of the MSM/QSD and depends on a shared memory | 680 | apps processor of the MSM/QSD and depends on a shared memory |
@@ -682,50 +684,50 @@ config ARCH_MSM | |||
682 | 684 | ||
683 | config ARCH_SHMOBILE | 685 | config ARCH_SHMOBILE |
684 | bool "Renesas SH-Mobile / R-Mobile" | 686 | bool "Renesas SH-Mobile / R-Mobile" |
685 | select HAVE_CLK | ||
686 | select CLKDEV_LOOKUP | 687 | select CLKDEV_LOOKUP |
688 | select GENERIC_CLOCKEVENTS | ||
689 | select HAVE_CLK | ||
687 | select HAVE_MACH_CLKDEV | 690 | select HAVE_MACH_CLKDEV |
688 | select HAVE_SMP | 691 | select HAVE_SMP |
689 | select GENERIC_CLOCKEVENTS | ||
690 | select MIGHT_HAVE_CACHE_L2X0 | 692 | select MIGHT_HAVE_CACHE_L2X0 |
691 | select NO_IOPORT | ||
692 | select SPARSE_IRQ | ||
693 | select MULTI_IRQ_HANDLER | 693 | select MULTI_IRQ_HANDLER |
694 | select PM_GENERIC_DOMAINS if PM | ||
695 | select NEED_MACH_MEMORY_H | 694 | select NEED_MACH_MEMORY_H |
695 | select NO_IOPORT | ||
696 | select PM_GENERIC_DOMAINS if PM | ||
697 | select SPARSE_IRQ | ||
696 | help | 698 | help |
697 | Support for Renesas's SH-Mobile and R-Mobile ARM platforms. | 699 | Support for Renesas's SH-Mobile and R-Mobile ARM platforms. |
698 | 700 | ||
699 | config ARCH_RPC | 701 | config ARCH_RPC |
700 | bool "RiscPC" | 702 | bool "RiscPC" |
701 | select ARCH_ACORN | 703 | select ARCH_ACORN |
702 | select FIQ | ||
703 | select ARCH_MAY_HAVE_PC_FDC | 704 | select ARCH_MAY_HAVE_PC_FDC |
704 | select HAVE_PATA_PLATFORM | ||
705 | select ISA_DMA_API | ||
706 | select NO_IOPORT | ||
707 | select ARCH_SPARSEMEM_ENABLE | 705 | select ARCH_SPARSEMEM_ENABLE |
708 | select ARCH_USES_GETTIMEOFFSET | 706 | select ARCH_USES_GETTIMEOFFSET |
707 | select FIQ | ||
709 | select HAVE_IDE | 708 | select HAVE_IDE |
709 | select HAVE_PATA_PLATFORM | ||
710 | select ISA_DMA_API | ||
710 | select NEED_MACH_IO_H | 711 | select NEED_MACH_IO_H |
711 | select NEED_MACH_MEMORY_H | 712 | select NEED_MACH_MEMORY_H |
713 | select NO_IOPORT | ||
712 | help | 714 | help |
713 | On the Acorn Risc-PC, Linux can support the internal IDE disk and | 715 | On the Acorn Risc-PC, Linux can support the internal IDE disk and |
714 | CD-ROM interface, serial and parallel port, and the floppy drive. | 716 | CD-ROM interface, serial and parallel port, and the floppy drive. |
715 | 717 | ||
716 | config ARCH_SA1100 | 718 | config ARCH_SA1100 |
717 | bool "SA1100-based" | 719 | bool "SA1100-based" |
718 | select CLKSRC_MMIO | ||
719 | select CPU_SA1100 | ||
720 | select ISA | ||
721 | select ARCH_SPARSEMEM_ENABLE | ||
722 | select ARCH_MTD_XIP | ||
723 | select ARCH_HAS_CPUFREQ | 720 | select ARCH_HAS_CPUFREQ |
721 | select ARCH_MTD_XIP | ||
722 | select ARCH_REQUIRE_GPIOLIB | ||
723 | select ARCH_SPARSEMEM_ENABLE | ||
724 | select CLKDEV_LOOKUP | ||
725 | select CLKSRC_MMIO | ||
724 | select CPU_FREQ | 726 | select CPU_FREQ |
727 | select CPU_SA1100 | ||
725 | select GENERIC_CLOCKEVENTS | 728 | select GENERIC_CLOCKEVENTS |
726 | select CLKDEV_LOOKUP | ||
727 | select ARCH_REQUIRE_GPIOLIB | ||
728 | select HAVE_IDE | 729 | select HAVE_IDE |
730 | select ISA | ||
729 | select NEED_MACH_GPIO_H | 731 | select NEED_MACH_GPIO_H |
730 | select NEED_MACH_MEMORY_H | 732 | select NEED_MACH_MEMORY_H |
731 | select SPARSE_IRQ | 733 | select SPARSE_IRQ |
@@ -734,14 +736,14 @@ config ARCH_SA1100 | |||
734 | 736 | ||
735 | config ARCH_S3C24XX | 737 | config ARCH_S3C24XX |
736 | bool "Samsung S3C24XX SoCs" | 738 | bool "Samsung S3C24XX SoCs" |
737 | select GENERIC_GPIO | ||
738 | select ARCH_HAS_CPUFREQ | 739 | select ARCH_HAS_CPUFREQ |
739 | select HAVE_CLK | ||
740 | select CLKDEV_LOOKUP | ||
741 | select ARCH_USES_GETTIMEOFFSET | 740 | select ARCH_USES_GETTIMEOFFSET |
741 | select CLKDEV_LOOKUP | ||
742 | select GENERIC_GPIO | ||
743 | select HAVE_CLK | ||
742 | select HAVE_S3C2410_I2C if I2C | 744 | select HAVE_S3C2410_I2C if I2C |
743 | select HAVE_S3C_RTC if RTC_CLASS | ||
744 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 745 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
746 | select HAVE_S3C_RTC if RTC_CLASS | ||
745 | select NEED_MACH_GPIO_H | 747 | select NEED_MACH_GPIO_H |
746 | select NEED_MACH_IO_H | 748 | select NEED_MACH_IO_H |
747 | help | 749 | help |
@@ -752,38 +754,38 @@ config ARCH_S3C24XX | |||
752 | 754 | ||
753 | config ARCH_S3C64XX | 755 | config ARCH_S3C64XX |
754 | bool "Samsung S3C64XX" | 756 | bool "Samsung S3C64XX" |
755 | select PLAT_SAMSUNG | 757 | select ARCH_HAS_CPUFREQ |
756 | select CPU_V6 | 758 | select ARCH_REQUIRE_GPIOLIB |
759 | select ARCH_USES_GETTIMEOFFSET | ||
757 | select ARM_VIC | 760 | select ARM_VIC |
761 | select CLKDEV_LOOKUP | ||
762 | select CPU_V6 | ||
758 | select HAVE_CLK | 763 | select HAVE_CLK |
764 | select HAVE_S3C2410_I2C if I2C | ||
765 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | ||
759 | select HAVE_TCM | 766 | select HAVE_TCM |
760 | select CLKDEV_LOOKUP | 767 | select NEED_MACH_GPIO_H |
761 | select NO_IOPORT | 768 | select NO_IOPORT |
762 | select ARCH_USES_GETTIMEOFFSET | 769 | select PLAT_SAMSUNG |
763 | select ARCH_HAS_CPUFREQ | 770 | select S3C_DEV_NAND |
764 | select ARCH_REQUIRE_GPIOLIB | 771 | select S3C_GPIO_TRACK |
765 | select SAMSUNG_CLKSRC | 772 | select SAMSUNG_CLKSRC |
773 | select SAMSUNG_GPIOLIB_4BIT | ||
766 | select SAMSUNG_IRQ_VIC_TIMER | 774 | select SAMSUNG_IRQ_VIC_TIMER |
767 | select S3C_GPIO_TRACK | ||
768 | select S3C_DEV_NAND | ||
769 | select USB_ARCH_HAS_OHCI | 775 | select USB_ARCH_HAS_OHCI |
770 | select SAMSUNG_GPIOLIB_4BIT | ||
771 | select HAVE_S3C2410_I2C if I2C | ||
772 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | ||
773 | select NEED_MACH_GPIO_H | ||
774 | help | 776 | help |
775 | Samsung S3C64XX series based systems | 777 | Samsung S3C64XX series based systems |
776 | 778 | ||
777 | config ARCH_S5P64X0 | 779 | config ARCH_S5P64X0 |
778 | bool "Samsung S5P6440 S5P6450" | 780 | bool "Samsung S5P6440 S5P6450" |
779 | select CPU_V6 | ||
780 | select GENERIC_GPIO | ||
781 | select HAVE_CLK | ||
782 | select CLKDEV_LOOKUP | 781 | select CLKDEV_LOOKUP |
783 | select CLKSRC_MMIO | 782 | select CLKSRC_MMIO |
784 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 783 | select CPU_V6 |
785 | select GENERIC_CLOCKEVENTS | 784 | select GENERIC_CLOCKEVENTS |
785 | select GENERIC_GPIO | ||
786 | select HAVE_CLK | ||
786 | select HAVE_S3C2410_I2C if I2C | 787 | select HAVE_S3C2410_I2C if I2C |
788 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | ||
787 | select HAVE_S3C_RTC if RTC_CLASS | 789 | select HAVE_S3C_RTC if RTC_CLASS |
788 | select NEED_MACH_GPIO_H | 790 | select NEED_MACH_GPIO_H |
789 | help | 791 | help |
@@ -792,50 +794,50 @@ config ARCH_S5P64X0 | |||
792 | 794 | ||
793 | config ARCH_S5PC100 | 795 | config ARCH_S5PC100 |
794 | bool "Samsung S5PC100" | 796 | bool "Samsung S5PC100" |
795 | select GENERIC_GPIO | 797 | select ARCH_USES_GETTIMEOFFSET |
796 | select HAVE_CLK | ||
797 | select CLKDEV_LOOKUP | 798 | select CLKDEV_LOOKUP |
798 | select CPU_V7 | 799 | select CPU_V7 |
799 | select ARCH_USES_GETTIMEOFFSET | 800 | select GENERIC_GPIO |
801 | select HAVE_CLK | ||
800 | select HAVE_S3C2410_I2C if I2C | 802 | select HAVE_S3C2410_I2C if I2C |
801 | select HAVE_S3C_RTC if RTC_CLASS | ||
802 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 803 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
804 | select HAVE_S3C_RTC if RTC_CLASS | ||
803 | select NEED_MACH_GPIO_H | 805 | select NEED_MACH_GPIO_H |
804 | help | 806 | help |
805 | Samsung S5PC100 series based systems | 807 | Samsung S5PC100 series based systems |
806 | 808 | ||
807 | config ARCH_S5PV210 | 809 | config ARCH_S5PV210 |
808 | bool "Samsung S5PV210/S5PC110" | 810 | bool "Samsung S5PV210/S5PC110" |
809 | select CPU_V7 | 811 | select ARCH_HAS_CPUFREQ |
810 | select ARCH_SPARSEMEM_ENABLE | ||
811 | select ARCH_HAS_HOLES_MEMORYMODEL | 812 | select ARCH_HAS_HOLES_MEMORYMODEL |
812 | select GENERIC_GPIO | 813 | select ARCH_SPARSEMEM_ENABLE |
813 | select HAVE_CLK | ||
814 | select CLKDEV_LOOKUP | 814 | select CLKDEV_LOOKUP |
815 | select CLKSRC_MMIO | 815 | select CLKSRC_MMIO |
816 | select ARCH_HAS_CPUFREQ | 816 | select CPU_V7 |
817 | select GENERIC_CLOCKEVENTS | 817 | select GENERIC_CLOCKEVENTS |
818 | select GENERIC_GPIO | ||
819 | select HAVE_CLK | ||
818 | select HAVE_S3C2410_I2C if I2C | 820 | select HAVE_S3C2410_I2C if I2C |
819 | select HAVE_S3C_RTC if RTC_CLASS | ||
820 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 821 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
822 | select HAVE_S3C_RTC if RTC_CLASS | ||
821 | select NEED_MACH_GPIO_H | 823 | select NEED_MACH_GPIO_H |
822 | select NEED_MACH_MEMORY_H | 824 | select NEED_MACH_MEMORY_H |
823 | help | 825 | help |
824 | Samsung S5PV210/S5PC110 series based systems | 826 | Samsung S5PV210/S5PC110 series based systems |
825 | 827 | ||
826 | config ARCH_EXYNOS | 828 | config ARCH_EXYNOS |
827 | bool "SAMSUNG EXYNOS" | 829 | bool "Samsung EXYNOS" |
828 | select CPU_V7 | 830 | select ARCH_HAS_CPUFREQ |
829 | select ARCH_SPARSEMEM_ENABLE | ||
830 | select ARCH_HAS_HOLES_MEMORYMODEL | 831 | select ARCH_HAS_HOLES_MEMORYMODEL |
831 | select GENERIC_GPIO | 832 | select ARCH_SPARSEMEM_ENABLE |
832 | select HAVE_CLK | ||
833 | select CLKDEV_LOOKUP | 833 | select CLKDEV_LOOKUP |
834 | select ARCH_HAS_CPUFREQ | 834 | select CPU_V7 |
835 | select GENERIC_CLOCKEVENTS | 835 | select GENERIC_CLOCKEVENTS |
836 | select HAVE_S3C_RTC if RTC_CLASS | 836 | select GENERIC_GPIO |
837 | select HAVE_CLK | ||
837 | select HAVE_S3C2410_I2C if I2C | 838 | select HAVE_S3C2410_I2C if I2C |
838 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 839 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
840 | select HAVE_S3C_RTC if RTC_CLASS | ||
839 | select NEED_MACH_GPIO_H | 841 | select NEED_MACH_GPIO_H |
840 | select NEED_MACH_MEMORY_H | 842 | select NEED_MACH_MEMORY_H |
841 | help | 843 | help |
@@ -843,13 +845,13 @@ config ARCH_EXYNOS | |||
843 | 845 | ||
844 | config ARCH_SHARK | 846 | config ARCH_SHARK |
845 | bool "Shark" | 847 | bool "Shark" |
848 | select ARCH_USES_GETTIMEOFFSET | ||
846 | select CPU_SA110 | 849 | select CPU_SA110 |
847 | select ISA | 850 | select ISA |
848 | select ISA_DMA | 851 | select ISA_DMA |
849 | select ZONE_DMA | ||
850 | select PCI | ||
851 | select ARCH_USES_GETTIMEOFFSET | ||
852 | select NEED_MACH_MEMORY_H | 852 | select NEED_MACH_MEMORY_H |
853 | select PCI | ||
854 | select ZONE_DMA | ||
853 | help | 855 | help |
854 | Support for the StrongARM based Digital DNARD machine, also known | 856 | Support for the StrongARM based Digital DNARD machine, also known |
855 | as "Shark" (<http://www.shark-linux.de/shark.html>). | 857 | as "Shark" (<http://www.shark-linux.de/shark.html>). |
@@ -857,17 +859,17 @@ config ARCH_SHARK | |||
857 | config ARCH_U300 | 859 | config ARCH_U300 |
858 | bool "ST-Ericsson U300 Series" | 860 | bool "ST-Ericsson U300 Series" |
859 | depends on MMU | 861 | depends on MMU |
860 | select CLKSRC_MMIO | 862 | select ARCH_REQUIRE_GPIOLIB |
861 | select CPU_ARM926T | ||
862 | select HAVE_TCM | ||
863 | select ARM_AMBA | 863 | select ARM_AMBA |
864 | select ARM_PATCH_PHYS_VIRT | 864 | select ARM_PATCH_PHYS_VIRT |
865 | select ARM_VIC | 865 | select ARM_VIC |
866 | select GENERIC_CLOCKEVENTS | ||
867 | select CLKDEV_LOOKUP | 866 | select CLKDEV_LOOKUP |
867 | select CLKSRC_MMIO | ||
868 | select COMMON_CLK | 868 | select COMMON_CLK |
869 | select CPU_ARM926T | ||
870 | select GENERIC_CLOCKEVENTS | ||
869 | select GENERIC_GPIO | 871 | select GENERIC_GPIO |
870 | select ARCH_REQUIRE_GPIOLIB | 872 | select HAVE_TCM |
871 | select SPARSE_IRQ | 873 | select SPARSE_IRQ |
872 | help | 874 | help |
873 | Support for ST-Ericsson U300 series mobile platforms. | 875 | Support for ST-Ericsson U300 series mobile platforms. |
@@ -875,12 +877,12 @@ config ARCH_U300 | |||
875 | config ARCH_U8500 | 877 | config ARCH_U8500 |
876 | bool "ST-Ericsson U8500 Series" | 878 | bool "ST-Ericsson U8500 Series" |
877 | depends on MMU | 879 | depends on MMU |
878 | select CPU_V7 | 880 | select ARCH_HAS_CPUFREQ |
881 | select ARCH_REQUIRE_GPIOLIB | ||
879 | select ARM_AMBA | 882 | select ARM_AMBA |
880 | select GENERIC_CLOCKEVENTS | ||
881 | select CLKDEV_LOOKUP | 883 | select CLKDEV_LOOKUP |
882 | select ARCH_REQUIRE_GPIOLIB | 884 | select CPU_V7 |
883 | select ARCH_HAS_CPUFREQ | 885 | select GENERIC_CLOCKEVENTS |
884 | select HAVE_SMP | 886 | select HAVE_SMP |
885 | select MIGHT_HAVE_CACHE_L2X0 | 887 | select MIGHT_HAVE_CACHE_L2X0 |
886 | help | 888 | help |
@@ -888,78 +890,78 @@ config ARCH_U8500 | |||
888 | 890 | ||
889 | config ARCH_NOMADIK | 891 | config ARCH_NOMADIK |
890 | bool "STMicroelectronics Nomadik" | 892 | bool "STMicroelectronics Nomadik" |
893 | select ARCH_REQUIRE_GPIOLIB | ||
891 | select ARM_AMBA | 894 | select ARM_AMBA |
892 | select ARM_VIC | 895 | select ARM_VIC |
893 | select CPU_ARM926T | ||
894 | select COMMON_CLK | 896 | select COMMON_CLK |
897 | select CPU_ARM926T | ||
895 | select GENERIC_CLOCKEVENTS | 898 | select GENERIC_CLOCKEVENTS |
899 | select MIGHT_HAVE_CACHE_L2X0 | ||
896 | select PINCTRL | 900 | select PINCTRL |
897 | select PINCTRL_STN8815 | 901 | select PINCTRL_STN8815 |
898 | select MIGHT_HAVE_CACHE_L2X0 | ||
899 | select ARCH_REQUIRE_GPIOLIB | ||
900 | help | 902 | help |
901 | Support for the Nomadik platform by ST-Ericsson | 903 | Support for the Nomadik platform by ST-Ericsson |
902 | 904 | ||
905 | config PLAT_SPEAR | ||
906 | bool "ST SPEAr" | ||
907 | select ARCH_REQUIRE_GPIOLIB | ||
908 | select ARM_AMBA | ||
909 | select CLKDEV_LOOKUP | ||
910 | select CLKSRC_MMIO | ||
911 | select COMMON_CLK | ||
912 | select GENERIC_CLOCKEVENTS | ||
913 | select HAVE_CLK | ||
914 | help | ||
915 | Support for ST's SPEAr platform (SPEAr3xx, SPEAr6xx and SPEAr13xx). | ||
916 | |||
903 | config ARCH_DAVINCI | 917 | config ARCH_DAVINCI |
904 | bool "TI DaVinci" | 918 | bool "TI DaVinci" |
905 | select GENERIC_CLOCKEVENTS | 919 | select ARCH_HAS_HOLES_MEMORYMODEL |
906 | select ARCH_REQUIRE_GPIOLIB | 920 | select ARCH_REQUIRE_GPIOLIB |
907 | select ZONE_DMA | ||
908 | select HAVE_IDE | ||
909 | select CLKDEV_LOOKUP | 921 | select CLKDEV_LOOKUP |
910 | select GENERIC_ALLOCATOR | 922 | select GENERIC_ALLOCATOR |
923 | select GENERIC_CLOCKEVENTS | ||
911 | select GENERIC_IRQ_CHIP | 924 | select GENERIC_IRQ_CHIP |
912 | select ARCH_HAS_HOLES_MEMORYMODEL | 925 | select HAVE_IDE |
913 | select NEED_MACH_GPIO_H | 926 | select NEED_MACH_GPIO_H |
927 | select ZONE_DMA | ||
914 | help | 928 | help |
915 | Support for TI's DaVinci platform. | 929 | Support for TI's DaVinci platform. |
916 | 930 | ||
917 | config ARCH_OMAP | 931 | config ARCH_OMAP |
918 | bool "TI OMAP" | 932 | bool "TI OMAP" |
919 | depends on MMU | 933 | depends on MMU |
920 | select HAVE_CLK | ||
921 | select ARCH_REQUIRE_GPIOLIB | ||
922 | select ARCH_HAS_CPUFREQ | 934 | select ARCH_HAS_CPUFREQ |
923 | select CLKSRC_MMIO | ||
924 | select GENERIC_CLOCKEVENTS | ||
925 | select ARCH_HAS_HOLES_MEMORYMODEL | 935 | select ARCH_HAS_HOLES_MEMORYMODEL |
926 | select NEED_MACH_GPIO_H | ||
927 | help | ||
928 | Support for TI's OMAP platform (OMAP1/2/3/4). | ||
929 | |||
930 | config PLAT_SPEAR | ||
931 | bool "ST SPEAr" | ||
932 | select ARM_AMBA | ||
933 | select ARCH_REQUIRE_GPIOLIB | 936 | select ARCH_REQUIRE_GPIOLIB |
934 | select CLKDEV_LOOKUP | ||
935 | select COMMON_CLK | ||
936 | select CLKSRC_MMIO | 937 | select CLKSRC_MMIO |
937 | select GENERIC_CLOCKEVENTS | 938 | select GENERIC_CLOCKEVENTS |
938 | select HAVE_CLK | 939 | select HAVE_CLK |
940 | select NEED_MACH_GPIO_H | ||
939 | help | 941 | help |
940 | Support for ST's SPEAr platform (SPEAr3xx, SPEAr6xx and SPEAr13xx). | 942 | Support for TI's OMAP platform (OMAP1/2/3/4). |
941 | 943 | ||
942 | config ARCH_VT8500 | 944 | config ARCH_VT8500 |
943 | bool "VIA/WonderMedia 85xx" | 945 | bool "VIA/WonderMedia 85xx" |
944 | select CPU_ARM926T | ||
945 | select GENERIC_GPIO | ||
946 | select ARCH_HAS_CPUFREQ | 946 | select ARCH_HAS_CPUFREQ |
947 | select GENERIC_CLOCKEVENTS | ||
948 | select ARCH_REQUIRE_GPIOLIB | 947 | select ARCH_REQUIRE_GPIOLIB |
949 | select USE_OF | 948 | select CLKDEV_LOOKUP |
950 | select COMMON_CLK | 949 | select COMMON_CLK |
950 | select CPU_ARM926T | ||
951 | select GENERIC_CLOCKEVENTS | ||
952 | select GENERIC_GPIO | ||
951 | select HAVE_CLK | 953 | select HAVE_CLK |
952 | select CLKDEV_LOOKUP | 954 | select USE_OF |
953 | help | 955 | help |
954 | Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip. | 956 | Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip. |
955 | 957 | ||
956 | config ARCH_ZYNQ | 958 | config ARCH_ZYNQ |
957 | bool "Xilinx Zynq ARM Cortex A9 Platform" | 959 | bool "Xilinx Zynq ARM Cortex A9 Platform" |
960 | select ARM_AMBA | ||
961 | select ARM_GIC | ||
962 | select CLKDEV_LOOKUP | ||
958 | select CPU_V7 | 963 | select CPU_V7 |
959 | select GENERIC_CLOCKEVENTS | 964 | select GENERIC_CLOCKEVENTS |
960 | select CLKDEV_LOOKUP | ||
961 | select ARM_GIC | ||
962 | select ARM_AMBA | ||
963 | select ICST | 965 | select ICST |
964 | select MIGHT_HAVE_CACHE_L2X0 | 966 | select MIGHT_HAVE_CACHE_L2X0 |
965 | select USE_OF | 967 | select USE_OF |
@@ -974,33 +976,33 @@ comment "CPU Core family selection" | |||
974 | 976 | ||
975 | config ARCH_MULTI_V4 | 977 | config ARCH_MULTI_V4 |
976 | bool "ARMv4 based platforms (FA526, StrongARM)" | 978 | bool "ARMv4 based platforms (FA526, StrongARM)" |
977 | select ARCH_MULTI_V4_V5 | ||
978 | depends on !ARCH_MULTI_V6_V7 | 979 | depends on !ARCH_MULTI_V6_V7 |
980 | select ARCH_MULTI_V4_V5 | ||
979 | 981 | ||
980 | config ARCH_MULTI_V4T | 982 | config ARCH_MULTI_V4T |
981 | bool "ARMv4T based platforms (ARM720T, ARM920T, ...)" | 983 | bool "ARMv4T based platforms (ARM720T, ARM920T, ...)" |
982 | select ARCH_MULTI_V4_V5 | ||
983 | depends on !ARCH_MULTI_V6_V7 | 984 | depends on !ARCH_MULTI_V6_V7 |
985 | select ARCH_MULTI_V4_V5 | ||
984 | 986 | ||
985 | config ARCH_MULTI_V5 | 987 | config ARCH_MULTI_V5 |
986 | bool "ARMv5 based platforms (ARM926T, XSCALE, PJ1, ...)" | 988 | bool "ARMv5 based platforms (ARM926T, XSCALE, PJ1, ...)" |
987 | select ARCH_MULTI_V4_V5 | ||
988 | depends on !ARCH_MULTI_V6_V7 | 989 | depends on !ARCH_MULTI_V6_V7 |
990 | select ARCH_MULTI_V4_V5 | ||
989 | 991 | ||
990 | config ARCH_MULTI_V4_V5 | 992 | config ARCH_MULTI_V4_V5 |
991 | bool | 993 | bool |
992 | 994 | ||
993 | config ARCH_MULTI_V6 | 995 | config ARCH_MULTI_V6 |
994 | bool "ARMv6 based platforms (ARM11, Scorpion, ...)" | 996 | bool "ARMv6 based platforms (ARM11, Scorpion, ...)" |
995 | select CPU_V6 | ||
996 | select ARCH_MULTI_V6_V7 | 997 | select ARCH_MULTI_V6_V7 |
998 | select CPU_V6 | ||
997 | 999 | ||
998 | config ARCH_MULTI_V7 | 1000 | config ARCH_MULTI_V7 |
999 | bool "ARMv7 based platforms (Cortex-A, PJ4, Krait)" | 1001 | bool "ARMv7 based platforms (Cortex-A, PJ4, Krait)" |
1000 | select CPU_V7 | ||
1001 | select ARCH_VEXPRESS | ||
1002 | default y | 1002 | default y |
1003 | select ARCH_MULTI_V6_V7 | 1003 | select ARCH_MULTI_V6_V7 |
1004 | select ARCH_VEXPRESS | ||
1005 | select CPU_V7 | ||
1004 | 1006 | ||
1005 | config ARCH_MULTI_V6_V7 | 1007 | config ARCH_MULTI_V6_V7 |
1006 | bool | 1008 | bool |
@@ -1137,9 +1139,9 @@ config PLAT_IOP | |||
1137 | config PLAT_ORION | 1139 | config PLAT_ORION |
1138 | bool | 1140 | bool |
1139 | select CLKSRC_MMIO | 1141 | select CLKSRC_MMIO |
1142 | select COMMON_CLK | ||
1140 | select GENERIC_IRQ_CHIP | 1143 | select GENERIC_IRQ_CHIP |
1141 | select IRQ_DOMAIN | 1144 | select IRQ_DOMAIN |
1142 | select COMMON_CLK | ||
1143 | 1145 | ||
1144 | config PLAT_ORION_LEGACY | 1146 | config PLAT_ORION_LEGACY |
1145 | bool | 1147 | bool |
@@ -1497,8 +1499,8 @@ config SMP | |||
1497 | depends on GENERIC_CLOCKEVENTS | 1499 | depends on GENERIC_CLOCKEVENTS |
1498 | depends on HAVE_SMP | 1500 | depends on HAVE_SMP |
1499 | depends on MMU | 1501 | depends on MMU |
1500 | select USE_GENERIC_SMP_HELPERS | ||
1501 | select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP | 1502 | select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP |
1503 | select USE_GENERIC_SMP_HELPERS | ||
1502 | help | 1504 | help |
1503 | This enables support for systems with more than one CPU. If you have | 1505 | This enables support for systems with more than one CPU. If you have |
1504 | a system with only one CPU, like most personal computers, say N. If | 1506 | a system with only one CPU, like most personal computers, say N. If |
@@ -1857,9 +1859,9 @@ menu "Boot options" | |||
1857 | 1859 | ||
1858 | config USE_OF | 1860 | config USE_OF |
1859 | bool "Flattened Device Tree support" | 1861 | bool "Flattened Device Tree support" |
1862 | select IRQ_DOMAIN | ||
1860 | select OF | 1863 | select OF |
1861 | select OF_EARLY_FLATTREE | 1864 | select OF_EARLY_FLATTREE |
1862 | select IRQ_DOMAIN | ||
1863 | help | 1865 | help |
1864 | Include support for flattened device tree machine descriptions. | 1866 | Include support for flattened device tree machine descriptions. |
1865 | 1867 | ||
@@ -2141,8 +2143,8 @@ config CPU_FREQ_PXA | |||
2141 | bool | 2143 | bool |
2142 | depends on CPU_FREQ && ARCH_PXA && PXA25x | 2144 | depends on CPU_FREQ && ARCH_PXA && PXA25x |
2143 | default y | 2145 | default y |
2144 | select CPU_FREQ_TABLE | ||
2145 | select CPU_FREQ_DEFAULT_GOV_USERSPACE | 2146 | select CPU_FREQ_DEFAULT_GOV_USERSPACE |
2147 | select CPU_FREQ_TABLE | ||
2146 | 2148 | ||
2147 | config CPU_FREQ_S3C | 2149 | config CPU_FREQ_S3C |
2148 | bool | 2150 | bool |
diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore index d0d441c429a..f79a08efe00 100644 --- a/arch/arm/boot/compressed/.gitignore +++ b/arch/arm/boot/compressed/.gitignore | |||
@@ -1,6 +1,7 @@ | |||
1 | ashldi3.S | 1 | ashldi3.S |
2 | font.c | 2 | font.c |
3 | lib1funcs.S | 3 | lib1funcs.S |
4 | hyp-stub.S | ||
4 | piggy.gzip | 5 | piggy.gzip |
5 | piggy.lzo | 6 | piggy.lzo |
6 | piggy.lzma | 7 | piggy.lzma |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index bb267562e7e..a517153a13e 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -30,6 +30,10 @@ FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c | |||
30 | OBJS += string.o | 30 | OBJS += string.o |
31 | CFLAGS_string.o := -Os | 31 | CFLAGS_string.o := -Os |
32 | 32 | ||
33 | ifeq ($(CONFIG_ARM_VIRT_EXT),y) | ||
34 | OBJS += hyp-stub.o | ||
35 | endif | ||
36 | |||
33 | # | 37 | # |
34 | # Architecture dependencies | 38 | # Architecture dependencies |
35 | # | 39 | # |
@@ -126,7 +130,7 @@ KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) | |||
126 | endif | 130 | endif |
127 | 131 | ||
128 | ccflags-y := -fpic -fno-builtin -I$(obj) | 132 | ccflags-y := -fpic -fno-builtin -I$(obj) |
129 | asflags-y := -Wa,-march=all | 133 | asflags-y := -Wa,-march=all -DZIMAGE |
130 | 134 | ||
131 | # Supply kernel BSS size to the decompressor via a linker symbol. | 135 | # Supply kernel BSS size to the decompressor via a linker symbol. |
132 | KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \ | 136 | KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \ |
@@ -198,3 +202,6 @@ $(obj)/font.c: $(FONTC) | |||
198 | 202 | ||
199 | $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile $(KCONFIG_CONFIG) | 203 | $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile $(KCONFIG_CONFIG) |
200 | @sed "$(SEDFLAGS)" < $< > $@ | 204 | @sed "$(SEDFLAGS)" < $< > $@ |
205 | |||
206 | $(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S | ||
207 | $(call cmd,shipped) | ||
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index bc67cbff394..90275f036cd 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -9,6 +9,7 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | #include <linux/linkage.h> | 11 | #include <linux/linkage.h> |
12 | #include <asm/assembler.h> | ||
12 | 13 | ||
13 | /* | 14 | /* |
14 | * Debugging stuff | 15 | * Debugging stuff |
@@ -132,7 +133,12 @@ start: | |||
132 | .word start @ absolute load/run zImage address | 133 | .word start @ absolute load/run zImage address |
133 | .word _edata @ zImage end address | 134 | .word _edata @ zImage end address |
134 | THUMB( .thumb ) | 135 | THUMB( .thumb ) |
135 | 1: mov r7, r1 @ save architecture ID | 136 | 1: |
137 | mrs r9, cpsr | ||
138 | #ifdef CONFIG_ARM_VIRT_EXT | ||
139 | bl __hyp_stub_install @ get into SVC mode, reversibly | ||
140 | #endif | ||
141 | mov r7, r1 @ save architecture ID | ||
136 | mov r8, r2 @ save atags pointer | 142 | mov r8, r2 @ save atags pointer |
137 | 143 | ||
138 | #ifndef __ARM_ARCH_2__ | 144 | #ifndef __ARM_ARCH_2__ |
@@ -148,9 +154,9 @@ start: | |||
148 | ARM( swi 0x123456 ) @ angel_SWI_ARM | 154 | ARM( swi 0x123456 ) @ angel_SWI_ARM |
149 | THUMB( svc 0xab ) @ angel_SWI_THUMB | 155 | THUMB( svc 0xab ) @ angel_SWI_THUMB |
150 | not_angel: | 156 | not_angel: |
151 | mrs r2, cpsr @ turn off interrupts to | 157 | safe_svcmode_maskall r0 |
152 | orr r2, r2, #0xc0 @ prevent angel from running | 158 | msr spsr_cxsf, r9 @ Save the CPU boot mode in |
153 | msr cpsr_c, r2 | 159 | @ SPSR |
154 | #else | 160 | #else |
155 | teqp pc, #0x0c000003 @ turn off interrupts | 161 | teqp pc, #0x0c000003 @ turn off interrupts |
156 | #endif | 162 | #endif |
@@ -350,6 +356,20 @@ dtb_check_done: | |||
350 | adr r5, restart | 356 | adr r5, restart |
351 | bic r5, r5, #31 | 357 | bic r5, r5, #31 |
352 | 358 | ||
359 | /* Relocate the hyp vector base if necessary */ | ||
360 | #ifdef CONFIG_ARM_VIRT_EXT | ||
361 | mrs r0, spsr | ||
362 | and r0, r0, #MODE_MASK | ||
363 | cmp r0, #HYP_MODE | ||
364 | bne 1f | ||
365 | |||
366 | bl __hyp_get_vectors | ||
367 | sub r0, r0, r5 | ||
368 | add r0, r0, r10 | ||
369 | bl __hyp_set_vectors | ||
370 | 1: | ||
371 | #endif | ||
372 | |||
353 | sub r9, r6, r5 @ size to copy | 373 | sub r9, r6, r5 @ size to copy |
354 | add r9, r9, #31 @ rounded up to a multiple | 374 | add r9, r9, #31 @ rounded up to a multiple |
355 | bic r9, r9, #31 @ ... of 32 bytes | 375 | bic r9, r9, #31 @ ... of 32 bytes |
@@ -458,11 +478,29 @@ not_relocated: mov r0, #0 | |||
458 | bl decompress_kernel | 478 | bl decompress_kernel |
459 | bl cache_clean_flush | 479 | bl cache_clean_flush |
460 | bl cache_off | 480 | bl cache_off |
461 | mov r0, #0 @ must be zero | ||
462 | mov r1, r7 @ restore architecture number | 481 | mov r1, r7 @ restore architecture number |
463 | mov r2, r8 @ restore atags pointer | 482 | mov r2, r8 @ restore atags pointer |
464 | ARM( mov pc, r4 ) @ call kernel | 483 | |
465 | THUMB( bx r4 ) @ entry point is always ARM | 484 | #ifdef CONFIG_ARM_VIRT_EXT |
485 | mrs r0, spsr @ Get saved CPU boot mode | ||
486 | and r0, r0, #MODE_MASK | ||
487 | cmp r0, #HYP_MODE @ if not booted in HYP mode... | ||
488 | bne __enter_kernel @ boot kernel directly | ||
489 | |||
490 | adr r12, .L__hyp_reentry_vectors_offset | ||
491 | ldr r0, [r12] | ||
492 | add r0, r0, r12 | ||
493 | |||
494 | bl __hyp_set_vectors | ||
495 | __HVC(0) @ otherwise bounce to hyp mode | ||
496 | |||
497 | b . @ should never be reached | ||
498 | |||
499 | .align 2 | ||
500 | .L__hyp_reentry_vectors_offset: .long __hyp_reentry_vectors - . | ||
501 | #else | ||
502 | b __enter_kernel | ||
503 | #endif | ||
466 | 504 | ||
467 | .align 2 | 505 | .align 2 |
468 | .type LC0, #object | 506 | .type LC0, #object |
@@ -1196,6 +1234,25 @@ memdump: mov r12, r0 | |||
1196 | #endif | 1234 | #endif |
1197 | 1235 | ||
1198 | .ltorg | 1236 | .ltorg |
1237 | |||
1238 | #ifdef CONFIG_ARM_VIRT_EXT | ||
1239 | .align 5 | ||
1240 | __hyp_reentry_vectors: | ||
1241 | W(b) . @ reset | ||
1242 | W(b) . @ undef | ||
1243 | W(b) . @ svc | ||
1244 | W(b) . @ pabort | ||
1245 | W(b) . @ dabort | ||
1246 | W(b) __enter_kernel @ hyp | ||
1247 | W(b) . @ irq | ||
1248 | W(b) . @ fiq | ||
1249 | #endif /* CONFIG_ARM_VIRT_EXT */ | ||
1250 | |||
1251 | __enter_kernel: | ||
1252 | mov r0, #0 @ must be 0 | ||
1253 | ARM( mov pc, r4 ) @ call kernel | ||
1254 | THUMB( bx r4 ) @ entry point is always ARM | ||
1255 | |||
1199 | reloc_code_end: | 1256 | reloc_code_end: |
1200 | 1257 | ||
1201 | .align | 1258 | .align |
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig index 283fa1d804f..45ceeb0e93e 100644 --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig | |||
@@ -1,15 +1,15 @@ | |||
1 | config ARM_GIC | 1 | config ARM_GIC |
2 | bool | ||
2 | select IRQ_DOMAIN | 3 | select IRQ_DOMAIN |
3 | select MULTI_IRQ_HANDLER | 4 | select MULTI_IRQ_HANDLER |
4 | bool | ||
5 | 5 | ||
6 | config GIC_NON_BANKED | 6 | config GIC_NON_BANKED |
7 | bool | 7 | bool |
8 | 8 | ||
9 | config ARM_VIC | 9 | config ARM_VIC |
10 | bool | ||
10 | select IRQ_DOMAIN | 11 | select IRQ_DOMAIN |
11 | select MULTI_IRQ_HANDLER | 12 | select MULTI_IRQ_HANDLER |
12 | bool | ||
13 | 13 | ||
14 | config ARM_VIC_NR | 14 | config ARM_VIC_NR |
15 | int | 15 | int |
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index 8a7196ca510..f70ae175a3d 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild | |||
@@ -1,6 +1,4 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | header-y += hwcap.h | ||
4 | 2 | ||
5 | generic-y += auxvec.h | 3 | generic-y += auxvec.h |
6 | generic-y += bitsperlong.h | 4 | generic-y += bitsperlong.h |
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 5c8b3bf4d82..2ef95813fce 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/ptrace.h> | 23 | #include <asm/ptrace.h> |
24 | #include <asm/domain.h> | 24 | #include <asm/domain.h> |
25 | #include <asm/opcodes-virt.h> | ||
25 | 26 | ||
26 | #define IOMEM(x) (x) | 27 | #define IOMEM(x) (x) |
27 | 28 | ||
@@ -240,6 +241,34 @@ | |||
240 | #endif | 241 | #endif |
241 | 242 | ||
242 | /* | 243 | /* |
244 | * Helper macro to enter SVC mode cleanly and mask interrupts. reg is | ||
245 | * a scratch register for the macro to overwrite. | ||
246 | * | ||
247 | * This macro is intended for forcing the CPU into SVC mode at boot time. | ||
248 | * you cannot return to the original mode. | ||
249 | * | ||
250 | * Beware, it also clobers LR. | ||
251 | */ | ||
252 | .macro safe_svcmode_maskall reg:req | ||
253 | mrs \reg , cpsr | ||
254 | mov lr , \reg | ||
255 | and lr , lr , #MODE_MASK | ||
256 | cmp lr , #HYP_MODE | ||
257 | orr \reg , \reg , #PSR_I_BIT | PSR_F_BIT | ||
258 | bic \reg , \reg , #MODE_MASK | ||
259 | orr \reg , \reg , #SVC_MODE | ||
260 | THUMB( orr \reg , \reg , #PSR_T_BIT ) | ||
261 | bne 1f | ||
262 | orr \reg, \reg, #PSR_A_BIT | ||
263 | adr lr, BSYM(2f) | ||
264 | msr spsr_cxsf, \reg | ||
265 | __MSR_ELR_HYP(14) | ||
266 | __ERET | ||
267 | 1: msr cpsr_c, \reg | ||
268 | 2: | ||
269 | .endm | ||
270 | |||
271 | /* | ||
243 | * STRT/LDRT access macros with ARM and Thumb-2 variants | 272 | * STRT/LDRT access macros with ARM and Thumb-2 variants |
244 | */ | 273 | */ |
245 | #ifdef CONFIG_THUMB2_KERNEL | 274 | #ifdef CONFIG_THUMB2_KERNEL |
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index e4448e16046..e1489c54cd1 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -49,6 +49,13 @@ | |||
49 | * | 49 | * |
50 | * Unconditionally clean and invalidate the entire cache. | 50 | * Unconditionally clean and invalidate the entire cache. |
51 | * | 51 | * |
52 | * flush_kern_louis() | ||
53 | * | ||
54 | * Flush data cache levels up to the level of unification | ||
55 | * inner shareable and invalidate the I-cache. | ||
56 | * Only needed from v7 onwards, falls back to flush_cache_all() | ||
57 | * for all other processor versions. | ||
58 | * | ||
52 | * flush_user_all() | 59 | * flush_user_all() |
53 | * | 60 | * |
54 | * Clean and invalidate all user space cache entries | 61 | * Clean and invalidate all user space cache entries |
@@ -97,6 +104,7 @@ | |||
97 | struct cpu_cache_fns { | 104 | struct cpu_cache_fns { |
98 | void (*flush_icache_all)(void); | 105 | void (*flush_icache_all)(void); |
99 | void (*flush_kern_all)(void); | 106 | void (*flush_kern_all)(void); |
107 | void (*flush_kern_louis)(void); | ||
100 | void (*flush_user_all)(void); | 108 | void (*flush_user_all)(void); |
101 | void (*flush_user_range)(unsigned long, unsigned long, unsigned int); | 109 | void (*flush_user_range)(unsigned long, unsigned long, unsigned int); |
102 | 110 | ||
@@ -119,6 +127,7 @@ extern struct cpu_cache_fns cpu_cache; | |||
119 | 127 | ||
120 | #define __cpuc_flush_icache_all cpu_cache.flush_icache_all | 128 | #define __cpuc_flush_icache_all cpu_cache.flush_icache_all |
121 | #define __cpuc_flush_kern_all cpu_cache.flush_kern_all | 129 | #define __cpuc_flush_kern_all cpu_cache.flush_kern_all |
130 | #define __cpuc_flush_kern_louis cpu_cache.flush_kern_louis | ||
122 | #define __cpuc_flush_user_all cpu_cache.flush_user_all | 131 | #define __cpuc_flush_user_all cpu_cache.flush_user_all |
123 | #define __cpuc_flush_user_range cpu_cache.flush_user_range | 132 | #define __cpuc_flush_user_range cpu_cache.flush_user_range |
124 | #define __cpuc_coherent_kern_range cpu_cache.coherent_kern_range | 133 | #define __cpuc_coherent_kern_range cpu_cache.coherent_kern_range |
@@ -139,6 +148,7 @@ extern struct cpu_cache_fns cpu_cache; | |||
139 | 148 | ||
140 | extern void __cpuc_flush_icache_all(void); | 149 | extern void __cpuc_flush_icache_all(void); |
141 | extern void __cpuc_flush_kern_all(void); | 150 | extern void __cpuc_flush_kern_all(void); |
151 | extern void __cpuc_flush_kern_louis(void); | ||
142 | extern void __cpuc_flush_user_all(void); | 152 | extern void __cpuc_flush_user_all(void); |
143 | extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int); | 153 | extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int); |
144 | extern void __cpuc_coherent_kern_range(unsigned long, unsigned long); | 154 | extern void __cpuc_coherent_kern_range(unsigned long, unsigned long); |
@@ -204,6 +214,11 @@ static inline void __flush_icache_all(void) | |||
204 | __flush_icache_preferred(); | 214 | __flush_icache_preferred(); |
205 | } | 215 | } |
206 | 216 | ||
217 | /* | ||
218 | * Flush caches up to Level of Unification Inner Shareable | ||
219 | */ | ||
220 | #define flush_cache_louis() __cpuc_flush_kern_louis() | ||
221 | |||
207 | #define flush_cache_all() __cpuc_flush_kern_all() | 222 | #define flush_cache_all() __cpuc_flush_kern_all() |
208 | 223 | ||
209 | static inline void vivt_flush_cache_mm(struct mm_struct *mm) | 224 | static inline void vivt_flush_cache_mm(struct mm_struct *mm) |
diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h index 4f8d2c0dc44..cca9f15704e 100644 --- a/arch/arm/include/asm/glue-cache.h +++ b/arch/arm/include/asm/glue-cache.h | |||
@@ -132,6 +132,7 @@ | |||
132 | #ifndef MULTI_CACHE | 132 | #ifndef MULTI_CACHE |
133 | #define __cpuc_flush_icache_all __glue(_CACHE,_flush_icache_all) | 133 | #define __cpuc_flush_icache_all __glue(_CACHE,_flush_icache_all) |
134 | #define __cpuc_flush_kern_all __glue(_CACHE,_flush_kern_cache_all) | 134 | #define __cpuc_flush_kern_all __glue(_CACHE,_flush_kern_cache_all) |
135 | #define __cpuc_flush_kern_louis __glue(_CACHE,_flush_kern_cache_louis) | ||
135 | #define __cpuc_flush_user_all __glue(_CACHE,_flush_user_cache_all) | 136 | #define __cpuc_flush_user_all __glue(_CACHE,_flush_user_cache_all) |
136 | #define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range) | 137 | #define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range) |
137 | #define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range) | 138 | #define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range) |
diff --git a/arch/arm/include/asm/hwcap.h b/arch/arm/include/asm/hwcap.h index 917626128a1..6ff56eca3f1 100644 --- a/arch/arm/include/asm/hwcap.h +++ b/arch/arm/include/asm/hwcap.h | |||
@@ -1,31 +1,8 @@ | |||
1 | #ifndef __ASMARM_HWCAP_H | 1 | #ifndef __ASMARM_HWCAP_H |
2 | #define __ASMARM_HWCAP_H | 2 | #define __ASMARM_HWCAP_H |
3 | 3 | ||
4 | /* | 4 | #include <uapi/asm/hwcap.h> |
5 | * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP | ||
6 | */ | ||
7 | #define HWCAP_SWP (1 << 0) | ||
8 | #define HWCAP_HALF (1 << 1) | ||
9 | #define HWCAP_THUMB (1 << 2) | ||
10 | #define HWCAP_26BIT (1 << 3) /* Play it safe */ | ||
11 | #define HWCAP_FAST_MULT (1 << 4) | ||
12 | #define HWCAP_FPA (1 << 5) | ||
13 | #define HWCAP_VFP (1 << 6) | ||
14 | #define HWCAP_EDSP (1 << 7) | ||
15 | #define HWCAP_JAVA (1 << 8) | ||
16 | #define HWCAP_IWMMXT (1 << 9) | ||
17 | #define HWCAP_CRUNCH (1 << 10) | ||
18 | #define HWCAP_THUMBEE (1 << 11) | ||
19 | #define HWCAP_NEON (1 << 12) | ||
20 | #define HWCAP_VFPv3 (1 << 13) | ||
21 | #define HWCAP_VFPv3D16 (1 << 14) | ||
22 | #define HWCAP_TLS (1 << 15) | ||
23 | #define HWCAP_VFPv4 (1 << 16) | ||
24 | #define HWCAP_IDIVA (1 << 17) | ||
25 | #define HWCAP_IDIVT (1 << 18) | ||
26 | #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) | ||
27 | 5 | ||
28 | #if defined(__KERNEL__) | ||
29 | #if !defined(__ASSEMBLY__) | 6 | #if !defined(__ASSEMBLY__) |
30 | /* | 7 | /* |
31 | * This yields a mask that user programs can use to figure out what | 8 | * This yields a mask that user programs can use to figure out what |
@@ -35,5 +12,3 @@ | |||
35 | extern unsigned int elf_hwcap; | 12 | extern unsigned int elf_hwcap; |
36 | #endif | 13 | #endif |
37 | #endif | 14 | #endif |
38 | |||
39 | #endif | ||
diff --git a/arch/arm/include/asm/module.h b/arch/arm/include/asm/module.h index 6c6809f982f..0d3a28dbc8e 100644 --- a/arch/arm/include/asm/module.h +++ b/arch/arm/include/asm/module.h | |||
@@ -1,9 +1,7 @@ | |||
1 | #ifndef _ASM_ARM_MODULE_H | 1 | #ifndef _ASM_ARM_MODULE_H |
2 | #define _ASM_ARM_MODULE_H | 2 | #define _ASM_ARM_MODULE_H |
3 | 3 | ||
4 | #define Elf_Shdr Elf32_Shdr | 4 | #include <asm-generic/module.h> |
5 | #define Elf_Sym Elf32_Sym | ||
6 | #define Elf_Ehdr Elf32_Ehdr | ||
7 | 5 | ||
8 | struct unwind_table; | 6 | struct unwind_table; |
9 | 7 | ||
@@ -16,13 +14,11 @@ enum { | |||
16 | ARM_SEC_DEVEXIT, | 14 | ARM_SEC_DEVEXIT, |
17 | ARM_SEC_MAX, | 15 | ARM_SEC_MAX, |
18 | }; | 16 | }; |
19 | #endif | ||
20 | 17 | ||
21 | struct mod_arch_specific { | 18 | struct mod_arch_specific { |
22 | #ifdef CONFIG_ARM_UNWIND | ||
23 | struct unwind_table *unwind[ARM_SEC_MAX]; | 19 | struct unwind_table *unwind[ARM_SEC_MAX]; |
24 | #endif | ||
25 | }; | 20 | }; |
21 | #endif | ||
26 | 22 | ||
27 | /* | 23 | /* |
28 | * Add the ARM architecture version to the version magic string | 24 | * Add the ARM architecture version to the version magic string |
diff --git a/arch/arm/include/asm/opcodes-virt.h b/arch/arm/include/asm/opcodes-virt.h index b85665a96f8..efcfdf92d9d 100644 --- a/arch/arm/include/asm/opcodes-virt.h +++ b/arch/arm/include/asm/opcodes-virt.h | |||
@@ -26,4 +26,14 @@ | |||
26 | 0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & 0x0FFF) \ | 26 | 0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & 0x0FFF) \ |
27 | ) | 27 | ) |
28 | 28 | ||
29 | #define __ERET __inst_arm_thumb32( \ | ||
30 | 0xE160006E, \ | ||
31 | 0xF3DE8F00 \ | ||
32 | ) | ||
33 | |||
34 | #define __MSR_ELR_HYP(regnum) __inst_arm_thumb32( \ | ||
35 | 0xE12EF300 | regnum, \ | ||
36 | 0xF3808E30 | (regnum << 16) \ | ||
37 | ) | ||
38 | |||
29 | #endif /* ! __ASM_ARM_OPCODES_VIRT_H */ | 39 | #endif /* ! __ASM_ARM_OPCODES_VIRT_H */ |
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index 44fe998269d..3d52ee1bfb3 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
@@ -10,132 +10,12 @@ | |||
10 | #ifndef __ASM_ARM_PTRACE_H | 10 | #ifndef __ASM_ARM_PTRACE_H |
11 | #define __ASM_ARM_PTRACE_H | 11 | #define __ASM_ARM_PTRACE_H |
12 | 12 | ||
13 | #include <asm/hwcap.h> | 13 | #include <uapi/asm/ptrace.h> |
14 | |||
15 | #define PTRACE_GETREGS 12 | ||
16 | #define PTRACE_SETREGS 13 | ||
17 | #define PTRACE_GETFPREGS 14 | ||
18 | #define PTRACE_SETFPREGS 15 | ||
19 | /* PTRACE_ATTACH is 16 */ | ||
20 | /* PTRACE_DETACH is 17 */ | ||
21 | #define PTRACE_GETWMMXREGS 18 | ||
22 | #define PTRACE_SETWMMXREGS 19 | ||
23 | /* 20 is unused */ | ||
24 | #define PTRACE_OLDSETOPTIONS 21 | ||
25 | #define PTRACE_GET_THREAD_AREA 22 | ||
26 | #define PTRACE_SET_SYSCALL 23 | ||
27 | /* PTRACE_SYSCALL is 24 */ | ||
28 | #define PTRACE_GETCRUNCHREGS 25 | ||
29 | #define PTRACE_SETCRUNCHREGS 26 | ||
30 | #define PTRACE_GETVFPREGS 27 | ||
31 | #define PTRACE_SETVFPREGS 28 | ||
32 | #define PTRACE_GETHBPREGS 29 | ||
33 | #define PTRACE_SETHBPREGS 30 | ||
34 | |||
35 | /* | ||
36 | * PSR bits | ||
37 | */ | ||
38 | #define USR26_MODE 0x00000000 | ||
39 | #define FIQ26_MODE 0x00000001 | ||
40 | #define IRQ26_MODE 0x00000002 | ||
41 | #define SVC26_MODE 0x00000003 | ||
42 | #define USR_MODE 0x00000010 | ||
43 | #define FIQ_MODE 0x00000011 | ||
44 | #define IRQ_MODE 0x00000012 | ||
45 | #define SVC_MODE 0x00000013 | ||
46 | #define ABT_MODE 0x00000017 | ||
47 | #define UND_MODE 0x0000001b | ||
48 | #define SYSTEM_MODE 0x0000001f | ||
49 | #define MODE32_BIT 0x00000010 | ||
50 | #define MODE_MASK 0x0000001f | ||
51 | #define PSR_T_BIT 0x00000020 | ||
52 | #define PSR_F_BIT 0x00000040 | ||
53 | #define PSR_I_BIT 0x00000080 | ||
54 | #define PSR_A_BIT 0x00000100 | ||
55 | #define PSR_E_BIT 0x00000200 | ||
56 | #define PSR_J_BIT 0x01000000 | ||
57 | #define PSR_Q_BIT 0x08000000 | ||
58 | #define PSR_V_BIT 0x10000000 | ||
59 | #define PSR_C_BIT 0x20000000 | ||
60 | #define PSR_Z_BIT 0x40000000 | ||
61 | #define PSR_N_BIT 0x80000000 | ||
62 | |||
63 | /* | ||
64 | * Groups of PSR bits | ||
65 | */ | ||
66 | #define PSR_f 0xff000000 /* Flags */ | ||
67 | #define PSR_s 0x00ff0000 /* Status */ | ||
68 | #define PSR_x 0x0000ff00 /* Extension */ | ||
69 | #define PSR_c 0x000000ff /* Control */ | ||
70 | |||
71 | /* | ||
72 | * ARMv7 groups of PSR bits | ||
73 | */ | ||
74 | #define APSR_MASK 0xf80f0000 /* N, Z, C, V, Q and GE flags */ | ||
75 | #define PSR_ISET_MASK 0x01000010 /* ISA state (J, T) mask */ | ||
76 | #define PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ | ||
77 | #define PSR_ENDIAN_MASK 0x00000200 /* Endianness state mask */ | ||
78 | |||
79 | /* | ||
80 | * Default endianness state | ||
81 | */ | ||
82 | #ifdef CONFIG_CPU_ENDIAN_BE8 | ||
83 | #define PSR_ENDSTATE PSR_E_BIT | ||
84 | #else | ||
85 | #define PSR_ENDSTATE 0 | ||
86 | #endif | ||
87 | |||
88 | /* | ||
89 | * These are 'magic' values for PTRACE_PEEKUSR that return info about where a | ||
90 | * process is located in memory. | ||
91 | */ | ||
92 | #define PT_TEXT_ADDR 0x10000 | ||
93 | #define PT_DATA_ADDR 0x10004 | ||
94 | #define PT_TEXT_END_ADDR 0x10008 | ||
95 | 14 | ||
96 | #ifndef __ASSEMBLY__ | 15 | #ifndef __ASSEMBLY__ |
97 | |||
98 | /* | ||
99 | * This struct defines the way the registers are stored on the | ||
100 | * stack during a system call. Note that sizeof(struct pt_regs) | ||
101 | * has to be a multiple of 8. | ||
102 | */ | ||
103 | #ifndef __KERNEL__ | ||
104 | struct pt_regs { | ||
105 | long uregs[18]; | ||
106 | }; | ||
107 | #else /* __KERNEL__ */ | ||
108 | struct pt_regs { | 16 | struct pt_regs { |
109 | unsigned long uregs[18]; | 17 | unsigned long uregs[18]; |
110 | }; | 18 | }; |
111 | #endif /* __KERNEL__ */ | ||
112 | |||
113 | #define ARM_cpsr uregs[16] | ||
114 | #define ARM_pc uregs[15] | ||
115 | #define ARM_lr uregs[14] | ||
116 | #define ARM_sp uregs[13] | ||
117 | #define ARM_ip uregs[12] | ||
118 | #define ARM_fp uregs[11] | ||
119 | #define ARM_r10 uregs[10] | ||
120 | #define ARM_r9 uregs[9] | ||
121 | #define ARM_r8 uregs[8] | ||
122 | #define ARM_r7 uregs[7] | ||
123 | #define ARM_r6 uregs[6] | ||
124 | #define ARM_r5 uregs[5] | ||
125 | #define ARM_r4 uregs[4] | ||
126 | #define ARM_r3 uregs[3] | ||
127 | #define ARM_r2 uregs[2] | ||
128 | #define ARM_r1 uregs[1] | ||
129 | #define ARM_r0 uregs[0] | ||
130 | #define ARM_ORIG_r0 uregs[17] | ||
131 | |||
132 | /* | ||
133 | * The size of the user-visible VFP state as seen by PTRACE_GET/SETVFPREGS | ||
134 | * and core dumps. | ||
135 | */ | ||
136 | #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) | ||
137 | |||
138 | #ifdef __KERNEL__ | ||
139 | 19 | ||
140 | #define user_mode(regs) \ | 20 | #define user_mode(regs) \ |
141 | (((regs)->ARM_cpsr & 0xf) == 0) | 21 | (((regs)->ARM_cpsr & 0xf) == 0) |
@@ -259,9 +139,5 @@ static inline unsigned long user_stack_pointer(struct pt_regs *regs) | |||
259 | (struct pt_regs *)((sp | (THREAD_SIZE - 1)) - 7) - 1; \ | 139 | (struct pt_regs *)((sp | (THREAD_SIZE - 1)) - 7) - 1; \ |
260 | }) | 140 | }) |
261 | 141 | ||
262 | #endif /* __KERNEL__ */ | ||
263 | |||
264 | #endif /* __ASSEMBLY__ */ | 142 | #endif /* __ASSEMBLY__ */ |
265 | |||
266 | #endif | 143 | #endif |
267 | |||
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index 24d284a1bfc..c50f0560950 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h | |||
@@ -14,176 +14,8 @@ | |||
14 | #ifndef __ASMARM_SETUP_H | 14 | #ifndef __ASMARM_SETUP_H |
15 | #define __ASMARM_SETUP_H | 15 | #define __ASMARM_SETUP_H |
16 | 16 | ||
17 | #include <linux/types.h> | 17 | #include <uapi/asm/setup.h> |
18 | 18 | ||
19 | #define COMMAND_LINE_SIZE 1024 | ||
20 | |||
21 | /* The list ends with an ATAG_NONE node. */ | ||
22 | #define ATAG_NONE 0x00000000 | ||
23 | |||
24 | struct tag_header { | ||
25 | __u32 size; | ||
26 | __u32 tag; | ||
27 | }; | ||
28 | |||
29 | /* The list must start with an ATAG_CORE node */ | ||
30 | #define ATAG_CORE 0x54410001 | ||
31 | |||
32 | struct tag_core { | ||
33 | __u32 flags; /* bit 0 = read-only */ | ||
34 | __u32 pagesize; | ||
35 | __u32 rootdev; | ||
36 | }; | ||
37 | |||
38 | /* it is allowed to have multiple ATAG_MEM nodes */ | ||
39 | #define ATAG_MEM 0x54410002 | ||
40 | |||
41 | struct tag_mem32 { | ||
42 | __u32 size; | ||
43 | __u32 start; /* physical start address */ | ||
44 | }; | ||
45 | |||
46 | /* VGA text type displays */ | ||
47 | #define ATAG_VIDEOTEXT 0x54410003 | ||
48 | |||
49 | struct tag_videotext { | ||
50 | __u8 x; | ||
51 | __u8 y; | ||
52 | __u16 video_page; | ||
53 | __u8 video_mode; | ||
54 | __u8 video_cols; | ||
55 | __u16 video_ega_bx; | ||
56 | __u8 video_lines; | ||
57 | __u8 video_isvga; | ||
58 | __u16 video_points; | ||
59 | }; | ||
60 | |||
61 | /* describes how the ramdisk will be used in kernel */ | ||
62 | #define ATAG_RAMDISK 0x54410004 | ||
63 | |||
64 | struct tag_ramdisk { | ||
65 | __u32 flags; /* bit 0 = load, bit 1 = prompt */ | ||
66 | __u32 size; /* decompressed ramdisk size in _kilo_ bytes */ | ||
67 | __u32 start; /* starting block of floppy-based RAM disk image */ | ||
68 | }; | ||
69 | |||
70 | /* describes where the compressed ramdisk image lives (virtual address) */ | ||
71 | /* | ||
72 | * this one accidentally used virtual addresses - as such, | ||
73 | * it's deprecated. | ||
74 | */ | ||
75 | #define ATAG_INITRD 0x54410005 | ||
76 | |||
77 | /* describes where the compressed ramdisk image lives (physical address) */ | ||
78 | #define ATAG_INITRD2 0x54420005 | ||
79 | |||
80 | struct tag_initrd { | ||
81 | __u32 start; /* physical start address */ | ||
82 | __u32 size; /* size of compressed ramdisk image in bytes */ | ||
83 | }; | ||
84 | |||
85 | /* board serial number. "64 bits should be enough for everybody" */ | ||
86 | #define ATAG_SERIAL 0x54410006 | ||
87 | |||
88 | struct tag_serialnr { | ||
89 | __u32 low; | ||
90 | __u32 high; | ||
91 | }; | ||
92 | |||
93 | /* board revision */ | ||
94 | #define ATAG_REVISION 0x54410007 | ||
95 | |||
96 | struct tag_revision { | ||
97 | __u32 rev; | ||
98 | }; | ||
99 | |||
100 | /* initial values for vesafb-type framebuffers. see struct screen_info | ||
101 | * in include/linux/tty.h | ||
102 | */ | ||
103 | #define ATAG_VIDEOLFB 0x54410008 | ||
104 | |||
105 | struct tag_videolfb { | ||
106 | __u16 lfb_width; | ||
107 | __u16 lfb_height; | ||
108 | __u16 lfb_depth; | ||
109 | __u16 lfb_linelength; | ||
110 | __u32 lfb_base; | ||
111 | __u32 lfb_size; | ||
112 | __u8 red_size; | ||
113 | __u8 red_pos; | ||
114 | __u8 green_size; | ||
115 | __u8 green_pos; | ||
116 | __u8 blue_size; | ||
117 | __u8 blue_pos; | ||
118 | __u8 rsvd_size; | ||
119 | __u8 rsvd_pos; | ||
120 | }; | ||
121 | |||
122 | /* command line: \0 terminated string */ | ||
123 | #define ATAG_CMDLINE 0x54410009 | ||
124 | |||
125 | struct tag_cmdline { | ||
126 | char cmdline[1]; /* this is the minimum size */ | ||
127 | }; | ||
128 | |||
129 | /* acorn RiscPC specific information */ | ||
130 | #define ATAG_ACORN 0x41000101 | ||
131 | |||
132 | struct tag_acorn { | ||
133 | __u32 memc_control_reg; | ||
134 | __u32 vram_pages; | ||
135 | __u8 sounddefault; | ||
136 | __u8 adfsdrives; | ||
137 | }; | ||
138 | |||
139 | /* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */ | ||
140 | #define ATAG_MEMCLK 0x41000402 | ||
141 | |||
142 | struct tag_memclk { | ||
143 | __u32 fmemclk; | ||
144 | }; | ||
145 | |||
146 | struct tag { | ||
147 | struct tag_header hdr; | ||
148 | union { | ||
149 | struct tag_core core; | ||
150 | struct tag_mem32 mem; | ||
151 | struct tag_videotext videotext; | ||
152 | struct tag_ramdisk ramdisk; | ||
153 | struct tag_initrd initrd; | ||
154 | struct tag_serialnr serialnr; | ||
155 | struct tag_revision revision; | ||
156 | struct tag_videolfb videolfb; | ||
157 | struct tag_cmdline cmdline; | ||
158 | |||
159 | /* | ||
160 | * Acorn specific | ||
161 | */ | ||
162 | struct tag_acorn acorn; | ||
163 | |||
164 | /* | ||
165 | * DC21285 specific | ||
166 | */ | ||
167 | struct tag_memclk memclk; | ||
168 | } u; | ||
169 | }; | ||
170 | |||
171 | struct tagtable { | ||
172 | __u32 tag; | ||
173 | int (*parse)(const struct tag *); | ||
174 | }; | ||
175 | |||
176 | #define tag_member_present(tag,member) \ | ||
177 | ((unsigned long)(&((struct tag *)0L)->member + 1) \ | ||
178 | <= (tag)->hdr.size * 4) | ||
179 | |||
180 | #define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size)) | ||
181 | #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2) | ||
182 | |||
183 | #define for_each_tag(t,base) \ | ||
184 | for (t = base; t->hdr.size; t = tag_next(t)) | ||
185 | |||
186 | #ifdef __KERNEL__ | ||
187 | 19 | ||
188 | #define __tag __used __attribute__((__section__(".taglist.init"))) | 20 | #define __tag __used __attribute__((__section__(".taglist.init"))) |
189 | #define __tagtable(tag, fn) \ | 21 | #define __tagtable(tag, fn) \ |
@@ -221,6 +53,4 @@ extern int arm_add_memory(phys_addr_t start, phys_addr_t size); | |||
221 | extern void early_print(const char *str, ...); | 53 | extern void early_print(const char *str, ...); |
222 | extern void dump_machine_table(void); | 54 | extern void dump_machine_table(void); |
223 | 55 | ||
224 | #endif /* __KERNEL__ */ | ||
225 | |||
226 | #endif | 56 | #endif |
diff --git a/arch/arm/include/asm/signal.h b/arch/arm/include/asm/signal.h index 43ba0fb1c8a..5a7963dbd3f 100644 --- a/arch/arm/include/asm/signal.h +++ b/arch/arm/include/asm/signal.h | |||
@@ -1,12 +1,8 @@ | |||
1 | #ifndef _ASMARM_SIGNAL_H | 1 | #ifndef _ASMARM_SIGNAL_H |
2 | #define _ASMARM_SIGNAL_H | 2 | #define _ASMARM_SIGNAL_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <uapi/asm/signal.h> |
5 | 5 | ||
6 | /* Avoid too many header ordering problems. */ | ||
7 | struct siginfo; | ||
8 | |||
9 | #ifdef __KERNEL__ | ||
10 | /* Most things should be clean enough to redefine this at will, if care | 6 | /* Most things should be clean enough to redefine this at will, if care |
11 | is taken to make libc match. */ | 7 | is taken to make libc match. */ |
12 | 8 | ||
@@ -20,100 +16,6 @@ typedef struct { | |||
20 | unsigned long sig[_NSIG_WORDS]; | 16 | unsigned long sig[_NSIG_WORDS]; |
21 | } sigset_t; | 17 | } sigset_t; |
22 | 18 | ||
23 | #else | ||
24 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
25 | |||
26 | #define NSIG 32 | ||
27 | typedef unsigned long sigset_t; | ||
28 | |||
29 | #endif /* __KERNEL__ */ | ||
30 | |||
31 | #define SIGHUP 1 | ||
32 | #define SIGINT 2 | ||
33 | #define SIGQUIT 3 | ||
34 | #define SIGILL 4 | ||
35 | #define SIGTRAP 5 | ||
36 | #define SIGABRT 6 | ||
37 | #define SIGIOT 6 | ||
38 | #define SIGBUS 7 | ||
39 | #define SIGFPE 8 | ||
40 | #define SIGKILL 9 | ||
41 | #define SIGUSR1 10 | ||
42 | #define SIGSEGV 11 | ||
43 | #define SIGUSR2 12 | ||
44 | #define SIGPIPE 13 | ||
45 | #define SIGALRM 14 | ||
46 | #define SIGTERM 15 | ||
47 | #define SIGSTKFLT 16 | ||
48 | #define SIGCHLD 17 | ||
49 | #define SIGCONT 18 | ||
50 | #define SIGSTOP 19 | ||
51 | #define SIGTSTP 20 | ||
52 | #define SIGTTIN 21 | ||
53 | #define SIGTTOU 22 | ||
54 | #define SIGURG 23 | ||
55 | #define SIGXCPU 24 | ||
56 | #define SIGXFSZ 25 | ||
57 | #define SIGVTALRM 26 | ||
58 | #define SIGPROF 27 | ||
59 | #define SIGWINCH 28 | ||
60 | #define SIGIO 29 | ||
61 | #define SIGPOLL SIGIO | ||
62 | /* | ||
63 | #define SIGLOST 29 | ||
64 | */ | ||
65 | #define SIGPWR 30 | ||
66 | #define SIGSYS 31 | ||
67 | #define SIGUNUSED 31 | ||
68 | |||
69 | /* These should not be considered constants from userland. */ | ||
70 | #define SIGRTMIN 32 | ||
71 | #define SIGRTMAX _NSIG | ||
72 | |||
73 | #define SIGSWI 32 | ||
74 | |||
75 | /* | ||
76 | * SA_FLAGS values: | ||
77 | * | ||
78 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
79 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
80 | * SA_SIGINFO deliver the signal with SIGINFO structs | ||
81 | * SA_THIRTYTWO delivers the signal in 32-bit mode, even if the task | ||
82 | * is running in 26-bit. | ||
83 | * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). | ||
84 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
85 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
86 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
87 | * | ||
88 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
89 | * Unix names RESETHAND and NODEFER respectively. | ||
90 | */ | ||
91 | #define SA_NOCLDSTOP 0x00000001 | ||
92 | #define SA_NOCLDWAIT 0x00000002 | ||
93 | #define SA_SIGINFO 0x00000004 | ||
94 | #define SA_THIRTYTWO 0x02000000 | ||
95 | #define SA_RESTORER 0x04000000 | ||
96 | #define SA_ONSTACK 0x08000000 | ||
97 | #define SA_RESTART 0x10000000 | ||
98 | #define SA_NODEFER 0x40000000 | ||
99 | #define SA_RESETHAND 0x80000000 | ||
100 | |||
101 | #define SA_NOMASK SA_NODEFER | ||
102 | #define SA_ONESHOT SA_RESETHAND | ||
103 | |||
104 | |||
105 | /* | ||
106 | * sigaltstack controls | ||
107 | */ | ||
108 | #define SS_ONSTACK 1 | ||
109 | #define SS_DISABLE 2 | ||
110 | |||
111 | #define MINSIGSTKSZ 2048 | ||
112 | #define SIGSTKSZ 8192 | ||
113 | |||
114 | #include <asm-generic/signal-defs.h> | ||
115 | |||
116 | #ifdef __KERNEL__ | ||
117 | struct old_sigaction { | 19 | struct old_sigaction { |
118 | __sighandler_t sa_handler; | 20 | __sighandler_t sa_handler; |
119 | old_sigset_t sa_mask; | 21 | old_sigset_t sa_mask; |
@@ -132,33 +34,6 @@ struct k_sigaction { | |||
132 | struct sigaction sa; | 34 | struct sigaction sa; |
133 | }; | 35 | }; |
134 | 36 | ||
135 | #else | ||
136 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
137 | |||
138 | struct sigaction { | ||
139 | union { | ||
140 | __sighandler_t _sa_handler; | ||
141 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
142 | } _u; | ||
143 | sigset_t sa_mask; | ||
144 | unsigned long sa_flags; | ||
145 | void (*sa_restorer)(void); | ||
146 | }; | ||
147 | |||
148 | #define sa_handler _u._sa_handler | ||
149 | #define sa_sigaction _u._sa_sigaction | ||
150 | |||
151 | #endif /* __KERNEL__ */ | ||
152 | |||
153 | typedef struct sigaltstack { | ||
154 | void __user *ss_sp; | ||
155 | int ss_flags; | ||
156 | size_t ss_size; | ||
157 | } stack_t; | ||
158 | |||
159 | #ifdef __KERNEL__ | ||
160 | #include <asm/sigcontext.h> | 37 | #include <asm/sigcontext.h> |
161 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | 38 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
162 | #endif | 39 | #endif |
163 | |||
164 | #endif | ||
diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h index b859d82e30c..537fc9b9188 100644 --- a/arch/arm/include/asm/swab.h +++ b/arch/arm/include/asm/swab.h | |||
@@ -15,14 +15,8 @@ | |||
15 | #ifndef __ASM_ARM_SWAB_H | 15 | #ifndef __ASM_ARM_SWAB_H |
16 | #define __ASM_ARM_SWAB_H | 16 | #define __ASM_ARM_SWAB_H |
17 | 17 | ||
18 | #include <linux/compiler.h> | 18 | #include <uapi/asm/swab.h> |
19 | #include <linux/types.h> | ||
20 | 19 | ||
21 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
22 | # define __SWAB_64_THRU_32__ | ||
23 | #endif | ||
24 | |||
25 | #if defined(__KERNEL__) | ||
26 | #if __LINUX_ARM_ARCH__ >= 6 | 20 | #if __LINUX_ARM_ARCH__ >= 6 |
27 | 21 | ||
28 | static inline __attribute_const__ __u32 __arch_swahb32(__u32 x) | 22 | static inline __attribute_const__ __u32 __arch_swahb32(__u32 x) |
@@ -42,32 +36,3 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | |||
42 | 36 | ||
43 | #endif | 37 | #endif |
44 | #endif | 38 | #endif |
45 | |||
46 | #if !defined(__KERNEL__) || __LINUX_ARM_ARCH__ < 6 | ||
47 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | ||
48 | { | ||
49 | __u32 t; | ||
50 | |||
51 | #ifndef __thumb__ | ||
52 | if (!__builtin_constant_p(x)) { | ||
53 | /* | ||
54 | * The compiler needs a bit of a hint here to always do the | ||
55 | * right thing and not screw it up to different degrees | ||
56 | * depending on the gcc version. | ||
57 | */ | ||
58 | asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x)); | ||
59 | } else | ||
60 | #endif | ||
61 | t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */ | ||
62 | |||
63 | x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */ | ||
64 | t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */ | ||
65 | x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */ | ||
66 | |||
67 | return x; | ||
68 | } | ||
69 | #define __arch_swab32 __arch_swab32 | ||
70 | |||
71 | #endif | ||
72 | |||
73 | #endif | ||
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index f71cdab18b8..8477b4c1d39 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -151,7 +151,6 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
151 | #define TIF_SYSCALL_TRACE 8 | 151 | #define TIF_SYSCALL_TRACE 8 |
152 | #define TIF_SYSCALL_AUDIT 9 | 152 | #define TIF_SYSCALL_AUDIT 9 |
153 | #define TIF_SYSCALL_TRACEPOINT 10 | 153 | #define TIF_SYSCALL_TRACEPOINT 10 |
154 | #define TIF_POLLING_NRFLAG 16 | ||
155 | #define TIF_USING_IWMMXT 17 | 154 | #define TIF_USING_IWMMXT 17 |
156 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 155 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
157 | #define TIF_RESTORE_SIGMASK 20 | 156 | #define TIF_RESTORE_SIGMASK 20 |
@@ -164,7 +163,6 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
164 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 163 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
165 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 164 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
166 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) | 165 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) |
167 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | ||
168 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) | 166 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) |
169 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 167 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
170 | 168 | ||
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index f259921edfe..8f60b6e6bd4 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -13,447 +13,10 @@ | |||
13 | #ifndef __ASM_ARM_UNISTD_H | 13 | #ifndef __ASM_ARM_UNISTD_H |
14 | #define __ASM_ARM_UNISTD_H | 14 | #define __ASM_ARM_UNISTD_H |
15 | 15 | ||
16 | #define __NR_OABI_SYSCALL_BASE 0x900000 | 16 | #include <uapi/asm/unistd.h> |
17 | 17 | ||
18 | #if defined(__thumb__) || defined(__ARM_EABI__) | ||
19 | #define __NR_SYSCALL_BASE 0 | ||
20 | #else | ||
21 | #define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE | ||
22 | #endif | ||
23 | |||
24 | /* | ||
25 | * This file contains the system call numbers. | ||
26 | */ | ||
27 | |||
28 | #define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0) | ||
29 | #define __NR_exit (__NR_SYSCALL_BASE+ 1) | ||
30 | #define __NR_fork (__NR_SYSCALL_BASE+ 2) | ||
31 | #define __NR_read (__NR_SYSCALL_BASE+ 3) | ||
32 | #define __NR_write (__NR_SYSCALL_BASE+ 4) | ||
33 | #define __NR_open (__NR_SYSCALL_BASE+ 5) | ||
34 | #define __NR_close (__NR_SYSCALL_BASE+ 6) | ||
35 | /* 7 was sys_waitpid */ | ||
36 | #define __NR_creat (__NR_SYSCALL_BASE+ 8) | ||
37 | #define __NR_link (__NR_SYSCALL_BASE+ 9) | ||
38 | #define __NR_unlink (__NR_SYSCALL_BASE+ 10) | ||
39 | #define __NR_execve (__NR_SYSCALL_BASE+ 11) | ||
40 | #define __NR_chdir (__NR_SYSCALL_BASE+ 12) | ||
41 | #define __NR_time (__NR_SYSCALL_BASE+ 13) | ||
42 | #define __NR_mknod (__NR_SYSCALL_BASE+ 14) | ||
43 | #define __NR_chmod (__NR_SYSCALL_BASE+ 15) | ||
44 | #define __NR_lchown (__NR_SYSCALL_BASE+ 16) | ||
45 | /* 17 was sys_break */ | ||
46 | /* 18 was sys_stat */ | ||
47 | #define __NR_lseek (__NR_SYSCALL_BASE+ 19) | ||
48 | #define __NR_getpid (__NR_SYSCALL_BASE+ 20) | ||
49 | #define __NR_mount (__NR_SYSCALL_BASE+ 21) | ||
50 | #define __NR_umount (__NR_SYSCALL_BASE+ 22) | ||
51 | #define __NR_setuid (__NR_SYSCALL_BASE+ 23) | ||
52 | #define __NR_getuid (__NR_SYSCALL_BASE+ 24) | ||
53 | #define __NR_stime (__NR_SYSCALL_BASE+ 25) | ||
54 | #define __NR_ptrace (__NR_SYSCALL_BASE+ 26) | ||
55 | #define __NR_alarm (__NR_SYSCALL_BASE+ 27) | ||
56 | /* 28 was sys_fstat */ | ||
57 | #define __NR_pause (__NR_SYSCALL_BASE+ 29) | ||
58 | #define __NR_utime (__NR_SYSCALL_BASE+ 30) | ||
59 | /* 31 was sys_stty */ | ||
60 | /* 32 was sys_gtty */ | ||
61 | #define __NR_access (__NR_SYSCALL_BASE+ 33) | ||
62 | #define __NR_nice (__NR_SYSCALL_BASE+ 34) | ||
63 | /* 35 was sys_ftime */ | ||
64 | #define __NR_sync (__NR_SYSCALL_BASE+ 36) | ||
65 | #define __NR_kill (__NR_SYSCALL_BASE+ 37) | ||
66 | #define __NR_rename (__NR_SYSCALL_BASE+ 38) | ||
67 | #define __NR_mkdir (__NR_SYSCALL_BASE+ 39) | ||
68 | #define __NR_rmdir (__NR_SYSCALL_BASE+ 40) | ||
69 | #define __NR_dup (__NR_SYSCALL_BASE+ 41) | ||
70 | #define __NR_pipe (__NR_SYSCALL_BASE+ 42) | ||
71 | #define __NR_times (__NR_SYSCALL_BASE+ 43) | ||
72 | /* 44 was sys_prof */ | ||
73 | #define __NR_brk (__NR_SYSCALL_BASE+ 45) | ||
74 | #define __NR_setgid (__NR_SYSCALL_BASE+ 46) | ||
75 | #define __NR_getgid (__NR_SYSCALL_BASE+ 47) | ||
76 | /* 48 was sys_signal */ | ||
77 | #define __NR_geteuid (__NR_SYSCALL_BASE+ 49) | ||
78 | #define __NR_getegid (__NR_SYSCALL_BASE+ 50) | ||
79 | #define __NR_acct (__NR_SYSCALL_BASE+ 51) | ||
80 | #define __NR_umount2 (__NR_SYSCALL_BASE+ 52) | ||
81 | /* 53 was sys_lock */ | ||
82 | #define __NR_ioctl (__NR_SYSCALL_BASE+ 54) | ||
83 | #define __NR_fcntl (__NR_SYSCALL_BASE+ 55) | ||
84 | /* 56 was sys_mpx */ | ||
85 | #define __NR_setpgid (__NR_SYSCALL_BASE+ 57) | ||
86 | /* 58 was sys_ulimit */ | ||
87 | /* 59 was sys_olduname */ | ||
88 | #define __NR_umask (__NR_SYSCALL_BASE+ 60) | ||
89 | #define __NR_chroot (__NR_SYSCALL_BASE+ 61) | ||
90 | #define __NR_ustat (__NR_SYSCALL_BASE+ 62) | ||
91 | #define __NR_dup2 (__NR_SYSCALL_BASE+ 63) | ||
92 | #define __NR_getppid (__NR_SYSCALL_BASE+ 64) | ||
93 | #define __NR_getpgrp (__NR_SYSCALL_BASE+ 65) | ||
94 | #define __NR_setsid (__NR_SYSCALL_BASE+ 66) | ||
95 | #define __NR_sigaction (__NR_SYSCALL_BASE+ 67) | ||
96 | /* 68 was sys_sgetmask */ | ||
97 | /* 69 was sys_ssetmask */ | ||
98 | #define __NR_setreuid (__NR_SYSCALL_BASE+ 70) | ||
99 | #define __NR_setregid (__NR_SYSCALL_BASE+ 71) | ||
100 | #define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72) | ||
101 | #define __NR_sigpending (__NR_SYSCALL_BASE+ 73) | ||
102 | #define __NR_sethostname (__NR_SYSCALL_BASE+ 74) | ||
103 | #define __NR_setrlimit (__NR_SYSCALL_BASE+ 75) | ||
104 | #define __NR_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */ | ||
105 | #define __NR_getrusage (__NR_SYSCALL_BASE+ 77) | ||
106 | #define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78) | ||
107 | #define __NR_settimeofday (__NR_SYSCALL_BASE+ 79) | ||
108 | #define __NR_getgroups (__NR_SYSCALL_BASE+ 80) | ||
109 | #define __NR_setgroups (__NR_SYSCALL_BASE+ 81) | ||
110 | #define __NR_select (__NR_SYSCALL_BASE+ 82) | ||
111 | #define __NR_symlink (__NR_SYSCALL_BASE+ 83) | ||
112 | /* 84 was sys_lstat */ | ||
113 | #define __NR_readlink (__NR_SYSCALL_BASE+ 85) | ||
114 | #define __NR_uselib (__NR_SYSCALL_BASE+ 86) | ||
115 | #define __NR_swapon (__NR_SYSCALL_BASE+ 87) | ||
116 | #define __NR_reboot (__NR_SYSCALL_BASE+ 88) | ||
117 | #define __NR_readdir (__NR_SYSCALL_BASE+ 89) | ||
118 | #define __NR_mmap (__NR_SYSCALL_BASE+ 90) | ||
119 | #define __NR_munmap (__NR_SYSCALL_BASE+ 91) | ||
120 | #define __NR_truncate (__NR_SYSCALL_BASE+ 92) | ||
121 | #define __NR_ftruncate (__NR_SYSCALL_BASE+ 93) | ||
122 | #define __NR_fchmod (__NR_SYSCALL_BASE+ 94) | ||
123 | #define __NR_fchown (__NR_SYSCALL_BASE+ 95) | ||
124 | #define __NR_getpriority (__NR_SYSCALL_BASE+ 96) | ||
125 | #define __NR_setpriority (__NR_SYSCALL_BASE+ 97) | ||
126 | /* 98 was sys_profil */ | ||
127 | #define __NR_statfs (__NR_SYSCALL_BASE+ 99) | ||
128 | #define __NR_fstatfs (__NR_SYSCALL_BASE+100) | ||
129 | /* 101 was sys_ioperm */ | ||
130 | #define __NR_socketcall (__NR_SYSCALL_BASE+102) | ||
131 | #define __NR_syslog (__NR_SYSCALL_BASE+103) | ||
132 | #define __NR_setitimer (__NR_SYSCALL_BASE+104) | ||
133 | #define __NR_getitimer (__NR_SYSCALL_BASE+105) | ||
134 | #define __NR_stat (__NR_SYSCALL_BASE+106) | ||
135 | #define __NR_lstat (__NR_SYSCALL_BASE+107) | ||
136 | #define __NR_fstat (__NR_SYSCALL_BASE+108) | ||
137 | /* 109 was sys_uname */ | ||
138 | /* 110 was sys_iopl */ | ||
139 | #define __NR_vhangup (__NR_SYSCALL_BASE+111) | ||
140 | /* 112 was sys_idle */ | ||
141 | #define __NR_syscall (__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */ | ||
142 | #define __NR_wait4 (__NR_SYSCALL_BASE+114) | ||
143 | #define __NR_swapoff (__NR_SYSCALL_BASE+115) | ||
144 | #define __NR_sysinfo (__NR_SYSCALL_BASE+116) | ||
145 | #define __NR_ipc (__NR_SYSCALL_BASE+117) | ||
146 | #define __NR_fsync (__NR_SYSCALL_BASE+118) | ||
147 | #define __NR_sigreturn (__NR_SYSCALL_BASE+119) | ||
148 | #define __NR_clone (__NR_SYSCALL_BASE+120) | ||
149 | #define __NR_setdomainname (__NR_SYSCALL_BASE+121) | ||
150 | #define __NR_uname (__NR_SYSCALL_BASE+122) | ||
151 | /* 123 was sys_modify_ldt */ | ||
152 | #define __NR_adjtimex (__NR_SYSCALL_BASE+124) | ||
153 | #define __NR_mprotect (__NR_SYSCALL_BASE+125) | ||
154 | #define __NR_sigprocmask (__NR_SYSCALL_BASE+126) | ||
155 | /* 127 was sys_create_module */ | ||
156 | #define __NR_init_module (__NR_SYSCALL_BASE+128) | ||
157 | #define __NR_delete_module (__NR_SYSCALL_BASE+129) | ||
158 | /* 130 was sys_get_kernel_syms */ | ||
159 | #define __NR_quotactl (__NR_SYSCALL_BASE+131) | ||
160 | #define __NR_getpgid (__NR_SYSCALL_BASE+132) | ||
161 | #define __NR_fchdir (__NR_SYSCALL_BASE+133) | ||
162 | #define __NR_bdflush (__NR_SYSCALL_BASE+134) | ||
163 | #define __NR_sysfs (__NR_SYSCALL_BASE+135) | ||
164 | #define __NR_personality (__NR_SYSCALL_BASE+136) | ||
165 | /* 137 was sys_afs_syscall */ | ||
166 | #define __NR_setfsuid (__NR_SYSCALL_BASE+138) | ||
167 | #define __NR_setfsgid (__NR_SYSCALL_BASE+139) | ||
168 | #define __NR__llseek (__NR_SYSCALL_BASE+140) | ||
169 | #define __NR_getdents (__NR_SYSCALL_BASE+141) | ||
170 | #define __NR__newselect (__NR_SYSCALL_BASE+142) | ||
171 | #define __NR_flock (__NR_SYSCALL_BASE+143) | ||
172 | #define __NR_msync (__NR_SYSCALL_BASE+144) | ||
173 | #define __NR_readv (__NR_SYSCALL_BASE+145) | ||
174 | #define __NR_writev (__NR_SYSCALL_BASE+146) | ||
175 | #define __NR_getsid (__NR_SYSCALL_BASE+147) | ||
176 | #define __NR_fdatasync (__NR_SYSCALL_BASE+148) | ||
177 | #define __NR__sysctl (__NR_SYSCALL_BASE+149) | ||
178 | #define __NR_mlock (__NR_SYSCALL_BASE+150) | ||
179 | #define __NR_munlock (__NR_SYSCALL_BASE+151) | ||
180 | #define __NR_mlockall (__NR_SYSCALL_BASE+152) | ||
181 | #define __NR_munlockall (__NR_SYSCALL_BASE+153) | ||
182 | #define __NR_sched_setparam (__NR_SYSCALL_BASE+154) | ||
183 | #define __NR_sched_getparam (__NR_SYSCALL_BASE+155) | ||
184 | #define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156) | ||
185 | #define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157) | ||
186 | #define __NR_sched_yield (__NR_SYSCALL_BASE+158) | ||
187 | #define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159) | ||
188 | #define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160) | ||
189 | #define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161) | ||
190 | #define __NR_nanosleep (__NR_SYSCALL_BASE+162) | ||
191 | #define __NR_mremap (__NR_SYSCALL_BASE+163) | ||
192 | #define __NR_setresuid (__NR_SYSCALL_BASE+164) | ||
193 | #define __NR_getresuid (__NR_SYSCALL_BASE+165) | ||
194 | /* 166 was sys_vm86 */ | ||
195 | /* 167 was sys_query_module */ | ||
196 | #define __NR_poll (__NR_SYSCALL_BASE+168) | ||
197 | #define __NR_nfsservctl (__NR_SYSCALL_BASE+169) | ||
198 | #define __NR_setresgid (__NR_SYSCALL_BASE+170) | ||
199 | #define __NR_getresgid (__NR_SYSCALL_BASE+171) | ||
200 | #define __NR_prctl (__NR_SYSCALL_BASE+172) | ||
201 | #define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173) | ||
202 | #define __NR_rt_sigaction (__NR_SYSCALL_BASE+174) | ||
203 | #define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175) | ||
204 | #define __NR_rt_sigpending (__NR_SYSCALL_BASE+176) | ||
205 | #define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177) | ||
206 | #define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178) | ||
207 | #define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179) | ||
208 | #define __NR_pread64 (__NR_SYSCALL_BASE+180) | ||
209 | #define __NR_pwrite64 (__NR_SYSCALL_BASE+181) | ||
210 | #define __NR_chown (__NR_SYSCALL_BASE+182) | ||
211 | #define __NR_getcwd (__NR_SYSCALL_BASE+183) | ||
212 | #define __NR_capget (__NR_SYSCALL_BASE+184) | ||
213 | #define __NR_capset (__NR_SYSCALL_BASE+185) | ||
214 | #define __NR_sigaltstack (__NR_SYSCALL_BASE+186) | ||
215 | #define __NR_sendfile (__NR_SYSCALL_BASE+187) | ||
216 | /* 188 reserved */ | ||
217 | /* 189 reserved */ | ||
218 | #define __NR_vfork (__NR_SYSCALL_BASE+190) | ||
219 | #define __NR_ugetrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */ | ||
220 | #define __NR_mmap2 (__NR_SYSCALL_BASE+192) | ||
221 | #define __NR_truncate64 (__NR_SYSCALL_BASE+193) | ||
222 | #define __NR_ftruncate64 (__NR_SYSCALL_BASE+194) | ||
223 | #define __NR_stat64 (__NR_SYSCALL_BASE+195) | ||
224 | #define __NR_lstat64 (__NR_SYSCALL_BASE+196) | ||
225 | #define __NR_fstat64 (__NR_SYSCALL_BASE+197) | ||
226 | #define __NR_lchown32 (__NR_SYSCALL_BASE+198) | ||
227 | #define __NR_getuid32 (__NR_SYSCALL_BASE+199) | ||
228 | #define __NR_getgid32 (__NR_SYSCALL_BASE+200) | ||
229 | #define __NR_geteuid32 (__NR_SYSCALL_BASE+201) | ||
230 | #define __NR_getegid32 (__NR_SYSCALL_BASE+202) | ||
231 | #define __NR_setreuid32 (__NR_SYSCALL_BASE+203) | ||
232 | #define __NR_setregid32 (__NR_SYSCALL_BASE+204) | ||
233 | #define __NR_getgroups32 (__NR_SYSCALL_BASE+205) | ||
234 | #define __NR_setgroups32 (__NR_SYSCALL_BASE+206) | ||
235 | #define __NR_fchown32 (__NR_SYSCALL_BASE+207) | ||
236 | #define __NR_setresuid32 (__NR_SYSCALL_BASE+208) | ||
237 | #define __NR_getresuid32 (__NR_SYSCALL_BASE+209) | ||
238 | #define __NR_setresgid32 (__NR_SYSCALL_BASE+210) | ||
239 | #define __NR_getresgid32 (__NR_SYSCALL_BASE+211) | ||
240 | #define __NR_chown32 (__NR_SYSCALL_BASE+212) | ||
241 | #define __NR_setuid32 (__NR_SYSCALL_BASE+213) | ||
242 | #define __NR_setgid32 (__NR_SYSCALL_BASE+214) | ||
243 | #define __NR_setfsuid32 (__NR_SYSCALL_BASE+215) | ||
244 | #define __NR_setfsgid32 (__NR_SYSCALL_BASE+216) | ||
245 | #define __NR_getdents64 (__NR_SYSCALL_BASE+217) | ||
246 | #define __NR_pivot_root (__NR_SYSCALL_BASE+218) | ||
247 | #define __NR_mincore (__NR_SYSCALL_BASE+219) | ||
248 | #define __NR_madvise (__NR_SYSCALL_BASE+220) | ||
249 | #define __NR_fcntl64 (__NR_SYSCALL_BASE+221) | ||
250 | /* 222 for tux */ | ||
251 | /* 223 is unused */ | ||
252 | #define __NR_gettid (__NR_SYSCALL_BASE+224) | ||
253 | #define __NR_readahead (__NR_SYSCALL_BASE+225) | ||
254 | #define __NR_setxattr (__NR_SYSCALL_BASE+226) | ||
255 | #define __NR_lsetxattr (__NR_SYSCALL_BASE+227) | ||
256 | #define __NR_fsetxattr (__NR_SYSCALL_BASE+228) | ||
257 | #define __NR_getxattr (__NR_SYSCALL_BASE+229) | ||
258 | #define __NR_lgetxattr (__NR_SYSCALL_BASE+230) | ||
259 | #define __NR_fgetxattr (__NR_SYSCALL_BASE+231) | ||
260 | #define __NR_listxattr (__NR_SYSCALL_BASE+232) | ||
261 | #define __NR_llistxattr (__NR_SYSCALL_BASE+233) | ||
262 | #define __NR_flistxattr (__NR_SYSCALL_BASE+234) | ||
263 | #define __NR_removexattr (__NR_SYSCALL_BASE+235) | ||
264 | #define __NR_lremovexattr (__NR_SYSCALL_BASE+236) | ||
265 | #define __NR_fremovexattr (__NR_SYSCALL_BASE+237) | ||
266 | #define __NR_tkill (__NR_SYSCALL_BASE+238) | ||
267 | #define __NR_sendfile64 (__NR_SYSCALL_BASE+239) | ||
268 | #define __NR_futex (__NR_SYSCALL_BASE+240) | ||
269 | #define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241) | ||
270 | #define __NR_sched_getaffinity (__NR_SYSCALL_BASE+242) | ||
271 | #define __NR_io_setup (__NR_SYSCALL_BASE+243) | ||
272 | #define __NR_io_destroy (__NR_SYSCALL_BASE+244) | ||
273 | #define __NR_io_getevents (__NR_SYSCALL_BASE+245) | ||
274 | #define __NR_io_submit (__NR_SYSCALL_BASE+246) | ||
275 | #define __NR_io_cancel (__NR_SYSCALL_BASE+247) | ||
276 | #define __NR_exit_group (__NR_SYSCALL_BASE+248) | ||
277 | #define __NR_lookup_dcookie (__NR_SYSCALL_BASE+249) | ||
278 | #define __NR_epoll_create (__NR_SYSCALL_BASE+250) | ||
279 | #define __NR_epoll_ctl (__NR_SYSCALL_BASE+251) | ||
280 | #define __NR_epoll_wait (__NR_SYSCALL_BASE+252) | ||
281 | #define __NR_remap_file_pages (__NR_SYSCALL_BASE+253) | ||
282 | /* 254 for set_thread_area */ | ||
283 | /* 255 for get_thread_area */ | ||
284 | #define __NR_set_tid_address (__NR_SYSCALL_BASE+256) | ||
285 | #define __NR_timer_create (__NR_SYSCALL_BASE+257) | ||
286 | #define __NR_timer_settime (__NR_SYSCALL_BASE+258) | ||
287 | #define __NR_timer_gettime (__NR_SYSCALL_BASE+259) | ||
288 | #define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260) | ||
289 | #define __NR_timer_delete (__NR_SYSCALL_BASE+261) | ||
290 | #define __NR_clock_settime (__NR_SYSCALL_BASE+262) | ||
291 | #define __NR_clock_gettime (__NR_SYSCALL_BASE+263) | ||
292 | #define __NR_clock_getres (__NR_SYSCALL_BASE+264) | ||
293 | #define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265) | ||
294 | #define __NR_statfs64 (__NR_SYSCALL_BASE+266) | ||
295 | #define __NR_fstatfs64 (__NR_SYSCALL_BASE+267) | ||
296 | #define __NR_tgkill (__NR_SYSCALL_BASE+268) | ||
297 | #define __NR_utimes (__NR_SYSCALL_BASE+269) | ||
298 | #define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE+270) | ||
299 | #define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271) | ||
300 | #define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) | ||
301 | #define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) | ||
302 | #define __NR_mq_open (__NR_SYSCALL_BASE+274) | ||
303 | #define __NR_mq_unlink (__NR_SYSCALL_BASE+275) | ||
304 | #define __NR_mq_timedsend (__NR_SYSCALL_BASE+276) | ||
305 | #define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277) | ||
306 | #define __NR_mq_notify (__NR_SYSCALL_BASE+278) | ||
307 | #define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) | ||
308 | #define __NR_waitid (__NR_SYSCALL_BASE+280) | ||
309 | #define __NR_socket (__NR_SYSCALL_BASE+281) | ||
310 | #define __NR_bind (__NR_SYSCALL_BASE+282) | ||
311 | #define __NR_connect (__NR_SYSCALL_BASE+283) | ||
312 | #define __NR_listen (__NR_SYSCALL_BASE+284) | ||
313 | #define __NR_accept (__NR_SYSCALL_BASE+285) | ||
314 | #define __NR_getsockname (__NR_SYSCALL_BASE+286) | ||
315 | #define __NR_getpeername (__NR_SYSCALL_BASE+287) | ||
316 | #define __NR_socketpair (__NR_SYSCALL_BASE+288) | ||
317 | #define __NR_send (__NR_SYSCALL_BASE+289) | ||
318 | #define __NR_sendto (__NR_SYSCALL_BASE+290) | ||
319 | #define __NR_recv (__NR_SYSCALL_BASE+291) | ||
320 | #define __NR_recvfrom (__NR_SYSCALL_BASE+292) | ||
321 | #define __NR_shutdown (__NR_SYSCALL_BASE+293) | ||
322 | #define __NR_setsockopt (__NR_SYSCALL_BASE+294) | ||
323 | #define __NR_getsockopt (__NR_SYSCALL_BASE+295) | ||
324 | #define __NR_sendmsg (__NR_SYSCALL_BASE+296) | ||
325 | #define __NR_recvmsg (__NR_SYSCALL_BASE+297) | ||
326 | #define __NR_semop (__NR_SYSCALL_BASE+298) | ||
327 | #define __NR_semget (__NR_SYSCALL_BASE+299) | ||
328 | #define __NR_semctl (__NR_SYSCALL_BASE+300) | ||
329 | #define __NR_msgsnd (__NR_SYSCALL_BASE+301) | ||
330 | #define __NR_msgrcv (__NR_SYSCALL_BASE+302) | ||
331 | #define __NR_msgget (__NR_SYSCALL_BASE+303) | ||
332 | #define __NR_msgctl (__NR_SYSCALL_BASE+304) | ||
333 | #define __NR_shmat (__NR_SYSCALL_BASE+305) | ||
334 | #define __NR_shmdt (__NR_SYSCALL_BASE+306) | ||
335 | #define __NR_shmget (__NR_SYSCALL_BASE+307) | ||
336 | #define __NR_shmctl (__NR_SYSCALL_BASE+308) | ||
337 | #define __NR_add_key (__NR_SYSCALL_BASE+309) | ||
338 | #define __NR_request_key (__NR_SYSCALL_BASE+310) | ||
339 | #define __NR_keyctl (__NR_SYSCALL_BASE+311) | ||
340 | #define __NR_semtimedop (__NR_SYSCALL_BASE+312) | ||
341 | #define __NR_vserver (__NR_SYSCALL_BASE+313) | ||
342 | #define __NR_ioprio_set (__NR_SYSCALL_BASE+314) | ||
343 | #define __NR_ioprio_get (__NR_SYSCALL_BASE+315) | ||
344 | #define __NR_inotify_init (__NR_SYSCALL_BASE+316) | ||
345 | #define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317) | ||
346 | #define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318) | ||
347 | #define __NR_mbind (__NR_SYSCALL_BASE+319) | ||
348 | #define __NR_get_mempolicy (__NR_SYSCALL_BASE+320) | ||
349 | #define __NR_set_mempolicy (__NR_SYSCALL_BASE+321) | ||
350 | #define __NR_openat (__NR_SYSCALL_BASE+322) | ||
351 | #define __NR_mkdirat (__NR_SYSCALL_BASE+323) | ||
352 | #define __NR_mknodat (__NR_SYSCALL_BASE+324) | ||
353 | #define __NR_fchownat (__NR_SYSCALL_BASE+325) | ||
354 | #define __NR_futimesat (__NR_SYSCALL_BASE+326) | ||
355 | #define __NR_fstatat64 (__NR_SYSCALL_BASE+327) | ||
356 | #define __NR_unlinkat (__NR_SYSCALL_BASE+328) | ||
357 | #define __NR_renameat (__NR_SYSCALL_BASE+329) | ||
358 | #define __NR_linkat (__NR_SYSCALL_BASE+330) | ||
359 | #define __NR_symlinkat (__NR_SYSCALL_BASE+331) | ||
360 | #define __NR_readlinkat (__NR_SYSCALL_BASE+332) | ||
361 | #define __NR_fchmodat (__NR_SYSCALL_BASE+333) | ||
362 | #define __NR_faccessat (__NR_SYSCALL_BASE+334) | ||
363 | #define __NR_pselect6 (__NR_SYSCALL_BASE+335) | ||
364 | #define __NR_ppoll (__NR_SYSCALL_BASE+336) | ||
365 | #define __NR_unshare (__NR_SYSCALL_BASE+337) | ||
366 | #define __NR_set_robust_list (__NR_SYSCALL_BASE+338) | ||
367 | #define __NR_get_robust_list (__NR_SYSCALL_BASE+339) | ||
368 | #define __NR_splice (__NR_SYSCALL_BASE+340) | ||
369 | #define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341) | ||
370 | #define __NR_sync_file_range2 __NR_arm_sync_file_range | ||
371 | #define __NR_tee (__NR_SYSCALL_BASE+342) | ||
372 | #define __NR_vmsplice (__NR_SYSCALL_BASE+343) | ||
373 | #define __NR_move_pages (__NR_SYSCALL_BASE+344) | ||
374 | #define __NR_getcpu (__NR_SYSCALL_BASE+345) | ||
375 | #define __NR_epoll_pwait (__NR_SYSCALL_BASE+346) | ||
376 | #define __NR_kexec_load (__NR_SYSCALL_BASE+347) | ||
377 | #define __NR_utimensat (__NR_SYSCALL_BASE+348) | ||
378 | #define __NR_signalfd (__NR_SYSCALL_BASE+349) | ||
379 | #define __NR_timerfd_create (__NR_SYSCALL_BASE+350) | ||
380 | #define __NR_eventfd (__NR_SYSCALL_BASE+351) | ||
381 | #define __NR_fallocate (__NR_SYSCALL_BASE+352) | ||
382 | #define __NR_timerfd_settime (__NR_SYSCALL_BASE+353) | ||
383 | #define __NR_timerfd_gettime (__NR_SYSCALL_BASE+354) | ||
384 | #define __NR_signalfd4 (__NR_SYSCALL_BASE+355) | ||
385 | #define __NR_eventfd2 (__NR_SYSCALL_BASE+356) | ||
386 | #define __NR_epoll_create1 (__NR_SYSCALL_BASE+357) | ||
387 | #define __NR_dup3 (__NR_SYSCALL_BASE+358) | ||
388 | #define __NR_pipe2 (__NR_SYSCALL_BASE+359) | ||
389 | #define __NR_inotify_init1 (__NR_SYSCALL_BASE+360) | ||
390 | #define __NR_preadv (__NR_SYSCALL_BASE+361) | ||
391 | #define __NR_pwritev (__NR_SYSCALL_BASE+362) | ||
392 | #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) | ||
393 | #define __NR_perf_event_open (__NR_SYSCALL_BASE+364) | ||
394 | #define __NR_recvmmsg (__NR_SYSCALL_BASE+365) | ||
395 | #define __NR_accept4 (__NR_SYSCALL_BASE+366) | ||
396 | #define __NR_fanotify_init (__NR_SYSCALL_BASE+367) | ||
397 | #define __NR_fanotify_mark (__NR_SYSCALL_BASE+368) | ||
398 | #define __NR_prlimit64 (__NR_SYSCALL_BASE+369) | ||
399 | #define __NR_name_to_handle_at (__NR_SYSCALL_BASE+370) | ||
400 | #define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371) | ||
401 | #define __NR_clock_adjtime (__NR_SYSCALL_BASE+372) | ||
402 | #define __NR_syncfs (__NR_SYSCALL_BASE+373) | ||
403 | #define __NR_sendmmsg (__NR_SYSCALL_BASE+374) | ||
404 | #define __NR_setns (__NR_SYSCALL_BASE+375) | ||
405 | #define __NR_process_vm_readv (__NR_SYSCALL_BASE+376) | ||
406 | #define __NR_process_vm_writev (__NR_SYSCALL_BASE+377) | ||
407 | /* 378 for kcmp */ | ||
408 | |||
409 | /* | ||
410 | * This may need to be greater than __NR_last_syscall+1 in order to | ||
411 | * account for the padding in the syscall table | ||
412 | */ | ||
413 | #ifdef __KERNEL__ | ||
414 | #define __NR_syscalls (380) | 18 | #define __NR_syscalls (380) |
415 | #endif /* __KERNEL__ */ | ||
416 | |||
417 | /* | ||
418 | * The following SWIs are ARM private. | ||
419 | */ | ||
420 | #define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) | ||
421 | #define __ARM_NR_breakpoint (__ARM_NR_BASE+1) | ||
422 | #define __ARM_NR_cacheflush (__ARM_NR_BASE+2) | ||
423 | #define __ARM_NR_usr26 (__ARM_NR_BASE+3) | ||
424 | #define __ARM_NR_usr32 (__ARM_NR_BASE+4) | ||
425 | #define __ARM_NR_set_tls (__ARM_NR_BASE+5) | ||
426 | |||
427 | /* | ||
428 | * *NOTE*: This is a ghost syscall private to the kernel. Only the | ||
429 | * __kuser_cmpxchg code in entry-armv.S should be aware of its | ||
430 | * existence. Don't ever use this from user code. | ||
431 | */ | ||
432 | #ifdef __KERNEL__ | ||
433 | #define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0) | 19 | #define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0) |
434 | #endif | ||
435 | |||
436 | /* | ||
437 | * The following syscalls are obsolete and no longer available for EABI. | ||
438 | */ | ||
439 | #if !defined(__KERNEL__) | ||
440 | #if defined(__ARM_EABI__) | ||
441 | #undef __NR_time | ||
442 | #undef __NR_umount | ||
443 | #undef __NR_stime | ||
444 | #undef __NR_alarm | ||
445 | #undef __NR_utime | ||
446 | #undef __NR_getrlimit | ||
447 | #undef __NR_select | ||
448 | #undef __NR_readdir | ||
449 | #undef __NR_mmap | ||
450 | #undef __NR_socketcall | ||
451 | #undef __NR_syscall | ||
452 | #undef __NR_ipc | ||
453 | #endif | ||
454 | #endif | ||
455 | |||
456 | #ifdef __KERNEL__ | ||
457 | 20 | ||
458 | #define __ARCH_WANT_STAT64 | 21 | #define __ARCH_WANT_STAT64 |
459 | #define __ARCH_WANT_SYS_GETHOSTNAME | 22 | #define __ARCH_WANT_SYS_GETHOSTNAME |
@@ -479,7 +42,6 @@ | |||
479 | #define __ARCH_WANT_SYS_SOCKETCALL | 42 | #define __ARCH_WANT_SYS_SOCKETCALL |
480 | #endif | 43 | #endif |
481 | #define __ARCH_WANT_SYS_EXECVE | 44 | #define __ARCH_WANT_SYS_EXECVE |
482 | #define __ARCH_WANT_KERNEL_EXECVE | ||
483 | 45 | ||
484 | /* | 46 | /* |
485 | * "Conditional" syscalls | 47 | * "Conditional" syscalls |
@@ -496,5 +58,4 @@ | |||
496 | #define __IGNORE_migrate_pages | 58 | #define __IGNORE_migrate_pages |
497 | #define __IGNORE_kcmp | 59 | #define __IGNORE_kcmp |
498 | 60 | ||
499 | #endif /* __KERNEL__ */ | ||
500 | #endif /* __ASM_ARM_UNISTD_H */ | 61 | #endif /* __ASM_ARM_UNISTD_H */ |
diff --git a/arch/arm/include/asm/vfpmacros.h b/arch/arm/include/asm/vfpmacros.h index a7aadbd9a6d..6a6f1e485f4 100644 --- a/arch/arm/include/asm/vfpmacros.h +++ b/arch/arm/include/asm/vfpmacros.h | |||
@@ -28,7 +28,7 @@ | |||
28 | ldr \tmp, =elf_hwcap @ may not have MVFR regs | 28 | ldr \tmp, =elf_hwcap @ may not have MVFR regs |
29 | ldr \tmp, [\tmp, #0] | 29 | ldr \tmp, [\tmp, #0] |
30 | tst \tmp, #HWCAP_VFPv3D16 | 30 | tst \tmp, #HWCAP_VFPv3D16 |
31 | ldceq p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} | 31 | ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} |
32 | addne \base, \base, #32*4 @ step over unused register space | 32 | addne \base, \base, #32*4 @ step over unused register space |
33 | #else | 33 | #else |
34 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | 34 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 |
@@ -52,7 +52,7 @@ | |||
52 | ldr \tmp, =elf_hwcap @ may not have MVFR regs | 52 | ldr \tmp, =elf_hwcap @ may not have MVFR regs |
53 | ldr \tmp, [\tmp, #0] | 53 | ldr \tmp, [\tmp, #0] |
54 | tst \tmp, #HWCAP_VFPv3D16 | 54 | tst \tmp, #HWCAP_VFPv3D16 |
55 | stceq p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} | 55 | stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} |
56 | addne \base, \base, #32*4 @ step over unused register space | 56 | addne \base, \base, #32*4 @ step over unused register space |
57 | #else | 57 | #else |
58 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | 58 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 |
diff --git a/arch/arm/include/asm/virt.h b/arch/arm/include/asm/virt.h new file mode 100644 index 00000000000..86164df86cb --- /dev/null +++ b/arch/arm/include/asm/virt.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2012 Linaro Limited. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef VIRT_H | ||
20 | #define VIRT_H | ||
21 | |||
22 | #include <asm/ptrace.h> | ||
23 | |||
24 | /* | ||
25 | * Flag indicating that the kernel was not entered in the same mode on every | ||
26 | * CPU. The zImage loader stashes this value in an SPSR, so we need an | ||
27 | * architecturally defined flag bit here (the N flag, as it happens) | ||
28 | */ | ||
29 | #define BOOT_CPU_MODE_MISMATCH (1<<31) | ||
30 | |||
31 | #ifndef __ASSEMBLY__ | ||
32 | |||
33 | #ifdef CONFIG_ARM_VIRT_EXT | ||
34 | /* | ||
35 | * __boot_cpu_mode records what mode the primary CPU was booted in. | ||
36 | * A correctly-implemented bootloader must start all CPUs in the same mode: | ||
37 | * if it fails to do this, the flag BOOT_CPU_MODE_MISMATCH is set to indicate | ||
38 | * that some CPU(s) were booted in a different mode. | ||
39 | * | ||
40 | * This allows the kernel to flag an error when the secondaries have come up. | ||
41 | */ | ||
42 | extern int __boot_cpu_mode; | ||
43 | |||
44 | void __hyp_set_vectors(unsigned long phys_vector_base); | ||
45 | unsigned long __hyp_get_vectors(void); | ||
46 | #else | ||
47 | #define __boot_cpu_mode (SVC_MODE) | ||
48 | #endif | ||
49 | |||
50 | #ifndef ZIMAGE | ||
51 | void hyp_mode_check(void); | ||
52 | |||
53 | /* Reports the availability of HYP mode */ | ||
54 | static inline bool is_hyp_mode_available(void) | ||
55 | { | ||
56 | return ((__boot_cpu_mode & MODE_MASK) == HYP_MODE && | ||
57 | !(__boot_cpu_mode & BOOT_CPU_MODE_MISMATCH)); | ||
58 | } | ||
59 | |||
60 | /* Check if the bootloader has booted CPUs in different modes */ | ||
61 | static inline bool is_hyp_mode_mismatched(void) | ||
62 | { | ||
63 | return !!(__boot_cpu_mode & BOOT_CPU_MODE_MISMATCH); | ||
64 | } | ||
65 | #endif | ||
66 | |||
67 | #endif /* __ASSEMBLY__ */ | ||
68 | |||
69 | #endif /* ! VIRT_H */ | ||
diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild index baebb3da1d4..47bcb2d254a 100644 --- a/arch/arm/include/uapi/asm/Kbuild +++ b/arch/arm/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,19 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += a.out.h | ||
5 | header-y += byteorder.h | ||
6 | header-y += fcntl.h | ||
7 | header-y += hwcap.h | ||
8 | header-y += ioctls.h | ||
9 | header-y += kvm_para.h | ||
10 | header-y += mman.h | ||
11 | header-y += posix_types.h | ||
12 | header-y += ptrace.h | ||
13 | header-y += setup.h | ||
14 | header-y += sigcontext.h | ||
15 | header-y += signal.h | ||
16 | header-y += stat.h | ||
17 | header-y += statfs.h | ||
18 | header-y += swab.h | ||
19 | header-y += unistd.h | ||
diff --git a/arch/arm/include/asm/a.out.h b/arch/arm/include/uapi/asm/a.out.h index 083894b2e3b..083894b2e3b 100644 --- a/arch/arm/include/asm/a.out.h +++ b/arch/arm/include/uapi/asm/a.out.h | |||
diff --git a/arch/arm/include/asm/byteorder.h b/arch/arm/include/uapi/asm/byteorder.h index 77379748b17..77379748b17 100644 --- a/arch/arm/include/asm/byteorder.h +++ b/arch/arm/include/uapi/asm/byteorder.h | |||
diff --git a/arch/arm/include/asm/fcntl.h b/arch/arm/include/uapi/asm/fcntl.h index a80b6607b2e..a80b6607b2e 100644 --- a/arch/arm/include/asm/fcntl.h +++ b/arch/arm/include/uapi/asm/fcntl.h | |||
diff --git a/arch/arm/include/uapi/asm/hwcap.h b/arch/arm/include/uapi/asm/hwcap.h new file mode 100644 index 00000000000..f254f6503cc --- /dev/null +++ b/arch/arm/include/uapi/asm/hwcap.h | |||
@@ -0,0 +1,29 @@ | |||
1 | #ifndef _UAPI__ASMARM_HWCAP_H | ||
2 | #define _UAPI__ASMARM_HWCAP_H | ||
3 | |||
4 | /* | ||
5 | * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP | ||
6 | */ | ||
7 | #define HWCAP_SWP (1 << 0) | ||
8 | #define HWCAP_HALF (1 << 1) | ||
9 | #define HWCAP_THUMB (1 << 2) | ||
10 | #define HWCAP_26BIT (1 << 3) /* Play it safe */ | ||
11 | #define HWCAP_FAST_MULT (1 << 4) | ||
12 | #define HWCAP_FPA (1 << 5) | ||
13 | #define HWCAP_VFP (1 << 6) | ||
14 | #define HWCAP_EDSP (1 << 7) | ||
15 | #define HWCAP_JAVA (1 << 8) | ||
16 | #define HWCAP_IWMMXT (1 << 9) | ||
17 | #define HWCAP_CRUNCH (1 << 10) | ||
18 | #define HWCAP_THUMBEE (1 << 11) | ||
19 | #define HWCAP_NEON (1 << 12) | ||
20 | #define HWCAP_VFPv3 (1 << 13) | ||
21 | #define HWCAP_VFPv3D16 (1 << 14) | ||
22 | #define HWCAP_TLS (1 << 15) | ||
23 | #define HWCAP_VFPv4 (1 << 16) | ||
24 | #define HWCAP_IDIVA (1 << 17) | ||
25 | #define HWCAP_IDIVT (1 << 18) | ||
26 | #define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) | ||
27 | |||
28 | |||
29 | #endif /* _UAPI__ASMARM_HWCAP_H */ | ||
diff --git a/arch/arm/include/asm/ioctls.h b/arch/arm/include/uapi/asm/ioctls.h index 9c962981612..9c962981612 100644 --- a/arch/arm/include/asm/ioctls.h +++ b/arch/arm/include/uapi/asm/ioctls.h | |||
diff --git a/arch/arm/include/asm/kvm_para.h b/arch/arm/include/uapi/asm/kvm_para.h index 14fab8f0b95..14fab8f0b95 100644 --- a/arch/arm/include/asm/kvm_para.h +++ b/arch/arm/include/uapi/asm/kvm_para.h | |||
diff --git a/arch/arm/include/asm/mman.h b/arch/arm/include/uapi/asm/mman.h index 41f99c573b9..41f99c573b9 100644 --- a/arch/arm/include/asm/mman.h +++ b/arch/arm/include/uapi/asm/mman.h | |||
diff --git a/arch/arm/include/asm/posix_types.h b/arch/arm/include/uapi/asm/posix_types.h index d2de9cbbcd9..d2de9cbbcd9 100644 --- a/arch/arm/include/asm/posix_types.h +++ b/arch/arm/include/uapi/asm/posix_types.h | |||
diff --git a/arch/arm/include/uapi/asm/ptrace.h b/arch/arm/include/uapi/asm/ptrace.h new file mode 100644 index 00000000000..96ee0929790 --- /dev/null +++ b/arch/arm/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,138 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/ptrace.h | ||
3 | * | ||
4 | * Copyright (C) 1996-2003 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef _UAPI__ASM_ARM_PTRACE_H | ||
11 | #define _UAPI__ASM_ARM_PTRACE_H | ||
12 | |||
13 | #include <asm/hwcap.h> | ||
14 | |||
15 | #define PTRACE_GETREGS 12 | ||
16 | #define PTRACE_SETREGS 13 | ||
17 | #define PTRACE_GETFPREGS 14 | ||
18 | #define PTRACE_SETFPREGS 15 | ||
19 | /* PTRACE_ATTACH is 16 */ | ||
20 | /* PTRACE_DETACH is 17 */ | ||
21 | #define PTRACE_GETWMMXREGS 18 | ||
22 | #define PTRACE_SETWMMXREGS 19 | ||
23 | /* 20 is unused */ | ||
24 | #define PTRACE_OLDSETOPTIONS 21 | ||
25 | #define PTRACE_GET_THREAD_AREA 22 | ||
26 | #define PTRACE_SET_SYSCALL 23 | ||
27 | /* PTRACE_SYSCALL is 24 */ | ||
28 | #define PTRACE_GETCRUNCHREGS 25 | ||
29 | #define PTRACE_SETCRUNCHREGS 26 | ||
30 | #define PTRACE_GETVFPREGS 27 | ||
31 | #define PTRACE_SETVFPREGS 28 | ||
32 | #define PTRACE_GETHBPREGS 29 | ||
33 | #define PTRACE_SETHBPREGS 30 | ||
34 | |||
35 | /* | ||
36 | * PSR bits | ||
37 | */ | ||
38 | #define USR26_MODE 0x00000000 | ||
39 | #define FIQ26_MODE 0x00000001 | ||
40 | #define IRQ26_MODE 0x00000002 | ||
41 | #define SVC26_MODE 0x00000003 | ||
42 | #define USR_MODE 0x00000010 | ||
43 | #define FIQ_MODE 0x00000011 | ||
44 | #define IRQ_MODE 0x00000012 | ||
45 | #define SVC_MODE 0x00000013 | ||
46 | #define ABT_MODE 0x00000017 | ||
47 | #define HYP_MODE 0x0000001a | ||
48 | #define UND_MODE 0x0000001b | ||
49 | #define SYSTEM_MODE 0x0000001f | ||
50 | #define MODE32_BIT 0x00000010 | ||
51 | #define MODE_MASK 0x0000001f | ||
52 | #define PSR_T_BIT 0x00000020 | ||
53 | #define PSR_F_BIT 0x00000040 | ||
54 | #define PSR_I_BIT 0x00000080 | ||
55 | #define PSR_A_BIT 0x00000100 | ||
56 | #define PSR_E_BIT 0x00000200 | ||
57 | #define PSR_J_BIT 0x01000000 | ||
58 | #define PSR_Q_BIT 0x08000000 | ||
59 | #define PSR_V_BIT 0x10000000 | ||
60 | #define PSR_C_BIT 0x20000000 | ||
61 | #define PSR_Z_BIT 0x40000000 | ||
62 | #define PSR_N_BIT 0x80000000 | ||
63 | |||
64 | /* | ||
65 | * Groups of PSR bits | ||
66 | */ | ||
67 | #define PSR_f 0xff000000 /* Flags */ | ||
68 | #define PSR_s 0x00ff0000 /* Status */ | ||
69 | #define PSR_x 0x0000ff00 /* Extension */ | ||
70 | #define PSR_c 0x000000ff /* Control */ | ||
71 | |||
72 | /* | ||
73 | * ARMv7 groups of PSR bits | ||
74 | */ | ||
75 | #define APSR_MASK 0xf80f0000 /* N, Z, C, V, Q and GE flags */ | ||
76 | #define PSR_ISET_MASK 0x01000010 /* ISA state (J, T) mask */ | ||
77 | #define PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ | ||
78 | #define PSR_ENDIAN_MASK 0x00000200 /* Endianness state mask */ | ||
79 | |||
80 | /* | ||
81 | * Default endianness state | ||
82 | */ | ||
83 | #ifdef CONFIG_CPU_ENDIAN_BE8 | ||
84 | #define PSR_ENDSTATE PSR_E_BIT | ||
85 | #else | ||
86 | #define PSR_ENDSTATE 0 | ||
87 | #endif | ||
88 | |||
89 | /* | ||
90 | * These are 'magic' values for PTRACE_PEEKUSR that return info about where a | ||
91 | * process is located in memory. | ||
92 | */ | ||
93 | #define PT_TEXT_ADDR 0x10000 | ||
94 | #define PT_DATA_ADDR 0x10004 | ||
95 | #define PT_TEXT_END_ADDR 0x10008 | ||
96 | |||
97 | #ifndef __ASSEMBLY__ | ||
98 | |||
99 | /* | ||
100 | * This struct defines the way the registers are stored on the | ||
101 | * stack during a system call. Note that sizeof(struct pt_regs) | ||
102 | * has to be a multiple of 8. | ||
103 | */ | ||
104 | #ifndef __KERNEL__ | ||
105 | struct pt_regs { | ||
106 | long uregs[18]; | ||
107 | }; | ||
108 | #endif /* __KERNEL__ */ | ||
109 | |||
110 | #define ARM_cpsr uregs[16] | ||
111 | #define ARM_pc uregs[15] | ||
112 | #define ARM_lr uregs[14] | ||
113 | #define ARM_sp uregs[13] | ||
114 | #define ARM_ip uregs[12] | ||
115 | #define ARM_fp uregs[11] | ||
116 | #define ARM_r10 uregs[10] | ||
117 | #define ARM_r9 uregs[9] | ||
118 | #define ARM_r8 uregs[8] | ||
119 | #define ARM_r7 uregs[7] | ||
120 | #define ARM_r6 uregs[6] | ||
121 | #define ARM_r5 uregs[5] | ||
122 | #define ARM_r4 uregs[4] | ||
123 | #define ARM_r3 uregs[3] | ||
124 | #define ARM_r2 uregs[2] | ||
125 | #define ARM_r1 uregs[1] | ||
126 | #define ARM_r0 uregs[0] | ||
127 | #define ARM_ORIG_r0 uregs[17] | ||
128 | |||
129 | /* | ||
130 | * The size of the user-visible VFP state as seen by PTRACE_GET/SETVFPREGS | ||
131 | * and core dumps. | ||
132 | */ | ||
133 | #define ARM_VFPREGS_SIZE ( 32 * 8 /*fpregs*/ + 4 /*fpscr*/ ) | ||
134 | |||
135 | |||
136 | #endif /* __ASSEMBLY__ */ | ||
137 | |||
138 | #endif /* _UAPI__ASM_ARM_PTRACE_H */ | ||
diff --git a/arch/arm/include/uapi/asm/setup.h b/arch/arm/include/uapi/asm/setup.h new file mode 100644 index 00000000000..979ff401640 --- /dev/null +++ b/arch/arm/include/uapi/asm/setup.h | |||
@@ -0,0 +1,187 @@ | |||
1 | /* | ||
2 | * linux/include/asm/setup.h | ||
3 | * | ||
4 | * Copyright (C) 1997-1999 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Structure passed to kernel to tell it about the | ||
11 | * hardware it's running on. See Documentation/arm/Setup | ||
12 | * for more info. | ||
13 | */ | ||
14 | #ifndef _UAPI__ASMARM_SETUP_H | ||
15 | #define _UAPI__ASMARM_SETUP_H | ||
16 | |||
17 | #include <linux/types.h> | ||
18 | |||
19 | #define COMMAND_LINE_SIZE 1024 | ||
20 | |||
21 | /* The list ends with an ATAG_NONE node. */ | ||
22 | #define ATAG_NONE 0x00000000 | ||
23 | |||
24 | struct tag_header { | ||
25 | __u32 size; | ||
26 | __u32 tag; | ||
27 | }; | ||
28 | |||
29 | /* The list must start with an ATAG_CORE node */ | ||
30 | #define ATAG_CORE 0x54410001 | ||
31 | |||
32 | struct tag_core { | ||
33 | __u32 flags; /* bit 0 = read-only */ | ||
34 | __u32 pagesize; | ||
35 | __u32 rootdev; | ||
36 | }; | ||
37 | |||
38 | /* it is allowed to have multiple ATAG_MEM nodes */ | ||
39 | #define ATAG_MEM 0x54410002 | ||
40 | |||
41 | struct tag_mem32 { | ||
42 | __u32 size; | ||
43 | __u32 start; /* physical start address */ | ||
44 | }; | ||
45 | |||
46 | /* VGA text type displays */ | ||
47 | #define ATAG_VIDEOTEXT 0x54410003 | ||
48 | |||
49 | struct tag_videotext { | ||
50 | __u8 x; | ||
51 | __u8 y; | ||
52 | __u16 video_page; | ||
53 | __u8 video_mode; | ||
54 | __u8 video_cols; | ||
55 | __u16 video_ega_bx; | ||
56 | __u8 video_lines; | ||
57 | __u8 video_isvga; | ||
58 | __u16 video_points; | ||
59 | }; | ||
60 | |||
61 | /* describes how the ramdisk will be used in kernel */ | ||
62 | #define ATAG_RAMDISK 0x54410004 | ||
63 | |||
64 | struct tag_ramdisk { | ||
65 | __u32 flags; /* bit 0 = load, bit 1 = prompt */ | ||
66 | __u32 size; /* decompressed ramdisk size in _kilo_ bytes */ | ||
67 | __u32 start; /* starting block of floppy-based RAM disk image */ | ||
68 | }; | ||
69 | |||
70 | /* describes where the compressed ramdisk image lives (virtual address) */ | ||
71 | /* | ||
72 | * this one accidentally used virtual addresses - as such, | ||
73 | * it's deprecated. | ||
74 | */ | ||
75 | #define ATAG_INITRD 0x54410005 | ||
76 | |||
77 | /* describes where the compressed ramdisk image lives (physical address) */ | ||
78 | #define ATAG_INITRD2 0x54420005 | ||
79 | |||
80 | struct tag_initrd { | ||
81 | __u32 start; /* physical start address */ | ||
82 | __u32 size; /* size of compressed ramdisk image in bytes */ | ||
83 | }; | ||
84 | |||
85 | /* board serial number. "64 bits should be enough for everybody" */ | ||
86 | #define ATAG_SERIAL 0x54410006 | ||
87 | |||
88 | struct tag_serialnr { | ||
89 | __u32 low; | ||
90 | __u32 high; | ||
91 | }; | ||
92 | |||
93 | /* board revision */ | ||
94 | #define ATAG_REVISION 0x54410007 | ||
95 | |||
96 | struct tag_revision { | ||
97 | __u32 rev; | ||
98 | }; | ||
99 | |||
100 | /* initial values for vesafb-type framebuffers. see struct screen_info | ||
101 | * in include/linux/tty.h | ||
102 | */ | ||
103 | #define ATAG_VIDEOLFB 0x54410008 | ||
104 | |||
105 | struct tag_videolfb { | ||
106 | __u16 lfb_width; | ||
107 | __u16 lfb_height; | ||
108 | __u16 lfb_depth; | ||
109 | __u16 lfb_linelength; | ||
110 | __u32 lfb_base; | ||
111 | __u32 lfb_size; | ||
112 | __u8 red_size; | ||
113 | __u8 red_pos; | ||
114 | __u8 green_size; | ||
115 | __u8 green_pos; | ||
116 | __u8 blue_size; | ||
117 | __u8 blue_pos; | ||
118 | __u8 rsvd_size; | ||
119 | __u8 rsvd_pos; | ||
120 | }; | ||
121 | |||
122 | /* command line: \0 terminated string */ | ||
123 | #define ATAG_CMDLINE 0x54410009 | ||
124 | |||
125 | struct tag_cmdline { | ||
126 | char cmdline[1]; /* this is the minimum size */ | ||
127 | }; | ||
128 | |||
129 | /* acorn RiscPC specific information */ | ||
130 | #define ATAG_ACORN 0x41000101 | ||
131 | |||
132 | struct tag_acorn { | ||
133 | __u32 memc_control_reg; | ||
134 | __u32 vram_pages; | ||
135 | __u8 sounddefault; | ||
136 | __u8 adfsdrives; | ||
137 | }; | ||
138 | |||
139 | /* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */ | ||
140 | #define ATAG_MEMCLK 0x41000402 | ||
141 | |||
142 | struct tag_memclk { | ||
143 | __u32 fmemclk; | ||
144 | }; | ||
145 | |||
146 | struct tag { | ||
147 | struct tag_header hdr; | ||
148 | union { | ||
149 | struct tag_core core; | ||
150 | struct tag_mem32 mem; | ||
151 | struct tag_videotext videotext; | ||
152 | struct tag_ramdisk ramdisk; | ||
153 | struct tag_initrd initrd; | ||
154 | struct tag_serialnr serialnr; | ||
155 | struct tag_revision revision; | ||
156 | struct tag_videolfb videolfb; | ||
157 | struct tag_cmdline cmdline; | ||
158 | |||
159 | /* | ||
160 | * Acorn specific | ||
161 | */ | ||
162 | struct tag_acorn acorn; | ||
163 | |||
164 | /* | ||
165 | * DC21285 specific | ||
166 | */ | ||
167 | struct tag_memclk memclk; | ||
168 | } u; | ||
169 | }; | ||
170 | |||
171 | struct tagtable { | ||
172 | __u32 tag; | ||
173 | int (*parse)(const struct tag *); | ||
174 | }; | ||
175 | |||
176 | #define tag_member_present(tag,member) \ | ||
177 | ((unsigned long)(&((struct tag *)0L)->member + 1) \ | ||
178 | <= (tag)->hdr.size * 4) | ||
179 | |||
180 | #define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size)) | ||
181 | #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2) | ||
182 | |||
183 | #define for_each_tag(t,base) \ | ||
184 | for (t = base; t->hdr.size; t = tag_next(t)) | ||
185 | |||
186 | |||
187 | #endif /* _UAPI__ASMARM_SETUP_H */ | ||
diff --git a/arch/arm/include/asm/sigcontext.h b/arch/arm/include/uapi/asm/sigcontext.h index fc0b80b6a6f..fc0b80b6a6f 100644 --- a/arch/arm/include/asm/sigcontext.h +++ b/arch/arm/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/arm/include/uapi/asm/signal.h b/arch/arm/include/uapi/asm/signal.h new file mode 100644 index 00000000000..921c57fdc52 --- /dev/null +++ b/arch/arm/include/uapi/asm/signal.h | |||
@@ -0,0 +1,127 @@ | |||
1 | #ifndef _UAPI_ASMARM_SIGNAL_H | ||
2 | #define _UAPI_ASMARM_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* Avoid too many header ordering problems. */ | ||
7 | struct siginfo; | ||
8 | |||
9 | #ifndef __KERNEL__ | ||
10 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
11 | |||
12 | #define NSIG 32 | ||
13 | typedef unsigned long sigset_t; | ||
14 | |||
15 | #endif /* __KERNEL__ */ | ||
16 | |||
17 | #define SIGHUP 1 | ||
18 | #define SIGINT 2 | ||
19 | #define SIGQUIT 3 | ||
20 | #define SIGILL 4 | ||
21 | #define SIGTRAP 5 | ||
22 | #define SIGABRT 6 | ||
23 | #define SIGIOT 6 | ||
24 | #define SIGBUS 7 | ||
25 | #define SIGFPE 8 | ||
26 | #define SIGKILL 9 | ||
27 | #define SIGUSR1 10 | ||
28 | #define SIGSEGV 11 | ||
29 | #define SIGUSR2 12 | ||
30 | #define SIGPIPE 13 | ||
31 | #define SIGALRM 14 | ||
32 | #define SIGTERM 15 | ||
33 | #define SIGSTKFLT 16 | ||
34 | #define SIGCHLD 17 | ||
35 | #define SIGCONT 18 | ||
36 | #define SIGSTOP 19 | ||
37 | #define SIGTSTP 20 | ||
38 | #define SIGTTIN 21 | ||
39 | #define SIGTTOU 22 | ||
40 | #define SIGURG 23 | ||
41 | #define SIGXCPU 24 | ||
42 | #define SIGXFSZ 25 | ||
43 | #define SIGVTALRM 26 | ||
44 | #define SIGPROF 27 | ||
45 | #define SIGWINCH 28 | ||
46 | #define SIGIO 29 | ||
47 | #define SIGPOLL SIGIO | ||
48 | /* | ||
49 | #define SIGLOST 29 | ||
50 | */ | ||
51 | #define SIGPWR 30 | ||
52 | #define SIGSYS 31 | ||
53 | #define SIGUNUSED 31 | ||
54 | |||
55 | /* These should not be considered constants from userland. */ | ||
56 | #define SIGRTMIN 32 | ||
57 | #define SIGRTMAX _NSIG | ||
58 | |||
59 | #define SIGSWI 32 | ||
60 | |||
61 | /* | ||
62 | * SA_FLAGS values: | ||
63 | * | ||
64 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
65 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
66 | * SA_SIGINFO deliver the signal with SIGINFO structs | ||
67 | * SA_THIRTYTWO delivers the signal in 32-bit mode, even if the task | ||
68 | * is running in 26-bit. | ||
69 | * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). | ||
70 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
71 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
72 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
73 | * | ||
74 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
75 | * Unix names RESETHAND and NODEFER respectively. | ||
76 | */ | ||
77 | #define SA_NOCLDSTOP 0x00000001 | ||
78 | #define SA_NOCLDWAIT 0x00000002 | ||
79 | #define SA_SIGINFO 0x00000004 | ||
80 | #define SA_THIRTYTWO 0x02000000 | ||
81 | #define SA_RESTORER 0x04000000 | ||
82 | #define SA_ONSTACK 0x08000000 | ||
83 | #define SA_RESTART 0x10000000 | ||
84 | #define SA_NODEFER 0x40000000 | ||
85 | #define SA_RESETHAND 0x80000000 | ||
86 | |||
87 | #define SA_NOMASK SA_NODEFER | ||
88 | #define SA_ONESHOT SA_RESETHAND | ||
89 | |||
90 | |||
91 | /* | ||
92 | * sigaltstack controls | ||
93 | */ | ||
94 | #define SS_ONSTACK 1 | ||
95 | #define SS_DISABLE 2 | ||
96 | |||
97 | #define MINSIGSTKSZ 2048 | ||
98 | #define SIGSTKSZ 8192 | ||
99 | |||
100 | #include <asm-generic/signal-defs.h> | ||
101 | |||
102 | #ifndef __KERNEL__ | ||
103 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
104 | |||
105 | struct sigaction { | ||
106 | union { | ||
107 | __sighandler_t _sa_handler; | ||
108 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
109 | } _u; | ||
110 | sigset_t sa_mask; | ||
111 | unsigned long sa_flags; | ||
112 | void (*sa_restorer)(void); | ||
113 | }; | ||
114 | |||
115 | #define sa_handler _u._sa_handler | ||
116 | #define sa_sigaction _u._sa_sigaction | ||
117 | |||
118 | #endif /* __KERNEL__ */ | ||
119 | |||
120 | typedef struct sigaltstack { | ||
121 | void __user *ss_sp; | ||
122 | int ss_flags; | ||
123 | size_t ss_size; | ||
124 | } stack_t; | ||
125 | |||
126 | |||
127 | #endif /* _UAPI_ASMARM_SIGNAL_H */ | ||
diff --git a/arch/arm/include/asm/stat.h b/arch/arm/include/uapi/asm/stat.h index 42c0c13999d..42c0c13999d 100644 --- a/arch/arm/include/asm/stat.h +++ b/arch/arm/include/uapi/asm/stat.h | |||
diff --git a/arch/arm/include/asm/statfs.h b/arch/arm/include/uapi/asm/statfs.h index 079447c05ba..079447c05ba 100644 --- a/arch/arm/include/asm/statfs.h +++ b/arch/arm/include/uapi/asm/statfs.h | |||
diff --git a/arch/arm/include/uapi/asm/swab.h b/arch/arm/include/uapi/asm/swab.h new file mode 100644 index 00000000000..6fcb32a5c45 --- /dev/null +++ b/arch/arm/include/uapi/asm/swab.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/byteorder.h | ||
3 | * | ||
4 | * ARM Endian-ness. In little endian mode, the data bus is connected such | ||
5 | * that byte accesses appear as: | ||
6 | * 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31 | ||
7 | * and word accesses (data or instruction) appear as: | ||
8 | * d0...d31 | ||
9 | * | ||
10 | * When in big endian mode, byte accesses appear as: | ||
11 | * 0 = d24...d31, 1 = d16...d23, 2 = d8...d15, 3 = d0...d7 | ||
12 | * and word accesses (data or instruction) appear as: | ||
13 | * d0...d31 | ||
14 | */ | ||
15 | #ifndef _UAPI__ASM_ARM_SWAB_H | ||
16 | #define _UAPI__ASM_ARM_SWAB_H | ||
17 | |||
18 | #include <linux/compiler.h> | ||
19 | #include <linux/types.h> | ||
20 | |||
21 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
22 | # define __SWAB_64_THRU_32__ | ||
23 | #endif | ||
24 | |||
25 | |||
26 | #if !defined(__KERNEL__) || __LINUX_ARM_ARCH__ < 6 | ||
27 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | ||
28 | { | ||
29 | __u32 t; | ||
30 | |||
31 | #ifndef __thumb__ | ||
32 | if (!__builtin_constant_p(x)) { | ||
33 | /* | ||
34 | * The compiler needs a bit of a hint here to always do the | ||
35 | * right thing and not screw it up to different degrees | ||
36 | * depending on the gcc version. | ||
37 | */ | ||
38 | asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x)); | ||
39 | } else | ||
40 | #endif | ||
41 | t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */ | ||
42 | |||
43 | x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */ | ||
44 | t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */ | ||
45 | x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */ | ||
46 | |||
47 | return x; | ||
48 | } | ||
49 | #define __arch_swab32 __arch_swab32 | ||
50 | |||
51 | #endif | ||
52 | |||
53 | #endif /* _UAPI__ASM_ARM_SWAB_H */ | ||
diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h new file mode 100644 index 00000000000..ac03bdb4ae4 --- /dev/null +++ b/arch/arm/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,450 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/unistd.h | ||
3 | * | ||
4 | * Copyright (C) 2001-2005 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, | ||
11 | * no matter what the change is. Thanks! | ||
12 | */ | ||
13 | #ifndef _UAPI__ASM_ARM_UNISTD_H | ||
14 | #define _UAPI__ASM_ARM_UNISTD_H | ||
15 | |||
16 | #define __NR_OABI_SYSCALL_BASE 0x900000 | ||
17 | |||
18 | #if defined(__thumb__) || defined(__ARM_EABI__) | ||
19 | #define __NR_SYSCALL_BASE 0 | ||
20 | #else | ||
21 | #define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE | ||
22 | #endif | ||
23 | |||
24 | /* | ||
25 | * This file contains the system call numbers. | ||
26 | */ | ||
27 | |||
28 | #define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0) | ||
29 | #define __NR_exit (__NR_SYSCALL_BASE+ 1) | ||
30 | #define __NR_fork (__NR_SYSCALL_BASE+ 2) | ||
31 | #define __NR_read (__NR_SYSCALL_BASE+ 3) | ||
32 | #define __NR_write (__NR_SYSCALL_BASE+ 4) | ||
33 | #define __NR_open (__NR_SYSCALL_BASE+ 5) | ||
34 | #define __NR_close (__NR_SYSCALL_BASE+ 6) | ||
35 | /* 7 was sys_waitpid */ | ||
36 | #define __NR_creat (__NR_SYSCALL_BASE+ 8) | ||
37 | #define __NR_link (__NR_SYSCALL_BASE+ 9) | ||
38 | #define __NR_unlink (__NR_SYSCALL_BASE+ 10) | ||
39 | #define __NR_execve (__NR_SYSCALL_BASE+ 11) | ||
40 | #define __NR_chdir (__NR_SYSCALL_BASE+ 12) | ||
41 | #define __NR_time (__NR_SYSCALL_BASE+ 13) | ||
42 | #define __NR_mknod (__NR_SYSCALL_BASE+ 14) | ||
43 | #define __NR_chmod (__NR_SYSCALL_BASE+ 15) | ||
44 | #define __NR_lchown (__NR_SYSCALL_BASE+ 16) | ||
45 | /* 17 was sys_break */ | ||
46 | /* 18 was sys_stat */ | ||
47 | #define __NR_lseek (__NR_SYSCALL_BASE+ 19) | ||
48 | #define __NR_getpid (__NR_SYSCALL_BASE+ 20) | ||
49 | #define __NR_mount (__NR_SYSCALL_BASE+ 21) | ||
50 | #define __NR_umount (__NR_SYSCALL_BASE+ 22) | ||
51 | #define __NR_setuid (__NR_SYSCALL_BASE+ 23) | ||
52 | #define __NR_getuid (__NR_SYSCALL_BASE+ 24) | ||
53 | #define __NR_stime (__NR_SYSCALL_BASE+ 25) | ||
54 | #define __NR_ptrace (__NR_SYSCALL_BASE+ 26) | ||
55 | #define __NR_alarm (__NR_SYSCALL_BASE+ 27) | ||
56 | /* 28 was sys_fstat */ | ||
57 | #define __NR_pause (__NR_SYSCALL_BASE+ 29) | ||
58 | #define __NR_utime (__NR_SYSCALL_BASE+ 30) | ||
59 | /* 31 was sys_stty */ | ||
60 | /* 32 was sys_gtty */ | ||
61 | #define __NR_access (__NR_SYSCALL_BASE+ 33) | ||
62 | #define __NR_nice (__NR_SYSCALL_BASE+ 34) | ||
63 | /* 35 was sys_ftime */ | ||
64 | #define __NR_sync (__NR_SYSCALL_BASE+ 36) | ||
65 | #define __NR_kill (__NR_SYSCALL_BASE+ 37) | ||
66 | #define __NR_rename (__NR_SYSCALL_BASE+ 38) | ||
67 | #define __NR_mkdir (__NR_SYSCALL_BASE+ 39) | ||
68 | #define __NR_rmdir (__NR_SYSCALL_BASE+ 40) | ||
69 | #define __NR_dup (__NR_SYSCALL_BASE+ 41) | ||
70 | #define __NR_pipe (__NR_SYSCALL_BASE+ 42) | ||
71 | #define __NR_times (__NR_SYSCALL_BASE+ 43) | ||
72 | /* 44 was sys_prof */ | ||
73 | #define __NR_brk (__NR_SYSCALL_BASE+ 45) | ||
74 | #define __NR_setgid (__NR_SYSCALL_BASE+ 46) | ||
75 | #define __NR_getgid (__NR_SYSCALL_BASE+ 47) | ||
76 | /* 48 was sys_signal */ | ||
77 | #define __NR_geteuid (__NR_SYSCALL_BASE+ 49) | ||
78 | #define __NR_getegid (__NR_SYSCALL_BASE+ 50) | ||
79 | #define __NR_acct (__NR_SYSCALL_BASE+ 51) | ||
80 | #define __NR_umount2 (__NR_SYSCALL_BASE+ 52) | ||
81 | /* 53 was sys_lock */ | ||
82 | #define __NR_ioctl (__NR_SYSCALL_BASE+ 54) | ||
83 | #define __NR_fcntl (__NR_SYSCALL_BASE+ 55) | ||
84 | /* 56 was sys_mpx */ | ||
85 | #define __NR_setpgid (__NR_SYSCALL_BASE+ 57) | ||
86 | /* 58 was sys_ulimit */ | ||
87 | /* 59 was sys_olduname */ | ||
88 | #define __NR_umask (__NR_SYSCALL_BASE+ 60) | ||
89 | #define __NR_chroot (__NR_SYSCALL_BASE+ 61) | ||
90 | #define __NR_ustat (__NR_SYSCALL_BASE+ 62) | ||
91 | #define __NR_dup2 (__NR_SYSCALL_BASE+ 63) | ||
92 | #define __NR_getppid (__NR_SYSCALL_BASE+ 64) | ||
93 | #define __NR_getpgrp (__NR_SYSCALL_BASE+ 65) | ||
94 | #define __NR_setsid (__NR_SYSCALL_BASE+ 66) | ||
95 | #define __NR_sigaction (__NR_SYSCALL_BASE+ 67) | ||
96 | /* 68 was sys_sgetmask */ | ||
97 | /* 69 was sys_ssetmask */ | ||
98 | #define __NR_setreuid (__NR_SYSCALL_BASE+ 70) | ||
99 | #define __NR_setregid (__NR_SYSCALL_BASE+ 71) | ||
100 | #define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72) | ||
101 | #define __NR_sigpending (__NR_SYSCALL_BASE+ 73) | ||
102 | #define __NR_sethostname (__NR_SYSCALL_BASE+ 74) | ||
103 | #define __NR_setrlimit (__NR_SYSCALL_BASE+ 75) | ||
104 | #define __NR_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */ | ||
105 | #define __NR_getrusage (__NR_SYSCALL_BASE+ 77) | ||
106 | #define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78) | ||
107 | #define __NR_settimeofday (__NR_SYSCALL_BASE+ 79) | ||
108 | #define __NR_getgroups (__NR_SYSCALL_BASE+ 80) | ||
109 | #define __NR_setgroups (__NR_SYSCALL_BASE+ 81) | ||
110 | #define __NR_select (__NR_SYSCALL_BASE+ 82) | ||
111 | #define __NR_symlink (__NR_SYSCALL_BASE+ 83) | ||
112 | /* 84 was sys_lstat */ | ||
113 | #define __NR_readlink (__NR_SYSCALL_BASE+ 85) | ||
114 | #define __NR_uselib (__NR_SYSCALL_BASE+ 86) | ||
115 | #define __NR_swapon (__NR_SYSCALL_BASE+ 87) | ||
116 | #define __NR_reboot (__NR_SYSCALL_BASE+ 88) | ||
117 | #define __NR_readdir (__NR_SYSCALL_BASE+ 89) | ||
118 | #define __NR_mmap (__NR_SYSCALL_BASE+ 90) | ||
119 | #define __NR_munmap (__NR_SYSCALL_BASE+ 91) | ||
120 | #define __NR_truncate (__NR_SYSCALL_BASE+ 92) | ||
121 | #define __NR_ftruncate (__NR_SYSCALL_BASE+ 93) | ||
122 | #define __NR_fchmod (__NR_SYSCALL_BASE+ 94) | ||
123 | #define __NR_fchown (__NR_SYSCALL_BASE+ 95) | ||
124 | #define __NR_getpriority (__NR_SYSCALL_BASE+ 96) | ||
125 | #define __NR_setpriority (__NR_SYSCALL_BASE+ 97) | ||
126 | /* 98 was sys_profil */ | ||
127 | #define __NR_statfs (__NR_SYSCALL_BASE+ 99) | ||
128 | #define __NR_fstatfs (__NR_SYSCALL_BASE+100) | ||
129 | /* 101 was sys_ioperm */ | ||
130 | #define __NR_socketcall (__NR_SYSCALL_BASE+102) | ||
131 | #define __NR_syslog (__NR_SYSCALL_BASE+103) | ||
132 | #define __NR_setitimer (__NR_SYSCALL_BASE+104) | ||
133 | #define __NR_getitimer (__NR_SYSCALL_BASE+105) | ||
134 | #define __NR_stat (__NR_SYSCALL_BASE+106) | ||
135 | #define __NR_lstat (__NR_SYSCALL_BASE+107) | ||
136 | #define __NR_fstat (__NR_SYSCALL_BASE+108) | ||
137 | /* 109 was sys_uname */ | ||
138 | /* 110 was sys_iopl */ | ||
139 | #define __NR_vhangup (__NR_SYSCALL_BASE+111) | ||
140 | /* 112 was sys_idle */ | ||
141 | #define __NR_syscall (__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */ | ||
142 | #define __NR_wait4 (__NR_SYSCALL_BASE+114) | ||
143 | #define __NR_swapoff (__NR_SYSCALL_BASE+115) | ||
144 | #define __NR_sysinfo (__NR_SYSCALL_BASE+116) | ||
145 | #define __NR_ipc (__NR_SYSCALL_BASE+117) | ||
146 | #define __NR_fsync (__NR_SYSCALL_BASE+118) | ||
147 | #define __NR_sigreturn (__NR_SYSCALL_BASE+119) | ||
148 | #define __NR_clone (__NR_SYSCALL_BASE+120) | ||
149 | #define __NR_setdomainname (__NR_SYSCALL_BASE+121) | ||
150 | #define __NR_uname (__NR_SYSCALL_BASE+122) | ||
151 | /* 123 was sys_modify_ldt */ | ||
152 | #define __NR_adjtimex (__NR_SYSCALL_BASE+124) | ||
153 | #define __NR_mprotect (__NR_SYSCALL_BASE+125) | ||
154 | #define __NR_sigprocmask (__NR_SYSCALL_BASE+126) | ||
155 | /* 127 was sys_create_module */ | ||
156 | #define __NR_init_module (__NR_SYSCALL_BASE+128) | ||
157 | #define __NR_delete_module (__NR_SYSCALL_BASE+129) | ||
158 | /* 130 was sys_get_kernel_syms */ | ||
159 | #define __NR_quotactl (__NR_SYSCALL_BASE+131) | ||
160 | #define __NR_getpgid (__NR_SYSCALL_BASE+132) | ||
161 | #define __NR_fchdir (__NR_SYSCALL_BASE+133) | ||
162 | #define __NR_bdflush (__NR_SYSCALL_BASE+134) | ||
163 | #define __NR_sysfs (__NR_SYSCALL_BASE+135) | ||
164 | #define __NR_personality (__NR_SYSCALL_BASE+136) | ||
165 | /* 137 was sys_afs_syscall */ | ||
166 | #define __NR_setfsuid (__NR_SYSCALL_BASE+138) | ||
167 | #define __NR_setfsgid (__NR_SYSCALL_BASE+139) | ||
168 | #define __NR__llseek (__NR_SYSCALL_BASE+140) | ||
169 | #define __NR_getdents (__NR_SYSCALL_BASE+141) | ||
170 | #define __NR__newselect (__NR_SYSCALL_BASE+142) | ||
171 | #define __NR_flock (__NR_SYSCALL_BASE+143) | ||
172 | #define __NR_msync (__NR_SYSCALL_BASE+144) | ||
173 | #define __NR_readv (__NR_SYSCALL_BASE+145) | ||
174 | #define __NR_writev (__NR_SYSCALL_BASE+146) | ||
175 | #define __NR_getsid (__NR_SYSCALL_BASE+147) | ||
176 | #define __NR_fdatasync (__NR_SYSCALL_BASE+148) | ||
177 | #define __NR__sysctl (__NR_SYSCALL_BASE+149) | ||
178 | #define __NR_mlock (__NR_SYSCALL_BASE+150) | ||
179 | #define __NR_munlock (__NR_SYSCALL_BASE+151) | ||
180 | #define __NR_mlockall (__NR_SYSCALL_BASE+152) | ||
181 | #define __NR_munlockall (__NR_SYSCALL_BASE+153) | ||
182 | #define __NR_sched_setparam (__NR_SYSCALL_BASE+154) | ||
183 | #define __NR_sched_getparam (__NR_SYSCALL_BASE+155) | ||
184 | #define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156) | ||
185 | #define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157) | ||
186 | #define __NR_sched_yield (__NR_SYSCALL_BASE+158) | ||
187 | #define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159) | ||
188 | #define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160) | ||
189 | #define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161) | ||
190 | #define __NR_nanosleep (__NR_SYSCALL_BASE+162) | ||
191 | #define __NR_mremap (__NR_SYSCALL_BASE+163) | ||
192 | #define __NR_setresuid (__NR_SYSCALL_BASE+164) | ||
193 | #define __NR_getresuid (__NR_SYSCALL_BASE+165) | ||
194 | /* 166 was sys_vm86 */ | ||
195 | /* 167 was sys_query_module */ | ||
196 | #define __NR_poll (__NR_SYSCALL_BASE+168) | ||
197 | #define __NR_nfsservctl (__NR_SYSCALL_BASE+169) | ||
198 | #define __NR_setresgid (__NR_SYSCALL_BASE+170) | ||
199 | #define __NR_getresgid (__NR_SYSCALL_BASE+171) | ||
200 | #define __NR_prctl (__NR_SYSCALL_BASE+172) | ||
201 | #define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173) | ||
202 | #define __NR_rt_sigaction (__NR_SYSCALL_BASE+174) | ||
203 | #define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175) | ||
204 | #define __NR_rt_sigpending (__NR_SYSCALL_BASE+176) | ||
205 | #define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177) | ||
206 | #define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178) | ||
207 | #define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179) | ||
208 | #define __NR_pread64 (__NR_SYSCALL_BASE+180) | ||
209 | #define __NR_pwrite64 (__NR_SYSCALL_BASE+181) | ||
210 | #define __NR_chown (__NR_SYSCALL_BASE+182) | ||
211 | #define __NR_getcwd (__NR_SYSCALL_BASE+183) | ||
212 | #define __NR_capget (__NR_SYSCALL_BASE+184) | ||
213 | #define __NR_capset (__NR_SYSCALL_BASE+185) | ||
214 | #define __NR_sigaltstack (__NR_SYSCALL_BASE+186) | ||
215 | #define __NR_sendfile (__NR_SYSCALL_BASE+187) | ||
216 | /* 188 reserved */ | ||
217 | /* 189 reserved */ | ||
218 | #define __NR_vfork (__NR_SYSCALL_BASE+190) | ||
219 | #define __NR_ugetrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */ | ||
220 | #define __NR_mmap2 (__NR_SYSCALL_BASE+192) | ||
221 | #define __NR_truncate64 (__NR_SYSCALL_BASE+193) | ||
222 | #define __NR_ftruncate64 (__NR_SYSCALL_BASE+194) | ||
223 | #define __NR_stat64 (__NR_SYSCALL_BASE+195) | ||
224 | #define __NR_lstat64 (__NR_SYSCALL_BASE+196) | ||
225 | #define __NR_fstat64 (__NR_SYSCALL_BASE+197) | ||
226 | #define __NR_lchown32 (__NR_SYSCALL_BASE+198) | ||
227 | #define __NR_getuid32 (__NR_SYSCALL_BASE+199) | ||
228 | #define __NR_getgid32 (__NR_SYSCALL_BASE+200) | ||
229 | #define __NR_geteuid32 (__NR_SYSCALL_BASE+201) | ||
230 | #define __NR_getegid32 (__NR_SYSCALL_BASE+202) | ||
231 | #define __NR_setreuid32 (__NR_SYSCALL_BASE+203) | ||
232 | #define __NR_setregid32 (__NR_SYSCALL_BASE+204) | ||
233 | #define __NR_getgroups32 (__NR_SYSCALL_BASE+205) | ||
234 | #define __NR_setgroups32 (__NR_SYSCALL_BASE+206) | ||
235 | #define __NR_fchown32 (__NR_SYSCALL_BASE+207) | ||
236 | #define __NR_setresuid32 (__NR_SYSCALL_BASE+208) | ||
237 | #define __NR_getresuid32 (__NR_SYSCALL_BASE+209) | ||
238 | #define __NR_setresgid32 (__NR_SYSCALL_BASE+210) | ||
239 | #define __NR_getresgid32 (__NR_SYSCALL_BASE+211) | ||
240 | #define __NR_chown32 (__NR_SYSCALL_BASE+212) | ||
241 | #define __NR_setuid32 (__NR_SYSCALL_BASE+213) | ||
242 | #define __NR_setgid32 (__NR_SYSCALL_BASE+214) | ||
243 | #define __NR_setfsuid32 (__NR_SYSCALL_BASE+215) | ||
244 | #define __NR_setfsgid32 (__NR_SYSCALL_BASE+216) | ||
245 | #define __NR_getdents64 (__NR_SYSCALL_BASE+217) | ||
246 | #define __NR_pivot_root (__NR_SYSCALL_BASE+218) | ||
247 | #define __NR_mincore (__NR_SYSCALL_BASE+219) | ||
248 | #define __NR_madvise (__NR_SYSCALL_BASE+220) | ||
249 | #define __NR_fcntl64 (__NR_SYSCALL_BASE+221) | ||
250 | /* 222 for tux */ | ||
251 | /* 223 is unused */ | ||
252 | #define __NR_gettid (__NR_SYSCALL_BASE+224) | ||
253 | #define __NR_readahead (__NR_SYSCALL_BASE+225) | ||
254 | #define __NR_setxattr (__NR_SYSCALL_BASE+226) | ||
255 | #define __NR_lsetxattr (__NR_SYSCALL_BASE+227) | ||
256 | #define __NR_fsetxattr (__NR_SYSCALL_BASE+228) | ||
257 | #define __NR_getxattr (__NR_SYSCALL_BASE+229) | ||
258 | #define __NR_lgetxattr (__NR_SYSCALL_BASE+230) | ||
259 | #define __NR_fgetxattr (__NR_SYSCALL_BASE+231) | ||
260 | #define __NR_listxattr (__NR_SYSCALL_BASE+232) | ||
261 | #define __NR_llistxattr (__NR_SYSCALL_BASE+233) | ||
262 | #define __NR_flistxattr (__NR_SYSCALL_BASE+234) | ||
263 | #define __NR_removexattr (__NR_SYSCALL_BASE+235) | ||
264 | #define __NR_lremovexattr (__NR_SYSCALL_BASE+236) | ||
265 | #define __NR_fremovexattr (__NR_SYSCALL_BASE+237) | ||
266 | #define __NR_tkill (__NR_SYSCALL_BASE+238) | ||
267 | #define __NR_sendfile64 (__NR_SYSCALL_BASE+239) | ||
268 | #define __NR_futex (__NR_SYSCALL_BASE+240) | ||
269 | #define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241) | ||
270 | #define __NR_sched_getaffinity (__NR_SYSCALL_BASE+242) | ||
271 | #define __NR_io_setup (__NR_SYSCALL_BASE+243) | ||
272 | #define __NR_io_destroy (__NR_SYSCALL_BASE+244) | ||
273 | #define __NR_io_getevents (__NR_SYSCALL_BASE+245) | ||
274 | #define __NR_io_submit (__NR_SYSCALL_BASE+246) | ||
275 | #define __NR_io_cancel (__NR_SYSCALL_BASE+247) | ||
276 | #define __NR_exit_group (__NR_SYSCALL_BASE+248) | ||
277 | #define __NR_lookup_dcookie (__NR_SYSCALL_BASE+249) | ||
278 | #define __NR_epoll_create (__NR_SYSCALL_BASE+250) | ||
279 | #define __NR_epoll_ctl (__NR_SYSCALL_BASE+251) | ||
280 | #define __NR_epoll_wait (__NR_SYSCALL_BASE+252) | ||
281 | #define __NR_remap_file_pages (__NR_SYSCALL_BASE+253) | ||
282 | /* 254 for set_thread_area */ | ||
283 | /* 255 for get_thread_area */ | ||
284 | #define __NR_set_tid_address (__NR_SYSCALL_BASE+256) | ||
285 | #define __NR_timer_create (__NR_SYSCALL_BASE+257) | ||
286 | #define __NR_timer_settime (__NR_SYSCALL_BASE+258) | ||
287 | #define __NR_timer_gettime (__NR_SYSCALL_BASE+259) | ||
288 | #define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260) | ||
289 | #define __NR_timer_delete (__NR_SYSCALL_BASE+261) | ||
290 | #define __NR_clock_settime (__NR_SYSCALL_BASE+262) | ||
291 | #define __NR_clock_gettime (__NR_SYSCALL_BASE+263) | ||
292 | #define __NR_clock_getres (__NR_SYSCALL_BASE+264) | ||
293 | #define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265) | ||
294 | #define __NR_statfs64 (__NR_SYSCALL_BASE+266) | ||
295 | #define __NR_fstatfs64 (__NR_SYSCALL_BASE+267) | ||
296 | #define __NR_tgkill (__NR_SYSCALL_BASE+268) | ||
297 | #define __NR_utimes (__NR_SYSCALL_BASE+269) | ||
298 | #define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE+270) | ||
299 | #define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271) | ||
300 | #define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) | ||
301 | #define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) | ||
302 | #define __NR_mq_open (__NR_SYSCALL_BASE+274) | ||
303 | #define __NR_mq_unlink (__NR_SYSCALL_BASE+275) | ||
304 | #define __NR_mq_timedsend (__NR_SYSCALL_BASE+276) | ||
305 | #define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277) | ||
306 | #define __NR_mq_notify (__NR_SYSCALL_BASE+278) | ||
307 | #define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) | ||
308 | #define __NR_waitid (__NR_SYSCALL_BASE+280) | ||
309 | #define __NR_socket (__NR_SYSCALL_BASE+281) | ||
310 | #define __NR_bind (__NR_SYSCALL_BASE+282) | ||
311 | #define __NR_connect (__NR_SYSCALL_BASE+283) | ||
312 | #define __NR_listen (__NR_SYSCALL_BASE+284) | ||
313 | #define __NR_accept (__NR_SYSCALL_BASE+285) | ||
314 | #define __NR_getsockname (__NR_SYSCALL_BASE+286) | ||
315 | #define __NR_getpeername (__NR_SYSCALL_BASE+287) | ||
316 | #define __NR_socketpair (__NR_SYSCALL_BASE+288) | ||
317 | #define __NR_send (__NR_SYSCALL_BASE+289) | ||
318 | #define __NR_sendto (__NR_SYSCALL_BASE+290) | ||
319 | #define __NR_recv (__NR_SYSCALL_BASE+291) | ||
320 | #define __NR_recvfrom (__NR_SYSCALL_BASE+292) | ||
321 | #define __NR_shutdown (__NR_SYSCALL_BASE+293) | ||
322 | #define __NR_setsockopt (__NR_SYSCALL_BASE+294) | ||
323 | #define __NR_getsockopt (__NR_SYSCALL_BASE+295) | ||
324 | #define __NR_sendmsg (__NR_SYSCALL_BASE+296) | ||
325 | #define __NR_recvmsg (__NR_SYSCALL_BASE+297) | ||
326 | #define __NR_semop (__NR_SYSCALL_BASE+298) | ||
327 | #define __NR_semget (__NR_SYSCALL_BASE+299) | ||
328 | #define __NR_semctl (__NR_SYSCALL_BASE+300) | ||
329 | #define __NR_msgsnd (__NR_SYSCALL_BASE+301) | ||
330 | #define __NR_msgrcv (__NR_SYSCALL_BASE+302) | ||
331 | #define __NR_msgget (__NR_SYSCALL_BASE+303) | ||
332 | #define __NR_msgctl (__NR_SYSCALL_BASE+304) | ||
333 | #define __NR_shmat (__NR_SYSCALL_BASE+305) | ||
334 | #define __NR_shmdt (__NR_SYSCALL_BASE+306) | ||
335 | #define __NR_shmget (__NR_SYSCALL_BASE+307) | ||
336 | #define __NR_shmctl (__NR_SYSCALL_BASE+308) | ||
337 | #define __NR_add_key (__NR_SYSCALL_BASE+309) | ||
338 | #define __NR_request_key (__NR_SYSCALL_BASE+310) | ||
339 | #define __NR_keyctl (__NR_SYSCALL_BASE+311) | ||
340 | #define __NR_semtimedop (__NR_SYSCALL_BASE+312) | ||
341 | #define __NR_vserver (__NR_SYSCALL_BASE+313) | ||
342 | #define __NR_ioprio_set (__NR_SYSCALL_BASE+314) | ||
343 | #define __NR_ioprio_get (__NR_SYSCALL_BASE+315) | ||
344 | #define __NR_inotify_init (__NR_SYSCALL_BASE+316) | ||
345 | #define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317) | ||
346 | #define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318) | ||
347 | #define __NR_mbind (__NR_SYSCALL_BASE+319) | ||
348 | #define __NR_get_mempolicy (__NR_SYSCALL_BASE+320) | ||
349 | #define __NR_set_mempolicy (__NR_SYSCALL_BASE+321) | ||
350 | #define __NR_openat (__NR_SYSCALL_BASE+322) | ||
351 | #define __NR_mkdirat (__NR_SYSCALL_BASE+323) | ||
352 | #define __NR_mknodat (__NR_SYSCALL_BASE+324) | ||
353 | #define __NR_fchownat (__NR_SYSCALL_BASE+325) | ||
354 | #define __NR_futimesat (__NR_SYSCALL_BASE+326) | ||
355 | #define __NR_fstatat64 (__NR_SYSCALL_BASE+327) | ||
356 | #define __NR_unlinkat (__NR_SYSCALL_BASE+328) | ||
357 | #define __NR_renameat (__NR_SYSCALL_BASE+329) | ||
358 | #define __NR_linkat (__NR_SYSCALL_BASE+330) | ||
359 | #define __NR_symlinkat (__NR_SYSCALL_BASE+331) | ||
360 | #define __NR_readlinkat (__NR_SYSCALL_BASE+332) | ||
361 | #define __NR_fchmodat (__NR_SYSCALL_BASE+333) | ||
362 | #define __NR_faccessat (__NR_SYSCALL_BASE+334) | ||
363 | #define __NR_pselect6 (__NR_SYSCALL_BASE+335) | ||
364 | #define __NR_ppoll (__NR_SYSCALL_BASE+336) | ||
365 | #define __NR_unshare (__NR_SYSCALL_BASE+337) | ||
366 | #define __NR_set_robust_list (__NR_SYSCALL_BASE+338) | ||
367 | #define __NR_get_robust_list (__NR_SYSCALL_BASE+339) | ||
368 | #define __NR_splice (__NR_SYSCALL_BASE+340) | ||
369 | #define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341) | ||
370 | #define __NR_sync_file_range2 __NR_arm_sync_file_range | ||
371 | #define __NR_tee (__NR_SYSCALL_BASE+342) | ||
372 | #define __NR_vmsplice (__NR_SYSCALL_BASE+343) | ||
373 | #define __NR_move_pages (__NR_SYSCALL_BASE+344) | ||
374 | #define __NR_getcpu (__NR_SYSCALL_BASE+345) | ||
375 | #define __NR_epoll_pwait (__NR_SYSCALL_BASE+346) | ||
376 | #define __NR_kexec_load (__NR_SYSCALL_BASE+347) | ||
377 | #define __NR_utimensat (__NR_SYSCALL_BASE+348) | ||
378 | #define __NR_signalfd (__NR_SYSCALL_BASE+349) | ||
379 | #define __NR_timerfd_create (__NR_SYSCALL_BASE+350) | ||
380 | #define __NR_eventfd (__NR_SYSCALL_BASE+351) | ||
381 | #define __NR_fallocate (__NR_SYSCALL_BASE+352) | ||
382 | #define __NR_timerfd_settime (__NR_SYSCALL_BASE+353) | ||
383 | #define __NR_timerfd_gettime (__NR_SYSCALL_BASE+354) | ||
384 | #define __NR_signalfd4 (__NR_SYSCALL_BASE+355) | ||
385 | #define __NR_eventfd2 (__NR_SYSCALL_BASE+356) | ||
386 | #define __NR_epoll_create1 (__NR_SYSCALL_BASE+357) | ||
387 | #define __NR_dup3 (__NR_SYSCALL_BASE+358) | ||
388 | #define __NR_pipe2 (__NR_SYSCALL_BASE+359) | ||
389 | #define __NR_inotify_init1 (__NR_SYSCALL_BASE+360) | ||
390 | #define __NR_preadv (__NR_SYSCALL_BASE+361) | ||
391 | #define __NR_pwritev (__NR_SYSCALL_BASE+362) | ||
392 | #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) | ||
393 | #define __NR_perf_event_open (__NR_SYSCALL_BASE+364) | ||
394 | #define __NR_recvmmsg (__NR_SYSCALL_BASE+365) | ||
395 | #define __NR_accept4 (__NR_SYSCALL_BASE+366) | ||
396 | #define __NR_fanotify_init (__NR_SYSCALL_BASE+367) | ||
397 | #define __NR_fanotify_mark (__NR_SYSCALL_BASE+368) | ||
398 | #define __NR_prlimit64 (__NR_SYSCALL_BASE+369) | ||
399 | #define __NR_name_to_handle_at (__NR_SYSCALL_BASE+370) | ||
400 | #define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371) | ||
401 | #define __NR_clock_adjtime (__NR_SYSCALL_BASE+372) | ||
402 | #define __NR_syncfs (__NR_SYSCALL_BASE+373) | ||
403 | #define __NR_sendmmsg (__NR_SYSCALL_BASE+374) | ||
404 | #define __NR_setns (__NR_SYSCALL_BASE+375) | ||
405 | #define __NR_process_vm_readv (__NR_SYSCALL_BASE+376) | ||
406 | #define __NR_process_vm_writev (__NR_SYSCALL_BASE+377) | ||
407 | /* 378 for kcmp */ | ||
408 | |||
409 | /* | ||
410 | * This may need to be greater than __NR_last_syscall+1 in order to | ||
411 | * account for the padding in the syscall table | ||
412 | */ | ||
413 | |||
414 | /* | ||
415 | * The following SWIs are ARM private. | ||
416 | */ | ||
417 | #define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) | ||
418 | #define __ARM_NR_breakpoint (__ARM_NR_BASE+1) | ||
419 | #define __ARM_NR_cacheflush (__ARM_NR_BASE+2) | ||
420 | #define __ARM_NR_usr26 (__ARM_NR_BASE+3) | ||
421 | #define __ARM_NR_usr32 (__ARM_NR_BASE+4) | ||
422 | #define __ARM_NR_set_tls (__ARM_NR_BASE+5) | ||
423 | |||
424 | /* | ||
425 | * *NOTE*: This is a ghost syscall private to the kernel. Only the | ||
426 | * __kuser_cmpxchg code in entry-armv.S should be aware of its | ||
427 | * existence. Don't ever use this from user code. | ||
428 | */ | ||
429 | |||
430 | /* | ||
431 | * The following syscalls are obsolete and no longer available for EABI. | ||
432 | */ | ||
433 | #if !defined(__KERNEL__) | ||
434 | #if defined(__ARM_EABI__) | ||
435 | #undef __NR_time | ||
436 | #undef __NR_umount | ||
437 | #undef __NR_stime | ||
438 | #undef __NR_alarm | ||
439 | #undef __NR_utime | ||
440 | #undef __NR_getrlimit | ||
441 | #undef __NR_select | ||
442 | #undef __NR_readdir | ||
443 | #undef __NR_mmap | ||
444 | #undef __NR_socketcall | ||
445 | #undef __NR_syscall | ||
446 | #undef __NR_ipc | ||
447 | #endif | ||
448 | #endif | ||
449 | |||
450 | #endif /* _UAPI__ASM_ARM_UNISTD_H */ | ||
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 5dfef9d97ed..5bbec7b8183 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -81,4 +81,6 @@ head-y := head$(MMUEXT).o | |||
81 | obj-$(CONFIG_DEBUG_LL) += debug.o | 81 | obj-$(CONFIG_DEBUG_LL) += debug.o |
82 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 82 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
83 | 83 | ||
84 | obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o | ||
85 | |||
84 | extra-y := $(head-y) vmlinux.lds | 86 | extra-y := $(head-y) vmlinux.lds |
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index e340fa1db20..417bac1846b 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -86,35 +86,14 @@ ENDPROC(ret_to_user) | |||
86 | */ | 86 | */ |
87 | ENTRY(ret_from_fork) | 87 | ENTRY(ret_from_fork) |
88 | bl schedule_tail | 88 | bl schedule_tail |
89 | cmp r5, #0 | ||
90 | movne r0, r4 | ||
91 | movne lr, pc | ||
92 | movne pc, r5 | ||
89 | get_thread_info tsk | 93 | get_thread_info tsk |
90 | mov why, #1 | ||
91 | b ret_slow_syscall | 94 | b ret_slow_syscall |
92 | ENDPROC(ret_from_fork) | 95 | ENDPROC(ret_from_fork) |
93 | 96 | ||
94 | ENTRY(ret_from_kernel_thread) | ||
95 | UNWIND(.fnstart) | ||
96 | UNWIND(.cantunwind) | ||
97 | bl schedule_tail | ||
98 | mov r0, r4 | ||
99 | adr lr, BSYM(1f) @ kernel threads should not exit | ||
100 | mov pc, r5 | ||
101 | 1: bl do_exit | ||
102 | nop | ||
103 | UNWIND(.fnend) | ||
104 | ENDPROC(ret_from_kernel_thread) | ||
105 | |||
106 | /* | ||
107 | * turn a kernel thread into userland process | ||
108 | * use: ret_from_kernel_execve(struct pt_regs *normal) | ||
109 | */ | ||
110 | ENTRY(ret_from_kernel_execve) | ||
111 | mov why, #0 @ not a syscall | ||
112 | str why, [r0, #S_R0] @ ... and we want 0 in ->ARM_r0 as well | ||
113 | get_thread_info tsk @ thread structure | ||
114 | mov sp, r0 @ stack pointer just under pt_regs | ||
115 | b ret_slow_syscall | ||
116 | ENDPROC(ret_from_kernel_execve) | ||
117 | |||
118 | .equ NR_syscalls,0 | 97 | .equ NR_syscalls,0 |
119 | #define CALL(x) .equ NR_syscalls,NR_syscalls+1 | 98 | #define CALL(x) .equ NR_syscalls,NR_syscalls+1 |
120 | #include "calls.S" | 99 | #include "calls.S" |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 9874d074119..4eee351f466 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -83,8 +83,12 @@ ENTRY(stext) | |||
83 | THUMB( .thumb ) @ switch to Thumb now. | 83 | THUMB( .thumb ) @ switch to Thumb now. |
84 | THUMB(1: ) | 84 | THUMB(1: ) |
85 | 85 | ||
86 | setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 @ ensure svc mode | 86 | #ifdef CONFIG_ARM_VIRT_EXT |
87 | @ and irqs disabled | 87 | bl __hyp_stub_install |
88 | #endif | ||
89 | @ ensure svc mode and all interrupts masked | ||
90 | safe_svcmode_maskall r9 | ||
91 | |||
88 | mrc p15, 0, r9, c0, c0 @ get processor id | 92 | mrc p15, 0, r9, c0, c0 @ get processor id |
89 | bl __lookup_processor_type @ r5=procinfo r9=cpuid | 93 | bl __lookup_processor_type @ r5=procinfo r9=cpuid |
90 | movs r10, r5 @ invalid processor (r5=0)? | 94 | movs r10, r5 @ invalid processor (r5=0)? |
@@ -326,7 +330,11 @@ ENTRY(secondary_startup) | |||
326 | * the processor type - there is no need to check the machine type | 330 | * the processor type - there is no need to check the machine type |
327 | * as it has already been validated by the primary processor. | 331 | * as it has already been validated by the primary processor. |
328 | */ | 332 | */ |
329 | setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 | 333 | #ifdef CONFIG_ARM_VIRT_EXT |
334 | bl __hyp_stub_install | ||
335 | #endif | ||
336 | safe_svcmode_maskall r9 | ||
337 | |||
330 | mrc p15, 0, r9, c0, c0 @ get processor id | 338 | mrc p15, 0, r9, c0, c0 @ get processor id |
331 | bl __lookup_processor_type | 339 | bl __lookup_processor_type |
332 | movs r10, r5 @ invalid processor? | 340 | movs r10, r5 @ invalid processor? |
diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S new file mode 100644 index 00000000000..65b2417aebc --- /dev/null +++ b/arch/arm/kernel/hyp-stub.S | |||
@@ -0,0 +1,223 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2012 Linaro Limited. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | */ | ||
18 | |||
19 | #include <linux/init.h> | ||
20 | #include <linux/linkage.h> | ||
21 | #include <asm/assembler.h> | ||
22 | #include <asm/virt.h> | ||
23 | |||
24 | #ifndef ZIMAGE | ||
25 | /* | ||
26 | * For the kernel proper, we need to find out the CPU boot mode long after | ||
27 | * boot, so we need to store it in a writable variable. | ||
28 | * | ||
29 | * This is not in .bss, because we set it sufficiently early that the boot-time | ||
30 | * zeroing of .bss would clobber it. | ||
31 | */ | ||
32 | .data | ||
33 | ENTRY(__boot_cpu_mode) | ||
34 | .long 0 | ||
35 | .text | ||
36 | |||
37 | /* | ||
38 | * Save the primary CPU boot mode. Requires 3 scratch registers. | ||
39 | */ | ||
40 | .macro store_primary_cpu_mode reg1, reg2, reg3 | ||
41 | mrs \reg1, cpsr | ||
42 | and \reg1, \reg1, #MODE_MASK | ||
43 | adr \reg2, .L__boot_cpu_mode_offset | ||
44 | ldr \reg3, [\reg2] | ||
45 | str \reg1, [\reg2, \reg3] | ||
46 | .endm | ||
47 | |||
48 | /* | ||
49 | * Compare the current mode with the one saved on the primary CPU. | ||
50 | * If they don't match, record that fact. The Z bit indicates | ||
51 | * if there's a match or not. | ||
52 | * Requires 3 additionnal scratch registers. | ||
53 | */ | ||
54 | .macro compare_cpu_mode_with_primary mode, reg1, reg2, reg3 | ||
55 | adr \reg2, .L__boot_cpu_mode_offset | ||
56 | ldr \reg3, [\reg2] | ||
57 | ldr \reg1, [\reg2, \reg3] | ||
58 | cmp \mode, \reg1 @ matches primary CPU boot mode? | ||
59 | orrne r7, r7, #BOOT_CPU_MODE_MISMATCH | ||
60 | strne r7, [r5, r6] @ record what happened and give up | ||
61 | .endm | ||
62 | |||
63 | #else /* ZIMAGE */ | ||
64 | |||
65 | .macro store_primary_cpu_mode reg1:req, reg2:req, reg3:req | ||
66 | .endm | ||
67 | |||
68 | /* | ||
69 | * The zImage loader only runs on one CPU, so we don't bother with mult-CPU | ||
70 | * consistency checking: | ||
71 | */ | ||
72 | .macro compare_cpu_mode_with_primary mode, reg1, reg2, reg3 | ||
73 | cmp \mode, \mode | ||
74 | .endm | ||
75 | |||
76 | #endif /* ZIMAGE */ | ||
77 | |||
78 | /* | ||
79 | * Hypervisor stub installation functions. | ||
80 | * | ||
81 | * These must be called with the MMU and D-cache off. | ||
82 | * They are not ABI compliant and are only intended to be called from the kernel | ||
83 | * entry points in head.S. | ||
84 | */ | ||
85 | @ Call this from the primary CPU | ||
86 | ENTRY(__hyp_stub_install) | ||
87 | store_primary_cpu_mode r4, r5, r6 | ||
88 | ENDPROC(__hyp_stub_install) | ||
89 | |||
90 | @ fall through... | ||
91 | |||
92 | @ Secondary CPUs should call here | ||
93 | ENTRY(__hyp_stub_install_secondary) | ||
94 | mrs r4, cpsr | ||
95 | and r4, r4, #MODE_MASK | ||
96 | |||
97 | /* | ||
98 | * If the secondary has booted with a different mode, give up | ||
99 | * immediately. | ||
100 | */ | ||
101 | compare_cpu_mode_with_primary r4, r5, r6, r7 | ||
102 | bxne lr | ||
103 | |||
104 | /* | ||
105 | * Once we have given up on one CPU, we do not try to install the | ||
106 | * stub hypervisor on the remaining ones: because the saved boot mode | ||
107 | * is modified, it can't compare equal to the CPSR mode field any | ||
108 | * more. | ||
109 | * | ||
110 | * Otherwise... | ||
111 | */ | ||
112 | |||
113 | cmp r4, #HYP_MODE | ||
114 | bxne lr @ give up if the CPU is not in HYP mode | ||
115 | |||
116 | /* | ||
117 | * Configure HSCTLR to set correct exception endianness/instruction set | ||
118 | * state etc. | ||
119 | * Turn off all traps | ||
120 | * Eventually, CPU-specific code might be needed -- assume not for now | ||
121 | * | ||
122 | * This code relies on the "eret" instruction to synchronize the | ||
123 | * various coprocessor accesses. | ||
124 | */ | ||
125 | @ Now install the hypervisor stub: | ||
126 | adr r7, __hyp_stub_vectors | ||
127 | mcr p15, 4, r7, c12, c0, 0 @ set hypervisor vector base (HVBAR) | ||
128 | |||
129 | @ Disable all traps, so we don't get any nasty surprise | ||
130 | mov r7, #0 | ||
131 | mcr p15, 4, r7, c1, c1, 0 @ HCR | ||
132 | mcr p15, 4, r7, c1, c1, 2 @ HCPTR | ||
133 | mcr p15, 4, r7, c1, c1, 3 @ HSTR | ||
134 | |||
135 | THUMB( orr r7, #(1 << 30) ) @ HSCTLR.TE | ||
136 | #ifdef CONFIG_CPU_BIG_ENDIAN | ||
137 | orr r7, #(1 << 9) @ HSCTLR.EE | ||
138 | #endif | ||
139 | mcr p15, 4, r7, c1, c0, 0 @ HSCTLR | ||
140 | |||
141 | mrc p15, 4, r7, c1, c1, 1 @ HDCR | ||
142 | and r7, #0x1f @ Preserve HPMN | ||
143 | mcr p15, 4, r7, c1, c1, 1 @ HDCR | ||
144 | |||
145 | #if !defined(ZIMAGE) && defined(CONFIG_ARM_ARCH_TIMER) | ||
146 | @ make CNTP_* and CNTPCT accessible from PL1 | ||
147 | mrc p15, 0, r7, c0, c1, 1 @ ID_PFR1 | ||
148 | lsr r7, #16 | ||
149 | and r7, #0xf | ||
150 | cmp r7, #1 | ||
151 | bne 1f | ||
152 | mrc p15, 4, r7, c14, c1, 0 @ CNTHCTL | ||
153 | orr r7, r7, #3 @ PL1PCEN | PL1PCTEN | ||
154 | mcr p15, 4, r7, c14, c1, 0 @ CNTHCTL | ||
155 | 1: | ||
156 | #endif | ||
157 | |||
158 | bic r7, r4, #MODE_MASK | ||
159 | orr r7, r7, #SVC_MODE | ||
160 | THUMB( orr r7, r7, #PSR_T_BIT ) | ||
161 | msr spsr_cxsf, r7 @ This is SPSR_hyp. | ||
162 | |||
163 | __MSR_ELR_HYP(14) @ msr elr_hyp, lr | ||
164 | __ERET @ return, switching to SVC mode | ||
165 | @ The boot CPU mode is left in r4. | ||
166 | ENDPROC(__hyp_stub_install_secondary) | ||
167 | |||
168 | __hyp_stub_do_trap: | ||
169 | cmp r0, #-1 | ||
170 | mrceq p15, 4, r0, c12, c0, 0 @ get HVBAR | ||
171 | mcrne p15, 4, r0, c12, c0, 0 @ set HVBAR | ||
172 | __ERET | ||
173 | ENDPROC(__hyp_stub_do_trap) | ||
174 | |||
175 | /* | ||
176 | * __hyp_set_vectors: Call this after boot to set the initial hypervisor | ||
177 | * vectors as part of hypervisor installation. On an SMP system, this should | ||
178 | * be called on each CPU. | ||
179 | * | ||
180 | * r0 must be the physical address of the new vector table (which must lie in | ||
181 | * the bottom 4GB of physical address space. | ||
182 | * | ||
183 | * r0 must be 32-byte aligned. | ||
184 | * | ||
185 | * Before calling this, you must check that the stub hypervisor is installed | ||
186 | * everywhere, by waiting for any secondary CPUs to be brought up and then | ||
187 | * checking that BOOT_CPU_MODE_HAVE_HYP(__boot_cpu_mode) is true. | ||
188 | * | ||
189 | * If not, there is a pre-existing hypervisor, some CPUs failed to boot, or | ||
190 | * something else went wrong... in such cases, trying to install a new | ||
191 | * hypervisor is unlikely to work as desired. | ||
192 | * | ||
193 | * When you call into your shiny new hypervisor, sp_hyp will contain junk, | ||
194 | * so you will need to set that to something sensible at the new hypervisor's | ||
195 | * initialisation entry point. | ||
196 | */ | ||
197 | ENTRY(__hyp_get_vectors) | ||
198 | mov r0, #-1 | ||
199 | ENDPROC(__hyp_get_vectors) | ||
200 | @ fall through | ||
201 | ENTRY(__hyp_set_vectors) | ||
202 | __HVC(0) | ||
203 | bx lr | ||
204 | ENDPROC(__hyp_set_vectors) | ||
205 | |||
206 | #ifndef ZIMAGE | ||
207 | .align 2 | ||
208 | .L__boot_cpu_mode_offset: | ||
209 | .long __boot_cpu_mode - . | ||
210 | #endif | ||
211 | |||
212 | .align 5 | ||
213 | __hyp_stub_vectors: | ||
214 | __hyp_stub_reset: W(b) . | ||
215 | __hyp_stub_und: W(b) . | ||
216 | __hyp_stub_svc: W(b) . | ||
217 | __hyp_stub_pabort: W(b) . | ||
218 | __hyp_stub_dabort: W(b) . | ||
219 | __hyp_stub_trap: W(b) __hyp_stub_do_trap | ||
220 | __hyp_stub_irq: W(b) . | ||
221 | __hyp_stub_fiq: W(b) . | ||
222 | ENDPROC(__hyp_stub_vectors) | ||
223 | |||
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index f98c17ff195..90084a6de35 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -373,7 +373,6 @@ void release_thread(struct task_struct *dead_task) | |||
373 | } | 373 | } |
374 | 374 | ||
375 | asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); | 375 | asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); |
376 | asmlinkage void ret_from_kernel_thread(void) __asm__("ret_from_kernel_thread"); | ||
377 | 376 | ||
378 | int | 377 | int |
379 | copy_thread(unsigned long clone_flags, unsigned long stack_start, | 378 | copy_thread(unsigned long clone_flags, unsigned long stack_start, |
@@ -388,13 +387,13 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start, | |||
388 | *childregs = *regs; | 387 | *childregs = *regs; |
389 | childregs->ARM_r0 = 0; | 388 | childregs->ARM_r0 = 0; |
390 | childregs->ARM_sp = stack_start; | 389 | childregs->ARM_sp = stack_start; |
391 | thread->cpu_context.pc = (unsigned long)ret_from_fork; | ||
392 | } else { | 390 | } else { |
391 | memset(childregs, 0, sizeof(struct pt_regs)); | ||
393 | thread->cpu_context.r4 = stk_sz; | 392 | thread->cpu_context.r4 = stk_sz; |
394 | thread->cpu_context.r5 = stack_start; | 393 | thread->cpu_context.r5 = stack_start; |
395 | thread->cpu_context.pc = (unsigned long)ret_from_kernel_thread; | ||
396 | childregs->ARM_cpsr = SVC_MODE; | 394 | childregs->ARM_cpsr = SVC_MODE; |
397 | } | 395 | } |
396 | thread->cpu_context.pc = (unsigned long)ret_from_fork; | ||
398 | thread->cpu_context.sp = (unsigned long)childregs; | 397 | thread->cpu_context.sp = (unsigned long)childregs; |
399 | 398 | ||
400 | clear_ptrace_hw_breakpoint(p); | 399 | clear_ptrace_hw_breakpoint(p); |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index febafa0f552..da1d1aa20ad 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <asm/traps.h> | 53 | #include <asm/traps.h> |
54 | #include <asm/unwind.h> | 54 | #include <asm/unwind.h> |
55 | #include <asm/memblock.h> | 55 | #include <asm/memblock.h> |
56 | #include <asm/virt.h> | ||
56 | 57 | ||
57 | #include "atags.h" | 58 | #include "atags.h" |
58 | #include "tcm.h" | 59 | #include "tcm.h" |
@@ -703,6 +704,21 @@ static int __init meminfo_cmp(const void *_a, const void *_b) | |||
703 | return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; | 704 | return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; |
704 | } | 705 | } |
705 | 706 | ||
707 | void __init hyp_mode_check(void) | ||
708 | { | ||
709 | #ifdef CONFIG_ARM_VIRT_EXT | ||
710 | if (is_hyp_mode_available()) { | ||
711 | pr_info("CPU: All CPU(s) started in HYP mode.\n"); | ||
712 | pr_info("CPU: Virtualization extensions available.\n"); | ||
713 | } else if (is_hyp_mode_mismatched()) { | ||
714 | pr_warn("CPU: WARNING: CPU(s) started in wrong/inconsistent modes (primary CPU mode 0x%x)\n", | ||
715 | __boot_cpu_mode & MODE_MASK); | ||
716 | pr_warn("CPU: This may indicate a broken bootloader or firmware.\n"); | ||
717 | } else | ||
718 | pr_info("CPU: All CPU(s) started in SVC mode.\n"); | ||
719 | #endif | ||
720 | } | ||
721 | |||
706 | void __init setup_arch(char **cmdline_p) | 722 | void __init setup_arch(char **cmdline_p) |
707 | { | 723 | { |
708 | struct machine_desc *mdesc; | 724 | struct machine_desc *mdesc; |
@@ -748,6 +764,10 @@ void __init setup_arch(char **cmdline_p) | |||
748 | smp_init_cpus(); | 764 | smp_init_cpus(); |
749 | } | 765 | } |
750 | #endif | 766 | #endif |
767 | |||
768 | if (!is_smp()) | ||
769 | hyp_mode_check(); | ||
770 | |||
751 | reserve_crashkernel(); | 771 | reserve_crashkernel(); |
752 | 772 | ||
753 | tcm_init(); | 773 | tcm_init(); |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index f27789e4e38..56f72d257eb 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/signal.h> | 11 | #include <linux/signal.h> |
12 | #include <linux/personality.h> | 12 | #include <linux/personality.h> |
13 | #include <linux/freezer.h> | ||
14 | #include <linux/uaccess.h> | 13 | #include <linux/uaccess.h> |
15 | #include <linux/tracehook.h> | 14 | #include <linux/tracehook.h> |
16 | 15 | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index d100eacdb79..8e20754dd31 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <asm/ptrace.h> | 43 | #include <asm/ptrace.h> |
44 | #include <asm/localtimer.h> | 44 | #include <asm/localtimer.h> |
45 | #include <asm/smp_plat.h> | 45 | #include <asm/smp_plat.h> |
46 | #include <asm/virt.h> | ||
46 | #include <asm/mach/arch.h> | 47 | #include <asm/mach/arch.h> |
47 | 48 | ||
48 | /* | 49 | /* |
@@ -202,8 +203,11 @@ int __cpuinit __cpu_disable(void) | |||
202 | /* | 203 | /* |
203 | * Flush user cache and TLB mappings, and then remove this CPU | 204 | * Flush user cache and TLB mappings, and then remove this CPU |
204 | * from the vm mask set of all processes. | 205 | * from the vm mask set of all processes. |
206 | * | ||
207 | * Caches are flushed to the Level of Unification Inner Shareable | ||
208 | * to write-back dirty lines to unified caches shared by all CPUs. | ||
205 | */ | 209 | */ |
206 | flush_cache_all(); | 210 | flush_cache_louis(); |
207 | local_flush_tlb_all(); | 211 | local_flush_tlb_all(); |
208 | 212 | ||
209 | clear_tasks_mm_cpumask(cpu); | 213 | clear_tasks_mm_cpumask(cpu); |
@@ -355,6 +359,8 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
355 | num_online_cpus(), | 359 | num_online_cpus(), |
356 | bogosum / (500000/HZ), | 360 | bogosum / (500000/HZ), |
357 | (bogosum / (5000/HZ)) % 100); | 361 | (bogosum / (5000/HZ)) % 100); |
362 | |||
363 | hyp_mode_check(); | ||
358 | } | 364 | } |
359 | 365 | ||
360 | void __init smp_prepare_boot_cpu(void) | 366 | void __init smp_prepare_boot_cpu(void) |
diff --git a/arch/arm/kernel/suspend.c b/arch/arm/kernel/suspend.c index 1794cc3b0f1..358bca3a995 100644 --- a/arch/arm/kernel/suspend.c +++ b/arch/arm/kernel/suspend.c | |||
@@ -17,6 +17,8 @@ extern void cpu_resume_mmu(void); | |||
17 | */ | 17 | */ |
18 | void __cpu_suspend_save(u32 *ptr, u32 ptrsz, u32 sp, u32 *save_ptr) | 18 | void __cpu_suspend_save(u32 *ptr, u32 ptrsz, u32 sp, u32 *save_ptr) |
19 | { | 19 | { |
20 | u32 *ctx = ptr; | ||
21 | |||
20 | *save_ptr = virt_to_phys(ptr); | 22 | *save_ptr = virt_to_phys(ptr); |
21 | 23 | ||
22 | /* This must correspond to the LDM in cpu_resume() assembly */ | 24 | /* This must correspond to the LDM in cpu_resume() assembly */ |
@@ -26,7 +28,20 @@ void __cpu_suspend_save(u32 *ptr, u32 ptrsz, u32 sp, u32 *save_ptr) | |||
26 | 28 | ||
27 | cpu_do_suspend(ptr); | 29 | cpu_do_suspend(ptr); |
28 | 30 | ||
29 | flush_cache_all(); | 31 | flush_cache_louis(); |
32 | |||
33 | /* | ||
34 | * flush_cache_louis does not guarantee that | ||
35 | * save_ptr and ptr are cleaned to main memory, | ||
36 | * just up to the Level of Unification Inner Shareable. | ||
37 | * Since the context pointer and context itself | ||
38 | * are to be retrieved with the MMU off that | ||
39 | * data must be cleaned from all cache levels | ||
40 | * to main memory using "area" cache primitives. | ||
41 | */ | ||
42 | __cpuc_flush_dcache_area(ctx, ptrsz); | ||
43 | __cpuc_flush_dcache_area(save_ptr, sizeof(*save_ptr)); | ||
44 | |||
30 | outer_clean_range(*save_ptr, *save_ptr + ptrsz); | 45 | outer_clean_range(*save_ptr, *save_ptr + ptrsz); |
31 | outer_clean_range(virt_to_phys(save_ptr), | 46 | outer_clean_range(virt_to_phys(save_ptr), |
32 | virt_to_phys(save_ptr) + sizeof(*save_ptr)); | 47 | virt_to_phys(save_ptr) + sizeof(*save_ptr)); |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index c8050b14e61..b1420710193 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -19,8 +19,8 @@ config AT91_SAM9G45_RESET | |||
19 | 19 | ||
20 | config SOC_AT91SAM9 | 20 | config SOC_AT91SAM9 |
21 | bool | 21 | bool |
22 | select GENERIC_CLOCKEVENTS | ||
23 | select CPU_ARM926T | 22 | select CPU_ARM926T |
23 | select GENERIC_CLOCKEVENTS | ||
24 | 24 | ||
25 | menu "Atmel AT91 System-on-Chip" | 25 | menu "Atmel AT91 System-on-Chip" |
26 | 26 | ||
@@ -28,66 +28,66 @@ comment "Atmel AT91 Processor" | |||
28 | 28 | ||
29 | config SOC_AT91SAM9 | 29 | config SOC_AT91SAM9 |
30 | bool | 30 | bool |
31 | select AT91_SAM9_SMC | ||
32 | select AT91_SAM9_TIME | ||
31 | select CPU_ARM926T | 33 | select CPU_ARM926T |
32 | select MULTI_IRQ_HANDLER | 34 | select MULTI_IRQ_HANDLER |
33 | select SPARSE_IRQ | 35 | select SPARSE_IRQ |
34 | select AT91_SAM9_TIME | ||
35 | select AT91_SAM9_SMC | ||
36 | 36 | ||
37 | config SOC_AT91RM9200 | 37 | config SOC_AT91RM9200 |
38 | bool "AT91RM9200" | 38 | bool "AT91RM9200" |
39 | select CPU_ARM920T | 39 | select CPU_ARM920T |
40 | select MULTI_IRQ_HANDLER | ||
41 | select SPARSE_IRQ | ||
42 | select GENERIC_CLOCKEVENTS | 40 | select GENERIC_CLOCKEVENTS |
43 | select HAVE_AT91_DBGU0 | 41 | select HAVE_AT91_DBGU0 |
42 | select MULTI_IRQ_HANDLER | ||
43 | select SPARSE_IRQ | ||
44 | 44 | ||
45 | config SOC_AT91SAM9260 | 45 | config SOC_AT91SAM9260 |
46 | bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20" | 46 | bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20" |
47 | select SOC_AT91SAM9 | ||
48 | select HAVE_AT91_DBGU0 | 47 | select HAVE_AT91_DBGU0 |
49 | select HAVE_NET_MACB | 48 | select HAVE_NET_MACB |
49 | select SOC_AT91SAM9 | ||
50 | help | 50 | help |
51 | Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE | 51 | Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE |
52 | or AT91SAM9G20 SoC. | 52 | or AT91SAM9G20 SoC. |
53 | 53 | ||
54 | config SOC_AT91SAM9261 | 54 | config SOC_AT91SAM9261 |
55 | bool "AT91SAM9261 or AT91SAM9G10" | 55 | bool "AT91SAM9261 or AT91SAM9G10" |
56 | select SOC_AT91SAM9 | ||
57 | select HAVE_AT91_DBGU0 | 56 | select HAVE_AT91_DBGU0 |
58 | select HAVE_FB_ATMEL | 57 | select HAVE_FB_ATMEL |
58 | select SOC_AT91SAM9 | ||
59 | help | 59 | help |
60 | Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC. | 60 | Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC. |
61 | 61 | ||
62 | config SOC_AT91SAM9263 | 62 | config SOC_AT91SAM9263 |
63 | bool "AT91SAM9263" | 63 | bool "AT91SAM9263" |
64 | select SOC_AT91SAM9 | ||
65 | select HAVE_AT91_DBGU1 | 64 | select HAVE_AT91_DBGU1 |
66 | select HAVE_FB_ATMEL | 65 | select HAVE_FB_ATMEL |
67 | select HAVE_NET_MACB | 66 | select HAVE_NET_MACB |
67 | select SOC_AT91SAM9 | ||
68 | 68 | ||
69 | config SOC_AT91SAM9RL | 69 | config SOC_AT91SAM9RL |
70 | bool "AT91SAM9RL" | 70 | bool "AT91SAM9RL" |
71 | select SOC_AT91SAM9 | ||
72 | select HAVE_AT91_DBGU0 | 71 | select HAVE_AT91_DBGU0 |
73 | select HAVE_FB_ATMEL | 72 | select HAVE_FB_ATMEL |
73 | select SOC_AT91SAM9 | ||
74 | 74 | ||
75 | config SOC_AT91SAM9G45 | 75 | config SOC_AT91SAM9G45 |
76 | bool "AT91SAM9G45 or AT91SAM9M10 families" | 76 | bool "AT91SAM9G45 or AT91SAM9M10 families" |
77 | select SOC_AT91SAM9 | ||
78 | select HAVE_AT91_DBGU1 | 77 | select HAVE_AT91_DBGU1 |
79 | select HAVE_FB_ATMEL | 78 | select HAVE_FB_ATMEL |
80 | select HAVE_NET_MACB | 79 | select HAVE_NET_MACB |
80 | select SOC_AT91SAM9 | ||
81 | help | 81 | help |
82 | Select this if you are using one of Atmel's AT91SAM9G45 family SoC. | 82 | Select this if you are using one of Atmel's AT91SAM9G45 family SoC. |
83 | This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11. | 83 | This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11. |
84 | 84 | ||
85 | config SOC_AT91SAM9X5 | 85 | config SOC_AT91SAM9X5 |
86 | bool "AT91SAM9x5 family" | 86 | bool "AT91SAM9x5 family" |
87 | select SOC_AT91SAM9 | ||
88 | select HAVE_AT91_DBGU0 | 87 | select HAVE_AT91_DBGU0 |
89 | select HAVE_FB_ATMEL | 88 | select HAVE_FB_ATMEL |
90 | select HAVE_NET_MACB | 89 | select HAVE_NET_MACB |
90 | select SOC_AT91SAM9 | ||
91 | help | 91 | help |
92 | Select this if you are using one of Atmel's AT91SAM9x5 family SoC. | 92 | Select this if you are using one of Atmel's AT91SAM9x5 family SoC. |
93 | This means that your SAM9 name finishes with a '5' (except if it is | 93 | This means that your SAM9 name finishes with a '5' (except if it is |
@@ -97,9 +97,9 @@ config SOC_AT91SAM9X5 | |||
97 | 97 | ||
98 | config SOC_AT91SAM9N12 | 98 | config SOC_AT91SAM9N12 |
99 | bool "AT91SAM9N12 family" | 99 | bool "AT91SAM9N12 family" |
100 | select SOC_AT91SAM9 | ||
101 | select HAVE_AT91_DBGU0 | 100 | select HAVE_AT91_DBGU0 |
102 | select HAVE_FB_ATMEL | 101 | select HAVE_FB_ATMEL |
102 | select SOC_AT91SAM9 | ||
103 | help | 103 | help |
104 | Select this if you are using Atmel's AT91SAM9N12 SoC. | 104 | Select this if you are using Atmel's AT91SAM9N12 SoC. |
105 | 105 | ||
@@ -144,9 +144,9 @@ config ARCH_AT91SAM9G45 | |||
144 | config ARCH_AT91X40 | 144 | config ARCH_AT91X40 |
145 | bool "AT91x40" | 145 | bool "AT91x40" |
146 | depends on !MMU | 146 | depends on !MMU |
147 | select ARCH_USES_GETTIMEOFFSET | ||
147 | select MULTI_IRQ_HANDLER | 148 | select MULTI_IRQ_HANDLER |
148 | select SPARSE_IRQ | 149 | select SPARSE_IRQ |
149 | select ARCH_USES_GETTIMEOFFSET | ||
150 | 150 | ||
151 | endchoice | 151 | endchoice |
152 | 152 | ||
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig index e6135363765..263242da2cb 100644 --- a/arch/arm/mach-clps711x/Kconfig +++ b/arch/arm/mach-clps711x/Kconfig | |||
@@ -23,9 +23,9 @@ config ARCH_CLEP7312 | |||
23 | 23 | ||
24 | config ARCH_EDB7211 | 24 | config ARCH_EDB7211 |
25 | bool "EDB7211" | 25 | bool "EDB7211" |
26 | select ISA | ||
27 | select ARCH_SPARSEMEM_ENABLE | ||
28 | select ARCH_SELECT_MEMORY_MODEL | 26 | select ARCH_SELECT_MEMORY_MODEL |
27 | select ARCH_SPARSEMEM_ENABLE | ||
28 | select ISA | ||
29 | help | 29 | help |
30 | Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211 | 30 | Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211 |
31 | evaluation board. | 31 | evaluation board. |
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index ab99c3c3b75..f8eecb95941 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig | |||
@@ -4,12 +4,12 @@ config AINTC | |||
4 | bool | 4 | bool |
5 | 5 | ||
6 | config CP_INTC | 6 | config CP_INTC |
7 | select IRQ_DOMAIN | ||
8 | bool | 7 | bool |
8 | select IRQ_DOMAIN | ||
9 | 9 | ||
10 | config ARCH_DAVINCI_DMx | 10 | config ARCH_DAVINCI_DMx |
11 | select CPU_ARM926T | ||
12 | bool | 11 | bool |
12 | select CPU_ARM926T | ||
13 | 13 | ||
14 | menu "TI DaVinci Implementations" | 14 | menu "TI DaVinci Implementations" |
15 | 15 | ||
@@ -32,19 +32,19 @@ config ARCH_DAVINCI_DM646x | |||
32 | 32 | ||
33 | config ARCH_DAVINCI_DA830 | 33 | config ARCH_DAVINCI_DA830 |
34 | bool "DA830/OMAP-L137/AM17x based system" | 34 | bool "DA830/OMAP-L137/AM17x based system" |
35 | select CP_INTC | ||
36 | select ARCH_DAVINCI_DA8XX | 35 | select ARCH_DAVINCI_DA8XX |
37 | select CPU_DCACHE_WRITETHROUGH # needed on silicon revs 1.0, 1.1 | 36 | select CPU_DCACHE_WRITETHROUGH # needed on silicon revs 1.0, 1.1 |
37 | select CP_INTC | ||
38 | 38 | ||
39 | config ARCH_DAVINCI_DA850 | 39 | config ARCH_DAVINCI_DA850 |
40 | bool "DA850/OMAP-L138/AM18x based system" | 40 | bool "DA850/OMAP-L138/AM18x based system" |
41 | select CP_INTC | ||
42 | select ARCH_DAVINCI_DA8XX | 41 | select ARCH_DAVINCI_DA8XX |
43 | select ARCH_HAS_CPUFREQ | 42 | select ARCH_HAS_CPUFREQ |
43 | select CP_INTC | ||
44 | 44 | ||
45 | config ARCH_DAVINCI_DA8XX | 45 | config ARCH_DAVINCI_DA8XX |
46 | select CPU_ARM926T | ||
47 | bool | 46 | bool |
47 | select CPU_ARM926T | ||
48 | 48 | ||
49 | config ARCH_DAVINCI_DM365 | 49 | config ARCH_DAVINCI_DM365 |
50 | bool "DaVinci 365 based system" | 50 | bool "DaVinci 365 based system" |
@@ -52,9 +52,9 @@ config ARCH_DAVINCI_DM365 | |||
52 | select ARCH_DAVINCI_DMx | 52 | select ARCH_DAVINCI_DMx |
53 | 53 | ||
54 | config ARCH_DAVINCI_TNETV107X | 54 | config ARCH_DAVINCI_TNETV107X |
55 | bool "TNETV107X based system" | ||
55 | select CPU_V6 | 56 | select CPU_V6 |
56 | select CP_INTC | 57 | select CP_INTC |
57 | bool "TNETV107X based system" | ||
58 | 58 | ||
59 | comment "DaVinci Board Type" | 59 | comment "DaVinci Board Type" |
60 | 60 | ||
@@ -103,9 +103,9 @@ config MACH_DAVINCI_DM6467_EVM | |||
103 | bool "TI DM6467 EVM" | 103 | bool "TI DM6467 EVM" |
104 | default ARCH_DAVINCI_DM646x | 104 | default ARCH_DAVINCI_DM646x |
105 | depends on ARCH_DAVINCI_DM646x | 105 | depends on ARCH_DAVINCI_DM646x |
106 | select MACH_DAVINCI_DM6467TEVM | ||
107 | select EEPROM_AT24 | 106 | select EEPROM_AT24 |
108 | select I2C | 107 | select I2C |
108 | select MACH_DAVINCI_DM6467TEVM | ||
109 | help | 109 | help |
110 | Configure this option to specify the whether the board used | 110 | Configure this option to specify the whether the board used |
111 | for development is a DM6467 EVM | 111 | for development is a DM6467 EVM |
@@ -127,8 +127,8 @@ config MACH_DAVINCI_DA830_EVM | |||
127 | bool "TI DA830/OMAP-L137/AM17x Reference Platform" | 127 | bool "TI DA830/OMAP-L137/AM17x Reference Platform" |
128 | default ARCH_DAVINCI_DA830 | 128 | default ARCH_DAVINCI_DA830 |
129 | depends on ARCH_DAVINCI_DA830 | 129 | depends on ARCH_DAVINCI_DA830 |
130 | select GPIO_PCF857X | ||
131 | select EEPROM_AT24 | 130 | select EEPROM_AT24 |
131 | select GPIO_PCF857X | ||
132 | select I2C | 132 | select I2C |
133 | help | 133 | help |
134 | Say Y here to select the TI DA830/OMAP-L137/AM17x Evaluation Module. | 134 | Say Y here to select the TI DA830/OMAP-L137/AM17x Evaluation Module. |
@@ -186,6 +186,13 @@ config DA850_UI_RMII | |||
186 | NOTE: Please take care while choosing this option, MII PHY will | 186 | NOTE: Please take care while choosing this option, MII PHY will |
187 | not be functional if RMII mode is selected. | 187 | not be functional if RMII mode is selected. |
188 | 188 | ||
189 | config DA850_UI_SD_VIDEO_PORT | ||
190 | bool "Video Port Interface" | ||
191 | help | ||
192 | Say Y if you want to use Video Port Interface (VPIF) on the | ||
193 | DA850/OMAP-L138 EVM. The Video decoders/encoders are found on the | ||
194 | UI daughter card that is supplied with the EVM. | ||
195 | |||
189 | endchoice | 196 | endchoice |
190 | 197 | ||
191 | config DA850_WL12XX | 198 | config DA850_WL12XX |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 1295e616cee..32ee3f89596 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -45,6 +45,9 @@ | |||
45 | #include <linux/platform_data/mtd-davinci-aemif.h> | 45 | #include <linux/platform_data/mtd-davinci-aemif.h> |
46 | #include <linux/platform_data/spi-davinci.h> | 46 | #include <linux/platform_data/spi-davinci.h> |
47 | 47 | ||
48 | #include <media/tvp514x.h> | ||
49 | #include <media/adv7343.h> | ||
50 | |||
48 | #define DA850_EVM_PHY_ID "davinci_mdio-0:00" | 51 | #define DA850_EVM_PHY_ID "davinci_mdio-0:00" |
49 | #define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8) | 52 | #define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8) |
50 | #define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15) | 53 | #define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15) |
@@ -452,6 +455,15 @@ static void da850_evm_ui_keys_init(unsigned gpio) | |||
452 | } | 455 | } |
453 | } | 456 | } |
454 | 457 | ||
458 | #ifdef CONFIG_DA850_UI_SD_VIDEO_PORT | ||
459 | static inline void da850_evm_setup_video_port(int video_sel) | ||
460 | { | ||
461 | gpio_set_value_cansleep(video_sel, 0); | ||
462 | } | ||
463 | #else | ||
464 | static inline void da850_evm_setup_video_port(int video_sel) { } | ||
465 | #endif | ||
466 | |||
455 | static int da850_evm_ui_expander_setup(struct i2c_client *client, unsigned gpio, | 467 | static int da850_evm_ui_expander_setup(struct i2c_client *client, unsigned gpio, |
456 | unsigned ngpio, void *c) | 468 | unsigned ngpio, void *c) |
457 | { | 469 | { |
@@ -497,6 +509,8 @@ static int da850_evm_ui_expander_setup(struct i2c_client *client, unsigned gpio, | |||
497 | 509 | ||
498 | da850_evm_setup_emac_rmii(sel_a); | 510 | da850_evm_setup_emac_rmii(sel_a); |
499 | 511 | ||
512 | da850_evm_setup_video_port(sel_c); | ||
513 | |||
500 | return 0; | 514 | return 0; |
501 | 515 | ||
502 | exp_setup_keys_fail: | 516 | exp_setup_keys_fail: |
@@ -1149,6 +1163,169 @@ static __init int da850_evm_init_cpufreq(void) | |||
1149 | static __init int da850_evm_init_cpufreq(void) { return 0; } | 1163 | static __init int da850_evm_init_cpufreq(void) { return 0; } |
1150 | #endif | 1164 | #endif |
1151 | 1165 | ||
1166 | #if defined(CONFIG_DA850_UI_SD_VIDEO_PORT) | ||
1167 | |||
1168 | #define TVP5147_CH0 "tvp514x-0" | ||
1169 | #define TVP5147_CH1 "tvp514x-1" | ||
1170 | |||
1171 | /* VPIF capture configuration */ | ||
1172 | static struct tvp514x_platform_data tvp5146_pdata = { | ||
1173 | .clk_polarity = 0, | ||
1174 | .hs_polarity = 1, | ||
1175 | .vs_polarity = 1, | ||
1176 | }; | ||
1177 | |||
1178 | #define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL) | ||
1179 | |||
1180 | static const struct vpif_input da850_ch0_inputs[] = { | ||
1181 | { | ||
1182 | .input = { | ||
1183 | .index = 0, | ||
1184 | .name = "Composite", | ||
1185 | .type = V4L2_INPUT_TYPE_CAMERA, | ||
1186 | .capabilities = V4L2_IN_CAP_STD, | ||
1187 | .std = TVP514X_STD_ALL, | ||
1188 | }, | ||
1189 | .input_route = INPUT_CVBS_VI2B, | ||
1190 | .output_route = OUTPUT_10BIT_422_EMBEDDED_SYNC, | ||
1191 | .subdev_name = TVP5147_CH0, | ||
1192 | }, | ||
1193 | }; | ||
1194 | |||
1195 | static const struct vpif_input da850_ch1_inputs[] = { | ||
1196 | { | ||
1197 | .input = { | ||
1198 | .index = 0, | ||
1199 | .name = "S-Video", | ||
1200 | .type = V4L2_INPUT_TYPE_CAMERA, | ||
1201 | .capabilities = V4L2_IN_CAP_STD, | ||
1202 | .std = TVP514X_STD_ALL, | ||
1203 | }, | ||
1204 | .input_route = INPUT_SVIDEO_VI2C_VI1C, | ||
1205 | .output_route = OUTPUT_10BIT_422_EMBEDDED_SYNC, | ||
1206 | .subdev_name = TVP5147_CH1, | ||
1207 | }, | ||
1208 | }; | ||
1209 | |||
1210 | static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = { | ||
1211 | { | ||
1212 | .name = TVP5147_CH0, | ||
1213 | .board_info = { | ||
1214 | I2C_BOARD_INFO("tvp5146", 0x5d), | ||
1215 | .platform_data = &tvp5146_pdata, | ||
1216 | }, | ||
1217 | }, | ||
1218 | { | ||
1219 | .name = TVP5147_CH1, | ||
1220 | .board_info = { | ||
1221 | I2C_BOARD_INFO("tvp5146", 0x5c), | ||
1222 | .platform_data = &tvp5146_pdata, | ||
1223 | }, | ||
1224 | }, | ||
1225 | }; | ||
1226 | |||
1227 | static struct vpif_capture_config da850_vpif_capture_config = { | ||
1228 | .subdev_info = da850_vpif_capture_sdev_info, | ||
1229 | .subdev_count = ARRAY_SIZE(da850_vpif_capture_sdev_info), | ||
1230 | .chan_config[0] = { | ||
1231 | .inputs = da850_ch0_inputs, | ||
1232 | .input_count = ARRAY_SIZE(da850_ch0_inputs), | ||
1233 | .vpif_if = { | ||
1234 | .if_type = VPIF_IF_BT656, | ||
1235 | .hd_pol = 1, | ||
1236 | .vd_pol = 1, | ||
1237 | .fid_pol = 0, | ||
1238 | }, | ||
1239 | }, | ||
1240 | .chan_config[1] = { | ||
1241 | .inputs = da850_ch1_inputs, | ||
1242 | .input_count = ARRAY_SIZE(da850_ch1_inputs), | ||
1243 | .vpif_if = { | ||
1244 | .if_type = VPIF_IF_BT656, | ||
1245 | .hd_pol = 1, | ||
1246 | .vd_pol = 1, | ||
1247 | .fid_pol = 0, | ||
1248 | }, | ||
1249 | }, | ||
1250 | .card_name = "DA850/OMAP-L138 Video Capture", | ||
1251 | }; | ||
1252 | |||
1253 | /* VPIF display configuration */ | ||
1254 | static struct vpif_subdev_info da850_vpif_subdev[] = { | ||
1255 | { | ||
1256 | .name = "adv7343", | ||
1257 | .board_info = { | ||
1258 | I2C_BOARD_INFO("adv7343", 0x2a), | ||
1259 | }, | ||
1260 | }, | ||
1261 | }; | ||
1262 | |||
1263 | static const struct vpif_output da850_ch0_outputs[] = { | ||
1264 | { | ||
1265 | .output = { | ||
1266 | .index = 0, | ||
1267 | .name = "Composite", | ||
1268 | .type = V4L2_OUTPUT_TYPE_ANALOG, | ||
1269 | .capabilities = V4L2_OUT_CAP_STD, | ||
1270 | .std = V4L2_STD_ALL, | ||
1271 | }, | ||
1272 | .subdev_name = "adv7343", | ||
1273 | .output_route = ADV7343_COMPOSITE_ID, | ||
1274 | }, | ||
1275 | { | ||
1276 | .output = { | ||
1277 | .index = 1, | ||
1278 | .name = "S-Video", | ||
1279 | .type = V4L2_OUTPUT_TYPE_ANALOG, | ||
1280 | .capabilities = V4L2_OUT_CAP_STD, | ||
1281 | .std = V4L2_STD_ALL, | ||
1282 | }, | ||
1283 | .subdev_name = "adv7343", | ||
1284 | .output_route = ADV7343_SVIDEO_ID, | ||
1285 | }, | ||
1286 | }; | ||
1287 | |||
1288 | static struct vpif_display_config da850_vpif_display_config = { | ||
1289 | .subdevinfo = da850_vpif_subdev, | ||
1290 | .subdev_count = ARRAY_SIZE(da850_vpif_subdev), | ||
1291 | .chan_config[0] = { | ||
1292 | .outputs = da850_ch0_outputs, | ||
1293 | .output_count = ARRAY_SIZE(da850_ch0_outputs), | ||
1294 | }, | ||
1295 | .card_name = "DA850/OMAP-L138 Video Display", | ||
1296 | }; | ||
1297 | |||
1298 | static __init void da850_vpif_init(void) | ||
1299 | { | ||
1300 | int ret; | ||
1301 | |||
1302 | ret = da850_register_vpif(); | ||
1303 | if (ret) | ||
1304 | pr_warn("da850_evm_init: VPIF setup failed: %d\n", ret); | ||
1305 | |||
1306 | ret = davinci_cfg_reg_list(da850_vpif_capture_pins); | ||
1307 | if (ret) | ||
1308 | pr_warn("da850_evm_init: VPIF capture mux setup failed: %d\n", | ||
1309 | ret); | ||
1310 | |||
1311 | ret = da850_register_vpif_capture(&da850_vpif_capture_config); | ||
1312 | if (ret) | ||
1313 | pr_warn("da850_evm_init: VPIF capture setup failed: %d\n", ret); | ||
1314 | |||
1315 | ret = davinci_cfg_reg_list(da850_vpif_display_pins); | ||
1316 | if (ret) | ||
1317 | pr_warn("da850_evm_init: VPIF display mux setup failed: %d\n", | ||
1318 | ret); | ||
1319 | |||
1320 | ret = da850_register_vpif_display(&da850_vpif_display_config); | ||
1321 | if (ret) | ||
1322 | pr_warn("da850_evm_init: VPIF display setup failed: %d\n", ret); | ||
1323 | } | ||
1324 | |||
1325 | #else | ||
1326 | static __init void da850_vpif_init(void) {} | ||
1327 | #endif | ||
1328 | |||
1152 | #ifdef CONFIG_DA850_WL12XX | 1329 | #ifdef CONFIG_DA850_WL12XX |
1153 | 1330 | ||
1154 | static void wl12xx_set_power(int index, bool power_on) | 1331 | static void wl12xx_set_power(int index, bool power_on) |
@@ -1375,6 +1552,8 @@ static __init void da850_evm_init(void) | |||
1375 | pr_warning("da850_evm_init: suspend registration failed: %d\n", | 1552 | pr_warning("da850_evm_init: suspend registration failed: %d\n", |
1376 | ret); | 1553 | ret); |
1377 | 1554 | ||
1555 | da850_vpif_init(); | ||
1556 | |||
1378 | ret = da8xx_register_spi(1, da850evm_spi_info, | 1557 | ret = da8xx_register_spi(1, da850evm_spi_info, |
1379 | ARRAY_SIZE(da850evm_spi_info)); | 1558 | ARRAY_SIZE(da850evm_spi_info)); |
1380 | if (ret) | 1559 | if (ret) |
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index ca72fc4b8cc..f22572cee49 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/phy.h> | 23 | #include <linux/phy.h> |
24 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
25 | #include <linux/videodev2.h> | 25 | #include <linux/videodev2.h> |
26 | #include <linux/v4l2-dv-timings.h> | ||
26 | #include <linux/export.h> | 27 | #include <linux/export.h> |
27 | 28 | ||
28 | #include <media/tvp514x.h> | 29 | #include <media/tvp514x.h> |
@@ -620,7 +621,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = { | |||
620 | { | 621 | { |
621 | .name = "ntsc", | 622 | .name = "ntsc", |
622 | .timings_type = VPBE_ENC_STD, | 623 | .timings_type = VPBE_ENC_STD, |
623 | .timings = {V4L2_STD_525_60}, | 624 | .std_id = V4L2_STD_525_60, |
624 | .interlaced = 1, | 625 | .interlaced = 1, |
625 | .xres = 720, | 626 | .xres = 720, |
626 | .yres = 480, | 627 | .yres = 480, |
@@ -632,7 +633,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = { | |||
632 | { | 633 | { |
633 | .name = "pal", | 634 | .name = "pal", |
634 | .timings_type = VPBE_ENC_STD, | 635 | .timings_type = VPBE_ENC_STD, |
635 | .timings = {V4L2_STD_625_50}, | 636 | .std_id = V4L2_STD_625_50, |
636 | .interlaced = 1, | 637 | .interlaced = 1, |
637 | .xres = 720, | 638 | .xres = 720, |
638 | .yres = 576, | 639 | .yres = 576, |
@@ -647,8 +648,8 @@ static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = { | |||
647 | static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = { | 648 | static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = { |
648 | { | 649 | { |
649 | .name = "480p59_94", | 650 | .name = "480p59_94", |
650 | .timings_type = VPBE_ENC_DV_PRESET, | 651 | .timings_type = VPBE_ENC_CUSTOM_TIMINGS, |
651 | .timings = {V4L2_DV_480P59_94}, | 652 | .dv_timings = V4L2_DV_BT_CEA_720X480P59_94, |
652 | .interlaced = 0, | 653 | .interlaced = 0, |
653 | .xres = 720, | 654 | .xres = 720, |
654 | .yres = 480, | 655 | .yres = 480, |
@@ -659,8 +660,8 @@ static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = { | |||
659 | }, | 660 | }, |
660 | { | 661 | { |
661 | .name = "576p50", | 662 | .name = "576p50", |
662 | .timings_type = VPBE_ENC_DV_PRESET, | 663 | .timings_type = VPBE_ENC_CUSTOM_TIMINGS, |
663 | .timings = {V4L2_DV_576P50}, | 664 | .dv_timings = V4L2_DV_BT_CEA_720X576P50, |
664 | .interlaced = 0, | 665 | .interlaced = 0, |
665 | .xres = 720, | 666 | .xres = 720, |
666 | .yres = 576, | 667 | .yres = 576, |
@@ -698,7 +699,7 @@ static struct vpbe_output dm644xevm_vpbe_outputs[] = { | |||
698 | .index = 1, | 699 | .index = 1, |
699 | .name = "Component", | 700 | .name = "Component", |
700 | .type = V4L2_OUTPUT_TYPE_ANALOG, | 701 | .type = V4L2_OUTPUT_TYPE_ANALOG, |
701 | .capabilities = V4L2_OUT_CAP_PRESETS, | 702 | .capabilities = V4L2_OUT_CAP_DV_TIMINGS, |
702 | }, | 703 | }, |
703 | .subdev_name = VPBE_VENC_SUBDEV_NAME, | 704 | .subdev_name = VPBE_VENC_SUBDEV_NAME, |
704 | .default_mode = "480p59_94", | 705 | .default_mode = "480p59_94", |
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 9944367b493..1dbf85beed1 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/i2c/pcf857x.h> | 26 | #include <linux/i2c/pcf857x.h> |
27 | 27 | ||
28 | #include <media/tvp514x.h> | 28 | #include <media/tvp514x.h> |
29 | #include <media/adv7343.h> | ||
29 | 30 | ||
30 | #include <linux/mtd/mtd.h> | 31 | #include <linux/mtd/mtd.h> |
31 | #include <linux/mtd/nand.h> | 32 | #include <linux/mtd/nand.h> |
@@ -496,18 +497,49 @@ static struct vpif_subdev_info dm646x_vpif_subdev[] = { | |||
496 | }, | 497 | }, |
497 | }; | 498 | }; |
498 | 499 | ||
499 | static const char *output[] = { | 500 | static const struct vpif_output dm6467_ch0_outputs[] = { |
500 | "Composite", | 501 | { |
501 | "Component", | 502 | .output = { |
502 | "S-Video", | 503 | .index = 0, |
504 | .name = "Composite", | ||
505 | .type = V4L2_OUTPUT_TYPE_ANALOG, | ||
506 | .capabilities = V4L2_OUT_CAP_STD, | ||
507 | .std = V4L2_STD_ALL, | ||
508 | }, | ||
509 | .subdev_name = "adv7343", | ||
510 | .output_route = ADV7343_COMPOSITE_ID, | ||
511 | }, | ||
512 | { | ||
513 | .output = { | ||
514 | .index = 1, | ||
515 | .name = "Component", | ||
516 | .type = V4L2_OUTPUT_TYPE_ANALOG, | ||
517 | .capabilities = V4L2_OUT_CAP_CUSTOM_TIMINGS, | ||
518 | }, | ||
519 | .subdev_name = "adv7343", | ||
520 | .output_route = ADV7343_COMPONENT_ID, | ||
521 | }, | ||
522 | { | ||
523 | .output = { | ||
524 | .index = 2, | ||
525 | .name = "S-Video", | ||
526 | .type = V4L2_OUTPUT_TYPE_ANALOG, | ||
527 | .capabilities = V4L2_OUT_CAP_STD, | ||
528 | .std = V4L2_STD_ALL, | ||
529 | }, | ||
530 | .subdev_name = "adv7343", | ||
531 | .output_route = ADV7343_SVIDEO_ID, | ||
532 | }, | ||
503 | }; | 533 | }; |
504 | 534 | ||
505 | static struct vpif_display_config dm646x_vpif_display_config = { | 535 | static struct vpif_display_config dm646x_vpif_display_config = { |
506 | .set_clock = set_vpif_clock, | 536 | .set_clock = set_vpif_clock, |
507 | .subdevinfo = dm646x_vpif_subdev, | 537 | .subdevinfo = dm646x_vpif_subdev, |
508 | .subdev_count = ARRAY_SIZE(dm646x_vpif_subdev), | 538 | .subdev_count = ARRAY_SIZE(dm646x_vpif_subdev), |
509 | .output = output, | 539 | .chan_config[0] = { |
510 | .output_count = ARRAY_SIZE(output), | 540 | .outputs = dm6467_ch0_outputs, |
541 | .output_count = ARRAY_SIZE(dm6467_ch0_outputs), | ||
542 | }, | ||
511 | .card_name = "DM646x EVM", | 543 | .card_name = "DM646x EVM", |
512 | }; | 544 | }; |
513 | 545 | ||
@@ -601,15 +633,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = { | |||
601 | I2C_BOARD_INFO("tvp5146", 0x5d), | 633 | I2C_BOARD_INFO("tvp5146", 0x5d), |
602 | .platform_data = &tvp5146_pdata, | 634 | .platform_data = &tvp5146_pdata, |
603 | }, | 635 | }, |
604 | .input = INPUT_CVBS_VI2B, | ||
605 | .output = OUTPUT_10BIT_422_EMBEDDED_SYNC, | ||
606 | .can_route = 1, | ||
607 | .vpif_if = { | ||
608 | .if_type = VPIF_IF_BT656, | ||
609 | .hd_pol = 1, | ||
610 | .vd_pol = 1, | ||
611 | .fid_pol = 0, | ||
612 | }, | ||
613 | }, | 636 | }, |
614 | { | 637 | { |
615 | .name = TVP5147_CH1, | 638 | .name = TVP5147_CH1, |
@@ -617,15 +640,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = { | |||
617 | I2C_BOARD_INFO("tvp5146", 0x5c), | 640 | I2C_BOARD_INFO("tvp5146", 0x5c), |
618 | .platform_data = &tvp5146_pdata, | 641 | .platform_data = &tvp5146_pdata, |
619 | }, | 642 | }, |
620 | .input = INPUT_SVIDEO_VI2C_VI1C, | ||
621 | .output = OUTPUT_10BIT_422_EMBEDDED_SYNC, | ||
622 | .can_route = 1, | ||
623 | .vpif_if = { | ||
624 | .if_type = VPIF_IF_BT656, | ||
625 | .hd_pol = 1, | ||
626 | .vd_pol = 1, | ||
627 | .fid_pol = 0, | ||
628 | }, | ||
629 | }, | 643 | }, |
630 | }; | 644 | }; |
631 | 645 | ||
@@ -635,9 +649,12 @@ static const struct vpif_input dm6467_ch0_inputs[] = { | |||
635 | .index = 0, | 649 | .index = 0, |
636 | .name = "Composite", | 650 | .name = "Composite", |
637 | .type = V4L2_INPUT_TYPE_CAMERA, | 651 | .type = V4L2_INPUT_TYPE_CAMERA, |
652 | .capabilities = V4L2_IN_CAP_STD, | ||
638 | .std = TVP514X_STD_ALL, | 653 | .std = TVP514X_STD_ALL, |
639 | }, | 654 | }, |
640 | .subdev_name = TVP5147_CH0, | 655 | .subdev_name = TVP5147_CH0, |
656 | .input_route = INPUT_CVBS_VI2B, | ||
657 | .output_route = OUTPUT_10BIT_422_EMBEDDED_SYNC, | ||
641 | }, | 658 | }, |
642 | }; | 659 | }; |
643 | 660 | ||
@@ -647,9 +664,12 @@ static const struct vpif_input dm6467_ch1_inputs[] = { | |||
647 | .index = 0, | 664 | .index = 0, |
648 | .name = "S-Video", | 665 | .name = "S-Video", |
649 | .type = V4L2_INPUT_TYPE_CAMERA, | 666 | .type = V4L2_INPUT_TYPE_CAMERA, |
667 | .capabilities = V4L2_IN_CAP_STD, | ||
650 | .std = TVP514X_STD_ALL, | 668 | .std = TVP514X_STD_ALL, |
651 | }, | 669 | }, |
652 | .subdev_name = TVP5147_CH1, | 670 | .subdev_name = TVP5147_CH1, |
671 | .input_route = INPUT_SVIDEO_VI2C_VI1C, | ||
672 | .output_route = OUTPUT_10BIT_422_EMBEDDED_SYNC, | ||
653 | }, | 673 | }, |
654 | }; | 674 | }; |
655 | 675 | ||
@@ -661,10 +681,22 @@ static struct vpif_capture_config dm646x_vpif_capture_cfg = { | |||
661 | .chan_config[0] = { | 681 | .chan_config[0] = { |
662 | .inputs = dm6467_ch0_inputs, | 682 | .inputs = dm6467_ch0_inputs, |
663 | .input_count = ARRAY_SIZE(dm6467_ch0_inputs), | 683 | .input_count = ARRAY_SIZE(dm6467_ch0_inputs), |
684 | .vpif_if = { | ||
685 | .if_type = VPIF_IF_BT656, | ||
686 | .hd_pol = 1, | ||
687 | .vd_pol = 1, | ||
688 | .fid_pol = 0, | ||
689 | }, | ||
664 | }, | 690 | }, |
665 | .chan_config[1] = { | 691 | .chan_config[1] = { |
666 | .inputs = dm6467_ch1_inputs, | 692 | .inputs = dm6467_ch1_inputs, |
667 | .input_count = ARRAY_SIZE(dm6467_ch1_inputs), | 693 | .input_count = ARRAY_SIZE(dm6467_ch1_inputs), |
694 | .vpif_if = { | ||
695 | .if_type = VPIF_IF_BT656, | ||
696 | .hd_pol = 1, | ||
697 | .vd_pol = 1, | ||
698 | .fid_pol = 0, | ||
699 | }, | ||
668 | }, | 700 | }, |
669 | }; | 701 | }; |
670 | 702 | ||
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index e517e1036b0..b90c172d554 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -347,6 +347,13 @@ static struct clk spi1_clk = { | |||
347 | .flags = DA850_CLK_ASYNC3, | 347 | .flags = DA850_CLK_ASYNC3, |
348 | }; | 348 | }; |
349 | 349 | ||
350 | static struct clk vpif_clk = { | ||
351 | .name = "vpif", | ||
352 | .parent = &pll0_sysclk2, | ||
353 | .lpsc = DA850_LPSC1_VPIF, | ||
354 | .gpsc = 1, | ||
355 | }; | ||
356 | |||
350 | static struct clk sata_clk = { | 357 | static struct clk sata_clk = { |
351 | .name = "sata", | 358 | .name = "sata", |
352 | .parent = &pll0_sysclk2, | 359 | .parent = &pll0_sysclk2, |
@@ -397,6 +404,7 @@ static struct clk_lookup da850_clks[] = { | |||
397 | CLK(NULL, "usb20", &usb20_clk), | 404 | CLK(NULL, "usb20", &usb20_clk), |
398 | CLK("spi_davinci.0", NULL, &spi0_clk), | 405 | CLK("spi_davinci.0", NULL, &spi0_clk), |
399 | CLK("spi_davinci.1", NULL, &spi1_clk), | 406 | CLK("spi_davinci.1", NULL, &spi1_clk), |
407 | CLK("vpif", NULL, &vpif_clk), | ||
400 | CLK("ahci", NULL, &sata_clk), | 408 | CLK("ahci", NULL, &sata_clk), |
401 | CLK(NULL, NULL, NULL), | 409 | CLK(NULL, NULL, NULL), |
402 | }; | 410 | }; |
@@ -573,6 +581,46 @@ static const struct mux_config da850_pins[] = { | |||
573 | MUX_CFG(DA850, GPIO6_10, 13, 20, 15, 8, false) | 581 | MUX_CFG(DA850, GPIO6_10, 13, 20, 15, 8, false) |
574 | MUX_CFG(DA850, GPIO6_13, 13, 8, 15, 8, false) | 582 | MUX_CFG(DA850, GPIO6_13, 13, 8, 15, 8, false) |
575 | MUX_CFG(DA850, RTC_ALARM, 0, 28, 15, 2, false) | 583 | MUX_CFG(DA850, RTC_ALARM, 0, 28, 15, 2, false) |
584 | /* VPIF Capture */ | ||
585 | MUX_CFG(DA850, VPIF_DIN0, 15, 4, 15, 1, false) | ||
586 | MUX_CFG(DA850, VPIF_DIN1, 15, 0, 15, 1, false) | ||
587 | MUX_CFG(DA850, VPIF_DIN2, 14, 28, 15, 1, false) | ||
588 | MUX_CFG(DA850, VPIF_DIN3, 14, 24, 15, 1, false) | ||
589 | MUX_CFG(DA850, VPIF_DIN4, 14, 20, 15, 1, false) | ||
590 | MUX_CFG(DA850, VPIF_DIN5, 14, 16, 15, 1, false) | ||
591 | MUX_CFG(DA850, VPIF_DIN6, 14, 12, 15, 1, false) | ||
592 | MUX_CFG(DA850, VPIF_DIN7, 14, 8, 15, 1, false) | ||
593 | MUX_CFG(DA850, VPIF_DIN8, 16, 4, 15, 1, false) | ||
594 | MUX_CFG(DA850, VPIF_DIN9, 16, 0, 15, 1, false) | ||
595 | MUX_CFG(DA850, VPIF_DIN10, 15, 28, 15, 1, false) | ||
596 | MUX_CFG(DA850, VPIF_DIN11, 15, 24, 15, 1, false) | ||
597 | MUX_CFG(DA850, VPIF_DIN12, 15, 20, 15, 1, false) | ||
598 | MUX_CFG(DA850, VPIF_DIN13, 15, 16, 15, 1, false) | ||
599 | MUX_CFG(DA850, VPIF_DIN14, 15, 12, 15, 1, false) | ||
600 | MUX_CFG(DA850, VPIF_DIN15, 15, 8, 15, 1, false) | ||
601 | MUX_CFG(DA850, VPIF_CLKIN0, 14, 0, 15, 1, false) | ||
602 | MUX_CFG(DA850, VPIF_CLKIN1, 14, 4, 15, 1, false) | ||
603 | MUX_CFG(DA850, VPIF_CLKIN2, 19, 8, 15, 1, false) | ||
604 | MUX_CFG(DA850, VPIF_CLKIN3, 19, 16, 15, 1, false) | ||
605 | /* VPIF Display */ | ||
606 | MUX_CFG(DA850, VPIF_DOUT0, 17, 4, 15, 1, false) | ||
607 | MUX_CFG(DA850, VPIF_DOUT1, 17, 0, 15, 1, false) | ||
608 | MUX_CFG(DA850, VPIF_DOUT2, 16, 28, 15, 1, false) | ||
609 | MUX_CFG(DA850, VPIF_DOUT3, 16, 24, 15, 1, false) | ||
610 | MUX_CFG(DA850, VPIF_DOUT4, 16, 20, 15, 1, false) | ||
611 | MUX_CFG(DA850, VPIF_DOUT5, 16, 16, 15, 1, false) | ||
612 | MUX_CFG(DA850, VPIF_DOUT6, 16, 12, 15, 1, false) | ||
613 | MUX_CFG(DA850, VPIF_DOUT7, 16, 8, 15, 1, false) | ||
614 | MUX_CFG(DA850, VPIF_DOUT8, 18, 4, 15, 1, false) | ||
615 | MUX_CFG(DA850, VPIF_DOUT9, 18, 0, 15, 1, false) | ||
616 | MUX_CFG(DA850, VPIF_DOUT10, 17, 28, 15, 1, false) | ||
617 | MUX_CFG(DA850, VPIF_DOUT11, 17, 24, 15, 1, false) | ||
618 | MUX_CFG(DA850, VPIF_DOUT12, 17, 20, 15, 1, false) | ||
619 | MUX_CFG(DA850, VPIF_DOUT13, 17, 16, 15, 1, false) | ||
620 | MUX_CFG(DA850, VPIF_DOUT14, 17, 12, 15, 1, false) | ||
621 | MUX_CFG(DA850, VPIF_DOUT15, 17, 8, 15, 1, false) | ||
622 | MUX_CFG(DA850, VPIF_CLKO2, 19, 12, 15, 1, false) | ||
623 | MUX_CFG(DA850, VPIF_CLKO3, 19, 20, 15, 1, false) | ||
576 | #endif | 624 | #endif |
577 | }; | 625 | }; |
578 | 626 | ||
@@ -595,6 +643,26 @@ const short da850_lcdcntl_pins[] __initconst = { | |||
595 | -1 | 643 | -1 |
596 | }; | 644 | }; |
597 | 645 | ||
646 | const short da850_vpif_capture_pins[] __initdata = { | ||
647 | DA850_VPIF_DIN0, DA850_VPIF_DIN1, DA850_VPIF_DIN2, DA850_VPIF_DIN3, | ||
648 | DA850_VPIF_DIN4, DA850_VPIF_DIN5, DA850_VPIF_DIN6, DA850_VPIF_DIN7, | ||
649 | DA850_VPIF_DIN8, DA850_VPIF_DIN9, DA850_VPIF_DIN10, DA850_VPIF_DIN11, | ||
650 | DA850_VPIF_DIN12, DA850_VPIF_DIN13, DA850_VPIF_DIN14, DA850_VPIF_DIN15, | ||
651 | DA850_VPIF_CLKIN0, DA850_VPIF_CLKIN1, DA850_VPIF_CLKIN2, | ||
652 | DA850_VPIF_CLKIN3, | ||
653 | -1 | ||
654 | }; | ||
655 | |||
656 | const short da850_vpif_display_pins[] __initdata = { | ||
657 | DA850_VPIF_DOUT0, DA850_VPIF_DOUT1, DA850_VPIF_DOUT2, DA850_VPIF_DOUT3, | ||
658 | DA850_VPIF_DOUT4, DA850_VPIF_DOUT5, DA850_VPIF_DOUT6, DA850_VPIF_DOUT7, | ||
659 | DA850_VPIF_DOUT8, DA850_VPIF_DOUT9, DA850_VPIF_DOUT10, | ||
660 | DA850_VPIF_DOUT11, DA850_VPIF_DOUT12, DA850_VPIF_DOUT13, | ||
661 | DA850_VPIF_DOUT14, DA850_VPIF_DOUT15, DA850_VPIF_CLKO2, | ||
662 | DA850_VPIF_CLKO3, | ||
663 | -1 | ||
664 | }; | ||
665 | |||
598 | /* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */ | 666 | /* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */ |
599 | static u8 da850_default_priorities[DA850_N_CP_INTC_IRQ] = { | 667 | static u8 da850_default_priorities[DA850_N_CP_INTC_IRQ] = { |
600 | [IRQ_DA8XX_COMMTX] = 7, | 668 | [IRQ_DA8XX_COMMTX] = 7, |
@@ -1064,6 +1132,90 @@ no_ddrpll_mem: | |||
1064 | return ret; | 1132 | return ret; |
1065 | } | 1133 | } |
1066 | 1134 | ||
1135 | /* VPIF resource, platform data */ | ||
1136 | static u64 da850_vpif_dma_mask = DMA_BIT_MASK(32); | ||
1137 | |||
1138 | static struct resource da850_vpif_resource[] = { | ||
1139 | { | ||
1140 | .start = DA8XX_VPIF_BASE, | ||
1141 | .end = DA8XX_VPIF_BASE + 0xfff, | ||
1142 | .flags = IORESOURCE_MEM, | ||
1143 | } | ||
1144 | }; | ||
1145 | |||
1146 | static struct platform_device da850_vpif_dev = { | ||
1147 | .name = "vpif", | ||
1148 | .id = -1, | ||
1149 | .dev = { | ||
1150 | .dma_mask = &da850_vpif_dma_mask, | ||
1151 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1152 | }, | ||
1153 | .resource = da850_vpif_resource, | ||
1154 | .num_resources = ARRAY_SIZE(da850_vpif_resource), | ||
1155 | }; | ||
1156 | |||
1157 | static struct resource da850_vpif_display_resource[] = { | ||
1158 | { | ||
1159 | .start = IRQ_DA850_VPIFINT, | ||
1160 | .end = IRQ_DA850_VPIFINT, | ||
1161 | .flags = IORESOURCE_IRQ, | ||
1162 | }, | ||
1163 | }; | ||
1164 | |||
1165 | static struct platform_device da850_vpif_display_dev = { | ||
1166 | .name = "vpif_display", | ||
1167 | .id = -1, | ||
1168 | .dev = { | ||
1169 | .dma_mask = &da850_vpif_dma_mask, | ||
1170 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1171 | }, | ||
1172 | .resource = da850_vpif_display_resource, | ||
1173 | .num_resources = ARRAY_SIZE(da850_vpif_display_resource), | ||
1174 | }; | ||
1175 | |||
1176 | static struct resource da850_vpif_capture_resource[] = { | ||
1177 | { | ||
1178 | .start = IRQ_DA850_VPIFINT, | ||
1179 | .end = IRQ_DA850_VPIFINT, | ||
1180 | .flags = IORESOURCE_IRQ, | ||
1181 | }, | ||
1182 | { | ||
1183 | .start = IRQ_DA850_VPIFINT, | ||
1184 | .end = IRQ_DA850_VPIFINT, | ||
1185 | .flags = IORESOURCE_IRQ, | ||
1186 | }, | ||
1187 | }; | ||
1188 | |||
1189 | static struct platform_device da850_vpif_capture_dev = { | ||
1190 | .name = "vpif_capture", | ||
1191 | .id = -1, | ||
1192 | .dev = { | ||
1193 | .dma_mask = &da850_vpif_dma_mask, | ||
1194 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1195 | }, | ||
1196 | .resource = da850_vpif_capture_resource, | ||
1197 | .num_resources = ARRAY_SIZE(da850_vpif_capture_resource), | ||
1198 | }; | ||
1199 | |||
1200 | int __init da850_register_vpif(void) | ||
1201 | { | ||
1202 | return platform_device_register(&da850_vpif_dev); | ||
1203 | } | ||
1204 | |||
1205 | int __init da850_register_vpif_display(struct vpif_display_config | ||
1206 | *display_config) | ||
1207 | { | ||
1208 | da850_vpif_display_dev.dev.platform_data = display_config; | ||
1209 | return platform_device_register(&da850_vpif_display_dev); | ||
1210 | } | ||
1211 | |||
1212 | int __init da850_register_vpif_capture(struct vpif_capture_config | ||
1213 | *capture_config) | ||
1214 | { | ||
1215 | da850_vpif_capture_dev.dev.platform_data = capture_config; | ||
1216 | return platform_device_register(&da850_vpif_capture_dev); | ||
1217 | } | ||
1218 | |||
1067 | static struct davinci_soc_info davinci_soc_info_da850 = { | 1219 | static struct davinci_soc_info davinci_soc_info_da850 = { |
1068 | .io_desc = da850_io_desc, | 1220 | .io_desc = da850_io_desc, |
1069 | .io_desc_num = ARRAY_SIZE(da850_io_desc), | 1221 | .io_desc_num = ARRAY_SIZE(da850_io_desc), |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 0755d466221..cd0c8b1e1ec 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -701,7 +701,7 @@ static struct resource dm644x_venc_resources[] = { | |||
701 | #define DM644X_VPSS_DACCLKEN BIT(4) | 701 | #define DM644X_VPSS_DACCLKEN BIT(4) |
702 | 702 | ||
703 | static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type, | 703 | static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type, |
704 | unsigned int mode) | 704 | unsigned int pclock) |
705 | { | 705 | { |
706 | int ret = 0; | 706 | int ret = 0; |
707 | u32 v = DM644X_VPSS_VENCLKEN; | 707 | u32 v = DM644X_VPSS_VENCLKEN; |
@@ -711,27 +711,18 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type, | |||
711 | v |= DM644X_VPSS_DACCLKEN; | 711 | v |= DM644X_VPSS_DACCLKEN; |
712 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); | 712 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); |
713 | break; | 713 | break; |
714 | case VPBE_ENC_DV_PRESET: | 714 | case VPBE_ENC_CUSTOM_TIMINGS: |
715 | switch (mode) { | 715 | if (pclock <= 27000000) { |
716 | case V4L2_DV_480P59_94: | ||
717 | case V4L2_DV_576P50: | ||
718 | v |= DM644X_VPSS_MUXSEL_PLL2_MODE | | 716 | v |= DM644X_VPSS_MUXSEL_PLL2_MODE | |
719 | DM644X_VPSS_DACCLKEN; | 717 | DM644X_VPSS_DACCLKEN; |
720 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); | 718 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); |
721 | break; | 719 | } else { |
722 | case V4L2_DV_720P60: | ||
723 | case V4L2_DV_1080I60: | ||
724 | case V4L2_DV_1080P30: | ||
725 | /* | 720 | /* |
726 | * For HD, use external clock source since | 721 | * For HD, use external clock source since |
727 | * HD requires higher clock rate | 722 | * HD requires higher clock rate |
728 | */ | 723 | */ |
729 | v |= DM644X_VPSS_MUXSEL_VPBECLK_MODE; | 724 | v |= DM644X_VPSS_MUXSEL_VPBECLK_MODE; |
730 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); | 725 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); |
731 | break; | ||
732 | default: | ||
733 | ret = -EINVAL; | ||
734 | break; | ||
735 | } | 726 | } |
736 | break; | 727 | break; |
737 | default: | 728 | default: |
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index c9ee723c56f..aaccdc4528f 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/davinci_emac.h> | 17 | #include <linux/davinci_emac.h> |
18 | #include <linux/spi/spi.h> | 18 | #include <linux/spi/spi.h> |
19 | #include <linux/platform_data/davinci_asp.h> | 19 | #include <linux/platform_data/davinci_asp.h> |
20 | #include <linux/videodev2.h> | ||
20 | 21 | ||
21 | #include <mach/serial.h> | 22 | #include <mach/serial.h> |
22 | #include <mach/edma.h> | 23 | #include <mach/edma.h> |
@@ -26,6 +27,8 @@ | |||
26 | #include <linux/platform_data/usb-davinci.h> | 27 | #include <linux/platform_data/usb-davinci.h> |
27 | #include <linux/platform_data/spi-davinci.h> | 28 | #include <linux/platform_data/spi-davinci.h> |
28 | 29 | ||
30 | #include <media/davinci/vpif_types.h> | ||
31 | |||
29 | extern void __iomem *da8xx_syscfg0_base; | 32 | extern void __iomem *da8xx_syscfg0_base; |
30 | extern void __iomem *da8xx_syscfg1_base; | 33 | extern void __iomem *da8xx_syscfg1_base; |
31 | 34 | ||
@@ -63,6 +66,7 @@ extern unsigned int da850_max_speed; | |||
63 | #define DA8XX_PLL0_BASE 0x01c11000 | 66 | #define DA8XX_PLL0_BASE 0x01c11000 |
64 | #define DA8XX_TIMER64P0_BASE 0x01c20000 | 67 | #define DA8XX_TIMER64P0_BASE 0x01c20000 |
65 | #define DA8XX_TIMER64P1_BASE 0x01c21000 | 68 | #define DA8XX_TIMER64P1_BASE 0x01c21000 |
69 | #define DA8XX_VPIF_BASE 0x01e17000 | ||
66 | #define DA8XX_GPIO_BASE 0x01e26000 | 70 | #define DA8XX_GPIO_BASE 0x01e26000 |
67 | #define DA8XX_PSC1_BASE 0x01e27000 | 71 | #define DA8XX_PSC1_BASE 0x01e27000 |
68 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 | 72 | #define DA8XX_AEMIF_CS2_BASE 0x60000000 |
@@ -92,6 +96,11 @@ int da8xx_register_cpuidle(void); | |||
92 | void __iomem * __init da8xx_get_mem_ctlr(void); | 96 | void __iomem * __init da8xx_get_mem_ctlr(void); |
93 | int da850_register_pm(struct platform_device *pdev); | 97 | int da850_register_pm(struct platform_device *pdev); |
94 | int __init da850_register_sata(unsigned long refclkpn); | 98 | int __init da850_register_sata(unsigned long refclkpn); |
99 | int __init da850_register_vpif(void); | ||
100 | int __init da850_register_vpif_display | ||
101 | (struct vpif_display_config *display_config); | ||
102 | int __init da850_register_vpif_capture | ||
103 | (struct vpif_capture_config *capture_config); | ||
95 | void da8xx_restart(char mode, const char *cmd); | 104 | void da8xx_restart(char mode, const char *cmd); |
96 | 105 | ||
97 | extern struct platform_device da8xx_serial_device; | 106 | extern struct platform_device da8xx_serial_device; |
@@ -126,6 +135,8 @@ extern const short da830_ecap1_pins[]; | |||
126 | extern const short da830_ecap2_pins[]; | 135 | extern const short da830_ecap2_pins[]; |
127 | extern const short da830_eqep0_pins[]; | 136 | extern const short da830_eqep0_pins[]; |
128 | extern const short da830_eqep1_pins[]; | 137 | extern const short da830_eqep1_pins[]; |
138 | extern const short da850_vpif_capture_pins[]; | ||
139 | extern const short da850_vpif_display_pins[]; | ||
129 | 140 | ||
130 | extern const short da850_i2c0_pins[]; | 141 | extern const short da850_i2c0_pins[]; |
131 | extern const short da850_i2c1_pins[]; | 142 | extern const short da850_i2c1_pins[]; |
diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h index a7e92fca32e..9e95b8a1edb 100644 --- a/arch/arm/mach-davinci/include/mach/mux.h +++ b/arch/arm/mach-davinci/include/mach/mux.h | |||
@@ -928,6 +928,48 @@ enum davinci_da850_index { | |||
928 | DA850_GPIO6_10, | 928 | DA850_GPIO6_10, |
929 | DA850_GPIO6_13, | 929 | DA850_GPIO6_13, |
930 | DA850_RTC_ALARM, | 930 | DA850_RTC_ALARM, |
931 | |||
932 | /* VPIF Capture */ | ||
933 | DA850_VPIF_DIN0, | ||
934 | DA850_VPIF_DIN1, | ||
935 | DA850_VPIF_DIN2, | ||
936 | DA850_VPIF_DIN3, | ||
937 | DA850_VPIF_DIN4, | ||
938 | DA850_VPIF_DIN5, | ||
939 | DA850_VPIF_DIN6, | ||
940 | DA850_VPIF_DIN7, | ||
941 | DA850_VPIF_DIN8, | ||
942 | DA850_VPIF_DIN9, | ||
943 | DA850_VPIF_DIN10, | ||
944 | DA850_VPIF_DIN11, | ||
945 | DA850_VPIF_DIN12, | ||
946 | DA850_VPIF_DIN13, | ||
947 | DA850_VPIF_DIN14, | ||
948 | DA850_VPIF_DIN15, | ||
949 | DA850_VPIF_CLKIN0, | ||
950 | DA850_VPIF_CLKIN1, | ||
951 | DA850_VPIF_CLKIN2, | ||
952 | DA850_VPIF_CLKIN3, | ||
953 | |||
954 | /* VPIF Display */ | ||
955 | DA850_VPIF_DOUT0, | ||
956 | DA850_VPIF_DOUT1, | ||
957 | DA850_VPIF_DOUT2, | ||
958 | DA850_VPIF_DOUT3, | ||
959 | DA850_VPIF_DOUT4, | ||
960 | DA850_VPIF_DOUT5, | ||
961 | DA850_VPIF_DOUT6, | ||
962 | DA850_VPIF_DOUT7, | ||
963 | DA850_VPIF_DOUT8, | ||
964 | DA850_VPIF_DOUT9, | ||
965 | DA850_VPIF_DOUT10, | ||
966 | DA850_VPIF_DOUT11, | ||
967 | DA850_VPIF_DOUT12, | ||
968 | DA850_VPIF_DOUT13, | ||
969 | DA850_VPIF_DOUT14, | ||
970 | DA850_VPIF_DOUT15, | ||
971 | DA850_VPIF_CLKO2, | ||
972 | DA850_VPIF_CLKO3, | ||
931 | }; | 973 | }; |
932 | 974 | ||
933 | enum davinci_tnetv107x_index { | 975 | enum davinci_tnetv107x_index { |
diff --git a/arch/arm/mach-davinci/include/mach/psc.h b/arch/arm/mach-davinci/include/mach/psc.h index 405318e35bf..40a0027838e 100644 --- a/arch/arm/mach-davinci/include/mach/psc.h +++ b/arch/arm/mach-davinci/include/mach/psc.h | |||
@@ -166,6 +166,7 @@ | |||
166 | #define DA830_LPSC1_McASP1 8 | 166 | #define DA830_LPSC1_McASP1 8 |
167 | #define DA850_LPSC1_SATA 8 | 167 | #define DA850_LPSC1_SATA 8 |
168 | #define DA830_LPSC1_McASP2 9 | 168 | #define DA830_LPSC1_McASP2 9 |
169 | #define DA850_LPSC1_VPIF 9 | ||
169 | #define DA8XX_LPSC1_SPI1 10 | 170 | #define DA8XX_LPSC1_SPI1 10 |
170 | #define DA8XX_LPSC1_I2C 11 | 171 | #define DA8XX_LPSC1_I2C 11 |
171 | #define DA8XX_LPSC1_UART1 12 | 172 | #define DA8XX_LPSC1_UART1 12 |
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 4372075c551..da55107033d 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
@@ -31,11 +31,11 @@ config CPU_EXYNOS4210 | |||
31 | bool "SAMSUNG EXYNOS4210" | 31 | bool "SAMSUNG EXYNOS4210" |
32 | default y | 32 | default y |
33 | depends on ARCH_EXYNOS4 | 33 | depends on ARCH_EXYNOS4 |
34 | select SAMSUNG_DMADEV | ||
35 | select ARM_CPU_SUSPEND if PM | 34 | select ARM_CPU_SUSPEND if PM |
35 | select PM_GENERIC_DOMAINS | ||
36 | select S5P_PM if PM | 36 | select S5P_PM if PM |
37 | select S5P_SLEEP if PM | 37 | select S5P_SLEEP if PM |
38 | select PM_GENERIC_DOMAINS | 38 | select SAMSUNG_DMADEV |
39 | help | 39 | help |
40 | Enable EXYNOS4210 CPU support | 40 | Enable EXYNOS4210 CPU support |
41 | 41 | ||
@@ -43,9 +43,9 @@ config SOC_EXYNOS4212 | |||
43 | bool "SAMSUNG EXYNOS4212" | 43 | bool "SAMSUNG EXYNOS4212" |
44 | default y | 44 | default y |
45 | depends on ARCH_EXYNOS4 | 45 | depends on ARCH_EXYNOS4 |
46 | select SAMSUNG_DMADEV | ||
47 | select S5P_PM if PM | 46 | select S5P_PM if PM |
48 | select S5P_SLEEP if PM | 47 | select S5P_SLEEP if PM |
48 | select SAMSUNG_DMADEV | ||
49 | help | 49 | help |
50 | Enable EXYNOS4212 SoC support | 50 | Enable EXYNOS4212 SoC support |
51 | 51 | ||
@@ -61,9 +61,9 @@ config SOC_EXYNOS5250 | |||
61 | bool "SAMSUNG EXYNOS5250" | 61 | bool "SAMSUNG EXYNOS5250" |
62 | default y | 62 | default y |
63 | depends on ARCH_EXYNOS5 | 63 | depends on ARCH_EXYNOS5 |
64 | select SAMSUNG_DMADEV | ||
65 | select S5P_PM if PM | 64 | select S5P_PM if PM |
66 | select S5P_SLEEP if PM | 65 | select S5P_SLEEP if PM |
66 | select SAMSUNG_DMADEV | ||
67 | help | 67 | help |
68 | Enable EXYNOS5250 SoC support | 68 | Enable EXYNOS5250 SoC support |
69 | 69 | ||
@@ -189,71 +189,71 @@ config MACH_SMDKC210 | |||
189 | config MACH_SMDKV310 | 189 | config MACH_SMDKV310 |
190 | bool "SMDKV310" | 190 | bool "SMDKV310" |
191 | select CPU_EXYNOS4210 | 191 | select CPU_EXYNOS4210 |
192 | select S5P_DEV_FIMD0 | 192 | select EXYNOS4_DEV_AHCI |
193 | select EXYNOS4_DEV_USB_OHCI | ||
194 | select EXYNOS4_SETUP_FIMD0 | ||
195 | select EXYNOS4_SETUP_I2C1 | ||
196 | select EXYNOS4_SETUP_KEYPAD | ||
197 | select EXYNOS4_SETUP_SDHCI | ||
198 | select EXYNOS4_SETUP_USB_PHY | ||
199 | select EXYNOS_DEV_DMA | ||
200 | select EXYNOS_DEV_DRM | ||
201 | select EXYNOS_DEV_SYSMMU | ||
202 | select S3C24XX_PWM | ||
203 | select S3C_DEV_HSMMC | ||
204 | select S3C_DEV_HSMMC1 | ||
205 | select S3C_DEV_HSMMC2 | ||
206 | select S3C_DEV_HSMMC3 | ||
207 | select S3C_DEV_I2C1 | ||
193 | select S3C_DEV_RTC | 208 | select S3C_DEV_RTC |
209 | select S3C_DEV_USB_HSOTG | ||
194 | select S3C_DEV_WDT | 210 | select S3C_DEV_WDT |
195 | select S3C_DEV_I2C1 | ||
196 | select S5P_DEV_FIMC0 | 211 | select S5P_DEV_FIMC0 |
197 | select S5P_DEV_FIMC1 | 212 | select S5P_DEV_FIMC1 |
198 | select S5P_DEV_FIMC2 | 213 | select S5P_DEV_FIMC2 |
199 | select S5P_DEV_FIMC3 | 214 | select S5P_DEV_FIMC3 |
215 | select S5P_DEV_FIMD0 | ||
200 | select S5P_DEV_G2D | 216 | select S5P_DEV_G2D |
201 | select S5P_DEV_I2C_HDMIPHY | 217 | select S5P_DEV_I2C_HDMIPHY |
202 | select S5P_DEV_JPEG | 218 | select S5P_DEV_JPEG |
203 | select S5P_DEV_MFC | 219 | select S5P_DEV_MFC |
204 | select S5P_DEV_TV | 220 | select S5P_DEV_TV |
205 | select S5P_DEV_USB_EHCI | 221 | select S5P_DEV_USB_EHCI |
206 | select S3C_DEV_HSMMC | ||
207 | select S3C_DEV_HSMMC1 | ||
208 | select S3C_DEV_HSMMC2 | ||
209 | select S3C_DEV_HSMMC3 | ||
210 | select S3C_DEV_USB_HSOTG | ||
211 | select SAMSUNG_DEV_BACKLIGHT | 222 | select SAMSUNG_DEV_BACKLIGHT |
212 | select EXYNOS_DEV_DRM | ||
213 | select EXYNOS_DEV_SYSMMU | ||
214 | select EXYNOS4_DEV_AHCI | ||
215 | select SAMSUNG_DEV_KEYPAD | 223 | select SAMSUNG_DEV_KEYPAD |
216 | select EXYNOS_DEV_DMA | ||
217 | select SAMSUNG_DEV_PWM | 224 | select SAMSUNG_DEV_PWM |
218 | select EXYNOS4_DEV_USB_OHCI | ||
219 | select EXYNOS4_SETUP_FIMD0 | ||
220 | select EXYNOS4_SETUP_I2C1 | ||
221 | select EXYNOS4_SETUP_KEYPAD | ||
222 | select EXYNOS4_SETUP_SDHCI | ||
223 | select EXYNOS4_SETUP_USB_PHY | ||
224 | select S3C24XX_PWM | ||
225 | help | 225 | help |
226 | Machine support for Samsung SMDKV310 | 226 | Machine support for Samsung SMDKV310 |
227 | 227 | ||
228 | config MACH_ARMLEX4210 | 228 | config MACH_ARMLEX4210 |
229 | bool "ARMLEX4210" | 229 | bool "ARMLEX4210" |
230 | select CPU_EXYNOS4210 | 230 | select CPU_EXYNOS4210 |
231 | select S3C_DEV_RTC | 231 | select EXYNOS4_DEV_AHCI |
232 | select S3C_DEV_WDT | 232 | select EXYNOS4_SETUP_SDHCI |
233 | select EXYNOS_DEV_DMA | ||
233 | select S3C_DEV_HSMMC | 234 | select S3C_DEV_HSMMC |
234 | select S3C_DEV_HSMMC2 | 235 | select S3C_DEV_HSMMC2 |
235 | select S3C_DEV_HSMMC3 | 236 | select S3C_DEV_HSMMC3 |
236 | select EXYNOS4_DEV_AHCI | 237 | select S3C_DEV_RTC |
237 | select EXYNOS_DEV_DMA | 238 | select S3C_DEV_WDT |
238 | select EXYNOS4_SETUP_SDHCI | ||
239 | help | 239 | help |
240 | Machine support for Samsung ARMLEX4210 based on EXYNOS4210 | 240 | Machine support for Samsung ARMLEX4210 based on EXYNOS4210 |
241 | 241 | ||
242 | config MACH_UNIVERSAL_C210 | 242 | config MACH_UNIVERSAL_C210 |
243 | bool "Mobile UNIVERSAL_C210 Board" | 243 | bool "Mobile UNIVERSAL_C210 Board" |
244 | select CPU_EXYNOS4210 | ||
245 | select S5P_HRT | ||
246 | select CLKSRC_MMIO | 244 | select CLKSRC_MMIO |
245 | select CPU_EXYNOS4210 | ||
246 | select EXYNOS4_SETUP_FIMC | ||
247 | select EXYNOS4_SETUP_FIMD0 | ||
248 | select EXYNOS4_SETUP_I2C1 | ||
249 | select EXYNOS4_SETUP_I2C3 | ||
250 | select EXYNOS4_SETUP_I2C5 | ||
251 | select EXYNOS4_SETUP_SDHCI | ||
252 | select EXYNOS4_SETUP_USB_PHY | ||
253 | select EXYNOS_DEV_DMA | ||
254 | select EXYNOS_DEV_DRM | ||
255 | select EXYNOS_DEV_SYSMMU | ||
247 | select HAVE_SCHED_CLOCK | 256 | select HAVE_SCHED_CLOCK |
248 | select S5P_GPIO_INT | ||
249 | select S5P_DEV_FIMC0 | ||
250 | select S5P_DEV_FIMC1 | ||
251 | select S5P_DEV_FIMC2 | ||
252 | select S5P_DEV_FIMC3 | ||
253 | select S5P_DEV_G2D | ||
254 | select S5P_DEV_CSIS0 | ||
255 | select S5P_DEV_JPEG | ||
256 | select S5P_DEV_FIMD0 | ||
257 | select S3C_DEV_HSMMC | 257 | select S3C_DEV_HSMMC |
258 | select S3C_DEV_HSMMC2 | 258 | select S3C_DEV_HSMMC2 |
259 | select S3C_DEV_HSMMC3 | 259 | select S3C_DEV_HSMMC3 |
@@ -261,21 +261,21 @@ config MACH_UNIVERSAL_C210 | |||
261 | select S3C_DEV_I2C3 | 261 | select S3C_DEV_I2C3 |
262 | select S3C_DEV_I2C5 | 262 | select S3C_DEV_I2C5 |
263 | select S3C_DEV_USB_HSOTG | 263 | select S3C_DEV_USB_HSOTG |
264 | select S5P_DEV_CSIS0 | ||
265 | select S5P_DEV_FIMC0 | ||
266 | select S5P_DEV_FIMC1 | ||
267 | select S5P_DEV_FIMC2 | ||
268 | select S5P_DEV_FIMC3 | ||
269 | select S5P_DEV_FIMD0 | ||
270 | select S5P_DEV_G2D | ||
264 | select S5P_DEV_I2C_HDMIPHY | 271 | select S5P_DEV_I2C_HDMIPHY |
272 | select S5P_DEV_JPEG | ||
265 | select S5P_DEV_MFC | 273 | select S5P_DEV_MFC |
266 | select S5P_DEV_ONENAND | 274 | select S5P_DEV_ONENAND |
267 | select S5P_DEV_TV | 275 | select S5P_DEV_TV |
268 | select EXYNOS_DEV_SYSMMU | 276 | select S5P_GPIO_INT |
269 | select EXYNOS_DEV_DMA | 277 | select S5P_HRT |
270 | select EXYNOS_DEV_DRM | ||
271 | select EXYNOS4_SETUP_FIMD0 | ||
272 | select EXYNOS4_SETUP_I2C1 | ||
273 | select EXYNOS4_SETUP_I2C3 | ||
274 | select EXYNOS4_SETUP_I2C5 | ||
275 | select EXYNOS4_SETUP_SDHCI | ||
276 | select EXYNOS4_SETUP_FIMC | ||
277 | select S5P_SETUP_MIPIPHY | 278 | select S5P_SETUP_MIPIPHY |
278 | select EXYNOS4_SETUP_USB_PHY | ||
279 | help | 279 | help |
280 | Machine support for Samsung Mobile Universal S5PC210 Reference | 280 | Machine support for Samsung Mobile Universal S5PC210 Reference |
281 | Board. | 281 | Board. |
@@ -283,10 +283,16 @@ config MACH_UNIVERSAL_C210 | |||
283 | config MACH_NURI | 283 | config MACH_NURI |
284 | bool "Mobile NURI Board" | 284 | bool "Mobile NURI Board" |
285 | select CPU_EXYNOS4210 | 285 | select CPU_EXYNOS4210 |
286 | select S5P_GPIO_INT | 286 | select EXYNOS4_SETUP_FIMC |
287 | select S3C_DEV_WDT | 287 | select EXYNOS4_SETUP_FIMD0 |
288 | select S3C_DEV_RTC | 288 | select EXYNOS4_SETUP_I2C1 |
289 | select S5P_DEV_FIMD0 | 289 | select EXYNOS4_SETUP_I2C3 |
290 | select EXYNOS4_SETUP_I2C5 | ||
291 | select EXYNOS4_SETUP_I2C6 | ||
292 | select EXYNOS4_SETUP_SDHCI | ||
293 | select EXYNOS4_SETUP_USB_PHY | ||
294 | select EXYNOS_DEV_DMA | ||
295 | select EXYNOS_DEV_DRM | ||
290 | select S3C_DEV_HSMMC | 296 | select S3C_DEV_HSMMC |
291 | select S3C_DEV_HSMMC2 | 297 | select S3C_DEV_HSMMC2 |
292 | select S3C_DEV_HSMMC3 | 298 | select S3C_DEV_HSMMC3 |
@@ -294,41 +300,42 @@ config MACH_NURI | |||
294 | select S3C_DEV_I2C3 | 300 | select S3C_DEV_I2C3 |
295 | select S3C_DEV_I2C5 | 301 | select S3C_DEV_I2C5 |
296 | select S3C_DEV_I2C6 | 302 | select S3C_DEV_I2C6 |
303 | select S3C_DEV_RTC | ||
297 | select S3C_DEV_USB_HSOTG | 304 | select S3C_DEV_USB_HSOTG |
305 | select S3C_DEV_WDT | ||
298 | select S5P_DEV_CSIS0 | 306 | select S5P_DEV_CSIS0 |
299 | select S5P_DEV_JPEG | ||
300 | select S5P_DEV_FIMC0 | 307 | select S5P_DEV_FIMC0 |
301 | select S5P_DEV_FIMC1 | 308 | select S5P_DEV_FIMC1 |
302 | select S5P_DEV_FIMC2 | 309 | select S5P_DEV_FIMC2 |
303 | select S5P_DEV_FIMC3 | 310 | select S5P_DEV_FIMC3 |
311 | select S5P_DEV_FIMD0 | ||
304 | select S5P_DEV_G2D | 312 | select S5P_DEV_G2D |
313 | select S5P_DEV_JPEG | ||
305 | select S5P_DEV_MFC | 314 | select S5P_DEV_MFC |
306 | select S5P_DEV_USB_EHCI | 315 | select S5P_DEV_USB_EHCI |
316 | select S5P_GPIO_INT | ||
307 | select S5P_SETUP_MIPIPHY | 317 | select S5P_SETUP_MIPIPHY |
308 | select EXYNOS_DEV_DMA | ||
309 | select EXYNOS_DEV_DRM | ||
310 | select EXYNOS4_SETUP_FIMC | ||
311 | select EXYNOS4_SETUP_FIMD0 | ||
312 | select EXYNOS4_SETUP_I2C1 | ||
313 | select EXYNOS4_SETUP_I2C3 | ||
314 | select EXYNOS4_SETUP_I2C5 | ||
315 | select EXYNOS4_SETUP_I2C6 | ||
316 | select EXYNOS4_SETUP_SDHCI | ||
317 | select EXYNOS4_SETUP_USB_PHY | ||
318 | select S5P_SETUP_MIPIPHY | ||
319 | select SAMSUNG_DEV_PWM | ||
320 | select SAMSUNG_DEV_ADC | 318 | select SAMSUNG_DEV_ADC |
319 | select SAMSUNG_DEV_PWM | ||
321 | help | 320 | help |
322 | Machine support for Samsung Mobile NURI Board. | 321 | Machine support for Samsung Mobile NURI Board. |
323 | 322 | ||
324 | config MACH_ORIGEN | 323 | config MACH_ORIGEN |
325 | bool "ORIGEN" | 324 | bool "ORIGEN" |
326 | select CPU_EXYNOS4210 | 325 | select CPU_EXYNOS4210 |
327 | select S3C_DEV_RTC | 326 | select EXYNOS4_DEV_USB_OHCI |
328 | select S3C_DEV_WDT | 327 | select EXYNOS4_SETUP_FIMD0 |
328 | select EXYNOS4_SETUP_SDHCI | ||
329 | select EXYNOS4_SETUP_USB_PHY | ||
330 | select EXYNOS_DEV_DMA | ||
331 | select EXYNOS_DEV_DRM | ||
332 | select EXYNOS_DEV_SYSMMU | ||
333 | select S3C24XX_PWM | ||
329 | select S3C_DEV_HSMMC | 334 | select S3C_DEV_HSMMC |
330 | select S3C_DEV_HSMMC2 | 335 | select S3C_DEV_HSMMC2 |
336 | select S3C_DEV_RTC | ||
331 | select S3C_DEV_USB_HSOTG | 337 | select S3C_DEV_USB_HSOTG |
338 | select S3C_DEV_WDT | ||
332 | select S5P_DEV_FIMC0 | 339 | select S5P_DEV_FIMC0 |
333 | select S5P_DEV_FIMC1 | 340 | select S5P_DEV_FIMC1 |
334 | select S5P_DEV_FIMC2 | 341 | select S5P_DEV_FIMC2 |
@@ -342,14 +349,6 @@ config MACH_ORIGEN | |||
342 | select S5P_DEV_USB_EHCI | 349 | select S5P_DEV_USB_EHCI |
343 | select SAMSUNG_DEV_BACKLIGHT | 350 | select SAMSUNG_DEV_BACKLIGHT |
344 | select SAMSUNG_DEV_PWM | 351 | select SAMSUNG_DEV_PWM |
345 | select EXYNOS_DEV_DRM | ||
346 | select EXYNOS_DEV_SYSMMU | ||
347 | select EXYNOS_DEV_DMA | ||
348 | select EXYNOS4_DEV_USB_OHCI | ||
349 | select EXYNOS4_SETUP_FIMD0 | ||
350 | select EXYNOS4_SETUP_SDHCI | ||
351 | select EXYNOS4_SETUP_USB_PHY | ||
352 | select S3C24XX_PWM | ||
353 | help | 352 | help |
354 | Machine support for ORIGEN based on Samsung EXYNOS4210 | 353 | Machine support for ORIGEN based on Samsung EXYNOS4210 |
355 | 354 | ||
@@ -357,7 +356,17 @@ comment "EXYNOS4212 Boards" | |||
357 | 356 | ||
358 | config MACH_SMDK4212 | 357 | config MACH_SMDK4212 |
359 | bool "SMDK4212" | 358 | bool "SMDK4212" |
360 | select SOC_EXYNOS4212 | 359 | select EXYNOS4_SETUP_FIMD0 |
360 | select EXYNOS4_SETUP_I2C1 | ||
361 | select EXYNOS4_SETUP_I2C3 | ||
362 | select EXYNOS4_SETUP_I2C7 | ||
363 | select EXYNOS4_SETUP_KEYPAD | ||
364 | select EXYNOS4_SETUP_SDHCI | ||
365 | select EXYNOS4_SETUP_USB_PHY | ||
366 | select EXYNOS_DEV_DMA | ||
367 | select EXYNOS_DEV_DRM | ||
368 | select EXYNOS_DEV_SYSMMU | ||
369 | select S3C24XX_PWM | ||
361 | select S3C_DEV_HSMMC2 | 370 | select S3C_DEV_HSMMC2 |
362 | select S3C_DEV_HSMMC3 | 371 | select S3C_DEV_HSMMC3 |
363 | select S3C_DEV_I2C1 | 372 | select S3C_DEV_I2C1 |
@@ -375,17 +384,7 @@ config MACH_SMDK4212 | |||
375 | select SAMSUNG_DEV_BACKLIGHT | 384 | select SAMSUNG_DEV_BACKLIGHT |
376 | select SAMSUNG_DEV_KEYPAD | 385 | select SAMSUNG_DEV_KEYPAD |
377 | select SAMSUNG_DEV_PWM | 386 | select SAMSUNG_DEV_PWM |
378 | select EXYNOS_DEV_SYSMMU | 387 | select SOC_EXYNOS4212 |
379 | select EXYNOS_DEV_DMA | ||
380 | select EXYNOS_DEV_DRM | ||
381 | select EXYNOS4_SETUP_FIMD0 | ||
382 | select EXYNOS4_SETUP_I2C1 | ||
383 | select EXYNOS4_SETUP_I2C3 | ||
384 | select EXYNOS4_SETUP_I2C7 | ||
385 | select EXYNOS4_SETUP_KEYPAD | ||
386 | select EXYNOS4_SETUP_SDHCI | ||
387 | select EXYNOS4_SETUP_USB_PHY | ||
388 | select S3C24XX_PWM | ||
389 | help | 388 | help |
390 | Machine support for Samsung SMDK4212 | 389 | Machine support for Samsung SMDK4212 |
391 | 390 | ||
@@ -393,8 +392,8 @@ comment "EXYNOS4412 Boards" | |||
393 | 392 | ||
394 | config MACH_SMDK4412 | 393 | config MACH_SMDK4412 |
395 | bool "SMDK4412" | 394 | bool "SMDK4412" |
396 | select SOC_EXYNOS4412 | ||
397 | select MACH_SMDK4212 | 395 | select MACH_SMDK4212 |
396 | select SOC_EXYNOS4412 | ||
398 | help | 397 | help |
399 | Machine support for Samsung SMDK4412 | 398 | Machine support for Samsung SMDK4412 |
400 | endif | 399 | endif |
@@ -404,12 +403,12 @@ comment "Flattened Device Tree based board for EXYNOS SoCs" | |||
404 | config MACH_EXYNOS4_DT | 403 | config MACH_EXYNOS4_DT |
405 | bool "Samsung Exynos4 Machine using device tree" | 404 | bool "Samsung Exynos4 Machine using device tree" |
406 | depends on ARCH_EXYNOS4 | 405 | depends on ARCH_EXYNOS4 |
407 | select CPU_EXYNOS4210 | ||
408 | select USE_OF | ||
409 | select ARM_AMBA | 406 | select ARM_AMBA |
407 | select CPU_EXYNOS4210 | ||
410 | select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD | 408 | select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD |
411 | select PINCTRL | 409 | select PINCTRL |
412 | select PINCTRL_EXYNOS4 | 410 | select PINCTRL_EXYNOS4 |
411 | select USE_OF | ||
413 | help | 412 | help |
414 | Machine support for Samsung Exynos4 machine with device tree enabled. | 413 | Machine support for Samsung Exynos4 machine with device tree enabled. |
415 | Select this if a fdt blob is available for the Exynos4 SoC based board. | 414 | Select this if a fdt blob is available for the Exynos4 SoC based board. |
@@ -419,9 +418,9 @@ config MACH_EXYNOS4_DT | |||
419 | config MACH_EXYNOS5_DT | 418 | config MACH_EXYNOS5_DT |
420 | bool "SAMSUNG EXYNOS5 Machine using device tree" | 419 | bool "SAMSUNG EXYNOS5 Machine using device tree" |
421 | depends on ARCH_EXYNOS5 | 420 | depends on ARCH_EXYNOS5 |
421 | select ARM_AMBA | ||
422 | select SOC_EXYNOS5250 | 422 | select SOC_EXYNOS5250 |
423 | select USE_OF | 423 | select USE_OF |
424 | select ARM_AMBA | ||
425 | help | 424 | help |
426 | Machine support for Samsung EXYNOS5 machine with device tree enabled. | 425 | Machine support for Samsung EXYNOS5 machine with device tree enabled. |
427 | Select this if a fdt blob is available for the EXYNOS5 SoC based board. | 426 | Select this if a fdt blob is available for the EXYNOS5 SoC based board. |
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index 480cd78f192..c05d7aa8403 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <drm/exynos_drm.h> | 29 | #include <drm/exynos_drm.h> |
30 | 30 | ||
31 | #include <video/platform_lcd.h> | 31 | #include <video/platform_lcd.h> |
32 | #include <video/samsung_fimd.h> | ||
32 | #include <media/m5mols.h> | 33 | #include <media/m5mols.h> |
33 | #include <media/s5k6aa.h> | 34 | #include <media/s5k6aa.h> |
34 | #include <media/s5p_fimc.h> | 35 | #include <media/s5p_fimc.h> |
@@ -39,7 +40,6 @@ | |||
39 | #include <asm/mach-types.h> | 40 | #include <asm/mach-types.h> |
40 | 41 | ||
41 | #include <plat/adc.h> | 42 | #include <plat/adc.h> |
42 | #include <plat/regs-fb-v4.h> | ||
43 | #include <plat/regs-serial.h> | 43 | #include <plat/regs-serial.h> |
44 | #include <plat/cpu.h> | 44 | #include <plat/cpu.h> |
45 | #include <plat/devs.h> | 45 | #include <plat/devs.h> |
@@ -378,10 +378,10 @@ static struct regulator_consumer_supply __initdata max8997_ldo1_[] = { | |||
378 | }; | 378 | }; |
379 | static struct regulator_consumer_supply __initdata max8997_ldo3_[] = { | 379 | static struct regulator_consumer_supply __initdata max8997_ldo3_[] = { |
380 | REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* USB */ | 380 | REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* USB */ |
381 | REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */ | 381 | REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */ |
382 | }; | 382 | }; |
383 | static struct regulator_consumer_supply __initdata max8997_ldo4_[] = { | 383 | static struct regulator_consumer_supply __initdata max8997_ldo4_[] = { |
384 | REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */ | 384 | REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */ |
385 | }; | 385 | }; |
386 | static struct regulator_consumer_supply __initdata max8997_ldo5_[] = { | 386 | static struct regulator_consumer_supply __initdata max8997_ldo5_[] = { |
387 | REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */ | 387 | REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */ |
@@ -1180,9 +1180,7 @@ static struct platform_device cam_8m_12v_fixed_rdev = { | |||
1180 | static struct s5p_platform_mipi_csis mipi_csis_platdata = { | 1180 | static struct s5p_platform_mipi_csis mipi_csis_platdata = { |
1181 | .clk_rate = 166000000UL, | 1181 | .clk_rate = 166000000UL, |
1182 | .lanes = 2, | 1182 | .lanes = 2, |
1183 | .alignment = 32, | ||
1184 | .hs_settle = 12, | 1183 | .hs_settle = 12, |
1185 | .phy_enable = s5p_csis_phy_enable, | ||
1186 | }; | 1184 | }; |
1187 | 1185 | ||
1188 | #define GPIO_CAM_MEGA_RST EXYNOS4_GPY3(7) /* ISP_RESET */ | 1186 | #define GPIO_CAM_MEGA_RST EXYNOS4_GPY3(7) /* ISP_RESET */ |
@@ -1226,7 +1224,6 @@ static struct s5p_fimc_isp_info nuri_camera_sensors[] = { | |||
1226 | .bus_type = FIMC_MIPI_CSI2, | 1224 | .bus_type = FIMC_MIPI_CSI2, |
1227 | .board_info = &m5mols_board_info, | 1225 | .board_info = &m5mols_board_info, |
1228 | .clk_frequency = 24000000UL, | 1226 | .clk_frequency = 24000000UL, |
1229 | .csi_data_align = 32, | ||
1230 | }, | 1227 | }, |
1231 | }; | 1228 | }; |
1232 | 1229 | ||
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index 67b50bb89c0..9adf491674e 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c | |||
@@ -30,9 +30,9 @@ | |||
30 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
31 | 31 | ||
32 | #include <video/platform_lcd.h> | 32 | #include <video/platform_lcd.h> |
33 | #include <video/samsung_fimd.h> | ||
33 | 34 | ||
34 | #include <plat/regs-serial.h> | 35 | #include <plat/regs-serial.h> |
35 | #include <plat/regs-fb-v4.h> | ||
36 | #include <plat/cpu.h> | 36 | #include <plat/cpu.h> |
37 | #include <plat/devs.h> | 37 | #include <plat/devs.h> |
38 | #include <plat/sdhci.h> | 38 | #include <plat/sdhci.h> |
@@ -97,12 +97,12 @@ static struct s3c2410_uartcfg origen_uartcfgs[] __initdata = { | |||
97 | }; | 97 | }; |
98 | 98 | ||
99 | static struct regulator_consumer_supply __initdata ldo3_consumer[] = { | 99 | static struct regulator_consumer_supply __initdata ldo3_consumer[] = { |
100 | REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */ | 100 | REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */ |
101 | REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */ | 101 | REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */ |
102 | REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */ | 102 | REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */ |
103 | }; | 103 | }; |
104 | static struct regulator_consumer_supply __initdata ldo6_consumer[] = { | 104 | static struct regulator_consumer_supply __initdata ldo6_consumer[] = { |
105 | REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */ | 105 | REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */ |
106 | }; | 106 | }; |
107 | static struct regulator_consumer_supply __initdata ldo7_consumer[] = { | 107 | static struct regulator_consumer_supply __initdata ldo7_consumer[] = { |
108 | REGULATOR_SUPPLY("avdd", "alc5625"), /* Realtek ALC5625 */ | 108 | REGULATOR_SUPPLY("avdd", "alc5625"), /* Realtek ALC5625 */ |
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index 7a265d1a82d..730f1ac6592 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/hardware/gic.h> | 27 | #include <asm/hardware/gic.h> |
28 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
29 | 29 | ||
30 | #include <video/samsung_fimd.h> | ||
30 | #include <plat/backlight.h> | 31 | #include <plat/backlight.h> |
31 | #include <plat/clock.h> | 32 | #include <plat/clock.h> |
32 | #include <plat/cpu.h> | 33 | #include <plat/cpu.h> |
@@ -36,7 +37,6 @@ | |||
36 | #include <linux/platform_data/i2c-s3c2410.h> | 37 | #include <linux/platform_data/i2c-s3c2410.h> |
37 | #include <plat/keypad.h> | 38 | #include <plat/keypad.h> |
38 | #include <plat/mfc.h> | 39 | #include <plat/mfc.h> |
39 | #include <plat/regs-fb.h> | ||
40 | #include <plat/regs-serial.h> | 40 | #include <plat/regs-serial.h> |
41 | #include <plat/sdhci.h> | 41 | #include <plat/sdhci.h> |
42 | 42 | ||
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index c15d2238ceb..ee4fb1a9cb7 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c | |||
@@ -27,9 +27,9 @@ | |||
27 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
28 | 28 | ||
29 | #include <video/platform_lcd.h> | 29 | #include <video/platform_lcd.h> |
30 | #include <video/samsung_fimd.h> | ||
30 | #include <plat/regs-serial.h> | 31 | #include <plat/regs-serial.h> |
31 | #include <plat/regs-srom.h> | 32 | #include <plat/regs-srom.h> |
32 | #include <plat/regs-fb-v4.h> | ||
33 | #include <plat/cpu.h> | 33 | #include <plat/cpu.h> |
34 | #include <plat/devs.h> | 34 | #include <plat/devs.h> |
35 | #include <plat/fb.h> | 35 | #include <plat/fb.h> |
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index 98d3aced228..ebc9dd339a3 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <asm/hardware/gic.h> | 30 | #include <asm/hardware/gic.h> |
31 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
32 | 32 | ||
33 | #include <video/samsung_fimd.h> | ||
33 | #include <plat/regs-serial.h> | 34 | #include <plat/regs-serial.h> |
34 | #include <plat/clock.h> | 35 | #include <plat/clock.h> |
35 | #include <plat/cpu.h> | 36 | #include <plat/cpu.h> |
@@ -39,7 +40,6 @@ | |||
39 | #include <plat/fb.h> | 40 | #include <plat/fb.h> |
40 | #include <plat/mfc.h> | 41 | #include <plat/mfc.h> |
41 | #include <plat/sdhci.h> | 42 | #include <plat/sdhci.h> |
42 | #include <plat/regs-fb-v4.h> | ||
43 | #include <plat/fimc-core.h> | 43 | #include <plat/fimc-core.h> |
44 | #include <plat/s5p-time.h> | 44 | #include <plat/s5p-time.h> |
45 | #include <plat/camport.h> | 45 | #include <plat/camport.h> |
@@ -209,7 +209,7 @@ static struct regulator_consumer_supply lp3974_ldo3_consumer[] = { | |||
209 | REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"), | 209 | REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"), |
210 | REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), | 210 | REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), |
211 | REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), | 211 | REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), |
212 | REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), | 212 | REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), |
213 | }; | 213 | }; |
214 | 214 | ||
215 | static struct regulator_init_data lp3974_ldo3_data = { | 215 | static struct regulator_init_data lp3974_ldo3_data = { |
@@ -273,7 +273,7 @@ static struct regulator_init_data lp3974_ldo6_data = { | |||
273 | }; | 273 | }; |
274 | 274 | ||
275 | static struct regulator_consumer_supply lp3974_ldo7_consumer[] = { | 275 | static struct regulator_consumer_supply lp3974_ldo7_consumer[] = { |
276 | REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), | 276 | REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), |
277 | }; | 277 | }; |
278 | 278 | ||
279 | static struct regulator_init_data lp3974_ldo7_data = { | 279 | static struct regulator_init_data lp3974_ldo7_data = { |
@@ -942,9 +942,7 @@ static struct platform_device cam_s_if_fixed_reg_dev = { | |||
942 | static struct s5p_platform_mipi_csis mipi_csis_platdata = { | 942 | static struct s5p_platform_mipi_csis mipi_csis_platdata = { |
943 | .clk_rate = 166000000UL, | 943 | .clk_rate = 166000000UL, |
944 | .lanes = 2, | 944 | .lanes = 2, |
945 | .alignment = 32, | ||
946 | .hs_settle = 12, | 945 | .hs_settle = 12, |
947 | .phy_enable = s5p_csis_phy_enable, | ||
948 | }; | 946 | }; |
949 | 947 | ||
950 | #define GPIO_CAM_LEVEL_EN(n) EXYNOS4_GPE4(n + 3) | 948 | #define GPIO_CAM_LEVEL_EN(n) EXYNOS4_GPE4(n + 3) |
@@ -1008,7 +1006,6 @@ static struct s5p_fimc_isp_info universal_camera_sensors[] = { | |||
1008 | .board_info = &m5mols_board_info, | 1006 | .board_info = &m5mols_board_info, |
1009 | .i2c_bus_num = 0, | 1007 | .i2c_bus_num = 0, |
1010 | .clk_frequency = 24000000UL, | 1008 | .clk_frequency = 24000000UL, |
1011 | .csi_data_align = 32, | ||
1012 | }, | 1009 | }, |
1013 | }; | 1010 | }; |
1014 | 1011 | ||
diff --git a/arch/arm/mach-exynos/setup-fimd0.c b/arch/arm/mach-exynos/setup-fimd0.c index 07a6dbeecdd..5665bb4e980 100644 --- a/arch/arm/mach-exynos/setup-fimd0.c +++ b/arch/arm/mach-exynos/setup-fimd0.c | |||
@@ -13,8 +13,8 @@ | |||
13 | #include <linux/fb.h> | 13 | #include <linux/fb.h> |
14 | #include <linux/gpio.h> | 14 | #include <linux/gpio.h> |
15 | 15 | ||
16 | #include <video/samsung_fimd.h> | ||
16 | #include <plat/gpio-cfg.h> | 17 | #include <plat/gpio-cfg.h> |
17 | #include <plat/regs-fb-v4.h> | ||
18 | 18 | ||
19 | #include <mach/map.h> | 19 | #include <mach/map.h> |
20 | 20 | ||
diff --git a/arch/arm/mach-footbridge/Kconfig b/arch/arm/mach-footbridge/Kconfig index f643ef819da..abda5a18a66 100644 --- a/arch/arm/mach-footbridge/Kconfig +++ b/arch/arm/mach-footbridge/Kconfig | |||
@@ -91,7 +91,7 @@ config FOOTBRIDGE_ADDIN | |||
91 | 91 | ||
92 | # EBSA285 board in either host or addin mode | 92 | # EBSA285 board in either host or addin mode |
93 | config ARCH_EBSA285 | 93 | config ARCH_EBSA285 |
94 | select ARCH_MAY_HAVE_PC_FDC | ||
95 | bool | 94 | bool |
95 | select ARCH_MAY_HAVE_PC_FDC | ||
96 | 96 | ||
97 | endif | 97 | endif |
diff --git a/arch/arm/mach-h720x/Kconfig b/arch/arm/mach-h720x/Kconfig index abf356c0234..6bb755bcb6f 100644 --- a/arch/arm/mach-h720x/Kconfig +++ b/arch/arm/mach-h720x/Kconfig | |||
@@ -12,9 +12,9 @@ config ARCH_H7201 | |||
12 | 12 | ||
13 | config ARCH_H7202 | 13 | config ARCH_H7202 |
14 | bool "hms30c7202" | 14 | bool "hms30c7202" |
15 | depends on ARCH_H720X | ||
15 | select CPU_H7202 | 16 | select CPU_H7202 |
16 | select ZONE_DMA | 17 | select ZONE_DMA |
17 | depends on ARCH_H720X | ||
18 | help | 18 | help |
19 | Say Y here if you are using the Hynix HMS30C7202 Reference Board | 19 | Say Y here if you are using the Hynix HMS30C7202 Reference Board |
20 | 20 | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 32197c117af..8d276584650 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -41,68 +41,68 @@ config SOC_IMX1 | |||
41 | 41 | ||
42 | config SOC_IMX21 | 42 | config SOC_IMX21 |
43 | bool | 43 | bool |
44 | select MACH_MX21 | ||
45 | select CPU_ARM926T | ||
46 | select COMMON_CLK | 44 | select COMMON_CLK |
45 | select CPU_ARM926T | ||
47 | select IMX_HAVE_IOMUX_V1 | 46 | select IMX_HAVE_IOMUX_V1 |
47 | select MACH_MX21 | ||
48 | select MXC_AVIC | 48 | select MXC_AVIC |
49 | 49 | ||
50 | config SOC_IMX25 | 50 | config SOC_IMX25 |
51 | bool | 51 | bool |
52 | select ARCH_MX25 | 52 | select ARCH_MX25 |
53 | select ARCH_MXC_IOMUX_V3 | ||
53 | select COMMON_CLK | 54 | select COMMON_CLK |
54 | select CPU_ARM926T | 55 | select CPU_ARM926T |
55 | select HAVE_CAN_FLEXCAN if CAN | 56 | select HAVE_CAN_FLEXCAN if CAN |
56 | select ARCH_MXC_IOMUX_V3 | ||
57 | select MXC_AVIC | 57 | select MXC_AVIC |
58 | 58 | ||
59 | config SOC_IMX27 | 59 | config SOC_IMX27 |
60 | bool | 60 | bool |
61 | select MACH_MX27 | ||
62 | select CPU_ARM926T | ||
63 | select COMMON_CLK | 61 | select COMMON_CLK |
62 | select CPU_ARM926T | ||
64 | select IMX_HAVE_IOMUX_V1 | 63 | select IMX_HAVE_IOMUX_V1 |
64 | select MACH_MX27 | ||
65 | select MXC_AVIC | 65 | select MXC_AVIC |
66 | 66 | ||
67 | config SOC_IMX31 | 67 | config SOC_IMX31 |
68 | bool | 68 | bool |
69 | select COMMON_CLK | ||
69 | select CPU_V6 | 70 | select CPU_V6 |
70 | select IMX_HAVE_PLATFORM_MXC_RNGA | 71 | select IMX_HAVE_PLATFORM_MXC_RNGA |
71 | select MXC_AVIC | 72 | select MXC_AVIC |
72 | select COMMON_CLK | ||
73 | select SMP_ON_UP if SMP | 73 | select SMP_ON_UP if SMP |
74 | 74 | ||
75 | config SOC_IMX35 | 75 | config SOC_IMX35 |
76 | bool | 76 | bool |
77 | select CPU_V6K | ||
78 | select ARCH_MXC_IOMUX_V3 | 77 | select ARCH_MXC_IOMUX_V3 |
79 | select COMMON_CLK | 78 | select COMMON_CLK |
79 | select CPU_V6K | ||
80 | select HAVE_CAN_FLEXCAN if CAN | ||
80 | select HAVE_EPIT | 81 | select HAVE_EPIT |
81 | select MXC_AVIC | 82 | select MXC_AVIC |
82 | select SMP_ON_UP if SMP | 83 | select SMP_ON_UP if SMP |
83 | select HAVE_CAN_FLEXCAN if CAN | ||
84 | 84 | ||
85 | config SOC_IMX5 | 85 | config SOC_IMX5 |
86 | select CPU_V7 | 86 | bool |
87 | select MXC_TZIC | ||
88 | select COMMON_CLK | ||
89 | select ARCH_MXC_IOMUX_V3 | ||
90 | select ARCH_HAS_CPUFREQ | 87 | select ARCH_HAS_CPUFREQ |
91 | select ARCH_MX5 | 88 | select ARCH_MX5 |
92 | bool | 89 | select ARCH_MXC_IOMUX_V3 |
90 | select COMMON_CLK | ||
91 | select CPU_V7 | ||
92 | select MXC_TZIC | ||
93 | 93 | ||
94 | config SOC_IMX50 | 94 | config SOC_IMX50 |
95 | bool | 95 | bool |
96 | select SOC_IMX5 | ||
97 | select ARCH_MX50 | 96 | select ARCH_MX50 |
97 | select SOC_IMX5 | ||
98 | 98 | ||
99 | config SOC_IMX51 | 99 | config SOC_IMX51 |
100 | bool | 100 | bool |
101 | select SOC_IMX5 | ||
102 | select ARCH_MX5 | 101 | select ARCH_MX5 |
103 | select ARCH_MX51 | 102 | select ARCH_MX51 |
104 | select PINCTRL | 103 | select PINCTRL |
105 | select PINCTRL_IMX51 | 104 | select PINCTRL_IMX51 |
105 | select SOC_IMX5 | ||
106 | 106 | ||
107 | if ARCH_IMX_V4_V5 | 107 | if ARCH_IMX_V4_V5 |
108 | 108 | ||
@@ -112,10 +112,10 @@ config MACH_MXLADS | |||
112 | 112 | ||
113 | config ARCH_MX1ADS | 113 | config ARCH_MX1ADS |
114 | bool "MX1ADS platform" | 114 | bool "MX1ADS platform" |
115 | select MACH_MXLADS | ||
116 | select SOC_IMX1 | ||
117 | select IMX_HAVE_PLATFORM_IMX_I2C | 115 | select IMX_HAVE_PLATFORM_IMX_I2C |
118 | select IMX_HAVE_PLATFORM_IMX_UART | 116 | select IMX_HAVE_PLATFORM_IMX_UART |
117 | select MACH_MXLADS | ||
118 | select SOC_IMX1 | ||
119 | help | 119 | help |
120 | Say Y here if you are using Motorola MX1ADS/MXLADS boards | 120 | Say Y here if you are using Motorola MX1ADS/MXLADS boards |
121 | 121 | ||
@@ -127,9 +127,9 @@ config MACH_SCB9328 | |||
127 | 127 | ||
128 | config MACH_APF9328 | 128 | config MACH_APF9328 |
129 | bool "APF9328" | 129 | bool "APF9328" |
130 | select SOC_IMX1 | ||
131 | select IMX_HAVE_PLATFORM_IMX_I2C | 130 | select IMX_HAVE_PLATFORM_IMX_I2C |
132 | select IMX_HAVE_PLATFORM_IMX_UART | 131 | select IMX_HAVE_PLATFORM_IMX_UART |
132 | select SOC_IMX1 | ||
133 | help | 133 | help |
134 | Say Yes here if you are using the Armadeus APF9328 development board | 134 | Say Yes here if you are using the Armadeus APF9328 development board |
135 | 135 | ||
@@ -137,11 +137,11 @@ comment "MX21 platforms:" | |||
137 | 137 | ||
138 | config MACH_MX21ADS | 138 | config MACH_MX21ADS |
139 | bool "MX21ADS platform" | 139 | bool "MX21ADS platform" |
140 | select SOC_IMX21 | ||
141 | select IMX_HAVE_PLATFORM_IMX_FB | 140 | select IMX_HAVE_PLATFORM_IMX_FB |
142 | select IMX_HAVE_PLATFORM_IMX_UART | 141 | select IMX_HAVE_PLATFORM_IMX_UART |
143 | select IMX_HAVE_PLATFORM_MXC_MMC | 142 | select IMX_HAVE_PLATFORM_MXC_MMC |
144 | select IMX_HAVE_PLATFORM_MXC_NAND | 143 | select IMX_HAVE_PLATFORM_MXC_NAND |
144 | select SOC_IMX21 | ||
145 | help | 145 | help |
146 | Include support for MX21ADS platform. This includes specific | 146 | Include support for MX21ADS platform. This includes specific |
147 | configurations for the board and its peripherals. | 147 | configurations for the board and its peripherals. |
@@ -150,22 +150,21 @@ comment "MX25 platforms:" | |||
150 | 150 | ||
151 | config MACH_MX25_3DS | 151 | config MACH_MX25_3DS |
152 | bool "Support MX25PDK (3DS) Platform" | 152 | bool "Support MX25PDK (3DS) Platform" |
153 | select SOC_IMX25 | ||
154 | select IMX_HAVE_PLATFORM_FLEXCAN | 153 | select IMX_HAVE_PLATFORM_FLEXCAN |
155 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 154 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
156 | select IMX_HAVE_PLATFORM_IMX2_WDT | 155 | select IMX_HAVE_PLATFORM_IMX2_WDT |
157 | select IMX_HAVE_PLATFORM_IMXDI_RTC | 156 | select IMX_HAVE_PLATFORM_IMXDI_RTC |
158 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
159 | select IMX_HAVE_PLATFORM_IMX_FB | 157 | select IMX_HAVE_PLATFORM_IMX_FB |
158 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
160 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | 159 | select IMX_HAVE_PLATFORM_IMX_KEYPAD |
161 | select IMX_HAVE_PLATFORM_IMX_UART | 160 | select IMX_HAVE_PLATFORM_IMX_UART |
162 | select IMX_HAVE_PLATFORM_MXC_EHCI | 161 | select IMX_HAVE_PLATFORM_MXC_EHCI |
163 | select IMX_HAVE_PLATFORM_MXC_NAND | 162 | select IMX_HAVE_PLATFORM_MXC_NAND |
164 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 163 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
164 | select SOC_IMX25 | ||
165 | 165 | ||
166 | config MACH_EUKREA_CPUIMX25SD | 166 | config MACH_EUKREA_CPUIMX25SD |
167 | bool "Support Eukrea CPUIMX25 Platform" | 167 | bool "Support Eukrea CPUIMX25 Platform" |
168 | select SOC_IMX25 | ||
169 | select IMX_HAVE_PLATFORM_FLEXCAN | 168 | select IMX_HAVE_PLATFORM_FLEXCAN |
170 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 169 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
171 | select IMX_HAVE_PLATFORM_IMX2_WDT | 170 | select IMX_HAVE_PLATFORM_IMX2_WDT |
@@ -177,6 +176,7 @@ config MACH_EUKREA_CPUIMX25SD | |||
177 | select IMX_HAVE_PLATFORM_MXC_NAND | 176 | select IMX_HAVE_PLATFORM_MXC_NAND |
178 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 177 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
179 | select MXC_ULPI if USB_ULPI | 178 | select MXC_ULPI if USB_ULPI |
179 | select SOC_IMX25 | ||
180 | 180 | ||
181 | choice | 181 | choice |
182 | prompt "Baseboard" | 182 | prompt "Baseboard" |
@@ -199,20 +199,19 @@ comment "MX27 platforms:" | |||
199 | 199 | ||
200 | config MACH_MX27ADS | 200 | config MACH_MX27ADS |
201 | bool "MX27ADS platform" | 201 | bool "MX27ADS platform" |
202 | select SOC_IMX27 | ||
203 | select IMX_HAVE_PLATFORM_IMX_FB | 202 | select IMX_HAVE_PLATFORM_IMX_FB |
204 | select IMX_HAVE_PLATFORM_IMX_I2C | 203 | select IMX_HAVE_PLATFORM_IMX_I2C |
205 | select IMX_HAVE_PLATFORM_IMX_UART | 204 | select IMX_HAVE_PLATFORM_IMX_UART |
206 | select IMX_HAVE_PLATFORM_MXC_MMC | 205 | select IMX_HAVE_PLATFORM_MXC_MMC |
207 | select IMX_HAVE_PLATFORM_MXC_NAND | 206 | select IMX_HAVE_PLATFORM_MXC_NAND |
208 | select IMX_HAVE_PLATFORM_MXC_W1 | 207 | select IMX_HAVE_PLATFORM_MXC_W1 |
208 | select SOC_IMX27 | ||
209 | help | 209 | help |
210 | Include support for MX27ADS platform. This includes specific | 210 | Include support for MX27ADS platform. This includes specific |
211 | configurations for the board and its peripherals. | 211 | configurations for the board and its peripherals. |
212 | 212 | ||
213 | config MACH_PCM038 | 213 | config MACH_PCM038 |
214 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" | 214 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" |
215 | select SOC_IMX27 | ||
216 | select IMX_HAVE_PLATFORM_IMX2_WDT | 215 | select IMX_HAVE_PLATFORM_IMX2_WDT |
217 | select IMX_HAVE_PLATFORM_IMX_I2C | 216 | select IMX_HAVE_PLATFORM_IMX_I2C |
218 | select IMX_HAVE_PLATFORM_IMX_UART | 217 | select IMX_HAVE_PLATFORM_IMX_UART |
@@ -221,6 +220,7 @@ config MACH_PCM038 | |||
221 | select IMX_HAVE_PLATFORM_MXC_W1 | 220 | select IMX_HAVE_PLATFORM_MXC_W1 |
222 | select IMX_HAVE_PLATFORM_SPI_IMX | 221 | select IMX_HAVE_PLATFORM_SPI_IMX |
223 | select MXC_ULPI if USB_ULPI | 222 | select MXC_ULPI if USB_ULPI |
223 | select SOC_IMX27 | ||
224 | help | 224 | help |
225 | Include support for phyCORE-i.MX27 (aka pcm038) platform. This | 225 | Include support for phyCORE-i.MX27 (aka pcm038) platform. This |
226 | includes specific configurations for the module and its peripherals. | 226 | includes specific configurations for the module and its peripherals. |
@@ -242,7 +242,6 @@ endchoice | |||
242 | 242 | ||
243 | config MACH_CPUIMX27 | 243 | config MACH_CPUIMX27 |
244 | bool "Eukrea CPUIMX27 module" | 244 | bool "Eukrea CPUIMX27 module" |
245 | select SOC_IMX27 | ||
246 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 245 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
247 | select IMX_HAVE_PLATFORM_IMX2_WDT | 246 | select IMX_HAVE_PLATFORM_IMX2_WDT |
248 | select IMX_HAVE_PLATFORM_IMX_I2C | 247 | select IMX_HAVE_PLATFORM_IMX_I2C |
@@ -251,6 +250,7 @@ config MACH_CPUIMX27 | |||
251 | select IMX_HAVE_PLATFORM_MXC_NAND | 250 | select IMX_HAVE_PLATFORM_MXC_NAND |
252 | select IMX_HAVE_PLATFORM_MXC_W1 | 251 | select IMX_HAVE_PLATFORM_MXC_W1 |
253 | select MXC_ULPI if USB_ULPI | 252 | select MXC_ULPI if USB_ULPI |
253 | select SOC_IMX27 | ||
254 | help | 254 | help |
255 | Include support for Eukrea CPUIMX27 platform. This includes | 255 | Include support for Eukrea CPUIMX27 platform. This includes |
256 | specific configurations for the module and its peripherals. | 256 | specific configurations for the module and its peripherals. |
@@ -292,7 +292,6 @@ endchoice | |||
292 | 292 | ||
293 | config MACH_MX27_3DS | 293 | config MACH_MX27_3DS |
294 | bool "MX27PDK platform" | 294 | bool "MX27PDK platform" |
295 | select SOC_IMX27 | ||
296 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 295 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
297 | select IMX_HAVE_PLATFORM_IMX2_WDT | 296 | select IMX_HAVE_PLATFORM_IMX2_WDT |
298 | select IMX_HAVE_PLATFORM_IMX_FB | 297 | select IMX_HAVE_PLATFORM_IMX_FB |
@@ -306,13 +305,13 @@ config MACH_MX27_3DS | |||
306 | select IMX_HAVE_PLATFORM_SPI_IMX | 305 | select IMX_HAVE_PLATFORM_SPI_IMX |
307 | select MXC_DEBUG_BOARD | 306 | select MXC_DEBUG_BOARD |
308 | select MXC_ULPI if USB_ULPI | 307 | select MXC_ULPI if USB_ULPI |
308 | select SOC_IMX27 | ||
309 | help | 309 | help |
310 | Include support for MX27PDK platform. This includes specific | 310 | Include support for MX27PDK platform. This includes specific |
311 | configurations for the board and its peripherals. | 311 | configurations for the board and its peripherals. |
312 | 312 | ||
313 | config MACH_IMX27_VISSTRIM_M10 | 313 | config MACH_IMX27_VISSTRIM_M10 |
314 | bool "Vista Silicon i.MX27 Visstrim_m10" | 314 | bool "Vista Silicon i.MX27 Visstrim_m10" |
315 | select SOC_IMX27 | ||
316 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 315 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
317 | select IMX_HAVE_PLATFORM_IMX_I2C | 316 | select IMX_HAVE_PLATFORM_IMX_I2C |
318 | select IMX_HAVE_PLATFORM_IMX_SSI | 317 | select IMX_HAVE_PLATFORM_IMX_SSI |
@@ -321,6 +320,7 @@ config MACH_IMX27_VISSTRIM_M10 | |||
321 | select IMX_HAVE_PLATFORM_MXC_EHCI | 320 | select IMX_HAVE_PLATFORM_MXC_EHCI |
322 | select IMX_HAVE_PLATFORM_MXC_MMC | 321 | select IMX_HAVE_PLATFORM_MXC_MMC |
323 | select LEDS_GPIO_REGISTER | 322 | select LEDS_GPIO_REGISTER |
323 | select SOC_IMX27 | ||
324 | help | 324 | help |
325 | Include support for Visstrim_m10 platform and its different variants. | 325 | Include support for Visstrim_m10 platform and its different variants. |
326 | This includes specific configurations for the board and its | 326 | This includes specific configurations for the board and its |
@@ -328,16 +328,15 @@ config MACH_IMX27_VISSTRIM_M10 | |||
328 | 328 | ||
329 | config MACH_IMX27LITE | 329 | config MACH_IMX27LITE |
330 | bool "LogicPD MX27 LITEKIT platform" | 330 | bool "LogicPD MX27 LITEKIT platform" |
331 | select SOC_IMX27 | ||
332 | select IMX_HAVE_PLATFORM_IMX_UART | ||
333 | select IMX_HAVE_PLATFORM_IMX_SSI | 331 | select IMX_HAVE_PLATFORM_IMX_SSI |
332 | select IMX_HAVE_PLATFORM_IMX_UART | ||
333 | select SOC_IMX27 | ||
334 | help | 334 | help |
335 | Include support for MX27 LITEKIT platform. This includes specific | 335 | Include support for MX27 LITEKIT platform. This includes specific |
336 | configurations for the board and its peripherals. | 336 | configurations for the board and its peripherals. |
337 | 337 | ||
338 | config MACH_PCA100 | 338 | config MACH_PCA100 |
339 | bool "Phytec phyCARD-s (pca100)" | 339 | bool "Phytec phyCARD-s (pca100)" |
340 | select SOC_IMX27 | ||
341 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 340 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
342 | select IMX_HAVE_PLATFORM_IMX2_WDT | 341 | select IMX_HAVE_PLATFORM_IMX2_WDT |
343 | select IMX_HAVE_PLATFORM_IMX_FB | 342 | select IMX_HAVE_PLATFORM_IMX_FB |
@@ -350,27 +349,28 @@ config MACH_PCA100 | |||
350 | select IMX_HAVE_PLATFORM_MXC_W1 | 349 | select IMX_HAVE_PLATFORM_MXC_W1 |
351 | select IMX_HAVE_PLATFORM_SPI_IMX | 350 | select IMX_HAVE_PLATFORM_SPI_IMX |
352 | select MXC_ULPI if USB_ULPI | 351 | select MXC_ULPI if USB_ULPI |
352 | select SOC_IMX27 | ||
353 | help | 353 | help |
354 | Include support for phyCARD-s (aka pca100) platform. This | 354 | Include support for phyCARD-s (aka pca100) platform. This |
355 | includes specific configurations for the module and its peripherals. | 355 | includes specific configurations for the module and its peripherals. |
356 | 356 | ||
357 | config MACH_MXT_TD60 | 357 | config MACH_MXT_TD60 |
358 | bool "Maxtrack i-MXT TD60" | 358 | bool "Maxtrack i-MXT TD60" |
359 | select SOC_IMX27 | ||
360 | select IMX_HAVE_PLATFORM_IMX_FB | 359 | select IMX_HAVE_PLATFORM_IMX_FB |
361 | select IMX_HAVE_PLATFORM_IMX_I2C | 360 | select IMX_HAVE_PLATFORM_IMX_I2C |
362 | select IMX_HAVE_PLATFORM_IMX_UART | 361 | select IMX_HAVE_PLATFORM_IMX_UART |
363 | select IMX_HAVE_PLATFORM_MXC_MMC | 362 | select IMX_HAVE_PLATFORM_MXC_MMC |
364 | select IMX_HAVE_PLATFORM_MXC_NAND | 363 | select IMX_HAVE_PLATFORM_MXC_NAND |
364 | select SOC_IMX27 | ||
365 | help | 365 | help |
366 | Include support for i-MXT (aka td60) platform. This | 366 | Include support for i-MXT (aka td60) platform. This |
367 | includes specific configurations for the module and its peripherals. | 367 | includes specific configurations for the module and its peripherals. |
368 | 368 | ||
369 | config MACH_IMX27IPCAM | 369 | config MACH_IMX27IPCAM |
370 | bool "IMX27 IPCAM platform" | 370 | bool "IMX27 IPCAM platform" |
371 | select SOC_IMX27 | ||
372 | select IMX_HAVE_PLATFORM_IMX2_WDT | 371 | select IMX_HAVE_PLATFORM_IMX2_WDT |
373 | select IMX_HAVE_PLATFORM_IMX_UART | 372 | select IMX_HAVE_PLATFORM_IMX_UART |
373 | select SOC_IMX27 | ||
374 | help | 374 | help |
375 | Include support for IMX27 IPCAM platform. This includes specific | 375 | Include support for IMX27 IPCAM platform. This includes specific |
376 | configurations for the board and its peripherals. | 376 | configurations for the board and its peripherals. |
@@ -390,11 +390,11 @@ comment "MX31 platforms:" | |||
390 | 390 | ||
391 | config MACH_MX31ADS | 391 | config MACH_MX31ADS |
392 | bool "Support MX31ADS platforms" | 392 | bool "Support MX31ADS platforms" |
393 | select SOC_IMX31 | 393 | default y |
394 | select IMX_HAVE_PLATFORM_IMX_I2C | 394 | select IMX_HAVE_PLATFORM_IMX_I2C |
395 | select IMX_HAVE_PLATFORM_IMX_SSI | 395 | select IMX_HAVE_PLATFORM_IMX_SSI |
396 | select IMX_HAVE_PLATFORM_IMX_UART | 396 | select IMX_HAVE_PLATFORM_IMX_UART |
397 | default y | 397 | select SOC_IMX31 |
398 | help | 398 | help |
399 | Include support for MX31ADS platform. This includes specific | 399 | Include support for MX31ADS platform. This includes specific |
400 | configurations for the board and its peripherals. | 400 | configurations for the board and its peripherals. |
@@ -412,21 +412,19 @@ config MACH_MX31ADS_WM1133_EV1 | |||
412 | 412 | ||
413 | config MACH_MX31LILLY | 413 | config MACH_MX31LILLY |
414 | bool "Support MX31 LILLY-1131 platforms (INCO startec)" | 414 | bool "Support MX31 LILLY-1131 platforms (INCO startec)" |
415 | select SOC_IMX31 | ||
416 | select IMX_HAVE_PLATFORM_IMX_UART | 415 | select IMX_HAVE_PLATFORM_IMX_UART |
417 | select IMX_HAVE_PLATFORM_IPU_CORE | 416 | select IMX_HAVE_PLATFORM_IPU_CORE |
418 | select IMX_HAVE_PLATFORM_MXC_EHCI | 417 | select IMX_HAVE_PLATFORM_MXC_EHCI |
419 | select IMX_HAVE_PLATFORM_MXC_MMC | 418 | select IMX_HAVE_PLATFORM_MXC_MMC |
420 | select IMX_HAVE_PLATFORM_SPI_IMX | 419 | select IMX_HAVE_PLATFORM_SPI_IMX |
421 | select MXC_ULPI if USB_ULPI | 420 | select MXC_ULPI if USB_ULPI |
421 | select SOC_IMX31 | ||
422 | help | 422 | help |
423 | Include support for mx31 based LILLY1131 modules. This includes | 423 | Include support for mx31 based LILLY1131 modules. This includes |
424 | specific configurations for the board and its peripherals. | 424 | specific configurations for the board and its peripherals. |
425 | 425 | ||
426 | config MACH_MX31LITE | 426 | config MACH_MX31LITE |
427 | bool "Support MX31 LITEKIT (LogicPD)" | 427 | bool "Support MX31 LITEKIT (LogicPD)" |
428 | select SOC_IMX31 | ||
429 | select MXC_ULPI if USB_ULPI | ||
430 | select IMX_HAVE_PLATFORM_IMX2_WDT | 428 | select IMX_HAVE_PLATFORM_IMX2_WDT |
431 | select IMX_HAVE_PLATFORM_IMX_UART | 429 | select IMX_HAVE_PLATFORM_IMX_UART |
432 | select IMX_HAVE_PLATFORM_MXC_EHCI | 430 | select IMX_HAVE_PLATFORM_MXC_EHCI |
@@ -435,13 +433,14 @@ config MACH_MX31LITE | |||
435 | select IMX_HAVE_PLATFORM_MXC_RTC | 433 | select IMX_HAVE_PLATFORM_MXC_RTC |
436 | select IMX_HAVE_PLATFORM_SPI_IMX | 434 | select IMX_HAVE_PLATFORM_SPI_IMX |
437 | select LEDS_GPIO_REGISTER | 435 | select LEDS_GPIO_REGISTER |
436 | select MXC_ULPI if USB_ULPI | ||
437 | select SOC_IMX31 | ||
438 | help | 438 | help |
439 | Include support for MX31 LITEKIT platform. This includes specific | 439 | Include support for MX31 LITEKIT platform. This includes specific |
440 | configurations for the board and its peripherals. | 440 | configurations for the board and its peripherals. |
441 | 441 | ||
442 | config MACH_PCM037 | 442 | config MACH_PCM037 |
443 | bool "Support Phytec pcm037 (i.MX31) platforms" | 443 | bool "Support Phytec pcm037 (i.MX31) platforms" |
444 | select SOC_IMX31 | ||
445 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 444 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
446 | select IMX_HAVE_PLATFORM_IMX2_WDT | 445 | select IMX_HAVE_PLATFORM_IMX2_WDT |
447 | select IMX_HAVE_PLATFORM_IMX_I2C | 446 | select IMX_HAVE_PLATFORM_IMX_I2C |
@@ -452,6 +451,7 @@ config MACH_PCM037 | |||
452 | select IMX_HAVE_PLATFORM_MXC_NAND | 451 | select IMX_HAVE_PLATFORM_MXC_NAND |
453 | select IMX_HAVE_PLATFORM_MXC_W1 | 452 | select IMX_HAVE_PLATFORM_MXC_W1 |
454 | select MXC_ULPI if USB_ULPI | 453 | select MXC_ULPI if USB_ULPI |
454 | select SOC_IMX31 | ||
455 | help | 455 | help |
456 | Include support for Phytec pcm037 platform. This includes | 456 | Include support for Phytec pcm037 platform. This includes |
457 | specific configurations for the board and its peripherals. | 457 | specific configurations for the board and its peripherals. |
@@ -468,8 +468,6 @@ config MACH_PCM037_EET | |||
468 | 468 | ||
469 | config MACH_MX31_3DS | 469 | config MACH_MX31_3DS |
470 | bool "Support MX31PDK (3DS)" | 470 | bool "Support MX31PDK (3DS)" |
471 | select SOC_IMX31 | ||
472 | select MXC_DEBUG_BOARD | ||
473 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 471 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
474 | select IMX_HAVE_PLATFORM_IMX2_WDT | 472 | select IMX_HAVE_PLATFORM_IMX2_WDT |
475 | select IMX_HAVE_PLATFORM_IMX_I2C | 473 | select IMX_HAVE_PLATFORM_IMX_I2C |
@@ -481,7 +479,9 @@ config MACH_MX31_3DS | |||
481 | select IMX_HAVE_PLATFORM_MXC_MMC | 479 | select IMX_HAVE_PLATFORM_MXC_MMC |
482 | select IMX_HAVE_PLATFORM_MXC_NAND | 480 | select IMX_HAVE_PLATFORM_MXC_NAND |
483 | select IMX_HAVE_PLATFORM_SPI_IMX | 481 | select IMX_HAVE_PLATFORM_SPI_IMX |
482 | select MXC_DEBUG_BOARD | ||
484 | select MXC_ULPI if USB_ULPI | 483 | select MXC_ULPI if USB_ULPI |
484 | select SOC_IMX31 | ||
485 | help | 485 | help |
486 | Include support for MX31PDK (3DS) platform. This includes specific | 486 | Include support for MX31PDK (3DS) platform. This includes specific |
487 | configurations for the board and its peripherals. | 487 | configurations for the board and its peripherals. |
@@ -497,7 +497,6 @@ config MACH_MX31_3DS_MXC_NAND_USE_BBT | |||
497 | 497 | ||
498 | config MACH_MX31MOBOARD | 498 | config MACH_MX31MOBOARD |
499 | bool "Support mx31moboard platforms (EPFL Mobots group)" | 499 | bool "Support mx31moboard platforms (EPFL Mobots group)" |
500 | select SOC_IMX31 | ||
501 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 500 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
502 | select IMX_HAVE_PLATFORM_IMX2_WDT | 501 | select IMX_HAVE_PLATFORM_IMX2_WDT |
503 | select IMX_HAVE_PLATFORM_IMX_I2C | 502 | select IMX_HAVE_PLATFORM_IMX_I2C |
@@ -509,22 +508,22 @@ config MACH_MX31MOBOARD | |||
509 | select IMX_HAVE_PLATFORM_SPI_IMX | 508 | select IMX_HAVE_PLATFORM_SPI_IMX |
510 | select LEDS_GPIO_REGISTER | 509 | select LEDS_GPIO_REGISTER |
511 | select MXC_ULPI if USB_ULPI | 510 | select MXC_ULPI if USB_ULPI |
511 | select SOC_IMX31 | ||
512 | help | 512 | help |
513 | Include support for mx31moboard platform. This includes specific | 513 | Include support for mx31moboard platform. This includes specific |
514 | configurations for the board and its peripherals. | 514 | configurations for the board and its peripherals. |
515 | 515 | ||
516 | config MACH_QONG | 516 | config MACH_QONG |
517 | bool "Support Dave/DENX QongEVB-LITE platform" | 517 | bool "Support Dave/DENX QongEVB-LITE platform" |
518 | select SOC_IMX31 | ||
519 | select IMX_HAVE_PLATFORM_IMX_UART | ||
520 | select IMX_HAVE_PLATFORM_IMX2_WDT | 518 | select IMX_HAVE_PLATFORM_IMX2_WDT |
519 | select IMX_HAVE_PLATFORM_IMX_UART | ||
520 | select SOC_IMX31 | ||
521 | help | 521 | help |
522 | Include support for Dave/DENX QongEVB-LITE platform. This includes | 522 | Include support for Dave/DENX QongEVB-LITE platform. This includes |
523 | specific configurations for the board and its peripherals. | 523 | specific configurations for the board and its peripherals. |
524 | 524 | ||
525 | config MACH_ARMADILLO5X0 | 525 | config MACH_ARMADILLO5X0 |
526 | bool "Support Atmark Armadillo-500 Development Base Board" | 526 | bool "Support Atmark Armadillo-500 Development Base Board" |
527 | select SOC_IMX31 | ||
528 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 527 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
529 | select IMX_HAVE_PLATFORM_IMX_I2C | 528 | select IMX_HAVE_PLATFORM_IMX_I2C |
530 | select IMX_HAVE_PLATFORM_IMX_UART | 529 | select IMX_HAVE_PLATFORM_IMX_UART |
@@ -533,23 +532,24 @@ config MACH_ARMADILLO5X0 | |||
533 | select IMX_HAVE_PLATFORM_MXC_MMC | 532 | select IMX_HAVE_PLATFORM_MXC_MMC |
534 | select IMX_HAVE_PLATFORM_MXC_NAND | 533 | select IMX_HAVE_PLATFORM_MXC_NAND |
535 | select MXC_ULPI if USB_ULPI | 534 | select MXC_ULPI if USB_ULPI |
535 | select SOC_IMX31 | ||
536 | help | 536 | help |
537 | Include support for Atmark Armadillo-500 platform. This includes | 537 | Include support for Atmark Armadillo-500 platform. This includes |
538 | specific configurations for the board and its peripherals. | 538 | specific configurations for the board and its peripherals. |
539 | 539 | ||
540 | config MACH_KZM_ARM11_01 | 540 | config MACH_KZM_ARM11_01 |
541 | bool "Support KZM-ARM11-01(Kyoto Microcomputer)" | 541 | bool "Support KZM-ARM11-01(Kyoto Microcomputer)" |
542 | select SOC_IMX31 | ||
543 | select IMX_HAVE_PLATFORM_IMX_UART | 542 | select IMX_HAVE_PLATFORM_IMX_UART |
543 | select SOC_IMX31 | ||
544 | help | 544 | help |
545 | Include support for KZM-ARM11-01. This includes specific | 545 | Include support for KZM-ARM11-01. This includes specific |
546 | configurations for the board and its peripherals. | 546 | configurations for the board and its peripherals. |
547 | 547 | ||
548 | config MACH_BUG | 548 | config MACH_BUG |
549 | bool "Support Buglabs BUGBase platform" | 549 | bool "Support Buglabs BUGBase platform" |
550 | select SOC_IMX31 | ||
551 | select IMX_HAVE_PLATFORM_IMX_UART | ||
552 | default y | 550 | default y |
551 | select IMX_HAVE_PLATFORM_IMX_UART | ||
552 | select SOC_IMX31 | ||
553 | help | 553 | help |
554 | Include support for BUGBase 1.3 platform. This includes specific | 554 | Include support for BUGBase 1.3 platform. This includes specific |
555 | configurations for the board and its peripherals. | 555 | configurations for the board and its peripherals. |
@@ -565,7 +565,6 @@ comment "MX35 platforms:" | |||
565 | 565 | ||
566 | config MACH_PCM043 | 566 | config MACH_PCM043 |
567 | bool "Support Phytec pcm043 (i.MX35) platforms" | 567 | bool "Support Phytec pcm043 (i.MX35) platforms" |
568 | select SOC_IMX35 | ||
569 | select IMX_HAVE_PLATFORM_FLEXCAN | 568 | select IMX_HAVE_PLATFORM_FLEXCAN |
570 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 569 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
571 | select IMX_HAVE_PLATFORM_IMX2_WDT | 570 | select IMX_HAVE_PLATFORM_IMX2_WDT |
@@ -577,14 +576,13 @@ config MACH_PCM043 | |||
577 | select IMX_HAVE_PLATFORM_MXC_NAND | 576 | select IMX_HAVE_PLATFORM_MXC_NAND |
578 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 577 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
579 | select MXC_ULPI if USB_ULPI | 578 | select MXC_ULPI if USB_ULPI |
579 | select SOC_IMX35 | ||
580 | help | 580 | help |
581 | Include support for Phytec pcm043 platform. This includes | 581 | Include support for Phytec pcm043 platform. This includes |
582 | specific configurations for the board and its peripherals. | 582 | specific configurations for the board and its peripherals. |
583 | 583 | ||
584 | config MACH_MX35_3DS | 584 | config MACH_MX35_3DS |
585 | bool "Support MX35PDK platform" | 585 | bool "Support MX35PDK platform" |
586 | select SOC_IMX35 | ||
587 | select MXC_DEBUG_BOARD | ||
588 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 586 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
589 | select IMX_HAVE_PLATFORM_IMX2_WDT | 587 | select IMX_HAVE_PLATFORM_IMX2_WDT |
590 | select IMX_HAVE_PLATFORM_IMX_FB | 588 | select IMX_HAVE_PLATFORM_IMX_FB |
@@ -595,13 +593,14 @@ config MACH_MX35_3DS | |||
595 | select IMX_HAVE_PLATFORM_MXC_NAND | 593 | select IMX_HAVE_PLATFORM_MXC_NAND |
596 | select IMX_HAVE_PLATFORM_MXC_RTC | 594 | select IMX_HAVE_PLATFORM_MXC_RTC |
597 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 595 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
596 | select MXC_DEBUG_BOARD | ||
597 | select SOC_IMX35 | ||
598 | help | 598 | help |
599 | Include support for MX35PDK platform. This includes specific | 599 | Include support for MX35PDK platform. This includes specific |
600 | configurations for the board and its peripherals. | 600 | configurations for the board and its peripherals. |
601 | 601 | ||
602 | config MACH_EUKREA_CPUIMX35SD | 602 | config MACH_EUKREA_CPUIMX35SD |
603 | bool "Support Eukrea CPUIMX35 Platform" | 603 | bool "Support Eukrea CPUIMX35 Platform" |
604 | select SOC_IMX35 | ||
605 | select IMX_HAVE_PLATFORM_FLEXCAN | 604 | select IMX_HAVE_PLATFORM_FLEXCAN |
606 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 605 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
607 | select IMX_HAVE_PLATFORM_IMX2_WDT | 606 | select IMX_HAVE_PLATFORM_IMX2_WDT |
@@ -611,6 +610,7 @@ config MACH_EUKREA_CPUIMX35SD | |||
611 | select IMX_HAVE_PLATFORM_MXC_NAND | 610 | select IMX_HAVE_PLATFORM_MXC_NAND |
612 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 611 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
613 | select MXC_ULPI if USB_ULPI | 612 | select MXC_ULPI if USB_ULPI |
613 | select SOC_IMX35 | ||
614 | help | 614 | help |
615 | Include support for Eukrea CPUIMX35 platform. This includes | 615 | Include support for Eukrea CPUIMX35 platform. This includes |
616 | specific configurations for the board and its peripherals. | 616 | specific configurations for the board and its peripherals. |
@@ -635,16 +635,16 @@ endchoice | |||
635 | 635 | ||
636 | config MACH_VPR200 | 636 | config MACH_VPR200 |
637 | bool "Support VPR200 platform" | 637 | bool "Support VPR200 platform" |
638 | select SOC_IMX35 | ||
639 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 638 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
640 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 639 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
641 | select IMX_HAVE_PLATFORM_IMX2_WDT | 640 | select IMX_HAVE_PLATFORM_IMX2_WDT |
642 | select IMX_HAVE_PLATFORM_IMX_UART | ||
643 | select IMX_HAVE_PLATFORM_IMX_I2C | 641 | select IMX_HAVE_PLATFORM_IMX_I2C |
642 | select IMX_HAVE_PLATFORM_IMX_UART | ||
644 | select IMX_HAVE_PLATFORM_IPU_CORE | 643 | select IMX_HAVE_PLATFORM_IPU_CORE |
645 | select IMX_HAVE_PLATFORM_MXC_EHCI | 644 | select IMX_HAVE_PLATFORM_MXC_EHCI |
646 | select IMX_HAVE_PLATFORM_MXC_NAND | 645 | select IMX_HAVE_PLATFORM_MXC_NAND |
647 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 646 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
647 | select SOC_IMX35 | ||
648 | help | 648 | help |
649 | Include support for VPR200 platform. This includes specific | 649 | Include support for VPR200 platform. This includes specific |
650 | configurations for the board and its peripherals. | 650 | configurations for the board and its peripherals. |
@@ -654,11 +654,11 @@ comment "i.MX5 platforms:" | |||
654 | config MACH_MX50_RDP | 654 | config MACH_MX50_RDP |
655 | bool "Support MX50 reference design platform" | 655 | bool "Support MX50 reference design platform" |
656 | depends on BROKEN | 656 | depends on BROKEN |
657 | select SOC_IMX50 | ||
658 | select IMX_HAVE_PLATFORM_IMX_I2C | 657 | select IMX_HAVE_PLATFORM_IMX_I2C |
659 | select IMX_HAVE_PLATFORM_IMX_UART | 658 | select IMX_HAVE_PLATFORM_IMX_UART |
660 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 659 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
661 | select IMX_HAVE_PLATFORM_SPI_IMX | 660 | select IMX_HAVE_PLATFORM_SPI_IMX |
661 | select SOC_IMX50 | ||
662 | help | 662 | help |
663 | Include support for MX50 reference design platform (RDP) board. This | 663 | Include support for MX50 reference design platform (RDP) board. This |
664 | includes specific configurations for the board and its peripherals. | 664 | includes specific configurations for the board and its peripherals. |
@@ -667,15 +667,14 @@ comment "i.MX51 machines:" | |||
667 | 667 | ||
668 | config MACH_IMX51_DT | 668 | config MACH_IMX51_DT |
669 | bool "Support i.MX51 platforms from device tree" | 669 | bool "Support i.MX51 platforms from device tree" |
670 | select SOC_IMX51 | ||
671 | select MACH_MX51_BABBAGE | 670 | select MACH_MX51_BABBAGE |
671 | select SOC_IMX51 | ||
672 | help | 672 | help |
673 | Include support for Freescale i.MX51 based platforms | 673 | Include support for Freescale i.MX51 based platforms |
674 | using the device tree for discovery | 674 | using the device tree for discovery |
675 | 675 | ||
676 | config MACH_MX51_BABBAGE | 676 | config MACH_MX51_BABBAGE |
677 | bool "Support MX51 BABBAGE platforms" | 677 | bool "Support MX51 BABBAGE platforms" |
678 | select SOC_IMX51 | ||
679 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 678 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
680 | select IMX_HAVE_PLATFORM_IMX2_WDT | 679 | select IMX_HAVE_PLATFORM_IMX2_WDT |
681 | select IMX_HAVE_PLATFORM_IMX_I2C | 680 | select IMX_HAVE_PLATFORM_IMX_I2C |
@@ -683,6 +682,7 @@ config MACH_MX51_BABBAGE | |||
683 | select IMX_HAVE_PLATFORM_MXC_EHCI | 682 | select IMX_HAVE_PLATFORM_MXC_EHCI |
684 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 683 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
685 | select IMX_HAVE_PLATFORM_SPI_IMX | 684 | select IMX_HAVE_PLATFORM_SPI_IMX |
685 | select SOC_IMX51 | ||
686 | help | 686 | help |
687 | Include support for MX51 Babbage platform, also known as MX51EVK in | 687 | Include support for MX51 Babbage platform, also known as MX51EVK in |
688 | u-boot. This includes specific configurations for the board and its | 688 | u-boot. This includes specific configurations for the board and its |
@@ -690,27 +690,27 @@ config MACH_MX51_BABBAGE | |||
690 | 690 | ||
691 | config MACH_MX51_3DS | 691 | config MACH_MX51_3DS |
692 | bool "Support MX51PDK (3DS)" | 692 | bool "Support MX51PDK (3DS)" |
693 | select SOC_IMX51 | ||
694 | select IMX_HAVE_PLATFORM_IMX2_WDT | 693 | select IMX_HAVE_PLATFORM_IMX2_WDT |
695 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | 694 | select IMX_HAVE_PLATFORM_IMX_KEYPAD |
696 | select IMX_HAVE_PLATFORM_IMX_UART | 695 | select IMX_HAVE_PLATFORM_IMX_UART |
697 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 696 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
698 | select IMX_HAVE_PLATFORM_SPI_IMX | 697 | select IMX_HAVE_PLATFORM_SPI_IMX |
699 | select MXC_DEBUG_BOARD | 698 | select MXC_DEBUG_BOARD |
699 | select SOC_IMX51 | ||
700 | help | 700 | help |
701 | Include support for MX51PDK (3DS) platform. This includes specific | 701 | Include support for MX51PDK (3DS) platform. This includes specific |
702 | configurations for the board and its peripherals. | 702 | configurations for the board and its peripherals. |
703 | 703 | ||
704 | config MACH_EUKREA_CPUIMX51SD | 704 | config MACH_EUKREA_CPUIMX51SD |
705 | bool "Support Eukrea CPUIMX51SD module" | 705 | bool "Support Eukrea CPUIMX51SD module" |
706 | select SOC_IMX51 | ||
707 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 706 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
707 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
708 | select IMX_HAVE_PLATFORM_IMX_I2C | 708 | select IMX_HAVE_PLATFORM_IMX_I2C |
709 | select IMX_HAVE_PLATFORM_IMX_UART | 709 | select IMX_HAVE_PLATFORM_IMX_UART |
710 | select IMX_HAVE_PLATFORM_IMX2_WDT | ||
711 | select IMX_HAVE_PLATFORM_MXC_EHCI | 710 | select IMX_HAVE_PLATFORM_MXC_EHCI |
712 | select IMX_HAVE_PLATFORM_MXC_NAND | 711 | select IMX_HAVE_PLATFORM_MXC_NAND |
713 | select IMX_HAVE_PLATFORM_SPI_IMX | 712 | select IMX_HAVE_PLATFORM_SPI_IMX |
713 | select SOC_IMX51 | ||
714 | help | 714 | help |
715 | Include support for Eukrea CPUIMX51SD platform. This includes | 715 | Include support for Eukrea CPUIMX51SD platform. This includes |
716 | specific configurations for the module and its peripherals. | 716 | specific configurations for the module and its peripherals. |
@@ -736,12 +736,12 @@ comment "Device tree only" | |||
736 | 736 | ||
737 | config SOC_IMX53 | 737 | config SOC_IMX53 |
738 | bool "i.MX53 support" | 738 | bool "i.MX53 support" |
739 | select SOC_IMX5 | ||
740 | select ARCH_MX5 | 739 | select ARCH_MX5 |
741 | select ARCH_MX53 | 740 | select ARCH_MX53 |
742 | select HAVE_CAN_FLEXCAN if CAN | 741 | select HAVE_CAN_FLEXCAN if CAN |
743 | select PINCTRL | 742 | select PINCTRL |
744 | select PINCTRL_IMX53 | 743 | select PINCTRL_IMX53 |
744 | select SOC_IMX5 | ||
745 | 745 | ||
746 | help | 746 | help |
747 | This enables support for Freescale i.MX53 processor. | 747 | This enables support for Freescale i.MX53 processor. |
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig index fd5e7b6881b..73a2d905af8 100644 --- a/arch/arm/mach-ixp4xx/Kconfig +++ b/arch/arm/mach-ixp4xx/Kconfig | |||
@@ -234,8 +234,8 @@ config IXP4XX_QMGR | |||
234 | 234 | ||
235 | config IXP4XX_NPE | 235 | config IXP4XX_NPE |
236 | tristate "IXP4xx Network Processor Engine support" | 236 | tristate "IXP4xx Network Processor Engine support" |
237 | select HOTPLUG | ||
238 | select FW_LOADER | 237 | select FW_LOADER |
238 | select HOTPLUG | ||
239 | help | 239 | help |
240 | This driver supports IXP4xx built-in network coprocessors | 240 | This driver supports IXP4xx built-in network coprocessors |
241 | and is automatically selected by Ethernet and HSS drivers. | 241 | and is automatically selected by Ethernet and HSS drivers. |
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig index d697d07a1bf..178d4daa5e1 100644 --- a/arch/arm/mach-mmp/Kconfig +++ b/arch/arm/mach-mmp/Kconfig | |||
@@ -107,22 +107,22 @@ endmenu | |||
107 | 107 | ||
108 | config CPU_PXA168 | 108 | config CPU_PXA168 |
109 | bool | 109 | bool |
110 | select CPU_MOHAWK | ||
111 | select COMMON_CLK | 110 | select COMMON_CLK |
111 | select CPU_MOHAWK | ||
112 | help | 112 | help |
113 | Select code specific to PXA168 | 113 | Select code specific to PXA168 |
114 | 114 | ||
115 | config CPU_PXA910 | 115 | config CPU_PXA910 |
116 | bool | 116 | bool |
117 | select CPU_MOHAWK | ||
118 | select COMMON_CLK | 117 | select COMMON_CLK |
118 | select CPU_MOHAWK | ||
119 | help | 119 | help |
120 | Select code specific to PXA910 | 120 | Select code specific to PXA910 |
121 | 121 | ||
122 | config CPU_MMP2 | 122 | config CPU_MMP2 |
123 | bool | 123 | bool |
124 | select CPU_PJ4 | ||
125 | select COMMON_CLK | 124 | select COMMON_CLK |
125 | select CPU_PJ4 | ||
126 | help | 126 | help |
127 | Select code specific to MMP2. MMP2 is ARMv7 compatible. | 127 | Select code specific to MMP2. MMP2 is ARMv7 compatible. |
128 | 128 | ||
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 7902de151cc..b61908594b4 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig | |||
@@ -10,35 +10,35 @@ choice | |||
10 | 10 | ||
11 | config ARCH_MSM7X00A | 11 | config ARCH_MSM7X00A |
12 | bool "MSM7x00A / MSM7x01A" | 12 | bool "MSM7x00A / MSM7x01A" |
13 | select MACH_TROUT if !MACH_HALIBUT | ||
14 | select ARCH_MSM_ARM11 | 13 | select ARCH_MSM_ARM11 |
15 | select MSM_SMD | ||
16 | select MSM_SMD_PKG3 | ||
17 | select CPU_V6 | 14 | select CPU_V6 |
18 | select GPIO_MSM_V1 | 15 | select GPIO_MSM_V1 |
16 | select MACH_TROUT if !MACH_HALIBUT | ||
19 | select MSM_PROC_COMM | 17 | select MSM_PROC_COMM |
18 | select MSM_SMD | ||
19 | select MSM_SMD_PKG3 | ||
20 | 20 | ||
21 | config ARCH_MSM7X30 | 21 | config ARCH_MSM7X30 |
22 | bool "MSM7x30" | 22 | bool "MSM7x30" |
23 | select MACH_MSM7X30_SURF # if ! | ||
24 | select ARCH_MSM_SCORPION | 23 | select ARCH_MSM_SCORPION |
25 | select MSM_SMD | ||
26 | select MSM_VIC | ||
27 | select CPU_V7 | 24 | select CPU_V7 |
28 | select MSM_GPIOMUX | ||
29 | select GPIO_MSM_V1 | 25 | select GPIO_MSM_V1 |
26 | select MACH_MSM7X30_SURF # if ! | ||
27 | select MSM_GPIOMUX | ||
30 | select MSM_PROC_COMM | 28 | select MSM_PROC_COMM |
29 | select MSM_SMD | ||
30 | select MSM_VIC | ||
31 | 31 | ||
32 | config ARCH_QSD8X50 | 32 | config ARCH_QSD8X50 |
33 | bool "QSD8X50" | 33 | bool "QSD8X50" |
34 | select MACH_QSD8X50_SURF if !MACH_QSD8X50A_ST1_5 | ||
35 | select ARCH_MSM_SCORPION | 34 | select ARCH_MSM_SCORPION |
36 | select MSM_SMD | ||
37 | select MSM_VIC | ||
38 | select CPU_V7 | 35 | select CPU_V7 |
39 | select MSM_GPIOMUX | ||
40 | select GPIO_MSM_V1 | 36 | select GPIO_MSM_V1 |
37 | select MACH_QSD8X50_SURF if !MACH_QSD8X50A_ST1_5 | ||
38 | select MSM_GPIOMUX | ||
41 | select MSM_PROC_COMM | 39 | select MSM_PROC_COMM |
40 | select MSM_SMD | ||
41 | select MSM_VIC | ||
42 | 42 | ||
43 | endchoice | 43 | endchoice |
44 | 44 | ||
@@ -47,10 +47,10 @@ config ARCH_MSM8X60 | |||
47 | select ARCH_MSM_SCORPIONMP | 47 | select ARCH_MSM_SCORPIONMP |
48 | select ARM_GIC | 48 | select ARM_GIC |
49 | select CPU_V7 | 49 | select CPU_V7 |
50 | select MSM_V2_TLMM | ||
51 | select GPIO_MSM_V2 | 50 | select GPIO_MSM_V2 |
52 | select MSM_GPIOMUX | 51 | select MSM_GPIOMUX |
53 | select MSM_SCM if SMP | 52 | select MSM_SCM if SMP |
53 | select MSM_V2_TLMM | ||
54 | select USE_OF | 54 | select USE_OF |
55 | 55 | ||
56 | config ARCH_MSM8960 | 56 | config ARCH_MSM8960 |
@@ -58,9 +58,9 @@ config ARCH_MSM8960 | |||
58 | select ARCH_MSM_SCORPIONMP | 58 | select ARCH_MSM_SCORPIONMP |
59 | select ARM_GIC | 59 | select ARM_GIC |
60 | select CPU_V7 | 60 | select CPU_V7 |
61 | select MSM_V2_TLMM | ||
62 | select MSM_GPIOMUX | 61 | select MSM_GPIOMUX |
63 | select MSM_SCM if SMP | 62 | select MSM_SCM if SMP |
63 | select MSM_V2_TLMM | ||
64 | select USE_OF | 64 | select USE_OF |
65 | 65 | ||
66 | config MSM_HAS_DEBUG_UART_HS | 66 | config MSM_HAS_DEBUG_UART_HS |
@@ -110,8 +110,8 @@ config MACH_QSD8X50_SURF | |||
110 | 110 | ||
111 | config MACH_QSD8X50A_ST1_5 | 111 | config MACH_QSD8X50A_ST1_5 |
112 | depends on ARCH_QSD8X50 | 112 | depends on ARCH_QSD8X50 |
113 | select MSM_SOC_REV_A | ||
114 | bool "QSD8x50A ST1.5" | 113 | bool "QSD8x50A ST1.5" |
114 | select MSM_SOC_REV_A | ||
115 | help | 115 | help |
116 | Support for the Qualcomm ST1.5. | 116 | Support for the Qualcomm ST1.5. |
117 | 117 | ||
diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig index 365879b47c0..c744946ef02 100644 --- a/arch/arm/mach-nomadik/Kconfig +++ b/arch/arm/mach-nomadik/Kconfig | |||
@@ -4,8 +4,8 @@ menu "Nomadik boards" | |||
4 | 4 | ||
5 | config MACH_NOMADIK_8815NHK | 5 | config MACH_NOMADIK_8815NHK |
6 | bool "ST 8815 Nomadik Hardware Kit (evaluation board)" | 6 | bool "ST 8815 Nomadik Hardware Kit (evaluation board)" |
7 | select NOMADIK_8815 | ||
8 | select HAS_MTU | 7 | select HAS_MTU |
8 | select NOMADIK_8815 | ||
9 | 9 | ||
10 | endmenu | 10 | endmenu |
11 | 11 | ||
@@ -16,7 +16,7 @@ config I2C_BITBANG_8815NHK | |||
16 | tristate "Driver for bit-bang busses found on the 8815 NHK" | 16 | tristate "Driver for bit-bang busses found on the 8815 NHK" |
17 | depends on I2C && MACH_NOMADIK_8815NHK | 17 | depends on I2C && MACH_NOMADIK_8815NHK |
18 | depends on PINCTRL_NOMADIK | 18 | depends on PINCTRL_NOMADIK |
19 | select I2C_ALGOBIT | ||
20 | default y | 19 | default y |
20 | select I2C_ALGOBIT | ||
21 | 21 | ||
22 | endif | 22 | endif |
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig index cba3f7191cf..903da8eb886 100644 --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig | |||
@@ -8,15 +8,15 @@ comment "OMAP Core Type" | |||
8 | config ARCH_OMAP730 | 8 | config ARCH_OMAP730 |
9 | depends on ARCH_OMAP1 | 9 | depends on ARCH_OMAP1 |
10 | bool "OMAP730 Based System" | 10 | bool "OMAP730 Based System" |
11 | select ARCH_OMAP_OTG | ||
11 | select CPU_ARM926T | 12 | select CPU_ARM926T |
12 | select OMAP_MPU_TIMER | 13 | select OMAP_MPU_TIMER |
13 | select ARCH_OMAP_OTG | ||
14 | 14 | ||
15 | config ARCH_OMAP850 | 15 | config ARCH_OMAP850 |
16 | depends on ARCH_OMAP1 | 16 | depends on ARCH_OMAP1 |
17 | bool "OMAP850 Based System" | 17 | bool "OMAP850 Based System" |
18 | select CPU_ARM926T | ||
19 | select ARCH_OMAP_OTG | 18 | select ARCH_OMAP_OTG |
19 | select CPU_ARM926T | ||
20 | 20 | ||
21 | config ARCH_OMAP15XX | 21 | config ARCH_OMAP15XX |
22 | depends on ARCH_OMAP1 | 22 | depends on ARCH_OMAP1 |
@@ -28,8 +28,8 @@ config ARCH_OMAP15XX | |||
28 | config ARCH_OMAP16XX | 28 | config ARCH_OMAP16XX |
29 | depends on ARCH_OMAP1 | 29 | depends on ARCH_OMAP1 |
30 | bool "OMAP16xx Based System" | 30 | bool "OMAP16xx Based System" |
31 | select CPU_ARM926T | ||
32 | select ARCH_OMAP_OTG | 31 | select ARCH_OMAP_OTG |
32 | select CPU_ARM926T | ||
33 | 33 | ||
34 | comment "OMAP Board Type" | 34 | comment "OMAP Board Type" |
35 | depends on ARCH_OMAP1 | 35 | depends on ARCH_OMAP1 |
@@ -132,8 +132,8 @@ config MACH_OMAP_PALMTT | |||
132 | 132 | ||
133 | config MACH_SX1 | 133 | config MACH_SX1 |
134 | bool "Siemens SX1" | 134 | bool "Siemens SX1" |
135 | select I2C | ||
136 | depends on ARCH_OMAP1 && ARCH_OMAP15XX | 135 | depends on ARCH_OMAP1 && ARCH_OMAP15XX |
136 | select I2C | ||
137 | help | 137 | help |
138 | Support for the Siemens SX1 phone. To boot the kernel, | 138 | Support for the Siemens SX1 phone. To boot the kernel, |
139 | you'll need a SX1 compatible bootloader; check out | 139 | you'll need a SX1 compatible bootloader; check out |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index a6219eaf1f6..2a1a898c7f9 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -6,19 +6,19 @@ config ARCH_OMAP2PLUS_TYPICAL | |||
6 | bool "Typical OMAP configuration" | 6 | bool "Typical OMAP configuration" |
7 | default y | 7 | default y |
8 | select AEABI | 8 | select AEABI |
9 | select REGULATOR | 9 | select HIGHMEM |
10 | select PM_RUNTIME | ||
11 | select VFP | ||
12 | select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5 | ||
13 | select SERIAL_OMAP | ||
14 | select SERIAL_OMAP_CONSOLE | ||
15 | select I2C | 10 | select I2C |
16 | select I2C_OMAP | 11 | select I2C_OMAP |
17 | select MENELAUS if ARCH_OMAP2 | 12 | select MENELAUS if ARCH_OMAP2 |
13 | select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5 | ||
14 | select PINCTRL | ||
15 | select PM_RUNTIME | ||
16 | select REGULATOR | ||
17 | select SERIAL_OMAP | ||
18 | select SERIAL_OMAP_CONSOLE | ||
18 | select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4 | 19 | select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4 |
19 | select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4 | 20 | select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4 |
20 | select HIGHMEM | 21 | select VFP |
21 | select PINCTRL | ||
22 | help | 22 | help |
23 | Compile a kernel suitable for booting most boards | 23 | Compile a kernel suitable for booting most boards |
24 | 24 | ||
@@ -40,44 +40,44 @@ config ARCH_OMAP3 | |||
40 | bool "TI OMAP3" | 40 | bool "TI OMAP3" |
41 | depends on ARCH_OMAP2PLUS | 41 | depends on ARCH_OMAP2PLUS |
42 | default y | 42 | default y |
43 | select CPU_V7 | ||
44 | select USB_ARCH_HAS_EHCI if USB_SUPPORT | ||
45 | select ARCH_HAS_OPP | 43 | select ARCH_HAS_OPP |
46 | select PM_RUNTIME if CPU_IDLE | ||
47 | select PM_OPP if PM | ||
48 | select ARM_CPU_SUSPEND if PM | 44 | select ARM_CPU_SUSPEND if PM |
45 | select CPU_V7 | ||
49 | select MULTI_IRQ_HANDLER | 46 | select MULTI_IRQ_HANDLER |
50 | select SOC_HAS_OMAP2_SDRC | ||
51 | select OMAP_INTERCONNECT | 47 | select OMAP_INTERCONNECT |
48 | select PM_OPP if PM | ||
49 | select PM_RUNTIME if CPU_IDLE | ||
50 | select SOC_HAS_OMAP2_SDRC | ||
51 | select USB_ARCH_HAS_EHCI if USB_SUPPORT | ||
52 | 52 | ||
53 | config ARCH_OMAP4 | 53 | config ARCH_OMAP4 |
54 | bool "TI OMAP4" | 54 | bool "TI OMAP4" |
55 | default y | 55 | default y |
56 | depends on ARCH_OMAP2PLUS | 56 | depends on ARCH_OMAP2PLUS |
57 | select ARCH_HAS_OPP | ||
58 | select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP | ||
59 | select ARM_CPU_SUSPEND if PM | ||
60 | select ARM_ERRATA_720789 | ||
61 | select ARM_GIC | ||
57 | select CACHE_L2X0 | 62 | select CACHE_L2X0 |
58 | select CPU_V7 | 63 | select CPU_V7 |
59 | select ARM_GIC | ||
60 | select HAVE_SMP | 64 | select HAVE_SMP |
61 | select LOCAL_TIMERS if SMP | 65 | select LOCAL_TIMERS if SMP |
66 | select OMAP_INTERCONNECT | ||
62 | select PL310_ERRATA_588369 | 67 | select PL310_ERRATA_588369 |
63 | select PL310_ERRATA_727915 | 68 | select PL310_ERRATA_727915 |
64 | select ARM_ERRATA_720789 | ||
65 | select ARCH_HAS_OPP | ||
66 | select PM_RUNTIME if CPU_IDLE | ||
67 | select PM_OPP if PM | 69 | select PM_OPP if PM |
70 | select PM_RUNTIME if CPU_IDLE | ||
68 | select USB_ARCH_HAS_EHCI if USB_SUPPORT | 71 | select USB_ARCH_HAS_EHCI if USB_SUPPORT |
69 | select ARM_CPU_SUSPEND if PM | ||
70 | select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP | ||
71 | select OMAP_INTERCONNECT | ||
72 | 72 | ||
73 | config SOC_OMAP5 | 73 | config SOC_OMAP5 |
74 | bool "TI OMAP5" | 74 | bool "TI OMAP5" |
75 | select CPU_V7 | 75 | select ARM_ARCH_TIMER |
76 | select ARM_CPU_SUSPEND if PM | ||
76 | select ARM_GIC | 77 | select ARM_GIC |
78 | select CPU_V7 | ||
77 | select HAVE_SMP | 79 | select HAVE_SMP |
78 | select ARM_CPU_SUSPEND if PM | ||
79 | select SOC_HAS_REALTIME_COUNTER | 80 | select SOC_HAS_REALTIME_COUNTER |
80 | select ARM_ARCH_TIMER | ||
81 | 81 | ||
82 | comment "OMAP Core Type" | 82 | comment "OMAP Core Type" |
83 | depends on ARCH_OMAP2 | 83 | depends on ARCH_OMAP2 |
@@ -109,8 +109,8 @@ config SOC_TI81XX | |||
109 | config SOC_AM33XX | 109 | config SOC_AM33XX |
110 | bool "AM33XX support" | 110 | bool "AM33XX support" |
111 | default y | 111 | default y |
112 | select CPU_V7 | ||
113 | select ARM_CPU_SUSPEND if PM | 112 | select ARM_CPU_SUSPEND if PM |
113 | select CPU_V7 | ||
114 | select MULTI_IRQ_HANDLER | 114 | select MULTI_IRQ_HANDLER |
115 | 115 | ||
116 | config OMAP_PACKAGE_ZAF | 116 | config OMAP_PACKAGE_ZAF |
@@ -157,8 +157,8 @@ config MACH_OMAP_H4 | |||
157 | bool "OMAP 2420 H4 board" | 157 | bool "OMAP 2420 H4 board" |
158 | depends on SOC_OMAP2420 | 158 | depends on SOC_OMAP2420 |
159 | default y | 159 | default y |
160 | select OMAP_PACKAGE_ZAF | ||
161 | select OMAP_DEBUG_DEVICES | 160 | select OMAP_DEBUG_DEVICES |
161 | select OMAP_PACKAGE_ZAF | ||
162 | 162 | ||
163 | config MACH_OMAP_APOLLON | 163 | config MACH_OMAP_APOLLON |
164 | bool "OMAP 2420 Apollon board" | 164 | bool "OMAP 2420 Apollon board" |
@@ -193,8 +193,8 @@ config MACH_OMAP_LDP | |||
193 | config MACH_OMAP3530_LV_SOM | 193 | config MACH_OMAP3530_LV_SOM |
194 | bool "OMAP3 Logic 3530 LV SOM board" | 194 | bool "OMAP3 Logic 3530 LV SOM board" |
195 | depends on ARCH_OMAP3 | 195 | depends on ARCH_OMAP3 |
196 | select OMAP_PACKAGE_CBB | ||
197 | default y | 196 | default y |
197 | select OMAP_PACKAGE_CBB | ||
198 | help | 198 | help |
199 | Support for the LogicPD OMAP3530 SOM Development kit | 199 | Support for the LogicPD OMAP3530 SOM Development kit |
200 | for full description please see the products webpage at | 200 | for full description please see the products webpage at |
@@ -203,8 +203,8 @@ config MACH_OMAP3530_LV_SOM | |||
203 | config MACH_OMAP3_TORPEDO | 203 | config MACH_OMAP3_TORPEDO |
204 | bool "OMAP3 Logic 35x Torpedo board" | 204 | bool "OMAP3 Logic 35x Torpedo board" |
205 | depends on ARCH_OMAP3 | 205 | depends on ARCH_OMAP3 |
206 | select OMAP_PACKAGE_CBB | ||
207 | default y | 206 | default y |
207 | select OMAP_PACKAGE_CBB | ||
208 | help | 208 | help |
209 | Support for the LogicPD OMAP35x Torpedo Development kit | 209 | Support for the LogicPD OMAP35x Torpedo Development kit |
210 | for full description please see the products webpage at | 210 | for full description please see the products webpage at |
@@ -265,17 +265,17 @@ config MACH_NOKIA_N8X0 | |||
265 | bool "Nokia N800/N810" | 265 | bool "Nokia N800/N810" |
266 | depends on SOC_OMAP2420 | 266 | depends on SOC_OMAP2420 |
267 | default y | 267 | default y |
268 | select OMAP_PACKAGE_ZAC | ||
269 | select MACH_NOKIA_N800 | 268 | select MACH_NOKIA_N800 |
270 | select MACH_NOKIA_N810 | 269 | select MACH_NOKIA_N810 |
271 | select MACH_NOKIA_N810_WIMAX | 270 | select MACH_NOKIA_N810_WIMAX |
271 | select OMAP_PACKAGE_ZAC | ||
272 | 272 | ||
273 | config MACH_NOKIA_RM680 | 273 | config MACH_NOKIA_RM680 |
274 | bool "Nokia RM-680/696 board" | 274 | bool "Nokia RM-680/696 board" |
275 | depends on ARCH_OMAP3 | 275 | depends on ARCH_OMAP3 |
276 | default y | 276 | default y |
277 | select OMAP_PACKAGE_CBB | ||
278 | select MACH_NOKIA_RM696 | 277 | select MACH_NOKIA_RM696 |
278 | select OMAP_PACKAGE_CBB | ||
279 | 279 | ||
280 | config MACH_NOKIA_RX51 | 280 | config MACH_NOKIA_RX51 |
281 | bool "Nokia RX-51 board" | 281 | bool "Nokia RX-51 board" |
@@ -288,20 +288,20 @@ config MACH_OMAP_ZOOM2 | |||
288 | depends on ARCH_OMAP3 | 288 | depends on ARCH_OMAP3 |
289 | default y | 289 | default y |
290 | select OMAP_PACKAGE_CBB | 290 | select OMAP_PACKAGE_CBB |
291 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
291 | select SERIAL_8250 | 292 | select SERIAL_8250 |
292 | select SERIAL_CORE_CONSOLE | ||
293 | select SERIAL_8250_CONSOLE | 293 | select SERIAL_8250_CONSOLE |
294 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 294 | select SERIAL_CORE_CONSOLE |
295 | 295 | ||
296 | config MACH_OMAP_ZOOM3 | 296 | config MACH_OMAP_ZOOM3 |
297 | bool "OMAP3630 Zoom3 board" | 297 | bool "OMAP3630 Zoom3 board" |
298 | depends on ARCH_OMAP3 | 298 | depends on ARCH_OMAP3 |
299 | default y | 299 | default y |
300 | select OMAP_PACKAGE_CBP | 300 | select OMAP_PACKAGE_CBP |
301 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
301 | select SERIAL_8250 | 302 | select SERIAL_8250 |
302 | select SERIAL_CORE_CONSOLE | ||
303 | select SERIAL_8250_CONSOLE | 303 | select SERIAL_8250_CONSOLE |
304 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 304 | select SERIAL_CORE_CONSOLE |
305 | 305 | ||
306 | config MACH_CM_T35 | 306 | config MACH_CM_T35 |
307 | bool "CompuLab CM-T35/CM-T3730 modules" | 307 | bool "CompuLab CM-T35/CM-T3730 modules" |
@@ -329,8 +329,8 @@ config MACH_IGEP0030 | |||
329 | bool "IGEP OMAP3 module" | 329 | bool "IGEP OMAP3 module" |
330 | depends on ARCH_OMAP3 | 330 | depends on ARCH_OMAP3 |
331 | default y | 331 | default y |
332 | select OMAP_PACKAGE_CBB | ||
333 | select MACH_IGEP0020 | 332 | select MACH_IGEP0020 |
333 | select OMAP_PACKAGE_CBB | ||
334 | 334 | ||
335 | config MACH_SBC3530 | 335 | config MACH_SBC3530 |
336 | bool "OMAP3 SBC STALKER board" | 336 | bool "OMAP3 SBC STALKER board" |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 5ff28afbefe..3669c120c7e 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -607,29 +607,6 @@ static void __init omap_sfh7741prox_init(void) | |||
607 | __func__, OMAP4_SFH7741_ENABLE_GPIO, error); | 607 | __func__, OMAP4_SFH7741_ENABLE_GPIO, error); |
608 | } | 608 | } |
609 | 609 | ||
610 | static struct gpio sdp4430_hdmi_gpios[] = { | ||
611 | { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, | ||
612 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, | ||
613 | { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" }, | ||
614 | }; | ||
615 | |||
616 | static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) | ||
617 | { | ||
618 | int status; | ||
619 | |||
620 | status = gpio_request_array(sdp4430_hdmi_gpios, | ||
621 | ARRAY_SIZE(sdp4430_hdmi_gpios)); | ||
622 | if (status) | ||
623 | pr_err("%s: Cannot request HDMI GPIOs\n", __func__); | ||
624 | |||
625 | return status; | ||
626 | } | ||
627 | |||
628 | static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev) | ||
629 | { | ||
630 | gpio_free_array(sdp4430_hdmi_gpios, ARRAY_SIZE(sdp4430_hdmi_gpios)); | ||
631 | } | ||
632 | |||
633 | static struct nokia_dsi_panel_data dsi1_panel = { | 610 | static struct nokia_dsi_panel_data dsi1_panel = { |
634 | .name = "taal", | 611 | .name = "taal", |
635 | .reset_gpio = 102, | 612 | .reset_gpio = 102, |
@@ -650,29 +627,6 @@ static struct omap_dss_device sdp4430_lcd_device = { | |||
650 | .phy.dsi = { | 627 | .phy.dsi = { |
651 | .module = 0, | 628 | .module = 0, |
652 | }, | 629 | }, |
653 | |||
654 | .clocks = { | ||
655 | .dispc = { | ||
656 | .channel = { | ||
657 | /* Logic Clock = 172.8 MHz */ | ||
658 | .lck_div = 1, | ||
659 | /* Pixel Clock = 34.56 MHz */ | ||
660 | .pck_div = 5, | ||
661 | .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC, | ||
662 | }, | ||
663 | .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK, | ||
664 | }, | ||
665 | |||
666 | .dsi = { | ||
667 | .regn = 16, /* Fint = 2.4 MHz */ | ||
668 | .regm = 180, /* DDR Clock = 216 MHz */ | ||
669 | .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */ | ||
670 | .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */ | ||
671 | |||
672 | .lp_clk_div = 10, /* LP Clock = 8.64 MHz */ | ||
673 | .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI, | ||
674 | }, | ||
675 | }, | ||
676 | .channel = OMAP_DSS_CHANNEL_LCD, | 630 | .channel = OMAP_DSS_CHANNEL_LCD, |
677 | }; | 631 | }; |
678 | 632 | ||
@@ -697,33 +651,12 @@ static struct omap_dss_device sdp4430_lcd2_device = { | |||
697 | 651 | ||
698 | .module = 1, | 652 | .module = 1, |
699 | }, | 653 | }, |
700 | |||
701 | .clocks = { | ||
702 | .dispc = { | ||
703 | .channel = { | ||
704 | /* Logic Clock = 172.8 MHz */ | ||
705 | .lck_div = 1, | ||
706 | /* Pixel Clock = 34.56 MHz */ | ||
707 | .pck_div = 5, | ||
708 | .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC, | ||
709 | }, | ||
710 | .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK, | ||
711 | }, | ||
712 | |||
713 | .dsi = { | ||
714 | .regn = 16, /* Fint = 2.4 MHz */ | ||
715 | .regm = 180, /* DDR Clock = 216 MHz */ | ||
716 | .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */ | ||
717 | .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */ | ||
718 | |||
719 | .lp_clk_div = 10, /* LP Clock = 8.64 MHz */ | ||
720 | .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI, | ||
721 | }, | ||
722 | }, | ||
723 | .channel = OMAP_DSS_CHANNEL_LCD2, | 654 | .channel = OMAP_DSS_CHANNEL_LCD2, |
724 | }; | 655 | }; |
725 | 656 | ||
726 | static struct omap_dss_hdmi_data sdp4430_hdmi_data = { | 657 | static struct omap_dss_hdmi_data sdp4430_hdmi_data = { |
658 | .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD, | ||
659 | .ls_oe_gpio = HDMI_GPIO_LS_OE, | ||
727 | .hpd_gpio = HDMI_GPIO_HPD, | 660 | .hpd_gpio = HDMI_GPIO_HPD, |
728 | }; | 661 | }; |
729 | 662 | ||
@@ -731,8 +664,6 @@ static struct omap_dss_device sdp4430_hdmi_device = { | |||
731 | .name = "hdmi", | 664 | .name = "hdmi", |
732 | .driver_name = "hdmi_panel", | 665 | .driver_name = "hdmi_panel", |
733 | .type = OMAP_DISPLAY_TYPE_HDMI, | 666 | .type = OMAP_DISPLAY_TYPE_HDMI, |
734 | .platform_enable = sdp4430_panel_enable_hdmi, | ||
735 | .platform_disable = sdp4430_panel_disable_hdmi, | ||
736 | .channel = OMAP_DSS_CHANNEL_DIGIT, | 667 | .channel = OMAP_DSS_CHANNEL_DIGIT, |
737 | .data = &sdp4430_hdmi_data, | 668 | .data = &sdp4430_hdmi_data, |
738 | }; | 669 | }; |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index f62b903f3ea..bfcd397e233 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -428,30 +428,9 @@ static struct omap_dss_device omap4_panda_dvi_device = { | |||
428 | .channel = OMAP_DSS_CHANNEL_LCD2, | 428 | .channel = OMAP_DSS_CHANNEL_LCD2, |
429 | }; | 429 | }; |
430 | 430 | ||
431 | static struct gpio panda_hdmi_gpios[] = { | ||
432 | { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, | ||
433 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, | ||
434 | { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" }, | ||
435 | }; | ||
436 | |||
437 | static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) | ||
438 | { | ||
439 | int status; | ||
440 | |||
441 | status = gpio_request_array(panda_hdmi_gpios, | ||
442 | ARRAY_SIZE(panda_hdmi_gpios)); | ||
443 | if (status) | ||
444 | pr_err("Cannot request HDMI GPIOs\n"); | ||
445 | |||
446 | return status; | ||
447 | } | ||
448 | |||
449 | static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev) | ||
450 | { | ||
451 | gpio_free_array(panda_hdmi_gpios, ARRAY_SIZE(panda_hdmi_gpios)); | ||
452 | } | ||
453 | |||
454 | static struct omap_dss_hdmi_data omap4_panda_hdmi_data = { | 431 | static struct omap_dss_hdmi_data omap4_panda_hdmi_data = { |
432 | .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD, | ||
433 | .ls_oe_gpio = HDMI_GPIO_LS_OE, | ||
455 | .hpd_gpio = HDMI_GPIO_HPD, | 434 | .hpd_gpio = HDMI_GPIO_HPD, |
456 | }; | 435 | }; |
457 | 436 | ||
@@ -459,8 +438,6 @@ static struct omap_dss_device omap4_panda_hdmi_device = { | |||
459 | .name = "hdmi", | 438 | .name = "hdmi", |
460 | .driver_name = "hdmi_panel", | 439 | .driver_name = "hdmi_panel", |
461 | .type = OMAP_DISPLAY_TYPE_HDMI, | 440 | .type = OMAP_DISPLAY_TYPE_HDMI, |
462 | .platform_enable = omap4_panda_panel_enable_hdmi, | ||
463 | .platform_disable = omap4_panda_panel_disable_hdmi, | ||
464 | .channel = OMAP_DSS_CHANNEL_DIGIT, | 441 | .channel = OMAP_DSS_CHANNEL_DIGIT, |
465 | .data = &omap4_panda_hdmi_data, | 442 | .data = &omap4_panda_hdmi_data, |
466 | }; | 443 | }; |
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index a51ece491b9..1011995f150 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -95,7 +95,6 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = { | |||
95 | { "dss_core", "omapdss_dss", -1 }, | 95 | { "dss_core", "omapdss_dss", -1 }, |
96 | { "dss_dispc", "omapdss_dispc", -1 }, | 96 | { "dss_dispc", "omapdss_dispc", -1 }, |
97 | { "dss_rfbi", "omapdss_rfbi", -1 }, | 97 | { "dss_rfbi", "omapdss_rfbi", -1 }, |
98 | { "dss_venc", "omapdss_venc", -1 }, | ||
99 | { "dss_dsi1", "omapdss_dsi", 0 }, | 98 | { "dss_dsi1", "omapdss_dsi", 0 }, |
100 | { "dss_dsi2", "omapdss_dsi", 1 }, | 99 | { "dss_dsi2", "omapdss_dsi", 1 }, |
101 | { "dss_hdmi", "omapdss_hdmi", -1 }, | 100 | { "dss_hdmi", "omapdss_hdmi", -1 }, |
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index d83ae4540b9..635e109f5ad 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -239,6 +239,10 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, | |||
239 | static struct twl4030_usb_data omap4_usb_pdata = { | 239 | static struct twl4030_usb_data omap4_usb_pdata = { |
240 | }; | 240 | }; |
241 | 241 | ||
242 | static struct regulator_consumer_supply omap4_vdda_hdmi_dac_supplies[] = { | ||
243 | REGULATOR_SUPPLY("vdda_hdmi_dac", "omapdss_hdmi"), | ||
244 | }; | ||
245 | |||
242 | static struct regulator_init_data omap4_vdac_idata = { | 246 | static struct regulator_init_data omap4_vdac_idata = { |
243 | .constraints = { | 247 | .constraints = { |
244 | .min_uV = 1800000, | 248 | .min_uV = 1800000, |
@@ -248,6 +252,8 @@ static struct regulator_init_data omap4_vdac_idata = { | |||
248 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 252 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
249 | | REGULATOR_CHANGE_STATUS, | 253 | | REGULATOR_CHANGE_STATUS, |
250 | }, | 254 | }, |
255 | .num_consumer_supplies = ARRAY_SIZE(omap4_vdda_hdmi_dac_supplies), | ||
256 | .consumer_supplies = omap4_vdda_hdmi_dac_supplies, | ||
251 | .supply_regulator = "V2V1", | 257 | .supply_regulator = "V2V1", |
252 | }; | 258 | }; |
253 | 259 | ||
diff --git a/arch/arm/mach-prima2/Kconfig b/arch/arm/mach-prima2/Kconfig index 41fc8532767..558ccfb8d45 100644 --- a/arch/arm/mach-prima2/Kconfig +++ b/arch/arm/mach-prima2/Kconfig | |||
@@ -6,8 +6,8 @@ config ARCH_PRIMA2 | |||
6 | bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform" | 6 | bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform" |
7 | default y | 7 | default y |
8 | select CPU_V7 | 8 | select CPU_V7 |
9 | select ZONE_DMA | ||
10 | select SIRF_IRQ | 9 | select SIRF_IRQ |
10 | select ZONE_DMA | ||
11 | help | 11 | help |
12 | Support for CSR SiRFSoC ARM Cortex A9 Platform | 12 | Support for CSR SiRFSoC ARM Cortex A9 Platform |
13 | 13 | ||
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 8e6288de69b..11aa7399dc0 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -27,10 +27,10 @@ comment "Intel/Marvell Dev Platforms (sorted by hardware release time)" | |||
27 | 27 | ||
28 | config MACH_PXA3XX_DT | 28 | config MACH_PXA3XX_DT |
29 | bool "Support PXA3xx platforms from device tree" | 29 | bool "Support PXA3xx platforms from device tree" |
30 | select PXA3xx | ||
31 | select CPU_PXA300 | 30 | select CPU_PXA300 |
32 | select POWER_SUPPLY | ||
33 | select HAVE_PWM | 31 | select HAVE_PWM |
32 | select POWER_SUPPLY | ||
33 | select PXA3xx | ||
34 | select USE_OF | 34 | select USE_OF |
35 | help | 35 | help |
36 | Include support for Marvell PXA3xx based platforms using | 36 | Include support for Marvell PXA3xx based platforms using |
@@ -44,13 +44,13 @@ config ARCH_LUBBOCK | |||
44 | 44 | ||
45 | config MACH_MAINSTONE | 45 | config MACH_MAINSTONE |
46 | bool "Intel HCDDBBVA0 Development Platform (aka Mainstone)" | 46 | bool "Intel HCDDBBVA0 Development Platform (aka Mainstone)" |
47 | select PXA27x | ||
48 | select HAVE_PWM | 47 | select HAVE_PWM |
48 | select PXA27x | ||
49 | 49 | ||
50 | config MACH_ZYLONITE | 50 | config MACH_ZYLONITE |
51 | bool | 51 | bool |
52 | select PXA3xx | ||
53 | select HAVE_PWM | 52 | select HAVE_PWM |
53 | select PXA3xx | ||
54 | 54 | ||
55 | config MACH_ZYLONITE300 | 55 | config MACH_ZYLONITE300 |
56 | bool "PXA3xx Development Platform (aka Zylonite) PXA300/310" | 56 | bool "PXA3xx Development Platform (aka Zylonite) PXA300/310" |
@@ -65,19 +65,19 @@ config MACH_ZYLONITE320 | |||
65 | 65 | ||
66 | config MACH_LITTLETON | 66 | config MACH_LITTLETON |
67 | bool "PXA3xx Form Factor Platform (aka Littleton)" | 67 | bool "PXA3xx Form Factor Platform (aka Littleton)" |
68 | select PXA3xx | ||
69 | select CPU_PXA300 | 68 | select CPU_PXA300 |
70 | select CPU_PXA310 | 69 | select CPU_PXA310 |
70 | select PXA3xx | ||
71 | 71 | ||
72 | config MACH_TAVOREVB | 72 | config MACH_TAVOREVB |
73 | bool "PXA930 Evaluation Board (aka TavorEVB)" | 73 | bool "PXA930 Evaluation Board (aka TavorEVB)" |
74 | select PXA3xx | ||
75 | select CPU_PXA930 | 74 | select CPU_PXA930 |
75 | select PXA3xx | ||
76 | 76 | ||
77 | config MACH_SAAR | 77 | config MACH_SAAR |
78 | bool "PXA930 Handheld Platform (aka SAAR)" | 78 | bool "PXA930 Handheld Platform (aka SAAR)" |
79 | select PXA3xx | ||
80 | select CPU_PXA930 | 79 | select CPU_PXA930 |
80 | select PXA3xx | ||
81 | 81 | ||
82 | comment "Third Party Dev Platforms (sorted by vendor name)" | 82 | comment "Third Party Dev Platforms (sorted by vendor name)" |
83 | 83 | ||
@@ -87,29 +87,29 @@ config ARCH_PXA_IDP | |||
87 | 87 | ||
88 | config ARCH_VIPER | 88 | config ARCH_VIPER |
89 | bool "Arcom/Eurotech VIPER SBC" | 89 | bool "Arcom/Eurotech VIPER SBC" |
90 | select PXA25x | 90 | select ARCOM_PCMCIA |
91 | select ISA | ||
92 | select I2C_GPIO | ||
93 | select HAVE_PWM | 91 | select HAVE_PWM |
92 | select I2C_GPIO | ||
93 | select ISA | ||
94 | select PXA25x | ||
94 | select PXA_HAVE_ISA_IRQS | 95 | select PXA_HAVE_ISA_IRQS |
95 | select ARCOM_PCMCIA | ||
96 | 96 | ||
97 | config MACH_ARCOM_ZEUS | 97 | config MACH_ARCOM_ZEUS |
98 | bool "Arcom/Eurotech ZEUS SBC" | 98 | bool "Arcom/Eurotech ZEUS SBC" |
99 | select PXA27x | 99 | select ARCOM_PCMCIA |
100 | select ISA | 100 | select ISA |
101 | select PXA27x | ||
101 | select PXA_HAVE_ISA_IRQS | 102 | select PXA_HAVE_ISA_IRQS |
102 | select ARCOM_PCMCIA | ||
103 | 103 | ||
104 | config MACH_BALLOON3 | 104 | config MACH_BALLOON3 |
105 | bool "Balloon 3 board" | 105 | bool "Balloon 3 board" |
106 | select PXA27x | ||
107 | select IWMMXT | 106 | select IWMMXT |
107 | select PXA27x | ||
108 | 108 | ||
109 | config MACH_CSB726 | 109 | config MACH_CSB726 |
110 | bool "Enable Cogent CSB726 System On a Module" | 110 | bool "Enable Cogent CSB726 System On a Module" |
111 | select PXA27x | ||
112 | select IWMMXT | 111 | select IWMMXT |
112 | select PXA27x | ||
113 | help | 113 | help |
114 | Say Y here if you intend to run this kernel on a Cogent | 114 | Say Y here if you intend to run this kernel on a Cogent |
115 | CSB726 System On Module. | 115 | CSB726 System On Module. |
@@ -121,11 +121,11 @@ config CSB726_CSB701 | |||
121 | config MACH_ARMCORE | 121 | config MACH_ARMCORE |
122 | bool "CompuLab CM-X255/CM-X270 modules" | 122 | bool "CompuLab CM-X255/CM-X270 modules" |
123 | select ARCH_HAS_DMA_SET_COHERENT_MASK if PCI | 123 | select ARCH_HAS_DMA_SET_COHERENT_MASK if PCI |
124 | select PXA27x | ||
125 | select IWMMXT | 124 | select IWMMXT |
126 | select PXA25x | ||
127 | select MIGHT_HAVE_PCI | 125 | select MIGHT_HAVE_PCI |
128 | select NEED_MACH_IO_H if PCI | 126 | select NEED_MACH_IO_H if PCI |
127 | select PXA25x | ||
128 | select PXA27x | ||
129 | 129 | ||
130 | config MACH_EM_X270 | 130 | config MACH_EM_X270 |
131 | bool "CompuLab EM-x270 platform" | 131 | bool "CompuLab EM-x270 platform" |
@@ -137,10 +137,10 @@ config MACH_EXEDA | |||
137 | 137 | ||
138 | config MACH_CM_X300 | 138 | config MACH_CM_X300 |
139 | bool "CompuLab CM-X300 modules" | 139 | bool "CompuLab CM-X300 modules" |
140 | select PXA3xx | ||
141 | select CPU_PXA300 | 140 | select CPU_PXA300 |
142 | select CPU_PXA310 | 141 | select CPU_PXA310 |
143 | select HAVE_PWM | 142 | select HAVE_PWM |
143 | select PXA3xx | ||
144 | 144 | ||
145 | config MACH_CAPC7117 | 145 | config MACH_CAPC7117 |
146 | bool "Embedian CAPC-7117 evaluation kit based on the MXM-8x10 CoM" | 146 | bool "Embedian CAPC-7117 evaluation kit based on the MXM-8x10 CoM" |
@@ -168,22 +168,22 @@ endchoice | |||
168 | 168 | ||
169 | config MACH_INTELMOTE2 | 169 | config MACH_INTELMOTE2 |
170 | bool "Intel Mote 2 Platform" | 170 | bool "Intel Mote 2 Platform" |
171 | select PXA27x | ||
172 | select IWMMXT | 171 | select IWMMXT |
172 | select PXA27x | ||
173 | 173 | ||
174 | config MACH_STARGATE2 | 174 | config MACH_STARGATE2 |
175 | bool "Intel Stargate 2 Platform" | 175 | bool "Intel Stargate 2 Platform" |
176 | select PXA27x | ||
177 | select IWMMXT | 176 | select IWMMXT |
177 | select PXA27x | ||
178 | 178 | ||
179 | config MACH_XCEP | 179 | config MACH_XCEP |
180 | bool "Iskratel Electronics XCEP" | 180 | bool "Iskratel Electronics XCEP" |
181 | select PXA25x | ||
182 | select MTD | 181 | select MTD |
183 | select MTD_PHYSMAP | ||
184 | select MTD_CFI_INTELEXT | ||
185 | select MTD_CFI | 182 | select MTD_CFI |
183 | select MTD_CFI_INTELEXT | ||
186 | select MTD_CHAR | 184 | select MTD_CHAR |
185 | select MTD_PHYSMAP | ||
186 | select PXA25x | ||
187 | select SMC91X | 187 | select SMC91X |
188 | help | 188 | help |
189 | PXA255 based Single Board Computer with SMC 91C111 ethernet chip and 64 MB of flash. | 189 | PXA255 based Single Board Computer with SMC 91C111 ethernet chip and 64 MB of flash. |
@@ -195,14 +195,14 @@ config TRIZEPS_PXA | |||
195 | config MACH_TRIZEPS4 | 195 | config MACH_TRIZEPS4 |
196 | bool "Keith und Koep Trizeps4 DIMM-Module" | 196 | bool "Keith und Koep Trizeps4 DIMM-Module" |
197 | depends on TRIZEPS_PXA | 197 | depends on TRIZEPS_PXA |
198 | select TRIZEPS_PCMCIA | ||
199 | select PXA27x | 198 | select PXA27x |
199 | select TRIZEPS_PCMCIA | ||
200 | 200 | ||
201 | config MACH_TRIZEPS4WL | 201 | config MACH_TRIZEPS4WL |
202 | bool "Keith und Koep Trizeps4-WL DIMM-Module" | 202 | bool "Keith und Koep Trizeps4-WL DIMM-Module" |
203 | depends on TRIZEPS_PXA | 203 | depends on TRIZEPS_PXA |
204 | select TRIZEPS_PCMCIA | ||
205 | select PXA27x | 204 | select PXA27x |
205 | select TRIZEPS_PCMCIA | ||
206 | 206 | ||
207 | choice | 207 | choice |
208 | prompt "Select base board for Trizeps module" | 208 | prompt "Select base board for Trizeps module" |
@@ -231,18 +231,18 @@ config TRIZEPS_PCMCIA | |||
231 | 231 | ||
232 | config MACH_LOGICPD_PXA270 | 232 | config MACH_LOGICPD_PXA270 |
233 | bool "LogicPD PXA270 Card Engine Development Platform" | 233 | bool "LogicPD PXA270 Card Engine Development Platform" |
234 | select PXA27x | ||
235 | select HAVE_PWM | 234 | select HAVE_PWM |
235 | select PXA27x | ||
236 | 236 | ||
237 | config MACH_PCM027 | 237 | config MACH_PCM027 |
238 | bool "Phytec phyCORE-PXA270 CPU module (PCM-027)" | 238 | bool "Phytec phyCORE-PXA270 CPU module (PCM-027)" |
239 | select PXA27x | ||
240 | select IWMMXT | 239 | select IWMMXT |
240 | select PXA27x | ||
241 | 241 | ||
242 | config MACH_PCM990_BASEBOARD | 242 | config MACH_PCM990_BASEBOARD |
243 | bool "PHYTEC PCM-990 development board" | 243 | bool "PHYTEC PCM-990 development board" |
244 | select HAVE_PWM | ||
245 | depends on MACH_PCM027 | 244 | depends on MACH_PCM027 |
245 | select HAVE_PWM | ||
246 | 246 | ||
247 | choice | 247 | choice |
248 | prompt "display on pcm990" | 248 | prompt "display on pcm990" |
@@ -266,19 +266,19 @@ config MACH_COLIBRI | |||
266 | config MACH_COLIBRI_PXA270_INCOME | 266 | config MACH_COLIBRI_PXA270_INCOME |
267 | bool "Income s.r.o. PXA270 SBC" | 267 | bool "Income s.r.o. PXA270 SBC" |
268 | depends on MACH_COLIBRI | 268 | depends on MACH_COLIBRI |
269 | select PXA27x | ||
270 | select HAVE_PWM | 269 | select HAVE_PWM |
270 | select PXA27x | ||
271 | 271 | ||
272 | config MACH_COLIBRI300 | 272 | config MACH_COLIBRI300 |
273 | bool "Toradex Colibri PXA300/310" | 273 | bool "Toradex Colibri PXA300/310" |
274 | select PXA3xx | ||
275 | select CPU_PXA300 | 274 | select CPU_PXA300 |
276 | select CPU_PXA310 | 275 | select CPU_PXA310 |
276 | select PXA3xx | ||
277 | 277 | ||
278 | config MACH_COLIBRI320 | 278 | config MACH_COLIBRI320 |
279 | bool "Toradex Colibri PXA320" | 279 | bool "Toradex Colibri PXA320" |
280 | select PXA3xx | ||
281 | select CPU_PXA320 | 280 | select CPU_PXA320 |
281 | select PXA3xx | ||
282 | 282 | ||
283 | config MACH_COLIBRI_EVALBOARD | 283 | config MACH_COLIBRI_EVALBOARD |
284 | bool "Toradex Colibri Evaluation Carrier Board support" | 284 | bool "Toradex Colibri Evaluation Carrier Board support" |
@@ -286,8 +286,8 @@ config MACH_COLIBRI_EVALBOARD | |||
286 | 286 | ||
287 | config MACH_VPAC270 | 287 | config MACH_VPAC270 |
288 | bool "Voipac PXA270" | 288 | bool "Voipac PXA270" |
289 | select PXA27x | ||
290 | select HAVE_PATA_PLATFORM | 289 | select HAVE_PATA_PLATFORM |
290 | select PXA27x | ||
291 | help | 291 | help |
292 | PXA270 based Single Board Computer. | 292 | PXA270 based Single Board Computer. |
293 | 293 | ||
@@ -295,9 +295,9 @@ comment "End-user Products (sorted by vendor name)" | |||
295 | 295 | ||
296 | config MACH_H4700 | 296 | config MACH_H4700 |
297 | bool "HP iPAQ hx4700" | 297 | bool "HP iPAQ hx4700" |
298 | select PXA27x | ||
299 | select IWMMXT | ||
300 | select HAVE_PWM | 298 | select HAVE_PWM |
299 | select IWMMXT | ||
300 | select PXA27x | ||
301 | 301 | ||
302 | config MACH_H5000 | 302 | config MACH_H5000 |
303 | bool "HP iPAQ h5000" | 303 | bool "HP iPAQ h5000" |
@@ -309,16 +309,16 @@ config MACH_HIMALAYA | |||
309 | 309 | ||
310 | config MACH_MAGICIAN | 310 | config MACH_MAGICIAN |
311 | bool "Enable HTC Magician Support" | 311 | bool "Enable HTC Magician Support" |
312 | select PXA27x | ||
313 | select IWMMXT | ||
314 | select HAVE_PWM | 312 | select HAVE_PWM |
313 | select IWMMXT | ||
314 | select PXA27x | ||
315 | 315 | ||
316 | config MACH_MIOA701 | 316 | config MACH_MIOA701 |
317 | bool "Mitac Mio A701 Support" | 317 | bool "Mitac Mio A701 Support" |
318 | select PXA27x | ||
319 | select IWMMXT | ||
320 | select HAVE_PWM | ||
321 | select GPIO_SYSFS | 318 | select GPIO_SYSFS |
319 | select HAVE_PWM | ||
320 | select IWMMXT | ||
321 | select PXA27x | ||
322 | help | 322 | help |
323 | Say Y here if you intend to run this kernel on a | 323 | Say Y here if you intend to run this kernel on a |
324 | MIO A701. Currently there is only basic support | 324 | MIO A701. Currently there is only basic support |
@@ -326,9 +326,9 @@ config MACH_MIOA701 | |||
326 | 326 | ||
327 | config PXA_EZX | 327 | config PXA_EZX |
328 | bool "Motorola EZX Platform" | 328 | bool "Motorola EZX Platform" |
329 | select PXA27x | ||
330 | select IWMMXT | ||
331 | select HAVE_PWM | 329 | select HAVE_PWM |
330 | select IWMMXT | ||
331 | select PXA27x | ||
332 | 332 | ||
333 | config MACH_EZX_A780 | 333 | config MACH_EZX_A780 |
334 | bool "Motorola EZX A780" | 334 | bool "Motorola EZX A780" |
@@ -393,9 +393,9 @@ config MACH_PALMT5 | |||
393 | bool "Palm Tungsten|T5" | 393 | bool "Palm Tungsten|T5" |
394 | default y | 394 | default y |
395 | depends on ARCH_PXA_PALM | 395 | depends on ARCH_PXA_PALM |
396 | select PXA27x | ||
397 | select IWMMXT | 396 | select IWMMXT |
398 | select MACH_PALM27X | 397 | select MACH_PALM27X |
398 | select PXA27x | ||
399 | help | 399 | help |
400 | Say Y here if you intend to run this kernel on a Palm Tungsten|T5 | 400 | Say Y here if you intend to run this kernel on a Palm Tungsten|T5 |
401 | handheld computer. | 401 | handheld computer. |
@@ -404,9 +404,9 @@ config MACH_PALMTX | |||
404 | bool "Palm T|X" | 404 | bool "Palm T|X" |
405 | default y | 405 | default y |
406 | depends on ARCH_PXA_PALM | 406 | depends on ARCH_PXA_PALM |
407 | select PXA27x | ||
408 | select IWMMXT | 407 | select IWMMXT |
409 | select MACH_PALM27X | 408 | select MACH_PALM27X |
409 | select PXA27x | ||
410 | help | 410 | help |
411 | Say Y here if you intend to run this kernel on a Palm T|X | 411 | Say Y here if you intend to run this kernel on a Palm T|X |
412 | handheld computer. | 412 | handheld computer. |
@@ -415,9 +415,9 @@ config MACH_PALMZ72 | |||
415 | bool "Palm Zire 72" | 415 | bool "Palm Zire 72" |
416 | default y | 416 | default y |
417 | depends on ARCH_PXA_PALM | 417 | depends on ARCH_PXA_PALM |
418 | select PXA27x | ||
419 | select IWMMXT | 418 | select IWMMXT |
420 | select MACH_PALM27X | 419 | select MACH_PALM27X |
420 | select PXA27x | ||
421 | help | 421 | help |
422 | Say Y here if you intend to run this kernel on Palm Zire 72 | 422 | Say Y here if you intend to run this kernel on Palm Zire 72 |
423 | handheld computer. | 423 | handheld computer. |
@@ -426,9 +426,9 @@ config MACH_PALMLD | |||
426 | bool "Palm LifeDrive" | 426 | bool "Palm LifeDrive" |
427 | default y | 427 | default y |
428 | depends on ARCH_PXA_PALM | 428 | depends on ARCH_PXA_PALM |
429 | select PXA27x | ||
430 | select IWMMXT | 429 | select IWMMXT |
431 | select MACH_PALM27X | 430 | select MACH_PALM27X |
431 | select PXA27x | ||
432 | help | 432 | help |
433 | Say Y here if you intend to run this kernel on a Palm LifeDrive | 433 | Say Y here if you intend to run this kernel on a Palm LifeDrive |
434 | handheld computer. | 434 | handheld computer. |
@@ -441,10 +441,10 @@ config MACH_CENTRO | |||
441 | bool "Palm Centro 685 (GSM)" | 441 | bool "Palm Centro 685 (GSM)" |
442 | default y | 442 | default y |
443 | depends on ARCH_PXA_PALM | 443 | depends on ARCH_PXA_PALM |
444 | select MACH_PALM27X | ||
445 | select PXA27x | ||
446 | select IWMMXT | 444 | select IWMMXT |
445 | select MACH_PALM27X | ||
447 | select PALM_TREO | 446 | select PALM_TREO |
447 | select PXA27x | ||
448 | help | 448 | help |
449 | Say Y here if you intend to run this kernel on Palm Centro 685 (GSM) | 449 | Say Y here if you intend to run this kernel on Palm Centro 685 (GSM) |
450 | smartphone. | 450 | smartphone. |
@@ -453,37 +453,37 @@ config MACH_TREO680 | |||
453 | bool "Palm Treo 680" | 453 | bool "Palm Treo 680" |
454 | default y | 454 | default y |
455 | depends on ARCH_PXA_PALM | 455 | depends on ARCH_PXA_PALM |
456 | select MACH_PALM27X | ||
457 | select PXA27x | ||
458 | select IWMMXT | 456 | select IWMMXT |
457 | select MACH_PALM27X | ||
459 | select PALM_TREO | 458 | select PALM_TREO |
459 | select PXA27x | ||
460 | help | 460 | help |
461 | Say Y here if you intend to run this kernel on Palm Treo 680 | 461 | Say Y here if you intend to run this kernel on Palm Treo 680 |
462 | smartphone. | 462 | smartphone. |
463 | 463 | ||
464 | config MACH_RAUMFELD_RC | 464 | config MACH_RAUMFELD_RC |
465 | bool "Raumfeld Controller" | 465 | bool "Raumfeld Controller" |
466 | select PXA3xx | ||
467 | select CPU_PXA300 | 466 | select CPU_PXA300 |
468 | select POWER_SUPPLY | ||
469 | select HAVE_PWM | 467 | select HAVE_PWM |
468 | select POWER_SUPPLY | ||
469 | select PXA3xx | ||
470 | 470 | ||
471 | config MACH_RAUMFELD_CONNECTOR | 471 | config MACH_RAUMFELD_CONNECTOR |
472 | bool "Raumfeld Connector" | 472 | bool "Raumfeld Connector" |
473 | select CPU_PXA300 | ||
473 | select POWER_SUPPLY | 474 | select POWER_SUPPLY |
474 | select PXA3xx | 475 | select PXA3xx |
475 | select CPU_PXA300 | ||
476 | 476 | ||
477 | config MACH_RAUMFELD_SPEAKER | 477 | config MACH_RAUMFELD_SPEAKER |
478 | bool "Raumfeld Speaker" | 478 | bool "Raumfeld Speaker" |
479 | select CPU_PXA300 | ||
479 | select POWER_SUPPLY | 480 | select POWER_SUPPLY |
480 | select PXA3xx | 481 | select PXA3xx |
481 | select CPU_PXA300 | ||
482 | 482 | ||
483 | config PXA_SHARPSL | 483 | config PXA_SHARPSL |
484 | bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models" | 484 | bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models" |
485 | select SHARP_SCOOP | ||
486 | select SHARP_PARAM | 485 | select SHARP_PARAM |
486 | select SHARP_SCOOP | ||
487 | help | 487 | help |
488 | Say Y here if you intend to run this kernel on a | 488 | Say Y here if you intend to run this kernel on a |
489 | Sharp Zaurus SL-5600 (Poodle), SL-C700 (Corgi), | 489 | Sharp Zaurus SL-5600 (Poodle), SL-C700 (Corgi), |
@@ -526,11 +526,11 @@ config MACH_HUSKY | |||
526 | config MACH_AKITA | 526 | config MACH_AKITA |
527 | bool "Enable Sharp SL-1000 (Akita) Support" | 527 | bool "Enable Sharp SL-1000 (Akita) Support" |
528 | depends on PXA_SHARPSL | 528 | depends on PXA_SHARPSL |
529 | select PXA27x | ||
530 | select PXA_SHARP_Cxx00 | ||
531 | select MACH_SPITZ | ||
532 | select I2C | 529 | select I2C |
533 | select I2C_PXA | 530 | select I2C_PXA |
531 | select MACH_SPITZ | ||
532 | select PXA27x | ||
533 | select PXA_SHARP_Cxx00 | ||
534 | 534 | ||
535 | config MACH_SPITZ | 535 | config MACH_SPITZ |
536 | bool "Enable Sharp Zaurus SL-3000 (Spitz) Support" | 536 | bool "Enable Sharp Zaurus SL-3000 (Spitz) Support" |
@@ -575,8 +575,8 @@ config MACH_ICONTROL | |||
575 | 575 | ||
576 | config ARCH_PXA_ESERIES | 576 | config ARCH_PXA_ESERIES |
577 | bool "PXA based Toshiba e-series PDAs" | 577 | bool "PXA based Toshiba e-series PDAs" |
578 | select PXA25x | ||
579 | select FB_W100 | 578 | select FB_W100 |
579 | select PXA25x | ||
580 | 580 | ||
581 | config MACH_E330 | 581 | config MACH_E330 |
582 | bool "Toshiba e330" | 582 | bool "Toshiba e330" |
@@ -628,8 +628,8 @@ config MACH_E800 | |||
628 | 628 | ||
629 | config MACH_ZIPIT2 | 629 | config MACH_ZIPIT2 |
630 | bool "Zipit Z2 Handheld" | 630 | bool "Zipit Z2 Handheld" |
631 | select PXA27x | ||
632 | select HAVE_PWM | 631 | select HAVE_PWM |
632 | select PXA27x | ||
633 | endif | 633 | endif |
634 | endmenu | 634 | endmenu |
635 | 635 | ||
@@ -720,9 +720,9 @@ config SHARPSL_PM | |||
720 | config SHARPSL_PM_MAX1111 | 720 | config SHARPSL_PM_MAX1111 |
721 | bool | 721 | bool |
722 | select HWMON | 722 | select HWMON |
723 | select SENSORS_MAX1111 | ||
723 | select SPI | 724 | select SPI |
724 | select SPI_MASTER | 725 | select SPI_MASTER |
725 | select SENSORS_MAX1111 | ||
726 | 726 | ||
727 | config PXA_HAVE_ISA_IRQS | 727 | config PXA_HAVE_ISA_IRQS |
728 | bool | 728 | bool |
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig index c593be428b8..14c1d47e1ab 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig | |||
@@ -21,8 +21,8 @@ config REALVIEW_EB_A9MP | |||
21 | config REALVIEW_EB_ARM11MP | 21 | config REALVIEW_EB_ARM11MP |
22 | bool "Support ARM11MPCore Tile" | 22 | bool "Support ARM11MPCore Tile" |
23 | depends on MACH_REALVIEW_EB | 23 | depends on MACH_REALVIEW_EB |
24 | select CPU_V6K | ||
25 | select ARCH_HAS_BARRIERS if SMP | 24 | select ARCH_HAS_BARRIERS if SMP |
25 | select CPU_V6K | ||
26 | select HAVE_SMP | 26 | select HAVE_SMP |
27 | select MIGHT_HAVE_CACHE_L2X0 | 27 | select MIGHT_HAVE_CACHE_L2X0 |
28 | help | 28 | help |
@@ -40,12 +40,12 @@ config REALVIEW_EB_ARM11MP_REVB | |||
40 | 40 | ||
41 | config MACH_REALVIEW_PB11MP | 41 | config MACH_REALVIEW_PB11MP |
42 | bool "Support RealView(R) Platform Baseboard for ARM11MPCore" | 42 | bool "Support RealView(R) Platform Baseboard for ARM11MPCore" |
43 | select CPU_V6K | 43 | select ARCH_HAS_BARRIERS if SMP |
44 | select ARM_GIC | 44 | select ARM_GIC |
45 | select CPU_V6K | ||
45 | select HAVE_PATA_PLATFORM | 46 | select HAVE_PATA_PLATFORM |
46 | select HAVE_SMP | 47 | select HAVE_SMP |
47 | select MIGHT_HAVE_CACHE_L2X0 | 48 | select MIGHT_HAVE_CACHE_L2X0 |
48 | select ARCH_HAS_BARRIERS if SMP | ||
49 | help | 49 | help |
50 | Include support for the ARM(R) RealView(R) Platform Baseboard for | 50 | Include support for the ARM(R) RealView(R) Platform Baseboard for |
51 | the ARM11MPCore. This platform has an on-board ARM11MPCore and has | 51 | the ARM11MPCore. This platform has an on-board ARM11MPCore and has |
@@ -54,8 +54,8 @@ config MACH_REALVIEW_PB11MP | |||
54 | # ARMv6 CPU without K extensions, but does have the new exclusive ops | 54 | # ARMv6 CPU without K extensions, but does have the new exclusive ops |
55 | config MACH_REALVIEW_PB1176 | 55 | config MACH_REALVIEW_PB1176 |
56 | bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S" | 56 | bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S" |
57 | select CPU_V6 | ||
58 | select ARM_GIC | 57 | select ARM_GIC |
58 | select CPU_V6 | ||
59 | select HAVE_TCM | 59 | select HAVE_TCM |
60 | select MIGHT_HAVE_CACHE_L2X0 | 60 | select MIGHT_HAVE_CACHE_L2X0 |
61 | help | 61 | help |
@@ -73,8 +73,8 @@ config REALVIEW_PB1176_SECURE_FLASH | |||
73 | 73 | ||
74 | config MACH_REALVIEW_PBA8 | 74 | config MACH_REALVIEW_PBA8 |
75 | bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform" | 75 | bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform" |
76 | select CPU_V7 | ||
77 | select ARM_GIC | 76 | select ARM_GIC |
77 | select CPU_V7 | ||
78 | select HAVE_PATA_PLATFORM | 78 | select HAVE_PATA_PLATFORM |
79 | help | 79 | help |
80 | Include support for the ARM(R) RealView Platform Baseboard for | 80 | Include support for the ARM(R) RealView Platform Baseboard for |
@@ -83,11 +83,11 @@ config MACH_REALVIEW_PBA8 | |||
83 | 83 | ||
84 | config MACH_REALVIEW_PBX | 84 | config MACH_REALVIEW_PBX |
85 | bool "Support RealView(R) Platform Baseboard Explore" | 85 | bool "Support RealView(R) Platform Baseboard Explore" |
86 | select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET | ||
86 | select ARM_GIC | 87 | select ARM_GIC |
87 | select HAVE_PATA_PLATFORM | 88 | select HAVE_PATA_PLATFORM |
88 | select HAVE_SMP | 89 | select HAVE_SMP |
89 | select MIGHT_HAVE_CACHE_L2X0 | 90 | select MIGHT_HAVE_CACHE_L2X0 |
90 | select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET | ||
91 | select ZONE_DMA if SPARSEMEM | 91 | select ZONE_DMA if SPARSEMEM |
92 | help | 92 | help |
93 | Include support for the ARM(R) RealView(R) Platform Baseboard | 93 | Include support for the ARM(R) RealView(R) Platform Baseboard |
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig index c5256f4e90b..495f6928cba 100644 --- a/arch/arm/mach-s3c2412/Kconfig +++ b/arch/arm/mach-s3c2412/Kconfig | |||
@@ -7,7 +7,7 @@ | |||
7 | config S3C2412_CPUFREQ | 7 | config S3C2412_CPUFREQ |
8 | bool | 8 | bool |
9 | depends on CPU_FREQ_S3C24XX && CPU_S3C2412 | 9 | depends on CPU_FREQ_S3C24XX && CPU_S3C2412 |
10 | select S3C2412_IOTIMING | ||
11 | default y | 10 | default y |
11 | select S3C2412_IOTIMING | ||
12 | help | 12 | help |
13 | CPU Frequency scaling support for S3C2412 and S3C2413 SoC CPUs. | 13 | CPU Frequency scaling support for S3C2412 and S3C2413 SoC CPUs. |
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig index ece7a10fe3c..a4d7fd27bec 100644 --- a/arch/arm/mach-s3c2440/Kconfig +++ b/arch/arm/mach-s3c2440/Kconfig | |||
@@ -5,8 +5,8 @@ | |||
5 | config S3C2440_CPUFREQ | 5 | config S3C2440_CPUFREQ |
6 | bool "S3C2440/S3C2442 CPU Frequency scaling support" | 6 | bool "S3C2440/S3C2442 CPU Frequency scaling support" |
7 | depends on CPU_FREQ_S3C24XX && (CPU_S3C2440 || CPU_S3C2442) | 7 | depends on CPU_FREQ_S3C24XX && (CPU_S3C2440 || CPU_S3C2442) |
8 | select S3C2410_CPUFREQ_UTILS | ||
9 | default y | 8 | default y |
9 | select S3C2410_CPUFREQ_UTILS | ||
10 | help | 10 | help |
11 | CPU Frequency scaling support for S3C2440 and S3C2442 SoC CPUs. | 11 | CPU Frequency scaling support for S3C2440 and S3C2442 SoC CPUs. |
12 | 12 | ||
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index d56b0f7f2b2..2b6cb5f29c2 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig | |||
@@ -17,10 +17,10 @@ config CPU_S3C2410 | |||
17 | bool "SAMSUNG S3C2410" | 17 | bool "SAMSUNG S3C2410" |
18 | default y | 18 | default y |
19 | select CPU_ARM920T | 19 | select CPU_ARM920T |
20 | select S3C2410_CLOCK | ||
21 | select CPU_LLSERIAL_S3C2410 | 20 | select CPU_LLSERIAL_S3C2410 |
22 | select S3C2410_PM if PM | 21 | select S3C2410_CLOCK |
23 | select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX | 22 | select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX |
23 | select S3C2410_PM if PM | ||
24 | help | 24 | help |
25 | Support for S3C2410 and S3C2410A family from the S3C24XX line | 25 | Support for S3C2410 and S3C2410A family from the S3C24XX line |
26 | of Samsung Mobile CPUs. | 26 | of Samsung Mobile CPUs. |
@@ -30,8 +30,8 @@ config CPU_S3C2412 | |||
30 | depends on ARCH_S3C24XX | 30 | depends on ARCH_S3C24XX |
31 | select CPU_ARM926T | 31 | select CPU_ARM926T |
32 | select CPU_LLSERIAL_S3C2440 | 32 | select CPU_LLSERIAL_S3C2440 |
33 | select S3C2412_PM if PM | ||
34 | select S3C2412_DMA if S3C24XX_DMA | 33 | select S3C2412_DMA if S3C24XX_DMA |
34 | select S3C2412_PM if PM | ||
35 | help | 35 | help |
36 | Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line | 36 | Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line |
37 | 37 | ||
@@ -40,10 +40,10 @@ config CPU_S3C2416 | |||
40 | depends on ARCH_S3C24XX | 40 | depends on ARCH_S3C24XX |
41 | select CPU_ARM926T | 41 | select CPU_ARM926T |
42 | select CPU_LLSERIAL_S3C2440 | 42 | select CPU_LLSERIAL_S3C2440 |
43 | select SAMSUNG_CLKSRC | 43 | select S3C2416_PM if PM |
44 | select S3C2443_COMMON | 44 | select S3C2443_COMMON |
45 | select S3C2443_DMA if S3C24XX_DMA | 45 | select S3C2443_DMA if S3C24XX_DMA |
46 | select S3C2416_PM if PM | 46 | select SAMSUNG_CLKSRC |
47 | help | 47 | help |
48 | Support for the S3C2416 SoC from the S3C24XX line | 48 | Support for the S3C2416 SoC from the S3C24XX line |
49 | 49 | ||
@@ -75,9 +75,9 @@ config CPU_S3C2443 | |||
75 | depends on ARCH_S3C24XX | 75 | depends on ARCH_S3C24XX |
76 | select CPU_ARM920T | 76 | select CPU_ARM920T |
77 | select CPU_LLSERIAL_S3C2440 | 77 | select CPU_LLSERIAL_S3C2440 |
78 | select SAMSUNG_CLKSRC | ||
79 | select S3C2443_COMMON | 78 | select S3C2443_COMMON |
80 | select S3C2443_DMA if S3C24XX_DMA | 79 | select S3C2443_DMA if S3C24XX_DMA |
80 | select SAMSUNG_CLKSRC | ||
81 | help | 81 | help |
82 | Support for the S3C2443 SoC from the S3C24XX line | 82 | Support for the S3C2443 SoC from the S3C24XX line |
83 | 83 | ||
@@ -156,16 +156,16 @@ config MACH_AML_M5900 | |||
156 | 156 | ||
157 | config ARCH_BAST | 157 | config ARCH_BAST |
158 | bool "Simtec Electronics BAST (EB2410ITX)" | 158 | bool "Simtec Electronics BAST (EB2410ITX)" |
159 | select ISA | ||
160 | select MACH_BAST_IDE | ||
159 | select S3C2410_IOTIMING if S3C2410_CPUFREQ | 161 | select S3C2410_IOTIMING if S3C2410_CPUFREQ |
160 | select S3C24XX_SIMTEC_PM if PM | 162 | select S3C24XX_DCLK |
161 | select S3C24XX_SIMTEC_NOR | 163 | select S3C24XX_SIMTEC_NOR |
164 | select S3C24XX_SIMTEC_PM if PM | ||
162 | select S3C24XX_SIMTEC_USB | 165 | select S3C24XX_SIMTEC_USB |
163 | select MACH_BAST_IDE | ||
164 | select S3C24XX_DCLK | ||
165 | select ISA | ||
166 | select S3C_DEV_HWMON | 166 | select S3C_DEV_HWMON |
167 | select S3C_DEV_USB_HOST | ||
168 | select S3C_DEV_NAND | 167 | select S3C_DEV_NAND |
168 | select S3C_DEV_USB_HOST | ||
169 | help | 169 | help |
170 | Say Y here if you are using the Simtec Electronics EB2410ITX | 170 | Say Y here if you are using the Simtec Electronics EB2410ITX |
171 | development board (also known as BAST) | 171 | development board (also known as BAST) |
@@ -181,9 +181,9 @@ config BAST_PC104_IRQ | |||
181 | config ARCH_H1940 | 181 | config ARCH_H1940 |
182 | bool "IPAQ H1940" | 182 | bool "IPAQ H1940" |
183 | select PM_H1940 if PM | 183 | select PM_H1940 if PM |
184 | select S3C_DEV_USB_HOST | ||
185 | select S3C_DEV_NAND | ||
186 | select S3C24XX_SETUP_TS | 184 | select S3C24XX_SETUP_TS |
185 | select S3C_DEV_NAND | ||
186 | select S3C_DEV_USB_HOST | ||
187 | help | 187 | help |
188 | Say Y here if you are using the HP IPAQ H1940 | 188 | Say Y here if you are using the HP IPAQ H1940 |
189 | 189 | ||
@@ -203,23 +203,23 @@ config PM_H1940 | |||
203 | config MACH_N30 | 203 | config MACH_N30 |
204 | bool "Acer N30 family" | 204 | bool "Acer N30 family" |
205 | select MACH_N35 | 205 | select MACH_N35 |
206 | select S3C_DEV_USB_HOST | ||
207 | select S3C_DEV_NAND | 206 | select S3C_DEV_NAND |
207 | select S3C_DEV_USB_HOST | ||
208 | help | 208 | help |
209 | Say Y here if you want suppt for the Acer N30, Acer N35, | 209 | Say Y here if you want suppt for the Acer N30, Acer N35, |
210 | Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs. | 210 | Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs. |
211 | 211 | ||
212 | config MACH_OTOM | 212 | config MACH_OTOM |
213 | bool "NexVision OTOM Board" | 213 | bool "NexVision OTOM Board" |
214 | select S3C_DEV_USB_HOST | ||
215 | select S3C_DEV_NAND | 214 | select S3C_DEV_NAND |
215 | select S3C_DEV_USB_HOST | ||
216 | help | 216 | help |
217 | Say Y here if you are using the Nex Vision OTOM board | 217 | Say Y here if you are using the Nex Vision OTOM board |
218 | 218 | ||
219 | config MACH_QT2410 | 219 | config MACH_QT2410 |
220 | bool "QT2410" | 220 | bool "QT2410" |
221 | select S3C_DEV_USB_HOST | ||
222 | select S3C_DEV_NAND | 221 | select S3C_DEV_NAND |
222 | select S3C_DEV_USB_HOST | ||
223 | help | 223 | help |
224 | Say Y here if you are using the Armzone QT2410 | 224 | Say Y here if you are using the Armzone QT2410 |
225 | 225 | ||
@@ -239,12 +239,12 @@ config MACH_TCT_HAMMER | |||
239 | 239 | ||
240 | config MACH_VR1000 | 240 | config MACH_VR1000 |
241 | bool "Thorcom VR1000" | 241 | bool "Thorcom VR1000" |
242 | select S3C24XX_SIMTEC_PM if PM | 242 | select MACH_BAST_IDE |
243 | select S3C24XX_DCLK | 243 | select S3C24XX_DCLK |
244 | select S3C24XX_SIMTEC_NOR | 244 | select S3C24XX_SIMTEC_NOR |
245 | select MACH_BAST_IDE | 245 | select S3C24XX_SIMTEC_PM if PM |
246 | select S3C_DEV_USB_HOST | ||
247 | select S3C24XX_SIMTEC_USB | 246 | select S3C24XX_SIMTEC_USB |
247 | select S3C_DEV_USB_HOST | ||
248 | help | 248 | help |
249 | Say Y here if you are using the Thorcom VR1000 board. | 249 | Say Y here if you are using the Thorcom VR1000 board. |
250 | 250 | ||
@@ -285,8 +285,8 @@ comment "S3C2412 Boards" | |||
285 | 285 | ||
286 | config MACH_JIVE | 286 | config MACH_JIVE |
287 | bool "Logitech Jive" | 287 | bool "Logitech Jive" |
288 | select S3C_DEV_USB_HOST | ||
289 | select S3C_DEV_NAND | 288 | select S3C_DEV_NAND |
289 | select S3C_DEV_USB_HOST | ||
290 | help | 290 | help |
291 | Say Y here if you are using the Logitech Jive. | 291 | Say Y here if you are using the Logitech Jive. |
292 | 292 | ||
@@ -314,15 +314,15 @@ config MACH_SMDK2413 | |||
314 | bool "SMDK2413" | 314 | bool "SMDK2413" |
315 | select MACH_S3C2413 | 315 | select MACH_S3C2413 |
316 | select S3C24XX_SMDK | 316 | select S3C24XX_SMDK |
317 | select S3C_DEV_USB_HOST | ||
318 | select S3C_DEV_NAND | 317 | select S3C_DEV_NAND |
318 | select S3C_DEV_USB_HOST | ||
319 | help | 319 | help |
320 | Say Y here if you are using an SMDK2413 | 320 | Say Y here if you are using an SMDK2413 |
321 | 321 | ||
322 | config MACH_VSTMS | 322 | config MACH_VSTMS |
323 | bool "VMSTMS" | 323 | bool "VMSTMS" |
324 | select S3C_DEV_USB_HOST | ||
325 | select S3C_DEV_NAND | 324 | select S3C_DEV_NAND |
325 | select S3C_DEV_USB_HOST | ||
326 | help | 326 | help |
327 | Say Y here if you are using an VSTMS board | 327 | Say Y here if you are using an VSTMS board |
328 | 328 | ||
@@ -351,13 +351,13 @@ comment "S3C2416 Boards" | |||
351 | 351 | ||
352 | config MACH_SMDK2416 | 352 | config MACH_SMDK2416 |
353 | bool "SMDK2416" | 353 | bool "SMDK2416" |
354 | select S3C2416_SETUP_SDHCI | ||
354 | select S3C24XX_SMDK | 355 | select S3C24XX_SMDK |
355 | select S3C_DEV_FB | 356 | select S3C_DEV_FB |
356 | select S3C_DEV_HSMMC | 357 | select S3C_DEV_HSMMC |
357 | select S3C_DEV_HSMMC1 | 358 | select S3C_DEV_HSMMC1 |
358 | select S3C_DEV_NAND | 359 | select S3C_DEV_NAND |
359 | select S3C_DEV_USB_HOST | 360 | select S3C_DEV_USB_HOST |
360 | select S3C2416_SETUP_SDHCI | ||
361 | help | 361 | help |
362 | Say Y here if you are using an SMDK2416 | 362 | Say Y here if you are using an SMDK2416 |
363 | 363 | ||
@@ -379,11 +379,11 @@ comment "S3C2440 Boards" | |||
379 | 379 | ||
380 | config MACH_ANUBIS | 380 | config MACH_ANUBIS |
381 | bool "Simtec Electronics ANUBIS" | 381 | bool "Simtec Electronics ANUBIS" |
382 | select S3C24XX_DCLK | ||
383 | select S3C24XX_SIMTEC_PM if PM | ||
384 | select HAVE_PATA_PLATFORM | 382 | select HAVE_PATA_PLATFORM |
385 | select S3C24XX_GPIO_EXTRA64 | ||
386 | select S3C2440_XTAL_12000000 | 383 | select S3C2440_XTAL_12000000 |
384 | select S3C24XX_DCLK | ||
385 | select S3C24XX_GPIO_EXTRA64 | ||
386 | select S3C24XX_SIMTEC_PM if PM | ||
387 | select S3C_DEV_USB_HOST | 387 | select S3C_DEV_USB_HOST |
388 | help | 388 | help |
389 | Say Y here if you are using the Simtec Electronics ANUBIS | 389 | Say Y here if you are using the Simtec Electronics ANUBIS |
@@ -391,18 +391,18 @@ config MACH_ANUBIS | |||
391 | 391 | ||
392 | config MACH_AT2440EVB | 392 | config MACH_AT2440EVB |
393 | bool "Avantech AT2440EVB development board" | 393 | bool "Avantech AT2440EVB development board" |
394 | select S3C_DEV_USB_HOST | ||
395 | select S3C_DEV_NAND | 394 | select S3C_DEV_NAND |
395 | select S3C_DEV_USB_HOST | ||
396 | help | 396 | help |
397 | Say Y here if you are using the AT2440EVB development board | 397 | Say Y here if you are using the AT2440EVB development board |
398 | 398 | ||
399 | config MACH_MINI2440 | 399 | config MACH_MINI2440 |
400 | bool "MINI2440 development board" | 400 | bool "MINI2440 development board" |
401 | select EEPROM_AT24 | 401 | select EEPROM_AT24 |
402 | select NEW_LEDS | ||
403 | select LEDS_CLASS | 402 | select LEDS_CLASS |
404 | select LEDS_TRIGGER | 403 | select LEDS_TRIGGER |
405 | select LEDS_TRIGGER_BACKLIGHT | 404 | select LEDS_TRIGGER_BACKLIGHT |
405 | select NEW_LEDS | ||
406 | select S3C_DEV_NAND | 406 | select S3C_DEV_NAND |
407 | select S3C_DEV_USB_HOST | 407 | select S3C_DEV_USB_HOST |
408 | help | 408 | help |
@@ -412,20 +412,20 @@ config MACH_MINI2440 | |||
412 | config MACH_NEXCODER_2440 | 412 | config MACH_NEXCODER_2440 |
413 | bool "NexVision NEXCODER 2440 Light Board" | 413 | bool "NexVision NEXCODER 2440 Light Board" |
414 | select S3C2440_XTAL_12000000 | 414 | select S3C2440_XTAL_12000000 |
415 | select S3C_DEV_USB_HOST | ||
416 | select S3C_DEV_NAND | 415 | select S3C_DEV_NAND |
416 | select S3C_DEV_USB_HOST | ||
417 | help | 417 | help |
418 | Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board | 418 | Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board |
419 | 419 | ||
420 | config MACH_OSIRIS | 420 | config MACH_OSIRIS |
421 | bool "Simtec IM2440D20 (OSIRIS) module" | 421 | bool "Simtec IM2440D20 (OSIRIS) module" |
422 | select S3C2410_IOTIMING if S3C2440_CPUFREQ | ||
423 | select S3C2440_XTAL_12000000 | ||
422 | select S3C24XX_DCLK | 424 | select S3C24XX_DCLK |
423 | select S3C24XX_SIMTEC_PM if PM | ||
424 | select S3C24XX_GPIO_EXTRA128 | 425 | select S3C24XX_GPIO_EXTRA128 |
425 | select S3C2440_XTAL_12000000 | 426 | select S3C24XX_SIMTEC_PM if PM |
426 | select S3C2410_IOTIMING if S3C2440_CPUFREQ | ||
427 | select S3C_DEV_USB_HOST | ||
428 | select S3C_DEV_NAND | 427 | select S3C_DEV_NAND |
428 | select S3C_DEV_USB_HOST | ||
429 | help | 429 | help |
430 | Say Y here if you are using the Simtec IM2440D20 module, also | 430 | Say Y here if you are using the Simtec IM2440D20 module, also |
431 | known as the Osiris. | 431 | known as the Osiris. |
@@ -445,8 +445,8 @@ config MACH_OSIRIS_DVS | |||
445 | 445 | ||
446 | config MACH_RX3715 | 446 | config MACH_RX3715 |
447 | bool "HP iPAQ rx3715" | 447 | bool "HP iPAQ rx3715" |
448 | select S3C2440_XTAL_16934400 | ||
449 | select PM_H1940 if PM | 448 | select PM_H1940 if PM |
449 | select S3C2440_XTAL_16934400 | ||
450 | select S3C_DEV_NAND | 450 | select S3C_DEV_NAND |
451 | help | 451 | help |
452 | Say Y here if you are using the HP iPAQ rx3715. | 452 | Say Y here if you are using the HP iPAQ rx3715. |
@@ -455,8 +455,8 @@ config ARCH_S3C2440 | |||
455 | bool "SMDK2440" | 455 | bool "SMDK2440" |
456 | select S3C2440_XTAL_16934400 | 456 | select S3C2440_XTAL_16934400 |
457 | select S3C24XX_SMDK | 457 | select S3C24XX_SMDK |
458 | select S3C_DEV_USB_HOST | ||
459 | select S3C_DEV_NAND | 458 | select S3C_DEV_NAND |
459 | select S3C_DEV_USB_HOST | ||
460 | help | 460 | help |
461 | Say Y here if you are using the SMDK2440. | 461 | Say Y here if you are using the SMDK2440. |
462 | 462 | ||
@@ -478,11 +478,11 @@ comment "S3C2442 Boards" | |||
478 | 478 | ||
479 | config MACH_NEO1973_GTA02 | 479 | config MACH_NEO1973_GTA02 |
480 | bool "Openmoko GTA02 / Freerunner phone" | 480 | bool "Openmoko GTA02 / Freerunner phone" |
481 | select I2C | ||
482 | select MACH_NEO1973 | ||
481 | select MFD_PCF50633 | 483 | select MFD_PCF50633 |
482 | select PCF50633_GPIO | 484 | select PCF50633_GPIO |
483 | select I2C | ||
484 | select POWER_SUPPLY | 485 | select POWER_SUPPLY |
485 | select MACH_NEO1973 | ||
486 | select S3C24XX_PWM | 486 | select S3C24XX_PWM |
487 | select S3C_DEV_USB_HOST | 487 | select S3C_DEV_USB_HOST |
488 | help | 488 | help |
@@ -490,13 +490,13 @@ config MACH_NEO1973_GTA02 | |||
490 | 490 | ||
491 | config MACH_RX1950 | 491 | config MACH_RX1950 |
492 | bool "HP iPAQ rx1950" | 492 | bool "HP iPAQ rx1950" |
493 | select S3C24XX_DCLK | ||
494 | select PM_H1940 if PM | ||
495 | select I2C | 493 | select I2C |
496 | select S3C24XX_PWM | 494 | select PM_H1940 if PM |
497 | select S3C_DEV_NAND | ||
498 | select S3C2410_IOTIMING if S3C2440_CPUFREQ | 495 | select S3C2410_IOTIMING if S3C2440_CPUFREQ |
499 | select S3C2440_XTAL_16934400 | 496 | select S3C2440_XTAL_16934400 |
497 | select S3C24XX_DCLK | ||
498 | select S3C24XX_PWM | ||
499 | select S3C_DEV_NAND | ||
500 | help | 500 | help |
501 | Say Y here if you're using HP iPAQ rx1950 | 501 | Say Y here if you're using HP iPAQ rx1950 |
502 | 502 | ||
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c index db2787aa1e5..f30d7fccbfe 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2416.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
30 | #include <asm/mach/irq.h> | 30 | #include <asm/mach/irq.h> |
31 | 31 | ||
32 | #include <video/samsung_fimd.h> | ||
32 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
33 | #include <asm/irq.h> | 34 | #include <asm/irq.h> |
34 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
@@ -52,7 +53,6 @@ | |||
52 | #include <linux/platform_data/usb-s3c2410_udc.h> | 53 | #include <linux/platform_data/usb-s3c2410_udc.h> |
53 | #include <linux/platform_data/s3c-hsudc.h> | 54 | #include <linux/platform_data/s3c-hsudc.h> |
54 | 55 | ||
55 | #include <plat/regs-fb-v4.h> | ||
56 | #include <plat/fb.h> | 56 | #include <plat/fb.h> |
57 | 57 | ||
58 | #include <plat/common-smdk.h> | 58 | #include <plat/common-smdk.h> |
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index 06ca1cd4cae..63e7ae3ee9e 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig | |||
@@ -7,9 +7,9 @@ | |||
7 | config PLAT_S3C64XX | 7 | config PLAT_S3C64XX |
8 | bool | 8 | bool |
9 | depends on ARCH_S3C64XX | 9 | depends on ARCH_S3C64XX |
10 | select SAMSUNG_WAKEMASK | ||
11 | select PM_GENERIC_DOMAINS | ||
12 | default y | 10 | default y |
11 | select PM_GENERIC_DOMAINS | ||
12 | select SAMSUNG_WAKEMASK | ||
13 | help | 13 | help |
14 | Base platform code for any Samsung S3C64XX device | 14 | Base platform code for any Samsung S3C64XX device |
15 | 15 | ||
@@ -31,8 +31,8 @@ config S3C64XX_DMA | |||
31 | select S3C_DMA | 31 | select S3C_DMA |
32 | 32 | ||
33 | config S3C64XX_SETUP_SDHCI | 33 | config S3C64XX_SETUP_SDHCI |
34 | select S3C64XX_SETUP_SDHCI_GPIO | ||
35 | bool | 34 | bool |
35 | select S3C64XX_SETUP_SDHCI_GPIO | ||
36 | help | 36 | help |
37 | Internal configuration for default SDHCI setup for S3C6400 and | 37 | Internal configuration for default SDHCI setup for S3C6400 and |
38 | S3C6410 SoCs. | 38 | S3C6410 SoCs. |
@@ -93,9 +93,9 @@ config S3C64XX_SETUP_USB_PHY | |||
93 | config MACH_SMDK6400 | 93 | config MACH_SMDK6400 |
94 | bool "SMDK6400" | 94 | bool "SMDK6400" |
95 | select CPU_S3C6400 | 95 | select CPU_S3C6400 |
96 | select S3C64XX_SETUP_SDHCI | ||
96 | select S3C_DEV_HSMMC | 97 | select S3C_DEV_HSMMC |
97 | select S3C_DEV_NAND | 98 | select S3C_DEV_NAND |
98 | select S3C64XX_SETUP_SDHCI | ||
99 | help | 99 | help |
100 | Machine support for the Samsung SMDK6400 | 100 | Machine support for the Samsung SMDK6400 |
101 | 101 | ||
@@ -104,21 +104,21 @@ config MACH_SMDK6400 | |||
104 | config MACH_ANW6410 | 104 | config MACH_ANW6410 |
105 | bool "A&W6410" | 105 | bool "A&W6410" |
106 | select CPU_S3C6410 | 106 | select CPU_S3C6410 |
107 | select S3C_DEV_FB | ||
108 | select S3C64XX_SETUP_FB_24BPP | 107 | select S3C64XX_SETUP_FB_24BPP |
108 | select S3C_DEV_FB | ||
109 | help | 109 | help |
110 | Machine support for the A&W6410 | 110 | Machine support for the A&W6410 |
111 | 111 | ||
112 | config MACH_MINI6410 | 112 | config MACH_MINI6410 |
113 | bool "MINI6410" | 113 | bool "MINI6410" |
114 | select CPU_S3C6410 | 114 | select CPU_S3C6410 |
115 | select S3C64XX_SETUP_FB_24BPP | ||
116 | select S3C64XX_SETUP_SDHCI | ||
117 | select S3C_DEV_FB | ||
115 | select S3C_DEV_HSMMC | 118 | select S3C_DEV_HSMMC |
116 | select S3C_DEV_HSMMC1 | 119 | select S3C_DEV_HSMMC1 |
117 | select S3C64XX_SETUP_SDHCI | ||
118 | select S3C_DEV_USB_HOST | ||
119 | select S3C_DEV_NAND | 120 | select S3C_DEV_NAND |
120 | select S3C_DEV_FB | 121 | select S3C_DEV_USB_HOST |
121 | select S3C64XX_SETUP_FB_24BPP | ||
122 | select SAMSUNG_DEV_ADC | 122 | select SAMSUNG_DEV_ADC |
123 | select SAMSUNG_DEV_TS | 123 | select SAMSUNG_DEV_TS |
124 | help | 124 | help |
@@ -127,42 +127,42 @@ config MACH_MINI6410 | |||
127 | config MACH_REAL6410 | 127 | config MACH_REAL6410 |
128 | bool "REAL6410" | 128 | bool "REAL6410" |
129 | select CPU_S3C6410 | 129 | select CPU_S3C6410 |
130 | select S3C_DEV_HSMMC | 130 | select S3C64XX_SETUP_FB_24BPP |
131 | select S3C_DEV_HSMMC1 | ||
132 | select S3C64XX_SETUP_SDHCI | 131 | select S3C64XX_SETUP_SDHCI |
133 | select S3C_DEV_FB | 132 | select S3C_DEV_FB |
134 | select S3C64XX_SETUP_FB_24BPP | 133 | select S3C_DEV_HSMMC |
134 | select S3C_DEV_HSMMC1 | ||
135 | select S3C_DEV_NAND | 135 | select S3C_DEV_NAND |
136 | select S3C_DEV_USB_HOST | ||
136 | select SAMSUNG_DEV_ADC | 137 | select SAMSUNG_DEV_ADC |
137 | select SAMSUNG_DEV_TS | 138 | select SAMSUNG_DEV_TS |
138 | select S3C_DEV_USB_HOST | ||
139 | help | 139 | help |
140 | Machine support for the CoreWind REAL6410 | 140 | Machine support for the CoreWind REAL6410 |
141 | 141 | ||
142 | config MACH_SMDK6410 | 142 | config MACH_SMDK6410 |
143 | bool "SMDK6410" | 143 | bool "SMDK6410" |
144 | select CPU_S3C6410 | 144 | select CPU_S3C6410 |
145 | select SAMSUNG_DEV_ADC | 145 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
146 | select S3C64XX_SETUP_FB_24BPP | ||
147 | select S3C64XX_SETUP_I2C1 | ||
148 | select S3C64XX_SETUP_IDE | ||
149 | select S3C64XX_SETUP_KEYPAD | ||
150 | select S3C64XX_SETUP_SDHCI | ||
151 | select S3C64XX_SETUP_USB_PHY | ||
152 | select S3C_DEV_FB | ||
146 | select S3C_DEV_HSMMC | 153 | select S3C_DEV_HSMMC |
147 | select S3C_DEV_HSMMC1 | 154 | select S3C_DEV_HSMMC1 |
148 | select S3C_DEV_I2C1 | 155 | select S3C_DEV_I2C1 |
149 | select SAMSUNG_DEV_IDE | ||
150 | select S3C_DEV_FB | ||
151 | select S3C_DEV_RTC | 156 | select S3C_DEV_RTC |
152 | select SAMSUNG_DEV_TS | ||
153 | select S3C_DEV_USB_HOST | 157 | select S3C_DEV_USB_HOST |
154 | select S3C_DEV_USB_HSOTG | 158 | select S3C_DEV_USB_HSOTG |
155 | select S3C_DEV_WDT | 159 | select S3C_DEV_WDT |
160 | select SAMSUNG_DEV_ADC | ||
156 | select SAMSUNG_DEV_BACKLIGHT | 161 | select SAMSUNG_DEV_BACKLIGHT |
162 | select SAMSUNG_DEV_IDE | ||
157 | select SAMSUNG_DEV_KEYPAD | 163 | select SAMSUNG_DEV_KEYPAD |
158 | select SAMSUNG_DEV_PWM | 164 | select SAMSUNG_DEV_PWM |
159 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 165 | select SAMSUNG_DEV_TS |
160 | select S3C64XX_SETUP_SDHCI | ||
161 | select S3C64XX_SETUP_I2C1 | ||
162 | select S3C64XX_SETUP_IDE | ||
163 | select S3C64XX_SETUP_FB_24BPP | ||
164 | select S3C64XX_SETUP_KEYPAD | ||
165 | select S3C64XX_SETUP_USB_PHY | ||
166 | help | 166 | help |
167 | Machine support for the Samsung SMDK6410 | 167 | Machine support for the Samsung SMDK6410 |
168 | 168 | ||
@@ -198,13 +198,13 @@ endchoice | |||
198 | config SMDK6410_WM1190_EV1 | 198 | config SMDK6410_WM1190_EV1 |
199 | bool "Support Wolfson Microelectronics 1190-EV1 PMIC card" | 199 | bool "Support Wolfson Microelectronics 1190-EV1 PMIC card" |
200 | depends on MACH_SMDK6410 | 200 | depends on MACH_SMDK6410 |
201 | select REGULATOR | ||
202 | select REGULATOR_WM8350 | ||
203 | select SAMSUNG_GPIO_EXTRA64 | ||
204 | select MFD_WM8350_I2C | ||
205 | select MFD_WM8350_CONFIG_MODE_0 | 201 | select MFD_WM8350_CONFIG_MODE_0 |
206 | select MFD_WM8350_CONFIG_MODE_3 | 202 | select MFD_WM8350_CONFIG_MODE_3 |
203 | select MFD_WM8350_I2C | ||
207 | select MFD_WM8352_CONFIG_MODE_0 | 204 | select MFD_WM8352_CONFIG_MODE_0 |
205 | select REGULATOR | ||
206 | select REGULATOR_WM8350 | ||
207 | select SAMSUNG_GPIO_EXTRA64 | ||
208 | help | 208 | help |
209 | The Wolfson Microelectronics 1190-EV1 is a WM835x based PMIC | 209 | The Wolfson Microelectronics 1190-EV1 is a WM835x based PMIC |
210 | and audio daughtercard for the Samsung SMDK6410 reference | 210 | and audio daughtercard for the Samsung SMDK6410 reference |
@@ -216,11 +216,11 @@ config SMDK6410_WM1190_EV1 | |||
216 | config SMDK6410_WM1192_EV1 | 216 | config SMDK6410_WM1192_EV1 |
217 | bool "Support Wolfson Microelectronics 1192-EV1 PMIC card" | 217 | bool "Support Wolfson Microelectronics 1192-EV1 PMIC card" |
218 | depends on MACH_SMDK6410 | 218 | depends on MACH_SMDK6410 |
219 | select MFD_WM831X | ||
220 | select MFD_WM831X_I2C | ||
219 | select REGULATOR | 221 | select REGULATOR |
220 | select REGULATOR_WM831X | 222 | select REGULATOR_WM831X |
221 | select SAMSUNG_GPIO_EXTRA64 | 223 | select SAMSUNG_GPIO_EXTRA64 |
222 | select MFD_WM831X | ||
223 | select MFD_WM831X_I2C | ||
224 | help | 224 | help |
225 | The Wolfson Microelectronics 1192-EV1 is a WM831x based PMIC | 225 | The Wolfson Microelectronics 1192-EV1 is a WM831x based PMIC |
226 | daughtercard for the Samsung SMDK6410 reference platform. | 226 | daughtercard for the Samsung SMDK6410 reference platform. |
@@ -232,19 +232,19 @@ config SMDK6410_WM1192_EV1 | |||
232 | config MACH_NCP | 232 | config MACH_NCP |
233 | bool "NCP" | 233 | bool "NCP" |
234 | select CPU_S3C6410 | 234 | select CPU_S3C6410 |
235 | select S3C_DEV_I2C1 | ||
236 | select S3C_DEV_HSMMC1 | ||
237 | select S3C64XX_SETUP_I2C1 | 235 | select S3C64XX_SETUP_I2C1 |
236 | select S3C_DEV_HSMMC1 | ||
237 | select S3C_DEV_I2C1 | ||
238 | help | 238 | help |
239 | Machine support for the Samsung NCP | 239 | Machine support for the Samsung NCP |
240 | 240 | ||
241 | config MACH_HMT | 241 | config MACH_HMT |
242 | bool "Airgoo HMT" | 242 | bool "Airgoo HMT" |
243 | select CPU_S3C6410 | 243 | select CPU_S3C6410 |
244 | select S3C64XX_SETUP_FB_24BPP | ||
244 | select S3C_DEV_FB | 245 | select S3C_DEV_FB |
245 | select S3C_DEV_NAND | 246 | select S3C_DEV_NAND |
246 | select S3C_DEV_USB_HOST | 247 | select S3C_DEV_USB_HOST |
247 | select S3C64XX_SETUP_FB_24BPP | ||
248 | select SAMSUNG_DEV_PWM | 248 | select SAMSUNG_DEV_PWM |
249 | help | 249 | help |
250 | Machine support for the Airgoo HMT | 250 | Machine support for the Airgoo HMT |
@@ -252,17 +252,17 @@ config MACH_HMT | |||
252 | config MACH_SMARTQ | 252 | config MACH_SMARTQ |
253 | bool | 253 | bool |
254 | select CPU_S3C6410 | 254 | select CPU_S3C6410 |
255 | select S3C64XX_SETUP_FB_24BPP | ||
256 | select S3C64XX_SETUP_SDHCI | ||
257 | select S3C64XX_SETUP_USB_PHY | ||
258 | select S3C_DEV_FB | ||
255 | select S3C_DEV_HSMMC | 259 | select S3C_DEV_HSMMC |
256 | select S3C_DEV_HSMMC1 | 260 | select S3C_DEV_HSMMC1 |
257 | select S3C_DEV_HSMMC2 | 261 | select S3C_DEV_HSMMC2 |
258 | select S3C_DEV_FB | ||
259 | select S3C_DEV_HWMON | 262 | select S3C_DEV_HWMON |
260 | select S3C_DEV_RTC | 263 | select S3C_DEV_RTC |
261 | select S3C_DEV_USB_HSOTG | ||
262 | select S3C_DEV_USB_HOST | 264 | select S3C_DEV_USB_HOST |
263 | select S3C64XX_SETUP_SDHCI | 265 | select S3C_DEV_USB_HSOTG |
264 | select S3C64XX_SETUP_FB_24BPP | ||
265 | select S3C64XX_SETUP_USB_PHY | ||
266 | select SAMSUNG_DEV_ADC | 266 | select SAMSUNG_DEV_ADC |
267 | select SAMSUNG_DEV_PWM | 267 | select SAMSUNG_DEV_PWM |
268 | select SAMSUNG_DEV_TS | 268 | select SAMSUNG_DEV_TS |
@@ -284,26 +284,26 @@ config MACH_SMARTQ7 | |||
284 | config MACH_WLF_CRAGG_6410 | 284 | config MACH_WLF_CRAGG_6410 |
285 | bool "Wolfson Cragganmore 6410" | 285 | bool "Wolfson Cragganmore 6410" |
286 | select CPU_S3C6410 | 286 | select CPU_S3C6410 |
287 | select S3C64XX_SETUP_SDHCI | 287 | select I2C |
288 | select LEDS_GPIO_REGISTER | ||
289 | select S3C64XX_DEV_SPI0 | ||
290 | select S3C64XX_SETUP_FB_24BPP | ||
288 | select S3C64XX_SETUP_I2C1 | 291 | select S3C64XX_SETUP_I2C1 |
289 | select S3C64XX_SETUP_IDE | 292 | select S3C64XX_SETUP_IDE |
290 | select S3C64XX_SETUP_FB_24BPP | ||
291 | select S3C64XX_SETUP_KEYPAD | 293 | select S3C64XX_SETUP_KEYPAD |
294 | select S3C64XX_SETUP_SDHCI | ||
292 | select S3C64XX_SETUP_SPI | 295 | select S3C64XX_SETUP_SPI |
293 | select S3C64XX_SETUP_USB_PHY | 296 | select S3C64XX_SETUP_USB_PHY |
294 | select SAMSUNG_DEV_ADC | ||
295 | select SAMSUNG_DEV_KEYPAD | ||
296 | select S3C_DEV_USB_HOST | ||
297 | select S3C_DEV_USB_HSOTG | ||
298 | select S3C_DEV_HSMMC | 297 | select S3C_DEV_HSMMC |
299 | select S3C_DEV_HSMMC1 | 298 | select S3C_DEV_HSMMC1 |
300 | select S3C_DEV_HSMMC2 | 299 | select S3C_DEV_HSMMC2 |
301 | select S3C_DEV_I2C1 | 300 | select S3C_DEV_I2C1 |
302 | select S3C_DEV_WDT | ||
303 | select S3C_DEV_RTC | 301 | select S3C_DEV_RTC |
304 | select S3C64XX_DEV_SPI0 | 302 | select S3C_DEV_USB_HOST |
303 | select S3C_DEV_USB_HSOTG | ||
304 | select S3C_DEV_WDT | ||
305 | select SAMSUNG_DEV_ADC | ||
306 | select SAMSUNG_DEV_KEYPAD | ||
305 | select SAMSUNG_GPIO_EXTRA128 | 307 | select SAMSUNG_GPIO_EXTRA128 |
306 | select I2C | ||
307 | select LEDS_GPIO_REGISTER | ||
308 | help | 308 | help |
309 | Machine support for the Wolfson Cragganmore S3C6410 variant. | 309 | Machine support for the Wolfson Cragganmore S3C6410 variant. |
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c index 15c58dfc458..99e82ac81b6 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/dm9000.h> | 29 | #include <linux/dm9000.h> |
30 | 30 | ||
31 | #include <video/platform_lcd.h> | 31 | #include <video/platform_lcd.h> |
32 | #include <video/samsung_fimd.h> | ||
32 | 33 | ||
33 | #include <asm/hardware/vic.h> | 34 | #include <asm/hardware/vic.h> |
34 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
@@ -44,7 +45,6 @@ | |||
44 | #include <plat/regs-serial.h> | 45 | #include <plat/regs-serial.h> |
45 | #include <linux/platform_data/i2c-s3c2410.h> | 46 | #include <linux/platform_data/i2c-s3c2410.h> |
46 | #include <plat/fb.h> | 47 | #include <plat/fb.h> |
47 | #include <plat/regs-fb-v4.h> | ||
48 | 48 | ||
49 | #include <plat/clock.h> | 49 | #include <plat/clock.h> |
50 | #include <plat/devs.h> | 50 | #include <plat/devs.h> |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 8b4d4670664..13b7eaa45fd 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <asm/mach/arch.h> | 46 | #include <asm/mach/arch.h> |
47 | #include <asm/mach-types.h> | 47 | #include <asm/mach-types.h> |
48 | 48 | ||
49 | #include <video/samsung_fimd.h> | ||
49 | #include <mach/hardware.h> | 50 | #include <mach/hardware.h> |
50 | #include <mach/map.h> | 51 | #include <mach/map.h> |
51 | 52 | ||
@@ -57,7 +58,6 @@ | |||
57 | #include <mach/regs-gpio-memport.h> | 58 | #include <mach/regs-gpio-memport.h> |
58 | 59 | ||
59 | #include <plat/regs-serial.h> | 60 | #include <plat/regs-serial.h> |
60 | #include <plat/regs-fb-v4.h> | ||
61 | #include <plat/fb.h> | 61 | #include <plat/fb.h> |
62 | #include <plat/sdhci.h> | 62 | #include <plat/sdhci.h> |
63 | #include <plat/gpio-cfg.h> | 63 | #include <plat/gpio-cfg.h> |
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index 02222b32b7d..2b144893ddc 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
27 | #include <asm/mach/irq.h> | 27 | #include <asm/mach/irq.h> |
28 | 28 | ||
29 | #include <video/samsung_fimd.h> | ||
29 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
30 | #include <mach/map.h> | 31 | #include <mach/map.h> |
31 | 32 | ||
@@ -41,7 +42,6 @@ | |||
41 | #include <plat/clock.h> | 42 | #include <plat/clock.h> |
42 | #include <plat/devs.h> | 43 | #include <plat/devs.h> |
43 | #include <plat/cpu.h> | 44 | #include <plat/cpu.h> |
44 | #include <plat/regs-fb-v4.h> | ||
45 | 45 | ||
46 | #include "common.h" | 46 | #include "common.h" |
47 | 47 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index 09311cc4011..07c349cca33 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c | |||
@@ -41,9 +41,9 @@ | |||
41 | #include <linux/platform_data/mtd-nand-s3c2410.h> | 41 | #include <linux/platform_data/mtd-nand-s3c2410.h> |
42 | #include <plat/regs-serial.h> | 42 | #include <plat/regs-serial.h> |
43 | #include <linux/platform_data/touchscreen-s3c2410.h> | 43 | #include <linux/platform_data/touchscreen-s3c2410.h> |
44 | #include <plat/regs-fb-v4.h> | ||
45 | 44 | ||
46 | #include <video/platform_lcd.h> | 45 | #include <video/platform_lcd.h> |
46 | #include <video/samsung_fimd.h> | ||
47 | 47 | ||
48 | #include "common.h" | 48 | #include "common.h" |
49 | 49 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c index 46ee88d1681..e5f9a79b535 100644 --- a/arch/arm/mach-s3c64xx/mach-ncp.c +++ b/arch/arm/mach-s3c64xx/mach-ncp.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | 25 | ||
26 | #include <video/platform_lcd.h> | 26 | #include <video/platform_lcd.h> |
27 | #include <video/samsung_fimd.h> | ||
27 | 28 | ||
28 | #include <asm/hardware/vic.h> | 29 | #include <asm/hardware/vic.h> |
29 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
@@ -43,7 +44,6 @@ | |||
43 | #include <plat/clock.h> | 44 | #include <plat/clock.h> |
44 | #include <plat/devs.h> | 45 | #include <plat/devs.h> |
45 | #include <plat/cpu.h> | 46 | #include <plat/cpu.h> |
46 | #include <plat/regs-fb-v4.h> | ||
47 | 47 | ||
48 | #include "common.h" | 48 | #include "common.h" |
49 | 49 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index 6daca203e72..7476f7c722a 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c +++ b/arch/arm/mach-s3c64xx/mach-real6410.c | |||
@@ -42,9 +42,9 @@ | |||
42 | #include <linux/platform_data/mtd-nand-s3c2410.h> | 42 | #include <linux/platform_data/mtd-nand-s3c2410.h> |
43 | #include <plat/regs-serial.h> | 43 | #include <plat/regs-serial.h> |
44 | #include <linux/platform_data/touchscreen-s3c2410.h> | 44 | #include <linux/platform_data/touchscreen-s3c2410.h> |
45 | #include <plat/regs-fb-v4.h> | ||
46 | 45 | ||
47 | #include <video/platform_lcd.h> | 46 | #include <video/platform_lcd.h> |
47 | #include <video/samsung_fimd.h> | ||
48 | 48 | ||
49 | #include "common.h" | 49 | #include "common.h" |
50 | 50 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c index d6266d8b43c..96d6da2b6b5 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq5.c +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
22 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
23 | 23 | ||
24 | #include <video/samsung_fimd.h> | ||
24 | #include <mach/map.h> | 25 | #include <mach/map.h> |
25 | #include <mach/regs-gpio.h> | 26 | #include <mach/regs-gpio.h> |
26 | 27 | ||
@@ -28,7 +29,6 @@ | |||
28 | #include <plat/devs.h> | 29 | #include <plat/devs.h> |
29 | #include <plat/fb.h> | 30 | #include <plat/fb.h> |
30 | #include <plat/gpio-cfg.h> | 31 | #include <plat/gpio-cfg.h> |
31 | #include <plat/regs-fb-v4.h> | ||
32 | 32 | ||
33 | #include "common.h" | 33 | #include "common.h" |
34 | #include "mach-smartq.h" | 34 | #include "mach-smartq.h" |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c index 0957d2a980e..7d1167bdc92 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq7.c +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
22 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
23 | 23 | ||
24 | #include <video/samsung_fimd.h> | ||
24 | #include <mach/map.h> | 25 | #include <mach/map.h> |
25 | #include <mach/regs-gpio.h> | 26 | #include <mach/regs-gpio.h> |
26 | 27 | ||
@@ -28,7 +29,6 @@ | |||
28 | #include <plat/devs.h> | 29 | #include <plat/devs.h> |
29 | #include <plat/fb.h> | 30 | #include <plat/fb.h> |
30 | #include <plat/gpio-cfg.h> | 31 | #include <plat/gpio-cfg.h> |
31 | #include <plat/regs-fb-v4.h> | ||
32 | 32 | ||
33 | #include "common.h" | 33 | #include "common.h" |
34 | #include "mach-smartq.h" | 34 | #include "mach-smartq.h" |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index 2547a884647..da1a771a29e 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #include <video/platform_lcd.h> | 45 | #include <video/platform_lcd.h> |
46 | #include <video/samsung_fimd.h> | ||
46 | 47 | ||
47 | #include <asm/hardware/vic.h> | 48 | #include <asm/hardware/vic.h> |
48 | #include <asm/mach/arch.h> | 49 | #include <asm/mach/arch.h> |
@@ -72,7 +73,6 @@ | |||
72 | #include <linux/platform_data/touchscreen-s3c2410.h> | 73 | #include <linux/platform_data/touchscreen-s3c2410.h> |
73 | #include <plat/keypad.h> | 74 | #include <plat/keypad.h> |
74 | #include <plat/backlight.h> | 75 | #include <plat/backlight.h> |
75 | #include <plat/regs-fb-v4.h> | ||
76 | 76 | ||
77 | #include "common.h" | 77 | #include "common.h" |
78 | 78 | ||
diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig index c87f6108eeb..e8742cb7ddd 100644 --- a/arch/arm/mach-s5p64x0/Kconfig +++ b/arch/arm/mach-s5p64x0/Kconfig | |||
@@ -9,18 +9,18 @@ if ARCH_S5P64X0 | |||
9 | 9 | ||
10 | config CPU_S5P6440 | 10 | config CPU_S5P6440 |
11 | bool | 11 | bool |
12 | select SAMSUNG_DMADEV | ||
13 | select S5P_HRT | 12 | select S5P_HRT |
14 | select S5P_SLEEP if PM | 13 | select S5P_SLEEP if PM |
14 | select SAMSUNG_DMADEV | ||
15 | select SAMSUNG_WAKEMASK if PM | 15 | select SAMSUNG_WAKEMASK if PM |
16 | help | 16 | help |
17 | Enable S5P6440 CPU support | 17 | Enable S5P6440 CPU support |
18 | 18 | ||
19 | config CPU_S5P6450 | 19 | config CPU_S5P6450 |
20 | bool | 20 | bool |
21 | select SAMSUNG_DMADEV | ||
22 | select S5P_HRT | 21 | select S5P_HRT |
23 | select S5P_SLEEP if PM | 22 | select S5P_SLEEP if PM |
23 | select SAMSUNG_DMADEV | ||
24 | select SAMSUNG_WAKEMASK if PM | 24 | select SAMSUNG_WAKEMASK if PM |
25 | help | 25 | help |
26 | Enable S5P6450 CPU support | 26 | Enable S5P6450 CPU support |
@@ -52,19 +52,19 @@ config MACH_SMDK6440 | |||
52 | bool "SMDK6440" | 52 | bool "SMDK6440" |
53 | select CPU_S5P6440 | 53 | select CPU_S5P6440 |
54 | select S3C_DEV_FB | 54 | select S3C_DEV_FB |
55 | select S3C_DEV_I2C1 | ||
56 | select S3C_DEV_RTC | ||
57 | select S3C_DEV_WDT | ||
58 | select S3C_DEV_HSMMC | 55 | select S3C_DEV_HSMMC |
59 | select S3C_DEV_HSMMC1 | 56 | select S3C_DEV_HSMMC1 |
60 | select S3C_DEV_HSMMC2 | 57 | select S3C_DEV_HSMMC2 |
58 | select S3C_DEV_I2C1 | ||
59 | select S3C_DEV_RTC | ||
60 | select S3C_DEV_WDT | ||
61 | select S5P64X0_SETUP_FB_24BPP | ||
62 | select S5P64X0_SETUP_I2C1 | ||
63 | select S5P64X0_SETUP_SDHCI_GPIO | ||
61 | select SAMSUNG_DEV_ADC | 64 | select SAMSUNG_DEV_ADC |
62 | select SAMSUNG_DEV_BACKLIGHT | 65 | select SAMSUNG_DEV_BACKLIGHT |
63 | select SAMSUNG_DEV_PWM | 66 | select SAMSUNG_DEV_PWM |
64 | select SAMSUNG_DEV_TS | 67 | select SAMSUNG_DEV_TS |
65 | select S5P64X0_SETUP_FB_24BPP | ||
66 | select S5P64X0_SETUP_I2C1 | ||
67 | select S5P64X0_SETUP_SDHCI_GPIO | ||
68 | help | 68 | help |
69 | Machine support for the Samsung SMDK6440 | 69 | Machine support for the Samsung SMDK6440 |
70 | 70 | ||
@@ -72,19 +72,19 @@ config MACH_SMDK6450 | |||
72 | bool "SMDK6450" | 72 | bool "SMDK6450" |
73 | select CPU_S5P6450 | 73 | select CPU_S5P6450 |
74 | select S3C_DEV_FB | 74 | select S3C_DEV_FB |
75 | select S3C_DEV_I2C1 | ||
76 | select S3C_DEV_RTC | ||
77 | select S3C_DEV_WDT | ||
78 | select S3C_DEV_HSMMC | 75 | select S3C_DEV_HSMMC |
79 | select S3C_DEV_HSMMC1 | 76 | select S3C_DEV_HSMMC1 |
80 | select S3C_DEV_HSMMC2 | 77 | select S3C_DEV_HSMMC2 |
78 | select S3C_DEV_I2C1 | ||
79 | select S3C_DEV_RTC | ||
80 | select S3C_DEV_WDT | ||
81 | select S5P64X0_SETUP_FB_24BPP | ||
82 | select S5P64X0_SETUP_I2C1 | ||
83 | select S5P64X0_SETUP_SDHCI_GPIO | ||
81 | select SAMSUNG_DEV_ADC | 84 | select SAMSUNG_DEV_ADC |
82 | select SAMSUNG_DEV_BACKLIGHT | 85 | select SAMSUNG_DEV_BACKLIGHT |
83 | select SAMSUNG_DEV_PWM | 86 | select SAMSUNG_DEV_PWM |
84 | select SAMSUNG_DEV_TS | 87 | select SAMSUNG_DEV_TS |
85 | select S5P64X0_SETUP_FB_24BPP | ||
86 | select S5P64X0_SETUP_I2C1 | ||
87 | select S5P64X0_SETUP_SDHCI_GPIO | ||
88 | help | 88 | help |
89 | Machine support for the Samsung SMDK6450 | 89 | Machine support for the Samsung SMDK6450 |
90 | 90 | ||
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c index dea78a84824..96ea1fe0ec9 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/mmc/host.h> | 27 | #include <linux/mmc/host.h> |
28 | 28 | ||
29 | #include <video/platform_lcd.h> | 29 | #include <video/platform_lcd.h> |
30 | #include <video/samsung_fimd.h> | ||
30 | 31 | ||
31 | #include <asm/hardware/vic.h> | 32 | #include <asm/hardware/vic.h> |
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
@@ -52,7 +53,6 @@ | |||
52 | #include <plat/s5p-time.h> | 53 | #include <plat/s5p-time.h> |
53 | #include <plat/backlight.h> | 54 | #include <plat/backlight.h> |
54 | #include <plat/fb.h> | 55 | #include <plat/fb.h> |
55 | #include <plat/regs-fb.h> | ||
56 | #include <plat/sdhci.h> | 56 | #include <plat/sdhci.h> |
57 | 57 | ||
58 | #include "common.h" | 58 | #include "common.h" |
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c index 6f14fc729b8..12748b6eaa7 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/mmc/host.h> | 27 | #include <linux/mmc/host.h> |
28 | 28 | ||
29 | #include <video/platform_lcd.h> | 29 | #include <video/platform_lcd.h> |
30 | #include <video/samsung_fimd.h> | ||
30 | 31 | ||
31 | #include <asm/hardware/vic.h> | 32 | #include <asm/hardware/vic.h> |
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
@@ -52,7 +53,6 @@ | |||
52 | #include <plat/s5p-time.h> | 53 | #include <plat/s5p-time.h> |
53 | #include <plat/backlight.h> | 54 | #include <plat/backlight.h> |
54 | #include <plat/fb.h> | 55 | #include <plat/fb.h> |
55 | #include <plat/regs-fb.h> | ||
56 | #include <plat/sdhci.h> | 56 | #include <plat/sdhci.h> |
57 | 57 | ||
58 | #include "common.h" | 58 | #include "common.h" |
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig index 75a26eaf263..15170be97a7 100644 --- a/arch/arm/mach-s5pc100/Kconfig +++ b/arch/arm/mach-s5pc100/Kconfig | |||
@@ -60,12 +60,6 @@ config MACH_SMDKC100 | |||
60 | select S3C_DEV_I2C1 | 60 | select S3C_DEV_I2C1 |
61 | select S3C_DEV_RTC | 61 | select S3C_DEV_RTC |
62 | select S3C_DEV_WDT | 62 | select S3C_DEV_WDT |
63 | select SAMSUNG_DEV_ADC | ||
64 | select SAMSUNG_DEV_BACKLIGHT | ||
65 | select SAMSUNG_DEV_IDE | ||
66 | select SAMSUNG_DEV_KEYPAD | ||
67 | select SAMSUNG_DEV_PWM | ||
68 | select SAMSUNG_DEV_TS | ||
69 | select S5PC100_SETUP_FB_24BPP | 63 | select S5PC100_SETUP_FB_24BPP |
70 | select S5PC100_SETUP_I2C1 | 64 | select S5PC100_SETUP_I2C1 |
71 | select S5PC100_SETUP_IDE | 65 | select S5PC100_SETUP_IDE |
@@ -74,6 +68,12 @@ config MACH_SMDKC100 | |||
74 | select S5P_DEV_FIMC0 | 68 | select S5P_DEV_FIMC0 |
75 | select S5P_DEV_FIMC1 | 69 | select S5P_DEV_FIMC1 |
76 | select S5P_DEV_FIMC2 | 70 | select S5P_DEV_FIMC2 |
71 | select SAMSUNG_DEV_ADC | ||
72 | select SAMSUNG_DEV_BACKLIGHT | ||
73 | select SAMSUNG_DEV_IDE | ||
74 | select SAMSUNG_DEV_KEYPAD | ||
75 | select SAMSUNG_DEV_PWM | ||
76 | select SAMSUNG_DEV_TS | ||
77 | help | 77 | help |
78 | Machine support for the Samsung SMDKC100 | 78 | Machine support for the Samsung SMDKC100 |
79 | 79 | ||
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c index 5d2c0934928..dba7384a87b 100644 --- a/arch/arm/mach-s5pc100/mach-smdkc100.c +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <mach/regs-gpio.h> | 33 | #include <mach/regs-gpio.h> |
34 | 34 | ||
35 | #include <video/platform_lcd.h> | 35 | #include <video/platform_lcd.h> |
36 | #include <video/samsung_fimd.h> | ||
36 | 37 | ||
37 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
38 | #include <asm/mach-types.h> | 39 | #include <asm/mach-types.h> |
@@ -51,7 +52,6 @@ | |||
51 | #include <linux/platform_data/touchscreen-s3c2410.h> | 52 | #include <linux/platform_data/touchscreen-s3c2410.h> |
52 | #include <linux/platform_data/asoc-s3c.h> | 53 | #include <linux/platform_data/asoc-s3c.h> |
53 | #include <plat/backlight.h> | 54 | #include <plat/backlight.h> |
54 | #include <plat/regs-fb-v4.h> | ||
55 | 55 | ||
56 | #include "common.h" | 56 | #include "common.h" |
57 | 57 | ||
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 77185c38188..92ad72f0ef9 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig | |||
@@ -11,11 +11,11 @@ if ARCH_S5PV210 | |||
11 | 11 | ||
12 | config CPU_S5PV210 | 12 | config CPU_S5PV210 |
13 | bool | 13 | bool |
14 | select SAMSUNG_DMADEV | ||
15 | select S5P_EXT_INT | 14 | select S5P_EXT_INT |
16 | select S5P_HRT | 15 | select S5P_HRT |
17 | select S5P_PM if PM | 16 | select S5P_PM if PM |
18 | select S5P_SLEEP if PM | 17 | select S5P_SLEEP if PM |
18 | select SAMSUNG_DMADEV | ||
19 | help | 19 | help |
20 | Enable S5PV210 CPU support | 20 | Enable S5PV210 CPU support |
21 | 21 | ||
@@ -76,44 +76,44 @@ config MACH_AQUILA | |||
76 | bool "Aquila" | 76 | bool "Aquila" |
77 | select CPU_S5PV210 | 77 | select CPU_S5PV210 |
78 | select S3C_DEV_FB | 78 | select S3C_DEV_FB |
79 | select S5P_DEV_FIMC0 | ||
80 | select S5P_DEV_FIMC1 | ||
81 | select S5P_DEV_FIMC2 | ||
82 | select S3C_DEV_HSMMC | 79 | select S3C_DEV_HSMMC |
83 | select S3C_DEV_HSMMC1 | 80 | select S3C_DEV_HSMMC1 |
84 | select S3C_DEV_HSMMC2 | 81 | select S3C_DEV_HSMMC2 |
85 | select S5P_DEV_ONENAND | ||
86 | select S5PV210_SETUP_FB_24BPP | 82 | select S5PV210_SETUP_FB_24BPP |
87 | select S5PV210_SETUP_SDHCI | 83 | select S5PV210_SETUP_SDHCI |
88 | select S5PV210_SETUP_USB_PHY | 84 | select S5PV210_SETUP_USB_PHY |
85 | select S5P_DEV_FIMC0 | ||
86 | select S5P_DEV_FIMC1 | ||
87 | select S5P_DEV_FIMC2 | ||
88 | select S5P_DEV_ONENAND | ||
89 | help | 89 | help |
90 | Machine support for the Samsung Aquila target based on S5PC110 SoC | 90 | Machine support for the Samsung Aquila target based on S5PC110 SoC |
91 | 91 | ||
92 | config MACH_GONI | 92 | config MACH_GONI |
93 | bool "GONI" | 93 | bool "GONI" |
94 | select CPU_S5PV210 | 94 | select CPU_S5PV210 |
95 | select S5P_GPIO_INT | ||
96 | select S3C_DEV_FB | 95 | select S3C_DEV_FB |
97 | select S5P_DEV_FIMC0 | ||
98 | select S5P_DEV_FIMC1 | ||
99 | select S5P_DEV_FIMC2 | ||
100 | select S3C_DEV_HSMMC | 96 | select S3C_DEV_HSMMC |
101 | select S3C_DEV_HSMMC1 | 97 | select S3C_DEV_HSMMC1 |
102 | select S3C_DEV_HSMMC2 | 98 | select S3C_DEV_HSMMC2 |
103 | select S3C_DEV_I2C1 | 99 | select S3C_DEV_I2C1 |
104 | select S3C_DEV_I2C2 | 100 | select S3C_DEV_I2C2 |
105 | select S5P_DEV_MFC | ||
106 | select S3C_DEV_USB_HSOTG | 101 | select S3C_DEV_USB_HSOTG |
107 | select S5P_DEV_ONENAND | ||
108 | select SAMSUNG_DEV_KEYPAD | ||
109 | select S5P_DEV_TV | ||
110 | select S5PV210_SETUP_FB_24BPP | 102 | select S5PV210_SETUP_FB_24BPP |
103 | select S5PV210_SETUP_FIMC | ||
111 | select S5PV210_SETUP_I2C1 | 104 | select S5PV210_SETUP_I2C1 |
112 | select S5PV210_SETUP_I2C2 | 105 | select S5PV210_SETUP_I2C2 |
113 | select S5PV210_SETUP_KEYPAD | 106 | select S5PV210_SETUP_KEYPAD |
114 | select S5PV210_SETUP_SDHCI | 107 | select S5PV210_SETUP_SDHCI |
115 | select S5PV210_SETUP_FIMC | ||
116 | select S5PV210_SETUP_USB_PHY | 108 | select S5PV210_SETUP_USB_PHY |
109 | select S5P_DEV_FIMC0 | ||
110 | select S5P_DEV_FIMC1 | ||
111 | select S5P_DEV_FIMC2 | ||
112 | select S5P_DEV_MFC | ||
113 | select S5P_DEV_ONENAND | ||
114 | select S5P_DEV_TV | ||
115 | select S5P_GPIO_INT | ||
116 | select SAMSUNG_DEV_KEYPAD | ||
117 | help | 117 | help |
118 | Machine support for Samsung GONI board | 118 | Machine support for Samsung GONI board |
119 | S5PC110(MCP) is one of package option of S5PV210 | 119 | S5PC110(MCP) is one of package option of S5PV210 |
@@ -125,14 +125,14 @@ config MACH_SMDKC110 | |||
125 | select S3C_DEV_I2C2 | 125 | select S3C_DEV_I2C2 |
126 | select S3C_DEV_RTC | 126 | select S3C_DEV_RTC |
127 | select S3C_DEV_WDT | 127 | select S3C_DEV_WDT |
128 | select S5PV210_SETUP_I2C1 | ||
129 | select S5PV210_SETUP_I2C2 | ||
130 | select S5PV210_SETUP_IDE | ||
128 | select S5P_DEV_FIMC0 | 131 | select S5P_DEV_FIMC0 |
129 | select S5P_DEV_FIMC1 | 132 | select S5P_DEV_FIMC1 |
130 | select S5P_DEV_FIMC2 | 133 | select S5P_DEV_FIMC2 |
131 | select S5P_DEV_MFC | 134 | select S5P_DEV_MFC |
132 | select SAMSUNG_DEV_IDE | 135 | select SAMSUNG_DEV_IDE |
133 | select S5PV210_SETUP_I2C1 | ||
134 | select S5PV210_SETUP_I2C2 | ||
135 | select S5PV210_SETUP_IDE | ||
136 | help | 136 | help |
137 | Machine support for Samsung SMDKC110 | 137 | Machine support for Samsung SMDKC110 |
138 | S5PC110(MCP) is one of package option of S5PV210 | 138 | S5PC110(MCP) is one of package option of S5PV210 |
@@ -154,6 +154,13 @@ config MACH_SMDKV210 | |||
154 | select S3C_DEV_RTC | 154 | select S3C_DEV_RTC |
155 | select S3C_DEV_USB_HSOTG | 155 | select S3C_DEV_USB_HSOTG |
156 | select S3C_DEV_WDT | 156 | select S3C_DEV_WDT |
157 | select S5PV210_SETUP_FB_24BPP | ||
158 | select S5PV210_SETUP_I2C1 | ||
159 | select S5PV210_SETUP_I2C2 | ||
160 | select S5PV210_SETUP_IDE | ||
161 | select S5PV210_SETUP_KEYPAD | ||
162 | select S5PV210_SETUP_SDHCI | ||
163 | select S5PV210_SETUP_USB_PHY | ||
157 | select S5P_DEV_FIMC0 | 164 | select S5P_DEV_FIMC0 |
158 | select S5P_DEV_FIMC1 | 165 | select S5P_DEV_FIMC1 |
159 | select S5P_DEV_FIMC2 | 166 | select S5P_DEV_FIMC2 |
@@ -165,20 +172,13 @@ config MACH_SMDKV210 | |||
165 | select SAMSUNG_DEV_KEYPAD | 172 | select SAMSUNG_DEV_KEYPAD |
166 | select SAMSUNG_DEV_PWM | 173 | select SAMSUNG_DEV_PWM |
167 | select SAMSUNG_DEV_TS | 174 | select SAMSUNG_DEV_TS |
168 | select S5PV210_SETUP_FB_24BPP | ||
169 | select S5PV210_SETUP_I2C1 | ||
170 | select S5PV210_SETUP_I2C2 | ||
171 | select S5PV210_SETUP_IDE | ||
172 | select S5PV210_SETUP_KEYPAD | ||
173 | select S5PV210_SETUP_SDHCI | ||
174 | select S5PV210_SETUP_USB_PHY | ||
175 | help | 175 | help |
176 | Machine support for Samsung SMDKV210 | 176 | Machine support for Samsung SMDKV210 |
177 | 177 | ||
178 | config MACH_TORBRECK | 178 | config MACH_TORBRECK |
179 | bool "Torbreck" | 179 | bool "Torbreck" |
180 | select CPU_S5PV210 | ||
181 | select ARCH_SPARSEMEM_ENABLE | 180 | select ARCH_SPARSEMEM_ENABLE |
181 | select CPU_S5PV210 | ||
182 | select S3C_DEV_HSMMC | 182 | select S3C_DEV_HSMMC |
183 | select S3C_DEV_HSMMC1 | 183 | select S3C_DEV_HSMMC1 |
184 | select S3C_DEV_HSMMC2 | 184 | select S3C_DEV_HSMMC2 |
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c index 78028df86c5..ee9fa5c2ef2 100644 --- a/arch/arm/mach-s5pv210/mach-aquila.c +++ b/arch/arm/mach-s5pv210/mach-aquila.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/setup.h> | 28 | #include <asm/setup.h> |
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | 30 | ||
31 | #include <video/samsung_fimd.h> | ||
31 | #include <mach/map.h> | 32 | #include <mach/map.h> |
32 | #include <mach/regs-clock.h> | 33 | #include <mach/regs-clock.h> |
33 | 34 | ||
@@ -39,7 +40,6 @@ | |||
39 | #include <plat/fimc-core.h> | 40 | #include <plat/fimc-core.h> |
40 | #include <plat/sdhci.h> | 41 | #include <plat/sdhci.h> |
41 | #include <plat/s5p-time.h> | 42 | #include <plat/s5p-time.h> |
42 | #include <plat/regs-fb-v4.h> | ||
43 | 43 | ||
44 | #include "common.h" | 44 | #include "common.h" |
45 | 45 | ||
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index 00f1e47d490..55e1dba4ffd 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/setup.h> | 35 | #include <asm/setup.h> |
36 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
37 | 37 | ||
38 | #include <video/samsung_fimd.h> | ||
38 | #include <mach/map.h> | 39 | #include <mach/map.h> |
39 | #include <mach/regs-clock.h> | 40 | #include <mach/regs-clock.h> |
40 | 41 | ||
@@ -49,7 +50,6 @@ | |||
49 | #include <plat/clock.h> | 50 | #include <plat/clock.h> |
50 | #include <plat/s5p-time.h> | 51 | #include <plat/s5p-time.h> |
51 | #include <plat/mfc.h> | 52 | #include <plat/mfc.h> |
52 | #include <plat/regs-fb-v4.h> | ||
53 | #include <plat/camport.h> | 53 | #include <plat/camport.h> |
54 | 54 | ||
55 | #include <media/v4l2-mediabus.h> | 55 | #include <media/v4l2-mediabus.h> |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index 7d6fab42050..4cdb5bb7bbc 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
29 | 29 | ||
30 | #include <video/platform_lcd.h> | 30 | #include <video/platform_lcd.h> |
31 | #include <video/samsung_fimd.h> | ||
31 | 32 | ||
32 | #include <mach/map.h> | 33 | #include <mach/map.h> |
33 | #include <mach/regs-clock.h> | 34 | #include <mach/regs-clock.h> |
@@ -46,7 +47,6 @@ | |||
46 | #include <plat/fb.h> | 47 | #include <plat/fb.h> |
47 | #include <plat/s5p-time.h> | 48 | #include <plat/s5p-time.h> |
48 | #include <plat/backlight.h> | 49 | #include <plat/backlight.h> |
49 | #include <plat/regs-fb-v4.h> | ||
50 | #include <plat/mfc.h> | 50 | #include <plat/mfc.h> |
51 | #include <plat/clock.h> | 51 | #include <plat/clock.h> |
52 | 52 | ||
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig index 42625e4d949..ca14dbdcfb2 100644 --- a/arch/arm/mach-sa1100/Kconfig +++ b/arch/arm/mach-sa1100/Kconfig | |||
@@ -49,15 +49,15 @@ config SA1100_COLLIE | |||
49 | bool "Sharp Zaurus SL5500" | 49 | bool "Sharp Zaurus SL5500" |
50 | # FIXME: select CPU_FREQ_SA11x0 | 50 | # FIXME: select CPU_FREQ_SA11x0 |
51 | select SHARP_LOCOMO | 51 | select SHARP_LOCOMO |
52 | select SHARP_SCOOP | ||
53 | select SHARP_PARAM | 52 | select SHARP_PARAM |
53 | select SHARP_SCOOP | ||
54 | help | 54 | help |
55 | Say Y here to support the Sharp Zaurus SL5500 PDAs. | 55 | Say Y here to support the Sharp Zaurus SL5500 PDAs. |
56 | 56 | ||
57 | config SA1100_H3100 | 57 | config SA1100_H3100 |
58 | bool "Compaq iPAQ H3100" | 58 | bool "Compaq iPAQ H3100" |
59 | select HTC_EGPIO | ||
60 | select CPU_FREQ_SA1110 | 59 | select CPU_FREQ_SA1110 |
60 | select HTC_EGPIO | ||
61 | help | 61 | help |
62 | Say Y here if you intend to run this kernel on the Compaq iPAQ | 62 | Say Y here if you intend to run this kernel on the Compaq iPAQ |
63 | H3100 handheld computer. Information about this machine and the | 63 | H3100 handheld computer. Information about this machine and the |
@@ -67,8 +67,8 @@ config SA1100_H3100 | |||
67 | 67 | ||
68 | config SA1100_H3600 | 68 | config SA1100_H3600 |
69 | bool "Compaq iPAQ H3600/H3700" | 69 | bool "Compaq iPAQ H3600/H3700" |
70 | select HTC_EGPIO | ||
71 | select CPU_FREQ_SA1110 | 70 | select CPU_FREQ_SA1110 |
71 | select HTC_EGPIO | ||
72 | help | 72 | help |
73 | Say Y here if you intend to run this kernel on the Compaq iPAQ | 73 | Say Y here if you intend to run this kernel on the Compaq iPAQ |
74 | H3600 handheld computer. Information about this machine and the | 74 | H3600 handheld computer. Information about this machine and the |
@@ -78,16 +78,16 @@ config SA1100_H3600 | |||
78 | 78 | ||
79 | config SA1100_BADGE4 | 79 | config SA1100_BADGE4 |
80 | bool "HP Labs BadgePAD 4" | 80 | bool "HP Labs BadgePAD 4" |
81 | select SA1111 | ||
82 | select CPU_FREQ_SA1100 | 81 | select CPU_FREQ_SA1100 |
82 | select SA1111 | ||
83 | help | 83 | help |
84 | Say Y here if you want to build a kernel for the HP Laboratories | 84 | Say Y here if you want to build a kernel for the HP Laboratories |
85 | BadgePAD 4. | 85 | BadgePAD 4. |
86 | 86 | ||
87 | config SA1100_JORNADA720 | 87 | config SA1100_JORNADA720 |
88 | bool "HP Jornada 720" | 88 | bool "HP Jornada 720" |
89 | select SA1111 | ||
90 | # FIXME: select CPU_FREQ_SA11x0 | 89 | # FIXME: select CPU_FREQ_SA11x0 |
90 | select SA1111 | ||
91 | help | 91 | help |
92 | Say Y here if you want to build a kernel for the HP Jornada 720 | 92 | Say Y here if you want to build a kernel for the HP Jornada 720 |
93 | handheld computer. See | 93 | handheld computer. See |
@@ -95,8 +95,8 @@ config SA1100_JORNADA720 | |||
95 | 95 | ||
96 | config SA1100_JORNADA720_SSP | 96 | config SA1100_JORNADA720_SSP |
97 | bool "HP Jornada 720 Extended SSP driver" | 97 | bool "HP Jornada 720 Extended SSP driver" |
98 | select SA1100_SSP | ||
99 | depends on SA1100_JORNADA720 | 98 | depends on SA1100_JORNADA720 |
99 | select SA1100_SSP | ||
100 | help | 100 | help |
101 | Say Y here if you have a HP Jornada 7xx handheld computer and you | 101 | Say Y here if you have a HP Jornada 7xx handheld computer and you |
102 | want to access devices connected to the MCU. Those include the | 102 | want to access devices connected to the MCU. Those include the |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 4cacc2d22fb..8ae100cc655 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -4,49 +4,49 @@ comment "SH-Mobile System Type" | |||
4 | 4 | ||
5 | config ARCH_SH7367 | 5 | config ARCH_SH7367 |
6 | bool "SH-Mobile G3 (SH7367)" | 6 | bool "SH-Mobile G3 (SH7367)" |
7 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
7 | select CPU_V6 | 8 | select CPU_V6 |
8 | select SH_CLK_CPG | 9 | select SH_CLK_CPG |
9 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
10 | 10 | ||
11 | config ARCH_SH7377 | 11 | config ARCH_SH7377 |
12 | bool "SH-Mobile G4 (SH7377)" | 12 | bool "SH-Mobile G4 (SH7377)" |
13 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
13 | select CPU_V7 | 14 | select CPU_V7 |
14 | select SH_CLK_CPG | 15 | select SH_CLK_CPG |
15 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
16 | 16 | ||
17 | config ARCH_SH7372 | 17 | config ARCH_SH7372 |
18 | bool "SH-Mobile AP4 (SH7372)" | 18 | bool "SH-Mobile AP4 (SH7372)" |
19 | select CPU_V7 | ||
20 | select SH_CLK_CPG | ||
21 | select ARCH_WANT_OPTIONAL_GPIOLIB | 19 | select ARCH_WANT_OPTIONAL_GPIOLIB |
22 | select ARM_CPU_SUSPEND if PM || CPU_IDLE | 20 | select ARM_CPU_SUSPEND if PM || CPU_IDLE |
21 | select CPU_V7 | ||
22 | select SH_CLK_CPG | ||
23 | 23 | ||
24 | config ARCH_SH73A0 | 24 | config ARCH_SH73A0 |
25 | bool "SH-Mobile AG5 (R8A73A00)" | 25 | bool "SH-Mobile AG5 (R8A73A00)" |
26 | select CPU_V7 | ||
27 | select SH_CLK_CPG | ||
28 | select ARCH_WANT_OPTIONAL_GPIOLIB | 26 | select ARCH_WANT_OPTIONAL_GPIOLIB |
29 | select ARM_GIC | 27 | select ARM_GIC |
28 | select CPU_V7 | ||
30 | select I2C | 29 | select I2C |
30 | select SH_CLK_CPG | ||
31 | 31 | ||
32 | config ARCH_R8A7740 | 32 | config ARCH_R8A7740 |
33 | bool "R-Mobile A1 (R8A77400)" | 33 | bool "R-Mobile A1 (R8A77400)" |
34 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
34 | select CPU_V7 | 35 | select CPU_V7 |
35 | select SH_CLK_CPG | 36 | select SH_CLK_CPG |
36 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
37 | 37 | ||
38 | config ARCH_R8A7779 | 38 | config ARCH_R8A7779 |
39 | bool "R-Car H1 (R8A77790)" | 39 | bool "R-Car H1 (R8A77790)" |
40 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
41 | select ARM_GIC | ||
40 | select CPU_V7 | 42 | select CPU_V7 |
41 | select SH_CLK_CPG | 43 | select SH_CLK_CPG |
42 | select ARM_GIC | ||
43 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
44 | 44 | ||
45 | config ARCH_EMEV2 | 45 | config ARCH_EMEV2 |
46 | bool "Emma Mobile EV2" | 46 | bool "Emma Mobile EV2" |
47 | select CPU_V7 | ||
48 | select ARM_GIC | ||
49 | select ARCH_WANT_OPTIONAL_GPIOLIB | 47 | select ARCH_WANT_OPTIONAL_GPIOLIB |
48 | select ARM_GIC | ||
49 | select CPU_V7 | ||
50 | 50 | ||
51 | comment "SH-Mobile Board Type" | 51 | comment "SH-Mobile Board Type" |
52 | 52 | ||
@@ -65,9 +65,9 @@ config MACH_AP4EVB | |||
65 | bool "AP4EVB board" | 65 | bool "AP4EVB board" |
66 | depends on ARCH_SH7372 | 66 | depends on ARCH_SH7372 |
67 | select ARCH_REQUIRE_GPIOLIB | 67 | select ARCH_REQUIRE_GPIOLIB |
68 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
68 | select SH_LCD_MIPI_DSI | 69 | select SH_LCD_MIPI_DSI |
69 | select SND_SOC_AK4642 if SND_SIMPLE_CARD | 70 | select SND_SOC_AK4642 if SND_SIMPLE_CARD |
70 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
71 | 71 | ||
72 | choice | 72 | choice |
73 | prompt "AP4EVB LCD panel selection" | 73 | prompt "AP4EVB LCD panel selection" |
@@ -84,37 +84,37 @@ endchoice | |||
84 | 84 | ||
85 | config MACH_AG5EVM | 85 | config MACH_AG5EVM |
86 | bool "AG5EVM board" | 86 | bool "AG5EVM board" |
87 | depends on ARCH_SH73A0 | ||
87 | select ARCH_REQUIRE_GPIOLIB | 88 | select ARCH_REQUIRE_GPIOLIB |
88 | select SH_LCD_MIPI_DSI | ||
89 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 89 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
90 | depends on ARCH_SH73A0 | 90 | select SH_LCD_MIPI_DSI |
91 | 91 | ||
92 | config MACH_MACKEREL | 92 | config MACH_MACKEREL |
93 | bool "mackerel board" | 93 | bool "mackerel board" |
94 | depends on ARCH_SH7372 | 94 | depends on ARCH_SH7372 |
95 | select ARCH_REQUIRE_GPIOLIB | 95 | select ARCH_REQUIRE_GPIOLIB |
96 | select SND_SOC_AK4642 if SND_SIMPLE_CARD | ||
97 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 96 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
97 | select SND_SOC_AK4642 if SND_SIMPLE_CARD | ||
98 | 98 | ||
99 | config MACH_KOTA2 | 99 | config MACH_KOTA2 |
100 | bool "KOTA2 board" | 100 | bool "KOTA2 board" |
101 | depends on ARCH_SH73A0 | ||
101 | select ARCH_REQUIRE_GPIOLIB | 102 | select ARCH_REQUIRE_GPIOLIB |
102 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 103 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
103 | depends on ARCH_SH73A0 | ||
104 | 104 | ||
105 | config MACH_BONITO | 105 | config MACH_BONITO |
106 | bool "bonito board" | 106 | bool "bonito board" |
107 | depends on ARCH_R8A7740 | ||
107 | select ARCH_REQUIRE_GPIOLIB | 108 | select ARCH_REQUIRE_GPIOLIB |
108 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 109 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
109 | depends on ARCH_R8A7740 | ||
110 | 110 | ||
111 | config MACH_ARMADILLO800EVA | 111 | config MACH_ARMADILLO800EVA |
112 | bool "Armadillo-800 EVA board" | 112 | bool "Armadillo-800 EVA board" |
113 | depends on ARCH_R8A7740 | 113 | depends on ARCH_R8A7740 |
114 | select ARCH_REQUIRE_GPIOLIB | 114 | select ARCH_REQUIRE_GPIOLIB |
115 | select USE_OF | ||
116 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 115 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
117 | select SND_SOC_WM8978 if SND_SIMPLE_CARD | 116 | select SND_SOC_WM8978 if SND_SIMPLE_CARD |
117 | select USE_OF | ||
118 | 118 | ||
119 | config MACH_MARZEN | 119 | config MACH_MARZEN |
120 | bool "MARZEN board" | 120 | bool "MARZEN board" |
@@ -125,16 +125,16 @@ config MACH_MARZEN | |||
125 | config MACH_KZM9D | 125 | config MACH_KZM9D |
126 | bool "KZM9D board" | 126 | bool "KZM9D board" |
127 | depends on ARCH_EMEV2 | 127 | depends on ARCH_EMEV2 |
128 | select USE_OF | ||
129 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 128 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
129 | select USE_OF | ||
130 | 130 | ||
131 | config MACH_KZM9G | 131 | config MACH_KZM9G |
132 | bool "KZM-A9-GT board" | 132 | bool "KZM-A9-GT board" |
133 | depends on ARCH_SH73A0 | 133 | depends on ARCH_SH73A0 |
134 | select ARCH_REQUIRE_GPIOLIB | 134 | select ARCH_REQUIRE_GPIOLIB |
135 | select USE_OF | ||
136 | select SND_SOC_AK4642 if SND_SIMPLE_CARD | ||
137 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 135 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
136 | select SND_SOC_AK4642 if SND_SIMPLE_CARD | ||
137 | select USE_OF | ||
138 | 138 | ||
139 | comment "SH-Mobile System Configuration" | 139 | comment "SH-Mobile System Configuration" |
140 | 140 | ||
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 11680c532b3..9ff6f6ea361 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig | |||
@@ -4,42 +4,42 @@ comment "NVIDIA Tegra options" | |||
4 | 4 | ||
5 | config ARCH_TEGRA_2x_SOC | 5 | config ARCH_TEGRA_2x_SOC |
6 | bool "Enable support for Tegra20 family" | 6 | bool "Enable support for Tegra20 family" |
7 | select CPU_V7 | ||
8 | select ARM_GIC | ||
9 | select ARCH_REQUIRE_GPIOLIB | 7 | select ARCH_REQUIRE_GPIOLIB |
10 | select PINCTRL | ||
11 | select PINCTRL_TEGRA20 | ||
12 | select USB_ARCH_HAS_EHCI if USB_SUPPORT | ||
13 | select USB_ULPI if USB | ||
14 | select USB_ULPI_VIEWPORT if USB_SUPPORT | ||
15 | select ARM_ERRATA_720789 | 8 | select ARM_ERRATA_720789 |
16 | select ARM_ERRATA_742230 | 9 | select ARM_ERRATA_742230 |
17 | select ARM_ERRATA_751472 | 10 | select ARM_ERRATA_751472 |
18 | select ARM_ERRATA_754327 | 11 | select ARM_ERRATA_754327 |
19 | select ARM_ERRATA_764369 if SMP | 12 | select ARM_ERRATA_764369 if SMP |
13 | select ARM_GIC | ||
14 | select CPU_FREQ_TABLE if CPU_FREQ | ||
15 | select CPU_V7 | ||
16 | select PINCTRL | ||
17 | select PINCTRL_TEGRA20 | ||
20 | select PL310_ERRATA_727915 if CACHE_L2X0 | 18 | select PL310_ERRATA_727915 if CACHE_L2X0 |
21 | select PL310_ERRATA_769419 if CACHE_L2X0 | 19 | select PL310_ERRATA_769419 if CACHE_L2X0 |
22 | select CPU_FREQ_TABLE if CPU_FREQ | 20 | select USB_ARCH_HAS_EHCI if USB_SUPPORT |
21 | select USB_ULPI if USB | ||
22 | select USB_ULPI_VIEWPORT if USB_SUPPORT | ||
23 | help | 23 | help |
24 | Support for NVIDIA Tegra AP20 and T20 processors, based on the | 24 | Support for NVIDIA Tegra AP20 and T20 processors, based on the |
25 | ARM CortexA9MP CPU and the ARM PL310 L2 cache controller | 25 | ARM CortexA9MP CPU and the ARM PL310 L2 cache controller |
26 | 26 | ||
27 | config ARCH_TEGRA_3x_SOC | 27 | config ARCH_TEGRA_3x_SOC |
28 | bool "Enable support for Tegra30 family" | 28 | bool "Enable support for Tegra30 family" |
29 | select CPU_V7 | ||
30 | select ARM_GIC | ||
31 | select ARCH_REQUIRE_GPIOLIB | 29 | select ARCH_REQUIRE_GPIOLIB |
32 | select PINCTRL | ||
33 | select PINCTRL_TEGRA30 | ||
34 | select USB_ARCH_HAS_EHCI if USB_SUPPORT | ||
35 | select USB_ULPI if USB | ||
36 | select USB_ULPI_VIEWPORT if USB_SUPPORT | ||
37 | select ARM_ERRATA_743622 | 30 | select ARM_ERRATA_743622 |
38 | select ARM_ERRATA_751472 | 31 | select ARM_ERRATA_751472 |
39 | select ARM_ERRATA_754322 | 32 | select ARM_ERRATA_754322 |
40 | select ARM_ERRATA_764369 if SMP | 33 | select ARM_ERRATA_764369 if SMP |
41 | select PL310_ERRATA_769419 if CACHE_L2X0 | 34 | select ARM_GIC |
42 | select CPU_FREQ_TABLE if CPU_FREQ | 35 | select CPU_FREQ_TABLE if CPU_FREQ |
36 | select CPU_V7 | ||
37 | select PINCTRL | ||
38 | select PINCTRL_TEGRA30 | ||
39 | select PL310_ERRATA_769419 if CACHE_L2X0 | ||
40 | select USB_ARCH_HAS_EHCI if USB_SUPPORT | ||
41 | select USB_ULPI if USB | ||
42 | select USB_ULPI_VIEWPORT if USB_SUPPORT | ||
43 | help | 43 | help |
44 | Support for NVIDIA Tegra T30 processor family, based on the | 44 | Support for NVIDIA Tegra T30 processor family, based on the |
45 | ARM CortexA9MP CPU and the ARM PL310 L2 cache controller | 45 | ARM CortexA9MP CPU and the ARM PL310 L2 cache controller |
diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig index f7e12ede008..1f597647d43 100644 --- a/arch/arm/mach-u300/Kconfig +++ b/arch/arm/mach-u300/Kconfig | |||
@@ -7,8 +7,8 @@ comment "ST-Ericsson Mobile Platform Products" | |||
7 | config MACH_U300 | 7 | config MACH_U300 |
8 | bool "U300" | 8 | bool "U300" |
9 | select PINCTRL | 9 | select PINCTRL |
10 | select PINCTRL_U300 | ||
11 | select PINCTRL_COH901 | 10 | select PINCTRL_COH901 |
11 | select PINCTRL_U300 | ||
12 | 12 | ||
13 | comment "ST-Ericsson U300/U335 Feature Selections" | 13 | comment "ST-Ericsson U300/U335 Feature Selections" |
14 | 14 | ||
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 5848206ee9b..e8c3f0d70ca 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -3,33 +3,33 @@ if ARCH_U8500 | |||
3 | config UX500_SOC_COMMON | 3 | config UX500_SOC_COMMON |
4 | bool | 4 | bool |
5 | default y | 5 | default y |
6 | select ARM_GIC | ||
7 | select HAS_MTU | ||
8 | select PL310_ERRATA_753970 if CACHE_PL310 | ||
9 | select ARM_ERRATA_754322 | 6 | select ARM_ERRATA_754322 |
10 | select ARM_ERRATA_764369 if SMP | 7 | select ARM_ERRATA_764369 if SMP |
8 | select ARM_GIC | ||
11 | select CACHE_L2X0 | 9 | select CACHE_L2X0 |
10 | select COMMON_CLK | ||
11 | select HAS_MTU | ||
12 | select PINCTRL | 12 | select PINCTRL |
13 | select PINCTRL_NOMADIK | 13 | select PINCTRL_NOMADIK |
14 | select COMMON_CLK | 14 | select PL310_ERRATA_753970 if CACHE_PL310 |
15 | 15 | ||
16 | config UX500_SOC_DB8500 | 16 | config UX500_SOC_DB8500 |
17 | bool | 17 | bool |
18 | select CPU_FREQ_TABLE if CPU_FREQ | ||
18 | select MFD_DB8500_PRCMU | 19 | select MFD_DB8500_PRCMU |
20 | select PINCTRL_DB8500 | ||
19 | select REGULATOR | 21 | select REGULATOR |
20 | select REGULATOR_DB8500_PRCMU | 22 | select REGULATOR_DB8500_PRCMU |
21 | select CPU_FREQ_TABLE if CPU_FREQ | ||
22 | select PINCTRL_DB8500 | ||
23 | 23 | ||
24 | menu "Ux500 target platform (boards)" | 24 | menu "Ux500 target platform (boards)" |
25 | 25 | ||
26 | config MACH_MOP500 | 26 | config MACH_MOP500 |
27 | bool "U8500 Development platform, MOP500 versions" | 27 | bool "U8500 Development platform, MOP500 versions" |
28 | select UX500_SOC_DB8500 | ||
29 | select I2C | 28 | select I2C |
30 | select I2C_NOMADIK | 29 | select I2C_NOMADIK |
31 | select SOC_BUS | ||
32 | select REGULATOR_FIXED_VOLTAGE | 30 | select REGULATOR_FIXED_VOLTAGE |
31 | select SOC_BUS | ||
32 | select UX500_SOC_DB8500 | ||
33 | help | 33 | help |
34 | Include support for the MOP500 development platform. | 34 | Include support for the MOP500 development platform. |
35 | 35 | ||
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index c1f38f6625b..63d8e9f81b9 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig | |||
@@ -3,9 +3,9 @@ menu "Versatile platform type" | |||
3 | 3 | ||
4 | config ARCH_VERSATILE_PB | 4 | config ARCH_VERSATILE_PB |
5 | bool "Support Versatile Platform Baseboard for ARM926EJ-S" | 5 | bool "Support Versatile Platform Baseboard for ARM926EJ-S" |
6 | default y | ||
6 | select CPU_ARM926T | 7 | select CPU_ARM926T |
7 | select MIGHT_HAVE_PCI | 8 | select MIGHT_HAVE_PCI |
8 | default y | ||
9 | help | 9 | help |
10 | Include support for the ARM(R) Versatile Platform Baseboard | 10 | Include support for the ARM(R) Versatile Platform Baseboard |
11 | for the ARM926EJ-S. | 11 | for the ARM926EJ-S. |
@@ -19,8 +19,8 @@ config MACH_VERSATILE_AB | |||
19 | 19 | ||
20 | config MACH_VERSATILE_DT | 20 | config MACH_VERSATILE_DT |
21 | bool "Support Versatile platform from device tree" | 21 | bool "Support Versatile platform from device tree" |
22 | select USE_OF | ||
23 | select CPU_ARM926T | 22 | select CPU_ARM926T |
23 | select USE_OF | ||
24 | help | 24 | help |
25 | Include support for the ARM(R) Versatile/PB platform, | 25 | Include support for the ARM(R) Versatile/PB platform, |
26 | using the device tree for discovery | 26 | using the device tree for discovery |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 101b9681c08..94186b6c685 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -10,8 +10,8 @@ config CPU_ARM7TDMI | |||
10 | depends on !MMU | 10 | depends on !MMU |
11 | select CPU_32v4T | 11 | select CPU_32v4T |
12 | select CPU_ABRT_LV4T | 12 | select CPU_ABRT_LV4T |
13 | select CPU_PABRT_LEGACY | ||
14 | select CPU_CACHE_V4 | 13 | select CPU_CACHE_V4 |
14 | select CPU_PABRT_LEGACY | ||
15 | help | 15 | help |
16 | A 32-bit RISC microprocessor based on the ARM7 processor core | 16 | A 32-bit RISC microprocessor based on the ARM7 processor core |
17 | which has no memory control unit and cache. | 17 | which has no memory control unit and cache. |
@@ -24,11 +24,11 @@ config CPU_ARM720T | |||
24 | bool "Support ARM720T processor" if ARCH_INTEGRATOR | 24 | bool "Support ARM720T processor" if ARCH_INTEGRATOR |
25 | select CPU_32v4T | 25 | select CPU_32v4T |
26 | select CPU_ABRT_LV4T | 26 | select CPU_ABRT_LV4T |
27 | select CPU_PABRT_LEGACY | ||
28 | select CPU_CACHE_V4 | 27 | select CPU_CACHE_V4 |
29 | select CPU_CACHE_VIVT | 28 | select CPU_CACHE_VIVT |
30 | select CPU_CP15_MMU | ||
31 | select CPU_COPY_V4WT if MMU | 29 | select CPU_COPY_V4WT if MMU |
30 | select CPU_CP15_MMU | ||
31 | select CPU_PABRT_LEGACY | ||
32 | select CPU_TLB_V4WT if MMU | 32 | select CPU_TLB_V4WT if MMU |
33 | help | 33 | help |
34 | A 32-bit RISC processor with 8kByte Cache, Write Buffer and | 34 | A 32-bit RISC processor with 8kByte Cache, Write Buffer and |
@@ -43,9 +43,9 @@ config CPU_ARM740T | |||
43 | depends on !MMU | 43 | depends on !MMU |
44 | select CPU_32v4T | 44 | select CPU_32v4T |
45 | select CPU_ABRT_LV4T | 45 | select CPU_ABRT_LV4T |
46 | select CPU_PABRT_LEGACY | ||
47 | select CPU_CACHE_V3 # although the core is v4t | 46 | select CPU_CACHE_V3 # although the core is v4t |
48 | select CPU_CP15_MPU | 47 | select CPU_CP15_MPU |
48 | select CPU_PABRT_LEGACY | ||
49 | help | 49 | help |
50 | A 32-bit RISC processor with 8KB cache or 4KB variants, | 50 | A 32-bit RISC processor with 8KB cache or 4KB variants, |
51 | write buffer and MPU(Protection Unit) built around | 51 | write buffer and MPU(Protection Unit) built around |
@@ -60,8 +60,8 @@ config CPU_ARM9TDMI | |||
60 | depends on !MMU | 60 | depends on !MMU |
61 | select CPU_32v4T | 61 | select CPU_32v4T |
62 | select CPU_ABRT_NOMMU | 62 | select CPU_ABRT_NOMMU |
63 | select CPU_PABRT_LEGACY | ||
64 | select CPU_CACHE_V4 | 63 | select CPU_CACHE_V4 |
64 | select CPU_PABRT_LEGACY | ||
65 | help | 65 | help |
66 | A 32-bit RISC microprocessor based on the ARM9 processor core | 66 | A 32-bit RISC microprocessor based on the ARM9 processor core |
67 | which has no memory control unit and cache. | 67 | which has no memory control unit and cache. |
@@ -74,11 +74,11 @@ config CPU_ARM920T | |||
74 | bool "Support ARM920T processor" if ARCH_INTEGRATOR | 74 | bool "Support ARM920T processor" if ARCH_INTEGRATOR |
75 | select CPU_32v4T | 75 | select CPU_32v4T |
76 | select CPU_ABRT_EV4T | 76 | select CPU_ABRT_EV4T |
77 | select CPU_PABRT_LEGACY | ||
78 | select CPU_CACHE_V4WT | 77 | select CPU_CACHE_V4WT |
79 | select CPU_CACHE_VIVT | 78 | select CPU_CACHE_VIVT |
80 | select CPU_CP15_MMU | ||
81 | select CPU_COPY_V4WB if MMU | 79 | select CPU_COPY_V4WB if MMU |
80 | select CPU_CP15_MMU | ||
81 | select CPU_PABRT_LEGACY | ||
82 | select CPU_TLB_V4WBI if MMU | 82 | select CPU_TLB_V4WBI if MMU |
83 | help | 83 | help |
84 | The ARM920T is licensed to be produced by numerous vendors, | 84 | The ARM920T is licensed to be produced by numerous vendors, |
@@ -92,11 +92,11 @@ config CPU_ARM922T | |||
92 | bool "Support ARM922T processor" if ARCH_INTEGRATOR | 92 | bool "Support ARM922T processor" if ARCH_INTEGRATOR |
93 | select CPU_32v4T | 93 | select CPU_32v4T |
94 | select CPU_ABRT_EV4T | 94 | select CPU_ABRT_EV4T |
95 | select CPU_PABRT_LEGACY | ||
96 | select CPU_CACHE_V4WT | 95 | select CPU_CACHE_V4WT |
97 | select CPU_CACHE_VIVT | 96 | select CPU_CACHE_VIVT |
98 | select CPU_CP15_MMU | ||
99 | select CPU_COPY_V4WB if MMU | 97 | select CPU_COPY_V4WB if MMU |
98 | select CPU_CP15_MMU | ||
99 | select CPU_PABRT_LEGACY | ||
100 | select CPU_TLB_V4WBI if MMU | 100 | select CPU_TLB_V4WBI if MMU |
101 | help | 101 | help |
102 | The ARM922T is a version of the ARM920T, but with smaller | 102 | The ARM922T is a version of the ARM920T, but with smaller |
@@ -111,11 +111,11 @@ config CPU_ARM925T | |||
111 | bool "Support ARM925T processor" if ARCH_OMAP1 | 111 | bool "Support ARM925T processor" if ARCH_OMAP1 |
112 | select CPU_32v4T | 112 | select CPU_32v4T |
113 | select CPU_ABRT_EV4T | 113 | select CPU_ABRT_EV4T |
114 | select CPU_PABRT_LEGACY | ||
115 | select CPU_CACHE_V4WT | 114 | select CPU_CACHE_V4WT |
116 | select CPU_CACHE_VIVT | 115 | select CPU_CACHE_VIVT |
117 | select CPU_CP15_MMU | ||
118 | select CPU_COPY_V4WB if MMU | 116 | select CPU_COPY_V4WB if MMU |
117 | select CPU_CP15_MMU | ||
118 | select CPU_PABRT_LEGACY | ||
119 | select CPU_TLB_V4WBI if MMU | 119 | select CPU_TLB_V4WBI if MMU |
120 | help | 120 | help |
121 | The ARM925T is a mix between the ARM920T and ARM926T, but with | 121 | The ARM925T is a mix between the ARM920T and ARM926T, but with |
@@ -130,10 +130,10 @@ config CPU_ARM926T | |||
130 | bool "Support ARM926T processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB | 130 | bool "Support ARM926T processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB |
131 | select CPU_32v5 | 131 | select CPU_32v5 |
132 | select CPU_ABRT_EV5TJ | 132 | select CPU_ABRT_EV5TJ |
133 | select CPU_PABRT_LEGACY | ||
134 | select CPU_CACHE_VIVT | 133 | select CPU_CACHE_VIVT |
135 | select CPU_CP15_MMU | ||
136 | select CPU_COPY_V4WB if MMU | 134 | select CPU_COPY_V4WB if MMU |
135 | select CPU_CP15_MMU | ||
136 | select CPU_PABRT_LEGACY | ||
137 | select CPU_TLB_V4WBI if MMU | 137 | select CPU_TLB_V4WBI if MMU |
138 | help | 138 | help |
139 | This is a variant of the ARM920. It has slightly different | 139 | This is a variant of the ARM920. It has slightly different |
@@ -148,11 +148,11 @@ config CPU_FA526 | |||
148 | bool | 148 | bool |
149 | select CPU_32v4 | 149 | select CPU_32v4 |
150 | select CPU_ABRT_EV4 | 150 | select CPU_ABRT_EV4 |
151 | select CPU_PABRT_LEGACY | ||
152 | select CPU_CACHE_VIVT | ||
153 | select CPU_CP15_MMU | ||
154 | select CPU_CACHE_FA | 151 | select CPU_CACHE_FA |
152 | select CPU_CACHE_VIVT | ||
155 | select CPU_COPY_FA if MMU | 153 | select CPU_COPY_FA if MMU |
154 | select CPU_CP15_MMU | ||
155 | select CPU_PABRT_LEGACY | ||
156 | select CPU_TLB_FA if MMU | 156 | select CPU_TLB_FA if MMU |
157 | help | 157 | help |
158 | The FA526 is a version of the ARMv4 compatible processor with | 158 | The FA526 is a version of the ARMv4 compatible processor with |
@@ -167,9 +167,9 @@ config CPU_ARM940T | |||
167 | depends on !MMU | 167 | depends on !MMU |
168 | select CPU_32v4T | 168 | select CPU_32v4T |
169 | select CPU_ABRT_NOMMU | 169 | select CPU_ABRT_NOMMU |
170 | select CPU_PABRT_LEGACY | ||
171 | select CPU_CACHE_VIVT | 170 | select CPU_CACHE_VIVT |
172 | select CPU_CP15_MPU | 171 | select CPU_CP15_MPU |
172 | select CPU_PABRT_LEGACY | ||
173 | help | 173 | help |
174 | ARM940T is a member of the ARM9TDMI family of general- | 174 | ARM940T is a member of the ARM9TDMI family of general- |
175 | purpose microprocessors with MPU and separate 4KB | 175 | purpose microprocessors with MPU and separate 4KB |
@@ -185,9 +185,9 @@ config CPU_ARM946E | |||
185 | depends on !MMU | 185 | depends on !MMU |
186 | select CPU_32v5 | 186 | select CPU_32v5 |
187 | select CPU_ABRT_NOMMU | 187 | select CPU_ABRT_NOMMU |
188 | select CPU_PABRT_LEGACY | ||
189 | select CPU_CACHE_VIVT | 188 | select CPU_CACHE_VIVT |
190 | select CPU_CP15_MPU | 189 | select CPU_CP15_MPU |
190 | select CPU_PABRT_LEGACY | ||
191 | help | 191 | help |
192 | ARM946E-S is a member of the ARM9E-S family of high- | 192 | ARM946E-S is a member of the ARM9E-S family of high- |
193 | performance, 32-bit system-on-chip processor solutions. | 193 | performance, 32-bit system-on-chip processor solutions. |
@@ -201,11 +201,11 @@ config CPU_ARM1020 | |||
201 | bool "Support ARM1020T (rev 0) processor" if ARCH_INTEGRATOR | 201 | bool "Support ARM1020T (rev 0) processor" if ARCH_INTEGRATOR |
202 | select CPU_32v5 | 202 | select CPU_32v5 |
203 | select CPU_ABRT_EV4T | 203 | select CPU_ABRT_EV4T |
204 | select CPU_PABRT_LEGACY | ||
205 | select CPU_CACHE_V4WT | 204 | select CPU_CACHE_V4WT |
206 | select CPU_CACHE_VIVT | 205 | select CPU_CACHE_VIVT |
207 | select CPU_CP15_MMU | ||
208 | select CPU_COPY_V4WB if MMU | 206 | select CPU_COPY_V4WB if MMU |
207 | select CPU_CP15_MMU | ||
208 | select CPU_PABRT_LEGACY | ||
209 | select CPU_TLB_V4WBI if MMU | 209 | select CPU_TLB_V4WBI if MMU |
210 | help | 210 | help |
211 | The ARM1020 is the 32K cached version of the ARM10 processor, | 211 | The ARM1020 is the 32K cached version of the ARM10 processor, |
@@ -217,25 +217,25 @@ config CPU_ARM1020 | |||
217 | # ARM1020E - needs validating | 217 | # ARM1020E - needs validating |
218 | config CPU_ARM1020E | 218 | config CPU_ARM1020E |
219 | bool "Support ARM1020E processor" if ARCH_INTEGRATOR | 219 | bool "Support ARM1020E processor" if ARCH_INTEGRATOR |
220 | depends on n | ||
220 | select CPU_32v5 | 221 | select CPU_32v5 |
221 | select CPU_ABRT_EV4T | 222 | select CPU_ABRT_EV4T |
222 | select CPU_PABRT_LEGACY | ||
223 | select CPU_CACHE_V4WT | 223 | select CPU_CACHE_V4WT |
224 | select CPU_CACHE_VIVT | 224 | select CPU_CACHE_VIVT |
225 | select CPU_CP15_MMU | ||
226 | select CPU_COPY_V4WB if MMU | 225 | select CPU_COPY_V4WB if MMU |
226 | select CPU_CP15_MMU | ||
227 | select CPU_PABRT_LEGACY | ||
227 | select CPU_TLB_V4WBI if MMU | 228 | select CPU_TLB_V4WBI if MMU |
228 | depends on n | ||
229 | 229 | ||
230 | # ARM1022E | 230 | # ARM1022E |
231 | config CPU_ARM1022 | 231 | config CPU_ARM1022 |
232 | bool "Support ARM1022E processor" if ARCH_INTEGRATOR | 232 | bool "Support ARM1022E processor" if ARCH_INTEGRATOR |
233 | select CPU_32v5 | 233 | select CPU_32v5 |
234 | select CPU_ABRT_EV4T | 234 | select CPU_ABRT_EV4T |
235 | select CPU_PABRT_LEGACY | ||
236 | select CPU_CACHE_VIVT | 235 | select CPU_CACHE_VIVT |
237 | select CPU_CP15_MMU | ||
238 | select CPU_COPY_V4WB if MMU # can probably do better | 236 | select CPU_COPY_V4WB if MMU # can probably do better |
237 | select CPU_CP15_MMU | ||
238 | select CPU_PABRT_LEGACY | ||
239 | select CPU_TLB_V4WBI if MMU | 239 | select CPU_TLB_V4WBI if MMU |
240 | help | 240 | help |
241 | The ARM1022E is an implementation of the ARMv5TE architecture | 241 | The ARM1022E is an implementation of the ARMv5TE architecture |
@@ -250,10 +250,10 @@ config CPU_ARM1026 | |||
250 | bool "Support ARM1026EJ-S processor" if ARCH_INTEGRATOR | 250 | bool "Support ARM1026EJ-S processor" if ARCH_INTEGRATOR |
251 | select CPU_32v5 | 251 | select CPU_32v5 |
252 | select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10 | 252 | select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10 |
253 | select CPU_PABRT_LEGACY | ||
254 | select CPU_CACHE_VIVT | 253 | select CPU_CACHE_VIVT |
255 | select CPU_CP15_MMU | ||
256 | select CPU_COPY_V4WB if MMU # can probably do better | 254 | select CPU_COPY_V4WB if MMU # can probably do better |
255 | select CPU_CP15_MMU | ||
256 | select CPU_PABRT_LEGACY | ||
257 | select CPU_TLB_V4WBI if MMU | 257 | select CPU_TLB_V4WBI if MMU |
258 | help | 258 | help |
259 | The ARM1026EJ-S is an implementation of the ARMv5TEJ architecture | 259 | The ARM1026EJ-S is an implementation of the ARMv5TEJ architecture |
@@ -268,11 +268,11 @@ config CPU_SA110 | |||
268 | select CPU_32v3 if ARCH_RPC | 268 | select CPU_32v3 if ARCH_RPC |
269 | select CPU_32v4 if !ARCH_RPC | 269 | select CPU_32v4 if !ARCH_RPC |
270 | select CPU_ABRT_EV4 | 270 | select CPU_ABRT_EV4 |
271 | select CPU_PABRT_LEGACY | ||
272 | select CPU_CACHE_V4WB | 271 | select CPU_CACHE_V4WB |
273 | select CPU_CACHE_VIVT | 272 | select CPU_CACHE_VIVT |
274 | select CPU_CP15_MMU | ||
275 | select CPU_COPY_V4WB if MMU | 273 | select CPU_COPY_V4WB if MMU |
274 | select CPU_CP15_MMU | ||
275 | select CPU_PABRT_LEGACY | ||
276 | select CPU_TLB_V4WB if MMU | 276 | select CPU_TLB_V4WB if MMU |
277 | help | 277 | help |
278 | The Intel StrongARM(R) SA-110 is a 32-bit microprocessor and | 278 | The Intel StrongARM(R) SA-110 is a 32-bit microprocessor and |
@@ -288,10 +288,10 @@ config CPU_SA1100 | |||
288 | bool | 288 | bool |
289 | select CPU_32v4 | 289 | select CPU_32v4 |
290 | select CPU_ABRT_EV4 | 290 | select CPU_ABRT_EV4 |
291 | select CPU_PABRT_LEGACY | ||
292 | select CPU_CACHE_V4WB | 291 | select CPU_CACHE_V4WB |
293 | select CPU_CACHE_VIVT | 292 | select CPU_CACHE_VIVT |
294 | select CPU_CP15_MMU | 293 | select CPU_CP15_MMU |
294 | select CPU_PABRT_LEGACY | ||
295 | select CPU_TLB_V4WB if MMU | 295 | select CPU_TLB_V4WB if MMU |
296 | 296 | ||
297 | # XScale | 297 | # XScale |
@@ -299,9 +299,9 @@ config CPU_XSCALE | |||
299 | bool | 299 | bool |
300 | select CPU_32v5 | 300 | select CPU_32v5 |
301 | select CPU_ABRT_EV5T | 301 | select CPU_ABRT_EV5T |
302 | select CPU_PABRT_LEGACY | ||
303 | select CPU_CACHE_VIVT | 302 | select CPU_CACHE_VIVT |
304 | select CPU_CP15_MMU | 303 | select CPU_CP15_MMU |
304 | select CPU_PABRT_LEGACY | ||
305 | select CPU_TLB_V4WBI if MMU | 305 | select CPU_TLB_V4WBI if MMU |
306 | 306 | ||
307 | # XScale Core Version 3 | 307 | # XScale Core Version 3 |
@@ -309,9 +309,9 @@ config CPU_XSC3 | |||
309 | bool | 309 | bool |
310 | select CPU_32v5 | 310 | select CPU_32v5 |
311 | select CPU_ABRT_EV5T | 311 | select CPU_ABRT_EV5T |
312 | select CPU_PABRT_LEGACY | ||
313 | select CPU_CACHE_VIVT | 312 | select CPU_CACHE_VIVT |
314 | select CPU_CP15_MMU | 313 | select CPU_CP15_MMU |
314 | select CPU_PABRT_LEGACY | ||
315 | select CPU_TLB_V4WBI if MMU | 315 | select CPU_TLB_V4WBI if MMU |
316 | select IO_36 | 316 | select IO_36 |
317 | 317 | ||
@@ -320,21 +320,21 @@ config CPU_MOHAWK | |||
320 | bool | 320 | bool |
321 | select CPU_32v5 | 321 | select CPU_32v5 |
322 | select CPU_ABRT_EV5T | 322 | select CPU_ABRT_EV5T |
323 | select CPU_PABRT_LEGACY | ||
324 | select CPU_CACHE_VIVT | 323 | select CPU_CACHE_VIVT |
324 | select CPU_COPY_V4WB if MMU | ||
325 | select CPU_CP15_MMU | 325 | select CPU_CP15_MMU |
326 | select CPU_PABRT_LEGACY | ||
326 | select CPU_TLB_V4WBI if MMU | 327 | select CPU_TLB_V4WBI if MMU |
327 | select CPU_COPY_V4WB if MMU | ||
328 | 328 | ||
329 | # Feroceon | 329 | # Feroceon |
330 | config CPU_FEROCEON | 330 | config CPU_FEROCEON |
331 | bool | 331 | bool |
332 | select CPU_32v5 | 332 | select CPU_32v5 |
333 | select CPU_ABRT_EV5T | 333 | select CPU_ABRT_EV5T |
334 | select CPU_PABRT_LEGACY | ||
335 | select CPU_CACHE_VIVT | 334 | select CPU_CACHE_VIVT |
336 | select CPU_CP15_MMU | ||
337 | select CPU_COPY_FEROCEON if MMU | 335 | select CPU_COPY_FEROCEON if MMU |
336 | select CPU_CP15_MMU | ||
337 | select CPU_PABRT_LEGACY | ||
338 | select CPU_TLB_FEROCEON if MMU | 338 | select CPU_TLB_FEROCEON if MMU |
339 | 339 | ||
340 | config CPU_FEROCEON_OLD_ID | 340 | config CPU_FEROCEON_OLD_ID |
@@ -349,20 +349,20 @@ config CPU_FEROCEON_OLD_ID | |||
349 | # Marvell PJ4 | 349 | # Marvell PJ4 |
350 | config CPU_PJ4 | 350 | config CPU_PJ4 |
351 | bool | 351 | bool |
352 | select CPU_V7 | ||
353 | select ARM_THUMBEE | 352 | select ARM_THUMBEE |
353 | select CPU_V7 | ||
354 | 354 | ||
355 | # ARMv6 | 355 | # ARMv6 |
356 | config CPU_V6 | 356 | config CPU_V6 |
357 | bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX | 357 | bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX |
358 | select CPU_32v6 | 358 | select CPU_32v6 |
359 | select CPU_ABRT_EV6 | 359 | select CPU_ABRT_EV6 |
360 | select CPU_PABRT_V6 | ||
361 | select CPU_CACHE_V6 | 360 | select CPU_CACHE_V6 |
362 | select CPU_CACHE_VIPT | 361 | select CPU_CACHE_VIPT |
362 | select CPU_COPY_V6 if MMU | ||
363 | select CPU_CP15_MMU | 363 | select CPU_CP15_MMU |
364 | select CPU_HAS_ASID if MMU | 364 | select CPU_HAS_ASID if MMU |
365 | select CPU_COPY_V6 if MMU | 365 | select CPU_PABRT_V6 |
366 | select CPU_TLB_V6 if MMU | 366 | select CPU_TLB_V6 if MMU |
367 | 367 | ||
368 | # ARMv6k | 368 | # ARMv6k |
@@ -371,12 +371,12 @@ config CPU_V6K | |||
371 | select CPU_32v6 | 371 | select CPU_32v6 |
372 | select CPU_32v6K | 372 | select CPU_32v6K |
373 | select CPU_ABRT_EV6 | 373 | select CPU_ABRT_EV6 |
374 | select CPU_PABRT_V6 | ||
375 | select CPU_CACHE_V6 | 374 | select CPU_CACHE_V6 |
376 | select CPU_CACHE_VIPT | 375 | select CPU_CACHE_VIPT |
376 | select CPU_COPY_V6 if MMU | ||
377 | select CPU_CP15_MMU | 377 | select CPU_CP15_MMU |
378 | select CPU_HAS_ASID if MMU | 378 | select CPU_HAS_ASID if MMU |
379 | select CPU_COPY_V6 if MMU | 379 | select CPU_PABRT_V6 |
380 | select CPU_TLB_V6 if MMU | 380 | select CPU_TLB_V6 if MMU |
381 | 381 | ||
382 | # ARMv7 | 382 | # ARMv7 |
@@ -385,44 +385,44 @@ config CPU_V7 | |||
385 | select CPU_32v6K | 385 | select CPU_32v6K |
386 | select CPU_32v7 | 386 | select CPU_32v7 |
387 | select CPU_ABRT_EV7 | 387 | select CPU_ABRT_EV7 |
388 | select CPU_PABRT_V7 | ||
389 | select CPU_CACHE_V7 | 388 | select CPU_CACHE_V7 |
390 | select CPU_CACHE_VIPT | 389 | select CPU_CACHE_VIPT |
390 | select CPU_COPY_V6 if MMU | ||
391 | select CPU_CP15_MMU | 391 | select CPU_CP15_MMU |
392 | select CPU_HAS_ASID if MMU | 392 | select CPU_HAS_ASID if MMU |
393 | select CPU_COPY_V6 if MMU | 393 | select CPU_PABRT_V7 |
394 | select CPU_TLB_V7 if MMU | 394 | select CPU_TLB_V7 if MMU |
395 | 395 | ||
396 | # Figure out what processor architecture version we should be using. | 396 | # Figure out what processor architecture version we should be using. |
397 | # This defines the compiler instruction set which depends on the machine type. | 397 | # This defines the compiler instruction set which depends on the machine type. |
398 | config CPU_32v3 | 398 | config CPU_32v3 |
399 | bool | 399 | bool |
400 | select TLS_REG_EMUL if SMP || !MMU | ||
401 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP | ||
402 | select CPU_USE_DOMAINS if MMU | 400 | select CPU_USE_DOMAINS if MMU |
401 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP | ||
402 | select TLS_REG_EMUL if SMP || !MMU | ||
403 | 403 | ||
404 | config CPU_32v4 | 404 | config CPU_32v4 |
405 | bool | 405 | bool |
406 | select TLS_REG_EMUL if SMP || !MMU | ||
407 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP | ||
408 | select CPU_USE_DOMAINS if MMU | 406 | select CPU_USE_DOMAINS if MMU |
407 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP | ||
408 | select TLS_REG_EMUL if SMP || !MMU | ||
409 | 409 | ||
410 | config CPU_32v4T | 410 | config CPU_32v4T |
411 | bool | 411 | bool |
412 | select TLS_REG_EMUL if SMP || !MMU | ||
413 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP | ||
414 | select CPU_USE_DOMAINS if MMU | 412 | select CPU_USE_DOMAINS if MMU |
413 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP | ||
414 | select TLS_REG_EMUL if SMP || !MMU | ||
415 | 415 | ||
416 | config CPU_32v5 | 416 | config CPU_32v5 |
417 | bool | 417 | bool |
418 | select TLS_REG_EMUL if SMP || !MMU | ||
419 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP | ||
420 | select CPU_USE_DOMAINS if MMU | 418 | select CPU_USE_DOMAINS if MMU |
419 | select NEEDS_SYSCALL_FOR_CMPXCHG if SMP | ||
420 | select TLS_REG_EMUL if SMP || !MMU | ||
421 | 421 | ||
422 | config CPU_32v6 | 422 | config CPU_32v6 |
423 | bool | 423 | bool |
424 | select TLS_REG_EMUL if !CPU_32v6K && !MMU | ||
425 | select CPU_USE_DOMAINS if CPU_V6 && MMU | 424 | select CPU_USE_DOMAINS if CPU_V6 && MMU |
425 | select TLS_REG_EMUL if !CPU_32v6K && !MMU | ||
426 | 426 | ||
427 | config CPU_32v6K | 427 | config CPU_32v6K |
428 | bool | 428 | bool |
@@ -624,11 +624,28 @@ config ARM_THUMBEE | |||
624 | Say Y here if you have a CPU with the ThumbEE extension and code to | 624 | Say Y here if you have a CPU with the ThumbEE extension and code to |
625 | make use of it. Say N for code that can run on CPUs without ThumbEE. | 625 | make use of it. Say N for code that can run on CPUs without ThumbEE. |
626 | 626 | ||
627 | config ARM_VIRT_EXT | ||
628 | bool "Native support for the ARM Virtualization Extensions" | ||
629 | depends on MMU && CPU_V7 | ||
630 | help | ||
631 | Enable the kernel to make use of the ARM Virtualization | ||
632 | Extensions to install hypervisors without run-time firmware | ||
633 | assistance. | ||
634 | |||
635 | A compliant bootloader is required in order to make maximum | ||
636 | use of this feature. Refer to Documentation/arm/Booting for | ||
637 | details. | ||
638 | |||
639 | It is safe to enable this option even if the kernel may not be | ||
640 | booted in HYP mode, may not have support for the | ||
641 | virtualization extensions, or may be booted with a | ||
642 | non-compliant bootloader. | ||
643 | |||
627 | config SWP_EMULATE | 644 | config SWP_EMULATE |
628 | bool "Emulate SWP/SWPB instructions" | 645 | bool "Emulate SWP/SWPB instructions" |
629 | depends on !CPU_USE_DOMAINS && CPU_V7 | 646 | depends on !CPU_USE_DOMAINS && CPU_V7 |
630 | select HAVE_PROC_CPU if PROC_FS | ||
631 | default y if SMP | 647 | default y if SMP |
648 | select HAVE_PROC_CPU if PROC_FS | ||
632 | help | 649 | help |
633 | ARMv6 architecture deprecates use of the SWP/SWPB instructions. | 650 | ARMv6 architecture deprecates use of the SWP/SWPB instructions. |
634 | ARMv7 multiprocessing extensions introduce the ability to disable | 651 | ARMv7 multiprocessing extensions introduce the ability to disable |
diff --git a/arch/arm/mm/cache-fa.S b/arch/arm/mm/cache-fa.S index 07201637109..e505befe51b 100644 --- a/arch/arm/mm/cache-fa.S +++ b/arch/arm/mm/cache-fa.S | |||
@@ -240,6 +240,9 @@ ENTRY(fa_dma_unmap_area) | |||
240 | mov pc, lr | 240 | mov pc, lr |
241 | ENDPROC(fa_dma_unmap_area) | 241 | ENDPROC(fa_dma_unmap_area) |
242 | 242 | ||
243 | .globl fa_flush_kern_cache_louis | ||
244 | .equ fa_flush_kern_cache_louis, fa_flush_kern_cache_all | ||
245 | |||
243 | __INITDATA | 246 | __INITDATA |
244 | 247 | ||
245 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 248 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
diff --git a/arch/arm/mm/cache-v3.S b/arch/arm/mm/cache-v3.S index 52e35f32eef..8a3fadece8d 100644 --- a/arch/arm/mm/cache-v3.S +++ b/arch/arm/mm/cache-v3.S | |||
@@ -128,6 +128,9 @@ ENTRY(v3_dma_map_area) | |||
128 | ENDPROC(v3_dma_unmap_area) | 128 | ENDPROC(v3_dma_unmap_area) |
129 | ENDPROC(v3_dma_map_area) | 129 | ENDPROC(v3_dma_map_area) |
130 | 130 | ||
131 | .globl v3_flush_kern_cache_louis | ||
132 | .equ v3_flush_kern_cache_louis, v3_flush_kern_cache_all | ||
133 | |||
131 | __INITDATA | 134 | __INITDATA |
132 | 135 | ||
133 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 136 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
diff --git a/arch/arm/mm/cache-v4.S b/arch/arm/mm/cache-v4.S index 022135d2b7e..43e5d77be67 100644 --- a/arch/arm/mm/cache-v4.S +++ b/arch/arm/mm/cache-v4.S | |||
@@ -140,6 +140,9 @@ ENTRY(v4_dma_map_area) | |||
140 | ENDPROC(v4_dma_unmap_area) | 140 | ENDPROC(v4_dma_unmap_area) |
141 | ENDPROC(v4_dma_map_area) | 141 | ENDPROC(v4_dma_map_area) |
142 | 142 | ||
143 | .globl v4_flush_kern_cache_louis | ||
144 | .equ v4_flush_kern_cache_louis, v4_flush_kern_cache_all | ||
145 | |||
143 | __INITDATA | 146 | __INITDATA |
144 | 147 | ||
145 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 148 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
diff --git a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S index 8f1eeae340c..cd494532140 100644 --- a/arch/arm/mm/cache-v4wb.S +++ b/arch/arm/mm/cache-v4wb.S | |||
@@ -251,6 +251,9 @@ ENTRY(v4wb_dma_unmap_area) | |||
251 | mov pc, lr | 251 | mov pc, lr |
252 | ENDPROC(v4wb_dma_unmap_area) | 252 | ENDPROC(v4wb_dma_unmap_area) |
253 | 253 | ||
254 | .globl v4wb_flush_kern_cache_louis | ||
255 | .equ v4wb_flush_kern_cache_louis, v4wb_flush_kern_cache_all | ||
256 | |||
254 | __INITDATA | 257 | __INITDATA |
255 | 258 | ||
256 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 259 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
diff --git a/arch/arm/mm/cache-v4wt.S b/arch/arm/mm/cache-v4wt.S index b34a5f908a8..11e5e5838bc 100644 --- a/arch/arm/mm/cache-v4wt.S +++ b/arch/arm/mm/cache-v4wt.S | |||
@@ -196,6 +196,9 @@ ENTRY(v4wt_dma_map_area) | |||
196 | ENDPROC(v4wt_dma_unmap_area) | 196 | ENDPROC(v4wt_dma_unmap_area) |
197 | ENDPROC(v4wt_dma_map_area) | 197 | ENDPROC(v4wt_dma_map_area) |
198 | 198 | ||
199 | .globl v4wt_flush_kern_cache_louis | ||
200 | .equ v4wt_flush_kern_cache_louis, v4wt_flush_kern_cache_all | ||
201 | |||
199 | __INITDATA | 202 | __INITDATA |
200 | 203 | ||
201 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 204 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
diff --git a/arch/arm/mm/cache-v6.S b/arch/arm/mm/cache-v6.S index 4b10760c56d..d8fd4d4bd3d 100644 --- a/arch/arm/mm/cache-v6.S +++ b/arch/arm/mm/cache-v6.S | |||
@@ -326,6 +326,9 @@ ENTRY(v6_dma_unmap_area) | |||
326 | mov pc, lr | 326 | mov pc, lr |
327 | ENDPROC(v6_dma_unmap_area) | 327 | ENDPROC(v6_dma_unmap_area) |
328 | 328 | ||
329 | .globl v6_flush_kern_cache_louis | ||
330 | .equ v6_flush_kern_cache_louis, v6_flush_kern_cache_all | ||
331 | |||
329 | __INITDATA | 332 | __INITDATA |
330 | 333 | ||
331 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 334 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index 3b172275262..cd956647c21 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -33,6 +33,24 @@ ENTRY(v7_flush_icache_all) | |||
33 | mov pc, lr | 33 | mov pc, lr |
34 | ENDPROC(v7_flush_icache_all) | 34 | ENDPROC(v7_flush_icache_all) |
35 | 35 | ||
36 | /* | ||
37 | * v7_flush_dcache_louis() | ||
38 | * | ||
39 | * Flush the D-cache up to the Level of Unification Inner Shareable | ||
40 | * | ||
41 | * Corrupted registers: r0-r7, r9-r11 (r6 only in Thumb mode) | ||
42 | */ | ||
43 | |||
44 | ENTRY(v7_flush_dcache_louis) | ||
45 | dmb @ ensure ordering with previous memory accesses | ||
46 | mrc p15, 1, r0, c0, c0, 1 @ read clidr, r0 = clidr | ||
47 | ands r3, r0, #0xe00000 @ extract LoUIS from clidr | ||
48 | mov r3, r3, lsr #20 @ r3 = LoUIS * 2 | ||
49 | moveq pc, lr @ return if level == 0 | ||
50 | mov r10, #0 @ r10 (starting level) = 0 | ||
51 | b flush_levels @ start flushing cache levels | ||
52 | ENDPROC(v7_flush_dcache_louis) | ||
53 | |||
36 | /* | 54 | /* |
37 | * v7_flush_dcache_all() | 55 | * v7_flush_dcache_all() |
38 | * | 56 | * |
@@ -49,7 +67,7 @@ ENTRY(v7_flush_dcache_all) | |||
49 | mov r3, r3, lsr #23 @ left align loc bit field | 67 | mov r3, r3, lsr #23 @ left align loc bit field |
50 | beq finished @ if loc is 0, then no need to clean | 68 | beq finished @ if loc is 0, then no need to clean |
51 | mov r10, #0 @ start clean at cache level 0 | 69 | mov r10, #0 @ start clean at cache level 0 |
52 | loop1: | 70 | flush_levels: |
53 | add r2, r10, r10, lsr #1 @ work out 3x current cache level | 71 | add r2, r10, r10, lsr #1 @ work out 3x current cache level |
54 | mov r1, r0, lsr r2 @ extract cache type bits from clidr | 72 | mov r1, r0, lsr r2 @ extract cache type bits from clidr |
55 | and r1, r1, #7 @ mask of the bits for current cache only | 73 | and r1, r1, #7 @ mask of the bits for current cache only |
@@ -71,9 +89,9 @@ loop1: | |||
71 | clz r5, r4 @ find bit position of way size increment | 89 | clz r5, r4 @ find bit position of way size increment |
72 | ldr r7, =0x7fff | 90 | ldr r7, =0x7fff |
73 | ands r7, r7, r1, lsr #13 @ extract max number of the index size | 91 | ands r7, r7, r1, lsr #13 @ extract max number of the index size |
74 | loop2: | 92 | loop1: |
75 | mov r9, r4 @ create working copy of max way size | 93 | mov r9, r4 @ create working copy of max way size |
76 | loop3: | 94 | loop2: |
77 | ARM( orr r11, r10, r9, lsl r5 ) @ factor way and cache number into r11 | 95 | ARM( orr r11, r10, r9, lsl r5 ) @ factor way and cache number into r11 |
78 | THUMB( lsl r6, r9, r5 ) | 96 | THUMB( lsl r6, r9, r5 ) |
79 | THUMB( orr r11, r10, r6 ) @ factor way and cache number into r11 | 97 | THUMB( orr r11, r10, r6 ) @ factor way and cache number into r11 |
@@ -82,13 +100,13 @@ loop3: | |||
82 | THUMB( orr r11, r11, r6 ) @ factor index number into r11 | 100 | THUMB( orr r11, r11, r6 ) @ factor index number into r11 |
83 | mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way | 101 | mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way |
84 | subs r9, r9, #1 @ decrement the way | 102 | subs r9, r9, #1 @ decrement the way |
85 | bge loop3 | ||
86 | subs r7, r7, #1 @ decrement the index | ||
87 | bge loop2 | 103 | bge loop2 |
104 | subs r7, r7, #1 @ decrement the index | ||
105 | bge loop1 | ||
88 | skip: | 106 | skip: |
89 | add r10, r10, #2 @ increment cache number | 107 | add r10, r10, #2 @ increment cache number |
90 | cmp r3, r10 | 108 | cmp r3, r10 |
91 | bgt loop1 | 109 | bgt flush_levels |
92 | finished: | 110 | finished: |
93 | mov r10, #0 @ swith back to cache level 0 | 111 | mov r10, #0 @ swith back to cache level 0 |
94 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr | 112 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr |
@@ -120,6 +138,24 @@ ENTRY(v7_flush_kern_cache_all) | |||
120 | mov pc, lr | 138 | mov pc, lr |
121 | ENDPROC(v7_flush_kern_cache_all) | 139 | ENDPROC(v7_flush_kern_cache_all) |
122 | 140 | ||
141 | /* | ||
142 | * v7_flush_kern_cache_louis(void) | ||
143 | * | ||
144 | * Flush the data cache up to Level of Unification Inner Shareable. | ||
145 | * Invalidate the I-cache to the point of unification. | ||
146 | */ | ||
147 | ENTRY(v7_flush_kern_cache_louis) | ||
148 | ARM( stmfd sp!, {r4-r5, r7, r9-r11, lr} ) | ||
149 | THUMB( stmfd sp!, {r4-r7, r9-r11, lr} ) | ||
150 | bl v7_flush_dcache_louis | ||
151 | mov r0, #0 | ||
152 | ALT_SMP(mcr p15, 0, r0, c7, c1, 0) @ invalidate I-cache inner shareable | ||
153 | ALT_UP(mcr p15, 0, r0, c7, c5, 0) @ I+BTB cache invalidate | ||
154 | ARM( ldmfd sp!, {r4-r5, r7, r9-r11, lr} ) | ||
155 | THUMB( ldmfd sp!, {r4-r7, r9-r11, lr} ) | ||
156 | mov pc, lr | ||
157 | ENDPROC(v7_flush_kern_cache_louis) | ||
158 | |||
123 | /* | 159 | /* |
124 | * v7_flush_cache_all() | 160 | * v7_flush_cache_all() |
125 | * | 161 | * |
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 0650bb87c1e..2bb61e703d6 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
@@ -368,6 +368,9 @@ ENTRY(arm1020_dma_unmap_area) | |||
368 | mov pc, lr | 368 | mov pc, lr |
369 | ENDPROC(arm1020_dma_unmap_area) | 369 | ENDPROC(arm1020_dma_unmap_area) |
370 | 370 | ||
371 | .globl arm1020_flush_kern_cache_louis | ||
372 | .equ arm1020_flush_kern_cache_louis, arm1020_flush_kern_cache_all | ||
373 | |||
371 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 374 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
372 | define_cache_functions arm1020 | 375 | define_cache_functions arm1020 |
373 | 376 | ||
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index 4188478325a..8f96aa40f51 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
@@ -354,6 +354,9 @@ ENTRY(arm1020e_dma_unmap_area) | |||
354 | mov pc, lr | 354 | mov pc, lr |
355 | ENDPROC(arm1020e_dma_unmap_area) | 355 | ENDPROC(arm1020e_dma_unmap_area) |
356 | 356 | ||
357 | .globl arm1020e_flush_kern_cache_louis | ||
358 | .equ arm1020e_flush_kern_cache_louis, arm1020e_flush_kern_cache_all | ||
359 | |||
357 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 360 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
358 | define_cache_functions arm1020e | 361 | define_cache_functions arm1020e |
359 | 362 | ||
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S index 33c68824bff..8ebe4a469a2 100644 --- a/arch/arm/mm/proc-arm1022.S +++ b/arch/arm/mm/proc-arm1022.S | |||
@@ -343,6 +343,9 @@ ENTRY(arm1022_dma_unmap_area) | |||
343 | mov pc, lr | 343 | mov pc, lr |
344 | ENDPROC(arm1022_dma_unmap_area) | 344 | ENDPROC(arm1022_dma_unmap_area) |
345 | 345 | ||
346 | .globl arm1022_flush_kern_cache_louis | ||
347 | .equ arm1022_flush_kern_cache_louis, arm1022_flush_kern_cache_all | ||
348 | |||
346 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 349 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
347 | define_cache_functions arm1022 | 350 | define_cache_functions arm1022 |
348 | 351 | ||
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S index fbc1d5fc24d..093fc7e520c 100644 --- a/arch/arm/mm/proc-arm1026.S +++ b/arch/arm/mm/proc-arm1026.S | |||
@@ -337,6 +337,9 @@ ENTRY(arm1026_dma_unmap_area) | |||
337 | mov pc, lr | 337 | mov pc, lr |
338 | ENDPROC(arm1026_dma_unmap_area) | 338 | ENDPROC(arm1026_dma_unmap_area) |
339 | 339 | ||
340 | .globl arm1026_flush_kern_cache_louis | ||
341 | .equ arm1026_flush_kern_cache_louis, arm1026_flush_kern_cache_all | ||
342 | |||
340 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 343 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
341 | define_cache_functions arm1026 | 344 | define_cache_functions arm1026 |
342 | 345 | ||
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index 1a8c138eb89..2c3b9421ab5 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
@@ -319,6 +319,9 @@ ENTRY(arm920_dma_unmap_area) | |||
319 | mov pc, lr | 319 | mov pc, lr |
320 | ENDPROC(arm920_dma_unmap_area) | 320 | ENDPROC(arm920_dma_unmap_area) |
321 | 321 | ||
322 | .globl arm920_flush_kern_cache_louis | ||
323 | .equ arm920_flush_kern_cache_louis, arm920_flush_kern_cache_all | ||
324 | |||
322 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 325 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
323 | define_cache_functions arm920 | 326 | define_cache_functions arm920 |
324 | #endif | 327 | #endif |
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S index 4c44d7e1c3c..4464c49d744 100644 --- a/arch/arm/mm/proc-arm922.S +++ b/arch/arm/mm/proc-arm922.S | |||
@@ -321,6 +321,9 @@ ENTRY(arm922_dma_unmap_area) | |||
321 | mov pc, lr | 321 | mov pc, lr |
322 | ENDPROC(arm922_dma_unmap_area) | 322 | ENDPROC(arm922_dma_unmap_area) |
323 | 323 | ||
324 | .globl arm922_flush_kern_cache_louis | ||
325 | .equ arm922_flush_kern_cache_louis, arm922_flush_kern_cache_all | ||
326 | |||
324 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 327 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
325 | define_cache_functions arm922 | 328 | define_cache_functions arm922 |
326 | #endif | 329 | #endif |
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index ec5b1180994..281eb9b9c1d 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S | |||
@@ -376,6 +376,9 @@ ENTRY(arm925_dma_unmap_area) | |||
376 | mov pc, lr | 376 | mov pc, lr |
377 | ENDPROC(arm925_dma_unmap_area) | 377 | ENDPROC(arm925_dma_unmap_area) |
378 | 378 | ||
379 | .globl arm925_flush_kern_cache_louis | ||
380 | .equ arm925_flush_kern_cache_louis, arm925_flush_kern_cache_all | ||
381 | |||
379 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 382 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
380 | define_cache_functions arm925 | 383 | define_cache_functions arm925 |
381 | 384 | ||
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index c31e62c606c..f1803f7e297 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -339,6 +339,9 @@ ENTRY(arm926_dma_unmap_area) | |||
339 | mov pc, lr | 339 | mov pc, lr |
340 | ENDPROC(arm926_dma_unmap_area) | 340 | ENDPROC(arm926_dma_unmap_area) |
341 | 341 | ||
342 | .globl arm926_flush_kern_cache_louis | ||
343 | .equ arm926_flush_kern_cache_louis, arm926_flush_kern_cache_all | ||
344 | |||
342 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 345 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
343 | define_cache_functions arm926 | 346 | define_cache_functions arm926 |
344 | 347 | ||
diff --git a/arch/arm/mm/proc-arm940.S b/arch/arm/mm/proc-arm940.S index a613a7dd714..8da189d4a40 100644 --- a/arch/arm/mm/proc-arm940.S +++ b/arch/arm/mm/proc-arm940.S | |||
@@ -267,6 +267,9 @@ ENTRY(arm940_dma_unmap_area) | |||
267 | mov pc, lr | 267 | mov pc, lr |
268 | ENDPROC(arm940_dma_unmap_area) | 268 | ENDPROC(arm940_dma_unmap_area) |
269 | 269 | ||
270 | .globl arm940_flush_kern_cache_louis | ||
271 | .equ arm940_flush_kern_cache_louis, arm940_flush_kern_cache_all | ||
272 | |||
270 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 273 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
271 | define_cache_functions arm940 | 274 | define_cache_functions arm940 |
272 | 275 | ||
diff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S index 9f4f2999fdd..f666cf34075 100644 --- a/arch/arm/mm/proc-arm946.S +++ b/arch/arm/mm/proc-arm946.S | |||
@@ -310,6 +310,9 @@ ENTRY(arm946_dma_unmap_area) | |||
310 | mov pc, lr | 310 | mov pc, lr |
311 | ENDPROC(arm946_dma_unmap_area) | 311 | ENDPROC(arm946_dma_unmap_area) |
312 | 312 | ||
313 | .globl arm946_flush_kern_cache_louis | ||
314 | .equ arm946_flush_kern_cache_louis, arm946_flush_kern_cache_all | ||
315 | |||
313 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 316 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
314 | define_cache_functions arm946 | 317 | define_cache_functions arm946 |
315 | 318 | ||
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S index 23a8e4c7f2b..4106b09e0c2 100644 --- a/arch/arm/mm/proc-feroceon.S +++ b/arch/arm/mm/proc-feroceon.S | |||
@@ -415,6 +415,9 @@ ENTRY(feroceon_dma_unmap_area) | |||
415 | mov pc, lr | 415 | mov pc, lr |
416 | ENDPROC(feroceon_dma_unmap_area) | 416 | ENDPROC(feroceon_dma_unmap_area) |
417 | 417 | ||
418 | .globl feroceon_flush_kern_cache_louis | ||
419 | .equ feroceon_flush_kern_cache_louis, feroceon_flush_kern_cache_all | ||
420 | |||
418 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 421 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
419 | define_cache_functions feroceon | 422 | define_cache_functions feroceon |
420 | 423 | ||
@@ -431,6 +434,7 @@ ENDPROC(feroceon_dma_unmap_area) | |||
431 | range_alias flush_icache_all | 434 | range_alias flush_icache_all |
432 | range_alias flush_user_cache_all | 435 | range_alias flush_user_cache_all |
433 | range_alias flush_kern_cache_all | 436 | range_alias flush_kern_cache_all |
437 | range_alias flush_kern_cache_louis | ||
434 | range_alias flush_user_cache_range | 438 | range_alias flush_user_cache_range |
435 | range_alias coherent_kern_range | 439 | range_alias coherent_kern_range |
436 | range_alias coherent_user_range | 440 | range_alias coherent_user_range |
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 2d8ff3ad86d..b29a2265af0 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S | |||
@@ -299,6 +299,7 @@ ENTRY(\name\()_processor_functions) | |||
299 | ENTRY(\name\()_cache_fns) | 299 | ENTRY(\name\()_cache_fns) |
300 | .long \name\()_flush_icache_all | 300 | .long \name\()_flush_icache_all |
301 | .long \name\()_flush_kern_cache_all | 301 | .long \name\()_flush_kern_cache_all |
302 | .long \name\()_flush_kern_cache_louis | ||
302 | .long \name\()_flush_user_cache_all | 303 | .long \name\()_flush_user_cache_all |
303 | .long \name\()_flush_user_cache_range | 304 | .long \name\()_flush_user_cache_range |
304 | .long \name\()_coherent_kern_range | 305 | .long \name\()_coherent_kern_range |
diff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S index fbb2124a547..82f9cdc751d 100644 --- a/arch/arm/mm/proc-mohawk.S +++ b/arch/arm/mm/proc-mohawk.S | |||
@@ -303,6 +303,9 @@ ENTRY(mohawk_dma_unmap_area) | |||
303 | mov pc, lr | 303 | mov pc, lr |
304 | ENDPROC(mohawk_dma_unmap_area) | 304 | ENDPROC(mohawk_dma_unmap_area) |
305 | 305 | ||
306 | .globl mohawk_flush_kern_cache_louis | ||
307 | .equ mohawk_flush_kern_cache_louis, mohawk_flush_kern_cache_all | ||
308 | |||
306 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 309 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
307 | define_cache_functions mohawk | 310 | define_cache_functions mohawk |
308 | 311 | ||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index c2e2b66f72b..846d279f317 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -172,7 +172,7 @@ __v7_ca15mp_setup: | |||
172 | __v7_setup: | 172 | __v7_setup: |
173 | adr r12, __v7_setup_stack @ the local stack | 173 | adr r12, __v7_setup_stack @ the local stack |
174 | stmia r12, {r0-r5, r7, r9, r11, lr} | 174 | stmia r12, {r0-r5, r7, r9, r11, lr} |
175 | bl v7_flush_dcache_all | 175 | bl v7_flush_dcache_louis |
176 | ldmia r12, {r0-r5, r7, r9, r11, lr} | 176 | ldmia r12, {r0-r5, r7, r9, r11, lr} |
177 | 177 | ||
178 | mrc p15, 0, r0, c0, c0, 0 @ read main ID register | 178 | mrc p15, 0, r0, c0, c0, 0 @ read main ID register |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index b0d57869da2..eb93d6487f3 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -337,6 +337,9 @@ ENTRY(xsc3_dma_unmap_area) | |||
337 | mov pc, lr | 337 | mov pc, lr |
338 | ENDPROC(xsc3_dma_unmap_area) | 338 | ENDPROC(xsc3_dma_unmap_area) |
339 | 339 | ||
340 | .globl xsc3_flush_kern_cache_louis | ||
341 | .equ xsc3_flush_kern_cache_louis, xsc3_flush_kern_cache_all | ||
342 | |||
340 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 343 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
341 | define_cache_functions xsc3 | 344 | define_cache_functions xsc3 |
342 | 345 | ||
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 4ffebaa595e..25510361aa1 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
@@ -410,6 +410,9 @@ ENTRY(xscale_dma_unmap_area) | |||
410 | mov pc, lr | 410 | mov pc, lr |
411 | ENDPROC(xscale_dma_unmap_area) | 411 | ENDPROC(xscale_dma_unmap_area) |
412 | 412 | ||
413 | .globl xscale_flush_kern_cache_louis | ||
414 | .equ xscale_flush_kern_cache_louis, xscale_flush_kern_cache_all | ||
415 | |||
413 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) | 416 | @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S) |
414 | define_cache_functions xscale | 417 | define_cache_functions xscale |
415 | 418 | ||
@@ -439,6 +442,7 @@ ENDPROC(xscale_dma_unmap_area) | |||
439 | a0_alias flush_icache_all | 442 | a0_alias flush_icache_all |
440 | a0_alias flush_user_cache_all | 443 | a0_alias flush_user_cache_all |
441 | a0_alias flush_kern_cache_all | 444 | a0_alias flush_kern_cache_all |
445 | a0_alias flush_kern_cache_louis | ||
442 | a0_alias flush_user_cache_range | 446 | a0_alias flush_user_cache_range |
443 | a0_alias coherent_kern_range | 447 | a0_alias coherent_kern_range |
444 | a0_alias coherent_user_range | 448 | a0_alias coherent_user_range |
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index baf9064c084..88e1e2e7a20 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig | |||
@@ -10,16 +10,16 @@ choice | |||
10 | 10 | ||
11 | config ARCH_IMX_V4_V5 | 11 | config ARCH_IMX_V4_V5 |
12 | bool "i.MX1, i.MX21, i.MX25, i.MX27" | 12 | bool "i.MX1, i.MX21, i.MX25, i.MX27" |
13 | select AUTO_ZRELADDR if !ZBOOT_ROM | ||
14 | select ARM_PATCH_PHYS_VIRT | 13 | select ARM_PATCH_PHYS_VIRT |
14 | select AUTO_ZRELADDR if !ZBOOT_ROM | ||
15 | help | 15 | help |
16 | This enables support for systems based on the Freescale i.MX ARMv4 | 16 | This enables support for systems based on the Freescale i.MX ARMv4 |
17 | and ARMv5 SoCs | 17 | and ARMv5 SoCs |
18 | 18 | ||
19 | config ARCH_IMX_V6_V7 | 19 | config ARCH_IMX_V6_V7 |
20 | bool "i.MX3, i.MX5, i.MX6" | 20 | bool "i.MX3, i.MX5, i.MX6" |
21 | select AUTO_ZRELADDR if !ZBOOT_ROM | ||
22 | select ARM_PATCH_PHYS_VIRT | 21 | select ARM_PATCH_PHYS_VIRT |
22 | select AUTO_ZRELADDR if !ZBOOT_ROM | ||
23 | select MIGHT_HAVE_CACHE_L2X0 | 23 | select MIGHT_HAVE_CACHE_L2X0 |
24 | help | 24 | help |
25 | This enables support for systems based on the Freescale i.MX3, i.MX5 | 25 | This enables support for systems based on the Freescale i.MX3, i.MX5 |
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig index 6b46cee2f9c..a35d9841f49 100644 --- a/arch/arm/plat-mxc/devices/Kconfig +++ b/arch/arm/plat-mxc/devices/Kconfig | |||
@@ -3,8 +3,8 @@ config IMX_HAVE_PLATFORM_FEC | |||
3 | default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX50 || SOC_IMX51 || SOC_IMX53 | 3 | default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX50 || SOC_IMX51 || SOC_IMX53 |
4 | 4 | ||
5 | config IMX_HAVE_PLATFORM_FLEXCAN | 5 | config IMX_HAVE_PLATFORM_FLEXCAN |
6 | select HAVE_CAN_FLEXCAN if CAN | ||
7 | bool | 6 | bool |
7 | select HAVE_CAN_FLEXCAN if CAN | ||
8 | 8 | ||
9 | config IMX_HAVE_PLATFORM_FSL_USB2_UDC | 9 | config IMX_HAVE_PLATFORM_FSL_USB2_UDC |
10 | bool | 10 | bool |
diff --git a/arch/arm/plat-nomadik/Kconfig b/arch/arm/plat-nomadik/Kconfig index 4c48c8b60b5..19f55cae5d7 100644 --- a/arch/arm/plat-nomadik/Kconfig +++ b/arch/arm/plat-nomadik/Kconfig | |||
@@ -5,8 +5,8 @@ | |||
5 | config PLAT_NOMADIK | 5 | config PLAT_NOMADIK |
6 | bool | 6 | bool |
7 | depends on ARCH_NOMADIK || ARCH_U8500 | 7 | depends on ARCH_NOMADIK || ARCH_U8500 |
8 | select CLKSRC_MMIO | ||
9 | default y | 8 | default y |
9 | select CLKSRC_MMIO | ||
10 | help | 10 | help |
11 | Common platform code for Nomadik and other ST-Ericsson | 11 | Common platform code for Nomadik and other ST-Ericsson |
12 | platforms. | 12 | platforms. |
diff --git a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h index 826de74bfdd..c08a54d9d88 100644 --- a/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h +++ b/arch/arm/plat-nomadik/include/plat/gpio-nomadik.h | |||
@@ -45,6 +45,12 @@ | |||
45 | #define NMK_GPIO_ALT_B 2 | 45 | #define NMK_GPIO_ALT_B 2 |
46 | #define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) | 46 | #define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) |
47 | 47 | ||
48 | #define NMK_GPIO_ALT_CX_SHIFT 2 | ||
49 | #define NMK_GPIO_ALT_C1 ((1<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
50 | #define NMK_GPIO_ALT_C2 ((2<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
51 | #define NMK_GPIO_ALT_C3 ((3<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
52 | #define NMK_GPIO_ALT_C4 ((4<<NMK_GPIO_ALT_CX_SHIFT) | NMK_GPIO_ALT_C) | ||
53 | |||
48 | /* Pull up/down values */ | 54 | /* Pull up/down values */ |
49 | enum nmk_gpio_pull { | 55 | enum nmk_gpio_pull { |
50 | NMK_GPIO_PULL_NONE, | 56 | NMK_GPIO_PULL_NONE, |
diff --git a/arch/arm/plat-nomadik/include/plat/pincfg.h b/arch/arm/plat-nomadik/include/plat/pincfg.h index 9c949c7c98a..3b8ec60af35 100644 --- a/arch/arm/plat-nomadik/include/plat/pincfg.h +++ b/arch/arm/plat-nomadik/include/plat/pincfg.h | |||
@@ -25,6 +25,8 @@ | |||
25 | * bit 19..20 - SLPM direction | 25 | * bit 19..20 - SLPM direction |
26 | * bit 21..22 - SLPM Value (if output) | 26 | * bit 21..22 - SLPM Value (if output) |
27 | * bit 23..25 - PDIS value (if input) | 27 | * bit 23..25 - PDIS value (if input) |
28 | * bit 26 - Gpio mode | ||
29 | * bit 27 - Sleep mode | ||
28 | * | 30 | * |
29 | * to facilitate the definition, the following macros are provided | 31 | * to facilitate the definition, the following macros are provided |
30 | * | 32 | * |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index c9d1c3603bb..7cd56ed5cd9 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -14,10 +14,10 @@ config ARCH_OMAP1 | |||
14 | select CLKDEV_LOOKUP | 14 | select CLKDEV_LOOKUP |
15 | select CLKSRC_MMIO | 15 | select CLKSRC_MMIO |
16 | select GENERIC_IRQ_CHIP | 16 | select GENERIC_IRQ_CHIP |
17 | select IRQ_DOMAIN | ||
18 | select HAVE_IDE | 17 | select HAVE_IDE |
19 | select NEED_MACH_MEMORY_H | 18 | select IRQ_DOMAIN |
20 | select NEED_MACH_IO_H if PCCARD | 19 | select NEED_MACH_IO_H if PCCARD |
20 | select NEED_MACH_MEMORY_H | ||
21 | help | 21 | help |
22 | "Systems based on omap7xx, omap15xx or omap16xx" | 22 | "Systems based on omap7xx, omap15xx or omap16xx" |
23 | 23 | ||
@@ -25,10 +25,10 @@ config ARCH_OMAP2PLUS | |||
25 | bool "TI OMAP2/3/4" | 25 | bool "TI OMAP2/3/4" |
26 | select CLKDEV_LOOKUP | 26 | select CLKDEV_LOOKUP |
27 | select GENERIC_IRQ_CHIP | 27 | select GENERIC_IRQ_CHIP |
28 | select SPARSE_IRQ | ||
29 | select OMAP_DM_TIMER | 28 | select OMAP_DM_TIMER |
30 | select USE_OF | ||
31 | select PROC_DEVICETREE if PROC_FS | 29 | select PROC_DEVICETREE if PROC_FS |
30 | select SPARSE_IRQ | ||
31 | select USE_OF | ||
32 | help | 32 | help |
33 | "Systems based on OMAP2, OMAP3, OMAP4 or OMAP5" | 33 | "Systems based on OMAP2, OMAP3, OMAP4 or OMAP5" |
34 | 34 | ||
@@ -43,8 +43,8 @@ config OMAP_DEBUG_DEVICES | |||
43 | 43 | ||
44 | config OMAP_DEBUG_LEDS | 44 | config OMAP_DEBUG_LEDS |
45 | def_bool y if NEW_LEDS | 45 | def_bool y if NEW_LEDS |
46 | select LEDS_CLASS | ||
47 | depends on OMAP_DEBUG_DEVICES | 46 | depends on OMAP_DEBUG_DEVICES |
47 | select LEDS_CLASS | ||
48 | 48 | ||
49 | config POWER_AVS_OMAP | 49 | config POWER_AVS_OMAP |
50 | bool "AVS(Adaptive Voltage Scaling) support for OMAP IP versions 1&2" | 50 | bool "AVS(Adaptive Voltage Scaling) support for OMAP IP versions 1&2" |
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig index 21bf6adb919..eef3b6a2f8a 100644 --- a/arch/arm/plat-s3c24xx/Kconfig +++ b/arch/arm/plat-s3c24xx/Kconfig | |||
@@ -6,8 +6,8 @@ config PLAT_S3C24XX | |||
6 | bool | 6 | bool |
7 | depends on ARCH_S3C24XX | 7 | depends on ARCH_S3C24XX |
8 | default y | 8 | default y |
9 | select NO_IOPORT | ||
10 | select ARCH_REQUIRE_GPIOLIB | 9 | select ARCH_REQUIRE_GPIOLIB |
10 | select NO_IOPORT | ||
11 | select S3C_DEV_NAND | 11 | select S3C_DEV_NAND |
12 | help | 12 | help |
13 | Base platform code for any Samsung S3C24XX device | 13 | Base platform code for any Samsung S3C24XX device |
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 9c3b90c3538..59401e1cc53 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -7,9 +7,9 @@ | |||
7 | config PLAT_SAMSUNG | 7 | config PLAT_SAMSUNG |
8 | bool | 8 | bool |
9 | depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P | 9 | depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P |
10 | select NO_IOPORT | ||
11 | select GENERIC_IRQ_CHIP | ||
12 | default y | 10 | default y |
11 | select GENERIC_IRQ_CHIP | ||
12 | select NO_IOPORT | ||
13 | help | 13 | help |
14 | Base platform code for all Samsung SoC based systems | 14 | Base platform code for all Samsung SoC based systems |
15 | 15 | ||
@@ -17,16 +17,16 @@ config PLAT_S5P | |||
17 | bool | 17 | bool |
18 | depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS) | 18 | depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS) |
19 | default y | 19 | default y |
20 | select ARM_VIC if !ARCH_EXYNOS | 20 | select ARCH_REQUIRE_GPIOLIB |
21 | select ARM_GIC if ARCH_EXYNOS | 21 | select ARM_GIC if ARCH_EXYNOS |
22 | select ARM_VIC if !ARCH_EXYNOS | ||
22 | select GIC_NON_BANKED if ARCH_EXYNOS4 | 23 | select GIC_NON_BANKED if ARCH_EXYNOS4 |
23 | select NO_IOPORT | 24 | select NO_IOPORT |
24 | select ARCH_REQUIRE_GPIOLIB | 25 | select PLAT_SAMSUNG |
25 | select S3C_GPIO_TRACK | 26 | select S3C_GPIO_TRACK |
26 | select S5P_GPIO_DRVSTR | 27 | select S5P_GPIO_DRVSTR |
27 | select SAMSUNG_GPIOLIB_4BIT | ||
28 | select PLAT_SAMSUNG | ||
29 | select SAMSUNG_CLKSRC | 28 | select SAMSUNG_CLKSRC |
29 | select SAMSUNG_GPIOLIB_4BIT | ||
30 | select SAMSUNG_IRQ_VIC_TIMER | 30 | select SAMSUNG_IRQ_VIC_TIMER |
31 | help | 31 | help |
32 | Base platform code for Samsung's S5P series SoC. | 32 | Base platform code for Samsung's S5P series SoC. |
@@ -423,10 +423,10 @@ config S3C_DMA | |||
423 | 423 | ||
424 | config SAMSUNG_DMADEV | 424 | config SAMSUNG_DMADEV |
425 | bool | 425 | bool |
426 | select ARM_AMBA | ||
426 | select DMADEVICES | 427 | select DMADEVICES |
427 | select PL330_DMA if (ARCH_EXYNOS5 || ARCH_EXYNOS4 || CPU_S5PV210 || CPU_S5PC100 || \ | 428 | select PL330_DMA if (ARCH_EXYNOS5 || ARCH_EXYNOS4 || CPU_S5PV210 || CPU_S5PC100 || \ |
428 | CPU_S5P6450 || CPU_S5P6440) | 429 | CPU_S5P6450 || CPU_S5P6440) |
429 | select ARM_AMBA | ||
430 | help | 430 | help |
431 | Use DMA device engine for PL330 DMAC. | 431 | Use DMA device engine for PL330 DMAC. |
432 | 432 | ||
diff --git a/arch/arm/plat-samsung/include/plat/regs-fb-v4.h b/arch/arm/plat-samsung/include/plat/regs-fb-v4.h deleted file mode 100644 index 4c3647f8005..00000000000 --- a/arch/arm/plat-samsung/include/plat/regs-fb-v4.h +++ /dev/null | |||
@@ -1,159 +0,0 @@ | |||
1 | /* arch/arm/plat-samsung/include/plat/regs-fb-v4.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C64XX - new-style framebuffer register definitions | ||
9 | * | ||
10 | * This is the register set for the new style framebuffer interface | ||
11 | * found from the S3C2443 onwards and specifically the S3C64XX series | ||
12 | * S3C6400 and S3C6410. | ||
13 | * | ||
14 | * The file contains the cpu specific items which change between whichever | ||
15 | * architecture is selected. See <plat/regs-fb.h> for the core definitions | ||
16 | * that are the same. | ||
17 | * | ||
18 | * This program is free software; you can redistribute it and/or modify | ||
19 | * it under the terms of the GNU General Public License version 2 as | ||
20 | * published by the Free Software Foundation. | ||
21 | */ | ||
22 | |||
23 | /* include the core definitions here, in case we really do need to | ||
24 | * override them at a later date. | ||
25 | */ | ||
26 | |||
27 | #include <plat/regs-fb.h> | ||
28 | |||
29 | #define S3C_FB_MAX_WIN (5) /* number of hardware windows available. */ | ||
30 | #define VIDCON1_FSTATUS_EVEN (1 << 15) | ||
31 | |||
32 | /* Video timing controls */ | ||
33 | #define VIDTCON0 (0x10) | ||
34 | #define VIDTCON1 (0x14) | ||
35 | #define VIDTCON2 (0x18) | ||
36 | |||
37 | /* Window position controls */ | ||
38 | |||
39 | #define WINCON(_win) (0x20 + ((_win) * 4)) | ||
40 | |||
41 | /* OSD1 and OSD4 do not have register D */ | ||
42 | |||
43 | #define VIDOSD_BASE (0x40) | ||
44 | |||
45 | #define VIDINTCON0 (0x130) | ||
46 | |||
47 | /* WINCONx */ | ||
48 | |||
49 | #define WINCONx_CSCWIDTH_MASK (0x3 << 26) | ||
50 | #define WINCONx_CSCWIDTH_SHIFT (26) | ||
51 | #define WINCONx_CSCWIDTH_WIDE (0x0 << 26) | ||
52 | #define WINCONx_CSCWIDTH_NARROW (0x3 << 26) | ||
53 | |||
54 | #define WINCONx_ENLOCAL (1 << 22) | ||
55 | #define WINCONx_BUFSTATUS (1 << 21) | ||
56 | #define WINCONx_BUFSEL (1 << 20) | ||
57 | #define WINCONx_BUFAUTOEN (1 << 19) | ||
58 | #define WINCONx_YCbCr (1 << 13) | ||
59 | |||
60 | #define WINCON1_LOCALSEL_CAMIF (1 << 23) | ||
61 | |||
62 | #define WINCON2_LOCALSEL_CAMIF (1 << 23) | ||
63 | #define WINCON2_BLD_PIX (1 << 6) | ||
64 | |||
65 | #define WINCON2_ALPHA_SEL (1 << 1) | ||
66 | #define WINCON2_BPPMODE_MASK (0xf << 2) | ||
67 | #define WINCON2_BPPMODE_SHIFT (2) | ||
68 | #define WINCON2_BPPMODE_1BPP (0x0 << 2) | ||
69 | #define WINCON2_BPPMODE_2BPP (0x1 << 2) | ||
70 | #define WINCON2_BPPMODE_4BPP (0x2 << 2) | ||
71 | #define WINCON2_BPPMODE_8BPP_1232 (0x4 << 2) | ||
72 | #define WINCON2_BPPMODE_16BPP_565 (0x5 << 2) | ||
73 | #define WINCON2_BPPMODE_16BPP_A1555 (0x6 << 2) | ||
74 | #define WINCON2_BPPMODE_16BPP_I1555 (0x7 << 2) | ||
75 | #define WINCON2_BPPMODE_18BPP_666 (0x8 << 2) | ||
76 | #define WINCON2_BPPMODE_18BPP_A1665 (0x9 << 2) | ||
77 | #define WINCON2_BPPMODE_19BPP_A1666 (0xa << 2) | ||
78 | #define WINCON2_BPPMODE_24BPP_888 (0xb << 2) | ||
79 | #define WINCON2_BPPMODE_24BPP_A1887 (0xc << 2) | ||
80 | #define WINCON2_BPPMODE_25BPP_A1888 (0xd << 2) | ||
81 | #define WINCON2_BPPMODE_28BPP_A4888 (0xd << 2) | ||
82 | |||
83 | #define WINCON3_BLD_PIX (1 << 6) | ||
84 | |||
85 | #define WINCON3_ALPHA_SEL (1 << 1) | ||
86 | #define WINCON3_BPPMODE_MASK (0xf << 2) | ||
87 | #define WINCON3_BPPMODE_SHIFT (2) | ||
88 | #define WINCON3_BPPMODE_1BPP (0x0 << 2) | ||
89 | #define WINCON3_BPPMODE_2BPP (0x1 << 2) | ||
90 | #define WINCON3_BPPMODE_4BPP (0x2 << 2) | ||
91 | #define WINCON3_BPPMODE_16BPP_565 (0x5 << 2) | ||
92 | #define WINCON3_BPPMODE_16BPP_A1555 (0x6 << 2) | ||
93 | #define WINCON3_BPPMODE_16BPP_I1555 (0x7 << 2) | ||
94 | #define WINCON3_BPPMODE_18BPP_666 (0x8 << 2) | ||
95 | #define WINCON3_BPPMODE_18BPP_A1665 (0x9 << 2) | ||
96 | #define WINCON3_BPPMODE_19BPP_A1666 (0xa << 2) | ||
97 | #define WINCON3_BPPMODE_24BPP_888 (0xb << 2) | ||
98 | #define WINCON3_BPPMODE_24BPP_A1887 (0xc << 2) | ||
99 | #define WINCON3_BPPMODE_25BPP_A1888 (0xd << 2) | ||
100 | #define WINCON3_BPPMODE_28BPP_A4888 (0xd << 2) | ||
101 | |||
102 | #define VIDINTCON0_FIFIOSEL_WINDOW2 (0x10 << 5) | ||
103 | #define VIDINTCON0_FIFIOSEL_WINDOW3 (0x20 << 5) | ||
104 | #define VIDINTCON0_FIFIOSEL_WINDOW4 (0x40 << 5) | ||
105 | |||
106 | #define DITHMODE (0x170) | ||
107 | #define WINxMAP(_win) (0x180 + ((_win) * 4)) | ||
108 | |||
109 | |||
110 | #define DITHMODE_R_POS_MASK (0x3 << 5) | ||
111 | #define DITHMODE_R_POS_SHIFT (5) | ||
112 | #define DITHMODE_R_POS_8BIT (0x0 << 5) | ||
113 | #define DITHMODE_R_POS_6BIT (0x1 << 5) | ||
114 | #define DITHMODE_R_POS_5BIT (0x2 << 5) | ||
115 | |||
116 | #define DITHMODE_G_POS_MASK (0x3 << 3) | ||
117 | #define DITHMODE_G_POS_SHIFT (3) | ||
118 | #define DITHMODE_G_POS_8BIT (0x0 << 3) | ||
119 | #define DITHMODE_G_POS_6BIT (0x1 << 3) | ||
120 | #define DITHMODE_G_POS_5BIT (0x2 << 3) | ||
121 | |||
122 | #define DITHMODE_B_POS_MASK (0x3 << 1) | ||
123 | #define DITHMODE_B_POS_SHIFT (1) | ||
124 | #define DITHMODE_B_POS_8BIT (0x0 << 1) | ||
125 | #define DITHMODE_B_POS_6BIT (0x1 << 1) | ||
126 | #define DITHMODE_B_POS_5BIT (0x2 << 1) | ||
127 | |||
128 | #define DITHMODE_DITH_EN (1 << 0) | ||
129 | |||
130 | #define WPALCON (0x1A0) | ||
131 | |||
132 | /* Palette control */ | ||
133 | /* Note for S5PC100: you can still use those macros on WPALCON (aka WPALCON_L), | ||
134 | * but make sure that WPALCON_H W2PAL-W4PAL entries are zeroed out */ | ||
135 | #define WPALCON_W4PAL_16BPP_A555 (1 << 8) | ||
136 | #define WPALCON_W3PAL_16BPP_A555 (1 << 7) | ||
137 | #define WPALCON_W2PAL_16BPP_A555 (1 << 6) | ||
138 | |||
139 | |||
140 | /* Notes on per-window bpp settings | ||
141 | * | ||
142 | * Value Win0 Win1 Win2 Win3 Win 4 | ||
143 | * 0000 1(P) 1(P) 1(P) 1(P) 1(P) | ||
144 | * 0001 2(P) 2(P) 2(P) 2(P) 2(P) | ||
145 | * 0010 4(P) 4(P) 4(P) 4(P) -none- | ||
146 | * 0011 8(P) 8(P) -none- -none- -none- | ||
147 | * 0100 -none- 8(A232) 8(A232) -none- -none- | ||
148 | * 0101 16(565) 16(565) 16(565) 16(565) 16(565) | ||
149 | * 0110 -none- 16(A555) 16(A555) 16(A555) 16(A555) | ||
150 | * 0111 16(I555) 16(I565) 16(I555) 16(I555) 16(I555) | ||
151 | * 1000 18(666) 18(666) 18(666) 18(666) 18(666) | ||
152 | * 1001 -none- 18(A665) 18(A665) 18(A665) 16(A665) | ||
153 | * 1010 -none- 19(A666) 19(A666) 19(A666) 19(A666) | ||
154 | * 1011 24(888) 24(888) 24(888) 24(888) 24(888) | ||
155 | * 1100 -none- 24(A887) 24(A887) 24(A887) 24(A887) | ||
156 | * 1101 -none- 25(A888) 25(A888) 25(A888) 25(A888) | ||
157 | * 1110 -none- -none- -none- -none- -none- | ||
158 | * 1111 -none- -none- -none- -none- -none- | ||
159 | */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/regs-fb.h b/arch/arm/plat-samsung/include/plat/regs-fb.h deleted file mode 100644 index 9a78012d6f4..00000000000 --- a/arch/arm/plat-samsung/include/plat/regs-fb.h +++ /dev/null | |||
@@ -1,403 +0,0 @@ | |||
1 | /* arch/arm/plat-samsung/include/plat/regs-fb.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C Platform - new-style framebuffer register definitions | ||
9 | * | ||
10 | * This is the register set for the new style framebuffer interface | ||
11 | * found from the S3C2443 onwards into the S3C2416, S3C2450 and the | ||
12 | * S3C64XX series such as the S3C6400 and S3C6410. | ||
13 | * | ||
14 | * The file does not contain the cpu specific items which are based on | ||
15 | * whichever architecture is selected, it only contains the core of the | ||
16 | * register set. See <mach/regs-fb.h> to get the specifics. | ||
17 | * | ||
18 | * Note, we changed to using regs-fb.h as it avoids any clashes with | ||
19 | * the original regs-lcd.h so out of the way of regs-lcd.h as well as | ||
20 | * indicating the newer block is much more than just an LCD interface. | ||
21 | * | ||
22 | * This program is free software; you can redistribute it and/or modify | ||
23 | * it under the terms of the GNU General Public License version 2 as | ||
24 | * published by the Free Software Foundation. | ||
25 | */ | ||
26 | |||
27 | /* Please do not include this file directly, use <mach/regs-fb.h> to | ||
28 | * ensure all the localised SoC support is included as necessary. | ||
29 | */ | ||
30 | |||
31 | /* VIDCON0 */ | ||
32 | |||
33 | #define VIDCON0 (0x00) | ||
34 | #define VIDCON0_INTERLACE (1 << 29) | ||
35 | #define VIDCON0_VIDOUT_MASK (0x3 << 26) | ||
36 | #define VIDCON0_VIDOUT_SHIFT (26) | ||
37 | #define VIDCON0_VIDOUT_RGB (0x0 << 26) | ||
38 | #define VIDCON0_VIDOUT_TV (0x1 << 26) | ||
39 | #define VIDCON0_VIDOUT_I80_LDI0 (0x2 << 26) | ||
40 | #define VIDCON0_VIDOUT_I80_LDI1 (0x3 << 26) | ||
41 | |||
42 | #define VIDCON0_L1_DATA_MASK (0x7 << 23) | ||
43 | #define VIDCON0_L1_DATA_SHIFT (23) | ||
44 | #define VIDCON0_L1_DATA_16BPP (0x0 << 23) | ||
45 | #define VIDCON0_L1_DATA_18BPP16 (0x1 << 23) | ||
46 | #define VIDCON0_L1_DATA_18BPP9 (0x2 << 23) | ||
47 | #define VIDCON0_L1_DATA_24BPP (0x3 << 23) | ||
48 | #define VIDCON0_L1_DATA_18BPP (0x4 << 23) | ||
49 | #define VIDCON0_L1_DATA_16BPP8 (0x5 << 23) | ||
50 | |||
51 | #define VIDCON0_L0_DATA_MASK (0x7 << 20) | ||
52 | #define VIDCON0_L0_DATA_SHIFT (20) | ||
53 | #define VIDCON0_L0_DATA_16BPP (0x0 << 20) | ||
54 | #define VIDCON0_L0_DATA_18BPP16 (0x1 << 20) | ||
55 | #define VIDCON0_L0_DATA_18BPP9 (0x2 << 20) | ||
56 | #define VIDCON0_L0_DATA_24BPP (0x3 << 20) | ||
57 | #define VIDCON0_L0_DATA_18BPP (0x4 << 20) | ||
58 | #define VIDCON0_L0_DATA_16BPP8 (0x5 << 20) | ||
59 | |||
60 | #define VIDCON0_PNRMODE_MASK (0x3 << 17) | ||
61 | #define VIDCON0_PNRMODE_SHIFT (17) | ||
62 | #define VIDCON0_PNRMODE_RGB (0x0 << 17) | ||
63 | #define VIDCON0_PNRMODE_BGR (0x1 << 17) | ||
64 | #define VIDCON0_PNRMODE_SERIAL_RGB (0x2 << 17) | ||
65 | #define VIDCON0_PNRMODE_SERIAL_BGR (0x3 << 17) | ||
66 | |||
67 | #define VIDCON0_CLKVALUP (1 << 16) | ||
68 | #define VIDCON0_CLKVAL_F_MASK (0xff << 6) | ||
69 | #define VIDCON0_CLKVAL_F_SHIFT (6) | ||
70 | #define VIDCON0_CLKVAL_F_LIMIT (0xff) | ||
71 | #define VIDCON0_CLKVAL_F(_x) ((_x) << 6) | ||
72 | #define VIDCON0_VLCKFREE (1 << 5) | ||
73 | #define VIDCON0_CLKDIR (1 << 4) | ||
74 | |||
75 | #define VIDCON0_CLKSEL_MASK (0x3 << 2) | ||
76 | #define VIDCON0_CLKSEL_SHIFT (2) | ||
77 | #define VIDCON0_CLKSEL_HCLK (0x0 << 2) | ||
78 | #define VIDCON0_CLKSEL_LCD (0x1 << 2) | ||
79 | #define VIDCON0_CLKSEL_27M (0x3 << 2) | ||
80 | |||
81 | #define VIDCON0_ENVID (1 << 1) | ||
82 | #define VIDCON0_ENVID_F (1 << 0) | ||
83 | |||
84 | #define VIDCON1 (0x04) | ||
85 | #define VIDCON1_LINECNT_MASK (0x7ff << 16) | ||
86 | #define VIDCON1_LINECNT_SHIFT (16) | ||
87 | #define VIDCON1_LINECNT_GET(_v) (((_v) >> 16) & 0x7ff) | ||
88 | #define VIDCON1_VSTATUS_MASK (0x3 << 13) | ||
89 | #define VIDCON1_VSTATUS_SHIFT (13) | ||
90 | #define VIDCON1_VSTATUS_VSYNC (0x0 << 13) | ||
91 | #define VIDCON1_VSTATUS_BACKPORCH (0x1 << 13) | ||
92 | #define VIDCON1_VSTATUS_ACTIVE (0x2 << 13) | ||
93 | #define VIDCON1_VSTATUS_FRONTPORCH (0x0 << 13) | ||
94 | #define VIDCON1_VCLK_MASK (0x3 << 9) | ||
95 | #define VIDCON1_VCLK_HOLD (0x0 << 9) | ||
96 | #define VIDCON1_VCLK_RUN (0x1 << 9) | ||
97 | |||
98 | #define VIDCON1_INV_VCLK (1 << 7) | ||
99 | #define VIDCON1_INV_HSYNC (1 << 6) | ||
100 | #define VIDCON1_INV_VSYNC (1 << 5) | ||
101 | #define VIDCON1_INV_VDEN (1 << 4) | ||
102 | |||
103 | /* VIDCON2 */ | ||
104 | |||
105 | #define VIDCON2 (0x08) | ||
106 | #define VIDCON2_EN601 (1 << 23) | ||
107 | #define VIDCON2_TVFMTSEL_SW (1 << 14) | ||
108 | |||
109 | #define VIDCON2_TVFMTSEL1_MASK (0x3 << 12) | ||
110 | #define VIDCON2_TVFMTSEL1_SHIFT (12) | ||
111 | #define VIDCON2_TVFMTSEL1_RGB (0x0 << 12) | ||
112 | #define VIDCON2_TVFMTSEL1_YUV422 (0x1 << 12) | ||
113 | #define VIDCON2_TVFMTSEL1_YUV444 (0x2 << 12) | ||
114 | |||
115 | #define VIDCON2_ORGYCbCr (1 << 8) | ||
116 | #define VIDCON2_YUVORDCrCb (1 << 7) | ||
117 | |||
118 | /* PRTCON (S3C6410, S5PC100) | ||
119 | * Might not be present in the S3C6410 documentation, | ||
120 | * but tests prove it's there almost for sure; shouldn't hurt in any case. | ||
121 | */ | ||
122 | #define PRTCON (0x0c) | ||
123 | #define PRTCON_PROTECT (1 << 11) | ||
124 | |||
125 | /* VIDTCON0 */ | ||
126 | |||
127 | #define VIDTCON0_VBPDE_MASK (0xff << 24) | ||
128 | #define VIDTCON0_VBPDE_SHIFT (24) | ||
129 | #define VIDTCON0_VBPDE_LIMIT (0xff) | ||
130 | #define VIDTCON0_VBPDE(_x) ((_x) << 24) | ||
131 | |||
132 | #define VIDTCON0_VBPD_MASK (0xff << 16) | ||
133 | #define VIDTCON0_VBPD_SHIFT (16) | ||
134 | #define VIDTCON0_VBPD_LIMIT (0xff) | ||
135 | #define VIDTCON0_VBPD(_x) ((_x) << 16) | ||
136 | |||
137 | #define VIDTCON0_VFPD_MASK (0xff << 8) | ||
138 | #define VIDTCON0_VFPD_SHIFT (8) | ||
139 | #define VIDTCON0_VFPD_LIMIT (0xff) | ||
140 | #define VIDTCON0_VFPD(_x) ((_x) << 8) | ||
141 | |||
142 | #define VIDTCON0_VSPW_MASK (0xff << 0) | ||
143 | #define VIDTCON0_VSPW_SHIFT (0) | ||
144 | #define VIDTCON0_VSPW_LIMIT (0xff) | ||
145 | #define VIDTCON0_VSPW(_x) ((_x) << 0) | ||
146 | |||
147 | /* VIDTCON1 */ | ||
148 | |||
149 | #define VIDTCON1_VFPDE_MASK (0xff << 24) | ||
150 | #define VIDTCON1_VFPDE_SHIFT (24) | ||
151 | #define VIDTCON1_VFPDE_LIMIT (0xff) | ||
152 | #define VIDTCON1_VFPDE(_x) ((_x) << 24) | ||
153 | |||
154 | #define VIDTCON1_HBPD_MASK (0xff << 16) | ||
155 | #define VIDTCON1_HBPD_SHIFT (16) | ||
156 | #define VIDTCON1_HBPD_LIMIT (0xff) | ||
157 | #define VIDTCON1_HBPD(_x) ((_x) << 16) | ||
158 | |||
159 | #define VIDTCON1_HFPD_MASK (0xff << 8) | ||
160 | #define VIDTCON1_HFPD_SHIFT (8) | ||
161 | #define VIDTCON1_HFPD_LIMIT (0xff) | ||
162 | #define VIDTCON1_HFPD(_x) ((_x) << 8) | ||
163 | |||
164 | #define VIDTCON1_HSPW_MASK (0xff << 0) | ||
165 | #define VIDTCON1_HSPW_SHIFT (0) | ||
166 | #define VIDTCON1_HSPW_LIMIT (0xff) | ||
167 | #define VIDTCON1_HSPW(_x) ((_x) << 0) | ||
168 | |||
169 | #define VIDTCON2 (0x18) | ||
170 | #define VIDTCON2_LINEVAL_E(_x) ((((_x) & 0x800) >> 11) << 23) | ||
171 | #define VIDTCON2_LINEVAL_MASK (0x7ff << 11) | ||
172 | #define VIDTCON2_LINEVAL_SHIFT (11) | ||
173 | #define VIDTCON2_LINEVAL_LIMIT (0x7ff) | ||
174 | #define VIDTCON2_LINEVAL(_x) (((_x) & 0x7ff) << 11) | ||
175 | |||
176 | #define VIDTCON2_HOZVAL_E(_x) ((((_x) & 0x800) >> 11) << 22) | ||
177 | #define VIDTCON2_HOZVAL_MASK (0x7ff << 0) | ||
178 | #define VIDTCON2_HOZVAL_SHIFT (0) | ||
179 | #define VIDTCON2_HOZVAL_LIMIT (0x7ff) | ||
180 | #define VIDTCON2_HOZVAL(_x) (((_x) & 0x7ff) << 0) | ||
181 | |||
182 | /* WINCONx */ | ||
183 | |||
184 | |||
185 | #define WINCONx_BITSWP (1 << 18) | ||
186 | #define WINCONx_BYTSWP (1 << 17) | ||
187 | #define WINCONx_HAWSWP (1 << 16) | ||
188 | #define WINCONx_WSWP (1 << 15) | ||
189 | #define WINCONx_BURSTLEN_MASK (0x3 << 9) | ||
190 | #define WINCONx_BURSTLEN_SHIFT (9) | ||
191 | #define WINCONx_BURSTLEN_16WORD (0x0 << 9) | ||
192 | #define WINCONx_BURSTLEN_8WORD (0x1 << 9) | ||
193 | #define WINCONx_BURSTLEN_4WORD (0x2 << 9) | ||
194 | |||
195 | #define WINCONx_ENWIN (1 << 0) | ||
196 | #define WINCON0_BPPMODE_MASK (0xf << 2) | ||
197 | #define WINCON0_BPPMODE_SHIFT (2) | ||
198 | #define WINCON0_BPPMODE_1BPP (0x0 << 2) | ||
199 | #define WINCON0_BPPMODE_2BPP (0x1 << 2) | ||
200 | #define WINCON0_BPPMODE_4BPP (0x2 << 2) | ||
201 | #define WINCON0_BPPMODE_8BPP_PALETTE (0x3 << 2) | ||
202 | #define WINCON0_BPPMODE_16BPP_565 (0x5 << 2) | ||
203 | #define WINCON0_BPPMODE_16BPP_1555 (0x7 << 2) | ||
204 | #define WINCON0_BPPMODE_18BPP_666 (0x8 << 2) | ||
205 | #define WINCON0_BPPMODE_24BPP_888 (0xb << 2) | ||
206 | |||
207 | #define WINCON1_BLD_PIX (1 << 6) | ||
208 | |||
209 | #define WINCON1_ALPHA_SEL (1 << 1) | ||
210 | #define WINCON1_BPPMODE_MASK (0xf << 2) | ||
211 | #define WINCON1_BPPMODE_SHIFT (2) | ||
212 | #define WINCON1_BPPMODE_1BPP (0x0 << 2) | ||
213 | #define WINCON1_BPPMODE_2BPP (0x1 << 2) | ||
214 | #define WINCON1_BPPMODE_4BPP (0x2 << 2) | ||
215 | #define WINCON1_BPPMODE_8BPP_PALETTE (0x3 << 2) | ||
216 | #define WINCON1_BPPMODE_8BPP_1232 (0x4 << 2) | ||
217 | #define WINCON1_BPPMODE_16BPP_565 (0x5 << 2) | ||
218 | #define WINCON1_BPPMODE_16BPP_A1555 (0x6 << 2) | ||
219 | #define WINCON1_BPPMODE_16BPP_I1555 (0x7 << 2) | ||
220 | #define WINCON1_BPPMODE_18BPP_666 (0x8 << 2) | ||
221 | #define WINCON1_BPPMODE_18BPP_A1665 (0x9 << 2) | ||
222 | #define WINCON1_BPPMODE_19BPP_A1666 (0xa << 2) | ||
223 | #define WINCON1_BPPMODE_24BPP_888 (0xb << 2) | ||
224 | #define WINCON1_BPPMODE_24BPP_A1887 (0xc << 2) | ||
225 | #define WINCON1_BPPMODE_25BPP_A1888 (0xd << 2) | ||
226 | #define WINCON1_BPPMODE_28BPP_A4888 (0xd << 2) | ||
227 | |||
228 | /* S5PV210 */ | ||
229 | #define SHADOWCON (0x34) | ||
230 | #define SHADOWCON_WINx_PROTECT(_win) (1 << (10 + (_win))) | ||
231 | /* DMA channels (all windows) */ | ||
232 | #define SHADOWCON_CHx_ENABLE(_win) (1 << (_win)) | ||
233 | /* Local input channels (windows 0-2) */ | ||
234 | #define SHADOWCON_CHx_LOCAL_ENABLE(_win) (1 << (5 + (_win))) | ||
235 | |||
236 | #define VIDOSDxA_TOPLEFT_X_E(_x) ((((_x) & 0x800) >> 11) << 23) | ||
237 | #define VIDOSDxA_TOPLEFT_X_MASK (0x7ff << 11) | ||
238 | #define VIDOSDxA_TOPLEFT_X_SHIFT (11) | ||
239 | #define VIDOSDxA_TOPLEFT_X_LIMIT (0x7ff) | ||
240 | #define VIDOSDxA_TOPLEFT_X(_x) (((_x) & 0x7ff) << 11) | ||
241 | |||
242 | #define VIDOSDxA_TOPLEFT_Y_E(_x) ((((_x) & 0x800) >> 11) << 22) | ||
243 | #define VIDOSDxA_TOPLEFT_Y_MASK (0x7ff << 0) | ||
244 | #define VIDOSDxA_TOPLEFT_Y_SHIFT (0) | ||
245 | #define VIDOSDxA_TOPLEFT_Y_LIMIT (0x7ff) | ||
246 | #define VIDOSDxA_TOPLEFT_Y(_x) (((_x) & 0x7ff) << 0) | ||
247 | |||
248 | #define VIDOSDxB_BOTRIGHT_X_E(_x) ((((_x) & 0x800) >> 11) << 23) | ||
249 | #define VIDOSDxB_BOTRIGHT_X_MASK (0x7ff << 11) | ||
250 | #define VIDOSDxB_BOTRIGHT_X_SHIFT (11) | ||
251 | #define VIDOSDxB_BOTRIGHT_X_LIMIT (0x7ff) | ||
252 | #define VIDOSDxB_BOTRIGHT_X(_x) (((_x) & 0x7ff) << 11) | ||
253 | |||
254 | #define VIDOSDxB_BOTRIGHT_Y_E(_x) ((((_x) & 0x800) >> 11) << 22) | ||
255 | #define VIDOSDxB_BOTRIGHT_Y_MASK (0x7ff << 0) | ||
256 | #define VIDOSDxB_BOTRIGHT_Y_SHIFT (0) | ||
257 | #define VIDOSDxB_BOTRIGHT_Y_LIMIT (0x7ff) | ||
258 | #define VIDOSDxB_BOTRIGHT_Y(_x) (((_x) & 0x7ff) << 0) | ||
259 | |||
260 | /* For VIDOSD[1..4]C */ | ||
261 | #define VIDISD14C_ALPHA0_R(_x) ((_x) << 20) | ||
262 | #define VIDISD14C_ALPHA0_G_MASK (0xf << 16) | ||
263 | #define VIDISD14C_ALPHA0_G_SHIFT (16) | ||
264 | #define VIDISD14C_ALPHA0_G_LIMIT (0xf) | ||
265 | #define VIDISD14C_ALPHA0_G(_x) ((_x) << 16) | ||
266 | #define VIDISD14C_ALPHA0_B_MASK (0xf << 12) | ||
267 | #define VIDISD14C_ALPHA0_B_SHIFT (12) | ||
268 | #define VIDISD14C_ALPHA0_B_LIMIT (0xf) | ||
269 | #define VIDISD14C_ALPHA0_B(_x) ((_x) << 12) | ||
270 | #define VIDISD14C_ALPHA1_R_MASK (0xf << 8) | ||
271 | #define VIDISD14C_ALPHA1_R_SHIFT (8) | ||
272 | #define VIDISD14C_ALPHA1_R_LIMIT (0xf) | ||
273 | #define VIDISD14C_ALPHA1_R(_x) ((_x) << 8) | ||
274 | #define VIDISD14C_ALPHA1_G_MASK (0xf << 4) | ||
275 | #define VIDISD14C_ALPHA1_G_SHIFT (4) | ||
276 | #define VIDISD14C_ALPHA1_G_LIMIT (0xf) | ||
277 | #define VIDISD14C_ALPHA1_G(_x) ((_x) << 4) | ||
278 | #define VIDISD14C_ALPHA1_B_MASK (0xf << 0) | ||
279 | #define VIDISD14C_ALPHA1_B_SHIFT (0) | ||
280 | #define VIDISD14C_ALPHA1_B_LIMIT (0xf) | ||
281 | #define VIDISD14C_ALPHA1_B(_x) ((_x) << 0) | ||
282 | |||
283 | /* Video buffer addresses */ | ||
284 | #define VIDW_BUF_START(_buff) (0xA0 + ((_buff) * 8)) | ||
285 | #define VIDW_BUF_START1(_buff) (0xA4 + ((_buff) * 8)) | ||
286 | #define VIDW_BUF_END(_buff) (0xD0 + ((_buff) * 8)) | ||
287 | #define VIDW_BUF_END1(_buff) (0xD4 + ((_buff) * 8)) | ||
288 | #define VIDW_BUF_SIZE(_buff) (0x100 + ((_buff) * 4)) | ||
289 | |||
290 | #define VIDW_BUF_SIZE_OFFSET_E(_x) ((((_x) & 0x2000) >> 13) << 27) | ||
291 | #define VIDW_BUF_SIZE_OFFSET_MASK (0x1fff << 13) | ||
292 | #define VIDW_BUF_SIZE_OFFSET_SHIFT (13) | ||
293 | #define VIDW_BUF_SIZE_OFFSET_LIMIT (0x1fff) | ||
294 | #define VIDW_BUF_SIZE_OFFSET(_x) (((_x) & 0x1fff) << 13) | ||
295 | |||
296 | #define VIDW_BUF_SIZE_PAGEWIDTH_E(_x) ((((_x) & 0x2000) >> 13) << 26) | ||
297 | #define VIDW_BUF_SIZE_PAGEWIDTH_MASK (0x1fff << 0) | ||
298 | #define VIDW_BUF_SIZE_PAGEWIDTH_SHIFT (0) | ||
299 | #define VIDW_BUF_SIZE_PAGEWIDTH_LIMIT (0x1fff) | ||
300 | #define VIDW_BUF_SIZE_PAGEWIDTH(_x) (((_x) & 0x1fff) << 0) | ||
301 | |||
302 | /* Interrupt controls and status */ | ||
303 | |||
304 | #define VIDINTCON0_FIFOINTERVAL_MASK (0x3f << 20) | ||
305 | #define VIDINTCON0_FIFOINTERVAL_SHIFT (20) | ||
306 | #define VIDINTCON0_FIFOINTERVAL_LIMIT (0x3f) | ||
307 | #define VIDINTCON0_FIFOINTERVAL(_x) ((_x) << 20) | ||
308 | |||
309 | #define VIDINTCON0_INT_SYSMAINCON (1 << 19) | ||
310 | #define VIDINTCON0_INT_SYSSUBCON (1 << 18) | ||
311 | #define VIDINTCON0_INT_I80IFDONE (1 << 17) | ||
312 | |||
313 | #define VIDINTCON0_FRAMESEL0_MASK (0x3 << 15) | ||
314 | #define VIDINTCON0_FRAMESEL0_SHIFT (15) | ||
315 | #define VIDINTCON0_FRAMESEL0_BACKPORCH (0x0 << 15) | ||
316 | #define VIDINTCON0_FRAMESEL0_VSYNC (0x1 << 15) | ||
317 | #define VIDINTCON0_FRAMESEL0_ACTIVE (0x2 << 15) | ||
318 | #define VIDINTCON0_FRAMESEL0_FRONTPORCH (0x3 << 15) | ||
319 | |||
320 | #define VIDINTCON0_FRAMESEL1 (1 << 13) | ||
321 | #define VIDINTCON0_FRAMESEL1_MASK (0x3 << 13) | ||
322 | #define VIDINTCON0_FRAMESEL1_NONE (0x0 << 13) | ||
323 | #define VIDINTCON0_FRAMESEL1_BACKPORCH (0x1 << 13) | ||
324 | #define VIDINTCON0_FRAMESEL1_VSYNC (0x2 << 13) | ||
325 | #define VIDINTCON0_FRAMESEL1_FRONTPORCH (0x3 << 13) | ||
326 | |||
327 | #define VIDINTCON0_INT_FRAME (1 << 12) | ||
328 | #define VIDINTCON0_FIFIOSEL_MASK (0x7f << 5) | ||
329 | #define VIDINTCON0_FIFIOSEL_SHIFT (5) | ||
330 | #define VIDINTCON0_FIFIOSEL_WINDOW0 (0x1 << 5) | ||
331 | #define VIDINTCON0_FIFIOSEL_WINDOW1 (0x2 << 5) | ||
332 | |||
333 | #define VIDINTCON0_FIFOLEVEL_MASK (0x7 << 2) | ||
334 | #define VIDINTCON0_FIFOLEVEL_SHIFT (2) | ||
335 | #define VIDINTCON0_FIFOLEVEL_TO25PC (0x0 << 2) | ||
336 | #define VIDINTCON0_FIFOLEVEL_TO50PC (0x1 << 2) | ||
337 | #define VIDINTCON0_FIFOLEVEL_TO75PC (0x2 << 2) | ||
338 | #define VIDINTCON0_FIFOLEVEL_EMPTY (0x3 << 2) | ||
339 | #define VIDINTCON0_FIFOLEVEL_FULL (0x4 << 2) | ||
340 | |||
341 | #define VIDINTCON0_INT_FIFO_MASK (0x3 << 0) | ||
342 | #define VIDINTCON0_INT_FIFO_SHIFT (0) | ||
343 | #define VIDINTCON0_INT_ENABLE (1 << 0) | ||
344 | |||
345 | #define VIDINTCON1 (0x134) | ||
346 | #define VIDINTCON1_INT_I180 (1 << 2) | ||
347 | #define VIDINTCON1_INT_FRAME (1 << 1) | ||
348 | #define VIDINTCON1_INT_FIFO (1 << 0) | ||
349 | |||
350 | /* Window colour-key control registers */ | ||
351 | #define WKEYCON (0x140) /* 6410,V210 */ | ||
352 | |||
353 | #define WKEYCON0 (0x00) | ||
354 | #define WKEYCON1 (0x04) | ||
355 | |||
356 | #define WxKEYCON0_KEYBL_EN (1 << 26) | ||
357 | #define WxKEYCON0_KEYEN_F (1 << 25) | ||
358 | #define WxKEYCON0_DIRCON (1 << 24) | ||
359 | #define WxKEYCON0_COMPKEY_MASK (0xffffff << 0) | ||
360 | #define WxKEYCON0_COMPKEY_SHIFT (0) | ||
361 | #define WxKEYCON0_COMPKEY_LIMIT (0xffffff) | ||
362 | #define WxKEYCON0_COMPKEY(_x) ((_x) << 0) | ||
363 | #define WxKEYCON1_COLVAL_MASK (0xffffff << 0) | ||
364 | #define WxKEYCON1_COLVAL_SHIFT (0) | ||
365 | #define WxKEYCON1_COLVAL_LIMIT (0xffffff) | ||
366 | #define WxKEYCON1_COLVAL(_x) ((_x) << 0) | ||
367 | |||
368 | |||
369 | /* Window blanking (MAP) */ | ||
370 | |||
371 | #define WINxMAP_MAP (1 << 24) | ||
372 | #define WINxMAP_MAP_COLOUR_MASK (0xffffff << 0) | ||
373 | #define WINxMAP_MAP_COLOUR_SHIFT (0) | ||
374 | #define WINxMAP_MAP_COLOUR_LIMIT (0xffffff) | ||
375 | #define WINxMAP_MAP_COLOUR(_x) ((_x) << 0) | ||
376 | |||
377 | #define WPALCON_PAL_UPDATE (1 << 9) | ||
378 | #define WPALCON_W1PAL_MASK (0x7 << 3) | ||
379 | #define WPALCON_W1PAL_SHIFT (3) | ||
380 | #define WPALCON_W1PAL_25BPP_A888 (0x0 << 3) | ||
381 | #define WPALCON_W1PAL_24BPP (0x1 << 3) | ||
382 | #define WPALCON_W1PAL_19BPP_A666 (0x2 << 3) | ||
383 | #define WPALCON_W1PAL_18BPP_A665 (0x3 << 3) | ||
384 | #define WPALCON_W1PAL_18BPP (0x4 << 3) | ||
385 | #define WPALCON_W1PAL_16BPP_A555 (0x5 << 3) | ||
386 | #define WPALCON_W1PAL_16BPP_565 (0x6 << 3) | ||
387 | |||
388 | #define WPALCON_W0PAL_MASK (0x7 << 0) | ||
389 | #define WPALCON_W0PAL_SHIFT (0) | ||
390 | #define WPALCON_W0PAL_25BPP_A888 (0x0 << 0) | ||
391 | #define WPALCON_W0PAL_24BPP (0x1 << 0) | ||
392 | #define WPALCON_W0PAL_19BPP_A666 (0x2 << 0) | ||
393 | #define WPALCON_W0PAL_18BPP_A665 (0x3 << 0) | ||
394 | #define WPALCON_W0PAL_18BPP (0x4 << 0) | ||
395 | #define WPALCON_W0PAL_16BPP_A555 (0x5 << 0) | ||
396 | #define WPALCON_W0PAL_16BPP_565 (0x6 << 0) | ||
397 | |||
398 | /* Blending equation control */ | ||
399 | #define BLENDCON (0x260) | ||
400 | #define BLENDCON_NEW_MASK (1 << 0) | ||
401 | #define BLENDCON_NEW_8BIT_ALPHA_VALUE (1 << 0) | ||
402 | #define BLENDCON_NEW_4BIT_ALPHA_VALUE (0 << 0) | ||
403 | |||
diff --git a/arch/arm/plat-samsung/setup-mipiphy.c b/arch/arm/plat-samsung/setup-mipiphy.c index 683c466c0e6..14745932760 100644 --- a/arch/arm/plat-samsung/setup-mipiphy.c +++ b/arch/arm/plat-samsung/setup-mipiphy.c | |||
@@ -14,24 +14,18 @@ | |||
14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
15 | #include <mach/regs-clock.h> | 15 | #include <mach/regs-clock.h> |
16 | 16 | ||
17 | static int __s5p_mipi_phy_control(struct platform_device *pdev, | 17 | static int __s5p_mipi_phy_control(int id, bool on, u32 reset) |
18 | bool on, u32 reset) | ||
19 | { | 18 | { |
20 | static DEFINE_SPINLOCK(lock); | 19 | static DEFINE_SPINLOCK(lock); |
21 | void __iomem *addr; | 20 | void __iomem *addr; |
22 | unsigned long flags; | 21 | unsigned long flags; |
23 | int pid; | ||
24 | u32 cfg; | 22 | u32 cfg; |
25 | 23 | ||
26 | if (!pdev) | 24 | id = max(0, id); |
25 | if (id > 1) | ||
27 | return -EINVAL; | 26 | return -EINVAL; |
28 | 27 | ||
29 | pid = (pdev->id == -1) ? 0 : pdev->id; | 28 | addr = S5P_MIPI_DPHY_CONTROL(id); |
30 | |||
31 | if (pid != 0 && pid != 1) | ||
32 | return -EINVAL; | ||
33 | |||
34 | addr = S5P_MIPI_DPHY_CONTROL(pid); | ||
35 | 29 | ||
36 | spin_lock_irqsave(&lock, flags); | 30 | spin_lock_irqsave(&lock, flags); |
37 | 31 | ||
@@ -52,12 +46,12 @@ static int __s5p_mipi_phy_control(struct platform_device *pdev, | |||
52 | return 0; | 46 | return 0; |
53 | } | 47 | } |
54 | 48 | ||
55 | int s5p_csis_phy_enable(struct platform_device *pdev, bool on) | 49 | int s5p_csis_phy_enable(int id, bool on) |
56 | { | 50 | { |
57 | return __s5p_mipi_phy_control(pdev, on, S5P_MIPI_DPHY_SRESETN); | 51 | return __s5p_mipi_phy_control(id, on, S5P_MIPI_DPHY_SRESETN); |
58 | } | 52 | } |
59 | 53 | ||
60 | int s5p_dsim_phy_enable(struct platform_device *pdev, bool on) | 54 | int s5p_dsim_phy_enable(struct platform_device *pdev, bool on) |
61 | { | 55 | { |
62 | return __s5p_mipi_phy_control(pdev, on, S5P_MIPI_DPHY_MRESETN); | 56 | return __s5p_mipi_phy_control(pdev->id, on, S5P_MIPI_DPHY_MRESETN); |
63 | } | 57 | } |
diff --git a/arch/arm/plat-spear/Kconfig b/arch/arm/plat-spear/Kconfig index 4404f82d597..f8db7b2deb3 100644 --- a/arch/arm/plat-spear/Kconfig +++ b/arch/arm/plat-spear/Kconfig | |||
@@ -12,10 +12,10 @@ config ARCH_SPEAR13XX | |||
12 | bool "ST SPEAr13xx with Device Tree" | 12 | bool "ST SPEAr13xx with Device Tree" |
13 | select ARM_GIC | 13 | select ARM_GIC |
14 | select CPU_V7 | 14 | select CPU_V7 |
15 | select USE_OF | ||
16 | select HAVE_SMP | 15 | select HAVE_SMP |
17 | select MIGHT_HAVE_CACHE_L2X0 | 16 | select MIGHT_HAVE_CACHE_L2X0 |
18 | select PINCTRL | 17 | select PINCTRL |
18 | select USE_OF | ||
19 | help | 19 | help |
20 | Supports for ARM's SPEAR13XX family | 20 | Supports for ARM's SPEAR13XX family |
21 | 21 | ||
@@ -23,8 +23,8 @@ config ARCH_SPEAR3XX | |||
23 | bool "ST SPEAr3xx with Device Tree" | 23 | bool "ST SPEAr3xx with Device Tree" |
24 | select ARM_VIC | 24 | select ARM_VIC |
25 | select CPU_ARM926T | 25 | select CPU_ARM926T |
26 | select USE_OF | ||
27 | select PINCTRL | 26 | select PINCTRL |
27 | select USE_OF | ||
28 | help | 28 | help |
29 | Supports for ARM's SPEAR3XX family | 29 | Supports for ARM's SPEAR3XX family |
30 | 30 | ||
diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index 35924a542d4..fe77e51a784 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild | |||
@@ -1,6 +1,4 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | header-y += hwcap.h | ||
4 | 2 | ||
5 | generic-y += bug.h | 3 | generic-y += bug.h |
6 | generic-y += bugs.h | 4 | generic-y += bugs.h |
diff --git a/arch/arm64/include/asm/hwcap.h b/arch/arm64/include/asm/hwcap.h index db05f976611..6d4482fa35b 100644 --- a/arch/arm64/include/asm/hwcap.h +++ b/arch/arm64/include/asm/hwcap.h | |||
@@ -16,11 +16,7 @@ | |||
16 | #ifndef __ASM_HWCAP_H | 16 | #ifndef __ASM_HWCAP_H |
17 | #define __ASM_HWCAP_H | 17 | #define __ASM_HWCAP_H |
18 | 18 | ||
19 | /* | 19 | #include <uapi/asm/hwcap.h> |
20 | * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP | ||
21 | */ | ||
22 | #define HWCAP_FP (1 << 0) | ||
23 | #define HWCAP_ASIMD (1 << 1) | ||
24 | 20 | ||
25 | #define COMPAT_HWCAP_HALF (1 << 1) | 21 | #define COMPAT_HWCAP_HALF (1 << 1) |
26 | #define COMPAT_HWCAP_THUMB (1 << 2) | 22 | #define COMPAT_HWCAP_THUMB (1 << 2) |
@@ -35,7 +31,6 @@ | |||
35 | #define COMPAT_HWCAP_IDIVT (1 << 18) | 31 | #define COMPAT_HWCAP_IDIVT (1 << 18) |
36 | #define COMPAT_HWCAP_IDIV (COMPAT_HWCAP_IDIVA|COMPAT_HWCAP_IDIVT) | 32 | #define COMPAT_HWCAP_IDIV (COMPAT_HWCAP_IDIVA|COMPAT_HWCAP_IDIVT) |
37 | 33 | ||
38 | #ifdef __KERNEL__ | ||
39 | #ifndef __ASSEMBLY__ | 34 | #ifndef __ASSEMBLY__ |
40 | /* | 35 | /* |
41 | * This yields a mask that user programs can use to figure out what | 36 | * This yields a mask that user programs can use to figure out what |
@@ -51,5 +46,3 @@ | |||
51 | extern unsigned int elf_hwcap; | 46 | extern unsigned int elf_hwcap; |
52 | #endif | 47 | #endif |
53 | #endif | 48 | #endif |
54 | |||
55 | #endif | ||
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index 0fa5d6c9ef7..b04d3404f0d 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h | |||
@@ -19,9 +19,7 @@ | |||
19 | #ifndef __ASM_PTRACE_H | 19 | #ifndef __ASM_PTRACE_H |
20 | #define __ASM_PTRACE_H | 20 | #define __ASM_PTRACE_H |
21 | 21 | ||
22 | #include <linux/types.h> | 22 | #include <uapi/asm/ptrace.h> |
23 | |||
24 | #include <asm/hwcap.h> | ||
25 | 23 | ||
26 | /* AArch32-specific ptrace requests */ | 24 | /* AArch32-specific ptrace requests */ |
27 | #define COMPAT_PTRACE_GETREGS 12 | 25 | #define COMPAT_PTRACE_GETREGS 12 |
@@ -32,80 +30,18 @@ | |||
32 | #define COMPAT_PTRACE_SETVFPREGS 28 | 30 | #define COMPAT_PTRACE_SETVFPREGS 28 |
33 | #define COMPAT_PTRACE_GETHBPREGS 29 | 31 | #define COMPAT_PTRACE_GETHBPREGS 29 |
34 | #define COMPAT_PTRACE_SETHBPREGS 30 | 32 | #define COMPAT_PTRACE_SETHBPREGS 30 |
35 | |||
36 | /* | ||
37 | * PSR bits | ||
38 | */ | ||
39 | #define PSR_MODE_EL0t 0x00000000 | ||
40 | #define PSR_MODE_EL1t 0x00000004 | ||
41 | #define PSR_MODE_EL1h 0x00000005 | ||
42 | #define PSR_MODE_EL2t 0x00000008 | ||
43 | #define PSR_MODE_EL2h 0x00000009 | ||
44 | #define PSR_MODE_EL3t 0x0000000c | ||
45 | #define PSR_MODE_EL3h 0x0000000d | ||
46 | #define PSR_MODE_MASK 0x0000000f | ||
47 | |||
48 | /* AArch32 CPSR bits */ | ||
49 | #define PSR_MODE32_BIT 0x00000010 | ||
50 | #define COMPAT_PSR_MODE_USR 0x00000010 | 33 | #define COMPAT_PSR_MODE_USR 0x00000010 |
51 | #define COMPAT_PSR_T_BIT 0x00000020 | 34 | #define COMPAT_PSR_T_BIT 0x00000020 |
52 | #define COMPAT_PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ | 35 | #define COMPAT_PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */ |
53 | |||
54 | /* AArch64 SPSR bits */ | ||
55 | #define PSR_F_BIT 0x00000040 | ||
56 | #define PSR_I_BIT 0x00000080 | ||
57 | #define PSR_A_BIT 0x00000100 | ||
58 | #define PSR_D_BIT 0x00000200 | ||
59 | #define PSR_Q_BIT 0x08000000 | ||
60 | #define PSR_V_BIT 0x10000000 | ||
61 | #define PSR_C_BIT 0x20000000 | ||
62 | #define PSR_Z_BIT 0x40000000 | ||
63 | #define PSR_N_BIT 0x80000000 | ||
64 | |||
65 | /* | ||
66 | * Groups of PSR bits | ||
67 | */ | ||
68 | #define PSR_f 0xff000000 /* Flags */ | ||
69 | #define PSR_s 0x00ff0000 /* Status */ | ||
70 | #define PSR_x 0x0000ff00 /* Extension */ | ||
71 | #define PSR_c 0x000000ff /* Control */ | ||
72 | |||
73 | /* | 36 | /* |
74 | * These are 'magic' values for PTRACE_PEEKUSR that return info about where a | 37 | * These are 'magic' values for PTRACE_PEEKUSR that return info about where a |
75 | * process is located in memory. | 38 | * process is located in memory. |
76 | */ | 39 | */ |
77 | #define PT_TEXT_ADDR 0x10000 | 40 | #define COMPAT_PT_TEXT_ADDR 0x10000 |
78 | #define PT_DATA_ADDR 0x10004 | 41 | #define COMPAT_PT_DATA_ADDR 0x10004 |
79 | #define PT_TEXT_END_ADDR 0x10008 | 42 | #define COMPAT_PT_TEXT_END_ADDR 0x10008 |
80 | |||
81 | #ifndef __ASSEMBLY__ | 43 | #ifndef __ASSEMBLY__ |
82 | 44 | ||
83 | /* | ||
84 | * User structures for general purpose, floating point and debug registers. | ||
85 | */ | ||
86 | struct user_pt_regs { | ||
87 | __u64 regs[31]; | ||
88 | __u64 sp; | ||
89 | __u64 pc; | ||
90 | __u64 pstate; | ||
91 | }; | ||
92 | |||
93 | struct user_fpsimd_state { | ||
94 | __uint128_t vregs[32]; | ||
95 | __u32 fpsr; | ||
96 | __u32 fpcr; | ||
97 | }; | ||
98 | |||
99 | struct user_hwdebug_state { | ||
100 | __u32 dbg_info; | ||
101 | struct { | ||
102 | __u64 addr; | ||
103 | __u32 ctrl; | ||
104 | } dbg_regs[16]; | ||
105 | }; | ||
106 | |||
107 | #ifdef __KERNEL__ | ||
108 | |||
109 | /* sizeof(struct user) for AArch32 */ | 45 | /* sizeof(struct user) for AArch32 */ |
110 | #define COMPAT_USER_SZ 296 | 46 | #define COMPAT_USER_SZ 296 |
111 | /* AArch32 uses x13 as the stack pointer... */ | 47 | /* AArch32 uses x13 as the stack pointer... */ |
@@ -200,8 +136,5 @@ extern unsigned long profile_pc(struct pt_regs *regs); | |||
200 | 136 | ||
201 | extern int aarch32_break_trap(struct pt_regs *regs); | 137 | extern int aarch32_break_trap(struct pt_regs *regs); |
202 | 138 | ||
203 | #endif /* __KERNEL__ */ | ||
204 | |||
205 | #endif /* __ASSEMBLY__ */ | 139 | #endif /* __ASSEMBLY__ */ |
206 | |||
207 | #endif | 140 | #endif |
diff --git a/arch/arm64/include/asm/sigcontext.h b/arch/arm64/include/asm/sigcontext.h index 573cec77881..dca1094acc7 100644 --- a/arch/arm64/include/asm/sigcontext.h +++ b/arch/arm64/include/asm/sigcontext.h | |||
@@ -16,45 +16,9 @@ | |||
16 | #ifndef __ASM_SIGCONTEXT_H | 16 | #ifndef __ASM_SIGCONTEXT_H |
17 | #define __ASM_SIGCONTEXT_H | 17 | #define __ASM_SIGCONTEXT_H |
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <uapi/asm/sigcontext.h> |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Signal context structure - contains all info to do with the state | ||
23 | * before the signal handler was invoked. | ||
24 | */ | ||
25 | struct sigcontext { | ||
26 | __u64 fault_address; | ||
27 | /* AArch64 registers */ | ||
28 | __u64 regs[31]; | ||
29 | __u64 sp; | ||
30 | __u64 pc; | ||
31 | __u64 pstate; | ||
32 | /* 4K reserved for FP/SIMD state and future expansion */ | ||
33 | __u8 __reserved[4096] __attribute__((__aligned__(16))); | ||
34 | }; | ||
35 | |||
36 | /* | ||
37 | * Header to be used at the beginning of structures extending the user | ||
38 | * context. Such structures must be placed after the rt_sigframe on the stack | ||
39 | * and be 16-byte aligned. The last structure must be a dummy one with the | ||
40 | * magic and size set to 0. | ||
41 | */ | ||
42 | struct _aarch64_ctx { | ||
43 | __u32 magic; | ||
44 | __u32 size; | ||
45 | }; | ||
46 | |||
47 | #define FPSIMD_MAGIC 0x46508001 | ||
48 | |||
49 | struct fpsimd_context { | ||
50 | struct _aarch64_ctx head; | ||
51 | __u32 fpsr; | ||
52 | __u32 fpcr; | ||
53 | __uint128_t vregs[32]; | ||
54 | }; | ||
55 | |||
56 | #ifdef __KERNEL__ | ||
57 | /* | ||
58 | * Auxiliary context saved in the sigcontext.__reserved array. Not exported to | 22 | * Auxiliary context saved in the sigcontext.__reserved array. Not exported to |
59 | * user space as it will change with the addition of new context. User space | 23 | * user space as it will change with the addition of new context. User space |
60 | * should check the magic/size information. | 24 | * should check the magic/size information. |
@@ -65,5 +29,3 @@ struct aux_context { | |||
65 | struct _aarch64_ctx end; | 29 | struct _aarch64_ctx end; |
66 | }; | 30 | }; |
67 | #endif | 31 | #endif |
68 | |||
69 | #endif | ||
diff --git a/arch/arm64/include/asm/stat.h b/arch/arm64/include/asm/stat.h index a9f580c28f7..15e35598ac4 100644 --- a/arch/arm64/include/asm/stat.h +++ b/arch/arm64/include/asm/stat.h | |||
@@ -16,9 +16,8 @@ | |||
16 | #ifndef __ASM_STAT_H | 16 | #ifndef __ASM_STAT_H |
17 | #define __ASM_STAT_H | 17 | #define __ASM_STAT_H |
18 | 18 | ||
19 | #include <asm-generic/stat.h> | 19 | #include <uapi/asm/stat.h> |
20 | 20 | ||
21 | #ifdef __KERNEL__ | ||
22 | #ifdef CONFIG_COMPAT | 21 | #ifdef CONFIG_COMPAT |
23 | 22 | ||
24 | #include <asm/compat.h> | 23 | #include <asm/compat.h> |
@@ -60,5 +59,3 @@ struct stat64 { | |||
60 | 59 | ||
61 | #endif | 60 | #endif |
62 | #endif | 61 | #endif |
63 | |||
64 | #endif | ||
diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 8f03dee066e..63f853f8b71 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h | |||
@@ -13,13 +13,17 @@ | |||
13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | |||
17 | #ifndef __SYSCALL_COMPAT | ||
18 | #include <asm-generic/unistd.h> | ||
19 | #endif | ||
20 | |||
21 | #ifdef __KERNEL__ | ||
22 | #ifdef CONFIG_COMPAT | 16 | #ifdef CONFIG_COMPAT |
23 | #include <asm/unistd32.h> | 17 | #define __ARCH_WANT_COMPAT_IPC_PARSE_VERSION |
24 | #endif | 18 | #define __ARCH_WANT_COMPAT_STAT64 |
19 | #define __ARCH_WANT_SYS_GETHOSTNAME | ||
20 | #define __ARCH_WANT_SYS_PAUSE | ||
21 | #define __ARCH_WANT_SYS_GETPGRP | ||
22 | #define __ARCH_WANT_SYS_LLSEEK | ||
23 | #define __ARCH_WANT_SYS_NICE | ||
24 | #define __ARCH_WANT_SYS_SIGPENDING | ||
25 | #define __ARCH_WANT_SYS_SIGPROCMASK | ||
26 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | ||
27 | #define __ARCH_WANT_COMPAT_SYS_SENDFILE | ||
25 | #endif | 28 | #endif |
29 | #include <uapi/asm/unistd.h> | ||
diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h index ba42d41fc5c..6d909faebf2 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Based on arch/arm/include/asm/unistd.h | 2 | * AArch32 (compat) system call definitions. |
3 | * | 3 | * |
4 | * Copyright (C) 2001-2005 Russell King | 4 | * Copyright (C) 2001-2005 Russell King |
5 | * Copyright (C) 2012 ARM Ltd. | 5 | * Copyright (C) 2012 ARM Ltd. |
@@ -21,715 +21,390 @@ | |||
21 | #define __SYSCALL(x, y) | 21 | #define __SYSCALL(x, y) |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | __SYSCALL(0, sys_restart_syscall) | ||
25 | __SYSCALL(1, sys_exit) | ||
26 | __SYSCALL(2, compat_sys_fork_wrapper) | ||
27 | __SYSCALL(3, sys_read) | ||
28 | __SYSCALL(4, sys_write) | ||
29 | __SYSCALL(5, compat_sys_open) | ||
30 | __SYSCALL(6, sys_close) | ||
31 | __SYSCALL(7, sys_ni_syscall) /* 7 was sys_waitpid */ | ||
32 | __SYSCALL(8, sys_creat) | ||
33 | __SYSCALL(9, sys_link) | ||
34 | __SYSCALL(10, sys_unlink) | ||
35 | __SYSCALL(11, compat_sys_execve_wrapper) | ||
36 | __SYSCALL(12, sys_chdir) | ||
37 | __SYSCALL(13, sys_ni_syscall) /* 13 was sys_time */ | ||
38 | __SYSCALL(14, sys_mknod) | ||
39 | __SYSCALL(15, sys_chmod) | ||
40 | __SYSCALL(16, sys_lchown16) | ||
41 | __SYSCALL(17, sys_ni_syscall) /* 17 was sys_break */ | ||
42 | __SYSCALL(18, sys_ni_syscall) /* 18 was sys_stat */ | ||
43 | __SYSCALL(19, compat_sys_lseek_wrapper) | ||
44 | __SYSCALL(20, sys_getpid) | ||
45 | __SYSCALL(21, compat_sys_mount) | ||
46 | __SYSCALL(22, sys_ni_syscall) /* 22 was sys_umount */ | ||
47 | __SYSCALL(23, sys_setuid16) | ||
48 | __SYSCALL(24, sys_getuid16) | ||
49 | __SYSCALL(25, sys_ni_syscall) /* 25 was sys_stime */ | ||
50 | __SYSCALL(26, compat_sys_ptrace) | ||
51 | __SYSCALL(27, sys_ni_syscall) /* 27 was sys_alarm */ | ||
52 | __SYSCALL(28, sys_ni_syscall) /* 28 was sys_fstat */ | ||
53 | __SYSCALL(29, sys_pause) | ||
54 | __SYSCALL(30, sys_ni_syscall) /* 30 was sys_utime */ | ||
55 | __SYSCALL(31, sys_ni_syscall) /* 31 was sys_stty */ | ||
56 | __SYSCALL(32, sys_ni_syscall) /* 32 was sys_gtty */ | ||
57 | __SYSCALL(33, sys_access) | ||
58 | __SYSCALL(34, sys_nice) | ||
59 | __SYSCALL(35, sys_ni_syscall) /* 35 was sys_ftime */ | ||
60 | __SYSCALL(36, sys_sync) | ||
61 | __SYSCALL(37, sys_kill) | ||
62 | __SYSCALL(38, sys_rename) | ||
63 | __SYSCALL(39, sys_mkdir) | ||
64 | __SYSCALL(40, sys_rmdir) | ||
65 | __SYSCALL(41, sys_dup) | ||
66 | __SYSCALL(42, sys_pipe) | ||
67 | __SYSCALL(43, compat_sys_times) | ||
68 | __SYSCALL(44, sys_ni_syscall) /* 44 was sys_prof */ | ||
69 | __SYSCALL(45, sys_brk) | ||
70 | __SYSCALL(46, sys_setgid16) | ||
71 | __SYSCALL(47, sys_getgid16) | ||
72 | __SYSCALL(48, sys_ni_syscall) /* 48 was sys_signal */ | ||
73 | __SYSCALL(49, sys_geteuid16) | ||
74 | __SYSCALL(50, sys_getegid16) | ||
75 | __SYSCALL(51, sys_acct) | ||
76 | __SYSCALL(52, sys_umount) | ||
77 | __SYSCALL(53, sys_ni_syscall) /* 53 was sys_lock */ | ||
78 | __SYSCALL(54, compat_sys_ioctl) | ||
79 | __SYSCALL(55, compat_sys_fcntl) | ||
80 | __SYSCALL(56, sys_ni_syscall) /* 56 was sys_mpx */ | ||
81 | __SYSCALL(57, sys_setpgid) | ||
82 | __SYSCALL(58, sys_ni_syscall) /* 58 was sys_ulimit */ | ||
83 | __SYSCALL(59, sys_ni_syscall) /* 59 was sys_olduname */ | ||
84 | __SYSCALL(60, sys_umask) | ||
85 | __SYSCALL(61, sys_chroot) | ||
86 | __SYSCALL(62, compat_sys_ustat) | ||
87 | __SYSCALL(63, sys_dup2) | ||
88 | __SYSCALL(64, sys_getppid) | ||
89 | __SYSCALL(65, sys_getpgrp) | ||
90 | __SYSCALL(66, sys_setsid) | ||
91 | __SYSCALL(67, compat_sys_sigaction) | ||
92 | __SYSCALL(68, sys_ni_syscall) /* 68 was sys_sgetmask */ | ||
93 | __SYSCALL(69, sys_ni_syscall) /* 69 was sys_ssetmask */ | ||
94 | __SYSCALL(70, sys_setreuid16) | ||
95 | __SYSCALL(71, sys_setregid16) | ||
96 | __SYSCALL(72, compat_sys_sigsuspend) | ||
97 | __SYSCALL(73, compat_sys_sigpending) | ||
98 | __SYSCALL(74, sys_sethostname) | ||
99 | __SYSCALL(75, compat_sys_setrlimit) | ||
100 | __SYSCALL(76, sys_ni_syscall) /* 76 was compat_sys_getrlimit */ | ||
101 | __SYSCALL(77, compat_sys_getrusage) | ||
102 | __SYSCALL(78, compat_sys_gettimeofday) | ||
103 | __SYSCALL(79, compat_sys_settimeofday) | ||
104 | __SYSCALL(80, sys_getgroups16) | ||
105 | __SYSCALL(81, sys_setgroups16) | ||
106 | __SYSCALL(82, sys_ni_syscall) /* 82 was compat_sys_select */ | ||
107 | __SYSCALL(83, sys_symlink) | ||
108 | __SYSCALL(84, sys_ni_syscall) /* 84 was sys_lstat */ | ||
109 | __SYSCALL(85, sys_readlink) | ||
110 | __SYSCALL(86, sys_uselib) | ||
111 | __SYSCALL(87, sys_swapon) | ||
112 | __SYSCALL(88, sys_reboot) | ||
113 | __SYSCALL(89, sys_ni_syscall) /* 89 was sys_readdir */ | ||
114 | __SYSCALL(90, sys_ni_syscall) /* 90 was sys_mmap */ | ||
115 | __SYSCALL(91, sys_munmap) | ||
116 | __SYSCALL(92, sys_truncate) | ||
117 | __SYSCALL(93, sys_ftruncate) | ||
118 | __SYSCALL(94, sys_fchmod) | ||
119 | __SYSCALL(95, sys_fchown16) | ||
120 | __SYSCALL(96, sys_getpriority) | ||
121 | __SYSCALL(97, sys_setpriority) | ||
122 | __SYSCALL(98, sys_ni_syscall) /* 98 was sys_profil */ | ||
123 | __SYSCALL(99, compat_sys_statfs) | ||
124 | __SYSCALL(100, compat_sys_fstatfs) | ||
125 | __SYSCALL(101, sys_ni_syscall) /* 101 was sys_ioperm */ | ||
126 | __SYSCALL(102, sys_ni_syscall) /* 102 was sys_socketcall */ | ||
127 | __SYSCALL(103, sys_syslog) | ||
128 | __SYSCALL(104, compat_sys_setitimer) | ||
129 | __SYSCALL(105, compat_sys_getitimer) | ||
130 | __SYSCALL(106, compat_sys_newstat) | ||
131 | __SYSCALL(107, compat_sys_newlstat) | ||
132 | __SYSCALL(108, compat_sys_newfstat) | ||
133 | __SYSCALL(109, sys_ni_syscall) /* 109 was sys_uname */ | ||
134 | __SYSCALL(110, sys_ni_syscall) /* 110 was sys_iopl */ | ||
135 | __SYSCALL(111, sys_vhangup) | ||
136 | __SYSCALL(112, sys_ni_syscall) /* 112 was sys_idle */ | ||
137 | __SYSCALL(113, sys_ni_syscall) /* 113 was sys_syscall */ | ||
138 | __SYSCALL(114, compat_sys_wait4) | ||
139 | __SYSCALL(115, sys_swapoff) | ||
140 | __SYSCALL(116, compat_sys_sysinfo) | ||
141 | __SYSCALL(117, sys_ni_syscall) /* 117 was sys_ipc */ | ||
142 | __SYSCALL(118, sys_fsync) | ||
143 | __SYSCALL(119, compat_sys_sigreturn_wrapper) | ||
144 | __SYSCALL(120, compat_sys_clone_wrapper) | ||
145 | __SYSCALL(121, sys_setdomainname) | ||
146 | __SYSCALL(122, sys_newuname) | ||
147 | __SYSCALL(123, sys_ni_syscall) /* 123 was sys_modify_ldt */ | ||
148 | __SYSCALL(124, compat_sys_adjtimex) | ||
149 | __SYSCALL(125, sys_mprotect) | ||
150 | __SYSCALL(126, compat_sys_sigprocmask) | ||
151 | __SYSCALL(127, sys_ni_syscall) /* 127 was sys_create_module */ | ||
152 | __SYSCALL(128, sys_init_module) | ||
153 | __SYSCALL(129, sys_delete_module) | ||
154 | __SYSCALL(130, sys_ni_syscall) /* 130 was sys_get_kernel_syms */ | ||
155 | __SYSCALL(131, sys_quotactl) | ||
156 | __SYSCALL(132, sys_getpgid) | ||
157 | __SYSCALL(133, sys_fchdir) | ||
158 | __SYSCALL(134, sys_bdflush) | ||
159 | __SYSCALL(135, sys_sysfs) | ||
160 | __SYSCALL(136, sys_personality) | ||
161 | __SYSCALL(137, sys_ni_syscall) /* 137 was sys_afs_syscall */ | ||
162 | __SYSCALL(138, sys_setfsuid16) | ||
163 | __SYSCALL(139, sys_setfsgid16) | ||
164 | __SYSCALL(140, sys_llseek) | ||
165 | __SYSCALL(141, compat_sys_getdents) | ||
166 | __SYSCALL(142, compat_sys_select) | ||
167 | __SYSCALL(143, sys_flock) | ||
168 | __SYSCALL(144, sys_msync) | ||
169 | __SYSCALL(145, compat_sys_readv) | ||
170 | __SYSCALL(146, compat_sys_writev) | ||
171 | __SYSCALL(147, sys_getsid) | ||
172 | __SYSCALL(148, sys_fdatasync) | ||
173 | __SYSCALL(149, compat_sys_sysctl) | ||
174 | __SYSCALL(150, sys_mlock) | ||
175 | __SYSCALL(151, sys_munlock) | ||
176 | __SYSCALL(152, sys_mlockall) | ||
177 | __SYSCALL(153, sys_munlockall) | ||
178 | __SYSCALL(154, sys_sched_setparam) | ||
179 | __SYSCALL(155, sys_sched_getparam) | ||
180 | __SYSCALL(156, sys_sched_setscheduler) | ||
181 | __SYSCALL(157, sys_sched_getscheduler) | ||
182 | __SYSCALL(158, sys_sched_yield) | ||
183 | __SYSCALL(159, sys_sched_get_priority_max) | ||
184 | __SYSCALL(160, sys_sched_get_priority_min) | ||
185 | __SYSCALL(161, compat_sys_sched_rr_get_interval) | ||
186 | __SYSCALL(162, compat_sys_nanosleep) | ||
187 | __SYSCALL(163, sys_mremap) | ||
188 | __SYSCALL(164, sys_setresuid16) | ||
189 | __SYSCALL(165, sys_getresuid16) | ||
190 | __SYSCALL(166, sys_ni_syscall) /* 166 was sys_vm86 */ | ||
191 | __SYSCALL(167, sys_ni_syscall) /* 167 was sys_query_module */ | ||
192 | __SYSCALL(168, sys_poll) | ||
193 | __SYSCALL(169, sys_ni_syscall) | ||
194 | __SYSCALL(170, sys_setresgid16) | ||
195 | __SYSCALL(171, sys_getresgid16) | ||
196 | __SYSCALL(172, sys_prctl) | ||
197 | __SYSCALL(173, compat_sys_rt_sigreturn_wrapper) | ||
198 | __SYSCALL(174, compat_sys_rt_sigaction) | ||
199 | __SYSCALL(175, compat_sys_rt_sigprocmask) | ||
200 | __SYSCALL(176, compat_sys_rt_sigpending) | ||
201 | __SYSCALL(177, compat_sys_rt_sigtimedwait) | ||
202 | __SYSCALL(178, compat_sys_rt_sigqueueinfo) | ||
203 | __SYSCALL(179, compat_sys_rt_sigsuspend) | ||
204 | __SYSCALL(180, compat_sys_pread64_wrapper) | ||
205 | __SYSCALL(181, compat_sys_pwrite64_wrapper) | ||
206 | __SYSCALL(182, sys_chown16) | ||
207 | __SYSCALL(183, sys_getcwd) | ||
208 | __SYSCALL(184, sys_capget) | ||
209 | __SYSCALL(185, sys_capset) | ||
210 | __SYSCALL(186, compat_sys_sigaltstack_wrapper) | ||
211 | __SYSCALL(187, compat_sys_sendfile) | ||
212 | __SYSCALL(188, sys_ni_syscall) /* 188 reserved */ | ||
213 | __SYSCALL(189, sys_ni_syscall) /* 189 reserved */ | ||
214 | __SYSCALL(190, compat_sys_vfork_wrapper) | ||
215 | __SYSCALL(191, compat_sys_getrlimit) /* SuS compliant getrlimit */ | ||
216 | __SYSCALL(192, sys_mmap_pgoff) | ||
217 | __SYSCALL(193, compat_sys_truncate64_wrapper) | ||
218 | __SYSCALL(194, compat_sys_ftruncate64_wrapper) | ||
219 | __SYSCALL(195, sys_stat64) | ||
220 | __SYSCALL(196, sys_lstat64) | ||
221 | __SYSCALL(197, sys_fstat64) | ||
222 | __SYSCALL(198, sys_lchown) | ||
223 | __SYSCALL(199, sys_getuid) | ||
224 | __SYSCALL(200, sys_getgid) | ||
225 | __SYSCALL(201, sys_geteuid) | ||
226 | __SYSCALL(202, sys_getegid) | ||
227 | __SYSCALL(203, sys_setreuid) | ||
228 | __SYSCALL(204, sys_setregid) | ||
229 | __SYSCALL(205, sys_getgroups) | ||
230 | __SYSCALL(206, sys_setgroups) | ||
231 | __SYSCALL(207, sys_fchown) | ||
232 | __SYSCALL(208, sys_setresuid) | ||
233 | __SYSCALL(209, sys_getresuid) | ||
234 | __SYSCALL(210, sys_setresgid) | ||
235 | __SYSCALL(211, sys_getresgid) | ||
236 | __SYSCALL(212, sys_chown) | ||
237 | __SYSCALL(213, sys_setuid) | ||
238 | __SYSCALL(214, sys_setgid) | ||
239 | __SYSCALL(215, sys_setfsuid) | ||
240 | __SYSCALL(216, sys_setfsgid) | ||
241 | __SYSCALL(217, compat_sys_getdents64) | ||
242 | __SYSCALL(218, sys_pivot_root) | ||
243 | __SYSCALL(219, sys_mincore) | ||
244 | __SYSCALL(220, sys_madvise) | ||
245 | __SYSCALL(221, compat_sys_fcntl64) | ||
246 | __SYSCALL(222, sys_ni_syscall) /* 222 for tux */ | ||
247 | __SYSCALL(223, sys_ni_syscall) /* 223 is unused */ | ||
248 | __SYSCALL(224, sys_gettid) | ||
249 | __SYSCALL(225, compat_sys_readahead_wrapper) | ||
250 | __SYSCALL(226, sys_setxattr) | ||
251 | __SYSCALL(227, sys_lsetxattr) | ||
252 | __SYSCALL(228, sys_fsetxattr) | ||
253 | __SYSCALL(229, sys_getxattr) | ||
254 | __SYSCALL(230, sys_lgetxattr) | ||
255 | __SYSCALL(231, sys_fgetxattr) | ||
256 | __SYSCALL(232, sys_listxattr) | ||
257 | __SYSCALL(233, sys_llistxattr) | ||
258 | __SYSCALL(234, sys_flistxattr) | ||
259 | __SYSCALL(235, sys_removexattr) | ||
260 | __SYSCALL(236, sys_lremovexattr) | ||
261 | __SYSCALL(237, sys_fremovexattr) | ||
262 | __SYSCALL(238, sys_tkill) | ||
263 | __SYSCALL(239, sys_sendfile64) | ||
264 | __SYSCALL(240, compat_sys_futex) | ||
265 | __SYSCALL(241, compat_sys_sched_setaffinity) | ||
266 | __SYSCALL(242, compat_sys_sched_getaffinity) | ||
267 | __SYSCALL(243, compat_sys_io_setup) | ||
268 | __SYSCALL(244, sys_io_destroy) | ||
269 | __SYSCALL(245, compat_sys_io_getevents) | ||
270 | __SYSCALL(246, compat_sys_io_submit) | ||
271 | __SYSCALL(247, sys_io_cancel) | ||
272 | __SYSCALL(248, sys_exit_group) | ||
273 | __SYSCALL(249, compat_sys_lookup_dcookie) | ||
274 | __SYSCALL(250, sys_epoll_create) | ||
275 | __SYSCALL(251, sys_epoll_ctl) | ||
276 | __SYSCALL(252, sys_epoll_wait) | ||
277 | __SYSCALL(253, sys_remap_file_pages) | ||
278 | __SYSCALL(254, sys_ni_syscall) /* 254 for set_thread_area */ | ||
279 | __SYSCALL(255, sys_ni_syscall) /* 255 for get_thread_area */ | ||
280 | __SYSCALL(256, sys_set_tid_address) | ||
281 | __SYSCALL(257, compat_sys_timer_create) | ||
282 | __SYSCALL(258, compat_sys_timer_settime) | ||
283 | __SYSCALL(259, compat_sys_timer_gettime) | ||
284 | __SYSCALL(260, sys_timer_getoverrun) | ||
285 | __SYSCALL(261, sys_timer_delete) | ||
286 | __SYSCALL(262, compat_sys_clock_settime) | ||
287 | __SYSCALL(263, compat_sys_clock_gettime) | ||
288 | __SYSCALL(264, compat_sys_clock_getres) | ||
289 | __SYSCALL(265, compat_sys_clock_nanosleep) | ||
290 | __SYSCALL(266, compat_sys_statfs64_wrapper) | ||
291 | __SYSCALL(267, compat_sys_fstatfs64_wrapper) | ||
292 | __SYSCALL(268, sys_tgkill) | ||
293 | __SYSCALL(269, compat_sys_utimes) | ||
294 | __SYSCALL(270, compat_sys_fadvise64_64_wrapper) | ||
295 | __SYSCALL(271, sys_pciconfig_iobase) | ||
296 | __SYSCALL(272, sys_pciconfig_read) | ||
297 | __SYSCALL(273, sys_pciconfig_write) | ||
298 | __SYSCALL(274, compat_sys_mq_open) | ||
299 | __SYSCALL(275, sys_mq_unlink) | ||
300 | __SYSCALL(276, compat_sys_mq_timedsend) | ||
301 | __SYSCALL(277, compat_sys_mq_timedreceive) | ||
302 | __SYSCALL(278, compat_sys_mq_notify) | ||
303 | __SYSCALL(279, compat_sys_mq_getsetattr) | ||
304 | __SYSCALL(280, compat_sys_waitid) | ||
305 | __SYSCALL(281, sys_socket) | ||
306 | __SYSCALL(282, sys_bind) | ||
307 | __SYSCALL(283, sys_connect) | ||
308 | __SYSCALL(284, sys_listen) | ||
309 | __SYSCALL(285, sys_accept) | ||
310 | __SYSCALL(286, sys_getsockname) | ||
311 | __SYSCALL(287, sys_getpeername) | ||
312 | __SYSCALL(288, sys_socketpair) | ||
313 | __SYSCALL(289, sys_send) | ||
314 | __SYSCALL(290, sys_sendto) | ||
315 | __SYSCALL(291, compat_sys_recv) | ||
316 | __SYSCALL(292, compat_sys_recvfrom) | ||
317 | __SYSCALL(293, sys_shutdown) | ||
318 | __SYSCALL(294, compat_sys_setsockopt) | ||
319 | __SYSCALL(295, compat_sys_getsockopt) | ||
320 | __SYSCALL(296, compat_sys_sendmsg) | ||
321 | __SYSCALL(297, compat_sys_recvmsg) | ||
322 | __SYSCALL(298, sys_semop) | ||
323 | __SYSCALL(299, sys_semget) | ||
324 | __SYSCALL(300, compat_sys_semctl) | ||
325 | __SYSCALL(301, compat_sys_msgsnd) | ||
326 | __SYSCALL(302, compat_sys_msgrcv) | ||
327 | __SYSCALL(303, sys_msgget) | ||
328 | __SYSCALL(304, compat_sys_msgctl) | ||
329 | __SYSCALL(305, compat_sys_shmat) | ||
330 | __SYSCALL(306, sys_shmdt) | ||
331 | __SYSCALL(307, sys_shmget) | ||
332 | __SYSCALL(308, compat_sys_shmctl) | ||
333 | __SYSCALL(309, sys_add_key) | ||
334 | __SYSCALL(310, sys_request_key) | ||
335 | __SYSCALL(311, compat_sys_keyctl) | ||
336 | __SYSCALL(312, compat_sys_semtimedop) | ||
337 | __SYSCALL(313, sys_ni_syscall) | ||
338 | __SYSCALL(314, sys_ioprio_set) | ||
339 | __SYSCALL(315, sys_ioprio_get) | ||
340 | __SYSCALL(316, sys_inotify_init) | ||
341 | __SYSCALL(317, sys_inotify_add_watch) | ||
342 | __SYSCALL(318, sys_inotify_rm_watch) | ||
343 | __SYSCALL(319, compat_sys_mbind) | ||
344 | __SYSCALL(320, compat_sys_get_mempolicy) | ||
345 | __SYSCALL(321, compat_sys_set_mempolicy) | ||
346 | __SYSCALL(322, compat_sys_openat) | ||
347 | __SYSCALL(323, sys_mkdirat) | ||
348 | __SYSCALL(324, sys_mknodat) | ||
349 | __SYSCALL(325, sys_fchownat) | ||
350 | __SYSCALL(326, compat_sys_futimesat) | ||
351 | __SYSCALL(327, sys_fstatat64) | ||
352 | __SYSCALL(328, sys_unlinkat) | ||
353 | __SYSCALL(329, sys_renameat) | ||
354 | __SYSCALL(330, sys_linkat) | ||
355 | __SYSCALL(331, sys_symlinkat) | ||
356 | __SYSCALL(332, sys_readlinkat) | ||
357 | __SYSCALL(333, sys_fchmodat) | ||
358 | __SYSCALL(334, sys_faccessat) | ||
359 | __SYSCALL(335, compat_sys_pselect6) | ||
360 | __SYSCALL(336, compat_sys_ppoll) | ||
361 | __SYSCALL(337, sys_unshare) | ||
362 | __SYSCALL(338, compat_sys_set_robust_list) | ||
363 | __SYSCALL(339, compat_sys_get_robust_list) | ||
364 | __SYSCALL(340, sys_splice) | ||
365 | __SYSCALL(341, compat_sys_sync_file_range2_wrapper) | ||
366 | __SYSCALL(342, sys_tee) | ||
367 | __SYSCALL(343, compat_sys_vmsplice) | ||
368 | __SYSCALL(344, compat_sys_move_pages) | ||
369 | __SYSCALL(345, sys_getcpu) | ||
370 | __SYSCALL(346, compat_sys_epoll_pwait) | ||
371 | __SYSCALL(347, compat_sys_kexec_load) | ||
372 | __SYSCALL(348, compat_sys_utimensat) | ||
373 | __SYSCALL(349, compat_sys_signalfd) | ||
374 | __SYSCALL(350, sys_timerfd_create) | ||
375 | __SYSCALL(351, sys_eventfd) | ||
376 | __SYSCALL(352, compat_sys_fallocate_wrapper) | ||
377 | __SYSCALL(353, compat_sys_timerfd_settime) | ||
378 | __SYSCALL(354, compat_sys_timerfd_gettime) | ||
379 | __SYSCALL(355, compat_sys_signalfd4) | ||
380 | __SYSCALL(356, sys_eventfd2) | ||
381 | __SYSCALL(357, sys_epoll_create1) | ||
382 | __SYSCALL(358, sys_dup3) | ||
383 | __SYSCALL(359, sys_pipe2) | ||
384 | __SYSCALL(360, sys_inotify_init1) | ||
385 | __SYSCALL(361, compat_sys_preadv) | ||
386 | __SYSCALL(362, compat_sys_pwritev) | ||
387 | __SYSCALL(363, compat_sys_rt_tgsigqueueinfo) | ||
388 | __SYSCALL(364, sys_perf_event_open) | ||
389 | __SYSCALL(365, compat_sys_recvmmsg) | ||
390 | __SYSCALL(366, sys_accept4) | ||
391 | __SYSCALL(367, sys_fanotify_init) | ||
392 | __SYSCALL(368, compat_sys_fanotify_mark_wrapper) | ||
393 | __SYSCALL(369, sys_prlimit64) | ||
394 | __SYSCALL(370, sys_name_to_handle_at) | ||
395 | __SYSCALL(371, sys_open_by_handle_at) | ||
396 | __SYSCALL(372, sys_clock_adjtime) | ||
397 | __SYSCALL(373, sys_syncfs) | ||
398 | |||
399 | #define __NR_compat_syscalls 374 | ||
400 | |||
24 | /* | 401 | /* |
25 | * This file contains the system call numbers. | 402 | * Compat syscall numbers used by the AArch64 kernel. |
26 | */ | 403 | */ |
404 | #define __NR_compat_restart_syscall 0 | ||
405 | #define __NR_compat_sigreturn 119 | ||
406 | #define __NR_compat_rt_sigreturn 173 | ||
27 | 407 | ||
28 | #ifdef __SYSCALL_COMPAT | ||
29 | |||
30 | #define __NR_restart_syscall 0 | ||
31 | __SYSCALL(__NR_restart_syscall, sys_restart_syscall) | ||
32 | #define __NR_exit 1 | ||
33 | __SYSCALL(__NR_exit, sys_exit) | ||
34 | #define __NR_fork 2 | ||
35 | __SYSCALL(__NR_fork, sys_fork) | ||
36 | #define __NR_read 3 | ||
37 | __SYSCALL(__NR_read, sys_read) | ||
38 | #define __NR_write 4 | ||
39 | __SYSCALL(__NR_write, sys_write) | ||
40 | #define __NR_open 5 | ||
41 | __SYSCALL(__NR_open, sys_open) | ||
42 | #define __NR_close 6 | ||
43 | __SYSCALL(__NR_close, sys_close) | ||
44 | __SYSCALL(7, sys_ni_syscall) /* 7 was sys_waitpid */ | ||
45 | #define __NR_creat 8 | ||
46 | __SYSCALL(__NR_creat, sys_creat) | ||
47 | #define __NR_link 9 | ||
48 | __SYSCALL(__NR_link, sys_link) | ||
49 | #define __NR_unlink 10 | ||
50 | __SYSCALL(__NR_unlink, sys_unlink) | ||
51 | #define __NR_execve 11 | ||
52 | __SYSCALL(__NR_execve, sys_execve) | ||
53 | #define __NR_chdir 12 | ||
54 | __SYSCALL(__NR_chdir, sys_chdir) | ||
55 | __SYSCALL(13, sys_ni_syscall) /* 13 was sys_time */ | ||
56 | #define __NR_mknod 14 | ||
57 | __SYSCALL(__NR_mknod, sys_mknod) | ||
58 | #define __NR_chmod 15 | ||
59 | __SYSCALL(__NR_chmod, sys_chmod) | ||
60 | #define __NR_lchown 16 | ||
61 | __SYSCALL(__NR_lchown, sys_lchown16) | ||
62 | __SYSCALL(17, sys_ni_syscall) /* 17 was sys_break */ | ||
63 | __SYSCALL(18, sys_ni_syscall) /* 18 was sys_stat */ | ||
64 | #define __NR_lseek 19 | ||
65 | __SYSCALL(__NR_lseek, sys_lseek) | ||
66 | #define __NR_getpid 20 | ||
67 | __SYSCALL(__NR_getpid, sys_getpid) | ||
68 | #define __NR_mount 21 | ||
69 | __SYSCALL(__NR_mount, sys_mount) | ||
70 | __SYSCALL(22, sys_ni_syscall) /* 22 was sys_umount */ | ||
71 | #define __NR_setuid 23 | ||
72 | __SYSCALL(__NR_setuid, sys_setuid16) | ||
73 | #define __NR_getuid 24 | ||
74 | __SYSCALL(__NR_getuid, sys_getuid16) | ||
75 | __SYSCALL(25, sys_ni_syscall) /* 25 was sys_stime */ | ||
76 | #define __NR_ptrace 26 | ||
77 | __SYSCALL(__NR_ptrace, sys_ptrace) | ||
78 | __SYSCALL(27, sys_ni_syscall) /* 27 was sys_alarm */ | ||
79 | __SYSCALL(28, sys_ni_syscall) /* 28 was sys_fstat */ | ||
80 | #define __NR_pause 29 | ||
81 | __SYSCALL(__NR_pause, sys_pause) | ||
82 | __SYSCALL(30, sys_ni_syscall) /* 30 was sys_utime */ | ||
83 | __SYSCALL(31, sys_ni_syscall) /* 31 was sys_stty */ | ||
84 | __SYSCALL(32, sys_ni_syscall) /* 32 was sys_gtty */ | ||
85 | #define __NR_access 33 | ||
86 | __SYSCALL(__NR_access, sys_access) | ||
87 | #define __NR_nice 34 | ||
88 | __SYSCALL(__NR_nice, sys_nice) | ||
89 | __SYSCALL(35, sys_ni_syscall) /* 35 was sys_ftime */ | ||
90 | #define __NR_sync 36 | ||
91 | __SYSCALL(__NR_sync, sys_sync) | ||
92 | #define __NR_kill 37 | ||
93 | __SYSCALL(__NR_kill, sys_kill) | ||
94 | #define __NR_rename 38 | ||
95 | __SYSCALL(__NR_rename, sys_rename) | ||
96 | #define __NR_mkdir 39 | ||
97 | __SYSCALL(__NR_mkdir, sys_mkdir) | ||
98 | #define __NR_rmdir 40 | ||
99 | __SYSCALL(__NR_rmdir, sys_rmdir) | ||
100 | #define __NR_dup 41 | ||
101 | __SYSCALL(__NR_dup, sys_dup) | ||
102 | #define __NR_pipe 42 | ||
103 | __SYSCALL(__NR_pipe, sys_pipe) | ||
104 | #define __NR_times 43 | ||
105 | __SYSCALL(__NR_times, sys_times) | ||
106 | __SYSCALL(44, sys_ni_syscall) /* 44 was sys_prof */ | ||
107 | #define __NR_brk 45 | ||
108 | __SYSCALL(__NR_brk, sys_brk) | ||
109 | #define __NR_setgid 46 | ||
110 | __SYSCALL(__NR_setgid, sys_setgid16) | ||
111 | #define __NR_getgid 47 | ||
112 | __SYSCALL(__NR_getgid, sys_getgid16) | ||
113 | __SYSCALL(48, sys_ni_syscall) /* 48 was sys_signal */ | ||
114 | #define __NR_geteuid 49 | ||
115 | __SYSCALL(__NR_geteuid, sys_geteuid16) | ||
116 | #define __NR_getegid 50 | ||
117 | __SYSCALL(__NR_getegid, sys_getegid16) | ||
118 | #define __NR_acct 51 | ||
119 | __SYSCALL(__NR_acct, sys_acct) | ||
120 | #define __NR_umount2 52 | ||
121 | __SYSCALL(__NR_umount2, sys_umount) | ||
122 | __SYSCALL(53, sys_ni_syscall) /* 53 was sys_lock */ | ||
123 | #define __NR_ioctl 54 | ||
124 | __SYSCALL(__NR_ioctl, sys_ioctl) | ||
125 | #define __NR_fcntl 55 | ||
126 | __SYSCALL(__NR_fcntl, sys_fcntl) | ||
127 | __SYSCALL(56, sys_ni_syscall) /* 56 was sys_mpx */ | ||
128 | #define __NR_setpgid 57 | ||
129 | __SYSCALL(__NR_setpgid, sys_setpgid) | ||
130 | __SYSCALL(58, sys_ni_syscall) /* 58 was sys_ulimit */ | ||
131 | __SYSCALL(59, sys_ni_syscall) /* 59 was sys_olduname */ | ||
132 | #define __NR_umask 60 | ||
133 | __SYSCALL(__NR_umask, sys_umask) | ||
134 | #define __NR_chroot 61 | ||
135 | __SYSCALL(__NR_chroot, sys_chroot) | ||
136 | #define __NR_ustat 62 | ||
137 | __SYSCALL(__NR_ustat, sys_ustat) | ||
138 | #define __NR_dup2 63 | ||
139 | __SYSCALL(__NR_dup2, sys_dup2) | ||
140 | #define __NR_getppid 64 | ||
141 | __SYSCALL(__NR_getppid, sys_getppid) | ||
142 | #define __NR_getpgrp 65 | ||
143 | __SYSCALL(__NR_getpgrp, sys_getpgrp) | ||
144 | #define __NR_setsid 66 | ||
145 | __SYSCALL(__NR_setsid, sys_setsid) | ||
146 | #define __NR_sigaction 67 | ||
147 | __SYSCALL(__NR_sigaction, sys_sigaction) | ||
148 | __SYSCALL(68, sys_ni_syscall) /* 68 was sys_sgetmask */ | ||
149 | __SYSCALL(69, sys_ni_syscall) /* 69 was sys_ssetmask */ | ||
150 | #define __NR_setreuid 70 | ||
151 | __SYSCALL(__NR_setreuid, sys_setreuid16) | ||
152 | #define __NR_setregid 71 | ||
153 | __SYSCALL(__NR_setregid, sys_setregid16) | ||
154 | #define __NR_sigsuspend 72 | ||
155 | __SYSCALL(__NR_sigsuspend, sys_sigsuspend) | ||
156 | #define __NR_sigpending 73 | ||
157 | __SYSCALL(__NR_sigpending, sys_sigpending) | ||
158 | #define __NR_sethostname 74 | ||
159 | __SYSCALL(__NR_sethostname, sys_sethostname) | ||
160 | #define __NR_setrlimit 75 | ||
161 | __SYSCALL(__NR_setrlimit, sys_setrlimit) | ||
162 | __SYSCALL(76, sys_ni_syscall) /* 76 was sys_getrlimit */ | ||
163 | #define __NR_getrusage 77 | ||
164 | __SYSCALL(__NR_getrusage, sys_getrusage) | ||
165 | #define __NR_gettimeofday 78 | ||
166 | __SYSCALL(__NR_gettimeofday, sys_gettimeofday) | ||
167 | #define __NR_settimeofday 79 | ||
168 | __SYSCALL(__NR_settimeofday, sys_settimeofday) | ||
169 | #define __NR_getgroups 80 | ||
170 | __SYSCALL(__NR_getgroups, sys_getgroups16) | ||
171 | #define __NR_setgroups 81 | ||
172 | __SYSCALL(__NR_setgroups, sys_setgroups16) | ||
173 | __SYSCALL(82, sys_ni_syscall) /* 82 was sys_select */ | ||
174 | #define __NR_symlink 83 | ||
175 | __SYSCALL(__NR_symlink, sys_symlink) | ||
176 | __SYSCALL(84, sys_ni_syscall) /* 84 was sys_lstat */ | ||
177 | #define __NR_readlink 85 | ||
178 | __SYSCALL(__NR_readlink, sys_readlink) | ||
179 | #define __NR_uselib 86 | ||
180 | __SYSCALL(__NR_uselib, sys_uselib) | ||
181 | #define __NR_swapon 87 | ||
182 | __SYSCALL(__NR_swapon, sys_swapon) | ||
183 | #define __NR_reboot 88 | ||
184 | __SYSCALL(__NR_reboot, sys_reboot) | ||
185 | __SYSCALL(89, sys_ni_syscall) /* 89 was sys_readdir */ | ||
186 | __SYSCALL(90, sys_ni_syscall) /* 90 was sys_mmap */ | ||
187 | #define __NR_munmap 91 | ||
188 | __SYSCALL(__NR_munmap, sys_munmap) | ||
189 | #define __NR_truncate 92 | ||
190 | __SYSCALL(__NR_truncate, sys_truncate) | ||
191 | #define __NR_ftruncate 93 | ||
192 | __SYSCALL(__NR_ftruncate, sys_ftruncate) | ||
193 | #define __NR_fchmod 94 | ||
194 | __SYSCALL(__NR_fchmod, sys_fchmod) | ||
195 | #define __NR_fchown 95 | ||
196 | __SYSCALL(__NR_fchown, sys_fchown16) | ||
197 | #define __NR_getpriority 96 | ||
198 | __SYSCALL(__NR_getpriority, sys_getpriority) | ||
199 | #define __NR_setpriority 97 | ||
200 | __SYSCALL(__NR_setpriority, sys_setpriority) | ||
201 | __SYSCALL(98, sys_ni_syscall) /* 98 was sys_profil */ | ||
202 | #define __NR_statfs 99 | ||
203 | __SYSCALL(__NR_statfs, sys_statfs) | ||
204 | #define __NR_fstatfs 100 | ||
205 | __SYSCALL(__NR_fstatfs, sys_fstatfs) | ||
206 | __SYSCALL(101, sys_ni_syscall) /* 101 was sys_ioperm */ | ||
207 | __SYSCALL(102, sys_ni_syscall) /* 102 was sys_socketcall */ | ||
208 | #define __NR_syslog 103 | ||
209 | __SYSCALL(__NR_syslog, sys_syslog) | ||
210 | #define __NR_setitimer 104 | ||
211 | __SYSCALL(__NR_setitimer, sys_setitimer) | ||
212 | #define __NR_getitimer 105 | ||
213 | __SYSCALL(__NR_getitimer, sys_getitimer) | ||
214 | #define __NR_stat 106 | ||
215 | __SYSCALL(__NR_stat, sys_newstat) | ||
216 | #define __NR_lstat 107 | ||
217 | __SYSCALL(__NR_lstat, sys_newlstat) | ||
218 | #define __NR_fstat 108 | ||
219 | __SYSCALL(__NR_fstat, sys_newfstat) | ||
220 | __SYSCALL(109, sys_ni_syscall) /* 109 was sys_uname */ | ||
221 | __SYSCALL(110, sys_ni_syscall) /* 110 was sys_iopl */ | ||
222 | #define __NR_vhangup 111 | ||
223 | __SYSCALL(__NR_vhangup, sys_vhangup) | ||
224 | __SYSCALL(112, sys_ni_syscall) /* 112 was sys_idle */ | ||
225 | __SYSCALL(113, sys_ni_syscall) /* 113 was sys_syscall */ | ||
226 | #define __NR_wait4 114 | ||
227 | __SYSCALL(__NR_wait4, sys_wait4) | ||
228 | #define __NR_swapoff 115 | ||
229 | __SYSCALL(__NR_swapoff, sys_swapoff) | ||
230 | #define __NR_sysinfo 116 | ||
231 | __SYSCALL(__NR_sysinfo, sys_sysinfo) | ||
232 | __SYSCALL(117, sys_ni_syscall) /* 117 was sys_ipc */ | ||
233 | #define __NR_fsync 118 | ||
234 | __SYSCALL(__NR_fsync, sys_fsync) | ||
235 | #define __NR_sigreturn 119 | ||
236 | __SYSCALL(__NR_sigreturn, sys_sigreturn) | ||
237 | #define __NR_clone 120 | ||
238 | __SYSCALL(__NR_clone, sys_clone) | ||
239 | #define __NR_setdomainname 121 | ||
240 | __SYSCALL(__NR_setdomainname, sys_setdomainname) | ||
241 | #define __NR_uname 122 | ||
242 | __SYSCALL(__NR_uname, sys_newuname) | ||
243 | __SYSCALL(123, sys_ni_syscall) /* 123 was sys_modify_ldt */ | ||
244 | #define __NR_adjtimex 124 | ||
245 | __SYSCALL(__NR_adjtimex, sys_adjtimex) | ||
246 | #define __NR_mprotect 125 | ||
247 | __SYSCALL(__NR_mprotect, sys_mprotect) | ||
248 | #define __NR_sigprocmask 126 | ||
249 | __SYSCALL(__NR_sigprocmask, sys_sigprocmask) | ||
250 | __SYSCALL(127, sys_ni_syscall) /* 127 was sys_create_module */ | ||
251 | #define __NR_init_module 128 | ||
252 | __SYSCALL(__NR_init_module, sys_init_module) | ||
253 | #define __NR_delete_module 129 | ||
254 | __SYSCALL(__NR_delete_module, sys_delete_module) | ||
255 | __SYSCALL(130, sys_ni_syscall) /* 130 was sys_get_kernel_syms */ | ||
256 | #define __NR_quotactl 131 | ||
257 | __SYSCALL(__NR_quotactl, sys_quotactl) | ||
258 | #define __NR_getpgid 132 | ||
259 | __SYSCALL(__NR_getpgid, sys_getpgid) | ||
260 | #define __NR_fchdir 133 | ||
261 | __SYSCALL(__NR_fchdir, sys_fchdir) | ||
262 | #define __NR_bdflush 134 | ||
263 | __SYSCALL(__NR_bdflush, sys_bdflush) | ||
264 | #define __NR_sysfs 135 | ||
265 | __SYSCALL(__NR_sysfs, sys_sysfs) | ||
266 | #define __NR_personality 136 | ||
267 | __SYSCALL(__NR_personality, sys_personality) | ||
268 | __SYSCALL(137, sys_ni_syscall) /* 137 was sys_afs_syscall */ | ||
269 | #define __NR_setfsuid 138 | ||
270 | __SYSCALL(__NR_setfsuid, sys_setfsuid16) | ||
271 | #define __NR_setfsgid 139 | ||
272 | __SYSCALL(__NR_setfsgid, sys_setfsgid16) | ||
273 | #define __NR__llseek 140 | ||
274 | __SYSCALL(__NR__llseek, sys_llseek) | ||
275 | #define __NR_getdents 141 | ||
276 | __SYSCALL(__NR_getdents, sys_getdents) | ||
277 | #define __NR__newselect 142 | ||
278 | __SYSCALL(__NR__newselect, sys_select) | ||
279 | #define __NR_flock 143 | ||
280 | __SYSCALL(__NR_flock, sys_flock) | ||
281 | #define __NR_msync 144 | ||
282 | __SYSCALL(__NR_msync, sys_msync) | ||
283 | #define __NR_readv 145 | ||
284 | __SYSCALL(__NR_readv, sys_readv) | ||
285 | #define __NR_writev 146 | ||
286 | __SYSCALL(__NR_writev, sys_writev) | ||
287 | #define __NR_getsid 147 | ||
288 | __SYSCALL(__NR_getsid, sys_getsid) | ||
289 | #define __NR_fdatasync 148 | ||
290 | __SYSCALL(__NR_fdatasync, sys_fdatasync) | ||
291 | #define __NR__sysctl 149 | ||
292 | __SYSCALL(__NR__sysctl, sys_sysctl) | ||
293 | #define __NR_mlock 150 | ||
294 | __SYSCALL(__NR_mlock, sys_mlock) | ||
295 | #define __NR_munlock 151 | ||
296 | __SYSCALL(__NR_munlock, sys_munlock) | ||
297 | #define __NR_mlockall 152 | ||
298 | __SYSCALL(__NR_mlockall, sys_mlockall) | ||
299 | #define __NR_munlockall 153 | ||
300 | __SYSCALL(__NR_munlockall, sys_munlockall) | ||
301 | #define __NR_sched_setparam 154 | ||
302 | __SYSCALL(__NR_sched_setparam, sys_sched_setparam) | ||
303 | #define __NR_sched_getparam 155 | ||
304 | __SYSCALL(__NR_sched_getparam, sys_sched_getparam) | ||
305 | #define __NR_sched_setscheduler 156 | ||
306 | __SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler) | ||
307 | #define __NR_sched_getscheduler 157 | ||
308 | __SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler) | ||
309 | #define __NR_sched_yield 158 | ||
310 | __SYSCALL(__NR_sched_yield, sys_sched_yield) | ||
311 | #define __NR_sched_get_priority_max 159 | ||
312 | __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) | ||
313 | #define __NR_sched_get_priority_min 160 | ||
314 | __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) | ||
315 | #define __NR_sched_rr_get_interval 161 | ||
316 | __SYSCALL(__NR_sched_rr_get_interval, sys_sched_rr_get_interval) | ||
317 | #define __NR_nanosleep 162 | ||
318 | __SYSCALL(__NR_nanosleep, sys_nanosleep) | ||
319 | #define __NR_mremap 163 | ||
320 | __SYSCALL(__NR_mremap, sys_mremap) | ||
321 | #define __NR_setresuid 164 | ||
322 | __SYSCALL(__NR_setresuid, sys_setresuid16) | ||
323 | #define __NR_getresuid 165 | ||
324 | __SYSCALL(__NR_getresuid, sys_getresuid16) | ||
325 | __SYSCALL(166, sys_ni_syscall) /* 166 was sys_vm86 */ | ||
326 | __SYSCALL(167, sys_ni_syscall) /* 167 was sys_query_module */ | ||
327 | #define __NR_poll 168 | ||
328 | __SYSCALL(__NR_poll, sys_poll) | ||
329 | #define __NR_nfsservctl 169 | ||
330 | __SYSCALL(__NR_nfsservctl, sys_ni_syscall) | ||
331 | #define __NR_setresgid 170 | ||
332 | __SYSCALL(__NR_setresgid, sys_setresgid16) | ||
333 | #define __NR_getresgid 171 | ||
334 | __SYSCALL(__NR_getresgid, sys_getresgid16) | ||
335 | #define __NR_prctl 172 | ||
336 | __SYSCALL(__NR_prctl, sys_prctl) | ||
337 | #define __NR_rt_sigreturn 173 | ||
338 | __SYSCALL(__NR_rt_sigreturn, sys_rt_sigreturn) | ||
339 | #define __NR_rt_sigaction 174 | ||
340 | __SYSCALL(__NR_rt_sigaction, sys_rt_sigaction) | ||
341 | #define __NR_rt_sigprocmask 175 | ||
342 | __SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask) | ||
343 | #define __NR_rt_sigpending 176 | ||
344 | __SYSCALL(__NR_rt_sigpending, sys_rt_sigpending) | ||
345 | #define __NR_rt_sigtimedwait 177 | ||
346 | __SYSCALL(__NR_rt_sigtimedwait, sys_rt_sigtimedwait) | ||
347 | #define __NR_rt_sigqueueinfo 178 | ||
348 | __SYSCALL(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo) | ||
349 | #define __NR_rt_sigsuspend 179 | ||
350 | __SYSCALL(__NR_rt_sigsuspend, sys_rt_sigsuspend) | ||
351 | #define __NR_pread64 180 | ||
352 | __SYSCALL(__NR_pread64, sys_pread64) | ||
353 | #define __NR_pwrite64 181 | ||
354 | __SYSCALL(__NR_pwrite64, sys_pwrite64) | ||
355 | #define __NR_chown 182 | ||
356 | __SYSCALL(__NR_chown, sys_chown16) | ||
357 | #define __NR_getcwd 183 | ||
358 | __SYSCALL(__NR_getcwd, sys_getcwd) | ||
359 | #define __NR_capget 184 | ||
360 | __SYSCALL(__NR_capget, sys_capget) | ||
361 | #define __NR_capset 185 | ||
362 | __SYSCALL(__NR_capset, sys_capset) | ||
363 | #define __NR_sigaltstack 186 | ||
364 | __SYSCALL(__NR_sigaltstack, sys_sigaltstack) | ||
365 | #define __NR_sendfile 187 | ||
366 | __SYSCALL(__NR_sendfile, sys_sendfile) | ||
367 | __SYSCALL(188, sys_ni_syscall) /* 188 reserved */ | ||
368 | __SYSCALL(189, sys_ni_syscall) /* 189 reserved */ | ||
369 | #define __NR_vfork 190 | ||
370 | __SYSCALL(__NR_vfork, sys_vfork) | ||
371 | #define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ | ||
372 | __SYSCALL(__NR_ugetrlimit, sys_getrlimit) | ||
373 | #define __NR_mmap2 192 | ||
374 | __SYSCALL(__NR_mmap2, sys_mmap2) | ||
375 | #define __NR_truncate64 193 | ||
376 | __SYSCALL(__NR_truncate64, sys_truncate64) | ||
377 | #define __NR_ftruncate64 194 | ||
378 | __SYSCALL(__NR_ftruncate64, sys_ftruncate64) | ||
379 | #define __NR_stat64 195 | ||
380 | __SYSCALL(__NR_stat64, sys_stat64) | ||
381 | #define __NR_lstat64 196 | ||
382 | __SYSCALL(__NR_lstat64, sys_lstat64) | ||
383 | #define __NR_fstat64 197 | ||
384 | __SYSCALL(__NR_fstat64, sys_fstat64) | ||
385 | #define __NR_lchown32 198 | ||
386 | __SYSCALL(__NR_lchown32, sys_lchown) | ||
387 | #define __NR_getuid32 199 | ||
388 | __SYSCALL(__NR_getuid32, sys_getuid) | ||
389 | #define __NR_getgid32 200 | ||
390 | __SYSCALL(__NR_getgid32, sys_getgid) | ||
391 | #define __NR_geteuid32 201 | ||
392 | __SYSCALL(__NR_geteuid32, sys_geteuid) | ||
393 | #define __NR_getegid32 202 | ||
394 | __SYSCALL(__NR_getegid32, sys_getegid) | ||
395 | #define __NR_setreuid32 203 | ||
396 | __SYSCALL(__NR_setreuid32, sys_setreuid) | ||
397 | #define __NR_setregid32 204 | ||
398 | __SYSCALL(__NR_setregid32, sys_setregid) | ||
399 | #define __NR_getgroups32 205 | ||
400 | __SYSCALL(__NR_getgroups32, sys_getgroups) | ||
401 | #define __NR_setgroups32 206 | ||
402 | __SYSCALL(__NR_setgroups32, sys_setgroups) | ||
403 | #define __NR_fchown32 207 | ||
404 | __SYSCALL(__NR_fchown32, sys_fchown) | ||
405 | #define __NR_setresuid32 208 | ||
406 | __SYSCALL(__NR_setresuid32, sys_setresuid) | ||
407 | #define __NR_getresuid32 209 | ||
408 | __SYSCALL(__NR_getresuid32, sys_getresuid) | ||
409 | #define __NR_setresgid32 210 | ||
410 | __SYSCALL(__NR_setresgid32, sys_setresgid) | ||
411 | #define __NR_getresgid32 211 | ||
412 | __SYSCALL(__NR_getresgid32, sys_getresgid) | ||
413 | #define __NR_chown32 212 | ||
414 | __SYSCALL(__NR_chown32, sys_chown) | ||
415 | #define __NR_setuid32 213 | ||
416 | __SYSCALL(__NR_setuid32, sys_setuid) | ||
417 | #define __NR_setgid32 214 | ||
418 | __SYSCALL(__NR_setgid32, sys_setgid) | ||
419 | #define __NR_setfsuid32 215 | ||
420 | __SYSCALL(__NR_setfsuid32, sys_setfsuid) | ||
421 | #define __NR_setfsgid32 216 | ||
422 | __SYSCALL(__NR_setfsgid32, sys_setfsgid) | ||
423 | #define __NR_getdents64 217 | ||
424 | __SYSCALL(__NR_getdents64, sys_getdents64) | ||
425 | #define __NR_pivot_root 218 | ||
426 | __SYSCALL(__NR_pivot_root, sys_pivot_root) | ||
427 | #define __NR_mincore 219 | ||
428 | __SYSCALL(__NR_mincore, sys_mincore) | ||
429 | #define __NR_madvise 220 | ||
430 | __SYSCALL(__NR_madvise, sys_madvise) | ||
431 | #define __NR_fcntl64 221 | ||
432 | __SYSCALL(__NR_fcntl64, sys_fcntl64) | ||
433 | __SYSCALL(222, sys_ni_syscall) /* 222 for tux */ | ||
434 | __SYSCALL(223, sys_ni_syscall) /* 223 is unused */ | ||
435 | #define __NR_gettid 224 | ||
436 | __SYSCALL(__NR_gettid, sys_gettid) | ||
437 | #define __NR_readahead 225 | ||
438 | __SYSCALL(__NR_readahead, sys_readahead) | ||
439 | #define __NR_setxattr 226 | ||
440 | __SYSCALL(__NR_setxattr, sys_setxattr) | ||
441 | #define __NR_lsetxattr 227 | ||
442 | __SYSCALL(__NR_lsetxattr, sys_lsetxattr) | ||
443 | #define __NR_fsetxattr 228 | ||
444 | __SYSCALL(__NR_fsetxattr, sys_fsetxattr) | ||
445 | #define __NR_getxattr 229 | ||
446 | __SYSCALL(__NR_getxattr, sys_getxattr) | ||
447 | #define __NR_lgetxattr 230 | ||
448 | __SYSCALL(__NR_lgetxattr, sys_lgetxattr) | ||
449 | #define __NR_fgetxattr 231 | ||
450 | __SYSCALL(__NR_fgetxattr, sys_fgetxattr) | ||
451 | #define __NR_listxattr 232 | ||
452 | __SYSCALL(__NR_listxattr, sys_listxattr) | ||
453 | #define __NR_llistxattr 233 | ||
454 | __SYSCALL(__NR_llistxattr, sys_llistxattr) | ||
455 | #define __NR_flistxattr 234 | ||
456 | __SYSCALL(__NR_flistxattr, sys_flistxattr) | ||
457 | #define __NR_removexattr 235 | ||
458 | __SYSCALL(__NR_removexattr, sys_removexattr) | ||
459 | #define __NR_lremovexattr 236 | ||
460 | __SYSCALL(__NR_lremovexattr, sys_lremovexattr) | ||
461 | #define __NR_fremovexattr 237 | ||
462 | __SYSCALL(__NR_fremovexattr, sys_fremovexattr) | ||
463 | #define __NR_tkill 238 | ||
464 | __SYSCALL(__NR_tkill, sys_tkill) | ||
465 | #define __NR_sendfile64 239 | ||
466 | __SYSCALL(__NR_sendfile64, sys_sendfile64) | ||
467 | #define __NR_futex 240 | ||
468 | __SYSCALL(__NR_futex, sys_futex) | ||
469 | #define __NR_sched_setaffinity 241 | ||
470 | __SYSCALL(__NR_sched_setaffinity, sys_sched_setaffinity) | ||
471 | #define __NR_sched_getaffinity 242 | ||
472 | __SYSCALL(__NR_sched_getaffinity, sys_sched_getaffinity) | ||
473 | #define __NR_io_setup 243 | ||
474 | __SYSCALL(__NR_io_setup, sys_io_setup) | ||
475 | #define __NR_io_destroy 244 | ||
476 | __SYSCALL(__NR_io_destroy, sys_io_destroy) | ||
477 | #define __NR_io_getevents 245 | ||
478 | __SYSCALL(__NR_io_getevents, sys_io_getevents) | ||
479 | #define __NR_io_submit 246 | ||
480 | __SYSCALL(__NR_io_submit, sys_io_submit) | ||
481 | #define __NR_io_cancel 247 | ||
482 | __SYSCALL(__NR_io_cancel, sys_io_cancel) | ||
483 | #define __NR_exit_group 248 | ||
484 | __SYSCALL(__NR_exit_group, sys_exit_group) | ||
485 | #define __NR_lookup_dcookie 249 | ||
486 | __SYSCALL(__NR_lookup_dcookie, sys_lookup_dcookie) | ||
487 | #define __NR_epoll_create 250 | ||
488 | __SYSCALL(__NR_epoll_create, sys_epoll_create) | ||
489 | #define __NR_epoll_ctl 251 | ||
490 | __SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) | ||
491 | #define __NR_epoll_wait 252 | ||
492 | __SYSCALL(__NR_epoll_wait, sys_epoll_wait) | ||
493 | #define __NR_remap_file_pages 253 | ||
494 | __SYSCALL(__NR_remap_file_pages, sys_remap_file_pages) | ||
495 | __SYSCALL(254, sys_ni_syscall) /* 254 for set_thread_area */ | ||
496 | __SYSCALL(255, sys_ni_syscall) /* 255 for get_thread_area */ | ||
497 | #define __NR_set_tid_address 256 | ||
498 | __SYSCALL(__NR_set_tid_address, sys_set_tid_address) | ||
499 | #define __NR_timer_create 257 | ||
500 | __SYSCALL(__NR_timer_create, sys_timer_create) | ||
501 | #define __NR_timer_settime 258 | ||
502 | __SYSCALL(__NR_timer_settime, sys_timer_settime) | ||
503 | #define __NR_timer_gettime 259 | ||
504 | __SYSCALL(__NR_timer_gettime, sys_timer_gettime) | ||
505 | #define __NR_timer_getoverrun 260 | ||
506 | __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) | ||
507 | #define __NR_timer_delete 261 | ||
508 | __SYSCALL(__NR_timer_delete, sys_timer_delete) | ||
509 | #define __NR_clock_settime 262 | ||
510 | __SYSCALL(__NR_clock_settime, sys_clock_settime) | ||
511 | #define __NR_clock_gettime 263 | ||
512 | __SYSCALL(__NR_clock_gettime, sys_clock_gettime) | ||
513 | #define __NR_clock_getres 264 | ||
514 | __SYSCALL(__NR_clock_getres, sys_clock_getres) | ||
515 | #define __NR_clock_nanosleep 265 | ||
516 | __SYSCALL(__NR_clock_nanosleep, sys_clock_nanosleep) | ||
517 | #define __NR_statfs64 266 | ||
518 | __SYSCALL(__NR_statfs64, sys_statfs64) | ||
519 | #define __NR_fstatfs64 267 | ||
520 | __SYSCALL(__NR_fstatfs64, sys_fstatfs64) | ||
521 | #define __NR_tgkill 268 | ||
522 | __SYSCALL(__NR_tgkill, sys_tgkill) | ||
523 | #define __NR_utimes 269 | ||
524 | __SYSCALL(__NR_utimes, sys_utimes) | ||
525 | #define __NR_fadvise64 270 | ||
526 | __SYSCALL(__NR_fadvise64, sys_fadvise64_64) | ||
527 | #define __NR_pciconfig_iobase 271 | ||
528 | __SYSCALL(__NR_pciconfig_iobase, sys_pciconfig_iobase) | ||
529 | #define __NR_pciconfig_read 272 | ||
530 | __SYSCALL(__NR_pciconfig_read, sys_pciconfig_read) | ||
531 | #define __NR_pciconfig_write 273 | ||
532 | __SYSCALL(__NR_pciconfig_write, sys_pciconfig_write) | ||
533 | #define __NR_mq_open 274 | ||
534 | __SYSCALL(__NR_mq_open, sys_mq_open) | ||
535 | #define __NR_mq_unlink 275 | ||
536 | __SYSCALL(__NR_mq_unlink, sys_mq_unlink) | ||
537 | #define __NR_mq_timedsend 276 | ||
538 | __SYSCALL(__NR_mq_timedsend, sys_mq_timedsend) | ||
539 | #define __NR_mq_timedreceive 277 | ||
540 | __SYSCALL(__NR_mq_timedreceive, sys_mq_timedreceive) | ||
541 | #define __NR_mq_notify 278 | ||
542 | __SYSCALL(__NR_mq_notify, sys_mq_notify) | ||
543 | #define __NR_mq_getsetattr 279 | ||
544 | __SYSCALL(__NR_mq_getsetattr, sys_mq_getsetattr) | ||
545 | #define __NR_waitid 280 | ||
546 | __SYSCALL(__NR_waitid, sys_waitid) | ||
547 | #define __NR_socket 281 | ||
548 | __SYSCALL(__NR_socket, sys_socket) | ||
549 | #define __NR_bind 282 | ||
550 | __SYSCALL(__NR_bind, sys_bind) | ||
551 | #define __NR_connect 283 | ||
552 | __SYSCALL(__NR_connect, sys_connect) | ||
553 | #define __NR_listen 284 | ||
554 | __SYSCALL(__NR_listen, sys_listen) | ||
555 | #define __NR_accept 285 | ||
556 | __SYSCALL(__NR_accept, sys_accept) | ||
557 | #define __NR_getsockname 286 | ||
558 | __SYSCALL(__NR_getsockname, sys_getsockname) | ||
559 | #define __NR_getpeername 287 | ||
560 | __SYSCALL(__NR_getpeername, sys_getpeername) | ||
561 | #define __NR_socketpair 288 | ||
562 | __SYSCALL(__NR_socketpair, sys_socketpair) | ||
563 | #define __NR_send 289 | ||
564 | __SYSCALL(__NR_send, sys_send) | ||
565 | #define __NR_sendto 290 | ||
566 | __SYSCALL(__NR_sendto, sys_sendto) | ||
567 | #define __NR_recv 291 | ||
568 | __SYSCALL(__NR_recv, sys_recv) | ||
569 | #define __NR_recvfrom 292 | ||
570 | __SYSCALL(__NR_recvfrom, sys_recvfrom) | ||
571 | #define __NR_shutdown 293 | ||
572 | __SYSCALL(__NR_shutdown, sys_shutdown) | ||
573 | #define __NR_setsockopt 294 | ||
574 | __SYSCALL(__NR_setsockopt, sys_setsockopt) | ||
575 | #define __NR_getsockopt 295 | ||
576 | __SYSCALL(__NR_getsockopt, sys_getsockopt) | ||
577 | #define __NR_sendmsg 296 | ||
578 | __SYSCALL(__NR_sendmsg, sys_sendmsg) | ||
579 | #define __NR_recvmsg 297 | ||
580 | __SYSCALL(__NR_recvmsg, sys_recvmsg) | ||
581 | #define __NR_semop 298 | ||
582 | __SYSCALL(__NR_semop, sys_semop) | ||
583 | #define __NR_semget 299 | ||
584 | __SYSCALL(__NR_semget, sys_semget) | ||
585 | #define __NR_semctl 300 | ||
586 | __SYSCALL(__NR_semctl, sys_semctl) | ||
587 | #define __NR_msgsnd 301 | ||
588 | __SYSCALL(__NR_msgsnd, sys_msgsnd) | ||
589 | #define __NR_msgrcv 302 | ||
590 | __SYSCALL(__NR_msgrcv, sys_msgrcv) | ||
591 | #define __NR_msgget 303 | ||
592 | __SYSCALL(__NR_msgget, sys_msgget) | ||
593 | #define __NR_msgctl 304 | ||
594 | __SYSCALL(__NR_msgctl, sys_msgctl) | ||
595 | #define __NR_shmat 305 | ||
596 | __SYSCALL(__NR_shmat, sys_shmat) | ||
597 | #define __NR_shmdt 306 | ||
598 | __SYSCALL(__NR_shmdt, sys_shmdt) | ||
599 | #define __NR_shmget 307 | ||
600 | __SYSCALL(__NR_shmget, sys_shmget) | ||
601 | #define __NR_shmctl 308 | ||
602 | __SYSCALL(__NR_shmctl, sys_shmctl) | ||
603 | #define __NR_add_key 309 | ||
604 | __SYSCALL(__NR_add_key, sys_add_key) | ||
605 | #define __NR_request_key 310 | ||
606 | __SYSCALL(__NR_request_key, sys_request_key) | ||
607 | #define __NR_keyctl 311 | ||
608 | __SYSCALL(__NR_keyctl, sys_keyctl) | ||
609 | #define __NR_semtimedop 312 | ||
610 | __SYSCALL(__NR_semtimedop, sys_semtimedop) | ||
611 | #define __NR_vserver 313 | ||
612 | __SYSCALL(__NR_vserver, sys_ni_syscall) | ||
613 | #define __NR_ioprio_set 314 | ||
614 | __SYSCALL(__NR_ioprio_set, sys_ioprio_set) | ||
615 | #define __NR_ioprio_get 315 | ||
616 | __SYSCALL(__NR_ioprio_get, sys_ioprio_get) | ||
617 | #define __NR_inotify_init 316 | ||
618 | __SYSCALL(__NR_inotify_init, sys_inotify_init) | ||
619 | #define __NR_inotify_add_watch 317 | ||
620 | __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) | ||
621 | #define __NR_inotify_rm_watch 318 | ||
622 | __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) | ||
623 | #define __NR_mbind 319 | ||
624 | __SYSCALL(__NR_mbind, sys_mbind) | ||
625 | #define __NR_get_mempolicy 320 | ||
626 | __SYSCALL(__NR_get_mempolicy, sys_get_mempolicy) | ||
627 | #define __NR_set_mempolicy 321 | ||
628 | __SYSCALL(__NR_set_mempolicy, sys_set_mempolicy) | ||
629 | #define __NR_openat 322 | ||
630 | __SYSCALL(__NR_openat, sys_openat) | ||
631 | #define __NR_mkdirat 323 | ||
632 | __SYSCALL(__NR_mkdirat, sys_mkdirat) | ||
633 | #define __NR_mknodat 324 | ||
634 | __SYSCALL(__NR_mknodat, sys_mknodat) | ||
635 | #define __NR_fchownat 325 | ||
636 | __SYSCALL(__NR_fchownat, sys_fchownat) | ||
637 | #define __NR_futimesat 326 | ||
638 | __SYSCALL(__NR_futimesat, sys_futimesat) | ||
639 | #define __NR_fstatat64 327 | ||
640 | __SYSCALL(__NR_fstatat64, sys_fstatat64) | ||
641 | #define __NR_unlinkat 328 | ||
642 | __SYSCALL(__NR_unlinkat, sys_unlinkat) | ||
643 | #define __NR_renameat 329 | ||
644 | __SYSCALL(__NR_renameat, sys_renameat) | ||
645 | #define __NR_linkat 330 | ||
646 | __SYSCALL(__NR_linkat, sys_linkat) | ||
647 | #define __NR_symlinkat 331 | ||
648 | __SYSCALL(__NR_symlinkat, sys_symlinkat) | ||
649 | #define __NR_readlinkat 332 | ||
650 | __SYSCALL(__NR_readlinkat, sys_readlinkat) | ||
651 | #define __NR_fchmodat 333 | ||
652 | __SYSCALL(__NR_fchmodat, sys_fchmodat) | ||
653 | #define __NR_faccessat 334 | ||
654 | __SYSCALL(__NR_faccessat, sys_faccessat) | ||
655 | #define __NR_pselect6 335 | ||
656 | __SYSCALL(__NR_pselect6, sys_pselect6) | ||
657 | #define __NR_ppoll 336 | ||
658 | __SYSCALL(__NR_ppoll, sys_ppoll) | ||
659 | #define __NR_unshare 337 | ||
660 | __SYSCALL(__NR_unshare, sys_unshare) | ||
661 | #define __NR_set_robust_list 338 | ||
662 | __SYSCALL(__NR_set_robust_list, sys_set_robust_list) | ||
663 | #define __NR_get_robust_list 339 | ||
664 | __SYSCALL(__NR_get_robust_list, sys_get_robust_list) | ||
665 | #define __NR_splice 340 | ||
666 | __SYSCALL(__NR_splice, sys_splice) | ||
667 | #define __NR_sync_file_range2 341 | ||
668 | __SYSCALL(__NR_sync_file_range2, sys_sync_file_range2) | ||
669 | #define __NR_tee 342 | ||
670 | __SYSCALL(__NR_tee, sys_tee) | ||
671 | #define __NR_vmsplice 343 | ||
672 | __SYSCALL(__NR_vmsplice, sys_vmsplice) | ||
673 | #define __NR_move_pages 344 | ||
674 | __SYSCALL(__NR_move_pages, sys_move_pages) | ||
675 | #define __NR_getcpu 345 | ||
676 | __SYSCALL(__NR_getcpu, sys_getcpu) | ||
677 | #define __NR_epoll_pwait 346 | ||
678 | __SYSCALL(__NR_epoll_pwait, sys_epoll_pwait) | ||
679 | #define __NR_kexec_load 347 | ||
680 | __SYSCALL(__NR_kexec_load, sys_kexec_load) | ||
681 | #define __NR_utimensat 348 | ||
682 | __SYSCALL(__NR_utimensat, sys_utimensat) | ||
683 | #define __NR_signalfd 349 | ||
684 | __SYSCALL(__NR_signalfd, sys_signalfd) | ||
685 | #define __NR_timerfd_create 350 | ||
686 | __SYSCALL(__NR_timerfd_create, sys_timerfd_create) | ||
687 | #define __NR_eventfd 351 | ||
688 | __SYSCALL(__NR_eventfd, sys_eventfd) | ||
689 | #define __NR_fallocate 352 | ||
690 | __SYSCALL(__NR_fallocate, sys_fallocate) | ||
691 | #define __NR_timerfd_settime 353 | ||
692 | __SYSCALL(__NR_timerfd_settime, sys_timerfd_settime) | ||
693 | #define __NR_timerfd_gettime 354 | ||
694 | __SYSCALL(__NR_timerfd_gettime, sys_timerfd_gettime) | ||
695 | #define __NR_signalfd4 355 | ||
696 | __SYSCALL(__NR_signalfd4, sys_signalfd4) | ||
697 | #define __NR_eventfd2 356 | ||
698 | __SYSCALL(__NR_eventfd2, sys_eventfd2) | ||
699 | #define __NR_epoll_create1 357 | ||
700 | __SYSCALL(__NR_epoll_create1, sys_epoll_create1) | ||
701 | #define __NR_dup3 358 | ||
702 | __SYSCALL(__NR_dup3, sys_dup3) | ||
703 | #define __NR_pipe2 359 | ||
704 | __SYSCALL(__NR_pipe2, sys_pipe2) | ||
705 | #define __NR_inotify_init1 360 | ||
706 | __SYSCALL(__NR_inotify_init1, sys_inotify_init1) | ||
707 | #define __NR_preadv 361 | ||
708 | __SYSCALL(__NR_preadv, sys_preadv) | ||
709 | #define __NR_pwritev 362 | ||
710 | __SYSCALL(__NR_pwritev, sys_pwritev) | ||
711 | #define __NR_rt_tgsigqueueinfo 363 | ||
712 | __SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo) | ||
713 | #define __NR_perf_event_open 364 | ||
714 | __SYSCALL(__NR_perf_event_open, sys_perf_event_open) | ||
715 | #define __NR_recvmmsg 365 | ||
716 | __SYSCALL(__NR_recvmmsg, sys_recvmmsg) | ||
717 | #define __NR_accept4 366 | ||
718 | __SYSCALL(__NR_accept4, sys_accept4) | ||
719 | #define __NR_fanotify_init 367 | ||
720 | __SYSCALL(__NR_fanotify_init, sys_fanotify_init) | ||
721 | #define __NR_fanotify_mark 368 | ||
722 | __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) | ||
723 | #define __NR_prlimit64 369 | ||
724 | __SYSCALL(__NR_prlimit64, sys_prlimit64) | ||
725 | #define __NR_name_to_handle_at 370 | ||
726 | __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) | ||
727 | #define __NR_open_by_handle_at 371 | ||
728 | __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) | ||
729 | #define __NR_clock_adjtime 372 | ||
730 | __SYSCALL(__NR_clock_adjtime, sys_clock_adjtime) | ||
731 | #define __NR_syncfs 373 | ||
732 | __SYSCALL(__NR_syncfs, sys_syncfs) | ||
733 | 408 | ||
734 | /* | 409 | /* |
735 | * The following SVCs are ARM private. | 410 | * The following SVCs are ARM private. |
@@ -737,19 +412,3 @@ __SYSCALL(__NR_syncfs, sys_syncfs) | |||
737 | #define __ARM_NR_COMPAT_BASE 0x0f0000 | 412 | #define __ARM_NR_COMPAT_BASE 0x0f0000 |
738 | #define __ARM_NR_compat_cacheflush (__ARM_NR_COMPAT_BASE+2) | 413 | #define __ARM_NR_compat_cacheflush (__ARM_NR_COMPAT_BASE+2) |
739 | #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE+5) | 414 | #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE+5) |
740 | |||
741 | #endif /* __SYSCALL_COMPAT */ | ||
742 | |||
743 | #define __NR_compat_syscalls 374 | ||
744 | |||
745 | #define __ARCH_WANT_COMPAT_IPC_PARSE_VERSION | ||
746 | #define __ARCH_WANT_COMPAT_STAT64 | ||
747 | #define __ARCH_WANT_SYS_GETHOSTNAME | ||
748 | #define __ARCH_WANT_SYS_PAUSE | ||
749 | #define __ARCH_WANT_SYS_GETPGRP | ||
750 | #define __ARCH_WANT_SYS_LLSEEK | ||
751 | #define __ARCH_WANT_SYS_NICE | ||
752 | #define __ARCH_WANT_SYS_SIGPENDING | ||
753 | #define __ARCH_WANT_SYS_SIGPROCMASK | ||
754 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | ||
755 | #define __ARCH_WANT_COMPAT_SYS_SENDFILE | ||
diff --git a/arch/arm64/include/uapi/asm/Kbuild b/arch/arm64/include/uapi/asm/Kbuild index baebb3da1d4..ca5b65f75c7 100644 --- a/arch/arm64/include/uapi/asm/Kbuild +++ b/arch/arm64/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,17 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += auxvec.h | ||
5 | header-y += bitsperlong.h | ||
6 | header-y += byteorder.h | ||
7 | header-y += fcntl.h | ||
8 | header-y += hwcap.h | ||
9 | header-y += param.h | ||
10 | header-y += ptrace.h | ||
11 | header-y += setup.h | ||
12 | header-y += sigcontext.h | ||
13 | header-y += siginfo.h | ||
14 | header-y += signal.h | ||
15 | header-y += stat.h | ||
16 | header-y += statfs.h | ||
17 | header-y += unistd.h | ||
diff --git a/arch/arm64/include/asm/auxvec.h b/arch/arm64/include/uapi/asm/auxvec.h index 22d6d888585..22d6d888585 100644 --- a/arch/arm64/include/asm/auxvec.h +++ b/arch/arm64/include/uapi/asm/auxvec.h | |||
diff --git a/arch/arm64/include/asm/bitsperlong.h b/arch/arm64/include/uapi/asm/bitsperlong.h index fce9c2924fa..fce9c2924fa 100644 --- a/arch/arm64/include/asm/bitsperlong.h +++ b/arch/arm64/include/uapi/asm/bitsperlong.h | |||
diff --git a/arch/arm64/include/asm/byteorder.h b/arch/arm64/include/uapi/asm/byteorder.h index 2b92046aafc..2b92046aafc 100644 --- a/arch/arm64/include/asm/byteorder.h +++ b/arch/arm64/include/uapi/asm/byteorder.h | |||
diff --git a/arch/arm64/include/asm/fcntl.h b/arch/arm64/include/uapi/asm/fcntl.h index cd2e630c235..cd2e630c235 100644 --- a/arch/arm64/include/asm/fcntl.h +++ b/arch/arm64/include/uapi/asm/fcntl.h | |||
diff --git a/arch/arm64/include/uapi/asm/hwcap.h b/arch/arm64/include/uapi/asm/hwcap.h new file mode 100644 index 00000000000..eea497578b8 --- /dev/null +++ b/arch/arm64/include/uapi/asm/hwcap.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 ARM Ltd. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #ifndef _UAPI__ASM_HWCAP_H | ||
17 | #define _UAPI__ASM_HWCAP_H | ||
18 | |||
19 | /* | ||
20 | * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP | ||
21 | */ | ||
22 | #define HWCAP_FP (1 << 0) | ||
23 | #define HWCAP_ASIMD (1 << 1) | ||
24 | |||
25 | |||
26 | #endif /* _UAPI__ASM_HWCAP_H */ | ||
diff --git a/arch/arm64/include/asm/param.h b/arch/arm64/include/uapi/asm/param.h index 8e3a281d448..8e3a281d448 100644 --- a/arch/arm64/include/asm/param.h +++ b/arch/arm64/include/uapi/asm/param.h | |||
diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h new file mode 100644 index 00000000000..9b131b4efa0 --- /dev/null +++ b/arch/arm64/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,91 @@ | |||
1 | /* | ||
2 | * Based on arch/arm/include/asm/ptrace.h | ||
3 | * | ||
4 | * Copyright (C) 1996-2003 Russell King | ||
5 | * Copyright (C) 2012 ARM Ltd. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | #ifndef _UAPI__ASM_PTRACE_H | ||
20 | #define _UAPI__ASM_PTRACE_H | ||
21 | |||
22 | #include <linux/types.h> | ||
23 | |||
24 | #include <asm/hwcap.h> | ||
25 | |||
26 | |||
27 | /* | ||
28 | * PSR bits | ||
29 | */ | ||
30 | #define PSR_MODE_EL0t 0x00000000 | ||
31 | #define PSR_MODE_EL1t 0x00000004 | ||
32 | #define PSR_MODE_EL1h 0x00000005 | ||
33 | #define PSR_MODE_EL2t 0x00000008 | ||
34 | #define PSR_MODE_EL2h 0x00000009 | ||
35 | #define PSR_MODE_EL3t 0x0000000c | ||
36 | #define PSR_MODE_EL3h 0x0000000d | ||
37 | #define PSR_MODE_MASK 0x0000000f | ||
38 | |||
39 | /* AArch32 CPSR bits */ | ||
40 | #define PSR_MODE32_BIT 0x00000010 | ||
41 | |||
42 | /* AArch64 SPSR bits */ | ||
43 | #define PSR_F_BIT 0x00000040 | ||
44 | #define PSR_I_BIT 0x00000080 | ||
45 | #define PSR_A_BIT 0x00000100 | ||
46 | #define PSR_D_BIT 0x00000200 | ||
47 | #define PSR_Q_BIT 0x08000000 | ||
48 | #define PSR_V_BIT 0x10000000 | ||
49 | #define PSR_C_BIT 0x20000000 | ||
50 | #define PSR_Z_BIT 0x40000000 | ||
51 | #define PSR_N_BIT 0x80000000 | ||
52 | |||
53 | /* | ||
54 | * Groups of PSR bits | ||
55 | */ | ||
56 | #define PSR_f 0xff000000 /* Flags */ | ||
57 | #define PSR_s 0x00ff0000 /* Status */ | ||
58 | #define PSR_x 0x0000ff00 /* Extension */ | ||
59 | #define PSR_c 0x000000ff /* Control */ | ||
60 | |||
61 | |||
62 | #ifndef __ASSEMBLY__ | ||
63 | |||
64 | /* | ||
65 | * User structures for general purpose, floating point and debug registers. | ||
66 | */ | ||
67 | struct user_pt_regs { | ||
68 | __u64 regs[31]; | ||
69 | __u64 sp; | ||
70 | __u64 pc; | ||
71 | __u64 pstate; | ||
72 | }; | ||
73 | |||
74 | struct user_fpsimd_state { | ||
75 | __uint128_t vregs[32]; | ||
76 | __u32 fpsr; | ||
77 | __u32 fpcr; | ||
78 | }; | ||
79 | |||
80 | struct user_hwdebug_state { | ||
81 | __u32 dbg_info; | ||
82 | struct { | ||
83 | __u64 addr; | ||
84 | __u32 ctrl; | ||
85 | } dbg_regs[16]; | ||
86 | }; | ||
87 | |||
88 | |||
89 | #endif /* __ASSEMBLY__ */ | ||
90 | |||
91 | #endif /* _UAPI__ASM_PTRACE_H */ | ||
diff --git a/arch/arm64/include/asm/setup.h b/arch/arm64/include/uapi/asm/setup.h index 9cf2e46fbbd..9cf2e46fbbd 100644 --- a/arch/arm64/include/asm/setup.h +++ b/arch/arm64/include/uapi/asm/setup.h | |||
diff --git a/arch/arm64/include/uapi/asm/sigcontext.h b/arch/arm64/include/uapi/asm/sigcontext.h new file mode 100644 index 00000000000..690ad51cc90 --- /dev/null +++ b/arch/arm64/include/uapi/asm/sigcontext.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 ARM Ltd. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #ifndef _UAPI__ASM_SIGCONTEXT_H | ||
17 | #define _UAPI__ASM_SIGCONTEXT_H | ||
18 | |||
19 | #include <linux/types.h> | ||
20 | |||
21 | /* | ||
22 | * Signal context structure - contains all info to do with the state | ||
23 | * before the signal handler was invoked. | ||
24 | */ | ||
25 | struct sigcontext { | ||
26 | __u64 fault_address; | ||
27 | /* AArch64 registers */ | ||
28 | __u64 regs[31]; | ||
29 | __u64 sp; | ||
30 | __u64 pc; | ||
31 | __u64 pstate; | ||
32 | /* 4K reserved for FP/SIMD state and future expansion */ | ||
33 | __u8 __reserved[4096] __attribute__((__aligned__(16))); | ||
34 | }; | ||
35 | |||
36 | /* | ||
37 | * Header to be used at the beginning of structures extending the user | ||
38 | * context. Such structures must be placed after the rt_sigframe on the stack | ||
39 | * and be 16-byte aligned. The last structure must be a dummy one with the | ||
40 | * magic and size set to 0. | ||
41 | */ | ||
42 | struct _aarch64_ctx { | ||
43 | __u32 magic; | ||
44 | __u32 size; | ||
45 | }; | ||
46 | |||
47 | #define FPSIMD_MAGIC 0x46508001 | ||
48 | |||
49 | struct fpsimd_context { | ||
50 | struct _aarch64_ctx head; | ||
51 | __u32 fpsr; | ||
52 | __u32 fpcr; | ||
53 | __uint128_t vregs[32]; | ||
54 | }; | ||
55 | |||
56 | |||
57 | #endif /* _UAPI__ASM_SIGCONTEXT_H */ | ||
diff --git a/arch/arm64/include/asm/siginfo.h b/arch/arm64/include/uapi/asm/siginfo.h index 5a74a0853db..5a74a0853db 100644 --- a/arch/arm64/include/asm/siginfo.h +++ b/arch/arm64/include/uapi/asm/siginfo.h | |||
diff --git a/arch/arm64/include/asm/signal.h b/arch/arm64/include/uapi/asm/signal.h index 8d1e7236431..8d1e7236431 100644 --- a/arch/arm64/include/asm/signal.h +++ b/arch/arm64/include/uapi/asm/signal.h | |||
diff --git a/arch/arm64/include/uapi/asm/stat.h b/arch/arm64/include/uapi/asm/stat.h new file mode 100644 index 00000000000..eeb702e5074 --- /dev/null +++ b/arch/arm64/include/uapi/asm/stat.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 ARM Ltd. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include <asm-generic/stat.h> | ||
diff --git a/arch/arm64/include/asm/statfs.h b/arch/arm64/include/uapi/asm/statfs.h index 6f621905097..6f621905097 100644 --- a/arch/arm64/include/asm/statfs.h +++ b/arch/arm64/include/uapi/asm/statfs.h | |||
diff --git a/arch/arm64/include/uapi/asm/unistd.h b/arch/arm64/include/uapi/asm/unistd.h new file mode 100644 index 00000000000..1caadc24e3f --- /dev/null +++ b/arch/arm64/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 ARM Ltd. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include <asm-generic/unistd.h> | ||
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 6538928ff1a..a6f3f7da688 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/errno.h> | 26 | #include <asm/errno.h> |
27 | #include <asm/thread_info.h> | 27 | #include <asm/thread_info.h> |
28 | #include <asm/unistd.h> | 28 | #include <asm/unistd.h> |
29 | #include <asm/unistd32.h> | ||
29 | 30 | ||
30 | /* | 31 | /* |
31 | * Bad Abort numbers | 32 | * Bad Abort numbers |
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index ac3550ecc7b..2ea3968367c 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c | |||
@@ -823,11 +823,11 @@ static int compat_ptrace_read_user(struct task_struct *tsk, compat_ulong_t off, | |||
823 | if (off & 3) | 823 | if (off & 3) |
824 | return -EIO; | 824 | return -EIO; |
825 | 825 | ||
826 | if (off == PT_TEXT_ADDR) | 826 | if (off == COMPAT_PT_TEXT_ADDR) |
827 | tmp = tsk->mm->start_code; | 827 | tmp = tsk->mm->start_code; |
828 | else if (off == PT_DATA_ADDR) | 828 | else if (off == COMPAT_PT_DATA_ADDR) |
829 | tmp = tsk->mm->start_data; | 829 | tmp = tsk->mm->start_data; |
830 | else if (off == PT_TEXT_END_ADDR) | 830 | else if (off == COMPAT_PT_TEXT_END_ADDR) |
831 | tmp = tsk->mm->end_code; | 831 | tmp = tsk->mm->end_code; |
832 | else if (off < sizeof(compat_elf_gregset_t)) | 832 | else if (off < sizeof(compat_elf_gregset_t)) |
833 | return copy_regset_to_user(tsk, &user_aarch32_view, | 833 | return copy_regset_to_user(tsk, &user_aarch32_view, |
diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c index 0790a87a434..4654824747a 100644 --- a/arch/arm64/kernel/signal32.c +++ b/arch/arm64/kernel/signal32.c | |||
@@ -18,8 +18,6 @@ | |||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define __SYSCALL_COMPAT | ||
22 | |||
23 | #include <linux/compat.h> | 21 | #include <linux/compat.h> |
24 | #include <linux/signal.h> | 22 | #include <linux/signal.h> |
25 | #include <linux/syscalls.h> | 23 | #include <linux/syscalls.h> |
@@ -28,7 +26,7 @@ | |||
28 | #include <asm/fpsimd.h> | 26 | #include <asm/fpsimd.h> |
29 | #include <asm/signal32.h> | 27 | #include <asm/signal32.h> |
30 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
31 | #include <asm/unistd.h> | 29 | #include <asm/unistd32.h> |
32 | 30 | ||
33 | struct compat_sigaction { | 31 | struct compat_sigaction { |
34 | compat_uptr_t sa_handler; | 32 | compat_uptr_t sa_handler; |
@@ -126,19 +124,19 @@ struct compat_rt_sigframe { | |||
126 | * For ARM syscalls, the syscall number has to be loaded into r7. | 124 | * For ARM syscalls, the syscall number has to be loaded into r7. |
127 | * We do not support an OABI userspace. | 125 | * We do not support an OABI userspace. |
128 | */ | 126 | */ |
129 | #define MOV_R7_NR_SIGRETURN (0xe3a07000 | __NR_sigreturn) | 127 | #define MOV_R7_NR_SIGRETURN (0xe3a07000 | __NR_compat_sigreturn) |
130 | #define SVC_SYS_SIGRETURN (0xef000000 | __NR_sigreturn) | 128 | #define SVC_SYS_SIGRETURN (0xef000000 | __NR_compat_sigreturn) |
131 | #define MOV_R7_NR_RT_SIGRETURN (0xe3a07000 | __NR_rt_sigreturn) | 129 | #define MOV_R7_NR_RT_SIGRETURN (0xe3a07000 | __NR_compat_rt_sigreturn) |
132 | #define SVC_SYS_RT_SIGRETURN (0xef000000 | __NR_rt_sigreturn) | 130 | #define SVC_SYS_RT_SIGRETURN (0xef000000 | __NR_compat_rt_sigreturn) |
133 | 131 | ||
134 | /* | 132 | /* |
135 | * For Thumb syscalls, we also pass the syscall number via r7. We therefore | 133 | * For Thumb syscalls, we also pass the syscall number via r7. We therefore |
136 | * need two 16-bit instructions. | 134 | * need two 16-bit instructions. |
137 | */ | 135 | */ |
138 | #define SVC_THUMB_SIGRETURN (((0xdf00 | __NR_sigreturn) << 16) | \ | 136 | #define SVC_THUMB_SIGRETURN (((0xdf00 | __NR_compat_sigreturn) << 16) | \ |
139 | 0x2700 | __NR_sigreturn) | 137 | 0x2700 | __NR_compat_sigreturn) |
140 | #define SVC_THUMB_RT_SIGRETURN (((0xdf00 | __NR_rt_sigreturn) << 16) | \ | 138 | #define SVC_THUMB_RT_SIGRETURN (((0xdf00 | __NR_compat_rt_sigreturn) << 16) | \ |
141 | 0x2700 | __NR_rt_sigreturn) | 139 | 0x2700 | __NR_compat_rt_sigreturn) |
142 | 140 | ||
143 | const compat_ulong_t aarch32_sigret_code[6] = { | 141 | const compat_ulong_t aarch32_sigret_code[6] = { |
144 | /* | 142 | /* |
@@ -819,5 +817,5 @@ asmlinkage int compat_sys_rt_sigqueueinfo(int pid, int sig, | |||
819 | 817 | ||
820 | void compat_setup_restart_syscall(struct pt_regs *regs) | 818 | void compat_setup_restart_syscall(struct pt_regs *regs) |
821 | { | 819 | { |
822 | regs->regs[7] = __NR_restart_syscall; | 820 | regs->regs[7] = __NR_compat_restart_syscall; |
823 | } | 821 | } |
diff --git a/arch/arm64/kernel/sys.c b/arch/arm64/kernel/sys.c index 905fcfb0ddd..b120df37de3 100644 --- a/arch/arm64/kernel/sys.c +++ b/arch/arm64/kernel/sys.c | |||
@@ -50,13 +50,13 @@ asmlinkage long sys_execve(const char __user *filenamei, | |||
50 | struct pt_regs *regs) | 50 | struct pt_regs *regs) |
51 | { | 51 | { |
52 | long error; | 52 | long error; |
53 | char * filename; | 53 | struct filename *filename; |
54 | 54 | ||
55 | filename = getname(filenamei); | 55 | filename = getname(filenamei); |
56 | error = PTR_ERR(filename); | 56 | error = PTR_ERR(filename); |
57 | if (IS_ERR(filename)) | 57 | if (IS_ERR(filename)) |
58 | goto out; | 58 | goto out; |
59 | error = do_execve(filename, argv, envp, regs); | 59 | error = do_execve(filename->name, argv, envp, regs); |
60 | putname(filename); | 60 | putname(filename); |
61 | out: | 61 | out: |
62 | return error; | 62 | return error; |
diff --git a/arch/arm64/kernel/sys32.S b/arch/arm64/kernel/sys32.S index 5e4dc93cc31..54c4aec47a0 100644 --- a/arch/arm64/kernel/sys32.S +++ b/arch/arm64/kernel/sys32.S | |||
@@ -147,136 +147,12 @@ compat_sys_fanotify_mark_wrapper: | |||
147 | b sys_fanotify_mark | 147 | b sys_fanotify_mark |
148 | ENDPROC(compat_sys_fanotify_mark_wrapper) | 148 | ENDPROC(compat_sys_fanotify_mark_wrapper) |
149 | 149 | ||
150 | /* | ||
151 | * Use the compat system call wrappers. | ||
152 | */ | ||
153 | #define sys_fork compat_sys_fork_wrapper | ||
154 | #define sys_open compat_sys_open | ||
155 | #define sys_execve compat_sys_execve_wrapper | ||
156 | #define sys_lseek compat_sys_lseek_wrapper | ||
157 | #define sys_mount compat_sys_mount | ||
158 | #define sys_ptrace compat_sys_ptrace | ||
159 | #define sys_times compat_sys_times | ||
160 | #define sys_ioctl compat_sys_ioctl | ||
161 | #define sys_fcntl compat_sys_fcntl | ||
162 | #define sys_ustat compat_sys_ustat | ||
163 | #define sys_sigaction compat_sys_sigaction | ||
164 | #define sys_sigsuspend compat_sys_sigsuspend | ||
165 | #define sys_sigpending compat_sys_sigpending | ||
166 | #define sys_setrlimit compat_sys_setrlimit | ||
167 | #define sys_getrusage compat_sys_getrusage | ||
168 | #define sys_gettimeofday compat_sys_gettimeofday | ||
169 | #define sys_settimeofday compat_sys_settimeofday | ||
170 | #define sys_statfs compat_sys_statfs | ||
171 | #define sys_fstatfs compat_sys_fstatfs | ||
172 | #define sys_setitimer compat_sys_setitimer | ||
173 | #define sys_getitimer compat_sys_getitimer | ||
174 | #define sys_newstat compat_sys_newstat | ||
175 | #define sys_newlstat compat_sys_newlstat | ||
176 | #define sys_newfstat compat_sys_newfstat | ||
177 | #define sys_wait4 compat_sys_wait4 | ||
178 | #define sys_sysinfo compat_sys_sysinfo | ||
179 | #define sys_sigreturn compat_sys_sigreturn_wrapper | ||
180 | #define sys_clone compat_sys_clone_wrapper | ||
181 | #define sys_adjtimex compat_sys_adjtimex | ||
182 | #define sys_sigprocmask compat_sys_sigprocmask | ||
183 | #define sys_getdents compat_sys_getdents | ||
184 | #define sys_select compat_sys_select | ||
185 | #define sys_readv compat_sys_readv | ||
186 | #define sys_writev compat_sys_writev | ||
187 | #define sys_sysctl compat_sys_sysctl | ||
188 | #define sys_sched_rr_get_interval compat_sys_sched_rr_get_interval | ||
189 | #define sys_nanosleep compat_sys_nanosleep | ||
190 | #define sys_rt_sigreturn compat_sys_rt_sigreturn_wrapper | ||
191 | #define sys_rt_sigaction compat_sys_rt_sigaction | ||
192 | #define sys_rt_sigprocmask compat_sys_rt_sigprocmask | ||
193 | #define sys_rt_sigpending compat_sys_rt_sigpending | ||
194 | #define sys_rt_sigtimedwait compat_sys_rt_sigtimedwait | ||
195 | #define sys_rt_sigqueueinfo compat_sys_rt_sigqueueinfo | ||
196 | #define sys_rt_sigsuspend compat_sys_rt_sigsuspend | ||
197 | #define sys_pread64 compat_sys_pread64_wrapper | ||
198 | #define sys_pwrite64 compat_sys_pwrite64_wrapper | ||
199 | #define sys_sigaltstack compat_sys_sigaltstack_wrapper | ||
200 | #define sys_sendfile compat_sys_sendfile | ||
201 | #define sys_vfork compat_sys_vfork_wrapper | ||
202 | #define sys_getrlimit compat_sys_getrlimit | ||
203 | #define sys_mmap2 sys_mmap_pgoff | ||
204 | #define sys_truncate64 compat_sys_truncate64_wrapper | ||
205 | #define sys_ftruncate64 compat_sys_ftruncate64_wrapper | ||
206 | #define sys_getdents64 compat_sys_getdents64 | ||
207 | #define sys_fcntl64 compat_sys_fcntl64 | ||
208 | #define sys_readahead compat_sys_readahead_wrapper | ||
209 | #define sys_futex compat_sys_futex | ||
210 | #define sys_sched_setaffinity compat_sys_sched_setaffinity | ||
211 | #define sys_sched_getaffinity compat_sys_sched_getaffinity | ||
212 | #define sys_io_setup compat_sys_io_setup | ||
213 | #define sys_io_getevents compat_sys_io_getevents | ||
214 | #define sys_io_submit compat_sys_io_submit | ||
215 | #define sys_lookup_dcookie compat_sys_lookup_dcookie | ||
216 | #define sys_timer_create compat_sys_timer_create | ||
217 | #define sys_timer_settime compat_sys_timer_settime | ||
218 | #define sys_timer_gettime compat_sys_timer_gettime | ||
219 | #define sys_clock_settime compat_sys_clock_settime | ||
220 | #define sys_clock_gettime compat_sys_clock_gettime | ||
221 | #define sys_clock_getres compat_sys_clock_getres | ||
222 | #define sys_clock_nanosleep compat_sys_clock_nanosleep | ||
223 | #define sys_statfs64 compat_sys_statfs64_wrapper | ||
224 | #define sys_fstatfs64 compat_sys_fstatfs64_wrapper | ||
225 | #define sys_utimes compat_sys_utimes | ||
226 | #define sys_fadvise64_64 compat_sys_fadvise64_64_wrapper | ||
227 | #define sys_mq_open compat_sys_mq_open | ||
228 | #define sys_mq_timedsend compat_sys_mq_timedsend | ||
229 | #define sys_mq_timedreceive compat_sys_mq_timedreceive | ||
230 | #define sys_mq_notify compat_sys_mq_notify | ||
231 | #define sys_mq_getsetattr compat_sys_mq_getsetattr | ||
232 | #define sys_waitid compat_sys_waitid | ||
233 | #define sys_recv compat_sys_recv | ||
234 | #define sys_recvfrom compat_sys_recvfrom | ||
235 | #define sys_setsockopt compat_sys_setsockopt | ||
236 | #define sys_getsockopt compat_sys_getsockopt | ||
237 | #define sys_sendmsg compat_sys_sendmsg | ||
238 | #define sys_recvmsg compat_sys_recvmsg | ||
239 | #define sys_semctl compat_sys_semctl | ||
240 | #define sys_msgsnd compat_sys_msgsnd | ||
241 | #define sys_msgrcv compat_sys_msgrcv | ||
242 | #define sys_msgctl compat_sys_msgctl | ||
243 | #define sys_shmat compat_sys_shmat | ||
244 | #define sys_shmctl compat_sys_shmctl | ||
245 | #define sys_keyctl compat_sys_keyctl | ||
246 | #define sys_semtimedop compat_sys_semtimedop | ||
247 | #define sys_mbind compat_sys_mbind | ||
248 | #define sys_get_mempolicy compat_sys_get_mempolicy | ||
249 | #define sys_set_mempolicy compat_sys_set_mempolicy | ||
250 | #define sys_openat compat_sys_openat | ||
251 | #define sys_futimesat compat_sys_futimesat | ||
252 | #define sys_pselect6 compat_sys_pselect6 | ||
253 | #define sys_ppoll compat_sys_ppoll | ||
254 | #define sys_set_robust_list compat_sys_set_robust_list | ||
255 | #define sys_get_robust_list compat_sys_get_robust_list | ||
256 | #define sys_sync_file_range2 compat_sys_sync_file_range2_wrapper | ||
257 | #define sys_vmsplice compat_sys_vmsplice | ||
258 | #define sys_move_pages compat_sys_move_pages | ||
259 | #define sys_epoll_pwait compat_sys_epoll_pwait | ||
260 | #define sys_kexec_load compat_sys_kexec_load | ||
261 | #define sys_utimensat compat_sys_utimensat | ||
262 | #define sys_signalfd compat_sys_signalfd | ||
263 | #define sys_fallocate compat_sys_fallocate_wrapper | ||
264 | #define sys_timerfd_settime compat_sys_timerfd_settime | ||
265 | #define sys_timerfd_gettime compat_sys_timerfd_gettime | ||
266 | #define sys_signalfd4 compat_sys_signalfd4 | ||
267 | #define sys_preadv compat_sys_preadv | ||
268 | #define sys_pwritev compat_sys_pwritev | ||
269 | #define sys_rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo | ||
270 | #define sys_recvmmsg compat_sys_recvmmsg | ||
271 | #define sys_fanotify_mark compat_sys_fanotify_mark_wrapper | ||
272 | |||
273 | #undef __SYSCALL | 150 | #undef __SYSCALL |
274 | #define __SYSCALL(x, y) .quad y // x | 151 | #define __SYSCALL(x, y) .quad y // x |
275 | #define __SYSCALL_COMPAT | ||
276 | 152 | ||
277 | /* | 153 | /* |
278 | * The system calls table must be 4KB aligned. | 154 | * The system calls table must be 4KB aligned. |
279 | */ | 155 | */ |
280 | .align 12 | 156 | .align 12 |
281 | ENTRY(compat_sys_call_table) | 157 | ENTRY(compat_sys_call_table) |
282 | #include <asm/unistd.h> | 158 | #include <asm/unistd32.h> |
diff --git a/arch/arm64/kernel/sys_compat.c b/arch/arm64/kernel/sys_compat.c index 93f10e27dc7..906e3bd270b 100644 --- a/arch/arm64/kernel/sys_compat.c +++ b/arch/arm64/kernel/sys_compat.c | |||
@@ -18,8 +18,6 @@ | |||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define __SYSCALL_COMPAT | ||
22 | |||
23 | #include <linux/compat.h> | 21 | #include <linux/compat.h> |
24 | #include <linux/personality.h> | 22 | #include <linux/personality.h> |
25 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
@@ -28,7 +26,7 @@ | |||
28 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
29 | 27 | ||
30 | #include <asm/cacheflush.h> | 28 | #include <asm/cacheflush.h> |
31 | #include <asm/unistd.h> | 29 | #include <asm/unistd32.h> |
32 | 30 | ||
33 | asmlinkage int compat_sys_fork(struct pt_regs *regs) | 31 | asmlinkage int compat_sys_fork(struct pt_regs *regs) |
34 | { | 32 | { |
@@ -56,14 +54,14 @@ asmlinkage int compat_sys_execve(const char __user *filenamei, | |||
56 | struct pt_regs *regs) | 54 | struct pt_regs *regs) |
57 | { | 55 | { |
58 | int error; | 56 | int error; |
59 | char * filename; | 57 | struct filename *filename; |
60 | 58 | ||
61 | filename = getname(filenamei); | 59 | filename = getname(filenamei); |
62 | error = PTR_ERR(filename); | 60 | error = PTR_ERR(filename); |
63 | if (IS_ERR(filename)) | 61 | if (IS_ERR(filename)) |
64 | goto out; | 62 | goto out; |
65 | error = compat_do_execve(filename, compat_ptr(argv), compat_ptr(envp), | 63 | error = compat_do_execve(filename->name, compat_ptr(argv), |
66 | regs); | 64 | compat_ptr(envp), regs); |
67 | putname(filename); | 65 | putname(filename); |
68 | out: | 66 | out: |
69 | return error; | 67 | return error; |
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 5ade51c8a87..06e73bf665e 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig | |||
@@ -15,6 +15,8 @@ config AVR32 | |||
15 | select ARCH_WANT_IPC_PARSE_VERSION | 15 | select ARCH_WANT_IPC_PARSE_VERSION |
16 | select ARCH_HAVE_NMI_SAFE_CMPXCHG | 16 | select ARCH_HAVE_NMI_SAFE_CMPXCHG |
17 | select GENERIC_CLOCKEVENTS | 17 | select GENERIC_CLOCKEVENTS |
18 | select HAVE_MOD_ARCH_SPECIFIC | ||
19 | select MODULES_USE_ELF_RELA | ||
18 | help | 20 | help |
19 | AVR32 is a high-performance 32-bit RISC microprocessor core, | 21 | AVR32 is a high-performance 32-bit RISC microprocessor core, |
20 | designed for cost-sensitive embedded applications, with particular | 22 | designed for cost-sensitive embedded applications, with particular |
diff --git a/arch/avr32/include/asm/Kbuild b/arch/avr32/include/asm/Kbuild index be0433ee5a8..4807ded352c 100644 --- a/arch/avr32/include/asm/Kbuild +++ b/arch/avr32/include/asm/Kbuild | |||
@@ -1,6 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
4 | generic-y += exec.h | 3 | generic-y += exec.h |
5 | |||
6 | header-y += cachectl.h | ||
diff --git a/arch/avr32/include/asm/module.h b/arch/avr32/include/asm/module.h index 451444538a1..3f083d385a6 100644 --- a/arch/avr32/include/asm/module.h +++ b/arch/avr32/include/asm/module.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __ASM_AVR32_MODULE_H | 1 | #ifndef __ASM_AVR32_MODULE_H |
2 | #define __ASM_AVR32_MODULE_H | 2 | #define __ASM_AVR32_MODULE_H |
3 | 3 | ||
4 | #include <asm-generic/module.h> | ||
5 | |||
4 | struct mod_arch_syminfo { | 6 | struct mod_arch_syminfo { |
5 | unsigned long got_offset; | 7 | unsigned long got_offset; |
6 | int got_initialized; | 8 | int got_initialized; |
@@ -17,10 +19,6 @@ struct mod_arch_specific { | |||
17 | struct mod_arch_syminfo *syminfo; | 19 | struct mod_arch_syminfo *syminfo; |
18 | }; | 20 | }; |
19 | 21 | ||
20 | #define Elf_Shdr Elf32_Shdr | ||
21 | #define Elf_Sym Elf32_Sym | ||
22 | #define Elf_Ehdr Elf32_Ehdr | ||
23 | |||
24 | #define MODULE_PROC_FAMILY "AVR32v1" | 22 | #define MODULE_PROC_FAMILY "AVR32v1" |
25 | 23 | ||
26 | #define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY | 24 | #define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY |
diff --git a/arch/avr32/include/asm/param.h b/arch/avr32/include/asm/param.h index 34bc8d4c3b2..009a167aea1 100644 --- a/arch/avr32/include/asm/param.h +++ b/arch/avr32/include/asm/param.h | |||
@@ -1,23 +1,9 @@ | |||
1 | #ifndef __ASM_AVR32_PARAM_H | 1 | #ifndef __ASM_AVR32_PARAM_H |
2 | #define __ASM_AVR32_PARAM_H | 2 | #define __ASM_AVR32_PARAM_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <uapi/asm/param.h> |
5 | |||
5 | # define HZ CONFIG_HZ | 6 | # define HZ CONFIG_HZ |
6 | # define USER_HZ 100 /* User interfaces are in "ticks" */ | 7 | # define USER_HZ 100 /* User interfaces are in "ticks" */ |
7 | # define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ | 8 | # define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ |
8 | #endif | ||
9 | |||
10 | #ifndef HZ | ||
11 | # define HZ 100 | ||
12 | #endif | ||
13 | |||
14 | /* TODO: Should be configurable */ | ||
15 | #define EXEC_PAGESIZE 4096 | ||
16 | |||
17 | #ifndef NOGROUP | ||
18 | # define NOGROUP (-1) | ||
19 | #endif | ||
20 | |||
21 | #define MAXHOSTNAMELEN 64 | ||
22 | |||
23 | #endif /* __ASM_AVR32_PARAM_H */ | 9 | #endif /* __ASM_AVR32_PARAM_H */ |
diff --git a/arch/avr32/include/asm/ptrace.h b/arch/avr32/include/asm/ptrace.h index c67a007f672..8d3c412fc65 100644 --- a/arch/avr32/include/asm/ptrace.h +++ b/arch/avr32/include/asm/ptrace.h | |||
@@ -8,119 +8,9 @@ | |||
8 | #ifndef __ASM_AVR32_PTRACE_H | 8 | #ifndef __ASM_AVR32_PTRACE_H |
9 | #define __ASM_AVR32_PTRACE_H | 9 | #define __ASM_AVR32_PTRACE_H |
10 | 10 | ||
11 | #define PTRACE_GETREGS 12 | 11 | #include <uapi/asm/ptrace.h> |
12 | #define PTRACE_SETREGS 13 | ||
13 | |||
14 | /* | ||
15 | * Status Register bits | ||
16 | */ | ||
17 | #define SR_H 0x20000000 | ||
18 | #define SR_J 0x10000000 | ||
19 | #define SR_DM 0x08000000 | ||
20 | #define SR_D 0x04000000 | ||
21 | #define MODE_NMI 0x01c00000 | ||
22 | #define MODE_EXCEPTION 0x01800000 | ||
23 | #define MODE_INT3 0x01400000 | ||
24 | #define MODE_INT2 0x01000000 | ||
25 | #define MODE_INT1 0x00c00000 | ||
26 | #define MODE_INT0 0x00800000 | ||
27 | #define MODE_SUPERVISOR 0x00400000 | ||
28 | #define MODE_USER 0x00000000 | ||
29 | #define MODE_MASK 0x01c00000 | ||
30 | #define SR_EM 0x00200000 | ||
31 | #define SR_I3M 0x00100000 | ||
32 | #define SR_I2M 0x00080000 | ||
33 | #define SR_I1M 0x00040000 | ||
34 | #define SR_I0M 0x00020000 | ||
35 | #define SR_GM 0x00010000 | ||
36 | |||
37 | #define SR_H_BIT 29 | ||
38 | #define SR_J_BIT 28 | ||
39 | #define SR_DM_BIT 27 | ||
40 | #define SR_D_BIT 26 | ||
41 | #define MODE_SHIFT 22 | ||
42 | #define SR_EM_BIT 21 | ||
43 | #define SR_I3M_BIT 20 | ||
44 | #define SR_I2M_BIT 19 | ||
45 | #define SR_I1M_BIT 18 | ||
46 | #define SR_I0M_BIT 17 | ||
47 | #define SR_GM_BIT 16 | ||
48 | |||
49 | /* The user-visible part */ | ||
50 | #define SR_L 0x00000020 | ||
51 | #define SR_Q 0x00000010 | ||
52 | #define SR_V 0x00000008 | ||
53 | #define SR_N 0x00000004 | ||
54 | #define SR_Z 0x00000002 | ||
55 | #define SR_C 0x00000001 | ||
56 | |||
57 | #define SR_L_BIT 5 | ||
58 | #define SR_Q_BIT 4 | ||
59 | #define SR_V_BIT 3 | ||
60 | #define SR_N_BIT 2 | ||
61 | #define SR_Z_BIT 1 | ||
62 | #define SR_C_BIT 0 | ||
63 | |||
64 | /* | ||
65 | * The order is defined by the stmts instruction. r0 is stored first, | ||
66 | * so it gets the highest address. | ||
67 | * | ||
68 | * Registers 0-12 are general-purpose registers (r12 is normally used for | ||
69 | * the function return value). | ||
70 | * Register 13 is the stack pointer | ||
71 | * Register 14 is the link register | ||
72 | * Register 15 is the program counter (retrieved from the RAR sysreg) | ||
73 | */ | ||
74 | #define FRAME_SIZE_FULL 72 | ||
75 | #define REG_R12_ORIG 68 | ||
76 | #define REG_R0 64 | ||
77 | #define REG_R1 60 | ||
78 | #define REG_R2 56 | ||
79 | #define REG_R3 52 | ||
80 | #define REG_R4 48 | ||
81 | #define REG_R5 44 | ||
82 | #define REG_R6 40 | ||
83 | #define REG_R7 36 | ||
84 | #define REG_R8 32 | ||
85 | #define REG_R9 28 | ||
86 | #define REG_R10 24 | ||
87 | #define REG_R11 20 | ||
88 | #define REG_R12 16 | ||
89 | #define REG_SP 12 | ||
90 | #define REG_LR 8 | ||
91 | |||
92 | #define FRAME_SIZE_MIN 8 | ||
93 | #define REG_PC 4 | ||
94 | #define REG_SR 0 | ||
95 | 12 | ||
96 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
97 | struct pt_regs { | ||
98 | /* These are always saved */ | ||
99 | unsigned long sr; | ||
100 | unsigned long pc; | ||
101 | |||
102 | /* These are sometimes saved */ | ||
103 | unsigned long lr; | ||
104 | unsigned long sp; | ||
105 | unsigned long r12; | ||
106 | unsigned long r11; | ||
107 | unsigned long r10; | ||
108 | unsigned long r9; | ||
109 | unsigned long r8; | ||
110 | unsigned long r7; | ||
111 | unsigned long r6; | ||
112 | unsigned long r5; | ||
113 | unsigned long r4; | ||
114 | unsigned long r3; | ||
115 | unsigned long r2; | ||
116 | unsigned long r1; | ||
117 | unsigned long r0; | ||
118 | |||
119 | /* Only saved on system call */ | ||
120 | unsigned long r12_orig; | ||
121 | }; | ||
122 | |||
123 | #ifdef __KERNEL__ | ||
124 | 14 | ||
125 | #include <asm/ocd.h> | 15 | #include <asm/ocd.h> |
126 | 16 | ||
@@ -150,8 +40,5 @@ static __inline__ int valid_user_regs(struct pt_regs *regs) | |||
150 | } | 40 | } |
151 | 41 | ||
152 | 42 | ||
153 | #endif /* __KERNEL__ */ | ||
154 | |||
155 | #endif /* ! __ASSEMBLY__ */ | 43 | #endif /* ! __ASSEMBLY__ */ |
156 | |||
157 | #endif /* __ASM_AVR32_PTRACE_H */ | 44 | #endif /* __ASM_AVR32_PTRACE_H */ |
diff --git a/arch/avr32/include/asm/setup.h b/arch/avr32/include/asm/setup.h index 160543dbec7..73490ae0c47 100644 --- a/arch/avr32/include/asm/setup.h +++ b/arch/avr32/include/asm/setup.h | |||
@@ -11,9 +11,8 @@ | |||
11 | #ifndef __ASM_AVR32_SETUP_H__ | 11 | #ifndef __ASM_AVR32_SETUP_H__ |
12 | #define __ASM_AVR32_SETUP_H__ | 12 | #define __ASM_AVR32_SETUP_H__ |
13 | 13 | ||
14 | #define COMMAND_LINE_SIZE 256 | 14 | #include <uapi/asm/setup.h> |
15 | 15 | ||
16 | #ifdef __KERNEL__ | ||
17 | 16 | ||
18 | /* Magic number indicating that a tag table is present */ | 17 | /* Magic number indicating that a tag table is present */ |
19 | #define ATAG_MAGIC 0xa2a25441 | 18 | #define ATAG_MAGIC 0xa2a25441 |
@@ -142,6 +141,4 @@ void setup_processor(void); | |||
142 | 141 | ||
143 | #endif /* !__ASSEMBLY__ */ | 142 | #endif /* !__ASSEMBLY__ */ |
144 | 143 | ||
145 | #endif /* __KERNEL__ */ | ||
146 | |||
147 | #endif /* __ASM_AVR32_SETUP_H__ */ | 144 | #endif /* __ASM_AVR32_SETUP_H__ */ |
diff --git a/arch/avr32/include/asm/signal.h b/arch/avr32/include/asm/signal.h index ae56849fdb2..4d502fd6bad 100644 --- a/arch/avr32/include/asm/signal.h +++ b/arch/avr32/include/asm/signal.h | |||
@@ -8,12 +8,8 @@ | |||
8 | #ifndef __ASM_AVR32_SIGNAL_H | 8 | #ifndef __ASM_AVR32_SIGNAL_H |
9 | #define __ASM_AVR32_SIGNAL_H | 9 | #define __ASM_AVR32_SIGNAL_H |
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <uapi/asm/signal.h> |
12 | 12 | ||
13 | /* Avoid too many header ordering problems. */ | ||
14 | struct siginfo; | ||
15 | |||
16 | #ifdef __KERNEL__ | ||
17 | /* Most things should be clean enough to redefine this at will, if care | 13 | /* Most things should be clean enough to redefine this at will, if care |
18 | is taken to make libc match. */ | 14 | is taken to make libc match. */ |
19 | 15 | ||
@@ -27,94 +23,6 @@ typedef struct { | |||
27 | unsigned long sig[_NSIG_WORDS]; | 23 | unsigned long sig[_NSIG_WORDS]; |
28 | } sigset_t; | 24 | } sigset_t; |
29 | 25 | ||
30 | #else | ||
31 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
32 | |||
33 | #define NSIG 32 | ||
34 | typedef unsigned long sigset_t; | ||
35 | |||
36 | #endif /* __KERNEL__ */ | ||
37 | |||
38 | #define SIGHUP 1 | ||
39 | #define SIGINT 2 | ||
40 | #define SIGQUIT 3 | ||
41 | #define SIGILL 4 | ||
42 | #define SIGTRAP 5 | ||
43 | #define SIGABRT 6 | ||
44 | #define SIGIOT 6 | ||
45 | #define SIGBUS 7 | ||
46 | #define SIGFPE 8 | ||
47 | #define SIGKILL 9 | ||
48 | #define SIGUSR1 10 | ||
49 | #define SIGSEGV 11 | ||
50 | #define SIGUSR2 12 | ||
51 | #define SIGPIPE 13 | ||
52 | #define SIGALRM 14 | ||
53 | #define SIGTERM 15 | ||
54 | #define SIGSTKFLT 16 | ||
55 | #define SIGCHLD 17 | ||
56 | #define SIGCONT 18 | ||
57 | #define SIGSTOP 19 | ||
58 | #define SIGTSTP 20 | ||
59 | #define SIGTTIN 21 | ||
60 | #define SIGTTOU 22 | ||
61 | #define SIGURG 23 | ||
62 | #define SIGXCPU 24 | ||
63 | #define SIGXFSZ 25 | ||
64 | #define SIGVTALRM 26 | ||
65 | #define SIGPROF 27 | ||
66 | #define SIGWINCH 28 | ||
67 | #define SIGIO 29 | ||
68 | #define SIGPOLL SIGIO | ||
69 | /* | ||
70 | #define SIGLOST 29 | ||
71 | */ | ||
72 | #define SIGPWR 30 | ||
73 | #define SIGSYS 31 | ||
74 | #define SIGUNUSED 31 | ||
75 | |||
76 | /* These should not be considered constants from userland. */ | ||
77 | #define SIGRTMIN 32 | ||
78 | #define SIGRTMAX (_NSIG-1) | ||
79 | |||
80 | /* | ||
81 | * SA_FLAGS values: | ||
82 | * | ||
83 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
84 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
85 | * SA_SIGINFO deliver the signal with SIGINFO structs | ||
86 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
87 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
88 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
89 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
90 | * | ||
91 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
92 | * Unix names RESETHAND and NODEFER respectively. | ||
93 | */ | ||
94 | #define SA_NOCLDSTOP 0x00000001 | ||
95 | #define SA_NOCLDWAIT 0x00000002 | ||
96 | #define SA_SIGINFO 0x00000004 | ||
97 | #define SA_RESTORER 0x04000000 | ||
98 | #define SA_ONSTACK 0x08000000 | ||
99 | #define SA_RESTART 0x10000000 | ||
100 | #define SA_NODEFER 0x40000000 | ||
101 | #define SA_RESETHAND 0x80000000 | ||
102 | |||
103 | #define SA_NOMASK SA_NODEFER | ||
104 | #define SA_ONESHOT SA_RESETHAND | ||
105 | |||
106 | /* | ||
107 | * sigaltstack controls | ||
108 | */ | ||
109 | #define SS_ONSTACK 1 | ||
110 | #define SS_DISABLE 2 | ||
111 | |||
112 | #define MINSIGSTKSZ 2048 | ||
113 | #define SIGSTKSZ 8192 | ||
114 | |||
115 | #include <asm-generic/signal-defs.h> | ||
116 | |||
117 | #ifdef __KERNEL__ | ||
118 | struct sigaction { | 26 | struct sigaction { |
119 | __sighandler_t sa_handler; | 27 | __sighandler_t sa_handler; |
120 | unsigned long sa_flags; | 28 | unsigned long sa_flags; |
@@ -125,37 +33,10 @@ struct sigaction { | |||
125 | struct k_sigaction { | 33 | struct k_sigaction { |
126 | struct sigaction sa; | 34 | struct sigaction sa; |
127 | }; | 35 | }; |
128 | #else | ||
129 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
130 | |||
131 | struct sigaction { | ||
132 | union { | ||
133 | __sighandler_t _sa_handler; | ||
134 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
135 | } _u; | ||
136 | sigset_t sa_mask; | ||
137 | unsigned long sa_flags; | ||
138 | void (*sa_restorer)(void); | ||
139 | }; | ||
140 | |||
141 | #define sa_handler _u._sa_handler | ||
142 | #define sa_sigaction _u._sa_sigaction | ||
143 | |||
144 | #endif /* __KERNEL__ */ | ||
145 | |||
146 | typedef struct sigaltstack { | ||
147 | void __user *ss_sp; | ||
148 | int ss_flags; | ||
149 | size_t ss_size; | ||
150 | } stack_t; | ||
151 | |||
152 | #ifdef __KERNEL__ | ||
153 | 36 | ||
154 | #include <asm/sigcontext.h> | 37 | #include <asm/sigcontext.h> |
155 | #undef __HAVE_ARCH_SIG_BITOPS | 38 | #undef __HAVE_ARCH_SIG_BITOPS |
156 | 39 | ||
157 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | 40 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
158 | 41 | ||
159 | #endif /* __KERNEL__ */ | ||
160 | |||
161 | #endif | 42 | #endif |
diff --git a/arch/avr32/include/asm/termios.h b/arch/avr32/include/asm/termios.h index dd7e9da2548..9d594376dbd 100644 --- a/arch/avr32/include/asm/termios.h +++ b/arch/avr32/include/asm/termios.h | |||
@@ -8,45 +8,8 @@ | |||
8 | #ifndef __ASM_AVR32_TERMIOS_H | 8 | #ifndef __ASM_AVR32_TERMIOS_H |
9 | #define __ASM_AVR32_TERMIOS_H | 9 | #define __ASM_AVR32_TERMIOS_H |
10 | 10 | ||
11 | #include <asm/termbits.h> | 11 | #include <uapi/asm/termios.h> |
12 | #include <asm/ioctls.h> | ||
13 | 12 | ||
14 | struct winsize { | ||
15 | unsigned short ws_row; | ||
16 | unsigned short ws_col; | ||
17 | unsigned short ws_xpixel; | ||
18 | unsigned short ws_ypixel; | ||
19 | }; | ||
20 | |||
21 | #define NCC 8 | ||
22 | struct termio { | ||
23 | unsigned short c_iflag; /* input mode flags */ | ||
24 | unsigned short c_oflag; /* output mode flags */ | ||
25 | unsigned short c_cflag; /* control mode flags */ | ||
26 | unsigned short c_lflag; /* local mode flags */ | ||
27 | unsigned char c_line; /* line discipline */ | ||
28 | unsigned char c_cc[NCC]; /* control characters */ | ||
29 | }; | ||
30 | |||
31 | /* modem lines */ | ||
32 | #define TIOCM_LE 0x001 | ||
33 | #define TIOCM_DTR 0x002 | ||
34 | #define TIOCM_RTS 0x004 | ||
35 | #define TIOCM_ST 0x008 | ||
36 | #define TIOCM_SR 0x010 | ||
37 | #define TIOCM_CTS 0x020 | ||
38 | #define TIOCM_CAR 0x040 | ||
39 | #define TIOCM_RNG 0x080 | ||
40 | #define TIOCM_DSR 0x100 | ||
41 | #define TIOCM_CD TIOCM_CAR | ||
42 | #define TIOCM_RI TIOCM_RNG | ||
43 | #define TIOCM_OUT1 0x2000 | ||
44 | #define TIOCM_OUT2 0x4000 | ||
45 | #define TIOCM_LOOP 0x8000 | ||
46 | |||
47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
48 | |||
49 | #ifdef __KERNEL__ | ||
50 | /* intr=^C quit=^\ erase=del kill=^U | 13 | /* intr=^C quit=^\ erase=del kill=^U |
51 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | 14 | eof=^D vtime=\0 vmin=\1 sxtc=\0 |
52 | start=^Q stop=^S susp=^Z eol=\0 | 15 | start=^Q stop=^S susp=^Z eol=\0 |
@@ -57,6 +20,4 @@ struct termio { | |||
57 | 20 | ||
58 | #include <asm-generic/termios-base.h> | 21 | #include <asm-generic/termios-base.h> |
59 | 22 | ||
60 | #endif /* __KERNEL__ */ | ||
61 | |||
62 | #endif /* __ASM_AVR32_TERMIOS_H */ | 23 | #endif /* __ASM_AVR32_TERMIOS_H */ |
diff --git a/arch/avr32/include/asm/thread_info.h b/arch/avr32/include/asm/thread_info.h index e5deda4691d..6dc62e1f94c 100644 --- a/arch/avr32/include/asm/thread_info.h +++ b/arch/avr32/include/asm/thread_info.h | |||
@@ -77,8 +77,6 @@ static inline struct thread_info *current_thread_info(void) | |||
77 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 77 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
78 | #define TIF_SIGPENDING 1 /* signal pending */ | 78 | #define TIF_SIGPENDING 1 /* signal pending */ |
79 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 79 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
80 | #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling | ||
81 | TIF_NEED_RESCHED */ | ||
82 | #define TIF_BREAKPOINT 4 /* enter monitor mode on return */ | 80 | #define TIF_BREAKPOINT 4 /* enter monitor mode on return */ |
83 | #define TIF_SINGLE_STEP 5 /* single step in progress */ | 81 | #define TIF_SINGLE_STEP 5 /* single step in progress */ |
84 | #define TIF_MEMDIE 6 /* is terminating due to OOM killer */ | 82 | #define TIF_MEMDIE 6 /* is terminating due to OOM killer */ |
@@ -91,10 +89,9 @@ static inline struct thread_info *current_thread_info(void) | |||
91 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 89 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
92 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 90 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
93 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 91 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
94 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 92 | #define _TIF_BREAKPOINT (1 << TIF_BREAKPOINT) |
95 | #define _TIF_SINGLE_STEP (1 << TIF_SINGLE_STEP) | 93 | #define _TIF_SINGLE_STEP (1 << TIF_SINGLE_STEP) |
96 | #define _TIF_MEMDIE (1 << TIF_MEMDIE) | 94 | #define _TIF_MEMDIE (1 << TIF_MEMDIE) |
97 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | ||
98 | #define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP) | 95 | #define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP) |
99 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 96 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
100 | 97 | ||
@@ -102,17 +99,14 @@ static inline struct thread_info *current_thread_info(void) | |||
102 | 99 | ||
103 | /* work to do on interrupt/exception return */ | 100 | /* work to do on interrupt/exception return */ |
104 | #define _TIF_WORK_MASK \ | 101 | #define _TIF_WORK_MASK \ |
105 | ((1 << TIF_SIGPENDING) \ | 102 | (_TIF_SIGPENDING \ |
106 | | _TIF_NOTIFY_RESUME \ | 103 | | _TIF_NOTIFY_RESUME \ |
107 | | (1 << TIF_NEED_RESCHED) \ | 104 | | _TIF_NEED_RESCHED \ |
108 | | (1 << TIF_POLLING_NRFLAG) \ | 105 | | _TIF_BREAKPOINT) |
109 | | (1 << TIF_BREAKPOINT) \ | ||
110 | | (1 << TIF_RESTORE_SIGMASK)) | ||
111 | 106 | ||
112 | /* work to do on any return to userspace */ | 107 | /* work to do on any return to userspace */ |
113 | #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK | (1 << TIF_SYSCALL_TRACE) | \ | 108 | #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK | _TIF_SYSCALL_TRACE) |
114 | _TIF_NOTIFY_RESUME) | ||
115 | /* work to do on return from debug mode */ | 109 | /* work to do on return from debug mode */ |
116 | #define _TIF_DBGWORK_MASK (_TIF_WORK_MASK & ~(1 << TIF_BREAKPOINT)) | 110 | #define _TIF_DBGWORK_MASK (_TIF_WORK_MASK & ~_TIF_BREAKPOINT) |
117 | 111 | ||
118 | #endif /* __ASM_AVR32_THREAD_INFO_H */ | 112 | #endif /* __ASM_AVR32_THREAD_INFO_H */ |
diff --git a/arch/avr32/include/asm/types.h b/arch/avr32/include/asm/types.h index 9bb2d8b2e6c..59324058069 100644 --- a/arch/avr32/include/asm/types.h +++ b/arch/avr32/include/asm/types.h | |||
@@ -8,16 +8,12 @@ | |||
8 | #ifndef __ASM_AVR32_TYPES_H | 8 | #ifndef __ASM_AVR32_TYPES_H |
9 | #define __ASM_AVR32_TYPES_H | 9 | #define __ASM_AVR32_TYPES_H |
10 | 10 | ||
11 | #include <asm-generic/int-ll64.h> | 11 | #include <uapi/asm/types.h> |
12 | 12 | ||
13 | /* | 13 | /* |
14 | * These aren't exported outside the kernel to avoid name space clashes | 14 | * These aren't exported outside the kernel to avoid name space clashes |
15 | */ | 15 | */ |
16 | #ifdef __KERNEL__ | ||
17 | 16 | ||
18 | #define BITS_PER_LONG 32 | 17 | #define BITS_PER_LONG 32 |
19 | 18 | ||
20 | #endif /* __KERNEL__ */ | ||
21 | |||
22 | |||
23 | #endif /* __ASM_AVR32_TYPES_H */ | 19 | #endif /* __ASM_AVR32_TYPES_H */ |
diff --git a/arch/avr32/include/asm/unistd.h b/arch/avr32/include/asm/unistd.h index 1358e366f4b..157b4bd3d5e 100644 --- a/arch/avr32/include/asm/unistd.h +++ b/arch/avr32/include/asm/unistd.h | |||
@@ -8,300 +8,8 @@ | |||
8 | #ifndef __ASM_AVR32_UNISTD_H | 8 | #ifndef __ASM_AVR32_UNISTD_H |
9 | #define __ASM_AVR32_UNISTD_H | 9 | #define __ASM_AVR32_UNISTD_H |
10 | 10 | ||
11 | /* | 11 | #include <uapi/asm/unistd.h> |
12 | * This file contains the system call numbers. | ||
13 | */ | ||
14 | |||
15 | #define __NR_restart_syscall 0 | ||
16 | #define __NR_exit 1 | ||
17 | #define __NR_fork 2 | ||
18 | #define __NR_read 3 | ||
19 | #define __NR_write 4 | ||
20 | #define __NR_open 5 | ||
21 | #define __NR_close 6 | ||
22 | #define __NR_umask 7 | ||
23 | #define __NR_creat 8 | ||
24 | #define __NR_link 9 | ||
25 | #define __NR_unlink 10 | ||
26 | #define __NR_execve 11 | ||
27 | #define __NR_chdir 12 | ||
28 | #define __NR_time 13 | ||
29 | #define __NR_mknod 14 | ||
30 | #define __NR_chmod 15 | ||
31 | #define __NR_chown 16 | ||
32 | #define __NR_lchown 17 | ||
33 | #define __NR_lseek 18 | ||
34 | #define __NR__llseek 19 | ||
35 | #define __NR_getpid 20 | ||
36 | #define __NR_mount 21 | ||
37 | #define __NR_umount2 22 | ||
38 | #define __NR_setuid 23 | ||
39 | #define __NR_getuid 24 | ||
40 | #define __NR_stime 25 | ||
41 | #define __NR_ptrace 26 | ||
42 | #define __NR_alarm 27 | ||
43 | #define __NR_pause 28 | ||
44 | #define __NR_utime 29 | ||
45 | #define __NR_stat 30 | ||
46 | #define __NR_fstat 31 | ||
47 | #define __NR_lstat 32 | ||
48 | #define __NR_access 33 | ||
49 | #define __NR_chroot 34 | ||
50 | #define __NR_sync 35 | ||
51 | #define __NR_fsync 36 | ||
52 | #define __NR_kill 37 | ||
53 | #define __NR_rename 38 | ||
54 | #define __NR_mkdir 39 | ||
55 | #define __NR_rmdir 40 | ||
56 | #define __NR_dup 41 | ||
57 | #define __NR_pipe 42 | ||
58 | #define __NR_times 43 | ||
59 | #define __NR_clone 44 | ||
60 | #define __NR_brk 45 | ||
61 | #define __NR_setgid 46 | ||
62 | #define __NR_getgid 47 | ||
63 | #define __NR_getcwd 48 | ||
64 | #define __NR_geteuid 49 | ||
65 | #define __NR_getegid 50 | ||
66 | #define __NR_acct 51 | ||
67 | #define __NR_setfsuid 52 | ||
68 | #define __NR_setfsgid 53 | ||
69 | #define __NR_ioctl 54 | ||
70 | #define __NR_fcntl 55 | ||
71 | #define __NR_setpgid 56 | ||
72 | #define __NR_mremap 57 | ||
73 | #define __NR_setresuid 58 | ||
74 | #define __NR_getresuid 59 | ||
75 | #define __NR_setreuid 60 | ||
76 | #define __NR_setregid 61 | ||
77 | #define __NR_ustat 62 | ||
78 | #define __NR_dup2 63 | ||
79 | #define __NR_getppid 64 | ||
80 | #define __NR_getpgrp 65 | ||
81 | #define __NR_setsid 66 | ||
82 | #define __NR_rt_sigaction 67 | ||
83 | #define __NR_rt_sigreturn 68 | ||
84 | #define __NR_rt_sigprocmask 69 | ||
85 | #define __NR_rt_sigpending 70 | ||
86 | #define __NR_rt_sigtimedwait 71 | ||
87 | #define __NR_rt_sigqueueinfo 72 | ||
88 | #define __NR_rt_sigsuspend 73 | ||
89 | #define __NR_sethostname 74 | ||
90 | #define __NR_setrlimit 75 | ||
91 | #define __NR_getrlimit 76 /* SuS compliant getrlimit */ | ||
92 | #define __NR_getrusage 77 | ||
93 | #define __NR_gettimeofday 78 | ||
94 | #define __NR_settimeofday 79 | ||
95 | #define __NR_getgroups 80 | ||
96 | #define __NR_setgroups 81 | ||
97 | #define __NR_select 82 | ||
98 | #define __NR_symlink 83 | ||
99 | #define __NR_fchdir 84 | ||
100 | #define __NR_readlink 85 | ||
101 | #define __NR_pread 86 | ||
102 | #define __NR_pwrite 87 | ||
103 | #define __NR_swapon 88 | ||
104 | #define __NR_reboot 89 | ||
105 | #define __NR_mmap2 90 | ||
106 | #define __NR_munmap 91 | ||
107 | #define __NR_truncate 92 | ||
108 | #define __NR_ftruncate 93 | ||
109 | #define __NR_fchmod 94 | ||
110 | #define __NR_fchown 95 | ||
111 | #define __NR_getpriority 96 | ||
112 | #define __NR_setpriority 97 | ||
113 | #define __NR_wait4 98 | ||
114 | #define __NR_statfs 99 | ||
115 | #define __NR_fstatfs 100 | ||
116 | #define __NR_vhangup 101 | ||
117 | #define __NR_sigaltstack 102 | ||
118 | #define __NR_syslog 103 | ||
119 | #define __NR_setitimer 104 | ||
120 | #define __NR_getitimer 105 | ||
121 | #define __NR_swapoff 106 | ||
122 | #define __NR_sysinfo 107 | ||
123 | /* 108 was __NR_ipc for a little while */ | ||
124 | #define __NR_sendfile 109 | ||
125 | #define __NR_setdomainname 110 | ||
126 | #define __NR_uname 111 | ||
127 | #define __NR_adjtimex 112 | ||
128 | #define __NR_mprotect 113 | ||
129 | #define __NR_vfork 114 | ||
130 | #define __NR_init_module 115 | ||
131 | #define __NR_delete_module 116 | ||
132 | #define __NR_quotactl 117 | ||
133 | #define __NR_getpgid 118 | ||
134 | #define __NR_bdflush 119 | ||
135 | #define __NR_sysfs 120 | ||
136 | #define __NR_personality 121 | ||
137 | #define __NR_afs_syscall 122 /* Syscall for Andrew File System */ | ||
138 | #define __NR_getdents 123 | ||
139 | #define __NR_flock 124 | ||
140 | #define __NR_msync 125 | ||
141 | #define __NR_readv 126 | ||
142 | #define __NR_writev 127 | ||
143 | #define __NR_getsid 128 | ||
144 | #define __NR_fdatasync 129 | ||
145 | #define __NR__sysctl 130 | ||
146 | #define __NR_mlock 131 | ||
147 | #define __NR_munlock 132 | ||
148 | #define __NR_mlockall 133 | ||
149 | #define __NR_munlockall 134 | ||
150 | #define __NR_sched_setparam 135 | ||
151 | #define __NR_sched_getparam 136 | ||
152 | #define __NR_sched_setscheduler 137 | ||
153 | #define __NR_sched_getscheduler 138 | ||
154 | #define __NR_sched_yield 139 | ||
155 | #define __NR_sched_get_priority_max 140 | ||
156 | #define __NR_sched_get_priority_min 141 | ||
157 | #define __NR_sched_rr_get_interval 142 | ||
158 | #define __NR_nanosleep 143 | ||
159 | #define __NR_poll 144 | ||
160 | #define __NR_nfsservctl 145 | ||
161 | #define __NR_setresgid 146 | ||
162 | #define __NR_getresgid 147 | ||
163 | #define __NR_prctl 148 | ||
164 | #define __NR_socket 149 | ||
165 | #define __NR_bind 150 | ||
166 | #define __NR_connect 151 | ||
167 | #define __NR_listen 152 | ||
168 | #define __NR_accept 153 | ||
169 | #define __NR_getsockname 154 | ||
170 | #define __NR_getpeername 155 | ||
171 | #define __NR_socketpair 156 | ||
172 | #define __NR_send 157 | ||
173 | #define __NR_recv 158 | ||
174 | #define __NR_sendto 159 | ||
175 | #define __NR_recvfrom 160 | ||
176 | #define __NR_shutdown 161 | ||
177 | #define __NR_setsockopt 162 | ||
178 | #define __NR_getsockopt 163 | ||
179 | #define __NR_sendmsg 164 | ||
180 | #define __NR_recvmsg 165 | ||
181 | #define __NR_truncate64 166 | ||
182 | #define __NR_ftruncate64 167 | ||
183 | #define __NR_stat64 168 | ||
184 | #define __NR_lstat64 169 | ||
185 | #define __NR_fstat64 170 | ||
186 | #define __NR_pivot_root 171 | ||
187 | #define __NR_mincore 172 | ||
188 | #define __NR_madvise 173 | ||
189 | #define __NR_getdents64 174 | ||
190 | #define __NR_fcntl64 175 | ||
191 | #define __NR_gettid 176 | ||
192 | #define __NR_readahead 177 | ||
193 | #define __NR_setxattr 178 | ||
194 | #define __NR_lsetxattr 179 | ||
195 | #define __NR_fsetxattr 180 | ||
196 | #define __NR_getxattr 181 | ||
197 | #define __NR_lgetxattr 182 | ||
198 | #define __NR_fgetxattr 183 | ||
199 | #define __NR_listxattr 184 | ||
200 | #define __NR_llistxattr 185 | ||
201 | #define __NR_flistxattr 186 | ||
202 | #define __NR_removexattr 187 | ||
203 | #define __NR_lremovexattr 188 | ||
204 | #define __NR_fremovexattr 189 | ||
205 | #define __NR_tkill 190 | ||
206 | #define __NR_sendfile64 191 | ||
207 | #define __NR_futex 192 | ||
208 | #define __NR_sched_setaffinity 193 | ||
209 | #define __NR_sched_getaffinity 194 | ||
210 | #define __NR_capget 195 | ||
211 | #define __NR_capset 196 | ||
212 | #define __NR_io_setup 197 | ||
213 | #define __NR_io_destroy 198 | ||
214 | #define __NR_io_getevents 199 | ||
215 | #define __NR_io_submit 200 | ||
216 | #define __NR_io_cancel 201 | ||
217 | #define __NR_fadvise64 202 | ||
218 | #define __NR_exit_group 203 | ||
219 | #define __NR_lookup_dcookie 204 | ||
220 | #define __NR_epoll_create 205 | ||
221 | #define __NR_epoll_ctl 206 | ||
222 | #define __NR_epoll_wait 207 | ||
223 | #define __NR_remap_file_pages 208 | ||
224 | #define __NR_set_tid_address 209 | ||
225 | |||
226 | #define __NR_timer_create 210 | ||
227 | #define __NR_timer_settime 211 | ||
228 | #define __NR_timer_gettime 212 | ||
229 | #define __NR_timer_getoverrun 213 | ||
230 | #define __NR_timer_delete 214 | ||
231 | #define __NR_clock_settime 215 | ||
232 | #define __NR_clock_gettime 216 | ||
233 | #define __NR_clock_getres 217 | ||
234 | #define __NR_clock_nanosleep 218 | ||
235 | #define __NR_statfs64 219 | ||
236 | #define __NR_fstatfs64 220 | ||
237 | #define __NR_tgkill 221 | ||
238 | /* 222 reserved for tux */ | ||
239 | #define __NR_utimes 223 | ||
240 | #define __NR_fadvise64_64 224 | ||
241 | |||
242 | #define __NR_cacheflush 225 | ||
243 | 12 | ||
244 | #define __NR_vserver 226 | ||
245 | #define __NR_mq_open 227 | ||
246 | #define __NR_mq_unlink 228 | ||
247 | #define __NR_mq_timedsend 229 | ||
248 | #define __NR_mq_timedreceive 230 | ||
249 | #define __NR_mq_notify 231 | ||
250 | #define __NR_mq_getsetattr 232 | ||
251 | #define __NR_kexec_load 233 | ||
252 | #define __NR_waitid 234 | ||
253 | #define __NR_add_key 235 | ||
254 | #define __NR_request_key 236 | ||
255 | #define __NR_keyctl 237 | ||
256 | #define __NR_ioprio_set 238 | ||
257 | #define __NR_ioprio_get 239 | ||
258 | #define __NR_inotify_init 240 | ||
259 | #define __NR_inotify_add_watch 241 | ||
260 | #define __NR_inotify_rm_watch 242 | ||
261 | #define __NR_openat 243 | ||
262 | #define __NR_mkdirat 244 | ||
263 | #define __NR_mknodat 245 | ||
264 | #define __NR_fchownat 246 | ||
265 | #define __NR_futimesat 247 | ||
266 | #define __NR_fstatat64 248 | ||
267 | #define __NR_unlinkat 249 | ||
268 | #define __NR_renameat 250 | ||
269 | #define __NR_linkat 251 | ||
270 | #define __NR_symlinkat 252 | ||
271 | #define __NR_readlinkat 253 | ||
272 | #define __NR_fchmodat 254 | ||
273 | #define __NR_faccessat 255 | ||
274 | #define __NR_pselect6 256 | ||
275 | #define __NR_ppoll 257 | ||
276 | #define __NR_unshare 258 | ||
277 | #define __NR_set_robust_list 259 | ||
278 | #define __NR_get_robust_list 260 | ||
279 | #define __NR_splice 261 | ||
280 | #define __NR_sync_file_range 262 | ||
281 | #define __NR_tee 263 | ||
282 | #define __NR_vmsplice 264 | ||
283 | #define __NR_epoll_pwait 265 | ||
284 | |||
285 | #define __NR_msgget 266 | ||
286 | #define __NR_msgsnd 267 | ||
287 | #define __NR_msgrcv 268 | ||
288 | #define __NR_msgctl 269 | ||
289 | #define __NR_semget 270 | ||
290 | #define __NR_semop 271 | ||
291 | #define __NR_semctl 272 | ||
292 | #define __NR_semtimedop 273 | ||
293 | #define __NR_shmat 274 | ||
294 | #define __NR_shmget 275 | ||
295 | #define __NR_shmdt 276 | ||
296 | #define __NR_shmctl 277 | ||
297 | |||
298 | #define __NR_utimensat 278 | ||
299 | #define __NR_signalfd 279 | ||
300 | /* 280 was __NR_timerfd */ | ||
301 | #define __NR_eventfd 281 | ||
302 | #define __NR_setns 283 | ||
303 | |||
304 | #ifdef __KERNEL__ | ||
305 | #define NR_syscalls 284 | 13 | #define NR_syscalls 284 |
306 | 14 | ||
307 | /* Old stuff */ | 15 | /* Old stuff */ |
@@ -340,6 +48,4 @@ | |||
340 | */ | 48 | */ |
341 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); | 49 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); |
342 | 50 | ||
343 | #endif /* __KERNEL__ */ | ||
344 | |||
345 | #endif /* __ASM_AVR32_UNISTD_H */ | 51 | #endif /* __ASM_AVR32_UNISTD_H */ |
diff --git a/arch/avr32/include/uapi/asm/Kbuild b/arch/avr32/include/uapi/asm/Kbuild index baebb3da1d4..df53e7a4677 100644 --- a/arch/avr32/include/uapi/asm/Kbuild +++ b/arch/avr32/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,35 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += auxvec.h | ||
5 | header-y += bitsperlong.h | ||
6 | header-y += byteorder.h | ||
7 | header-y += cachectl.h | ||
8 | header-y += errno.h | ||
9 | header-y += fcntl.h | ||
10 | header-y += ioctl.h | ||
11 | header-y += ioctls.h | ||
12 | header-y += ipcbuf.h | ||
13 | header-y += kvm_para.h | ||
14 | header-y += mman.h | ||
15 | header-y += msgbuf.h | ||
16 | header-y += param.h | ||
17 | header-y += poll.h | ||
18 | header-y += posix_types.h | ||
19 | header-y += ptrace.h | ||
20 | header-y += resource.h | ||
21 | header-y += sembuf.h | ||
22 | header-y += setup.h | ||
23 | header-y += shmbuf.h | ||
24 | header-y += sigcontext.h | ||
25 | header-y += siginfo.h | ||
26 | header-y += signal.h | ||
27 | header-y += socket.h | ||
28 | header-y += sockios.h | ||
29 | header-y += stat.h | ||
30 | header-y += statfs.h | ||
31 | header-y += swab.h | ||
32 | header-y += termbits.h | ||
33 | header-y += termios.h | ||
34 | header-y += types.h | ||
35 | header-y += unistd.h | ||
diff --git a/arch/avr32/include/asm/auxvec.h b/arch/avr32/include/uapi/asm/auxvec.h index d5dd435bf8f..d5dd435bf8f 100644 --- a/arch/avr32/include/asm/auxvec.h +++ b/arch/avr32/include/uapi/asm/auxvec.h | |||
diff --git a/arch/avr32/include/asm/bitsperlong.h b/arch/avr32/include/uapi/asm/bitsperlong.h index 6dc0bb0c13b..6dc0bb0c13b 100644 --- a/arch/avr32/include/asm/bitsperlong.h +++ b/arch/avr32/include/uapi/asm/bitsperlong.h | |||
diff --git a/arch/avr32/include/asm/byteorder.h b/arch/avr32/include/uapi/asm/byteorder.h index 50abc21619a..50abc21619a 100644 --- a/arch/avr32/include/asm/byteorder.h +++ b/arch/avr32/include/uapi/asm/byteorder.h | |||
diff --git a/arch/avr32/include/asm/cachectl.h b/arch/avr32/include/uapi/asm/cachectl.h index 4faf1ce6006..4faf1ce6006 100644 --- a/arch/avr32/include/asm/cachectl.h +++ b/arch/avr32/include/uapi/asm/cachectl.h | |||
diff --git a/arch/avr32/include/asm/errno.h b/arch/avr32/include/uapi/asm/errno.h index 558a7249f06..558a7249f06 100644 --- a/arch/avr32/include/asm/errno.h +++ b/arch/avr32/include/uapi/asm/errno.h | |||
diff --git a/arch/avr32/include/asm/fcntl.h b/arch/avr32/include/uapi/asm/fcntl.h index 14c0c4402b1..14c0c4402b1 100644 --- a/arch/avr32/include/asm/fcntl.h +++ b/arch/avr32/include/uapi/asm/fcntl.h | |||
diff --git a/arch/avr32/include/asm/ioctl.h b/arch/avr32/include/uapi/asm/ioctl.h index c8472c1398e..c8472c1398e 100644 --- a/arch/avr32/include/asm/ioctl.h +++ b/arch/avr32/include/uapi/asm/ioctl.h | |||
diff --git a/arch/avr32/include/asm/ioctls.h b/arch/avr32/include/uapi/asm/ioctls.h index 909cf66feaf..909cf66feaf 100644 --- a/arch/avr32/include/asm/ioctls.h +++ b/arch/avr32/include/uapi/asm/ioctls.h | |||
diff --git a/arch/avr32/include/asm/ipcbuf.h b/arch/avr32/include/uapi/asm/ipcbuf.h index 84c7e51cb6d..84c7e51cb6d 100644 --- a/arch/avr32/include/asm/ipcbuf.h +++ b/arch/avr32/include/uapi/asm/ipcbuf.h | |||
diff --git a/arch/avr32/include/asm/kvm_para.h b/arch/avr32/include/uapi/asm/kvm_para.h index 14fab8f0b95..14fab8f0b95 100644 --- a/arch/avr32/include/asm/kvm_para.h +++ b/arch/avr32/include/uapi/asm/kvm_para.h | |||
diff --git a/arch/avr32/include/asm/mman.h b/arch/avr32/include/uapi/asm/mman.h index 8eebf89f5ab..8eebf89f5ab 100644 --- a/arch/avr32/include/asm/mman.h +++ b/arch/avr32/include/uapi/asm/mman.h | |||
diff --git a/arch/avr32/include/asm/msgbuf.h b/arch/avr32/include/uapi/asm/msgbuf.h index ac18bc4da7f..ac18bc4da7f 100644 --- a/arch/avr32/include/asm/msgbuf.h +++ b/arch/avr32/include/uapi/asm/msgbuf.h | |||
diff --git a/arch/avr32/include/uapi/asm/param.h b/arch/avr32/include/uapi/asm/param.h new file mode 100644 index 00000000000..d28aa5ee6d3 --- /dev/null +++ b/arch/avr32/include/uapi/asm/param.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef _UAPI__ASM_AVR32_PARAM_H | ||
2 | #define _UAPI__ASM_AVR32_PARAM_H | ||
3 | |||
4 | |||
5 | #ifndef HZ | ||
6 | # define HZ 100 | ||
7 | #endif | ||
8 | |||
9 | /* TODO: Should be configurable */ | ||
10 | #define EXEC_PAGESIZE 4096 | ||
11 | |||
12 | #ifndef NOGROUP | ||
13 | # define NOGROUP (-1) | ||
14 | #endif | ||
15 | |||
16 | #define MAXHOSTNAMELEN 64 | ||
17 | |||
18 | #endif /* _UAPI__ASM_AVR32_PARAM_H */ | ||
diff --git a/arch/avr32/include/asm/poll.h b/arch/avr32/include/uapi/asm/poll.h index c98509d3149..c98509d3149 100644 --- a/arch/avr32/include/asm/poll.h +++ b/arch/avr32/include/uapi/asm/poll.h | |||
diff --git a/arch/avr32/include/asm/posix_types.h b/arch/avr32/include/uapi/asm/posix_types.h index 9ba9e749b3f..9ba9e749b3f 100644 --- a/arch/avr32/include/asm/posix_types.h +++ b/arch/avr32/include/uapi/asm/posix_types.h | |||
diff --git a/arch/avr32/include/uapi/asm/ptrace.h b/arch/avr32/include/uapi/asm/ptrace.h new file mode 100644 index 00000000000..fe8c16275bc --- /dev/null +++ b/arch/avr32/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,126 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004-2006 Atmel Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | #ifndef _UAPI__ASM_AVR32_PTRACE_H | ||
9 | #define _UAPI__ASM_AVR32_PTRACE_H | ||
10 | |||
11 | #define PTRACE_GETREGS 12 | ||
12 | #define PTRACE_SETREGS 13 | ||
13 | |||
14 | /* | ||
15 | * Status Register bits | ||
16 | */ | ||
17 | #define SR_H 0x20000000 | ||
18 | #define SR_J 0x10000000 | ||
19 | #define SR_DM 0x08000000 | ||
20 | #define SR_D 0x04000000 | ||
21 | #define MODE_NMI 0x01c00000 | ||
22 | #define MODE_EXCEPTION 0x01800000 | ||
23 | #define MODE_INT3 0x01400000 | ||
24 | #define MODE_INT2 0x01000000 | ||
25 | #define MODE_INT1 0x00c00000 | ||
26 | #define MODE_INT0 0x00800000 | ||
27 | #define MODE_SUPERVISOR 0x00400000 | ||
28 | #define MODE_USER 0x00000000 | ||
29 | #define MODE_MASK 0x01c00000 | ||
30 | #define SR_EM 0x00200000 | ||
31 | #define SR_I3M 0x00100000 | ||
32 | #define SR_I2M 0x00080000 | ||
33 | #define SR_I1M 0x00040000 | ||
34 | #define SR_I0M 0x00020000 | ||
35 | #define SR_GM 0x00010000 | ||
36 | |||
37 | #define SR_H_BIT 29 | ||
38 | #define SR_J_BIT 28 | ||
39 | #define SR_DM_BIT 27 | ||
40 | #define SR_D_BIT 26 | ||
41 | #define MODE_SHIFT 22 | ||
42 | #define SR_EM_BIT 21 | ||
43 | #define SR_I3M_BIT 20 | ||
44 | #define SR_I2M_BIT 19 | ||
45 | #define SR_I1M_BIT 18 | ||
46 | #define SR_I0M_BIT 17 | ||
47 | #define SR_GM_BIT 16 | ||
48 | |||
49 | /* The user-visible part */ | ||
50 | #define SR_L 0x00000020 | ||
51 | #define SR_Q 0x00000010 | ||
52 | #define SR_V 0x00000008 | ||
53 | #define SR_N 0x00000004 | ||
54 | #define SR_Z 0x00000002 | ||
55 | #define SR_C 0x00000001 | ||
56 | |||
57 | #define SR_L_BIT 5 | ||
58 | #define SR_Q_BIT 4 | ||
59 | #define SR_V_BIT 3 | ||
60 | #define SR_N_BIT 2 | ||
61 | #define SR_Z_BIT 1 | ||
62 | #define SR_C_BIT 0 | ||
63 | |||
64 | /* | ||
65 | * The order is defined by the stmts instruction. r0 is stored first, | ||
66 | * so it gets the highest address. | ||
67 | * | ||
68 | * Registers 0-12 are general-purpose registers (r12 is normally used for | ||
69 | * the function return value). | ||
70 | * Register 13 is the stack pointer | ||
71 | * Register 14 is the link register | ||
72 | * Register 15 is the program counter (retrieved from the RAR sysreg) | ||
73 | */ | ||
74 | #define FRAME_SIZE_FULL 72 | ||
75 | #define REG_R12_ORIG 68 | ||
76 | #define REG_R0 64 | ||
77 | #define REG_R1 60 | ||
78 | #define REG_R2 56 | ||
79 | #define REG_R3 52 | ||
80 | #define REG_R4 48 | ||
81 | #define REG_R5 44 | ||
82 | #define REG_R6 40 | ||
83 | #define REG_R7 36 | ||
84 | #define REG_R8 32 | ||
85 | #define REG_R9 28 | ||
86 | #define REG_R10 24 | ||
87 | #define REG_R11 20 | ||
88 | #define REG_R12 16 | ||
89 | #define REG_SP 12 | ||
90 | #define REG_LR 8 | ||
91 | |||
92 | #define FRAME_SIZE_MIN 8 | ||
93 | #define REG_PC 4 | ||
94 | #define REG_SR 0 | ||
95 | |||
96 | #ifndef __ASSEMBLY__ | ||
97 | struct pt_regs { | ||
98 | /* These are always saved */ | ||
99 | unsigned long sr; | ||
100 | unsigned long pc; | ||
101 | |||
102 | /* These are sometimes saved */ | ||
103 | unsigned long lr; | ||
104 | unsigned long sp; | ||
105 | unsigned long r12; | ||
106 | unsigned long r11; | ||
107 | unsigned long r10; | ||
108 | unsigned long r9; | ||
109 | unsigned long r8; | ||
110 | unsigned long r7; | ||
111 | unsigned long r6; | ||
112 | unsigned long r5; | ||
113 | unsigned long r4; | ||
114 | unsigned long r3; | ||
115 | unsigned long r2; | ||
116 | unsigned long r1; | ||
117 | unsigned long r0; | ||
118 | |||
119 | /* Only saved on system call */ | ||
120 | unsigned long r12_orig; | ||
121 | }; | ||
122 | |||
123 | |||
124 | #endif /* ! __ASSEMBLY__ */ | ||
125 | |||
126 | #endif /* _UAPI__ASM_AVR32_PTRACE_H */ | ||
diff --git a/arch/avr32/include/asm/resource.h b/arch/avr32/include/uapi/asm/resource.h index c6dd101472b..c6dd101472b 100644 --- a/arch/avr32/include/asm/resource.h +++ b/arch/avr32/include/uapi/asm/resource.h | |||
diff --git a/arch/avr32/include/asm/sembuf.h b/arch/avr32/include/uapi/asm/sembuf.h index e472216e0c9..e472216e0c9 100644 --- a/arch/avr32/include/asm/sembuf.h +++ b/arch/avr32/include/uapi/asm/sembuf.h | |||
diff --git a/arch/avr32/include/uapi/asm/setup.h b/arch/avr32/include/uapi/asm/setup.h new file mode 100644 index 00000000000..e58aa9356fa --- /dev/null +++ b/arch/avr32/include/uapi/asm/setup.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004-2006 Atmel Corporation | ||
3 | * | ||
4 | * Based on linux/include/asm-arm/setup.h | ||
5 | * Copyright (C) 1997-1999 Russell King | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef _UAPI__ASM_AVR32_SETUP_H__ | ||
12 | #define _UAPI__ASM_AVR32_SETUP_H__ | ||
13 | |||
14 | #define COMMAND_LINE_SIZE 256 | ||
15 | |||
16 | |||
17 | #endif /* _UAPI__ASM_AVR32_SETUP_H__ */ | ||
diff --git a/arch/avr32/include/asm/shmbuf.h b/arch/avr32/include/uapi/asm/shmbuf.h index c62fba41739..c62fba41739 100644 --- a/arch/avr32/include/asm/shmbuf.h +++ b/arch/avr32/include/uapi/asm/shmbuf.h | |||
diff --git a/arch/avr32/include/asm/sigcontext.h b/arch/avr32/include/uapi/asm/sigcontext.h index e04062b5f39..e04062b5f39 100644 --- a/arch/avr32/include/asm/sigcontext.h +++ b/arch/avr32/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/avr32/include/asm/siginfo.h b/arch/avr32/include/uapi/asm/siginfo.h index 5ee93f40a8a..5ee93f40a8a 100644 --- a/arch/avr32/include/asm/siginfo.h +++ b/arch/avr32/include/uapi/asm/siginfo.h | |||
diff --git a/arch/avr32/include/uapi/asm/signal.h b/arch/avr32/include/uapi/asm/signal.h new file mode 100644 index 00000000000..eb46f61adb7 --- /dev/null +++ b/arch/avr32/include/uapi/asm/signal.h | |||
@@ -0,0 +1,128 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004-2006 Atmel Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | #ifndef _UAPI__ASM_AVR32_SIGNAL_H | ||
9 | #define _UAPI__ASM_AVR32_SIGNAL_H | ||
10 | |||
11 | #include <linux/types.h> | ||
12 | |||
13 | /* Avoid too many header ordering problems. */ | ||
14 | struct siginfo; | ||
15 | |||
16 | #ifndef __KERNEL__ | ||
17 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
18 | |||
19 | #define NSIG 32 | ||
20 | typedef unsigned long sigset_t; | ||
21 | |||
22 | #endif /* __KERNEL__ */ | ||
23 | |||
24 | #define SIGHUP 1 | ||
25 | #define SIGINT 2 | ||
26 | #define SIGQUIT 3 | ||
27 | #define SIGILL 4 | ||
28 | #define SIGTRAP 5 | ||
29 | #define SIGABRT 6 | ||
30 | #define SIGIOT 6 | ||
31 | #define SIGBUS 7 | ||
32 | #define SIGFPE 8 | ||
33 | #define SIGKILL 9 | ||
34 | #define SIGUSR1 10 | ||
35 | #define SIGSEGV 11 | ||
36 | #define SIGUSR2 12 | ||
37 | #define SIGPIPE 13 | ||
38 | #define SIGALRM 14 | ||
39 | #define SIGTERM 15 | ||
40 | #define SIGSTKFLT 16 | ||
41 | #define SIGCHLD 17 | ||
42 | #define SIGCONT 18 | ||
43 | #define SIGSTOP 19 | ||
44 | #define SIGTSTP 20 | ||
45 | #define SIGTTIN 21 | ||
46 | #define SIGTTOU 22 | ||
47 | #define SIGURG 23 | ||
48 | #define SIGXCPU 24 | ||
49 | #define SIGXFSZ 25 | ||
50 | #define SIGVTALRM 26 | ||
51 | #define SIGPROF 27 | ||
52 | #define SIGWINCH 28 | ||
53 | #define SIGIO 29 | ||
54 | #define SIGPOLL SIGIO | ||
55 | /* | ||
56 | #define SIGLOST 29 | ||
57 | */ | ||
58 | #define SIGPWR 30 | ||
59 | #define SIGSYS 31 | ||
60 | #define SIGUNUSED 31 | ||
61 | |||
62 | /* These should not be considered constants from userland. */ | ||
63 | #define SIGRTMIN 32 | ||
64 | #define SIGRTMAX (_NSIG-1) | ||
65 | |||
66 | /* | ||
67 | * SA_FLAGS values: | ||
68 | * | ||
69 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
70 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
71 | * SA_SIGINFO deliver the signal with SIGINFO structs | ||
72 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
73 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
74 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
75 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
76 | * | ||
77 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
78 | * Unix names RESETHAND and NODEFER respectively. | ||
79 | */ | ||
80 | #define SA_NOCLDSTOP 0x00000001 | ||
81 | #define SA_NOCLDWAIT 0x00000002 | ||
82 | #define SA_SIGINFO 0x00000004 | ||
83 | #define SA_RESTORER 0x04000000 | ||
84 | #define SA_ONSTACK 0x08000000 | ||
85 | #define SA_RESTART 0x10000000 | ||
86 | #define SA_NODEFER 0x40000000 | ||
87 | #define SA_RESETHAND 0x80000000 | ||
88 | |||
89 | #define SA_NOMASK SA_NODEFER | ||
90 | #define SA_ONESHOT SA_RESETHAND | ||
91 | |||
92 | /* | ||
93 | * sigaltstack controls | ||
94 | */ | ||
95 | #define SS_ONSTACK 1 | ||
96 | #define SS_DISABLE 2 | ||
97 | |||
98 | #define MINSIGSTKSZ 2048 | ||
99 | #define SIGSTKSZ 8192 | ||
100 | |||
101 | #include <asm-generic/signal-defs.h> | ||
102 | |||
103 | #ifndef __KERNEL__ | ||
104 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
105 | |||
106 | struct sigaction { | ||
107 | union { | ||
108 | __sighandler_t _sa_handler; | ||
109 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
110 | } _u; | ||
111 | sigset_t sa_mask; | ||
112 | unsigned long sa_flags; | ||
113 | void (*sa_restorer)(void); | ||
114 | }; | ||
115 | |||
116 | #define sa_handler _u._sa_handler | ||
117 | #define sa_sigaction _u._sa_sigaction | ||
118 | |||
119 | #endif /* __KERNEL__ */ | ||
120 | |||
121 | typedef struct sigaltstack { | ||
122 | void __user *ss_sp; | ||
123 | int ss_flags; | ||
124 | size_t ss_size; | ||
125 | } stack_t; | ||
126 | |||
127 | |||
128 | #endif /* _UAPI__ASM_AVR32_SIGNAL_H */ | ||
diff --git a/arch/avr32/include/asm/socket.h b/arch/avr32/include/uapi/asm/socket.h index a473f8c6a9a..a473f8c6a9a 100644 --- a/arch/avr32/include/asm/socket.h +++ b/arch/avr32/include/uapi/asm/socket.h | |||
diff --git a/arch/avr32/include/asm/sockios.h b/arch/avr32/include/uapi/asm/sockios.h index 0802d742f97..0802d742f97 100644 --- a/arch/avr32/include/asm/sockios.h +++ b/arch/avr32/include/uapi/asm/sockios.h | |||
diff --git a/arch/avr32/include/asm/stat.h b/arch/avr32/include/uapi/asm/stat.h index e72881e1023..e72881e1023 100644 --- a/arch/avr32/include/asm/stat.h +++ b/arch/avr32/include/uapi/asm/stat.h | |||
diff --git a/arch/avr32/include/asm/statfs.h b/arch/avr32/include/uapi/asm/statfs.h index 2961bd18c50..2961bd18c50 100644 --- a/arch/avr32/include/asm/statfs.h +++ b/arch/avr32/include/uapi/asm/statfs.h | |||
diff --git a/arch/avr32/include/asm/swab.h b/arch/avr32/include/uapi/asm/swab.h index 14cc737bbca..14cc737bbca 100644 --- a/arch/avr32/include/asm/swab.h +++ b/arch/avr32/include/uapi/asm/swab.h | |||
diff --git a/arch/avr32/include/asm/termbits.h b/arch/avr32/include/uapi/asm/termbits.h index 366adc5ebb1..366adc5ebb1 100644 --- a/arch/avr32/include/asm/termbits.h +++ b/arch/avr32/include/uapi/asm/termbits.h | |||
diff --git a/arch/avr32/include/uapi/asm/termios.h b/arch/avr32/include/uapi/asm/termios.h new file mode 100644 index 00000000000..b8ef8ea6335 --- /dev/null +++ b/arch/avr32/include/uapi/asm/termios.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004-2006 Atmel Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | #ifndef _UAPI__ASM_AVR32_TERMIOS_H | ||
9 | #define _UAPI__ASM_AVR32_TERMIOS_H | ||
10 | |||
11 | #include <asm/termbits.h> | ||
12 | #include <asm/ioctls.h> | ||
13 | |||
14 | struct winsize { | ||
15 | unsigned short ws_row; | ||
16 | unsigned short ws_col; | ||
17 | unsigned short ws_xpixel; | ||
18 | unsigned short ws_ypixel; | ||
19 | }; | ||
20 | |||
21 | #define NCC 8 | ||
22 | struct termio { | ||
23 | unsigned short c_iflag; /* input mode flags */ | ||
24 | unsigned short c_oflag; /* output mode flags */ | ||
25 | unsigned short c_cflag; /* control mode flags */ | ||
26 | unsigned short c_lflag; /* local mode flags */ | ||
27 | unsigned char c_line; /* line discipline */ | ||
28 | unsigned char c_cc[NCC]; /* control characters */ | ||
29 | }; | ||
30 | |||
31 | /* modem lines */ | ||
32 | #define TIOCM_LE 0x001 | ||
33 | #define TIOCM_DTR 0x002 | ||
34 | #define TIOCM_RTS 0x004 | ||
35 | #define TIOCM_ST 0x008 | ||
36 | #define TIOCM_SR 0x010 | ||
37 | #define TIOCM_CTS 0x020 | ||
38 | #define TIOCM_CAR 0x040 | ||
39 | #define TIOCM_RNG 0x080 | ||
40 | #define TIOCM_DSR 0x100 | ||
41 | #define TIOCM_CD TIOCM_CAR | ||
42 | #define TIOCM_RI TIOCM_RNG | ||
43 | #define TIOCM_OUT1 0x2000 | ||
44 | #define TIOCM_OUT2 0x4000 | ||
45 | #define TIOCM_LOOP 0x8000 | ||
46 | |||
47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
48 | |||
49 | |||
50 | #endif /* _UAPI__ASM_AVR32_TERMIOS_H */ | ||
diff --git a/arch/avr32/include/uapi/asm/types.h b/arch/avr32/include/uapi/asm/types.h new file mode 100644 index 00000000000..bb34ad349df --- /dev/null +++ b/arch/avr32/include/uapi/asm/types.h | |||
@@ -0,0 +1,8 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004-2006 Atmel Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | #include <asm-generic/int-ll64.h> | ||
diff --git a/arch/avr32/include/uapi/asm/unistd.h b/arch/avr32/include/uapi/asm/unistd.h new file mode 100644 index 00000000000..3eaa68753ad --- /dev/null +++ b/arch/avr32/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,305 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004-2006 Atmel Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | #ifndef _UAPI__ASM_AVR32_UNISTD_H | ||
9 | #define _UAPI__ASM_AVR32_UNISTD_H | ||
10 | |||
11 | /* | ||
12 | * This file contains the system call numbers. | ||
13 | */ | ||
14 | |||
15 | #define __NR_restart_syscall 0 | ||
16 | #define __NR_exit 1 | ||
17 | #define __NR_fork 2 | ||
18 | #define __NR_read 3 | ||
19 | #define __NR_write 4 | ||
20 | #define __NR_open 5 | ||
21 | #define __NR_close 6 | ||
22 | #define __NR_umask 7 | ||
23 | #define __NR_creat 8 | ||
24 | #define __NR_link 9 | ||
25 | #define __NR_unlink 10 | ||
26 | #define __NR_execve 11 | ||
27 | #define __NR_chdir 12 | ||
28 | #define __NR_time 13 | ||
29 | #define __NR_mknod 14 | ||
30 | #define __NR_chmod 15 | ||
31 | #define __NR_chown 16 | ||
32 | #define __NR_lchown 17 | ||
33 | #define __NR_lseek 18 | ||
34 | #define __NR__llseek 19 | ||
35 | #define __NR_getpid 20 | ||
36 | #define __NR_mount 21 | ||
37 | #define __NR_umount2 22 | ||
38 | #define __NR_setuid 23 | ||
39 | #define __NR_getuid 24 | ||
40 | #define __NR_stime 25 | ||
41 | #define __NR_ptrace 26 | ||
42 | #define __NR_alarm 27 | ||
43 | #define __NR_pause 28 | ||
44 | #define __NR_utime 29 | ||
45 | #define __NR_stat 30 | ||
46 | #define __NR_fstat 31 | ||
47 | #define __NR_lstat 32 | ||
48 | #define __NR_access 33 | ||
49 | #define __NR_chroot 34 | ||
50 | #define __NR_sync 35 | ||
51 | #define __NR_fsync 36 | ||
52 | #define __NR_kill 37 | ||
53 | #define __NR_rename 38 | ||
54 | #define __NR_mkdir 39 | ||
55 | #define __NR_rmdir 40 | ||
56 | #define __NR_dup 41 | ||
57 | #define __NR_pipe 42 | ||
58 | #define __NR_times 43 | ||
59 | #define __NR_clone 44 | ||
60 | #define __NR_brk 45 | ||
61 | #define __NR_setgid 46 | ||
62 | #define __NR_getgid 47 | ||
63 | #define __NR_getcwd 48 | ||
64 | #define __NR_geteuid 49 | ||
65 | #define __NR_getegid 50 | ||
66 | #define __NR_acct 51 | ||
67 | #define __NR_setfsuid 52 | ||
68 | #define __NR_setfsgid 53 | ||
69 | #define __NR_ioctl 54 | ||
70 | #define __NR_fcntl 55 | ||
71 | #define __NR_setpgid 56 | ||
72 | #define __NR_mremap 57 | ||
73 | #define __NR_setresuid 58 | ||
74 | #define __NR_getresuid 59 | ||
75 | #define __NR_setreuid 60 | ||
76 | #define __NR_setregid 61 | ||
77 | #define __NR_ustat 62 | ||
78 | #define __NR_dup2 63 | ||
79 | #define __NR_getppid 64 | ||
80 | #define __NR_getpgrp 65 | ||
81 | #define __NR_setsid 66 | ||
82 | #define __NR_rt_sigaction 67 | ||
83 | #define __NR_rt_sigreturn 68 | ||
84 | #define __NR_rt_sigprocmask 69 | ||
85 | #define __NR_rt_sigpending 70 | ||
86 | #define __NR_rt_sigtimedwait 71 | ||
87 | #define __NR_rt_sigqueueinfo 72 | ||
88 | #define __NR_rt_sigsuspend 73 | ||
89 | #define __NR_sethostname 74 | ||
90 | #define __NR_setrlimit 75 | ||
91 | #define __NR_getrlimit 76 /* SuS compliant getrlimit */ | ||
92 | #define __NR_getrusage 77 | ||
93 | #define __NR_gettimeofday 78 | ||
94 | #define __NR_settimeofday 79 | ||
95 | #define __NR_getgroups 80 | ||
96 | #define __NR_setgroups 81 | ||
97 | #define __NR_select 82 | ||
98 | #define __NR_symlink 83 | ||
99 | #define __NR_fchdir 84 | ||
100 | #define __NR_readlink 85 | ||
101 | #define __NR_pread 86 | ||
102 | #define __NR_pwrite 87 | ||
103 | #define __NR_swapon 88 | ||
104 | #define __NR_reboot 89 | ||
105 | #define __NR_mmap2 90 | ||
106 | #define __NR_munmap 91 | ||
107 | #define __NR_truncate 92 | ||
108 | #define __NR_ftruncate 93 | ||
109 | #define __NR_fchmod 94 | ||
110 | #define __NR_fchown 95 | ||
111 | #define __NR_getpriority 96 | ||
112 | #define __NR_setpriority 97 | ||
113 | #define __NR_wait4 98 | ||
114 | #define __NR_statfs 99 | ||
115 | #define __NR_fstatfs 100 | ||
116 | #define __NR_vhangup 101 | ||
117 | #define __NR_sigaltstack 102 | ||
118 | #define __NR_syslog 103 | ||
119 | #define __NR_setitimer 104 | ||
120 | #define __NR_getitimer 105 | ||
121 | #define __NR_swapoff 106 | ||
122 | #define __NR_sysinfo 107 | ||
123 | /* 108 was __NR_ipc for a little while */ | ||
124 | #define __NR_sendfile 109 | ||
125 | #define __NR_setdomainname 110 | ||
126 | #define __NR_uname 111 | ||
127 | #define __NR_adjtimex 112 | ||
128 | #define __NR_mprotect 113 | ||
129 | #define __NR_vfork 114 | ||
130 | #define __NR_init_module 115 | ||
131 | #define __NR_delete_module 116 | ||
132 | #define __NR_quotactl 117 | ||
133 | #define __NR_getpgid 118 | ||
134 | #define __NR_bdflush 119 | ||
135 | #define __NR_sysfs 120 | ||
136 | #define __NR_personality 121 | ||
137 | #define __NR_afs_syscall 122 /* Syscall for Andrew File System */ | ||
138 | #define __NR_getdents 123 | ||
139 | #define __NR_flock 124 | ||
140 | #define __NR_msync 125 | ||
141 | #define __NR_readv 126 | ||
142 | #define __NR_writev 127 | ||
143 | #define __NR_getsid 128 | ||
144 | #define __NR_fdatasync 129 | ||
145 | #define __NR__sysctl 130 | ||
146 | #define __NR_mlock 131 | ||
147 | #define __NR_munlock 132 | ||
148 | #define __NR_mlockall 133 | ||
149 | #define __NR_munlockall 134 | ||
150 | #define __NR_sched_setparam 135 | ||
151 | #define __NR_sched_getparam 136 | ||
152 | #define __NR_sched_setscheduler 137 | ||
153 | #define __NR_sched_getscheduler 138 | ||
154 | #define __NR_sched_yield 139 | ||
155 | #define __NR_sched_get_priority_max 140 | ||
156 | #define __NR_sched_get_priority_min 141 | ||
157 | #define __NR_sched_rr_get_interval 142 | ||
158 | #define __NR_nanosleep 143 | ||
159 | #define __NR_poll 144 | ||
160 | #define __NR_nfsservctl 145 | ||
161 | #define __NR_setresgid 146 | ||
162 | #define __NR_getresgid 147 | ||
163 | #define __NR_prctl 148 | ||
164 | #define __NR_socket 149 | ||
165 | #define __NR_bind 150 | ||
166 | #define __NR_connect 151 | ||
167 | #define __NR_listen 152 | ||
168 | #define __NR_accept 153 | ||
169 | #define __NR_getsockname 154 | ||
170 | #define __NR_getpeername 155 | ||
171 | #define __NR_socketpair 156 | ||
172 | #define __NR_send 157 | ||
173 | #define __NR_recv 158 | ||
174 | #define __NR_sendto 159 | ||
175 | #define __NR_recvfrom 160 | ||
176 | #define __NR_shutdown 161 | ||
177 | #define __NR_setsockopt 162 | ||
178 | #define __NR_getsockopt 163 | ||
179 | #define __NR_sendmsg 164 | ||
180 | #define __NR_recvmsg 165 | ||
181 | #define __NR_truncate64 166 | ||
182 | #define __NR_ftruncate64 167 | ||
183 | #define __NR_stat64 168 | ||
184 | #define __NR_lstat64 169 | ||
185 | #define __NR_fstat64 170 | ||
186 | #define __NR_pivot_root 171 | ||
187 | #define __NR_mincore 172 | ||
188 | #define __NR_madvise 173 | ||
189 | #define __NR_getdents64 174 | ||
190 | #define __NR_fcntl64 175 | ||
191 | #define __NR_gettid 176 | ||
192 | #define __NR_readahead 177 | ||
193 | #define __NR_setxattr 178 | ||
194 | #define __NR_lsetxattr 179 | ||
195 | #define __NR_fsetxattr 180 | ||
196 | #define __NR_getxattr 181 | ||
197 | #define __NR_lgetxattr 182 | ||
198 | #define __NR_fgetxattr 183 | ||
199 | #define __NR_listxattr 184 | ||
200 | #define __NR_llistxattr 185 | ||
201 | #define __NR_flistxattr 186 | ||
202 | #define __NR_removexattr 187 | ||
203 | #define __NR_lremovexattr 188 | ||
204 | #define __NR_fremovexattr 189 | ||
205 | #define __NR_tkill 190 | ||
206 | #define __NR_sendfile64 191 | ||
207 | #define __NR_futex 192 | ||
208 | #define __NR_sched_setaffinity 193 | ||
209 | #define __NR_sched_getaffinity 194 | ||
210 | #define __NR_capget 195 | ||
211 | #define __NR_capset 196 | ||
212 | #define __NR_io_setup 197 | ||
213 | #define __NR_io_destroy 198 | ||
214 | #define __NR_io_getevents 199 | ||
215 | #define __NR_io_submit 200 | ||
216 | #define __NR_io_cancel 201 | ||
217 | #define __NR_fadvise64 202 | ||
218 | #define __NR_exit_group 203 | ||
219 | #define __NR_lookup_dcookie 204 | ||
220 | #define __NR_epoll_create 205 | ||
221 | #define __NR_epoll_ctl 206 | ||
222 | #define __NR_epoll_wait 207 | ||
223 | #define __NR_remap_file_pages 208 | ||
224 | #define __NR_set_tid_address 209 | ||
225 | |||
226 | #define __NR_timer_create 210 | ||
227 | #define __NR_timer_settime 211 | ||
228 | #define __NR_timer_gettime 212 | ||
229 | #define __NR_timer_getoverrun 213 | ||
230 | #define __NR_timer_delete 214 | ||
231 | #define __NR_clock_settime 215 | ||
232 | #define __NR_clock_gettime 216 | ||
233 | #define __NR_clock_getres 217 | ||
234 | #define __NR_clock_nanosleep 218 | ||
235 | #define __NR_statfs64 219 | ||
236 | #define __NR_fstatfs64 220 | ||
237 | #define __NR_tgkill 221 | ||
238 | /* 222 reserved for tux */ | ||
239 | #define __NR_utimes 223 | ||
240 | #define __NR_fadvise64_64 224 | ||
241 | |||
242 | #define __NR_cacheflush 225 | ||
243 | |||
244 | #define __NR_vserver 226 | ||
245 | #define __NR_mq_open 227 | ||
246 | #define __NR_mq_unlink 228 | ||
247 | #define __NR_mq_timedsend 229 | ||
248 | #define __NR_mq_timedreceive 230 | ||
249 | #define __NR_mq_notify 231 | ||
250 | #define __NR_mq_getsetattr 232 | ||
251 | #define __NR_kexec_load 233 | ||
252 | #define __NR_waitid 234 | ||
253 | #define __NR_add_key 235 | ||
254 | #define __NR_request_key 236 | ||
255 | #define __NR_keyctl 237 | ||
256 | #define __NR_ioprio_set 238 | ||
257 | #define __NR_ioprio_get 239 | ||
258 | #define __NR_inotify_init 240 | ||
259 | #define __NR_inotify_add_watch 241 | ||
260 | #define __NR_inotify_rm_watch 242 | ||
261 | #define __NR_openat 243 | ||
262 | #define __NR_mkdirat 244 | ||
263 | #define __NR_mknodat 245 | ||
264 | #define __NR_fchownat 246 | ||
265 | #define __NR_futimesat 247 | ||
266 | #define __NR_fstatat64 248 | ||
267 | #define __NR_unlinkat 249 | ||
268 | #define __NR_renameat 250 | ||
269 | #define __NR_linkat 251 | ||
270 | #define __NR_symlinkat 252 | ||
271 | #define __NR_readlinkat 253 | ||
272 | #define __NR_fchmodat 254 | ||
273 | #define __NR_faccessat 255 | ||
274 | #define __NR_pselect6 256 | ||
275 | #define __NR_ppoll 257 | ||
276 | #define __NR_unshare 258 | ||
277 | #define __NR_set_robust_list 259 | ||
278 | #define __NR_get_robust_list 260 | ||
279 | #define __NR_splice 261 | ||
280 | #define __NR_sync_file_range 262 | ||
281 | #define __NR_tee 263 | ||
282 | #define __NR_vmsplice 264 | ||
283 | #define __NR_epoll_pwait 265 | ||
284 | |||
285 | #define __NR_msgget 266 | ||
286 | #define __NR_msgsnd 267 | ||
287 | #define __NR_msgrcv 268 | ||
288 | #define __NR_msgctl 269 | ||
289 | #define __NR_semget 270 | ||
290 | #define __NR_semop 271 | ||
291 | #define __NR_semctl 272 | ||
292 | #define __NR_semtimedop 273 | ||
293 | #define __NR_shmat 274 | ||
294 | #define __NR_shmget 275 | ||
295 | #define __NR_shmdt 276 | ||
296 | #define __NR_shmctl 277 | ||
297 | |||
298 | #define __NR_utimensat 278 | ||
299 | #define __NR_signalfd 279 | ||
300 | /* 280 was __NR_timerfd */ | ||
301 | #define __NR_eventfd 281 | ||
302 | #define __NR_setns 283 | ||
303 | |||
304 | |||
305 | #endif /* _UAPI__ASM_AVR32_UNISTD_H */ | ||
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 92c5af98a6f..1bb0a8abd79 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c | |||
@@ -388,14 +388,14 @@ asmlinkage int sys_execve(const char __user *ufilename, | |||
388 | struct pt_regs *regs) | 388 | struct pt_regs *regs) |
389 | { | 389 | { |
390 | int error; | 390 | int error; |
391 | char *filename; | 391 | struct filename *filename; |
392 | 392 | ||
393 | filename = getname(ufilename); | 393 | filename = getname(ufilename); |
394 | error = PTR_ERR(filename); | 394 | error = PTR_ERR(filename); |
395 | if (IS_ERR(filename)) | 395 | if (IS_ERR(filename)) |
396 | goto out; | 396 | goto out; |
397 | 397 | ||
398 | error = do_execve(filename, uargv, uenvp, regs); | 398 | error = do_execve(filename->name, uargv, uenvp, regs); |
399 | putname(filename); | 399 | putname(filename); |
400 | 400 | ||
401 | out: | 401 | out: |
diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c index d552a854dac..5e01c3a40ce 100644 --- a/arch/avr32/kernel/signal.c +++ b/arch/avr32/kernel/signal.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/ptrace.h> | 16 | #include <linux/ptrace.h> |
17 | #include <linux/unistd.h> | 17 | #include <linux/unistd.h> |
18 | #include <linux/freezer.h> | ||
19 | #include <linux/tracehook.h> | 18 | #include <linux/tracehook.h> |
20 | 19 | ||
21 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index ccd9193932b..b6f3ad5441c 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -43,6 +43,8 @@ config BLACKFIN | |||
43 | select HAVE_NMI_WATCHDOG if NMI_WATCHDOG | 43 | select HAVE_NMI_WATCHDOG if NMI_WATCHDOG |
44 | select GENERIC_SMP_IDLE_THREAD | 44 | select GENERIC_SMP_IDLE_THREAD |
45 | select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS | 45 | select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS |
46 | select HAVE_MOD_ARCH_SPECIFIC | ||
47 | select MODULES_USE_ELF_RELA | ||
46 | 48 | ||
47 | config GENERIC_CSUM | 49 | config GENERIC_CSUM |
48 | def_bool y | 50 | def_bool y |
diff --git a/arch/blackfin/include/asm/module.h b/arch/blackfin/include/asm/module.h index ed5689b82c9..231a149b3f7 100644 --- a/arch/blackfin/include/asm/module.h +++ b/arch/blackfin/include/asm/module.h | |||
@@ -7,9 +7,7 @@ | |||
7 | #ifndef _ASM_BFIN_MODULE_H | 7 | #ifndef _ASM_BFIN_MODULE_H |
8 | #define _ASM_BFIN_MODULE_H | 8 | #define _ASM_BFIN_MODULE_H |
9 | 9 | ||
10 | #define Elf_Shdr Elf32_Shdr | 10 | #include <asm-generic/module.h> |
11 | #define Elf_Sym Elf32_Sym | ||
12 | #define Elf_Ehdr Elf32_Ehdr | ||
13 | 11 | ||
14 | struct mod_arch_specific { | 12 | struct mod_arch_specific { |
15 | Elf_Shdr *text_l1; | 13 | Elf_Shdr *text_l1; |
diff --git a/arch/blackfin/include/asm/thread_info.h b/arch/blackfin/include/asm/thread_info.h index 53ad10005ae..3894005337b 100644 --- a/arch/blackfin/include/asm/thread_info.h +++ b/arch/blackfin/include/asm/thread_info.h | |||
@@ -96,8 +96,6 @@ static inline struct thread_info *current_thread_info(void) | |||
96 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 96 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
97 | #define TIF_SIGPENDING 1 /* signal pending */ | 97 | #define TIF_SIGPENDING 1 /* signal pending */ |
98 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 98 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
99 | #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling | ||
100 | TIF_NEED_RESCHED */ | ||
101 | #define TIF_MEMDIE 4 /* is terminating due to OOM killer */ | 99 | #define TIF_MEMDIE 4 /* is terminating due to OOM killer */ |
102 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ | 100 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ |
103 | #define TIF_IRQ_SYNC 7 /* sync pipeline stage */ | 101 | #define TIF_IRQ_SYNC 7 /* sync pipeline stage */ |
@@ -108,8 +106,6 @@ static inline struct thread_info *current_thread_info(void) | |||
108 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 106 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
109 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 107 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
110 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 108 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
111 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
112 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
113 | #define _TIF_IRQ_SYNC (1<<TIF_IRQ_SYNC) | 109 | #define _TIF_IRQ_SYNC (1<<TIF_IRQ_SYNC) |
114 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 110 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
115 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 111 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 62bcea7dcc6..bb1cc721fcf 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -213,14 +213,14 @@ asmlinkage int sys_execve(const char __user *name, | |||
213 | const char __user *const __user *envp) | 213 | const char __user *const __user *envp) |
214 | { | 214 | { |
215 | int error; | 215 | int error; |
216 | char *filename; | 216 | struct filename *filename; |
217 | struct pt_regs *regs = (struct pt_regs *)((&name) + 6); | 217 | struct pt_regs *regs = (struct pt_regs *)((&name) + 6); |
218 | 218 | ||
219 | filename = getname(name); | 219 | filename = getname(name); |
220 | error = PTR_ERR(filename); | 220 | error = PTR_ERR(filename); |
221 | if (IS_ERR(filename)) | 221 | if (IS_ERR(filename)) |
222 | return error; | 222 | return error; |
223 | error = do_execve(filename, argv, envp, regs); | 223 | error = do_execve(filename->name, argv, envp, regs); |
224 | putname(filename); | 224 | putname(filename); |
225 | return error; | 225 | return error; |
226 | } | 226 | } |
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c index 6682b73a852..6ed20a1a4af 100644 --- a/arch/blackfin/kernel/signal.c +++ b/arch/blackfin/kernel/signal.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/tty.h> | 10 | #include <linux/tty.h> |
11 | #include <linux/personality.h> | 11 | #include <linux/personality.h> |
12 | #include <linux/binfmts.h> | 12 | #include <linux/binfmts.h> |
13 | #include <linux/freezer.h> | ||
14 | #include <linux/uaccess.h> | 13 | #include <linux/uaccess.h> |
15 | #include <linux/tracehook.h> | 14 | #include <linux/tracehook.h> |
16 | 15 | ||
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig index 983c859e40b..aee1b569ee6 100644 --- a/arch/c6x/Kconfig +++ b/arch/c6x/Kconfig | |||
@@ -17,6 +17,8 @@ config C6X | |||
17 | select OF | 17 | select OF |
18 | select OF_EARLY_FLATTREE | 18 | select OF_EARLY_FLATTREE |
19 | select GENERIC_CLOCKEVENTS | 19 | select GENERIC_CLOCKEVENTS |
20 | select GENERIC_KERNEL_THREAD | ||
21 | select MODULES_USE_ELF_RELA | ||
20 | 22 | ||
21 | config MMU | 23 | config MMU |
22 | def_bool n | 24 | def_bool n |
diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index 4e4e98da819..112a496d835 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild | |||
@@ -1,4 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | generic-y += atomic.h | 2 | generic-y += atomic.h |
4 | generic-y += auxvec.h | 3 | generic-y += auxvec.h |
diff --git a/arch/c6x/include/asm/module.h b/arch/c6x/include/asm/module.h index a453f9744f4..5c7269c7ef7 100644 --- a/arch/c6x/include/asm/module.h +++ b/arch/c6x/include/asm/module.h | |||
@@ -13,17 +13,7 @@ | |||
13 | #ifndef _ASM_C6X_MODULE_H | 13 | #ifndef _ASM_C6X_MODULE_H |
14 | #define _ASM_C6X_MODULE_H | 14 | #define _ASM_C6X_MODULE_H |
15 | 15 | ||
16 | #define Elf_Shdr Elf32_Shdr | 16 | #include <asm-generic/module.h> |
17 | #define Elf_Sym Elf32_Sym | ||
18 | #define Elf_Ehdr Elf32_Ehdr | ||
19 | #define Elf_Addr Elf32_Addr | ||
20 | #define Elf_Word Elf32_Word | ||
21 | |||
22 | /* | ||
23 | * This file contains the C6x architecture specific module code. | ||
24 | */ | ||
25 | struct mod_arch_specific { | ||
26 | }; | ||
27 | 17 | ||
28 | struct loaded_sections { | 18 | struct loaded_sections { |
29 | unsigned int new_vaddr; | 19 | unsigned int new_vaddr; |
diff --git a/arch/c6x/include/asm/processor.h b/arch/c6x/include/asm/processor.h index c50af7ef1c9..b9eb3da7f27 100644 --- a/arch/c6x/include/asm/processor.h +++ b/arch/c6x/include/asm/processor.h | |||
@@ -92,8 +92,6 @@ static inline void release_thread(struct task_struct *dead_task) | |||
92 | { | 92 | { |
93 | } | 93 | } |
94 | 94 | ||
95 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | ||
96 | |||
97 | #define copy_segments(tsk, mm) do { } while (0) | 95 | #define copy_segments(tsk, mm) do { } while (0) |
98 | #define release_segments(mm) do { } while (0) | 96 | #define release_segments(mm) do { } while (0) |
99 | 97 | ||
diff --git a/arch/c6x/include/asm/ptrace.h b/arch/c6x/include/asm/ptrace.h index b04ff596425..76da6ad6610 100644 --- a/arch/c6x/include/asm/ptrace.h +++ b/arch/c6x/include/asm/ptrace.h | |||
@@ -11,156 +11,13 @@ | |||
11 | #ifndef _ASM_C6X_PTRACE_H | 11 | #ifndef _ASM_C6X_PTRACE_H |
12 | #define _ASM_C6X_PTRACE_H | 12 | #define _ASM_C6X_PTRACE_H |
13 | 13 | ||
14 | #define BKPT_OPCODE 0x56454314 /* illegal opcode */ | 14 | #include <uapi/asm/ptrace.h> |
15 | |||
16 | #ifdef _BIG_ENDIAN | ||
17 | #define PT_LO(odd, even) odd | ||
18 | #define PT_HI(odd, even) even | ||
19 | #else | ||
20 | #define PT_LO(odd, even) even | ||
21 | #define PT_HI(odd, even) odd | ||
22 | #endif | ||
23 | |||
24 | #define PT_A4_ORG PT_LO(1, 0) | ||
25 | #define PT_TSR PT_HI(1, 0) | ||
26 | #define PT_ILC PT_LO(3, 2) | ||
27 | #define PT_RILC PT_HI(3, 2) | ||
28 | #define PT_CSR PT_LO(5, 4) | ||
29 | #define PT_PC PT_HI(5, 4) | ||
30 | #define PT_B16 PT_LO(7, 6) | ||
31 | #define PT_B17 PT_HI(7, 6) | ||
32 | #define PT_B18 PT_LO(9, 8) | ||
33 | #define PT_B19 PT_HI(9, 8) | ||
34 | #define PT_B20 PT_LO(11, 10) | ||
35 | #define PT_B21 PT_HI(11, 10) | ||
36 | #define PT_B22 PT_LO(13, 12) | ||
37 | #define PT_B23 PT_HI(13, 12) | ||
38 | #define PT_B24 PT_LO(15, 14) | ||
39 | #define PT_B25 PT_HI(15, 14) | ||
40 | #define PT_B26 PT_LO(17, 16) | ||
41 | #define PT_B27 PT_HI(17, 16) | ||
42 | #define PT_B28 PT_LO(19, 18) | ||
43 | #define PT_B29 PT_HI(19, 18) | ||
44 | #define PT_B30 PT_LO(21, 20) | ||
45 | #define PT_B31 PT_HI(21, 20) | ||
46 | #define PT_B0 PT_LO(23, 22) | ||
47 | #define PT_B1 PT_HI(23, 22) | ||
48 | #define PT_B2 PT_LO(25, 24) | ||
49 | #define PT_B3 PT_HI(25, 24) | ||
50 | #define PT_B4 PT_LO(27, 26) | ||
51 | #define PT_B5 PT_HI(27, 26) | ||
52 | #define PT_B6 PT_LO(29, 28) | ||
53 | #define PT_B7 PT_HI(29, 28) | ||
54 | #define PT_B8 PT_LO(31, 30) | ||
55 | #define PT_B9 PT_HI(31, 30) | ||
56 | #define PT_B10 PT_LO(33, 32) | ||
57 | #define PT_B11 PT_HI(33, 32) | ||
58 | #define PT_B12 PT_LO(35, 34) | ||
59 | #define PT_B13 PT_HI(35, 34) | ||
60 | #define PT_A16 PT_LO(37, 36) | ||
61 | #define PT_A17 PT_HI(37, 36) | ||
62 | #define PT_A18 PT_LO(39, 38) | ||
63 | #define PT_A19 PT_HI(39, 38) | ||
64 | #define PT_A20 PT_LO(41, 40) | ||
65 | #define PT_A21 PT_HI(41, 40) | ||
66 | #define PT_A22 PT_LO(43, 42) | ||
67 | #define PT_A23 PT_HI(43, 42) | ||
68 | #define PT_A24 PT_LO(45, 44) | ||
69 | #define PT_A25 PT_HI(45, 44) | ||
70 | #define PT_A26 PT_LO(47, 46) | ||
71 | #define PT_A27 PT_HI(47, 46) | ||
72 | #define PT_A28 PT_LO(49, 48) | ||
73 | #define PT_A29 PT_HI(49, 48) | ||
74 | #define PT_A30 PT_LO(51, 50) | ||
75 | #define PT_A31 PT_HI(51, 50) | ||
76 | #define PT_A0 PT_LO(53, 52) | ||
77 | #define PT_A1 PT_HI(53, 52) | ||
78 | #define PT_A2 PT_LO(55, 54) | ||
79 | #define PT_A3 PT_HI(55, 54) | ||
80 | #define PT_A4 PT_LO(57, 56) | ||
81 | #define PT_A5 PT_HI(57, 56) | ||
82 | #define PT_A6 PT_LO(59, 58) | ||
83 | #define PT_A7 PT_HI(59, 58) | ||
84 | #define PT_A8 PT_LO(61, 60) | ||
85 | #define PT_A9 PT_HI(61, 60) | ||
86 | #define PT_A10 PT_LO(63, 62) | ||
87 | #define PT_A11 PT_HI(63, 62) | ||
88 | #define PT_A12 PT_LO(65, 64) | ||
89 | #define PT_A13 PT_HI(65, 64) | ||
90 | #define PT_A14 PT_LO(67, 66) | ||
91 | #define PT_A15 PT_HI(67, 66) | ||
92 | #define PT_B14 PT_LO(69, 68) | ||
93 | #define PT_B15 PT_HI(69, 68) | ||
94 | |||
95 | #define NR_PTREGS 70 | ||
96 | |||
97 | #define PT_DP PT_B14 /* Data Segment Pointer (B14) */ | ||
98 | #define PT_SP PT_B15 /* Stack Pointer (B15) */ | ||
99 | |||
100 | #define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ | ||
101 | |||
102 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ | ||
103 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ | ||
104 | 15 | ||
105 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
106 | |||
107 | #ifdef _BIG_ENDIAN | 17 | #ifdef _BIG_ENDIAN |
108 | #define REG_PAIR(odd, even) unsigned long odd; unsigned long even | ||
109 | #else | 18 | #else |
110 | #define REG_PAIR(odd, even) unsigned long even; unsigned long odd | ||
111 | #endif | 19 | #endif |
112 | 20 | ||
113 | /* | ||
114 | * this struct defines the way the registers are stored on the | ||
115 | * stack during a system call. fields defined with REG_PAIR | ||
116 | * are saved and restored using double-word memory operations | ||
117 | * which means the word ordering of the pair depends on endianess. | ||
118 | */ | ||
119 | struct pt_regs { | ||
120 | REG_PAIR(tsr, orig_a4); | ||
121 | REG_PAIR(rilc, ilc); | ||
122 | REG_PAIR(pc, csr); | ||
123 | |||
124 | REG_PAIR(b17, b16); | ||
125 | REG_PAIR(b19, b18); | ||
126 | REG_PAIR(b21, b20); | ||
127 | REG_PAIR(b23, b22); | ||
128 | REG_PAIR(b25, b24); | ||
129 | REG_PAIR(b27, b26); | ||
130 | REG_PAIR(b29, b28); | ||
131 | REG_PAIR(b31, b30); | ||
132 | |||
133 | REG_PAIR(b1, b0); | ||
134 | REG_PAIR(b3, b2); | ||
135 | REG_PAIR(b5, b4); | ||
136 | REG_PAIR(b7, b6); | ||
137 | REG_PAIR(b9, b8); | ||
138 | REG_PAIR(b11, b10); | ||
139 | REG_PAIR(b13, b12); | ||
140 | |||
141 | REG_PAIR(a17, a16); | ||
142 | REG_PAIR(a19, a18); | ||
143 | REG_PAIR(a21, a20); | ||
144 | REG_PAIR(a23, a22); | ||
145 | REG_PAIR(a25, a24); | ||
146 | REG_PAIR(a27, a26); | ||
147 | REG_PAIR(a29, a28); | ||
148 | REG_PAIR(a31, a30); | ||
149 | |||
150 | REG_PAIR(a1, a0); | ||
151 | REG_PAIR(a3, a2); | ||
152 | REG_PAIR(a5, a4); | ||
153 | REG_PAIR(a7, a6); | ||
154 | REG_PAIR(a9, a8); | ||
155 | REG_PAIR(a11, a10); | ||
156 | REG_PAIR(a13, a12); | ||
157 | |||
158 | REG_PAIR(a15, a14); | ||
159 | REG_PAIR(sp, dp); | ||
160 | }; | ||
161 | |||
162 | #ifdef __KERNEL__ | ||
163 | |||
164 | #include <linux/linkage.h> | 21 | #include <linux/linkage.h> |
165 | 22 | ||
166 | #define user_mode(regs) ((((regs)->tsr) & 0x40) != 0) | 23 | #define user_mode(regs) ((((regs)->tsr) & 0x40) != 0) |
@@ -174,6 +31,5 @@ extern void show_regs(struct pt_regs *); | |||
174 | extern asmlinkage unsigned long syscall_trace_entry(struct pt_regs *regs); | 31 | extern asmlinkage unsigned long syscall_trace_entry(struct pt_regs *regs); |
175 | extern asmlinkage void syscall_trace_exit(struct pt_regs *regs); | 32 | extern asmlinkage void syscall_trace_exit(struct pt_regs *regs); |
176 | 33 | ||
177 | #endif /* __KERNEL__ */ | ||
178 | #endif /* __ASSEMBLY__ */ | 34 | #endif /* __ASSEMBLY__ */ |
179 | #endif /* _ASM_C6X_PTRACE_H */ | 35 | #endif /* _ASM_C6X_PTRACE_H */ |
diff --git a/arch/c6x/include/asm/syscalls.h b/arch/c6x/include/asm/syscalls.h index aed53da703c..e7b8991dc07 100644 --- a/arch/c6x/include/asm/syscalls.h +++ b/arch/c6x/include/asm/syscalls.h | |||
@@ -44,11 +44,6 @@ extern int sys_cache_sync(unsigned long s, unsigned long e); | |||
44 | struct pt_regs; | 44 | struct pt_regs; |
45 | 45 | ||
46 | extern asmlinkage long sys_c6x_clone(struct pt_regs *regs); | 46 | extern asmlinkage long sys_c6x_clone(struct pt_regs *regs); |
47 | extern asmlinkage long sys_c6x_execve(const char __user *name, | ||
48 | const char __user *const __user *argv, | ||
49 | const char __user *const __user *envp, | ||
50 | struct pt_regs *regs); | ||
51 | |||
52 | 47 | ||
53 | #include <asm-generic/syscalls.h> | 48 | #include <asm-generic/syscalls.h> |
54 | 49 | ||
diff --git a/arch/c6x/include/asm/thread_info.h b/arch/c6x/include/asm/thread_info.h index 1710bcbb8d0..4c8dc562bd9 100644 --- a/arch/c6x/include/asm/thread_info.h +++ b/arch/c6x/include/asm/thread_info.h | |||
@@ -97,7 +97,6 @@ struct thread_info *current_thread_info(void) | |||
97 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 97 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
98 | #define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */ | 98 | #define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */ |
99 | 99 | ||
100 | #define TIF_POLLING_NRFLAG 16 /* true if polling TIF_NEED_RESCHED */ | ||
101 | #define TIF_MEMDIE 17 /* OOM killer killed process */ | 100 | #define TIF_MEMDIE 17 /* OOM killer killed process */ |
102 | 101 | ||
103 | #define TIF_WORK_MASK 0x00007FFE /* work on irq/exception return */ | 102 | #define TIF_WORK_MASK 0x00007FFE /* work on irq/exception return */ |
diff --git a/arch/c6x/include/uapi/asm/Kbuild b/arch/c6x/include/uapi/asm/Kbuild index baebb3da1d4..c312b424c43 100644 --- a/arch/c6x/include/uapi/asm/Kbuild +++ b/arch/c6x/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,10 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += byteorder.h | ||
5 | header-y += kvm_para.h | ||
6 | header-y += ptrace.h | ||
7 | header-y += setup.h | ||
8 | header-y += sigcontext.h | ||
9 | header-y += swab.h | ||
10 | header-y += unistd.h | ||
diff --git a/arch/c6x/include/asm/byteorder.h b/arch/c6x/include/uapi/asm/byteorder.h index 166038db342..166038db342 100644 --- a/arch/c6x/include/asm/byteorder.h +++ b/arch/c6x/include/uapi/asm/byteorder.h | |||
diff --git a/arch/c6x/include/asm/kvm_para.h b/arch/c6x/include/uapi/asm/kvm_para.h index 14fab8f0b95..14fab8f0b95 100644 --- a/arch/c6x/include/asm/kvm_para.h +++ b/arch/c6x/include/uapi/asm/kvm_para.h | |||
diff --git a/arch/c6x/include/uapi/asm/ptrace.h b/arch/c6x/include/uapi/asm/ptrace.h new file mode 100644 index 00000000000..cc0a4d99151 --- /dev/null +++ b/arch/c6x/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,163 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004, 2006, 2009, 2010 Texas Instruments Incorporated | ||
3 | * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com) | ||
4 | * | ||
5 | * Updated for 2.6.34: Mark Salter <msalter@redhat.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef _UAPI_ASM_C6X_PTRACE_H | ||
12 | #define _UAPI_ASM_C6X_PTRACE_H | ||
13 | |||
14 | #define BKPT_OPCODE 0x56454314 /* illegal opcode */ | ||
15 | |||
16 | #ifdef _BIG_ENDIAN | ||
17 | #define PT_LO(odd, even) odd | ||
18 | #define PT_HI(odd, even) even | ||
19 | #else | ||
20 | #define PT_LO(odd, even) even | ||
21 | #define PT_HI(odd, even) odd | ||
22 | #endif | ||
23 | |||
24 | #define PT_A4_ORG PT_LO(1, 0) | ||
25 | #define PT_TSR PT_HI(1, 0) | ||
26 | #define PT_ILC PT_LO(3, 2) | ||
27 | #define PT_RILC PT_HI(3, 2) | ||
28 | #define PT_CSR PT_LO(5, 4) | ||
29 | #define PT_PC PT_HI(5, 4) | ||
30 | #define PT_B16 PT_LO(7, 6) | ||
31 | #define PT_B17 PT_HI(7, 6) | ||
32 | #define PT_B18 PT_LO(9, 8) | ||
33 | #define PT_B19 PT_HI(9, 8) | ||
34 | #define PT_B20 PT_LO(11, 10) | ||
35 | #define PT_B21 PT_HI(11, 10) | ||
36 | #define PT_B22 PT_LO(13, 12) | ||
37 | #define PT_B23 PT_HI(13, 12) | ||
38 | #define PT_B24 PT_LO(15, 14) | ||
39 | #define PT_B25 PT_HI(15, 14) | ||
40 | #define PT_B26 PT_LO(17, 16) | ||
41 | #define PT_B27 PT_HI(17, 16) | ||
42 | #define PT_B28 PT_LO(19, 18) | ||
43 | #define PT_B29 PT_HI(19, 18) | ||
44 | #define PT_B30 PT_LO(21, 20) | ||
45 | #define PT_B31 PT_HI(21, 20) | ||
46 | #define PT_B0 PT_LO(23, 22) | ||
47 | #define PT_B1 PT_HI(23, 22) | ||
48 | #define PT_B2 PT_LO(25, 24) | ||
49 | #define PT_B3 PT_HI(25, 24) | ||
50 | #define PT_B4 PT_LO(27, 26) | ||
51 | #define PT_B5 PT_HI(27, 26) | ||
52 | #define PT_B6 PT_LO(29, 28) | ||
53 | #define PT_B7 PT_HI(29, 28) | ||
54 | #define PT_B8 PT_LO(31, 30) | ||
55 | #define PT_B9 PT_HI(31, 30) | ||
56 | #define PT_B10 PT_LO(33, 32) | ||
57 | #define PT_B11 PT_HI(33, 32) | ||
58 | #define PT_B12 PT_LO(35, 34) | ||
59 | #define PT_B13 PT_HI(35, 34) | ||
60 | #define PT_A16 PT_LO(37, 36) | ||
61 | #define PT_A17 PT_HI(37, 36) | ||
62 | #define PT_A18 PT_LO(39, 38) | ||
63 | #define PT_A19 PT_HI(39, 38) | ||
64 | #define PT_A20 PT_LO(41, 40) | ||
65 | #define PT_A21 PT_HI(41, 40) | ||
66 | #define PT_A22 PT_LO(43, 42) | ||
67 | #define PT_A23 PT_HI(43, 42) | ||
68 | #define PT_A24 PT_LO(45, 44) | ||
69 | #define PT_A25 PT_HI(45, 44) | ||
70 | #define PT_A26 PT_LO(47, 46) | ||
71 | #define PT_A27 PT_HI(47, 46) | ||
72 | #define PT_A28 PT_LO(49, 48) | ||
73 | #define PT_A29 PT_HI(49, 48) | ||
74 | #define PT_A30 PT_LO(51, 50) | ||
75 | #define PT_A31 PT_HI(51, 50) | ||
76 | #define PT_A0 PT_LO(53, 52) | ||
77 | #define PT_A1 PT_HI(53, 52) | ||
78 | #define PT_A2 PT_LO(55, 54) | ||
79 | #define PT_A3 PT_HI(55, 54) | ||
80 | #define PT_A4 PT_LO(57, 56) | ||
81 | #define PT_A5 PT_HI(57, 56) | ||
82 | #define PT_A6 PT_LO(59, 58) | ||
83 | #define PT_A7 PT_HI(59, 58) | ||
84 | #define PT_A8 PT_LO(61, 60) | ||
85 | #define PT_A9 PT_HI(61, 60) | ||
86 | #define PT_A10 PT_LO(63, 62) | ||
87 | #define PT_A11 PT_HI(63, 62) | ||
88 | #define PT_A12 PT_LO(65, 64) | ||
89 | #define PT_A13 PT_HI(65, 64) | ||
90 | #define PT_A14 PT_LO(67, 66) | ||
91 | #define PT_A15 PT_HI(67, 66) | ||
92 | #define PT_B14 PT_LO(69, 68) | ||
93 | #define PT_B15 PT_HI(69, 68) | ||
94 | |||
95 | #define NR_PTREGS 70 | ||
96 | |||
97 | #define PT_DP PT_B14 /* Data Segment Pointer (B14) */ | ||
98 | #define PT_SP PT_B15 /* Stack Pointer (B15) */ | ||
99 | |||
100 | #define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ | ||
101 | |||
102 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ | ||
103 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ | ||
104 | |||
105 | #ifndef __ASSEMBLY__ | ||
106 | |||
107 | #ifdef _BIG_ENDIAN | ||
108 | #define REG_PAIR(odd, even) unsigned long odd; unsigned long even | ||
109 | #else | ||
110 | #define REG_PAIR(odd, even) unsigned long even; unsigned long odd | ||
111 | #endif | ||
112 | |||
113 | /* | ||
114 | * this struct defines the way the registers are stored on the | ||
115 | * stack during a system call. fields defined with REG_PAIR | ||
116 | * are saved and restored using double-word memory operations | ||
117 | * which means the word ordering of the pair depends on endianess. | ||
118 | */ | ||
119 | struct pt_regs { | ||
120 | REG_PAIR(tsr, orig_a4); | ||
121 | REG_PAIR(rilc, ilc); | ||
122 | REG_PAIR(pc, csr); | ||
123 | |||
124 | REG_PAIR(b17, b16); | ||
125 | REG_PAIR(b19, b18); | ||
126 | REG_PAIR(b21, b20); | ||
127 | REG_PAIR(b23, b22); | ||
128 | REG_PAIR(b25, b24); | ||
129 | REG_PAIR(b27, b26); | ||
130 | REG_PAIR(b29, b28); | ||
131 | REG_PAIR(b31, b30); | ||
132 | |||
133 | REG_PAIR(b1, b0); | ||
134 | REG_PAIR(b3, b2); | ||
135 | REG_PAIR(b5, b4); | ||
136 | REG_PAIR(b7, b6); | ||
137 | REG_PAIR(b9, b8); | ||
138 | REG_PAIR(b11, b10); | ||
139 | REG_PAIR(b13, b12); | ||
140 | |||
141 | REG_PAIR(a17, a16); | ||
142 | REG_PAIR(a19, a18); | ||
143 | REG_PAIR(a21, a20); | ||
144 | REG_PAIR(a23, a22); | ||
145 | REG_PAIR(a25, a24); | ||
146 | REG_PAIR(a27, a26); | ||
147 | REG_PAIR(a29, a28); | ||
148 | REG_PAIR(a31, a30); | ||
149 | |||
150 | REG_PAIR(a1, a0); | ||
151 | REG_PAIR(a3, a2); | ||
152 | REG_PAIR(a5, a4); | ||
153 | REG_PAIR(a7, a6); | ||
154 | REG_PAIR(a9, a8); | ||
155 | REG_PAIR(a11, a10); | ||
156 | REG_PAIR(a13, a12); | ||
157 | |||
158 | REG_PAIR(a15, a14); | ||
159 | REG_PAIR(sp, dp); | ||
160 | }; | ||
161 | |||
162 | #endif /* __ASSEMBLY__ */ | ||
163 | #endif /* _UAPI_ASM_C6X_PTRACE_H */ | ||
diff --git a/arch/c6x/include/asm/setup.h b/arch/c6x/include/uapi/asm/setup.h index a01e31896fa..a01e31896fa 100644 --- a/arch/c6x/include/asm/setup.h +++ b/arch/c6x/include/uapi/asm/setup.h | |||
diff --git a/arch/c6x/include/asm/sigcontext.h b/arch/c6x/include/uapi/asm/sigcontext.h index eb702f39cde..eb702f39cde 100644 --- a/arch/c6x/include/asm/sigcontext.h +++ b/arch/c6x/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/c6x/include/asm/swab.h b/arch/c6x/include/uapi/asm/swab.h index fd4bb0520e5..fd4bb0520e5 100644 --- a/arch/c6x/include/asm/swab.h +++ b/arch/c6x/include/uapi/asm/swab.h | |||
diff --git a/arch/c6x/include/asm/unistd.h b/arch/c6x/include/uapi/asm/unistd.h index ed2259043ee..4ff747d12da 100644 --- a/arch/c6x/include/asm/unistd.h +++ b/arch/c6x/include/uapi/asm/unistd.h | |||
@@ -14,6 +14,9 @@ | |||
14 | * more details. | 14 | * more details. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #define __ARCH_WANT_KERNEL_EXECVE | ||
18 | #define __ARCH_WANT_SYS_EXECVE | ||
19 | |||
17 | /* Use the standard ABI for syscalls. */ | 20 | /* Use the standard ABI for syscalls. */ |
18 | #include <asm-generic/unistd.h> | 21 | #include <asm-generic/unistd.h> |
19 | 22 | ||
diff --git a/arch/c6x/kernel/asm-offsets.c b/arch/c6x/kernel/asm-offsets.c index 759ad6d207b..60f1e437745 100644 --- a/arch/c6x/kernel/asm-offsets.c +++ b/arch/c6x/kernel/asm-offsets.c | |||
@@ -116,7 +116,6 @@ void foo(void) | |||
116 | DEFINE(_TIF_NOTIFY_RESUME, (1<<TIF_NOTIFY_RESUME)); | 116 | DEFINE(_TIF_NOTIFY_RESUME, (1<<TIF_NOTIFY_RESUME)); |
117 | DEFINE(_TIF_SIGPENDING, (1<<TIF_SIGPENDING)); | 117 | DEFINE(_TIF_SIGPENDING, (1<<TIF_SIGPENDING)); |
118 | DEFINE(_TIF_NEED_RESCHED, (1<<TIF_NEED_RESCHED)); | 118 | DEFINE(_TIF_NEED_RESCHED, (1<<TIF_NEED_RESCHED)); |
119 | DEFINE(_TIF_POLLING_NRFLAG, (1<<TIF_POLLING_NRFLAG)); | ||
120 | 119 | ||
121 | DEFINE(_TIF_ALLWORK_MASK, TIF_ALLWORK_MASK); | 120 | DEFINE(_TIF_ALLWORK_MASK, TIF_ALLWORK_MASK); |
122 | DEFINE(_TIF_WORK_MASK, TIF_WORK_MASK); | 121 | DEFINE(_TIF_WORK_MASK, TIF_WORK_MASK); |
diff --git a/arch/c6x/kernel/entry.S b/arch/c6x/kernel/entry.S index 30b37e5f4a6..5449c36018f 100644 --- a/arch/c6x/kernel/entry.S +++ b/arch/c6x/kernel/entry.S | |||
@@ -400,6 +400,32 @@ ret_from_fork_2: | |||
400 | STW .D2T2 B0,*+SP(REGS_A4+8) | 400 | STW .D2T2 B0,*+SP(REGS_A4+8) |
401 | ENDPROC(ret_from_fork) | 401 | ENDPROC(ret_from_fork) |
402 | 402 | ||
403 | ENTRY(ret_from_kernel_thread) | ||
404 | #ifdef CONFIG_C6X_BIG_KERNEL | ||
405 | MVKL .S1 schedule_tail,A0 | ||
406 | MVKH .S1 schedule_tail,A0 | ||
407 | B .S2X A0 | ||
408 | #else | ||
409 | B .S2 schedule_tail | ||
410 | #endif | ||
411 | LDW .D2T2 *+SP(REGS_A0+8),B10 /* get fn */ | ||
412 | ADDKPC .S2 0f,B3,3 | ||
413 | 0: | ||
414 | B .S2 B10 /* call fn */ | ||
415 | LDW .D2T1 *+SP(REGS_A1+8),A4 /* get arg */ | ||
416 | MVKL .S2 sys_exit,B11 | ||
417 | MVKH .S2 sys_exit,B11 | ||
418 | ADDKPC .S2 0f,B3,1 | ||
419 | 0: | ||
420 | BNOP .S2 B11,5 /* jump to sys_exit */ | ||
421 | ENDPROC(ret_from_kernel_thread) | ||
422 | |||
423 | ENTRY(ret_from_kernel_execve) | ||
424 | GET_THREAD_INFO A12 | ||
425 | BNOP .S2 syscall_exit,4 | ||
426 | ADD .D2X A4,-8,SP | ||
427 | ENDPROC(ret_from_kernel_execve) | ||
428 | |||
403 | ;; | 429 | ;; |
404 | ;; These are the interrupt handlers, responsible for calling __do_IRQ() | 430 | ;; These are the interrupt handlers, responsible for calling __do_IRQ() |
405 | ;; int6 is used for syscalls (see _system_call entry) | 431 | ;; int6 is used for syscalls (see _system_call entry) |
@@ -593,13 +619,6 @@ ENTRY(sys_sigaltstack) | |||
593 | NOP 4 | 619 | NOP 4 |
594 | ENDPROC(sys_sigaltstack) | 620 | ENDPROC(sys_sigaltstack) |
595 | 621 | ||
596 | ;; kernel_execve | ||
597 | ENTRY(kernel_execve) | ||
598 | MVK .S2 __NR_execve,B0 | ||
599 | SWE | ||
600 | BNOP .S2 B3,5 | ||
601 | ENDPROC(kernel_execve) | ||
602 | |||
603 | ;; | 622 | ;; |
604 | ;; Special system calls | 623 | ;; Special system calls |
605 | ;; return address is in B3 | 624 | ;; return address is in B3 |
@@ -628,29 +647,6 @@ ENTRY(sys_rt_sigreturn) | |||
628 | #endif | 647 | #endif |
629 | ENDPROC(sys_rt_sigreturn) | 648 | ENDPROC(sys_rt_sigreturn) |
630 | 649 | ||
631 | ENTRY(sys_execve) | ||
632 | ADDAW .D2 SP,2,B6 ; put regs addr in 4th parameter | ||
633 | ; & adjust regs stack addr | ||
634 | LDW .D2T2 *+SP(REGS_B4+8),B4 | ||
635 | |||
636 | ;; c6x_execve(char *name, char **argv, | ||
637 | ;; char **envp, struct pt_regs *regs) | ||
638 | #ifdef CONFIG_C6X_BIG_KERNEL | ||
639 | || MVKL .S1 sys_c6x_execve,A0 | ||
640 | MVKH .S1 sys_c6x_execve,A0 | ||
641 | B .S2X A0 | ||
642 | #else | ||
643 | || B .S2 sys_c6x_execve | ||
644 | #endif | ||
645 | STW .D2T2 B3,*SP--[2] | ||
646 | ADDKPC .S2 ret_from_c6x_execve,B3,3 | ||
647 | |||
648 | ret_from_c6x_execve: | ||
649 | LDW .D2T2 *++SP[2],B3 | ||
650 | NOP 4 | ||
651 | BNOP .S2 B3,5 | ||
652 | ENDPROC(sys_execve) | ||
653 | |||
654 | ENTRY(sys_pread_c6x) | 650 | ENTRY(sys_pread_c6x) |
655 | MV .D2X A8,B7 | 651 | MV .D2X A8,B7 |
656 | #ifdef CONFIG_C6X_BIG_KERNEL | 652 | #ifdef CONFIG_C6X_BIG_KERNEL |
diff --git a/arch/c6x/kernel/process.c b/arch/c6x/kernel/process.c index 45e924a636a..2770d9a9a84 100644 --- a/arch/c6x/kernel/process.c +++ b/arch/c6x/kernel/process.c | |||
@@ -25,6 +25,7 @@ void (*c6x_restart)(void); | |||
25 | void (*c6x_halt)(void); | 25 | void (*c6x_halt)(void); |
26 | 26 | ||
27 | extern asmlinkage void ret_from_fork(void); | 27 | extern asmlinkage void ret_from_fork(void); |
28 | extern asmlinkage void ret_from_kernel_thread(void); | ||
28 | 29 | ||
29 | /* | 30 | /* |
30 | * power off function, if any | 31 | * power off function, if any |
@@ -103,37 +104,6 @@ void machine_power_off(void) | |||
103 | halt_loop(); | 104 | halt_loop(); |
104 | } | 105 | } |
105 | 106 | ||
106 | static void kernel_thread_helper(int dummy, void *arg, int (*fn)(void *)) | ||
107 | { | ||
108 | do_exit(fn(arg)); | ||
109 | } | ||
110 | |||
111 | /* | ||
112 | * Create a kernel thread | ||
113 | */ | ||
114 | int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | ||
115 | { | ||
116 | struct pt_regs regs; | ||
117 | |||
118 | /* | ||
119 | * copy_thread sets a4 to zero (child return from fork) | ||
120 | * so we can't just set things up to directly return to | ||
121 | * fn. | ||
122 | */ | ||
123 | memset(®s, 0, sizeof(regs)); | ||
124 | regs.b4 = (unsigned long) arg; | ||
125 | regs.a6 = (unsigned long) fn; | ||
126 | regs.pc = (unsigned long) kernel_thread_helper; | ||
127 | local_save_flags(regs.csr); | ||
128 | regs.csr |= 1; | ||
129 | regs.tsr = 5; /* Set GEE and GIE in TSR */ | ||
130 | |||
131 | /* Ok, create the new process.. */ | ||
132 | return do_fork(flags | CLONE_VM | CLONE_UNTRACED, -1, ®s, | ||
133 | 0, NULL, NULL); | ||
134 | } | ||
135 | EXPORT_SYMBOL(kernel_thread); | ||
136 | |||
137 | void flush_thread(void) | 107 | void flush_thread(void) |
138 | { | 108 | { |
139 | } | 109 | } |
@@ -191,22 +161,24 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
191 | 161 | ||
192 | childregs = task_pt_regs(p); | 162 | childregs = task_pt_regs(p); |
193 | 163 | ||
194 | *childregs = *regs; | 164 | if (!regs) { |
195 | childregs->a4 = 0; | ||
196 | |||
197 | if (usp == -1) | ||
198 | /* case of __kernel_thread: we return to supervisor space */ | 165 | /* case of __kernel_thread: we return to supervisor space */ |
166 | memset(childregs, 0, sizeof(struct pt_regs)); | ||
199 | childregs->sp = (unsigned long)(childregs + 1); | 167 | childregs->sp = (unsigned long)(childregs + 1); |
200 | else | 168 | p->thread.pc = (unsigned long) ret_from_kernel_thread; |
169 | childregs->a0 = usp; /* function */ | ||
170 | childregs->a1 = ustk_size; /* argument */ | ||
171 | } else { | ||
201 | /* Otherwise use the given stack */ | 172 | /* Otherwise use the given stack */ |
173 | *childregs = *regs; | ||
202 | childregs->sp = usp; | 174 | childregs->sp = usp; |
175 | p->thread.pc = (unsigned long) ret_from_fork; | ||
176 | } | ||
203 | 177 | ||
204 | /* Set usp/ksp */ | 178 | /* Set usp/ksp */ |
205 | p->thread.usp = childregs->sp; | 179 | p->thread.usp = childregs->sp; |
206 | /* switch_to uses stack to save/restore 14 callee-saved regs */ | ||
207 | thread_saved_ksp(p) = (unsigned long)childregs - 8; | 180 | thread_saved_ksp(p) = (unsigned long)childregs - 8; |
208 | p->thread.pc = (unsigned int) ret_from_fork; | 181 | p->thread.wchan = p->thread.pc; |
209 | p->thread.wchan = (unsigned long) ret_from_fork; | ||
210 | #ifdef __DSBT__ | 182 | #ifdef __DSBT__ |
211 | { | 183 | { |
212 | unsigned long dp; | 184 | unsigned long dp; |
@@ -221,28 +193,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
221 | return 0; | 193 | return 0; |
222 | } | 194 | } |
223 | 195 | ||
224 | /* | ||
225 | * c6x_execve() executes a new program. | ||
226 | */ | ||
227 | SYSCALL_DEFINE4(c6x_execve, const char __user *, name, | ||
228 | const char __user *const __user *, argv, | ||
229 | const char __user *const __user *, envp, | ||
230 | struct pt_regs *, regs) | ||
231 | { | ||
232 | int error; | ||
233 | char *filename; | ||
234 | |||
235 | filename = getname(name); | ||
236 | error = PTR_ERR(filename); | ||
237 | if (IS_ERR(filename)) | ||
238 | goto out; | ||
239 | |||
240 | error = do_execve(filename, argv, envp, regs); | ||
241 | putname(filename); | ||
242 | out: | ||
243 | return error; | ||
244 | } | ||
245 | |||
246 | unsigned long get_wchan(struct task_struct *p) | 196 | unsigned long get_wchan(struct task_struct *p) |
247 | { | 197 | { |
248 | return p->thread.wchan; | 198 | return p->thread.wchan; |
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index a118163b04e..a67244473a3 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
@@ -48,6 +48,7 @@ config CRIS | |||
48 | select GENERIC_IOMAP | 48 | select GENERIC_IOMAP |
49 | select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32 | 49 | select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32 |
50 | select GENERIC_CMOS_UPDATE | 50 | select GENERIC_CMOS_UPDATE |
51 | select MODULES_USE_ELF_RELA | ||
51 | 52 | ||
52 | config HZ | 53 | config HZ |
53 | int | 54 | int |
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c index bee8df43c20..15ac7150371 100644 --- a/arch/cris/arch-v10/kernel/process.c +++ b/arch/cris/arch-v10/kernel/process.c | |||
@@ -212,14 +212,14 @@ asmlinkage int sys_execve(const char *fname, | |||
212 | struct pt_regs *regs) | 212 | struct pt_regs *regs) |
213 | { | 213 | { |
214 | int error; | 214 | int error; |
215 | char *filename; | 215 | struct filename *filename; |
216 | 216 | ||
217 | filename = getname(fname); | 217 | filename = getname(fname); |
218 | error = PTR_ERR(filename); | 218 | error = PTR_ERR(filename); |
219 | 219 | ||
220 | if (IS_ERR(filename)) | 220 | if (IS_ERR(filename)) |
221 | goto out; | 221 | goto out; |
222 | error = do_execve(filename, argv, envp, regs); | 222 | error = do_execve(filename->name, argv, envp, regs); |
223 | putname(filename); | 223 | putname(filename); |
224 | out: | 224 | out: |
225 | return error; | 225 | return error; |
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c index 0570e8ce603..4e999224635 100644 --- a/arch/cris/arch-v32/kernel/process.c +++ b/arch/cris/arch-v32/kernel/process.c | |||
@@ -224,7 +224,7 @@ sys_execve(const char *fname, | |||
224 | struct pt_regs *regs) | 224 | struct pt_regs *regs) |
225 | { | 225 | { |
226 | int error; | 226 | int error; |
227 | char *filename; | 227 | struct filename *filename; |
228 | 228 | ||
229 | filename = getname(fname); | 229 | filename = getname(fname); |
230 | error = PTR_ERR(filename); | 230 | error = PTR_ERR(filename); |
@@ -232,7 +232,7 @@ sys_execve(const char *fname, | |||
232 | if (IS_ERR(filename)) | 232 | if (IS_ERR(filename)) |
233 | goto out; | 233 | goto out; |
234 | 234 | ||
235 | error = do_execve(filename, argv, envp, regs); | 235 | error = do_execve(filename->name, argv, envp, regs); |
236 | putname(filename); | 236 | putname(filename); |
237 | out: | 237 | out: |
238 | return error; | 238 | return error; |
diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild index ff1bf7fcae8..6d43a951b5e 100644 --- a/arch/cris/include/asm/Kbuild +++ b/arch/cris/include/asm/Kbuild | |||
@@ -10,3 +10,4 @@ header-y += sync_serial.h | |||
10 | 10 | ||
11 | generic-y += clkdev.h | 11 | generic-y += clkdev.h |
12 | generic-y += exec.h | 12 | generic-y += exec.h |
13 | generic-y += module.h | ||
diff --git a/arch/cris/include/asm/module.h b/arch/cris/include/asm/module.h deleted file mode 100644 index 7ee72311bd7..00000000000 --- a/arch/cris/include/asm/module.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _ASM_CRIS_MODULE_H | ||
2 | #define _ASM_CRIS_MODULE_H | ||
3 | /* cris is simple */ | ||
4 | struct mod_arch_specific { }; | ||
5 | |||
6 | #define Elf_Shdr Elf32_Shdr | ||
7 | #define Elf_Sym Elf32_Sym | ||
8 | #define Elf_Ehdr Elf32_Ehdr | ||
9 | #endif /* _ASM_CRIS_MODULE_H */ | ||
diff --git a/arch/cris/include/asm/thread_info.h b/arch/cris/include/asm/thread_info.h index 5b1c448df5c..07c8c40c52b 100644 --- a/arch/cris/include/asm/thread_info.h +++ b/arch/cris/include/asm/thread_info.h | |||
@@ -78,15 +78,12 @@ struct thread_info { | |||
78 | #define TIF_SIGPENDING 2 /* signal pending */ | 78 | #define TIF_SIGPENDING 2 /* signal pending */ |
79 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 79 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
80 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | 80 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ |
81 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | ||
82 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ | 81 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ |
83 | 82 | ||
84 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 83 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
85 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 84 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
86 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 85 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
87 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 86 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
88 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
89 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
90 | 87 | ||
91 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 88 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
92 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ | 89 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ |
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index 9d262645f66..b7412504f08 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -12,6 +12,7 @@ config FRV | |||
12 | select ARCH_HAVE_NMI_SAFE_CMPXCHG | 12 | select ARCH_HAVE_NMI_SAFE_CMPXCHG |
13 | select GENERIC_CPU_DEVICES | 13 | select GENERIC_CPU_DEVICES |
14 | select ARCH_WANT_IPC_PARSE_VERSION | 14 | select ARCH_WANT_IPC_PARSE_VERSION |
15 | select GENERIC_KERNEL_THREAD | ||
15 | 16 | ||
16 | config ZONE_DMA | 17 | config ZONE_DMA |
17 | bool | 18 | bool |
diff --git a/arch/frv/include/asm/Kbuild b/arch/frv/include/asm/Kbuild index 251bd712557..4a159da2363 100644 --- a/arch/frv/include/asm/Kbuild +++ b/arch/frv/include/asm/Kbuild | |||
@@ -1,6 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | header-y += registers.h | ||
4 | header-y += termios.h | ||
5 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
6 | generic-y += exec.h | 3 | generic-y += exec.h |
diff --git a/arch/frv/include/asm/module.h b/arch/frv/include/asm/module.h index 3d5c6360289..a8848f09a21 100644 --- a/arch/frv/include/asm/module.h +++ b/arch/frv/include/asm/module.h | |||
@@ -11,13 +11,7 @@ | |||
11 | #ifndef _ASM_MODULE_H | 11 | #ifndef _ASM_MODULE_H |
12 | #define _ASM_MODULE_H | 12 | #define _ASM_MODULE_H |
13 | 13 | ||
14 | struct mod_arch_specific | 14 | #include <asm-generic/module.h> |
15 | { | ||
16 | }; | ||
17 | |||
18 | #define Elf_Shdr Elf32_Shdr | ||
19 | #define Elf_Sym Elf32_Sym | ||
20 | #define Elf_Ehdr Elf32_Ehdr | ||
21 | 15 | ||
22 | /* | 16 | /* |
23 | * Include the architecture version. | 17 | * Include the architecture version. |
diff --git a/arch/frv/include/asm/processor.h b/arch/frv/include/asm/processor.h index dccb9d16231..a34f309e580 100644 --- a/arch/frv/include/asm/processor.h +++ b/arch/frv/include/asm/processor.h | |||
@@ -92,14 +92,12 @@ extern struct task_struct *__kernel_current_task; | |||
92 | 92 | ||
93 | /* | 93 | /* |
94 | * do necessary setup to start up a newly executed thread. | 94 | * do necessary setup to start up a newly executed thread. |
95 | * - need to discard the frame stacked by init() invoking the execve syscall | ||
96 | */ | 95 | */ |
97 | #define start_thread(_regs, _pc, _usp) \ | 96 | #define start_thread(_regs, _pc, _usp) \ |
98 | do { \ | 97 | do { \ |
99 | __frame = __kernel_frame0_ptr; \ | 98 | _regs->pc = (_pc); \ |
100 | __frame->pc = (_pc); \ | 99 | _regs->psr &= ~PSR_S; \ |
101 | __frame->psr &= ~PSR_S; \ | 100 | _regs->sp = (_usp); \ |
102 | __frame->sp = (_usp); \ | ||
103 | } while(0) | 101 | } while(0) |
104 | 102 | ||
105 | /* Free all resources held by a thread. */ | 103 | /* Free all resources held by a thread. */ |
@@ -107,7 +105,6 @@ static inline void release_thread(struct task_struct *dead_task) | |||
107 | { | 105 | { |
108 | } | 106 | } |
109 | 107 | ||
110 | extern asmlinkage int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | ||
111 | extern asmlinkage void save_user_regs(struct user_context *target); | 108 | extern asmlinkage void save_user_regs(struct user_context *target); |
112 | extern asmlinkage void *restore_user_regs(const struct user_context *target, ...); | 109 | extern asmlinkage void *restore_user_regs(const struct user_context *target, ...); |
113 | 110 | ||
diff --git a/arch/frv/include/asm/ptrace.h b/arch/frv/include/asm/ptrace.h index ef6635ca4ec..034f1793419 100644 --- a/arch/frv/include/asm/ptrace.h +++ b/arch/frv/include/asm/ptrace.h | |||
@@ -11,58 +11,10 @@ | |||
11 | #ifndef _ASM_PTRACE_H | 11 | #ifndef _ASM_PTRACE_H |
12 | #define _ASM_PTRACE_H | 12 | #define _ASM_PTRACE_H |
13 | 13 | ||
14 | #include <asm/registers.h> | ||
15 | #ifdef __KERNEL__ | ||
16 | #include <asm/irq_regs.h> | 14 | #include <asm/irq_regs.h> |
15 | #include <uapi/asm/ptrace.h> | ||
17 | 16 | ||
18 | #define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0) | 17 | #define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0) |
19 | #endif | ||
20 | |||
21 | |||
22 | #define PT_PSR 0 | ||
23 | #define PT_ISR 1 | ||
24 | #define PT_CCR 2 | ||
25 | #define PT_CCCR 3 | ||
26 | #define PT_LR 4 | ||
27 | #define PT_LCR 5 | ||
28 | #define PT_PC 6 | ||
29 | |||
30 | #define PT__STATUS 7 /* exception status */ | ||
31 | #define PT_SYSCALLNO 8 /* syscall number or -1 */ | ||
32 | #define PT_ORIG_GR8 9 /* saved GR8 for signal handling */ | ||
33 | #define PT_GNER0 10 | ||
34 | #define PT_GNER1 11 | ||
35 | #define PT_IACC0H 12 | ||
36 | #define PT_IACC0L 13 | ||
37 | |||
38 | #define PT_GR(j) ( 14 + (j)) /* GRj for 0<=j<=63 */ | ||
39 | #define PT_FR(j) ( 78 + (j)) /* FRj for 0<=j<=63 */ | ||
40 | #define PT_FNER(j) (142 + (j)) /* FNERj for 0<=j<=1 */ | ||
41 | #define PT_MSR(j) (144 + (j)) /* MSRj for 0<=j<=2 */ | ||
42 | #define PT_ACC(j) (146 + (j)) /* ACCj for 0<=j<=7 */ | ||
43 | #define PT_ACCG(jklm) (154 + (jklm)) /* ACCGjklm for 0<=jklm<=1 (reads four regs per slot) */ | ||
44 | #define PT_FSR(j) (156 + (j)) /* FSRj for 0<=j<=0 */ | ||
45 | #define PT__GPEND 78 | ||
46 | #define PT__END 157 | ||
47 | |||
48 | #define PT_TBR PT_GR(0) | ||
49 | #define PT_SP PT_GR(1) | ||
50 | #define PT_FP PT_GR(2) | ||
51 | #define PT_PREV_FRAME PT_GR(28) /* previous exception frame pointer (old gr28 value) */ | ||
52 | #define PT_CURR_TASK PT_GR(29) /* current task */ | ||
53 | |||
54 | |||
55 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ | ||
56 | #define PTRACE_GETREGS 12 | ||
57 | #define PTRACE_SETREGS 13 | ||
58 | #define PTRACE_GETFPREGS 14 | ||
59 | #define PTRACE_SETFPREGS 15 | ||
60 | #define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ | ||
61 | |||
62 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ | ||
63 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ | ||
64 | |||
65 | #ifdef __KERNEL__ | ||
66 | #ifndef __ASSEMBLY__ | 18 | #ifndef __ASSEMBLY__ |
67 | 19 | ||
68 | struct task_struct; | 20 | struct task_struct; |
@@ -76,6 +28,7 @@ register struct pt_regs *__frame asm("gr28"); | |||
76 | #define user_mode(regs) (!((regs)->psr & PSR_S)) | 28 | #define user_mode(regs) (!((regs)->psr & PSR_S)) |
77 | #define instruction_pointer(regs) ((regs)->pc) | 29 | #define instruction_pointer(regs) ((regs)->pc) |
78 | #define user_stack_pointer(regs) ((regs)->sp) | 30 | #define user_stack_pointer(regs) ((regs)->sp) |
31 | #define current_pt_regs() (__frame) | ||
79 | 32 | ||
80 | extern unsigned long user_stack(const struct pt_regs *); | 33 | extern unsigned long user_stack(const struct pt_regs *); |
81 | #define profile_pc(regs) ((regs)->pc) | 34 | #define profile_pc(regs) ((regs)->pc) |
@@ -85,5 +38,4 @@ extern unsigned long user_stack(const struct pt_regs *); | |||
85 | #define arch_has_single_step() (1) | 38 | #define arch_has_single_step() (1) |
86 | 39 | ||
87 | #endif /* !__ASSEMBLY__ */ | 40 | #endif /* !__ASSEMBLY__ */ |
88 | #endif /* __KERNEL__ */ | ||
89 | #endif /* _ASM_PTRACE_H */ | 41 | #endif /* _ASM_PTRACE_H */ |
diff --git a/arch/frv/include/asm/setup.h b/arch/frv/include/asm/setup.h index afd787ceede..aa76f2eac09 100644 --- a/arch/frv/include/asm/setup.h +++ b/arch/frv/include/asm/setup.h | |||
@@ -8,15 +8,12 @@ | |||
8 | * as published by the Free Software Foundation; either version | 8 | * as published by the Free Software Foundation; either version |
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | |||
12 | #ifndef _ASM_SETUP_H | 11 | #ifndef _ASM_SETUP_H |
13 | #define _ASM_SETUP_H | 12 | #define _ASM_SETUP_H |
14 | 13 | ||
15 | #define COMMAND_LINE_SIZE 512 | ||
16 | |||
17 | #ifdef __KERNEL__ | ||
18 | 14 | ||
19 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <uapi/asm/setup.h> | ||
20 | 17 | ||
21 | #ifndef __ASSEMBLY__ | 18 | #ifndef __ASSEMBLY__ |
22 | 19 | ||
@@ -26,6 +23,4 @@ extern unsigned long __initdata num_mappedpages; | |||
26 | 23 | ||
27 | #endif /* !__ASSEMBLY__ */ | 24 | #endif /* !__ASSEMBLY__ */ |
28 | 25 | ||
29 | #endif /* __KERNEL__ */ | ||
30 | |||
31 | #endif /* _ASM_SETUP_H */ | 26 | #endif /* _ASM_SETUP_H */ |
diff --git a/arch/frv/include/asm/signal.h b/arch/frv/include/asm/signal.h index f071e813dcb..599500a3102 100644 --- a/arch/frv/include/asm/signal.h +++ b/arch/frv/include/asm/signal.h | |||
@@ -1,21 +1,8 @@ | |||
1 | #ifndef _ASM_SIGNAL_H | 1 | #ifndef _ASM_SIGNAL_H |
2 | #define _ASM_SIGNAL_H | 2 | #define _ASM_SIGNAL_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <uapi/asm/signal.h> |
5 | 5 | ||
6 | #ifndef __KERNEL__ | ||
7 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
8 | |||
9 | #define NSIG 32 | ||
10 | typedef unsigned long sigset_t; | ||
11 | |||
12 | #endif /* !__KERNEL__ */ | ||
13 | |||
14 | #define SA_RESTORER 0x04000000 /* to get struct sigaction correct */ | ||
15 | |||
16 | #include <asm-generic/signal.h> | ||
17 | |||
18 | #ifdef __KERNEL__ | ||
19 | struct old_sigaction { | 6 | struct old_sigaction { |
20 | __sighandler_t sa_handler; | 7 | __sighandler_t sa_handler; |
21 | old_sigset_t sa_mask; | 8 | old_sigset_t sa_mask; |
@@ -23,22 +10,4 @@ struct old_sigaction { | |||
23 | __sigrestore_t sa_restorer; | 10 | __sigrestore_t sa_restorer; |
24 | }; | 11 | }; |
25 | 12 | ||
26 | #else | ||
27 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
28 | |||
29 | struct sigaction { | ||
30 | union { | ||
31 | __sighandler_t _sa_handler; | ||
32 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
33 | } _u; | ||
34 | sigset_t sa_mask; | ||
35 | unsigned long sa_flags; | ||
36 | void (*sa_restorer)(void); | ||
37 | }; | ||
38 | |||
39 | #define sa_handler _u._sa_handler | ||
40 | #define sa_sigaction _u._sa_sigaction | ||
41 | |||
42 | #endif /* __KERNEL__ */ | ||
43 | |||
44 | #endif /* _ASM_SIGNAL_H */ | 13 | #endif /* _ASM_SIGNAL_H */ |
diff --git a/arch/frv/include/asm/termios.h b/arch/frv/include/asm/termios.h index b4868aafe79..9f753fc0953 100644 --- a/arch/frv/include/asm/termios.h +++ b/arch/frv/include/asm/termios.h | |||
@@ -1,27 +1,8 @@ | |||
1 | #ifndef _ASM_TERMIOS_H | 1 | #ifndef _ASM_TERMIOS_H |
2 | #define _ASM_TERMIOS_H | 2 | #define _ASM_TERMIOS_H |
3 | 3 | ||
4 | #include <asm/termbits.h> | 4 | #include <uapi/asm/termios.h> |
5 | #include <asm/ioctls.h> | ||
6 | 5 | ||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | #ifdef __KERNEL__ | ||
25 | /* intr=^C quit=^| erase=del kill=^U | 6 | /* intr=^C quit=^| erase=del kill=^U |
26 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | 7 | eof=^D vtime=\0 vmin=\1 sxtc=\0 |
27 | start=^Q stop=^S susp=^Z eol=\0 | 8 | start=^Q stop=^S susp=^Z eol=\0 |
@@ -29,30 +10,5 @@ struct termio { | |||
29 | eol2=\0 | 10 | eol2=\0 |
30 | */ | 11 | */ |
31 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" | 12 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" |
32 | #endif | ||
33 | |||
34 | /* modem lines */ | ||
35 | #define TIOCM_LE 0x001 | ||
36 | #define TIOCM_DTR 0x002 | ||
37 | #define TIOCM_RTS 0x004 | ||
38 | #define TIOCM_ST 0x008 | ||
39 | #define TIOCM_SR 0x010 | ||
40 | #define TIOCM_CTS 0x020 | ||
41 | #define TIOCM_CAR 0x040 | ||
42 | #define TIOCM_RNG 0x080 | ||
43 | #define TIOCM_DSR 0x100 | ||
44 | #define TIOCM_CD TIOCM_CAR | ||
45 | #define TIOCM_RI TIOCM_RNG | ||
46 | #define TIOCM_OUT1 0x2000 | ||
47 | #define TIOCM_OUT2 0x4000 | ||
48 | #define TIOCM_LOOP 0x8000 | ||
49 | |||
50 | #define TIOCM_MODEM_BITS TIOCM_OUT2 /* IRDA support */ | ||
51 | |||
52 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
53 | |||
54 | #ifdef __KERNEL__ | ||
55 | #include <asm-generic/termios-base.h> | 13 | #include <asm-generic/termios-base.h> |
56 | #endif | ||
57 | |||
58 | #endif /* _ASM_TERMIOS_H */ | 14 | #endif /* _ASM_TERMIOS_H */ |
diff --git a/arch/frv/include/asm/thread_info.h b/arch/frv/include/asm/thread_info.h index 0ff03a33c81..bebd7eadc77 100644 --- a/arch/frv/include/asm/thread_info.h +++ b/arch/frv/include/asm/thread_info.h | |||
@@ -94,7 +94,6 @@ register struct thread_info *__current_thread_info asm("gr15"); | |||
94 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 94 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
95 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ | 95 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ |
96 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ | 96 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ |
97 | #define TIF_POLLING_NRFLAG 6 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | ||
98 | #define TIF_MEMDIE 7 /* is terminating due to OOM killer */ | 97 | #define TIF_MEMDIE 7 /* is terminating due to OOM killer */ |
99 | 98 | ||
100 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 99 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
@@ -102,8 +101,6 @@ register struct thread_info *__current_thread_info asm("gr15"); | |||
102 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 101 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
103 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 102 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
104 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 103 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
105 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | ||
106 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | ||
107 | 104 | ||
108 | /* work to do on interrupt/exception return */ | 105 | /* work to do on interrupt/exception return */ |
109 | #define _TIF_WORK_MASK \ | 106 | #define _TIF_WORK_MASK \ |
diff --git a/arch/frv/include/asm/types.h b/arch/frv/include/asm/types.h index 390a612f3a5..6bc63650d83 100644 --- a/arch/frv/include/asm/types.h +++ b/arch/frv/include/asm/types.h | |||
@@ -8,19 +8,15 @@ | |||
8 | * as published by the Free Software Foundation; either version | 8 | * as published by the Free Software Foundation; either version |
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | |||
12 | #ifndef _ASM_TYPES_H | 11 | #ifndef _ASM_TYPES_H |
13 | #define _ASM_TYPES_H | 12 | #define _ASM_TYPES_H |
14 | 13 | ||
15 | #include <asm-generic/int-ll64.h> | 14 | #include <uapi/asm/types.h> |
16 | 15 | ||
17 | /* | 16 | /* |
18 | * These aren't exported outside the kernel to avoid name space clashes | 17 | * These aren't exported outside the kernel to avoid name space clashes |
19 | */ | 18 | */ |
20 | #ifdef __KERNEL__ | ||
21 | 19 | ||
22 | #define BITS_PER_LONG 32 | 20 | #define BITS_PER_LONG 32 |
23 | 21 | ||
24 | #endif /* __KERNEL__ */ | ||
25 | |||
26 | #endif /* _ASM_TYPES_H */ | 22 | #endif /* _ASM_TYPES_H */ |
diff --git a/arch/frv/include/asm/unistd.h b/arch/frv/include/asm/unistd.h index 67f23a311db..266a5b25a0c 100644 --- a/arch/frv/include/asm/unistd.h +++ b/arch/frv/include/asm/unistd.h | |||
@@ -1,351 +1,8 @@ | |||
1 | #ifndef _ASM_UNISTD_H_ | 1 | #ifndef _ASM_UNISTD_H_ |
2 | #define _ASM_UNISTD_H_ | 2 | #define _ASM_UNISTD_H_ |
3 | 3 | ||
4 | /* | 4 | #include <uapi/asm/unistd.h> |
5 | * This file contains the system call numbers. | ||
6 | */ | ||
7 | |||
8 | #define __NR_restart_syscall 0 | ||
9 | #define __NR_exit 1 | ||
10 | #define __NR_fork 2 | ||
11 | #define __NR_read 3 | ||
12 | #define __NR_write 4 | ||
13 | #define __NR_open 5 | ||
14 | #define __NR_close 6 | ||
15 | #define __NR_waitpid 7 | ||
16 | #define __NR_creat 8 | ||
17 | #define __NR_link 9 | ||
18 | #define __NR_unlink 10 | ||
19 | #define __NR_execve 11 | ||
20 | #define __NR_chdir 12 | ||
21 | #define __NR_time 13 | ||
22 | #define __NR_mknod 14 | ||
23 | #define __NR_chmod 15 | ||
24 | #define __NR_lchown 16 | ||
25 | #define __NR_break 17 | ||
26 | #define __NR_oldstat 18 | ||
27 | #define __NR_lseek 19 | ||
28 | #define __NR_getpid 20 | ||
29 | #define __NR_mount 21 | ||
30 | #define __NR_umount 22 | ||
31 | #define __NR_setuid 23 | ||
32 | #define __NR_getuid 24 | ||
33 | #define __NR_stime 25 | ||
34 | #define __NR_ptrace 26 | ||
35 | #define __NR_alarm 27 | ||
36 | #define __NR_oldfstat 28 | ||
37 | #define __NR_pause 29 | ||
38 | #define __NR_utime 30 | ||
39 | #define __NR_stty 31 | ||
40 | #define __NR_gtty 32 | ||
41 | #define __NR_access 33 | ||
42 | #define __NR_nice 34 | ||
43 | #define __NR_ftime 35 | ||
44 | #define __NR_sync 36 | ||
45 | #define __NR_kill 37 | ||
46 | #define __NR_rename 38 | ||
47 | #define __NR_mkdir 39 | ||
48 | #define __NR_rmdir 40 | ||
49 | #define __NR_dup 41 | ||
50 | #define __NR_pipe 42 | ||
51 | #define __NR_times 43 | ||
52 | #define __NR_prof 44 | ||
53 | #define __NR_brk 45 | ||
54 | #define __NR_setgid 46 | ||
55 | #define __NR_getgid 47 | ||
56 | #define __NR_signal 48 | ||
57 | #define __NR_geteuid 49 | ||
58 | #define __NR_getegid 50 | ||
59 | #define __NR_acct 51 | ||
60 | #define __NR_umount2 52 | ||
61 | #define __NR_lock 53 | ||
62 | #define __NR_ioctl 54 | ||
63 | #define __NR_fcntl 55 | ||
64 | #define __NR_mpx 56 | ||
65 | #define __NR_setpgid 57 | ||
66 | #define __NR_ulimit 58 | ||
67 | // #define __NR_oldolduname /* 59 */ obsolete | ||
68 | #define __NR_umask 60 | ||
69 | #define __NR_chroot 61 | ||
70 | #define __NR_ustat 62 | ||
71 | #define __NR_dup2 63 | ||
72 | #define __NR_getppid 64 | ||
73 | #define __NR_getpgrp 65 | ||
74 | #define __NR_setsid 66 | ||
75 | #define __NR_sigaction 67 | ||
76 | #define __NR_sgetmask 68 | ||
77 | #define __NR_ssetmask 69 | ||
78 | #define __NR_setreuid 70 | ||
79 | #define __NR_setregid 71 | ||
80 | #define __NR_sigsuspend 72 | ||
81 | #define __NR_sigpending 73 | ||
82 | #define __NR_sethostname 74 | ||
83 | #define __NR_setrlimit 75 | ||
84 | #define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ | ||
85 | #define __NR_getrusage 77 | ||
86 | #define __NR_gettimeofday 78 | ||
87 | #define __NR_settimeofday 79 | ||
88 | #define __NR_getgroups 80 | ||
89 | #define __NR_setgroups 81 | ||
90 | #define __NR_select 82 | ||
91 | #define __NR_symlink 83 | ||
92 | #define __NR_oldlstat 84 | ||
93 | #define __NR_readlink 85 | ||
94 | #define __NR_uselib 86 | ||
95 | #define __NR_swapon 87 | ||
96 | #define __NR_reboot 88 | ||
97 | #define __NR_readdir 89 | ||
98 | // #define __NR_mmap 90 /* obsolete - not implemented */ | ||
99 | #define __NR_munmap 91 | ||
100 | #define __NR_truncate 92 | ||
101 | #define __NR_ftruncate 93 | ||
102 | #define __NR_fchmod 94 | ||
103 | #define __NR_fchown 95 | ||
104 | #define __NR_getpriority 96 | ||
105 | #define __NR_setpriority 97 | ||
106 | // #define __NR_profil /* 98 */ obsolete | ||
107 | #define __NR_statfs 99 | ||
108 | #define __NR_fstatfs 100 | ||
109 | // #define __NR_ioperm /* 101 */ not supported | ||
110 | #define __NR_socketcall 102 | ||
111 | #define __NR_syslog 103 | ||
112 | #define __NR_setitimer 104 | ||
113 | #define __NR_getitimer 105 | ||
114 | #define __NR_stat 106 | ||
115 | #define __NR_lstat 107 | ||
116 | #define __NR_fstat 108 | ||
117 | // #define __NR_olduname /* 109 */ obsolete | ||
118 | // #define __NR_iopl /* 110 */ not supported | ||
119 | #define __NR_vhangup 111 | ||
120 | // #define __NR_idle /* 112 */ Obsolete | ||
121 | // #define __NR_vm86old /* 113 */ not supported | ||
122 | #define __NR_wait4 114 | ||
123 | #define __NR_swapoff 115 | ||
124 | #define __NR_sysinfo 116 | ||
125 | #define __NR_ipc 117 | ||
126 | #define __NR_fsync 118 | ||
127 | #define __NR_sigreturn 119 | ||
128 | #define __NR_clone 120 | ||
129 | #define __NR_setdomainname 121 | ||
130 | #define __NR_uname 122 | ||
131 | // #define __NR_modify_ldt /* 123 */ not supported | ||
132 | #define __NR_cacheflush 123 | ||
133 | #define __NR_adjtimex 124 | ||
134 | #define __NR_mprotect 125 | ||
135 | #define __NR_sigprocmask 126 | ||
136 | #define __NR_create_module 127 | ||
137 | #define __NR_init_module 128 | ||
138 | #define __NR_delete_module 129 | ||
139 | #define __NR_get_kernel_syms 130 | ||
140 | #define __NR_quotactl 131 | ||
141 | #define __NR_getpgid 132 | ||
142 | #define __NR_fchdir 133 | ||
143 | #define __NR_bdflush 134 | ||
144 | #define __NR_sysfs 135 | ||
145 | #define __NR_personality 136 | ||
146 | #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ | ||
147 | #define __NR_setfsuid 138 | ||
148 | #define __NR_setfsgid 139 | ||
149 | #define __NR__llseek 140 | ||
150 | #define __NR_getdents 141 | ||
151 | #define __NR__newselect 142 | ||
152 | #define __NR_flock 143 | ||
153 | #define __NR_msync 144 | ||
154 | #define __NR_readv 145 | ||
155 | #define __NR_writev 146 | ||
156 | #define __NR_getsid 147 | ||
157 | #define __NR_fdatasync 148 | ||
158 | #define __NR__sysctl 149 | ||
159 | #define __NR_mlock 150 | ||
160 | #define __NR_munlock 151 | ||
161 | #define __NR_mlockall 152 | ||
162 | #define __NR_munlockall 153 | ||
163 | #define __NR_sched_setparam 154 | ||
164 | #define __NR_sched_getparam 155 | ||
165 | #define __NR_sched_setscheduler 156 | ||
166 | #define __NR_sched_getscheduler 157 | ||
167 | #define __NR_sched_yield 158 | ||
168 | #define __NR_sched_get_priority_max 159 | ||
169 | #define __NR_sched_get_priority_min 160 | ||
170 | #define __NR_sched_rr_get_interval 161 | ||
171 | #define __NR_nanosleep 162 | ||
172 | #define __NR_mremap 163 | ||
173 | #define __NR_setresuid 164 | ||
174 | #define __NR_getresuid 165 | ||
175 | // #define __NR_vm86 /* 166 */ not supported | ||
176 | #define __NR_query_module 167 | ||
177 | #define __NR_poll 168 | ||
178 | #define __NR_nfsservctl 169 | ||
179 | #define __NR_setresgid 170 | ||
180 | #define __NR_getresgid 171 | ||
181 | #define __NR_prctl 172 | ||
182 | #define __NR_rt_sigreturn 173 | ||
183 | #define __NR_rt_sigaction 174 | ||
184 | #define __NR_rt_sigprocmask 175 | ||
185 | #define __NR_rt_sigpending 176 | ||
186 | #define __NR_rt_sigtimedwait 177 | ||
187 | #define __NR_rt_sigqueueinfo 178 | ||
188 | #define __NR_rt_sigsuspend 179 | ||
189 | #define __NR_pread64 180 | ||
190 | #define __NR_pwrite64 181 | ||
191 | #define __NR_chown 182 | ||
192 | #define __NR_getcwd 183 | ||
193 | #define __NR_capget 184 | ||
194 | #define __NR_capset 185 | ||
195 | #define __NR_sigaltstack 186 | ||
196 | #define __NR_sendfile 187 | ||
197 | #define __NR_getpmsg 188 /* some people actually want streams */ | ||
198 | #define __NR_putpmsg 189 /* some people actually want streams */ | ||
199 | #define __NR_vfork 190 | ||
200 | #define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ | ||
201 | #define __NR_mmap2 192 | ||
202 | #define __NR_truncate64 193 | ||
203 | #define __NR_ftruncate64 194 | ||
204 | #define __NR_stat64 195 | ||
205 | #define __NR_lstat64 196 | ||
206 | #define __NR_fstat64 197 | ||
207 | #define __NR_lchown32 198 | ||
208 | #define __NR_getuid32 199 | ||
209 | #define __NR_getgid32 200 | ||
210 | #define __NR_geteuid32 201 | ||
211 | #define __NR_getegid32 202 | ||
212 | #define __NR_setreuid32 203 | ||
213 | #define __NR_setregid32 204 | ||
214 | #define __NR_getgroups32 205 | ||
215 | #define __NR_setgroups32 206 | ||
216 | #define __NR_fchown32 207 | ||
217 | #define __NR_setresuid32 208 | ||
218 | #define __NR_getresuid32 209 | ||
219 | #define __NR_setresgid32 210 | ||
220 | #define __NR_getresgid32 211 | ||
221 | #define __NR_chown32 212 | ||
222 | #define __NR_setuid32 213 | ||
223 | #define __NR_setgid32 214 | ||
224 | #define __NR_setfsuid32 215 | ||
225 | #define __NR_setfsgid32 216 | ||
226 | #define __NR_pivot_root 217 | ||
227 | #define __NR_mincore 218 | ||
228 | #define __NR_madvise 219 | ||
229 | |||
230 | #define __NR_getdents64 220 | ||
231 | #define __NR_fcntl64 221 | ||
232 | #define __NR_security 223 /* syscall for security modules */ | ||
233 | #define __NR_gettid 224 | ||
234 | #define __NR_readahead 225 | ||
235 | #define __NR_setxattr 226 | ||
236 | #define __NR_lsetxattr 227 | ||
237 | #define __NR_fsetxattr 228 | ||
238 | #define __NR_getxattr 229 | ||
239 | #define __NR_lgetxattr 230 | ||
240 | #define __NR_fgetxattr 231 | ||
241 | #define __NR_listxattr 232 | ||
242 | #define __NR_llistxattr 233 | ||
243 | #define __NR_flistxattr 234 | ||
244 | #define __NR_removexattr 235 | ||
245 | #define __NR_lremovexattr 236 | ||
246 | #define __NR_fremovexattr 237 | ||
247 | #define __NR_tkill 238 | ||
248 | #define __NR_sendfile64 239 | ||
249 | #define __NR_futex 240 | ||
250 | #define __NR_sched_setaffinity 241 | ||
251 | #define __NR_sched_getaffinity 242 | ||
252 | #define __NR_set_thread_area 243 | ||
253 | #define __NR_get_thread_area 244 | ||
254 | #define __NR_io_setup 245 | ||
255 | #define __NR_io_destroy 246 | ||
256 | #define __NR_io_getevents 247 | ||
257 | #define __NR_io_submit 248 | ||
258 | #define __NR_io_cancel 249 | ||
259 | #define __NR_fadvise64 250 | ||
260 | |||
261 | #define __NR_exit_group 252 | ||
262 | #define __NR_lookup_dcookie 253 | ||
263 | #define __NR_epoll_create 254 | ||
264 | #define __NR_epoll_ctl 255 | ||
265 | #define __NR_epoll_wait 256 | ||
266 | #define __NR_remap_file_pages 257 | ||
267 | #define __NR_set_tid_address 258 | ||
268 | #define __NR_timer_create 259 | ||
269 | #define __NR_timer_settime (__NR_timer_create+1) | ||
270 | #define __NR_timer_gettime (__NR_timer_create+2) | ||
271 | #define __NR_timer_getoverrun (__NR_timer_create+3) | ||
272 | #define __NR_timer_delete (__NR_timer_create+4) | ||
273 | #define __NR_clock_settime (__NR_timer_create+5) | ||
274 | #define __NR_clock_gettime (__NR_timer_create+6) | ||
275 | #define __NR_clock_getres (__NR_timer_create+7) | ||
276 | #define __NR_clock_nanosleep (__NR_timer_create+8) | ||
277 | #define __NR_statfs64 268 | ||
278 | #define __NR_fstatfs64 269 | ||
279 | #define __NR_tgkill 270 | ||
280 | #define __NR_utimes 271 | ||
281 | #define __NR_fadvise64_64 272 | ||
282 | #define __NR_vserver 273 | ||
283 | #define __NR_mbind 274 | ||
284 | #define __NR_get_mempolicy 275 | ||
285 | #define __NR_set_mempolicy 276 | ||
286 | #define __NR_mq_open 277 | ||
287 | #define __NR_mq_unlink (__NR_mq_open+1) | ||
288 | #define __NR_mq_timedsend (__NR_mq_open+2) | ||
289 | #define __NR_mq_timedreceive (__NR_mq_open+3) | ||
290 | #define __NR_mq_notify (__NR_mq_open+4) | ||
291 | #define __NR_mq_getsetattr (__NR_mq_open+5) | ||
292 | #define __NR_kexec_load 283 | ||
293 | #define __NR_waitid 284 | ||
294 | /* #define __NR_sys_setaltroot 285 */ | ||
295 | #define __NR_add_key 286 | ||
296 | #define __NR_request_key 287 | ||
297 | #define __NR_keyctl 288 | ||
298 | #define __NR_ioprio_set 289 | ||
299 | #define __NR_ioprio_get 290 | ||
300 | #define __NR_inotify_init 291 | ||
301 | #define __NR_inotify_add_watch 292 | ||
302 | #define __NR_inotify_rm_watch 293 | ||
303 | #define __NR_migrate_pages 294 | ||
304 | #define __NR_openat 295 | ||
305 | #define __NR_mkdirat 296 | ||
306 | #define __NR_mknodat 297 | ||
307 | #define __NR_fchownat 298 | ||
308 | #define __NR_futimesat 299 | ||
309 | #define __NR_fstatat64 300 | ||
310 | #define __NR_unlinkat 301 | ||
311 | #define __NR_renameat 302 | ||
312 | #define __NR_linkat 303 | ||
313 | #define __NR_symlinkat 304 | ||
314 | #define __NR_readlinkat 305 | ||
315 | #define __NR_fchmodat 306 | ||
316 | #define __NR_faccessat 307 | ||
317 | #define __NR_pselect6 308 | ||
318 | #define __NR_ppoll 309 | ||
319 | #define __NR_unshare 310 | ||
320 | #define __NR_set_robust_list 311 | ||
321 | #define __NR_get_robust_list 312 | ||
322 | #define __NR_splice 313 | ||
323 | #define __NR_sync_file_range 314 | ||
324 | #define __NR_tee 315 | ||
325 | #define __NR_vmsplice 316 | ||
326 | #define __NR_move_pages 317 | ||
327 | #define __NR_getcpu 318 | ||
328 | #define __NR_epoll_pwait 319 | ||
329 | #define __NR_utimensat 320 | ||
330 | #define __NR_signalfd 321 | ||
331 | #define __NR_timerfd_create 322 | ||
332 | #define __NR_eventfd 323 | ||
333 | #define __NR_fallocate 324 | ||
334 | #define __NR_timerfd_settime 325 | ||
335 | #define __NR_timerfd_gettime 326 | ||
336 | #define __NR_signalfd4 327 | ||
337 | #define __NR_eventfd2 328 | ||
338 | #define __NR_epoll_create1 329 | ||
339 | #define __NR_dup3 330 | ||
340 | #define __NR_pipe2 331 | ||
341 | #define __NR_inotify_init1 332 | ||
342 | #define __NR_preadv 333 | ||
343 | #define __NR_pwritev 334 | ||
344 | #define __NR_rt_tgsigqueueinfo 335 | ||
345 | #define __NR_perf_event_open 336 | ||
346 | #define __NR_setns 337 | ||
347 | 5 | ||
348 | #ifdef __KERNEL__ | ||
349 | 6 | ||
350 | #define NR_syscalls 338 | 7 | #define NR_syscalls 338 |
351 | 8 | ||
@@ -372,6 +29,8 @@ | |||
372 | #define __ARCH_WANT_SYS_SIGPROCMASK | 29 | #define __ARCH_WANT_SYS_SIGPROCMASK |
373 | #define __ARCH_WANT_SYS_RT_SIGACTION | 30 | #define __ARCH_WANT_SYS_RT_SIGACTION |
374 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 31 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
32 | #define __ARCH_WANT_SYS_EXECVE | ||
33 | #define __ARCH_WANT_KERNEL_EXECVE | ||
375 | 34 | ||
376 | /* | 35 | /* |
377 | * "Conditional" syscalls | 36 | * "Conditional" syscalls |
@@ -383,5 +42,4 @@ | |||
383 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 42 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
384 | #endif | 43 | #endif |
385 | 44 | ||
386 | #endif /* __KERNEL__ */ | ||
387 | #endif /* _ASM_UNISTD_H_ */ | 45 | #endif /* _ASM_UNISTD_H_ */ |
diff --git a/arch/frv/include/uapi/asm/Kbuild b/arch/frv/include/uapi/asm/Kbuild index baebb3da1d4..42a2b33461c 100644 --- a/arch/frv/include/uapi/asm/Kbuild +++ b/arch/frv/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,35 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += auxvec.h | ||
5 | header-y += bitsperlong.h | ||
6 | header-y += byteorder.h | ||
7 | header-y += errno.h | ||
8 | header-y += fcntl.h | ||
9 | header-y += ioctl.h | ||
10 | header-y += ioctls.h | ||
11 | header-y += ipcbuf.h | ||
12 | header-y += kvm_para.h | ||
13 | header-y += mman.h | ||
14 | header-y += msgbuf.h | ||
15 | header-y += param.h | ||
16 | header-y += poll.h | ||
17 | header-y += posix_types.h | ||
18 | header-y += ptrace.h | ||
19 | header-y += registers.h | ||
20 | header-y += resource.h | ||
21 | header-y += sembuf.h | ||
22 | header-y += setup.h | ||
23 | header-y += shmbuf.h | ||
24 | header-y += sigcontext.h | ||
25 | header-y += siginfo.h | ||
26 | header-y += signal.h | ||
27 | header-y += socket.h | ||
28 | header-y += sockios.h | ||
29 | header-y += stat.h | ||
30 | header-y += statfs.h | ||
31 | header-y += swab.h | ||
32 | header-y += termbits.h | ||
33 | header-y += termios.h | ||
34 | header-y += types.h | ||
35 | header-y += unistd.h | ||
diff --git a/arch/frv/include/asm/auxvec.h b/arch/frv/include/uapi/asm/auxvec.h index 07710778fa1..07710778fa1 100644 --- a/arch/frv/include/asm/auxvec.h +++ b/arch/frv/include/uapi/asm/auxvec.h | |||
diff --git a/arch/frv/include/asm/bitsperlong.h b/arch/frv/include/uapi/asm/bitsperlong.h index 6dc0bb0c13b..6dc0bb0c13b 100644 --- a/arch/frv/include/asm/bitsperlong.h +++ b/arch/frv/include/uapi/asm/bitsperlong.h | |||
diff --git a/arch/frv/include/asm/byteorder.h b/arch/frv/include/uapi/asm/byteorder.h index f29b7593e08..f29b7593e08 100644 --- a/arch/frv/include/asm/byteorder.h +++ b/arch/frv/include/uapi/asm/byteorder.h | |||
diff --git a/arch/frv/include/asm/errno.h b/arch/frv/include/uapi/asm/errno.h index d010795ceef..d010795ceef 100644 --- a/arch/frv/include/asm/errno.h +++ b/arch/frv/include/uapi/asm/errno.h | |||
diff --git a/arch/frv/include/asm/fcntl.h b/arch/frv/include/uapi/asm/fcntl.h index 46ab12db573..46ab12db573 100644 --- a/arch/frv/include/asm/fcntl.h +++ b/arch/frv/include/uapi/asm/fcntl.h | |||
diff --git a/arch/frv/include/asm/ioctl.h b/arch/frv/include/uapi/asm/ioctl.h index b279fe06dfe..b279fe06dfe 100644 --- a/arch/frv/include/asm/ioctl.h +++ b/arch/frv/include/uapi/asm/ioctl.h | |||
diff --git a/arch/frv/include/asm/ioctls.h b/arch/frv/include/uapi/asm/ioctls.h index 2f9fb436ec3..2f9fb436ec3 100644 --- a/arch/frv/include/asm/ioctls.h +++ b/arch/frv/include/uapi/asm/ioctls.h | |||
diff --git a/arch/frv/include/asm/ipcbuf.h b/arch/frv/include/uapi/asm/ipcbuf.h index 84c7e51cb6d..84c7e51cb6d 100644 --- a/arch/frv/include/asm/ipcbuf.h +++ b/arch/frv/include/uapi/asm/ipcbuf.h | |||
diff --git a/arch/frv/include/asm/kvm_para.h b/arch/frv/include/uapi/asm/kvm_para.h index 14fab8f0b95..14fab8f0b95 100644 --- a/arch/frv/include/asm/kvm_para.h +++ b/arch/frv/include/uapi/asm/kvm_para.h | |||
diff --git a/arch/frv/include/asm/mman.h b/arch/frv/include/uapi/asm/mman.h index 8eebf89f5ab..8eebf89f5ab 100644 --- a/arch/frv/include/asm/mman.h +++ b/arch/frv/include/uapi/asm/mman.h | |||
diff --git a/arch/frv/include/asm/msgbuf.h b/arch/frv/include/uapi/asm/msgbuf.h index 97ceb55a06f..97ceb55a06f 100644 --- a/arch/frv/include/asm/msgbuf.h +++ b/arch/frv/include/uapi/asm/msgbuf.h | |||
diff --git a/arch/frv/include/asm/param.h b/arch/frv/include/uapi/asm/param.h index a52dca9a956..a52dca9a956 100644 --- a/arch/frv/include/asm/param.h +++ b/arch/frv/include/uapi/asm/param.h | |||
diff --git a/arch/frv/include/asm/poll.h b/arch/frv/include/uapi/asm/poll.h index 0d01479ccc5..0d01479ccc5 100644 --- a/arch/frv/include/asm/poll.h +++ b/arch/frv/include/uapi/asm/poll.h | |||
diff --git a/arch/frv/include/asm/posix_types.h b/arch/frv/include/uapi/asm/posix_types.h index fe512af74a5..fe512af74a5 100644 --- a/arch/frv/include/asm/posix_types.h +++ b/arch/frv/include/uapi/asm/posix_types.h | |||
diff --git a/arch/frv/include/uapi/asm/ptrace.h b/arch/frv/include/uapi/asm/ptrace.h new file mode 100644 index 00000000000..3887e493468 --- /dev/null +++ b/arch/frv/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /* ptrace.h: ptrace() relevant definitions | ||
2 | * | ||
3 | * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | #ifndef _UAPI_ASM_PTRACE_H | ||
12 | #define _UAPI_ASM_PTRACE_H | ||
13 | |||
14 | #include <asm/registers.h> | ||
15 | |||
16 | |||
17 | #define PT_PSR 0 | ||
18 | #define PT_ISR 1 | ||
19 | #define PT_CCR 2 | ||
20 | #define PT_CCCR 3 | ||
21 | #define PT_LR 4 | ||
22 | #define PT_LCR 5 | ||
23 | #define PT_PC 6 | ||
24 | |||
25 | #define PT__STATUS 7 /* exception status */ | ||
26 | #define PT_SYSCALLNO 8 /* syscall number or -1 */ | ||
27 | #define PT_ORIG_GR8 9 /* saved GR8 for signal handling */ | ||
28 | #define PT_GNER0 10 | ||
29 | #define PT_GNER1 11 | ||
30 | #define PT_IACC0H 12 | ||
31 | #define PT_IACC0L 13 | ||
32 | |||
33 | #define PT_GR(j) ( 14 + (j)) /* GRj for 0<=j<=63 */ | ||
34 | #define PT_FR(j) ( 78 + (j)) /* FRj for 0<=j<=63 */ | ||
35 | #define PT_FNER(j) (142 + (j)) /* FNERj for 0<=j<=1 */ | ||
36 | #define PT_MSR(j) (144 + (j)) /* MSRj for 0<=j<=2 */ | ||
37 | #define PT_ACC(j) (146 + (j)) /* ACCj for 0<=j<=7 */ | ||
38 | #define PT_ACCG(jklm) (154 + (jklm)) /* ACCGjklm for 0<=jklm<=1 (reads four regs per slot) */ | ||
39 | #define PT_FSR(j) (156 + (j)) /* FSRj for 0<=j<=0 */ | ||
40 | #define PT__GPEND 78 | ||
41 | #define PT__END 157 | ||
42 | |||
43 | #define PT_TBR PT_GR(0) | ||
44 | #define PT_SP PT_GR(1) | ||
45 | #define PT_FP PT_GR(2) | ||
46 | #define PT_PREV_FRAME PT_GR(28) /* previous exception frame pointer (old gr28 value) */ | ||
47 | #define PT_CURR_TASK PT_GR(29) /* current task */ | ||
48 | |||
49 | |||
50 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ | ||
51 | #define PTRACE_GETREGS 12 | ||
52 | #define PTRACE_SETREGS 13 | ||
53 | #define PTRACE_GETFPREGS 14 | ||
54 | #define PTRACE_SETFPREGS 15 | ||
55 | #define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ | ||
56 | |||
57 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ | ||
58 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ | ||
59 | |||
60 | #endif /* _UAPI_ASM_PTRACE_H */ | ||
diff --git a/arch/frv/include/asm/registers.h b/arch/frv/include/uapi/asm/registers.h index 9666119fcf6..9666119fcf6 100644 --- a/arch/frv/include/asm/registers.h +++ b/arch/frv/include/uapi/asm/registers.h | |||
diff --git a/arch/frv/include/asm/resource.h b/arch/frv/include/uapi/asm/resource.h index 5fc60548fd0..5fc60548fd0 100644 --- a/arch/frv/include/asm/resource.h +++ b/arch/frv/include/uapi/asm/resource.h | |||
diff --git a/arch/frv/include/asm/sembuf.h b/arch/frv/include/uapi/asm/sembuf.h index 164b12786d6..164b12786d6 100644 --- a/arch/frv/include/asm/sembuf.h +++ b/arch/frv/include/uapi/asm/sembuf.h | |||
diff --git a/arch/frv/include/uapi/asm/setup.h b/arch/frv/include/uapi/asm/setup.h new file mode 100644 index 00000000000..fbf3fc96aae --- /dev/null +++ b/arch/frv/include/uapi/asm/setup.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* setup.h: setup stuff | ||
2 | * | ||
3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _UAPI_ASM_SETUP_H | ||
13 | #define _UAPI_ASM_SETUP_H | ||
14 | |||
15 | #define COMMAND_LINE_SIZE 512 | ||
16 | |||
17 | |||
18 | #endif /* _UAPI_ASM_SETUP_H */ | ||
diff --git a/arch/frv/include/asm/shmbuf.h b/arch/frv/include/uapi/asm/shmbuf.h index 4c6e711a477..4c6e711a477 100644 --- a/arch/frv/include/asm/shmbuf.h +++ b/arch/frv/include/uapi/asm/shmbuf.h | |||
diff --git a/arch/frv/include/asm/sigcontext.h b/arch/frv/include/uapi/asm/sigcontext.h index 3b263f3cc96..3b263f3cc96 100644 --- a/arch/frv/include/asm/sigcontext.h +++ b/arch/frv/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/frv/include/asm/siginfo.h b/arch/frv/include/uapi/asm/siginfo.h index d3fd1ca4565..d3fd1ca4565 100644 --- a/arch/frv/include/asm/siginfo.h +++ b/arch/frv/include/uapi/asm/siginfo.h | |||
diff --git a/arch/frv/include/uapi/asm/signal.h b/arch/frv/include/uapi/asm/signal.h new file mode 100644 index 00000000000..bf3b162f9be --- /dev/null +++ b/arch/frv/include/uapi/asm/signal.h | |||
@@ -0,0 +1,36 @@ | |||
1 | #ifndef _UAPI_ASM_SIGNAL_H | ||
2 | #define _UAPI_ASM_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | #ifndef __KERNEL__ | ||
7 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
8 | |||
9 | #define NSIG 32 | ||
10 | typedef unsigned long sigset_t; | ||
11 | |||
12 | #endif /* !__KERNEL__ */ | ||
13 | |||
14 | #define SA_RESTORER 0x04000000 /* to get struct sigaction correct */ | ||
15 | |||
16 | #include <asm-generic/signal.h> | ||
17 | |||
18 | #ifndef __KERNEL__ | ||
19 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
20 | |||
21 | struct sigaction { | ||
22 | union { | ||
23 | __sighandler_t _sa_handler; | ||
24 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
25 | } _u; | ||
26 | sigset_t sa_mask; | ||
27 | unsigned long sa_flags; | ||
28 | void (*sa_restorer)(void); | ||
29 | }; | ||
30 | |||
31 | #define sa_handler _u._sa_handler | ||
32 | #define sa_sigaction _u._sa_sigaction | ||
33 | |||
34 | #endif /* __KERNEL__ */ | ||
35 | |||
36 | #endif /* _UAPI_ASM_SIGNAL_H */ | ||
diff --git a/arch/frv/include/asm/socket.h b/arch/frv/include/uapi/asm/socket.h index a5b1d7dbb20..a5b1d7dbb20 100644 --- a/arch/frv/include/asm/socket.h +++ b/arch/frv/include/uapi/asm/socket.h | |||
diff --git a/arch/frv/include/asm/sockios.h b/arch/frv/include/uapi/asm/sockios.h index 5dbdd13e6de..5dbdd13e6de 100644 --- a/arch/frv/include/asm/sockios.h +++ b/arch/frv/include/uapi/asm/sockios.h | |||
diff --git a/arch/frv/include/asm/stat.h b/arch/frv/include/uapi/asm/stat.h index ce56de9b37b..ce56de9b37b 100644 --- a/arch/frv/include/asm/stat.h +++ b/arch/frv/include/uapi/asm/stat.h | |||
diff --git a/arch/frv/include/asm/statfs.h b/arch/frv/include/uapi/asm/statfs.h index 741f586045b..741f586045b 100644 --- a/arch/frv/include/asm/statfs.h +++ b/arch/frv/include/uapi/asm/statfs.h | |||
diff --git a/arch/frv/include/asm/swab.h b/arch/frv/include/uapi/asm/swab.h index f305834b479..f305834b479 100644 --- a/arch/frv/include/asm/swab.h +++ b/arch/frv/include/uapi/asm/swab.h | |||
diff --git a/arch/frv/include/asm/termbits.h b/arch/frv/include/uapi/asm/termbits.h index 7722e19cc34..7722e19cc34 100644 --- a/arch/frv/include/asm/termbits.h +++ b/arch/frv/include/uapi/asm/termbits.h | |||
diff --git a/arch/frv/include/uapi/asm/termios.h b/arch/frv/include/uapi/asm/termios.h new file mode 100644 index 00000000000..edcc08a2238 --- /dev/null +++ b/arch/frv/include/uapi/asm/termios.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef _UAPI_ASM_TERMIOS_H | ||
2 | #define _UAPI_ASM_TERMIOS_H | ||
3 | |||
4 | #include <asm/termbits.h> | ||
5 | #include <asm/ioctls.h> | ||
6 | |||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | |||
25 | /* modem lines */ | ||
26 | #define TIOCM_LE 0x001 | ||
27 | #define TIOCM_DTR 0x002 | ||
28 | #define TIOCM_RTS 0x004 | ||
29 | #define TIOCM_ST 0x008 | ||
30 | #define TIOCM_SR 0x010 | ||
31 | #define TIOCM_CTS 0x020 | ||
32 | #define TIOCM_CAR 0x040 | ||
33 | #define TIOCM_RNG 0x080 | ||
34 | #define TIOCM_DSR 0x100 | ||
35 | #define TIOCM_CD TIOCM_CAR | ||
36 | #define TIOCM_RI TIOCM_RNG | ||
37 | #define TIOCM_OUT1 0x2000 | ||
38 | #define TIOCM_OUT2 0x4000 | ||
39 | #define TIOCM_LOOP 0x8000 | ||
40 | |||
41 | #define TIOCM_MODEM_BITS TIOCM_OUT2 /* IRDA support */ | ||
42 | |||
43 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
44 | |||
45 | |||
46 | #endif /* _UAPI_ASM_TERMIOS_H */ | ||
diff --git a/arch/frv/include/uapi/asm/types.h b/arch/frv/include/uapi/asm/types.h new file mode 100644 index 00000000000..cf23149943f --- /dev/null +++ b/arch/frv/include/uapi/asm/types.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* types.h: FRV types | ||
2 | * | ||
3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | #include <asm-generic/int-ll64.h> | ||
diff --git a/arch/frv/include/uapi/asm/unistd.h b/arch/frv/include/uapi/asm/unistd.h new file mode 100644 index 00000000000..9e2612ff1c9 --- /dev/null +++ b/arch/frv/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,348 @@ | |||
1 | #ifndef _UAPI_ASM_UNISTD_H_ | ||
2 | #define _UAPI_ASM_UNISTD_H_ | ||
3 | |||
4 | /* | ||
5 | * This file contains the system call numbers. | ||
6 | */ | ||
7 | |||
8 | #define __NR_restart_syscall 0 | ||
9 | #define __NR_exit 1 | ||
10 | #define __NR_fork 2 | ||
11 | #define __NR_read 3 | ||
12 | #define __NR_write 4 | ||
13 | #define __NR_open 5 | ||
14 | #define __NR_close 6 | ||
15 | #define __NR_waitpid 7 | ||
16 | #define __NR_creat 8 | ||
17 | #define __NR_link 9 | ||
18 | #define __NR_unlink 10 | ||
19 | #define __NR_execve 11 | ||
20 | #define __NR_chdir 12 | ||
21 | #define __NR_time 13 | ||
22 | #define __NR_mknod 14 | ||
23 | #define __NR_chmod 15 | ||
24 | #define __NR_lchown 16 | ||
25 | #define __NR_break 17 | ||
26 | #define __NR_oldstat 18 | ||
27 | #define __NR_lseek 19 | ||
28 | #define __NR_getpid 20 | ||
29 | #define __NR_mount 21 | ||
30 | #define __NR_umount 22 | ||
31 | #define __NR_setuid 23 | ||
32 | #define __NR_getuid 24 | ||
33 | #define __NR_stime 25 | ||
34 | #define __NR_ptrace 26 | ||
35 | #define __NR_alarm 27 | ||
36 | #define __NR_oldfstat 28 | ||
37 | #define __NR_pause 29 | ||
38 | #define __NR_utime 30 | ||
39 | #define __NR_stty 31 | ||
40 | #define __NR_gtty 32 | ||
41 | #define __NR_access 33 | ||
42 | #define __NR_nice 34 | ||
43 | #define __NR_ftime 35 | ||
44 | #define __NR_sync 36 | ||
45 | #define __NR_kill 37 | ||
46 | #define __NR_rename 38 | ||
47 | #define __NR_mkdir 39 | ||
48 | #define __NR_rmdir 40 | ||
49 | #define __NR_dup 41 | ||
50 | #define __NR_pipe 42 | ||
51 | #define __NR_times 43 | ||
52 | #define __NR_prof 44 | ||
53 | #define __NR_brk 45 | ||
54 | #define __NR_setgid 46 | ||
55 | #define __NR_getgid 47 | ||
56 | #define __NR_signal 48 | ||
57 | #define __NR_geteuid 49 | ||
58 | #define __NR_getegid 50 | ||
59 | #define __NR_acct 51 | ||
60 | #define __NR_umount2 52 | ||
61 | #define __NR_lock 53 | ||
62 | #define __NR_ioctl 54 | ||
63 | #define __NR_fcntl 55 | ||
64 | #define __NR_mpx 56 | ||
65 | #define __NR_setpgid 57 | ||
66 | #define __NR_ulimit 58 | ||
67 | // #define __NR_oldolduname /* 59 */ obsolete | ||
68 | #define __NR_umask 60 | ||
69 | #define __NR_chroot 61 | ||
70 | #define __NR_ustat 62 | ||
71 | #define __NR_dup2 63 | ||
72 | #define __NR_getppid 64 | ||
73 | #define __NR_getpgrp 65 | ||
74 | #define __NR_setsid 66 | ||
75 | #define __NR_sigaction 67 | ||
76 | #define __NR_sgetmask 68 | ||
77 | #define __NR_ssetmask 69 | ||
78 | #define __NR_setreuid 70 | ||
79 | #define __NR_setregid 71 | ||
80 | #define __NR_sigsuspend 72 | ||
81 | #define __NR_sigpending 73 | ||
82 | #define __NR_sethostname 74 | ||
83 | #define __NR_setrlimit 75 | ||
84 | #define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ | ||
85 | #define __NR_getrusage 77 | ||
86 | #define __NR_gettimeofday 78 | ||
87 | #define __NR_settimeofday 79 | ||
88 | #define __NR_getgroups 80 | ||
89 | #define __NR_setgroups 81 | ||
90 | #define __NR_select 82 | ||
91 | #define __NR_symlink 83 | ||
92 | #define __NR_oldlstat 84 | ||
93 | #define __NR_readlink 85 | ||
94 | #define __NR_uselib 86 | ||
95 | #define __NR_swapon 87 | ||
96 | #define __NR_reboot 88 | ||
97 | #define __NR_readdir 89 | ||
98 | // #define __NR_mmap 90 /* obsolete - not implemented */ | ||
99 | #define __NR_munmap 91 | ||
100 | #define __NR_truncate 92 | ||
101 | #define __NR_ftruncate 93 | ||
102 | #define __NR_fchmod 94 | ||
103 | #define __NR_fchown 95 | ||
104 | #define __NR_getpriority 96 | ||
105 | #define __NR_setpriority 97 | ||
106 | // #define __NR_profil /* 98 */ obsolete | ||
107 | #define __NR_statfs 99 | ||
108 | #define __NR_fstatfs 100 | ||
109 | // #define __NR_ioperm /* 101 */ not supported | ||
110 | #define __NR_socketcall 102 | ||
111 | #define __NR_syslog 103 | ||
112 | #define __NR_setitimer 104 | ||
113 | #define __NR_getitimer 105 | ||
114 | #define __NR_stat 106 | ||
115 | #define __NR_lstat 107 | ||
116 | #define __NR_fstat 108 | ||
117 | // #define __NR_olduname /* 109 */ obsolete | ||
118 | // #define __NR_iopl /* 110 */ not supported | ||
119 | #define __NR_vhangup 111 | ||
120 | // #define __NR_idle /* 112 */ Obsolete | ||
121 | // #define __NR_vm86old /* 113 */ not supported | ||
122 | #define __NR_wait4 114 | ||
123 | #define __NR_swapoff 115 | ||
124 | #define __NR_sysinfo 116 | ||
125 | #define __NR_ipc 117 | ||
126 | #define __NR_fsync 118 | ||
127 | #define __NR_sigreturn 119 | ||
128 | #define __NR_clone 120 | ||
129 | #define __NR_setdomainname 121 | ||
130 | #define __NR_uname 122 | ||
131 | // #define __NR_modify_ldt /* 123 */ not supported | ||
132 | #define __NR_cacheflush 123 | ||
133 | #define __NR_adjtimex 124 | ||
134 | #define __NR_mprotect 125 | ||
135 | #define __NR_sigprocmask 126 | ||
136 | #define __NR_create_module 127 | ||
137 | #define __NR_init_module 128 | ||
138 | #define __NR_delete_module 129 | ||
139 | #define __NR_get_kernel_syms 130 | ||
140 | #define __NR_quotactl 131 | ||
141 | #define __NR_getpgid 132 | ||
142 | #define __NR_fchdir 133 | ||
143 | #define __NR_bdflush 134 | ||
144 | #define __NR_sysfs 135 | ||
145 | #define __NR_personality 136 | ||
146 | #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ | ||
147 | #define __NR_setfsuid 138 | ||
148 | #define __NR_setfsgid 139 | ||
149 | #define __NR__llseek 140 | ||
150 | #define __NR_getdents 141 | ||
151 | #define __NR__newselect 142 | ||
152 | #define __NR_flock 143 | ||
153 | #define __NR_msync 144 | ||
154 | #define __NR_readv 145 | ||
155 | #define __NR_writev 146 | ||
156 | #define __NR_getsid 147 | ||
157 | #define __NR_fdatasync 148 | ||
158 | #define __NR__sysctl 149 | ||
159 | #define __NR_mlock 150 | ||
160 | #define __NR_munlock 151 | ||
161 | #define __NR_mlockall 152 | ||
162 | #define __NR_munlockall 153 | ||
163 | #define __NR_sched_setparam 154 | ||
164 | #define __NR_sched_getparam 155 | ||
165 | #define __NR_sched_setscheduler 156 | ||
166 | #define __NR_sched_getscheduler 157 | ||
167 | #define __NR_sched_yield 158 | ||
168 | #define __NR_sched_get_priority_max 159 | ||
169 | #define __NR_sched_get_priority_min 160 | ||
170 | #define __NR_sched_rr_get_interval 161 | ||
171 | #define __NR_nanosleep 162 | ||
172 | #define __NR_mremap 163 | ||
173 | #define __NR_setresuid 164 | ||
174 | #define __NR_getresuid 165 | ||
175 | // #define __NR_vm86 /* 166 */ not supported | ||
176 | #define __NR_query_module 167 | ||
177 | #define __NR_poll 168 | ||
178 | #define __NR_nfsservctl 169 | ||
179 | #define __NR_setresgid 170 | ||
180 | #define __NR_getresgid 171 | ||
181 | #define __NR_prctl 172 | ||
182 | #define __NR_rt_sigreturn 173 | ||
183 | #define __NR_rt_sigaction 174 | ||
184 | #define __NR_rt_sigprocmask 175 | ||
185 | #define __NR_rt_sigpending 176 | ||
186 | #define __NR_rt_sigtimedwait 177 | ||
187 | #define __NR_rt_sigqueueinfo 178 | ||
188 | #define __NR_rt_sigsuspend 179 | ||
189 | #define __NR_pread64 180 | ||
190 | #define __NR_pwrite64 181 | ||
191 | #define __NR_chown 182 | ||
192 | #define __NR_getcwd 183 | ||
193 | #define __NR_capget 184 | ||
194 | #define __NR_capset 185 | ||
195 | #define __NR_sigaltstack 186 | ||
196 | #define __NR_sendfile 187 | ||
197 | #define __NR_getpmsg 188 /* some people actually want streams */ | ||
198 | #define __NR_putpmsg 189 /* some people actually want streams */ | ||
199 | #define __NR_vfork 190 | ||
200 | #define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ | ||
201 | #define __NR_mmap2 192 | ||
202 | #define __NR_truncate64 193 | ||
203 | #define __NR_ftruncate64 194 | ||
204 | #define __NR_stat64 195 | ||
205 | #define __NR_lstat64 196 | ||
206 | #define __NR_fstat64 197 | ||
207 | #define __NR_lchown32 198 | ||
208 | #define __NR_getuid32 199 | ||
209 | #define __NR_getgid32 200 | ||
210 | #define __NR_geteuid32 201 | ||
211 | #define __NR_getegid32 202 | ||
212 | #define __NR_setreuid32 203 | ||
213 | #define __NR_setregid32 204 | ||
214 | #define __NR_getgroups32 205 | ||
215 | #define __NR_setgroups32 206 | ||
216 | #define __NR_fchown32 207 | ||
217 | #define __NR_setresuid32 208 | ||
218 | #define __NR_getresuid32 209 | ||
219 | #define __NR_setresgid32 210 | ||
220 | #define __NR_getresgid32 211 | ||
221 | #define __NR_chown32 212 | ||
222 | #define __NR_setuid32 213 | ||
223 | #define __NR_setgid32 214 | ||
224 | #define __NR_setfsuid32 215 | ||
225 | #define __NR_setfsgid32 216 | ||
226 | #define __NR_pivot_root 217 | ||
227 | #define __NR_mincore 218 | ||
228 | #define __NR_madvise 219 | ||
229 | |||
230 | #define __NR_getdents64 220 | ||
231 | #define __NR_fcntl64 221 | ||
232 | #define __NR_security 223 /* syscall for security modules */ | ||
233 | #define __NR_gettid 224 | ||
234 | #define __NR_readahead 225 | ||
235 | #define __NR_setxattr 226 | ||
236 | #define __NR_lsetxattr 227 | ||
237 | #define __NR_fsetxattr 228 | ||
238 | #define __NR_getxattr 229 | ||
239 | #define __NR_lgetxattr 230 | ||
240 | #define __NR_fgetxattr 231 | ||
241 | #define __NR_listxattr 232 | ||
242 | #define __NR_llistxattr 233 | ||
243 | #define __NR_flistxattr 234 | ||
244 | #define __NR_removexattr 235 | ||
245 | #define __NR_lremovexattr 236 | ||
246 | #define __NR_fremovexattr 237 | ||
247 | #define __NR_tkill 238 | ||
248 | #define __NR_sendfile64 239 | ||
249 | #define __NR_futex 240 | ||
250 | #define __NR_sched_setaffinity 241 | ||
251 | #define __NR_sched_getaffinity 242 | ||
252 | #define __NR_set_thread_area 243 | ||
253 | #define __NR_get_thread_area 244 | ||
254 | #define __NR_io_setup 245 | ||
255 | #define __NR_io_destroy 246 | ||
256 | #define __NR_io_getevents 247 | ||
257 | #define __NR_io_submit 248 | ||
258 | #define __NR_io_cancel 249 | ||
259 | #define __NR_fadvise64 250 | ||
260 | |||
261 | #define __NR_exit_group 252 | ||
262 | #define __NR_lookup_dcookie 253 | ||
263 | #define __NR_epoll_create 254 | ||
264 | #define __NR_epoll_ctl 255 | ||
265 | #define __NR_epoll_wait 256 | ||
266 | #define __NR_remap_file_pages 257 | ||
267 | #define __NR_set_tid_address 258 | ||
268 | #define __NR_timer_create 259 | ||
269 | #define __NR_timer_settime (__NR_timer_create+1) | ||
270 | #define __NR_timer_gettime (__NR_timer_create+2) | ||
271 | #define __NR_timer_getoverrun (__NR_timer_create+3) | ||
272 | #define __NR_timer_delete (__NR_timer_create+4) | ||
273 | #define __NR_clock_settime (__NR_timer_create+5) | ||
274 | #define __NR_clock_gettime (__NR_timer_create+6) | ||
275 | #define __NR_clock_getres (__NR_timer_create+7) | ||
276 | #define __NR_clock_nanosleep (__NR_timer_create+8) | ||
277 | #define __NR_statfs64 268 | ||
278 | #define __NR_fstatfs64 269 | ||
279 | #define __NR_tgkill 270 | ||
280 | #define __NR_utimes 271 | ||
281 | #define __NR_fadvise64_64 272 | ||
282 | #define __NR_vserver 273 | ||
283 | #define __NR_mbind 274 | ||
284 | #define __NR_get_mempolicy 275 | ||
285 | #define __NR_set_mempolicy 276 | ||
286 | #define __NR_mq_open 277 | ||
287 | #define __NR_mq_unlink (__NR_mq_open+1) | ||
288 | #define __NR_mq_timedsend (__NR_mq_open+2) | ||
289 | #define __NR_mq_timedreceive (__NR_mq_open+3) | ||
290 | #define __NR_mq_notify (__NR_mq_open+4) | ||
291 | #define __NR_mq_getsetattr (__NR_mq_open+5) | ||
292 | #define __NR_kexec_load 283 | ||
293 | #define __NR_waitid 284 | ||
294 | /* #define __NR_sys_setaltroot 285 */ | ||
295 | #define __NR_add_key 286 | ||
296 | #define __NR_request_key 287 | ||
297 | #define __NR_keyctl 288 | ||
298 | #define __NR_ioprio_set 289 | ||
299 | #define __NR_ioprio_get 290 | ||
300 | #define __NR_inotify_init 291 | ||
301 | #define __NR_inotify_add_watch 292 | ||
302 | #define __NR_inotify_rm_watch 293 | ||
303 | #define __NR_migrate_pages 294 | ||
304 | #define __NR_openat 295 | ||
305 | #define __NR_mkdirat 296 | ||
306 | #define __NR_mknodat 297 | ||
307 | #define __NR_fchownat 298 | ||
308 | #define __NR_futimesat 299 | ||
309 | #define __NR_fstatat64 300 | ||
310 | #define __NR_unlinkat 301 | ||
311 | #define __NR_renameat 302 | ||
312 | #define __NR_linkat 303 | ||
313 | #define __NR_symlinkat 304 | ||
314 | #define __NR_readlinkat 305 | ||
315 | #define __NR_fchmodat 306 | ||
316 | #define __NR_faccessat 307 | ||
317 | #define __NR_pselect6 308 | ||
318 | #define __NR_ppoll 309 | ||
319 | #define __NR_unshare 310 | ||
320 | #define __NR_set_robust_list 311 | ||
321 | #define __NR_get_robust_list 312 | ||
322 | #define __NR_splice 313 | ||
323 | #define __NR_sync_file_range 314 | ||
324 | #define __NR_tee 315 | ||
325 | #define __NR_vmsplice 316 | ||
326 | #define __NR_move_pages 317 | ||
327 | #define __NR_getcpu 318 | ||
328 | #define __NR_epoll_pwait 319 | ||
329 | #define __NR_utimensat 320 | ||
330 | #define __NR_signalfd 321 | ||
331 | #define __NR_timerfd_create 322 | ||
332 | #define __NR_eventfd 323 | ||
333 | #define __NR_fallocate 324 | ||
334 | #define __NR_timerfd_settime 325 | ||
335 | #define __NR_timerfd_gettime 326 | ||
336 | #define __NR_signalfd4 327 | ||
337 | #define __NR_eventfd2 328 | ||
338 | #define __NR_epoll_create1 329 | ||
339 | #define __NR_dup3 330 | ||
340 | #define __NR_pipe2 331 | ||
341 | #define __NR_inotify_init1 332 | ||
342 | #define __NR_preadv 333 | ||
343 | #define __NR_pwritev 334 | ||
344 | #define __NR_rt_tgsigqueueinfo 335 | ||
345 | #define __NR_perf_event_open 336 | ||
346 | #define __NR_setns 337 | ||
347 | |||
348 | #endif /* _UAPI_ASM_UNISTD_H_ */ | ||
diff --git a/arch/frv/kernel/Makefile b/arch/frv/kernel/Makefile index ad4087b6996..3cbb3294b9f 100644 --- a/arch/frv/kernel/Makefile +++ b/arch/frv/kernel/Makefile | |||
@@ -7,8 +7,8 @@ heads-$(CONFIG_MMU) := head-mmu-fr451.o | |||
7 | 7 | ||
8 | extra-y:= head.o vmlinux.lds | 8 | extra-y:= head.o vmlinux.lds |
9 | 9 | ||
10 | obj-y := $(heads-y) entry.o entry-table.o break.o switch_to.o kernel_thread.o \ | 10 | obj-y := $(heads-y) entry.o entry-table.o break.o switch_to.o \ |
11 | kernel_execve.o process.o traps.o ptrace.o signal.o dma.o \ | 11 | process.o traps.o ptrace.o signal.o dma.o \ |
12 | sys_frv.o time.o setup.o frv_ksyms.o \ | 12 | sys_frv.o time.o setup.o frv_ksyms.o \ |
13 | debug-stub.o irq.o sleep.o uaccess.o | 13 | debug-stub.o irq.o sleep.o uaccess.o |
14 | 14 | ||
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 7d5e000fd32..00273296031 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S | |||
@@ -863,6 +863,19 @@ ret_from_fork: | |||
863 | setlos.p #0,gr8 | 863 | setlos.p #0,gr8 |
864 | bra __syscall_exit | 864 | bra __syscall_exit |
865 | 865 | ||
866 | .globl ret_from_kernel_thread | ||
867 | ret_from_kernel_thread: | ||
868 | lddi.p @(gr28,#REG_GR(8)),gr20 | ||
869 | call schedule_tail | ||
870 | or.p gr20,gr20,gr8 | ||
871 | calll @(gr21,gr0) | ||
872 | bra sys_exit | ||
873 | |||
874 | .globl ret_from_kernel_execve | ||
875 | ret_from_kernel_execve: | ||
876 | ori gr28,0,sp | ||
877 | bra __syscall_exit | ||
878 | |||
866 | ################################################################################################### | 879 | ################################################################################################### |
867 | # | 880 | # |
868 | # Return to user mode is not as complex as all this looks, | 881 | # Return to user mode is not as complex as all this looks, |
diff --git a/arch/frv/kernel/frv_ksyms.c b/arch/frv/kernel/frv_ksyms.c index a89803b58b9..86c516d96dc 100644 --- a/arch/frv/kernel/frv_ksyms.c +++ b/arch/frv/kernel/frv_ksyms.c | |||
@@ -30,7 +30,6 @@ EXPORT_SYMBOL(ip_fast_csum); | |||
30 | EXPORT_SYMBOL(local_irq_count); | 30 | EXPORT_SYMBOL(local_irq_count); |
31 | EXPORT_SYMBOL(local_bh_count); | 31 | EXPORT_SYMBOL(local_bh_count); |
32 | #endif | 32 | #endif |
33 | EXPORT_SYMBOL(kernel_thread); | ||
34 | 33 | ||
35 | EXPORT_SYMBOL(__res_bus_clock_speed_HZ); | 34 | EXPORT_SYMBOL(__res_bus_clock_speed_HZ); |
36 | EXPORT_SYMBOL(__page_offset); | 35 | EXPORT_SYMBOL(__page_offset); |
diff --git a/arch/frv/kernel/kernel_execve.S b/arch/frv/kernel/kernel_execve.S deleted file mode 100644 index 9b074a16a05..00000000000 --- a/arch/frv/kernel/kernel_execve.S +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* in-kernel program execution | ||
2 | * | ||
3 | * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/linkage.h> | ||
13 | #include <asm/unistd.h> | ||
14 | |||
15 | ############################################################################### | ||
16 | # | ||
17 | # Do a system call from kernel instead of calling sys_execve so we end up with | ||
18 | # proper pt_regs. | ||
19 | # | ||
20 | # int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | ||
21 | # | ||
22 | # On entry: GR8/GR9/GR10: arguments to function | ||
23 | # On return: GR8: syscall return. | ||
24 | # | ||
25 | ############################################################################### | ||
26 | .globl kernel_execve | ||
27 | .type kernel_execve,@function | ||
28 | kernel_execve: | ||
29 | setlos __NR_execve,gr7 | ||
30 | tira gr0,#0 | ||
31 | bralr | ||
32 | |||
33 | .size kernel_execve,.-kernel_execve | ||
diff --git a/arch/frv/kernel/kernel_thread.S b/arch/frv/kernel/kernel_thread.S deleted file mode 100644 index f0e52943f92..00000000000 --- a/arch/frv/kernel/kernel_thread.S +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | /* kernel_thread.S: kernel thread creation | ||
2 | * | ||
3 | * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/linkage.h> | ||
13 | #include <linux/kern_levels.h> | ||
14 | #include <asm/unistd.h> | ||
15 | |||
16 | #define CLONE_VM 0x00000100 /* set if VM shared between processes */ | ||
17 | |||
18 | .section .rodata | ||
19 | kernel_thread_emsg: | ||
20 | .asciz KERN_ERR "failed to create kernel thread: error=%d\n" | ||
21 | |||
22 | .text | ||
23 | .balign 4 | ||
24 | |||
25 | ############################################################################### | ||
26 | # | ||
27 | # Create a kernel thread | ||
28 | # | ||
29 | # int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | ||
30 | # | ||
31 | ############################################################################### | ||
32 | .globl kernel_thread | ||
33 | .type kernel_thread,@function | ||
34 | kernel_thread: | ||
35 | or.p gr8,gr0,gr4 | ||
36 | or gr9,gr0,gr5 | ||
37 | |||
38 | # start by forking the current process, but with shared VM | ||
39 | setlos.p #__NR_clone,gr7 ; syscall number | ||
40 | ori gr10,#CLONE_VM,gr8 ; first syscall arg [clone_flags] | ||
41 | sethi.p #0xe4e4,gr9 ; second syscall arg [newsp] | ||
42 | setlo #0xe4e4,gr9 | ||
43 | setlos.p #0,gr10 ; third syscall arg [parent_tidptr] | ||
44 | setlos #0,gr11 ; fourth syscall arg [child_tidptr] | ||
45 | tira gr0,#0 | ||
46 | setlos.p #4095,gr7 | ||
47 | andcc gr8,gr8,gr0,icc0 | ||
48 | addcc.p gr8,gr7,gr0,icc1 | ||
49 | bnelr icc0,#2 | ||
50 | bc icc1,#0,kernel_thread_error | ||
51 | |||
52 | # now invoke the work function | ||
53 | or gr5,gr0,gr8 | ||
54 | calll @(gr4,gr0) | ||
55 | |||
56 | # and finally exit the thread | ||
57 | setlos #__NR_exit,gr7 ; syscall number | ||
58 | tira gr0,#0 | ||
59 | |||
60 | kernel_thread_error: | ||
61 | subi sp,#8,sp | ||
62 | movsg lr,gr4 | ||
63 | sti gr8,@(sp,#0) | ||
64 | sti.p gr4,@(sp,#4) | ||
65 | |||
66 | or gr8,gr0,gr9 | ||
67 | sethi.p %hi(kernel_thread_emsg),gr8 | ||
68 | setlo %lo(kernel_thread_emsg),gr8 | ||
69 | |||
70 | call printk | ||
71 | |||
72 | ldi @(sp,#4),gr4 | ||
73 | ldi @(sp,#0),gr8 | ||
74 | subi sp,#8,sp | ||
75 | jmpl @(gr4,gr0) | ||
76 | |||
77 | .size kernel_thread,.-kernel_thread | ||
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index 2eb7fa5bf9d..655d90d20bb 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include "local.h" | 38 | #include "local.h" |
39 | 39 | ||
40 | asmlinkage void ret_from_fork(void); | 40 | asmlinkage void ret_from_fork(void); |
41 | asmlinkage void ret_from_kernel_thread(void); | ||
41 | 42 | ||
42 | #include <asm/pgalloc.h> | 43 | #include <asm/pgalloc.h> |
43 | 44 | ||
@@ -172,32 +173,13 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | |||
172 | * set up the kernel stack and exception frames for a new process | 173 | * set up the kernel stack and exception frames for a new process |
173 | */ | 174 | */ |
174 | int copy_thread(unsigned long clone_flags, | 175 | int copy_thread(unsigned long clone_flags, |
175 | unsigned long usp, unsigned long topstk, | 176 | unsigned long usp, unsigned long arg, |
176 | struct task_struct *p, struct pt_regs *regs) | 177 | struct task_struct *p, struct pt_regs *regs) |
177 | { | 178 | { |
178 | struct pt_regs *childregs0, *childregs, *regs0; | 179 | struct pt_regs *childregs; |
179 | 180 | ||
180 | regs0 = __kernel_frame0_ptr; | 181 | childregs = (struct pt_regs *) |
181 | childregs0 = (struct pt_regs *) | ||
182 | (task_stack_page(p) + THREAD_SIZE - FRV_FRAME0_SIZE); | 182 | (task_stack_page(p) + THREAD_SIZE - FRV_FRAME0_SIZE); |
183 | childregs = childregs0; | ||
184 | |||
185 | /* set up the userspace frame (the only place that the USP is stored) */ | ||
186 | *childregs0 = *regs0; | ||
187 | |||
188 | childregs0->gr8 = 0; | ||
189 | childregs0->sp = usp; | ||
190 | childregs0->next_frame = NULL; | ||
191 | |||
192 | /* set up the return kernel frame if called from kernel_thread() */ | ||
193 | if (regs != regs0) { | ||
194 | childregs--; | ||
195 | *childregs = *regs; | ||
196 | childregs->sp = (unsigned long) childregs0; | ||
197 | childregs->next_frame = childregs0; | ||
198 | childregs->gr15 = (unsigned long) task_thread_info(p); | ||
199 | childregs->gr29 = (unsigned long) p; | ||
200 | } | ||
201 | 183 | ||
202 | p->set_child_tid = p->clear_child_tid = NULL; | 184 | p->set_child_tid = p->clear_child_tid = NULL; |
203 | 185 | ||
@@ -206,8 +188,25 @@ int copy_thread(unsigned long clone_flags, | |||
206 | p->thread.sp = (unsigned long) childregs; | 188 | p->thread.sp = (unsigned long) childregs; |
207 | p->thread.fp = 0; | 189 | p->thread.fp = 0; |
208 | p->thread.lr = 0; | 190 | p->thread.lr = 0; |
209 | p->thread.pc = (unsigned long) ret_from_fork; | 191 | p->thread.frame0 = childregs; |
210 | p->thread.frame0 = childregs0; | 192 | |
193 | if (unlikely(!regs)) { | ||
194 | memset(childregs, 0, sizeof(struct pt_regs)); | ||
195 | childregs->gr9 = usp; /* function */ | ||
196 | childregs->gr8 = arg; | ||
197 | chilregs->psr = PSR_S; | ||
198 | p->thread.pc = (unsigned long) ret_from_kernel_thread; | ||
199 | save_user_regs(p->thread.user); | ||
200 | return 0; | ||
201 | } | ||
202 | |||
203 | /* set up the userspace frame (the only place that the USP is stored) */ | ||
204 | *childregs = *regs; | ||
205 | |||
206 | childregs->sp = usp; | ||
207 | childregs->next_frame = NULL; | ||
208 | |||
209 | p->thread.pc = (unsigned long) ret_from_fork; | ||
211 | 210 | ||
212 | /* the new TLS pointer is passed in as arg #5 to sys_clone() */ | 211 | /* the new TLS pointer is passed in as arg #5 to sys_clone() */ |
213 | if (clone_flags & CLONE_SETTLS) | 212 | if (clone_flags & CLONE_SETTLS) |
@@ -218,25 +217,6 @@ int copy_thread(unsigned long clone_flags, | |||
218 | return 0; | 217 | return 0; |
219 | } /* end copy_thread() */ | 218 | } /* end copy_thread() */ |
220 | 219 | ||
221 | /* | ||
222 | * sys_execve() executes a new program. | ||
223 | */ | ||
224 | asmlinkage int sys_execve(const char __user *name, | ||
225 | const char __user *const __user *argv, | ||
226 | const char __user *const __user *envp) | ||
227 | { | ||
228 | int error; | ||
229 | char * filename; | ||
230 | |||
231 | filename = getname(name); | ||
232 | error = PTR_ERR(filename); | ||
233 | if (IS_ERR(filename)) | ||
234 | return error; | ||
235 | error = do_execve(filename, argv, envp, __frame); | ||
236 | putname(filename); | ||
237 | return error; | ||
238 | } | ||
239 | |||
240 | unsigned long get_wchan(struct task_struct *p) | 220 | unsigned long get_wchan(struct task_struct *p) |
241 | { | 221 | { |
242 | struct pt_regs *regs0; | 222 | struct pt_regs *regs0; |
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index 864c2f0d497..535810a3217 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/ptrace.h> | 20 | #include <linux/ptrace.h> |
21 | #include <linux/unistd.h> | 21 | #include <linux/unistd.h> |
22 | #include <linux/personality.h> | 22 | #include <linux/personality.h> |
23 | #include <linux/freezer.h> | ||
24 | #include <linux/tracehook.h> | 23 | #include <linux/tracehook.h> |
25 | #include <asm/ucontext.h> | 24 | #include <asm/ucontext.h> |
26 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
@@ -298,10 +297,6 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set) | |||
298 | __frame->lr = (unsigned long) &frame->retcode; | 297 | __frame->lr = (unsigned long) &frame->retcode; |
299 | __frame->gr8 = sig; | 298 | __frame->gr8 = sig; |
300 | 299 | ||
301 | /* the tracer may want to single-step inside the handler */ | ||
302 | if (test_thread_flag(TIF_SINGLESTEP)) | ||
303 | ptrace_notify(SIGTRAP); | ||
304 | |||
305 | #if DEBUG_SIG | 300 | #if DEBUG_SIG |
306 | printk("SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n", | 301 | printk("SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n", |
307 | sig, current->comm, current->pid, frame, __frame->pc, | 302 | sig, current->comm, current->pid, frame, __frame->pc, |
@@ -400,10 +395,6 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
400 | __frame->gr8 = sig; | 395 | __frame->gr8 = sig; |
401 | __frame->gr9 = (unsigned long) &frame->info; | 396 | __frame->gr9 = (unsigned long) &frame->info; |
402 | 397 | ||
403 | /* the tracer may want to single-step inside the handler */ | ||
404 | if (test_thread_flag(TIF_SINGLESTEP)) | ||
405 | ptrace_notify(SIGTRAP); | ||
406 | |||
407 | #if DEBUG_SIG | 398 | #if DEBUG_SIG |
408 | printk("SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n", | 399 | printk("SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n", |
409 | sig, current->comm, current->pid, frame, __frame->pc, | 400 | sig, current->comm, current->pid, frame, __frame->pc, |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 90462eb23d0..98fabd10e95 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
@@ -7,6 +7,7 @@ config H8300 | |||
7 | select ARCH_WANT_IPC_PARSE_VERSION | 7 | select ARCH_WANT_IPC_PARSE_VERSION |
8 | select GENERIC_IRQ_SHOW | 8 | select GENERIC_IRQ_SHOW |
9 | select GENERIC_CPU_DEVICES | 9 | select GENERIC_CPU_DEVICES |
10 | select MODULES_USE_ELF_RELA | ||
10 | 11 | ||
11 | config SYMBOL_PREFIX | 12 | config SYMBOL_PREFIX |
12 | string | 13 | string |
diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild index fccd81eddff..50bbf387b2f 100644 --- a/arch/h8300/include/asm/Kbuild +++ b/arch/h8300/include/asm/Kbuild | |||
@@ -2,3 +2,4 @@ include include/asm-generic/Kbuild.asm | |||
2 | 2 | ||
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += exec.h | 4 | generic-y += exec.h |
5 | generic-y += module.h | ||
diff --git a/arch/h8300/include/asm/module.h b/arch/h8300/include/asm/module.h deleted file mode 100644 index 8e46724b7c0..00000000000 --- a/arch/h8300/include/asm/module.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_MODULE_H | ||
2 | #define _ASM_H8300_MODULE_H | ||
3 | /* | ||
4 | * This file contains the H8/300 architecture specific module code. | ||
5 | */ | ||
6 | struct mod_arch_specific { }; | ||
7 | #define Elf_Shdr Elf32_Shdr | ||
8 | #define Elf_Sym Elf32_Sym | ||
9 | #define Elf_Ehdr Elf32_Ehdr | ||
10 | |||
11 | #endif /* _ASM_H8/300_MODULE_H */ | ||
diff --git a/arch/h8300/include/asm/thread_info.h b/arch/h8300/include/asm/thread_info.h index 9c126e0c09a..ec2f7777c65 100644 --- a/arch/h8300/include/asm/thread_info.h +++ b/arch/h8300/include/asm/thread_info.h | |||
@@ -85,8 +85,6 @@ static inline struct thread_info *current_thread_info(void) | |||
85 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 85 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
86 | #define TIF_SIGPENDING 1 /* signal pending */ | 86 | #define TIF_SIGPENDING 1 /* signal pending */ |
87 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 87 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
88 | #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling | ||
89 | TIF_NEED_RESCHED */ | ||
90 | #define TIF_MEMDIE 4 /* is terminating due to OOM killer */ | 88 | #define TIF_MEMDIE 4 /* is terminating due to OOM killer */ |
91 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ | 89 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ |
92 | #define TIF_NOTIFY_RESUME 6 /* callback before returning to user */ | 90 | #define TIF_NOTIFY_RESUME 6 /* callback before returning to user */ |
@@ -95,11 +93,10 @@ static inline struct thread_info *current_thread_info(void) | |||
95 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 93 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
96 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 94 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
97 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 95 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
98 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
99 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
100 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 96 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
101 | 97 | ||
102 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 98 | #define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \ |
99 | _TIF_NOTIFY_RESUME) | ||
103 | 100 | ||
104 | #endif /* __KERNEL__ */ | 101 | #endif /* __KERNEL__ */ |
105 | 102 | ||
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index f153ed1a4c0..e8dc1393a13 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c | |||
@@ -217,14 +217,14 @@ asmlinkage int sys_execve(const char *name, | |||
217 | int dummy, ...) | 217 | int dummy, ...) |
218 | { | 218 | { |
219 | int error; | 219 | int error; |
220 | char * filename; | 220 | struct filename *filename; |
221 | struct pt_regs *regs = (struct pt_regs *) ((unsigned char *)&dummy-4); | 221 | struct pt_regs *regs = (struct pt_regs *) ((unsigned char *)&dummy-4); |
222 | 222 | ||
223 | filename = getname(name); | 223 | filename = getname(name); |
224 | error = PTR_ERR(filename); | 224 | error = PTR_ERR(filename); |
225 | if (IS_ERR(filename)) | 225 | if (IS_ERR(filename)) |
226 | return error; | 226 | return error; |
227 | error = do_execve(filename, argv, envp, regs); | 227 | error = do_execve(filename->name, argv, envp, regs); |
228 | putname(filename); | 228 | putname(filename); |
229 | return error; | 229 | return error; |
230 | } | 230 | } |
diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c index 5adaadaf921..0e81b96c642 100644 --- a/arch/h8300/kernel/signal.c +++ b/arch/h8300/kernel/signal.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <linux/personality.h> | 38 | #include <linux/personality.h> |
39 | #include <linux/tty.h> | 39 | #include <linux/tty.h> |
40 | #include <linux/binfmts.h> | 40 | #include <linux/binfmts.h> |
41 | #include <linux/freezer.h> | ||
42 | #include <linux/tracehook.h> | 41 | #include <linux/tracehook.h> |
43 | 42 | ||
44 | #include <asm/setup.h> | 43 | #include <asm/setup.h> |
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index b2fdfb700f5..0744f7d7b1f 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig | |||
@@ -30,6 +30,7 @@ config HEXAGON | |||
30 | select KTIME_SCALAR | 30 | select KTIME_SCALAR |
31 | select GENERIC_CLOCKEVENTS | 31 | select GENERIC_CLOCKEVENTS |
32 | select GENERIC_CLOCKEVENTS_BROADCAST | 32 | select GENERIC_CLOCKEVENTS_BROADCAST |
33 | select MODULES_USE_ELF_RELA | ||
33 | ---help--- | 34 | ---help--- |
34 | Qualcomm Hexagon is a processor architecture designed for high | 35 | Qualcomm Hexagon is a processor architecture designed for high |
35 | performance and low power across a wide variety of applications. | 36 | performance and low power across a wide variety of applications. |
diff --git a/arch/hexagon/include/asm/thread_info.h b/arch/hexagon/include/asm/thread_info.h index 4f936a7ee84..e4a0aad69cb 100644 --- a/arch/hexagon/include/asm/thread_info.h +++ b/arch/hexagon/include/asm/thread_info.h | |||
@@ -120,10 +120,8 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG); | |||
120 | #define TIF_SIGPENDING 2 /* signal pending */ | 120 | #define TIF_SIGPENDING 2 /* signal pending */ |
121 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 121 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
122 | #define TIF_SINGLESTEP 4 /* restore ss @ return to usr mode */ | 122 | #define TIF_SINGLESTEP 4 /* restore ss @ return to usr mode */ |
123 | #define TIF_IRET 5 /* return with iret */ | ||
124 | #define TIF_RESTORE_SIGMASK 6 /* restore sig mask in do_signal() */ | 123 | #define TIF_RESTORE_SIGMASK 6 /* restore sig mask in do_signal() */ |
125 | /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 124 | /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
126 | #define TIF_POLLING_NRFLAG 16 | ||
127 | #define TIF_MEMDIE 17 /* OOM killer killed process */ | 125 | #define TIF_MEMDIE 17 /* OOM killer killed process */ |
128 | 126 | ||
129 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 127 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
@@ -131,9 +129,6 @@ register struct thread_info *__current_thread_info asm(QUOTED_THREADINFO_REG); | |||
131 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 129 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
132 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 130 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
133 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 131 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
134 | #define _TIF_IRET (1 << TIF_IRET) | ||
135 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | ||
136 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | ||
137 | 132 | ||
138 | /* work to do on interrupt/exception return - All but TIF_SYSCALL_TRACE */ | 133 | /* work to do on interrupt/exception return - All but TIF_SYSCALL_TRACE */ |
139 | #define _TIF_WORK_MASK (0x0000FFFF & ~_TIF_SYSCALL_TRACE) | 134 | #define _TIF_WORK_MASK (0x0000FFFF & ~_TIF_SYSCALL_TRACE) |
diff --git a/arch/hexagon/kernel/signal.c b/arch/hexagon/kernel/signal.c index 304b0808d07..1ea16bec7b9 100644 --- a/arch/hexagon/kernel/signal.c +++ b/arch/hexagon/kernel/signal.c | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | #include <linux/linkage.h> | 21 | #include <linux/linkage.h> |
22 | #include <linux/syscalls.h> | 22 | #include <linux/syscalls.h> |
23 | #include <linux/freezer.h> | ||
24 | #include <linux/tracehook.h> | 23 | #include <linux/tracehook.h> |
25 | #include <asm/registers.h> | 24 | #include <asm/registers.h> |
26 | #include <asm/thread_info.h> | 25 | #include <asm/thread_info.h> |
diff --git a/arch/hexagon/kernel/syscall.c b/arch/hexagon/kernel/syscall.c index 553cd60ee65..25a9bfe3445 100644 --- a/arch/hexagon/kernel/syscall.c +++ b/arch/hexagon/kernel/syscall.c | |||
@@ -40,7 +40,7 @@ asmlinkage int sys_execve(char __user *ufilename, | |||
40 | const char __user *const __user *envp) | 40 | const char __user *const __user *envp) |
41 | { | 41 | { |
42 | struct pt_regs *pregs = current_thread_info()->regs; | 42 | struct pt_regs *pregs = current_thread_info()->regs; |
43 | char *filename; | 43 | struct filename *filename; |
44 | int retval; | 44 | int retval; |
45 | 45 | ||
46 | filename = getname(ufilename); | 46 | filename = getname(ufilename); |
@@ -48,7 +48,7 @@ asmlinkage int sys_execve(char __user *ufilename, | |||
48 | if (IS_ERR(filename)) | 48 | if (IS_ERR(filename)) |
49 | return retval; | 49 | return retval; |
50 | 50 | ||
51 | retval = do_execve(filename, argv, envp, pregs); | 51 | retval = do_execve(filename->name, argv, envp, pregs); |
52 | putname(filename); | 52 | putname(filename); |
53 | 53 | ||
54 | return retval; | 54 | return retval; |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 3c720ef6c32..3279646120e 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -39,7 +39,9 @@ config IA64 | |||
39 | select ARCH_TASK_STRUCT_ALLOCATOR | 39 | select ARCH_TASK_STRUCT_ALLOCATOR |
40 | select ARCH_THREAD_INFO_ALLOCATOR | 40 | select ARCH_THREAD_INFO_ALLOCATOR |
41 | select ARCH_CLOCKSOURCE_DATA | 41 | select ARCH_CLOCKSOURCE_DATA |
42 | select GENERIC_TIME_VSYSCALL | 42 | select GENERIC_TIME_VSYSCALL_OLD |
43 | select HAVE_MOD_ARCH_SPECIFIC | ||
44 | select MODULES_USE_ELF_RELA | ||
43 | default y | 45 | default y |
44 | help | 46 | help |
45 | The Itanium Processor Family is Intel's 64-bit successor to | 47 | The Itanium Processor Family is Intel's 64-bit successor to |
diff --git a/arch/ia64/include/asm/Kbuild b/arch/ia64/include/asm/Kbuild index 562f5931584..4a159da2363 100644 --- a/arch/ia64/include/asm/Kbuild +++ b/arch/ia64/include/asm/Kbuild | |||
@@ -1,17 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | header-y += break.h | ||
4 | header-y += cmpxchg.h | ||
5 | header-y += fpu.h | ||
6 | header-y += gcc_intrin.h | ||
7 | header-y += ia64regs.h | ||
8 | header-y += intel_intrin.h | ||
9 | header-y += intrinsics.h | ||
10 | header-y += perfmon.h | ||
11 | header-y += perfmon_default_smpl.h | ||
12 | header-y += ptrace_offsets.h | ||
13 | header-y += rse.h | ||
14 | header-y += ucontext.h | ||
15 | header-y += ustack.h | ||
16 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
17 | generic-y += exec.h | 3 | generic-y += exec.h |
diff --git a/arch/ia64/include/asm/gcc_intrin.h b/arch/ia64/include/asm/gcc_intrin.h index 21ddee54ada..f9495b1757a 100644 --- a/arch/ia64/include/asm/gcc_intrin.h +++ b/arch/ia64/include/asm/gcc_intrin.h | |||
@@ -1,621 +1,12 @@ | |||
1 | #ifndef _ASM_IA64_GCC_INTRIN_H | ||
2 | #define _ASM_IA64_GCC_INTRIN_H | ||
3 | /* | 1 | /* |
4 | * | 2 | * |
5 | * Copyright (C) 2002,2003 Jun Nakajima <jun.nakajima@intel.com> | 3 | * Copyright (C) 2002,2003 Jun Nakajima <jun.nakajima@intel.com> |
6 | * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com> | 4 | * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com> |
7 | */ | 5 | */ |
6 | #ifndef _ASM_IA64_GCC_INTRIN_H | ||
7 | #define _ASM_IA64_GCC_INTRIN_H | ||
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <uapi/asm/gcc_intrin.h> |
10 | #include <linux/compiler.h> | ||
11 | |||
12 | /* define this macro to get some asm stmts included in 'c' files */ | ||
13 | #define ASM_SUPPORTED | ||
14 | |||
15 | /* Optimization barrier */ | ||
16 | /* The "volatile" is due to gcc bugs */ | ||
17 | #define ia64_barrier() asm volatile ("":::"memory") | ||
18 | |||
19 | #define ia64_stop() asm volatile (";;"::) | ||
20 | |||
21 | #define ia64_invala_gr(regnum) asm volatile ("invala.e r%0" :: "i"(regnum)) | ||
22 | |||
23 | #define ia64_invala_fr(regnum) asm volatile ("invala.e f%0" :: "i"(regnum)) | ||
24 | |||
25 | #define ia64_flushrs() asm volatile ("flushrs;;":::"memory") | ||
26 | |||
27 | #define ia64_loadrs() asm volatile ("loadrs;;":::"memory") | ||
28 | |||
29 | extern void ia64_bad_param_for_setreg (void); | ||
30 | extern void ia64_bad_param_for_getreg (void); | ||
31 | 10 | ||
32 | #ifdef __KERNEL__ | ||
33 | register unsigned long ia64_r13 asm ("r13") __used; | 11 | register unsigned long ia64_r13 asm ("r13") __used; |
34 | #endif | ||
35 | |||
36 | #define ia64_native_setreg(regnum, val) \ | ||
37 | ({ \ | ||
38 | switch (regnum) { \ | ||
39 | case _IA64_REG_PSR_L: \ | ||
40 | asm volatile ("mov psr.l=%0" :: "r"(val) : "memory"); \ | ||
41 | break; \ | ||
42 | case _IA64_REG_AR_KR0 ... _IA64_REG_AR_EC: \ | ||
43 | asm volatile ("mov ar%0=%1" :: \ | ||
44 | "i" (regnum - _IA64_REG_AR_KR0), \ | ||
45 | "r"(val): "memory"); \ | ||
46 | break; \ | ||
47 | case _IA64_REG_CR_DCR ... _IA64_REG_CR_LRR1: \ | ||
48 | asm volatile ("mov cr%0=%1" :: \ | ||
49 | "i" (regnum - _IA64_REG_CR_DCR), \ | ||
50 | "r"(val): "memory" ); \ | ||
51 | break; \ | ||
52 | case _IA64_REG_SP: \ | ||
53 | asm volatile ("mov r12=%0" :: \ | ||
54 | "r"(val): "memory"); \ | ||
55 | break; \ | ||
56 | case _IA64_REG_GP: \ | ||
57 | asm volatile ("mov gp=%0" :: "r"(val) : "memory"); \ | ||
58 | break; \ | ||
59 | default: \ | ||
60 | ia64_bad_param_for_setreg(); \ | ||
61 | break; \ | ||
62 | } \ | ||
63 | }) | ||
64 | |||
65 | #define ia64_native_getreg(regnum) \ | ||
66 | ({ \ | ||
67 | __u64 ia64_intri_res; \ | ||
68 | \ | ||
69 | switch (regnum) { \ | ||
70 | case _IA64_REG_GP: \ | ||
71 | asm volatile ("mov %0=gp" : "=r"(ia64_intri_res)); \ | ||
72 | break; \ | ||
73 | case _IA64_REG_IP: \ | ||
74 | asm volatile ("mov %0=ip" : "=r"(ia64_intri_res)); \ | ||
75 | break; \ | ||
76 | case _IA64_REG_PSR: \ | ||
77 | asm volatile ("mov %0=psr" : "=r"(ia64_intri_res)); \ | ||
78 | break; \ | ||
79 | case _IA64_REG_TP: /* for current() */ \ | ||
80 | ia64_intri_res = ia64_r13; \ | ||
81 | break; \ | ||
82 | case _IA64_REG_AR_KR0 ... _IA64_REG_AR_EC: \ | ||
83 | asm volatile ("mov %0=ar%1" : "=r" (ia64_intri_res) \ | ||
84 | : "i"(regnum - _IA64_REG_AR_KR0)); \ | ||
85 | break; \ | ||
86 | case _IA64_REG_CR_DCR ... _IA64_REG_CR_LRR1: \ | ||
87 | asm volatile ("mov %0=cr%1" : "=r" (ia64_intri_res) \ | ||
88 | : "i" (regnum - _IA64_REG_CR_DCR)); \ | ||
89 | break; \ | ||
90 | case _IA64_REG_SP: \ | ||
91 | asm volatile ("mov %0=sp" : "=r" (ia64_intri_res)); \ | ||
92 | break; \ | ||
93 | default: \ | ||
94 | ia64_bad_param_for_getreg(); \ | ||
95 | break; \ | ||
96 | } \ | ||
97 | ia64_intri_res; \ | ||
98 | }) | ||
99 | |||
100 | #define ia64_hint_pause 0 | ||
101 | |||
102 | #define ia64_hint(mode) \ | ||
103 | ({ \ | ||
104 | switch (mode) { \ | ||
105 | case ia64_hint_pause: \ | ||
106 | asm volatile ("hint @pause" ::: "memory"); \ | ||
107 | break; \ | ||
108 | } \ | ||
109 | }) | ||
110 | |||
111 | |||
112 | /* Integer values for mux1 instruction */ | ||
113 | #define ia64_mux1_brcst 0 | ||
114 | #define ia64_mux1_mix 8 | ||
115 | #define ia64_mux1_shuf 9 | ||
116 | #define ia64_mux1_alt 10 | ||
117 | #define ia64_mux1_rev 11 | ||
118 | |||
119 | #define ia64_mux1(x, mode) \ | ||
120 | ({ \ | ||
121 | __u64 ia64_intri_res; \ | ||
122 | \ | ||
123 | switch (mode) { \ | ||
124 | case ia64_mux1_brcst: \ | ||
125 | asm ("mux1 %0=%1,@brcst" : "=r" (ia64_intri_res) : "r" (x)); \ | ||
126 | break; \ | ||
127 | case ia64_mux1_mix: \ | ||
128 | asm ("mux1 %0=%1,@mix" : "=r" (ia64_intri_res) : "r" (x)); \ | ||
129 | break; \ | ||
130 | case ia64_mux1_shuf: \ | ||
131 | asm ("mux1 %0=%1,@shuf" : "=r" (ia64_intri_res) : "r" (x)); \ | ||
132 | break; \ | ||
133 | case ia64_mux1_alt: \ | ||
134 | asm ("mux1 %0=%1,@alt" : "=r" (ia64_intri_res) : "r" (x)); \ | ||
135 | break; \ | ||
136 | case ia64_mux1_rev: \ | ||
137 | asm ("mux1 %0=%1,@rev" : "=r" (ia64_intri_res) : "r" (x)); \ | ||
138 | break; \ | ||
139 | } \ | ||
140 | ia64_intri_res; \ | ||
141 | }) | ||
142 | |||
143 | #if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) | ||
144 | # define ia64_popcnt(x) __builtin_popcountl(x) | ||
145 | #else | ||
146 | # define ia64_popcnt(x) \ | ||
147 | ({ \ | ||
148 | __u64 ia64_intri_res; \ | ||
149 | asm ("popcnt %0=%1" : "=r" (ia64_intri_res) : "r" (x)); \ | ||
150 | \ | ||
151 | ia64_intri_res; \ | ||
152 | }) | ||
153 | #endif | ||
154 | |||
155 | #define ia64_getf_exp(x) \ | ||
156 | ({ \ | ||
157 | long ia64_intri_res; \ | ||
158 | \ | ||
159 | asm ("getf.exp %0=%1" : "=r"(ia64_intri_res) : "f"(x)); \ | ||
160 | \ | ||
161 | ia64_intri_res; \ | ||
162 | }) | ||
163 | |||
164 | #define ia64_shrp(a, b, count) \ | ||
165 | ({ \ | ||
166 | __u64 ia64_intri_res; \ | ||
167 | asm ("shrp %0=%1,%2,%3" : "=r"(ia64_intri_res) : "r"(a), "r"(b), "i"(count)); \ | ||
168 | ia64_intri_res; \ | ||
169 | }) | ||
170 | |||
171 | #define ia64_ldfs(regnum, x) \ | ||
172 | ({ \ | ||
173 | register double __f__ asm ("f"#regnum); \ | ||
174 | asm volatile ("ldfs %0=[%1]" :"=f"(__f__): "r"(x)); \ | ||
175 | }) | ||
176 | |||
177 | #define ia64_ldfd(regnum, x) \ | ||
178 | ({ \ | ||
179 | register double __f__ asm ("f"#regnum); \ | ||
180 | asm volatile ("ldfd %0=[%1]" :"=f"(__f__): "r"(x)); \ | ||
181 | }) | ||
182 | |||
183 | #define ia64_ldfe(regnum, x) \ | ||
184 | ({ \ | ||
185 | register double __f__ asm ("f"#regnum); \ | ||
186 | asm volatile ("ldfe %0=[%1]" :"=f"(__f__): "r"(x)); \ | ||
187 | }) | ||
188 | |||
189 | #define ia64_ldf8(regnum, x) \ | ||
190 | ({ \ | ||
191 | register double __f__ asm ("f"#regnum); \ | ||
192 | asm volatile ("ldf8 %0=[%1]" :"=f"(__f__): "r"(x)); \ | ||
193 | }) | ||
194 | |||
195 | #define ia64_ldf_fill(regnum, x) \ | ||
196 | ({ \ | ||
197 | register double __f__ asm ("f"#regnum); \ | ||
198 | asm volatile ("ldf.fill %0=[%1]" :"=f"(__f__): "r"(x)); \ | ||
199 | }) | ||
200 | |||
201 | #define ia64_st4_rel_nta(m, val) \ | ||
202 | ({ \ | ||
203 | asm volatile ("st4.rel.nta [%0] = %1\n\t" :: "r"(m), "r"(val)); \ | ||
204 | }) | ||
205 | |||
206 | #define ia64_stfs(x, regnum) \ | ||
207 | ({ \ | ||
208 | register double __f__ asm ("f"#regnum); \ | ||
209 | asm volatile ("stfs [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ | ||
210 | }) | ||
211 | |||
212 | #define ia64_stfd(x, regnum) \ | ||
213 | ({ \ | ||
214 | register double __f__ asm ("f"#regnum); \ | ||
215 | asm volatile ("stfd [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ | ||
216 | }) | ||
217 | |||
218 | #define ia64_stfe(x, regnum) \ | ||
219 | ({ \ | ||
220 | register double __f__ asm ("f"#regnum); \ | ||
221 | asm volatile ("stfe [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ | ||
222 | }) | ||
223 | |||
224 | #define ia64_stf8(x, regnum) \ | ||
225 | ({ \ | ||
226 | register double __f__ asm ("f"#regnum); \ | ||
227 | asm volatile ("stf8 [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ | ||
228 | }) | ||
229 | |||
230 | #define ia64_stf_spill(x, regnum) \ | ||
231 | ({ \ | ||
232 | register double __f__ asm ("f"#regnum); \ | ||
233 | asm volatile ("stf.spill [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ | ||
234 | }) | ||
235 | |||
236 | #define ia64_fetchadd4_acq(p, inc) \ | ||
237 | ({ \ | ||
238 | \ | ||
239 | __u64 ia64_intri_res; \ | ||
240 | asm volatile ("fetchadd4.acq %0=[%1],%2" \ | ||
241 | : "=r"(ia64_intri_res) : "r"(p), "i" (inc) \ | ||
242 | : "memory"); \ | ||
243 | \ | ||
244 | ia64_intri_res; \ | ||
245 | }) | ||
246 | |||
247 | #define ia64_fetchadd4_rel(p, inc) \ | ||
248 | ({ \ | ||
249 | __u64 ia64_intri_res; \ | ||
250 | asm volatile ("fetchadd4.rel %0=[%1],%2" \ | ||
251 | : "=r"(ia64_intri_res) : "r"(p), "i" (inc) \ | ||
252 | : "memory"); \ | ||
253 | \ | ||
254 | ia64_intri_res; \ | ||
255 | }) | ||
256 | |||
257 | #define ia64_fetchadd8_acq(p, inc) \ | ||
258 | ({ \ | ||
259 | \ | ||
260 | __u64 ia64_intri_res; \ | ||
261 | asm volatile ("fetchadd8.acq %0=[%1],%2" \ | ||
262 | : "=r"(ia64_intri_res) : "r"(p), "i" (inc) \ | ||
263 | : "memory"); \ | ||
264 | \ | ||
265 | ia64_intri_res; \ | ||
266 | }) | ||
267 | |||
268 | #define ia64_fetchadd8_rel(p, inc) \ | ||
269 | ({ \ | ||
270 | __u64 ia64_intri_res; \ | ||
271 | asm volatile ("fetchadd8.rel %0=[%1],%2" \ | ||
272 | : "=r"(ia64_intri_res) : "r"(p), "i" (inc) \ | ||
273 | : "memory"); \ | ||
274 | \ | ||
275 | ia64_intri_res; \ | ||
276 | }) | ||
277 | |||
278 | #define ia64_xchg1(ptr,x) \ | ||
279 | ({ \ | ||
280 | __u64 ia64_intri_res; \ | ||
281 | asm volatile ("xchg1 %0=[%1],%2" \ | ||
282 | : "=r" (ia64_intri_res) : "r" (ptr), "r" (x) : "memory"); \ | ||
283 | ia64_intri_res; \ | ||
284 | }) | ||
285 | |||
286 | #define ia64_xchg2(ptr,x) \ | ||
287 | ({ \ | ||
288 | __u64 ia64_intri_res; \ | ||
289 | asm volatile ("xchg2 %0=[%1],%2" : "=r" (ia64_intri_res) \ | ||
290 | : "r" (ptr), "r" (x) : "memory"); \ | ||
291 | ia64_intri_res; \ | ||
292 | }) | ||
293 | |||
294 | #define ia64_xchg4(ptr,x) \ | ||
295 | ({ \ | ||
296 | __u64 ia64_intri_res; \ | ||
297 | asm volatile ("xchg4 %0=[%1],%2" : "=r" (ia64_intri_res) \ | ||
298 | : "r" (ptr), "r" (x) : "memory"); \ | ||
299 | ia64_intri_res; \ | ||
300 | }) | ||
301 | |||
302 | #define ia64_xchg8(ptr,x) \ | ||
303 | ({ \ | ||
304 | __u64 ia64_intri_res; \ | ||
305 | asm volatile ("xchg8 %0=[%1],%2" : "=r" (ia64_intri_res) \ | ||
306 | : "r" (ptr), "r" (x) : "memory"); \ | ||
307 | ia64_intri_res; \ | ||
308 | }) | ||
309 | |||
310 | #define ia64_cmpxchg1_acq(ptr, new, old) \ | ||
311 | ({ \ | ||
312 | __u64 ia64_intri_res; \ | ||
313 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
314 | asm volatile ("cmpxchg1.acq %0=[%1],%2,ar.ccv": \ | ||
315 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
316 | ia64_intri_res; \ | ||
317 | }) | ||
318 | |||
319 | #define ia64_cmpxchg1_rel(ptr, new, old) \ | ||
320 | ({ \ | ||
321 | __u64 ia64_intri_res; \ | ||
322 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
323 | asm volatile ("cmpxchg1.rel %0=[%1],%2,ar.ccv": \ | ||
324 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
325 | ia64_intri_res; \ | ||
326 | }) | ||
327 | |||
328 | #define ia64_cmpxchg2_acq(ptr, new, old) \ | ||
329 | ({ \ | ||
330 | __u64 ia64_intri_res; \ | ||
331 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
332 | asm volatile ("cmpxchg2.acq %0=[%1],%2,ar.ccv": \ | ||
333 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
334 | ia64_intri_res; \ | ||
335 | }) | ||
336 | |||
337 | #define ia64_cmpxchg2_rel(ptr, new, old) \ | ||
338 | ({ \ | ||
339 | __u64 ia64_intri_res; \ | ||
340 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
341 | \ | ||
342 | asm volatile ("cmpxchg2.rel %0=[%1],%2,ar.ccv": \ | ||
343 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
344 | ia64_intri_res; \ | ||
345 | }) | ||
346 | |||
347 | #define ia64_cmpxchg4_acq(ptr, new, old) \ | ||
348 | ({ \ | ||
349 | __u64 ia64_intri_res; \ | ||
350 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
351 | asm volatile ("cmpxchg4.acq %0=[%1],%2,ar.ccv": \ | ||
352 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
353 | ia64_intri_res; \ | ||
354 | }) | ||
355 | |||
356 | #define ia64_cmpxchg4_rel(ptr, new, old) \ | ||
357 | ({ \ | ||
358 | __u64 ia64_intri_res; \ | ||
359 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
360 | asm volatile ("cmpxchg4.rel %0=[%1],%2,ar.ccv": \ | ||
361 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
362 | ia64_intri_res; \ | ||
363 | }) | ||
364 | |||
365 | #define ia64_cmpxchg8_acq(ptr, new, old) \ | ||
366 | ({ \ | ||
367 | __u64 ia64_intri_res; \ | ||
368 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
369 | asm volatile ("cmpxchg8.acq %0=[%1],%2,ar.ccv": \ | ||
370 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
371 | ia64_intri_res; \ | ||
372 | }) | ||
373 | |||
374 | #define ia64_cmpxchg8_rel(ptr, new, old) \ | ||
375 | ({ \ | ||
376 | __u64 ia64_intri_res; \ | ||
377 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
378 | \ | ||
379 | asm volatile ("cmpxchg8.rel %0=[%1],%2,ar.ccv": \ | ||
380 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
381 | ia64_intri_res; \ | ||
382 | }) | ||
383 | |||
384 | #define ia64_mf() asm volatile ("mf" ::: "memory") | ||
385 | #define ia64_mfa() asm volatile ("mf.a" ::: "memory") | ||
386 | |||
387 | #define ia64_invala() asm volatile ("invala" ::: "memory") | ||
388 | |||
389 | #define ia64_native_thash(addr) \ | ||
390 | ({ \ | ||
391 | unsigned long ia64_intri_res; \ | ||
392 | asm volatile ("thash %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \ | ||
393 | ia64_intri_res; \ | ||
394 | }) | ||
395 | |||
396 | #define ia64_srlz_i() asm volatile (";; srlz.i ;;" ::: "memory") | ||
397 | #define ia64_srlz_d() asm volatile (";; srlz.d" ::: "memory"); | ||
398 | |||
399 | #ifdef HAVE_SERIALIZE_DIRECTIVE | ||
400 | # define ia64_dv_serialize_data() asm volatile (".serialize.data"); | ||
401 | # define ia64_dv_serialize_instruction() asm volatile (".serialize.instruction"); | ||
402 | #else | ||
403 | # define ia64_dv_serialize_data() | ||
404 | # define ia64_dv_serialize_instruction() | ||
405 | #endif | ||
406 | |||
407 | #define ia64_nop(x) asm volatile ("nop %0"::"i"(x)); | ||
408 | |||
409 | #define ia64_itci(addr) asm volatile ("itc.i %0;;" :: "r"(addr) : "memory") | ||
410 | |||
411 | #define ia64_itcd(addr) asm volatile ("itc.d %0;;" :: "r"(addr) : "memory") | ||
412 | |||
413 | |||
414 | #define ia64_itri(trnum, addr) asm volatile ("itr.i itr[%0]=%1" \ | ||
415 | :: "r"(trnum), "r"(addr) : "memory") | ||
416 | |||
417 | #define ia64_itrd(trnum, addr) asm volatile ("itr.d dtr[%0]=%1" \ | ||
418 | :: "r"(trnum), "r"(addr) : "memory") | ||
419 | |||
420 | #define ia64_tpa(addr) \ | ||
421 | ({ \ | ||
422 | unsigned long ia64_pa; \ | ||
423 | asm volatile ("tpa %0 = %1" : "=r"(ia64_pa) : "r"(addr) : "memory"); \ | ||
424 | ia64_pa; \ | ||
425 | }) | ||
426 | |||
427 | #define __ia64_set_dbr(index, val) \ | ||
428 | asm volatile ("mov dbr[%0]=%1" :: "r"(index), "r"(val) : "memory") | ||
429 | |||
430 | #define ia64_set_ibr(index, val) \ | ||
431 | asm volatile ("mov ibr[%0]=%1" :: "r"(index), "r"(val) : "memory") | ||
432 | |||
433 | #define ia64_set_pkr(index, val) \ | ||
434 | asm volatile ("mov pkr[%0]=%1" :: "r"(index), "r"(val) : "memory") | ||
435 | |||
436 | #define ia64_set_pmc(index, val) \ | ||
437 | asm volatile ("mov pmc[%0]=%1" :: "r"(index), "r"(val) : "memory") | ||
438 | |||
439 | #define ia64_set_pmd(index, val) \ | ||
440 | asm volatile ("mov pmd[%0]=%1" :: "r"(index), "r"(val) : "memory") | ||
441 | |||
442 | #define ia64_native_set_rr(index, val) \ | ||
443 | asm volatile ("mov rr[%0]=%1" :: "r"(index), "r"(val) : "memory"); | ||
444 | |||
445 | #define ia64_native_get_cpuid(index) \ | ||
446 | ({ \ | ||
447 | unsigned long ia64_intri_res; \ | ||
448 | asm volatile ("mov %0=cpuid[%r1]" : "=r"(ia64_intri_res) : "rO"(index)); \ | ||
449 | ia64_intri_res; \ | ||
450 | }) | ||
451 | |||
452 | #define __ia64_get_dbr(index) \ | ||
453 | ({ \ | ||
454 | unsigned long ia64_intri_res; \ | ||
455 | asm volatile ("mov %0=dbr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ | ||
456 | ia64_intri_res; \ | ||
457 | }) | ||
458 | |||
459 | #define ia64_get_ibr(index) \ | ||
460 | ({ \ | ||
461 | unsigned long ia64_intri_res; \ | ||
462 | asm volatile ("mov %0=ibr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ | ||
463 | ia64_intri_res; \ | ||
464 | }) | ||
465 | |||
466 | #define ia64_get_pkr(index) \ | ||
467 | ({ \ | ||
468 | unsigned long ia64_intri_res; \ | ||
469 | asm volatile ("mov %0=pkr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ | ||
470 | ia64_intri_res; \ | ||
471 | }) | ||
472 | |||
473 | #define ia64_get_pmc(index) \ | ||
474 | ({ \ | ||
475 | unsigned long ia64_intri_res; \ | ||
476 | asm volatile ("mov %0=pmc[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ | ||
477 | ia64_intri_res; \ | ||
478 | }) | ||
479 | |||
480 | |||
481 | #define ia64_native_get_pmd(index) \ | ||
482 | ({ \ | ||
483 | unsigned long ia64_intri_res; \ | ||
484 | asm volatile ("mov %0=pmd[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ | ||
485 | ia64_intri_res; \ | ||
486 | }) | ||
487 | |||
488 | #define ia64_native_get_rr(index) \ | ||
489 | ({ \ | ||
490 | unsigned long ia64_intri_res; \ | ||
491 | asm volatile ("mov %0=rr[%1]" : "=r"(ia64_intri_res) : "r" (index)); \ | ||
492 | ia64_intri_res; \ | ||
493 | }) | ||
494 | |||
495 | #define ia64_native_fc(addr) asm volatile ("fc %0" :: "r"(addr) : "memory") | ||
496 | |||
497 | |||
498 | #define ia64_sync_i() asm volatile (";; sync.i" ::: "memory") | ||
499 | |||
500 | #define ia64_native_ssm(mask) asm volatile ("ssm %0":: "i"((mask)) : "memory") | ||
501 | #define ia64_native_rsm(mask) asm volatile ("rsm %0":: "i"((mask)) : "memory") | ||
502 | #define ia64_sum(mask) asm volatile ("sum %0":: "i"((mask)) : "memory") | ||
503 | #define ia64_rum(mask) asm volatile ("rum %0":: "i"((mask)) : "memory") | ||
504 | |||
505 | #define ia64_ptce(addr) asm volatile ("ptc.e %0" :: "r"(addr)) | ||
506 | |||
507 | #define ia64_native_ptcga(addr, size) \ | ||
508 | do { \ | ||
509 | asm volatile ("ptc.ga %0,%1" :: "r"(addr), "r"(size) : "memory"); \ | ||
510 | ia64_dv_serialize_data(); \ | ||
511 | } while (0) | ||
512 | |||
513 | #define ia64_ptcl(addr, size) \ | ||
514 | do { \ | ||
515 | asm volatile ("ptc.l %0,%1" :: "r"(addr), "r"(size) : "memory"); \ | ||
516 | ia64_dv_serialize_data(); \ | ||
517 | } while (0) | ||
518 | |||
519 | #define ia64_ptri(addr, size) \ | ||
520 | asm volatile ("ptr.i %0,%1" :: "r"(addr), "r"(size) : "memory") | ||
521 | |||
522 | #define ia64_ptrd(addr, size) \ | ||
523 | asm volatile ("ptr.d %0,%1" :: "r"(addr), "r"(size) : "memory") | ||
524 | |||
525 | #define ia64_ttag(addr) \ | ||
526 | ({ \ | ||
527 | __u64 ia64_intri_res; \ | ||
528 | asm volatile ("ttag %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \ | ||
529 | ia64_intri_res; \ | ||
530 | }) | ||
531 | |||
532 | |||
533 | /* Values for lfhint in ia64_lfetch and ia64_lfetch_fault */ | ||
534 | |||
535 | #define ia64_lfhint_none 0 | ||
536 | #define ia64_lfhint_nt1 1 | ||
537 | #define ia64_lfhint_nt2 2 | ||
538 | #define ia64_lfhint_nta 3 | ||
539 | |||
540 | #define ia64_lfetch(lfhint, y) \ | ||
541 | ({ \ | ||
542 | switch (lfhint) { \ | ||
543 | case ia64_lfhint_none: \ | ||
544 | asm volatile ("lfetch [%0]" : : "r"(y)); \ | ||
545 | break; \ | ||
546 | case ia64_lfhint_nt1: \ | ||
547 | asm volatile ("lfetch.nt1 [%0]" : : "r"(y)); \ | ||
548 | break; \ | ||
549 | case ia64_lfhint_nt2: \ | ||
550 | asm volatile ("lfetch.nt2 [%0]" : : "r"(y)); \ | ||
551 | break; \ | ||
552 | case ia64_lfhint_nta: \ | ||
553 | asm volatile ("lfetch.nta [%0]" : : "r"(y)); \ | ||
554 | break; \ | ||
555 | } \ | ||
556 | }) | ||
557 | |||
558 | #define ia64_lfetch_excl(lfhint, y) \ | ||
559 | ({ \ | ||
560 | switch (lfhint) { \ | ||
561 | case ia64_lfhint_none: \ | ||
562 | asm volatile ("lfetch.excl [%0]" :: "r"(y)); \ | ||
563 | break; \ | ||
564 | case ia64_lfhint_nt1: \ | ||
565 | asm volatile ("lfetch.excl.nt1 [%0]" :: "r"(y)); \ | ||
566 | break; \ | ||
567 | case ia64_lfhint_nt2: \ | ||
568 | asm volatile ("lfetch.excl.nt2 [%0]" :: "r"(y)); \ | ||
569 | break; \ | ||
570 | case ia64_lfhint_nta: \ | ||
571 | asm volatile ("lfetch.excl.nta [%0]" :: "r"(y)); \ | ||
572 | break; \ | ||
573 | } \ | ||
574 | }) | ||
575 | |||
576 | #define ia64_lfetch_fault(lfhint, y) \ | ||
577 | ({ \ | ||
578 | switch (lfhint) { \ | ||
579 | case ia64_lfhint_none: \ | ||
580 | asm volatile ("lfetch.fault [%0]" : : "r"(y)); \ | ||
581 | break; \ | ||
582 | case ia64_lfhint_nt1: \ | ||
583 | asm volatile ("lfetch.fault.nt1 [%0]" : : "r"(y)); \ | ||
584 | break; \ | ||
585 | case ia64_lfhint_nt2: \ | ||
586 | asm volatile ("lfetch.fault.nt2 [%0]" : : "r"(y)); \ | ||
587 | break; \ | ||
588 | case ia64_lfhint_nta: \ | ||
589 | asm volatile ("lfetch.fault.nta [%0]" : : "r"(y)); \ | ||
590 | break; \ | ||
591 | } \ | ||
592 | }) | ||
593 | |||
594 | #define ia64_lfetch_fault_excl(lfhint, y) \ | ||
595 | ({ \ | ||
596 | switch (lfhint) { \ | ||
597 | case ia64_lfhint_none: \ | ||
598 | asm volatile ("lfetch.fault.excl [%0]" :: "r"(y)); \ | ||
599 | break; \ | ||
600 | case ia64_lfhint_nt1: \ | ||
601 | asm volatile ("lfetch.fault.excl.nt1 [%0]" :: "r"(y)); \ | ||
602 | break; \ | ||
603 | case ia64_lfhint_nt2: \ | ||
604 | asm volatile ("lfetch.fault.excl.nt2 [%0]" :: "r"(y)); \ | ||
605 | break; \ | ||
606 | case ia64_lfhint_nta: \ | ||
607 | asm volatile ("lfetch.fault.excl.nta [%0]" :: "r"(y)); \ | ||
608 | break; \ | ||
609 | } \ | ||
610 | }) | ||
611 | |||
612 | #define ia64_native_intrin_local_irq_restore(x) \ | ||
613 | do { \ | ||
614 | asm volatile (";; cmp.ne p6,p7=%0,r0;;" \ | ||
615 | "(p6) ssm psr.i;" \ | ||
616 | "(p7) rsm psr.i;;" \ | ||
617 | "(p6) srlz.d" \ | ||
618 | :: "r"((x)) : "p6", "p7", "memory"); \ | ||
619 | } while (0) | ||
620 | |||
621 | #endif /* _ASM_IA64_GCC_INTRIN_H */ | 12 | #endif /* _ASM_IA64_GCC_INTRIN_H */ |
diff --git a/arch/ia64/include/asm/intrinsics.h b/arch/ia64/include/asm/intrinsics.h index d129e367e76..20477ea111b 100644 --- a/arch/ia64/include/asm/intrinsics.h +++ b/arch/ia64/include/asm/intrinsics.h | |||
@@ -1,99 +1,16 @@ | |||
1 | #ifndef _ASM_IA64_INTRINSICS_H | ||
2 | #define _ASM_IA64_INTRINSICS_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Compiler-dependent intrinsics. | 2 | * Compiler-dependent intrinsics. |
6 | * | 3 | * |
7 | * Copyright (C) 2002-2003 Hewlett-Packard Co | 4 | * Copyright (C) 2002-2003 Hewlett-Packard Co |
8 | * David Mosberger-Tang <davidm@hpl.hp.com> | 5 | * David Mosberger-Tang <davidm@hpl.hp.com> |
9 | */ | 6 | */ |
7 | #ifndef _ASM_IA64_INTRINSICS_H | ||
8 | #define _ASM_IA64_INTRINSICS_H | ||
10 | 9 | ||
11 | #ifndef __ASSEMBLY__ | ||
12 | |||
13 | #include <linux/types.h> | ||
14 | /* include compiler specific intrinsics */ | ||
15 | #include <asm/ia64regs.h> | ||
16 | #ifdef __INTEL_COMPILER | ||
17 | # include <asm/intel_intrin.h> | ||
18 | #else | ||
19 | # include <asm/gcc_intrin.h> | ||
20 | #endif | ||
21 | #include <asm/cmpxchg.h> | ||
22 | |||
23 | #define ia64_native_get_psr_i() (ia64_native_getreg(_IA64_REG_PSR) & IA64_PSR_I) | ||
24 | |||
25 | #define ia64_native_set_rr0_to_rr4(val0, val1, val2, val3, val4) \ | ||
26 | do { \ | ||
27 | ia64_native_set_rr(0x0000000000000000UL, (val0)); \ | ||
28 | ia64_native_set_rr(0x2000000000000000UL, (val1)); \ | ||
29 | ia64_native_set_rr(0x4000000000000000UL, (val2)); \ | ||
30 | ia64_native_set_rr(0x6000000000000000UL, (val3)); \ | ||
31 | ia64_native_set_rr(0x8000000000000000UL, (val4)); \ | ||
32 | } while (0) | ||
33 | |||
34 | /* | ||
35 | * Force an unresolved reference if someone tries to use | ||
36 | * ia64_fetch_and_add() with a bad value. | ||
37 | */ | ||
38 | extern unsigned long __bad_size_for_ia64_fetch_and_add (void); | ||
39 | extern unsigned long __bad_increment_for_ia64_fetch_and_add (void); | ||
40 | |||
41 | #define IA64_FETCHADD(tmp,v,n,sz,sem) \ | ||
42 | ({ \ | ||
43 | switch (sz) { \ | ||
44 | case 4: \ | ||
45 | tmp = ia64_fetchadd4_##sem((unsigned int *) v, n); \ | ||
46 | break; \ | ||
47 | \ | ||
48 | case 8: \ | ||
49 | tmp = ia64_fetchadd8_##sem((unsigned long *) v, n); \ | ||
50 | break; \ | ||
51 | \ | ||
52 | default: \ | ||
53 | __bad_size_for_ia64_fetch_and_add(); \ | ||
54 | } \ | ||
55 | }) | ||
56 | |||
57 | #define ia64_fetchadd(i,v,sem) \ | ||
58 | ({ \ | ||
59 | __u64 _tmp; \ | ||
60 | volatile __typeof__(*(v)) *_v = (v); \ | ||
61 | /* Can't use a switch () here: gcc isn't always smart enough for that... */ \ | ||
62 | if ((i) == -16) \ | ||
63 | IA64_FETCHADD(_tmp, _v, -16, sizeof(*(v)), sem); \ | ||
64 | else if ((i) == -8) \ | ||
65 | IA64_FETCHADD(_tmp, _v, -8, sizeof(*(v)), sem); \ | ||
66 | else if ((i) == -4) \ | ||
67 | IA64_FETCHADD(_tmp, _v, -4, sizeof(*(v)), sem); \ | ||
68 | else if ((i) == -1) \ | ||
69 | IA64_FETCHADD(_tmp, _v, -1, sizeof(*(v)), sem); \ | ||
70 | else if ((i) == 1) \ | ||
71 | IA64_FETCHADD(_tmp, _v, 1, sizeof(*(v)), sem); \ | ||
72 | else if ((i) == 4) \ | ||
73 | IA64_FETCHADD(_tmp, _v, 4, sizeof(*(v)), sem); \ | ||
74 | else if ((i) == 8) \ | ||
75 | IA64_FETCHADD(_tmp, _v, 8, sizeof(*(v)), sem); \ | ||
76 | else if ((i) == 16) \ | ||
77 | IA64_FETCHADD(_tmp, _v, 16, sizeof(*(v)), sem); \ | ||
78 | else \ | ||
79 | _tmp = __bad_increment_for_ia64_fetch_and_add(); \ | ||
80 | (__typeof__(*(v))) (_tmp); /* return old value */ \ | ||
81 | }) | ||
82 | |||
83 | #define ia64_fetch_and_add(i,v) (ia64_fetchadd(i, v, rel) + (i)) /* return new value */ | ||
84 | |||
85 | #endif | ||
86 | |||
87 | #ifdef __KERNEL__ | ||
88 | #include <asm/paravirt_privop.h> | 10 | #include <asm/paravirt_privop.h> |
89 | #endif | 11 | #include <uapi/asm/intrinsics.h> |
90 | 12 | ||
91 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
92 | |||
93 | #define IA64_INTRINSIC_API(name) ia64_native_ ## name | ||
94 | #define IA64_INTRINSIC_MACRO(name) ia64_native_ ## name | ||
95 | |||
96 | #if defined(__KERNEL__) | ||
97 | #if defined(CONFIG_PARAVIRT) | 14 | #if defined(CONFIG_PARAVIRT) |
98 | # undef IA64_INTRINSIC_API | 15 | # undef IA64_INTRINSIC_API |
99 | # undef IA64_INTRINSIC_MACRO | 16 | # undef IA64_INTRINSIC_MACRO |
@@ -104,36 +21,5 @@ extern unsigned long __bad_increment_for_ia64_fetch_and_add (void); | |||
104 | # endif | 21 | # endif |
105 | #define IA64_INTRINSIC_MACRO(name) paravirt_ ## name | 22 | #define IA64_INTRINSIC_MACRO(name) paravirt_ ## name |
106 | #endif | 23 | #endif |
107 | #endif | ||
108 | |||
109 | /************************************************/ | ||
110 | /* Instructions paravirtualized for correctness */ | ||
111 | /************************************************/ | ||
112 | /* fc, thash, get_cpuid, get_pmd, get_eflags, set_eflags */ | ||
113 | /* Note that "ttag" and "cover" are also privilege-sensitive; "ttag" | ||
114 | * is not currently used (though it may be in a long-format VHPT system!) | ||
115 | */ | ||
116 | #define ia64_fc IA64_INTRINSIC_API(fc) | ||
117 | #define ia64_thash IA64_INTRINSIC_API(thash) | ||
118 | #define ia64_get_cpuid IA64_INTRINSIC_API(get_cpuid) | ||
119 | #define ia64_get_pmd IA64_INTRINSIC_API(get_pmd) | ||
120 | |||
121 | |||
122 | /************************************************/ | ||
123 | /* Instructions paravirtualized for performance */ | ||
124 | /************************************************/ | ||
125 | #define ia64_ssm IA64_INTRINSIC_MACRO(ssm) | ||
126 | #define ia64_rsm IA64_INTRINSIC_MACRO(rsm) | ||
127 | #define ia64_getreg IA64_INTRINSIC_MACRO(getreg) | ||
128 | #define ia64_setreg IA64_INTRINSIC_API(setreg) | ||
129 | #define ia64_set_rr IA64_INTRINSIC_API(set_rr) | ||
130 | #define ia64_get_rr IA64_INTRINSIC_API(get_rr) | ||
131 | #define ia64_ptcga IA64_INTRINSIC_API(ptcga) | ||
132 | #define ia64_get_psr_i IA64_INTRINSIC_API(get_psr_i) | ||
133 | #define ia64_intrin_local_irq_restore \ | ||
134 | IA64_INTRINSIC_API(intrin_local_irq_restore) | ||
135 | #define ia64_set_rr0_to_rr4 IA64_INTRINSIC_API(set_rr0_to_rr4) | ||
136 | |||
137 | #endif /* !__ASSEMBLY__ */ | 24 | #endif /* !__ASSEMBLY__ */ |
138 | |||
139 | #endif /* _ASM_IA64_INTRINSICS_H */ | 25 | #endif /* _ASM_IA64_INTRINSICS_H */ |
diff --git a/arch/ia64/include/asm/kvm_para.h b/arch/ia64/include/asm/kvm_para.h index 2019cb99335..47c00f91043 100644 --- a/arch/ia64/include/asm/kvm_para.h +++ b/arch/ia64/include/asm/kvm_para.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifndef __IA64_KVM_PARA_H | ||
2 | #define __IA64_KVM_PARA_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Copyright (C) 2007 Xiantao Zhang <xiantao.zhang@intel.com> | 2 | * Copyright (C) 2007 Xiantao Zhang <xiantao.zhang@intel.com> |
6 | * | 3 | * |
@@ -18,8 +15,11 @@ | |||
18 | * Place - Suite 330, Boston, MA 02111-1307 USA. | 15 | * Place - Suite 330, Boston, MA 02111-1307 USA. |
19 | * | 16 | * |
20 | */ | 17 | */ |
18 | #ifndef __IA64_KVM_PARA_H | ||
19 | #define __IA64_KVM_PARA_H | ||
20 | |||
21 | #include <uapi/asm/kvm_para.h> | ||
21 | 22 | ||
22 | #ifdef __KERNEL__ | ||
23 | 23 | ||
24 | static inline unsigned int kvm_arch_para_features(void) | 24 | static inline unsigned int kvm_arch_para_features(void) |
25 | { | 25 | { |
@@ -32,5 +32,3 @@ static inline bool kvm_check_and_clear_guest_paused(void) | |||
32 | } | 32 | } |
33 | 33 | ||
34 | #endif | 34 | #endif |
35 | |||
36 | #endif | ||
diff --git a/arch/ia64/include/asm/mman.h b/arch/ia64/include/asm/mman.h index 4459028e5aa..fdd5f5229f7 100644 --- a/arch/ia64/include/asm/mman.h +++ b/arch/ia64/include/asm/mman.h | |||
@@ -1,23 +1,17 @@ | |||
1 | #ifndef _ASM_IA64_MMAN_H | ||
2 | #define _ASM_IA64_MMAN_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Based on <asm-i386/mman.h>. | 2 | * Based on <asm-i386/mman.h>. |
6 | * | 3 | * |
7 | * Modified 1998-2000, 2002 | 4 | * Modified 1998-2000, 2002 |
8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | 5 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
9 | */ | 6 | */ |
7 | #ifndef _ASM_IA64_MMAN_H | ||
8 | #define _ASM_IA64_MMAN_H | ||
10 | 9 | ||
11 | #include <asm-generic/mman.h> | 10 | #include <uapi/asm/mman.h> |
12 | |||
13 | #define MAP_GROWSUP 0x0200 /* register stack-like segment */ | ||
14 | 11 | ||
15 | #ifdef __KERNEL__ | ||
16 | #ifndef __ASSEMBLY__ | 12 | #ifndef __ASSEMBLY__ |
17 | #define arch_mmap_check ia64_mmap_check | 13 | #define arch_mmap_check ia64_mmap_check |
18 | int ia64_mmap_check(unsigned long addr, unsigned long len, | 14 | int ia64_mmap_check(unsigned long addr, unsigned long len, |
19 | unsigned long flags); | 15 | unsigned long flags); |
20 | #endif | 16 | #endif |
21 | #endif | ||
22 | |||
23 | #endif /* _ASM_IA64_MMAN_H */ | 17 | #endif /* _ASM_IA64_MMAN_H */ |
diff --git a/arch/ia64/include/asm/module.h b/arch/ia64/include/asm/module.h index 908eaef42a0..dfba22a872c 100644 --- a/arch/ia64/include/asm/module.h +++ b/arch/ia64/include/asm/module.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ASM_IA64_MODULE_H | 1 | #ifndef _ASM_IA64_MODULE_H |
2 | #define _ASM_IA64_MODULE_H | 2 | #define _ASM_IA64_MODULE_H |
3 | 3 | ||
4 | #include <asm-generic/module.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * IA-64-specific support for kernel module loader. | 7 | * IA-64-specific support for kernel module loader. |
6 | * | 8 | * |
@@ -29,10 +31,6 @@ struct mod_arch_specific { | |||
29 | unsigned int next_got_entry; /* index of next available got entry */ | 31 | unsigned int next_got_entry; /* index of next available got entry */ |
30 | }; | 32 | }; |
31 | 33 | ||
32 | #define Elf_Shdr Elf64_Shdr | ||
33 | #define Elf_Sym Elf64_Sym | ||
34 | #define Elf_Ehdr Elf64_Ehdr | ||
35 | |||
36 | #define MODULE_PROC_FAMILY "ia64" | 34 | #define MODULE_PROC_FAMILY "ia64" |
37 | #define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY \ | 35 | #define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY \ |
38 | "gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__) | 36 | "gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__) |
diff --git a/arch/ia64/include/asm/param.h b/arch/ia64/include/asm/param.h index 0964c32c135..1295913d6a8 100644 --- a/arch/ia64/include/asm/param.h +++ b/arch/ia64/include/asm/param.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifndef _ASM_IA64_PARAM_H | ||
2 | #define _ASM_IA64_PARAM_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Fundamental kernel parameters. | 2 | * Fundamental kernel parameters. |
6 | * | 3 | * |
@@ -9,25 +6,12 @@ | |||
9 | * Modified 1998, 1999, 2002-2003 | 6 | * Modified 1998, 1999, 2002-2003 |
10 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | 7 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
11 | */ | 8 | */ |
9 | #ifndef _ASM_IA64_PARAM_H | ||
10 | #define _ASM_IA64_PARAM_H | ||
12 | 11 | ||
13 | #define EXEC_PAGESIZE 65536 | 12 | #include <uapi/asm/param.h> |
14 | |||
15 | #ifndef NOGROUP | ||
16 | # define NOGROUP (-1) | ||
17 | #endif | ||
18 | |||
19 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
20 | 13 | ||
21 | #ifdef __KERNEL__ | ||
22 | # define HZ CONFIG_HZ | 14 | # define HZ CONFIG_HZ |
23 | # define USER_HZ HZ | 15 | # define USER_HZ HZ |
24 | # define CLOCKS_PER_SEC HZ /* frequency at which times() counts */ | 16 | # define CLOCKS_PER_SEC HZ /* frequency at which times() counts */ |
25 | #else | ||
26 | /* | ||
27 | * Technically, this is wrong, but some old apps still refer to it. The proper way to | ||
28 | * get the HZ value is via sysconf(_SC_CLK_TCK). | ||
29 | */ | ||
30 | # define HZ 1024 | ||
31 | #endif | ||
32 | |||
33 | #endif /* _ASM_IA64_PARAM_H */ | 17 | #endif /* _ASM_IA64_PARAM_H */ |
diff --git a/arch/ia64/include/asm/perfmon.h b/arch/ia64/include/asm/perfmon.h index d551183fee9..15476dd3a8b 100644 --- a/arch/ia64/include/asm/perfmon.h +++ b/arch/ia64/include/asm/perfmon.h | |||
@@ -2,179 +2,12 @@ | |||
2 | * Copyright (C) 2001-2003 Hewlett-Packard Co | 2 | * Copyright (C) 2001-2003 Hewlett-Packard Co |
3 | * Stephane Eranian <eranian@hpl.hp.com> | 3 | * Stephane Eranian <eranian@hpl.hp.com> |
4 | */ | 4 | */ |
5 | |||
6 | #ifndef _ASM_IA64_PERFMON_H | 5 | #ifndef _ASM_IA64_PERFMON_H |
7 | #define _ASM_IA64_PERFMON_H | 6 | #define _ASM_IA64_PERFMON_H |
8 | 7 | ||
9 | /* | 8 | #include <uapi/asm/perfmon.h> |
10 | * perfmon commands supported on all CPU models | ||
11 | */ | ||
12 | #define PFM_WRITE_PMCS 0x01 | ||
13 | #define PFM_WRITE_PMDS 0x02 | ||
14 | #define PFM_READ_PMDS 0x03 | ||
15 | #define PFM_STOP 0x04 | ||
16 | #define PFM_START 0x05 | ||
17 | #define PFM_ENABLE 0x06 /* obsolete */ | ||
18 | #define PFM_DISABLE 0x07 /* obsolete */ | ||
19 | #define PFM_CREATE_CONTEXT 0x08 | ||
20 | #define PFM_DESTROY_CONTEXT 0x09 /* obsolete use close() */ | ||
21 | #define PFM_RESTART 0x0a | ||
22 | #define PFM_PROTECT_CONTEXT 0x0b /* obsolete */ | ||
23 | #define PFM_GET_FEATURES 0x0c | ||
24 | #define PFM_DEBUG 0x0d | ||
25 | #define PFM_UNPROTECT_CONTEXT 0x0e /* obsolete */ | ||
26 | #define PFM_GET_PMC_RESET_VAL 0x0f | ||
27 | #define PFM_LOAD_CONTEXT 0x10 | ||
28 | #define PFM_UNLOAD_CONTEXT 0x11 | ||
29 | |||
30 | /* | ||
31 | * PMU model specific commands (may not be supported on all PMU models) | ||
32 | */ | ||
33 | #define PFM_WRITE_IBRS 0x20 | ||
34 | #define PFM_WRITE_DBRS 0x21 | ||
35 | |||
36 | /* | ||
37 | * context flags | ||
38 | */ | ||
39 | #define PFM_FL_NOTIFY_BLOCK 0x01 /* block task on user level notifications */ | ||
40 | #define PFM_FL_SYSTEM_WIDE 0x02 /* create a system wide context */ | ||
41 | #define PFM_FL_OVFL_NO_MSG 0x80 /* do not post overflow/end messages for notification */ | ||
42 | |||
43 | /* | ||
44 | * event set flags | ||
45 | */ | ||
46 | #define PFM_SETFL_EXCL_IDLE 0x01 /* exclude idle task (syswide only) XXX: DO NOT USE YET */ | ||
47 | |||
48 | /* | ||
49 | * PMC flags | ||
50 | */ | ||
51 | #define PFM_REGFL_OVFL_NOTIFY 0x1 /* send notification on overflow */ | ||
52 | #define PFM_REGFL_RANDOM 0x2 /* randomize sampling interval */ | ||
53 | |||
54 | /* | ||
55 | * PMD/PMC/IBR/DBR return flags (ignored on input) | ||
56 | * | ||
57 | * Those flags are used on output and must be checked in case EAGAIN is returned | ||
58 | * by any of the calls using a pfarg_reg_t or pfarg_dbreg_t structure. | ||
59 | */ | ||
60 | #define PFM_REG_RETFL_NOTAVAIL (1UL<<31) /* set if register is implemented but not available */ | ||
61 | #define PFM_REG_RETFL_EINVAL (1UL<<30) /* set if register entry is invalid */ | ||
62 | #define PFM_REG_RETFL_MASK (PFM_REG_RETFL_NOTAVAIL|PFM_REG_RETFL_EINVAL) | ||
63 | |||
64 | #define PFM_REG_HAS_ERROR(flag) (((flag) & PFM_REG_RETFL_MASK) != 0) | ||
65 | |||
66 | typedef unsigned char pfm_uuid_t[16]; /* custom sampling buffer identifier type */ | ||
67 | |||
68 | /* | ||
69 | * Request structure used to define a context | ||
70 | */ | ||
71 | typedef struct { | ||
72 | pfm_uuid_t ctx_smpl_buf_id; /* which buffer format to use (if needed) */ | ||
73 | unsigned long ctx_flags; /* noblock/block */ | ||
74 | unsigned short ctx_nextra_sets; /* number of extra event sets (you always get 1) */ | ||
75 | unsigned short ctx_reserved1; /* for future use */ | ||
76 | int ctx_fd; /* return arg: unique identification for context */ | ||
77 | void *ctx_smpl_vaddr; /* return arg: virtual address of sampling buffer, is used */ | ||
78 | unsigned long ctx_reserved2[11];/* for future use */ | ||
79 | } pfarg_context_t; | ||
80 | |||
81 | /* | ||
82 | * Request structure used to write/read a PMC or PMD | ||
83 | */ | ||
84 | typedef struct { | ||
85 | unsigned int reg_num; /* which register */ | ||
86 | unsigned short reg_set; /* event set for this register */ | ||
87 | unsigned short reg_reserved1; /* for future use */ | ||
88 | |||
89 | unsigned long reg_value; /* initial pmc/pmd value */ | ||
90 | unsigned long reg_flags; /* input: pmc/pmd flags, return: reg error */ | ||
91 | |||
92 | unsigned long reg_long_reset; /* reset after buffer overflow notification */ | ||
93 | unsigned long reg_short_reset; /* reset after counter overflow */ | ||
94 | |||
95 | unsigned long reg_reset_pmds[4]; /* which other counters to reset on overflow */ | ||
96 | unsigned long reg_random_seed; /* seed value when randomization is used */ | ||
97 | unsigned long reg_random_mask; /* bitmask used to limit random value */ | ||
98 | unsigned long reg_last_reset_val;/* return: PMD last reset value */ | ||
99 | |||
100 | unsigned long reg_smpl_pmds[4]; /* which pmds are accessed when PMC overflows */ | ||
101 | unsigned long reg_smpl_eventid; /* opaque sampling event identifier */ | ||
102 | |||
103 | unsigned long reg_reserved2[3]; /* for future use */ | ||
104 | } pfarg_reg_t; | ||
105 | |||
106 | typedef struct { | ||
107 | unsigned int dbreg_num; /* which debug register */ | ||
108 | unsigned short dbreg_set; /* event set for this register */ | ||
109 | unsigned short dbreg_reserved1; /* for future use */ | ||
110 | unsigned long dbreg_value; /* value for debug register */ | ||
111 | unsigned long dbreg_flags; /* return: dbreg error */ | ||
112 | unsigned long dbreg_reserved2[1]; /* for future use */ | ||
113 | } pfarg_dbreg_t; | ||
114 | |||
115 | typedef struct { | ||
116 | unsigned int ft_version; /* perfmon: major [16-31], minor [0-15] */ | ||
117 | unsigned int ft_reserved; /* reserved for future use */ | ||
118 | unsigned long reserved[4]; /* for future use */ | ||
119 | } pfarg_features_t; | ||
120 | |||
121 | typedef struct { | ||
122 | pid_t load_pid; /* process to load the context into */ | ||
123 | unsigned short load_set; /* first event set to load */ | ||
124 | unsigned short load_reserved1; /* for future use */ | ||
125 | unsigned long load_reserved2[3]; /* for future use */ | ||
126 | } pfarg_load_t; | ||
127 | |||
128 | typedef struct { | ||
129 | int msg_type; /* generic message header */ | ||
130 | int msg_ctx_fd; /* generic message header */ | ||
131 | unsigned long msg_ovfl_pmds[4]; /* which PMDs overflowed */ | ||
132 | unsigned short msg_active_set; /* active set at the time of overflow */ | ||
133 | unsigned short msg_reserved1; /* for future use */ | ||
134 | unsigned int msg_reserved2; /* for future use */ | ||
135 | unsigned long msg_tstamp; /* for perf tuning/debug */ | ||
136 | } pfm_ovfl_msg_t; | ||
137 | |||
138 | typedef struct { | ||
139 | int msg_type; /* generic message header */ | ||
140 | int msg_ctx_fd; /* generic message header */ | ||
141 | unsigned long msg_tstamp; /* for perf tuning */ | ||
142 | } pfm_end_msg_t; | ||
143 | |||
144 | typedef struct { | ||
145 | int msg_type; /* type of the message */ | ||
146 | int msg_ctx_fd; /* unique identifier for the context */ | ||
147 | unsigned long msg_tstamp; /* for perf tuning */ | ||
148 | } pfm_gen_msg_t; | ||
149 | |||
150 | #define PFM_MSG_OVFL 1 /* an overflow happened */ | ||
151 | #define PFM_MSG_END 2 /* task to which context was attached ended */ | ||
152 | |||
153 | typedef union { | ||
154 | pfm_ovfl_msg_t pfm_ovfl_msg; | ||
155 | pfm_end_msg_t pfm_end_msg; | ||
156 | pfm_gen_msg_t pfm_gen_msg; | ||
157 | } pfm_msg_t; | ||
158 | |||
159 | /* | ||
160 | * Define the version numbers for both perfmon as a whole and the sampling buffer format. | ||
161 | */ | ||
162 | #define PFM_VERSION_MAJ 2U | ||
163 | #define PFM_VERSION_MIN 0U | ||
164 | #define PFM_VERSION (((PFM_VERSION_MAJ&0xffff)<<16)|(PFM_VERSION_MIN & 0xffff)) | ||
165 | #define PFM_VERSION_MAJOR(x) (((x)>>16) & 0xffff) | ||
166 | #define PFM_VERSION_MINOR(x) ((x) & 0xffff) | ||
167 | 9 | ||
168 | 10 | ||
169 | /* | ||
170 | * miscellaneous architected definitions | ||
171 | */ | ||
172 | #define PMU_FIRST_COUNTER 4 /* first counting monitor (PMC/PMD) */ | ||
173 | #define PMU_MAX_PMCS 256 /* maximum architected number of PMC registers */ | ||
174 | #define PMU_MAX_PMDS 256 /* maximum architected number of PMD registers */ | ||
175 | |||
176 | #ifdef __KERNEL__ | ||
177 | |||
178 | extern long perfmonctl(int fd, int cmd, void *arg, int narg); | 11 | extern long perfmonctl(int fd, int cmd, void *arg, int narg); |
179 | 12 | ||
180 | typedef struct { | 13 | typedef struct { |
@@ -274,6 +107,4 @@ typedef struct { | |||
274 | extern pfm_sysctl_t pfm_sysctl; | 107 | extern pfm_sysctl_t pfm_sysctl; |
275 | 108 | ||
276 | 109 | ||
277 | #endif /* __KERNEL__ */ | ||
278 | |||
279 | #endif /* _ASM_IA64_PERFMON_H */ | 110 | #endif /* _ASM_IA64_PERFMON_H */ |
diff --git a/arch/ia64/include/asm/ptrace.h b/arch/ia64/include/asm/ptrace.h index 68c98f5b3ca..b0e973649cb 100644 --- a/arch/ia64/include/asm/ptrace.h +++ b/arch/ia64/include/asm/ptrace.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifndef _ASM_IA64_PTRACE_H | ||
2 | #define _ASM_IA64_PTRACE_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Copyright (C) 1998-2004 Hewlett-Packard Co | 2 | * Copyright (C) 1998-2004 Hewlett-Packard Co |
6 | * David Mosberger-Tang <davidm@hpl.hp.com> | 3 | * David Mosberger-Tang <davidm@hpl.hp.com> |
@@ -15,52 +12,13 @@ | |||
15 | * 6/17/99 D. Mosberger added second unat member to "struct switch_stack" | 12 | * 6/17/99 D. Mosberger added second unat member to "struct switch_stack" |
16 | * | 13 | * |
17 | */ | 14 | */ |
18 | /* | 15 | #ifndef _ASM_IA64_PTRACE_H |
19 | * When a user process is blocked, its state looks as follows: | 16 | #define _ASM_IA64_PTRACE_H |
20 | * | ||
21 | * +----------------------+ ------- IA64_STK_OFFSET | ||
22 | * | | ^ | ||
23 | * | struct pt_regs | | | ||
24 | * | | | | ||
25 | * +----------------------+ | | ||
26 | * | | | | ||
27 | * | memory stack | | | ||
28 | * | (growing downwards) | | | ||
29 | * //.....................// | | ||
30 | * | | ||
31 | * //.....................// | | ||
32 | * | | | | ||
33 | * +----------------------+ | | ||
34 | * | struct switch_stack | | | ||
35 | * | | | | ||
36 | * +----------------------+ | | ||
37 | * | | | | ||
38 | * //.....................// | | ||
39 | * | | ||
40 | * //.....................// | | ||
41 | * | | | | ||
42 | * | register stack | | | ||
43 | * | (growing upwards) | | | ||
44 | * | | | | ||
45 | * +----------------------+ | --- IA64_RBS_OFFSET | ||
46 | * | struct thread_info | | ^ | ||
47 | * +----------------------+ | | | ||
48 | * | | | | | ||
49 | * | struct task_struct | | | | ||
50 | * current -> | | | | | ||
51 | * +----------------------+ ------- | ||
52 | * | ||
53 | * Note that ar.ec is not saved explicitly in pt_reg or switch_stack. | ||
54 | * This is because ar.ec is saved as part of ar.pfs. | ||
55 | */ | ||
56 | |||
57 | |||
58 | #include <asm/fpu.h> | ||
59 | 17 | ||
60 | #ifdef __KERNEL__ | ||
61 | #ifndef ASM_OFFSETS_C | 18 | #ifndef ASM_OFFSETS_C |
62 | #include <asm/asm-offsets.h> | 19 | #include <asm/asm-offsets.h> |
63 | #endif | 20 | #endif |
21 | #include <uapi/asm/ptrace.h> | ||
64 | 22 | ||
65 | /* | 23 | /* |
66 | * Base-2 logarithm of number of pages to allocate per task structure | 24 | * Base-2 logarithm of number of pages to allocate per task structure |
@@ -81,155 +39,8 @@ | |||
81 | 39 | ||
82 | #define KERNEL_STACK_SIZE IA64_STK_OFFSET | 40 | #define KERNEL_STACK_SIZE IA64_STK_OFFSET |
83 | 41 | ||
84 | #endif /* __KERNEL__ */ | ||
85 | |||
86 | #ifndef __ASSEMBLY__ | 42 | #ifndef __ASSEMBLY__ |
87 | 43 | ||
88 | /* | ||
89 | * This struct defines the way the registers are saved on system | ||
90 | * calls. | ||
91 | * | ||
92 | * We don't save all floating point register because the kernel | ||
93 | * is compiled to use only a very small subset, so the other are | ||
94 | * untouched. | ||
95 | * | ||
96 | * THIS STRUCTURE MUST BE A MULTIPLE 16-BYTE IN SIZE | ||
97 | * (because the memory stack pointer MUST ALWAYS be aligned this way) | ||
98 | * | ||
99 | */ | ||
100 | struct pt_regs { | ||
101 | /* The following registers are saved by SAVE_MIN: */ | ||
102 | unsigned long b6; /* scratch */ | ||
103 | unsigned long b7; /* scratch */ | ||
104 | |||
105 | unsigned long ar_csd; /* used by cmp8xchg16 (scratch) */ | ||
106 | unsigned long ar_ssd; /* reserved for future use (scratch) */ | ||
107 | |||
108 | unsigned long r8; /* scratch (return value register 0) */ | ||
109 | unsigned long r9; /* scratch (return value register 1) */ | ||
110 | unsigned long r10; /* scratch (return value register 2) */ | ||
111 | unsigned long r11; /* scratch (return value register 3) */ | ||
112 | |||
113 | unsigned long cr_ipsr; /* interrupted task's psr */ | ||
114 | unsigned long cr_iip; /* interrupted task's instruction pointer */ | ||
115 | /* | ||
116 | * interrupted task's function state; if bit 63 is cleared, it | ||
117 | * contains syscall's ar.pfs.pfm: | ||
118 | */ | ||
119 | unsigned long cr_ifs; | ||
120 | |||
121 | unsigned long ar_unat; /* interrupted task's NaT register (preserved) */ | ||
122 | unsigned long ar_pfs; /* prev function state */ | ||
123 | unsigned long ar_rsc; /* RSE configuration */ | ||
124 | /* The following two are valid only if cr_ipsr.cpl > 0 || ti->flags & _TIF_MCA_INIT */ | ||
125 | unsigned long ar_rnat; /* RSE NaT */ | ||
126 | unsigned long ar_bspstore; /* RSE bspstore */ | ||
127 | |||
128 | unsigned long pr; /* 64 predicate registers (1 bit each) */ | ||
129 | unsigned long b0; /* return pointer (bp) */ | ||
130 | unsigned long loadrs; /* size of dirty partition << 16 */ | ||
131 | |||
132 | unsigned long r1; /* the gp pointer */ | ||
133 | unsigned long r12; /* interrupted task's memory stack pointer */ | ||
134 | unsigned long r13; /* thread pointer */ | ||
135 | |||
136 | unsigned long ar_fpsr; /* floating point status (preserved) */ | ||
137 | unsigned long r15; /* scratch */ | ||
138 | |||
139 | /* The remaining registers are NOT saved for system calls. */ | ||
140 | |||
141 | unsigned long r14; /* scratch */ | ||
142 | unsigned long r2; /* scratch */ | ||
143 | unsigned long r3; /* scratch */ | ||
144 | |||
145 | /* The following registers are saved by SAVE_REST: */ | ||
146 | unsigned long r16; /* scratch */ | ||
147 | unsigned long r17; /* scratch */ | ||
148 | unsigned long r18; /* scratch */ | ||
149 | unsigned long r19; /* scratch */ | ||
150 | unsigned long r20; /* scratch */ | ||
151 | unsigned long r21; /* scratch */ | ||
152 | unsigned long r22; /* scratch */ | ||
153 | unsigned long r23; /* scratch */ | ||
154 | unsigned long r24; /* scratch */ | ||
155 | unsigned long r25; /* scratch */ | ||
156 | unsigned long r26; /* scratch */ | ||
157 | unsigned long r27; /* scratch */ | ||
158 | unsigned long r28; /* scratch */ | ||
159 | unsigned long r29; /* scratch */ | ||
160 | unsigned long r30; /* scratch */ | ||
161 | unsigned long r31; /* scratch */ | ||
162 | |||
163 | unsigned long ar_ccv; /* compare/exchange value (scratch) */ | ||
164 | |||
165 | /* | ||
166 | * Floating point registers that the kernel considers scratch: | ||
167 | */ | ||
168 | struct ia64_fpreg f6; /* scratch */ | ||
169 | struct ia64_fpreg f7; /* scratch */ | ||
170 | struct ia64_fpreg f8; /* scratch */ | ||
171 | struct ia64_fpreg f9; /* scratch */ | ||
172 | struct ia64_fpreg f10; /* scratch */ | ||
173 | struct ia64_fpreg f11; /* scratch */ | ||
174 | }; | ||
175 | |||
176 | /* | ||
177 | * This structure contains the addition registers that need to | ||
178 | * preserved across a context switch. This generally consists of | ||
179 | * "preserved" registers. | ||
180 | */ | ||
181 | struct switch_stack { | ||
182 | unsigned long caller_unat; /* user NaT collection register (preserved) */ | ||
183 | unsigned long ar_fpsr; /* floating-point status register */ | ||
184 | |||
185 | struct ia64_fpreg f2; /* preserved */ | ||
186 | struct ia64_fpreg f3; /* preserved */ | ||
187 | struct ia64_fpreg f4; /* preserved */ | ||
188 | struct ia64_fpreg f5; /* preserved */ | ||
189 | |||
190 | struct ia64_fpreg f12; /* scratch, but untouched by kernel */ | ||
191 | struct ia64_fpreg f13; /* scratch, but untouched by kernel */ | ||
192 | struct ia64_fpreg f14; /* scratch, but untouched by kernel */ | ||
193 | struct ia64_fpreg f15; /* scratch, but untouched by kernel */ | ||
194 | struct ia64_fpreg f16; /* preserved */ | ||
195 | struct ia64_fpreg f17; /* preserved */ | ||
196 | struct ia64_fpreg f18; /* preserved */ | ||
197 | struct ia64_fpreg f19; /* preserved */ | ||
198 | struct ia64_fpreg f20; /* preserved */ | ||
199 | struct ia64_fpreg f21; /* preserved */ | ||
200 | struct ia64_fpreg f22; /* preserved */ | ||
201 | struct ia64_fpreg f23; /* preserved */ | ||
202 | struct ia64_fpreg f24; /* preserved */ | ||
203 | struct ia64_fpreg f25; /* preserved */ | ||
204 | struct ia64_fpreg f26; /* preserved */ | ||
205 | struct ia64_fpreg f27; /* preserved */ | ||
206 | struct ia64_fpreg f28; /* preserved */ | ||
207 | struct ia64_fpreg f29; /* preserved */ | ||
208 | struct ia64_fpreg f30; /* preserved */ | ||
209 | struct ia64_fpreg f31; /* preserved */ | ||
210 | |||
211 | unsigned long r4; /* preserved */ | ||
212 | unsigned long r5; /* preserved */ | ||
213 | unsigned long r6; /* preserved */ | ||
214 | unsigned long r7; /* preserved */ | ||
215 | |||
216 | unsigned long b0; /* so we can force a direct return in copy_thread */ | ||
217 | unsigned long b1; | ||
218 | unsigned long b2; | ||
219 | unsigned long b3; | ||
220 | unsigned long b4; | ||
221 | unsigned long b5; | ||
222 | |||
223 | unsigned long ar_pfs; /* previous function state */ | ||
224 | unsigned long ar_lc; /* loop counter (preserved) */ | ||
225 | unsigned long ar_unat; /* NaT bits for r4-r7 */ | ||
226 | unsigned long ar_rnat; /* RSE NaT collection register */ | ||
227 | unsigned long ar_bspstore; /* RSE dirty base (preserved) */ | ||
228 | unsigned long pr; /* 64 predicate registers (1 bit each) */ | ||
229 | }; | ||
230 | |||
231 | #ifdef __KERNEL__ | ||
232 | |||
233 | #include <asm/current.h> | 44 | #include <asm/current.h> |
234 | #include <asm/page.h> | 45 | #include <asm/page.h> |
235 | 46 | ||
@@ -331,46 +142,5 @@ static inline long regs_return_value(struct pt_regs *regs) | |||
331 | #define arch_has_single_step() (1) | 142 | #define arch_has_single_step() (1) |
332 | #define arch_has_block_step() (1) | 143 | #define arch_has_block_step() (1) |
333 | 144 | ||
334 | #endif /* !__KERNEL__ */ | ||
335 | |||
336 | /* pt_all_user_regs is used for PTRACE_GETREGS PTRACE_SETREGS */ | ||
337 | struct pt_all_user_regs { | ||
338 | unsigned long nat; | ||
339 | unsigned long cr_iip; | ||
340 | unsigned long cfm; | ||
341 | unsigned long cr_ipsr; | ||
342 | unsigned long pr; | ||
343 | |||
344 | unsigned long gr[32]; | ||
345 | unsigned long br[8]; | ||
346 | unsigned long ar[128]; | ||
347 | struct ia64_fpreg fr[128]; | ||
348 | }; | ||
349 | |||
350 | #endif /* !__ASSEMBLY__ */ | 145 | #endif /* !__ASSEMBLY__ */ |
351 | |||
352 | /* indices to application-registers array in pt_all_user_regs */ | ||
353 | #define PT_AUR_RSC 16 | ||
354 | #define PT_AUR_BSP 17 | ||
355 | #define PT_AUR_BSPSTORE 18 | ||
356 | #define PT_AUR_RNAT 19 | ||
357 | #define PT_AUR_CCV 32 | ||
358 | #define PT_AUR_UNAT 36 | ||
359 | #define PT_AUR_FPSR 40 | ||
360 | #define PT_AUR_PFS 64 | ||
361 | #define PT_AUR_LC 65 | ||
362 | #define PT_AUR_EC 66 | ||
363 | |||
364 | /* | ||
365 | * The numbers chosen here are somewhat arbitrary but absolutely MUST | ||
366 | * not overlap with any of the number assigned in <linux/ptrace.h>. | ||
367 | */ | ||
368 | #define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */ | ||
369 | #define PTRACE_OLD_GETSIGINFO 13 /* (replaced by PTRACE_GETSIGINFO in <linux/ptrace.h>) */ | ||
370 | #define PTRACE_OLD_SETSIGINFO 14 /* (replaced by PTRACE_SETSIGINFO in <linux/ptrace.h>) */ | ||
371 | #define PTRACE_GETREGS 18 /* get all registers (pt_all_user_regs) in one shot */ | ||
372 | #define PTRACE_SETREGS 19 /* set all registers (pt_all_user_regs) in one shot */ | ||
373 | |||
374 | #define PTRACE_OLDSETOPTIONS 21 | ||
375 | |||
376 | #endif /* _ASM_IA64_PTRACE_H */ | 146 | #endif /* _ASM_IA64_PTRACE_H */ |
diff --git a/arch/ia64/include/asm/siginfo.h b/arch/ia64/include/asm/siginfo.h index c8fcaa2ac48..6f2e2dd0f28 100644 --- a/arch/ia64/include/asm/siginfo.h +++ b/arch/ia64/include/asm/siginfo.h | |||
@@ -1,124 +1,14 @@ | |||
1 | #ifndef _ASM_IA64_SIGINFO_H | ||
2 | #define _ASM_IA64_SIGINFO_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Based on <asm-i386/siginfo.h>. | 2 | * Based on <asm-i386/siginfo.h>. |
6 | * | 3 | * |
7 | * Modified 1998-2002 | 4 | * Modified 1998-2002 |
8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | 5 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
9 | */ | 6 | */ |
7 | #ifndef _ASM_IA64_SIGINFO_H | ||
8 | #define _ASM_IA64_SIGINFO_H | ||
10 | 9 | ||
11 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | ||
12 | |||
13 | #define HAVE_ARCH_SIGINFO_T | ||
14 | #define HAVE_ARCH_COPY_SIGINFO | ||
15 | #define HAVE_ARCH_COPY_SIGINFO_TO_USER | ||
16 | |||
17 | #include <asm-generic/siginfo.h> | ||
18 | |||
19 | typedef struct siginfo { | ||
20 | int si_signo; | ||
21 | int si_errno; | ||
22 | int si_code; | ||
23 | int __pad0; | ||
24 | |||
25 | union { | ||
26 | int _pad[SI_PAD_SIZE]; | ||
27 | |||
28 | /* kill() */ | ||
29 | struct { | ||
30 | pid_t _pid; /* sender's pid */ | ||
31 | uid_t _uid; /* sender's uid */ | ||
32 | } _kill; | ||
33 | |||
34 | /* POSIX.1b timers */ | ||
35 | struct { | ||
36 | timer_t _tid; /* timer id */ | ||
37 | int _overrun; /* overrun count */ | ||
38 | char _pad[sizeof(__ARCH_SI_UID_T) - sizeof(int)]; | ||
39 | sigval_t _sigval; /* must overlay ._rt._sigval! */ | ||
40 | int _sys_private; /* not to be passed to user */ | ||
41 | } _timer; | ||
42 | |||
43 | /* POSIX.1b signals */ | ||
44 | struct { | ||
45 | pid_t _pid; /* sender's pid */ | ||
46 | uid_t _uid; /* sender's uid */ | ||
47 | sigval_t _sigval; | ||
48 | } _rt; | ||
49 | |||
50 | /* SIGCHLD */ | ||
51 | struct { | ||
52 | pid_t _pid; /* which child */ | ||
53 | uid_t _uid; /* sender's uid */ | ||
54 | int _status; /* exit code */ | ||
55 | clock_t _utime; | ||
56 | clock_t _stime; | ||
57 | } _sigchld; | ||
58 | |||
59 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ | ||
60 | struct { | ||
61 | void __user *_addr; /* faulting insn/memory ref. */ | ||
62 | int _imm; /* immediate value for "break" */ | ||
63 | unsigned int _flags; /* see below */ | ||
64 | unsigned long _isr; /* isr */ | ||
65 | short _addr_lsb; /* lsb of faulting address */ | ||
66 | } _sigfault; | ||
67 | |||
68 | /* SIGPOLL */ | ||
69 | struct { | ||
70 | long _band; /* POLL_IN, POLL_OUT, POLL_MSG (XPG requires a "long") */ | ||
71 | int _fd; | ||
72 | } _sigpoll; | ||
73 | } _sifields; | ||
74 | } siginfo_t; | ||
75 | |||
76 | #define si_imm _sifields._sigfault._imm /* as per UNIX SysV ABI spec */ | ||
77 | #define si_flags _sifields._sigfault._flags | ||
78 | /* | ||
79 | * si_isr is valid for SIGILL, SIGFPE, SIGSEGV, SIGBUS, and SIGTRAP provided that | ||
80 | * si_code is non-zero and __ISR_VALID is set in si_flags. | ||
81 | */ | ||
82 | #define si_isr _sifields._sigfault._isr | ||
83 | |||
84 | /* | ||
85 | * Flag values for si_flags: | ||
86 | */ | ||
87 | #define __ISR_VALID_BIT 0 | ||
88 | #define __ISR_VALID (1 << __ISR_VALID_BIT) | ||
89 | |||
90 | /* | ||
91 | * SIGILL si_codes | ||
92 | */ | ||
93 | #define ILL_BADIADDR (__SI_FAULT|9) /* unimplemented instruction address */ | ||
94 | #define __ILL_BREAK (__SI_FAULT|10) /* illegal break */ | ||
95 | #define __ILL_BNDMOD (__SI_FAULT|11) /* bundle-update (modification) in progress */ | ||
96 | #undef NSIGILL | ||
97 | #define NSIGILL 11 | ||
98 | |||
99 | /* | ||
100 | * SIGFPE si_codes | ||
101 | */ | ||
102 | #define __FPE_DECOVF (__SI_FAULT|9) /* decimal overflow */ | ||
103 | #define __FPE_DECDIV (__SI_FAULT|10) /* decimal division by zero */ | ||
104 | #define __FPE_DECERR (__SI_FAULT|11) /* packed decimal error */ | ||
105 | #define __FPE_INVASC (__SI_FAULT|12) /* invalid ASCII digit */ | ||
106 | #define __FPE_INVDEC (__SI_FAULT|13) /* invalid decimal digit */ | ||
107 | #undef NSIGFPE | ||
108 | #define NSIGFPE 13 | ||
109 | |||
110 | /* | ||
111 | * SIGSEGV si_codes | ||
112 | */ | ||
113 | #define __SEGV_PSTKOVF (__SI_FAULT|3) /* paragraph stack overflow */ | ||
114 | #undef NSIGSEGV | ||
115 | #define NSIGSEGV 3 | ||
116 | |||
117 | #undef NSIGTRAP | ||
118 | #define NSIGTRAP 4 | ||
119 | |||
120 | #ifdef __KERNEL__ | ||
121 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <uapi/asm/siginfo.h> | ||
122 | 12 | ||
123 | static inline void | 13 | static inline void |
124 | copy_siginfo (siginfo_t *to, siginfo_t *from) | 14 | copy_siginfo (siginfo_t *to, siginfo_t *from) |
@@ -130,6 +20,4 @@ copy_siginfo (siginfo_t *to, siginfo_t *from) | |||
130 | memcpy(to, from, 4*sizeof(int) + sizeof(from->_sifields._sigchld)); | 20 | memcpy(to, from, 4*sizeof(int) + sizeof(from->_sifields._sigchld)); |
131 | } | 21 | } |
132 | 22 | ||
133 | #endif /* __KERNEL__ */ | ||
134 | |||
135 | #endif /* _ASM_IA64_SIGINFO_H */ | 23 | #endif /* _ASM_IA64_SIGINFO_H */ |
diff --git a/arch/ia64/include/asm/signal.h b/arch/ia64/include/asm/signal.h index b166248d49a..aecda5b9eb4 100644 --- a/arch/ia64/include/asm/signal.h +++ b/arch/ia64/include/asm/signal.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifndef _ASM_IA64_SIGNAL_H | ||
2 | #define _ASM_IA64_SIGNAL_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Modified 1998-2001, 2003 | 2 | * Modified 1998-2001, 2003 |
6 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | 3 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
@@ -8,129 +5,18 @@ | |||
8 | * Unfortunately, this file is being included by bits/signal.h in | 5 | * Unfortunately, this file is being included by bits/signal.h in |
9 | * glibc-2.x. Hence the #ifdef __KERNEL__ ugliness. | 6 | * glibc-2.x. Hence the #ifdef __KERNEL__ ugliness. |
10 | */ | 7 | */ |
8 | #ifndef _ASM_IA64_SIGNAL_H | ||
9 | #define _ASM_IA64_SIGNAL_H | ||
11 | 10 | ||
12 | #define SIGHUP 1 | 11 | #include <uapi/asm/signal.h> |
13 | #define SIGINT 2 | ||
14 | #define SIGQUIT 3 | ||
15 | #define SIGILL 4 | ||
16 | #define SIGTRAP 5 | ||
17 | #define SIGABRT 6 | ||
18 | #define SIGIOT 6 | ||
19 | #define SIGBUS 7 | ||
20 | #define SIGFPE 8 | ||
21 | #define SIGKILL 9 | ||
22 | #define SIGUSR1 10 | ||
23 | #define SIGSEGV 11 | ||
24 | #define SIGUSR2 12 | ||
25 | #define SIGPIPE 13 | ||
26 | #define SIGALRM 14 | ||
27 | #define SIGTERM 15 | ||
28 | #define SIGSTKFLT 16 | ||
29 | #define SIGCHLD 17 | ||
30 | #define SIGCONT 18 | ||
31 | #define SIGSTOP 19 | ||
32 | #define SIGTSTP 20 | ||
33 | #define SIGTTIN 21 | ||
34 | #define SIGTTOU 22 | ||
35 | #define SIGURG 23 | ||
36 | #define SIGXCPU 24 | ||
37 | #define SIGXFSZ 25 | ||
38 | #define SIGVTALRM 26 | ||
39 | #define SIGPROF 27 | ||
40 | #define SIGWINCH 28 | ||
41 | #define SIGIO 29 | ||
42 | #define SIGPOLL SIGIO | ||
43 | /* | ||
44 | #define SIGLOST 29 | ||
45 | */ | ||
46 | #define SIGPWR 30 | ||
47 | #define SIGSYS 31 | ||
48 | /* signal 31 is no longer "unused", but the SIGUNUSED macro remains for backwards compatibility */ | ||
49 | #define SIGUNUSED 31 | ||
50 | |||
51 | /* These should not be considered constants from userland. */ | ||
52 | #define SIGRTMIN 32 | ||
53 | #define SIGRTMAX _NSIG | ||
54 | |||
55 | /* | ||
56 | * SA_FLAGS values: | ||
57 | * | ||
58 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
59 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
60 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
61 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
62 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
63 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
64 | * | ||
65 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
66 | * Unix names RESETHAND and NODEFER respectively. | ||
67 | */ | ||
68 | #define SA_NOCLDSTOP 0x00000001 | ||
69 | #define SA_NOCLDWAIT 0x00000002 | ||
70 | #define SA_SIGINFO 0x00000004 | ||
71 | #define SA_ONSTACK 0x08000000 | ||
72 | #define SA_RESTART 0x10000000 | ||
73 | #define SA_NODEFER 0x40000000 | ||
74 | #define SA_RESETHAND 0x80000000 | ||
75 | |||
76 | #define SA_NOMASK SA_NODEFER | ||
77 | #define SA_ONESHOT SA_RESETHAND | ||
78 | |||
79 | #define SA_RESTORER 0x04000000 | ||
80 | |||
81 | /* | ||
82 | * sigaltstack controls | ||
83 | */ | ||
84 | #define SS_ONSTACK 1 | ||
85 | #define SS_DISABLE 2 | ||
86 | |||
87 | /* | ||
88 | * The minimum stack size needs to be fairly large because we want to | ||
89 | * be sure that an app compiled for today's CPUs will continue to run | ||
90 | * on all future CPU models. The CPU model matters because the signal | ||
91 | * frame needs to have space for the complete machine state, including | ||
92 | * all physical stacked registers. The number of physical stacked | ||
93 | * registers is CPU model dependent, but given that the width of | ||
94 | * ar.rsc.loadrs is 14 bits, we can assume that they'll never take up | ||
95 | * more than 16KB of space. | ||
96 | */ | ||
97 | #if 1 | ||
98 | /* | ||
99 | * This is a stupid typo: the value was _meant_ to be 131072 (0x20000), but I typed it | ||
100 | * in wrong. ;-( To preserve backwards compatibility, we leave the kernel at the | ||
101 | * incorrect value and fix libc only. | ||
102 | */ | ||
103 | # define MINSIGSTKSZ 131027 /* min. stack size for sigaltstack() */ | ||
104 | #else | ||
105 | # define MINSIGSTKSZ 131072 /* min. stack size for sigaltstack() */ | ||
106 | #endif | ||
107 | #define SIGSTKSZ 262144 /* default stack size for sigaltstack() */ | ||
108 | 12 | ||
109 | #ifdef __KERNEL__ | ||
110 | 13 | ||
111 | #define _NSIG 64 | 14 | #define _NSIG 64 |
112 | #define _NSIG_BPW 64 | 15 | #define _NSIG_BPW 64 |
113 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | 16 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) |
114 | 17 | ||
115 | #endif /* __KERNEL__ */ | ||
116 | |||
117 | #include <asm-generic/signal-defs.h> | ||
118 | |||
119 | # ifndef __ASSEMBLY__ | 18 | # ifndef __ASSEMBLY__ |
120 | 19 | ||
121 | # include <linux/types.h> | ||
122 | |||
123 | /* Avoid too many header ordering problems. */ | ||
124 | struct siginfo; | ||
125 | |||
126 | typedef struct sigaltstack { | ||
127 | void __user *ss_sp; | ||
128 | int ss_flags; | ||
129 | size_t ss_size; | ||
130 | } stack_t; | ||
131 | |||
132 | #ifdef __KERNEL__ | ||
133 | |||
134 | /* Most things should be clean enough to redefine this at will, if care | 20 | /* Most things should be clean enough to redefine this at will, if care |
135 | is taken to make libc match. */ | 21 | is taken to make libc match. */ |
136 | 22 | ||
@@ -154,7 +40,5 @@ struct k_sigaction { | |||
154 | 40 | ||
155 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | 41 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
156 | 42 | ||
157 | #endif /* __KERNEL__ */ | ||
158 | |||
159 | # endif /* !__ASSEMBLY__ */ | 43 | # endif /* !__ASSEMBLY__ */ |
160 | #endif /* _ASM_IA64_SIGNAL_H */ | 44 | #endif /* _ASM_IA64_SIGNAL_H */ |
diff --git a/arch/ia64/include/asm/termios.h b/arch/ia64/include/asm/termios.h index 689d218c0c2..a42f870ca4f 100644 --- a/arch/ia64/include/asm/termios.h +++ b/arch/ia64/include/asm/termios.h | |||
@@ -1,52 +1,14 @@ | |||
1 | #ifndef _ASM_IA64_TERMIOS_H | ||
2 | #define _ASM_IA64_TERMIOS_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Modified 1999 | 2 | * Modified 1999 |
6 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | 3 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
7 | * | 4 | * |
8 | * 99/01/28 Added N_IRDA and N_SMSBLOCK | 5 | * 99/01/28 Added N_IRDA and N_SMSBLOCK |
9 | */ | 6 | */ |
7 | #ifndef _ASM_IA64_TERMIOS_H | ||
8 | #define _ASM_IA64_TERMIOS_H | ||
10 | 9 | ||
11 | #include <asm/termbits.h> | 10 | #include <uapi/asm/termios.h> |
12 | #include <asm/ioctls.h> | ||
13 | |||
14 | struct winsize { | ||
15 | unsigned short ws_row; | ||
16 | unsigned short ws_col; | ||
17 | unsigned short ws_xpixel; | ||
18 | unsigned short ws_ypixel; | ||
19 | }; | ||
20 | |||
21 | #define NCC 8 | ||
22 | struct termio { | ||
23 | unsigned short c_iflag; /* input mode flags */ | ||
24 | unsigned short c_oflag; /* output mode flags */ | ||
25 | unsigned short c_cflag; /* control mode flags */ | ||
26 | unsigned short c_lflag; /* local mode flags */ | ||
27 | unsigned char c_line; /* line discipline */ | ||
28 | unsigned char c_cc[NCC]; /* control characters */ | ||
29 | }; | ||
30 | |||
31 | /* modem lines */ | ||
32 | #define TIOCM_LE 0x001 | ||
33 | #define TIOCM_DTR 0x002 | ||
34 | #define TIOCM_RTS 0x004 | ||
35 | #define TIOCM_ST 0x008 | ||
36 | #define TIOCM_SR 0x010 | ||
37 | #define TIOCM_CTS 0x020 | ||
38 | #define TIOCM_CAR 0x040 | ||
39 | #define TIOCM_RNG 0x080 | ||
40 | #define TIOCM_DSR 0x100 | ||
41 | #define TIOCM_CD TIOCM_CAR | ||
42 | #define TIOCM_RI TIOCM_RNG | ||
43 | #define TIOCM_OUT1 0x2000 | ||
44 | #define TIOCM_OUT2 0x4000 | ||
45 | #define TIOCM_LOOP 0x8000 | ||
46 | |||
47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
48 | 11 | ||
49 | # ifdef __KERNEL__ | ||
50 | 12 | ||
51 | /* intr=^C quit=^\ erase=del kill=^U | 13 | /* intr=^C quit=^\ erase=del kill=^U |
52 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | 14 | eof=^D vtime=\0 vmin=\1 sxtc=\0 |
@@ -92,6 +54,4 @@ struct termio { | |||
92 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | 54 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) |
93 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | 55 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) |
94 | 56 | ||
95 | # endif /* __KERNEL__ */ | ||
96 | |||
97 | #endif /* _ASM_IA64_TERMIOS_H */ | 57 | #endif /* _ASM_IA64_TERMIOS_H */ |
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h index f7ee8537831..ff2ae413658 100644 --- a/arch/ia64/include/asm/thread_info.h +++ b/arch/ia64/include/asm/thread_info.h | |||
@@ -106,7 +106,6 @@ struct thread_info { | |||
106 | #define TIF_SYSCALL_AUDIT 3 /* syscall auditing active */ | 106 | #define TIF_SYSCALL_AUDIT 3 /* syscall auditing active */ |
107 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ | 107 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ |
108 | #define TIF_NOTIFY_RESUME 6 /* resumption notification requested */ | 108 | #define TIF_NOTIFY_RESUME 6 /* resumption notification requested */ |
109 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | ||
110 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ | 109 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ |
111 | #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ | 110 | #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ |
112 | #define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */ | 111 | #define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */ |
@@ -119,7 +118,6 @@ struct thread_info { | |||
119 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 118 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
120 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 119 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
121 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 120 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
122 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | ||
123 | #define _TIF_MCA_INIT (1 << TIF_MCA_INIT) | 121 | #define _TIF_MCA_INIT (1 << TIF_MCA_INIT) |
124 | #define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED) | 122 | #define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED) |
125 | #define _TIF_RESTORE_RSE (1 << TIF_RESTORE_RSE) | 123 | #define _TIF_RESTORE_RSE (1 << TIF_RESTORE_RSE) |
diff --git a/arch/ia64/include/asm/types.h b/arch/ia64/include/asm/types.h index 3f5b122d997..4c351b169da 100644 --- a/arch/ia64/include/asm/types.h +++ b/arch/ia64/include/asm/types.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifndef _ASM_IA64_TYPES_H | ||
2 | #define _ASM_IA64_TYPES_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * This file is never included by application software unless explicitly | 2 | * This file is never included by application software unless explicitly |
6 | * requested (e.g., via linux/types.h) in which case the application is | 3 | * requested (e.g., via linux/types.h) in which case the application is |
@@ -13,32 +10,22 @@ | |||
13 | * Modified 1998-2000, 2002 | 10 | * Modified 1998-2000, 2002 |
14 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | 11 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
15 | */ | 12 | */ |
13 | #ifndef _ASM_IA64_TYPES_H | ||
14 | #define _ASM_IA64_TYPES_H | ||
16 | 15 | ||
17 | #ifdef __KERNEL__ | ||
18 | #include <asm-generic/int-ll64.h> | 16 | #include <asm-generic/int-ll64.h> |
19 | #else | 17 | #include <uapi/asm/types.h> |
20 | #include <asm-generic/int-l64.h> | ||
21 | #endif | ||
22 | 18 | ||
23 | #ifdef __ASSEMBLY__ | 19 | #ifdef __ASSEMBLY__ |
24 | # define __IA64_UL(x) (x) | ||
25 | # define __IA64_UL_CONST(x) x | ||
26 | |||
27 | #else | 20 | #else |
28 | # define __IA64_UL(x) ((unsigned long)(x)) | ||
29 | # define __IA64_UL_CONST(x) x##UL | ||
30 | |||
31 | /* | 21 | /* |
32 | * These aren't exported outside the kernel to avoid name space clashes | 22 | * These aren't exported outside the kernel to avoid name space clashes |
33 | */ | 23 | */ |
34 | # ifdef __KERNEL__ | ||
35 | 24 | ||
36 | struct fnptr { | 25 | struct fnptr { |
37 | unsigned long ip; | 26 | unsigned long ip; |
38 | unsigned long gp; | 27 | unsigned long gp; |
39 | }; | 28 | }; |
40 | 29 | ||
41 | # endif /* __KERNEL__ */ | ||
42 | #endif /* !__ASSEMBLY__ */ | 30 | #endif /* !__ASSEMBLY__ */ |
43 | |||
44 | #endif /* _ASM_IA64_TYPES_H */ | 31 | #endif /* _ASM_IA64_TYPES_H */ |
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h index 7a3bd252494..8b3ff2f5b86 100644 --- a/arch/ia64/include/asm/unistd.h +++ b/arch/ia64/include/asm/unistd.h | |||
@@ -1,331 +1,14 @@ | |||
1 | #ifndef _ASM_IA64_UNISTD_H | ||
2 | #define _ASM_IA64_UNISTD_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * IA-64 Linux syscall numbers and inline-functions. | 2 | * IA-64 Linux syscall numbers and inline-functions. |
6 | * | 3 | * |
7 | * Copyright (C) 1998-2005 Hewlett-Packard Co | 4 | * Copyright (C) 1998-2005 Hewlett-Packard Co |
8 | * David Mosberger-Tang <davidm@hpl.hp.com> | 5 | * David Mosberger-Tang <davidm@hpl.hp.com> |
9 | */ | 6 | */ |
7 | #ifndef _ASM_IA64_UNISTD_H | ||
8 | #define _ASM_IA64_UNISTD_H | ||
10 | 9 | ||
11 | #include <asm/break.h> | 10 | #include <uapi/asm/unistd.h> |
12 | |||
13 | #define __BREAK_SYSCALL __IA64_BREAK_SYSCALL | ||
14 | |||
15 | #define __NR_ni_syscall 1024 | ||
16 | #define __NR_exit 1025 | ||
17 | #define __NR_read 1026 | ||
18 | #define __NR_write 1027 | ||
19 | #define __NR_open 1028 | ||
20 | #define __NR_close 1029 | ||
21 | #define __NR_creat 1030 | ||
22 | #define __NR_link 1031 | ||
23 | #define __NR_unlink 1032 | ||
24 | #define __NR_execve 1033 | ||
25 | #define __NR_chdir 1034 | ||
26 | #define __NR_fchdir 1035 | ||
27 | #define __NR_utimes 1036 | ||
28 | #define __NR_mknod 1037 | ||
29 | #define __NR_chmod 1038 | ||
30 | #define __NR_chown 1039 | ||
31 | #define __NR_lseek 1040 | ||
32 | #define __NR_getpid 1041 | ||
33 | #define __NR_getppid 1042 | ||
34 | #define __NR_mount 1043 | ||
35 | #define __NR_umount 1044 | ||
36 | #define __NR_setuid 1045 | ||
37 | #define __NR_getuid 1046 | ||
38 | #define __NR_geteuid 1047 | ||
39 | #define __NR_ptrace 1048 | ||
40 | #define __NR_access 1049 | ||
41 | #define __NR_sync 1050 | ||
42 | #define __NR_fsync 1051 | ||
43 | #define __NR_fdatasync 1052 | ||
44 | #define __NR_kill 1053 | ||
45 | #define __NR_rename 1054 | ||
46 | #define __NR_mkdir 1055 | ||
47 | #define __NR_rmdir 1056 | ||
48 | #define __NR_dup 1057 | ||
49 | #define __NR_pipe 1058 | ||
50 | #define __NR_times 1059 | ||
51 | #define __NR_brk 1060 | ||
52 | #define __NR_setgid 1061 | ||
53 | #define __NR_getgid 1062 | ||
54 | #define __NR_getegid 1063 | ||
55 | #define __NR_acct 1064 | ||
56 | #define __NR_ioctl 1065 | ||
57 | #define __NR_fcntl 1066 | ||
58 | #define __NR_umask 1067 | ||
59 | #define __NR_chroot 1068 | ||
60 | #define __NR_ustat 1069 | ||
61 | #define __NR_dup2 1070 | ||
62 | #define __NR_setreuid 1071 | ||
63 | #define __NR_setregid 1072 | ||
64 | #define __NR_getresuid 1073 | ||
65 | #define __NR_setresuid 1074 | ||
66 | #define __NR_getresgid 1075 | ||
67 | #define __NR_setresgid 1076 | ||
68 | #define __NR_getgroups 1077 | ||
69 | #define __NR_setgroups 1078 | ||
70 | #define __NR_getpgid 1079 | ||
71 | #define __NR_setpgid 1080 | ||
72 | #define __NR_setsid 1081 | ||
73 | #define __NR_getsid 1082 | ||
74 | #define __NR_sethostname 1083 | ||
75 | #define __NR_setrlimit 1084 | ||
76 | #define __NR_getrlimit 1085 | ||
77 | #define __NR_getrusage 1086 | ||
78 | #define __NR_gettimeofday 1087 | ||
79 | #define __NR_settimeofday 1088 | ||
80 | #define __NR_select 1089 | ||
81 | #define __NR_poll 1090 | ||
82 | #define __NR_symlink 1091 | ||
83 | #define __NR_readlink 1092 | ||
84 | #define __NR_uselib 1093 | ||
85 | #define __NR_swapon 1094 | ||
86 | #define __NR_swapoff 1095 | ||
87 | #define __NR_reboot 1096 | ||
88 | #define __NR_truncate 1097 | ||
89 | #define __NR_ftruncate 1098 | ||
90 | #define __NR_fchmod 1099 | ||
91 | #define __NR_fchown 1100 | ||
92 | #define __NR_getpriority 1101 | ||
93 | #define __NR_setpriority 1102 | ||
94 | #define __NR_statfs 1103 | ||
95 | #define __NR_fstatfs 1104 | ||
96 | #define __NR_gettid 1105 | ||
97 | #define __NR_semget 1106 | ||
98 | #define __NR_semop 1107 | ||
99 | #define __NR_semctl 1108 | ||
100 | #define __NR_msgget 1109 | ||
101 | #define __NR_msgsnd 1110 | ||
102 | #define __NR_msgrcv 1111 | ||
103 | #define __NR_msgctl 1112 | ||
104 | #define __NR_shmget 1113 | ||
105 | #define __NR_shmat 1114 | ||
106 | #define __NR_shmdt 1115 | ||
107 | #define __NR_shmctl 1116 | ||
108 | /* also known as klogctl() in GNU libc: */ | ||
109 | #define __NR_syslog 1117 | ||
110 | #define __NR_setitimer 1118 | ||
111 | #define __NR_getitimer 1119 | ||
112 | /* 1120 was __NR_old_stat */ | ||
113 | /* 1121 was __NR_old_lstat */ | ||
114 | /* 1122 was __NR_old_fstat */ | ||
115 | #define __NR_vhangup 1123 | ||
116 | #define __NR_lchown 1124 | ||
117 | #define __NR_remap_file_pages 1125 | ||
118 | #define __NR_wait4 1126 | ||
119 | #define __NR_sysinfo 1127 | ||
120 | #define __NR_clone 1128 | ||
121 | #define __NR_setdomainname 1129 | ||
122 | #define __NR_uname 1130 | ||
123 | #define __NR_adjtimex 1131 | ||
124 | /* 1132 was __NR_create_module */ | ||
125 | #define __NR_init_module 1133 | ||
126 | #define __NR_delete_module 1134 | ||
127 | /* 1135 was __NR_get_kernel_syms */ | ||
128 | /* 1136 was __NR_query_module */ | ||
129 | #define __NR_quotactl 1137 | ||
130 | #define __NR_bdflush 1138 | ||
131 | #define __NR_sysfs 1139 | ||
132 | #define __NR_personality 1140 | ||
133 | #define __NR_afs_syscall 1141 | ||
134 | #define __NR_setfsuid 1142 | ||
135 | #define __NR_setfsgid 1143 | ||
136 | #define __NR_getdents 1144 | ||
137 | #define __NR_flock 1145 | ||
138 | #define __NR_readv 1146 | ||
139 | #define __NR_writev 1147 | ||
140 | #define __NR_pread64 1148 | ||
141 | #define __NR_pwrite64 1149 | ||
142 | #define __NR__sysctl 1150 | ||
143 | #define __NR_mmap 1151 | ||
144 | #define __NR_munmap 1152 | ||
145 | #define __NR_mlock 1153 | ||
146 | #define __NR_mlockall 1154 | ||
147 | #define __NR_mprotect 1155 | ||
148 | #define __NR_mremap 1156 | ||
149 | #define __NR_msync 1157 | ||
150 | #define __NR_munlock 1158 | ||
151 | #define __NR_munlockall 1159 | ||
152 | #define __NR_sched_getparam 1160 | ||
153 | #define __NR_sched_setparam 1161 | ||
154 | #define __NR_sched_getscheduler 1162 | ||
155 | #define __NR_sched_setscheduler 1163 | ||
156 | #define __NR_sched_yield 1164 | ||
157 | #define __NR_sched_get_priority_max 1165 | ||
158 | #define __NR_sched_get_priority_min 1166 | ||
159 | #define __NR_sched_rr_get_interval 1167 | ||
160 | #define __NR_nanosleep 1168 | ||
161 | #define __NR_nfsservctl 1169 | ||
162 | #define __NR_prctl 1170 | ||
163 | /* 1171 is reserved for backwards compatibility with old __NR_getpagesize */ | ||
164 | #define __NR_mmap2 1172 | ||
165 | #define __NR_pciconfig_read 1173 | ||
166 | #define __NR_pciconfig_write 1174 | ||
167 | #define __NR_perfmonctl 1175 | ||
168 | #define __NR_sigaltstack 1176 | ||
169 | #define __NR_rt_sigaction 1177 | ||
170 | #define __NR_rt_sigpending 1178 | ||
171 | #define __NR_rt_sigprocmask 1179 | ||
172 | #define __NR_rt_sigqueueinfo 1180 | ||
173 | #define __NR_rt_sigreturn 1181 | ||
174 | #define __NR_rt_sigsuspend 1182 | ||
175 | #define __NR_rt_sigtimedwait 1183 | ||
176 | #define __NR_getcwd 1184 | ||
177 | #define __NR_capget 1185 | ||
178 | #define __NR_capset 1186 | ||
179 | #define __NR_sendfile 1187 | ||
180 | #define __NR_getpmsg 1188 | ||
181 | #define __NR_putpmsg 1189 | ||
182 | #define __NR_socket 1190 | ||
183 | #define __NR_bind 1191 | ||
184 | #define __NR_connect 1192 | ||
185 | #define __NR_listen 1193 | ||
186 | #define __NR_accept 1194 | ||
187 | #define __NR_getsockname 1195 | ||
188 | #define __NR_getpeername 1196 | ||
189 | #define __NR_socketpair 1197 | ||
190 | #define __NR_send 1198 | ||
191 | #define __NR_sendto 1199 | ||
192 | #define __NR_recv 1200 | ||
193 | #define __NR_recvfrom 1201 | ||
194 | #define __NR_shutdown 1202 | ||
195 | #define __NR_setsockopt 1203 | ||
196 | #define __NR_getsockopt 1204 | ||
197 | #define __NR_sendmsg 1205 | ||
198 | #define __NR_recvmsg 1206 | ||
199 | #define __NR_pivot_root 1207 | ||
200 | #define __NR_mincore 1208 | ||
201 | #define __NR_madvise 1209 | ||
202 | #define __NR_stat 1210 | ||
203 | #define __NR_lstat 1211 | ||
204 | #define __NR_fstat 1212 | ||
205 | #define __NR_clone2 1213 | ||
206 | #define __NR_getdents64 1214 | ||
207 | #define __NR_getunwind 1215 | ||
208 | #define __NR_readahead 1216 | ||
209 | #define __NR_setxattr 1217 | ||
210 | #define __NR_lsetxattr 1218 | ||
211 | #define __NR_fsetxattr 1219 | ||
212 | #define __NR_getxattr 1220 | ||
213 | #define __NR_lgetxattr 1221 | ||
214 | #define __NR_fgetxattr 1222 | ||
215 | #define __NR_listxattr 1223 | ||
216 | #define __NR_llistxattr 1224 | ||
217 | #define __NR_flistxattr 1225 | ||
218 | #define __NR_removexattr 1226 | ||
219 | #define __NR_lremovexattr 1227 | ||
220 | #define __NR_fremovexattr 1228 | ||
221 | #define __NR_tkill 1229 | ||
222 | #define __NR_futex 1230 | ||
223 | #define __NR_sched_setaffinity 1231 | ||
224 | #define __NR_sched_getaffinity 1232 | ||
225 | #define __NR_set_tid_address 1233 | ||
226 | #define __NR_fadvise64 1234 | ||
227 | #define __NR_tgkill 1235 | ||
228 | #define __NR_exit_group 1236 | ||
229 | #define __NR_lookup_dcookie 1237 | ||
230 | #define __NR_io_setup 1238 | ||
231 | #define __NR_io_destroy 1239 | ||
232 | #define __NR_io_getevents 1240 | ||
233 | #define __NR_io_submit 1241 | ||
234 | #define __NR_io_cancel 1242 | ||
235 | #define __NR_epoll_create 1243 | ||
236 | #define __NR_epoll_ctl 1244 | ||
237 | #define __NR_epoll_wait 1245 | ||
238 | #define __NR_restart_syscall 1246 | ||
239 | #define __NR_semtimedop 1247 | ||
240 | #define __NR_timer_create 1248 | ||
241 | #define __NR_timer_settime 1249 | ||
242 | #define __NR_timer_gettime 1250 | ||
243 | #define __NR_timer_getoverrun 1251 | ||
244 | #define __NR_timer_delete 1252 | ||
245 | #define __NR_clock_settime 1253 | ||
246 | #define __NR_clock_gettime 1254 | ||
247 | #define __NR_clock_getres 1255 | ||
248 | #define __NR_clock_nanosleep 1256 | ||
249 | #define __NR_fstatfs64 1257 | ||
250 | #define __NR_statfs64 1258 | ||
251 | #define __NR_mbind 1259 | ||
252 | #define __NR_get_mempolicy 1260 | ||
253 | #define __NR_set_mempolicy 1261 | ||
254 | #define __NR_mq_open 1262 | ||
255 | #define __NR_mq_unlink 1263 | ||
256 | #define __NR_mq_timedsend 1264 | ||
257 | #define __NR_mq_timedreceive 1265 | ||
258 | #define __NR_mq_notify 1266 | ||
259 | #define __NR_mq_getsetattr 1267 | ||
260 | #define __NR_kexec_load 1268 | ||
261 | #define __NR_vserver 1269 | ||
262 | #define __NR_waitid 1270 | ||
263 | #define __NR_add_key 1271 | ||
264 | #define __NR_request_key 1272 | ||
265 | #define __NR_keyctl 1273 | ||
266 | #define __NR_ioprio_set 1274 | ||
267 | #define __NR_ioprio_get 1275 | ||
268 | #define __NR_move_pages 1276 | ||
269 | #define __NR_inotify_init 1277 | ||
270 | #define __NR_inotify_add_watch 1278 | ||
271 | #define __NR_inotify_rm_watch 1279 | ||
272 | #define __NR_migrate_pages 1280 | ||
273 | #define __NR_openat 1281 | ||
274 | #define __NR_mkdirat 1282 | ||
275 | #define __NR_mknodat 1283 | ||
276 | #define __NR_fchownat 1284 | ||
277 | #define __NR_futimesat 1285 | ||
278 | #define __NR_newfstatat 1286 | ||
279 | #define __NR_unlinkat 1287 | ||
280 | #define __NR_renameat 1288 | ||
281 | #define __NR_linkat 1289 | ||
282 | #define __NR_symlinkat 1290 | ||
283 | #define __NR_readlinkat 1291 | ||
284 | #define __NR_fchmodat 1292 | ||
285 | #define __NR_faccessat 1293 | ||
286 | #define __NR_pselect6 1294 | ||
287 | #define __NR_ppoll 1295 | ||
288 | #define __NR_unshare 1296 | ||
289 | #define __NR_splice 1297 | ||
290 | #define __NR_set_robust_list 1298 | ||
291 | #define __NR_get_robust_list 1299 | ||
292 | #define __NR_sync_file_range 1300 | ||
293 | #define __NR_tee 1301 | ||
294 | #define __NR_vmsplice 1302 | ||
295 | #define __NR_fallocate 1303 | ||
296 | #define __NR_getcpu 1304 | ||
297 | #define __NR_epoll_pwait 1305 | ||
298 | #define __NR_utimensat 1306 | ||
299 | #define __NR_signalfd 1307 | ||
300 | #define __NR_timerfd 1308 | ||
301 | #define __NR_eventfd 1309 | ||
302 | #define __NR_timerfd_create 1310 | ||
303 | #define __NR_timerfd_settime 1311 | ||
304 | #define __NR_timerfd_gettime 1312 | ||
305 | #define __NR_signalfd4 1313 | ||
306 | #define __NR_eventfd2 1314 | ||
307 | #define __NR_epoll_create1 1315 | ||
308 | #define __NR_dup3 1316 | ||
309 | #define __NR_pipe2 1317 | ||
310 | #define __NR_inotify_init1 1318 | ||
311 | #define __NR_preadv 1319 | ||
312 | #define __NR_pwritev 1320 | ||
313 | #define __NR_rt_tgsigqueueinfo 1321 | ||
314 | #define __NR_recvmmsg 1322 | ||
315 | #define __NR_fanotify_init 1323 | ||
316 | #define __NR_fanotify_mark 1324 | ||
317 | #define __NR_prlimit64 1325 | ||
318 | #define __NR_name_to_handle_at 1326 | ||
319 | #define __NR_open_by_handle_at 1327 | ||
320 | #define __NR_clock_adjtime 1328 | ||
321 | #define __NR_syncfs 1329 | ||
322 | #define __NR_setns 1330 | ||
323 | #define __NR_sendmmsg 1331 | ||
324 | #define __NR_process_vm_readv 1332 | ||
325 | #define __NR_process_vm_writev 1333 | ||
326 | #define __NR_accept4 1334 | ||
327 | 11 | ||
328 | #ifdef __KERNEL__ | ||
329 | 12 | ||
330 | 13 | ||
331 | #define NR_syscalls 311 /* length of syscall table */ | 14 | #define NR_syscalls 311 /* length of syscall table */ |
@@ -382,5 +65,4 @@ asmlinkage long sys_rt_sigaction(int sig, | |||
382 | #define cond_syscall(x) asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall"))) | 65 | #define cond_syscall(x) asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall"))) |
383 | 66 | ||
384 | #endif /* !__ASSEMBLY__ */ | 67 | #endif /* !__ASSEMBLY__ */ |
385 | #endif /* __KERNEL__ */ | ||
386 | #endif /* _ASM_IA64_UNISTD_H */ | 68 | #endif /* _ASM_IA64_UNISTD_H */ |
diff --git a/arch/ia64/include/asm/ustack.h b/arch/ia64/include/asm/ustack.h index 504167c35b8..b275401b96d 100644 --- a/arch/ia64/include/asm/ustack.h +++ b/arch/ia64/include/asm/ustack.h | |||
@@ -1,20 +1,11 @@ | |||
1 | #ifndef _ASM_IA64_USTACK_H | 1 | #ifndef _ASM_IA64_USTACK_H |
2 | #define _ASM_IA64_USTACK_H | 2 | #define _ASM_IA64_USTACK_H |
3 | 3 | ||
4 | /* | ||
5 | * Constants for the user stack size | ||
6 | */ | ||
7 | |||
8 | #ifdef __KERNEL__ | ||
9 | #include <asm/page.h> | 4 | #include <asm/page.h> |
5 | #include <uapi/asm/ustack.h> | ||
10 | 6 | ||
11 | /* The absolute hard limit for stack size is 1/2 of the mappable space in the region */ | 7 | /* The absolute hard limit for stack size is 1/2 of the mappable space in the region */ |
12 | #define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2) | 8 | #define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2) |
13 | #define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT) | 9 | #define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT) |
14 | #define STACK_TOP_MAX STACK_TOP | 10 | #define STACK_TOP_MAX STACK_TOP |
15 | #endif | ||
16 | |||
17 | /* Make a default stack size of 2GiB */ | ||
18 | #define DEFAULT_USER_STACK_SIZE (1UL << 31) | ||
19 | |||
20 | #endif /* _ASM_IA64_USTACK_H */ | 11 | #endif /* _ASM_IA64_USTACK_H */ |
diff --git a/arch/ia64/include/uapi/asm/Kbuild b/arch/ia64/include/uapi/asm/Kbuild index baebb3da1d4..30cafac9370 100644 --- a/arch/ia64/include/uapi/asm/Kbuild +++ b/arch/ia64/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,48 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += auxvec.h | ||
5 | header-y += bitsperlong.h | ||
6 | header-y += break.h | ||
7 | header-y += byteorder.h | ||
8 | header-y += cmpxchg.h | ||
9 | header-y += errno.h | ||
10 | header-y += fcntl.h | ||
11 | header-y += fpu.h | ||
12 | header-y += gcc_intrin.h | ||
13 | header-y += ia64regs.h | ||
14 | header-y += intel_intrin.h | ||
15 | header-y += intrinsics.h | ||
16 | header-y += ioctl.h | ||
17 | header-y += ioctls.h | ||
18 | header-y += ipcbuf.h | ||
19 | header-y += kvm.h | ||
20 | header-y += kvm_para.h | ||
21 | header-y += mman.h | ||
22 | header-y += msgbuf.h | ||
23 | header-y += param.h | ||
24 | header-y += perfmon.h | ||
25 | header-y += perfmon_default_smpl.h | ||
26 | header-y += poll.h | ||
27 | header-y += posix_types.h | ||
28 | header-y += ptrace.h | ||
29 | header-y += ptrace_offsets.h | ||
30 | header-y += resource.h | ||
31 | header-y += rse.h | ||
32 | header-y += sembuf.h | ||
33 | header-y += setup.h | ||
34 | header-y += shmbuf.h | ||
35 | header-y += sigcontext.h | ||
36 | header-y += siginfo.h | ||
37 | header-y += signal.h | ||
38 | header-y += socket.h | ||
39 | header-y += sockios.h | ||
40 | header-y += stat.h | ||
41 | header-y += statfs.h | ||
42 | header-y += swab.h | ||
43 | header-y += termbits.h | ||
44 | header-y += termios.h | ||
45 | header-y += types.h | ||
46 | header-y += ucontext.h | ||
47 | header-y += unistd.h | ||
48 | header-y += ustack.h | ||
diff --git a/arch/ia64/include/asm/auxvec.h b/arch/ia64/include/uapi/asm/auxvec.h index 58277fc650e..58277fc650e 100644 --- a/arch/ia64/include/asm/auxvec.h +++ b/arch/ia64/include/uapi/asm/auxvec.h | |||
diff --git a/arch/ia64/include/asm/bitsperlong.h b/arch/ia64/include/uapi/asm/bitsperlong.h index ec4db3c970b..ec4db3c970b 100644 --- a/arch/ia64/include/asm/bitsperlong.h +++ b/arch/ia64/include/uapi/asm/bitsperlong.h | |||
diff --git a/arch/ia64/include/asm/break.h b/arch/ia64/include/uapi/asm/break.h index e90c40ec9ed..e90c40ec9ed 100644 --- a/arch/ia64/include/asm/break.h +++ b/arch/ia64/include/uapi/asm/break.h | |||
diff --git a/arch/ia64/include/asm/byteorder.h b/arch/ia64/include/uapi/asm/byteorder.h index a8dd7355815..a8dd7355815 100644 --- a/arch/ia64/include/asm/byteorder.h +++ b/arch/ia64/include/uapi/asm/byteorder.h | |||
diff --git a/arch/ia64/include/asm/cmpxchg.h b/arch/ia64/include/uapi/asm/cmpxchg.h index 4f37dbbb864..4f37dbbb864 100644 --- a/arch/ia64/include/asm/cmpxchg.h +++ b/arch/ia64/include/uapi/asm/cmpxchg.h | |||
diff --git a/arch/ia64/include/asm/errno.h b/arch/ia64/include/uapi/asm/errno.h index 4c82b503d92..4c82b503d92 100644 --- a/arch/ia64/include/asm/errno.h +++ b/arch/ia64/include/uapi/asm/errno.h | |||
diff --git a/arch/ia64/include/asm/fcntl.h b/arch/ia64/include/uapi/asm/fcntl.h index 1dd275dc8f6..1dd275dc8f6 100644 --- a/arch/ia64/include/asm/fcntl.h +++ b/arch/ia64/include/uapi/asm/fcntl.h | |||
diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/uapi/asm/fpu.h index b6395ad1500..b6395ad1500 100644 --- a/arch/ia64/include/asm/fpu.h +++ b/arch/ia64/include/uapi/asm/fpu.h | |||
diff --git a/arch/ia64/include/uapi/asm/gcc_intrin.h b/arch/ia64/include/uapi/asm/gcc_intrin.h new file mode 100644 index 00000000000..61d0d011197 --- /dev/null +++ b/arch/ia64/include/uapi/asm/gcc_intrin.h | |||
@@ -0,0 +1,618 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright (C) 2002,2003 Jun Nakajima <jun.nakajima@intel.com> | ||
4 | * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com> | ||
5 | */ | ||
6 | #ifndef _UAPI_ASM_IA64_GCC_INTRIN_H | ||
7 | #define _UAPI_ASM_IA64_GCC_INTRIN_H | ||
8 | |||
9 | #include <linux/types.h> | ||
10 | #include <linux/compiler.h> | ||
11 | |||
12 | /* define this macro to get some asm stmts included in 'c' files */ | ||
13 | #define ASM_SUPPORTED | ||
14 | |||
15 | /* Optimization barrier */ | ||
16 | /* The "volatile" is due to gcc bugs */ | ||
17 | #define ia64_barrier() asm volatile ("":::"memory") | ||
18 | |||
19 | #define ia64_stop() asm volatile (";;"::) | ||
20 | |||
21 | #define ia64_invala_gr(regnum) asm volatile ("invala.e r%0" :: "i"(regnum)) | ||
22 | |||
23 | #define ia64_invala_fr(regnum) asm volatile ("invala.e f%0" :: "i"(regnum)) | ||
24 | |||
25 | #define ia64_flushrs() asm volatile ("flushrs;;":::"memory") | ||
26 | |||
27 | #define ia64_loadrs() asm volatile ("loadrs;;":::"memory") | ||
28 | |||
29 | extern void ia64_bad_param_for_setreg (void); | ||
30 | extern void ia64_bad_param_for_getreg (void); | ||
31 | |||
32 | |||
33 | #define ia64_native_setreg(regnum, val) \ | ||
34 | ({ \ | ||
35 | switch (regnum) { \ | ||
36 | case _IA64_REG_PSR_L: \ | ||
37 | asm volatile ("mov psr.l=%0" :: "r"(val) : "memory"); \ | ||
38 | break; \ | ||
39 | case _IA64_REG_AR_KR0 ... _IA64_REG_AR_EC: \ | ||
40 | asm volatile ("mov ar%0=%1" :: \ | ||
41 | "i" (regnum - _IA64_REG_AR_KR0), \ | ||
42 | "r"(val): "memory"); \ | ||
43 | break; \ | ||
44 | case _IA64_REG_CR_DCR ... _IA64_REG_CR_LRR1: \ | ||
45 | asm volatile ("mov cr%0=%1" :: \ | ||
46 | "i" (regnum - _IA64_REG_CR_DCR), \ | ||
47 | "r"(val): "memory" ); \ | ||
48 | break; \ | ||
49 | case _IA64_REG_SP: \ | ||
50 | asm volatile ("mov r12=%0" :: \ | ||
51 | "r"(val): "memory"); \ | ||
52 | break; \ | ||
53 | case _IA64_REG_GP: \ | ||
54 | asm volatile ("mov gp=%0" :: "r"(val) : "memory"); \ | ||
55 | break; \ | ||
56 | default: \ | ||
57 | ia64_bad_param_for_setreg(); \ | ||
58 | break; \ | ||
59 | } \ | ||
60 | }) | ||
61 | |||
62 | #define ia64_native_getreg(regnum) \ | ||
63 | ({ \ | ||
64 | __u64 ia64_intri_res; \ | ||
65 | \ | ||
66 | switch (regnum) { \ | ||
67 | case _IA64_REG_GP: \ | ||
68 | asm volatile ("mov %0=gp" : "=r"(ia64_intri_res)); \ | ||
69 | break; \ | ||
70 | case _IA64_REG_IP: \ | ||
71 | asm volatile ("mov %0=ip" : "=r"(ia64_intri_res)); \ | ||
72 | break; \ | ||
73 | case _IA64_REG_PSR: \ | ||
74 | asm volatile ("mov %0=psr" : "=r"(ia64_intri_res)); \ | ||
75 | break; \ | ||
76 | case _IA64_REG_TP: /* for current() */ \ | ||
77 | ia64_intri_res = ia64_r13; \ | ||
78 | break; \ | ||
79 | case _IA64_REG_AR_KR0 ... _IA64_REG_AR_EC: \ | ||
80 | asm volatile ("mov %0=ar%1" : "=r" (ia64_intri_res) \ | ||
81 | : "i"(regnum - _IA64_REG_AR_KR0)); \ | ||
82 | break; \ | ||
83 | case _IA64_REG_CR_DCR ... _IA64_REG_CR_LRR1: \ | ||
84 | asm volatile ("mov %0=cr%1" : "=r" (ia64_intri_res) \ | ||
85 | : "i" (regnum - _IA64_REG_CR_DCR)); \ | ||
86 | break; \ | ||
87 | case _IA64_REG_SP: \ | ||
88 | asm volatile ("mov %0=sp" : "=r" (ia64_intri_res)); \ | ||
89 | break; \ | ||
90 | default: \ | ||
91 | ia64_bad_param_for_getreg(); \ | ||
92 | break; \ | ||
93 | } \ | ||
94 | ia64_intri_res; \ | ||
95 | }) | ||
96 | |||
97 | #define ia64_hint_pause 0 | ||
98 | |||
99 | #define ia64_hint(mode) \ | ||
100 | ({ \ | ||
101 | switch (mode) { \ | ||
102 | case ia64_hint_pause: \ | ||
103 | asm volatile ("hint @pause" ::: "memory"); \ | ||
104 | break; \ | ||
105 | } \ | ||
106 | }) | ||
107 | |||
108 | |||
109 | /* Integer values for mux1 instruction */ | ||
110 | #define ia64_mux1_brcst 0 | ||
111 | #define ia64_mux1_mix 8 | ||
112 | #define ia64_mux1_shuf 9 | ||
113 | #define ia64_mux1_alt 10 | ||
114 | #define ia64_mux1_rev 11 | ||
115 | |||
116 | #define ia64_mux1(x, mode) \ | ||
117 | ({ \ | ||
118 | __u64 ia64_intri_res; \ | ||
119 | \ | ||
120 | switch (mode) { \ | ||
121 | case ia64_mux1_brcst: \ | ||
122 | asm ("mux1 %0=%1,@brcst" : "=r" (ia64_intri_res) : "r" (x)); \ | ||
123 | break; \ | ||
124 | case ia64_mux1_mix: \ | ||
125 | asm ("mux1 %0=%1,@mix" : "=r" (ia64_intri_res) : "r" (x)); \ | ||
126 | break; \ | ||
127 | case ia64_mux1_shuf: \ | ||
128 | asm ("mux1 %0=%1,@shuf" : "=r" (ia64_intri_res) : "r" (x)); \ | ||
129 | break; \ | ||
130 | case ia64_mux1_alt: \ | ||
131 | asm ("mux1 %0=%1,@alt" : "=r" (ia64_intri_res) : "r" (x)); \ | ||
132 | break; \ | ||
133 | case ia64_mux1_rev: \ | ||
134 | asm ("mux1 %0=%1,@rev" : "=r" (ia64_intri_res) : "r" (x)); \ | ||
135 | break; \ | ||
136 | } \ | ||
137 | ia64_intri_res; \ | ||
138 | }) | ||
139 | |||
140 | #if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) | ||
141 | # define ia64_popcnt(x) __builtin_popcountl(x) | ||
142 | #else | ||
143 | # define ia64_popcnt(x) \ | ||
144 | ({ \ | ||
145 | __u64 ia64_intri_res; \ | ||
146 | asm ("popcnt %0=%1" : "=r" (ia64_intri_res) : "r" (x)); \ | ||
147 | \ | ||
148 | ia64_intri_res; \ | ||
149 | }) | ||
150 | #endif | ||
151 | |||
152 | #define ia64_getf_exp(x) \ | ||
153 | ({ \ | ||
154 | long ia64_intri_res; \ | ||
155 | \ | ||
156 | asm ("getf.exp %0=%1" : "=r"(ia64_intri_res) : "f"(x)); \ | ||
157 | \ | ||
158 | ia64_intri_res; \ | ||
159 | }) | ||
160 | |||
161 | #define ia64_shrp(a, b, count) \ | ||
162 | ({ \ | ||
163 | __u64 ia64_intri_res; \ | ||
164 | asm ("shrp %0=%1,%2,%3" : "=r"(ia64_intri_res) : "r"(a), "r"(b), "i"(count)); \ | ||
165 | ia64_intri_res; \ | ||
166 | }) | ||
167 | |||
168 | #define ia64_ldfs(regnum, x) \ | ||
169 | ({ \ | ||
170 | register double __f__ asm ("f"#regnum); \ | ||
171 | asm volatile ("ldfs %0=[%1]" :"=f"(__f__): "r"(x)); \ | ||
172 | }) | ||
173 | |||
174 | #define ia64_ldfd(regnum, x) \ | ||
175 | ({ \ | ||
176 | register double __f__ asm ("f"#regnum); \ | ||
177 | asm volatile ("ldfd %0=[%1]" :"=f"(__f__): "r"(x)); \ | ||
178 | }) | ||
179 | |||
180 | #define ia64_ldfe(regnum, x) \ | ||
181 | ({ \ | ||
182 | register double __f__ asm ("f"#regnum); \ | ||
183 | asm volatile ("ldfe %0=[%1]" :"=f"(__f__): "r"(x)); \ | ||
184 | }) | ||
185 | |||
186 | #define ia64_ldf8(regnum, x) \ | ||
187 | ({ \ | ||
188 | register double __f__ asm ("f"#regnum); \ | ||
189 | asm volatile ("ldf8 %0=[%1]" :"=f"(__f__): "r"(x)); \ | ||
190 | }) | ||
191 | |||
192 | #define ia64_ldf_fill(regnum, x) \ | ||
193 | ({ \ | ||
194 | register double __f__ asm ("f"#regnum); \ | ||
195 | asm volatile ("ldf.fill %0=[%1]" :"=f"(__f__): "r"(x)); \ | ||
196 | }) | ||
197 | |||
198 | #define ia64_st4_rel_nta(m, val) \ | ||
199 | ({ \ | ||
200 | asm volatile ("st4.rel.nta [%0] = %1\n\t" :: "r"(m), "r"(val)); \ | ||
201 | }) | ||
202 | |||
203 | #define ia64_stfs(x, regnum) \ | ||
204 | ({ \ | ||
205 | register double __f__ asm ("f"#regnum); \ | ||
206 | asm volatile ("stfs [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ | ||
207 | }) | ||
208 | |||
209 | #define ia64_stfd(x, regnum) \ | ||
210 | ({ \ | ||
211 | register double __f__ asm ("f"#regnum); \ | ||
212 | asm volatile ("stfd [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ | ||
213 | }) | ||
214 | |||
215 | #define ia64_stfe(x, regnum) \ | ||
216 | ({ \ | ||
217 | register double __f__ asm ("f"#regnum); \ | ||
218 | asm volatile ("stfe [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ | ||
219 | }) | ||
220 | |||
221 | #define ia64_stf8(x, regnum) \ | ||
222 | ({ \ | ||
223 | register double __f__ asm ("f"#regnum); \ | ||
224 | asm volatile ("stf8 [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ | ||
225 | }) | ||
226 | |||
227 | #define ia64_stf_spill(x, regnum) \ | ||
228 | ({ \ | ||
229 | register double __f__ asm ("f"#regnum); \ | ||
230 | asm volatile ("stf.spill [%0]=%1" :: "r"(x), "f"(__f__) : "memory"); \ | ||
231 | }) | ||
232 | |||
233 | #define ia64_fetchadd4_acq(p, inc) \ | ||
234 | ({ \ | ||
235 | \ | ||
236 | __u64 ia64_intri_res; \ | ||
237 | asm volatile ("fetchadd4.acq %0=[%1],%2" \ | ||
238 | : "=r"(ia64_intri_res) : "r"(p), "i" (inc) \ | ||
239 | : "memory"); \ | ||
240 | \ | ||
241 | ia64_intri_res; \ | ||
242 | }) | ||
243 | |||
244 | #define ia64_fetchadd4_rel(p, inc) \ | ||
245 | ({ \ | ||
246 | __u64 ia64_intri_res; \ | ||
247 | asm volatile ("fetchadd4.rel %0=[%1],%2" \ | ||
248 | : "=r"(ia64_intri_res) : "r"(p), "i" (inc) \ | ||
249 | : "memory"); \ | ||
250 | \ | ||
251 | ia64_intri_res; \ | ||
252 | }) | ||
253 | |||
254 | #define ia64_fetchadd8_acq(p, inc) \ | ||
255 | ({ \ | ||
256 | \ | ||
257 | __u64 ia64_intri_res; \ | ||
258 | asm volatile ("fetchadd8.acq %0=[%1],%2" \ | ||
259 | : "=r"(ia64_intri_res) : "r"(p), "i" (inc) \ | ||
260 | : "memory"); \ | ||
261 | \ | ||
262 | ia64_intri_res; \ | ||
263 | }) | ||
264 | |||
265 | #define ia64_fetchadd8_rel(p, inc) \ | ||
266 | ({ \ | ||
267 | __u64 ia64_intri_res; \ | ||
268 | asm volatile ("fetchadd8.rel %0=[%1],%2" \ | ||
269 | : "=r"(ia64_intri_res) : "r"(p), "i" (inc) \ | ||
270 | : "memory"); \ | ||
271 | \ | ||
272 | ia64_intri_res; \ | ||
273 | }) | ||
274 | |||
275 | #define ia64_xchg1(ptr,x) \ | ||
276 | ({ \ | ||
277 | __u64 ia64_intri_res; \ | ||
278 | asm volatile ("xchg1 %0=[%1],%2" \ | ||
279 | : "=r" (ia64_intri_res) : "r" (ptr), "r" (x) : "memory"); \ | ||
280 | ia64_intri_res; \ | ||
281 | }) | ||
282 | |||
283 | #define ia64_xchg2(ptr,x) \ | ||
284 | ({ \ | ||
285 | __u64 ia64_intri_res; \ | ||
286 | asm volatile ("xchg2 %0=[%1],%2" : "=r" (ia64_intri_res) \ | ||
287 | : "r" (ptr), "r" (x) : "memory"); \ | ||
288 | ia64_intri_res; \ | ||
289 | }) | ||
290 | |||
291 | #define ia64_xchg4(ptr,x) \ | ||
292 | ({ \ | ||
293 | __u64 ia64_intri_res; \ | ||
294 | asm volatile ("xchg4 %0=[%1],%2" : "=r" (ia64_intri_res) \ | ||
295 | : "r" (ptr), "r" (x) : "memory"); \ | ||
296 | ia64_intri_res; \ | ||
297 | }) | ||
298 | |||
299 | #define ia64_xchg8(ptr,x) \ | ||
300 | ({ \ | ||
301 | __u64 ia64_intri_res; \ | ||
302 | asm volatile ("xchg8 %0=[%1],%2" : "=r" (ia64_intri_res) \ | ||
303 | : "r" (ptr), "r" (x) : "memory"); \ | ||
304 | ia64_intri_res; \ | ||
305 | }) | ||
306 | |||
307 | #define ia64_cmpxchg1_acq(ptr, new, old) \ | ||
308 | ({ \ | ||
309 | __u64 ia64_intri_res; \ | ||
310 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
311 | asm volatile ("cmpxchg1.acq %0=[%1],%2,ar.ccv": \ | ||
312 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
313 | ia64_intri_res; \ | ||
314 | }) | ||
315 | |||
316 | #define ia64_cmpxchg1_rel(ptr, new, old) \ | ||
317 | ({ \ | ||
318 | __u64 ia64_intri_res; \ | ||
319 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
320 | asm volatile ("cmpxchg1.rel %0=[%1],%2,ar.ccv": \ | ||
321 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
322 | ia64_intri_res; \ | ||
323 | }) | ||
324 | |||
325 | #define ia64_cmpxchg2_acq(ptr, new, old) \ | ||
326 | ({ \ | ||
327 | __u64 ia64_intri_res; \ | ||
328 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
329 | asm volatile ("cmpxchg2.acq %0=[%1],%2,ar.ccv": \ | ||
330 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
331 | ia64_intri_res; \ | ||
332 | }) | ||
333 | |||
334 | #define ia64_cmpxchg2_rel(ptr, new, old) \ | ||
335 | ({ \ | ||
336 | __u64 ia64_intri_res; \ | ||
337 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
338 | \ | ||
339 | asm volatile ("cmpxchg2.rel %0=[%1],%2,ar.ccv": \ | ||
340 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
341 | ia64_intri_res; \ | ||
342 | }) | ||
343 | |||
344 | #define ia64_cmpxchg4_acq(ptr, new, old) \ | ||
345 | ({ \ | ||
346 | __u64 ia64_intri_res; \ | ||
347 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
348 | asm volatile ("cmpxchg4.acq %0=[%1],%2,ar.ccv": \ | ||
349 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
350 | ia64_intri_res; \ | ||
351 | }) | ||
352 | |||
353 | #define ia64_cmpxchg4_rel(ptr, new, old) \ | ||
354 | ({ \ | ||
355 | __u64 ia64_intri_res; \ | ||
356 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
357 | asm volatile ("cmpxchg4.rel %0=[%1],%2,ar.ccv": \ | ||
358 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
359 | ia64_intri_res; \ | ||
360 | }) | ||
361 | |||
362 | #define ia64_cmpxchg8_acq(ptr, new, old) \ | ||
363 | ({ \ | ||
364 | __u64 ia64_intri_res; \ | ||
365 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
366 | asm volatile ("cmpxchg8.acq %0=[%1],%2,ar.ccv": \ | ||
367 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
368 | ia64_intri_res; \ | ||
369 | }) | ||
370 | |||
371 | #define ia64_cmpxchg8_rel(ptr, new, old) \ | ||
372 | ({ \ | ||
373 | __u64 ia64_intri_res; \ | ||
374 | asm volatile ("mov ar.ccv=%0;;" :: "rO"(old)); \ | ||
375 | \ | ||
376 | asm volatile ("cmpxchg8.rel %0=[%1],%2,ar.ccv": \ | ||
377 | "=r"(ia64_intri_res) : "r"(ptr), "r"(new) : "memory"); \ | ||
378 | ia64_intri_res; \ | ||
379 | }) | ||
380 | |||
381 | #define ia64_mf() asm volatile ("mf" ::: "memory") | ||
382 | #define ia64_mfa() asm volatile ("mf.a" ::: "memory") | ||
383 | |||
384 | #define ia64_invala() asm volatile ("invala" ::: "memory") | ||
385 | |||
386 | #define ia64_native_thash(addr) \ | ||
387 | ({ \ | ||
388 | unsigned long ia64_intri_res; \ | ||
389 | asm volatile ("thash %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \ | ||
390 | ia64_intri_res; \ | ||
391 | }) | ||
392 | |||
393 | #define ia64_srlz_i() asm volatile (";; srlz.i ;;" ::: "memory") | ||
394 | #define ia64_srlz_d() asm volatile (";; srlz.d" ::: "memory"); | ||
395 | |||
396 | #ifdef HAVE_SERIALIZE_DIRECTIVE | ||
397 | # define ia64_dv_serialize_data() asm volatile (".serialize.data"); | ||
398 | # define ia64_dv_serialize_instruction() asm volatile (".serialize.instruction"); | ||
399 | #else | ||
400 | # define ia64_dv_serialize_data() | ||
401 | # define ia64_dv_serialize_instruction() | ||
402 | #endif | ||
403 | |||
404 | #define ia64_nop(x) asm volatile ("nop %0"::"i"(x)); | ||
405 | |||
406 | #define ia64_itci(addr) asm volatile ("itc.i %0;;" :: "r"(addr) : "memory") | ||
407 | |||
408 | #define ia64_itcd(addr) asm volatile ("itc.d %0;;" :: "r"(addr) : "memory") | ||
409 | |||
410 | |||
411 | #define ia64_itri(trnum, addr) asm volatile ("itr.i itr[%0]=%1" \ | ||
412 | :: "r"(trnum), "r"(addr) : "memory") | ||
413 | |||
414 | #define ia64_itrd(trnum, addr) asm volatile ("itr.d dtr[%0]=%1" \ | ||
415 | :: "r"(trnum), "r"(addr) : "memory") | ||
416 | |||
417 | #define ia64_tpa(addr) \ | ||
418 | ({ \ | ||
419 | unsigned long ia64_pa; \ | ||
420 | asm volatile ("tpa %0 = %1" : "=r"(ia64_pa) : "r"(addr) : "memory"); \ | ||
421 | ia64_pa; \ | ||
422 | }) | ||
423 | |||
424 | #define __ia64_set_dbr(index, val) \ | ||
425 | asm volatile ("mov dbr[%0]=%1" :: "r"(index), "r"(val) : "memory") | ||
426 | |||
427 | #define ia64_set_ibr(index, val) \ | ||
428 | asm volatile ("mov ibr[%0]=%1" :: "r"(index), "r"(val) : "memory") | ||
429 | |||
430 | #define ia64_set_pkr(index, val) \ | ||
431 | asm volatile ("mov pkr[%0]=%1" :: "r"(index), "r"(val) : "memory") | ||
432 | |||
433 | #define ia64_set_pmc(index, val) \ | ||
434 | asm volatile ("mov pmc[%0]=%1" :: "r"(index), "r"(val) : "memory") | ||
435 | |||
436 | #define ia64_set_pmd(index, val) \ | ||
437 | asm volatile ("mov pmd[%0]=%1" :: "r"(index), "r"(val) : "memory") | ||
438 | |||
439 | #define ia64_native_set_rr(index, val) \ | ||
440 | asm volatile ("mov rr[%0]=%1" :: "r"(index), "r"(val) : "memory"); | ||
441 | |||
442 | #define ia64_native_get_cpuid(index) \ | ||
443 | ({ \ | ||
444 | unsigned long ia64_intri_res; \ | ||
445 | asm volatile ("mov %0=cpuid[%r1]" : "=r"(ia64_intri_res) : "rO"(index)); \ | ||
446 | ia64_intri_res; \ | ||
447 | }) | ||
448 | |||
449 | #define __ia64_get_dbr(index) \ | ||
450 | ({ \ | ||
451 | unsigned long ia64_intri_res; \ | ||
452 | asm volatile ("mov %0=dbr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ | ||
453 | ia64_intri_res; \ | ||
454 | }) | ||
455 | |||
456 | #define ia64_get_ibr(index) \ | ||
457 | ({ \ | ||
458 | unsigned long ia64_intri_res; \ | ||
459 | asm volatile ("mov %0=ibr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ | ||
460 | ia64_intri_res; \ | ||
461 | }) | ||
462 | |||
463 | #define ia64_get_pkr(index) \ | ||
464 | ({ \ | ||
465 | unsigned long ia64_intri_res; \ | ||
466 | asm volatile ("mov %0=pkr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ | ||
467 | ia64_intri_res; \ | ||
468 | }) | ||
469 | |||
470 | #define ia64_get_pmc(index) \ | ||
471 | ({ \ | ||
472 | unsigned long ia64_intri_res; \ | ||
473 | asm volatile ("mov %0=pmc[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ | ||
474 | ia64_intri_res; \ | ||
475 | }) | ||
476 | |||
477 | |||
478 | #define ia64_native_get_pmd(index) \ | ||
479 | ({ \ | ||
480 | unsigned long ia64_intri_res; \ | ||
481 | asm volatile ("mov %0=pmd[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ | ||
482 | ia64_intri_res; \ | ||
483 | }) | ||
484 | |||
485 | #define ia64_native_get_rr(index) \ | ||
486 | ({ \ | ||
487 | unsigned long ia64_intri_res; \ | ||
488 | asm volatile ("mov %0=rr[%1]" : "=r"(ia64_intri_res) : "r" (index)); \ | ||
489 | ia64_intri_res; \ | ||
490 | }) | ||
491 | |||
492 | #define ia64_native_fc(addr) asm volatile ("fc %0" :: "r"(addr) : "memory") | ||
493 | |||
494 | |||
495 | #define ia64_sync_i() asm volatile (";; sync.i" ::: "memory") | ||
496 | |||
497 | #define ia64_native_ssm(mask) asm volatile ("ssm %0":: "i"((mask)) : "memory") | ||
498 | #define ia64_native_rsm(mask) asm volatile ("rsm %0":: "i"((mask)) : "memory") | ||
499 | #define ia64_sum(mask) asm volatile ("sum %0":: "i"((mask)) : "memory") | ||
500 | #define ia64_rum(mask) asm volatile ("rum %0":: "i"((mask)) : "memory") | ||
501 | |||
502 | #define ia64_ptce(addr) asm volatile ("ptc.e %0" :: "r"(addr)) | ||
503 | |||
504 | #define ia64_native_ptcga(addr, size) \ | ||
505 | do { \ | ||
506 | asm volatile ("ptc.ga %0,%1" :: "r"(addr), "r"(size) : "memory"); \ | ||
507 | ia64_dv_serialize_data(); \ | ||
508 | } while (0) | ||
509 | |||
510 | #define ia64_ptcl(addr, size) \ | ||
511 | do { \ | ||
512 | asm volatile ("ptc.l %0,%1" :: "r"(addr), "r"(size) : "memory"); \ | ||
513 | ia64_dv_serialize_data(); \ | ||
514 | } while (0) | ||
515 | |||
516 | #define ia64_ptri(addr, size) \ | ||
517 | asm volatile ("ptr.i %0,%1" :: "r"(addr), "r"(size) : "memory") | ||
518 | |||
519 | #define ia64_ptrd(addr, size) \ | ||
520 | asm volatile ("ptr.d %0,%1" :: "r"(addr), "r"(size) : "memory") | ||
521 | |||
522 | #define ia64_ttag(addr) \ | ||
523 | ({ \ | ||
524 | __u64 ia64_intri_res; \ | ||
525 | asm volatile ("ttag %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \ | ||
526 | ia64_intri_res; \ | ||
527 | }) | ||
528 | |||
529 | |||
530 | /* Values for lfhint in ia64_lfetch and ia64_lfetch_fault */ | ||
531 | |||
532 | #define ia64_lfhint_none 0 | ||
533 | #define ia64_lfhint_nt1 1 | ||
534 | #define ia64_lfhint_nt2 2 | ||
535 | #define ia64_lfhint_nta 3 | ||
536 | |||
537 | #define ia64_lfetch(lfhint, y) \ | ||
538 | ({ \ | ||
539 | switch (lfhint) { \ | ||
540 | case ia64_lfhint_none: \ | ||
541 | asm volatile ("lfetch [%0]" : : "r"(y)); \ | ||
542 | break; \ | ||
543 | case ia64_lfhint_nt1: \ | ||
544 | asm volatile ("lfetch.nt1 [%0]" : : "r"(y)); \ | ||
545 | break; \ | ||
546 | case ia64_lfhint_nt2: \ | ||
547 | asm volatile ("lfetch.nt2 [%0]" : : "r"(y)); \ | ||
548 | break; \ | ||
549 | case ia64_lfhint_nta: \ | ||
550 | asm volatile ("lfetch.nta [%0]" : : "r"(y)); \ | ||
551 | break; \ | ||
552 | } \ | ||
553 | }) | ||
554 | |||
555 | #define ia64_lfetch_excl(lfhint, y) \ | ||
556 | ({ \ | ||
557 | switch (lfhint) { \ | ||
558 | case ia64_lfhint_none: \ | ||
559 | asm volatile ("lfetch.excl [%0]" :: "r"(y)); \ | ||
560 | break; \ | ||
561 | case ia64_lfhint_nt1: \ | ||
562 | asm volatile ("lfetch.excl.nt1 [%0]" :: "r"(y)); \ | ||
563 | break; \ | ||
564 | case ia64_lfhint_nt2: \ | ||
565 | asm volatile ("lfetch.excl.nt2 [%0]" :: "r"(y)); \ | ||
566 | break; \ | ||
567 | case ia64_lfhint_nta: \ | ||
568 | asm volatile ("lfetch.excl.nta [%0]" :: "r"(y)); \ | ||
569 | break; \ | ||
570 | } \ | ||
571 | }) | ||
572 | |||
573 | #define ia64_lfetch_fault(lfhint, y) \ | ||
574 | ({ \ | ||
575 | switch (lfhint) { \ | ||
576 | case ia64_lfhint_none: \ | ||
577 | asm volatile ("lfetch.fault [%0]" : : "r"(y)); \ | ||
578 | break; \ | ||
579 | case ia64_lfhint_nt1: \ | ||
580 | asm volatile ("lfetch.fault.nt1 [%0]" : : "r"(y)); \ | ||
581 | break; \ | ||
582 | case ia64_lfhint_nt2: \ | ||
583 | asm volatile ("lfetch.fault.nt2 [%0]" : : "r"(y)); \ | ||
584 | break; \ | ||
585 | case ia64_lfhint_nta: \ | ||
586 | asm volatile ("lfetch.fault.nta [%0]" : : "r"(y)); \ | ||
587 | break; \ | ||
588 | } \ | ||
589 | }) | ||
590 | |||
591 | #define ia64_lfetch_fault_excl(lfhint, y) \ | ||
592 | ({ \ | ||
593 | switch (lfhint) { \ | ||
594 | case ia64_lfhint_none: \ | ||
595 | asm volatile ("lfetch.fault.excl [%0]" :: "r"(y)); \ | ||
596 | break; \ | ||
597 | case ia64_lfhint_nt1: \ | ||
598 | asm volatile ("lfetch.fault.excl.nt1 [%0]" :: "r"(y)); \ | ||
599 | break; \ | ||
600 | case ia64_lfhint_nt2: \ | ||
601 | asm volatile ("lfetch.fault.excl.nt2 [%0]" :: "r"(y)); \ | ||
602 | break; \ | ||
603 | case ia64_lfhint_nta: \ | ||
604 | asm volatile ("lfetch.fault.excl.nta [%0]" :: "r"(y)); \ | ||
605 | break; \ | ||
606 | } \ | ||
607 | }) | ||
608 | |||
609 | #define ia64_native_intrin_local_irq_restore(x) \ | ||
610 | do { \ | ||
611 | asm volatile (";; cmp.ne p6,p7=%0,r0;;" \ | ||
612 | "(p6) ssm psr.i;" \ | ||
613 | "(p7) rsm psr.i;;" \ | ||
614 | "(p6) srlz.d" \ | ||
615 | :: "r"((x)) : "p6", "p7", "memory"); \ | ||
616 | } while (0) | ||
617 | |||
618 | #endif /* _UAPI_ASM_IA64_GCC_INTRIN_H */ | ||
diff --git a/arch/ia64/include/asm/ia64regs.h b/arch/ia64/include/uapi/asm/ia64regs.h index 1757f1c11ad..1757f1c11ad 100644 --- a/arch/ia64/include/asm/ia64regs.h +++ b/arch/ia64/include/uapi/asm/ia64regs.h | |||
diff --git a/arch/ia64/include/asm/intel_intrin.h b/arch/ia64/include/uapi/asm/intel_intrin.h index 53cec577558..53cec577558 100644 --- a/arch/ia64/include/asm/intel_intrin.h +++ b/arch/ia64/include/uapi/asm/intel_intrin.h | |||
diff --git a/arch/ia64/include/uapi/asm/intrinsics.h b/arch/ia64/include/uapi/asm/intrinsics.h new file mode 100644 index 00000000000..5829978ff46 --- /dev/null +++ b/arch/ia64/include/uapi/asm/intrinsics.h | |||
@@ -0,0 +1,124 @@ | |||
1 | /* | ||
2 | * Compiler-dependent intrinsics. | ||
3 | * | ||
4 | * Copyright (C) 2002-2003 Hewlett-Packard Co | ||
5 | * David Mosberger-Tang <davidm@hpl.hp.com> | ||
6 | */ | ||
7 | #ifndef _UAPI_ASM_IA64_INTRINSICS_H | ||
8 | #define _UAPI_ASM_IA64_INTRINSICS_H | ||
9 | |||
10 | |||
11 | #ifndef __ASSEMBLY__ | ||
12 | |||
13 | #include <linux/types.h> | ||
14 | /* include compiler specific intrinsics */ | ||
15 | #include <asm/ia64regs.h> | ||
16 | #ifdef __INTEL_COMPILER | ||
17 | # include <asm/intel_intrin.h> | ||
18 | #else | ||
19 | # include <asm/gcc_intrin.h> | ||
20 | #endif | ||
21 | #include <asm/cmpxchg.h> | ||
22 | |||
23 | #define ia64_native_get_psr_i() (ia64_native_getreg(_IA64_REG_PSR) & IA64_PSR_I) | ||
24 | |||
25 | #define ia64_native_set_rr0_to_rr4(val0, val1, val2, val3, val4) \ | ||
26 | do { \ | ||
27 | ia64_native_set_rr(0x0000000000000000UL, (val0)); \ | ||
28 | ia64_native_set_rr(0x2000000000000000UL, (val1)); \ | ||
29 | ia64_native_set_rr(0x4000000000000000UL, (val2)); \ | ||
30 | ia64_native_set_rr(0x6000000000000000UL, (val3)); \ | ||
31 | ia64_native_set_rr(0x8000000000000000UL, (val4)); \ | ||
32 | } while (0) | ||
33 | |||
34 | /* | ||
35 | * Force an unresolved reference if someone tries to use | ||
36 | * ia64_fetch_and_add() with a bad value. | ||
37 | */ | ||
38 | extern unsigned long __bad_size_for_ia64_fetch_and_add (void); | ||
39 | extern unsigned long __bad_increment_for_ia64_fetch_and_add (void); | ||
40 | |||
41 | #define IA64_FETCHADD(tmp,v,n,sz,sem) \ | ||
42 | ({ \ | ||
43 | switch (sz) { \ | ||
44 | case 4: \ | ||
45 | tmp = ia64_fetchadd4_##sem((unsigned int *) v, n); \ | ||
46 | break; \ | ||
47 | \ | ||
48 | case 8: \ | ||
49 | tmp = ia64_fetchadd8_##sem((unsigned long *) v, n); \ | ||
50 | break; \ | ||
51 | \ | ||
52 | default: \ | ||
53 | __bad_size_for_ia64_fetch_and_add(); \ | ||
54 | } \ | ||
55 | }) | ||
56 | |||
57 | #define ia64_fetchadd(i,v,sem) \ | ||
58 | ({ \ | ||
59 | __u64 _tmp; \ | ||
60 | volatile __typeof__(*(v)) *_v = (v); \ | ||
61 | /* Can't use a switch () here: gcc isn't always smart enough for that... */ \ | ||
62 | if ((i) == -16) \ | ||
63 | IA64_FETCHADD(_tmp, _v, -16, sizeof(*(v)), sem); \ | ||
64 | else if ((i) == -8) \ | ||
65 | IA64_FETCHADD(_tmp, _v, -8, sizeof(*(v)), sem); \ | ||
66 | else if ((i) == -4) \ | ||
67 | IA64_FETCHADD(_tmp, _v, -4, sizeof(*(v)), sem); \ | ||
68 | else if ((i) == -1) \ | ||
69 | IA64_FETCHADD(_tmp, _v, -1, sizeof(*(v)), sem); \ | ||
70 | else if ((i) == 1) \ | ||
71 | IA64_FETCHADD(_tmp, _v, 1, sizeof(*(v)), sem); \ | ||
72 | else if ((i) == 4) \ | ||
73 | IA64_FETCHADD(_tmp, _v, 4, sizeof(*(v)), sem); \ | ||
74 | else if ((i) == 8) \ | ||
75 | IA64_FETCHADD(_tmp, _v, 8, sizeof(*(v)), sem); \ | ||
76 | else if ((i) == 16) \ | ||
77 | IA64_FETCHADD(_tmp, _v, 16, sizeof(*(v)), sem); \ | ||
78 | else \ | ||
79 | _tmp = __bad_increment_for_ia64_fetch_and_add(); \ | ||
80 | (__typeof__(*(v))) (_tmp); /* return old value */ \ | ||
81 | }) | ||
82 | |||
83 | #define ia64_fetch_and_add(i,v) (ia64_fetchadd(i, v, rel) + (i)) /* return new value */ | ||
84 | |||
85 | #endif | ||
86 | |||
87 | |||
88 | #ifndef __ASSEMBLY__ | ||
89 | |||
90 | #define IA64_INTRINSIC_API(name) ia64_native_ ## name | ||
91 | #define IA64_INTRINSIC_MACRO(name) ia64_native_ ## name | ||
92 | |||
93 | |||
94 | /************************************************/ | ||
95 | /* Instructions paravirtualized for correctness */ | ||
96 | /************************************************/ | ||
97 | /* fc, thash, get_cpuid, get_pmd, get_eflags, set_eflags */ | ||
98 | /* Note that "ttag" and "cover" are also privilege-sensitive; "ttag" | ||
99 | * is not currently used (though it may be in a long-format VHPT system!) | ||
100 | */ | ||
101 | #define ia64_fc IA64_INTRINSIC_API(fc) | ||
102 | #define ia64_thash IA64_INTRINSIC_API(thash) | ||
103 | #define ia64_get_cpuid IA64_INTRINSIC_API(get_cpuid) | ||
104 | #define ia64_get_pmd IA64_INTRINSIC_API(get_pmd) | ||
105 | |||
106 | |||
107 | /************************************************/ | ||
108 | /* Instructions paravirtualized for performance */ | ||
109 | /************************************************/ | ||
110 | #define ia64_ssm IA64_INTRINSIC_MACRO(ssm) | ||
111 | #define ia64_rsm IA64_INTRINSIC_MACRO(rsm) | ||
112 | #define ia64_getreg IA64_INTRINSIC_MACRO(getreg) | ||
113 | #define ia64_setreg IA64_INTRINSIC_API(setreg) | ||
114 | #define ia64_set_rr IA64_INTRINSIC_API(set_rr) | ||
115 | #define ia64_get_rr IA64_INTRINSIC_API(get_rr) | ||
116 | #define ia64_ptcga IA64_INTRINSIC_API(ptcga) | ||
117 | #define ia64_get_psr_i IA64_INTRINSIC_API(get_psr_i) | ||
118 | #define ia64_intrin_local_irq_restore \ | ||
119 | IA64_INTRINSIC_API(intrin_local_irq_restore) | ||
120 | #define ia64_set_rr0_to_rr4 IA64_INTRINSIC_API(set_rr0_to_rr4) | ||
121 | |||
122 | #endif /* !__ASSEMBLY__ */ | ||
123 | |||
124 | #endif /* _UAPI_ASM_IA64_INTRINSICS_H */ | ||
diff --git a/arch/ia64/include/asm/ioctl.h b/arch/ia64/include/uapi/asm/ioctl.h index b279fe06dfe..b279fe06dfe 100644 --- a/arch/ia64/include/asm/ioctl.h +++ b/arch/ia64/include/uapi/asm/ioctl.h | |||
diff --git a/arch/ia64/include/asm/ioctls.h b/arch/ia64/include/uapi/asm/ioctls.h index f3aab5512e9..f3aab5512e9 100644 --- a/arch/ia64/include/asm/ioctls.h +++ b/arch/ia64/include/uapi/asm/ioctls.h | |||
diff --git a/arch/ia64/include/asm/ipcbuf.h b/arch/ia64/include/uapi/asm/ipcbuf.h index 84c7e51cb6d..84c7e51cb6d 100644 --- a/arch/ia64/include/asm/ipcbuf.h +++ b/arch/ia64/include/uapi/asm/ipcbuf.h | |||
diff --git a/arch/ia64/include/asm/kvm.h b/arch/ia64/include/uapi/asm/kvm.h index ec6c6b30123..ec6c6b30123 100644 --- a/arch/ia64/include/asm/kvm.h +++ b/arch/ia64/include/uapi/asm/kvm.h | |||
diff --git a/arch/ia64/include/uapi/asm/kvm_para.h b/arch/ia64/include/uapi/asm/kvm_para.h new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/arch/ia64/include/uapi/asm/kvm_para.h | |||
diff --git a/arch/ia64/include/uapi/asm/mman.h b/arch/ia64/include/uapi/asm/mman.h new file mode 100644 index 00000000000..8740819adc5 --- /dev/null +++ b/arch/ia64/include/uapi/asm/mman.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Based on <asm-i386/mman.h>. | ||
3 | * | ||
4 | * Modified 1998-2000, 2002 | ||
5 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | ||
6 | */ | ||
7 | #ifndef _UAPI_ASM_IA64_MMAN_H | ||
8 | #define _UAPI_ASM_IA64_MMAN_H | ||
9 | |||
10 | |||
11 | #include <asm-generic/mman.h> | ||
12 | |||
13 | #define MAP_GROWSUP 0x0200 /* register stack-like segment */ | ||
14 | |||
15 | |||
16 | #endif /* _UAPI_ASM_IA64_MMAN_H */ | ||
diff --git a/arch/ia64/include/asm/msgbuf.h b/arch/ia64/include/uapi/asm/msgbuf.h index 6c64c0d2aae..6c64c0d2aae 100644 --- a/arch/ia64/include/asm/msgbuf.h +++ b/arch/ia64/include/uapi/asm/msgbuf.h | |||
diff --git a/arch/ia64/include/uapi/asm/param.h b/arch/ia64/include/uapi/asm/param.h new file mode 100644 index 00000000000..d7da41d9497 --- /dev/null +++ b/arch/ia64/include/uapi/asm/param.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Fundamental kernel parameters. | ||
3 | * | ||
4 | * Based on <asm-i386/param.h>. | ||
5 | * | ||
6 | * Modified 1998, 1999, 2002-2003 | ||
7 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | ||
8 | */ | ||
9 | #ifndef _UAPI_ASM_IA64_PARAM_H | ||
10 | #define _UAPI_ASM_IA64_PARAM_H | ||
11 | |||
12 | |||
13 | #define EXEC_PAGESIZE 65536 | ||
14 | |||
15 | #ifndef NOGROUP | ||
16 | # define NOGROUP (-1) | ||
17 | #endif | ||
18 | |||
19 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
20 | |||
21 | #ifndef __KERNEL__ | ||
22 | /* | ||
23 | * Technically, this is wrong, but some old apps still refer to it. The proper way to | ||
24 | * get the HZ value is via sysconf(_SC_CLK_TCK). | ||
25 | */ | ||
26 | # define HZ 1024 | ||
27 | #endif | ||
28 | |||
29 | #endif /* _UAPI_ASM_IA64_PARAM_H */ | ||
diff --git a/arch/ia64/include/uapi/asm/perfmon.h b/arch/ia64/include/uapi/asm/perfmon.h new file mode 100644 index 00000000000..1a10a2dd58a --- /dev/null +++ b/arch/ia64/include/uapi/asm/perfmon.h | |||
@@ -0,0 +1,177 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001-2003 Hewlett-Packard Co | ||
3 | * Stephane Eranian <eranian@hpl.hp.com> | ||
4 | */ | ||
5 | |||
6 | #ifndef _UAPI_ASM_IA64_PERFMON_H | ||
7 | #define _UAPI_ASM_IA64_PERFMON_H | ||
8 | |||
9 | /* | ||
10 | * perfmon commands supported on all CPU models | ||
11 | */ | ||
12 | #define PFM_WRITE_PMCS 0x01 | ||
13 | #define PFM_WRITE_PMDS 0x02 | ||
14 | #define PFM_READ_PMDS 0x03 | ||
15 | #define PFM_STOP 0x04 | ||
16 | #define PFM_START 0x05 | ||
17 | #define PFM_ENABLE 0x06 /* obsolete */ | ||
18 | #define PFM_DISABLE 0x07 /* obsolete */ | ||
19 | #define PFM_CREATE_CONTEXT 0x08 | ||
20 | #define PFM_DESTROY_CONTEXT 0x09 /* obsolete use close() */ | ||
21 | #define PFM_RESTART 0x0a | ||
22 | #define PFM_PROTECT_CONTEXT 0x0b /* obsolete */ | ||
23 | #define PFM_GET_FEATURES 0x0c | ||
24 | #define PFM_DEBUG 0x0d | ||
25 | #define PFM_UNPROTECT_CONTEXT 0x0e /* obsolete */ | ||
26 | #define PFM_GET_PMC_RESET_VAL 0x0f | ||
27 | #define PFM_LOAD_CONTEXT 0x10 | ||
28 | #define PFM_UNLOAD_CONTEXT 0x11 | ||
29 | |||
30 | /* | ||
31 | * PMU model specific commands (may not be supported on all PMU models) | ||
32 | */ | ||
33 | #define PFM_WRITE_IBRS 0x20 | ||
34 | #define PFM_WRITE_DBRS 0x21 | ||
35 | |||
36 | /* | ||
37 | * context flags | ||
38 | */ | ||
39 | #define PFM_FL_NOTIFY_BLOCK 0x01 /* block task on user level notifications */ | ||
40 | #define PFM_FL_SYSTEM_WIDE 0x02 /* create a system wide context */ | ||
41 | #define PFM_FL_OVFL_NO_MSG 0x80 /* do not post overflow/end messages for notification */ | ||
42 | |||
43 | /* | ||
44 | * event set flags | ||
45 | */ | ||
46 | #define PFM_SETFL_EXCL_IDLE 0x01 /* exclude idle task (syswide only) XXX: DO NOT USE YET */ | ||
47 | |||
48 | /* | ||
49 | * PMC flags | ||
50 | */ | ||
51 | #define PFM_REGFL_OVFL_NOTIFY 0x1 /* send notification on overflow */ | ||
52 | #define PFM_REGFL_RANDOM 0x2 /* randomize sampling interval */ | ||
53 | |||
54 | /* | ||
55 | * PMD/PMC/IBR/DBR return flags (ignored on input) | ||
56 | * | ||
57 | * Those flags are used on output and must be checked in case EAGAIN is returned | ||
58 | * by any of the calls using a pfarg_reg_t or pfarg_dbreg_t structure. | ||
59 | */ | ||
60 | #define PFM_REG_RETFL_NOTAVAIL (1UL<<31) /* set if register is implemented but not available */ | ||
61 | #define PFM_REG_RETFL_EINVAL (1UL<<30) /* set if register entry is invalid */ | ||
62 | #define PFM_REG_RETFL_MASK (PFM_REG_RETFL_NOTAVAIL|PFM_REG_RETFL_EINVAL) | ||
63 | |||
64 | #define PFM_REG_HAS_ERROR(flag) (((flag) & PFM_REG_RETFL_MASK) != 0) | ||
65 | |||
66 | typedef unsigned char pfm_uuid_t[16]; /* custom sampling buffer identifier type */ | ||
67 | |||
68 | /* | ||
69 | * Request structure used to define a context | ||
70 | */ | ||
71 | typedef struct { | ||
72 | pfm_uuid_t ctx_smpl_buf_id; /* which buffer format to use (if needed) */ | ||
73 | unsigned long ctx_flags; /* noblock/block */ | ||
74 | unsigned short ctx_nextra_sets; /* number of extra event sets (you always get 1) */ | ||
75 | unsigned short ctx_reserved1; /* for future use */ | ||
76 | int ctx_fd; /* return arg: unique identification for context */ | ||
77 | void *ctx_smpl_vaddr; /* return arg: virtual address of sampling buffer, is used */ | ||
78 | unsigned long ctx_reserved2[11];/* for future use */ | ||
79 | } pfarg_context_t; | ||
80 | |||
81 | /* | ||
82 | * Request structure used to write/read a PMC or PMD | ||
83 | */ | ||
84 | typedef struct { | ||
85 | unsigned int reg_num; /* which register */ | ||
86 | unsigned short reg_set; /* event set for this register */ | ||
87 | unsigned short reg_reserved1; /* for future use */ | ||
88 | |||
89 | unsigned long reg_value; /* initial pmc/pmd value */ | ||
90 | unsigned long reg_flags; /* input: pmc/pmd flags, return: reg error */ | ||
91 | |||
92 | unsigned long reg_long_reset; /* reset after buffer overflow notification */ | ||
93 | unsigned long reg_short_reset; /* reset after counter overflow */ | ||
94 | |||
95 | unsigned long reg_reset_pmds[4]; /* which other counters to reset on overflow */ | ||
96 | unsigned long reg_random_seed; /* seed value when randomization is used */ | ||
97 | unsigned long reg_random_mask; /* bitmask used to limit random value */ | ||
98 | unsigned long reg_last_reset_val;/* return: PMD last reset value */ | ||
99 | |||
100 | unsigned long reg_smpl_pmds[4]; /* which pmds are accessed when PMC overflows */ | ||
101 | unsigned long reg_smpl_eventid; /* opaque sampling event identifier */ | ||
102 | |||
103 | unsigned long reg_reserved2[3]; /* for future use */ | ||
104 | } pfarg_reg_t; | ||
105 | |||
106 | typedef struct { | ||
107 | unsigned int dbreg_num; /* which debug register */ | ||
108 | unsigned short dbreg_set; /* event set for this register */ | ||
109 | unsigned short dbreg_reserved1; /* for future use */ | ||
110 | unsigned long dbreg_value; /* value for debug register */ | ||
111 | unsigned long dbreg_flags; /* return: dbreg error */ | ||
112 | unsigned long dbreg_reserved2[1]; /* for future use */ | ||
113 | } pfarg_dbreg_t; | ||
114 | |||
115 | typedef struct { | ||
116 | unsigned int ft_version; /* perfmon: major [16-31], minor [0-15] */ | ||
117 | unsigned int ft_reserved; /* reserved for future use */ | ||
118 | unsigned long reserved[4]; /* for future use */ | ||
119 | } pfarg_features_t; | ||
120 | |||
121 | typedef struct { | ||
122 | pid_t load_pid; /* process to load the context into */ | ||
123 | unsigned short load_set; /* first event set to load */ | ||
124 | unsigned short load_reserved1; /* for future use */ | ||
125 | unsigned long load_reserved2[3]; /* for future use */ | ||
126 | } pfarg_load_t; | ||
127 | |||
128 | typedef struct { | ||
129 | int msg_type; /* generic message header */ | ||
130 | int msg_ctx_fd; /* generic message header */ | ||
131 | unsigned long msg_ovfl_pmds[4]; /* which PMDs overflowed */ | ||
132 | unsigned short msg_active_set; /* active set at the time of overflow */ | ||
133 | unsigned short msg_reserved1; /* for future use */ | ||
134 | unsigned int msg_reserved2; /* for future use */ | ||
135 | unsigned long msg_tstamp; /* for perf tuning/debug */ | ||
136 | } pfm_ovfl_msg_t; | ||
137 | |||
138 | typedef struct { | ||
139 | int msg_type; /* generic message header */ | ||
140 | int msg_ctx_fd; /* generic message header */ | ||
141 | unsigned long msg_tstamp; /* for perf tuning */ | ||
142 | } pfm_end_msg_t; | ||
143 | |||
144 | typedef struct { | ||
145 | int msg_type; /* type of the message */ | ||
146 | int msg_ctx_fd; /* unique identifier for the context */ | ||
147 | unsigned long msg_tstamp; /* for perf tuning */ | ||
148 | } pfm_gen_msg_t; | ||
149 | |||
150 | #define PFM_MSG_OVFL 1 /* an overflow happened */ | ||
151 | #define PFM_MSG_END 2 /* task to which context was attached ended */ | ||
152 | |||
153 | typedef union { | ||
154 | pfm_ovfl_msg_t pfm_ovfl_msg; | ||
155 | pfm_end_msg_t pfm_end_msg; | ||
156 | pfm_gen_msg_t pfm_gen_msg; | ||
157 | } pfm_msg_t; | ||
158 | |||
159 | /* | ||
160 | * Define the version numbers for both perfmon as a whole and the sampling buffer format. | ||
161 | */ | ||
162 | #define PFM_VERSION_MAJ 2U | ||
163 | #define PFM_VERSION_MIN 0U | ||
164 | #define PFM_VERSION (((PFM_VERSION_MAJ&0xffff)<<16)|(PFM_VERSION_MIN & 0xffff)) | ||
165 | #define PFM_VERSION_MAJOR(x) (((x)>>16) & 0xffff) | ||
166 | #define PFM_VERSION_MINOR(x) ((x) & 0xffff) | ||
167 | |||
168 | |||
169 | /* | ||
170 | * miscellaneous architected definitions | ||
171 | */ | ||
172 | #define PMU_FIRST_COUNTER 4 /* first counting monitor (PMC/PMD) */ | ||
173 | #define PMU_MAX_PMCS 256 /* maximum architected number of PMC registers */ | ||
174 | #define PMU_MAX_PMDS 256 /* maximum architected number of PMD registers */ | ||
175 | |||
176 | |||
177 | #endif /* _UAPI_ASM_IA64_PERFMON_H */ | ||
diff --git a/arch/ia64/include/asm/perfmon_default_smpl.h b/arch/ia64/include/uapi/asm/perfmon_default_smpl.h index a2d560c6723..a2d560c6723 100644 --- a/arch/ia64/include/asm/perfmon_default_smpl.h +++ b/arch/ia64/include/uapi/asm/perfmon_default_smpl.h | |||
diff --git a/arch/ia64/include/asm/poll.h b/arch/ia64/include/uapi/asm/poll.h index c98509d3149..c98509d3149 100644 --- a/arch/ia64/include/asm/poll.h +++ b/arch/ia64/include/uapi/asm/poll.h | |||
diff --git a/arch/ia64/include/asm/posix_types.h b/arch/ia64/include/uapi/asm/posix_types.h index 99ee1d6510c..99ee1d6510c 100644 --- a/arch/ia64/include/asm/posix_types.h +++ b/arch/ia64/include/uapi/asm/posix_types.h | |||
diff --git a/arch/ia64/include/uapi/asm/ptrace.h b/arch/ia64/include/uapi/asm/ptrace.h new file mode 100644 index 00000000000..0a02f634e12 --- /dev/null +++ b/arch/ia64/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,247 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1998-2004 Hewlett-Packard Co | ||
3 | * David Mosberger-Tang <davidm@hpl.hp.com> | ||
4 | * Stephane Eranian <eranian@hpl.hp.com> | ||
5 | * Copyright (C) 2003 Intel Co | ||
6 | * Suresh Siddha <suresh.b.siddha@intel.com> | ||
7 | * Fenghua Yu <fenghua.yu@intel.com> | ||
8 | * Arun Sharma <arun.sharma@intel.com> | ||
9 | * | ||
10 | * 12/07/98 S. Eranian added pt_regs & switch_stack | ||
11 | * 12/21/98 D. Mosberger updated to match latest code | ||
12 | * 6/17/99 D. Mosberger added second unat member to "struct switch_stack" | ||
13 | * | ||
14 | */ | ||
15 | #ifndef _UAPI_ASM_IA64_PTRACE_H | ||
16 | #define _UAPI_ASM_IA64_PTRACE_H | ||
17 | |||
18 | /* | ||
19 | * When a user process is blocked, its state looks as follows: | ||
20 | * | ||
21 | * +----------------------+ ------- IA64_STK_OFFSET | ||
22 | * | | ^ | ||
23 | * | struct pt_regs | | | ||
24 | * | | | | ||
25 | * +----------------------+ | | ||
26 | * | | | | ||
27 | * | memory stack | | | ||
28 | * | (growing downwards) | | | ||
29 | * //.....................// | | ||
30 | * | | ||
31 | * //.....................// | | ||
32 | * | | | | ||
33 | * +----------------------+ | | ||
34 | * | struct switch_stack | | | ||
35 | * | | | | ||
36 | * +----------------------+ | | ||
37 | * | | | | ||
38 | * //.....................// | | ||
39 | * | | ||
40 | * //.....................// | | ||
41 | * | | | | ||
42 | * | register stack | | | ||
43 | * | (growing upwards) | | | ||
44 | * | | | | ||
45 | * +----------------------+ | --- IA64_RBS_OFFSET | ||
46 | * | struct thread_info | | ^ | ||
47 | * +----------------------+ | | | ||
48 | * | | | | | ||
49 | * | struct task_struct | | | | ||
50 | * current -> | | | | | ||
51 | * +----------------------+ ------- | ||
52 | * | ||
53 | * Note that ar.ec is not saved explicitly in pt_reg or switch_stack. | ||
54 | * This is because ar.ec is saved as part of ar.pfs. | ||
55 | */ | ||
56 | |||
57 | |||
58 | #include <asm/fpu.h> | ||
59 | |||
60 | |||
61 | #ifndef __ASSEMBLY__ | ||
62 | |||
63 | /* | ||
64 | * This struct defines the way the registers are saved on system | ||
65 | * calls. | ||
66 | * | ||
67 | * We don't save all floating point register because the kernel | ||
68 | * is compiled to use only a very small subset, so the other are | ||
69 | * untouched. | ||
70 | * | ||
71 | * THIS STRUCTURE MUST BE A MULTIPLE 16-BYTE IN SIZE | ||
72 | * (because the memory stack pointer MUST ALWAYS be aligned this way) | ||
73 | * | ||
74 | */ | ||
75 | struct pt_regs { | ||
76 | /* The following registers are saved by SAVE_MIN: */ | ||
77 | unsigned long b6; /* scratch */ | ||
78 | unsigned long b7; /* scratch */ | ||
79 | |||
80 | unsigned long ar_csd; /* used by cmp8xchg16 (scratch) */ | ||
81 | unsigned long ar_ssd; /* reserved for future use (scratch) */ | ||
82 | |||
83 | unsigned long r8; /* scratch (return value register 0) */ | ||
84 | unsigned long r9; /* scratch (return value register 1) */ | ||
85 | unsigned long r10; /* scratch (return value register 2) */ | ||
86 | unsigned long r11; /* scratch (return value register 3) */ | ||
87 | |||
88 | unsigned long cr_ipsr; /* interrupted task's psr */ | ||
89 | unsigned long cr_iip; /* interrupted task's instruction pointer */ | ||
90 | /* | ||
91 | * interrupted task's function state; if bit 63 is cleared, it | ||
92 | * contains syscall's ar.pfs.pfm: | ||
93 | */ | ||
94 | unsigned long cr_ifs; | ||
95 | |||
96 | unsigned long ar_unat; /* interrupted task's NaT register (preserved) */ | ||
97 | unsigned long ar_pfs; /* prev function state */ | ||
98 | unsigned long ar_rsc; /* RSE configuration */ | ||
99 | /* The following two are valid only if cr_ipsr.cpl > 0 || ti->flags & _TIF_MCA_INIT */ | ||
100 | unsigned long ar_rnat; /* RSE NaT */ | ||
101 | unsigned long ar_bspstore; /* RSE bspstore */ | ||
102 | |||
103 | unsigned long pr; /* 64 predicate registers (1 bit each) */ | ||
104 | unsigned long b0; /* return pointer (bp) */ | ||
105 | unsigned long loadrs; /* size of dirty partition << 16 */ | ||
106 | |||
107 | unsigned long r1; /* the gp pointer */ | ||
108 | unsigned long r12; /* interrupted task's memory stack pointer */ | ||
109 | unsigned long r13; /* thread pointer */ | ||
110 | |||
111 | unsigned long ar_fpsr; /* floating point status (preserved) */ | ||
112 | unsigned long r15; /* scratch */ | ||
113 | |||
114 | /* The remaining registers are NOT saved for system calls. */ | ||
115 | |||
116 | unsigned long r14; /* scratch */ | ||
117 | unsigned long r2; /* scratch */ | ||
118 | unsigned long r3; /* scratch */ | ||
119 | |||
120 | /* The following registers are saved by SAVE_REST: */ | ||
121 | unsigned long r16; /* scratch */ | ||
122 | unsigned long r17; /* scratch */ | ||
123 | unsigned long r18; /* scratch */ | ||
124 | unsigned long r19; /* scratch */ | ||
125 | unsigned long r20; /* scratch */ | ||
126 | unsigned long r21; /* scratch */ | ||
127 | unsigned long r22; /* scratch */ | ||
128 | unsigned long r23; /* scratch */ | ||
129 | unsigned long r24; /* scratch */ | ||
130 | unsigned long r25; /* scratch */ | ||
131 | unsigned long r26; /* scratch */ | ||
132 | unsigned long r27; /* scratch */ | ||
133 | unsigned long r28; /* scratch */ | ||
134 | unsigned long r29; /* scratch */ | ||
135 | unsigned long r30; /* scratch */ | ||
136 | unsigned long r31; /* scratch */ | ||
137 | |||
138 | unsigned long ar_ccv; /* compare/exchange value (scratch) */ | ||
139 | |||
140 | /* | ||
141 | * Floating point registers that the kernel considers scratch: | ||
142 | */ | ||
143 | struct ia64_fpreg f6; /* scratch */ | ||
144 | struct ia64_fpreg f7; /* scratch */ | ||
145 | struct ia64_fpreg f8; /* scratch */ | ||
146 | struct ia64_fpreg f9; /* scratch */ | ||
147 | struct ia64_fpreg f10; /* scratch */ | ||
148 | struct ia64_fpreg f11; /* scratch */ | ||
149 | }; | ||
150 | |||
151 | /* | ||
152 | * This structure contains the addition registers that need to | ||
153 | * preserved across a context switch. This generally consists of | ||
154 | * "preserved" registers. | ||
155 | */ | ||
156 | struct switch_stack { | ||
157 | unsigned long caller_unat; /* user NaT collection register (preserved) */ | ||
158 | unsigned long ar_fpsr; /* floating-point status register */ | ||
159 | |||
160 | struct ia64_fpreg f2; /* preserved */ | ||
161 | struct ia64_fpreg f3; /* preserved */ | ||
162 | struct ia64_fpreg f4; /* preserved */ | ||
163 | struct ia64_fpreg f5; /* preserved */ | ||
164 | |||
165 | struct ia64_fpreg f12; /* scratch, but untouched by kernel */ | ||
166 | struct ia64_fpreg f13; /* scratch, but untouched by kernel */ | ||
167 | struct ia64_fpreg f14; /* scratch, but untouched by kernel */ | ||
168 | struct ia64_fpreg f15; /* scratch, but untouched by kernel */ | ||
169 | struct ia64_fpreg f16; /* preserved */ | ||
170 | struct ia64_fpreg f17; /* preserved */ | ||
171 | struct ia64_fpreg f18; /* preserved */ | ||
172 | struct ia64_fpreg f19; /* preserved */ | ||
173 | struct ia64_fpreg f20; /* preserved */ | ||
174 | struct ia64_fpreg f21; /* preserved */ | ||
175 | struct ia64_fpreg f22; /* preserved */ | ||
176 | struct ia64_fpreg f23; /* preserved */ | ||
177 | struct ia64_fpreg f24; /* preserved */ | ||
178 | struct ia64_fpreg f25; /* preserved */ | ||
179 | struct ia64_fpreg f26; /* preserved */ | ||
180 | struct ia64_fpreg f27; /* preserved */ | ||
181 | struct ia64_fpreg f28; /* preserved */ | ||
182 | struct ia64_fpreg f29; /* preserved */ | ||
183 | struct ia64_fpreg f30; /* preserved */ | ||
184 | struct ia64_fpreg f31; /* preserved */ | ||
185 | |||
186 | unsigned long r4; /* preserved */ | ||
187 | unsigned long r5; /* preserved */ | ||
188 | unsigned long r6; /* preserved */ | ||
189 | unsigned long r7; /* preserved */ | ||
190 | |||
191 | unsigned long b0; /* so we can force a direct return in copy_thread */ | ||
192 | unsigned long b1; | ||
193 | unsigned long b2; | ||
194 | unsigned long b3; | ||
195 | unsigned long b4; | ||
196 | unsigned long b5; | ||
197 | |||
198 | unsigned long ar_pfs; /* previous function state */ | ||
199 | unsigned long ar_lc; /* loop counter (preserved) */ | ||
200 | unsigned long ar_unat; /* NaT bits for r4-r7 */ | ||
201 | unsigned long ar_rnat; /* RSE NaT collection register */ | ||
202 | unsigned long ar_bspstore; /* RSE dirty base (preserved) */ | ||
203 | unsigned long pr; /* 64 predicate registers (1 bit each) */ | ||
204 | }; | ||
205 | |||
206 | |||
207 | /* pt_all_user_regs is used for PTRACE_GETREGS PTRACE_SETREGS */ | ||
208 | struct pt_all_user_regs { | ||
209 | unsigned long nat; | ||
210 | unsigned long cr_iip; | ||
211 | unsigned long cfm; | ||
212 | unsigned long cr_ipsr; | ||
213 | unsigned long pr; | ||
214 | |||
215 | unsigned long gr[32]; | ||
216 | unsigned long br[8]; | ||
217 | unsigned long ar[128]; | ||
218 | struct ia64_fpreg fr[128]; | ||
219 | }; | ||
220 | |||
221 | #endif /* !__ASSEMBLY__ */ | ||
222 | |||
223 | /* indices to application-registers array in pt_all_user_regs */ | ||
224 | #define PT_AUR_RSC 16 | ||
225 | #define PT_AUR_BSP 17 | ||
226 | #define PT_AUR_BSPSTORE 18 | ||
227 | #define PT_AUR_RNAT 19 | ||
228 | #define PT_AUR_CCV 32 | ||
229 | #define PT_AUR_UNAT 36 | ||
230 | #define PT_AUR_FPSR 40 | ||
231 | #define PT_AUR_PFS 64 | ||
232 | #define PT_AUR_LC 65 | ||
233 | #define PT_AUR_EC 66 | ||
234 | |||
235 | /* | ||
236 | * The numbers chosen here are somewhat arbitrary but absolutely MUST | ||
237 | * not overlap with any of the number assigned in <linux/ptrace.h>. | ||
238 | */ | ||
239 | #define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */ | ||
240 | #define PTRACE_OLD_GETSIGINFO 13 /* (replaced by PTRACE_GETSIGINFO in <linux/ptrace.h>) */ | ||
241 | #define PTRACE_OLD_SETSIGINFO 14 /* (replaced by PTRACE_SETSIGINFO in <linux/ptrace.h>) */ | ||
242 | #define PTRACE_GETREGS 18 /* get all registers (pt_all_user_regs) in one shot */ | ||
243 | #define PTRACE_SETREGS 19 /* set all registers (pt_all_user_regs) in one shot */ | ||
244 | |||
245 | #define PTRACE_OLDSETOPTIONS 21 | ||
246 | |||
247 | #endif /* _UAPI_ASM_IA64_PTRACE_H */ | ||
diff --git a/arch/ia64/include/asm/ptrace_offsets.h b/arch/ia64/include/uapi/asm/ptrace_offsets.h index b712773c759..b712773c759 100644 --- a/arch/ia64/include/asm/ptrace_offsets.h +++ b/arch/ia64/include/uapi/asm/ptrace_offsets.h | |||
diff --git a/arch/ia64/include/asm/resource.h b/arch/ia64/include/uapi/asm/resource.h index ba2272a87fc..ba2272a87fc 100644 --- a/arch/ia64/include/asm/resource.h +++ b/arch/ia64/include/uapi/asm/resource.h | |||
diff --git a/arch/ia64/include/asm/rse.h b/arch/ia64/include/uapi/asm/rse.h index 02830a3b019..02830a3b019 100644 --- a/arch/ia64/include/asm/rse.h +++ b/arch/ia64/include/uapi/asm/rse.h | |||
diff --git a/arch/ia64/include/asm/sembuf.h b/arch/ia64/include/uapi/asm/sembuf.h index 1340fbc04d3..1340fbc04d3 100644 --- a/arch/ia64/include/asm/sembuf.h +++ b/arch/ia64/include/uapi/asm/sembuf.h | |||
diff --git a/arch/ia64/include/asm/setup.h b/arch/ia64/include/uapi/asm/setup.h index 8d56458310b..8d56458310b 100644 --- a/arch/ia64/include/asm/setup.h +++ b/arch/ia64/include/uapi/asm/setup.h | |||
diff --git a/arch/ia64/include/asm/shmbuf.h b/arch/ia64/include/uapi/asm/shmbuf.h index 585002a77ac..585002a77ac 100644 --- a/arch/ia64/include/asm/shmbuf.h +++ b/arch/ia64/include/uapi/asm/shmbuf.h | |||
diff --git a/arch/ia64/include/asm/sigcontext.h b/arch/ia64/include/uapi/asm/sigcontext.h index 57ff777bcc4..57ff777bcc4 100644 --- a/arch/ia64/include/asm/sigcontext.h +++ b/arch/ia64/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/ia64/include/uapi/asm/siginfo.h b/arch/ia64/include/uapi/asm/siginfo.h new file mode 100644 index 00000000000..4ea6225196b --- /dev/null +++ b/arch/ia64/include/uapi/asm/siginfo.h | |||
@@ -0,0 +1,121 @@ | |||
1 | /* | ||
2 | * Based on <asm-i386/siginfo.h>. | ||
3 | * | ||
4 | * Modified 1998-2002 | ||
5 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | ||
6 | */ | ||
7 | #ifndef _UAPI_ASM_IA64_SIGINFO_H | ||
8 | #define _UAPI_ASM_IA64_SIGINFO_H | ||
9 | |||
10 | |||
11 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | ||
12 | |||
13 | #define HAVE_ARCH_SIGINFO_T | ||
14 | #define HAVE_ARCH_COPY_SIGINFO | ||
15 | #define HAVE_ARCH_COPY_SIGINFO_TO_USER | ||
16 | |||
17 | #include <asm-generic/siginfo.h> | ||
18 | |||
19 | typedef struct siginfo { | ||
20 | int si_signo; | ||
21 | int si_errno; | ||
22 | int si_code; | ||
23 | int __pad0; | ||
24 | |||
25 | union { | ||
26 | int _pad[SI_PAD_SIZE]; | ||
27 | |||
28 | /* kill() */ | ||
29 | struct { | ||
30 | pid_t _pid; /* sender's pid */ | ||
31 | uid_t _uid; /* sender's uid */ | ||
32 | } _kill; | ||
33 | |||
34 | /* POSIX.1b timers */ | ||
35 | struct { | ||
36 | timer_t _tid; /* timer id */ | ||
37 | int _overrun; /* overrun count */ | ||
38 | char _pad[sizeof(__ARCH_SI_UID_T) - sizeof(int)]; | ||
39 | sigval_t _sigval; /* must overlay ._rt._sigval! */ | ||
40 | int _sys_private; /* not to be passed to user */ | ||
41 | } _timer; | ||
42 | |||
43 | /* POSIX.1b signals */ | ||
44 | struct { | ||
45 | pid_t _pid; /* sender's pid */ | ||
46 | uid_t _uid; /* sender's uid */ | ||
47 | sigval_t _sigval; | ||
48 | } _rt; | ||
49 | |||
50 | /* SIGCHLD */ | ||
51 | struct { | ||
52 | pid_t _pid; /* which child */ | ||
53 | uid_t _uid; /* sender's uid */ | ||
54 | int _status; /* exit code */ | ||
55 | clock_t _utime; | ||
56 | clock_t _stime; | ||
57 | } _sigchld; | ||
58 | |||
59 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ | ||
60 | struct { | ||
61 | void __user *_addr; /* faulting insn/memory ref. */ | ||
62 | int _imm; /* immediate value for "break" */ | ||
63 | unsigned int _flags; /* see below */ | ||
64 | unsigned long _isr; /* isr */ | ||
65 | short _addr_lsb; /* lsb of faulting address */ | ||
66 | } _sigfault; | ||
67 | |||
68 | /* SIGPOLL */ | ||
69 | struct { | ||
70 | long _band; /* POLL_IN, POLL_OUT, POLL_MSG (XPG requires a "long") */ | ||
71 | int _fd; | ||
72 | } _sigpoll; | ||
73 | } _sifields; | ||
74 | } siginfo_t; | ||
75 | |||
76 | #define si_imm _sifields._sigfault._imm /* as per UNIX SysV ABI spec */ | ||
77 | #define si_flags _sifields._sigfault._flags | ||
78 | /* | ||
79 | * si_isr is valid for SIGILL, SIGFPE, SIGSEGV, SIGBUS, and SIGTRAP provided that | ||
80 | * si_code is non-zero and __ISR_VALID is set in si_flags. | ||
81 | */ | ||
82 | #define si_isr _sifields._sigfault._isr | ||
83 | |||
84 | /* | ||
85 | * Flag values for si_flags: | ||
86 | */ | ||
87 | #define __ISR_VALID_BIT 0 | ||
88 | #define __ISR_VALID (1 << __ISR_VALID_BIT) | ||
89 | |||
90 | /* | ||
91 | * SIGILL si_codes | ||
92 | */ | ||
93 | #define ILL_BADIADDR (__SI_FAULT|9) /* unimplemented instruction address */ | ||
94 | #define __ILL_BREAK (__SI_FAULT|10) /* illegal break */ | ||
95 | #define __ILL_BNDMOD (__SI_FAULT|11) /* bundle-update (modification) in progress */ | ||
96 | #undef NSIGILL | ||
97 | #define NSIGILL 11 | ||
98 | |||
99 | /* | ||
100 | * SIGFPE si_codes | ||
101 | */ | ||
102 | #define __FPE_DECOVF (__SI_FAULT|9) /* decimal overflow */ | ||
103 | #define __FPE_DECDIV (__SI_FAULT|10) /* decimal division by zero */ | ||
104 | #define __FPE_DECERR (__SI_FAULT|11) /* packed decimal error */ | ||
105 | #define __FPE_INVASC (__SI_FAULT|12) /* invalid ASCII digit */ | ||
106 | #define __FPE_INVDEC (__SI_FAULT|13) /* invalid decimal digit */ | ||
107 | #undef NSIGFPE | ||
108 | #define NSIGFPE 13 | ||
109 | |||
110 | /* | ||
111 | * SIGSEGV si_codes | ||
112 | */ | ||
113 | #define __SEGV_PSTKOVF (__SI_FAULT|3) /* paragraph stack overflow */ | ||
114 | #undef NSIGSEGV | ||
115 | #define NSIGSEGV 3 | ||
116 | |||
117 | #undef NSIGTRAP | ||
118 | #define NSIGTRAP 4 | ||
119 | |||
120 | |||
121 | #endif /* _UAPI_ASM_IA64_SIGINFO_H */ | ||
diff --git a/arch/ia64/include/uapi/asm/signal.h b/arch/ia64/include/uapi/asm/signal.h new file mode 100644 index 00000000000..e531c424434 --- /dev/null +++ b/arch/ia64/include/uapi/asm/signal.h | |||
@@ -0,0 +1,127 @@ | |||
1 | /* | ||
2 | * Modified 1998-2001, 2003 | ||
3 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | ||
4 | * | ||
5 | * Unfortunately, this file is being included by bits/signal.h in | ||
6 | * glibc-2.x. Hence the #ifdef __KERNEL__ ugliness. | ||
7 | */ | ||
8 | #ifndef _UAPI_ASM_IA64_SIGNAL_H | ||
9 | #define _UAPI_ASM_IA64_SIGNAL_H | ||
10 | |||
11 | |||
12 | #define SIGHUP 1 | ||
13 | #define SIGINT 2 | ||
14 | #define SIGQUIT 3 | ||
15 | #define SIGILL 4 | ||
16 | #define SIGTRAP 5 | ||
17 | #define SIGABRT 6 | ||
18 | #define SIGIOT 6 | ||
19 | #define SIGBUS 7 | ||
20 | #define SIGFPE 8 | ||
21 | #define SIGKILL 9 | ||
22 | #define SIGUSR1 10 | ||
23 | #define SIGSEGV 11 | ||
24 | #define SIGUSR2 12 | ||
25 | #define SIGPIPE 13 | ||
26 | #define SIGALRM 14 | ||
27 | #define SIGTERM 15 | ||
28 | #define SIGSTKFLT 16 | ||
29 | #define SIGCHLD 17 | ||
30 | #define SIGCONT 18 | ||
31 | #define SIGSTOP 19 | ||
32 | #define SIGTSTP 20 | ||
33 | #define SIGTTIN 21 | ||
34 | #define SIGTTOU 22 | ||
35 | #define SIGURG 23 | ||
36 | #define SIGXCPU 24 | ||
37 | #define SIGXFSZ 25 | ||
38 | #define SIGVTALRM 26 | ||
39 | #define SIGPROF 27 | ||
40 | #define SIGWINCH 28 | ||
41 | #define SIGIO 29 | ||
42 | #define SIGPOLL SIGIO | ||
43 | /* | ||
44 | #define SIGLOST 29 | ||
45 | */ | ||
46 | #define SIGPWR 30 | ||
47 | #define SIGSYS 31 | ||
48 | /* signal 31 is no longer "unused", but the SIGUNUSED macro remains for backwards compatibility */ | ||
49 | #define SIGUNUSED 31 | ||
50 | |||
51 | /* These should not be considered constants from userland. */ | ||
52 | #define SIGRTMIN 32 | ||
53 | #define SIGRTMAX _NSIG | ||
54 | |||
55 | /* | ||
56 | * SA_FLAGS values: | ||
57 | * | ||
58 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
59 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
60 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
61 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
62 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
63 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
64 | * | ||
65 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
66 | * Unix names RESETHAND and NODEFER respectively. | ||
67 | */ | ||
68 | #define SA_NOCLDSTOP 0x00000001 | ||
69 | #define SA_NOCLDWAIT 0x00000002 | ||
70 | #define SA_SIGINFO 0x00000004 | ||
71 | #define SA_ONSTACK 0x08000000 | ||
72 | #define SA_RESTART 0x10000000 | ||
73 | #define SA_NODEFER 0x40000000 | ||
74 | #define SA_RESETHAND 0x80000000 | ||
75 | |||
76 | #define SA_NOMASK SA_NODEFER | ||
77 | #define SA_ONESHOT SA_RESETHAND | ||
78 | |||
79 | #define SA_RESTORER 0x04000000 | ||
80 | |||
81 | /* | ||
82 | * sigaltstack controls | ||
83 | */ | ||
84 | #define SS_ONSTACK 1 | ||
85 | #define SS_DISABLE 2 | ||
86 | |||
87 | /* | ||
88 | * The minimum stack size needs to be fairly large because we want to | ||
89 | * be sure that an app compiled for today's CPUs will continue to run | ||
90 | * on all future CPU models. The CPU model matters because the signal | ||
91 | * frame needs to have space for the complete machine state, including | ||
92 | * all physical stacked registers. The number of physical stacked | ||
93 | * registers is CPU model dependent, but given that the width of | ||
94 | * ar.rsc.loadrs is 14 bits, we can assume that they'll never take up | ||
95 | * more than 16KB of space. | ||
96 | */ | ||
97 | #if 1 | ||
98 | /* | ||
99 | * This is a stupid typo: the value was _meant_ to be 131072 (0x20000), but I typed it | ||
100 | * in wrong. ;-( To preserve backwards compatibility, we leave the kernel at the | ||
101 | * incorrect value and fix libc only. | ||
102 | */ | ||
103 | # define MINSIGSTKSZ 131027 /* min. stack size for sigaltstack() */ | ||
104 | #else | ||
105 | # define MINSIGSTKSZ 131072 /* min. stack size for sigaltstack() */ | ||
106 | #endif | ||
107 | #define SIGSTKSZ 262144 /* default stack size for sigaltstack() */ | ||
108 | |||
109 | |||
110 | #include <asm-generic/signal-defs.h> | ||
111 | |||
112 | # ifndef __ASSEMBLY__ | ||
113 | |||
114 | # include <linux/types.h> | ||
115 | |||
116 | /* Avoid too many header ordering problems. */ | ||
117 | struct siginfo; | ||
118 | |||
119 | typedef struct sigaltstack { | ||
120 | void __user *ss_sp; | ||
121 | int ss_flags; | ||
122 | size_t ss_size; | ||
123 | } stack_t; | ||
124 | |||
125 | |||
126 | # endif /* !__ASSEMBLY__ */ | ||
127 | #endif /* _UAPI_ASM_IA64_SIGNAL_H */ | ||
diff --git a/arch/ia64/include/asm/socket.h b/arch/ia64/include/uapi/asm/socket.h index 41fc28a4a18..41fc28a4a18 100644 --- a/arch/ia64/include/asm/socket.h +++ b/arch/ia64/include/uapi/asm/socket.h | |||
diff --git a/arch/ia64/include/asm/sockios.h b/arch/ia64/include/uapi/asm/sockios.h index 15c92468ad3..15c92468ad3 100644 --- a/arch/ia64/include/asm/sockios.h +++ b/arch/ia64/include/uapi/asm/sockios.h | |||
diff --git a/arch/ia64/include/asm/stat.h b/arch/ia64/include/uapi/asm/stat.h index 367bb90cdff..367bb90cdff 100644 --- a/arch/ia64/include/asm/stat.h +++ b/arch/ia64/include/uapi/asm/stat.h | |||
diff --git a/arch/ia64/include/asm/statfs.h b/arch/ia64/include/uapi/asm/statfs.h index 1e589669de5..1e589669de5 100644 --- a/arch/ia64/include/asm/statfs.h +++ b/arch/ia64/include/uapi/asm/statfs.h | |||
diff --git a/arch/ia64/include/asm/swab.h b/arch/ia64/include/uapi/asm/swab.h index c89a8cb5d8a..c89a8cb5d8a 100644 --- a/arch/ia64/include/asm/swab.h +++ b/arch/ia64/include/uapi/asm/swab.h | |||
diff --git a/arch/ia64/include/asm/termbits.h b/arch/ia64/include/uapi/asm/termbits.h index c009b94e58d..c009b94e58d 100644 --- a/arch/ia64/include/asm/termbits.h +++ b/arch/ia64/include/uapi/asm/termbits.h | |||
diff --git a/arch/ia64/include/uapi/asm/termios.h b/arch/ia64/include/uapi/asm/termios.h new file mode 100644 index 00000000000..d59b48c307f --- /dev/null +++ b/arch/ia64/include/uapi/asm/termios.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * Modified 1999 | ||
3 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | ||
4 | * | ||
5 | * 99/01/28 Added N_IRDA and N_SMSBLOCK | ||
6 | */ | ||
7 | #ifndef _UAPI_ASM_IA64_TERMIOS_H | ||
8 | #define _UAPI_ASM_IA64_TERMIOS_H | ||
9 | |||
10 | |||
11 | #include <asm/termbits.h> | ||
12 | #include <asm/ioctls.h> | ||
13 | |||
14 | struct winsize { | ||
15 | unsigned short ws_row; | ||
16 | unsigned short ws_col; | ||
17 | unsigned short ws_xpixel; | ||
18 | unsigned short ws_ypixel; | ||
19 | }; | ||
20 | |||
21 | #define NCC 8 | ||
22 | struct termio { | ||
23 | unsigned short c_iflag; /* input mode flags */ | ||
24 | unsigned short c_oflag; /* output mode flags */ | ||
25 | unsigned short c_cflag; /* control mode flags */ | ||
26 | unsigned short c_lflag; /* local mode flags */ | ||
27 | unsigned char c_line; /* line discipline */ | ||
28 | unsigned char c_cc[NCC]; /* control characters */ | ||
29 | }; | ||
30 | |||
31 | /* modem lines */ | ||
32 | #define TIOCM_LE 0x001 | ||
33 | #define TIOCM_DTR 0x002 | ||
34 | #define TIOCM_RTS 0x004 | ||
35 | #define TIOCM_ST 0x008 | ||
36 | #define TIOCM_SR 0x010 | ||
37 | #define TIOCM_CTS 0x020 | ||
38 | #define TIOCM_CAR 0x040 | ||
39 | #define TIOCM_RNG 0x080 | ||
40 | #define TIOCM_DSR 0x100 | ||
41 | #define TIOCM_CD TIOCM_CAR | ||
42 | #define TIOCM_RI TIOCM_RNG | ||
43 | #define TIOCM_OUT1 0x2000 | ||
44 | #define TIOCM_OUT2 0x4000 | ||
45 | #define TIOCM_LOOP 0x8000 | ||
46 | |||
47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
48 | |||
49 | |||
50 | #endif /* _UAPI_ASM_IA64_TERMIOS_H */ | ||
diff --git a/arch/ia64/include/uapi/asm/types.h b/arch/ia64/include/uapi/asm/types.h new file mode 100644 index 00000000000..321193b05ee --- /dev/null +++ b/arch/ia64/include/uapi/asm/types.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * This file is never included by application software unless explicitly | ||
3 | * requested (e.g., via linux/types.h) in which case the application is | ||
4 | * Linux specific so (user-) name space pollution is not a major issue. | ||
5 | * However, for interoperability, libraries still need to be careful to | ||
6 | * avoid naming clashes. | ||
7 | * | ||
8 | * Based on <asm-alpha/types.h>. | ||
9 | * | ||
10 | * Modified 1998-2000, 2002 | ||
11 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | ||
12 | */ | ||
13 | #ifndef _UAPI_ASM_IA64_TYPES_H | ||
14 | #define _UAPI_ASM_IA64_TYPES_H | ||
15 | |||
16 | |||
17 | #ifndef __KERNEL__ | ||
18 | #include <asm-generic/int-l64.h> | ||
19 | #endif | ||
20 | |||
21 | #ifdef __ASSEMBLY__ | ||
22 | # define __IA64_UL(x) (x) | ||
23 | # define __IA64_UL_CONST(x) x | ||
24 | |||
25 | #else | ||
26 | # define __IA64_UL(x) ((unsigned long)(x)) | ||
27 | # define __IA64_UL_CONST(x) x##UL | ||
28 | |||
29 | #endif /* !__ASSEMBLY__ */ | ||
30 | |||
31 | #endif /* _UAPI_ASM_IA64_TYPES_H */ | ||
diff --git a/arch/ia64/include/asm/ucontext.h b/arch/ia64/include/uapi/asm/ucontext.h index bf573dc8ca6..bf573dc8ca6 100644 --- a/arch/ia64/include/asm/ucontext.h +++ b/arch/ia64/include/uapi/asm/ucontext.h | |||
diff --git a/arch/ia64/include/uapi/asm/unistd.h b/arch/ia64/include/uapi/asm/unistd.h new file mode 100644 index 00000000000..b706aa54df2 --- /dev/null +++ b/arch/ia64/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,328 @@ | |||
1 | /* | ||
2 | * IA-64 Linux syscall numbers and inline-functions. | ||
3 | * | ||
4 | * Copyright (C) 1998-2005 Hewlett-Packard Co | ||
5 | * David Mosberger-Tang <davidm@hpl.hp.com> | ||
6 | */ | ||
7 | #ifndef _UAPI_ASM_IA64_UNISTD_H | ||
8 | #define _UAPI_ASM_IA64_UNISTD_H | ||
9 | |||
10 | |||
11 | #include <asm/break.h> | ||
12 | |||
13 | #define __BREAK_SYSCALL __IA64_BREAK_SYSCALL | ||
14 | |||
15 | #define __NR_ni_syscall 1024 | ||
16 | #define __NR_exit 1025 | ||
17 | #define __NR_read 1026 | ||
18 | #define __NR_write 1027 | ||
19 | #define __NR_open 1028 | ||
20 | #define __NR_close 1029 | ||
21 | #define __NR_creat 1030 | ||
22 | #define __NR_link 1031 | ||
23 | #define __NR_unlink 1032 | ||
24 | #define __NR_execve 1033 | ||
25 | #define __NR_chdir 1034 | ||
26 | #define __NR_fchdir 1035 | ||
27 | #define __NR_utimes 1036 | ||
28 | #define __NR_mknod 1037 | ||
29 | #define __NR_chmod 1038 | ||
30 | #define __NR_chown 1039 | ||
31 | #define __NR_lseek 1040 | ||
32 | #define __NR_getpid 1041 | ||
33 | #define __NR_getppid 1042 | ||
34 | #define __NR_mount 1043 | ||
35 | #define __NR_umount 1044 | ||
36 | #define __NR_setuid 1045 | ||
37 | #define __NR_getuid 1046 | ||
38 | #define __NR_geteuid 1047 | ||
39 | #define __NR_ptrace 1048 | ||
40 | #define __NR_access 1049 | ||
41 | #define __NR_sync 1050 | ||
42 | #define __NR_fsync 1051 | ||
43 | #define __NR_fdatasync 1052 | ||
44 | #define __NR_kill 1053 | ||
45 | #define __NR_rename 1054 | ||
46 | #define __NR_mkdir 1055 | ||
47 | #define __NR_rmdir 1056 | ||
48 | #define __NR_dup 1057 | ||
49 | #define __NR_pipe 1058 | ||
50 | #define __NR_times 1059 | ||
51 | #define __NR_brk 1060 | ||
52 | #define __NR_setgid 1061 | ||
53 | #define __NR_getgid 1062 | ||
54 | #define __NR_getegid 1063 | ||
55 | #define __NR_acct 1064 | ||
56 | #define __NR_ioctl 1065 | ||
57 | #define __NR_fcntl 1066 | ||
58 | #define __NR_umask 1067 | ||
59 | #define __NR_chroot 1068 | ||
60 | #define __NR_ustat 1069 | ||
61 | #define __NR_dup2 1070 | ||
62 | #define __NR_setreuid 1071 | ||
63 | #define __NR_setregid 1072 | ||
64 | #define __NR_getresuid 1073 | ||
65 | #define __NR_setresuid 1074 | ||
66 | #define __NR_getresgid 1075 | ||
67 | #define __NR_setresgid 1076 | ||
68 | #define __NR_getgroups 1077 | ||
69 | #define __NR_setgroups 1078 | ||
70 | #define __NR_getpgid 1079 | ||
71 | #define __NR_setpgid 1080 | ||
72 | #define __NR_setsid 1081 | ||
73 | #define __NR_getsid 1082 | ||
74 | #define __NR_sethostname 1083 | ||
75 | #define __NR_setrlimit 1084 | ||
76 | #define __NR_getrlimit 1085 | ||
77 | #define __NR_getrusage 1086 | ||
78 | #define __NR_gettimeofday 1087 | ||
79 | #define __NR_settimeofday 1088 | ||
80 | #define __NR_select 1089 | ||
81 | #define __NR_poll 1090 | ||
82 | #define __NR_symlink 1091 | ||
83 | #define __NR_readlink 1092 | ||
84 | #define __NR_uselib 1093 | ||
85 | #define __NR_swapon 1094 | ||
86 | #define __NR_swapoff 1095 | ||
87 | #define __NR_reboot 1096 | ||
88 | #define __NR_truncate 1097 | ||
89 | #define __NR_ftruncate 1098 | ||
90 | #define __NR_fchmod 1099 | ||
91 | #define __NR_fchown 1100 | ||
92 | #define __NR_getpriority 1101 | ||
93 | #define __NR_setpriority 1102 | ||
94 | #define __NR_statfs 1103 | ||
95 | #define __NR_fstatfs 1104 | ||
96 | #define __NR_gettid 1105 | ||
97 | #define __NR_semget 1106 | ||
98 | #define __NR_semop 1107 | ||
99 | #define __NR_semctl 1108 | ||
100 | #define __NR_msgget 1109 | ||
101 | #define __NR_msgsnd 1110 | ||
102 | #define __NR_msgrcv 1111 | ||
103 | #define __NR_msgctl 1112 | ||
104 | #define __NR_shmget 1113 | ||
105 | #define __NR_shmat 1114 | ||
106 | #define __NR_shmdt 1115 | ||
107 | #define __NR_shmctl 1116 | ||
108 | /* also known as klogctl() in GNU libc: */ | ||
109 | #define __NR_syslog 1117 | ||
110 | #define __NR_setitimer 1118 | ||
111 | #define __NR_getitimer 1119 | ||
112 | /* 1120 was __NR_old_stat */ | ||
113 | /* 1121 was __NR_old_lstat */ | ||
114 | /* 1122 was __NR_old_fstat */ | ||
115 | #define __NR_vhangup 1123 | ||
116 | #define __NR_lchown 1124 | ||
117 | #define __NR_remap_file_pages 1125 | ||
118 | #define __NR_wait4 1126 | ||
119 | #define __NR_sysinfo 1127 | ||
120 | #define __NR_clone 1128 | ||
121 | #define __NR_setdomainname 1129 | ||
122 | #define __NR_uname 1130 | ||
123 | #define __NR_adjtimex 1131 | ||
124 | /* 1132 was __NR_create_module */ | ||
125 | #define __NR_init_module 1133 | ||
126 | #define __NR_delete_module 1134 | ||
127 | /* 1135 was __NR_get_kernel_syms */ | ||
128 | /* 1136 was __NR_query_module */ | ||
129 | #define __NR_quotactl 1137 | ||
130 | #define __NR_bdflush 1138 | ||
131 | #define __NR_sysfs 1139 | ||
132 | #define __NR_personality 1140 | ||
133 | #define __NR_afs_syscall 1141 | ||
134 | #define __NR_setfsuid 1142 | ||
135 | #define __NR_setfsgid 1143 | ||
136 | #define __NR_getdents 1144 | ||
137 | #define __NR_flock 1145 | ||
138 | #define __NR_readv 1146 | ||
139 | #define __NR_writev 1147 | ||
140 | #define __NR_pread64 1148 | ||
141 | #define __NR_pwrite64 1149 | ||
142 | #define __NR__sysctl 1150 | ||
143 | #define __NR_mmap 1151 | ||
144 | #define __NR_munmap 1152 | ||
145 | #define __NR_mlock 1153 | ||
146 | #define __NR_mlockall 1154 | ||
147 | #define __NR_mprotect 1155 | ||
148 | #define __NR_mremap 1156 | ||
149 | #define __NR_msync 1157 | ||
150 | #define __NR_munlock 1158 | ||
151 | #define __NR_munlockall 1159 | ||
152 | #define __NR_sched_getparam 1160 | ||
153 | #define __NR_sched_setparam 1161 | ||
154 | #define __NR_sched_getscheduler 1162 | ||
155 | #define __NR_sched_setscheduler 1163 | ||
156 | #define __NR_sched_yield 1164 | ||
157 | #define __NR_sched_get_priority_max 1165 | ||
158 | #define __NR_sched_get_priority_min 1166 | ||
159 | #define __NR_sched_rr_get_interval 1167 | ||
160 | #define __NR_nanosleep 1168 | ||
161 | #define __NR_nfsservctl 1169 | ||
162 | #define __NR_prctl 1170 | ||
163 | /* 1171 is reserved for backwards compatibility with old __NR_getpagesize */ | ||
164 | #define __NR_mmap2 1172 | ||
165 | #define __NR_pciconfig_read 1173 | ||
166 | #define __NR_pciconfig_write 1174 | ||
167 | #define __NR_perfmonctl 1175 | ||
168 | #define __NR_sigaltstack 1176 | ||
169 | #define __NR_rt_sigaction 1177 | ||
170 | #define __NR_rt_sigpending 1178 | ||
171 | #define __NR_rt_sigprocmask 1179 | ||
172 | #define __NR_rt_sigqueueinfo 1180 | ||
173 | #define __NR_rt_sigreturn 1181 | ||
174 | #define __NR_rt_sigsuspend 1182 | ||
175 | #define __NR_rt_sigtimedwait 1183 | ||
176 | #define __NR_getcwd 1184 | ||
177 | #define __NR_capget 1185 | ||
178 | #define __NR_capset 1186 | ||
179 | #define __NR_sendfile 1187 | ||
180 | #define __NR_getpmsg 1188 | ||
181 | #define __NR_putpmsg 1189 | ||
182 | #define __NR_socket 1190 | ||
183 | #define __NR_bind 1191 | ||
184 | #define __NR_connect 1192 | ||
185 | #define __NR_listen 1193 | ||
186 | #define __NR_accept 1194 | ||
187 | #define __NR_getsockname 1195 | ||
188 | #define __NR_getpeername 1196 | ||
189 | #define __NR_socketpair 1197 | ||
190 | #define __NR_send 1198 | ||
191 | #define __NR_sendto 1199 | ||
192 | #define __NR_recv 1200 | ||
193 | #define __NR_recvfrom 1201 | ||
194 | #define __NR_shutdown 1202 | ||
195 | #define __NR_setsockopt 1203 | ||
196 | #define __NR_getsockopt 1204 | ||
197 | #define __NR_sendmsg 1205 | ||
198 | #define __NR_recvmsg 1206 | ||
199 | #define __NR_pivot_root 1207 | ||
200 | #define __NR_mincore 1208 | ||
201 | #define __NR_madvise 1209 | ||
202 | #define __NR_stat 1210 | ||
203 | #define __NR_lstat 1211 | ||
204 | #define __NR_fstat 1212 | ||
205 | #define __NR_clone2 1213 | ||
206 | #define __NR_getdents64 1214 | ||
207 | #define __NR_getunwind 1215 | ||
208 | #define __NR_readahead 1216 | ||
209 | #define __NR_setxattr 1217 | ||
210 | #define __NR_lsetxattr 1218 | ||
211 | #define __NR_fsetxattr 1219 | ||
212 | #define __NR_getxattr 1220 | ||
213 | #define __NR_lgetxattr 1221 | ||
214 | #define __NR_fgetxattr 1222 | ||
215 | #define __NR_listxattr 1223 | ||
216 | #define __NR_llistxattr 1224 | ||
217 | #define __NR_flistxattr 1225 | ||
218 | #define __NR_removexattr 1226 | ||
219 | #define __NR_lremovexattr 1227 | ||
220 | #define __NR_fremovexattr 1228 | ||
221 | #define __NR_tkill 1229 | ||
222 | #define __NR_futex 1230 | ||
223 | #define __NR_sched_setaffinity 1231 | ||
224 | #define __NR_sched_getaffinity 1232 | ||
225 | #define __NR_set_tid_address 1233 | ||
226 | #define __NR_fadvise64 1234 | ||
227 | #define __NR_tgkill 1235 | ||
228 | #define __NR_exit_group 1236 | ||
229 | #define __NR_lookup_dcookie 1237 | ||
230 | #define __NR_io_setup 1238 | ||
231 | #define __NR_io_destroy 1239 | ||
232 | #define __NR_io_getevents 1240 | ||
233 | #define __NR_io_submit 1241 | ||
234 | #define __NR_io_cancel 1242 | ||
235 | #define __NR_epoll_create 1243 | ||
236 | #define __NR_epoll_ctl 1244 | ||
237 | #define __NR_epoll_wait 1245 | ||
238 | #define __NR_restart_syscall 1246 | ||
239 | #define __NR_semtimedop 1247 | ||
240 | #define __NR_timer_create 1248 | ||
241 | #define __NR_timer_settime 1249 | ||
242 | #define __NR_timer_gettime 1250 | ||
243 | #define __NR_timer_getoverrun 1251 | ||
244 | #define __NR_timer_delete 1252 | ||
245 | #define __NR_clock_settime 1253 | ||
246 | #define __NR_clock_gettime 1254 | ||
247 | #define __NR_clock_getres 1255 | ||
248 | #define __NR_clock_nanosleep 1256 | ||
249 | #define __NR_fstatfs64 1257 | ||
250 | #define __NR_statfs64 1258 | ||
251 | #define __NR_mbind 1259 | ||
252 | #define __NR_get_mempolicy 1260 | ||
253 | #define __NR_set_mempolicy 1261 | ||
254 | #define __NR_mq_open 1262 | ||
255 | #define __NR_mq_unlink 1263 | ||
256 | #define __NR_mq_timedsend 1264 | ||
257 | #define __NR_mq_timedreceive 1265 | ||
258 | #define __NR_mq_notify 1266 | ||
259 | #define __NR_mq_getsetattr 1267 | ||
260 | #define __NR_kexec_load 1268 | ||
261 | #define __NR_vserver 1269 | ||
262 | #define __NR_waitid 1270 | ||
263 | #define __NR_add_key 1271 | ||
264 | #define __NR_request_key 1272 | ||
265 | #define __NR_keyctl 1273 | ||
266 | #define __NR_ioprio_set 1274 | ||
267 | #define __NR_ioprio_get 1275 | ||
268 | #define __NR_move_pages 1276 | ||
269 | #define __NR_inotify_init 1277 | ||
270 | #define __NR_inotify_add_watch 1278 | ||
271 | #define __NR_inotify_rm_watch 1279 | ||
272 | #define __NR_migrate_pages 1280 | ||
273 | #define __NR_openat 1281 | ||
274 | #define __NR_mkdirat 1282 | ||
275 | #define __NR_mknodat 1283 | ||
276 | #define __NR_fchownat 1284 | ||
277 | #define __NR_futimesat 1285 | ||
278 | #define __NR_newfstatat 1286 | ||
279 | #define __NR_unlinkat 1287 | ||
280 | #define __NR_renameat 1288 | ||
281 | #define __NR_linkat 1289 | ||
282 | #define __NR_symlinkat 1290 | ||
283 | #define __NR_readlinkat 1291 | ||
284 | #define __NR_fchmodat 1292 | ||
285 | #define __NR_faccessat 1293 | ||
286 | #define __NR_pselect6 1294 | ||
287 | #define __NR_ppoll 1295 | ||
288 | #define __NR_unshare 1296 | ||
289 | #define __NR_splice 1297 | ||
290 | #define __NR_set_robust_list 1298 | ||
291 | #define __NR_get_robust_list 1299 | ||
292 | #define __NR_sync_file_range 1300 | ||
293 | #define __NR_tee 1301 | ||
294 | #define __NR_vmsplice 1302 | ||
295 | #define __NR_fallocate 1303 | ||
296 | #define __NR_getcpu 1304 | ||
297 | #define __NR_epoll_pwait 1305 | ||
298 | #define __NR_utimensat 1306 | ||
299 | #define __NR_signalfd 1307 | ||
300 | #define __NR_timerfd 1308 | ||
301 | #define __NR_eventfd 1309 | ||
302 | #define __NR_timerfd_create 1310 | ||
303 | #define __NR_timerfd_settime 1311 | ||
304 | #define __NR_timerfd_gettime 1312 | ||
305 | #define __NR_signalfd4 1313 | ||
306 | #define __NR_eventfd2 1314 | ||
307 | #define __NR_epoll_create1 1315 | ||
308 | #define __NR_dup3 1316 | ||
309 | #define __NR_pipe2 1317 | ||
310 | #define __NR_inotify_init1 1318 | ||
311 | #define __NR_preadv 1319 | ||
312 | #define __NR_pwritev 1320 | ||
313 | #define __NR_rt_tgsigqueueinfo 1321 | ||
314 | #define __NR_recvmmsg 1322 | ||
315 | #define __NR_fanotify_init 1323 | ||
316 | #define __NR_fanotify_mark 1324 | ||
317 | #define __NR_prlimit64 1325 | ||
318 | #define __NR_name_to_handle_at 1326 | ||
319 | #define __NR_open_by_handle_at 1327 | ||
320 | #define __NR_clock_adjtime 1328 | ||
321 | #define __NR_syncfs 1329 | ||
322 | #define __NR_setns 1330 | ||
323 | #define __NR_sendmmsg 1331 | ||
324 | #define __NR_process_vm_readv 1332 | ||
325 | #define __NR_process_vm_writev 1333 | ||
326 | #define __NR_accept4 1334 | ||
327 | |||
328 | #endif /* _UAPI_ASM_IA64_UNISTD_H */ | ||
diff --git a/arch/ia64/include/uapi/asm/ustack.h b/arch/ia64/include/uapi/asm/ustack.h new file mode 100644 index 00000000000..1dfebc62269 --- /dev/null +++ b/arch/ia64/include/uapi/asm/ustack.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef _UAPI_ASM_IA64_USTACK_H | ||
2 | #define _UAPI_ASM_IA64_USTACK_H | ||
3 | |||
4 | /* | ||
5 | * Constants for the user stack size | ||
6 | */ | ||
7 | |||
8 | |||
9 | /* Make a default stack size of 2GiB */ | ||
10 | #define DEFAULT_USER_STACK_SIZE (1UL << 31) | ||
11 | |||
12 | #endif /* _UAPI_ASM_IA64_USTACK_H */ | ||
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index ee31fe9b310..35e106f2ed1 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -614,14 +614,14 @@ sys_execve (const char __user *filename, | |||
614 | const char __user *const __user *envp, | 614 | const char __user *const __user *envp, |
615 | struct pt_regs *regs) | 615 | struct pt_regs *regs) |
616 | { | 616 | { |
617 | char *fname; | 617 | struct filename *fname; |
618 | int error; | 618 | int error; |
619 | 619 | ||
620 | fname = getname(filename); | 620 | fname = getname(filename); |
621 | error = PTR_ERR(fname); | 621 | error = PTR_ERR(fname); |
622 | if (IS_ERR(fname)) | 622 | if (IS_ERR(fname)) |
623 | goto out; | 623 | goto out; |
624 | error = do_execve(fname, argv, envp, regs); | 624 | error = do_execve(fname->name, argv, envp, regs); |
625 | putname(fname); | 625 | putname(fname); |
626 | out: | 626 | out: |
627 | return error; | 627 | return error; |
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c index 37dd79511cb..680b73786be 100644 --- a/arch/ia64/kernel/signal.c +++ b/arch/ia64/kernel/signal.c | |||
@@ -438,14 +438,6 @@ ia64_do_signal (struct sigscratch *scr, long in_syscall) | |||
438 | long errno = scr->pt.r8; | 438 | long errno = scr->pt.r8; |
439 | 439 | ||
440 | /* | 440 | /* |
441 | * In the ia64_leave_kernel code path, we want the common case to go fast, which | ||
442 | * is why we may in certain cases get here from kernel mode. Just return without | ||
443 | * doing anything if so. | ||
444 | */ | ||
445 | if (!user_mode(&scr->pt)) | ||
446 | return; | ||
447 | |||
448 | /* | ||
449 | * This only loops in the rare cases of handle_signal() failing, in which case we | 441 | * This only loops in the rare cases of handle_signal() failing, in which case we |
450 | * need to push through a forced SIGSEGV. | 442 | * need to push through a forced SIGSEGV. |
451 | */ | 443 | */ |
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 80ff9acc5ed..f6388216080 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/efi.h> | 20 | #include <linux/efi.h> |
21 | #include <linux/timex.h> | 21 | #include <linux/timex.h> |
22 | #include <linux/clocksource.h> | 22 | #include <linux/timekeeper_internal.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | 24 | ||
25 | #include <asm/machvec.h> | 25 | #include <asm/machvec.h> |
@@ -454,7 +454,7 @@ void update_vsyscall_tz(void) | |||
454 | { | 454 | { |
455 | } | 455 | } |
456 | 456 | ||
457 | void update_vsyscall(struct timespec *wall, struct timespec *wtm, | 457 | void update_vsyscall_old(struct timespec *wall, struct timespec *wtm, |
458 | struct clocksource *c, u32 mult) | 458 | struct clocksource *c, u32 mult) |
459 | { | 459 | { |
460 | write_seqcount_begin(&fsyscall_gtod_data.seq); | 460 | write_seqcount_begin(&fsyscall_gtod_data.seq); |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index e875fc3ce9c..f807721e19a 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -14,6 +14,7 @@ config M32R | |||
14 | select GENERIC_IRQ_SHOW | 14 | select GENERIC_IRQ_SHOW |
15 | select GENERIC_ATOMIC64 | 15 | select GENERIC_ATOMIC64 |
16 | select ARCH_USES_GETTIMEOFFSET | 16 | select ARCH_USES_GETTIMEOFFSET |
17 | select MODULES_USE_ELF_RELA | ||
17 | 18 | ||
18 | config SBUS | 19 | config SBUS |
19 | bool | 20 | bool |
diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild index fccd81eddff..50bbf387b2f 100644 --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild | |||
@@ -2,3 +2,4 @@ include include/asm-generic/Kbuild.asm | |||
2 | 2 | ||
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += exec.h | 4 | generic-y += exec.h |
5 | generic-y += module.h | ||
diff --git a/arch/m32r/include/asm/module.h b/arch/m32r/include/asm/module.h deleted file mode 100644 index eb73ee01121..00000000000 --- a/arch/m32r/include/asm/module.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_MODULE_H | ||
2 | #define _ASM_M32R_MODULE_H | ||
3 | |||
4 | struct mod_arch_specific { }; | ||
5 | |||
6 | #define Elf_Shdr Elf32_Shdr | ||
7 | #define Elf_Sym Elf32_Sym | ||
8 | #define Elf_Ehdr Elf32_Ehdr | ||
9 | |||
10 | #endif /* _ASM_M32R_MODULE_H */ | ||
diff --git a/arch/m32r/include/asm/thread_info.h b/arch/m32r/include/asm/thread_info.h index c083f6073ef..c074f4c2e85 100644 --- a/arch/m32r/include/asm/thread_info.h +++ b/arch/m32r/include/asm/thread_info.h | |||
@@ -119,25 +119,20 @@ static inline unsigned int get_thread_fault_code(void) | |||
119 | #define TIF_SIGPENDING 1 /* signal pending */ | 119 | #define TIF_SIGPENDING 1 /* signal pending */ |
120 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 120 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
121 | #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ | 121 | #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ |
122 | #define TIF_IRET 4 /* return with iret */ | ||
123 | #define TIF_NOTIFY_RESUME 5 /* callback before returning to user */ | 122 | #define TIF_NOTIFY_RESUME 5 /* callback before returning to user */ |
124 | #define TIF_RESTORE_SIGMASK 8 /* restore signal mask in do_signal() */ | 123 | #define TIF_RESTORE_SIGMASK 8 /* restore signal mask in do_signal() */ |
125 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 124 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
126 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | ||
127 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 125 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
128 | 126 | ||
129 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 127 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
130 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 128 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
131 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 129 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
132 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 130 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
133 | #define _TIF_IRET (1<<TIF_IRET) | ||
134 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 131 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
135 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
136 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 132 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
137 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
138 | 133 | ||
139 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 134 | #define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_NOTIFY_RESUME) |
140 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ | 135 | #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK | _TIF_SYSCALL_TRACE) |
141 | 136 | ||
142 | /* | 137 | /* |
143 | * Thread-synchronous status. | 138 | * Thread-synchronous status. |
diff --git a/arch/m32r/kernel/module.c b/arch/m32r/kernel/module.c index 3071fe83ffc..38233b6596b 100644 --- a/arch/m32r/kernel/module.c +++ b/arch/m32r/kernel/module.c | |||
@@ -201,18 +201,3 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
201 | } | 201 | } |
202 | return 0; | 202 | return 0; |
203 | } | 203 | } |
204 | |||
205 | int apply_relocate(Elf32_Shdr *sechdrs, | ||
206 | const char *strtab, | ||
207 | unsigned int symindex, | ||
208 | unsigned int relsec, | ||
209 | struct module *me) | ||
210 | { | ||
211 | #if 0 | ||
212 | printk(KERN_ERR "module %s: REL RELOCATION unsupported\n", | ||
213 | me->name); | ||
214 | return -ENOEXEC; | ||
215 | #endif | ||
216 | return 0; | ||
217 | |||
218 | } | ||
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index 384e63f3a4c..e7366276ef3 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c | |||
@@ -296,14 +296,14 @@ asmlinkage int sys_execve(const char __user *ufilename, | |||
296 | unsigned long r6, struct pt_regs regs) | 296 | unsigned long r6, struct pt_regs regs) |
297 | { | 297 | { |
298 | int error; | 298 | int error; |
299 | char *filename; | 299 | struct filename *filename; |
300 | 300 | ||
301 | filename = getname(ufilename); | 301 | filename = getname(ufilename); |
302 | error = PTR_ERR(filename); | 302 | error = PTR_ERR(filename); |
303 | if (IS_ERR(filename)) | 303 | if (IS_ERR(filename)) |
304 | goto out; | 304 | goto out; |
305 | 305 | ||
306 | error = do_execve(filename, uargv, uenvp, ®s); | 306 | error = do_execve(filename->name, uargv, uenvp, ®s); |
307 | putname(filename); | 307 | putname(filename); |
308 | out: | 308 | out: |
309 | return error; | 309 | return error; |
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index d0f60b97bbc..6e3c26a1607 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/unistd.h> | 20 | #include <linux/unistd.h> |
21 | #include <linux/stddef.h> | 21 | #include <linux/stddef.h> |
22 | #include <linux/personality.h> | 22 | #include <linux/personality.h> |
23 | #include <linux/freezer.h> | ||
24 | #include <linux/tracehook.h> | 23 | #include <linux/tracehook.h> |
25 | #include <asm/cacheflush.h> | 24 | #include <asm/cacheflush.h> |
26 | #include <asm/ucontext.h> | 25 | #include <asm/ucontext.h> |
@@ -366,6 +365,4 @@ void do_notify_resume(struct pt_regs *regs, __u32 thread_info_flags) | |||
366 | clear_thread_flag(TIF_NOTIFY_RESUME); | 365 | clear_thread_flag(TIF_NOTIFY_RESUME); |
367 | tracehook_notify_resume(regs); | 366 | tracehook_notify_resume(regs); |
368 | } | 367 | } |
369 | |||
370 | clear_thread_flag(TIF_IRET); | ||
371 | } | 368 | } |
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index dae1e7e16a3..e7c161433ea 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -15,6 +15,10 @@ config M68K | |||
15 | select FPU if MMU | 15 | select FPU if MMU |
16 | select ARCH_WANT_IPC_PARSE_VERSION | 16 | select ARCH_WANT_IPC_PARSE_VERSION |
17 | select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE | 17 | select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE |
18 | select GENERIC_KERNEL_THREAD | ||
19 | select HAVE_MOD_ARCH_SPECIFIC | ||
20 | select MODULES_USE_ELF_REL | ||
21 | select MODULES_USE_ELF_RELA | ||
18 | 22 | ||
19 | config RWSEM_GENERIC_SPINLOCK | 23 | config RWSEM_GENERIC_SPINLOCK |
20 | bool | 24 | bool |
diff --git a/arch/m68k/include/asm/module.h b/arch/m68k/include/asm/module.h index edffe66b7f4..8b58fce843d 100644 --- a/arch/m68k/include/asm/module.h +++ b/arch/m68k/include/asm/module.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ASM_M68K_MODULE_H | 1 | #ifndef _ASM_M68K_MODULE_H |
2 | #define _ASM_M68K_MODULE_H | 2 | #define _ASM_M68K_MODULE_H |
3 | 3 | ||
4 | #include <asm-generic/module.h> | ||
5 | |||
4 | enum m68k_fixup_type { | 6 | enum m68k_fixup_type { |
5 | m68k_fixup_memoffset, | 7 | m68k_fixup_memoffset, |
6 | m68k_fixup_vnode_shift, | 8 | m68k_fixup_vnode_shift, |
@@ -36,8 +38,4 @@ struct module; | |||
36 | extern void module_fixup(struct module *mod, struct m68k_fixup_info *start, | 38 | extern void module_fixup(struct module *mod, struct m68k_fixup_info *start, |
37 | struct m68k_fixup_info *end); | 39 | struct m68k_fixup_info *end); |
38 | 40 | ||
39 | #define Elf_Shdr Elf32_Shdr | ||
40 | #define Elf_Sym Elf32_Sym | ||
41 | #define Elf_Ehdr Elf32_Ehdr | ||
42 | |||
43 | #endif /* _ASM_M68K_MODULE_H */ | 41 | #endif /* _ASM_M68K_MODULE_H */ |
diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h index f17c42aff7f..ae700f49e51 100644 --- a/arch/m68k/include/asm/processor.h +++ b/arch/m68k/include/asm/processor.h | |||
@@ -100,6 +100,16 @@ struct thread_struct { | |||
100 | .fs = __KERNEL_DS, \ | 100 | .fs = __KERNEL_DS, \ |
101 | } | 101 | } |
102 | 102 | ||
103 | /* | ||
104 | * ColdFire stack format sbould be 0x4 for an aligned usp (will always be | ||
105 | * true on thread creation). We need to set this explicitly. | ||
106 | */ | ||
107 | #ifdef CONFIG_COLDFIRE | ||
108 | #define setframeformat(_regs) do { (_regs)->format = 0x4; } while(0) | ||
109 | #else | ||
110 | #define setframeformat(_regs) do { } while (0) | ||
111 | #endif | ||
112 | |||
103 | #ifdef CONFIG_MMU | 113 | #ifdef CONFIG_MMU |
104 | /* | 114 | /* |
105 | * Do necessary setup to start up a newly executed thread. | 115 | * Do necessary setup to start up a newly executed thread. |
@@ -109,6 +119,7 @@ static inline void start_thread(struct pt_regs * regs, unsigned long pc, | |||
109 | { | 119 | { |
110 | regs->pc = pc; | 120 | regs->pc = pc; |
111 | regs->sr &= ~0x2000; | 121 | regs->sr &= ~0x2000; |
122 | setframeformat(regs); | ||
112 | wrusp(usp); | 123 | wrusp(usp); |
113 | } | 124 | } |
114 | 125 | ||
@@ -116,21 +127,11 @@ extern int handle_kernel_fault(struct pt_regs *regs); | |||
116 | 127 | ||
117 | #else | 128 | #else |
118 | 129 | ||
119 | /* | ||
120 | * Coldfire stacks need to be re-aligned on trap exit, conventional | ||
121 | * 68k can handle this case cleanly. | ||
122 | */ | ||
123 | #ifdef CONFIG_COLDFIRE | ||
124 | #define reformat(_regs) do { (_regs)->format = 0x4; } while(0) | ||
125 | #else | ||
126 | #define reformat(_regs) do { } while (0) | ||
127 | #endif | ||
128 | |||
129 | #define start_thread(_regs, _pc, _usp) \ | 130 | #define start_thread(_regs, _pc, _usp) \ |
130 | do { \ | 131 | do { \ |
131 | (_regs)->pc = (_pc); \ | 132 | (_regs)->pc = (_pc); \ |
132 | ((struct switch_stack *)(_regs))[-1].a6 = 0; \ | 133 | ((struct switch_stack *)(_regs))[-1].a6 = 0; \ |
133 | reformat(_regs); \ | 134 | setframeformat(_regs); \ |
134 | if (current->mm) \ | 135 | if (current->mm) \ |
135 | (_regs)->d5 = current->mm->start_data; \ | 136 | (_regs)->d5 = current->mm->start_data; \ |
136 | (_regs)->sr &= ~0x2000; \ | 137 | (_regs)->sr &= ~0x2000; \ |
@@ -153,8 +154,6 @@ static inline void release_thread(struct task_struct *dead_task) | |||
153 | { | 154 | { |
154 | } | 155 | } |
155 | 156 | ||
156 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | ||
157 | |||
158 | /* | 157 | /* |
159 | * Free current thread data structures etc.. | 158 | * Free current thread data structures etc.. |
160 | */ | 159 | */ |
diff --git a/arch/m68k/include/asm/ptrace.h b/arch/m68k/include/asm/ptrace.h index 65322b17b6c..5e08b597f01 100644 --- a/arch/m68k/include/asm/ptrace.h +++ b/arch/m68k/include/asm/ptrace.h | |||
@@ -85,6 +85,8 @@ struct switch_stack { | |||
85 | #define user_mode(regs) (!((regs)->sr & PS_S)) | 85 | #define user_mode(regs) (!((regs)->sr & PS_S)) |
86 | #define instruction_pointer(regs) ((regs)->pc) | 86 | #define instruction_pointer(regs) ((regs)->pc) |
87 | #define profile_pc(regs) instruction_pointer(regs) | 87 | #define profile_pc(regs) instruction_pointer(regs) |
88 | #define current_pt_regs() \ | ||
89 | (struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1 | ||
88 | 90 | ||
89 | #define arch_has_single_step() (1) | 91 | #define arch_has_single_step() (1) |
90 | 92 | ||
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 045cfd6a9e3..c702ad71679 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h | |||
@@ -382,6 +382,8 @@ | |||
382 | #define __ARCH_WANT_SYS_SIGPROCMASK | 382 | #define __ARCH_WANT_SYS_SIGPROCMASK |
383 | #define __ARCH_WANT_SYS_RT_SIGACTION | 383 | #define __ARCH_WANT_SYS_RT_SIGACTION |
384 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 384 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
385 | #define __ARCH_WANT_SYS_EXECVE | ||
386 | #define __ARCH_WANT_KERNEL_EXECVE | ||
385 | 387 | ||
386 | /* | 388 | /* |
387 | * "Conditional" syscalls | 389 | * "Conditional" syscalls |
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index 165ee9f9d5c..946cb018775 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S | |||
@@ -111,6 +111,22 @@ ENTRY(ret_from_fork) | |||
111 | addql #4,%sp | 111 | addql #4,%sp |
112 | jra ret_from_exception | 112 | jra ret_from_exception |
113 | 113 | ||
114 | ENTRY(ret_from_kernel_thread) | ||
115 | | a3 contains the kernel thread payload, d7 - its argument | ||
116 | movel %d1,%sp@- | ||
117 | jsr schedule_tail | ||
118 | GET_CURRENT(%d0) | ||
119 | movel %d7,(%sp) | ||
120 | jsr %a3@ | ||
121 | addql #4,%sp | ||
122 | movel %d0,(%sp) | ||
123 | jra sys_exit | ||
124 | |||
125 | ENTRY(ret_from_kernel_execve) | ||
126 | movel 4(%sp), %sp | ||
127 | GET_CURRENT(%d0) | ||
128 | jra ret_from_exception | ||
129 | |||
114 | #if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU) | 130 | #if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU) |
115 | 131 | ||
116 | #ifdef TRAP_DBG_INTERRUPT | 132 | #ifdef TRAP_DBG_INTERRUPT |
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index ac2892e49c7..c51bb172e14 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | 36 | ||
37 | asmlinkage void ret_from_fork(void); | 37 | asmlinkage void ret_from_fork(void); |
38 | asmlinkage void ret_from_kernel_thread(void); | ||
38 | 39 | ||
39 | 40 | ||
40 | /* | 41 | /* |
@@ -123,51 +124,6 @@ void show_regs(struct pt_regs * regs) | |||
123 | printk("USP: %08lx\n", rdusp()); | 124 | printk("USP: %08lx\n", rdusp()); |
124 | } | 125 | } |
125 | 126 | ||
126 | /* | ||
127 | * Create a kernel thread | ||
128 | */ | ||
129 | int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | ||
130 | { | ||
131 | int pid; | ||
132 | mm_segment_t fs; | ||
133 | |||
134 | fs = get_fs(); | ||
135 | set_fs (KERNEL_DS); | ||
136 | |||
137 | { | ||
138 | register long retval __asm__ ("d0"); | ||
139 | register long clone_arg __asm__ ("d1") = flags | CLONE_VM | CLONE_UNTRACED; | ||
140 | |||
141 | retval = __NR_clone; | ||
142 | __asm__ __volatile__ | ||
143 | ("clrl %%d2\n\t" | ||
144 | "trap #0\n\t" /* Linux/m68k system call */ | ||
145 | "tstl %0\n\t" /* child or parent */ | ||
146 | "jne 1f\n\t" /* parent - jump */ | ||
147 | #ifdef CONFIG_MMU | ||
148 | "lea %%sp@(%c7),%6\n\t" /* reload current */ | ||
149 | "movel %6@,%6\n\t" | ||
150 | #endif | ||
151 | "movel %3,%%sp@-\n\t" /* push argument */ | ||
152 | "jsr %4@\n\t" /* call fn */ | ||
153 | "movel %0,%%d1\n\t" /* pass exit value */ | ||
154 | "movel %2,%%d0\n\t" /* exit */ | ||
155 | "trap #0\n" | ||
156 | "1:" | ||
157 | : "+d" (retval) | ||
158 | : "i" (__NR_clone), "i" (__NR_exit), | ||
159 | "r" (arg), "a" (fn), "d" (clone_arg), "r" (current), | ||
160 | "i" (-THREAD_SIZE) | ||
161 | : "d2"); | ||
162 | |||
163 | pid = retval; | ||
164 | } | ||
165 | |||
166 | set_fs (fs); | ||
167 | return pid; | ||
168 | } | ||
169 | EXPORT_SYMBOL(kernel_thread); | ||
170 | |||
171 | void flush_thread(void) | 127 | void flush_thread(void) |
172 | { | 128 | { |
173 | current->thread.fs = __USER_DS; | 129 | current->thread.fs = __USER_DS; |
@@ -219,30 +175,18 @@ asmlinkage int m68k_clone(struct pt_regs *regs) | |||
219 | } | 175 | } |
220 | 176 | ||
221 | int copy_thread(unsigned long clone_flags, unsigned long usp, | 177 | int copy_thread(unsigned long clone_flags, unsigned long usp, |
222 | unsigned long unused, | 178 | unsigned long arg, |
223 | struct task_struct * p, struct pt_regs * regs) | 179 | struct task_struct * p, struct pt_regs * regs) |
224 | { | 180 | { |
225 | struct pt_regs * childregs; | 181 | struct pt_regs * childregs; |
226 | struct switch_stack * childstack, *stack; | 182 | struct switch_stack *childstack; |
227 | unsigned long *retp; | ||
228 | 183 | ||
229 | childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1; | 184 | childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1; |
230 | |||
231 | *childregs = *regs; | ||
232 | childregs->d0 = 0; | ||
233 | |||
234 | retp = ((unsigned long *) regs); | ||
235 | stack = ((struct switch_stack *) retp) - 1; | ||
236 | |||
237 | childstack = ((struct switch_stack *) childregs) - 1; | 185 | childstack = ((struct switch_stack *) childregs) - 1; |
238 | *childstack = *stack; | ||
239 | childstack->retpc = (unsigned long)ret_from_fork; | ||
240 | 186 | ||
241 | p->thread.usp = usp; | 187 | p->thread.usp = usp; |
242 | p->thread.ksp = (unsigned long)childstack; | 188 | p->thread.ksp = (unsigned long)childstack; |
243 | 189 | p->thread.esp0 = (unsigned long)childregs; | |
244 | if (clone_flags & CLONE_SETTLS) | ||
245 | task_thread_info(p)->tp_value = regs->d5; | ||
246 | 190 | ||
247 | /* | 191 | /* |
248 | * Must save the current SFC/DFC value, NOT the value when | 192 | * Must save the current SFC/DFC value, NOT the value when |
@@ -250,6 +194,26 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
250 | */ | 194 | */ |
251 | p->thread.fs = get_fs().seg; | 195 | p->thread.fs = get_fs().seg; |
252 | 196 | ||
197 | if (unlikely(!regs)) { | ||
198 | /* kernel thread */ | ||
199 | memset(childstack, 0, | ||
200 | sizeof(struct switch_stack) + sizeof(struct pt_regs)); | ||
201 | childregs->sr = PS_S; | ||
202 | childstack->a3 = usp; /* function */ | ||
203 | childstack->d7 = arg; | ||
204 | childstack->retpc = (unsigned long)ret_from_kernel_thread; | ||
205 | p->thread.usp = 0; | ||
206 | return 0; | ||
207 | } | ||
208 | *childregs = *regs; | ||
209 | childregs->d0 = 0; | ||
210 | |||
211 | *childstack = ((struct switch_stack *) regs)[-1]; | ||
212 | childstack->retpc = (unsigned long)ret_from_fork; | ||
213 | |||
214 | if (clone_flags & CLONE_SETTLS) | ||
215 | task_thread_info(p)->tp_value = regs->d5; | ||
216 | |||
253 | #ifdef CONFIG_FPU | 217 | #ifdef CONFIG_FPU |
254 | if (!FPU_IS_EMU) { | 218 | if (!FPU_IS_EMU) { |
255 | /* Copy the current fpu state */ | 219 | /* Copy the current fpu state */ |
@@ -337,26 +301,6 @@ int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu) | |||
337 | EXPORT_SYMBOL(dump_fpu); | 301 | EXPORT_SYMBOL(dump_fpu); |
338 | #endif /* CONFIG_FPU */ | 302 | #endif /* CONFIG_FPU */ |
339 | 303 | ||
340 | /* | ||
341 | * sys_execve() executes a new program. | ||
342 | */ | ||
343 | asmlinkage int sys_execve(const char __user *name, | ||
344 | const char __user *const __user *argv, | ||
345 | const char __user *const __user *envp) | ||
346 | { | ||
347 | int error; | ||
348 | char * filename; | ||
349 | struct pt_regs *regs = (struct pt_regs *) &name; | ||
350 | |||
351 | filename = getname(name); | ||
352 | error = PTR_ERR(filename); | ||
353 | if (IS_ERR(filename)) | ||
354 | return error; | ||
355 | error = do_execve(filename, argv, envp, regs); | ||
356 | putname(filename); | ||
357 | return error; | ||
358 | } | ||
359 | |||
360 | unsigned long get_wchan(struct task_struct *p) | 304 | unsigned long get_wchan(struct task_struct *p) |
361 | { | 305 | { |
362 | unsigned long fp, pc; | 306 | unsigned long fp, pc; |
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c index 9a5932ec368..3a480b3df0d 100644 --- a/arch/m68k/kernel/sys_m68k.c +++ b/arch/m68k/kernel/sys_m68k.c | |||
@@ -549,23 +549,6 @@ asmlinkage int sys_getpagesize(void) | |||
549 | return PAGE_SIZE; | 549 | return PAGE_SIZE; |
550 | } | 550 | } |
551 | 551 | ||
552 | /* | ||
553 | * Do a system call from kernel instead of calling sys_execve so we | ||
554 | * end up with proper pt_regs. | ||
555 | */ | ||
556 | int kernel_execve(const char *filename, | ||
557 | const char *const argv[], | ||
558 | const char *const envp[]) | ||
559 | { | ||
560 | register long __res asm ("%d0") = __NR_execve; | ||
561 | register long __a asm ("%d1") = (long)(filename); | ||
562 | register long __b asm ("%d2") = (long)(argv); | ||
563 | register long __c asm ("%d3") = (long)(envp); | ||
564 | asm volatile ("trap #0" : "+d" (__res) | ||
565 | : "d" (__a), "d" (__b), "d" (__c)); | ||
566 | return __res; | ||
567 | } | ||
568 | |||
569 | asmlinkage unsigned long sys_get_thread_area(void) | 552 | asmlinkage unsigned long sys_get_thread_area(void) |
570 | { | 553 | { |
571 | return current_thread_info()->tp_value; | 554 | return current_thread_info()->tp_value; |
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 53fd94ab60f..4cba7439f9d 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -25,6 +25,7 @@ config MICROBLAZE | |||
25 | select GENERIC_CPU_DEVICES | 25 | select GENERIC_CPU_DEVICES |
26 | select GENERIC_ATOMIC64 | 26 | select GENERIC_ATOMIC64 |
27 | select GENERIC_CLOCKEVENTS | 27 | select GENERIC_CLOCKEVENTS |
28 | select MODULES_USE_ELF_RELA | ||
28 | 29 | ||
29 | config SWAP | 30 | config SWAP |
30 | def_bool n | 31 | def_bool n |
diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h index 6c610234ffa..008f30433d2 100644 --- a/arch/microblaze/include/asm/thread_info.h +++ b/arch/microblaze/include/asm/thread_info.h | |||
@@ -121,7 +121,6 @@ static inline struct thread_info *current_thread_info(void) | |||
121 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 121 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
122 | /* restore singlestep on return to user mode */ | 122 | /* restore singlestep on return to user mode */ |
123 | #define TIF_SINGLESTEP 4 | 123 | #define TIF_SINGLESTEP 4 |
124 | #define TIF_IRET 5 /* return with iret */ | ||
125 | #define TIF_MEMDIE 6 /* is terminating due to OOM killer */ | 124 | #define TIF_MEMDIE 6 /* is terminating due to OOM killer */ |
126 | #define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */ | 125 | #define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */ |
127 | #define TIF_SECCOMP 10 /* secure computing */ | 126 | #define TIF_SECCOMP 10 /* secure computing */ |
@@ -134,7 +133,6 @@ static inline struct thread_info *current_thread_info(void) | |||
134 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 133 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
135 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 134 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
136 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 135 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
137 | #define _TIF_IRET (1 << TIF_IRET) | ||
138 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 136 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
139 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 137 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
140 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 138 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
@@ -184,6 +182,7 @@ static inline bool test_and_clear_restore_sigmask(void) | |||
184 | ti->status &= ~TS_RESTORE_SIGMASK; | 182 | ti->status &= ~TS_RESTORE_SIGMASK; |
185 | return true; | 183 | return true; |
186 | } | 184 | } |
185 | #define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) | ||
187 | #endif | 186 | #endif |
188 | 187 | ||
189 | #endif /* __KERNEL__ */ | 188 | #endif /* __KERNEL__ */ |
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c index c1220dbf87c..3847e5b9c60 100644 --- a/arch/microblaze/kernel/signal.c +++ b/arch/microblaze/kernel/signal.c | |||
@@ -254,10 +254,6 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
254 | 254 | ||
255 | set_fs(USER_DS); | 255 | set_fs(USER_DS); |
256 | 256 | ||
257 | /* the tracer may want to single-step inside the handler */ | ||
258 | if (test_thread_flag(TIF_SINGLESTEP)) | ||
259 | ptrace_notify(SIGTRAP); | ||
260 | |||
261 | #ifdef DEBUG_SIG | 257 | #ifdef DEBUG_SIG |
262 | printk(KERN_INFO "SIG deliver (%s:%d): sp=%p pc=%08lx\n", | 258 | printk(KERN_INFO "SIG deliver (%s:%d): sp=%p pc=%08lx\n", |
263 | current->comm, current->pid, frame, regs->pc); | 259 | current->comm, current->pid, frame, regs->pc); |
@@ -315,7 +311,8 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, | |||
315 | if (ret) | 311 | if (ret) |
316 | return; | 312 | return; |
317 | 313 | ||
318 | signal_delivered(sig, info, ka, regs, 0); | 314 | signal_delivered(sig, info, ka, regs, |
315 | test_thread_flag(TIF_SINGLESTEP)); | ||
319 | } | 316 | } |
320 | 317 | ||
321 | /* | 318 | /* |
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c index e5b154f24f8..404c0f24bd4 100644 --- a/arch/microblaze/kernel/sys_microblaze.c +++ b/arch/microblaze/kernel/sys_microblaze.c | |||
@@ -54,13 +54,13 @@ asmlinkage long microblaze_execve(const char __user *filenamei, | |||
54 | struct pt_regs *regs) | 54 | struct pt_regs *regs) |
55 | { | 55 | { |
56 | int error; | 56 | int error; |
57 | char *filename; | 57 | struct filename *filename; |
58 | 58 | ||
59 | filename = getname(filenamei); | 59 | filename = getname(filenamei); |
60 | error = PTR_ERR(filename); | 60 | error = PTR_ERR(filename); |
61 | if (IS_ERR(filename)) | 61 | if (IS_ERR(filename)) |
62 | goto out; | 62 | goto out; |
63 | error = do_execve(filename, argv, envp, regs); | 63 | error = do_execve(filename->name, argv, envp, regs); |
64 | putname(filename); | 64 | putname(filename); |
65 | out: | 65 | out: |
66 | return error; | 66 | return error; |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 3803696e635..dba9390d37c 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -37,6 +37,9 @@ config MIPS | |||
37 | select BUILDTIME_EXTABLE_SORT | 37 | select BUILDTIME_EXTABLE_SORT |
38 | select GENERIC_CLOCKEVENTS | 38 | select GENERIC_CLOCKEVENTS |
39 | select GENERIC_CMOS_UPDATE | 39 | select GENERIC_CMOS_UPDATE |
40 | select HAVE_MOD_ARCH_SPECIFIC | ||
41 | select MODULES_USE_ELF_REL | ||
42 | select MODULES_USE_ELF_RELA if 64BIT | ||
40 | 43 | ||
41 | menu "Machine selection" | 44 | menu "Machine selection" |
42 | 45 | ||
diff --git a/arch/mips/include/asm/module.h b/arch/mips/include/asm/module.h index dca8bce8c7a..26137da1c71 100644 --- a/arch/mips/include/asm/module.h +++ b/arch/mips/include/asm/module.h | |||
@@ -35,11 +35,14 @@ typedef struct { | |||
35 | } Elf64_Mips_Rela; | 35 | } Elf64_Mips_Rela; |
36 | 36 | ||
37 | #ifdef CONFIG_32BIT | 37 | #ifdef CONFIG_32BIT |
38 | |||
39 | #define Elf_Shdr Elf32_Shdr | 38 | #define Elf_Shdr Elf32_Shdr |
40 | #define Elf_Sym Elf32_Sym | 39 | #define Elf_Sym Elf32_Sym |
41 | #define Elf_Ehdr Elf32_Ehdr | 40 | #define Elf_Ehdr Elf32_Ehdr |
42 | #define Elf_Addr Elf32_Addr | 41 | #define Elf_Addr Elf32_Addr |
42 | #define Elf_Rel Elf32_Rel | ||
43 | #define Elf_Rela Elf32_Rela | ||
44 | #define ELF_R_TYPE(X) ELF32_R_TYPE(X) | ||
45 | #define ELF_R_SYM(X) ELF32_R_SYM(X) | ||
43 | 46 | ||
44 | #define Elf_Mips_Rel Elf32_Rel | 47 | #define Elf_Mips_Rel Elf32_Rel |
45 | #define Elf_Mips_Rela Elf32_Rela | 48 | #define Elf_Mips_Rela Elf32_Rela |
@@ -50,11 +53,14 @@ typedef struct { | |||
50 | #endif | 53 | #endif |
51 | 54 | ||
52 | #ifdef CONFIG_64BIT | 55 | #ifdef CONFIG_64BIT |
53 | |||
54 | #define Elf_Shdr Elf64_Shdr | 56 | #define Elf_Shdr Elf64_Shdr |
55 | #define Elf_Sym Elf64_Sym | 57 | #define Elf_Sym Elf64_Sym |
56 | #define Elf_Ehdr Elf64_Ehdr | 58 | #define Elf_Ehdr Elf64_Ehdr |
57 | #define Elf_Addr Elf64_Addr | 59 | #define Elf_Addr Elf64_Addr |
60 | #define Elf_Rel Elf64_Rel | ||
61 | #define Elf_Rela Elf64_Rela | ||
62 | #define ELF_R_TYPE(X) ELF64_R_TYPE(X) | ||
63 | #define ELF_R_SYM(X) ELF64_R_SYM(X) | ||
58 | 64 | ||
59 | #define Elf_Mips_Rel Elf64_Mips_Rel | 65 | #define Elf_Mips_Rel Elf64_Mips_Rel |
60 | #define Elf_Mips_Rela Elf64_Mips_Rela | 66 | #define Elf_Mips_Rela Elf64_Mips_Rela |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index 946e010f201..8debe9e9175 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
@@ -103,7 +103,6 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
103 | #define TIF_NOTIFY_RESUME 5 /* callback before returning to user */ | 103 | #define TIF_NOTIFY_RESUME 5 /* callback before returning to user */ |
104 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | 104 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ |
105 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 105 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
106 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | ||
107 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 106 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
108 | #define TIF_FIXADE 20 /* Fix address errors in software */ | 107 | #define TIF_FIXADE 20 /* Fix address errors in software */ |
109 | #define TIF_LOGADE 21 /* Log address errors to syslog */ | 108 | #define TIF_LOGADE 21 /* Log address errors to syslog */ |
@@ -125,9 +124,7 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
125 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 124 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
126 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 125 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
127 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 126 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
128 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
129 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 127 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
130 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
131 | #define _TIF_FIXADE (1<<TIF_FIXADE) | 128 | #define _TIF_FIXADE (1<<TIF_FIXADE) |
132 | #define _TIF_LOGADE (1<<TIF_LOGADE) | 129 | #define _TIF_LOGADE (1<<TIF_LOGADE) |
133 | #define _TIF_32BIT_REGS (1<<TIF_32BIT_REGS) | 130 | #define _TIF_32BIT_REGS (1<<TIF_32BIT_REGS) |
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index e49c4469f73..8b28bc4e14e 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -31,6 +31,7 @@ obj-$(CONFIG_SYNC_R4K) += sync-r4k.o | |||
31 | 31 | ||
32 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 32 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
33 | obj-$(CONFIG_MODULES) += mips_ksyms.o module.o | 33 | obj-$(CONFIG_MODULES) += mips_ksyms.o module.o |
34 | obj-$(CONFIG_MODULES_USE_ELF_RELA) += module-rela.o | ||
34 | 35 | ||
35 | obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o | 36 | obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o |
36 | 37 | ||
diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c index f4546e97c60..23817a6e32b 100644 --- a/arch/mips/kernel/kgdb.c +++ b/arch/mips/kernel/kgdb.c | |||
@@ -283,6 +283,15 @@ static int kgdb_mips_notify(struct notifier_block *self, unsigned long cmd, | |||
283 | struct pt_regs *regs = args->regs; | 283 | struct pt_regs *regs = args->regs; |
284 | int trap = (regs->cp0_cause & 0x7c) >> 2; | 284 | int trap = (regs->cp0_cause & 0x7c) >> 2; |
285 | 285 | ||
286 | #ifdef CONFIG_KPROBES | ||
287 | /* | ||
288 | * Return immediately if the kprobes fault notifier has set | ||
289 | * DIE_PAGE_FAULT. | ||
290 | */ | ||
291 | if (cmd == DIE_PAGE_FAULT) | ||
292 | return NOTIFY_DONE; | ||
293 | #endif /* CONFIG_KPROBES */ | ||
294 | |||
286 | /* Userspace events, ignore. */ | 295 | /* Userspace events, ignore. */ |
287 | if (user_mode(regs)) | 296 | if (user_mode(regs)) |
288 | return NOTIFY_DONE; | 297 | return NOTIFY_DONE; |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 922a554cd10..3a21acedf88 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -83,13 +83,13 @@ out: | |||
83 | asmlinkage int sys32_execve(nabi_no_regargs struct pt_regs regs) | 83 | asmlinkage int sys32_execve(nabi_no_regargs struct pt_regs regs) |
84 | { | 84 | { |
85 | int error; | 85 | int error; |
86 | char * filename; | 86 | struct filename *filename; |
87 | 87 | ||
88 | filename = getname(compat_ptr(regs.regs[4])); | 88 | filename = getname(compat_ptr(regs.regs[4])); |
89 | error = PTR_ERR(filename); | 89 | error = PTR_ERR(filename); |
90 | if (IS_ERR(filename)) | 90 | if (IS_ERR(filename)) |
91 | goto out; | 91 | goto out; |
92 | error = compat_do_execve(filename, compat_ptr(regs.regs[5]), | 92 | error = compat_do_execve(filename->name, compat_ptr(regs.regs[5]), |
93 | compat_ptr(regs.regs[6]), ®s); | 93 | compat_ptr(regs.regs[6]), ®s); |
94 | putname(filename); | 94 | putname(filename); |
95 | 95 | ||
diff --git a/arch/mips/kernel/module-rela.c b/arch/mips/kernel/module-rela.c new file mode 100644 index 00000000000..61d60028b88 --- /dev/null +++ b/arch/mips/kernel/module-rela.c | |||
@@ -0,0 +1,145 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation; either version 2 of the License, or | ||
5 | * (at your option) any later version. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
15 | * | ||
16 | * Copyright (C) 2001 Rusty Russell. | ||
17 | * Copyright (C) 2003, 2004 Ralf Baechle (ralf@linux-mips.org) | ||
18 | * Copyright (C) 2005 Thiemo Seufer | ||
19 | */ | ||
20 | |||
21 | #include <linux/elf.h> | ||
22 | #include <linux/err.h> | ||
23 | #include <linux/errno.h> | ||
24 | #include <linux/moduleloader.h> | ||
25 | |||
26 | extern int apply_r_mips_none(struct module *me, u32 *location, Elf_Addr v); | ||
27 | |||
28 | static int apply_r_mips_32_rela(struct module *me, u32 *location, Elf_Addr v) | ||
29 | { | ||
30 | *location = v; | ||
31 | |||
32 | return 0; | ||
33 | } | ||
34 | |||
35 | static int apply_r_mips_26_rela(struct module *me, u32 *location, Elf_Addr v) | ||
36 | { | ||
37 | if (v % 4) { | ||
38 | pr_err("module %s: dangerous R_MIPS_26 RELArelocation\n", | ||
39 | me->name); | ||
40 | return -ENOEXEC; | ||
41 | } | ||
42 | |||
43 | if ((v & 0xf0000000) != (((unsigned long)location + 4) & 0xf0000000)) { | ||
44 | printk(KERN_ERR | ||
45 | "module %s: relocation overflow\n", | ||
46 | me->name); | ||
47 | return -ENOEXEC; | ||
48 | } | ||
49 | |||
50 | *location = (*location & ~0x03ffffff) | ((v >> 2) & 0x03ffffff); | ||
51 | |||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | static int apply_r_mips_hi16_rela(struct module *me, u32 *location, Elf_Addr v) | ||
56 | { | ||
57 | *location = (*location & 0xffff0000) | | ||
58 | ((((long long) v + 0x8000LL) >> 16) & 0xffff); | ||
59 | |||
60 | return 0; | ||
61 | } | ||
62 | |||
63 | static int apply_r_mips_lo16_rela(struct module *me, u32 *location, Elf_Addr v) | ||
64 | { | ||
65 | *location = (*location & 0xffff0000) | (v & 0xffff); | ||
66 | |||
67 | return 0; | ||
68 | } | ||
69 | |||
70 | static int apply_r_mips_64_rela(struct module *me, u32 *location, Elf_Addr v) | ||
71 | { | ||
72 | *(Elf_Addr *)location = v; | ||
73 | |||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | static int apply_r_mips_higher_rela(struct module *me, u32 *location, | ||
78 | Elf_Addr v) | ||
79 | { | ||
80 | *location = (*location & 0xffff0000) | | ||
81 | ((((long long) v + 0x80008000LL) >> 32) & 0xffff); | ||
82 | |||
83 | return 0; | ||
84 | } | ||
85 | |||
86 | static int apply_r_mips_highest_rela(struct module *me, u32 *location, | ||
87 | Elf_Addr v) | ||
88 | { | ||
89 | *location = (*location & 0xffff0000) | | ||
90 | ((((long long) v + 0x800080008000LL) >> 48) & 0xffff); | ||
91 | |||
92 | return 0; | ||
93 | } | ||
94 | |||
95 | static int (*reloc_handlers_rela[]) (struct module *me, u32 *location, | ||
96 | Elf_Addr v) = { | ||
97 | [R_MIPS_NONE] = apply_r_mips_none, | ||
98 | [R_MIPS_32] = apply_r_mips_32_rela, | ||
99 | [R_MIPS_26] = apply_r_mips_26_rela, | ||
100 | [R_MIPS_HI16] = apply_r_mips_hi16_rela, | ||
101 | [R_MIPS_LO16] = apply_r_mips_lo16_rela, | ||
102 | [R_MIPS_64] = apply_r_mips_64_rela, | ||
103 | [R_MIPS_HIGHER] = apply_r_mips_higher_rela, | ||
104 | [R_MIPS_HIGHEST] = apply_r_mips_highest_rela | ||
105 | }; | ||
106 | |||
107 | int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | ||
108 | unsigned int symindex, unsigned int relsec, | ||
109 | struct module *me) | ||
110 | { | ||
111 | Elf_Mips_Rela *rel = (void *) sechdrs[relsec].sh_addr; | ||
112 | Elf_Sym *sym; | ||
113 | u32 *location; | ||
114 | unsigned int i; | ||
115 | Elf_Addr v; | ||
116 | int res; | ||
117 | |||
118 | pr_debug("Applying relocate section %u to %u\n", relsec, | ||
119 | sechdrs[relsec].sh_info); | ||
120 | |||
121 | for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { | ||
122 | /* This is where to make the change */ | ||
123 | location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr | ||
124 | + rel[i].r_offset; | ||
125 | /* This is the symbol it is referring to */ | ||
126 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr | ||
127 | + ELF_MIPS_R_SYM(rel[i]); | ||
128 | if (IS_ERR_VALUE(sym->st_value)) { | ||
129 | /* Ignore unresolved weak symbol */ | ||
130 | if (ELF_ST_BIND(sym->st_info) == STB_WEAK) | ||
131 | continue; | ||
132 | printk(KERN_WARNING "%s: Unknown symbol %s\n", | ||
133 | me->name, strtab + sym->st_name); | ||
134 | return -ENOENT; | ||
135 | } | ||
136 | |||
137 | v = sym->st_value + rel[i].r_addend; | ||
138 | |||
139 | res = reloc_handlers_rela[ELF_MIPS_R_TYPE(rel[i])](me, location, v); | ||
140 | if (res) | ||
141 | return res; | ||
142 | } | ||
143 | |||
144 | return 0; | ||
145 | } | ||
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c index 4f8c3cba8c0..07ff5812ffa 100644 --- a/arch/mips/kernel/module.c +++ b/arch/mips/kernel/module.c | |||
@@ -51,7 +51,7 @@ void *module_alloc(unsigned long size) | |||
51 | } | 51 | } |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | static int apply_r_mips_none(struct module *me, u32 *location, Elf_Addr v) | 54 | int apply_r_mips_none(struct module *me, u32 *location, Elf_Addr v) |
55 | { | 55 | { |
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
@@ -63,13 +63,6 @@ static int apply_r_mips_32_rel(struct module *me, u32 *location, Elf_Addr v) | |||
63 | return 0; | 63 | return 0; |
64 | } | 64 | } |
65 | 65 | ||
66 | static int apply_r_mips_32_rela(struct module *me, u32 *location, Elf_Addr v) | ||
67 | { | ||
68 | *location = v; | ||
69 | |||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v) | 66 | static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v) |
74 | { | 67 | { |
75 | if (v % 4) { | 68 | if (v % 4) { |
@@ -91,26 +84,6 @@ static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v) | |||
91 | return 0; | 84 | return 0; |
92 | } | 85 | } |
93 | 86 | ||
94 | static int apply_r_mips_26_rela(struct module *me, u32 *location, Elf_Addr v) | ||
95 | { | ||
96 | if (v % 4) { | ||
97 | pr_err("module %s: dangerous R_MIPS_26 RELArelocation\n", | ||
98 | me->name); | ||
99 | return -ENOEXEC; | ||
100 | } | ||
101 | |||
102 | if ((v & 0xf0000000) != (((unsigned long)location + 4) & 0xf0000000)) { | ||
103 | printk(KERN_ERR | ||
104 | "module %s: relocation overflow\n", | ||
105 | me->name); | ||
106 | return -ENOEXEC; | ||
107 | } | ||
108 | |||
109 | *location = (*location & ~0x03ffffff) | ((v >> 2) & 0x03ffffff); | ||
110 | |||
111 | return 0; | ||
112 | } | ||
113 | |||
114 | static int apply_r_mips_hi16_rel(struct module *me, u32 *location, Elf_Addr v) | 87 | static int apply_r_mips_hi16_rel(struct module *me, u32 *location, Elf_Addr v) |
115 | { | 88 | { |
116 | struct mips_hi16 *n; | 89 | struct mips_hi16 *n; |
@@ -132,14 +105,6 @@ static int apply_r_mips_hi16_rel(struct module *me, u32 *location, Elf_Addr v) | |||
132 | return 0; | 105 | return 0; |
133 | } | 106 | } |
134 | 107 | ||
135 | static int apply_r_mips_hi16_rela(struct module *me, u32 *location, Elf_Addr v) | ||
136 | { | ||
137 | *location = (*location & 0xffff0000) | | ||
138 | ((((long long) v + 0x8000LL) >> 16) & 0xffff); | ||
139 | |||
140 | return 0; | ||
141 | } | ||
142 | |||
143 | static void free_relocation_chain(struct mips_hi16 *l) | 108 | static void free_relocation_chain(struct mips_hi16 *l) |
144 | { | 109 | { |
145 | struct mips_hi16 *next; | 110 | struct mips_hi16 *next; |
@@ -217,38 +182,6 @@ out_danger: | |||
217 | return -ENOEXEC; | 182 | return -ENOEXEC; |
218 | } | 183 | } |
219 | 184 | ||
220 | static int apply_r_mips_lo16_rela(struct module *me, u32 *location, Elf_Addr v) | ||
221 | { | ||
222 | *location = (*location & 0xffff0000) | (v & 0xffff); | ||
223 | |||
224 | return 0; | ||
225 | } | ||
226 | |||
227 | static int apply_r_mips_64_rela(struct module *me, u32 *location, Elf_Addr v) | ||
228 | { | ||
229 | *(Elf_Addr *)location = v; | ||
230 | |||
231 | return 0; | ||
232 | } | ||
233 | |||
234 | static int apply_r_mips_higher_rela(struct module *me, u32 *location, | ||
235 | Elf_Addr v) | ||
236 | { | ||
237 | *location = (*location & 0xffff0000) | | ||
238 | ((((long long) v + 0x80008000LL) >> 32) & 0xffff); | ||
239 | |||
240 | return 0; | ||
241 | } | ||
242 | |||
243 | static int apply_r_mips_highest_rela(struct module *me, u32 *location, | ||
244 | Elf_Addr v) | ||
245 | { | ||
246 | *location = (*location & 0xffff0000) | | ||
247 | ((((long long) v + 0x800080008000LL) >> 48) & 0xffff); | ||
248 | |||
249 | return 0; | ||
250 | } | ||
251 | |||
252 | static int (*reloc_handlers_rel[]) (struct module *me, u32 *location, | 185 | static int (*reloc_handlers_rel[]) (struct module *me, u32 *location, |
253 | Elf_Addr v) = { | 186 | Elf_Addr v) = { |
254 | [R_MIPS_NONE] = apply_r_mips_none, | 187 | [R_MIPS_NONE] = apply_r_mips_none, |
@@ -258,18 +191,6 @@ static int (*reloc_handlers_rel[]) (struct module *me, u32 *location, | |||
258 | [R_MIPS_LO16] = apply_r_mips_lo16_rel | 191 | [R_MIPS_LO16] = apply_r_mips_lo16_rel |
259 | }; | 192 | }; |
260 | 193 | ||
261 | static int (*reloc_handlers_rela[]) (struct module *me, u32 *location, | ||
262 | Elf_Addr v) = { | ||
263 | [R_MIPS_NONE] = apply_r_mips_none, | ||
264 | [R_MIPS_32] = apply_r_mips_32_rela, | ||
265 | [R_MIPS_26] = apply_r_mips_26_rela, | ||
266 | [R_MIPS_HI16] = apply_r_mips_hi16_rela, | ||
267 | [R_MIPS_LO16] = apply_r_mips_lo16_rela, | ||
268 | [R_MIPS_64] = apply_r_mips_64_rela, | ||
269 | [R_MIPS_HIGHER] = apply_r_mips_higher_rela, | ||
270 | [R_MIPS_HIGHEST] = apply_r_mips_highest_rela | ||
271 | }; | ||
272 | |||
273 | int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, | 194 | int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, |
274 | unsigned int symindex, unsigned int relsec, | 195 | unsigned int symindex, unsigned int relsec, |
275 | struct module *me) | 196 | struct module *me) |
@@ -324,46 +245,6 @@ int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, | |||
324 | return 0; | 245 | return 0; |
325 | } | 246 | } |
326 | 247 | ||
327 | int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | ||
328 | unsigned int symindex, unsigned int relsec, | ||
329 | struct module *me) | ||
330 | { | ||
331 | Elf_Mips_Rela *rel = (void *) sechdrs[relsec].sh_addr; | ||
332 | Elf_Sym *sym; | ||
333 | u32 *location; | ||
334 | unsigned int i; | ||
335 | Elf_Addr v; | ||
336 | int res; | ||
337 | |||
338 | pr_debug("Applying relocate section %u to %u\n", relsec, | ||
339 | sechdrs[relsec].sh_info); | ||
340 | |||
341 | for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { | ||
342 | /* This is where to make the change */ | ||
343 | location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr | ||
344 | + rel[i].r_offset; | ||
345 | /* This is the symbol it is referring to */ | ||
346 | sym = (Elf_Sym *)sechdrs[symindex].sh_addr | ||
347 | + ELF_MIPS_R_SYM(rel[i]); | ||
348 | if (IS_ERR_VALUE(sym->st_value)) { | ||
349 | /* Ignore unresolved weak symbol */ | ||
350 | if (ELF_ST_BIND(sym->st_info) == STB_WEAK) | ||
351 | continue; | ||
352 | printk(KERN_WARNING "%s: Unknown symbol %s\n", | ||
353 | me->name, strtab + sym->st_name); | ||
354 | return -ENOENT; | ||
355 | } | ||
356 | |||
357 | v = sym->st_value + rel[i].r_addend; | ||
358 | |||
359 | res = reloc_handlers_rela[ELF_MIPS_R_TYPE(rel[i])](me, location, v); | ||
360 | if (res) | ||
361 | return res; | ||
362 | } | ||
363 | |||
364 | return 0; | ||
365 | } | ||
366 | |||
367 | /* Given an address, look for it in the module exception tables. */ | 248 | /* Given an address, look for it in the module exception tables. */ |
368 | const struct exception_table_entry *search_module_dbetables(unsigned long addr) | 249 | const struct exception_table_entry *search_module_dbetables(unsigned long addr) |
369 | { | 250 | { |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index b08220c8211..2bd561bc05a 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -133,13 +133,13 @@ _sys_clone(nabi_no_regargs struct pt_regs regs) | |||
133 | asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs) | 133 | asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs) |
134 | { | 134 | { |
135 | int error; | 135 | int error; |
136 | char * filename; | 136 | struct filename *filename; |
137 | 137 | ||
138 | filename = getname((const char __user *) (long)regs.regs[4]); | 138 | filename = getname((const char __user *) (long)regs.regs[4]); |
139 | error = PTR_ERR(filename); | 139 | error = PTR_ERR(filename); |
140 | if (IS_ERR(filename)) | 140 | if (IS_ERR(filename)) |
141 | goto out; | 141 | goto out; |
142 | error = do_execve(filename, | 142 | error = do_execve(filename->name, |
143 | (const char __user *const __user *) (long)regs.regs[5], | 143 | (const char __user *const __user *) (long)regs.regs[5], |
144 | (const char __user *const __user *) (long)regs.regs[6], | 144 | (const char __user *const __user *) (long)regs.regs[6], |
145 | ®s); | 145 | ®s); |
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index 5cfb086b390..04669fac117 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig | |||
@@ -8,6 +8,8 @@ config MN10300 | |||
8 | select HAVE_ARCH_KGDB | 8 | select HAVE_ARCH_KGDB |
9 | select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER | 9 | select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER |
10 | select GENERIC_CLOCKEVENTS | 10 | select GENERIC_CLOCKEVENTS |
11 | select GENERIC_KERNEL_THREAD | ||
12 | select MODULES_USE_ELF_RELA | ||
11 | 13 | ||
12 | config AM33_2 | 14 | config AM33_2 |
13 | def_bool n | 15 | def_bool n |
diff --git a/arch/mn10300/include/asm/Kbuild b/arch/mn10300/include/asm/Kbuild index fccd81eddff..4a159da2363 100644 --- a/arch/mn10300/include/asm/Kbuild +++ b/arch/mn10300/include/asm/Kbuild | |||
@@ -1,4 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
4 | generic-y += exec.h | 3 | generic-y += exec.h |
diff --git a/arch/mn10300/include/asm/frame.inc b/arch/mn10300/include/asm/frame.inc index 2ee58e3eb6b..1c3eb4fda95 100644 --- a/arch/mn10300/include/asm/frame.inc +++ b/arch/mn10300/include/asm/frame.inc | |||
@@ -61,7 +61,7 @@ | |||
61 | ############################################################################### | 61 | ############################################################################### |
62 | .macro RESTORE_ALL | 62 | .macro RESTORE_ALL |
63 | # peel back the stack to the calling frame | 63 | # peel back the stack to the calling frame |
64 | # - this permits execve() to discard extra frames due to kernel syscalls | 64 | # - we need that when returning from interrupts to kernel mode |
65 | GET_THREAD_INFO a0 | 65 | GET_THREAD_INFO a0 |
66 | mov (TI_frame,a0),fp | 66 | mov (TI_frame,a0),fp |
67 | mov fp,sp | 67 | mov fp,sp |
diff --git a/arch/mn10300/include/asm/module.h b/arch/mn10300/include/asm/module.h index 5d7057d0149..6571103b051 100644 --- a/arch/mn10300/include/asm/module.h +++ b/arch/mn10300/include/asm/module.h | |||
@@ -12,12 +12,7 @@ | |||
12 | #ifndef _ASM_MODULE_H | 12 | #ifndef _ASM_MODULE_H |
13 | #define _ASM_MODULE_H | 13 | #define _ASM_MODULE_H |
14 | 14 | ||
15 | struct mod_arch_specific { | 15 | #include <asm-generic/module.h> |
16 | }; | ||
17 | |||
18 | #define Elf_Shdr Elf32_Shdr | ||
19 | #define Elf_Sym Elf32_Sym | ||
20 | #define Elf_Ehdr Elf32_Ehdr | ||
21 | 16 | ||
22 | /* | 17 | /* |
23 | * Include the MN10300 architecture version. | 18 | * Include the MN10300 architecture version. |
diff --git a/arch/mn10300/include/asm/processor.h b/arch/mn10300/include/asm/processor.h index 247928c9f54..8b80b19d0c8 100644 --- a/arch/mn10300/include/asm/processor.h +++ b/arch/mn10300/include/asm/processor.h | |||
@@ -119,20 +119,13 @@ struct thread_struct { | |||
119 | 119 | ||
120 | /* | 120 | /* |
121 | * do necessary setup to start up a newly executed thread | 121 | * do necessary setup to start up a newly executed thread |
122 | * - need to discard the frame stacked by the kernel thread invoking the execve | ||
123 | * syscall (see RESTORE_ALL macro) | ||
124 | */ | 122 | */ |
125 | static inline void start_thread(struct pt_regs *regs, | 123 | static inline void start_thread(struct pt_regs *regs, |
126 | unsigned long new_pc, unsigned long new_sp) | 124 | unsigned long new_pc, unsigned long new_sp) |
127 | { | 125 | { |
128 | struct thread_info *ti = current_thread_info(); | 126 | regs->epsw = EPSW_nSL | EPSW_IE | EPSW_IM; |
129 | struct pt_regs *frame0; | 127 | regs->pc = new_pc; |
130 | 128 | regs->sp = new_sp; | |
131 | frame0 = thread_info_to_uregs(ti); | ||
132 | frame0->epsw = EPSW_nSL | EPSW_IE | EPSW_IM; | ||
133 | frame0->pc = new_pc; | ||
134 | frame0->sp = new_sp; | ||
135 | ti->frame = frame0; | ||
136 | } | 129 | } |
137 | 130 | ||
138 | 131 | ||
@@ -140,11 +133,6 @@ static inline void start_thread(struct pt_regs *regs, | |||
140 | extern void release_thread(struct task_struct *); | 133 | extern void release_thread(struct task_struct *); |
141 | 134 | ||
142 | /* | 135 | /* |
143 | * create a kernel thread without removing it from tasklists | ||
144 | */ | ||
145 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | ||
146 | |||
147 | /* | ||
148 | * Return saved PC of a blocked thread. | 136 | * Return saved PC of a blocked thread. |
149 | */ | 137 | */ |
150 | extern unsigned long thread_saved_pc(struct task_struct *tsk); | 138 | extern unsigned long thread_saved_pc(struct task_struct *tsk); |
diff --git a/arch/mn10300/include/asm/ptrace.h b/arch/mn10300/include/asm/ptrace.h index 44251b974f1..838a3830010 100644 --- a/arch/mn10300/include/asm/ptrace.h +++ b/arch/mn10300/include/asm/ptrace.h | |||
@@ -11,85 +11,16 @@ | |||
11 | #ifndef _ASM_PTRACE_H | 11 | #ifndef _ASM_PTRACE_H |
12 | #define _ASM_PTRACE_H | 12 | #define _ASM_PTRACE_H |
13 | 13 | ||
14 | #define PT_A3 0 | 14 | #include <uapi/asm/ptrace.h> |
15 | #define PT_A2 1 | ||
16 | #define PT_D3 2 | ||
17 | #define PT_D2 3 | ||
18 | #define PT_MCVF 4 | ||
19 | #define PT_MCRL 5 | ||
20 | #define PT_MCRH 6 | ||
21 | #define PT_MDRQ 7 | ||
22 | #define PT_E1 8 | ||
23 | #define PT_E0 9 | ||
24 | #define PT_E7 10 | ||
25 | #define PT_E6 11 | ||
26 | #define PT_E5 12 | ||
27 | #define PT_E4 13 | ||
28 | #define PT_E3 14 | ||
29 | #define PT_E2 15 | ||
30 | #define PT_SP 16 | ||
31 | #define PT_LAR 17 | ||
32 | #define PT_LIR 18 | ||
33 | #define PT_MDR 19 | ||
34 | #define PT_A1 20 | ||
35 | #define PT_A0 21 | ||
36 | #define PT_D1 22 | ||
37 | #define PT_D0 23 | ||
38 | #define PT_ORIG_D0 24 | ||
39 | #define PT_EPSW 25 | ||
40 | #define PT_PC 26 | ||
41 | #define NR_PTREGS 27 | ||
42 | 15 | ||
43 | /* | ||
44 | * This defines the way registers are stored in the event of an exception | ||
45 | * - the strange order is due to the MOVM instruction | ||
46 | */ | ||
47 | struct pt_regs { | ||
48 | unsigned long a3; /* syscall arg 3 */ | ||
49 | unsigned long a2; /* syscall arg 4 */ | ||
50 | unsigned long d3; /* syscall arg 5 */ | ||
51 | unsigned long d2; /* syscall arg 6 */ | ||
52 | unsigned long mcvf; | ||
53 | unsigned long mcrl; | ||
54 | unsigned long mcrh; | ||
55 | unsigned long mdrq; | ||
56 | unsigned long e1; | ||
57 | unsigned long e0; | ||
58 | unsigned long e7; | ||
59 | unsigned long e6; | ||
60 | unsigned long e5; | ||
61 | unsigned long e4; | ||
62 | unsigned long e3; | ||
63 | unsigned long e2; | ||
64 | unsigned long sp; | ||
65 | unsigned long lar; | ||
66 | unsigned long lir; | ||
67 | unsigned long mdr; | ||
68 | unsigned long a1; | ||
69 | unsigned long a0; /* syscall arg 1 */ | ||
70 | unsigned long d1; /* syscall arg 2 */ | ||
71 | unsigned long d0; /* syscall ret */ | ||
72 | struct pt_regs *next; /* next frame pointer */ | ||
73 | unsigned long orig_d0; /* syscall number */ | ||
74 | unsigned long epsw; | ||
75 | unsigned long pc; | ||
76 | }; | ||
77 | |||
78 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ | ||
79 | #define PTRACE_GETREGS 12 | ||
80 | #define PTRACE_SETREGS 13 | ||
81 | #define PTRACE_GETFPREGS 14 | ||
82 | #define PTRACE_SETFPREGS 15 | ||
83 | |||
84 | #ifdef __KERNEL__ | ||
85 | 16 | ||
86 | #define user_mode(regs) (((regs)->epsw & EPSW_nSL) == EPSW_nSL) | 17 | #define user_mode(regs) (((regs)->epsw & EPSW_nSL) == EPSW_nSL) |
87 | #define instruction_pointer(regs) ((regs)->pc) | 18 | #define instruction_pointer(regs) ((regs)->pc) |
88 | #define user_stack_pointer(regs) ((regs)->sp) | 19 | #define user_stack_pointer(regs) ((regs)->sp) |
20 | #define current_pt_regs() current_frame() | ||
89 | 21 | ||
90 | #define arch_has_single_step() (1) | 22 | #define arch_has_single_step() (1) |
91 | 23 | ||
92 | #define profile_pc(regs) ((regs)->pc) | 24 | #define profile_pc(regs) ((regs)->pc) |
93 | 25 | ||
94 | #endif /* __KERNEL__ */ | ||
95 | #endif /* _ASM_PTRACE_H */ | 26 | #endif /* _ASM_PTRACE_H */ |
diff --git a/arch/mn10300/include/asm/setup.h b/arch/mn10300/include/asm/setup.h index c229d1e3f99..fb024555d2a 100644 --- a/arch/mn10300/include/asm/setup.h +++ b/arch/mn10300/include/asm/setup.h | |||
@@ -11,8 +11,8 @@ | |||
11 | #ifndef _ASM_SETUP_H | 11 | #ifndef _ASM_SETUP_H |
12 | #define _ASM_SETUP_H | 12 | #define _ASM_SETUP_H |
13 | 13 | ||
14 | #ifdef __KERNEL__ | 14 | #include <uapi/asm/setup.h> |
15 | |||
15 | extern void __init unit_setup(void); | 16 | extern void __init unit_setup(void); |
16 | extern void __init unit_init_IRQ(void); | 17 | extern void __init unit_init_IRQ(void); |
17 | #endif | ||
18 | #endif /* _ASM_SETUP_H */ | 18 | #endif /* _ASM_SETUP_H */ |
diff --git a/arch/mn10300/include/asm/signal.h b/arch/mn10300/include/asm/signal.h index 1865d72a86f..f9668ec3040 100644 --- a/arch/mn10300/include/asm/signal.h +++ b/arch/mn10300/include/asm/signal.h | |||
@@ -11,12 +11,8 @@ | |||
11 | #ifndef _ASM_SIGNAL_H | 11 | #ifndef _ASM_SIGNAL_H |
12 | #define _ASM_SIGNAL_H | 12 | #define _ASM_SIGNAL_H |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <uapi/asm/signal.h> |
15 | 15 | ||
16 | /* Avoid too many header ordering problems. */ | ||
17 | struct siginfo; | ||
18 | |||
19 | #ifdef __KERNEL__ | ||
20 | /* Most things should be clean enough to redefine this at will, if care | 16 | /* Most things should be clean enough to redefine this at will, if care |
21 | is taken to make libc match. */ | 17 | is taken to make libc match. */ |
22 | 18 | ||
@@ -30,94 +26,6 @@ typedef struct { | |||
30 | unsigned long sig[_NSIG_WORDS]; | 26 | unsigned long sig[_NSIG_WORDS]; |
31 | } sigset_t; | 27 | } sigset_t; |
32 | 28 | ||
33 | #else | ||
34 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
35 | |||
36 | #define NSIG 32 | ||
37 | typedef unsigned long sigset_t; | ||
38 | |||
39 | #endif /* __KERNEL__ */ | ||
40 | |||
41 | #define SIGHUP 1 | ||
42 | #define SIGINT 2 | ||
43 | #define SIGQUIT 3 | ||
44 | #define SIGILL 4 | ||
45 | #define SIGTRAP 5 | ||
46 | #define SIGABRT 6 | ||
47 | #define SIGIOT 6 | ||
48 | #define SIGBUS 7 | ||
49 | #define SIGFPE 8 | ||
50 | #define SIGKILL 9 | ||
51 | #define SIGUSR1 10 | ||
52 | #define SIGSEGV 11 | ||
53 | #define SIGUSR2 12 | ||
54 | #define SIGPIPE 13 | ||
55 | #define SIGALRM 14 | ||
56 | #define SIGTERM 15 | ||
57 | #define SIGSTKFLT 16 | ||
58 | #define SIGCHLD 17 | ||
59 | #define SIGCONT 18 | ||
60 | #define SIGSTOP 19 | ||
61 | #define SIGTSTP 20 | ||
62 | #define SIGTTIN 21 | ||
63 | #define SIGTTOU 22 | ||
64 | #define SIGURG 23 | ||
65 | #define SIGXCPU 24 | ||
66 | #define SIGXFSZ 25 | ||
67 | #define SIGVTALRM 26 | ||
68 | #define SIGPROF 27 | ||
69 | #define SIGWINCH 28 | ||
70 | #define SIGIO 29 | ||
71 | #define SIGPOLL SIGIO | ||
72 | /* | ||
73 | #define SIGLOST 29 | ||
74 | */ | ||
75 | #define SIGPWR 30 | ||
76 | #define SIGSYS 31 | ||
77 | #define SIGUNUSED 31 | ||
78 | |||
79 | /* These should not be considered constants from userland. */ | ||
80 | #define SIGRTMIN 32 | ||
81 | #define SIGRTMAX _NSIG | ||
82 | |||
83 | /* | ||
84 | * SA_FLAGS values: | ||
85 | * | ||
86 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
87 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
88 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
89 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
90 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
91 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
92 | * | ||
93 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
94 | * Unix names RESETHAND and NODEFER respectively. | ||
95 | */ | ||
96 | #define SA_NOCLDSTOP 0x00000001U | ||
97 | #define SA_NOCLDWAIT 0x00000002U | ||
98 | #define SA_SIGINFO 0x00000004U | ||
99 | #define SA_ONSTACK 0x08000000U | ||
100 | #define SA_RESTART 0x10000000U | ||
101 | #define SA_NODEFER 0x40000000U | ||
102 | #define SA_RESETHAND 0x80000000U | ||
103 | |||
104 | #define SA_NOMASK SA_NODEFER | ||
105 | #define SA_ONESHOT SA_RESETHAND | ||
106 | |||
107 | #define SA_RESTORER 0x04000000 | ||
108 | |||
109 | /* | ||
110 | * sigaltstack controls | ||
111 | */ | ||
112 | #define SS_ONSTACK 1 | ||
113 | #define SS_DISABLE 2 | ||
114 | |||
115 | #define MINSIGSTKSZ 2048 | ||
116 | #define SIGSTKSZ 8192 | ||
117 | |||
118 | #include <asm-generic/signal-defs.h> | ||
119 | |||
120 | #ifdef __KERNEL__ | ||
121 | struct old_sigaction { | 29 | struct old_sigaction { |
122 | __sighandler_t sa_handler; | 30 | __sighandler_t sa_handler; |
123 | old_sigset_t sa_mask; | 31 | old_sigset_t sa_mask; |
@@ -135,37 +43,10 @@ struct sigaction { | |||
135 | struct k_sigaction { | 43 | struct k_sigaction { |
136 | struct sigaction sa; | 44 | struct sigaction sa; |
137 | }; | 45 | }; |
138 | #else | ||
139 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
140 | |||
141 | struct sigaction { | ||
142 | union { | ||
143 | __sighandler_t _sa_handler; | ||
144 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
145 | } _u; | ||
146 | sigset_t sa_mask; | ||
147 | unsigned long sa_flags; | ||
148 | void (*sa_restorer)(void); | ||
149 | }; | ||
150 | |||
151 | #define sa_handler _u._sa_handler | ||
152 | #define sa_sigaction _u._sa_sigaction | ||
153 | |||
154 | #endif /* __KERNEL__ */ | ||
155 | |||
156 | typedef struct sigaltstack { | ||
157 | void __user *ss_sp; | ||
158 | int ss_flags; | ||
159 | size_t ss_size; | ||
160 | } stack_t; | ||
161 | |||
162 | #ifdef __KERNEL__ | ||
163 | #include <asm/sigcontext.h> | 46 | #include <asm/sigcontext.h> |
164 | 47 | ||
165 | 48 | ||
166 | struct pt_regs; | 49 | struct pt_regs; |
167 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | 50 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
168 | 51 | ||
169 | #endif /* __KERNEL__ */ | ||
170 | |||
171 | #endif /* _ASM_SIGNAL_H */ | 52 | #endif /* _ASM_SIGNAL_H */ |
diff --git a/arch/mn10300/include/asm/termios.h b/arch/mn10300/include/asm/termios.h index dd7cf617e11..c2e29c75dfa 100644 --- a/arch/mn10300/include/asm/termios.h +++ b/arch/mn10300/include/asm/termios.h | |||
@@ -1,27 +1,8 @@ | |||
1 | #ifndef _ASM_TERMIOS_H | 1 | #ifndef _ASM_TERMIOS_H |
2 | #define _ASM_TERMIOS_H | 2 | #define _ASM_TERMIOS_H |
3 | 3 | ||
4 | #include <asm/termbits.h> | 4 | #include <uapi/asm/termios.h> |
5 | #include <asm/ioctls.h> | ||
6 | 5 | ||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | #ifdef __KERNEL__ | ||
25 | /* intr=^C quit=^| erase=del kill=^U | 6 | /* intr=^C quit=^| erase=del kill=^U |
26 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | 7 | eof=^D vtime=\0 vmin=\1 sxtc=\0 |
27 | start=^Q stop=^S susp=^Z eol=\0 | 8 | start=^Q stop=^S susp=^Z eol=\0 |
@@ -29,64 +10,4 @@ struct termio { | |||
29 | eol2=\0 | 10 | eol2=\0 |
30 | */ | 11 | */ |
31 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" | 12 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" |
32 | #endif | ||
33 | |||
34 | /* modem lines */ | ||
35 | #define TIOCM_LE 0x001 | ||
36 | #define TIOCM_DTR 0x002 | ||
37 | #define TIOCM_RTS 0x004 | ||
38 | #define TIOCM_ST 0x008 | ||
39 | #define TIOCM_SR 0x010 | ||
40 | #define TIOCM_CTS 0x020 | ||
41 | #define TIOCM_CAR 0x040 | ||
42 | #define TIOCM_RNG 0x080 | ||
43 | #define TIOCM_DSR 0x100 | ||
44 | #define TIOCM_CD TIOCM_CAR | ||
45 | #define TIOCM_RI TIOCM_RNG | ||
46 | #define TIOCM_OUT1 0x2000 | ||
47 | #define TIOCM_OUT2 0x4000 | ||
48 | #define TIOCM_LOOP 0x8000 | ||
49 | |||
50 | #define TIOCM_MODEM_BITS TIOCM_OUT2 /* IRDA support */ | ||
51 | |||
52 | /* | ||
53 | * Translate a "termio" structure into a "termios". Ugh. | ||
54 | */ | ||
55 | #define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ | ||
56 | unsigned short __tmp; \ | ||
57 | get_user(__tmp, &(termio)->x); \ | ||
58 | *(unsigned short *) &(termios)->x = __tmp; \ | ||
59 | } | ||
60 | |||
61 | #define user_termio_to_kernel_termios(termios, termio) \ | ||
62 | ({ \ | ||
63 | SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ | ||
64 | SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ | ||
65 | SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ | ||
66 | SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ | ||
67 | copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ | ||
68 | }) | ||
69 | |||
70 | /* | ||
71 | * Translate a "termios" structure into a "termio". Ugh. | ||
72 | */ | ||
73 | #define kernel_termios_to_user_termio(termio, termios) \ | ||
74 | ({ \ | ||
75 | put_user((termios)->c_iflag, &(termio)->c_iflag); \ | ||
76 | put_user((termios)->c_oflag, &(termio)->c_oflag); \ | ||
77 | put_user((termios)->c_cflag, &(termio)->c_cflag); \ | ||
78 | put_user((termios)->c_lflag, &(termio)->c_lflag); \ | ||
79 | put_user((termios)->c_line, &(termio)->c_line); \ | ||
80 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | ||
81 | }) | ||
82 | |||
83 | #define user_termios_to_kernel_termios(k, u) \ | ||
84 | copy_from_user(k, u, sizeof(struct termios2)) | ||
85 | #define kernel_termios_to_user_termios(u, k) \ | ||
86 | copy_to_user(u, k, sizeof(struct termios2)) | ||
87 | #define user_termios_to_kernel_termios_1(k, u) \ | ||
88 | copy_from_user(k, u, sizeof(struct termios)) | ||
89 | #define kernel_termios_to_user_termios_1(u, k) \ | ||
90 | copy_to_user(u, k, sizeof(struct termios)) | ||
91 | |||
92 | #endif /* _ASM_TERMIOS_H */ | 13 | #endif /* _ASM_TERMIOS_H */ |
diff --git a/arch/mn10300/include/asm/thread_info.h b/arch/mn10300/include/asm/thread_info.h index ac519bbd42f..f90062b0622 100644 --- a/arch/mn10300/include/asm/thread_info.h +++ b/arch/mn10300/include/asm/thread_info.h | |||
@@ -160,12 +160,13 @@ void arch_release_thread_info(struct thread_info *ti); | |||
160 | #define _TIF_SIGPENDING +(1 << TIF_SIGPENDING) | 160 | #define _TIF_SIGPENDING +(1 << TIF_SIGPENDING) |
161 | #define _TIF_NEED_RESCHED +(1 << TIF_NEED_RESCHED) | 161 | #define _TIF_NEED_RESCHED +(1 << TIF_NEED_RESCHED) |
162 | #define _TIF_SINGLESTEP +(1 << TIF_SINGLESTEP) | 162 | #define _TIF_SINGLESTEP +(1 << TIF_SINGLESTEP) |
163 | #define _TIF_RESTORE_SIGMASK +(1 << TIF_RESTORE_SIGMASK) | ||
164 | #define _TIF_POLLING_NRFLAG +(1 << TIF_POLLING_NRFLAG) | 163 | #define _TIF_POLLING_NRFLAG +(1 << TIF_POLLING_NRFLAG) |
165 | 164 | ||
166 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 165 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
167 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ | 166 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ |
168 | 167 | ||
168 | #define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) | ||
169 | |||
169 | #endif /* __KERNEL__ */ | 170 | #endif /* __KERNEL__ */ |
170 | 171 | ||
171 | #endif /* _ASM_THREAD_INFO_H */ | 172 | #endif /* _ASM_THREAD_INFO_H */ |
diff --git a/arch/mn10300/include/asm/types.h b/arch/mn10300/include/asm/types.h index 713d4ba108a..3d6e48311be 100644 --- a/arch/mn10300/include/asm/types.h +++ b/arch/mn10300/include/asm/types.h | |||
@@ -11,15 +11,12 @@ | |||
11 | #ifndef _ASM_TYPES_H | 11 | #ifndef _ASM_TYPES_H |
12 | #define _ASM_TYPES_H | 12 | #define _ASM_TYPES_H |
13 | 13 | ||
14 | #include <asm-generic/int-ll64.h> | 14 | #include <uapi/asm/types.h> |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * These aren't exported outside the kernel to avoid name space clashes | 17 | * These aren't exported outside the kernel to avoid name space clashes |
18 | */ | 18 | */ |
19 | #ifdef __KERNEL__ | ||
20 | 19 | ||
21 | #define BITS_PER_LONG 32 | 20 | #define BITS_PER_LONG 32 |
22 | 21 | ||
23 | #endif /* __KERNEL__ */ | ||
24 | |||
25 | #endif /* _ASM_TYPES_H */ | 22 | #endif /* _ASM_TYPES_H */ |
diff --git a/arch/mn10300/include/asm/unistd.h b/arch/mn10300/include/asm/unistd.h index 866eb14749d..55bbec1887e 100644 --- a/arch/mn10300/include/asm/unistd.h +++ b/arch/mn10300/include/asm/unistd.h | |||
@@ -11,347 +11,8 @@ | |||
11 | #ifndef _ASM_UNISTD_H | 11 | #ifndef _ASM_UNISTD_H |
12 | #define _ASM_UNISTD_H | 12 | #define _ASM_UNISTD_H |
13 | 13 | ||
14 | #define __NR_restart_syscall 0 | 14 | #include <uapi/asm/unistd.h> |
15 | #define __NR_exit 1 | ||
16 | #define __NR_fork 2 | ||
17 | #define __NR_read 3 | ||
18 | #define __NR_write 4 | ||
19 | #define __NR_open 5 | ||
20 | #define __NR_close 6 | ||
21 | #define __NR_waitpid 7 | ||
22 | #define __NR_creat 8 | ||
23 | #define __NR_link 9 | ||
24 | #define __NR_unlink 10 | ||
25 | #define __NR_execve 11 | ||
26 | #define __NR_chdir 12 | ||
27 | #define __NR_time 13 | ||
28 | #define __NR_mknod 14 | ||
29 | #define __NR_chmod 15 | ||
30 | #define __NR_lchown 16 | ||
31 | #define __NR_break 17 | ||
32 | #define __NR_oldstat 18 | ||
33 | #define __NR_lseek 19 | ||
34 | #define __NR_getpid 20 | ||
35 | #define __NR_mount 21 | ||
36 | #define __NR_umount 22 | ||
37 | #define __NR_setuid 23 | ||
38 | #define __NR_getuid 24 | ||
39 | #define __NR_stime 25 | ||
40 | #define __NR_ptrace 26 | ||
41 | #define __NR_alarm 27 | ||
42 | #define __NR_oldfstat 28 | ||
43 | #define __NR_pause 29 | ||
44 | #define __NR_utime 30 | ||
45 | #define __NR_stty 31 | ||
46 | #define __NR_gtty 32 | ||
47 | #define __NR_access 33 | ||
48 | #define __NR_nice 34 | ||
49 | #define __NR_ftime 35 | ||
50 | #define __NR_sync 36 | ||
51 | #define __NR_kill 37 | ||
52 | #define __NR_rename 38 | ||
53 | #define __NR_mkdir 39 | ||
54 | #define __NR_rmdir 40 | ||
55 | #define __NR_dup 41 | ||
56 | #define __NR_pipe 42 | ||
57 | #define __NR_times 43 | ||
58 | #define __NR_prof 44 | ||
59 | #define __NR_brk 45 | ||
60 | #define __NR_setgid 46 | ||
61 | #define __NR_getgid 47 | ||
62 | #define __NR_signal 48 | ||
63 | #define __NR_geteuid 49 | ||
64 | #define __NR_getegid 50 | ||
65 | #define __NR_acct 51 | ||
66 | #define __NR_umount2 52 | ||
67 | #define __NR_lock 53 | ||
68 | #define __NR_ioctl 54 | ||
69 | #define __NR_fcntl 55 | ||
70 | #define __NR_mpx 56 | ||
71 | #define __NR_setpgid 57 | ||
72 | #define __NR_ulimit 58 | ||
73 | #define __NR_oldolduname 59 | ||
74 | #define __NR_umask 60 | ||
75 | #define __NR_chroot 61 | ||
76 | #define __NR_ustat 62 | ||
77 | #define __NR_dup2 63 | ||
78 | #define __NR_getppid 64 | ||
79 | #define __NR_getpgrp 65 | ||
80 | #define __NR_setsid 66 | ||
81 | #define __NR_sigaction 67 | ||
82 | #define __NR_sgetmask 68 | ||
83 | #define __NR_ssetmask 69 | ||
84 | #define __NR_setreuid 70 | ||
85 | #define __NR_setregid 71 | ||
86 | #define __NR_sigsuspend 72 | ||
87 | #define __NR_sigpending 73 | ||
88 | #define __NR_sethostname 74 | ||
89 | #define __NR_setrlimit 75 | ||
90 | #define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ | ||
91 | #define __NR_getrusage 77 | ||
92 | #define __NR_gettimeofday 78 | ||
93 | #define __NR_settimeofday 79 | ||
94 | #define __NR_getgroups 80 | ||
95 | #define __NR_setgroups 81 | ||
96 | #define __NR_select 82 | ||
97 | #define __NR_symlink 83 | ||
98 | #define __NR_oldlstat 84 | ||
99 | #define __NR_readlink 85 | ||
100 | #define __NR_uselib 86 | ||
101 | #define __NR_swapon 87 | ||
102 | #define __NR_reboot 88 | ||
103 | #define __NR_readdir 89 | ||
104 | #define __NR_mmap 90 | ||
105 | #define __NR_munmap 91 | ||
106 | #define __NR_truncate 92 | ||
107 | #define __NR_ftruncate 93 | ||
108 | #define __NR_fchmod 94 | ||
109 | #define __NR_fchown 95 | ||
110 | #define __NR_getpriority 96 | ||
111 | #define __NR_setpriority 97 | ||
112 | #define __NR_profil 98 | ||
113 | #define __NR_statfs 99 | ||
114 | #define __NR_fstatfs 100 | ||
115 | #define __NR_ioperm 101 | ||
116 | #define __NR_socketcall 102 | ||
117 | #define __NR_syslog 103 | ||
118 | #define __NR_setitimer 104 | ||
119 | #define __NR_getitimer 105 | ||
120 | #define __NR_stat 106 | ||
121 | #define __NR_lstat 107 | ||
122 | #define __NR_fstat 108 | ||
123 | #define __NR_olduname 109 | ||
124 | #define __NR_iopl 110 | ||
125 | #define __NR_vhangup 111 | ||
126 | #define __NR_idle 112 | ||
127 | #define __NR_vm86old 113 | ||
128 | #define __NR_wait4 114 | ||
129 | #define __NR_swapoff 115 | ||
130 | #define __NR_sysinfo 116 | ||
131 | #define __NR_ipc 117 | ||
132 | #define __NR_fsync 118 | ||
133 | #define __NR_sigreturn 119 | ||
134 | #define __NR_clone 120 | ||
135 | #define __NR_setdomainname 121 | ||
136 | #define __NR_uname 122 | ||
137 | #define __NR_modify_ldt 123 | ||
138 | #define __NR_adjtimex 124 | ||
139 | #define __NR_mprotect 125 | ||
140 | #define __NR_sigprocmask 126 | ||
141 | #define __NR_create_module 127 | ||
142 | #define __NR_init_module 128 | ||
143 | #define __NR_delete_module 129 | ||
144 | #define __NR_get_kernel_syms 130 | ||
145 | #define __NR_quotactl 131 | ||
146 | #define __NR_getpgid 132 | ||
147 | #define __NR_fchdir 133 | ||
148 | #define __NR_bdflush 134 | ||
149 | #define __NR_sysfs 135 | ||
150 | #define __NR_personality 136 | ||
151 | #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ | ||
152 | #define __NR_setfsuid 138 | ||
153 | #define __NR_setfsgid 139 | ||
154 | #define __NR__llseek 140 | ||
155 | #define __NR_getdents 141 | ||
156 | #define __NR__newselect 142 | ||
157 | #define __NR_flock 143 | ||
158 | #define __NR_msync 144 | ||
159 | #define __NR_readv 145 | ||
160 | #define __NR_writev 146 | ||
161 | #define __NR_getsid 147 | ||
162 | #define __NR_fdatasync 148 | ||
163 | #define __NR__sysctl 149 | ||
164 | #define __NR_mlock 150 | ||
165 | #define __NR_munlock 151 | ||
166 | #define __NR_mlockall 152 | ||
167 | #define __NR_munlockall 153 | ||
168 | #define __NR_sched_setparam 154 | ||
169 | #define __NR_sched_getparam 155 | ||
170 | #define __NR_sched_setscheduler 156 | ||
171 | #define __NR_sched_getscheduler 157 | ||
172 | #define __NR_sched_yield 158 | ||
173 | #define __NR_sched_get_priority_max 159 | ||
174 | #define __NR_sched_get_priority_min 160 | ||
175 | #define __NR_sched_rr_get_interval 161 | ||
176 | #define __NR_nanosleep 162 | ||
177 | #define __NR_mremap 163 | ||
178 | #define __NR_setresuid 164 | ||
179 | #define __NR_getresuid 165 | ||
180 | #define __NR_vm86 166 | ||
181 | #define __NR_query_module 167 | ||
182 | #define __NR_poll 168 | ||
183 | #define __NR_nfsservctl 169 | ||
184 | #define __NR_setresgid 170 | ||
185 | #define __NR_getresgid 171 | ||
186 | #define __NR_prctl 172 | ||
187 | #define __NR_rt_sigreturn 173 | ||
188 | #define __NR_rt_sigaction 174 | ||
189 | #define __NR_rt_sigprocmask 175 | ||
190 | #define __NR_rt_sigpending 176 | ||
191 | #define __NR_rt_sigtimedwait 177 | ||
192 | #define __NR_rt_sigqueueinfo 178 | ||
193 | #define __NR_rt_sigsuspend 179 | ||
194 | #define __NR_pread64 180 | ||
195 | #define __NR_pwrite64 181 | ||
196 | #define __NR_chown 182 | ||
197 | #define __NR_getcwd 183 | ||
198 | #define __NR_capget 184 | ||
199 | #define __NR_capset 185 | ||
200 | #define __NR_sigaltstack 186 | ||
201 | #define __NR_sendfile 187 | ||
202 | #define __NR_getpmsg 188 /* some people actually want streams */ | ||
203 | #define __NR_putpmsg 189 /* some people actually want streams */ | ||
204 | #define __NR_vfork 190 | ||
205 | #define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ | ||
206 | #define __NR_mmap2 192 | ||
207 | #define __NR_truncate64 193 | ||
208 | #define __NR_ftruncate64 194 | ||
209 | #define __NR_stat64 195 | ||
210 | #define __NR_lstat64 196 | ||
211 | #define __NR_fstat64 197 | ||
212 | #define __NR_lchown32 198 | ||
213 | #define __NR_getuid32 199 | ||
214 | #define __NR_getgid32 200 | ||
215 | #define __NR_geteuid32 201 | ||
216 | #define __NR_getegid32 202 | ||
217 | #define __NR_setreuid32 203 | ||
218 | #define __NR_setregid32 204 | ||
219 | #define __NR_getgroups32 205 | ||
220 | #define __NR_setgroups32 206 | ||
221 | #define __NR_fchown32 207 | ||
222 | #define __NR_setresuid32 208 | ||
223 | #define __NR_getresuid32 209 | ||
224 | #define __NR_setresgid32 210 | ||
225 | #define __NR_getresgid32 211 | ||
226 | #define __NR_chown32 212 | ||
227 | #define __NR_setuid32 213 | ||
228 | #define __NR_setgid32 214 | ||
229 | #define __NR_setfsuid32 215 | ||
230 | #define __NR_setfsgid32 216 | ||
231 | #define __NR_pivot_root 217 | ||
232 | #define __NR_mincore 218 | ||
233 | #define __NR_madvise 219 | ||
234 | #define __NR_madvise1 219 /* delete when C lib stub is removed */ | ||
235 | #define __NR_getdents64 220 | ||
236 | #define __NR_fcntl64 221 | ||
237 | /* 223 is unused */ | ||
238 | #define __NR_gettid 224 | ||
239 | #define __NR_readahead 225 | ||
240 | #define __NR_setxattr 226 | ||
241 | #define __NR_lsetxattr 227 | ||
242 | #define __NR_fsetxattr 228 | ||
243 | #define __NR_getxattr 229 | ||
244 | #define __NR_lgetxattr 230 | ||
245 | #define __NR_fgetxattr 231 | ||
246 | #define __NR_listxattr 232 | ||
247 | #define __NR_llistxattr 233 | ||
248 | #define __NR_flistxattr 234 | ||
249 | #define __NR_removexattr 235 | ||
250 | #define __NR_lremovexattr 236 | ||
251 | #define __NR_fremovexattr 237 | ||
252 | #define __NR_tkill 238 | ||
253 | #define __NR_sendfile64 239 | ||
254 | #define __NR_futex 240 | ||
255 | #define __NR_sched_setaffinity 241 | ||
256 | #define __NR_sched_getaffinity 242 | ||
257 | #define __NR_set_thread_area 243 | ||
258 | #define __NR_get_thread_area 244 | ||
259 | #define __NR_io_setup 245 | ||
260 | #define __NR_io_destroy 246 | ||
261 | #define __NR_io_getevents 247 | ||
262 | #define __NR_io_submit 248 | ||
263 | #define __NR_io_cancel 249 | ||
264 | #define __NR_fadvise64 250 | ||
265 | 15 | ||
266 | #define __NR_exit_group 252 | ||
267 | #define __NR_lookup_dcookie 253 | ||
268 | #define __NR_epoll_create 254 | ||
269 | #define __NR_epoll_ctl 255 | ||
270 | #define __NR_epoll_wait 256 | ||
271 | #define __NR_remap_file_pages 257 | ||
272 | #define __NR_set_tid_address 258 | ||
273 | #define __NR_timer_create 259 | ||
274 | #define __NR_timer_settime (__NR_timer_create+1) | ||
275 | #define __NR_timer_gettime (__NR_timer_create+2) | ||
276 | #define __NR_timer_getoverrun (__NR_timer_create+3) | ||
277 | #define __NR_timer_delete (__NR_timer_create+4) | ||
278 | #define __NR_clock_settime (__NR_timer_create+5) | ||
279 | #define __NR_clock_gettime (__NR_timer_create+6) | ||
280 | #define __NR_clock_getres (__NR_timer_create+7) | ||
281 | #define __NR_clock_nanosleep (__NR_timer_create+8) | ||
282 | #define __NR_statfs64 268 | ||
283 | #define __NR_fstatfs64 269 | ||
284 | #define __NR_tgkill 270 | ||
285 | #define __NR_utimes 271 | ||
286 | #define __NR_fadvise64_64 272 | ||
287 | #define __NR_vserver 273 | ||
288 | #define __NR_mbind 274 | ||
289 | #define __NR_get_mempolicy 275 | ||
290 | #define __NR_set_mempolicy 276 | ||
291 | #define __NR_mq_open 277 | ||
292 | #define __NR_mq_unlink (__NR_mq_open+1) | ||
293 | #define __NR_mq_timedsend (__NR_mq_open+2) | ||
294 | #define __NR_mq_timedreceive (__NR_mq_open+3) | ||
295 | #define __NR_mq_notify (__NR_mq_open+4) | ||
296 | #define __NR_mq_getsetattr (__NR_mq_open+5) | ||
297 | #define __NR_kexec_load 283 | ||
298 | #define __NR_waitid 284 | ||
299 | #define __NR_add_key 286 | ||
300 | #define __NR_request_key 287 | ||
301 | #define __NR_keyctl 288 | ||
302 | #define __NR_cacheflush 289 | ||
303 | #define __NR_ioprio_set 290 | ||
304 | #define __NR_ioprio_get 291 | ||
305 | #define __NR_inotify_init 292 | ||
306 | #define __NR_inotify_add_watch 293 | ||
307 | #define __NR_inotify_rm_watch 294 | ||
308 | #define __NR_migrate_pages 295 | ||
309 | #define __NR_openat 296 | ||
310 | #define __NR_mkdirat 297 | ||
311 | #define __NR_mknodat 298 | ||
312 | #define __NR_fchownat 299 | ||
313 | #define __NR_futimesat 300 | ||
314 | #define __NR_fstatat64 301 | ||
315 | #define __NR_unlinkat 302 | ||
316 | #define __NR_renameat 303 | ||
317 | #define __NR_linkat 304 | ||
318 | #define __NR_symlinkat 305 | ||
319 | #define __NR_readlinkat 306 | ||
320 | #define __NR_fchmodat 307 | ||
321 | #define __NR_faccessat 308 | ||
322 | #define __NR_pselect6 309 | ||
323 | #define __NR_ppoll 310 | ||
324 | #define __NR_unshare 311 | ||
325 | #define __NR_set_robust_list 312 | ||
326 | #define __NR_get_robust_list 313 | ||
327 | #define __NR_splice 314 | ||
328 | #define __NR_sync_file_range 315 | ||
329 | #define __NR_tee 316 | ||
330 | #define __NR_vmsplice 317 | ||
331 | #define __NR_move_pages 318 | ||
332 | #define __NR_getcpu 319 | ||
333 | #define __NR_epoll_pwait 320 | ||
334 | #define __NR_utimensat 321 | ||
335 | #define __NR_signalfd 322 | ||
336 | #define __NR_timerfd_create 323 | ||
337 | #define __NR_eventfd 324 | ||
338 | #define __NR_fallocate 325 | ||
339 | #define __NR_timerfd_settime 326 | ||
340 | #define __NR_timerfd_gettime 327 | ||
341 | #define __NR_signalfd4 328 | ||
342 | #define __NR_eventfd2 329 | ||
343 | #define __NR_epoll_create1 330 | ||
344 | #define __NR_dup3 331 | ||
345 | #define __NR_pipe2 332 | ||
346 | #define __NR_inotify_init1 333 | ||
347 | #define __NR_preadv 334 | ||
348 | #define __NR_pwritev 335 | ||
349 | #define __NR_rt_tgsigqueueinfo 336 | ||
350 | #define __NR_perf_event_open 337 | ||
351 | #define __NR_recvmmsg 338 | ||
352 | #define __NR_setns 339 | ||
353 | |||
354 | #ifdef __KERNEL__ | ||
355 | 16 | ||
356 | #define NR_syscalls 340 | 17 | #define NR_syscalls 340 |
357 | 18 | ||
@@ -382,6 +43,8 @@ | |||
382 | #define __ARCH_WANT_SYS_SIGPROCMASK | 43 | #define __ARCH_WANT_SYS_SIGPROCMASK |
383 | #define __ARCH_WANT_SYS_RT_SIGACTION | 44 | #define __ARCH_WANT_SYS_RT_SIGACTION |
384 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 45 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
46 | #define __ARCH_WANT_SYS_EXECVE | ||
47 | #define __ARCH_WANT_KERNEL_EXECVE | ||
385 | 48 | ||
386 | /* | 49 | /* |
387 | * "Conditional" syscalls | 50 | * "Conditional" syscalls |
@@ -393,5 +56,4 @@ | |||
393 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); | 56 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); |
394 | #endif | 57 | #endif |
395 | 58 | ||
396 | #endif /* __KERNEL__ */ | ||
397 | #endif /* _ASM_UNISTD_H */ | 59 | #endif /* _ASM_UNISTD_H */ |
diff --git a/arch/mn10300/include/uapi/asm/Kbuild b/arch/mn10300/include/uapi/asm/Kbuild index baebb3da1d4..040178cdb3e 100644 --- a/arch/mn10300/include/uapi/asm/Kbuild +++ b/arch/mn10300/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,34 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += auxvec.h | ||
5 | header-y += bitsperlong.h | ||
6 | header-y += byteorder.h | ||
7 | header-y += errno.h | ||
8 | header-y += fcntl.h | ||
9 | header-y += ioctl.h | ||
10 | header-y += ioctls.h | ||
11 | header-y += ipcbuf.h | ||
12 | header-y += kvm_para.h | ||
13 | header-y += mman.h | ||
14 | header-y += msgbuf.h | ||
15 | header-y += param.h | ||
16 | header-y += poll.h | ||
17 | header-y += posix_types.h | ||
18 | header-y += ptrace.h | ||
19 | header-y += resource.h | ||
20 | header-y += sembuf.h | ||
21 | header-y += setup.h | ||
22 | header-y += shmbuf.h | ||
23 | header-y += sigcontext.h | ||
24 | header-y += siginfo.h | ||
25 | header-y += signal.h | ||
26 | header-y += socket.h | ||
27 | header-y += sockios.h | ||
28 | header-y += stat.h | ||
29 | header-y += statfs.h | ||
30 | header-y += swab.h | ||
31 | header-y += termbits.h | ||
32 | header-y += termios.h | ||
33 | header-y += types.h | ||
34 | header-y += unistd.h | ||
diff --git a/arch/mn10300/include/asm/auxvec.h b/arch/mn10300/include/uapi/asm/auxvec.h index 4fdb60b2ae3..4fdb60b2ae3 100644 --- a/arch/mn10300/include/asm/auxvec.h +++ b/arch/mn10300/include/uapi/asm/auxvec.h | |||
diff --git a/arch/mn10300/include/asm/bitsperlong.h b/arch/mn10300/include/uapi/asm/bitsperlong.h index 6dc0bb0c13b..6dc0bb0c13b 100644 --- a/arch/mn10300/include/asm/bitsperlong.h +++ b/arch/mn10300/include/uapi/asm/bitsperlong.h | |||
diff --git a/arch/mn10300/include/asm/byteorder.h b/arch/mn10300/include/uapi/asm/byteorder.h index 5dd0bdd9fee..5dd0bdd9fee 100644 --- a/arch/mn10300/include/asm/byteorder.h +++ b/arch/mn10300/include/uapi/asm/byteorder.h | |||
diff --git a/arch/mn10300/include/asm/errno.h b/arch/mn10300/include/uapi/asm/errno.h index 4c82b503d92..4c82b503d92 100644 --- a/arch/mn10300/include/asm/errno.h +++ b/arch/mn10300/include/uapi/asm/errno.h | |||
diff --git a/arch/mn10300/include/asm/fcntl.h b/arch/mn10300/include/uapi/asm/fcntl.h index 46ab12db573..46ab12db573 100644 --- a/arch/mn10300/include/asm/fcntl.h +++ b/arch/mn10300/include/uapi/asm/fcntl.h | |||
diff --git a/arch/mn10300/include/asm/ioctl.h b/arch/mn10300/include/uapi/asm/ioctl.h index b279fe06dfe..b279fe06dfe 100644 --- a/arch/mn10300/include/asm/ioctl.h +++ b/arch/mn10300/include/uapi/asm/ioctl.h | |||
diff --git a/arch/mn10300/include/asm/ioctls.h b/arch/mn10300/include/uapi/asm/ioctls.h index 0212f4b2255..0212f4b2255 100644 --- a/arch/mn10300/include/asm/ioctls.h +++ b/arch/mn10300/include/uapi/asm/ioctls.h | |||
diff --git a/arch/mn10300/include/asm/ipcbuf.h b/arch/mn10300/include/uapi/asm/ipcbuf.h index 84c7e51cb6d..84c7e51cb6d 100644 --- a/arch/mn10300/include/asm/ipcbuf.h +++ b/arch/mn10300/include/uapi/asm/ipcbuf.h | |||
diff --git a/arch/mn10300/include/asm/kvm_para.h b/arch/mn10300/include/uapi/asm/kvm_para.h index 14fab8f0b95..14fab8f0b95 100644 --- a/arch/mn10300/include/asm/kvm_para.h +++ b/arch/mn10300/include/uapi/asm/kvm_para.h | |||
diff --git a/arch/mn10300/include/asm/mman.h b/arch/mn10300/include/uapi/asm/mman.h index db5c53da73c..db5c53da73c 100644 --- a/arch/mn10300/include/asm/mman.h +++ b/arch/mn10300/include/uapi/asm/mman.h | |||
diff --git a/arch/mn10300/include/asm/msgbuf.h b/arch/mn10300/include/uapi/asm/msgbuf.h index 8b602450cc4..8b602450cc4 100644 --- a/arch/mn10300/include/asm/msgbuf.h +++ b/arch/mn10300/include/uapi/asm/msgbuf.h | |||
diff --git a/arch/mn10300/include/asm/param.h b/arch/mn10300/include/uapi/asm/param.h index 02a0ca6f13c..02a0ca6f13c 100644 --- a/arch/mn10300/include/asm/param.h +++ b/arch/mn10300/include/uapi/asm/param.h | |||
diff --git a/arch/mn10300/include/asm/poll.h b/arch/mn10300/include/uapi/asm/poll.h index c98509d3149..c98509d3149 100644 --- a/arch/mn10300/include/asm/poll.h +++ b/arch/mn10300/include/uapi/asm/poll.h | |||
diff --git a/arch/mn10300/include/asm/posix_types.h b/arch/mn10300/include/uapi/asm/posix_types.h index d31eeea480c..d31eeea480c 100644 --- a/arch/mn10300/include/asm/posix_types.h +++ b/arch/mn10300/include/uapi/asm/posix_types.h | |||
diff --git a/arch/mn10300/include/uapi/asm/ptrace.h b/arch/mn10300/include/uapi/asm/ptrace.h new file mode 100644 index 00000000000..71b2251b7bf --- /dev/null +++ b/arch/mn10300/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,84 @@ | |||
1 | /* MN10300 Exception frame layout and ptrace constants | ||
2 | * | ||
3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | #ifndef _UAPI_ASM_PTRACE_H | ||
12 | #define _UAPI_ASM_PTRACE_H | ||
13 | |||
14 | #define PT_A3 0 | ||
15 | #define PT_A2 1 | ||
16 | #define PT_D3 2 | ||
17 | #define PT_D2 3 | ||
18 | #define PT_MCVF 4 | ||
19 | #define PT_MCRL 5 | ||
20 | #define PT_MCRH 6 | ||
21 | #define PT_MDRQ 7 | ||
22 | #define PT_E1 8 | ||
23 | #define PT_E0 9 | ||
24 | #define PT_E7 10 | ||
25 | #define PT_E6 11 | ||
26 | #define PT_E5 12 | ||
27 | #define PT_E4 13 | ||
28 | #define PT_E3 14 | ||
29 | #define PT_E2 15 | ||
30 | #define PT_SP 16 | ||
31 | #define PT_LAR 17 | ||
32 | #define PT_LIR 18 | ||
33 | #define PT_MDR 19 | ||
34 | #define PT_A1 20 | ||
35 | #define PT_A0 21 | ||
36 | #define PT_D1 22 | ||
37 | #define PT_D0 23 | ||
38 | #define PT_ORIG_D0 24 | ||
39 | #define PT_EPSW 25 | ||
40 | #define PT_PC 26 | ||
41 | #define NR_PTREGS 27 | ||
42 | |||
43 | /* | ||
44 | * This defines the way registers are stored in the event of an exception | ||
45 | * - the strange order is due to the MOVM instruction | ||
46 | */ | ||
47 | struct pt_regs { | ||
48 | unsigned long a3; /* syscall arg 3 */ | ||
49 | unsigned long a2; /* syscall arg 4 */ | ||
50 | unsigned long d3; /* syscall arg 5 */ | ||
51 | unsigned long d2; /* syscall arg 6 */ | ||
52 | unsigned long mcvf; | ||
53 | unsigned long mcrl; | ||
54 | unsigned long mcrh; | ||
55 | unsigned long mdrq; | ||
56 | unsigned long e1; | ||
57 | unsigned long e0; | ||
58 | unsigned long e7; | ||
59 | unsigned long e6; | ||
60 | unsigned long e5; | ||
61 | unsigned long e4; | ||
62 | unsigned long e3; | ||
63 | unsigned long e2; | ||
64 | unsigned long sp; | ||
65 | unsigned long lar; | ||
66 | unsigned long lir; | ||
67 | unsigned long mdr; | ||
68 | unsigned long a1; | ||
69 | unsigned long a0; /* syscall arg 1 */ | ||
70 | unsigned long d1; /* syscall arg 2 */ | ||
71 | unsigned long d0; /* syscall ret */ | ||
72 | struct pt_regs *next; /* next frame pointer */ | ||
73 | unsigned long orig_d0; /* syscall number */ | ||
74 | unsigned long epsw; | ||
75 | unsigned long pc; | ||
76 | }; | ||
77 | |||
78 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ | ||
79 | #define PTRACE_GETREGS 12 | ||
80 | #define PTRACE_SETREGS 13 | ||
81 | #define PTRACE_GETFPREGS 14 | ||
82 | #define PTRACE_SETFPREGS 15 | ||
83 | |||
84 | #endif /* _UAPI_ASM_PTRACE_H */ | ||
diff --git a/arch/mn10300/include/asm/resource.h b/arch/mn10300/include/uapi/asm/resource.h index 04bc4db8921..04bc4db8921 100644 --- a/arch/mn10300/include/asm/resource.h +++ b/arch/mn10300/include/uapi/asm/resource.h | |||
diff --git a/arch/mn10300/include/asm/sembuf.h b/arch/mn10300/include/uapi/asm/sembuf.h index 301f3f9d8aa..301f3f9d8aa 100644 --- a/arch/mn10300/include/asm/sembuf.h +++ b/arch/mn10300/include/uapi/asm/sembuf.h | |||
diff --git a/arch/mn10300/include/uapi/asm/setup.h b/arch/mn10300/include/uapi/asm/setup.h new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/arch/mn10300/include/uapi/asm/setup.h | |||
diff --git a/arch/mn10300/include/asm/shmbuf.h b/arch/mn10300/include/uapi/asm/shmbuf.h index 8f300cc35d6..8f300cc35d6 100644 --- a/arch/mn10300/include/asm/shmbuf.h +++ b/arch/mn10300/include/uapi/asm/shmbuf.h | |||
diff --git a/arch/mn10300/include/asm/sigcontext.h b/arch/mn10300/include/uapi/asm/sigcontext.h index 4de3afff4ad..4de3afff4ad 100644 --- a/arch/mn10300/include/asm/sigcontext.h +++ b/arch/mn10300/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/mn10300/include/asm/siginfo.h b/arch/mn10300/include/uapi/asm/siginfo.h index 0815d29d82e..0815d29d82e 100644 --- a/arch/mn10300/include/asm/siginfo.h +++ b/arch/mn10300/include/uapi/asm/siginfo.h | |||
diff --git a/arch/mn10300/include/uapi/asm/signal.h b/arch/mn10300/include/uapi/asm/signal.h new file mode 100644 index 00000000000..08dcd6a8561 --- /dev/null +++ b/arch/mn10300/include/uapi/asm/signal.h | |||
@@ -0,0 +1,131 @@ | |||
1 | /* MN10300 Signal definitions | ||
2 | * | ||
3 | * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd. | ||
4 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | #ifndef _UAPI_ASM_SIGNAL_H | ||
12 | #define _UAPI_ASM_SIGNAL_H | ||
13 | |||
14 | #include <linux/types.h> | ||
15 | |||
16 | /* Avoid too many header ordering problems. */ | ||
17 | struct siginfo; | ||
18 | |||
19 | #ifndef __KERNEL__ | ||
20 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
21 | |||
22 | #define NSIG 32 | ||
23 | typedef unsigned long sigset_t; | ||
24 | |||
25 | #endif /* __KERNEL__ */ | ||
26 | |||
27 | #define SIGHUP 1 | ||
28 | #define SIGINT 2 | ||
29 | #define SIGQUIT 3 | ||
30 | #define SIGILL 4 | ||
31 | #define SIGTRAP 5 | ||
32 | #define SIGABRT 6 | ||
33 | #define SIGIOT 6 | ||
34 | #define SIGBUS 7 | ||
35 | #define SIGFPE 8 | ||
36 | #define SIGKILL 9 | ||
37 | #define SIGUSR1 10 | ||
38 | #define SIGSEGV 11 | ||
39 | #define SIGUSR2 12 | ||
40 | #define SIGPIPE 13 | ||
41 | #define SIGALRM 14 | ||
42 | #define SIGTERM 15 | ||
43 | #define SIGSTKFLT 16 | ||
44 | #define SIGCHLD 17 | ||
45 | #define SIGCONT 18 | ||
46 | #define SIGSTOP 19 | ||
47 | #define SIGTSTP 20 | ||
48 | #define SIGTTIN 21 | ||
49 | #define SIGTTOU 22 | ||
50 | #define SIGURG 23 | ||
51 | #define SIGXCPU 24 | ||
52 | #define SIGXFSZ 25 | ||
53 | #define SIGVTALRM 26 | ||
54 | #define SIGPROF 27 | ||
55 | #define SIGWINCH 28 | ||
56 | #define SIGIO 29 | ||
57 | #define SIGPOLL SIGIO | ||
58 | /* | ||
59 | #define SIGLOST 29 | ||
60 | */ | ||
61 | #define SIGPWR 30 | ||
62 | #define SIGSYS 31 | ||
63 | #define SIGUNUSED 31 | ||
64 | |||
65 | /* These should not be considered constants from userland. */ | ||
66 | #define SIGRTMIN 32 | ||
67 | #define SIGRTMAX _NSIG | ||
68 | |||
69 | /* | ||
70 | * SA_FLAGS values: | ||
71 | * | ||
72 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
73 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
74 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
75 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
76 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
77 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
78 | * | ||
79 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
80 | * Unix names RESETHAND and NODEFER respectively. | ||
81 | */ | ||
82 | #define SA_NOCLDSTOP 0x00000001U | ||
83 | #define SA_NOCLDWAIT 0x00000002U | ||
84 | #define SA_SIGINFO 0x00000004U | ||
85 | #define SA_ONSTACK 0x08000000U | ||
86 | #define SA_RESTART 0x10000000U | ||
87 | #define SA_NODEFER 0x40000000U | ||
88 | #define SA_RESETHAND 0x80000000U | ||
89 | |||
90 | #define SA_NOMASK SA_NODEFER | ||
91 | #define SA_ONESHOT SA_RESETHAND | ||
92 | |||
93 | #define SA_RESTORER 0x04000000 | ||
94 | |||
95 | /* | ||
96 | * sigaltstack controls | ||
97 | */ | ||
98 | #define SS_ONSTACK 1 | ||
99 | #define SS_DISABLE 2 | ||
100 | |||
101 | #define MINSIGSTKSZ 2048 | ||
102 | #define SIGSTKSZ 8192 | ||
103 | |||
104 | #include <asm-generic/signal-defs.h> | ||
105 | |||
106 | #ifndef __KERNEL__ | ||
107 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
108 | |||
109 | struct sigaction { | ||
110 | union { | ||
111 | __sighandler_t _sa_handler; | ||
112 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
113 | } _u; | ||
114 | sigset_t sa_mask; | ||
115 | unsigned long sa_flags; | ||
116 | void (*sa_restorer)(void); | ||
117 | }; | ||
118 | |||
119 | #define sa_handler _u._sa_handler | ||
120 | #define sa_sigaction _u._sa_sigaction | ||
121 | |||
122 | #endif /* __KERNEL__ */ | ||
123 | |||
124 | typedef struct sigaltstack { | ||
125 | void __user *ss_sp; | ||
126 | int ss_flags; | ||
127 | size_t ss_size; | ||
128 | } stack_t; | ||
129 | |||
130 | |||
131 | #endif /* _UAPI_ASM_SIGNAL_H */ | ||
diff --git a/arch/mn10300/include/asm/socket.h b/arch/mn10300/include/uapi/asm/socket.h index 820463a484b..820463a484b 100644 --- a/arch/mn10300/include/asm/socket.h +++ b/arch/mn10300/include/uapi/asm/socket.h | |||
diff --git a/arch/mn10300/include/asm/sockios.h b/arch/mn10300/include/uapi/asm/sockios.h index b03043a1c56..b03043a1c56 100644 --- a/arch/mn10300/include/asm/sockios.h +++ b/arch/mn10300/include/uapi/asm/sockios.h | |||
diff --git a/arch/mn10300/include/asm/stat.h b/arch/mn10300/include/uapi/asm/stat.h index 63ff8371cf2..63ff8371cf2 100644 --- a/arch/mn10300/include/asm/stat.h +++ b/arch/mn10300/include/uapi/asm/stat.h | |||
diff --git a/arch/mn10300/include/asm/statfs.h b/arch/mn10300/include/uapi/asm/statfs.h index 0b91fe198c2..0b91fe198c2 100644 --- a/arch/mn10300/include/asm/statfs.h +++ b/arch/mn10300/include/uapi/asm/statfs.h | |||
diff --git a/arch/mn10300/include/asm/swab.h b/arch/mn10300/include/uapi/asm/swab.h index bd818a820ca..bd818a820ca 100644 --- a/arch/mn10300/include/asm/swab.h +++ b/arch/mn10300/include/uapi/asm/swab.h | |||
diff --git a/arch/mn10300/include/asm/termbits.h b/arch/mn10300/include/uapi/asm/termbits.h index 130d4249597..130d4249597 100644 --- a/arch/mn10300/include/asm/termbits.h +++ b/arch/mn10300/include/uapi/asm/termbits.h | |||
diff --git a/arch/mn10300/include/uapi/asm/termios.h b/arch/mn10300/include/uapi/asm/termios.h new file mode 100644 index 00000000000..11d3cc9d316 --- /dev/null +++ b/arch/mn10300/include/uapi/asm/termios.h | |||
@@ -0,0 +1,83 @@ | |||
1 | #ifndef _UAPI_ASM_TERMIOS_H | ||
2 | #define _UAPI_ASM_TERMIOS_H | ||
3 | |||
4 | #include <asm/termbits.h> | ||
5 | #include <asm/ioctls.h> | ||
6 | |||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | |||
25 | /* modem lines */ | ||
26 | #define TIOCM_LE 0x001 | ||
27 | #define TIOCM_DTR 0x002 | ||
28 | #define TIOCM_RTS 0x004 | ||
29 | #define TIOCM_ST 0x008 | ||
30 | #define TIOCM_SR 0x010 | ||
31 | #define TIOCM_CTS 0x020 | ||
32 | #define TIOCM_CAR 0x040 | ||
33 | #define TIOCM_RNG 0x080 | ||
34 | #define TIOCM_DSR 0x100 | ||
35 | #define TIOCM_CD TIOCM_CAR | ||
36 | #define TIOCM_RI TIOCM_RNG | ||
37 | #define TIOCM_OUT1 0x2000 | ||
38 | #define TIOCM_OUT2 0x4000 | ||
39 | #define TIOCM_LOOP 0x8000 | ||
40 | |||
41 | #define TIOCM_MODEM_BITS TIOCM_OUT2 /* IRDA support */ | ||
42 | |||
43 | /* | ||
44 | * Translate a "termio" structure into a "termios". Ugh. | ||
45 | */ | ||
46 | #define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ | ||
47 | unsigned short __tmp; \ | ||
48 | get_user(__tmp, &(termio)->x); \ | ||
49 | *(unsigned short *) &(termios)->x = __tmp; \ | ||
50 | } | ||
51 | |||
52 | #define user_termio_to_kernel_termios(termios, termio) \ | ||
53 | ({ \ | ||
54 | SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ | ||
55 | SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ | ||
56 | SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ | ||
57 | SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ | ||
58 | copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ | ||
59 | }) | ||
60 | |||
61 | /* | ||
62 | * Translate a "termios" structure into a "termio". Ugh. | ||
63 | */ | ||
64 | #define kernel_termios_to_user_termio(termio, termios) \ | ||
65 | ({ \ | ||
66 | put_user((termios)->c_iflag, &(termio)->c_iflag); \ | ||
67 | put_user((termios)->c_oflag, &(termio)->c_oflag); \ | ||
68 | put_user((termios)->c_cflag, &(termio)->c_cflag); \ | ||
69 | put_user((termios)->c_lflag, &(termio)->c_lflag); \ | ||
70 | put_user((termios)->c_line, &(termio)->c_line); \ | ||
71 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | ||
72 | }) | ||
73 | |||
74 | #define user_termios_to_kernel_termios(k, u) \ | ||
75 | copy_from_user(k, u, sizeof(struct termios2)) | ||
76 | #define kernel_termios_to_user_termios(u, k) \ | ||
77 | copy_to_user(u, k, sizeof(struct termios2)) | ||
78 | #define user_termios_to_kernel_termios_1(k, u) \ | ||
79 | copy_from_user(k, u, sizeof(struct termios)) | ||
80 | #define kernel_termios_to_user_termios_1(u, k) \ | ||
81 | copy_to_user(u, k, sizeof(struct termios)) | ||
82 | |||
83 | #endif /* _UAPI_ASM_TERMIOS_H */ | ||
diff --git a/arch/mn10300/include/uapi/asm/types.h b/arch/mn10300/include/uapi/asm/types.h new file mode 100644 index 00000000000..8b3f0501b9b --- /dev/null +++ b/arch/mn10300/include/uapi/asm/types.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* MN10300 Basic type definitions | ||
2 | * | ||
3 | * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd. | ||
4 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | #include <asm-generic/int-ll64.h> | ||
diff --git a/arch/mn10300/include/uapi/asm/unistd.h b/arch/mn10300/include/uapi/asm/unistd.h new file mode 100644 index 00000000000..e28ac3f4247 --- /dev/null +++ b/arch/mn10300/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,354 @@ | |||
1 | /* MN10300 System call number list | ||
2 | * | ||
3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | #ifndef _UAPI_ASM_UNISTD_H | ||
12 | #define _UAPI_ASM_UNISTD_H | ||
13 | |||
14 | #define __NR_restart_syscall 0 | ||
15 | #define __NR_exit 1 | ||
16 | #define __NR_fork 2 | ||
17 | #define __NR_read 3 | ||
18 | #define __NR_write 4 | ||
19 | #define __NR_open 5 | ||
20 | #define __NR_close 6 | ||
21 | #define __NR_waitpid 7 | ||
22 | #define __NR_creat 8 | ||
23 | #define __NR_link 9 | ||
24 | #define __NR_unlink 10 | ||
25 | #define __NR_execve 11 | ||
26 | #define __NR_chdir 12 | ||
27 | #define __NR_time 13 | ||
28 | #define __NR_mknod 14 | ||
29 | #define __NR_chmod 15 | ||
30 | #define __NR_lchown 16 | ||
31 | #define __NR_break 17 | ||
32 | #define __NR_oldstat 18 | ||
33 | #define __NR_lseek 19 | ||
34 | #define __NR_getpid 20 | ||
35 | #define __NR_mount 21 | ||
36 | #define __NR_umount 22 | ||
37 | #define __NR_setuid 23 | ||
38 | #define __NR_getuid 24 | ||
39 | #define __NR_stime 25 | ||
40 | #define __NR_ptrace 26 | ||
41 | #define __NR_alarm 27 | ||
42 | #define __NR_oldfstat 28 | ||
43 | #define __NR_pause 29 | ||
44 | #define __NR_utime 30 | ||
45 | #define __NR_stty 31 | ||
46 | #define __NR_gtty 32 | ||
47 | #define __NR_access 33 | ||
48 | #define __NR_nice 34 | ||
49 | #define __NR_ftime 35 | ||
50 | #define __NR_sync 36 | ||
51 | #define __NR_kill 37 | ||
52 | #define __NR_rename 38 | ||
53 | #define __NR_mkdir 39 | ||
54 | #define __NR_rmdir 40 | ||
55 | #define __NR_dup 41 | ||
56 | #define __NR_pipe 42 | ||
57 | #define __NR_times 43 | ||
58 | #define __NR_prof 44 | ||
59 | #define __NR_brk 45 | ||
60 | #define __NR_setgid 46 | ||
61 | #define __NR_getgid 47 | ||
62 | #define __NR_signal 48 | ||
63 | #define __NR_geteuid 49 | ||
64 | #define __NR_getegid 50 | ||
65 | #define __NR_acct 51 | ||
66 | #define __NR_umount2 52 | ||
67 | #define __NR_lock 53 | ||
68 | #define __NR_ioctl 54 | ||
69 | #define __NR_fcntl 55 | ||
70 | #define __NR_mpx 56 | ||
71 | #define __NR_setpgid 57 | ||
72 | #define __NR_ulimit 58 | ||
73 | #define __NR_oldolduname 59 | ||
74 | #define __NR_umask 60 | ||
75 | #define __NR_chroot 61 | ||
76 | #define __NR_ustat 62 | ||
77 | #define __NR_dup2 63 | ||
78 | #define __NR_getppid 64 | ||
79 | #define __NR_getpgrp 65 | ||
80 | #define __NR_setsid 66 | ||
81 | #define __NR_sigaction 67 | ||
82 | #define __NR_sgetmask 68 | ||
83 | #define __NR_ssetmask 69 | ||
84 | #define __NR_setreuid 70 | ||
85 | #define __NR_setregid 71 | ||
86 | #define __NR_sigsuspend 72 | ||
87 | #define __NR_sigpending 73 | ||
88 | #define __NR_sethostname 74 | ||
89 | #define __NR_setrlimit 75 | ||
90 | #define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ | ||
91 | #define __NR_getrusage 77 | ||
92 | #define __NR_gettimeofday 78 | ||
93 | #define __NR_settimeofday 79 | ||
94 | #define __NR_getgroups 80 | ||
95 | #define __NR_setgroups 81 | ||
96 | #define __NR_select 82 | ||
97 | #define __NR_symlink 83 | ||
98 | #define __NR_oldlstat 84 | ||
99 | #define __NR_readlink 85 | ||
100 | #define __NR_uselib 86 | ||
101 | #define __NR_swapon 87 | ||
102 | #define __NR_reboot 88 | ||
103 | #define __NR_readdir 89 | ||
104 | #define __NR_mmap 90 | ||
105 | #define __NR_munmap 91 | ||
106 | #define __NR_truncate 92 | ||
107 | #define __NR_ftruncate 93 | ||
108 | #define __NR_fchmod 94 | ||
109 | #define __NR_fchown 95 | ||
110 | #define __NR_getpriority 96 | ||
111 | #define __NR_setpriority 97 | ||
112 | #define __NR_profil 98 | ||
113 | #define __NR_statfs 99 | ||
114 | #define __NR_fstatfs 100 | ||
115 | #define __NR_ioperm 101 | ||
116 | #define __NR_socketcall 102 | ||
117 | #define __NR_syslog 103 | ||
118 | #define __NR_setitimer 104 | ||
119 | #define __NR_getitimer 105 | ||
120 | #define __NR_stat 106 | ||
121 | #define __NR_lstat 107 | ||
122 | #define __NR_fstat 108 | ||
123 | #define __NR_olduname 109 | ||
124 | #define __NR_iopl 110 | ||
125 | #define __NR_vhangup 111 | ||
126 | #define __NR_idle 112 | ||
127 | #define __NR_vm86old 113 | ||
128 | #define __NR_wait4 114 | ||
129 | #define __NR_swapoff 115 | ||
130 | #define __NR_sysinfo 116 | ||
131 | #define __NR_ipc 117 | ||
132 | #define __NR_fsync 118 | ||
133 | #define __NR_sigreturn 119 | ||
134 | #define __NR_clone 120 | ||
135 | #define __NR_setdomainname 121 | ||
136 | #define __NR_uname 122 | ||
137 | #define __NR_modify_ldt 123 | ||
138 | #define __NR_adjtimex 124 | ||
139 | #define __NR_mprotect 125 | ||
140 | #define __NR_sigprocmask 126 | ||
141 | #define __NR_create_module 127 | ||
142 | #define __NR_init_module 128 | ||
143 | #define __NR_delete_module 129 | ||
144 | #define __NR_get_kernel_syms 130 | ||
145 | #define __NR_quotactl 131 | ||
146 | #define __NR_getpgid 132 | ||
147 | #define __NR_fchdir 133 | ||
148 | #define __NR_bdflush 134 | ||
149 | #define __NR_sysfs 135 | ||
150 | #define __NR_personality 136 | ||
151 | #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ | ||
152 | #define __NR_setfsuid 138 | ||
153 | #define __NR_setfsgid 139 | ||
154 | #define __NR__llseek 140 | ||
155 | #define __NR_getdents 141 | ||
156 | #define __NR__newselect 142 | ||
157 | #define __NR_flock 143 | ||
158 | #define __NR_msync 144 | ||
159 | #define __NR_readv 145 | ||
160 | #define __NR_writev 146 | ||
161 | #define __NR_getsid 147 | ||
162 | #define __NR_fdatasync 148 | ||
163 | #define __NR__sysctl 149 | ||
164 | #define __NR_mlock 150 | ||
165 | #define __NR_munlock 151 | ||
166 | #define __NR_mlockall 152 | ||
167 | #define __NR_munlockall 153 | ||
168 | #define __NR_sched_setparam 154 | ||
169 | #define __NR_sched_getparam 155 | ||
170 | #define __NR_sched_setscheduler 156 | ||
171 | #define __NR_sched_getscheduler 157 | ||
172 | #define __NR_sched_yield 158 | ||
173 | #define __NR_sched_get_priority_max 159 | ||
174 | #define __NR_sched_get_priority_min 160 | ||
175 | #define __NR_sched_rr_get_interval 161 | ||
176 | #define __NR_nanosleep 162 | ||
177 | #define __NR_mremap 163 | ||
178 | #define __NR_setresuid 164 | ||
179 | #define __NR_getresuid 165 | ||
180 | #define __NR_vm86 166 | ||
181 | #define __NR_query_module 167 | ||
182 | #define __NR_poll 168 | ||
183 | #define __NR_nfsservctl 169 | ||
184 | #define __NR_setresgid 170 | ||
185 | #define __NR_getresgid 171 | ||
186 | #define __NR_prctl 172 | ||
187 | #define __NR_rt_sigreturn 173 | ||
188 | #define __NR_rt_sigaction 174 | ||
189 | #define __NR_rt_sigprocmask 175 | ||
190 | #define __NR_rt_sigpending 176 | ||
191 | #define __NR_rt_sigtimedwait 177 | ||
192 | #define __NR_rt_sigqueueinfo 178 | ||
193 | #define __NR_rt_sigsuspend 179 | ||
194 | #define __NR_pread64 180 | ||
195 | #define __NR_pwrite64 181 | ||
196 | #define __NR_chown 182 | ||
197 | #define __NR_getcwd 183 | ||
198 | #define __NR_capget 184 | ||
199 | #define __NR_capset 185 | ||
200 | #define __NR_sigaltstack 186 | ||
201 | #define __NR_sendfile 187 | ||
202 | #define __NR_getpmsg 188 /* some people actually want streams */ | ||
203 | #define __NR_putpmsg 189 /* some people actually want streams */ | ||
204 | #define __NR_vfork 190 | ||
205 | #define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ | ||
206 | #define __NR_mmap2 192 | ||
207 | #define __NR_truncate64 193 | ||
208 | #define __NR_ftruncate64 194 | ||
209 | #define __NR_stat64 195 | ||
210 | #define __NR_lstat64 196 | ||
211 | #define __NR_fstat64 197 | ||
212 | #define __NR_lchown32 198 | ||
213 | #define __NR_getuid32 199 | ||
214 | #define __NR_getgid32 200 | ||
215 | #define __NR_geteuid32 201 | ||
216 | #define __NR_getegid32 202 | ||
217 | #define __NR_setreuid32 203 | ||
218 | #define __NR_setregid32 204 | ||
219 | #define __NR_getgroups32 205 | ||
220 | #define __NR_setgroups32 206 | ||
221 | #define __NR_fchown32 207 | ||
222 | #define __NR_setresuid32 208 | ||
223 | #define __NR_getresuid32 209 | ||
224 | #define __NR_setresgid32 210 | ||
225 | #define __NR_getresgid32 211 | ||
226 | #define __NR_chown32 212 | ||
227 | #define __NR_setuid32 213 | ||
228 | #define __NR_setgid32 214 | ||
229 | #define __NR_setfsuid32 215 | ||
230 | #define __NR_setfsgid32 216 | ||
231 | #define __NR_pivot_root 217 | ||
232 | #define __NR_mincore 218 | ||
233 | #define __NR_madvise 219 | ||
234 | #define __NR_madvise1 219 /* delete when C lib stub is removed */ | ||
235 | #define __NR_getdents64 220 | ||
236 | #define __NR_fcntl64 221 | ||
237 | /* 223 is unused */ | ||
238 | #define __NR_gettid 224 | ||
239 | #define __NR_readahead 225 | ||
240 | #define __NR_setxattr 226 | ||
241 | #define __NR_lsetxattr 227 | ||
242 | #define __NR_fsetxattr 228 | ||
243 | #define __NR_getxattr 229 | ||
244 | #define __NR_lgetxattr 230 | ||
245 | #define __NR_fgetxattr 231 | ||
246 | #define __NR_listxattr 232 | ||
247 | #define __NR_llistxattr 233 | ||
248 | #define __NR_flistxattr 234 | ||
249 | #define __NR_removexattr 235 | ||
250 | #define __NR_lremovexattr 236 | ||
251 | #define __NR_fremovexattr 237 | ||
252 | #define __NR_tkill 238 | ||
253 | #define __NR_sendfile64 239 | ||
254 | #define __NR_futex 240 | ||
255 | #define __NR_sched_setaffinity 241 | ||
256 | #define __NR_sched_getaffinity 242 | ||
257 | #define __NR_set_thread_area 243 | ||
258 | #define __NR_get_thread_area 244 | ||
259 | #define __NR_io_setup 245 | ||
260 | #define __NR_io_destroy 246 | ||
261 | #define __NR_io_getevents 247 | ||
262 | #define __NR_io_submit 248 | ||
263 | #define __NR_io_cancel 249 | ||
264 | #define __NR_fadvise64 250 | ||
265 | |||
266 | #define __NR_exit_group 252 | ||
267 | #define __NR_lookup_dcookie 253 | ||
268 | #define __NR_epoll_create 254 | ||
269 | #define __NR_epoll_ctl 255 | ||
270 | #define __NR_epoll_wait 256 | ||
271 | #define __NR_remap_file_pages 257 | ||
272 | #define __NR_set_tid_address 258 | ||
273 | #define __NR_timer_create 259 | ||
274 | #define __NR_timer_settime (__NR_timer_create+1) | ||
275 | #define __NR_timer_gettime (__NR_timer_create+2) | ||
276 | #define __NR_timer_getoverrun (__NR_timer_create+3) | ||
277 | #define __NR_timer_delete (__NR_timer_create+4) | ||
278 | #define __NR_clock_settime (__NR_timer_create+5) | ||
279 | #define __NR_clock_gettime (__NR_timer_create+6) | ||
280 | #define __NR_clock_getres (__NR_timer_create+7) | ||
281 | #define __NR_clock_nanosleep (__NR_timer_create+8) | ||
282 | #define __NR_statfs64 268 | ||
283 | #define __NR_fstatfs64 269 | ||
284 | #define __NR_tgkill 270 | ||
285 | #define __NR_utimes 271 | ||
286 | #define __NR_fadvise64_64 272 | ||
287 | #define __NR_vserver 273 | ||
288 | #define __NR_mbind 274 | ||
289 | #define __NR_get_mempolicy 275 | ||
290 | #define __NR_set_mempolicy 276 | ||
291 | #define __NR_mq_open 277 | ||
292 | #define __NR_mq_unlink (__NR_mq_open+1) | ||
293 | #define __NR_mq_timedsend (__NR_mq_open+2) | ||
294 | #define __NR_mq_timedreceive (__NR_mq_open+3) | ||
295 | #define __NR_mq_notify (__NR_mq_open+4) | ||
296 | #define __NR_mq_getsetattr (__NR_mq_open+5) | ||
297 | #define __NR_kexec_load 283 | ||
298 | #define __NR_waitid 284 | ||
299 | #define __NR_add_key 286 | ||
300 | #define __NR_request_key 287 | ||
301 | #define __NR_keyctl 288 | ||
302 | #define __NR_cacheflush 289 | ||
303 | #define __NR_ioprio_set 290 | ||
304 | #define __NR_ioprio_get 291 | ||
305 | #define __NR_inotify_init 292 | ||
306 | #define __NR_inotify_add_watch 293 | ||
307 | #define __NR_inotify_rm_watch 294 | ||
308 | #define __NR_migrate_pages 295 | ||
309 | #define __NR_openat 296 | ||
310 | #define __NR_mkdirat 297 | ||
311 | #define __NR_mknodat 298 | ||
312 | #define __NR_fchownat 299 | ||
313 | #define __NR_futimesat 300 | ||
314 | #define __NR_fstatat64 301 | ||
315 | #define __NR_unlinkat 302 | ||
316 | #define __NR_renameat 303 | ||
317 | #define __NR_linkat 304 | ||
318 | #define __NR_symlinkat 305 | ||
319 | #define __NR_readlinkat 306 | ||
320 | #define __NR_fchmodat 307 | ||
321 | #define __NR_faccessat 308 | ||
322 | #define __NR_pselect6 309 | ||
323 | #define __NR_ppoll 310 | ||
324 | #define __NR_unshare 311 | ||
325 | #define __NR_set_robust_list 312 | ||
326 | #define __NR_get_robust_list 313 | ||
327 | #define __NR_splice 314 | ||
328 | #define __NR_sync_file_range 315 | ||
329 | #define __NR_tee 316 | ||
330 | #define __NR_vmsplice 317 | ||
331 | #define __NR_move_pages 318 | ||
332 | #define __NR_getcpu 319 | ||
333 | #define __NR_epoll_pwait 320 | ||
334 | #define __NR_utimensat 321 | ||
335 | #define __NR_signalfd 322 | ||
336 | #define __NR_timerfd_create 323 | ||
337 | #define __NR_eventfd 324 | ||
338 | #define __NR_fallocate 325 | ||
339 | #define __NR_timerfd_settime 326 | ||
340 | #define __NR_timerfd_gettime 327 | ||
341 | #define __NR_signalfd4 328 | ||
342 | #define __NR_eventfd2 329 | ||
343 | #define __NR_epoll_create1 330 | ||
344 | #define __NR_dup3 331 | ||
345 | #define __NR_pipe2 332 | ||
346 | #define __NR_inotify_init1 333 | ||
347 | #define __NR_preadv 334 | ||
348 | #define __NR_pwritev 335 | ||
349 | #define __NR_rt_tgsigqueueinfo 336 | ||
350 | #define __NR_perf_event_open 337 | ||
351 | #define __NR_recvmmsg 338 | ||
352 | #define __NR_setns 339 | ||
353 | |||
354 | #endif /* _UAPI_ASM_UNISTD_H */ | ||
diff --git a/arch/mn10300/kernel/Makefile b/arch/mn10300/kernel/Makefile index d06749173d6..561029f7fa4 100644 --- a/arch/mn10300/kernel/Makefile +++ b/arch/mn10300/kernel/Makefile | |||
@@ -7,8 +7,8 @@ fpu-obj-y := fpu-nofpu.o fpu-nofpu-low.o | |||
7 | fpu-obj-$(CONFIG_FPU) := fpu.o fpu-low.o | 7 | fpu-obj-$(CONFIG_FPU) := fpu.o fpu-low.o |
8 | 8 | ||
9 | obj-y := process.o signal.o entry.o traps.o irq.o \ | 9 | obj-y := process.o signal.o entry.o traps.o irq.o \ |
10 | ptrace.o setup.o time.o sys_mn10300.o io.o kthread.o \ | 10 | ptrace.o setup.o time.o sys_mn10300.o io.o \ |
11 | switch_to.o mn10300_ksyms.o kernel_execve.o $(fpu-obj-y) \ | 11 | switch_to.o mn10300_ksyms.o $(fpu-obj-y) \ |
12 | csrc-mn10300.o cevt-mn10300.o | 12 | csrc-mn10300.o cevt-mn10300.o |
13 | 13 | ||
14 | obj-$(CONFIG_SMP) += smp.o smp-low.o | 14 | obj-$(CONFIG_SMP) += smp.o smp-low.o |
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S index 8e11f9f4899..0c631d34c8d 100644 --- a/arch/mn10300/kernel/entry.S +++ b/arch/mn10300/kernel/entry.S | |||
@@ -55,6 +55,20 @@ ENTRY(ret_from_fork) | |||
55 | mov d0,(REG_D0,fp) | 55 | mov d0,(REG_D0,fp) |
56 | jmp syscall_exit | 56 | jmp syscall_exit |
57 | 57 | ||
58 | ENTRY(ret_from_kernel_thread) | ||
59 | call schedule_tail[],0 | ||
60 | mov (REG_D0,fp),d0 | ||
61 | mov (REG_A0,fp),a0 | ||
62 | calls (a0) | ||
63 | jmp sys_exit | ||
64 | |||
65 | ENTRY(ret_from_kernel_execve) | ||
66 | add -12,d0 /* pt_regs -> frame */ | ||
67 | mov d0,sp | ||
68 | GET_THREAD_INFO a2 | ||
69 | clr d0 | ||
70 | jmp syscall_exit | ||
71 | |||
58 | ############################################################################### | 72 | ############################################################################### |
59 | # | 73 | # |
60 | # system call handler | 74 | # system call handler |
@@ -94,6 +108,10 @@ restore_all: | |||
94 | ############################################################################### | 108 | ############################################################################### |
95 | ALIGN | 109 | ALIGN |
96 | syscall_exit_work: | 110 | syscall_exit_work: |
111 | mov (REG_EPSW,fp),d0 | ||
112 | and EPSW_nSL,d0 | ||
113 | beq resume_kernel # returning to supervisor mode | ||
114 | |||
97 | btst _TIF_SYSCALL_TRACE,d2 | 115 | btst _TIF_SYSCALL_TRACE,d2 |
98 | beq work_pending | 116 | beq work_pending |
99 | LOCAL_IRQ_ENABLE # could let syscall_trace_exit() call | 117 | LOCAL_IRQ_ENABLE # could let syscall_trace_exit() call |
diff --git a/arch/mn10300/kernel/internal.h b/arch/mn10300/kernel/internal.h index 2df440105a8..561785581f6 100644 --- a/arch/mn10300/kernel/internal.h +++ b/arch/mn10300/kernel/internal.h | |||
@@ -15,14 +15,10 @@ struct clocksource; | |||
15 | struct clock_event_device; | 15 | struct clock_event_device; |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * kthread.S | ||
19 | */ | ||
20 | extern int kernel_thread_helper(int); | ||
21 | |||
22 | /* | ||
23 | * entry.S | 18 | * entry.S |
24 | */ | 19 | */ |
25 | extern void ret_from_fork(struct task_struct *) __attribute__((noreturn)); | 20 | extern void ret_from_fork(struct task_struct *) __attribute__((noreturn)); |
21 | extern void ret_from_kernel_thread(struct task_struct *) __attribute__((noreturn)); | ||
26 | 22 | ||
27 | /* | 23 | /* |
28 | * smp-low.S | 24 | * smp-low.S |
diff --git a/arch/mn10300/kernel/kernel_execve.S b/arch/mn10300/kernel/kernel_execve.S deleted file mode 100644 index 86039f10526..00000000000 --- a/arch/mn10300/kernel/kernel_execve.S +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* MN10300 In-kernel program execution | ||
2 | * | ||
3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | #include <linux/linkage.h> | ||
12 | #include <asm/unistd.h> | ||
13 | |||
14 | ############################################################################### | ||
15 | # | ||
16 | # Do a system call from kernel instead of calling sys_execve so we end up with | ||
17 | # proper pt_regs. | ||
18 | # | ||
19 | # int kernel_execve(const char *filename, char *const argv[], | ||
20 | # char *const envp[]) | ||
21 | # | ||
22 | # On entry: D0/D1/8(SP): arguments to function | ||
23 | # On return: D0: syscall return. | ||
24 | # | ||
25 | ############################################################################### | ||
26 | .globl kernel_execve | ||
27 | .type kernel_execve,@function | ||
28 | kernel_execve: | ||
29 | mov a3,a1 | ||
30 | mov d0,a0 | ||
31 | mov (12,sp),a3 | ||
32 | mov +__NR_execve,d0 | ||
33 | syscall 0 | ||
34 | mov a1,a3 | ||
35 | rets | ||
36 | |||
37 | .size kernel_execve,.-kernel_execve | ||
diff --git a/arch/mn10300/kernel/kthread.S b/arch/mn10300/kernel/kthread.S deleted file mode 100644 index b5ae467ac5e..00000000000 --- a/arch/mn10300/kernel/kthread.S +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* MN10300 Kernel thread trampoline function | ||
2 | * | ||
3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by Mark Salter (msalter@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | .text | ||
12 | |||
13 | ############################################################################### | ||
14 | # | ||
15 | # kernel_thread_helper - trampoline for kernel_thread() | ||
16 | # | ||
17 | # On entry: | ||
18 | # A2 = address of function to call | ||
19 | # D2 = function argument | ||
20 | # | ||
21 | ############################################################################### | ||
22 | .globl kernel_thread_helper | ||
23 | .type kernel_thread_helper,@function | ||
24 | kernel_thread_helper: | ||
25 | mov do_exit,d1 | ||
26 | mov d1,(sp) | ||
27 | mov d1,mdr | ||
28 | mov d2,d0 | ||
29 | jmp (a2) | ||
30 | |||
31 | .size kernel_thread_helper,.-kernel_thread_helper | ||
diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c index e9cceba193b..d0c671b6d9f 100644 --- a/arch/mn10300/kernel/process.c +++ b/arch/mn10300/kernel/process.c | |||
@@ -165,27 +165,6 @@ void show_regs(struct pt_regs *regs) | |||
165 | } | 165 | } |
166 | 166 | ||
167 | /* | 167 | /* |
168 | * create a kernel thread | ||
169 | */ | ||
170 | int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | ||
171 | { | ||
172 | struct pt_regs regs; | ||
173 | |||
174 | memset(®s, 0, sizeof(regs)); | ||
175 | |||
176 | regs.a2 = (unsigned long) fn; | ||
177 | regs.d2 = (unsigned long) arg; | ||
178 | regs.pc = (unsigned long) kernel_thread_helper; | ||
179 | local_save_flags(regs.epsw); | ||
180 | regs.epsw |= EPSW_IE | EPSW_IM_7; | ||
181 | |||
182 | /* Ok, create the new process.. */ | ||
183 | return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, ®s, 0, | ||
184 | NULL, NULL); | ||
185 | } | ||
186 | EXPORT_SYMBOL(kernel_thread); | ||
187 | |||
188 | /* | ||
189 | * free current thread data structures etc.. | 168 | * free current thread data structures etc.. |
190 | */ | 169 | */ |
191 | void exit_thread(void) | 170 | void exit_thread(void) |
@@ -230,50 +209,42 @@ int copy_thread(unsigned long clone_flags, | |||
230 | struct task_struct *p, struct pt_regs *kregs) | 209 | struct task_struct *p, struct pt_regs *kregs) |
231 | { | 210 | { |
232 | struct thread_info *ti = task_thread_info(p); | 211 | struct thread_info *ti = task_thread_info(p); |
233 | struct pt_regs *c_uregs, *c_kregs, *uregs; | 212 | struct pt_regs *c_regs; |
234 | unsigned long c_ksp; | 213 | unsigned long c_ksp; |
235 | 214 | ||
236 | uregs = current->thread.uregs; | ||
237 | |||
238 | c_ksp = (unsigned long) task_stack_page(p) + THREAD_SIZE; | 215 | c_ksp = (unsigned long) task_stack_page(p) + THREAD_SIZE; |
239 | 216 | ||
240 | /* allocate the userspace exception frame and set it up */ | 217 | /* allocate the userspace exception frame and set it up */ |
241 | c_ksp -= sizeof(struct pt_regs); | 218 | c_ksp -= sizeof(struct pt_regs); |
242 | c_uregs = (struct pt_regs *) c_ksp; | 219 | c_regs = (struct pt_regs *) c_ksp; |
220 | c_ksp -= 12; /* allocate function call ABI slack */ | ||
243 | 221 | ||
244 | p->thread.uregs = c_uregs; | 222 | /* set up things up so the scheduler can start the new task */ |
245 | *c_uregs = *uregs; | 223 | p->thread.uregs = c_regs; |
246 | c_uregs->sp = c_usp; | 224 | ti->frame = c_regs; |
247 | c_uregs->epsw &= ~EPSW_FE; /* my FPU */ | 225 | p->thread.a3 = (unsigned long) c_regs; |
226 | p->thread.sp = c_ksp; | ||
227 | p->thread.wchan = p->thread.pc; | ||
228 | p->thread.usp = c_usp; | ||
248 | 229 | ||
249 | c_ksp -= 12; /* allocate function call ABI slack */ | 230 | if (unlikely(!kregs)) { |
231 | memset(c_regs, 0, sizeof(struct pt_regs)); | ||
232 | c_regs->a0 = c_usp; /* function */ | ||
233 | c_regs->d0 = ustk_size; /* argument */ | ||
234 | local_save_flags(c_regs->epsw); | ||
235 | c_regs->epsw |= EPSW_IE | EPSW_IM_7; | ||
236 | p->thread.pc = (unsigned long) ret_from_kernel_thread; | ||
237 | return 0; | ||
238 | } | ||
239 | *c_regs = *kregs; | ||
240 | c_regs->sp = c_usp; | ||
241 | c_regs->epsw &= ~EPSW_FE; /* my FPU */ | ||
250 | 242 | ||
251 | /* the new TLS pointer is passed in as arg #5 to sys_clone() */ | 243 | /* the new TLS pointer is passed in as arg #5 to sys_clone() */ |
252 | if (clone_flags & CLONE_SETTLS) | 244 | if (clone_flags & CLONE_SETTLS) |
253 | c_uregs->e2 = current_frame()->d3; | 245 | c_regs->e2 = current_frame()->d3; |
254 | |||
255 | /* set up the return kernel frame if called from kernel_thread() */ | ||
256 | c_kregs = c_uregs; | ||
257 | if (kregs != uregs) { | ||
258 | c_ksp -= sizeof(struct pt_regs); | ||
259 | c_kregs = (struct pt_regs *) c_ksp; | ||
260 | *c_kregs = *kregs; | ||
261 | c_kregs->sp = c_usp; | ||
262 | c_kregs->next = c_uregs; | ||
263 | #ifdef CONFIG_MN10300_CURRENT_IN_E2 | ||
264 | c_kregs->e2 = (unsigned long) p; /* current */ | ||
265 | #endif | ||
266 | |||
267 | c_ksp -= 12; /* allocate function call ABI slack */ | ||
268 | } | ||
269 | 246 | ||
270 | /* set up things up so the scheduler can start the new task */ | ||
271 | ti->frame = c_kregs; | ||
272 | p->thread.a3 = (unsigned long) c_kregs; | ||
273 | p->thread.sp = c_ksp; | ||
274 | p->thread.pc = (unsigned long) ret_from_fork; | 247 | p->thread.pc = (unsigned long) ret_from_fork; |
275 | p->thread.wchan = (unsigned long) ret_from_fork; | ||
276 | p->thread.usp = c_usp; | ||
277 | 248 | ||
278 | return 0; | 249 | return 0; |
279 | } | 250 | } |
@@ -302,22 +273,6 @@ asmlinkage long sys_vfork(void) | |||
302 | current_frame(), 0, NULL, NULL); | 273 | current_frame(), 0, NULL, NULL); |
303 | } | 274 | } |
304 | 275 | ||
305 | asmlinkage long sys_execve(const char __user *name, | ||
306 | const char __user *const __user *argv, | ||
307 | const char __user *const __user *envp) | ||
308 | { | ||
309 | char *filename; | ||
310 | int error; | ||
311 | |||
312 | filename = getname(name); | ||
313 | error = PTR_ERR(filename); | ||
314 | if (IS_ERR(filename)) | ||
315 | return error; | ||
316 | error = do_execve(filename, argv, envp, current_frame()); | ||
317 | putname(filename); | ||
318 | return error; | ||
319 | } | ||
320 | |||
321 | unsigned long get_wchan(struct task_struct *p) | 276 | unsigned long get_wchan(struct task_struct *p) |
322 | { | 277 | { |
323 | return p->thread.wchan; | 278 | return p->thread.wchan; |
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index 4d584ae29ae..f570b3085ef 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c | |||
@@ -317,10 +317,6 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set, | |||
317 | regs->d0 = sig; | 317 | regs->d0 = sig; |
318 | regs->d1 = (unsigned long) &frame->sc; | 318 | regs->d1 = (unsigned long) &frame->sc; |
319 | 319 | ||
320 | /* the tracer may want to single-step inside the handler */ | ||
321 | if (test_thread_flag(TIF_SINGLESTEP)) | ||
322 | ptrace_notify(SIGTRAP); | ||
323 | |||
324 | #if DEBUG_SIG | 320 | #if DEBUG_SIG |
325 | printk(KERN_DEBUG "SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n", | 321 | printk(KERN_DEBUG "SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n", |
326 | sig, current->comm, current->pid, frame, regs->pc, | 322 | sig, current->comm, current->pid, frame, regs->pc, |
@@ -398,10 +394,6 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
398 | regs->d0 = sig; | 394 | regs->d0 = sig; |
399 | regs->d1 = (long) &frame->info; | 395 | regs->d1 = (long) &frame->info; |
400 | 396 | ||
401 | /* the tracer may want to single-step inside the handler */ | ||
402 | if (test_thread_flag(TIF_SINGLESTEP)) | ||
403 | ptrace_notify(SIGTRAP); | ||
404 | |||
405 | #if DEBUG_SIG | 397 | #if DEBUG_SIG |
406 | printk(KERN_DEBUG "SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n", | 398 | printk(KERN_DEBUG "SIG deliver %d (%s:%d): sp=%p pc=%lx ra=%p\n", |
407 | sig, current->comm, current->pid, frame, regs->pc, | 399 | sig, current->comm, current->pid, frame, regs->pc, |
@@ -475,11 +467,6 @@ static void do_signal(struct pt_regs *regs) | |||
475 | siginfo_t info; | 467 | siginfo_t info; |
476 | int signr; | 468 | int signr; |
477 | 469 | ||
478 | /* we want the common case to go fast, which is why we may in certain | ||
479 | * cases get here from kernel mode */ | ||
480 | if (!user_mode(regs)) | ||
481 | return; | ||
482 | |||
483 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 470 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
484 | if (signr > 0) { | 471 | if (signr > 0) { |
485 | if (handle_signal(signr, &info, &ka, regs) == 0) { | 472 | if (handle_signal(signr, &info, &ka, regs) == 0) { |
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index 49765b53f63..05f2ba41ff1 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig | |||
@@ -21,6 +21,7 @@ config OPENRISC | |||
21 | select GENERIC_CLOCKEVENTS | 21 | select GENERIC_CLOCKEVENTS |
22 | select GENERIC_STRNCPY_FROM_USER | 22 | select GENERIC_STRNCPY_FROM_USER |
23 | select GENERIC_STRNLEN_USER | 23 | select GENERIC_STRNLEN_USER |
24 | select MODULES_USE_ELF_RELA | ||
24 | 25 | ||
25 | config MMU | 26 | config MMU |
26 | def_bool y | 27 | def_bool y |
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild index 7140b6b2644..78de6805268 100644 --- a/arch/openrisc/include/asm/Kbuild +++ b/arch/openrisc/include/asm/Kbuild | |||
@@ -1,6 +1,4 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | header-y += elf.h | ||
4 | header-y += ucontext.h | 2 | header-y += ucontext.h |
5 | 3 | ||
6 | generic-y += atomic.h | 4 | generic-y += atomic.h |
diff --git a/arch/openrisc/include/asm/elf.h b/arch/openrisc/include/asm/elf.h index 225a7ff320a..f4aa8a542a2 100644 --- a/arch/openrisc/include/asm/elf.h +++ b/arch/openrisc/include/asm/elf.h | |||
@@ -15,60 +15,12 @@ | |||
15 | * the Free Software Foundation; either version 2 of the License, or | 15 | * the Free Software Foundation; either version 2 of the License, or |
16 | * (at your option) any later version. | 16 | * (at your option) any later version. |
17 | */ | 17 | */ |
18 | |||
19 | #ifndef __ASM_OPENRISC_ELF_H | 18 | #ifndef __ASM_OPENRISC_ELF_H |
20 | #define __ASM_OPENRISC_ELF_H | 19 | #define __ASM_OPENRISC_ELF_H |
21 | 20 | ||
22 | /* | ||
23 | * This files is partially exported to userspace. This allows us to keep | ||
24 | * the ELF bits in one place which should assist in keeping the kernel and | ||
25 | * userspace in sync. | ||
26 | */ | ||
27 | |||
28 | /* | ||
29 | * ELF register definitions.. | ||
30 | */ | ||
31 | |||
32 | /* for struct user_regs_struct definition */ | ||
33 | #include <asm/ptrace.h> | ||
34 | |||
35 | /* The OR1K relocation types... not all relevant for module loader */ | ||
36 | #define R_OR32_NONE 0 | ||
37 | #define R_OR32_32 1 | ||
38 | #define R_OR32_16 2 | ||
39 | #define R_OR32_8 3 | ||
40 | #define R_OR32_CONST 4 | ||
41 | #define R_OR32_CONSTH 5 | ||
42 | #define R_OR32_JUMPTARG 6 | ||
43 | #define R_OR32_VTINHERIT 7 | ||
44 | #define R_OR32_VTENTRY 8 | ||
45 | |||
46 | typedef unsigned long elf_greg_t; | ||
47 | |||
48 | /* | ||
49 | * Note that NGREG is defined to ELF_NGREG in include/linux/elfcore.h, and is | ||
50 | * thus exposed to user-space. | ||
51 | */ | ||
52 | #define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) | ||
53 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
54 | |||
55 | /* A placeholder; OR32 does not have fp support yes, so no fp regs for now. */ | ||
56 | typedef unsigned long elf_fpregset_t; | ||
57 | |||
58 | /* This should be moved to include/linux/elf.h */ | ||
59 | #define EM_OR32 0x8472 | ||
60 | #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ | ||
61 | |||
62 | /* | ||
63 | * These are used to set parameters in the core dumps. | ||
64 | */ | ||
65 | #define ELF_ARCH EM_OR32 | ||
66 | #define ELF_CLASS ELFCLASS32 | ||
67 | #define ELF_DATA ELFDATA2MSB | ||
68 | |||
69 | #ifdef __KERNEL__ | ||
70 | 21 | ||
71 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <uapi/asm/elf.h> | ||
72 | 24 | ||
73 | /* | 25 | /* |
74 | * This is used to ensure we don't load something for the wrong architecture. | 26 | * This is used to ensure we don't load something for the wrong architecture. |
@@ -113,5 +65,4 @@ extern void dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt); | |||
113 | #define SET_PERSONALITY(ex) \ | 65 | #define SET_PERSONALITY(ex) \ |
114 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | 66 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) |
115 | 67 | ||
116 | #endif /* __KERNEL__ */ | ||
117 | #endif | 68 | #endif |
diff --git a/arch/openrisc/include/asm/processor.h b/arch/openrisc/include/asm/processor.h index 30462f1fe95..43decdbdb2e 100644 --- a/arch/openrisc/include/asm/processor.h +++ b/arch/openrisc/include/asm/processor.h | |||
@@ -103,7 +103,7 @@ extern unsigned long thread_saved_pc(struct task_struct *t); | |||
103 | 103 | ||
104 | #define init_stack (init_thread_union.stack) | 104 | #define init_stack (init_thread_union.stack) |
105 | 105 | ||
106 | #define cpu_relax() do { } while (0) | 106 | #define cpu_relax() barrier() |
107 | 107 | ||
108 | #endif /* __ASSEMBLY__ */ | 108 | #endif /* __ASSEMBLY__ */ |
109 | #endif /* __ASM_OPENRISC_PROCESSOR_H */ | 109 | #endif /* __ASM_OPENRISC_PROCESSOR_H */ |
diff --git a/arch/openrisc/include/asm/ptrace.h b/arch/openrisc/include/asm/ptrace.h index 8555c0c3d4d..6ca17264c39 100644 --- a/arch/openrisc/include/asm/ptrace.h +++ b/arch/openrisc/include/asm/ptrace.h | |||
@@ -15,25 +15,12 @@ | |||
15 | * the Free Software Foundation; either version 2 of the License, or | 15 | * the Free Software Foundation; either version 2 of the License, or |
16 | * (at your option) any later version. | 16 | * (at your option) any later version. |
17 | */ | 17 | */ |
18 | |||
19 | #ifndef __ASM_OPENRISC_PTRACE_H | 18 | #ifndef __ASM_OPENRISC_PTRACE_H |
20 | #define __ASM_OPENRISC_PTRACE_H | 19 | #define __ASM_OPENRISC_PTRACE_H |
21 | 20 | ||
22 | #ifndef __ASSEMBLY__ | ||
23 | /* | ||
24 | * This is the layout of the regset returned by the GETREGSET ptrace call | ||
25 | */ | ||
26 | struct user_regs_struct { | ||
27 | /* GPR R0-R31... */ | ||
28 | unsigned long gpr[32]; | ||
29 | unsigned long pc; | ||
30 | unsigned long sr; | ||
31 | }; | ||
32 | #endif | ||
33 | |||
34 | #ifdef __KERNEL__ | ||
35 | 21 | ||
36 | #include <asm/spr_defs.h> | 22 | #include <asm/spr_defs.h> |
23 | #include <uapi/asm/ptrace.h> | ||
37 | 24 | ||
38 | /* | 25 | /* |
39 | * Make kernel PTrace/register structures opaque to userspace... userspace can | 26 | * Make kernel PTrace/register structures opaque to userspace... userspace can |
@@ -134,6 +121,4 @@ static inline long regs_return_value(struct pt_regs *regs) | |||
134 | #define PT_ORIG_GPR11 132 | 121 | #define PT_ORIG_GPR11 132 |
135 | #define PT_SYSCALLNO 136 | 122 | #define PT_SYSCALLNO 136 |
136 | 123 | ||
137 | #endif /* __KERNEL__ */ | ||
138 | |||
139 | #endif /* __ASM_OPENRISC_PTRACE_H */ | 124 | #endif /* __ASM_OPENRISC_PTRACE_H */ |
diff --git a/arch/openrisc/include/asm/thread_info.h b/arch/openrisc/include/asm/thread_info.h index 07a8bc080ef..07f3212422a 100644 --- a/arch/openrisc/include/asm/thread_info.h +++ b/arch/openrisc/include/asm/thread_info.h | |||
@@ -121,7 +121,6 @@ register struct thread_info *current_thread_info_reg asm("r10"); | |||
121 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 121 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
122 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 122 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
123 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 123 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
124 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
125 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 124 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
126 | 125 | ||
127 | 126 | ||
@@ -129,6 +128,8 @@ register struct thread_info *current_thread_info_reg asm("r10"); | |||
129 | /* For OpenRISC, this is anything in the LSW other than syscall trace */ | 128 | /* For OpenRISC, this is anything in the LSW other than syscall trace */ |
130 | #define _TIF_WORK_MASK (0xff & ~(_TIF_SYSCALL_TRACE|_TIF_SINGLESTEP)) | 129 | #define _TIF_WORK_MASK (0xff & ~(_TIF_SYSCALL_TRACE|_TIF_SINGLESTEP)) |
131 | 130 | ||
131 | #define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) | ||
132 | |||
132 | #endif /* __KERNEL__ */ | 133 | #endif /* __KERNEL__ */ |
133 | 134 | ||
134 | #endif /* _ASM_THREAD_INFO_H */ | 135 | #endif /* _ASM_THREAD_INFO_H */ |
diff --git a/arch/openrisc/include/uapi/asm/Kbuild b/arch/openrisc/include/uapi/asm/Kbuild index baebb3da1d4..80761eb82b5 100644 --- a/arch/openrisc/include/uapi/asm/Kbuild +++ b/arch/openrisc/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,10 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += byteorder.h | ||
5 | header-y += elf.h | ||
6 | header-y += kvm_para.h | ||
7 | header-y += param.h | ||
8 | header-y += ptrace.h | ||
9 | header-y += sigcontext.h | ||
10 | header-y += unistd.h | ||
diff --git a/arch/openrisc/include/asm/byteorder.h b/arch/openrisc/include/uapi/asm/byteorder.h index 60d14f7e14e..60d14f7e14e 100644 --- a/arch/openrisc/include/asm/byteorder.h +++ b/arch/openrisc/include/uapi/asm/byteorder.h | |||
diff --git a/arch/openrisc/include/uapi/asm/elf.h b/arch/openrisc/include/uapi/asm/elf.h new file mode 100644 index 00000000000..f02ea583042 --- /dev/null +++ b/arch/openrisc/include/uapi/asm/elf.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * OpenRISC Linux | ||
3 | * | ||
4 | * Linux architectural port borrowing liberally from similar works of | ||
5 | * others. All original copyrights apply as per the original source | ||
6 | * declaration. | ||
7 | * | ||
8 | * OpenRISC implementation: | ||
9 | * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com> | ||
10 | * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se> | ||
11 | * et al. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License as published by | ||
15 | * the Free Software Foundation; either version 2 of the License, or | ||
16 | * (at your option) any later version. | ||
17 | */ | ||
18 | |||
19 | #ifndef _UAPI__ASM_OPENRISC_ELF_H | ||
20 | #define _UAPI__ASM_OPENRISC_ELF_H | ||
21 | |||
22 | /* | ||
23 | * This files is partially exported to userspace. This allows us to keep | ||
24 | * the ELF bits in one place which should assist in keeping the kernel and | ||
25 | * userspace in sync. | ||
26 | */ | ||
27 | |||
28 | /* | ||
29 | * ELF register definitions.. | ||
30 | */ | ||
31 | |||
32 | /* for struct user_regs_struct definition */ | ||
33 | #include <asm/ptrace.h> | ||
34 | |||
35 | /* The OR1K relocation types... not all relevant for module loader */ | ||
36 | #define R_OR32_NONE 0 | ||
37 | #define R_OR32_32 1 | ||
38 | #define R_OR32_16 2 | ||
39 | #define R_OR32_8 3 | ||
40 | #define R_OR32_CONST 4 | ||
41 | #define R_OR32_CONSTH 5 | ||
42 | #define R_OR32_JUMPTARG 6 | ||
43 | #define R_OR32_VTINHERIT 7 | ||
44 | #define R_OR32_VTENTRY 8 | ||
45 | |||
46 | typedef unsigned long elf_greg_t; | ||
47 | |||
48 | /* | ||
49 | * Note that NGREG is defined to ELF_NGREG in include/linux/elfcore.h, and is | ||
50 | * thus exposed to user-space. | ||
51 | */ | ||
52 | #define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) | ||
53 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
54 | |||
55 | /* A placeholder; OR32 does not have fp support yes, so no fp regs for now. */ | ||
56 | typedef unsigned long elf_fpregset_t; | ||
57 | |||
58 | /* This should be moved to include/linux/elf.h */ | ||
59 | #define EM_OR32 0x8472 | ||
60 | #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ | ||
61 | |||
62 | /* | ||
63 | * These are used to set parameters in the core dumps. | ||
64 | */ | ||
65 | #define ELF_ARCH EM_OR32 | ||
66 | #define ELF_CLASS ELFCLASS32 | ||
67 | #define ELF_DATA ELFDATA2MSB | ||
68 | |||
69 | #endif /* _UAPI__ASM_OPENRISC_ELF_H */ | ||
diff --git a/arch/openrisc/include/asm/kvm_para.h b/arch/openrisc/include/uapi/asm/kvm_para.h index 14fab8f0b95..14fab8f0b95 100644 --- a/arch/openrisc/include/asm/kvm_para.h +++ b/arch/openrisc/include/uapi/asm/kvm_para.h | |||
diff --git a/arch/openrisc/include/asm/param.h b/arch/openrisc/include/uapi/asm/param.h index c39a336610e..c39a336610e 100644 --- a/arch/openrisc/include/asm/param.h +++ b/arch/openrisc/include/uapi/asm/param.h | |||
diff --git a/arch/openrisc/include/uapi/asm/ptrace.h b/arch/openrisc/include/uapi/asm/ptrace.h new file mode 100644 index 00000000000..9760bd17fbc --- /dev/null +++ b/arch/openrisc/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * OpenRISC Linux | ||
3 | * | ||
4 | * Linux architectural port borrowing liberally from similar works of | ||
5 | * others. All original copyrights apply as per the original source | ||
6 | * declaration. | ||
7 | * | ||
8 | * OpenRISC implementation: | ||
9 | * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com> | ||
10 | * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se> | ||
11 | * et al. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License as published by | ||
15 | * the Free Software Foundation; either version 2 of the License, or | ||
16 | * (at your option) any later version. | ||
17 | */ | ||
18 | |||
19 | #ifndef _UAPI__ASM_OPENRISC_PTRACE_H | ||
20 | #define _UAPI__ASM_OPENRISC_PTRACE_H | ||
21 | |||
22 | #ifndef __ASSEMBLY__ | ||
23 | /* | ||
24 | * This is the layout of the regset returned by the GETREGSET ptrace call | ||
25 | */ | ||
26 | struct user_regs_struct { | ||
27 | /* GPR R0-R31... */ | ||
28 | unsigned long gpr[32]; | ||
29 | unsigned long pc; | ||
30 | unsigned long sr; | ||
31 | }; | ||
32 | #endif | ||
33 | |||
34 | |||
35 | #endif /* _UAPI__ASM_OPENRISC_PTRACE_H */ | ||
diff --git a/arch/openrisc/include/asm/sigcontext.h b/arch/openrisc/include/uapi/asm/sigcontext.h index b79c2b19afb..b79c2b19afb 100644 --- a/arch/openrisc/include/asm/sigcontext.h +++ b/arch/openrisc/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/openrisc/include/asm/unistd.h b/arch/openrisc/include/uapi/asm/unistd.h index 437bdbb61b1..437bdbb61b1 100644 --- a/arch/openrisc/include/asm/unistd.h +++ b/arch/openrisc/include/uapi/asm/unistd.h | |||
diff --git a/arch/openrisc/kernel/irq.c b/arch/openrisc/kernel/irq.c index e935b9d8eee..8ec77bc9f1e 100644 --- a/arch/openrisc/kernel/irq.c +++ b/arch/openrisc/kernel/irq.c | |||
@@ -46,19 +46,19 @@ EXPORT_SYMBOL(arch_local_irq_restore); | |||
46 | 46 | ||
47 | static void or1k_pic_mask(struct irq_data *data) | 47 | static void or1k_pic_mask(struct irq_data *data) |
48 | { | 48 | { |
49 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->irq)); | 49 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->hwirq)); |
50 | } | 50 | } |
51 | 51 | ||
52 | static void or1k_pic_unmask(struct irq_data *data) | 52 | static void or1k_pic_unmask(struct irq_data *data) |
53 | { | 53 | { |
54 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) | (1UL << data->irq)); | 54 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) | (1UL << data->hwirq)); |
55 | } | 55 | } |
56 | 56 | ||
57 | static void or1k_pic_ack(struct irq_data *data) | 57 | static void or1k_pic_ack(struct irq_data *data) |
58 | { | 58 | { |
59 | /* EDGE-triggered interrupts need to be ack'ed in order to clear | 59 | /* EDGE-triggered interrupts need to be ack'ed in order to clear |
60 | * the latch. | 60 | * the latch. |
61 | * LEVER-triggered interrupts do not need to be ack'ed; however, | 61 | * LEVEL-triggered interrupts do not need to be ack'ed; however, |
62 | * ack'ing the interrupt has no ill-effect and is quicker than | 62 | * ack'ing the interrupt has no ill-effect and is quicker than |
63 | * trying to figure out what type it is... | 63 | * trying to figure out what type it is... |
64 | */ | 64 | */ |
@@ -75,10 +75,10 @@ static void or1k_pic_ack(struct irq_data *data) | |||
75 | * as opposed to a 1 as mandated by the spec | 75 | * as opposed to a 1 as mandated by the spec |
76 | */ | 76 | */ |
77 | 77 | ||
78 | mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->irq)); | 78 | mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq)); |
79 | #else | 79 | #else |
80 | WARN(1, "Interrupt handling possibily broken\n"); | 80 | WARN(1, "Interrupt handling possibly broken\n"); |
81 | mtspr(SPR_PICSR, (1UL << irq)); | 81 | mtspr(SPR_PICSR, (1UL << data->hwirq)); |
82 | #endif | 82 | #endif |
83 | } | 83 | } |
84 | 84 | ||
@@ -87,10 +87,12 @@ static void or1k_pic_mask_ack(struct irq_data *data) | |||
87 | /* Comments for pic_ack apply here, too */ | 87 | /* Comments for pic_ack apply here, too */ |
88 | 88 | ||
89 | #ifdef CONFIG_OR1K_1200 | 89 | #ifdef CONFIG_OR1K_1200 |
90 | mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->irq)); | 90 | mtspr(SPR_PICMR, mfspr(SPR_PICMR) & ~(1UL << data->hwirq)); |
91 | mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(1UL << data->hwirq)); | ||
91 | #else | 92 | #else |
92 | WARN(1, "Interrupt handling possibily broken\n"); | 93 | WARN(1, "Interrupt handling possibly broken\n"); |
93 | mtspr(SPR_PICSR, (1UL << irq)); | 94 | mtspr(SPR_PICMR, (1UL << data->hwirq)); |
95 | mtspr(SPR_PICSR, (1UL << data->hwirq)); | ||
94 | #endif | 96 | #endif |
95 | } | 97 | } |
96 | 98 | ||
diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c index 55210f37d1a..c35f3ab1a8d 100644 --- a/arch/openrisc/kernel/process.c +++ b/arch/openrisc/kernel/process.c | |||
@@ -271,7 +271,7 @@ asmlinkage long _sys_execve(const char __user *name, | |||
271 | struct pt_regs *regs) | 271 | struct pt_regs *regs) |
272 | { | 272 | { |
273 | int error; | 273 | int error; |
274 | char *filename; | 274 | struct filename *filename; |
275 | 275 | ||
276 | filename = getname(name); | 276 | filename = getname(name); |
277 | error = PTR_ERR(filename); | 277 | error = PTR_ERR(filename); |
@@ -279,7 +279,7 @@ asmlinkage long _sys_execve(const char __user *name, | |||
279 | if (IS_ERR(filename)) | 279 | if (IS_ERR(filename)) |
280 | goto out; | 280 | goto out; |
281 | 281 | ||
282 | error = do_execve(filename, argv, envp, regs); | 282 | error = do_execve(filename->name, argv, envp, regs); |
283 | putname(filename); | 283 | putname(filename); |
284 | 284 | ||
285 | out: | 285 | out: |
diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c index e71781d24b0..71a2a0c34c6 100644 --- a/arch/openrisc/kernel/ptrace.c +++ b/arch/openrisc/kernel/ptrace.c | |||
@@ -187,7 +187,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
187 | */ | 187 | */ |
188 | ret = -1L; | 188 | ret = -1L; |
189 | 189 | ||
190 | audit_syscall_entry(audit_arch(), regs->gpr[11], | 190 | audit_syscall_entry(AUDIT_ARCH_OPENRISC, regs->gpr[11], |
191 | regs->gpr[3], regs->gpr[4], | 191 | regs->gpr[3], regs->gpr[4], |
192 | regs->gpr[5], regs->gpr[6]); | 192 | regs->gpr[5], regs->gpr[6]); |
193 | 193 | ||
diff --git a/arch/openrisc/lib/delay.c b/arch/openrisc/lib/delay.c index 01d9740ae6f..c330767c921 100644 --- a/arch/openrisc/lib/delay.c +++ b/arch/openrisc/lib/delay.c | |||
@@ -30,9 +30,9 @@ int __devinit read_current_timer(unsigned long *timer_value) | |||
30 | 30 | ||
31 | void __delay(unsigned long cycles) | 31 | void __delay(unsigned long cycles) |
32 | { | 32 | { |
33 | cycles_t target = get_cycles() + cycles; | 33 | cycles_t start = get_cycles(); |
34 | 34 | ||
35 | while (get_cycles() < target) | 35 | while ((get_cycles() - start) < cycles) |
36 | cpu_relax(); | 36 | cpu_relax(); |
37 | } | 37 | } |
38 | EXPORT_SYMBOL(__delay); | 38 | EXPORT_SYMBOL(__delay); |
@@ -41,7 +41,7 @@ inline void __const_udelay(unsigned long xloops) | |||
41 | { | 41 | { |
42 | unsigned long long loops; | 42 | unsigned long long loops; |
43 | 43 | ||
44 | loops = xloops * loops_per_jiffy * HZ; | 44 | loops = (unsigned long long)xloops * loops_per_jiffy * HZ; |
45 | 45 | ||
46 | __delay(loops >> 32); | 46 | __delay(loops >> 32); |
47 | } | 47 | } |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index b87438bb338..11def45b98c 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -20,6 +20,8 @@ config PARISC | |||
20 | select ARCH_HAVE_NMI_SAFE_CMPXCHG | 20 | select ARCH_HAVE_NMI_SAFE_CMPXCHG |
21 | select GENERIC_SMP_IDLE_THREAD | 21 | select GENERIC_SMP_IDLE_THREAD |
22 | select GENERIC_STRNCPY_FROM_USER | 22 | select GENERIC_STRNCPY_FROM_USER |
23 | select HAVE_MOD_ARCH_SPECIFIC | ||
24 | select MODULES_USE_ELF_RELA | ||
23 | 25 | ||
24 | help | 26 | help |
25 | The PA-RISC microprocessor is designed by Hewlett-Packard and used | 27 | The PA-RISC microprocessor is designed by Hewlett-Packard and used |
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c index 6785de7bd2a..a0760b87fd4 100644 --- a/arch/parisc/hpux/fs.c +++ b/arch/parisc/hpux/fs.c | |||
@@ -34,14 +34,14 @@ | |||
34 | int hpux_execve(struct pt_regs *regs) | 34 | int hpux_execve(struct pt_regs *regs) |
35 | { | 35 | { |
36 | int error; | 36 | int error; |
37 | char *filename; | 37 | struct filename *filename; |
38 | 38 | ||
39 | filename = getname((const char __user *) regs->gr[26]); | 39 | filename = getname((const char __user *) regs->gr[26]); |
40 | error = PTR_ERR(filename); | 40 | error = PTR_ERR(filename); |
41 | if (IS_ERR(filename)) | 41 | if (IS_ERR(filename)) |
42 | goto out; | 42 | goto out; |
43 | 43 | ||
44 | error = do_execve(filename, | 44 | error = do_execve(filename->name, |
45 | (const char __user *const __user *) regs->gr[25], | 45 | (const char __user *const __user *) regs->gr[25], |
46 | (const char __user *const __user *) regs->gr[24], | 46 | (const char __user *const __user *) regs->gr[24], |
47 | regs); | 47 | regs); |
diff --git a/arch/parisc/hpux/gate.S b/arch/parisc/hpux/gate.S index 38a1c1b8d4e..011468857e9 100644 --- a/arch/parisc/hpux/gate.S +++ b/arch/parisc/hpux/gate.S | |||
@@ -71,7 +71,7 @@ ENTRY(hpux_gateway_page) | |||
71 | STREG %r26, TASK_PT_GR26(%r1) /* 1st argument */ | 71 | STREG %r26, TASK_PT_GR26(%r1) /* 1st argument */ |
72 | STREG %r27, TASK_PT_GR27(%r1) /* user dp */ | 72 | STREG %r27, TASK_PT_GR27(%r1) /* user dp */ |
73 | STREG %r28, TASK_PT_GR28(%r1) /* return value 0 */ | 73 | STREG %r28, TASK_PT_GR28(%r1) /* return value 0 */ |
74 | STREG %r28, TASK_PT_ORIG_R28(%r1) /* return value 0 (saved for signals) */ | 74 | STREG %r0, TASK_PT_ORIG_R28(%r1) /* don't prohibit restarts */ |
75 | STREG %r29, TASK_PT_GR29(%r1) /* 8th argument */ | 75 | STREG %r29, TASK_PT_GR29(%r1) /* 8th argument */ |
76 | STREG %r31, TASK_PT_GR31(%r1) /* preserve syscall return ptr */ | 76 | STREG %r31, TASK_PT_GR31(%r1) /* preserve syscall return ptr */ |
77 | 77 | ||
diff --git a/arch/parisc/include/asm/module.h b/arch/parisc/include/asm/module.h index 1f4123427ea..bab37e99168 100644 --- a/arch/parisc/include/asm/module.h +++ b/arch/parisc/include/asm/module.h | |||
@@ -1,21 +1,11 @@ | |||
1 | #ifndef _ASM_PARISC_MODULE_H | 1 | #ifndef _ASM_PARISC_MODULE_H |
2 | #define _ASM_PARISC_MODULE_H | 2 | #define _ASM_PARISC_MODULE_H |
3 | |||
4 | #include <asm-generic/module.h> | ||
5 | |||
3 | /* | 6 | /* |
4 | * This file contains the parisc architecture specific module code. | 7 | * This file contains the parisc architecture specific module code. |
5 | */ | 8 | */ |
6 | #ifdef CONFIG_64BIT | ||
7 | #define Elf_Shdr Elf64_Shdr | ||
8 | #define Elf_Sym Elf64_Sym | ||
9 | #define Elf_Ehdr Elf64_Ehdr | ||
10 | #define Elf_Addr Elf64_Addr | ||
11 | #define Elf_Rela Elf64_Rela | ||
12 | #else | ||
13 | #define Elf_Shdr Elf32_Shdr | ||
14 | #define Elf_Sym Elf32_Sym | ||
15 | #define Elf_Ehdr Elf32_Ehdr | ||
16 | #define Elf_Addr Elf32_Addr | ||
17 | #define Elf_Rela Elf32_Rela | ||
18 | #endif | ||
19 | 9 | ||
20 | struct unwind_table; | 10 | struct unwind_table; |
21 | 11 | ||
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h index 22b4726dee4..d1fb79a36f3 100644 --- a/arch/parisc/include/asm/thread_info.h +++ b/arch/parisc/include/asm/thread_info.h | |||
@@ -68,13 +68,16 @@ struct thread_info { | |||
68 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 68 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
69 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 69 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
70 | #define _TIF_32BIT (1 << TIF_32BIT) | 70 | #define _TIF_32BIT (1 << TIF_32BIT) |
71 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | ||
72 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 71 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
73 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 72 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
74 | #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) | 73 | #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) |
75 | 74 | ||
76 | #define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \ | 75 | #define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \ |
77 | _TIF_NEED_RESCHED) | 76 | _TIF_NEED_RESCHED) |
77 | #define _TIF_SYSCALL_TRACE_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \ | ||
78 | _TIF_BLOCKSTEP) | ||
79 | |||
80 | #define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) | ||
78 | 81 | ||
79 | #endif /* __KERNEL__ */ | 82 | #endif /* __KERNEL__ */ |
80 | 83 | ||
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 8c6b6b6561f..cbc37216bf9 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -342,13 +342,13 @@ unsigned long thread_saved_pc(struct task_struct *t) | |||
342 | asmlinkage int sys_execve(struct pt_regs *regs) | 342 | asmlinkage int sys_execve(struct pt_regs *regs) |
343 | { | 343 | { |
344 | int error; | 344 | int error; |
345 | char *filename; | 345 | struct filename *filename; |
346 | 346 | ||
347 | filename = getname((const char __user *) regs->gr[26]); | 347 | filename = getname((const char __user *) regs->gr[26]); |
348 | error = PTR_ERR(filename); | 348 | error = PTR_ERR(filename); |
349 | if (IS_ERR(filename)) | 349 | if (IS_ERR(filename)) |
350 | goto out; | 350 | goto out; |
351 | error = do_execve(filename, | 351 | error = do_execve(filename->name, |
352 | (const char __user *const __user *) regs->gr[25], | 352 | (const char __user *const __user *) regs->gr[25], |
353 | (const char __user *const __user *) regs->gr[24], | 353 | (const char __user *const __user *) regs->gr[24], |
354 | regs); | 354 | regs); |
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 594459bde14..53799695599 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -113,6 +113,8 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall) | |||
113 | (usp - sigframe_size); | 113 | (usp - sigframe_size); |
114 | DBG(2,"sys_rt_sigreturn: frame is %p\n", frame); | 114 | DBG(2,"sys_rt_sigreturn: frame is %p\n", frame); |
115 | 115 | ||
116 | regs->orig_r28 = 1; /* no restarts for sigreturn */ | ||
117 | |||
116 | #ifdef CONFIG_64BIT | 118 | #ifdef CONFIG_64BIT |
117 | compat_frame = (struct compat_rt_sigframe __user *)frame; | 119 | compat_frame = (struct compat_rt_sigframe __user *)frame; |
118 | 120 | ||
@@ -437,7 +439,7 @@ give_sigsegv: | |||
437 | * OK, we're invoking a handler. | 439 | * OK, we're invoking a handler. |
438 | */ | 440 | */ |
439 | 441 | ||
440 | static long | 442 | static void |
441 | handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | 443 | handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, |
442 | struct pt_regs *regs, int in_syscall) | 444 | struct pt_regs *regs, int in_syscall) |
443 | { | 445 | { |
@@ -447,7 +449,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | |||
447 | 449 | ||
448 | /* Set up the stack frame */ | 450 | /* Set up the stack frame */ |
449 | if (!setup_rt_frame(sig, ka, info, oldset, regs, in_syscall)) | 451 | if (!setup_rt_frame(sig, ka, info, oldset, regs, in_syscall)) |
450 | return 0; | 452 | return; |
451 | 453 | ||
452 | signal_delivered(sig, info, ka, regs, | 454 | signal_delivered(sig, info, ka, regs, |
453 | test_thread_flag(TIF_SINGLESTEP) || | 455 | test_thread_flag(TIF_SINGLESTEP) || |
@@ -455,13 +457,14 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | |||
455 | 457 | ||
456 | DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n", | 458 | DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n", |
457 | regs->gr[28]); | 459 | regs->gr[28]); |
458 | |||
459 | return 1; | ||
460 | } | 460 | } |
461 | 461 | ||
462 | static inline void | 462 | static inline void |
463 | syscall_restart(struct pt_regs *regs, struct k_sigaction *ka) | 463 | syscall_restart(struct pt_regs *regs, struct k_sigaction *ka) |
464 | { | 464 | { |
465 | if (regs->orig_r28) | ||
466 | return; | ||
467 | regs->orig_r28 = 1; /* no more restarts */ | ||
465 | /* Check the return code */ | 468 | /* Check the return code */ |
466 | switch (regs->gr[28]) { | 469 | switch (regs->gr[28]) { |
467 | case -ERESTART_RESTARTBLOCK: | 470 | case -ERESTART_RESTARTBLOCK: |
@@ -482,8 +485,6 @@ syscall_restart(struct pt_regs *regs, struct k_sigaction *ka) | |||
482 | * we have to do is fiddle the return pointer. | 485 | * we have to do is fiddle the return pointer. |
483 | */ | 486 | */ |
484 | regs->gr[31] -= 8; /* delayed branching */ | 487 | regs->gr[31] -= 8; /* delayed branching */ |
485 | /* Preserve original r28. */ | ||
486 | regs->gr[28] = regs->orig_r28; | ||
487 | break; | 488 | break; |
488 | } | 489 | } |
489 | } | 490 | } |
@@ -491,6 +492,9 @@ syscall_restart(struct pt_regs *regs, struct k_sigaction *ka) | |||
491 | static inline void | 492 | static inline void |
492 | insert_restart_trampoline(struct pt_regs *regs) | 493 | insert_restart_trampoline(struct pt_regs *regs) |
493 | { | 494 | { |
495 | if (regs->orig_r28) | ||
496 | return; | ||
497 | regs->orig_r28 = 1; /* no more restarts */ | ||
494 | switch(regs->gr[28]) { | 498 | switch(regs->gr[28]) { |
495 | case -ERESTART_RESTARTBLOCK: { | 499 | case -ERESTART_RESTARTBLOCK: { |
496 | /* Restart the system call - no handlers present */ | 500 | /* Restart the system call - no handlers present */ |
@@ -525,9 +529,6 @@ insert_restart_trampoline(struct pt_regs *regs) | |||
525 | flush_user_icache_range(regs->gr[30], regs->gr[30] + 4); | 529 | flush_user_icache_range(regs->gr[30], regs->gr[30] + 4); |
526 | 530 | ||
527 | regs->gr[31] = regs->gr[30] + 8; | 531 | regs->gr[31] = regs->gr[30] + 8; |
528 | /* Preserve original r28. */ | ||
529 | regs->gr[28] = regs->orig_r28; | ||
530 | |||
531 | return; | 532 | return; |
532 | } | 533 | } |
533 | case -ERESTARTNOHAND: | 534 | case -ERESTARTNOHAND: |
@@ -539,9 +540,6 @@ insert_restart_trampoline(struct pt_regs *regs) | |||
539 | * slot of the branch external instruction. | 540 | * slot of the branch external instruction. |
540 | */ | 541 | */ |
541 | regs->gr[31] -= 8; | 542 | regs->gr[31] -= 8; |
542 | /* Preserve original r28. */ | ||
543 | regs->gr[28] = regs->orig_r28; | ||
544 | |||
545 | return; | 543 | return; |
546 | } | 544 | } |
547 | default: | 545 | default: |
@@ -570,30 +568,17 @@ do_signal(struct pt_regs *regs, long in_syscall) | |||
570 | DBG(1,"\ndo_signal: regs=0x%p, sr7 %#lx, in_syscall=%d\n", | 568 | DBG(1,"\ndo_signal: regs=0x%p, sr7 %#lx, in_syscall=%d\n", |
571 | regs, regs->sr[7], in_syscall); | 569 | regs, regs->sr[7], in_syscall); |
572 | 570 | ||
573 | /* Everyone else checks to see if they are in kernel mode at | 571 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
574 | this point and exits if that's the case. I'm not sure why | 572 | DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]); |
575 | we would be called in that case, but for some reason we | ||
576 | are. */ | ||
577 | |||
578 | /* May need to force signal if handle_signal failed to deliver */ | ||
579 | while (1) { | ||
580 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | ||
581 | DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]); | ||
582 | 573 | ||
583 | if (signr <= 0) | 574 | if (signr > 0) { |
584 | break; | ||
585 | |||
586 | /* Restart a system call if necessary. */ | 575 | /* Restart a system call if necessary. */ |
587 | if (in_syscall) | 576 | if (in_syscall) |
588 | syscall_restart(regs, &ka); | 577 | syscall_restart(regs, &ka); |
589 | 578 | ||
590 | /* Whee! Actually deliver the signal. If the | 579 | handle_signal(signr, &info, &ka, regs, in_syscall); |
591 | delivery failed, we need to continue to iterate in | 580 | return; |
592 | this loop so we can deliver the SIGSEGV... */ | ||
593 | if (handle_signal(signr, &info, &ka, regs, in_syscall)) | ||
594 | return; | ||
595 | } | 581 | } |
596 | /* end of while(1) looping forever if we can't force a signal */ | ||
597 | 582 | ||
598 | /* Did we come from a system call? */ | 583 | /* Did we come from a system call? */ |
599 | if (in_syscall) | 584 | if (in_syscall) |
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index dc9a6246232..bf5b93a885d 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c | |||
@@ -60,14 +60,14 @@ | |||
60 | asmlinkage int sys32_execve(struct pt_regs *regs) | 60 | asmlinkage int sys32_execve(struct pt_regs *regs) |
61 | { | 61 | { |
62 | int error; | 62 | int error; |
63 | char *filename; | 63 | struct filename *filename; |
64 | 64 | ||
65 | DBG(("sys32_execve(%p) r26 = 0x%lx\n", regs, regs->gr[26])); | 65 | DBG(("sys32_execve(%p) r26 = 0x%lx\n", regs, regs->gr[26])); |
66 | filename = getname((const char __user *) regs->gr[26]); | 66 | filename = getname((const char __user *) regs->gr[26]); |
67 | error = PTR_ERR(filename); | 67 | error = PTR_ERR(filename); |
68 | if (IS_ERR(filename)) | 68 | if (IS_ERR(filename)) |
69 | goto out; | 69 | goto out; |
70 | error = compat_do_execve(filename, compat_ptr(regs->gr[25]), | 70 | error = compat_do_execve(filename->name, compat_ptr(regs->gr[25]), |
71 | compat_ptr(regs->gr[24]), regs); | 71 | compat_ptr(regs->gr[24]), regs); |
72 | putname(filename); | 72 | putname(filename); |
73 | out: | 73 | out: |
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 82a52b2fb13..86742df0b19 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
@@ -156,7 +156,7 @@ linux_gateway_entry: | |||
156 | STREG %r26, TASK_PT_GR26(%r1) /* 1st argument */ | 156 | STREG %r26, TASK_PT_GR26(%r1) /* 1st argument */ |
157 | STREG %r27, TASK_PT_GR27(%r1) /* user dp */ | 157 | STREG %r27, TASK_PT_GR27(%r1) /* user dp */ |
158 | STREG %r28, TASK_PT_GR28(%r1) /* return value 0 */ | 158 | STREG %r28, TASK_PT_GR28(%r1) /* return value 0 */ |
159 | STREG %r28, TASK_PT_ORIG_R28(%r1) /* return value 0 (saved for signals) */ | 159 | STREG %r0, TASK_PT_ORIG_R28(%r1) /* don't prohibit restarts */ |
160 | STREG %r29, TASK_PT_GR29(%r1) /* return value 1 */ | 160 | STREG %r29, TASK_PT_GR29(%r1) /* return value 1 */ |
161 | STREG %r31, TASK_PT_GR31(%r1) /* preserve syscall return ptr */ | 161 | STREG %r31, TASK_PT_GR31(%r1) /* preserve syscall return ptr */ |
162 | 162 | ||
@@ -180,9 +180,10 @@ linux_gateway_entry: | |||
180 | 180 | ||
181 | /* Are we being ptraced? */ | 181 | /* Are we being ptraced? */ |
182 | mfctl %cr30, %r1 | 182 | mfctl %cr30, %r1 |
183 | LDREG TI_TASK(%r1),%r1 | 183 | LDREG TI_FLAGS(%r1),%r1 |
184 | ldw TASK_PTRACE(%r1), %r1 | 184 | ldi _TIF_SYSCALL_TRACE_MASK, %r19 |
185 | bb,<,n %r1,31,.Ltracesys | 185 | and,COND(=) %r1, %r19, %r0 |
186 | b,n .Ltracesys | ||
186 | 187 | ||
187 | /* Note! We cannot use the syscall table that is mapped | 188 | /* Note! We cannot use the syscall table that is mapped |
188 | nearby since the gateway page is mapped execute-only. */ | 189 | nearby since the gateway page is mapped execute-only. */ |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index df7edb887a0..a902a5c1c76 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -137,10 +137,13 @@ config PPC | |||
137 | select ARCH_HAVE_NMI_SAFE_CMPXCHG | 137 | select ARCH_HAVE_NMI_SAFE_CMPXCHG |
138 | select GENERIC_SMP_IDLE_THREAD | 138 | select GENERIC_SMP_IDLE_THREAD |
139 | select GENERIC_CMOS_UPDATE | 139 | select GENERIC_CMOS_UPDATE |
140 | select GENERIC_TIME_VSYSCALL | 140 | select GENERIC_TIME_VSYSCALL_OLD |
141 | select GENERIC_CLOCKEVENTS | 141 | select GENERIC_CLOCKEVENTS |
142 | select GENERIC_STRNCPY_FROM_USER | 142 | select GENERIC_STRNCPY_FROM_USER |
143 | select GENERIC_STRNLEN_USER | 143 | select GENERIC_STRNLEN_USER |
144 | select GENERIC_KERNEL_THREAD | ||
145 | select HAVE_MOD_ARCH_SPECIFIC | ||
146 | select MODULES_USE_ELF_RELA | ||
144 | 147 | ||
145 | config EARLY_PRINTK | 148 | config EARLY_PRINTK |
146 | bool | 149 | bool |
diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild index ace53dbde2c..a4fe15e33c6 100644 --- a/arch/powerpc/include/asm/Kbuild +++ b/arch/powerpc/include/asm/Kbuild | |||
@@ -1,39 +1,4 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | header-y += auxvec.h | ||
4 | header-y += bootx.h | ||
5 | header-y += byteorder.h | ||
6 | header-y += cputable.h | ||
7 | header-y += elf.h | ||
8 | header-y += errno.h | ||
9 | header-y += fcntl.h | ||
10 | header-y += ioctl.h | ||
11 | header-y += ioctls.h | ||
12 | header-y += ipcbuf.h | ||
13 | header-y += linkage.h | ||
14 | header-y += msgbuf.h | ||
15 | header-y += nvram.h | ||
16 | header-y += param.h | ||
17 | header-y += poll.h | ||
18 | header-y += posix_types.h | ||
19 | header-y += ps3fb.h | ||
20 | header-y += resource.h | ||
21 | header-y += seccomp.h | ||
22 | header-y += sembuf.h | ||
23 | header-y += shmbuf.h | ||
24 | header-y += sigcontext.h | ||
25 | header-y += siginfo.h | ||
26 | header-y += signal.h | ||
27 | header-y += socket.h | ||
28 | header-y += sockios.h | ||
29 | header-y += spu_info.h | ||
30 | header-y += stat.h | ||
31 | header-y += statfs.h | ||
32 | header-y += termbits.h | ||
33 | header-y += termios.h | ||
34 | header-y += types.h | ||
35 | header-y += ucontext.h | ||
36 | header-y += unistd.h | ||
37 | 2 | ||
38 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
39 | generic-y += rwsem.h | 4 | generic-y += rwsem.h |
diff --git a/arch/powerpc/include/asm/bootx.h b/arch/powerpc/include/asm/bootx.h index 60a3c9ef301..dd9461003df 100644 --- a/arch/powerpc/include/asm/bootx.h +++ b/arch/powerpc/include/asm/bootx.h | |||
@@ -5,126 +5,11 @@ | |||
5 | * Written by Benjamin Herrenschmidt. | 5 | * Written by Benjamin Herrenschmidt. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | |||
9 | #ifndef __ASM_BOOTX_H__ | 8 | #ifndef __ASM_BOOTX_H__ |
10 | #define __ASM_BOOTX_H__ | 9 | #define __ASM_BOOTX_H__ |
11 | 10 | ||
12 | #include <linux/types.h> | 11 | #include <uapi/asm/bootx.h> |
13 | |||
14 | #ifdef macintosh | ||
15 | #include <Types.h> | ||
16 | #include "linux_type_defs.h" | ||
17 | #endif | ||
18 | |||
19 | #ifdef macintosh | ||
20 | /* All this requires PowerPC alignment */ | ||
21 | #pragma options align=power | ||
22 | #endif | ||
23 | |||
24 | /* On kernel entry: | ||
25 | * | ||
26 | * r3 = 0x426f6f58 ('BooX') | ||
27 | * r4 = pointer to boot_infos | ||
28 | * r5 = NULL | ||
29 | * | ||
30 | * Data and instruction translation disabled, interrupts | ||
31 | * disabled, kernel loaded at physical 0x00000000 on PCI | ||
32 | * machines (will be different on NuBus). | ||
33 | */ | ||
34 | |||
35 | #define BOOT_INFO_VERSION 5 | ||
36 | #define BOOT_INFO_COMPATIBLE_VERSION 1 | ||
37 | |||
38 | /* Bit in the architecture flag mask. More to be defined in | ||
39 | future versions. Note that either BOOT_ARCH_PCI or | ||
40 | BOOT_ARCH_NUBUS is set. The other BOOT_ARCH_NUBUS_xxx are | ||
41 | set additionally when BOOT_ARCH_NUBUS is set. | ||
42 | */ | ||
43 | #define BOOT_ARCH_PCI 0x00000001UL | ||
44 | #define BOOT_ARCH_NUBUS 0x00000002UL | ||
45 | #define BOOT_ARCH_NUBUS_PDM 0x00000010UL | ||
46 | #define BOOT_ARCH_NUBUS_PERFORMA 0x00000020UL | ||
47 | #define BOOT_ARCH_NUBUS_POWERBOOK 0x00000040UL | ||
48 | |||
49 | /* Maximum number of ranges in phys memory map */ | ||
50 | #define MAX_MEM_MAP_SIZE 26 | ||
51 | |||
52 | /* This is the format of an element in the physical memory map. Note that | ||
53 | the map is optional and current BootX will only build it for pre-PCI | ||
54 | machines */ | ||
55 | typedef struct boot_info_map_entry | ||
56 | { | ||
57 | __u32 physAddr; /* Physical starting address */ | ||
58 | __u32 size; /* Size in bytes */ | ||
59 | } boot_info_map_entry_t; | ||
60 | |||
61 | |||
62 | /* Here are the boot informations that are passed to the bootstrap | ||
63 | * Note that the kernel arguments and the device tree are appended | ||
64 | * at the end of this structure. */ | ||
65 | typedef struct boot_infos | ||
66 | { | ||
67 | /* Version of this structure */ | ||
68 | __u32 version; | ||
69 | /* backward compatible down to version: */ | ||
70 | __u32 compatible_version; | ||
71 | |||
72 | /* NEW (vers. 2) this holds the current _logical_ base addr of | ||
73 | the frame buffer (for use by early boot message) */ | ||
74 | __u8* logicalDisplayBase; | ||
75 | 12 | ||
76 | /* NEW (vers. 4) Apple's machine identification */ | ||
77 | __u32 machineID; | ||
78 | |||
79 | /* NEW (vers. 4) Detected hw architecture */ | ||
80 | __u32 architecture; | ||
81 | |||
82 | /* The device tree (internal addresses relative to the beginning of the tree, | ||
83 | * device tree offset relative to the beginning of this structure). | ||
84 | * On pre-PCI macintosh (BOOT_ARCH_PCI bit set to 0 in architecture), this | ||
85 | * field is 0. | ||
86 | */ | ||
87 | __u32 deviceTreeOffset; /* Device tree offset */ | ||
88 | __u32 deviceTreeSize; /* Size of the device tree */ | ||
89 | |||
90 | /* Some infos about the current MacOS display */ | ||
91 | __u32 dispDeviceRect[4]; /* left,top,right,bottom */ | ||
92 | __u32 dispDeviceDepth; /* (8, 16 or 32) */ | ||
93 | __u8* dispDeviceBase; /* base address (physical) */ | ||
94 | __u32 dispDeviceRowBytes; /* rowbytes (in bytes) */ | ||
95 | __u32 dispDeviceColorsOffset; /* Colormap (8 bits only) or 0 (*) */ | ||
96 | /* Optional offset in the registry to the current | ||
97 | * MacOS display. (Can be 0 when not detected) */ | ||
98 | __u32 dispDeviceRegEntryOffset; | ||
99 | |||
100 | /* Optional pointer to boot ramdisk (offset from this structure) */ | ||
101 | __u32 ramDisk; | ||
102 | __u32 ramDiskSize; /* size of ramdisk image */ | ||
103 | |||
104 | /* Kernel command line arguments (offset from this structure) */ | ||
105 | __u32 kernelParamsOffset; | ||
106 | |||
107 | /* ALL BELOW NEW (vers. 4) */ | ||
108 | |||
109 | /* This defines the physical memory. Valid with BOOT_ARCH_NUBUS flag | ||
110 | (non-PCI) only. On PCI, memory is contiguous and it's size is in the | ||
111 | device-tree. */ | ||
112 | boot_info_map_entry_t | ||
113 | physMemoryMap[MAX_MEM_MAP_SIZE]; /* Where the phys memory is */ | ||
114 | __u32 physMemoryMapSize; /* How many entries in map */ | ||
115 | |||
116 | |||
117 | /* The framebuffer size (optional, currently 0) */ | ||
118 | __u32 frameBufferSize; /* Represents a max size, can be 0. */ | ||
119 | |||
120 | /* NEW (vers. 5) */ | ||
121 | |||
122 | /* Total params size (args + colormap + device tree + ramdisk) */ | ||
123 | __u32 totalParamsSize; | ||
124 | |||
125 | } boot_infos_t; | ||
126 | |||
127 | #ifdef __KERNEL__ | ||
128 | /* (*) The format of the colormap is 256 * 3 * 2 bytes. Each color index | 13 | /* (*) The format of the colormap is 256 * 3 * 2 bytes. Each color index |
129 | * is represented by 3 short words containing a 16 bits (unsigned) color | 14 | * is represented by 3 short words containing a 16 bits (unsigned) color |
130 | * component. Later versions may contain the gamma table for direct-color | 15 | * component. Later versions may contain the gamma table for direct-color |
@@ -162,10 +47,4 @@ struct bootx_dt_node { | |||
162 | 47 | ||
163 | extern void bootx_init(unsigned long r4, unsigned long phys); | 48 | extern void bootx_init(unsigned long r4, unsigned long phys); |
164 | 49 | ||
165 | #endif /* __KERNEL__ */ | ||
166 | |||
167 | #ifdef macintosh | ||
168 | #pragma options align=reset | ||
169 | #endif | ||
170 | |||
171 | #endif | 50 | #endif |
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index b3c083de17a..21a0687b8c4 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h | |||
@@ -1,42 +1,10 @@ | |||
1 | #ifndef __ASM_POWERPC_CPUTABLE_H | 1 | #ifndef __ASM_POWERPC_CPUTABLE_H |
2 | #define __ASM_POWERPC_CPUTABLE_H | 2 | #define __ASM_POWERPC_CPUTABLE_H |
3 | 3 | ||
4 | #define PPC_FEATURE_32 0x80000000 | ||
5 | #define PPC_FEATURE_64 0x40000000 | ||
6 | #define PPC_FEATURE_601_INSTR 0x20000000 | ||
7 | #define PPC_FEATURE_HAS_ALTIVEC 0x10000000 | ||
8 | #define PPC_FEATURE_HAS_FPU 0x08000000 | ||
9 | #define PPC_FEATURE_HAS_MMU 0x04000000 | ||
10 | #define PPC_FEATURE_HAS_4xxMAC 0x02000000 | ||
11 | #define PPC_FEATURE_UNIFIED_CACHE 0x01000000 | ||
12 | #define PPC_FEATURE_HAS_SPE 0x00800000 | ||
13 | #define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 | ||
14 | #define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 | ||
15 | #define PPC_FEATURE_NO_TB 0x00100000 | ||
16 | #define PPC_FEATURE_POWER4 0x00080000 | ||
17 | #define PPC_FEATURE_POWER5 0x00040000 | ||
18 | #define PPC_FEATURE_POWER5_PLUS 0x00020000 | ||
19 | #define PPC_FEATURE_CELL 0x00010000 | ||
20 | #define PPC_FEATURE_BOOKE 0x00008000 | ||
21 | #define PPC_FEATURE_SMT 0x00004000 | ||
22 | #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 | ||
23 | #define PPC_FEATURE_ARCH_2_05 0x00001000 | ||
24 | #define PPC_FEATURE_PA6T 0x00000800 | ||
25 | #define PPC_FEATURE_HAS_DFP 0x00000400 | ||
26 | #define PPC_FEATURE_POWER6_EXT 0x00000200 | ||
27 | #define PPC_FEATURE_ARCH_2_06 0x00000100 | ||
28 | #define PPC_FEATURE_HAS_VSX 0x00000080 | ||
29 | |||
30 | #define PPC_FEATURE_PSERIES_PERFMON_COMPAT \ | ||
31 | 0x00000040 | ||
32 | |||
33 | #define PPC_FEATURE_TRUE_LE 0x00000002 | ||
34 | #define PPC_FEATURE_PPC_LE 0x00000001 | ||
35 | |||
36 | #ifdef __KERNEL__ | ||
37 | 4 | ||
38 | #include <asm/asm-compat.h> | 5 | #include <asm/asm-compat.h> |
39 | #include <asm/feature-fixups.h> | 6 | #include <asm/feature-fixups.h> |
7 | #include <uapi/asm/cputable.h> | ||
40 | 8 | ||
41 | #ifndef __ASSEMBLY__ | 9 | #ifndef __ASSEMBLY__ |
42 | 10 | ||
@@ -557,5 +525,4 @@ static inline int cpu_has_feature(unsigned long feature) | |||
557 | 525 | ||
558 | #endif /* !__ASSEMBLY__ */ | 526 | #endif /* !__ASSEMBLY__ */ |
559 | 527 | ||
560 | #endif /* __KERNEL__ */ | ||
561 | #endif /* __ASM_POWERPC_CPUTABLE_H */ | 528 | #endif /* __ASM_POWERPC_CPUTABLE_H */ |
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h index 3bf9cca3514..6abf0a16323 100644 --- a/arch/powerpc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h | |||
@@ -1,90 +1,3 @@ | |||
1 | #ifndef _ASM_POWERPC_ELF_H | ||
2 | #define _ASM_POWERPC_ELF_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | #include <linux/sched.h> /* for task_struct */ | ||
6 | #include <asm/page.h> | ||
7 | #include <asm/string.h> | ||
8 | #endif | ||
9 | |||
10 | #include <linux/types.h> | ||
11 | |||
12 | #include <asm/ptrace.h> | ||
13 | #include <asm/cputable.h> | ||
14 | #include <asm/auxvec.h> | ||
15 | |||
16 | /* PowerPC relocations defined by the ABIs */ | ||
17 | #define R_PPC_NONE 0 | ||
18 | #define R_PPC_ADDR32 1 /* 32bit absolute address */ | ||
19 | #define R_PPC_ADDR24 2 /* 26bit address, 2 bits ignored. */ | ||
20 | #define R_PPC_ADDR16 3 /* 16bit absolute address */ | ||
21 | #define R_PPC_ADDR16_LO 4 /* lower 16bit of absolute address */ | ||
22 | #define R_PPC_ADDR16_HI 5 /* high 16bit of absolute address */ | ||
23 | #define R_PPC_ADDR16_HA 6 /* adjusted high 16bit */ | ||
24 | #define R_PPC_ADDR14 7 /* 16bit address, 2 bits ignored */ | ||
25 | #define R_PPC_ADDR14_BRTAKEN 8 | ||
26 | #define R_PPC_ADDR14_BRNTAKEN 9 | ||
27 | #define R_PPC_REL24 10 /* PC relative 26 bit */ | ||
28 | #define R_PPC_REL14 11 /* PC relative 16 bit */ | ||
29 | #define R_PPC_REL14_BRTAKEN 12 | ||
30 | #define R_PPC_REL14_BRNTAKEN 13 | ||
31 | #define R_PPC_GOT16 14 | ||
32 | #define R_PPC_GOT16_LO 15 | ||
33 | #define R_PPC_GOT16_HI 16 | ||
34 | #define R_PPC_GOT16_HA 17 | ||
35 | #define R_PPC_PLTREL24 18 | ||
36 | #define R_PPC_COPY 19 | ||
37 | #define R_PPC_GLOB_DAT 20 | ||
38 | #define R_PPC_JMP_SLOT 21 | ||
39 | #define R_PPC_RELATIVE 22 | ||
40 | #define R_PPC_LOCAL24PC 23 | ||
41 | #define R_PPC_UADDR32 24 | ||
42 | #define R_PPC_UADDR16 25 | ||
43 | #define R_PPC_REL32 26 | ||
44 | #define R_PPC_PLT32 27 | ||
45 | #define R_PPC_PLTREL32 28 | ||
46 | #define R_PPC_PLT16_LO 29 | ||
47 | #define R_PPC_PLT16_HI 30 | ||
48 | #define R_PPC_PLT16_HA 31 | ||
49 | #define R_PPC_SDAREL16 32 | ||
50 | #define R_PPC_SECTOFF 33 | ||
51 | #define R_PPC_SECTOFF_LO 34 | ||
52 | #define R_PPC_SECTOFF_HI 35 | ||
53 | #define R_PPC_SECTOFF_HA 36 | ||
54 | |||
55 | /* PowerPC relocations defined for the TLS access ABI. */ | ||
56 | #define R_PPC_TLS 67 /* none (sym+add)@tls */ | ||
57 | #define R_PPC_DTPMOD32 68 /* word32 (sym+add)@dtpmod */ | ||
58 | #define R_PPC_TPREL16 69 /* half16* (sym+add)@tprel */ | ||
59 | #define R_PPC_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */ | ||
60 | #define R_PPC_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */ | ||
61 | #define R_PPC_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */ | ||
62 | #define R_PPC_TPREL32 73 /* word32 (sym+add)@tprel */ | ||
63 | #define R_PPC_DTPREL16 74 /* half16* (sym+add)@dtprel */ | ||
64 | #define R_PPC_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */ | ||
65 | #define R_PPC_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */ | ||
66 | #define R_PPC_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */ | ||
67 | #define R_PPC_DTPREL32 78 /* word32 (sym+add)@dtprel */ | ||
68 | #define R_PPC_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */ | ||
69 | #define R_PPC_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */ | ||
70 | #define R_PPC_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */ | ||
71 | #define R_PPC_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */ | ||
72 | #define R_PPC_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */ | ||
73 | #define R_PPC_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */ | ||
74 | #define R_PPC_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */ | ||
75 | #define R_PPC_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */ | ||
76 | #define R_PPC_GOT_TPREL16 87 /* half16* (sym+add)@got@tprel */ | ||
77 | #define R_PPC_GOT_TPREL16_LO 88 /* half16 (sym+add)@got@tprel@l */ | ||
78 | #define R_PPC_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */ | ||
79 | #define R_PPC_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */ | ||
80 | #define R_PPC_GOT_DTPREL16 91 /* half16* (sym+add)@got@dtprel */ | ||
81 | #define R_PPC_GOT_DTPREL16_LO 92 /* half16* (sym+add)@got@dtprel@l */ | ||
82 | #define R_PPC_GOT_DTPREL16_HI 93 /* half16* (sym+add)@got@dtprel@h */ | ||
83 | #define R_PPC_GOT_DTPREL16_HA 94 /* half16* (sym+add)@got@dtprel@ha */ | ||
84 | |||
85 | /* keep this the last entry. */ | ||
86 | #define R_PPC_NUM 95 | ||
87 | |||
88 | /* | 1 | /* |
89 | * ELF register definitions.. | 2 | * ELF register definitions.. |
90 | * | 3 | * |
@@ -93,77 +6,14 @@ | |||
93 | * as published by the Free Software Foundation; either version | 6 | * as published by the Free Software Foundation; either version |
94 | * 2 of the License, or (at your option) any later version. | 7 | * 2 of the License, or (at your option) any later version. |
95 | */ | 8 | */ |
9 | #ifndef _ASM_POWERPC_ELF_H | ||
10 | #define _ASM_POWERPC_ELF_H | ||
96 | 11 | ||
97 | #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ | 12 | #include <linux/sched.h> /* for task_struct */ |
98 | #define ELF_NFPREG 33 /* includes fpscr */ | 13 | #include <asm/page.h> |
99 | 14 | #include <asm/string.h> | |
100 | typedef unsigned long elf_greg_t64; | 15 | #include <uapi/asm/elf.h> |
101 | typedef elf_greg_t64 elf_gregset_t64[ELF_NGREG]; | ||
102 | |||
103 | typedef unsigned int elf_greg_t32; | ||
104 | typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG]; | ||
105 | typedef elf_gregset_t32 compat_elf_gregset_t; | ||
106 | |||
107 | /* | ||
108 | * ELF_ARCH, CLASS, and DATA are used to set parameters in the core dumps. | ||
109 | */ | ||
110 | #ifdef __powerpc64__ | ||
111 | # define ELF_NVRREG32 33 /* includes vscr & vrsave stuffed together */ | ||
112 | # define ELF_NVRREG 34 /* includes vscr & vrsave in split vectors */ | ||
113 | # define ELF_NVSRHALFREG 32 /* Half the vsx registers */ | ||
114 | # define ELF_GREG_TYPE elf_greg_t64 | ||
115 | #else | ||
116 | # define ELF_NEVRREG 34 /* includes acc (as 2) */ | ||
117 | # define ELF_NVRREG 33 /* includes vscr */ | ||
118 | # define ELF_GREG_TYPE elf_greg_t32 | ||
119 | # define ELF_ARCH EM_PPC | ||
120 | # define ELF_CLASS ELFCLASS32 | ||
121 | # define ELF_DATA ELFDATA2MSB | ||
122 | #endif /* __powerpc64__ */ | ||
123 | |||
124 | #ifndef ELF_ARCH | ||
125 | # define ELF_ARCH EM_PPC64 | ||
126 | # define ELF_CLASS ELFCLASS64 | ||
127 | # define ELF_DATA ELFDATA2MSB | ||
128 | typedef elf_greg_t64 elf_greg_t; | ||
129 | typedef elf_gregset_t64 elf_gregset_t; | ||
130 | #else | ||
131 | /* Assumption: ELF_ARCH == EM_PPC and ELF_CLASS == ELFCLASS32 */ | ||
132 | typedef elf_greg_t32 elf_greg_t; | ||
133 | typedef elf_gregset_t32 elf_gregset_t; | ||
134 | #endif /* ELF_ARCH */ | ||
135 | |||
136 | /* Floating point registers */ | ||
137 | typedef double elf_fpreg_t; | ||
138 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | ||
139 | |||
140 | /* Altivec registers */ | ||
141 | /* | ||
142 | * The entries with indexes 0-31 contain the corresponding vector registers. | ||
143 | * The entry with index 32 contains the vscr as the last word (offset 12) | ||
144 | * within the quadword. This allows the vscr to be stored as either a | ||
145 | * quadword (since it must be copied via a vector register to/from storage) | ||
146 | * or as a word. | ||
147 | * | ||
148 | * 64-bit kernel notes: The entry at index 33 contains the vrsave as the first | ||
149 | * word (offset 0) within the quadword. | ||
150 | * | ||
151 | * This definition of the VMX state is compatible with the current PPC32 | ||
152 | * ptrace interface. This allows signal handling and ptrace to use the same | ||
153 | * structures. This also simplifies the implementation of a bi-arch | ||
154 | * (combined (32- and 64-bit) gdb. | ||
155 | * | ||
156 | * Note that it's _not_ compatible with 32 bits ucontext which stuffs the | ||
157 | * vrsave along with vscr and so only uses 33 vectors for the register set | ||
158 | */ | ||
159 | typedef __vector128 elf_vrreg_t; | ||
160 | typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; | ||
161 | #ifdef __powerpc64__ | ||
162 | typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32]; | ||
163 | typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG]; | ||
164 | #endif | ||
165 | 16 | ||
166 | #ifdef __KERNEL__ | ||
167 | /* | 17 | /* |
168 | * This is used to ensure we don't load something for the wrong architecture. | 18 | * This is used to ensure we don't load something for the wrong architecture. |
169 | */ | 19 | */ |
@@ -277,153 +127,6 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm, | |||
277 | extern unsigned long arch_randomize_brk(struct mm_struct *mm); | 127 | extern unsigned long arch_randomize_brk(struct mm_struct *mm); |
278 | #define arch_randomize_brk arch_randomize_brk | 128 | #define arch_randomize_brk arch_randomize_brk |
279 | 129 | ||
280 | #endif /* __KERNEL__ */ | ||
281 | |||
282 | /* | ||
283 | * The requirements here are: | ||
284 | * - keep the final alignment of sp (sp & 0xf) | ||
285 | * - make sure the 32-bit value at the first 16 byte aligned position of | ||
286 | * AUXV is greater than 16 for glibc compatibility. | ||
287 | * AT_IGNOREPPC is used for that. | ||
288 | * - for compatibility with glibc ARCH_DLINFO must always be defined on PPC, | ||
289 | * even if DLINFO_ARCH_ITEMS goes to zero or is undefined. | ||
290 | * update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes | ||
291 | */ | ||
292 | #define ARCH_DLINFO \ | ||
293 | do { \ | ||
294 | /* Handle glibc compatibility. */ \ | ||
295 | NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \ | ||
296 | NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \ | ||
297 | /* Cache size items */ \ | ||
298 | NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize); \ | ||
299 | NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize); \ | ||
300 | NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize); \ | ||
301 | VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso_base); \ | ||
302 | } while (0) | ||
303 | |||
304 | /* PowerPC64 relocations defined by the ABIs */ | ||
305 | #define R_PPC64_NONE R_PPC_NONE | ||
306 | #define R_PPC64_ADDR32 R_PPC_ADDR32 /* 32bit absolute address. */ | ||
307 | #define R_PPC64_ADDR24 R_PPC_ADDR24 /* 26bit address, word aligned. */ | ||
308 | #define R_PPC64_ADDR16 R_PPC_ADDR16 /* 16bit absolute address. */ | ||
309 | #define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO /* lower 16bits of abs. address. */ | ||
310 | #define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI /* high 16bits of abs. address. */ | ||
311 | #define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA /* adjusted high 16bits. */ | ||
312 | #define R_PPC64_ADDR14 R_PPC_ADDR14 /* 16bit address, word aligned. */ | ||
313 | #define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN | ||
314 | #define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN | ||
315 | #define R_PPC64_REL24 R_PPC_REL24 /* PC relative 26 bit, word aligned. */ | ||
316 | #define R_PPC64_REL14 R_PPC_REL14 /* PC relative 16 bit. */ | ||
317 | #define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN | ||
318 | #define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN | ||
319 | #define R_PPC64_GOT16 R_PPC_GOT16 | ||
320 | #define R_PPC64_GOT16_LO R_PPC_GOT16_LO | ||
321 | #define R_PPC64_GOT16_HI R_PPC_GOT16_HI | ||
322 | #define R_PPC64_GOT16_HA R_PPC_GOT16_HA | ||
323 | |||
324 | #define R_PPC64_COPY R_PPC_COPY | ||
325 | #define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT | ||
326 | #define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT | ||
327 | #define R_PPC64_RELATIVE R_PPC_RELATIVE | ||
328 | |||
329 | #define R_PPC64_UADDR32 R_PPC_UADDR32 | ||
330 | #define R_PPC64_UADDR16 R_PPC_UADDR16 | ||
331 | #define R_PPC64_REL32 R_PPC_REL32 | ||
332 | #define R_PPC64_PLT32 R_PPC_PLT32 | ||
333 | #define R_PPC64_PLTREL32 R_PPC_PLTREL32 | ||
334 | #define R_PPC64_PLT16_LO R_PPC_PLT16_LO | ||
335 | #define R_PPC64_PLT16_HI R_PPC_PLT16_HI | ||
336 | #define R_PPC64_PLT16_HA R_PPC_PLT16_HA | ||
337 | |||
338 | #define R_PPC64_SECTOFF R_PPC_SECTOFF | ||
339 | #define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO | ||
340 | #define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI | ||
341 | #define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA | ||
342 | #define R_PPC64_ADDR30 37 /* word30 (S + A - P) >> 2. */ | ||
343 | #define R_PPC64_ADDR64 38 /* doubleword64 S + A. */ | ||
344 | #define R_PPC64_ADDR16_HIGHER 39 /* half16 #higher(S + A). */ | ||
345 | #define R_PPC64_ADDR16_HIGHERA 40 /* half16 #highera(S + A). */ | ||
346 | #define R_PPC64_ADDR16_HIGHEST 41 /* half16 #highest(S + A). */ | ||
347 | #define R_PPC64_ADDR16_HIGHESTA 42 /* half16 #highesta(S + A). */ | ||
348 | #define R_PPC64_UADDR64 43 /* doubleword64 S + A. */ | ||
349 | #define R_PPC64_REL64 44 /* doubleword64 S + A - P. */ | ||
350 | #define R_PPC64_PLT64 45 /* doubleword64 L + A. */ | ||
351 | #define R_PPC64_PLTREL64 46 /* doubleword64 L + A - P. */ | ||
352 | #define R_PPC64_TOC16 47 /* half16* S + A - .TOC. */ | ||
353 | #define R_PPC64_TOC16_LO 48 /* half16 #lo(S + A - .TOC.). */ | ||
354 | #define R_PPC64_TOC16_HI 49 /* half16 #hi(S + A - .TOC.). */ | ||
355 | #define R_PPC64_TOC16_HA 50 /* half16 #ha(S + A - .TOC.). */ | ||
356 | #define R_PPC64_TOC 51 /* doubleword64 .TOC. */ | ||
357 | #define R_PPC64_PLTGOT16 52 /* half16* M + A. */ | ||
358 | #define R_PPC64_PLTGOT16_LO 53 /* half16 #lo(M + A). */ | ||
359 | #define R_PPC64_PLTGOT16_HI 54 /* half16 #hi(M + A). */ | ||
360 | #define R_PPC64_PLTGOT16_HA 55 /* half16 #ha(M + A). */ | ||
361 | |||
362 | #define R_PPC64_ADDR16_DS 56 /* half16ds* (S + A) >> 2. */ | ||
363 | #define R_PPC64_ADDR16_LO_DS 57 /* half16ds #lo(S + A) >> 2. */ | ||
364 | #define R_PPC64_GOT16_DS 58 /* half16ds* (G + A) >> 2. */ | ||
365 | #define R_PPC64_GOT16_LO_DS 59 /* half16ds #lo(G + A) >> 2. */ | ||
366 | #define R_PPC64_PLT16_LO_DS 60 /* half16ds #lo(L + A) >> 2. */ | ||
367 | #define R_PPC64_SECTOFF_DS 61 /* half16ds* (R + A) >> 2. */ | ||
368 | #define R_PPC64_SECTOFF_LO_DS 62 /* half16ds #lo(R + A) >> 2. */ | ||
369 | #define R_PPC64_TOC16_DS 63 /* half16ds* (S + A - .TOC.) >> 2. */ | ||
370 | #define R_PPC64_TOC16_LO_DS 64 /* half16ds #lo(S + A - .TOC.) >> 2. */ | ||
371 | #define R_PPC64_PLTGOT16_DS 65 /* half16ds* (M + A) >> 2. */ | ||
372 | #define R_PPC64_PLTGOT16_LO_DS 66 /* half16ds #lo(M + A) >> 2. */ | ||
373 | |||
374 | /* PowerPC64 relocations defined for the TLS access ABI. */ | ||
375 | #define R_PPC64_TLS 67 /* none (sym+add)@tls */ | ||
376 | #define R_PPC64_DTPMOD64 68 /* doubleword64 (sym+add)@dtpmod */ | ||
377 | #define R_PPC64_TPREL16 69 /* half16* (sym+add)@tprel */ | ||
378 | #define R_PPC64_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */ | ||
379 | #define R_PPC64_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */ | ||
380 | #define R_PPC64_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */ | ||
381 | #define R_PPC64_TPREL64 73 /* doubleword64 (sym+add)@tprel */ | ||
382 | #define R_PPC64_DTPREL16 74 /* half16* (sym+add)@dtprel */ | ||
383 | #define R_PPC64_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */ | ||
384 | #define R_PPC64_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */ | ||
385 | #define R_PPC64_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */ | ||
386 | #define R_PPC64_DTPREL64 78 /* doubleword64 (sym+add)@dtprel */ | ||
387 | #define R_PPC64_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */ | ||
388 | #define R_PPC64_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */ | ||
389 | #define R_PPC64_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */ | ||
390 | #define R_PPC64_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */ | ||
391 | #define R_PPC64_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */ | ||
392 | #define R_PPC64_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */ | ||
393 | #define R_PPC64_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */ | ||
394 | #define R_PPC64_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */ | ||
395 | #define R_PPC64_GOT_TPREL16_DS 87 /* half16ds* (sym+add)@got@tprel */ | ||
396 | #define R_PPC64_GOT_TPREL16_LO_DS 88 /* half16ds (sym+add)@got@tprel@l */ | ||
397 | #define R_PPC64_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */ | ||
398 | #define R_PPC64_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */ | ||
399 | #define R_PPC64_GOT_DTPREL16_DS 91 /* half16ds* (sym+add)@got@dtprel */ | ||
400 | #define R_PPC64_GOT_DTPREL16_LO_DS 92 /* half16ds (sym+add)@got@dtprel@l */ | ||
401 | #define R_PPC64_GOT_DTPREL16_HI 93 /* half16 (sym+add)@got@dtprel@h */ | ||
402 | #define R_PPC64_GOT_DTPREL16_HA 94 /* half16 (sym+add)@got@dtprel@ha */ | ||
403 | #define R_PPC64_TPREL16_DS 95 /* half16ds* (sym+add)@tprel */ | ||
404 | #define R_PPC64_TPREL16_LO_DS 96 /* half16ds (sym+add)@tprel@l */ | ||
405 | #define R_PPC64_TPREL16_HIGHER 97 /* half16 (sym+add)@tprel@higher */ | ||
406 | #define R_PPC64_TPREL16_HIGHERA 98 /* half16 (sym+add)@tprel@highera */ | ||
407 | #define R_PPC64_TPREL16_HIGHEST 99 /* half16 (sym+add)@tprel@highest */ | ||
408 | #define R_PPC64_TPREL16_HIGHESTA 100 /* half16 (sym+add)@tprel@highesta */ | ||
409 | #define R_PPC64_DTPREL16_DS 101 /* half16ds* (sym+add)@dtprel */ | ||
410 | #define R_PPC64_DTPREL16_LO_DS 102 /* half16ds (sym+add)@dtprel@l */ | ||
411 | #define R_PPC64_DTPREL16_HIGHER 103 /* half16 (sym+add)@dtprel@higher */ | ||
412 | #define R_PPC64_DTPREL16_HIGHERA 104 /* half16 (sym+add)@dtprel@highera */ | ||
413 | #define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */ | ||
414 | #define R_PPC64_DTPREL16_HIGHESTA 106 /* half16 (sym+add)@dtprel@highesta */ | ||
415 | |||
416 | /* Keep this the last entry. */ | ||
417 | #define R_PPC64_NUM 107 | ||
418 | |||
419 | /* There's actually a third entry here, but it's unused */ | ||
420 | struct ppc64_opd_entry | ||
421 | { | ||
422 | unsigned long funcaddr; | ||
423 | unsigned long r2; | ||
424 | }; | ||
425 | |||
426 | #ifdef __KERNEL__ | ||
427 | 130 | ||
428 | #ifdef CONFIG_SPU_BASE | 131 | #ifdef CONFIG_SPU_BASE |
429 | /* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */ | 132 | /* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */ |
@@ -433,6 +136,4 @@ struct ppc64_opd_entry | |||
433 | 136 | ||
434 | #endif /* CONFIG_SPU_BASE */ | 137 | #endif /* CONFIG_SPU_BASE */ |
435 | 138 | ||
436 | #endif /* __KERNEL */ | ||
437 | |||
438 | #endif /* _ASM_POWERPC_ELF_H */ | 139 | #endif /* _ASM_POWERPC_ELF_H */ |
diff --git a/arch/powerpc/include/asm/kvm_para.h b/arch/powerpc/include/asm/kvm_para.h index c18916bff68..9365860fb7f 100644 --- a/arch/powerpc/include/asm/kvm_para.h +++ b/arch/powerpc/include/asm/kvm_para.h | |||
@@ -16,77 +16,11 @@ | |||
16 | * | 16 | * |
17 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> | 17 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> |
18 | */ | 18 | */ |
19 | |||
20 | #ifndef __POWERPC_KVM_PARA_H__ | 19 | #ifndef __POWERPC_KVM_PARA_H__ |
21 | #define __POWERPC_KVM_PARA_H__ | 20 | #define __POWERPC_KVM_PARA_H__ |
22 | 21 | ||
23 | #include <linux/types.h> | 22 | #include <uapi/asm/kvm_para.h> |
24 | 23 | ||
25 | /* | ||
26 | * Additions to this struct must only occur at the end, and should be | ||
27 | * accompanied by a KVM_MAGIC_FEAT flag to advertise that they are present | ||
28 | * (albeit not necessarily relevant to the current target hardware platform). | ||
29 | * | ||
30 | * Struct fields are always 32 or 64 bit aligned, depending on them being 32 | ||
31 | * or 64 bit wide respectively. | ||
32 | * | ||
33 | * See Documentation/virtual/kvm/ppc-pv.txt | ||
34 | */ | ||
35 | struct kvm_vcpu_arch_shared { | ||
36 | __u64 scratch1; | ||
37 | __u64 scratch2; | ||
38 | __u64 scratch3; | ||
39 | __u64 critical; /* Guest may not get interrupts if == r1 */ | ||
40 | __u64 sprg0; | ||
41 | __u64 sprg1; | ||
42 | __u64 sprg2; | ||
43 | __u64 sprg3; | ||
44 | __u64 srr0; | ||
45 | __u64 srr1; | ||
46 | __u64 dar; /* dear on BookE */ | ||
47 | __u64 msr; | ||
48 | __u32 dsisr; | ||
49 | __u32 int_pending; /* Tells the guest if we have an interrupt */ | ||
50 | __u32 sr[16]; | ||
51 | __u32 mas0; | ||
52 | __u32 mas1; | ||
53 | __u64 mas7_3; | ||
54 | __u64 mas2; | ||
55 | __u32 mas4; | ||
56 | __u32 mas6; | ||
57 | __u32 esr; | ||
58 | __u32 pir; | ||
59 | |||
60 | /* | ||
61 | * SPRG4-7 are user-readable, so we can only keep these consistent | ||
62 | * between the shared area and the real registers when there's an | ||
63 | * intervening exit to KVM. This also applies to SPRG3 on some | ||
64 | * chips. | ||
65 | * | ||
66 | * This suffices for access by guest userspace, since in PR-mode | ||
67 | * KVM, an exit must occur when changing the guest's MSR[PR]. | ||
68 | * If the guest kernel writes to SPRG3-7 via the shared area, it | ||
69 | * must also use the shared area for reading while in kernel space. | ||
70 | */ | ||
71 | __u64 sprg4; | ||
72 | __u64 sprg5; | ||
73 | __u64 sprg6; | ||
74 | __u64 sprg7; | ||
75 | }; | ||
76 | |||
77 | #define KVM_SC_MAGIC_R0 0x4b564d21 /* "KVM!" */ | ||
78 | #define HC_VENDOR_KVM (42 << 16) | ||
79 | #define HC_EV_SUCCESS 0 | ||
80 | #define HC_EV_UNIMPLEMENTED 12 | ||
81 | |||
82 | #define KVM_FEATURE_MAGIC_PAGE 1 | ||
83 | |||
84 | #define KVM_MAGIC_FEAT_SR (1 << 0) | ||
85 | |||
86 | /* MASn, ESR, PIR, and high SPRGs */ | ||
87 | #define KVM_MAGIC_FEAT_MAS0_TO_SPRG7 (1 << 1) | ||
88 | |||
89 | #ifdef __KERNEL__ | ||
90 | 24 | ||
91 | #ifdef CONFIG_KVM_GUEST | 25 | #ifdef CONFIG_KVM_GUEST |
92 | 26 | ||
@@ -211,6 +145,4 @@ static inline bool kvm_check_and_clear_guest_paused(void) | |||
211 | return false; | 145 | return false; |
212 | } | 146 | } |
213 | 147 | ||
214 | #endif /* __KERNEL__ */ | ||
215 | |||
216 | #endif /* __POWERPC_KVM_PARA_H__ */ | 148 | #endif /* __POWERPC_KVM_PARA_H__ */ |
diff --git a/arch/powerpc/include/asm/mman.h b/arch/powerpc/include/asm/mman.h index d4a7f645c5d..8565c254151 100644 --- a/arch/powerpc/include/asm/mman.h +++ b/arch/powerpc/include/asm/mman.h | |||
@@ -1,34 +1,14 @@ | |||
1 | #ifndef _ASM_POWERPC_MMAN_H | ||
2 | #define _ASM_POWERPC_MMAN_H | ||
3 | |||
4 | #include <asm-generic/mman-common.h> | ||
5 | |||
6 | /* | 1 | /* |
7 | * This program is free software; you can redistribute it and/or | 2 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License | 3 | * modify it under the terms of the GNU General Public License |
9 | * as published by the Free Software Foundation; either version | 4 | * as published by the Free Software Foundation; either version |
10 | * 2 of the License, or (at your option) any later version. | 5 | * 2 of the License, or (at your option) any later version. |
11 | */ | 6 | */ |
7 | #ifndef _ASM_POWERPC_MMAN_H | ||
8 | #define _ASM_POWERPC_MMAN_H | ||
12 | 9 | ||
13 | #define PROT_SAO 0x10 /* Strong Access Ordering */ | 10 | #include <uapi/asm/mman.h> |
14 | |||
15 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | ||
16 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | ||
17 | #define MAP_LOCKED 0x80 | ||
18 | |||
19 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | ||
20 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
21 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
22 | |||
23 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | ||
24 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | ||
25 | |||
26 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
27 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
28 | #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ | ||
29 | #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ | ||
30 | 11 | ||
31 | #ifdef __KERNEL__ | ||
32 | #ifdef CONFIG_PPC64 | 12 | #ifdef CONFIG_PPC64 |
33 | 13 | ||
34 | #include <asm/cputable.h> | 14 | #include <asm/cputable.h> |
@@ -61,5 +41,4 @@ static inline int arch_validate_prot(unsigned long prot) | |||
61 | #define arch_validate_prot(prot) arch_validate_prot(prot) | 41 | #define arch_validate_prot(prot) arch_validate_prot(prot) |
62 | 42 | ||
63 | #endif /* CONFIG_PPC64 */ | 43 | #endif /* CONFIG_PPC64 */ |
64 | #endif /* __KERNEL__ */ | ||
65 | #endif /* _ASM_POWERPC_MMAN_H */ | 44 | #endif /* _ASM_POWERPC_MMAN_H */ |
diff --git a/arch/powerpc/include/asm/module.h b/arch/powerpc/include/asm/module.h index 0192a4ee2bc..c1df590ec44 100644 --- a/arch/powerpc/include/asm/module.h +++ b/arch/powerpc/include/asm/module.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/list.h> | 12 | #include <linux/list.h> |
13 | #include <asm/bug.h> | 13 | #include <asm/bug.h> |
14 | #include <asm-generic/module.h> | ||
14 | 15 | ||
15 | 16 | ||
16 | #ifndef __powerpc64__ | 17 | #ifndef __powerpc64__ |
@@ -60,16 +61,10 @@ struct mod_arch_specific { | |||
60 | */ | 61 | */ |
61 | 62 | ||
62 | #ifdef __powerpc64__ | 63 | #ifdef __powerpc64__ |
63 | # define Elf_Shdr Elf64_Shdr | ||
64 | # define Elf_Sym Elf64_Sym | ||
65 | # define Elf_Ehdr Elf64_Ehdr | ||
66 | # ifdef MODULE | 64 | # ifdef MODULE |
67 | asm(".section .stubs,\"ax\",@nobits; .align 3; .previous"); | 65 | asm(".section .stubs,\"ax\",@nobits; .align 3; .previous"); |
68 | # endif | 66 | # endif |
69 | #else | 67 | #else |
70 | # define Elf_Shdr Elf32_Shdr | ||
71 | # define Elf_Sym Elf32_Sym | ||
72 | # define Elf_Ehdr Elf32_Ehdr | ||
73 | # ifdef MODULE | 68 | # ifdef MODULE |
74 | asm(".section .plt,\"ax\",@nobits; .align 3; .previous"); | 69 | asm(".section .plt,\"ax\",@nobits; .align 3; .previous"); |
75 | asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous"); | 70 | asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous"); |
diff --git a/arch/powerpc/include/asm/nvram.h b/arch/powerpc/include/asm/nvram.h index 9d1aafe607c..b0fe0fe4e62 100644 --- a/arch/powerpc/include/asm/nvram.h +++ b/arch/powerpc/include/asm/nvram.h | |||
@@ -6,29 +6,13 @@ | |||
6 | * as published by the Free Software Foundation; either version | 6 | * as published by the Free Software Foundation; either version |
7 | * 2 of the License, or (at your option) any later version. | 7 | * 2 of the License, or (at your option) any later version. |
8 | */ | 8 | */ |
9 | |||
10 | #ifndef _ASM_POWERPC_NVRAM_H | 9 | #ifndef _ASM_POWERPC_NVRAM_H |
11 | #define _ASM_POWERPC_NVRAM_H | 10 | #define _ASM_POWERPC_NVRAM_H |
12 | 11 | ||
13 | /* Signatures for nvram partitions */ | ||
14 | #define NVRAM_SIG_SP 0x02 /* support processor */ | ||
15 | #define NVRAM_SIG_OF 0x50 /* open firmware config */ | ||
16 | #define NVRAM_SIG_FW 0x51 /* general firmware */ | ||
17 | #define NVRAM_SIG_HW 0x52 /* hardware (VPD) */ | ||
18 | #define NVRAM_SIG_FLIP 0x5a /* Apple flip/flop header */ | ||
19 | #define NVRAM_SIG_APPL 0x5f /* Apple "system" (???) */ | ||
20 | #define NVRAM_SIG_SYS 0x70 /* system env vars */ | ||
21 | #define NVRAM_SIG_CFG 0x71 /* config data */ | ||
22 | #define NVRAM_SIG_ELOG 0x72 /* error log */ | ||
23 | #define NVRAM_SIG_VEND 0x7e /* vendor defined */ | ||
24 | #define NVRAM_SIG_FREE 0x7f /* Free space */ | ||
25 | #define NVRAM_SIG_OS 0xa0 /* OS defined */ | ||
26 | #define NVRAM_SIG_PANIC 0xa1 /* Apple OSX "panic" */ | ||
27 | |||
28 | #ifdef __KERNEL__ | ||
29 | 12 | ||
30 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
31 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <uapi/asm/nvram.h> | ||
32 | 16 | ||
33 | #ifdef CONFIG_PPC_PSERIES | 17 | #ifdef CONFIG_PPC_PSERIES |
34 | extern int nvram_write_error_log(char * buff, int length, | 18 | extern int nvram_write_error_log(char * buff, int length, |
@@ -56,17 +40,6 @@ extern int nvram_remove_partition(const char *name, int sig, | |||
56 | extern int nvram_get_partition_size(loff_t data_index); | 40 | extern int nvram_get_partition_size(loff_t data_index); |
57 | extern loff_t nvram_find_partition(const char *name, int sig, int *out_size); | 41 | extern loff_t nvram_find_partition(const char *name, int sig, int *out_size); |
58 | 42 | ||
59 | #endif /* __KERNEL__ */ | ||
60 | |||
61 | /* PowerMac specific nvram stuffs */ | ||
62 | |||
63 | enum { | ||
64 | pmac_nvram_OF, /* Open Firmware partition */ | ||
65 | pmac_nvram_XPRAM, /* MacOS XPRAM partition */ | ||
66 | pmac_nvram_NR /* MacOS Name Registry partition */ | ||
67 | }; | ||
68 | |||
69 | #ifdef __KERNEL__ | ||
70 | /* Return partition offset in nvram */ | 43 | /* Return partition offset in nvram */ |
71 | extern int pmac_get_partition(int partition); | 44 | extern int pmac_get_partition(int partition); |
72 | 45 | ||
@@ -83,30 +56,4 @@ extern ssize_t nvram_get_size(void); | |||
83 | /* Normal access to NVRAM */ | 56 | /* Normal access to NVRAM */ |
84 | extern unsigned char nvram_read_byte(int i); | 57 | extern unsigned char nvram_read_byte(int i); |
85 | extern void nvram_write_byte(unsigned char c, int i); | 58 | extern void nvram_write_byte(unsigned char c, int i); |
86 | #endif | ||
87 | |||
88 | /* Some offsets in XPRAM */ | ||
89 | #define PMAC_XPRAM_MACHINE_LOC 0xe4 | ||
90 | #define PMAC_XPRAM_SOUND_VOLUME 0x08 | ||
91 | |||
92 | /* Machine location structure in PowerMac XPRAM */ | ||
93 | struct pmac_machine_location { | ||
94 | unsigned int latitude; /* 2+30 bit Fractional number */ | ||
95 | unsigned int longitude; /* 2+30 bit Fractional number */ | ||
96 | unsigned int delta; /* mix of GMT delta and DLS */ | ||
97 | }; | ||
98 | |||
99 | /* | ||
100 | * /dev/nvram ioctls | ||
101 | * | ||
102 | * Note that PMAC_NVRAM_GET_OFFSET is still supported, but is | ||
103 | * definitely obsolete. Do not use it if you can avoid it | ||
104 | */ | ||
105 | |||
106 | #define OBSOLETE_PMAC_NVRAM_GET_OFFSET \ | ||
107 | _IOWR('p', 0x40, int) | ||
108 | |||
109 | #define IOC_NVRAM_GET_OFFSET _IOWR('p', 0x42, int) /* Get NVRAM partition offset */ | ||
110 | #define IOC_NVRAM_SYNC _IO('p', 0x43) /* Sync NVRAM image */ | ||
111 | |||
112 | #endif /* _ASM_POWERPC_NVRAM_H */ | 59 | #endif /* _ASM_POWERPC_NVRAM_H */ |
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 9dc5cd1fde1..8734b385527 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h | |||
@@ -74,9 +74,6 @@ struct task_struct; | |||
74 | void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp); | 74 | void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp); |
75 | void release_thread(struct task_struct *); | 75 | void release_thread(struct task_struct *); |
76 | 76 | ||
77 | /* Create a new kernel thread. */ | ||
78 | extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | ||
79 | |||
80 | /* Lazy FPU handling on uni-processor */ | 77 | /* Lazy FPU handling on uni-processor */ |
81 | extern struct task_struct *last_task_used_math; | 78 | extern struct task_struct *last_task_used_math; |
82 | extern struct task_struct *last_task_used_altivec; | 79 | extern struct task_struct *last_task_used_altivec; |
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index 9c21ed42aba..5f995681bc1 100644 --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifndef _ASM_POWERPC_PTRACE_H | ||
2 | #define _ASM_POWERPC_PTRACE_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Copyright (C) 2001 PPC64 Team, IBM Corp | 2 | * Copyright (C) 2001 PPC64 Team, IBM Corp |
6 | * | 3 | * |
@@ -23,37 +20,11 @@ | |||
23 | * as published by the Free Software Foundation; either version | 20 | * as published by the Free Software Foundation; either version |
24 | * 2 of the License, or (at your option) any later version. | 21 | * 2 of the License, or (at your option) any later version. |
25 | */ | 22 | */ |
23 | #ifndef _ASM_POWERPC_PTRACE_H | ||
24 | #define _ASM_POWERPC_PTRACE_H | ||
26 | 25 | ||
27 | #include <linux/types.h> | 26 | #include <uapi/asm/ptrace.h> |
28 | |||
29 | #ifndef __ASSEMBLY__ | ||
30 | |||
31 | struct pt_regs { | ||
32 | unsigned long gpr[32]; | ||
33 | unsigned long nip; | ||
34 | unsigned long msr; | ||
35 | unsigned long orig_gpr3; /* Used for restarting system calls */ | ||
36 | unsigned long ctr; | ||
37 | unsigned long link; | ||
38 | unsigned long xer; | ||
39 | unsigned long ccr; | ||
40 | #ifdef __powerpc64__ | ||
41 | unsigned long softe; /* Soft enabled/disabled */ | ||
42 | #else | ||
43 | unsigned long mq; /* 601 only (not used at present) */ | ||
44 | /* Used on APUS to hold IPL value. */ | ||
45 | #endif | ||
46 | unsigned long trap; /* Reason for being here */ | ||
47 | /* N.B. for critical exceptions on 4xx, the dar and dsisr | ||
48 | fields are overloaded to hold srr0 and srr1. */ | ||
49 | unsigned long dar; /* Fault registers */ | ||
50 | unsigned long dsisr; /* on 4xx/Book-E used for ESR */ | ||
51 | unsigned long result; /* Result of a system call */ | ||
52 | }; | ||
53 | |||
54 | #endif /* __ASSEMBLY__ */ | ||
55 | 27 | ||
56 | #ifdef __KERNEL__ | ||
57 | 28 | ||
58 | #ifdef __powerpc64__ | 29 | #ifdef __powerpc64__ |
59 | 30 | ||
@@ -125,6 +96,8 @@ extern unsigned long ptrace_get_reg(struct task_struct *task, int regno); | |||
125 | extern int ptrace_put_reg(struct task_struct *task, int regno, | 96 | extern int ptrace_put_reg(struct task_struct *task, int regno, |
126 | unsigned long data); | 97 | unsigned long data); |
127 | 98 | ||
99 | #define current_pt_regs() \ | ||
100 | ((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE) - 1) | ||
128 | /* | 101 | /* |
129 | * We use the least-significant bit of the trap field to indicate | 102 | * We use the least-significant bit of the trap field to indicate |
130 | * whether we have saved the full set of registers, or only a | 103 | * whether we have saved the full set of registers, or only a |
@@ -220,219 +193,12 @@ static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, | |||
220 | 193 | ||
221 | #endif /* __ASSEMBLY__ */ | 194 | #endif /* __ASSEMBLY__ */ |
222 | 195 | ||
223 | #endif /* __KERNEL__ */ | ||
224 | |||
225 | /* | ||
226 | * Offsets used by 'ptrace' system call interface. | ||
227 | * These can't be changed without breaking binary compatibility | ||
228 | * with MkLinux, etc. | ||
229 | */ | ||
230 | #define PT_R0 0 | ||
231 | #define PT_R1 1 | ||
232 | #define PT_R2 2 | ||
233 | #define PT_R3 3 | ||
234 | #define PT_R4 4 | ||
235 | #define PT_R5 5 | ||
236 | #define PT_R6 6 | ||
237 | #define PT_R7 7 | ||
238 | #define PT_R8 8 | ||
239 | #define PT_R9 9 | ||
240 | #define PT_R10 10 | ||
241 | #define PT_R11 11 | ||
242 | #define PT_R12 12 | ||
243 | #define PT_R13 13 | ||
244 | #define PT_R14 14 | ||
245 | #define PT_R15 15 | ||
246 | #define PT_R16 16 | ||
247 | #define PT_R17 17 | ||
248 | #define PT_R18 18 | ||
249 | #define PT_R19 19 | ||
250 | #define PT_R20 20 | ||
251 | #define PT_R21 21 | ||
252 | #define PT_R22 22 | ||
253 | #define PT_R23 23 | ||
254 | #define PT_R24 24 | ||
255 | #define PT_R25 25 | ||
256 | #define PT_R26 26 | ||
257 | #define PT_R27 27 | ||
258 | #define PT_R28 28 | ||
259 | #define PT_R29 29 | ||
260 | #define PT_R30 30 | ||
261 | #define PT_R31 31 | ||
262 | |||
263 | #define PT_NIP 32 | ||
264 | #define PT_MSR 33 | ||
265 | #define PT_ORIG_R3 34 | ||
266 | #define PT_CTR 35 | ||
267 | #define PT_LNK 36 | ||
268 | #define PT_XER 37 | ||
269 | #define PT_CCR 38 | ||
270 | #ifndef __powerpc64__ | ||
271 | #define PT_MQ 39 | ||
272 | #else | ||
273 | #define PT_SOFTE 39 | ||
274 | #endif | ||
275 | #define PT_TRAP 40 | ||
276 | #define PT_DAR 41 | ||
277 | #define PT_DSISR 42 | ||
278 | #define PT_RESULT 43 | ||
279 | #define PT_REGS_COUNT 44 | ||
280 | |||
281 | #define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ | ||
282 | |||
283 | #ifndef __powerpc64__ | 196 | #ifndef __powerpc64__ |
284 | |||
285 | #define PT_FPR31 (PT_FPR0 + 2*31) | ||
286 | #define PT_FPSCR (PT_FPR0 + 2*32 + 1) | ||
287 | |||
288 | #else /* __powerpc64__ */ | 197 | #else /* __powerpc64__ */ |
289 | |||
290 | #define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */ | ||
291 | |||
292 | #ifdef __KERNEL__ | ||
293 | #define PT_FPSCR32 (PT_FPR0 + 2*32 + 1) /* each FP reg occupies 2 32-bit userspace slots */ | 198 | #define PT_FPSCR32 (PT_FPR0 + 2*32 + 1) /* each FP reg occupies 2 32-bit userspace slots */ |
294 | #endif | ||
295 | |||
296 | #define PT_VR0 82 /* each Vector reg occupies 2 slots in 64-bit */ | ||
297 | #define PT_VSCR (PT_VR0 + 32*2 + 1) | ||
298 | #define PT_VRSAVE (PT_VR0 + 33*2) | ||
299 | |||
300 | #ifdef __KERNEL__ | ||
301 | #define PT_VR0_32 164 /* each Vector reg occupies 4 slots in 32-bit */ | 199 | #define PT_VR0_32 164 /* each Vector reg occupies 4 slots in 32-bit */ |
302 | #define PT_VSCR_32 (PT_VR0 + 32*4 + 3) | 200 | #define PT_VSCR_32 (PT_VR0 + 32*4 + 3) |
303 | #define PT_VRSAVE_32 (PT_VR0 + 33*4) | 201 | #define PT_VRSAVE_32 (PT_VR0 + 33*4) |
304 | #endif | ||
305 | |||
306 | /* | ||
307 | * Only store first 32 VSRs here. The second 32 VSRs in VR0-31 | ||
308 | */ | ||
309 | #define PT_VSR0 150 /* each VSR reg occupies 2 slots in 64-bit */ | ||
310 | #define PT_VSR31 (PT_VSR0 + 2*31) | ||
311 | #ifdef __KERNEL__ | ||
312 | #define PT_VSR0_32 300 /* each VSR reg occupies 4 slots in 32-bit */ | 202 | #define PT_VSR0_32 300 /* each VSR reg occupies 4 slots in 32-bit */ |
313 | #endif | ||
314 | #endif /* __powerpc64__ */ | 203 | #endif /* __powerpc64__ */ |
315 | |||
316 | /* | ||
317 | * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go. | ||
318 | * The transfer totals 34 quadword. Quadwords 0-31 contain the | ||
319 | * corresponding vector registers. Quadword 32 contains the vscr as the | ||
320 | * last word (offset 12) within that quadword. Quadword 33 contains the | ||
321 | * vrsave as the first word (offset 0) within the quadword. | ||
322 | * | ||
323 | * This definition of the VMX state is compatible with the current PPC32 | ||
324 | * ptrace interface. This allows signal handling and ptrace to use the same | ||
325 | * structures. This also simplifies the implementation of a bi-arch | ||
326 | * (combined (32- and 64-bit) gdb. | ||
327 | */ | ||
328 | #define PTRACE_GETVRREGS 18 | ||
329 | #define PTRACE_SETVRREGS 19 | ||
330 | |||
331 | /* Get/set all the upper 32-bits of the SPE registers, accumulator, and | ||
332 | * spefscr, in one go */ | ||
333 | #define PTRACE_GETEVRREGS 20 | ||
334 | #define PTRACE_SETEVRREGS 21 | ||
335 | |||
336 | /* Get the first 32 128bit VSX registers */ | ||
337 | #define PTRACE_GETVSRREGS 27 | ||
338 | #define PTRACE_SETVSRREGS 28 | ||
339 | |||
340 | /* | ||
341 | * Get or set a debug register. The first 16 are DABR registers and the | ||
342 | * second 16 are IABR registers. | ||
343 | */ | ||
344 | #define PTRACE_GET_DEBUGREG 25 | ||
345 | #define PTRACE_SET_DEBUGREG 26 | ||
346 | |||
347 | /* (new) PTRACE requests using the same numbers as x86 and the same | ||
348 | * argument ordering. Additionally, they support more registers too | ||
349 | */ | ||
350 | #define PTRACE_GETREGS 12 | ||
351 | #define PTRACE_SETREGS 13 | ||
352 | #define PTRACE_GETFPREGS 14 | ||
353 | #define PTRACE_SETFPREGS 15 | ||
354 | #define PTRACE_GETREGS64 22 | ||
355 | #define PTRACE_SETREGS64 23 | ||
356 | |||
357 | /* Calls to trace a 64bit program from a 32bit program */ | ||
358 | #define PPC_PTRACE_PEEKTEXT_3264 0x95 | ||
359 | #define PPC_PTRACE_PEEKDATA_3264 0x94 | ||
360 | #define PPC_PTRACE_POKETEXT_3264 0x93 | ||
361 | #define PPC_PTRACE_POKEDATA_3264 0x92 | ||
362 | #define PPC_PTRACE_PEEKUSR_3264 0x91 | ||
363 | #define PPC_PTRACE_POKEUSR_3264 0x90 | ||
364 | |||
365 | #define PTRACE_SINGLEBLOCK 0x100 /* resume execution until next branch */ | ||
366 | |||
367 | #define PPC_PTRACE_GETHWDBGINFO 0x89 | ||
368 | #define PPC_PTRACE_SETHWDEBUG 0x88 | ||
369 | #define PPC_PTRACE_DELHWDEBUG 0x87 | ||
370 | |||
371 | #ifndef __ASSEMBLY__ | ||
372 | |||
373 | struct ppc_debug_info { | ||
374 | __u32 version; /* Only version 1 exists to date */ | ||
375 | __u32 num_instruction_bps; | ||
376 | __u32 num_data_bps; | ||
377 | __u32 num_condition_regs; | ||
378 | __u32 data_bp_alignment; | ||
379 | __u32 sizeof_condition; /* size of the DVC register */ | ||
380 | __u64 features; | ||
381 | }; | ||
382 | |||
383 | #endif /* __ASSEMBLY__ */ | ||
384 | |||
385 | /* | ||
386 | * features will have bits indication whether there is support for: | ||
387 | */ | ||
388 | #define PPC_DEBUG_FEATURE_INSN_BP_RANGE 0x0000000000000001 | ||
389 | #define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x0000000000000002 | ||
390 | #define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x0000000000000004 | ||
391 | #define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x0000000000000008 | ||
392 | |||
393 | #ifndef __ASSEMBLY__ | ||
394 | |||
395 | struct ppc_hw_breakpoint { | ||
396 | __u32 version; /* currently, version must be 1 */ | ||
397 | __u32 trigger_type; /* only some combinations allowed */ | ||
398 | __u32 addr_mode; /* address match mode */ | ||
399 | __u32 condition_mode; /* break/watchpoint condition flags */ | ||
400 | __u64 addr; /* break/watchpoint address */ | ||
401 | __u64 addr2; /* range end or mask */ | ||
402 | __u64 condition_value; /* contents of the DVC register */ | ||
403 | }; | ||
404 | |||
405 | #endif /* __ASSEMBLY__ */ | ||
406 | |||
407 | /* | ||
408 | * Trigger Type | ||
409 | */ | ||
410 | #define PPC_BREAKPOINT_TRIGGER_EXECUTE 0x00000001 | ||
411 | #define PPC_BREAKPOINT_TRIGGER_READ 0x00000002 | ||
412 | #define PPC_BREAKPOINT_TRIGGER_WRITE 0x00000004 | ||
413 | #define PPC_BREAKPOINT_TRIGGER_RW \ | ||
414 | (PPC_BREAKPOINT_TRIGGER_READ | PPC_BREAKPOINT_TRIGGER_WRITE) | ||
415 | |||
416 | /* | ||
417 | * Address Mode | ||
418 | */ | ||
419 | #define PPC_BREAKPOINT_MODE_EXACT 0x00000000 | ||
420 | #define PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE 0x00000001 | ||
421 | #define PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE 0x00000002 | ||
422 | #define PPC_BREAKPOINT_MODE_MASK 0x00000003 | ||
423 | |||
424 | /* | ||
425 | * Condition Mode | ||
426 | */ | ||
427 | #define PPC_BREAKPOINT_CONDITION_MODE 0x00000003 | ||
428 | #define PPC_BREAKPOINT_CONDITION_NONE 0x00000000 | ||
429 | #define PPC_BREAKPOINT_CONDITION_AND 0x00000001 | ||
430 | #define PPC_BREAKPOINT_CONDITION_EXACT PPC_BREAKPOINT_CONDITION_AND | ||
431 | #define PPC_BREAKPOINT_CONDITION_OR 0x00000002 | ||
432 | #define PPC_BREAKPOINT_CONDITION_AND_OR 0x00000003 | ||
433 | #define PPC_BREAKPOINT_CONDITION_BE_ALL 0x00ff0000 | ||
434 | #define PPC_BREAKPOINT_CONDITION_BE_SHIFT 16 | ||
435 | #define PPC_BREAKPOINT_CONDITION_BE(n) \ | ||
436 | (1<<((n)+PPC_BREAKPOINT_CONDITION_BE_SHIFT)) | ||
437 | |||
438 | #endif /* _ASM_POWERPC_PTRACE_H */ | 204 | #endif /* _ASM_POWERPC_PTRACE_H */ |
diff --git a/arch/powerpc/include/asm/signal.h b/arch/powerpc/include/asm/signal.h index 3eb13be11d8..189998bb61c 100644 --- a/arch/powerpc/include/asm/signal.h +++ b/arch/powerpc/include/asm/signal.h | |||
@@ -1,149 +1,8 @@ | |||
1 | #ifndef _ASM_POWERPC_SIGNAL_H | 1 | #ifndef _ASM_POWERPC_SIGNAL_H |
2 | #define _ASM_POWERPC_SIGNAL_H | 2 | #define _ASM_POWERPC_SIGNAL_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <uapi/asm/signal.h> |
5 | 5 | ||
6 | #define _NSIG 64 | ||
7 | #ifdef __powerpc64__ | ||
8 | #define _NSIG_BPW 64 | ||
9 | #else | ||
10 | #define _NSIG_BPW 32 | ||
11 | #endif | ||
12 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | ||
13 | |||
14 | typedef unsigned long old_sigset_t; /* at least 32 bits */ | ||
15 | |||
16 | typedef struct { | ||
17 | unsigned long sig[_NSIG_WORDS]; | ||
18 | } sigset_t; | ||
19 | |||
20 | #define SIGHUP 1 | ||
21 | #define SIGINT 2 | ||
22 | #define SIGQUIT 3 | ||
23 | #define SIGILL 4 | ||
24 | #define SIGTRAP 5 | ||
25 | #define SIGABRT 6 | ||
26 | #define SIGIOT 6 | ||
27 | #define SIGBUS 7 | ||
28 | #define SIGFPE 8 | ||
29 | #define SIGKILL 9 | ||
30 | #define SIGUSR1 10 | ||
31 | #define SIGSEGV 11 | ||
32 | #define SIGUSR2 12 | ||
33 | #define SIGPIPE 13 | ||
34 | #define SIGALRM 14 | ||
35 | #define SIGTERM 15 | ||
36 | #define SIGSTKFLT 16 | ||
37 | #define SIGCHLD 17 | ||
38 | #define SIGCONT 18 | ||
39 | #define SIGSTOP 19 | ||
40 | #define SIGTSTP 20 | ||
41 | #define SIGTTIN 21 | ||
42 | #define SIGTTOU 22 | ||
43 | #define SIGURG 23 | ||
44 | #define SIGXCPU 24 | ||
45 | #define SIGXFSZ 25 | ||
46 | #define SIGVTALRM 26 | ||
47 | #define SIGPROF 27 | ||
48 | #define SIGWINCH 28 | ||
49 | #define SIGIO 29 | ||
50 | #define SIGPOLL SIGIO | ||
51 | /* | ||
52 | #define SIGLOST 29 | ||
53 | */ | ||
54 | #define SIGPWR 30 | ||
55 | #define SIGSYS 31 | ||
56 | #define SIGUNUSED 31 | ||
57 | |||
58 | /* These should not be considered constants from userland. */ | ||
59 | #define SIGRTMIN 32 | ||
60 | #define SIGRTMAX _NSIG | ||
61 | |||
62 | /* | ||
63 | * SA_FLAGS values: | ||
64 | * | ||
65 | * SA_ONSTACK is not currently supported, but will allow sigaltstack(2). | ||
66 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
67 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
68 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
69 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
70 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
71 | * | ||
72 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
73 | * Unix names RESETHAND and NODEFER respectively. | ||
74 | */ | ||
75 | #define SA_NOCLDSTOP 0x00000001U | ||
76 | #define SA_NOCLDWAIT 0x00000002U | ||
77 | #define SA_SIGINFO 0x00000004U | ||
78 | #define SA_ONSTACK 0x08000000U | ||
79 | #define SA_RESTART 0x10000000U | ||
80 | #define SA_NODEFER 0x40000000U | ||
81 | #define SA_RESETHAND 0x80000000U | ||
82 | |||
83 | #define SA_NOMASK SA_NODEFER | ||
84 | #define SA_ONESHOT SA_RESETHAND | ||
85 | |||
86 | #define SA_RESTORER 0x04000000U | ||
87 | |||
88 | /* | ||
89 | * sigaltstack controls | ||
90 | */ | ||
91 | #define SS_ONSTACK 1 | ||
92 | #define SS_DISABLE 2 | ||
93 | |||
94 | #define MINSIGSTKSZ 2048 | ||
95 | #define SIGSTKSZ 8192 | ||
96 | |||
97 | #include <asm-generic/signal-defs.h> | ||
98 | |||
99 | struct old_sigaction { | ||
100 | __sighandler_t sa_handler; | ||
101 | old_sigset_t sa_mask; | ||
102 | unsigned long sa_flags; | ||
103 | __sigrestore_t sa_restorer; | ||
104 | }; | ||
105 | |||
106 | struct sigaction { | ||
107 | __sighandler_t sa_handler; | ||
108 | unsigned long sa_flags; | ||
109 | __sigrestore_t sa_restorer; | ||
110 | sigset_t sa_mask; /* mask last for extensibility */ | ||
111 | }; | ||
112 | |||
113 | struct k_sigaction { | ||
114 | struct sigaction sa; | ||
115 | }; | ||
116 | |||
117 | typedef struct sigaltstack { | ||
118 | void __user *ss_sp; | ||
119 | int ss_flags; | ||
120 | size_t ss_size; | ||
121 | } stack_t; | ||
122 | |||
123 | #ifdef __KERNEL__ | ||
124 | struct pt_regs; | 6 | struct pt_regs; |
125 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | 7 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
126 | #endif /* __KERNEL__ */ | ||
127 | |||
128 | #ifndef __powerpc64__ | ||
129 | /* | ||
130 | * These are parameters to dbg_sigreturn syscall. They enable or | ||
131 | * disable certain debugging things that can be done from signal | ||
132 | * handlers. The dbg_sigreturn syscall *must* be called from a | ||
133 | * SA_SIGINFO signal so the ucontext can be passed to it. It takes an | ||
134 | * array of struct sig_dbg_op, which has the debug operations to | ||
135 | * perform before returning from the signal. | ||
136 | */ | ||
137 | struct sig_dbg_op { | ||
138 | int dbg_type; | ||
139 | unsigned long dbg_value; | ||
140 | }; | ||
141 | |||
142 | /* Enable or disable single-stepping. The value sets the state. */ | ||
143 | #define SIG_DBG_SINGLE_STEPPING 1 | ||
144 | |||
145 | /* Enable or disable branch tracing. The value sets the state. */ | ||
146 | #define SIG_DBG_BRANCH_TRACING 2 | ||
147 | #endif /* ! __powerpc64__ */ | ||
148 | |||
149 | #endif /* _ASM_POWERPC_SIGNAL_H */ | 8 | #endif /* _ASM_POWERPC_SIGNAL_H */ |
diff --git a/arch/powerpc/include/asm/spu_info.h b/arch/powerpc/include/asm/spu_info.h index 1286c823f0d..7146b78e40f 100644 --- a/arch/powerpc/include/asm/spu_info.h +++ b/arch/powerpc/include/asm/spu_info.h | |||
@@ -19,37 +19,10 @@ | |||
19 | * along with this program; if not, write to the Free Software | 19 | * along with this program; if not, write to the Free Software |
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 21 | */ |
22 | |||
23 | #ifndef _SPU_INFO_H | 22 | #ifndef _SPU_INFO_H |
24 | #define _SPU_INFO_H | 23 | #define _SPU_INFO_H |
25 | 24 | ||
26 | #include <linux/types.h> | ||
27 | |||
28 | #ifdef __KERNEL__ | ||
29 | #include <asm/spu.h> | 25 | #include <asm/spu.h> |
30 | #else | 26 | #include <uapi/asm/spu_info.h> |
31 | struct mfc_cq_sr { | ||
32 | __u64 mfc_cq_data0_RW; | ||
33 | __u64 mfc_cq_data1_RW; | ||
34 | __u64 mfc_cq_data2_RW; | ||
35 | __u64 mfc_cq_data3_RW; | ||
36 | }; | ||
37 | #endif /* __KERNEL__ */ | ||
38 | |||
39 | struct spu_dma_info { | ||
40 | __u64 dma_info_type; | ||
41 | __u64 dma_info_mask; | ||
42 | __u64 dma_info_status; | ||
43 | __u64 dma_info_stall_and_notify; | ||
44 | __u64 dma_info_atomic_command_status; | ||
45 | struct mfc_cq_sr dma_info_command_data[16]; | ||
46 | }; | ||
47 | |||
48 | struct spu_proxydma_info { | ||
49 | __u64 proxydma_info_type; | ||
50 | __u64 proxydma_info_mask; | ||
51 | __u64 proxydma_info_status; | ||
52 | struct mfc_cq_sr proxydma_info_command_data[8]; | ||
53 | }; | ||
54 | 27 | ||
55 | #endif | 28 | #endif |
diff --git a/arch/powerpc/include/asm/swab.h b/arch/powerpc/include/asm/swab.h index c581e3ef73e..b9bd1ca944d 100644 --- a/arch/powerpc/include/asm/swab.h +++ b/arch/powerpc/include/asm/swab.h | |||
@@ -1,24 +1,18 @@ | |||
1 | #ifndef _ASM_POWERPC_SWAB_H | ||
2 | #define _ASM_POWERPC_SWAB_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * This program is free software; you can redistribute it and/or | 2 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public License | 3 | * modify it under the terms of the GNU General Public License |
7 | * as published by the Free Software Foundation; either version | 4 | * as published by the Free Software Foundation; either version |
8 | * 2 of the License, or (at your option) any later version. | 5 | * 2 of the License, or (at your option) any later version. |
9 | */ | 6 | */ |
7 | #ifndef _ASM_POWERPC_SWAB_H | ||
8 | #define _ASM_POWERPC_SWAB_H | ||
10 | 9 | ||
11 | #include <linux/types.h> | 10 | #include <uapi/asm/swab.h> |
12 | #include <linux/compiler.h> | ||
13 | 11 | ||
14 | #ifdef __GNUC__ | 12 | #ifdef __GNUC__ |
15 | |||
16 | #ifndef __powerpc64__ | 13 | #ifndef __powerpc64__ |
17 | #define __SWAB_64_THRU_32__ | ||
18 | #endif /* __powerpc64__ */ | 14 | #endif /* __powerpc64__ */ |
19 | 15 | ||
20 | #ifdef __KERNEL__ | ||
21 | |||
22 | static __inline__ __u16 ld_le16(const volatile __u16 *addr) | 16 | static __inline__ __u16 ld_le16(const volatile __u16 *addr) |
23 | { | 17 | { |
24 | __u16 val; | 18 | __u16 val; |
@@ -83,8 +77,5 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 value) | |||
83 | } | 77 | } |
84 | #define __arch_swab32 __arch_swab32 | 78 | #define __arch_swab32 __arch_swab32 |
85 | 79 | ||
86 | #endif /* __KERNEL__ */ | ||
87 | |||
88 | #endif /* __GNUC__ */ | 80 | #endif /* __GNUC__ */ |
89 | |||
90 | #endif /* _ASM_POWERPC_SWAB_H */ | 81 | #endif /* _ASM_POWERPC_SWAB_H */ |
diff --git a/arch/powerpc/include/asm/syscalls.h b/arch/powerpc/include/asm/syscalls.h index 4084e567d28..329db4ec12c 100644 --- a/arch/powerpc/include/asm/syscalls.h +++ b/arch/powerpc/include/asm/syscalls.h | |||
@@ -17,9 +17,6 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, | |||
17 | asmlinkage unsigned long sys_mmap2(unsigned long addr, size_t len, | 17 | asmlinkage unsigned long sys_mmap2(unsigned long addr, size_t len, |
18 | unsigned long prot, unsigned long flags, | 18 | unsigned long prot, unsigned long flags, |
19 | unsigned long fd, unsigned long pgoff); | 19 | unsigned long fd, unsigned long pgoff); |
20 | asmlinkage int sys_execve(unsigned long a0, unsigned long a1, | ||
21 | unsigned long a2, unsigned long a3, unsigned long a4, | ||
22 | unsigned long a5, struct pt_regs *regs); | ||
23 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long usp, | 20 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long usp, |
24 | int __user *parent_tidp, void __user *child_threadptr, | 21 | int __user *parent_tidp, void __user *child_threadptr, |
25 | int __user *child_tidp, int p6, struct pt_regs *regs); | 22 | int __user *child_tidp, int p6, struct pt_regs *regs); |
diff --git a/arch/powerpc/include/asm/termios.h b/arch/powerpc/include/asm/termios.h index a24f48704a3..b8353e2032d 100644 --- a/arch/powerpc/include/asm/termios.h +++ b/arch/powerpc/include/asm/termios.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifndef _ASM_POWERPC_TERMIOS_H | ||
2 | #define _ASM_POWERPC_TERMIOS_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Liberally adapted from alpha/termios.h. In particular, the c_cc[] | 2 | * Liberally adapted from alpha/termios.h. In particular, the c_cc[] |
6 | * fields have been reordered so that termio & termios share the | 3 | * fields have been reordered so that termio & termios share the |
@@ -12,74 +9,14 @@ | |||
12 | * as published by the Free Software Foundation; either version | 9 | * as published by the Free Software Foundation; either version |
13 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
14 | */ | 11 | */ |
12 | #ifndef _ASM_POWERPC_TERMIOS_H | ||
13 | #define _ASM_POWERPC_TERMIOS_H | ||
15 | 14 | ||
16 | #include <asm/ioctls.h> | 15 | #include <uapi/asm/termios.h> |
17 | #include <asm/termbits.h> | ||
18 | |||
19 | struct sgttyb { | ||
20 | char sg_ispeed; | ||
21 | char sg_ospeed; | ||
22 | char sg_erase; | ||
23 | char sg_kill; | ||
24 | short sg_flags; | ||
25 | }; | ||
26 | |||
27 | struct tchars { | ||
28 | char t_intrc; | ||
29 | char t_quitc; | ||
30 | char t_startc; | ||
31 | char t_stopc; | ||
32 | char t_eofc; | ||
33 | char t_brkc; | ||
34 | }; | ||
35 | |||
36 | struct ltchars { | ||
37 | char t_suspc; | ||
38 | char t_dsuspc; | ||
39 | char t_rprntc; | ||
40 | char t_flushc; | ||
41 | char t_werasc; | ||
42 | char t_lnextc; | ||
43 | }; | ||
44 | |||
45 | struct winsize { | ||
46 | unsigned short ws_row; | ||
47 | unsigned short ws_col; | ||
48 | unsigned short ws_xpixel; | ||
49 | unsigned short ws_ypixel; | ||
50 | }; | ||
51 | |||
52 | #define NCC 10 | ||
53 | struct termio { | ||
54 | unsigned short c_iflag; /* input mode flags */ | ||
55 | unsigned short c_oflag; /* output mode flags */ | ||
56 | unsigned short c_cflag; /* control mode flags */ | ||
57 | unsigned short c_lflag; /* local mode flags */ | ||
58 | unsigned char c_line; /* line discipline */ | ||
59 | unsigned char c_cc[NCC]; /* control characters */ | ||
60 | }; | ||
61 | |||
62 | /* c_cc characters */ | ||
63 | #define _VINTR 0 | ||
64 | #define _VQUIT 1 | ||
65 | #define _VERASE 2 | ||
66 | #define _VKILL 3 | ||
67 | #define _VEOF 4 | ||
68 | #define _VMIN 5 | ||
69 | #define _VEOL 6 | ||
70 | #define _VTIME 7 | ||
71 | #define _VEOL2 8 | ||
72 | #define _VSWTC 9 | ||
73 | 16 | ||
74 | #ifdef __KERNEL__ | ||
75 | /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ | 17 | /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ |
76 | #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" | 18 | #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" |
77 | #endif | ||
78 | |||
79 | #ifdef __KERNEL__ | ||
80 | 19 | ||
81 | #include <asm-generic/termios-base.h> | 20 | #include <asm-generic/termios-base.h> |
82 | 21 | ||
83 | #endif /* __KERNEL__ */ | ||
84 | |||
85 | #endif /* _ASM_POWERPC_TERMIOS_H */ | 22 | #endif /* _ASM_POWERPC_TERMIOS_H */ |
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 8ceea14d6fe..406b7b9a134 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h | |||
@@ -182,6 +182,8 @@ static inline bool test_thread_local_flags(unsigned int flags) | |||
182 | #define is_32bit_task() (1) | 182 | #define is_32bit_task() (1) |
183 | #endif | 183 | #endif |
184 | 184 | ||
185 | #define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) | ||
186 | |||
185 | #endif /* !__ASSEMBLY__ */ | 187 | #endif /* !__ASSEMBLY__ */ |
186 | 188 | ||
187 | #endif /* __KERNEL__ */ | 189 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h index 0abf7f2c6df..bfb6ded38ff 100644 --- a/arch/powerpc/include/asm/types.h +++ b/arch/powerpc/include/asm/types.h | |||
@@ -1,22 +1,3 @@ | |||
1 | #ifndef _ASM_POWERPC_TYPES_H | ||
2 | #define _ASM_POWERPC_TYPES_H | ||
3 | |||
4 | /* | ||
5 | * This is here because we used to use l64 for 64bit powerpc | ||
6 | * and we don't want to impact user mode with our change to ll64 | ||
7 | * in the kernel. | ||
8 | * | ||
9 | * However, some user programs are fine with this. They can | ||
10 | * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here. | ||
11 | */ | ||
12 | #if !defined(__SANE_USERSPACE_TYPES__) && defined(__powerpc64__) && !defined(__KERNEL__) | ||
13 | # include <asm-generic/int-l64.h> | ||
14 | #else | ||
15 | # include <asm-generic/int-ll64.h> | ||
16 | #endif | ||
17 | |||
18 | #ifndef __ASSEMBLY__ | ||
19 | |||
20 | /* | 1 | /* |
21 | * This file is never included by application software unless | 2 | * This file is never included by application software unless |
22 | * explicitly requested (e.g., via linux/types.h) in which case the | 3 | * explicitly requested (e.g., via linux/types.h) in which case the |
@@ -29,14 +10,11 @@ | |||
29 | * as published by the Free Software Foundation; either version | 10 | * as published by the Free Software Foundation; either version |
30 | * 2 of the License, or (at your option) any later version. | 11 | * 2 of the License, or (at your option) any later version. |
31 | */ | 12 | */ |
13 | #ifndef _ASM_POWERPC_TYPES_H | ||
14 | #define _ASM_POWERPC_TYPES_H | ||
32 | 15 | ||
33 | typedef struct { | 16 | #include <uapi/asm/types.h> |
34 | __u32 u[4]; | ||
35 | } __attribute__((aligned(16))) __vector128; | ||
36 | |||
37 | #endif /* __ASSEMBLY__ */ | ||
38 | 17 | ||
39 | #ifdef __KERNEL__ | ||
40 | #ifndef __ASSEMBLY__ | 18 | #ifndef __ASSEMBLY__ |
41 | 19 | ||
42 | typedef __vector128 vector128; | 20 | typedef __vector128 vector128; |
@@ -49,6 +27,4 @@ typedef struct { | |||
49 | 27 | ||
50 | #endif /* __ASSEMBLY__ */ | 28 | #endif /* __ASSEMBLY__ */ |
51 | 29 | ||
52 | #endif /* __KERNEL__ */ | ||
53 | |||
54 | #endif /* _ASM_POWERPC_TYPES_H */ | 30 | #endif /* _ASM_POWERPC_TYPES_H */ |
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index c683fa350ad..921dce6d844 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifndef _ASM_POWERPC_UNISTD_H_ | ||
2 | #define _ASM_POWERPC_UNISTD_H_ | ||
3 | |||
4 | /* | 1 | /* |
5 | * This file contains the system call numbers. | 2 | * This file contains the system call numbers. |
6 | * | 3 | * |
@@ -9,374 +6,11 @@ | |||
9 | * as published by the Free Software Foundation; either version | 6 | * as published by the Free Software Foundation; either version |
10 | * 2 of the License, or (at your option) any later version. | 7 | * 2 of the License, or (at your option) any later version. |
11 | */ | 8 | */ |
9 | #ifndef _ASM_POWERPC_UNISTD_H_ | ||
10 | #define _ASM_POWERPC_UNISTD_H_ | ||
12 | 11 | ||
13 | #define __NR_restart_syscall 0 | 12 | #include <uapi/asm/unistd.h> |
14 | #define __NR_exit 1 | ||
15 | #define __NR_fork 2 | ||
16 | #define __NR_read 3 | ||
17 | #define __NR_write 4 | ||
18 | #define __NR_open 5 | ||
19 | #define __NR_close 6 | ||
20 | #define __NR_waitpid 7 | ||
21 | #define __NR_creat 8 | ||
22 | #define __NR_link 9 | ||
23 | #define __NR_unlink 10 | ||
24 | #define __NR_execve 11 | ||
25 | #define __NR_chdir 12 | ||
26 | #define __NR_time 13 | ||
27 | #define __NR_mknod 14 | ||
28 | #define __NR_chmod 15 | ||
29 | #define __NR_lchown 16 | ||
30 | #define __NR_break 17 | ||
31 | #define __NR_oldstat 18 | ||
32 | #define __NR_lseek 19 | ||
33 | #define __NR_getpid 20 | ||
34 | #define __NR_mount 21 | ||
35 | #define __NR_umount 22 | ||
36 | #define __NR_setuid 23 | ||
37 | #define __NR_getuid 24 | ||
38 | #define __NR_stime 25 | ||
39 | #define __NR_ptrace 26 | ||
40 | #define __NR_alarm 27 | ||
41 | #define __NR_oldfstat 28 | ||
42 | #define __NR_pause 29 | ||
43 | #define __NR_utime 30 | ||
44 | #define __NR_stty 31 | ||
45 | #define __NR_gtty 32 | ||
46 | #define __NR_access 33 | ||
47 | #define __NR_nice 34 | ||
48 | #define __NR_ftime 35 | ||
49 | #define __NR_sync 36 | ||
50 | #define __NR_kill 37 | ||
51 | #define __NR_rename 38 | ||
52 | #define __NR_mkdir 39 | ||
53 | #define __NR_rmdir 40 | ||
54 | #define __NR_dup 41 | ||
55 | #define __NR_pipe 42 | ||
56 | #define __NR_times 43 | ||
57 | #define __NR_prof 44 | ||
58 | #define __NR_brk 45 | ||
59 | #define __NR_setgid 46 | ||
60 | #define __NR_getgid 47 | ||
61 | #define __NR_signal 48 | ||
62 | #define __NR_geteuid 49 | ||
63 | #define __NR_getegid 50 | ||
64 | #define __NR_acct 51 | ||
65 | #define __NR_umount2 52 | ||
66 | #define __NR_lock 53 | ||
67 | #define __NR_ioctl 54 | ||
68 | #define __NR_fcntl 55 | ||
69 | #define __NR_mpx 56 | ||
70 | #define __NR_setpgid 57 | ||
71 | #define __NR_ulimit 58 | ||
72 | #define __NR_oldolduname 59 | ||
73 | #define __NR_umask 60 | ||
74 | #define __NR_chroot 61 | ||
75 | #define __NR_ustat 62 | ||
76 | #define __NR_dup2 63 | ||
77 | #define __NR_getppid 64 | ||
78 | #define __NR_getpgrp 65 | ||
79 | #define __NR_setsid 66 | ||
80 | #define __NR_sigaction 67 | ||
81 | #define __NR_sgetmask 68 | ||
82 | #define __NR_ssetmask 69 | ||
83 | #define __NR_setreuid 70 | ||
84 | #define __NR_setregid 71 | ||
85 | #define __NR_sigsuspend 72 | ||
86 | #define __NR_sigpending 73 | ||
87 | #define __NR_sethostname 74 | ||
88 | #define __NR_setrlimit 75 | ||
89 | #define __NR_getrlimit 76 | ||
90 | #define __NR_getrusage 77 | ||
91 | #define __NR_gettimeofday 78 | ||
92 | #define __NR_settimeofday 79 | ||
93 | #define __NR_getgroups 80 | ||
94 | #define __NR_setgroups 81 | ||
95 | #define __NR_select 82 | ||
96 | #define __NR_symlink 83 | ||
97 | #define __NR_oldlstat 84 | ||
98 | #define __NR_readlink 85 | ||
99 | #define __NR_uselib 86 | ||
100 | #define __NR_swapon 87 | ||
101 | #define __NR_reboot 88 | ||
102 | #define __NR_readdir 89 | ||
103 | #define __NR_mmap 90 | ||
104 | #define __NR_munmap 91 | ||
105 | #define __NR_truncate 92 | ||
106 | #define __NR_ftruncate 93 | ||
107 | #define __NR_fchmod 94 | ||
108 | #define __NR_fchown 95 | ||
109 | #define __NR_getpriority 96 | ||
110 | #define __NR_setpriority 97 | ||
111 | #define __NR_profil 98 | ||
112 | #define __NR_statfs 99 | ||
113 | #define __NR_fstatfs 100 | ||
114 | #define __NR_ioperm 101 | ||
115 | #define __NR_socketcall 102 | ||
116 | #define __NR_syslog 103 | ||
117 | #define __NR_setitimer 104 | ||
118 | #define __NR_getitimer 105 | ||
119 | #define __NR_stat 106 | ||
120 | #define __NR_lstat 107 | ||
121 | #define __NR_fstat 108 | ||
122 | #define __NR_olduname 109 | ||
123 | #define __NR_iopl 110 | ||
124 | #define __NR_vhangup 111 | ||
125 | #define __NR_idle 112 | ||
126 | #define __NR_vm86 113 | ||
127 | #define __NR_wait4 114 | ||
128 | #define __NR_swapoff 115 | ||
129 | #define __NR_sysinfo 116 | ||
130 | #define __NR_ipc 117 | ||
131 | #define __NR_fsync 118 | ||
132 | #define __NR_sigreturn 119 | ||
133 | #define __NR_clone 120 | ||
134 | #define __NR_setdomainname 121 | ||
135 | #define __NR_uname 122 | ||
136 | #define __NR_modify_ldt 123 | ||
137 | #define __NR_adjtimex 124 | ||
138 | #define __NR_mprotect 125 | ||
139 | #define __NR_sigprocmask 126 | ||
140 | #define __NR_create_module 127 | ||
141 | #define __NR_init_module 128 | ||
142 | #define __NR_delete_module 129 | ||
143 | #define __NR_get_kernel_syms 130 | ||
144 | #define __NR_quotactl 131 | ||
145 | #define __NR_getpgid 132 | ||
146 | #define __NR_fchdir 133 | ||
147 | #define __NR_bdflush 134 | ||
148 | #define __NR_sysfs 135 | ||
149 | #define __NR_personality 136 | ||
150 | #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ | ||
151 | #define __NR_setfsuid 138 | ||
152 | #define __NR_setfsgid 139 | ||
153 | #define __NR__llseek 140 | ||
154 | #define __NR_getdents 141 | ||
155 | #define __NR__newselect 142 | ||
156 | #define __NR_flock 143 | ||
157 | #define __NR_msync 144 | ||
158 | #define __NR_readv 145 | ||
159 | #define __NR_writev 146 | ||
160 | #define __NR_getsid 147 | ||
161 | #define __NR_fdatasync 148 | ||
162 | #define __NR__sysctl 149 | ||
163 | #define __NR_mlock 150 | ||
164 | #define __NR_munlock 151 | ||
165 | #define __NR_mlockall 152 | ||
166 | #define __NR_munlockall 153 | ||
167 | #define __NR_sched_setparam 154 | ||
168 | #define __NR_sched_getparam 155 | ||
169 | #define __NR_sched_setscheduler 156 | ||
170 | #define __NR_sched_getscheduler 157 | ||
171 | #define __NR_sched_yield 158 | ||
172 | #define __NR_sched_get_priority_max 159 | ||
173 | #define __NR_sched_get_priority_min 160 | ||
174 | #define __NR_sched_rr_get_interval 161 | ||
175 | #define __NR_nanosleep 162 | ||
176 | #define __NR_mremap 163 | ||
177 | #define __NR_setresuid 164 | ||
178 | #define __NR_getresuid 165 | ||
179 | #define __NR_query_module 166 | ||
180 | #define __NR_poll 167 | ||
181 | #define __NR_nfsservctl 168 | ||
182 | #define __NR_setresgid 169 | ||
183 | #define __NR_getresgid 170 | ||
184 | #define __NR_prctl 171 | ||
185 | #define __NR_rt_sigreturn 172 | ||
186 | #define __NR_rt_sigaction 173 | ||
187 | #define __NR_rt_sigprocmask 174 | ||
188 | #define __NR_rt_sigpending 175 | ||
189 | #define __NR_rt_sigtimedwait 176 | ||
190 | #define __NR_rt_sigqueueinfo 177 | ||
191 | #define __NR_rt_sigsuspend 178 | ||
192 | #define __NR_pread64 179 | ||
193 | #define __NR_pwrite64 180 | ||
194 | #define __NR_chown 181 | ||
195 | #define __NR_getcwd 182 | ||
196 | #define __NR_capget 183 | ||
197 | #define __NR_capset 184 | ||
198 | #define __NR_sigaltstack 185 | ||
199 | #define __NR_sendfile 186 | ||
200 | #define __NR_getpmsg 187 /* some people actually want streams */ | ||
201 | #define __NR_putpmsg 188 /* some people actually want streams */ | ||
202 | #define __NR_vfork 189 | ||
203 | #define __NR_ugetrlimit 190 /* SuS compliant getrlimit */ | ||
204 | #define __NR_readahead 191 | ||
205 | #ifndef __powerpc64__ /* these are 32-bit only */ | ||
206 | #define __NR_mmap2 192 | ||
207 | #define __NR_truncate64 193 | ||
208 | #define __NR_ftruncate64 194 | ||
209 | #define __NR_stat64 195 | ||
210 | #define __NR_lstat64 196 | ||
211 | #define __NR_fstat64 197 | ||
212 | #endif | ||
213 | #define __NR_pciconfig_read 198 | ||
214 | #define __NR_pciconfig_write 199 | ||
215 | #define __NR_pciconfig_iobase 200 | ||
216 | #define __NR_multiplexer 201 | ||
217 | #define __NR_getdents64 202 | ||
218 | #define __NR_pivot_root 203 | ||
219 | #ifndef __powerpc64__ | ||
220 | #define __NR_fcntl64 204 | ||
221 | #endif | ||
222 | #define __NR_madvise 205 | ||
223 | #define __NR_mincore 206 | ||
224 | #define __NR_gettid 207 | ||
225 | #define __NR_tkill 208 | ||
226 | #define __NR_setxattr 209 | ||
227 | #define __NR_lsetxattr 210 | ||
228 | #define __NR_fsetxattr 211 | ||
229 | #define __NR_getxattr 212 | ||
230 | #define __NR_lgetxattr 213 | ||
231 | #define __NR_fgetxattr 214 | ||
232 | #define __NR_listxattr 215 | ||
233 | #define __NR_llistxattr 216 | ||
234 | #define __NR_flistxattr 217 | ||
235 | #define __NR_removexattr 218 | ||
236 | #define __NR_lremovexattr 219 | ||
237 | #define __NR_fremovexattr 220 | ||
238 | #define __NR_futex 221 | ||
239 | #define __NR_sched_setaffinity 222 | ||
240 | #define __NR_sched_getaffinity 223 | ||
241 | /* 224 currently unused */ | ||
242 | #define __NR_tuxcall 225 | ||
243 | #ifndef __powerpc64__ | ||
244 | #define __NR_sendfile64 226 | ||
245 | #endif | ||
246 | #define __NR_io_setup 227 | ||
247 | #define __NR_io_destroy 228 | ||
248 | #define __NR_io_getevents 229 | ||
249 | #define __NR_io_submit 230 | ||
250 | #define __NR_io_cancel 231 | ||
251 | #define __NR_set_tid_address 232 | ||
252 | #define __NR_fadvise64 233 | ||
253 | #define __NR_exit_group 234 | ||
254 | #define __NR_lookup_dcookie 235 | ||
255 | #define __NR_epoll_create 236 | ||
256 | #define __NR_epoll_ctl 237 | ||
257 | #define __NR_epoll_wait 238 | ||
258 | #define __NR_remap_file_pages 239 | ||
259 | #define __NR_timer_create 240 | ||
260 | #define __NR_timer_settime 241 | ||
261 | #define __NR_timer_gettime 242 | ||
262 | #define __NR_timer_getoverrun 243 | ||
263 | #define __NR_timer_delete 244 | ||
264 | #define __NR_clock_settime 245 | ||
265 | #define __NR_clock_gettime 246 | ||
266 | #define __NR_clock_getres 247 | ||
267 | #define __NR_clock_nanosleep 248 | ||
268 | #define __NR_swapcontext 249 | ||
269 | #define __NR_tgkill 250 | ||
270 | #define __NR_utimes 251 | ||
271 | #define __NR_statfs64 252 | ||
272 | #define __NR_fstatfs64 253 | ||
273 | #ifndef __powerpc64__ | ||
274 | #define __NR_fadvise64_64 254 | ||
275 | #endif | ||
276 | #define __NR_rtas 255 | ||
277 | #define __NR_sys_debug_setcontext 256 | ||
278 | /* Number 257 is reserved for vserver */ | ||
279 | #define __NR_migrate_pages 258 | ||
280 | #define __NR_mbind 259 | ||
281 | #define __NR_get_mempolicy 260 | ||
282 | #define __NR_set_mempolicy 261 | ||
283 | #define __NR_mq_open 262 | ||
284 | #define __NR_mq_unlink 263 | ||
285 | #define __NR_mq_timedsend 264 | ||
286 | #define __NR_mq_timedreceive 265 | ||
287 | #define __NR_mq_notify 266 | ||
288 | #define __NR_mq_getsetattr 267 | ||
289 | #define __NR_kexec_load 268 | ||
290 | #define __NR_add_key 269 | ||
291 | #define __NR_request_key 270 | ||
292 | #define __NR_keyctl 271 | ||
293 | #define __NR_waitid 272 | ||
294 | #define __NR_ioprio_set 273 | ||
295 | #define __NR_ioprio_get 274 | ||
296 | #define __NR_inotify_init 275 | ||
297 | #define __NR_inotify_add_watch 276 | ||
298 | #define __NR_inotify_rm_watch 277 | ||
299 | #define __NR_spu_run 278 | ||
300 | #define __NR_spu_create 279 | ||
301 | #define __NR_pselect6 280 | ||
302 | #define __NR_ppoll 281 | ||
303 | #define __NR_unshare 282 | ||
304 | #define __NR_splice 283 | ||
305 | #define __NR_tee 284 | ||
306 | #define __NR_vmsplice 285 | ||
307 | #define __NR_openat 286 | ||
308 | #define __NR_mkdirat 287 | ||
309 | #define __NR_mknodat 288 | ||
310 | #define __NR_fchownat 289 | ||
311 | #define __NR_futimesat 290 | ||
312 | #ifdef __powerpc64__ | ||
313 | #define __NR_newfstatat 291 | ||
314 | #else | ||
315 | #define __NR_fstatat64 291 | ||
316 | #endif | ||
317 | #define __NR_unlinkat 292 | ||
318 | #define __NR_renameat 293 | ||
319 | #define __NR_linkat 294 | ||
320 | #define __NR_symlinkat 295 | ||
321 | #define __NR_readlinkat 296 | ||
322 | #define __NR_fchmodat 297 | ||
323 | #define __NR_faccessat 298 | ||
324 | #define __NR_get_robust_list 299 | ||
325 | #define __NR_set_robust_list 300 | ||
326 | #define __NR_move_pages 301 | ||
327 | #define __NR_getcpu 302 | ||
328 | #define __NR_epoll_pwait 303 | ||
329 | #define __NR_utimensat 304 | ||
330 | #define __NR_signalfd 305 | ||
331 | #define __NR_timerfd_create 306 | ||
332 | #define __NR_eventfd 307 | ||
333 | #define __NR_sync_file_range2 308 | ||
334 | #define __NR_fallocate 309 | ||
335 | #define __NR_subpage_prot 310 | ||
336 | #define __NR_timerfd_settime 311 | ||
337 | #define __NR_timerfd_gettime 312 | ||
338 | #define __NR_signalfd4 313 | ||
339 | #define __NR_eventfd2 314 | ||
340 | #define __NR_epoll_create1 315 | ||
341 | #define __NR_dup3 316 | ||
342 | #define __NR_pipe2 317 | ||
343 | #define __NR_inotify_init1 318 | ||
344 | #define __NR_perf_event_open 319 | ||
345 | #define __NR_preadv 320 | ||
346 | #define __NR_pwritev 321 | ||
347 | #define __NR_rt_tgsigqueueinfo 322 | ||
348 | #define __NR_fanotify_init 323 | ||
349 | #define __NR_fanotify_mark 324 | ||
350 | #define __NR_prlimit64 325 | ||
351 | #define __NR_socket 326 | ||
352 | #define __NR_bind 327 | ||
353 | #define __NR_connect 328 | ||
354 | #define __NR_listen 329 | ||
355 | #define __NR_accept 330 | ||
356 | #define __NR_getsockname 331 | ||
357 | #define __NR_getpeername 332 | ||
358 | #define __NR_socketpair 333 | ||
359 | #define __NR_send 334 | ||
360 | #define __NR_sendto 335 | ||
361 | #define __NR_recv 336 | ||
362 | #define __NR_recvfrom 337 | ||
363 | #define __NR_shutdown 338 | ||
364 | #define __NR_setsockopt 339 | ||
365 | #define __NR_getsockopt 340 | ||
366 | #define __NR_sendmsg 341 | ||
367 | #define __NR_recvmsg 342 | ||
368 | #define __NR_recvmmsg 343 | ||
369 | #define __NR_accept4 344 | ||
370 | #define __NR_name_to_handle_at 345 | ||
371 | #define __NR_open_by_handle_at 346 | ||
372 | #define __NR_clock_adjtime 347 | ||
373 | #define __NR_syncfs 348 | ||
374 | #define __NR_sendmmsg 349 | ||
375 | #define __NR_setns 350 | ||
376 | #define __NR_process_vm_readv 351 | ||
377 | #define __NR_process_vm_writev 352 | ||
378 | 13 | ||
379 | #ifdef __KERNEL__ | ||
380 | 14 | ||
381 | #define __NR_syscalls 353 | 15 | #define __NR_syscalls 353 |
382 | 16 | ||
@@ -421,6 +55,8 @@ | |||
421 | #define __ARCH_WANT_SYS_NEWFSTATAT | 55 | #define __ARCH_WANT_SYS_NEWFSTATAT |
422 | #define __ARCH_WANT_COMPAT_SYS_SENDFILE | 56 | #define __ARCH_WANT_COMPAT_SYS_SENDFILE |
423 | #endif | 57 | #endif |
58 | #define __ARCH_WANT_SYS_EXECVE | ||
59 | #define __ARCH_WANT_KERNEL_EXECVE | ||
424 | 60 | ||
425 | /* | 61 | /* |
426 | * "Conditional" syscalls | 62 | * "Conditional" syscalls |
@@ -429,6 +65,4 @@ | |||
429 | asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall"))) | 65 | asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall"))) |
430 | 66 | ||
431 | #endif /* __ASSEMBLY__ */ | 67 | #endif /* __ASSEMBLY__ */ |
432 | #endif /* __KERNEL__ */ | ||
433 | |||
434 | #endif /* _ASM_POWERPC_UNISTD_H_ */ | 68 | #endif /* _ASM_POWERPC_UNISTD_H_ */ |
diff --git a/arch/powerpc/include/uapi/asm/Kbuild b/arch/powerpc/include/uapi/asm/Kbuild index baebb3da1d4..a33c3c03bb2 100644 --- a/arch/powerpc/include/uapi/asm/Kbuild +++ b/arch/powerpc/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,44 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += auxvec.h | ||
5 | header-y += bitsperlong.h | ||
6 | header-y += bootx.h | ||
7 | header-y += byteorder.h | ||
8 | header-y += cputable.h | ||
9 | header-y += elf.h | ||
10 | header-y += errno.h | ||
11 | header-y += fcntl.h | ||
12 | header-y += ioctl.h | ||
13 | header-y += ioctls.h | ||
14 | header-y += ipcbuf.h | ||
15 | header-y += kvm.h | ||
16 | header-y += kvm_para.h | ||
17 | header-y += linkage.h | ||
18 | header-y += mman.h | ||
19 | header-y += msgbuf.h | ||
20 | header-y += nvram.h | ||
21 | header-y += param.h | ||
22 | header-y += poll.h | ||
23 | header-y += posix_types.h | ||
24 | header-y += ps3fb.h | ||
25 | header-y += ptrace.h | ||
26 | header-y += resource.h | ||
27 | header-y += seccomp.h | ||
28 | header-y += sembuf.h | ||
29 | header-y += setup.h | ||
30 | header-y += shmbuf.h | ||
31 | header-y += sigcontext.h | ||
32 | header-y += siginfo.h | ||
33 | header-y += signal.h | ||
34 | header-y += socket.h | ||
35 | header-y += sockios.h | ||
36 | header-y += spu_info.h | ||
37 | header-y += stat.h | ||
38 | header-y += statfs.h | ||
39 | header-y += swab.h | ||
40 | header-y += termbits.h | ||
41 | header-y += termios.h | ||
42 | header-y += types.h | ||
43 | header-y += ucontext.h | ||
44 | header-y += unistd.h | ||
diff --git a/arch/powerpc/include/asm/auxvec.h b/arch/powerpc/include/uapi/asm/auxvec.h index ce17d2c9eb4..ce17d2c9eb4 100644 --- a/arch/powerpc/include/asm/auxvec.h +++ b/arch/powerpc/include/uapi/asm/auxvec.h | |||
diff --git a/arch/powerpc/include/asm/bitsperlong.h b/arch/powerpc/include/uapi/asm/bitsperlong.h index 5f1659032c4..5f1659032c4 100644 --- a/arch/powerpc/include/asm/bitsperlong.h +++ b/arch/powerpc/include/uapi/asm/bitsperlong.h | |||
diff --git a/arch/powerpc/include/uapi/asm/bootx.h b/arch/powerpc/include/uapi/asm/bootx.h new file mode 100644 index 00000000000..6e51cf0708a --- /dev/null +++ b/arch/powerpc/include/uapi/asm/bootx.h | |||
@@ -0,0 +1,132 @@ | |||
1 | /* | ||
2 | * This file describes the structure passed from the BootX application | ||
3 | * (for MacOS) when it is used to boot Linux. | ||
4 | * | ||
5 | * Written by Benjamin Herrenschmidt. | ||
6 | */ | ||
7 | |||
8 | |||
9 | #ifndef _UAPI__ASM_BOOTX_H__ | ||
10 | #define _UAPI__ASM_BOOTX_H__ | ||
11 | |||
12 | #include <linux/types.h> | ||
13 | |||
14 | #ifdef macintosh | ||
15 | #include <Types.h> | ||
16 | #include "linux_type_defs.h" | ||
17 | #endif | ||
18 | |||
19 | #ifdef macintosh | ||
20 | /* All this requires PowerPC alignment */ | ||
21 | #pragma options align=power | ||
22 | #endif | ||
23 | |||
24 | /* On kernel entry: | ||
25 | * | ||
26 | * r3 = 0x426f6f58 ('BooX') | ||
27 | * r4 = pointer to boot_infos | ||
28 | * r5 = NULL | ||
29 | * | ||
30 | * Data and instruction translation disabled, interrupts | ||
31 | * disabled, kernel loaded at physical 0x00000000 on PCI | ||
32 | * machines (will be different on NuBus). | ||
33 | */ | ||
34 | |||
35 | #define BOOT_INFO_VERSION 5 | ||
36 | #define BOOT_INFO_COMPATIBLE_VERSION 1 | ||
37 | |||
38 | /* Bit in the architecture flag mask. More to be defined in | ||
39 | future versions. Note that either BOOT_ARCH_PCI or | ||
40 | BOOT_ARCH_NUBUS is set. The other BOOT_ARCH_NUBUS_xxx are | ||
41 | set additionally when BOOT_ARCH_NUBUS is set. | ||
42 | */ | ||
43 | #define BOOT_ARCH_PCI 0x00000001UL | ||
44 | #define BOOT_ARCH_NUBUS 0x00000002UL | ||
45 | #define BOOT_ARCH_NUBUS_PDM 0x00000010UL | ||
46 | #define BOOT_ARCH_NUBUS_PERFORMA 0x00000020UL | ||
47 | #define BOOT_ARCH_NUBUS_POWERBOOK 0x00000040UL | ||
48 | |||
49 | /* Maximum number of ranges in phys memory map */ | ||
50 | #define MAX_MEM_MAP_SIZE 26 | ||
51 | |||
52 | /* This is the format of an element in the physical memory map. Note that | ||
53 | the map is optional and current BootX will only build it for pre-PCI | ||
54 | machines */ | ||
55 | typedef struct boot_info_map_entry | ||
56 | { | ||
57 | __u32 physAddr; /* Physical starting address */ | ||
58 | __u32 size; /* Size in bytes */ | ||
59 | } boot_info_map_entry_t; | ||
60 | |||
61 | |||
62 | /* Here are the boot informations that are passed to the bootstrap | ||
63 | * Note that the kernel arguments and the device tree are appended | ||
64 | * at the end of this structure. */ | ||
65 | typedef struct boot_infos | ||
66 | { | ||
67 | /* Version of this structure */ | ||
68 | __u32 version; | ||
69 | /* backward compatible down to version: */ | ||
70 | __u32 compatible_version; | ||
71 | |||
72 | /* NEW (vers. 2) this holds the current _logical_ base addr of | ||
73 | the frame buffer (for use by early boot message) */ | ||
74 | __u8* logicalDisplayBase; | ||
75 | |||
76 | /* NEW (vers. 4) Apple's machine identification */ | ||
77 | __u32 machineID; | ||
78 | |||
79 | /* NEW (vers. 4) Detected hw architecture */ | ||
80 | __u32 architecture; | ||
81 | |||
82 | /* The device tree (internal addresses relative to the beginning of the tree, | ||
83 | * device tree offset relative to the beginning of this structure). | ||
84 | * On pre-PCI macintosh (BOOT_ARCH_PCI bit set to 0 in architecture), this | ||
85 | * field is 0. | ||
86 | */ | ||
87 | __u32 deviceTreeOffset; /* Device tree offset */ | ||
88 | __u32 deviceTreeSize; /* Size of the device tree */ | ||
89 | |||
90 | /* Some infos about the current MacOS display */ | ||
91 | __u32 dispDeviceRect[4]; /* left,top,right,bottom */ | ||
92 | __u32 dispDeviceDepth; /* (8, 16 or 32) */ | ||
93 | __u8* dispDeviceBase; /* base address (physical) */ | ||
94 | __u32 dispDeviceRowBytes; /* rowbytes (in bytes) */ | ||
95 | __u32 dispDeviceColorsOffset; /* Colormap (8 bits only) or 0 (*) */ | ||
96 | /* Optional offset in the registry to the current | ||
97 | * MacOS display. (Can be 0 when not detected) */ | ||
98 | __u32 dispDeviceRegEntryOffset; | ||
99 | |||
100 | /* Optional pointer to boot ramdisk (offset from this structure) */ | ||
101 | __u32 ramDisk; | ||
102 | __u32 ramDiskSize; /* size of ramdisk image */ | ||
103 | |||
104 | /* Kernel command line arguments (offset from this structure) */ | ||
105 | __u32 kernelParamsOffset; | ||
106 | |||
107 | /* ALL BELOW NEW (vers. 4) */ | ||
108 | |||
109 | /* This defines the physical memory. Valid with BOOT_ARCH_NUBUS flag | ||
110 | (non-PCI) only. On PCI, memory is contiguous and it's size is in the | ||
111 | device-tree. */ | ||
112 | boot_info_map_entry_t | ||
113 | physMemoryMap[MAX_MEM_MAP_SIZE]; /* Where the phys memory is */ | ||
114 | __u32 physMemoryMapSize; /* How many entries in map */ | ||
115 | |||
116 | |||
117 | /* The framebuffer size (optional, currently 0) */ | ||
118 | __u32 frameBufferSize; /* Represents a max size, can be 0. */ | ||
119 | |||
120 | /* NEW (vers. 5) */ | ||
121 | |||
122 | /* Total params size (args + colormap + device tree + ramdisk) */ | ||
123 | __u32 totalParamsSize; | ||
124 | |||
125 | } boot_infos_t; | ||
126 | |||
127 | |||
128 | #ifdef macintosh | ||
129 | #pragma options align=reset | ||
130 | #endif | ||
131 | |||
132 | #endif /* _UAPI__ASM_BOOTX_H__ */ | ||
diff --git a/arch/powerpc/include/asm/byteorder.h b/arch/powerpc/include/uapi/asm/byteorder.h index aa6cc4fac96..aa6cc4fac96 100644 --- a/arch/powerpc/include/asm/byteorder.h +++ b/arch/powerpc/include/uapi/asm/byteorder.h | |||
diff --git a/arch/powerpc/include/uapi/asm/cputable.h b/arch/powerpc/include/uapi/asm/cputable.h new file mode 100644 index 00000000000..ed9dd815696 --- /dev/null +++ b/arch/powerpc/include/uapi/asm/cputable.h | |||
@@ -0,0 +1,36 @@ | |||
1 | #ifndef _UAPI__ASM_POWERPC_CPUTABLE_H | ||
2 | #define _UAPI__ASM_POWERPC_CPUTABLE_H | ||
3 | |||
4 | #define PPC_FEATURE_32 0x80000000 | ||
5 | #define PPC_FEATURE_64 0x40000000 | ||
6 | #define PPC_FEATURE_601_INSTR 0x20000000 | ||
7 | #define PPC_FEATURE_HAS_ALTIVEC 0x10000000 | ||
8 | #define PPC_FEATURE_HAS_FPU 0x08000000 | ||
9 | #define PPC_FEATURE_HAS_MMU 0x04000000 | ||
10 | #define PPC_FEATURE_HAS_4xxMAC 0x02000000 | ||
11 | #define PPC_FEATURE_UNIFIED_CACHE 0x01000000 | ||
12 | #define PPC_FEATURE_HAS_SPE 0x00800000 | ||
13 | #define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 | ||
14 | #define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 | ||
15 | #define PPC_FEATURE_NO_TB 0x00100000 | ||
16 | #define PPC_FEATURE_POWER4 0x00080000 | ||
17 | #define PPC_FEATURE_POWER5 0x00040000 | ||
18 | #define PPC_FEATURE_POWER5_PLUS 0x00020000 | ||
19 | #define PPC_FEATURE_CELL 0x00010000 | ||
20 | #define PPC_FEATURE_BOOKE 0x00008000 | ||
21 | #define PPC_FEATURE_SMT 0x00004000 | ||
22 | #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 | ||
23 | #define PPC_FEATURE_ARCH_2_05 0x00001000 | ||
24 | #define PPC_FEATURE_PA6T 0x00000800 | ||
25 | #define PPC_FEATURE_HAS_DFP 0x00000400 | ||
26 | #define PPC_FEATURE_POWER6_EXT 0x00000200 | ||
27 | #define PPC_FEATURE_ARCH_2_06 0x00000100 | ||
28 | #define PPC_FEATURE_HAS_VSX 0x00000080 | ||
29 | |||
30 | #define PPC_FEATURE_PSERIES_PERFMON_COMPAT \ | ||
31 | 0x00000040 | ||
32 | |||
33 | #define PPC_FEATURE_TRUE_LE 0x00000002 | ||
34 | #define PPC_FEATURE_PPC_LE 0x00000001 | ||
35 | |||
36 | #endif /* _UAPI__ASM_POWERPC_CPUTABLE_H */ | ||
diff --git a/arch/powerpc/include/uapi/asm/elf.h b/arch/powerpc/include/uapi/asm/elf.h new file mode 100644 index 00000000000..05b8d560cfb --- /dev/null +++ b/arch/powerpc/include/uapi/asm/elf.h | |||
@@ -0,0 +1,307 @@ | |||
1 | /* | ||
2 | * ELF register definitions.. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | #ifndef _UAPI_ASM_POWERPC_ELF_H | ||
10 | #define _UAPI_ASM_POWERPC_ELF_H | ||
11 | |||
12 | |||
13 | #include <linux/types.h> | ||
14 | |||
15 | #include <asm/ptrace.h> | ||
16 | #include <asm/cputable.h> | ||
17 | #include <asm/auxvec.h> | ||
18 | |||
19 | /* PowerPC relocations defined by the ABIs */ | ||
20 | #define R_PPC_NONE 0 | ||
21 | #define R_PPC_ADDR32 1 /* 32bit absolute address */ | ||
22 | #define R_PPC_ADDR24 2 /* 26bit address, 2 bits ignored. */ | ||
23 | #define R_PPC_ADDR16 3 /* 16bit absolute address */ | ||
24 | #define R_PPC_ADDR16_LO 4 /* lower 16bit of absolute address */ | ||
25 | #define R_PPC_ADDR16_HI 5 /* high 16bit of absolute address */ | ||
26 | #define R_PPC_ADDR16_HA 6 /* adjusted high 16bit */ | ||
27 | #define R_PPC_ADDR14 7 /* 16bit address, 2 bits ignored */ | ||
28 | #define R_PPC_ADDR14_BRTAKEN 8 | ||
29 | #define R_PPC_ADDR14_BRNTAKEN 9 | ||
30 | #define R_PPC_REL24 10 /* PC relative 26 bit */ | ||
31 | #define R_PPC_REL14 11 /* PC relative 16 bit */ | ||
32 | #define R_PPC_REL14_BRTAKEN 12 | ||
33 | #define R_PPC_REL14_BRNTAKEN 13 | ||
34 | #define R_PPC_GOT16 14 | ||
35 | #define R_PPC_GOT16_LO 15 | ||
36 | #define R_PPC_GOT16_HI 16 | ||
37 | #define R_PPC_GOT16_HA 17 | ||
38 | #define R_PPC_PLTREL24 18 | ||
39 | #define R_PPC_COPY 19 | ||
40 | #define R_PPC_GLOB_DAT 20 | ||
41 | #define R_PPC_JMP_SLOT 21 | ||
42 | #define R_PPC_RELATIVE 22 | ||
43 | #define R_PPC_LOCAL24PC 23 | ||
44 | #define R_PPC_UADDR32 24 | ||
45 | #define R_PPC_UADDR16 25 | ||
46 | #define R_PPC_REL32 26 | ||
47 | #define R_PPC_PLT32 27 | ||
48 | #define R_PPC_PLTREL32 28 | ||
49 | #define R_PPC_PLT16_LO 29 | ||
50 | #define R_PPC_PLT16_HI 30 | ||
51 | #define R_PPC_PLT16_HA 31 | ||
52 | #define R_PPC_SDAREL16 32 | ||
53 | #define R_PPC_SECTOFF 33 | ||
54 | #define R_PPC_SECTOFF_LO 34 | ||
55 | #define R_PPC_SECTOFF_HI 35 | ||
56 | #define R_PPC_SECTOFF_HA 36 | ||
57 | |||
58 | /* PowerPC relocations defined for the TLS access ABI. */ | ||
59 | #define R_PPC_TLS 67 /* none (sym+add)@tls */ | ||
60 | #define R_PPC_DTPMOD32 68 /* word32 (sym+add)@dtpmod */ | ||
61 | #define R_PPC_TPREL16 69 /* half16* (sym+add)@tprel */ | ||
62 | #define R_PPC_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */ | ||
63 | #define R_PPC_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */ | ||
64 | #define R_PPC_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */ | ||
65 | #define R_PPC_TPREL32 73 /* word32 (sym+add)@tprel */ | ||
66 | #define R_PPC_DTPREL16 74 /* half16* (sym+add)@dtprel */ | ||
67 | #define R_PPC_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */ | ||
68 | #define R_PPC_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */ | ||
69 | #define R_PPC_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */ | ||
70 | #define R_PPC_DTPREL32 78 /* word32 (sym+add)@dtprel */ | ||
71 | #define R_PPC_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */ | ||
72 | #define R_PPC_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */ | ||
73 | #define R_PPC_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */ | ||
74 | #define R_PPC_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */ | ||
75 | #define R_PPC_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */ | ||
76 | #define R_PPC_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */ | ||
77 | #define R_PPC_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */ | ||
78 | #define R_PPC_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */ | ||
79 | #define R_PPC_GOT_TPREL16 87 /* half16* (sym+add)@got@tprel */ | ||
80 | #define R_PPC_GOT_TPREL16_LO 88 /* half16 (sym+add)@got@tprel@l */ | ||
81 | #define R_PPC_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */ | ||
82 | #define R_PPC_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */ | ||
83 | #define R_PPC_GOT_DTPREL16 91 /* half16* (sym+add)@got@dtprel */ | ||
84 | #define R_PPC_GOT_DTPREL16_LO 92 /* half16* (sym+add)@got@dtprel@l */ | ||
85 | #define R_PPC_GOT_DTPREL16_HI 93 /* half16* (sym+add)@got@dtprel@h */ | ||
86 | #define R_PPC_GOT_DTPREL16_HA 94 /* half16* (sym+add)@got@dtprel@ha */ | ||
87 | |||
88 | /* keep this the last entry. */ | ||
89 | #define R_PPC_NUM 95 | ||
90 | |||
91 | |||
92 | #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ | ||
93 | #define ELF_NFPREG 33 /* includes fpscr */ | ||
94 | |||
95 | typedef unsigned long elf_greg_t64; | ||
96 | typedef elf_greg_t64 elf_gregset_t64[ELF_NGREG]; | ||
97 | |||
98 | typedef unsigned int elf_greg_t32; | ||
99 | typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG]; | ||
100 | typedef elf_gregset_t32 compat_elf_gregset_t; | ||
101 | |||
102 | /* | ||
103 | * ELF_ARCH, CLASS, and DATA are used to set parameters in the core dumps. | ||
104 | */ | ||
105 | #ifdef __powerpc64__ | ||
106 | # define ELF_NVRREG32 33 /* includes vscr & vrsave stuffed together */ | ||
107 | # define ELF_NVRREG 34 /* includes vscr & vrsave in split vectors */ | ||
108 | # define ELF_NVSRHALFREG 32 /* Half the vsx registers */ | ||
109 | # define ELF_GREG_TYPE elf_greg_t64 | ||
110 | #else | ||
111 | # define ELF_NEVRREG 34 /* includes acc (as 2) */ | ||
112 | # define ELF_NVRREG 33 /* includes vscr */ | ||
113 | # define ELF_GREG_TYPE elf_greg_t32 | ||
114 | # define ELF_ARCH EM_PPC | ||
115 | # define ELF_CLASS ELFCLASS32 | ||
116 | # define ELF_DATA ELFDATA2MSB | ||
117 | #endif /* __powerpc64__ */ | ||
118 | |||
119 | #ifndef ELF_ARCH | ||
120 | # define ELF_ARCH EM_PPC64 | ||
121 | # define ELF_CLASS ELFCLASS64 | ||
122 | # define ELF_DATA ELFDATA2MSB | ||
123 | typedef elf_greg_t64 elf_greg_t; | ||
124 | typedef elf_gregset_t64 elf_gregset_t; | ||
125 | #else | ||
126 | /* Assumption: ELF_ARCH == EM_PPC and ELF_CLASS == ELFCLASS32 */ | ||
127 | typedef elf_greg_t32 elf_greg_t; | ||
128 | typedef elf_gregset_t32 elf_gregset_t; | ||
129 | #endif /* ELF_ARCH */ | ||
130 | |||
131 | /* Floating point registers */ | ||
132 | typedef double elf_fpreg_t; | ||
133 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | ||
134 | |||
135 | /* Altivec registers */ | ||
136 | /* | ||
137 | * The entries with indexes 0-31 contain the corresponding vector registers. | ||
138 | * The entry with index 32 contains the vscr as the last word (offset 12) | ||
139 | * within the quadword. This allows the vscr to be stored as either a | ||
140 | * quadword (since it must be copied via a vector register to/from storage) | ||
141 | * or as a word. | ||
142 | * | ||
143 | * 64-bit kernel notes: The entry at index 33 contains the vrsave as the first | ||
144 | * word (offset 0) within the quadword. | ||
145 | * | ||
146 | * This definition of the VMX state is compatible with the current PPC32 | ||
147 | * ptrace interface. This allows signal handling and ptrace to use the same | ||
148 | * structures. This also simplifies the implementation of a bi-arch | ||
149 | * (combined (32- and 64-bit) gdb. | ||
150 | * | ||
151 | * Note that it's _not_ compatible with 32 bits ucontext which stuffs the | ||
152 | * vrsave along with vscr and so only uses 33 vectors for the register set | ||
153 | */ | ||
154 | typedef __vector128 elf_vrreg_t; | ||
155 | typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; | ||
156 | #ifdef __powerpc64__ | ||
157 | typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32]; | ||
158 | typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG]; | ||
159 | #endif | ||
160 | |||
161 | |||
162 | /* | ||
163 | * The requirements here are: | ||
164 | * - keep the final alignment of sp (sp & 0xf) | ||
165 | * - make sure the 32-bit value at the first 16 byte aligned position of | ||
166 | * AUXV is greater than 16 for glibc compatibility. | ||
167 | * AT_IGNOREPPC is used for that. | ||
168 | * - for compatibility with glibc ARCH_DLINFO must always be defined on PPC, | ||
169 | * even if DLINFO_ARCH_ITEMS goes to zero or is undefined. | ||
170 | * update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes | ||
171 | */ | ||
172 | #define ARCH_DLINFO \ | ||
173 | do { \ | ||
174 | /* Handle glibc compatibility. */ \ | ||
175 | NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \ | ||
176 | NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \ | ||
177 | /* Cache size items */ \ | ||
178 | NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize); \ | ||
179 | NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize); \ | ||
180 | NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize); \ | ||
181 | VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso_base); \ | ||
182 | } while (0) | ||
183 | |||
184 | /* PowerPC64 relocations defined by the ABIs */ | ||
185 | #define R_PPC64_NONE R_PPC_NONE | ||
186 | #define R_PPC64_ADDR32 R_PPC_ADDR32 /* 32bit absolute address. */ | ||
187 | #define R_PPC64_ADDR24 R_PPC_ADDR24 /* 26bit address, word aligned. */ | ||
188 | #define R_PPC64_ADDR16 R_PPC_ADDR16 /* 16bit absolute address. */ | ||
189 | #define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO /* lower 16bits of abs. address. */ | ||
190 | #define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI /* high 16bits of abs. address. */ | ||
191 | #define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA /* adjusted high 16bits. */ | ||
192 | #define R_PPC64_ADDR14 R_PPC_ADDR14 /* 16bit address, word aligned. */ | ||
193 | #define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN | ||
194 | #define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN | ||
195 | #define R_PPC64_REL24 R_PPC_REL24 /* PC relative 26 bit, word aligned. */ | ||
196 | #define R_PPC64_REL14 R_PPC_REL14 /* PC relative 16 bit. */ | ||
197 | #define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN | ||
198 | #define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN | ||
199 | #define R_PPC64_GOT16 R_PPC_GOT16 | ||
200 | #define R_PPC64_GOT16_LO R_PPC_GOT16_LO | ||
201 | #define R_PPC64_GOT16_HI R_PPC_GOT16_HI | ||
202 | #define R_PPC64_GOT16_HA R_PPC_GOT16_HA | ||
203 | |||
204 | #define R_PPC64_COPY R_PPC_COPY | ||
205 | #define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT | ||
206 | #define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT | ||
207 | #define R_PPC64_RELATIVE R_PPC_RELATIVE | ||
208 | |||
209 | #define R_PPC64_UADDR32 R_PPC_UADDR32 | ||
210 | #define R_PPC64_UADDR16 R_PPC_UADDR16 | ||
211 | #define R_PPC64_REL32 R_PPC_REL32 | ||
212 | #define R_PPC64_PLT32 R_PPC_PLT32 | ||
213 | #define R_PPC64_PLTREL32 R_PPC_PLTREL32 | ||
214 | #define R_PPC64_PLT16_LO R_PPC_PLT16_LO | ||
215 | #define R_PPC64_PLT16_HI R_PPC_PLT16_HI | ||
216 | #define R_PPC64_PLT16_HA R_PPC_PLT16_HA | ||
217 | |||
218 | #define R_PPC64_SECTOFF R_PPC_SECTOFF | ||
219 | #define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO | ||
220 | #define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI | ||
221 | #define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA | ||
222 | #define R_PPC64_ADDR30 37 /* word30 (S + A - P) >> 2. */ | ||
223 | #define R_PPC64_ADDR64 38 /* doubleword64 S + A. */ | ||
224 | #define R_PPC64_ADDR16_HIGHER 39 /* half16 #higher(S + A). */ | ||
225 | #define R_PPC64_ADDR16_HIGHERA 40 /* half16 #highera(S + A). */ | ||
226 | #define R_PPC64_ADDR16_HIGHEST 41 /* half16 #highest(S + A). */ | ||
227 | #define R_PPC64_ADDR16_HIGHESTA 42 /* half16 #highesta(S + A). */ | ||
228 | #define R_PPC64_UADDR64 43 /* doubleword64 S + A. */ | ||
229 | #define R_PPC64_REL64 44 /* doubleword64 S + A - P. */ | ||
230 | #define R_PPC64_PLT64 45 /* doubleword64 L + A. */ | ||
231 | #define R_PPC64_PLTREL64 46 /* doubleword64 L + A - P. */ | ||
232 | #define R_PPC64_TOC16 47 /* half16* S + A - .TOC. */ | ||
233 | #define R_PPC64_TOC16_LO 48 /* half16 #lo(S + A - .TOC.). */ | ||
234 | #define R_PPC64_TOC16_HI 49 /* half16 #hi(S + A - .TOC.). */ | ||
235 | #define R_PPC64_TOC16_HA 50 /* half16 #ha(S + A - .TOC.). */ | ||
236 | #define R_PPC64_TOC 51 /* doubleword64 .TOC. */ | ||
237 | #define R_PPC64_PLTGOT16 52 /* half16* M + A. */ | ||
238 | #define R_PPC64_PLTGOT16_LO 53 /* half16 #lo(M + A). */ | ||
239 | #define R_PPC64_PLTGOT16_HI 54 /* half16 #hi(M + A). */ | ||
240 | #define R_PPC64_PLTGOT16_HA 55 /* half16 #ha(M + A). */ | ||
241 | |||
242 | #define R_PPC64_ADDR16_DS 56 /* half16ds* (S + A) >> 2. */ | ||
243 | #define R_PPC64_ADDR16_LO_DS 57 /* half16ds #lo(S + A) >> 2. */ | ||
244 | #define R_PPC64_GOT16_DS 58 /* half16ds* (G + A) >> 2. */ | ||
245 | #define R_PPC64_GOT16_LO_DS 59 /* half16ds #lo(G + A) >> 2. */ | ||
246 | #define R_PPC64_PLT16_LO_DS 60 /* half16ds #lo(L + A) >> 2. */ | ||
247 | #define R_PPC64_SECTOFF_DS 61 /* half16ds* (R + A) >> 2. */ | ||
248 | #define R_PPC64_SECTOFF_LO_DS 62 /* half16ds #lo(R + A) >> 2. */ | ||
249 | #define R_PPC64_TOC16_DS 63 /* half16ds* (S + A - .TOC.) >> 2. */ | ||
250 | #define R_PPC64_TOC16_LO_DS 64 /* half16ds #lo(S + A - .TOC.) >> 2. */ | ||
251 | #define R_PPC64_PLTGOT16_DS 65 /* half16ds* (M + A) >> 2. */ | ||
252 | #define R_PPC64_PLTGOT16_LO_DS 66 /* half16ds #lo(M + A) >> 2. */ | ||
253 | |||
254 | /* PowerPC64 relocations defined for the TLS access ABI. */ | ||
255 | #define R_PPC64_TLS 67 /* none (sym+add)@tls */ | ||
256 | #define R_PPC64_DTPMOD64 68 /* doubleword64 (sym+add)@dtpmod */ | ||
257 | #define R_PPC64_TPREL16 69 /* half16* (sym+add)@tprel */ | ||
258 | #define R_PPC64_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */ | ||
259 | #define R_PPC64_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */ | ||
260 | #define R_PPC64_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */ | ||
261 | #define R_PPC64_TPREL64 73 /* doubleword64 (sym+add)@tprel */ | ||
262 | #define R_PPC64_DTPREL16 74 /* half16* (sym+add)@dtprel */ | ||
263 | #define R_PPC64_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */ | ||
264 | #define R_PPC64_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */ | ||
265 | #define R_PPC64_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */ | ||
266 | #define R_PPC64_DTPREL64 78 /* doubleword64 (sym+add)@dtprel */ | ||
267 | #define R_PPC64_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */ | ||
268 | #define R_PPC64_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */ | ||
269 | #define R_PPC64_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */ | ||
270 | #define R_PPC64_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */ | ||
271 | #define R_PPC64_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */ | ||
272 | #define R_PPC64_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */ | ||
273 | #define R_PPC64_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */ | ||
274 | #define R_PPC64_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */ | ||
275 | #define R_PPC64_GOT_TPREL16_DS 87 /* half16ds* (sym+add)@got@tprel */ | ||
276 | #define R_PPC64_GOT_TPREL16_LO_DS 88 /* half16ds (sym+add)@got@tprel@l */ | ||
277 | #define R_PPC64_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */ | ||
278 | #define R_PPC64_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */ | ||
279 | #define R_PPC64_GOT_DTPREL16_DS 91 /* half16ds* (sym+add)@got@dtprel */ | ||
280 | #define R_PPC64_GOT_DTPREL16_LO_DS 92 /* half16ds (sym+add)@got@dtprel@l */ | ||
281 | #define R_PPC64_GOT_DTPREL16_HI 93 /* half16 (sym+add)@got@dtprel@h */ | ||
282 | #define R_PPC64_GOT_DTPREL16_HA 94 /* half16 (sym+add)@got@dtprel@ha */ | ||
283 | #define R_PPC64_TPREL16_DS 95 /* half16ds* (sym+add)@tprel */ | ||
284 | #define R_PPC64_TPREL16_LO_DS 96 /* half16ds (sym+add)@tprel@l */ | ||
285 | #define R_PPC64_TPREL16_HIGHER 97 /* half16 (sym+add)@tprel@higher */ | ||
286 | #define R_PPC64_TPREL16_HIGHERA 98 /* half16 (sym+add)@tprel@highera */ | ||
287 | #define R_PPC64_TPREL16_HIGHEST 99 /* half16 (sym+add)@tprel@highest */ | ||
288 | #define R_PPC64_TPREL16_HIGHESTA 100 /* half16 (sym+add)@tprel@highesta */ | ||
289 | #define R_PPC64_DTPREL16_DS 101 /* half16ds* (sym+add)@dtprel */ | ||
290 | #define R_PPC64_DTPREL16_LO_DS 102 /* half16ds (sym+add)@dtprel@l */ | ||
291 | #define R_PPC64_DTPREL16_HIGHER 103 /* half16 (sym+add)@dtprel@higher */ | ||
292 | #define R_PPC64_DTPREL16_HIGHERA 104 /* half16 (sym+add)@dtprel@highera */ | ||
293 | #define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */ | ||
294 | #define R_PPC64_DTPREL16_HIGHESTA 106 /* half16 (sym+add)@dtprel@highesta */ | ||
295 | |||
296 | /* Keep this the last entry. */ | ||
297 | #define R_PPC64_NUM 107 | ||
298 | |||
299 | /* There's actually a third entry here, but it's unused */ | ||
300 | struct ppc64_opd_entry | ||
301 | { | ||
302 | unsigned long funcaddr; | ||
303 | unsigned long r2; | ||
304 | }; | ||
305 | |||
306 | |||
307 | #endif /* _UAPI_ASM_POWERPC_ELF_H */ | ||
diff --git a/arch/powerpc/include/asm/errno.h b/arch/powerpc/include/uapi/asm/errno.h index 8c145fd17d8..8c145fd17d8 100644 --- a/arch/powerpc/include/asm/errno.h +++ b/arch/powerpc/include/uapi/asm/errno.h | |||
diff --git a/arch/powerpc/include/asm/fcntl.h b/arch/powerpc/include/uapi/asm/fcntl.h index ce5c4516d40..ce5c4516d40 100644 --- a/arch/powerpc/include/asm/fcntl.h +++ b/arch/powerpc/include/uapi/asm/fcntl.h | |||
diff --git a/arch/powerpc/include/asm/ioctl.h b/arch/powerpc/include/uapi/asm/ioctl.h index 57d68304218..57d68304218 100644 --- a/arch/powerpc/include/asm/ioctl.h +++ b/arch/powerpc/include/uapi/asm/ioctl.h | |||
diff --git a/arch/powerpc/include/asm/ioctls.h b/arch/powerpc/include/uapi/asm/ioctls.h index e9b78870aaa..e9b78870aaa 100644 --- a/arch/powerpc/include/asm/ioctls.h +++ b/arch/powerpc/include/uapi/asm/ioctls.h | |||
diff --git a/arch/powerpc/include/asm/ipcbuf.h b/arch/powerpc/include/uapi/asm/ipcbuf.h index 2c3e1d94db1..2c3e1d94db1 100644 --- a/arch/powerpc/include/asm/ipcbuf.h +++ b/arch/powerpc/include/uapi/asm/ipcbuf.h | |||
diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h index 1bea4d8ea6f..1bea4d8ea6f 100644 --- a/arch/powerpc/include/asm/kvm.h +++ b/arch/powerpc/include/uapi/asm/kvm.h | |||
diff --git a/arch/powerpc/include/uapi/asm/kvm_para.h b/arch/powerpc/include/uapi/asm/kvm_para.h new file mode 100644 index 00000000000..5e04383a1db --- /dev/null +++ b/arch/powerpc/include/uapi/asm/kvm_para.h | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License, version 2, as | ||
4 | * published by the Free Software Foundation. | ||
5 | * | ||
6 | * This program is distributed in the hope that it will be useful, | ||
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
9 | * GNU General Public License for more details. | ||
10 | * | ||
11 | * You should have received a copy of the GNU General Public License | ||
12 | * along with this program; if not, write to the Free Software | ||
13 | * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
14 | * | ||
15 | * Copyright IBM Corp. 2008 | ||
16 | * | ||
17 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> | ||
18 | */ | ||
19 | |||
20 | #ifndef _UAPI__POWERPC_KVM_PARA_H__ | ||
21 | #define _UAPI__POWERPC_KVM_PARA_H__ | ||
22 | |||
23 | #include <linux/types.h> | ||
24 | |||
25 | /* | ||
26 | * Additions to this struct must only occur at the end, and should be | ||
27 | * accompanied by a KVM_MAGIC_FEAT flag to advertise that they are present | ||
28 | * (albeit not necessarily relevant to the current target hardware platform). | ||
29 | * | ||
30 | * Struct fields are always 32 or 64 bit aligned, depending on them being 32 | ||
31 | * or 64 bit wide respectively. | ||
32 | * | ||
33 | * See Documentation/virtual/kvm/ppc-pv.txt | ||
34 | */ | ||
35 | struct kvm_vcpu_arch_shared { | ||
36 | __u64 scratch1; | ||
37 | __u64 scratch2; | ||
38 | __u64 scratch3; | ||
39 | __u64 critical; /* Guest may not get interrupts if == r1 */ | ||
40 | __u64 sprg0; | ||
41 | __u64 sprg1; | ||
42 | __u64 sprg2; | ||
43 | __u64 sprg3; | ||
44 | __u64 srr0; | ||
45 | __u64 srr1; | ||
46 | __u64 dar; /* dear on BookE */ | ||
47 | __u64 msr; | ||
48 | __u32 dsisr; | ||
49 | __u32 int_pending; /* Tells the guest if we have an interrupt */ | ||
50 | __u32 sr[16]; | ||
51 | __u32 mas0; | ||
52 | __u32 mas1; | ||
53 | __u64 mas7_3; | ||
54 | __u64 mas2; | ||
55 | __u32 mas4; | ||
56 | __u32 mas6; | ||
57 | __u32 esr; | ||
58 | __u32 pir; | ||
59 | |||
60 | /* | ||
61 | * SPRG4-7 are user-readable, so we can only keep these consistent | ||
62 | * between the shared area and the real registers when there's an | ||
63 | * intervening exit to KVM. This also applies to SPRG3 on some | ||
64 | * chips. | ||
65 | * | ||
66 | * This suffices for access by guest userspace, since in PR-mode | ||
67 | * KVM, an exit must occur when changing the guest's MSR[PR]. | ||
68 | * If the guest kernel writes to SPRG3-7 via the shared area, it | ||
69 | * must also use the shared area for reading while in kernel space. | ||
70 | */ | ||
71 | __u64 sprg4; | ||
72 | __u64 sprg5; | ||
73 | __u64 sprg6; | ||
74 | __u64 sprg7; | ||
75 | }; | ||
76 | |||
77 | #define KVM_SC_MAGIC_R0 0x4b564d21 /* "KVM!" */ | ||
78 | #define HC_VENDOR_KVM (42 << 16) | ||
79 | #define HC_EV_SUCCESS 0 | ||
80 | #define HC_EV_UNIMPLEMENTED 12 | ||
81 | |||
82 | #define KVM_FEATURE_MAGIC_PAGE 1 | ||
83 | |||
84 | #define KVM_MAGIC_FEAT_SR (1 << 0) | ||
85 | |||
86 | /* MASn, ESR, PIR, and high SPRGs */ | ||
87 | #define KVM_MAGIC_FEAT_MAS0_TO_SPRG7 (1 << 1) | ||
88 | |||
89 | |||
90 | #endif /* _UAPI__POWERPC_KVM_PARA_H__ */ | ||
diff --git a/arch/powerpc/include/asm/linkage.h b/arch/powerpc/include/uapi/asm/linkage.h index e1c4ac1cc4b..e1c4ac1cc4b 100644 --- a/arch/powerpc/include/asm/linkage.h +++ b/arch/powerpc/include/uapi/asm/linkage.h | |||
diff --git a/arch/powerpc/include/uapi/asm/mman.h b/arch/powerpc/include/uapi/asm/mman.h new file mode 100644 index 00000000000..6ea26df0a73 --- /dev/null +++ b/arch/powerpc/include/uapi/asm/mman.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or | ||
3 | * modify it under the terms of the GNU General Public License | ||
4 | * as published by the Free Software Foundation; either version | ||
5 | * 2 of the License, or (at your option) any later version. | ||
6 | */ | ||
7 | #ifndef _UAPI_ASM_POWERPC_MMAN_H | ||
8 | #define _UAPI_ASM_POWERPC_MMAN_H | ||
9 | |||
10 | #include <asm-generic/mman-common.h> | ||
11 | |||
12 | |||
13 | #define PROT_SAO 0x10 /* Strong Access Ordering */ | ||
14 | |||
15 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | ||
16 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | ||
17 | #define MAP_LOCKED 0x80 | ||
18 | |||
19 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | ||
20 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
21 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
22 | |||
23 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | ||
24 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | ||
25 | |||
26 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
27 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
28 | #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ | ||
29 | #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ | ||
30 | |||
31 | #endif /* _UAPI_ASM_POWERPC_MMAN_H */ | ||
diff --git a/arch/powerpc/include/asm/msgbuf.h b/arch/powerpc/include/uapi/asm/msgbuf.h index dd76743c753..dd76743c753 100644 --- a/arch/powerpc/include/asm/msgbuf.h +++ b/arch/powerpc/include/uapi/asm/msgbuf.h | |||
diff --git a/arch/powerpc/include/uapi/asm/nvram.h b/arch/powerpc/include/uapi/asm/nvram.h new file mode 100644 index 00000000000..608bdc8aedd --- /dev/null +++ b/arch/powerpc/include/uapi/asm/nvram.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * NVRAM definitions and access functions. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #ifndef _UAPI_ASM_POWERPC_NVRAM_H | ||
11 | #define _UAPI_ASM_POWERPC_NVRAM_H | ||
12 | |||
13 | /* Signatures for nvram partitions */ | ||
14 | #define NVRAM_SIG_SP 0x02 /* support processor */ | ||
15 | #define NVRAM_SIG_OF 0x50 /* open firmware config */ | ||
16 | #define NVRAM_SIG_FW 0x51 /* general firmware */ | ||
17 | #define NVRAM_SIG_HW 0x52 /* hardware (VPD) */ | ||
18 | #define NVRAM_SIG_FLIP 0x5a /* Apple flip/flop header */ | ||
19 | #define NVRAM_SIG_APPL 0x5f /* Apple "system" (???) */ | ||
20 | #define NVRAM_SIG_SYS 0x70 /* system env vars */ | ||
21 | #define NVRAM_SIG_CFG 0x71 /* config data */ | ||
22 | #define NVRAM_SIG_ELOG 0x72 /* error log */ | ||
23 | #define NVRAM_SIG_VEND 0x7e /* vendor defined */ | ||
24 | #define NVRAM_SIG_FREE 0x7f /* Free space */ | ||
25 | #define NVRAM_SIG_OS 0xa0 /* OS defined */ | ||
26 | #define NVRAM_SIG_PANIC 0xa1 /* Apple OSX "panic" */ | ||
27 | |||
28 | |||
29 | /* PowerMac specific nvram stuffs */ | ||
30 | |||
31 | enum { | ||
32 | pmac_nvram_OF, /* Open Firmware partition */ | ||
33 | pmac_nvram_XPRAM, /* MacOS XPRAM partition */ | ||
34 | pmac_nvram_NR /* MacOS Name Registry partition */ | ||
35 | }; | ||
36 | |||
37 | |||
38 | /* Some offsets in XPRAM */ | ||
39 | #define PMAC_XPRAM_MACHINE_LOC 0xe4 | ||
40 | #define PMAC_XPRAM_SOUND_VOLUME 0x08 | ||
41 | |||
42 | /* Machine location structure in PowerMac XPRAM */ | ||
43 | struct pmac_machine_location { | ||
44 | unsigned int latitude; /* 2+30 bit Fractional number */ | ||
45 | unsigned int longitude; /* 2+30 bit Fractional number */ | ||
46 | unsigned int delta; /* mix of GMT delta and DLS */ | ||
47 | }; | ||
48 | |||
49 | /* | ||
50 | * /dev/nvram ioctls | ||
51 | * | ||
52 | * Note that PMAC_NVRAM_GET_OFFSET is still supported, but is | ||
53 | * definitely obsolete. Do not use it if you can avoid it | ||
54 | */ | ||
55 | |||
56 | #define OBSOLETE_PMAC_NVRAM_GET_OFFSET \ | ||
57 | _IOWR('p', 0x40, int) | ||
58 | |||
59 | #define IOC_NVRAM_GET_OFFSET _IOWR('p', 0x42, int) /* Get NVRAM partition offset */ | ||
60 | #define IOC_NVRAM_SYNC _IO('p', 0x43) /* Sync NVRAM image */ | ||
61 | |||
62 | #endif /* _UAPI_ASM_POWERPC_NVRAM_H */ | ||
diff --git a/arch/powerpc/include/asm/param.h b/arch/powerpc/include/uapi/asm/param.h index 965d4542797..965d4542797 100644 --- a/arch/powerpc/include/asm/param.h +++ b/arch/powerpc/include/uapi/asm/param.h | |||
diff --git a/arch/powerpc/include/asm/poll.h b/arch/powerpc/include/uapi/asm/poll.h index c98509d3149..c98509d3149 100644 --- a/arch/powerpc/include/asm/poll.h +++ b/arch/powerpc/include/uapi/asm/poll.h | |||
diff --git a/arch/powerpc/include/asm/posix_types.h b/arch/powerpc/include/uapi/asm/posix_types.h index 2958c5b97b2..2958c5b97b2 100644 --- a/arch/powerpc/include/asm/posix_types.h +++ b/arch/powerpc/include/uapi/asm/posix_types.h | |||
diff --git a/arch/powerpc/include/asm/ps3fb.h b/arch/powerpc/include/uapi/asm/ps3fb.h index e7233a84968..e7233a84968 100644 --- a/arch/powerpc/include/asm/ps3fb.h +++ b/arch/powerpc/include/uapi/asm/ps3fb.h | |||
diff --git a/arch/powerpc/include/uapi/asm/ptrace.h b/arch/powerpc/include/uapi/asm/ptrace.h new file mode 100644 index 00000000000..ee67a2bc91b --- /dev/null +++ b/arch/powerpc/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,259 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 PPC64 Team, IBM Corp | ||
3 | * | ||
4 | * This struct defines the way the registers are stored on the | ||
5 | * kernel stack during a system call or other kernel entry. | ||
6 | * | ||
7 | * this should only contain volatile regs | ||
8 | * since we can keep non-volatile in the thread_struct | ||
9 | * should set this up when only volatiles are saved | ||
10 | * by intr code. | ||
11 | * | ||
12 | * Since this is going on the stack, *CARE MUST BE TAKEN* to insure | ||
13 | * that the overall structure is a multiple of 16 bytes in length. | ||
14 | * | ||
15 | * Note that the offsets of the fields in this struct correspond with | ||
16 | * the PT_* values below. This simplifies arch/powerpc/kernel/ptrace.c. | ||
17 | * | ||
18 | * This program is free software; you can redistribute it and/or | ||
19 | * modify it under the terms of the GNU General Public License | ||
20 | * as published by the Free Software Foundation; either version | ||
21 | * 2 of the License, or (at your option) any later version. | ||
22 | */ | ||
23 | #ifndef _UAPI_ASM_POWERPC_PTRACE_H | ||
24 | #define _UAPI_ASM_POWERPC_PTRACE_H | ||
25 | |||
26 | |||
27 | #include <linux/types.h> | ||
28 | |||
29 | #ifndef __ASSEMBLY__ | ||
30 | |||
31 | struct pt_regs { | ||
32 | unsigned long gpr[32]; | ||
33 | unsigned long nip; | ||
34 | unsigned long msr; | ||
35 | unsigned long orig_gpr3; /* Used for restarting system calls */ | ||
36 | unsigned long ctr; | ||
37 | unsigned long link; | ||
38 | unsigned long xer; | ||
39 | unsigned long ccr; | ||
40 | #ifdef __powerpc64__ | ||
41 | unsigned long softe; /* Soft enabled/disabled */ | ||
42 | #else | ||
43 | unsigned long mq; /* 601 only (not used at present) */ | ||
44 | /* Used on APUS to hold IPL value. */ | ||
45 | #endif | ||
46 | unsigned long trap; /* Reason for being here */ | ||
47 | /* N.B. for critical exceptions on 4xx, the dar and dsisr | ||
48 | fields are overloaded to hold srr0 and srr1. */ | ||
49 | unsigned long dar; /* Fault registers */ | ||
50 | unsigned long dsisr; /* on 4xx/Book-E used for ESR */ | ||
51 | unsigned long result; /* Result of a system call */ | ||
52 | }; | ||
53 | |||
54 | #endif /* __ASSEMBLY__ */ | ||
55 | |||
56 | |||
57 | /* | ||
58 | * Offsets used by 'ptrace' system call interface. | ||
59 | * These can't be changed without breaking binary compatibility | ||
60 | * with MkLinux, etc. | ||
61 | */ | ||
62 | #define PT_R0 0 | ||
63 | #define PT_R1 1 | ||
64 | #define PT_R2 2 | ||
65 | #define PT_R3 3 | ||
66 | #define PT_R4 4 | ||
67 | #define PT_R5 5 | ||
68 | #define PT_R6 6 | ||
69 | #define PT_R7 7 | ||
70 | #define PT_R8 8 | ||
71 | #define PT_R9 9 | ||
72 | #define PT_R10 10 | ||
73 | #define PT_R11 11 | ||
74 | #define PT_R12 12 | ||
75 | #define PT_R13 13 | ||
76 | #define PT_R14 14 | ||
77 | #define PT_R15 15 | ||
78 | #define PT_R16 16 | ||
79 | #define PT_R17 17 | ||
80 | #define PT_R18 18 | ||
81 | #define PT_R19 19 | ||
82 | #define PT_R20 20 | ||
83 | #define PT_R21 21 | ||
84 | #define PT_R22 22 | ||
85 | #define PT_R23 23 | ||
86 | #define PT_R24 24 | ||
87 | #define PT_R25 25 | ||
88 | #define PT_R26 26 | ||
89 | #define PT_R27 27 | ||
90 | #define PT_R28 28 | ||
91 | #define PT_R29 29 | ||
92 | #define PT_R30 30 | ||
93 | #define PT_R31 31 | ||
94 | |||
95 | #define PT_NIP 32 | ||
96 | #define PT_MSR 33 | ||
97 | #define PT_ORIG_R3 34 | ||
98 | #define PT_CTR 35 | ||
99 | #define PT_LNK 36 | ||
100 | #define PT_XER 37 | ||
101 | #define PT_CCR 38 | ||
102 | #ifndef __powerpc64__ | ||
103 | #define PT_MQ 39 | ||
104 | #else | ||
105 | #define PT_SOFTE 39 | ||
106 | #endif | ||
107 | #define PT_TRAP 40 | ||
108 | #define PT_DAR 41 | ||
109 | #define PT_DSISR 42 | ||
110 | #define PT_RESULT 43 | ||
111 | #define PT_REGS_COUNT 44 | ||
112 | |||
113 | #define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ | ||
114 | |||
115 | #ifndef __powerpc64__ | ||
116 | |||
117 | #define PT_FPR31 (PT_FPR0 + 2*31) | ||
118 | #define PT_FPSCR (PT_FPR0 + 2*32 + 1) | ||
119 | |||
120 | #else /* __powerpc64__ */ | ||
121 | |||
122 | #define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */ | ||
123 | |||
124 | |||
125 | #define PT_VR0 82 /* each Vector reg occupies 2 slots in 64-bit */ | ||
126 | #define PT_VSCR (PT_VR0 + 32*2 + 1) | ||
127 | #define PT_VRSAVE (PT_VR0 + 33*2) | ||
128 | |||
129 | |||
130 | /* | ||
131 | * Only store first 32 VSRs here. The second 32 VSRs in VR0-31 | ||
132 | */ | ||
133 | #define PT_VSR0 150 /* each VSR reg occupies 2 slots in 64-bit */ | ||
134 | #define PT_VSR31 (PT_VSR0 + 2*31) | ||
135 | #endif /* __powerpc64__ */ | ||
136 | |||
137 | /* | ||
138 | * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go. | ||
139 | * The transfer totals 34 quadword. Quadwords 0-31 contain the | ||
140 | * corresponding vector registers. Quadword 32 contains the vscr as the | ||
141 | * last word (offset 12) within that quadword. Quadword 33 contains the | ||
142 | * vrsave as the first word (offset 0) within the quadword. | ||
143 | * | ||
144 | * This definition of the VMX state is compatible with the current PPC32 | ||
145 | * ptrace interface. This allows signal handling and ptrace to use the same | ||
146 | * structures. This also simplifies the implementation of a bi-arch | ||
147 | * (combined (32- and 64-bit) gdb. | ||
148 | */ | ||
149 | #define PTRACE_GETVRREGS 18 | ||
150 | #define PTRACE_SETVRREGS 19 | ||
151 | |||
152 | /* Get/set all the upper 32-bits of the SPE registers, accumulator, and | ||
153 | * spefscr, in one go */ | ||
154 | #define PTRACE_GETEVRREGS 20 | ||
155 | #define PTRACE_SETEVRREGS 21 | ||
156 | |||
157 | /* Get the first 32 128bit VSX registers */ | ||
158 | #define PTRACE_GETVSRREGS 27 | ||
159 | #define PTRACE_SETVSRREGS 28 | ||
160 | |||
161 | /* | ||
162 | * Get or set a debug register. The first 16 are DABR registers and the | ||
163 | * second 16 are IABR registers. | ||
164 | */ | ||
165 | #define PTRACE_GET_DEBUGREG 25 | ||
166 | #define PTRACE_SET_DEBUGREG 26 | ||
167 | |||
168 | /* (new) PTRACE requests using the same numbers as x86 and the same | ||
169 | * argument ordering. Additionally, they support more registers too | ||
170 | */ | ||
171 | #define PTRACE_GETREGS 12 | ||
172 | #define PTRACE_SETREGS 13 | ||
173 | #define PTRACE_GETFPREGS 14 | ||
174 | #define PTRACE_SETFPREGS 15 | ||
175 | #define PTRACE_GETREGS64 22 | ||
176 | #define PTRACE_SETREGS64 23 | ||
177 | |||
178 | /* Calls to trace a 64bit program from a 32bit program */ | ||
179 | #define PPC_PTRACE_PEEKTEXT_3264 0x95 | ||
180 | #define PPC_PTRACE_PEEKDATA_3264 0x94 | ||
181 | #define PPC_PTRACE_POKETEXT_3264 0x93 | ||
182 | #define PPC_PTRACE_POKEDATA_3264 0x92 | ||
183 | #define PPC_PTRACE_PEEKUSR_3264 0x91 | ||
184 | #define PPC_PTRACE_POKEUSR_3264 0x90 | ||
185 | |||
186 | #define PTRACE_SINGLEBLOCK 0x100 /* resume execution until next branch */ | ||
187 | |||
188 | #define PPC_PTRACE_GETHWDBGINFO 0x89 | ||
189 | #define PPC_PTRACE_SETHWDEBUG 0x88 | ||
190 | #define PPC_PTRACE_DELHWDEBUG 0x87 | ||
191 | |||
192 | #ifndef __ASSEMBLY__ | ||
193 | |||
194 | struct ppc_debug_info { | ||
195 | __u32 version; /* Only version 1 exists to date */ | ||
196 | __u32 num_instruction_bps; | ||
197 | __u32 num_data_bps; | ||
198 | __u32 num_condition_regs; | ||
199 | __u32 data_bp_alignment; | ||
200 | __u32 sizeof_condition; /* size of the DVC register */ | ||
201 | __u64 features; | ||
202 | }; | ||
203 | |||
204 | #endif /* __ASSEMBLY__ */ | ||
205 | |||
206 | /* | ||
207 | * features will have bits indication whether there is support for: | ||
208 | */ | ||
209 | #define PPC_DEBUG_FEATURE_INSN_BP_RANGE 0x0000000000000001 | ||
210 | #define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x0000000000000002 | ||
211 | #define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x0000000000000004 | ||
212 | #define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x0000000000000008 | ||
213 | |||
214 | #ifndef __ASSEMBLY__ | ||
215 | |||
216 | struct ppc_hw_breakpoint { | ||
217 | __u32 version; /* currently, version must be 1 */ | ||
218 | __u32 trigger_type; /* only some combinations allowed */ | ||
219 | __u32 addr_mode; /* address match mode */ | ||
220 | __u32 condition_mode; /* break/watchpoint condition flags */ | ||
221 | __u64 addr; /* break/watchpoint address */ | ||
222 | __u64 addr2; /* range end or mask */ | ||
223 | __u64 condition_value; /* contents of the DVC register */ | ||
224 | }; | ||
225 | |||
226 | #endif /* __ASSEMBLY__ */ | ||
227 | |||
228 | /* | ||
229 | * Trigger Type | ||
230 | */ | ||
231 | #define PPC_BREAKPOINT_TRIGGER_EXECUTE 0x00000001 | ||
232 | #define PPC_BREAKPOINT_TRIGGER_READ 0x00000002 | ||
233 | #define PPC_BREAKPOINT_TRIGGER_WRITE 0x00000004 | ||
234 | #define PPC_BREAKPOINT_TRIGGER_RW \ | ||
235 | (PPC_BREAKPOINT_TRIGGER_READ | PPC_BREAKPOINT_TRIGGER_WRITE) | ||
236 | |||
237 | /* | ||
238 | * Address Mode | ||
239 | */ | ||
240 | #define PPC_BREAKPOINT_MODE_EXACT 0x00000000 | ||
241 | #define PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE 0x00000001 | ||
242 | #define PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE 0x00000002 | ||
243 | #define PPC_BREAKPOINT_MODE_MASK 0x00000003 | ||
244 | |||
245 | /* | ||
246 | * Condition Mode | ||
247 | */ | ||
248 | #define PPC_BREAKPOINT_CONDITION_MODE 0x00000003 | ||
249 | #define PPC_BREAKPOINT_CONDITION_NONE 0x00000000 | ||
250 | #define PPC_BREAKPOINT_CONDITION_AND 0x00000001 | ||
251 | #define PPC_BREAKPOINT_CONDITION_EXACT PPC_BREAKPOINT_CONDITION_AND | ||
252 | #define PPC_BREAKPOINT_CONDITION_OR 0x00000002 | ||
253 | #define PPC_BREAKPOINT_CONDITION_AND_OR 0x00000003 | ||
254 | #define PPC_BREAKPOINT_CONDITION_BE_ALL 0x00ff0000 | ||
255 | #define PPC_BREAKPOINT_CONDITION_BE_SHIFT 16 | ||
256 | #define PPC_BREAKPOINT_CONDITION_BE(n) \ | ||
257 | (1<<((n)+PPC_BREAKPOINT_CONDITION_BE_SHIFT)) | ||
258 | |||
259 | #endif /* _UAPI_ASM_POWERPC_PTRACE_H */ | ||
diff --git a/arch/powerpc/include/asm/resource.h b/arch/powerpc/include/uapi/asm/resource.h index 04bc4db8921..04bc4db8921 100644 --- a/arch/powerpc/include/asm/resource.h +++ b/arch/powerpc/include/uapi/asm/resource.h | |||
diff --git a/arch/powerpc/include/asm/seccomp.h b/arch/powerpc/include/uapi/asm/seccomp.h index 00c1d9133cf..00c1d9133cf 100644 --- a/arch/powerpc/include/asm/seccomp.h +++ b/arch/powerpc/include/uapi/asm/seccomp.h | |||
diff --git a/arch/powerpc/include/asm/sembuf.h b/arch/powerpc/include/uapi/asm/sembuf.h index 99a41938ae3..99a41938ae3 100644 --- a/arch/powerpc/include/asm/sembuf.h +++ b/arch/powerpc/include/uapi/asm/sembuf.h | |||
diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/uapi/asm/setup.h index 8b9a306260b..8b9a306260b 100644 --- a/arch/powerpc/include/asm/setup.h +++ b/arch/powerpc/include/uapi/asm/setup.h | |||
diff --git a/arch/powerpc/include/asm/shmbuf.h b/arch/powerpc/include/uapi/asm/shmbuf.h index 8efa39698b6..8efa39698b6 100644 --- a/arch/powerpc/include/asm/shmbuf.h +++ b/arch/powerpc/include/uapi/asm/shmbuf.h | |||
diff --git a/arch/powerpc/include/asm/sigcontext.h b/arch/powerpc/include/uapi/asm/sigcontext.h index 9c1f24fd5d1..9c1f24fd5d1 100644 --- a/arch/powerpc/include/asm/sigcontext.h +++ b/arch/powerpc/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/powerpc/include/asm/siginfo.h b/arch/powerpc/include/uapi/asm/siginfo.h index ccce3ef5cd8..ccce3ef5cd8 100644 --- a/arch/powerpc/include/asm/siginfo.h +++ b/arch/powerpc/include/uapi/asm/siginfo.h | |||
diff --git a/arch/powerpc/include/uapi/asm/signal.h b/arch/powerpc/include/uapi/asm/signal.h new file mode 100644 index 00000000000..48fa8d3f2f9 --- /dev/null +++ b/arch/powerpc/include/uapi/asm/signal.h | |||
@@ -0,0 +1,145 @@ | |||
1 | #ifndef _UAPI_ASM_POWERPC_SIGNAL_H | ||
2 | #define _UAPI_ASM_POWERPC_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | #define _NSIG 64 | ||
7 | #ifdef __powerpc64__ | ||
8 | #define _NSIG_BPW 64 | ||
9 | #else | ||
10 | #define _NSIG_BPW 32 | ||
11 | #endif | ||
12 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | ||
13 | |||
14 | typedef unsigned long old_sigset_t; /* at least 32 bits */ | ||
15 | |||
16 | typedef struct { | ||
17 | unsigned long sig[_NSIG_WORDS]; | ||
18 | } sigset_t; | ||
19 | |||
20 | #define SIGHUP 1 | ||
21 | #define SIGINT 2 | ||
22 | #define SIGQUIT 3 | ||
23 | #define SIGILL 4 | ||
24 | #define SIGTRAP 5 | ||
25 | #define SIGABRT 6 | ||
26 | #define SIGIOT 6 | ||
27 | #define SIGBUS 7 | ||
28 | #define SIGFPE 8 | ||
29 | #define SIGKILL 9 | ||
30 | #define SIGUSR1 10 | ||
31 | #define SIGSEGV 11 | ||
32 | #define SIGUSR2 12 | ||
33 | #define SIGPIPE 13 | ||
34 | #define SIGALRM 14 | ||
35 | #define SIGTERM 15 | ||
36 | #define SIGSTKFLT 16 | ||
37 | #define SIGCHLD 17 | ||
38 | #define SIGCONT 18 | ||
39 | #define SIGSTOP 19 | ||
40 | #define SIGTSTP 20 | ||
41 | #define SIGTTIN 21 | ||
42 | #define SIGTTOU 22 | ||
43 | #define SIGURG 23 | ||
44 | #define SIGXCPU 24 | ||
45 | #define SIGXFSZ 25 | ||
46 | #define SIGVTALRM 26 | ||
47 | #define SIGPROF 27 | ||
48 | #define SIGWINCH 28 | ||
49 | #define SIGIO 29 | ||
50 | #define SIGPOLL SIGIO | ||
51 | /* | ||
52 | #define SIGLOST 29 | ||
53 | */ | ||
54 | #define SIGPWR 30 | ||
55 | #define SIGSYS 31 | ||
56 | #define SIGUNUSED 31 | ||
57 | |||
58 | /* These should not be considered constants from userland. */ | ||
59 | #define SIGRTMIN 32 | ||
60 | #define SIGRTMAX _NSIG | ||
61 | |||
62 | /* | ||
63 | * SA_FLAGS values: | ||
64 | * | ||
65 | * SA_ONSTACK is not currently supported, but will allow sigaltstack(2). | ||
66 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
67 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
68 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
69 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
70 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
71 | * | ||
72 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
73 | * Unix names RESETHAND and NODEFER respectively. | ||
74 | */ | ||
75 | #define SA_NOCLDSTOP 0x00000001U | ||
76 | #define SA_NOCLDWAIT 0x00000002U | ||
77 | #define SA_SIGINFO 0x00000004U | ||
78 | #define SA_ONSTACK 0x08000000U | ||
79 | #define SA_RESTART 0x10000000U | ||
80 | #define SA_NODEFER 0x40000000U | ||
81 | #define SA_RESETHAND 0x80000000U | ||
82 | |||
83 | #define SA_NOMASK SA_NODEFER | ||
84 | #define SA_ONESHOT SA_RESETHAND | ||
85 | |||
86 | #define SA_RESTORER 0x04000000U | ||
87 | |||
88 | /* | ||
89 | * sigaltstack controls | ||
90 | */ | ||
91 | #define SS_ONSTACK 1 | ||
92 | #define SS_DISABLE 2 | ||
93 | |||
94 | #define MINSIGSTKSZ 2048 | ||
95 | #define SIGSTKSZ 8192 | ||
96 | |||
97 | #include <asm-generic/signal-defs.h> | ||
98 | |||
99 | struct old_sigaction { | ||
100 | __sighandler_t sa_handler; | ||
101 | old_sigset_t sa_mask; | ||
102 | unsigned long sa_flags; | ||
103 | __sigrestore_t sa_restorer; | ||
104 | }; | ||
105 | |||
106 | struct sigaction { | ||
107 | __sighandler_t sa_handler; | ||
108 | unsigned long sa_flags; | ||
109 | __sigrestore_t sa_restorer; | ||
110 | sigset_t sa_mask; /* mask last for extensibility */ | ||
111 | }; | ||
112 | |||
113 | struct k_sigaction { | ||
114 | struct sigaction sa; | ||
115 | }; | ||
116 | |||
117 | typedef struct sigaltstack { | ||
118 | void __user *ss_sp; | ||
119 | int ss_flags; | ||
120 | size_t ss_size; | ||
121 | } stack_t; | ||
122 | |||
123 | |||
124 | #ifndef __powerpc64__ | ||
125 | /* | ||
126 | * These are parameters to dbg_sigreturn syscall. They enable or | ||
127 | * disable certain debugging things that can be done from signal | ||
128 | * handlers. The dbg_sigreturn syscall *must* be called from a | ||
129 | * SA_SIGINFO signal so the ucontext can be passed to it. It takes an | ||
130 | * array of struct sig_dbg_op, which has the debug operations to | ||
131 | * perform before returning from the signal. | ||
132 | */ | ||
133 | struct sig_dbg_op { | ||
134 | int dbg_type; | ||
135 | unsigned long dbg_value; | ||
136 | }; | ||
137 | |||
138 | /* Enable or disable single-stepping. The value sets the state. */ | ||
139 | #define SIG_DBG_SINGLE_STEPPING 1 | ||
140 | |||
141 | /* Enable or disable branch tracing. The value sets the state. */ | ||
142 | #define SIG_DBG_BRANCH_TRACING 2 | ||
143 | #endif /* ! __powerpc64__ */ | ||
144 | |||
145 | #endif /* _UAPI_ASM_POWERPC_SIGNAL_H */ | ||
diff --git a/arch/powerpc/include/asm/socket.h b/arch/powerpc/include/uapi/asm/socket.h index 3d5179bb122..3d5179bb122 100644 --- a/arch/powerpc/include/asm/socket.h +++ b/arch/powerpc/include/uapi/asm/socket.h | |||
diff --git a/arch/powerpc/include/asm/sockios.h b/arch/powerpc/include/uapi/asm/sockios.h index 55cef7675a3..55cef7675a3 100644 --- a/arch/powerpc/include/asm/sockios.h +++ b/arch/powerpc/include/uapi/asm/sockios.h | |||
diff --git a/arch/powerpc/include/uapi/asm/spu_info.h b/arch/powerpc/include/uapi/asm/spu_info.h new file mode 100644 index 00000000000..ed071bf9770 --- /dev/null +++ b/arch/powerpc/include/uapi/asm/spu_info.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * SPU info structures | ||
3 | * | ||
4 | * (C) Copyright 2006 IBM Corp. | ||
5 | * | ||
6 | * Author: Dwayne Grant McConnell <decimal@us.ibm.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2, or (at your option) | ||
11 | * any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | */ | ||
22 | |||
23 | #ifndef _UAPI_SPU_INFO_H | ||
24 | #define _UAPI_SPU_INFO_H | ||
25 | |||
26 | #include <linux/types.h> | ||
27 | |||
28 | #ifndef __KERNEL__ | ||
29 | struct mfc_cq_sr { | ||
30 | __u64 mfc_cq_data0_RW; | ||
31 | __u64 mfc_cq_data1_RW; | ||
32 | __u64 mfc_cq_data2_RW; | ||
33 | __u64 mfc_cq_data3_RW; | ||
34 | }; | ||
35 | #endif /* __KERNEL__ */ | ||
36 | |||
37 | struct spu_dma_info { | ||
38 | __u64 dma_info_type; | ||
39 | __u64 dma_info_mask; | ||
40 | __u64 dma_info_status; | ||
41 | __u64 dma_info_stall_and_notify; | ||
42 | __u64 dma_info_atomic_command_status; | ||
43 | struct mfc_cq_sr dma_info_command_data[16]; | ||
44 | }; | ||
45 | |||
46 | struct spu_proxydma_info { | ||
47 | __u64 proxydma_info_type; | ||
48 | __u64 proxydma_info_mask; | ||
49 | __u64 proxydma_info_status; | ||
50 | struct mfc_cq_sr proxydma_info_command_data[8]; | ||
51 | }; | ||
52 | |||
53 | #endif /* _UAPI_SPU_INFO_H */ | ||
diff --git a/arch/powerpc/include/asm/stat.h b/arch/powerpc/include/uapi/asm/stat.h index 84880b80cc1..84880b80cc1 100644 --- a/arch/powerpc/include/asm/stat.h +++ b/arch/powerpc/include/uapi/asm/stat.h | |||
diff --git a/arch/powerpc/include/asm/statfs.h b/arch/powerpc/include/uapi/asm/statfs.h index 5244834583a..5244834583a 100644 --- a/arch/powerpc/include/asm/statfs.h +++ b/arch/powerpc/include/uapi/asm/statfs.h | |||
diff --git a/arch/powerpc/include/uapi/asm/swab.h b/arch/powerpc/include/uapi/asm/swab.h new file mode 100644 index 00000000000..b6c368aa5c0 --- /dev/null +++ b/arch/powerpc/include/uapi/asm/swab.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or | ||
3 | * modify it under the terms of the GNU General Public License | ||
4 | * as published by the Free Software Foundation; either version | ||
5 | * 2 of the License, or (at your option) any later version. | ||
6 | */ | ||
7 | #ifndef _UAPI_ASM_POWERPC_SWAB_H | ||
8 | #define _UAPI_ASM_POWERPC_SWAB_H | ||
9 | |||
10 | |||
11 | #include <linux/types.h> | ||
12 | #include <linux/compiler.h> | ||
13 | |||
14 | #ifdef __GNUC__ | ||
15 | |||
16 | #ifndef __powerpc64__ | ||
17 | #define __SWAB_64_THRU_32__ | ||
18 | #endif /* __powerpc64__ */ | ||
19 | |||
20 | |||
21 | #endif /* __GNUC__ */ | ||
22 | |||
23 | #endif /* _UAPI_ASM_POWERPC_SWAB_H */ | ||
diff --git a/arch/powerpc/include/asm/termbits.h b/arch/powerpc/include/uapi/asm/termbits.h index 549d700e18f..549d700e18f 100644 --- a/arch/powerpc/include/asm/termbits.h +++ b/arch/powerpc/include/uapi/asm/termbits.h | |||
diff --git a/arch/powerpc/include/uapi/asm/termios.h b/arch/powerpc/include/uapi/asm/termios.h new file mode 100644 index 00000000000..6cca5cdfec0 --- /dev/null +++ b/arch/powerpc/include/uapi/asm/termios.h | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * Liberally adapted from alpha/termios.h. In particular, the c_cc[] | ||
3 | * fields have been reordered so that termio & termios share the | ||
4 | * common subset in the same order (for brain dead programs that don't | ||
5 | * know or care about the differences). | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version | ||
10 | * 2 of the License, or (at your option) any later version. | ||
11 | */ | ||
12 | #ifndef _UAPI_ASM_POWERPC_TERMIOS_H | ||
13 | #define _UAPI_ASM_POWERPC_TERMIOS_H | ||
14 | |||
15 | |||
16 | #include <asm/ioctls.h> | ||
17 | #include <asm/termbits.h> | ||
18 | |||
19 | struct sgttyb { | ||
20 | char sg_ispeed; | ||
21 | char sg_ospeed; | ||
22 | char sg_erase; | ||
23 | char sg_kill; | ||
24 | short sg_flags; | ||
25 | }; | ||
26 | |||
27 | struct tchars { | ||
28 | char t_intrc; | ||
29 | char t_quitc; | ||
30 | char t_startc; | ||
31 | char t_stopc; | ||
32 | char t_eofc; | ||
33 | char t_brkc; | ||
34 | }; | ||
35 | |||
36 | struct ltchars { | ||
37 | char t_suspc; | ||
38 | char t_dsuspc; | ||
39 | char t_rprntc; | ||
40 | char t_flushc; | ||
41 | char t_werasc; | ||
42 | char t_lnextc; | ||
43 | }; | ||
44 | |||
45 | struct winsize { | ||
46 | unsigned short ws_row; | ||
47 | unsigned short ws_col; | ||
48 | unsigned short ws_xpixel; | ||
49 | unsigned short ws_ypixel; | ||
50 | }; | ||
51 | |||
52 | #define NCC 10 | ||
53 | struct termio { | ||
54 | unsigned short c_iflag; /* input mode flags */ | ||
55 | unsigned short c_oflag; /* output mode flags */ | ||
56 | unsigned short c_cflag; /* control mode flags */ | ||
57 | unsigned short c_lflag; /* local mode flags */ | ||
58 | unsigned char c_line; /* line discipline */ | ||
59 | unsigned char c_cc[NCC]; /* control characters */ | ||
60 | }; | ||
61 | |||
62 | /* c_cc characters */ | ||
63 | #define _VINTR 0 | ||
64 | #define _VQUIT 1 | ||
65 | #define _VERASE 2 | ||
66 | #define _VKILL 3 | ||
67 | #define _VEOF 4 | ||
68 | #define _VMIN 5 | ||
69 | #define _VEOL 6 | ||
70 | #define _VTIME 7 | ||
71 | #define _VEOL2 8 | ||
72 | #define _VSWTC 9 | ||
73 | |||
74 | |||
75 | |||
76 | #endif /* _UAPI_ASM_POWERPC_TERMIOS_H */ | ||
diff --git a/arch/powerpc/include/uapi/asm/types.h b/arch/powerpc/include/uapi/asm/types.h new file mode 100644 index 00000000000..4b8ab990a3c --- /dev/null +++ b/arch/powerpc/include/uapi/asm/types.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * This file is never included by application software unless | ||
3 | * explicitly requested (e.g., via linux/types.h) in which case the | ||
4 | * application is Linux specific so (user-) name space pollution is | ||
5 | * not a major issue. However, for interoperability, libraries still | ||
6 | * need to be careful to avoid a name clashes. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version | ||
11 | * 2 of the License, or (at your option) any later version. | ||
12 | */ | ||
13 | #ifndef _UAPI_ASM_POWERPC_TYPES_H | ||
14 | #define _UAPI_ASM_POWERPC_TYPES_H | ||
15 | |||
16 | /* | ||
17 | * This is here because we used to use l64 for 64bit powerpc | ||
18 | * and we don't want to impact user mode with our change to ll64 | ||
19 | * in the kernel. | ||
20 | * | ||
21 | * However, some user programs are fine with this. They can | ||
22 | * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here. | ||
23 | */ | ||
24 | #if !defined(__SANE_USERSPACE_TYPES__) && defined(__powerpc64__) && !defined(__KERNEL__) | ||
25 | # include <asm-generic/int-l64.h> | ||
26 | #else | ||
27 | # include <asm-generic/int-ll64.h> | ||
28 | #endif | ||
29 | |||
30 | #ifndef __ASSEMBLY__ | ||
31 | |||
32 | |||
33 | typedef struct { | ||
34 | __u32 u[4]; | ||
35 | } __attribute__((aligned(16))) __vector128; | ||
36 | |||
37 | #endif /* __ASSEMBLY__ */ | ||
38 | |||
39 | |||
40 | #endif /* _UAPI_ASM_POWERPC_TYPES_H */ | ||
diff --git a/arch/powerpc/include/asm/ucontext.h b/arch/powerpc/include/uapi/asm/ucontext.h index d9a4ddf0cc8..d9a4ddf0cc8 100644 --- a/arch/powerpc/include/asm/ucontext.h +++ b/arch/powerpc/include/uapi/asm/ucontext.h | |||
diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h new file mode 100644 index 00000000000..380b5d37a90 --- /dev/null +++ b/arch/powerpc/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,380 @@ | |||
1 | /* | ||
2 | * This file contains the system call numbers. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | #ifndef _UAPI_ASM_POWERPC_UNISTD_H_ | ||
10 | #define _UAPI_ASM_POWERPC_UNISTD_H_ | ||
11 | |||
12 | |||
13 | #define __NR_restart_syscall 0 | ||
14 | #define __NR_exit 1 | ||
15 | #define __NR_fork 2 | ||
16 | #define __NR_read 3 | ||
17 | #define __NR_write 4 | ||
18 | #define __NR_open 5 | ||
19 | #define __NR_close 6 | ||
20 | #define __NR_waitpid 7 | ||
21 | #define __NR_creat 8 | ||
22 | #define __NR_link 9 | ||
23 | #define __NR_unlink 10 | ||
24 | #define __NR_execve 11 | ||
25 | #define __NR_chdir 12 | ||
26 | #define __NR_time 13 | ||
27 | #define __NR_mknod 14 | ||
28 | #define __NR_chmod 15 | ||
29 | #define __NR_lchown 16 | ||
30 | #define __NR_break 17 | ||
31 | #define __NR_oldstat 18 | ||
32 | #define __NR_lseek 19 | ||
33 | #define __NR_getpid 20 | ||
34 | #define __NR_mount 21 | ||
35 | #define __NR_umount 22 | ||
36 | #define __NR_setuid 23 | ||
37 | #define __NR_getuid 24 | ||
38 | #define __NR_stime 25 | ||
39 | #define __NR_ptrace 26 | ||
40 | #define __NR_alarm 27 | ||
41 | #define __NR_oldfstat 28 | ||
42 | #define __NR_pause 29 | ||
43 | #define __NR_utime 30 | ||
44 | #define __NR_stty 31 | ||
45 | #define __NR_gtty 32 | ||
46 | #define __NR_access 33 | ||
47 | #define __NR_nice 34 | ||
48 | #define __NR_ftime 35 | ||
49 | #define __NR_sync 36 | ||
50 | #define __NR_kill 37 | ||
51 | #define __NR_rename 38 | ||
52 | #define __NR_mkdir 39 | ||
53 | #define __NR_rmdir 40 | ||
54 | #define __NR_dup 41 | ||
55 | #define __NR_pipe 42 | ||
56 | #define __NR_times 43 | ||
57 | #define __NR_prof 44 | ||
58 | #define __NR_brk 45 | ||
59 | #define __NR_setgid 46 | ||
60 | #define __NR_getgid 47 | ||
61 | #define __NR_signal 48 | ||
62 | #define __NR_geteuid 49 | ||
63 | #define __NR_getegid 50 | ||
64 | #define __NR_acct 51 | ||
65 | #define __NR_umount2 52 | ||
66 | #define __NR_lock 53 | ||
67 | #define __NR_ioctl 54 | ||
68 | #define __NR_fcntl 55 | ||
69 | #define __NR_mpx 56 | ||
70 | #define __NR_setpgid 57 | ||
71 | #define __NR_ulimit 58 | ||
72 | #define __NR_oldolduname 59 | ||
73 | #define __NR_umask 60 | ||
74 | #define __NR_chroot 61 | ||
75 | #define __NR_ustat 62 | ||
76 | #define __NR_dup2 63 | ||
77 | #define __NR_getppid 64 | ||
78 | #define __NR_getpgrp 65 | ||
79 | #define __NR_setsid 66 | ||
80 | #define __NR_sigaction 67 | ||
81 | #define __NR_sgetmask 68 | ||
82 | #define __NR_ssetmask 69 | ||
83 | #define __NR_setreuid 70 | ||
84 | #define __NR_setregid 71 | ||
85 | #define __NR_sigsuspend 72 | ||
86 | #define __NR_sigpending 73 | ||
87 | #define __NR_sethostname 74 | ||
88 | #define __NR_setrlimit 75 | ||
89 | #define __NR_getrlimit 76 | ||
90 | #define __NR_getrusage 77 | ||
91 | #define __NR_gettimeofday 78 | ||
92 | #define __NR_settimeofday 79 | ||
93 | #define __NR_getgroups 80 | ||
94 | #define __NR_setgroups 81 | ||
95 | #define __NR_select 82 | ||
96 | #define __NR_symlink 83 | ||
97 | #define __NR_oldlstat 84 | ||
98 | #define __NR_readlink 85 | ||
99 | #define __NR_uselib 86 | ||
100 | #define __NR_swapon 87 | ||
101 | #define __NR_reboot 88 | ||
102 | #define __NR_readdir 89 | ||
103 | #define __NR_mmap 90 | ||
104 | #define __NR_munmap 91 | ||
105 | #define __NR_truncate 92 | ||
106 | #define __NR_ftruncate 93 | ||
107 | #define __NR_fchmod 94 | ||
108 | #define __NR_fchown 95 | ||
109 | #define __NR_getpriority 96 | ||
110 | #define __NR_setpriority 97 | ||
111 | #define __NR_profil 98 | ||
112 | #define __NR_statfs 99 | ||
113 | #define __NR_fstatfs 100 | ||
114 | #define __NR_ioperm 101 | ||
115 | #define __NR_socketcall 102 | ||
116 | #define __NR_syslog 103 | ||
117 | #define __NR_setitimer 104 | ||
118 | #define __NR_getitimer 105 | ||
119 | #define __NR_stat 106 | ||
120 | #define __NR_lstat 107 | ||
121 | #define __NR_fstat 108 | ||
122 | #define __NR_olduname 109 | ||
123 | #define __NR_iopl 110 | ||
124 | #define __NR_vhangup 111 | ||
125 | #define __NR_idle 112 | ||
126 | #define __NR_vm86 113 | ||
127 | #define __NR_wait4 114 | ||
128 | #define __NR_swapoff 115 | ||
129 | #define __NR_sysinfo 116 | ||
130 | #define __NR_ipc 117 | ||
131 | #define __NR_fsync 118 | ||
132 | #define __NR_sigreturn 119 | ||
133 | #define __NR_clone 120 | ||
134 | #define __NR_setdomainname 121 | ||
135 | #define __NR_uname 122 | ||
136 | #define __NR_modify_ldt 123 | ||
137 | #define __NR_adjtimex 124 | ||
138 | #define __NR_mprotect 125 | ||
139 | #define __NR_sigprocmask 126 | ||
140 | #define __NR_create_module 127 | ||
141 | #define __NR_init_module 128 | ||
142 | #define __NR_delete_module 129 | ||
143 | #define __NR_get_kernel_syms 130 | ||
144 | #define __NR_quotactl 131 | ||
145 | #define __NR_getpgid 132 | ||
146 | #define __NR_fchdir 133 | ||
147 | #define __NR_bdflush 134 | ||
148 | #define __NR_sysfs 135 | ||
149 | #define __NR_personality 136 | ||
150 | #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ | ||
151 | #define __NR_setfsuid 138 | ||
152 | #define __NR_setfsgid 139 | ||
153 | #define __NR__llseek 140 | ||
154 | #define __NR_getdents 141 | ||
155 | #define __NR__newselect 142 | ||
156 | #define __NR_flock 143 | ||
157 | #define __NR_msync 144 | ||
158 | #define __NR_readv 145 | ||
159 | #define __NR_writev 146 | ||
160 | #define __NR_getsid 147 | ||
161 | #define __NR_fdatasync 148 | ||
162 | #define __NR__sysctl 149 | ||
163 | #define __NR_mlock 150 | ||
164 | #define __NR_munlock 151 | ||
165 | #define __NR_mlockall 152 | ||
166 | #define __NR_munlockall 153 | ||
167 | #define __NR_sched_setparam 154 | ||
168 | #define __NR_sched_getparam 155 | ||
169 | #define __NR_sched_setscheduler 156 | ||
170 | #define __NR_sched_getscheduler 157 | ||
171 | #define __NR_sched_yield 158 | ||
172 | #define __NR_sched_get_priority_max 159 | ||
173 | #define __NR_sched_get_priority_min 160 | ||
174 | #define __NR_sched_rr_get_interval 161 | ||
175 | #define __NR_nanosleep 162 | ||
176 | #define __NR_mremap 163 | ||
177 | #define __NR_setresuid 164 | ||
178 | #define __NR_getresuid 165 | ||
179 | #define __NR_query_module 166 | ||
180 | #define __NR_poll 167 | ||
181 | #define __NR_nfsservctl 168 | ||
182 | #define __NR_setresgid 169 | ||
183 | #define __NR_getresgid 170 | ||
184 | #define __NR_prctl 171 | ||
185 | #define __NR_rt_sigreturn 172 | ||
186 | #define __NR_rt_sigaction 173 | ||
187 | #define __NR_rt_sigprocmask 174 | ||
188 | #define __NR_rt_sigpending 175 | ||
189 | #define __NR_rt_sigtimedwait 176 | ||
190 | #define __NR_rt_sigqueueinfo 177 | ||
191 | #define __NR_rt_sigsuspend 178 | ||
192 | #define __NR_pread64 179 | ||
193 | #define __NR_pwrite64 180 | ||
194 | #define __NR_chown 181 | ||
195 | #define __NR_getcwd 182 | ||
196 | #define __NR_capget 183 | ||
197 | #define __NR_capset 184 | ||
198 | #define __NR_sigaltstack 185 | ||
199 | #define __NR_sendfile 186 | ||
200 | #define __NR_getpmsg 187 /* some people actually want streams */ | ||
201 | #define __NR_putpmsg 188 /* some people actually want streams */ | ||
202 | #define __NR_vfork 189 | ||
203 | #define __NR_ugetrlimit 190 /* SuS compliant getrlimit */ | ||
204 | #define __NR_readahead 191 | ||
205 | #ifndef __powerpc64__ /* these are 32-bit only */ | ||
206 | #define __NR_mmap2 192 | ||
207 | #define __NR_truncate64 193 | ||
208 | #define __NR_ftruncate64 194 | ||
209 | #define __NR_stat64 195 | ||
210 | #define __NR_lstat64 196 | ||
211 | #define __NR_fstat64 197 | ||
212 | #endif | ||
213 | #define __NR_pciconfig_read 198 | ||
214 | #define __NR_pciconfig_write 199 | ||
215 | #define __NR_pciconfig_iobase 200 | ||
216 | #define __NR_multiplexer 201 | ||
217 | #define __NR_getdents64 202 | ||
218 | #define __NR_pivot_root 203 | ||
219 | #ifndef __powerpc64__ | ||
220 | #define __NR_fcntl64 204 | ||
221 | #endif | ||
222 | #define __NR_madvise 205 | ||
223 | #define __NR_mincore 206 | ||
224 | #define __NR_gettid 207 | ||
225 | #define __NR_tkill 208 | ||
226 | #define __NR_setxattr 209 | ||
227 | #define __NR_lsetxattr 210 | ||
228 | #define __NR_fsetxattr 211 | ||
229 | #define __NR_getxattr 212 | ||
230 | #define __NR_lgetxattr 213 | ||
231 | #define __NR_fgetxattr 214 | ||
232 | #define __NR_listxattr 215 | ||
233 | #define __NR_llistxattr 216 | ||
234 | #define __NR_flistxattr 217 | ||
235 | #define __NR_removexattr 218 | ||
236 | #define __NR_lremovexattr 219 | ||
237 | #define __NR_fremovexattr 220 | ||
238 | #define __NR_futex 221 | ||
239 | #define __NR_sched_setaffinity 222 | ||
240 | #define __NR_sched_getaffinity 223 | ||
241 | /* 224 currently unused */ | ||
242 | #define __NR_tuxcall 225 | ||
243 | #ifndef __powerpc64__ | ||
244 | #define __NR_sendfile64 226 | ||
245 | #endif | ||
246 | #define __NR_io_setup 227 | ||
247 | #define __NR_io_destroy 228 | ||
248 | #define __NR_io_getevents 229 | ||
249 | #define __NR_io_submit 230 | ||
250 | #define __NR_io_cancel 231 | ||
251 | #define __NR_set_tid_address 232 | ||
252 | #define __NR_fadvise64 233 | ||
253 | #define __NR_exit_group 234 | ||
254 | #define __NR_lookup_dcookie 235 | ||
255 | #define __NR_epoll_create 236 | ||
256 | #define __NR_epoll_ctl 237 | ||
257 | #define __NR_epoll_wait 238 | ||
258 | #define __NR_remap_file_pages 239 | ||
259 | #define __NR_timer_create 240 | ||
260 | #define __NR_timer_settime 241 | ||
261 | #define __NR_timer_gettime 242 | ||
262 | #define __NR_timer_getoverrun 243 | ||
263 | #define __NR_timer_delete 244 | ||
264 | #define __NR_clock_settime 245 | ||
265 | #define __NR_clock_gettime 246 | ||
266 | #define __NR_clock_getres 247 | ||
267 | #define __NR_clock_nanosleep 248 | ||
268 | #define __NR_swapcontext 249 | ||
269 | #define __NR_tgkill 250 | ||
270 | #define __NR_utimes 251 | ||
271 | #define __NR_statfs64 252 | ||
272 | #define __NR_fstatfs64 253 | ||
273 | #ifndef __powerpc64__ | ||
274 | #define __NR_fadvise64_64 254 | ||
275 | #endif | ||
276 | #define __NR_rtas 255 | ||
277 | #define __NR_sys_debug_setcontext 256 | ||
278 | /* Number 257 is reserved for vserver */ | ||
279 | #define __NR_migrate_pages 258 | ||
280 | #define __NR_mbind 259 | ||
281 | #define __NR_get_mempolicy 260 | ||
282 | #define __NR_set_mempolicy 261 | ||
283 | #define __NR_mq_open 262 | ||
284 | #define __NR_mq_unlink 263 | ||
285 | #define __NR_mq_timedsend 264 | ||
286 | #define __NR_mq_timedreceive 265 | ||
287 | #define __NR_mq_notify 266 | ||
288 | #define __NR_mq_getsetattr 267 | ||
289 | #define __NR_kexec_load 268 | ||
290 | #define __NR_add_key 269 | ||
291 | #define __NR_request_key 270 | ||
292 | #define __NR_keyctl 271 | ||
293 | #define __NR_waitid 272 | ||
294 | #define __NR_ioprio_set 273 | ||
295 | #define __NR_ioprio_get 274 | ||
296 | #define __NR_inotify_init 275 | ||
297 | #define __NR_inotify_add_watch 276 | ||
298 | #define __NR_inotify_rm_watch 277 | ||
299 | #define __NR_spu_run 278 | ||
300 | #define __NR_spu_create 279 | ||
301 | #define __NR_pselect6 280 | ||
302 | #define __NR_ppoll 281 | ||
303 | #define __NR_unshare 282 | ||
304 | #define __NR_splice 283 | ||
305 | #define __NR_tee 284 | ||
306 | #define __NR_vmsplice 285 | ||
307 | #define __NR_openat 286 | ||
308 | #define __NR_mkdirat 287 | ||
309 | #define __NR_mknodat 288 | ||
310 | #define __NR_fchownat 289 | ||
311 | #define __NR_futimesat 290 | ||
312 | #ifdef __powerpc64__ | ||
313 | #define __NR_newfstatat 291 | ||
314 | #else | ||
315 | #define __NR_fstatat64 291 | ||
316 | #endif | ||
317 | #define __NR_unlinkat 292 | ||
318 | #define __NR_renameat 293 | ||
319 | #define __NR_linkat 294 | ||
320 | #define __NR_symlinkat 295 | ||
321 | #define __NR_readlinkat 296 | ||
322 | #define __NR_fchmodat 297 | ||
323 | #define __NR_faccessat 298 | ||
324 | #define __NR_get_robust_list 299 | ||
325 | #define __NR_set_robust_list 300 | ||
326 | #define __NR_move_pages 301 | ||
327 | #define __NR_getcpu 302 | ||
328 | #define __NR_epoll_pwait 303 | ||
329 | #define __NR_utimensat 304 | ||
330 | #define __NR_signalfd 305 | ||
331 | #define __NR_timerfd_create 306 | ||
332 | #define __NR_eventfd 307 | ||
333 | #define __NR_sync_file_range2 308 | ||
334 | #define __NR_fallocate 309 | ||
335 | #define __NR_subpage_prot 310 | ||
336 | #define __NR_timerfd_settime 311 | ||
337 | #define __NR_timerfd_gettime 312 | ||
338 | #define __NR_signalfd4 313 | ||
339 | #define __NR_eventfd2 314 | ||
340 | #define __NR_epoll_create1 315 | ||
341 | #define __NR_dup3 316 | ||
342 | #define __NR_pipe2 317 | ||
343 | #define __NR_inotify_init1 318 | ||
344 | #define __NR_perf_event_open 319 | ||
345 | #define __NR_preadv 320 | ||
346 | #define __NR_pwritev 321 | ||
347 | #define __NR_rt_tgsigqueueinfo 322 | ||
348 | #define __NR_fanotify_init 323 | ||
349 | #define __NR_fanotify_mark 324 | ||
350 | #define __NR_prlimit64 325 | ||
351 | #define __NR_socket 326 | ||
352 | #define __NR_bind 327 | ||
353 | #define __NR_connect 328 | ||
354 | #define __NR_listen 329 | ||
355 | #define __NR_accept 330 | ||
356 | #define __NR_getsockname 331 | ||
357 | #define __NR_getpeername 332 | ||
358 | #define __NR_socketpair 333 | ||
359 | #define __NR_send 334 | ||
360 | #define __NR_sendto 335 | ||
361 | #define __NR_recv 336 | ||
362 | #define __NR_recvfrom 337 | ||
363 | #define __NR_shutdown 338 | ||
364 | #define __NR_setsockopt 339 | ||
365 | #define __NR_getsockopt 340 | ||
366 | #define __NR_sendmsg 341 | ||
367 | #define __NR_recvmsg 342 | ||
368 | #define __NR_recvmmsg 343 | ||
369 | #define __NR_accept4 344 | ||
370 | #define __NR_name_to_handle_at 345 | ||
371 | #define __NR_open_by_handle_at 346 | ||
372 | #define __NR_clock_adjtime 347 | ||
373 | #define __NR_syncfs 348 | ||
374 | #define __NR_sendmmsg 349 | ||
375 | #define __NR_setns 350 | ||
376 | #define __NR_process_vm_readv 351 | ||
377 | #define __NR_process_vm_writev 352 | ||
378 | |||
379 | |||
380 | #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ | ||
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index af37528da49..9499385676e 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -435,6 +435,22 @@ ret_from_fork: | |||
435 | li r3,0 | 435 | li r3,0 |
436 | b ret_from_syscall | 436 | b ret_from_syscall |
437 | 437 | ||
438 | .globl ret_from_kernel_thread | ||
439 | ret_from_kernel_thread: | ||
440 | REST_NVGPRS(r1) | ||
441 | bl schedule_tail | ||
442 | mtlr r14 | ||
443 | mr r3,r15 | ||
444 | PPC440EP_ERR42 | ||
445 | blrl | ||
446 | li r3,0 | ||
447 | b do_exit # no return | ||
448 | |||
449 | .globl __ret_from_kernel_execve | ||
450 | __ret_from_kernel_execve: | ||
451 | addi r1,r3,-STACK_FRAME_OVERHEAD | ||
452 | b ret_from_syscall | ||
453 | |||
438 | /* Traced system call support */ | 454 | /* Traced system call support */ |
439 | syscall_dotrace: | 455 | syscall_dotrace: |
440 | SAVE_NVGPRS(r1) | 456 | SAVE_NVGPRS(r1) |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 0e931aaffca..56e0ff0878b 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -370,6 +370,22 @@ _GLOBAL(ret_from_fork) | |||
370 | li r3,0 | 370 | li r3,0 |
371 | b syscall_exit | 371 | b syscall_exit |
372 | 372 | ||
373 | _GLOBAL(ret_from_kernel_thread) | ||
374 | bl .schedule_tail | ||
375 | REST_NVGPRS(r1) | ||
376 | REST_GPR(2,r1) | ||
377 | mtlr r14 | ||
378 | mr r3,r15 | ||
379 | blrl | ||
380 | li r3,0 | ||
381 | b .do_exit # no return | ||
382 | |||
383 | _GLOBAL(__ret_from_kernel_execve) | ||
384 | addi r1,r3,-STACK_FRAME_OVERHEAD | ||
385 | li r10,1 | ||
386 | std r10,SOFTE(r1) | ||
387 | b syscall_exit | ||
388 | |||
373 | .section ".toc","aw" | 389 | .section ".toc","aw" |
374 | DSCR_DEFAULT: | 390 | DSCR_DEFAULT: |
375 | .tc dscr_default[TC],dscr_default | 391 | .tc dscr_default[TC],dscr_default |
diff --git a/arch/powerpc/kernel/misc.S b/arch/powerpc/kernel/misc.S index ba16874fe29..7ce26d45777 100644 --- a/arch/powerpc/kernel/misc.S +++ b/arch/powerpc/kernel/misc.S | |||
@@ -54,13 +54,6 @@ _GLOBAL(add_reloc_offset) | |||
54 | .align 3 | 54 | .align 3 |
55 | 2: PPC_LONG 1b | 55 | 2: PPC_LONG 1b |
56 | 56 | ||
57 | _GLOBAL(kernel_execve) | ||
58 | li r0,__NR_execve | ||
59 | sc | ||
60 | bnslr | ||
61 | neg r3,r3 | ||
62 | blr | ||
63 | |||
64 | _GLOBAL(setjmp) | 57 | _GLOBAL(setjmp) |
65 | mflr r0 | 58 | mflr r0 |
66 | PPC_STL r0,0(r3) | 59 | PPC_STL r0,0(r3) |
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 407e293aad2..19e096bd0e7 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -663,39 +663,6 @@ _GLOBAL(abs) | |||
663 | sub r3,r3,r4 | 663 | sub r3,r3,r4 |
664 | blr | 664 | blr |
665 | 665 | ||
666 | /* | ||
667 | * Create a kernel thread | ||
668 | * kernel_thread(fn, arg, flags) | ||
669 | */ | ||
670 | _GLOBAL(kernel_thread) | ||
671 | stwu r1,-16(r1) | ||
672 | stw r30,8(r1) | ||
673 | stw r31,12(r1) | ||
674 | mr r30,r3 /* function */ | ||
675 | mr r31,r4 /* argument */ | ||
676 | ori r3,r5,CLONE_VM /* flags */ | ||
677 | oris r3,r3,CLONE_UNTRACED>>16 | ||
678 | li r4,0 /* new sp (unused) */ | ||
679 | li r0,__NR_clone | ||
680 | sc | ||
681 | bns+ 1f /* did system call indicate error? */ | ||
682 | neg r3,r3 /* if so, make return code negative */ | ||
683 | 1: cmpwi 0,r3,0 /* parent or child? */ | ||
684 | bne 2f /* return if parent */ | ||
685 | li r0,0 /* make top-level stack frame */ | ||
686 | stwu r0,-16(r1) | ||
687 | mtlr r30 /* fn addr in lr */ | ||
688 | mr r3,r31 /* load arg and call fn */ | ||
689 | PPC440EP_ERR42 | ||
690 | blrl | ||
691 | li r0,__NR_exit /* exit if function returns */ | ||
692 | li r3,0 | ||
693 | sc | ||
694 | 2: lwz r30,8(r1) | ||
695 | lwz r31,12(r1) | ||
696 | addi r1,r1,16 | ||
697 | blr | ||
698 | |||
699 | #ifdef CONFIG_SMP | 666 | #ifdef CONFIG_SMP |
700 | _GLOBAL(start_secondary_resume) | 667 | _GLOBAL(start_secondary_resume) |
701 | /* Reset stack */ | 668 | /* Reset stack */ |
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index 565b78625a3..5cfa8008693 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
@@ -407,40 +407,6 @@ _GLOBAL(scom970_write) | |||
407 | 407 | ||
408 | 408 | ||
409 | /* | 409 | /* |
410 | * Create a kernel thread | ||
411 | * kernel_thread(fn, arg, flags) | ||
412 | */ | ||
413 | _GLOBAL(kernel_thread) | ||
414 | std r29,-24(r1) | ||
415 | std r30,-16(r1) | ||
416 | stdu r1,-STACK_FRAME_OVERHEAD(r1) | ||
417 | mr r29,r3 | ||
418 | mr r30,r4 | ||
419 | ori r3,r5,CLONE_VM /* flags */ | ||
420 | oris r3,r3,(CLONE_UNTRACED>>16) | ||
421 | li r4,0 /* new sp (unused) */ | ||
422 | li r0,__NR_clone | ||
423 | sc | ||
424 | bns+ 1f /* did system call indicate error? */ | ||
425 | neg r3,r3 /* if so, make return code negative */ | ||
426 | 1: cmpdi 0,r3,0 /* parent or child? */ | ||
427 | bne 2f /* return if parent */ | ||
428 | li r0,0 | ||
429 | stdu r0,-STACK_FRAME_OVERHEAD(r1) | ||
430 | ld r2,8(r29) | ||
431 | ld r29,0(r29) | ||
432 | mtlr r29 /* fn addr in lr */ | ||
433 | mr r3,r30 /* load arg and call fn */ | ||
434 | blrl | ||
435 | li r0,__NR_exit /* exit after child exits */ | ||
436 | li r3,0 | ||
437 | sc | ||
438 | 2: addi r1,r1,STACK_FRAME_OVERHEAD | ||
439 | ld r29,-24(r1) | ||
440 | ld r30,-16(r1) | ||
441 | blr | ||
442 | |||
443 | /* | ||
444 | * disable_kernel_fp() | 410 | * disable_kernel_fp() |
445 | * Disable the FPU. | 411 | * Disable the FPU. |
446 | */ | 412 | */ |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 3e4031581c6..19e4288d848 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -94,7 +94,6 @@ EXPORT_SYMBOL(pci_dram_offset); | |||
94 | #endif /* CONFIG_PCI */ | 94 | #endif /* CONFIG_PCI */ |
95 | 95 | ||
96 | EXPORT_SYMBOL(start_thread); | 96 | EXPORT_SYMBOL(start_thread); |
97 | EXPORT_SYMBOL(kernel_thread); | ||
98 | 97 | ||
99 | EXPORT_SYMBOL(giveup_fpu); | 98 | EXPORT_SYMBOL(giveup_fpu); |
100 | #ifdef CONFIG_ALTIVEC | 99 | #ifdef CONFIG_ALTIVEC |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index d5ad666efd8..ba48233500f 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -733,30 +733,39 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) | |||
733 | extern unsigned long dscr_default; /* defined in arch/powerpc/kernel/sysfs.c */ | 733 | extern unsigned long dscr_default; /* defined in arch/powerpc/kernel/sysfs.c */ |
734 | 734 | ||
735 | int copy_thread(unsigned long clone_flags, unsigned long usp, | 735 | int copy_thread(unsigned long clone_flags, unsigned long usp, |
736 | unsigned long unused, struct task_struct *p, | 736 | unsigned long arg, struct task_struct *p, |
737 | struct pt_regs *regs) | 737 | struct pt_regs *regs) |
738 | { | 738 | { |
739 | struct pt_regs *childregs, *kregs; | 739 | struct pt_regs *childregs, *kregs; |
740 | extern void ret_from_fork(void); | 740 | extern void ret_from_fork(void); |
741 | extern void ret_from_kernel_thread(void); | ||
742 | void (*f)(void); | ||
741 | unsigned long sp = (unsigned long)task_stack_page(p) + THREAD_SIZE; | 743 | unsigned long sp = (unsigned long)task_stack_page(p) + THREAD_SIZE; |
742 | 744 | ||
743 | CHECK_FULL_REGS(regs); | ||
744 | /* Copy registers */ | 745 | /* Copy registers */ |
745 | sp -= sizeof(struct pt_regs); | 746 | sp -= sizeof(struct pt_regs); |
746 | childregs = (struct pt_regs *) sp; | 747 | childregs = (struct pt_regs *) sp; |
747 | *childregs = *regs; | 748 | if (!regs) { |
748 | if ((childregs->msr & MSR_PR) == 0) { | ||
749 | /* for kernel thread, set `current' and stackptr in new task */ | 749 | /* for kernel thread, set `current' and stackptr in new task */ |
750 | memset(childregs, 0, sizeof(struct pt_regs)); | ||
750 | childregs->gpr[1] = sp + sizeof(struct pt_regs); | 751 | childregs->gpr[1] = sp + sizeof(struct pt_regs); |
751 | #ifdef CONFIG_PPC32 | 752 | #ifdef CONFIG_PPC64 |
752 | childregs->gpr[2] = (unsigned long) p; | 753 | childregs->gpr[14] = *(unsigned long *)usp; |
753 | #else | 754 | childregs->gpr[2] = ((unsigned long *)usp)[1], |
754 | clear_tsk_thread_flag(p, TIF_32BIT); | 755 | clear_tsk_thread_flag(p, TIF_32BIT); |
756 | #else | ||
757 | childregs->gpr[14] = usp; /* function */ | ||
758 | childregs->gpr[2] = (unsigned long) p; | ||
755 | #endif | 759 | #endif |
760 | childregs->gpr[15] = arg; | ||
756 | p->thread.regs = NULL; /* no user register state */ | 761 | p->thread.regs = NULL; /* no user register state */ |
762 | f = ret_from_kernel_thread; | ||
757 | } else { | 763 | } else { |
764 | CHECK_FULL_REGS(regs); | ||
765 | *childregs = *regs; | ||
758 | childregs->gpr[1] = usp; | 766 | childregs->gpr[1] = usp; |
759 | p->thread.regs = childregs; | 767 | p->thread.regs = childregs; |
768 | childregs->gpr[3] = 0; /* Result from fork() */ | ||
760 | if (clone_flags & CLONE_SETTLS) { | 769 | if (clone_flags & CLONE_SETTLS) { |
761 | #ifdef CONFIG_PPC64 | 770 | #ifdef CONFIG_PPC64 |
762 | if (!is_32bit_task()) | 771 | if (!is_32bit_task()) |
@@ -765,8 +774,9 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
765 | #endif | 774 | #endif |
766 | childregs->gpr[2] = childregs->gpr[6]; | 775 | childregs->gpr[2] = childregs->gpr[6]; |
767 | } | 776 | } |
777 | |||
778 | f = ret_from_fork; | ||
768 | } | 779 | } |
769 | childregs->gpr[3] = 0; /* Result from fork() */ | ||
770 | sp -= STACK_FRAME_OVERHEAD; | 780 | sp -= STACK_FRAME_OVERHEAD; |
771 | 781 | ||
772 | /* | 782 | /* |
@@ -805,19 +815,17 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
805 | p->thread.dscr = current->thread.dscr; | 815 | p->thread.dscr = current->thread.dscr; |
806 | } | 816 | } |
807 | #endif | 817 | #endif |
808 | |||
809 | /* | 818 | /* |
810 | * The PPC64 ABI makes use of a TOC to contain function | 819 | * The PPC64 ABI makes use of a TOC to contain function |
811 | * pointers. The function (ret_from_except) is actually a pointer | 820 | * pointers. The function (ret_from_except) is actually a pointer |
812 | * to the TOC entry. The first entry is a pointer to the actual | 821 | * to the TOC entry. The first entry is a pointer to the actual |
813 | * function. | 822 | * function. |
814 | */ | 823 | */ |
815 | #ifdef CONFIG_PPC64 | 824 | #ifdef CONFIG_PPC64 |
816 | kregs->nip = *((unsigned long *)ret_from_fork); | 825 | kregs->nip = *((unsigned long *)f); |
817 | #else | 826 | #else |
818 | kregs->nip = (unsigned long)ret_from_fork; | 827 | kregs->nip = (unsigned long)f; |
819 | #endif | 828 | #endif |
820 | |||
821 | return 0; | 829 | return 0; |
822 | } | 830 | } |
823 | 831 | ||
@@ -1055,26 +1063,13 @@ int sys_vfork(unsigned long p1, unsigned long p2, unsigned long p3, | |||
1055 | regs, 0, NULL, NULL); | 1063 | regs, 0, NULL, NULL); |
1056 | } | 1064 | } |
1057 | 1065 | ||
1058 | int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2, | 1066 | void __ret_from_kernel_execve(struct pt_regs *normal) |
1059 | unsigned long a3, unsigned long a4, unsigned long a5, | 1067 | __noreturn; |
1060 | struct pt_regs *regs) | 1068 | |
1069 | void ret_from_kernel_execve(struct pt_regs *normal) | ||
1061 | { | 1070 | { |
1062 | int error; | 1071 | set_thread_flag(TIF_RESTOREALL); |
1063 | char *filename; | 1072 | __ret_from_kernel_execve(normal); |
1064 | |||
1065 | filename = getname((const char __user *) a0); | ||
1066 | error = PTR_ERR(filename); | ||
1067 | if (IS_ERR(filename)) | ||
1068 | goto out; | ||
1069 | flush_fp_to_thread(current); | ||
1070 | flush_altivec_to_thread(current); | ||
1071 | flush_spe_to_thread(current); | ||
1072 | error = do_execve(filename, | ||
1073 | (const char __user *const __user *) a1, | ||
1074 | (const char __user *const __user *) a2, regs); | ||
1075 | putname(filename); | ||
1076 | out: | ||
1077 | return error; | ||
1078 | } | 1073 | } |
1079 | 1074 | ||
1080 | static inline int valid_irq_stack(unsigned long sp, struct task_struct *p, | 1075 | static inline int valid_irq_stack(unsigned long sp, struct task_struct *p, |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 8b4c049aee2..804e323c139 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/stddef.h> | 35 | #include <linux/stddef.h> |
36 | #include <linux/tty.h> | 36 | #include <linux/tty.h> |
37 | #include <linux/binfmts.h> | 37 | #include <linux/binfmts.h> |
38 | #include <linux/freezer.h> | ||
39 | #endif | 38 | #endif |
40 | 39 | ||
41 | #include <asm/uaccess.h> | 40 | #include <asm/uaccess.h> |
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index abd1112da54..9c2ed90ece8 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c | |||
@@ -156,28 +156,6 @@ asmlinkage long compat_sys_sendfile64_wrapper(u32 out_fd, u32 in_fd, | |||
156 | (off_t __user *)offset, count); | 156 | (off_t __user *)offset, count); |
157 | } | 157 | } |
158 | 158 | ||
159 | long compat_sys_execve(unsigned long a0, unsigned long a1, unsigned long a2, | ||
160 | unsigned long a3, unsigned long a4, unsigned long a5, | ||
161 | struct pt_regs *regs) | ||
162 | { | ||
163 | int error; | ||
164 | char * filename; | ||
165 | |||
166 | filename = getname((char __user *) a0); | ||
167 | error = PTR_ERR(filename); | ||
168 | if (IS_ERR(filename)) | ||
169 | goto out; | ||
170 | flush_fp_to_thread(current); | ||
171 | flush_altivec_to_thread(current); | ||
172 | |||
173 | error = compat_do_execve(filename, compat_ptr(a1), compat_ptr(a2), regs); | ||
174 | |||
175 | putname(filename); | ||
176 | |||
177 | out: | ||
178 | return error; | ||
179 | } | ||
180 | |||
181 | /* Note: it is necessary to treat option as an unsigned int, | 159 | /* Note: it is necessary to treat option as an unsigned int, |
182 | * with the corresponding cast to a signed int to insure that the | 160 | * with the corresponding cast to a signed int to insure that the |
183 | * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) | 161 | * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index c9986fd400d..ce4cb772dc7 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -73,7 +73,7 @@ | |||
73 | /* powerpc clocksource/clockevent code */ | 73 | /* powerpc clocksource/clockevent code */ |
74 | 74 | ||
75 | #include <linux/clockchips.h> | 75 | #include <linux/clockchips.h> |
76 | #include <linux/clocksource.h> | 76 | #include <linux/timekeeper_internal.h> |
77 | 77 | ||
78 | static cycle_t rtc_read(struct clocksource *); | 78 | static cycle_t rtc_read(struct clocksource *); |
79 | static struct clocksource clocksource_rtc = { | 79 | static struct clocksource clocksource_rtc = { |
@@ -727,7 +727,7 @@ static cycle_t timebase_read(struct clocksource *cs) | |||
727 | return (cycle_t)get_tb(); | 727 | return (cycle_t)get_tb(); |
728 | } | 728 | } |
729 | 729 | ||
730 | void update_vsyscall(struct timespec *wall_time, struct timespec *wtm, | 730 | void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm, |
731 | struct clocksource *clock, u32 mult) | 731 | struct clocksource *clock, u32 mult) |
732 | { | 732 | { |
733 | u64 new_tb_to_xs, new_stamp_xsec; | 733 | u64 new_tb_to_xs, new_stamp_xsec; |
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c index 51faaac8abe..185bedd926d 100644 --- a/arch/powerpc/platforms/pseries/eeh_event.c +++ b/arch/powerpc/platforms/pseries/eeh_event.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
26 | #include <linux/kthread.h> | ||
26 | #include <asm/eeh_event.h> | 27 | #include <asm/eeh_event.h> |
27 | #include <asm/ppc-pci.h> | 28 | #include <asm/ppc-pci.h> |
28 | 29 | ||
@@ -59,8 +60,6 @@ static int eeh_event_handler(void * dummy) | |||
59 | struct eeh_event *event; | 60 | struct eeh_event *event; |
60 | struct eeh_pe *pe; | 61 | struct eeh_pe *pe; |
61 | 62 | ||
62 | set_task_comm(current, "eehd"); | ||
63 | |||
64 | spin_lock_irqsave(&eeh_eventlist_lock, flags); | 63 | spin_lock_irqsave(&eeh_eventlist_lock, flags); |
65 | event = NULL; | 64 | event = NULL; |
66 | 65 | ||
@@ -108,7 +107,7 @@ static int eeh_event_handler(void * dummy) | |||
108 | */ | 107 | */ |
109 | static void eeh_thread_launcher(struct work_struct *dummy) | 108 | static void eeh_thread_launcher(struct work_struct *dummy) |
110 | { | 109 | { |
111 | if (kernel_thread(eeh_event_handler, NULL, CLONE_KERNEL) < 0) | 110 | if (IS_ERR(kthread_run(eeh_event_handler, NULL, "eehd"))) |
112 | printk(KERN_ERR "Failed to start EEH daemon\n"); | 111 | printk(KERN_ERR "Failed to start EEH daemon\n"); |
113 | } | 112 | } |
114 | 113 | ||
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 99d2d790d15..3f3d9ca7a5b 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -131,11 +131,13 @@ config S390 | |||
131 | select HAVE_UID16 if 32BIT | 131 | select HAVE_UID16 if 32BIT |
132 | select ARCH_WANT_IPC_PARSE_VERSION | 132 | select ARCH_WANT_IPC_PARSE_VERSION |
133 | select GENERIC_SMP_IDLE_THREAD | 133 | select GENERIC_SMP_IDLE_THREAD |
134 | select GENERIC_TIME_VSYSCALL | 134 | select GENERIC_TIME_VSYSCALL_OLD |
135 | select GENERIC_CLOCKEVENTS | 135 | select GENERIC_CLOCKEVENTS |
136 | select KTIME_SCALAR if 32BIT | 136 | select KTIME_SCALAR if 32BIT |
137 | select HAVE_ARCH_SECCOMP_FILTER | 137 | select HAVE_ARCH_SECCOMP_FILTER |
138 | select GENERIC_KERNEL_THREAD | 138 | select GENERIC_KERNEL_THREAD |
139 | select HAVE_MOD_ARCH_SPECIFIC | ||
140 | select MODULES_USE_ELF_RELA | ||
139 | 141 | ||
140 | config SCHED_OMIT_FRAME_POINTER | 142 | config SCHED_OMIT_FRAME_POINTER |
141 | def_bool y | 143 | def_bool y |
diff --git a/arch/s390/include/asm/module.h b/arch/s390/include/asm/module.h index f0b6b26b6e5..df1f861a848 100644 --- a/arch/s390/include/asm/module.h +++ b/arch/s390/include/asm/module.h | |||
@@ -1,5 +1,8 @@ | |||
1 | #ifndef _ASM_S390_MODULE_H | 1 | #ifndef _ASM_S390_MODULE_H |
2 | #define _ASM_S390_MODULE_H | 2 | #define _ASM_S390_MODULE_H |
3 | |||
4 | #include <asm-generic/module.h> | ||
5 | |||
3 | /* | 6 | /* |
4 | * This file contains the s390 architecture specific module code. | 7 | * This file contains the s390 architecture specific module code. |
5 | */ | 8 | */ |
@@ -28,19 +31,4 @@ struct mod_arch_specific | |||
28 | struct mod_arch_syminfo *syminfo; | 31 | struct mod_arch_syminfo *syminfo; |
29 | }; | 32 | }; |
30 | 33 | ||
31 | #ifdef CONFIG_64BIT | ||
32 | #define ElfW(x) Elf64_ ## x | ||
33 | #define ELFW(x) ELF64_ ## x | ||
34 | #else | ||
35 | #define ElfW(x) Elf32_ ## x | ||
36 | #define ELFW(x) ELF32_ ## x | ||
37 | #endif | ||
38 | |||
39 | #define Elf_Addr ElfW(Addr) | ||
40 | #define Elf_Rela ElfW(Rela) | ||
41 | #define Elf_Shdr ElfW(Shdr) | ||
42 | #define Elf_Sym ElfW(Sym) | ||
43 | #define Elf_Ehdr ElfW(Ehdr) | ||
44 | #define ELF_R_SYM ELFW(R_SYM) | ||
45 | #define ELF_R_TYPE ELFW(R_TYPE) | ||
46 | #endif /* _ASM_S390_MODULE_H */ | 34 | #endif /* _ASM_S390_MODULE_H */ |
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index bb08e2afc5d..9e2cfe0349c 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -91,8 +91,6 @@ static inline struct thread_info *current_thread_info(void) | |||
91 | #define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */ | 91 | #define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */ |
92 | #define TIF_SECCOMP 10 /* secure computing */ | 92 | #define TIF_SECCOMP 10 /* secure computing */ |
93 | #define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */ | 93 | #define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */ |
94 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling | ||
95 | TIF_NEED_RESCHED */ | ||
96 | #define TIF_31BIT 17 /* 32bit process */ | 94 | #define TIF_31BIT 17 /* 32bit process */ |
97 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 95 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
98 | #define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */ | 96 | #define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */ |
@@ -100,7 +98,6 @@ static inline struct thread_info *current_thread_info(void) | |||
100 | 98 | ||
101 | #define _TIF_SYSCALL (1<<TIF_SYSCALL) | 99 | #define _TIF_SYSCALL (1<<TIF_SYSCALL) |
102 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 100 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
103 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
104 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 101 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
105 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 102 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
106 | #define _TIF_PER_TRAP (1<<TIF_PER_TRAP) | 103 | #define _TIF_PER_TRAP (1<<TIF_PER_TRAP) |
@@ -109,7 +106,6 @@ static inline struct thread_info *current_thread_info(void) | |||
109 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 106 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
110 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 107 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
111 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) | 108 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) |
112 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
113 | #define _TIF_31BIT (1<<TIF_31BIT) | 109 | #define _TIF_31BIT (1<<TIF_31BIT) |
114 | #define _TIF_SINGLE_STEP (1<<TIF_SINGLE_STEP) | 110 | #define _TIF_SINGLE_STEP (1<<TIF_SINGLE_STEP) |
115 | 111 | ||
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 2db1011b8b1..7fcd690d42c 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/profile.h> | 34 | #include <linux/profile.h> |
35 | #include <linux/timex.h> | 35 | #include <linux/timex.h> |
36 | #include <linux/notifier.h> | 36 | #include <linux/notifier.h> |
37 | #include <linux/clocksource.h> | 37 | #include <linux/timekeeper_internal.h> |
38 | #include <linux/clockchips.h> | 38 | #include <linux/clockchips.h> |
39 | #include <linux/gfp.h> | 39 | #include <linux/gfp.h> |
40 | #include <linux/kprobes.h> | 40 | #include <linux/kprobes.h> |
@@ -219,7 +219,7 @@ struct clocksource * __init clocksource_default_clock(void) | |||
219 | return &clocksource_tod; | 219 | return &clocksource_tod; |
220 | } | 220 | } |
221 | 221 | ||
222 | void update_vsyscall(struct timespec *wall_time, struct timespec *wtm, | 222 | void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm, |
223 | struct clocksource *clock, u32 mult) | 223 | struct clocksource *clock, u32 mult) |
224 | { | 224 | { |
225 | if (clock != &clocksource_tod) | 225 | if (clock != &clocksource_tod) |
diff --git a/arch/score/Kconfig b/arch/score/Kconfig index 461c2374749..4f93a431a45 100644 --- a/arch/score/Kconfig +++ b/arch/score/Kconfig | |||
@@ -11,6 +11,8 @@ config SCORE | |||
11 | select ARCH_DISCARD_MEMBLOCK | 11 | select ARCH_DISCARD_MEMBLOCK |
12 | select GENERIC_CPU_DEVICES | 12 | select GENERIC_CPU_DEVICES |
13 | select GENERIC_CLOCKEVENTS | 13 | select GENERIC_CLOCKEVENTS |
14 | select HAVE_MOD_ARCH_SPECIFIC | ||
15 | select MODULES_USE_ELF_REL | ||
14 | 16 | ||
15 | choice | 17 | choice |
16 | prompt "System type" | 18 | prompt "System type" |
diff --git a/arch/score/include/asm/module.h b/arch/score/include/asm/module.h index f0b5dc0bd02..abf395bbfab 100644 --- a/arch/score/include/asm/module.h +++ b/arch/score/include/asm/module.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <asm/uaccess.h> | 5 | #include <asm/uaccess.h> |
6 | #include <asm-generic/module.h> | ||
6 | 7 | ||
7 | struct mod_arch_specific { | 8 | struct mod_arch_specific { |
8 | /* Data Bus Error exception tables */ | 9 | /* Data Bus Error exception tables */ |
@@ -13,11 +14,6 @@ struct mod_arch_specific { | |||
13 | 14 | ||
14 | typedef uint8_t Elf64_Byte; /* Type for a 8-bit quantity. */ | 15 | typedef uint8_t Elf64_Byte; /* Type for a 8-bit quantity. */ |
15 | 16 | ||
16 | #define Elf_Shdr Elf32_Shdr | ||
17 | #define Elf_Sym Elf32_Sym | ||
18 | #define Elf_Ehdr Elf32_Ehdr | ||
19 | #define Elf_Addr Elf32_Addr | ||
20 | |||
21 | /* Given an address, look for it in the exception tables. */ | 17 | /* Given an address, look for it in the exception tables. */ |
22 | #ifdef CONFIG_MODULES | 18 | #ifdef CONFIG_MODULES |
23 | const struct exception_table_entry *search_module_dbetables(unsigned long addr); | 19 | const struct exception_table_entry *search_module_dbetables(unsigned long addr); |
diff --git a/arch/score/include/asm/thread_info.h b/arch/score/include/asm/thread_info.h index a18006e97f1..1425cc03487 100644 --- a/arch/score/include/asm/thread_info.h +++ b/arch/score/include/asm/thread_info.h | |||
@@ -86,16 +86,12 @@ register struct thread_info *__current_thread_info __asm__("r28"); | |||
86 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 86 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
87 | #define TIF_NOTIFY_RESUME 5 /* callback before returning to user */ | 87 | #define TIF_NOTIFY_RESUME 5 /* callback before returning to user */ |
88 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | 88 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ |
89 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling | ||
90 | TIF_NEED_RESCHED */ | ||
91 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 89 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
92 | 90 | ||
93 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 91 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
94 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 92 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
95 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 93 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
96 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 94 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
97 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
98 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
99 | 95 | ||
100 | #define _TIF_WORK_MASK (0x0000ffff) | 96 | #define _TIF_WORK_MASK (0x0000ffff) |
101 | 97 | ||
diff --git a/arch/score/kernel/module.c b/arch/score/kernel/module.c index 469e3b64e2f..1378d99baa3 100644 --- a/arch/score/kernel/module.c +++ b/arch/score/kernel/module.c | |||
@@ -125,16 +125,6 @@ int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, | |||
125 | return 0; | 125 | return 0; |
126 | } | 126 | } |
127 | 127 | ||
128 | int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | ||
129 | unsigned int symindex, unsigned int relsec, | ||
130 | struct module *me) | ||
131 | { | ||
132 | /* Non-standard return value... most other arch's return -ENOEXEC | ||
133 | * for an unsupported relocation variant | ||
134 | */ | ||
135 | return 0; | ||
136 | } | ||
137 | |||
138 | /* Given an address, look for it in the module exception tables. */ | 128 | /* Given an address, look for it in the module exception tables. */ |
139 | const struct exception_table_entry *search_module_dbetables(unsigned long addr) | 129 | const struct exception_table_entry *search_module_dbetables(unsigned long addr) |
140 | { | 130 | { |
diff --git a/arch/score/kernel/signal.c b/arch/score/kernel/signal.c index e382c52ca0d..c268bbf8b41 100644 --- a/arch/score/kernel/signal.c +++ b/arch/score/kernel/signal.c | |||
@@ -174,6 +174,7 @@ score_rt_sigreturn(struct pt_regs *regs) | |||
174 | /* It is more difficult to avoid calling this function than to | 174 | /* It is more difficult to avoid calling this function than to |
175 | call it and ignore errors. */ | 175 | call it and ignore errors. */ |
176 | do_sigaltstack((stack_t __user *)&st, NULL, regs->regs[0]); | 176 | do_sigaltstack((stack_t __user *)&st, NULL, regs->regs[0]); |
177 | regs->is_syscall = 0; | ||
177 | 178 | ||
178 | __asm__ __volatile__( | 179 | __asm__ __volatile__( |
179 | "mv\tr0, %0\n\t" | 180 | "mv\tr0, %0\n\t" |
diff --git a/arch/score/kernel/sys_score.c b/arch/score/kernel/sys_score.c index 21e86797406..d45cf00a335 100644 --- a/arch/score/kernel/sys_score.c +++ b/arch/score/kernel/sys_score.c | |||
@@ -92,14 +92,14 @@ asmlinkage long | |||
92 | score_execve(struct pt_regs *regs) | 92 | score_execve(struct pt_regs *regs) |
93 | { | 93 | { |
94 | int error; | 94 | int error; |
95 | char *filename; | 95 | struct filename *filename; |
96 | 96 | ||
97 | filename = getname((char __user*)regs->regs[4]); | 97 | filename = getname((char __user*)regs->regs[4]); |
98 | error = PTR_ERR(filename); | 98 | error = PTR_ERR(filename); |
99 | if (IS_ERR(filename)) | 99 | if (IS_ERR(filename)) |
100 | return error; | 100 | return error; |
101 | 101 | ||
102 | error = do_execve(filename, | 102 | error = do_execve(filename->name, |
103 | (const char __user *const __user *)regs->regs[5], | 103 | (const char __user *const __user *)regs->regs[5], |
104 | (const char __user *const __user *)regs->regs[6], | 104 | (const char __user *const __user *)regs->regs[6], |
105 | regs); | 105 | regs); |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 3b3e27a3ff2..babc2b826c5 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -38,6 +38,8 @@ config SUPERH | |||
38 | select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST | 38 | select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST |
39 | select GENERIC_STRNCPY_FROM_USER | 39 | select GENERIC_STRNCPY_FROM_USER |
40 | select GENERIC_STRNLEN_USER | 40 | select GENERIC_STRNLEN_USER |
41 | select HAVE_MOD_ARCH_SPECIFIC if DWARF_UNWINDER | ||
42 | select MODULES_USE_ELF_RELA | ||
41 | help | 43 | help |
42 | The SuperH is a RISC processor targeted for use in embedded systems | 44 | The SuperH is a RISC processor targeted for use in embedded systems |
43 | and consumer electronics; it was also used in the Sega Dreamcast | 45 | and consumer electronics; it was also used in the Sega Dreamcast |
diff --git a/arch/sh/include/asm/module.h b/arch/sh/include/asm/module.h index b7927de86f9..81300d8b544 100644 --- a/arch/sh/include/asm/module.h +++ b/arch/sh/include/asm/module.h | |||
@@ -1,21 +1,13 @@ | |||
1 | #ifndef _ASM_SH_MODULE_H | 1 | #ifndef _ASM_SH_MODULE_H |
2 | #define _ASM_SH_MODULE_H | 2 | #define _ASM_SH_MODULE_H |
3 | 3 | ||
4 | struct mod_arch_specific { | 4 | #include <asm-generic/module.h> |
5 | |||
5 | #ifdef CONFIG_DWARF_UNWINDER | 6 | #ifdef CONFIG_DWARF_UNWINDER |
7 | struct mod_arch_specific { | ||
6 | struct list_head fde_list; | 8 | struct list_head fde_list; |
7 | struct list_head cie_list; | 9 | struct list_head cie_list; |
8 | #endif | ||
9 | }; | 10 | }; |
10 | |||
11 | #ifdef CONFIG_64BIT | ||
12 | #define Elf_Shdr Elf64_Shdr | ||
13 | #define Elf_Sym Elf64_Sym | ||
14 | #define Elf_Ehdr Elf64_Ehdr | ||
15 | #else | ||
16 | #define Elf_Shdr Elf32_Shdr | ||
17 | #define Elf_Sym Elf32_Sym | ||
18 | #define Elf_Ehdr Elf32_Ehdr | ||
19 | #endif | 11 | #endif |
20 | 12 | ||
21 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 13 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index bc13b57cdc8..7d5ac4e4848 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -206,6 +206,9 @@ static inline bool test_and_clear_restore_sigmask(void) | |||
206 | ti->status &= ~TS_RESTORE_SIGMASK; | 206 | ti->status &= ~TS_RESTORE_SIGMASK; |
207 | return true; | 207 | return true; |
208 | } | 208 | } |
209 | |||
210 | #define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) | ||
211 | |||
209 | #endif /* !__ASSEMBLY__ */ | 212 | #endif /* !__ASSEMBLY__ */ |
210 | 213 | ||
211 | #endif /* __KERNEL__ */ | 214 | #endif /* __KERNEL__ */ |
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index 59521e8a164..ba7345f37bc 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
@@ -298,14 +298,14 @@ asmlinkage int sys_execve(const char __user *ufilename, | |||
298 | { | 298 | { |
299 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | 299 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); |
300 | int error; | 300 | int error; |
301 | char *filename; | 301 | struct filename *filename; |
302 | 302 | ||
303 | filename = getname(ufilename); | 303 | filename = getname(ufilename); |
304 | error = PTR_ERR(filename); | 304 | error = PTR_ERR(filename); |
305 | if (IS_ERR(filename)) | 305 | if (IS_ERR(filename)) |
306 | goto out; | 306 | goto out; |
307 | 307 | ||
308 | error = do_execve(filename, uargv, uenvp, regs); | 308 | error = do_execve(filename->name, uargv, uenvp, regs); |
309 | putname(filename); | 309 | putname(filename); |
310 | out: | 310 | out: |
311 | return error; | 311 | return error; |
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index 602545b12a8..98a709f0c3c 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c | |||
@@ -491,14 +491,14 @@ asmlinkage int sys_execve(const char *ufilename, char **uargv, | |||
491 | struct pt_regs *pregs) | 491 | struct pt_regs *pregs) |
492 | { | 492 | { |
493 | int error; | 493 | int error; |
494 | char *filename; | 494 | struct filename *filename; |
495 | 495 | ||
496 | filename = getname((char __user *)ufilename); | 496 | filename = getname((char __user *)ufilename); |
497 | error = PTR_ERR(filename); | 497 | error = PTR_ERR(filename); |
498 | if (IS_ERR(filename)) | 498 | if (IS_ERR(filename)) |
499 | goto out; | 499 | goto out; |
500 | 500 | ||
501 | error = do_execve(filename, | 501 | error = do_execve(filename->name, |
502 | (const char __user *const __user *)uargv, | 502 | (const char __user *const __user *)uargv, |
503 | (const char __user *const __user *)uenvp, | 503 | (const char __user *const __user *)uenvp, |
504 | pregs); | 504 | pregs); |
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c index d6b7b6154f8..2f1f65356c0 100644 --- a/arch/sh/kernel/signal_32.c +++ b/arch/sh/kernel/signal_32.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/elf.h> | 22 | #include <linux/elf.h> |
23 | #include <linux/personality.h> | 23 | #include <linux/personality.h> |
24 | #include <linux/binfmts.h> | 24 | #include <linux/binfmts.h> |
25 | #include <linux/freezer.h> | ||
26 | #include <linux/io.h> | 25 | #include <linux/io.h> |
27 | #include <linux/tracehook.h> | 26 | #include <linux/tracehook.h> |
28 | #include <asm/ucontext.h> | 27 | #include <asm/ucontext.h> |
diff --git a/arch/sh/kernel/signal_64.c b/arch/sh/kernel/signal_64.c index 6b5b3dfe886..23853814bd1 100644 --- a/arch/sh/kernel/signal_64.c +++ b/arch/sh/kernel/signal_64.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/wait.h> | 19 | #include <linux/wait.h> |
20 | #include <linux/personality.h> | 20 | #include <linux/personality.h> |
21 | #include <linux/freezer.h> | ||
22 | #include <linux/ptrace.h> | 21 | #include <linux/ptrace.h> |
23 | #include <linux/unistd.h> | 22 | #include <linux/unistd.h> |
24 | #include <linux/stddef.h> | 23 | #include <linux/stddef.h> |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 91c780c973b..b6b442b0d79 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -39,6 +39,7 @@ config SPARC | |||
39 | select GENERIC_CLOCKEVENTS | 39 | select GENERIC_CLOCKEVENTS |
40 | select GENERIC_STRNCPY_FROM_USER | 40 | select GENERIC_STRNCPY_FROM_USER |
41 | select GENERIC_STRNLEN_USER | 41 | select GENERIC_STRNLEN_USER |
42 | select MODULES_USE_ELF_RELA | ||
42 | 43 | ||
43 | config SPARC32 | 44 | config SPARC32 |
44 | def_bool !64BIT | 45 | def_bool !64BIT |
diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index 10d54e5e37f..645a58da0e8 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild | |||
@@ -7,4 +7,5 @@ generic-y += exec.h | |||
7 | generic-y += local64.h | 7 | generic-y += local64.h |
8 | generic-y += irq_regs.h | 8 | generic-y += irq_regs.h |
9 | generic-y += local.h | 9 | generic-y += local.h |
10 | generic-y += module.h | ||
10 | generic-y += word-at-a-time.h | 11 | generic-y += word-at-a-time.h |
diff --git a/arch/sparc/include/asm/module.h b/arch/sparc/include/asm/module.h deleted file mode 100644 index ff8e02d8033..00000000000 --- a/arch/sparc/include/asm/module.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #ifndef __SPARC_MODULE_H | ||
2 | #define __SPARC_MODULE_H | ||
3 | struct mod_arch_specific { }; | ||
4 | |||
5 | /* | ||
6 | * Use some preprocessor magic to define the correct symbol | ||
7 | * for sparc32 and sparc64. | ||
8 | * Elf_Addr becomes Elf32_Addr for sparc32 and Elf64_Addr for sparc64 | ||
9 | */ | ||
10 | #define ___ELF(a, b, c) a##b##c | ||
11 | #define __ELF(a, b, c) ___ELF(a, b, c) | ||
12 | #define _Elf(t) __ELF(Elf, CONFIG_BITS, t) | ||
13 | #define _ELF(t) __ELF(ELF, CONFIG_BITS, t) | ||
14 | |||
15 | #define Elf_Shdr _Elf(_Shdr) | ||
16 | #define Elf_Sym _Elf(_Sym) | ||
17 | #define Elf_Ehdr _Elf(_Ehdr) | ||
18 | #define Elf_Rela _Elf(_Rela) | ||
19 | #define Elf_Addr _Elf(_Addr) | ||
20 | |||
21 | #define ELF_R_SYM _ELF(_R_SYM) | ||
22 | #define ELF_R_TYPE _ELF(_R_TYPE) | ||
23 | |||
24 | #endif /* __SPARC_MODULE_H */ | ||
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h index e6cd224506a..25849ae3e90 100644 --- a/arch/sparc/include/asm/thread_info_32.h +++ b/arch/sparc/include/asm/thread_info_32.h | |||
@@ -126,13 +126,14 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
126 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 126 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
127 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 127 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
128 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 128 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
129 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
130 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 129 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
131 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 130 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
132 | 131 | ||
133 | #define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \ | 132 | #define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \ |
134 | _TIF_SIGPENDING) | 133 | _TIF_SIGPENDING) |
135 | 134 | ||
135 | #define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) | ||
136 | |||
136 | #endif /* __KERNEL__ */ | 137 | #endif /* __KERNEL__ */ |
137 | 138 | ||
138 | #endif /* _ASM_THREAD_INFO_H */ | 139 | #endif /* _ASM_THREAD_INFO_H */ |
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h index cfa8c38fb9c..4e227663108 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h | |||
@@ -256,6 +256,9 @@ static inline bool test_and_clear_restore_sigmask(void) | |||
256 | ti->status &= ~TS_RESTORE_SIGMASK; | 256 | ti->status &= ~TS_RESTORE_SIGMASK; |
257 | return true; | 257 | return true; |
258 | } | 258 | } |
259 | |||
260 | #define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) | ||
261 | |||
259 | #endif /* !__ASSEMBLY__ */ | 262 | #endif /* !__ASSEMBLY__ */ |
260 | 263 | ||
261 | #endif /* __KERNEL__ */ | 264 | #endif /* __KERNEL__ */ |
diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h index 7c831d848b4..73083e1d38d 100644 --- a/arch/sparc/include/asm/uaccess_64.h +++ b/arch/sparc/include/asm/uaccess_64.h | |||
@@ -265,6 +265,11 @@ extern __must_check long strnlen_user(const char __user *str, long n); | |||
265 | #define __copy_to_user_inatomic ___copy_to_user | 265 | #define __copy_to_user_inatomic ___copy_to_user |
266 | #define __copy_from_user_inatomic ___copy_from_user | 266 | #define __copy_from_user_inatomic ___copy_from_user |
267 | 267 | ||
268 | struct pt_regs; | ||
269 | extern unsigned long compute_effective_address(struct pt_regs *, | ||
270 | unsigned int insn, | ||
271 | unsigned int rd); | ||
272 | |||
268 | #endif /* __ASSEMBLY__ */ | 273 | #endif /* __ASSEMBLY__ */ |
269 | 274 | ||
270 | #endif /* _ASM_UACCESS_H */ | 275 | #endif /* _ASM_UACCESS_H */ |
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index 14006d8aca2..487bffb36f5 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c | |||
@@ -482,7 +482,7 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs) | |||
482 | asmlinkage int sparc_execve(struct pt_regs *regs) | 482 | asmlinkage int sparc_execve(struct pt_regs *regs) |
483 | { | 483 | { |
484 | int error, base = 0; | 484 | int error, base = 0; |
485 | char *filename; | 485 | struct filename *filename; |
486 | 486 | ||
487 | /* Check for indirect call. */ | 487 | /* Check for indirect call. */ |
488 | if(regs->u_regs[UREG_G1] == 0) | 488 | if(regs->u_regs[UREG_G1] == 0) |
@@ -492,7 +492,7 @@ asmlinkage int sparc_execve(struct pt_regs *regs) | |||
492 | error = PTR_ERR(filename); | 492 | error = PTR_ERR(filename); |
493 | if(IS_ERR(filename)) | 493 | if(IS_ERR(filename)) |
494 | goto out; | 494 | goto out; |
495 | error = do_execve(filename, | 495 | error = do_execve(filename->name, |
496 | (const char __user *const __user *) | 496 | (const char __user *const __user *) |
497 | regs->u_regs[base + UREG_I1], | 497 | regs->u_regs[base + UREG_I1], |
498 | (const char __user *const __user *) | 498 | (const char __user *const __user *) |
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c index aff0c72fac0..fcaa5942112 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c | |||
@@ -722,7 +722,7 @@ EXPORT_SYMBOL(dump_fpu); | |||
722 | asmlinkage int sparc_execve(struct pt_regs *regs) | 722 | asmlinkage int sparc_execve(struct pt_regs *regs) |
723 | { | 723 | { |
724 | int error, base = 0; | 724 | int error, base = 0; |
725 | char *filename; | 725 | struct filename *filename; |
726 | 726 | ||
727 | /* User register window flush is done by entry.S */ | 727 | /* User register window flush is done by entry.S */ |
728 | 728 | ||
@@ -734,7 +734,7 @@ asmlinkage int sparc_execve(struct pt_regs *regs) | |||
734 | error = PTR_ERR(filename); | 734 | error = PTR_ERR(filename); |
735 | if (IS_ERR(filename)) | 735 | if (IS_ERR(filename)) |
736 | goto out; | 736 | goto out; |
737 | error = do_execve(filename, | 737 | error = do_execve(filename->name, |
738 | (const char __user *const __user *) | 738 | (const char __user *const __user *) |
739 | regs->u_regs[base + UREG_I1], | 739 | regs->u_regs[base + UREG_I1], |
740 | (const char __user *const __user *) | 740 | (const char __user *const __user *) |
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c index d862499eb01..c3239811a1b 100644 --- a/arch/sparc/kernel/sys_sparc32.c +++ b/arch/sparc/kernel/sys_sparc32.c | |||
@@ -403,7 +403,7 @@ asmlinkage long compat_sys_rt_sigaction(int sig, | |||
403 | asmlinkage long sparc32_execve(struct pt_regs *regs) | 403 | asmlinkage long sparc32_execve(struct pt_regs *regs) |
404 | { | 404 | { |
405 | int error, base = 0; | 405 | int error, base = 0; |
406 | char *filename; | 406 | struct filename *filename; |
407 | 407 | ||
408 | /* User register window flush is done by entry.S */ | 408 | /* User register window flush is done by entry.S */ |
409 | 409 | ||
@@ -416,7 +416,7 @@ asmlinkage long sparc32_execve(struct pt_regs *regs) | |||
416 | if (IS_ERR(filename)) | 416 | if (IS_ERR(filename)) |
417 | goto out; | 417 | goto out; |
418 | 418 | ||
419 | error = compat_do_execve(filename, | 419 | error = compat_do_execve(filename->name, |
420 | compat_ptr(regs->u_regs[base + UREG_I1]), | 420 | compat_ptr(regs->u_regs[base + UREG_I1]), |
421 | compat_ptr(regs->u_regs[base + UREG_I2]), regs); | 421 | compat_ptr(regs->u_regs[base + UREG_I2]), regs); |
422 | 422 | ||
diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S index 1d7e274f3f2..7f5f65d0b3f 100644 --- a/arch/sparc/kernel/syscalls.S +++ b/arch/sparc/kernel/syscalls.S | |||
@@ -212,24 +212,20 @@ linux_sparc_syscall: | |||
212 | 3: stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | 212 | 3: stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] |
213 | ret_sys_call: | 213 | ret_sys_call: |
214 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3 | 214 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3 |
215 | ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1 ! pc = npc | ||
216 | sra %o0, 0, %o0 | 215 | sra %o0, 0, %o0 |
217 | mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2 | 216 | mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2 |
218 | sllx %g2, 32, %g2 | 217 | sllx %g2, 32, %g2 |
219 | 218 | ||
220 | /* Check if force_successful_syscall_return() | ||
221 | * was invoked. | ||
222 | */ | ||
223 | ldub [%g6 + TI_SYS_NOERROR], %l2 | ||
224 | brnz,a,pn %l2, 80f | ||
225 | stb %g0, [%g6 + TI_SYS_NOERROR] | ||
226 | |||
227 | cmp %o0, -ERESTART_RESTARTBLOCK | 219 | cmp %o0, -ERESTART_RESTARTBLOCK |
228 | bgeu,pn %xcc, 1f | 220 | bgeu,pn %xcc, 1f |
229 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %l6 | 221 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %g0 |
230 | 80: | 222 | ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1 ! pc = npc |
223 | |||
224 | 2: | ||
225 | stb %g0, [%g6 + TI_SYS_NOERROR] | ||
231 | /* System call success, clear Carry condition code. */ | 226 | /* System call success, clear Carry condition code. */ |
232 | andn %g3, %g2, %g3 | 227 | andn %g3, %g2, %g3 |
228 | 3: | ||
233 | stx %g3, [%sp + PTREGS_OFF + PT_V9_TSTATE] | 229 | stx %g3, [%sp + PTREGS_OFF + PT_V9_TSTATE] |
234 | bne,pn %icc, linux_syscall_trace2 | 230 | bne,pn %icc, linux_syscall_trace2 |
235 | add %l1, 0x4, %l2 ! npc = npc+4 | 231 | add %l1, 0x4, %l2 ! npc = npc+4 |
@@ -238,20 +234,20 @@ ret_sys_call: | |||
238 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] | 234 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] |
239 | 235 | ||
240 | 1: | 236 | 1: |
237 | /* Check if force_successful_syscall_return() | ||
238 | * was invoked. | ||
239 | */ | ||
240 | ldub [%g6 + TI_SYS_NOERROR], %l2 | ||
241 | brnz,pn %l2, 2b | ||
242 | ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1 ! pc = npc | ||
241 | /* System call failure, set Carry condition code. | 243 | /* System call failure, set Carry condition code. |
242 | * Also, get abs(errno) to return to the process. | 244 | * Also, get abs(errno) to return to the process. |
243 | */ | 245 | */ |
244 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT), %l6 | ||
245 | sub %g0, %o0, %o0 | 246 | sub %g0, %o0, %o0 |
246 | or %g3, %g2, %g3 | ||
247 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | 247 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] |
248 | stx %g3, [%sp + PTREGS_OFF + PT_V9_TSTATE] | 248 | ba,pt %xcc, 3b |
249 | bne,pn %icc, linux_syscall_trace2 | 249 | or %g3, %g2, %g3 |
250 | add %l1, 0x4, %l2 ! npc = npc+4 | ||
251 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC] | ||
252 | 250 | ||
253 | b,pt %xcc, rtrap | ||
254 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] | ||
255 | linux_syscall_trace2: | 251 | linux_syscall_trace2: |
256 | call syscall_trace_leave | 252 | call syscall_trace_leave |
257 | add %sp, PTREGS_OFF, %o0 | 253 | add %sp, PTREGS_OFF, %o0 |
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index fa1f1d375ff..b66a77968f3 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* arch/sparc64/kernel/traps.c | 1 | /* arch/sparc64/kernel/traps.c |
2 | * | 2 | * |
3 | * Copyright (C) 1995,1997,2008,2009 David S. Miller (davem@davemloft.net) | 3 | * Copyright (C) 1995,1997,2008,2009,2012 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com) | 4 | * Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com) |
5 | */ | 5 | */ |
6 | 6 | ||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/kdebug.h> | 19 | #include <linux/kdebug.h> |
20 | #include <linux/ftrace.h> | 20 | #include <linux/ftrace.h> |
21 | #include <linux/reboot.h> | ||
21 | #include <linux/gfp.h> | 22 | #include <linux/gfp.h> |
22 | 23 | ||
23 | #include <asm/smp.h> | 24 | #include <asm/smp.h> |
@@ -1760,85 +1761,223 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
1760 | } | 1761 | } |
1761 | 1762 | ||
1762 | struct sun4v_error_entry { | 1763 | struct sun4v_error_entry { |
1763 | u64 err_handle; | 1764 | /* Unique error handle */ |
1764 | u64 err_stick; | 1765 | /*0x00*/u64 err_handle; |
1765 | 1766 | ||
1766 | u32 err_type; | 1767 | /* %stick value at the time of the error */ |
1768 | /*0x08*/u64 err_stick; | ||
1769 | |||
1770 | /*0x10*/u8 reserved_1[3]; | ||
1771 | |||
1772 | /* Error type */ | ||
1773 | /*0x13*/u8 err_type; | ||
1767 | #define SUN4V_ERR_TYPE_UNDEFINED 0 | 1774 | #define SUN4V_ERR_TYPE_UNDEFINED 0 |
1768 | #define SUN4V_ERR_TYPE_UNCORRECTED_RES 1 | 1775 | #define SUN4V_ERR_TYPE_UNCORRECTED_RES 1 |
1769 | #define SUN4V_ERR_TYPE_PRECISE_NONRES 2 | 1776 | #define SUN4V_ERR_TYPE_PRECISE_NONRES 2 |
1770 | #define SUN4V_ERR_TYPE_DEFERRED_NONRES 3 | 1777 | #define SUN4V_ERR_TYPE_DEFERRED_NONRES 3 |
1771 | #define SUN4V_ERR_TYPE_WARNING_RES 4 | 1778 | #define SUN4V_ERR_TYPE_SHUTDOWN_RQST 4 |
1779 | #define SUN4V_ERR_TYPE_DUMP_CORE 5 | ||
1780 | #define SUN4V_ERR_TYPE_SP_STATE_CHANGE 6 | ||
1781 | #define SUN4V_ERR_TYPE_NUM 7 | ||
1772 | 1782 | ||
1773 | u32 err_attrs; | 1783 | /* Error attributes */ |
1784 | /*0x14*/u32 err_attrs; | ||
1774 | #define SUN4V_ERR_ATTRS_PROCESSOR 0x00000001 | 1785 | #define SUN4V_ERR_ATTRS_PROCESSOR 0x00000001 |
1775 | #define SUN4V_ERR_ATTRS_MEMORY 0x00000002 | 1786 | #define SUN4V_ERR_ATTRS_MEMORY 0x00000002 |
1776 | #define SUN4V_ERR_ATTRS_PIO 0x00000004 | 1787 | #define SUN4V_ERR_ATTRS_PIO 0x00000004 |
1777 | #define SUN4V_ERR_ATTRS_INT_REGISTERS 0x00000008 | 1788 | #define SUN4V_ERR_ATTRS_INT_REGISTERS 0x00000008 |
1778 | #define SUN4V_ERR_ATTRS_FPU_REGISTERS 0x00000010 | 1789 | #define SUN4V_ERR_ATTRS_FPU_REGISTERS 0x00000010 |
1779 | #define SUN4V_ERR_ATTRS_USER_MODE 0x01000000 | 1790 | #define SUN4V_ERR_ATTRS_SHUTDOWN_RQST 0x00000020 |
1780 | #define SUN4V_ERR_ATTRS_PRIV_MODE 0x02000000 | 1791 | #define SUN4V_ERR_ATTRS_ASR 0x00000040 |
1792 | #define SUN4V_ERR_ATTRS_ASI 0x00000080 | ||
1793 | #define SUN4V_ERR_ATTRS_PRIV_REG 0x00000100 | ||
1794 | #define SUN4V_ERR_ATTRS_SPSTATE_MSK 0x00000600 | ||
1795 | #define SUN4V_ERR_ATTRS_SPSTATE_SHFT 9 | ||
1796 | #define SUN4V_ERR_ATTRS_MODE_MSK 0x03000000 | ||
1797 | #define SUN4V_ERR_ATTRS_MODE_SHFT 24 | ||
1781 | #define SUN4V_ERR_ATTRS_RES_QUEUE_FULL 0x80000000 | 1798 | #define SUN4V_ERR_ATTRS_RES_QUEUE_FULL 0x80000000 |
1782 | 1799 | ||
1783 | u64 err_raddr; | 1800 | #define SUN4V_ERR_SPSTATE_FAULTED 0 |
1784 | u32 err_size; | 1801 | #define SUN4V_ERR_SPSTATE_AVAILABLE 1 |
1785 | u16 err_cpu; | 1802 | #define SUN4V_ERR_SPSTATE_NOT_PRESENT 2 |
1786 | u16 err_pad; | 1803 | |
1804 | #define SUN4V_ERR_MODE_USER 1 | ||
1805 | #define SUN4V_ERR_MODE_PRIV 2 | ||
1806 | |||
1807 | /* Real address of the memory region or PIO transaction */ | ||
1808 | /*0x18*/u64 err_raddr; | ||
1809 | |||
1810 | /* Size of the operation triggering the error, in bytes */ | ||
1811 | /*0x20*/u32 err_size; | ||
1812 | |||
1813 | /* ID of the CPU */ | ||
1814 | /*0x24*/u16 err_cpu; | ||
1815 | |||
1816 | /* Grace periof for shutdown, in seconds */ | ||
1817 | /*0x26*/u16 err_secs; | ||
1818 | |||
1819 | /* Value of the %asi register */ | ||
1820 | /*0x28*/u8 err_asi; | ||
1821 | |||
1822 | /*0x29*/u8 reserved_2; | ||
1823 | |||
1824 | /* Value of the ASR register number */ | ||
1825 | /*0x2a*/u16 err_asr; | ||
1826 | #define SUN4V_ERR_ASR_VALID 0x8000 | ||
1827 | |||
1828 | /*0x2c*/u32 reserved_3; | ||
1829 | /*0x30*/u64 reserved_4; | ||
1830 | /*0x38*/u64 reserved_5; | ||
1787 | }; | 1831 | }; |
1788 | 1832 | ||
1789 | static atomic_t sun4v_resum_oflow_cnt = ATOMIC_INIT(0); | 1833 | static atomic_t sun4v_resum_oflow_cnt = ATOMIC_INIT(0); |
1790 | static atomic_t sun4v_nonresum_oflow_cnt = ATOMIC_INIT(0); | 1834 | static atomic_t sun4v_nonresum_oflow_cnt = ATOMIC_INIT(0); |
1791 | 1835 | ||
1792 | static const char *sun4v_err_type_to_str(u32 type) | 1836 | static const char *sun4v_err_type_to_str(u8 type) |
1793 | { | 1837 | { |
1794 | switch (type) { | 1838 | static const char *types[SUN4V_ERR_TYPE_NUM] = { |
1795 | case SUN4V_ERR_TYPE_UNDEFINED: | 1839 | "undefined", |
1796 | return "undefined"; | 1840 | "uncorrected resumable", |
1797 | case SUN4V_ERR_TYPE_UNCORRECTED_RES: | 1841 | "precise nonresumable", |
1798 | return "uncorrected resumable"; | 1842 | "deferred nonresumable", |
1799 | case SUN4V_ERR_TYPE_PRECISE_NONRES: | 1843 | "shutdown request", |
1800 | return "precise nonresumable"; | 1844 | "dump core", |
1801 | case SUN4V_ERR_TYPE_DEFERRED_NONRES: | 1845 | "SP state change", |
1802 | return "deferred nonresumable"; | 1846 | }; |
1803 | case SUN4V_ERR_TYPE_WARNING_RES: | 1847 | |
1804 | return "warning resumable"; | 1848 | if (type < SUN4V_ERR_TYPE_NUM) |
1805 | default: | 1849 | return types[type]; |
1806 | return "unknown"; | 1850 | |
1851 | return "unknown"; | ||
1852 | } | ||
1853 | |||
1854 | static void sun4v_emit_err_attr_strings(u32 attrs) | ||
1855 | { | ||
1856 | static const char *attr_names[] = { | ||
1857 | "processor", | ||
1858 | "memory", | ||
1859 | "PIO", | ||
1860 | "int-registers", | ||
1861 | "fpu-registers", | ||
1862 | "shutdown-request", | ||
1863 | "ASR", | ||
1864 | "ASI", | ||
1865 | "priv-reg", | ||
1866 | }; | ||
1867 | static const char *sp_states[] = { | ||
1868 | "sp-faulted", | ||
1869 | "sp-available", | ||
1870 | "sp-not-present", | ||
1871 | "sp-state-reserved", | ||
1872 | }; | ||
1873 | static const char *modes[] = { | ||
1874 | "mode-reserved0", | ||
1875 | "user", | ||
1876 | "priv", | ||
1877 | "mode-reserved1", | ||
1878 | }; | ||
1879 | u32 sp_state, mode; | ||
1880 | int i; | ||
1881 | |||
1882 | for (i = 0; i < ARRAY_SIZE(attr_names); i++) { | ||
1883 | if (attrs & (1U << i)) { | ||
1884 | const char *s = attr_names[i]; | ||
1885 | |||
1886 | pr_cont("%s ", s); | ||
1887 | } | ||
1807 | } | 1888 | } |
1889 | |||
1890 | sp_state = ((attrs & SUN4V_ERR_ATTRS_SPSTATE_MSK) >> | ||
1891 | SUN4V_ERR_ATTRS_SPSTATE_SHFT); | ||
1892 | pr_cont("%s ", sp_states[sp_state]); | ||
1893 | |||
1894 | mode = ((attrs & SUN4V_ERR_ATTRS_MODE_MSK) >> | ||
1895 | SUN4V_ERR_ATTRS_MODE_SHFT); | ||
1896 | pr_cont("%s ", modes[mode]); | ||
1897 | |||
1898 | if (attrs & SUN4V_ERR_ATTRS_RES_QUEUE_FULL) | ||
1899 | pr_cont("res-queue-full "); | ||
1808 | } | 1900 | } |
1809 | 1901 | ||
1810 | static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, int cpu, const char *pfx, atomic_t *ocnt) | 1902 | /* When the report contains a real-address of "-1" it means that the |
1903 | * hardware did not provide the address. So we compute the effective | ||
1904 | * address of the load or store instruction at regs->tpc and report | ||
1905 | * that. Usually when this happens it's a PIO and in such a case we | ||
1906 | * are using physical addresses with bypass ASIs anyways, so what we | ||
1907 | * report here is exactly what we want. | ||
1908 | */ | ||
1909 | static void sun4v_report_real_raddr(const char *pfx, struct pt_regs *regs) | ||
1811 | { | 1910 | { |
1911 | unsigned int insn; | ||
1912 | u64 addr; | ||
1913 | |||
1914 | if (!(regs->tstate & TSTATE_PRIV)) | ||
1915 | return; | ||
1916 | |||
1917 | insn = *(unsigned int *) regs->tpc; | ||
1918 | |||
1919 | addr = compute_effective_address(regs, insn, 0); | ||
1920 | |||
1921 | printk("%s: insn effective address [0x%016llx]\n", | ||
1922 | pfx, addr); | ||
1923 | } | ||
1924 | |||
1925 | static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, | ||
1926 | int cpu, const char *pfx, atomic_t *ocnt) | ||
1927 | { | ||
1928 | u64 *raw_ptr = (u64 *) ent; | ||
1929 | u32 attrs; | ||
1812 | int cnt; | 1930 | int cnt; |
1813 | 1931 | ||
1814 | printk("%s: Reporting on cpu %d\n", pfx, cpu); | 1932 | printk("%s: Reporting on cpu %d\n", pfx, cpu); |
1815 | printk("%s: err_handle[%llx] err_stick[%llx] err_type[%08x:%s]\n", | 1933 | printk("%s: TPC [0x%016lx] <%pS>\n", |
1816 | pfx, | 1934 | pfx, regs->tpc, (void *) regs->tpc); |
1817 | ent->err_handle, ent->err_stick, | 1935 | |
1818 | ent->err_type, | 1936 | printk("%s: RAW [%016llx:%016llx:%016llx:%016llx\n", |
1819 | sun4v_err_type_to_str(ent->err_type)); | 1937 | pfx, raw_ptr[0], raw_ptr[1], raw_ptr[2], raw_ptr[3]); |
1820 | printk("%s: err_attrs[%08x:%s %s %s %s %s %s %s %s]\n", | 1938 | printk("%s: %016llx:%016llx:%016llx:%016llx]\n", |
1821 | pfx, | 1939 | pfx, raw_ptr[4], raw_ptr[5], raw_ptr[6], raw_ptr[7]); |
1822 | ent->err_attrs, | 1940 | |
1823 | ((ent->err_attrs & SUN4V_ERR_ATTRS_PROCESSOR) ? | 1941 | printk("%s: handle [0x%016llx] stick [0x%016llx]\n", |
1824 | "processor" : ""), | 1942 | pfx, ent->err_handle, ent->err_stick); |
1825 | ((ent->err_attrs & SUN4V_ERR_ATTRS_MEMORY) ? | 1943 | |
1826 | "memory" : ""), | 1944 | printk("%s: type [%s]\n", pfx, sun4v_err_type_to_str(ent->err_type)); |
1827 | ((ent->err_attrs & SUN4V_ERR_ATTRS_PIO) ? | 1945 | |
1828 | "pio" : ""), | 1946 | attrs = ent->err_attrs; |
1829 | ((ent->err_attrs & SUN4V_ERR_ATTRS_INT_REGISTERS) ? | 1947 | printk("%s: attrs [0x%08x] < ", pfx, attrs); |
1830 | "integer-regs" : ""), | 1948 | sun4v_emit_err_attr_strings(attrs); |
1831 | ((ent->err_attrs & SUN4V_ERR_ATTRS_FPU_REGISTERS) ? | 1949 | pr_cont(">\n"); |
1832 | "fpu-regs" : ""), | 1950 | |
1833 | ((ent->err_attrs & SUN4V_ERR_ATTRS_USER_MODE) ? | 1951 | /* Various fields in the error report are only valid if |
1834 | "user" : ""), | 1952 | * certain attribute bits are set. |
1835 | ((ent->err_attrs & SUN4V_ERR_ATTRS_PRIV_MODE) ? | 1953 | */ |
1836 | "privileged" : ""), | 1954 | if (attrs & (SUN4V_ERR_ATTRS_MEMORY | |
1837 | ((ent->err_attrs & SUN4V_ERR_ATTRS_RES_QUEUE_FULL) ? | 1955 | SUN4V_ERR_ATTRS_PIO | |
1838 | "queue-full" : "")); | 1956 | SUN4V_ERR_ATTRS_ASI)) { |
1839 | printk("%s: err_raddr[%016llx] err_size[%u] err_cpu[%u]\n", | 1957 | printk("%s: raddr [0x%016llx]\n", pfx, ent->err_raddr); |
1840 | pfx, | 1958 | |
1841 | ent->err_raddr, ent->err_size, ent->err_cpu); | 1959 | if (ent->err_raddr == ~(u64)0) |
1960 | sun4v_report_real_raddr(pfx, regs); | ||
1961 | } | ||
1962 | |||
1963 | if (attrs & (SUN4V_ERR_ATTRS_MEMORY | SUN4V_ERR_ATTRS_ASI)) | ||
1964 | printk("%s: size [0x%x]\n", pfx, ent->err_size); | ||
1965 | |||
1966 | if (attrs & (SUN4V_ERR_ATTRS_PROCESSOR | | ||
1967 | SUN4V_ERR_ATTRS_INT_REGISTERS | | ||
1968 | SUN4V_ERR_ATTRS_FPU_REGISTERS | | ||
1969 | SUN4V_ERR_ATTRS_PRIV_REG)) | ||
1970 | printk("%s: cpu[%u]\n", pfx, ent->err_cpu); | ||
1971 | |||
1972 | if (attrs & SUN4V_ERR_ATTRS_ASI) | ||
1973 | printk("%s: asi [0x%02x]\n", pfx, ent->err_asi); | ||
1974 | |||
1975 | if ((attrs & (SUN4V_ERR_ATTRS_INT_REGISTERS | | ||
1976 | SUN4V_ERR_ATTRS_FPU_REGISTERS | | ||
1977 | SUN4V_ERR_ATTRS_PRIV_REG)) && | ||
1978 | (ent->err_asr & SUN4V_ERR_ASR_VALID) != 0) | ||
1979 | printk("%s: reg [0x%04x]\n", | ||
1980 | pfx, ent->err_asr & ~SUN4V_ERR_ASR_VALID); | ||
1842 | 1981 | ||
1843 | show_regs(regs); | 1982 | show_regs(regs); |
1844 | 1983 | ||
@@ -1874,13 +2013,15 @@ void sun4v_resum_error(struct pt_regs *regs, unsigned long offset) | |||
1874 | 2013 | ||
1875 | put_cpu(); | 2014 | put_cpu(); |
1876 | 2015 | ||
1877 | if (ent->err_type == SUN4V_ERR_TYPE_WARNING_RES) { | 2016 | if (local_copy.err_type == SUN4V_ERR_TYPE_SHUTDOWN_RQST) { |
1878 | /* If err_type is 0x4, it's a powerdown request. Do | 2017 | /* We should really take the seconds field of |
1879 | * not do the usual resumable error log because that | 2018 | * the error report and use it for the shutdown |
1880 | * makes it look like some abnormal error. | 2019 | * invocation, but for now do the same thing we |
2020 | * do for a DS shutdown request. | ||
1881 | */ | 2021 | */ |
1882 | printk(KERN_INFO "Power down request...\n"); | 2022 | pr_info("Shutdown request, %u seconds...\n", |
1883 | kill_cad_pid(SIGINT, 1); | 2023 | local_copy.err_secs); |
2024 | orderly_poweroff(true); | ||
1884 | return; | 2025 | return; |
1885 | } | 2026 | } |
1886 | 2027 | ||
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c index 2976dba1eba..097aee763af 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c | |||
@@ -151,8 +151,6 @@ show_signal_msg(struct pt_regs *regs, int sig, int code, | |||
151 | printk(KERN_CONT "\n"); | 151 | printk(KERN_CONT "\n"); |
152 | } | 152 | } |
153 | 153 | ||
154 | extern unsigned long compute_effective_address(struct pt_regs *, unsigned int, unsigned int); | ||
155 | |||
156 | static void do_fault_siginfo(int code, int sig, struct pt_regs *regs, | 154 | static void do_fault_siginfo(int code, int sig, struct pt_regs *regs, |
157 | unsigned int insn, int fault_code) | 155 | unsigned int insn, int fault_code) |
158 | { | 156 | { |
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index dc46490adca..875d008828b 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig | |||
@@ -20,6 +20,7 @@ config TILE | |||
20 | select SYS_HYPERVISOR | 20 | select SYS_HYPERVISOR |
21 | select ARCH_HAVE_NMI_SAFE_CMPXCHG | 21 | select ARCH_HAVE_NMI_SAFE_CMPXCHG |
22 | select GENERIC_CLOCKEVENTS | 22 | select GENERIC_CLOCKEVENTS |
23 | select MODULES_USE_ELF_RELA | ||
23 | 24 | ||
24 | # FIXME: investigate whether we need/want these options. | 25 | # FIXME: investigate whether we need/want these options. |
25 | # select HAVE_IOREMAP_PROT | 26 | # select HAVE_IOREMAP_PROT |
diff --git a/arch/tile/include/arch/Kbuild b/arch/tile/include/arch/Kbuild index 9c0ea24cc94..e69de29bb2d 100644 --- a/arch/tile/include/arch/Kbuild +++ b/arch/tile/include/arch/Kbuild | |||
@@ -1,17 +0,0 @@ | |||
1 | header-y += abi.h | ||
2 | header-y += chip.h | ||
3 | header-y += chip_tile64.h | ||
4 | header-y += chip_tilegx.h | ||
5 | header-y += chip_tilepro.h | ||
6 | header-y += icache.h | ||
7 | header-y += interrupts.h | ||
8 | header-y += interrupts_32.h | ||
9 | header-y += interrupts_64.h | ||
10 | header-y += opcode.h | ||
11 | header-y += opcode_tilegx.h | ||
12 | header-y += opcode_tilepro.h | ||
13 | header-y += sim.h | ||
14 | header-y += sim_def.h | ||
15 | header-y += spr_def.h | ||
16 | header-y += spr_def_32.h | ||
17 | header-y += spr_def_64.h | ||
diff --git a/arch/tile/include/arch/spr_def.h b/arch/tile/include/arch/spr_def.h index d6ba449b536..2de83e7aff3 100644 --- a/arch/tile/include/arch/spr_def.h +++ b/arch/tile/include/arch/spr_def.h | |||
@@ -11,15 +11,11 @@ | |||
11 | * NON INFRINGEMENT. See the GNU General Public License for | 11 | * NON INFRINGEMENT. See the GNU General Public License for |
12 | * more details. | 12 | * more details. |
13 | */ | 13 | */ |
14 | #ifndef __ARCH_SPR_DEF_H__ | ||
15 | #define __ARCH_SPR_DEF_H__ | ||
14 | 16 | ||
15 | /* Include the proper base SPR definition file. */ | 17 | #include <uapi/arch/spr_def.h> |
16 | #ifdef __tilegx__ | ||
17 | #include <arch/spr_def_64.h> | ||
18 | #else | ||
19 | #include <arch/spr_def_32.h> | ||
20 | #endif | ||
21 | 18 | ||
22 | #ifdef __KERNEL__ | ||
23 | 19 | ||
24 | /* | 20 | /* |
25 | * In addition to including the proper base SPR definition file, depending | 21 | * In addition to including the proper base SPR definition file, depending |
@@ -110,4 +106,4 @@ | |||
110 | #define INT_INTCTRL_K \ | 106 | #define INT_INTCTRL_K \ |
111 | _concat4(INT_INTCTRL_, CONFIG_KERNEL_PL,,) | 107 | _concat4(INT_INTCTRL_, CONFIG_KERNEL_PL,,) |
112 | 108 | ||
113 | #endif /* __KERNEL__ */ | 109 | #endif /* __ARCH_SPR_DEF_H__ */ |
diff --git a/arch/tile/include/asm/Kbuild b/arch/tile/include/asm/Kbuild index 5cd98fac989..c68808a09da 100644 --- a/arch/tile/include/asm/Kbuild +++ b/arch/tile/include/asm/Kbuild | |||
@@ -1,10 +1,7 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | header-y += ../arch/ | 2 | header-y += ../arch/ |
4 | 3 | ||
5 | header-y += cachectl.h | ||
6 | header-y += ucontext.h | 4 | header-y += ucontext.h |
7 | header-y += hardwall.h | ||
8 | 5 | ||
9 | generic-y += bug.h | 6 | generic-y += bug.h |
10 | generic-y += bugs.h | 7 | generic-y += bugs.h |
diff --git a/arch/tile/include/asm/hardwall.h b/arch/tile/include/asm/hardwall.h index 47514a58d68..2f572b6b7bc 100644 --- a/arch/tile/include/asm/hardwall.h +++ b/arch/tile/include/asm/hardwall.h | |||
@@ -14,40 +14,11 @@ | |||
14 | * Provide methods for access control of per-cpu resources like | 14 | * Provide methods for access control of per-cpu resources like |
15 | * UDN, IDN, or IPI. | 15 | * UDN, IDN, or IPI. |
16 | */ | 16 | */ |
17 | |||
18 | #ifndef _ASM_TILE_HARDWALL_H | 17 | #ifndef _ASM_TILE_HARDWALL_H |
19 | #define _ASM_TILE_HARDWALL_H | 18 | #define _ASM_TILE_HARDWALL_H |
20 | 19 | ||
21 | #include <arch/chip.h> | 20 | #include <uapi/asm/hardwall.h> |
22 | #include <linux/ioctl.h> | ||
23 | |||
24 | #define HARDWALL_IOCTL_BASE 0xa2 | ||
25 | |||
26 | /* | ||
27 | * The HARDWALL_CREATE() ioctl is a macro with a "size" argument. | ||
28 | * The resulting ioctl value is passed to the kernel in conjunction | ||
29 | * with a pointer to a standard kernel bitmask of cpus. | ||
30 | * For network resources (UDN or IDN) the bitmask must physically | ||
31 | * represent a rectangular configuration on the chip. | ||
32 | * The "size" is the number of bytes of cpu mask data. | ||
33 | */ | ||
34 | #define _HARDWALL_CREATE 1 | ||
35 | #define HARDWALL_CREATE(size) \ | ||
36 | _IOC(_IOC_READ, HARDWALL_IOCTL_BASE, _HARDWALL_CREATE, (size)) | ||
37 | |||
38 | #define _HARDWALL_ACTIVATE 2 | ||
39 | #define HARDWALL_ACTIVATE \ | ||
40 | _IO(HARDWALL_IOCTL_BASE, _HARDWALL_ACTIVATE) | ||
41 | |||
42 | #define _HARDWALL_DEACTIVATE 3 | ||
43 | #define HARDWALL_DEACTIVATE \ | ||
44 | _IO(HARDWALL_IOCTL_BASE, _HARDWALL_DEACTIVATE) | ||
45 | |||
46 | #define _HARDWALL_GET_ID 4 | ||
47 | #define HARDWALL_GET_ID \ | ||
48 | _IO(HARDWALL_IOCTL_BASE, _HARDWALL_GET_ID) | ||
49 | 21 | ||
50 | #ifdef __KERNEL__ | ||
51 | /* /proc hooks for hardwall. */ | 22 | /* /proc hooks for hardwall. */ |
52 | struct proc_dir_entry; | 23 | struct proc_dir_entry; |
53 | #ifdef CONFIG_HARDWALL | 24 | #ifdef CONFIG_HARDWALL |
@@ -56,6 +27,4 @@ int proc_pid_hardwall(struct task_struct *task, char *buffer); | |||
56 | #else | 27 | #else |
57 | static inline void proc_tile_hardwall_init(struct proc_dir_entry *root) {} | 28 | static inline void proc_tile_hardwall_init(struct proc_dir_entry *root) {} |
58 | #endif | 29 | #endif |
59 | #endif | ||
60 | |||
61 | #endif /* _ASM_TILE_HARDWALL_H */ | 30 | #endif /* _ASM_TILE_HARDWALL_H */ |
diff --git a/arch/tile/include/asm/ptrace.h b/arch/tile/include/asm/ptrace.h index c6cddd7e8d5..1a4fd9ab0ee 100644 --- a/arch/tile/include/asm/ptrace.h +++ b/arch/tile/include/asm/ptrace.h | |||
@@ -11,87 +11,21 @@ | |||
11 | * NON INFRINGEMENT. See the GNU General Public License for | 11 | * NON INFRINGEMENT. See the GNU General Public License for |
12 | * more details. | 12 | * more details. |
13 | */ | 13 | */ |
14 | |||
15 | #ifndef _ASM_TILE_PTRACE_H | 14 | #ifndef _ASM_TILE_PTRACE_H |
16 | #define _ASM_TILE_PTRACE_H | 15 | #define _ASM_TILE_PTRACE_H |
17 | 16 | ||
18 | #include <arch/chip.h> | 17 | #include <linux/compiler.h> |
19 | #include <arch/abi.h> | ||
20 | |||
21 | /* These must match struct pt_regs, below. */ | ||
22 | #if CHIP_WORD_SIZE() == 32 | ||
23 | #define PTREGS_OFFSET_REG(n) ((n)*4) | ||
24 | #else | ||
25 | #define PTREGS_OFFSET_REG(n) ((n)*8) | ||
26 | #endif | ||
27 | #define PTREGS_OFFSET_BASE 0 | ||
28 | #define PTREGS_OFFSET_TP PTREGS_OFFSET_REG(53) | ||
29 | #define PTREGS_OFFSET_SP PTREGS_OFFSET_REG(54) | ||
30 | #define PTREGS_OFFSET_LR PTREGS_OFFSET_REG(55) | ||
31 | #define PTREGS_NR_GPRS 56 | ||
32 | #define PTREGS_OFFSET_PC PTREGS_OFFSET_REG(56) | ||
33 | #define PTREGS_OFFSET_EX1 PTREGS_OFFSET_REG(57) | ||
34 | #define PTREGS_OFFSET_FAULTNUM PTREGS_OFFSET_REG(58) | ||
35 | #define PTREGS_OFFSET_ORIG_R0 PTREGS_OFFSET_REG(59) | ||
36 | #define PTREGS_OFFSET_FLAGS PTREGS_OFFSET_REG(60) | ||
37 | #if CHIP_HAS_CMPEXCH() | ||
38 | #define PTREGS_OFFSET_CMPEXCH PTREGS_OFFSET_REG(61) | ||
39 | #endif | ||
40 | #define PTREGS_SIZE PTREGS_OFFSET_REG(64) | ||
41 | 18 | ||
42 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
43 | |||
44 | #ifdef __KERNEL__ | ||
45 | /* Benefit from consistent use of "long" on all chips. */ | 20 | /* Benefit from consistent use of "long" on all chips. */ |
46 | typedef unsigned long pt_reg_t; | 21 | typedef unsigned long pt_reg_t; |
47 | #else | ||
48 | /* Provide appropriate length type to userspace regardless of -m32/-m64. */ | ||
49 | typedef uint_reg_t pt_reg_t; | ||
50 | #endif | ||
51 | |||
52 | /* | ||
53 | * This struct defines the way the registers are stored on the stack during a | ||
54 | * system call or exception. "struct sigcontext" has the same shape. | ||
55 | */ | ||
56 | struct pt_regs { | ||
57 | /* Saved main processor registers; 56..63 are special. */ | ||
58 | /* tp, sp, and lr must immediately follow regs[] for aliasing. */ | ||
59 | pt_reg_t regs[53]; | ||
60 | pt_reg_t tp; /* aliases regs[TREG_TP] */ | ||
61 | pt_reg_t sp; /* aliases regs[TREG_SP] */ | ||
62 | pt_reg_t lr; /* aliases regs[TREG_LR] */ | ||
63 | |||
64 | /* Saved special registers. */ | ||
65 | pt_reg_t pc; /* stored in EX_CONTEXT_K_0 */ | ||
66 | pt_reg_t ex1; /* stored in EX_CONTEXT_K_1 (PL and ICS bit) */ | ||
67 | pt_reg_t faultnum; /* fault number (INT_SWINT_1 for syscall) */ | ||
68 | pt_reg_t orig_r0; /* r0 at syscall entry, else zero */ | ||
69 | pt_reg_t flags; /* flags (see below) */ | ||
70 | #if !CHIP_HAS_CMPEXCH() | ||
71 | pt_reg_t pad[3]; | ||
72 | #else | ||
73 | pt_reg_t cmpexch; /* value of CMPEXCH_VALUE SPR at interrupt */ | ||
74 | pt_reg_t pad[2]; | ||
75 | #endif | 22 | #endif |
76 | }; | ||
77 | |||
78 | #endif /* __ASSEMBLY__ */ | ||
79 | 23 | ||
80 | #define PTRACE_GETREGS 12 | 24 | #include <uapi/asm/ptrace.h> |
81 | #define PTRACE_SETREGS 13 | ||
82 | #define PTRACE_GETFPREGS 14 | ||
83 | #define PTRACE_SETFPREGS 15 | ||
84 | 25 | ||
85 | /* Support TILE-specific ptrace options, with events starting at 16. */ | ||
86 | #define PTRACE_O_TRACEMIGRATE 0x00010000 | ||
87 | #define PTRACE_EVENT_MIGRATE 16 | ||
88 | #ifdef __KERNEL__ | ||
89 | #define PTRACE_O_MASK_TILE (PTRACE_O_TRACEMIGRATE) | 26 | #define PTRACE_O_MASK_TILE (PTRACE_O_TRACEMIGRATE) |
90 | #define PT_TRACE_MIGRATE 0x00080000 | 27 | #define PT_TRACE_MIGRATE 0x00080000 |
91 | #define PT_TRACE_MASK_TILE (PT_TRACE_MIGRATE) | 28 | #define PT_TRACE_MASK_TILE (PT_TRACE_MIGRATE) |
92 | #endif | ||
93 | |||
94 | #ifdef __KERNEL__ | ||
95 | 29 | ||
96 | /* Flag bits in pt_regs.flags */ | 30 | /* Flag bits in pt_regs.flags */ |
97 | #define PT_FLAGS_DISABLE_IRQ 1 /* on return to kernel, disable irqs */ | 31 | #define PT_FLAGS_DISABLE_IRQ 1 /* on return to kernel, disable irqs */ |
@@ -159,6 +93,4 @@ extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, | |||
159 | #define SINGLESTEP_STATE_TARGET_LB 2 | 93 | #define SINGLESTEP_STATE_TARGET_LB 2 |
160 | #define SINGLESTEP_STATE_TARGET_UB 7 | 94 | #define SINGLESTEP_STATE_TARGET_UB 7 |
161 | 95 | ||
162 | #endif /* !__KERNEL__ */ | ||
163 | |||
164 | #endif /* _ASM_TILE_PTRACE_H */ | 96 | #endif /* _ASM_TILE_PTRACE_H */ |
diff --git a/arch/tile/include/asm/setup.h b/arch/tile/include/asm/setup.h index c67eb70ea78..d048888c5d9 100644 --- a/arch/tile/include/asm/setup.h +++ b/arch/tile/include/asm/setup.h | |||
@@ -11,16 +11,13 @@ | |||
11 | * NON INFRINGEMENT. See the GNU General Public License for | 11 | * NON INFRINGEMENT. See the GNU General Public License for |
12 | * more details. | 12 | * more details. |
13 | */ | 13 | */ |
14 | |||
15 | #ifndef _ASM_TILE_SETUP_H | 14 | #ifndef _ASM_TILE_SETUP_H |
16 | #define _ASM_TILE_SETUP_H | 15 | #define _ASM_TILE_SETUP_H |
17 | 16 | ||
18 | #define COMMAND_LINE_SIZE 2048 | ||
19 | |||
20 | #ifdef __KERNEL__ | ||
21 | 17 | ||
22 | #include <linux/pfn.h> | 18 | #include <linux/pfn.h> |
23 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <uapi/asm/setup.h> | ||
24 | 21 | ||
25 | /* | 22 | /* |
26 | * Reserved space for vmalloc and iomap - defined in asm/page.h | 23 | * Reserved space for vmalloc and iomap - defined in asm/page.h |
@@ -53,6 +50,4 @@ int hardwall_ipi_valid(int cpu); | |||
53 | } while (0) | 50 | } while (0) |
54 | #endif | 51 | #endif |
55 | 52 | ||
56 | #endif /* __KERNEL__ */ | ||
57 | |||
58 | #endif /* _ASM_TILE_SETUP_H */ | 53 | #endif /* _ASM_TILE_SETUP_H */ |
diff --git a/arch/tile/include/asm/signal.h b/arch/tile/include/asm/signal.h index 1e5e49aad54..10e183de96d 100644 --- a/arch/tile/include/asm/signal.h +++ b/arch/tile/include/asm/signal.h | |||
@@ -11,19 +11,11 @@ | |||
11 | * NON INFRINGEMENT. See the GNU General Public License for | 11 | * NON INFRINGEMENT. See the GNU General Public License for |
12 | * more details. | 12 | * more details. |
13 | */ | 13 | */ |
14 | |||
15 | #ifndef _ASM_TILE_SIGNAL_H | 14 | #ifndef _ASM_TILE_SIGNAL_H |
16 | #define _ASM_TILE_SIGNAL_H | 15 | #define _ASM_TILE_SIGNAL_H |
17 | 16 | ||
18 | /* Do not notify a ptracer when this signal is handled. */ | 17 | #include <uapi/asm/signal.h> |
19 | #define SA_NOPTRACE 0x02000000u | ||
20 | |||
21 | /* Used in earlier Tilera releases, so keeping for binary compatibility. */ | ||
22 | #define SA_RESTORER 0x04000000u | ||
23 | |||
24 | #include <asm-generic/signal.h> | ||
25 | 18 | ||
26 | #if defined(__KERNEL__) | ||
27 | #if !defined(__ASSEMBLY__) | 19 | #if !defined(__ASSEMBLY__) |
28 | struct pt_regs; | 20 | struct pt_regs; |
29 | int restore_sigcontext(struct pt_regs *, struct sigcontext __user *); | 21 | int restore_sigcontext(struct pt_regs *, struct sigcontext __user *); |
@@ -34,6 +26,4 @@ void signal_fault(const char *type, struct pt_regs *, | |||
34 | void trace_unhandled_signal(const char *type, struct pt_regs *regs, | 26 | void trace_unhandled_signal(const char *type, struct pt_regs *regs, |
35 | unsigned long address, int signo); | 27 | unsigned long address, int signo); |
36 | #endif | 28 | #endif |
37 | #endif | ||
38 | |||
39 | #endif /* _ASM_TILE_SIGNAL_H */ | 29 | #endif /* _ASM_TILE_SIGNAL_H */ |
diff --git a/arch/tile/include/asm/unistd.h b/arch/tile/include/asm/unistd.h index 0e1f3e66e49..6e032a0a268 100644 --- a/arch/tile/include/asm/unistd.h +++ b/arch/tile/include/asm/unistd.h | |||
@@ -11,32 +11,9 @@ | |||
11 | * NON INFRINGEMENT. See the GNU General Public License for | 11 | * NON INFRINGEMENT. See the GNU General Public License for |
12 | * more details. | 12 | * more details. |
13 | */ | 13 | */ |
14 | |||
15 | #if !defined(__LP64__) || defined(__SYSCALL_COMPAT) | ||
16 | /* Use the flavor of this syscall that matches the 32-bit API better. */ | ||
17 | #define __ARCH_WANT_SYNC_FILE_RANGE2 | ||
18 | #endif | ||
19 | |||
20 | /* Use the standard ABI for syscalls. */ | ||
21 | #include <asm-generic/unistd.h> | ||
22 | |||
23 | /* Additional Tilera-specific syscalls. */ | ||
24 | #define __NR_cacheflush (__NR_arch_specific_syscall + 1) | ||
25 | __SYSCALL(__NR_cacheflush, sys_cacheflush) | ||
26 | |||
27 | #ifndef __tilegx__ | ||
28 | /* "Fast" syscalls provide atomic support for 32-bit chips. */ | ||
29 | #define __NR_FAST_cmpxchg -1 | ||
30 | #define __NR_FAST_atomic_update -2 | ||
31 | #define __NR_FAST_cmpxchg64 -3 | ||
32 | #define __NR_cmpxchg_badaddr (__NR_arch_specific_syscall + 0) | ||
33 | __SYSCALL(__NR_cmpxchg_badaddr, sys_cmpxchg_badaddr) | ||
34 | #endif | ||
35 | |||
36 | #ifdef __KERNEL__ | ||
37 | /* In compat mode, we use sys_llseek() for compat_sys_llseek(). */ | 14 | /* In compat mode, we use sys_llseek() for compat_sys_llseek(). */ |
38 | #ifdef CONFIG_COMPAT | 15 | #ifdef CONFIG_COMPAT |
39 | #define __ARCH_WANT_SYS_LLSEEK | 16 | #define __ARCH_WANT_SYS_LLSEEK |
40 | #endif | 17 | #endif |
41 | #define __ARCH_WANT_SYS_NEWFSTATAT | 18 | #define __ARCH_WANT_SYS_NEWFSTATAT |
42 | #endif | 19 | #include <uapi/asm/unistd.h> |
diff --git a/arch/tile/include/uapi/arch/Kbuild b/arch/tile/include/uapi/arch/Kbuild index aafaa5aa54d..4ebc34f4768 100644 --- a/arch/tile/include/uapi/arch/Kbuild +++ b/arch/tile/include/uapi/arch/Kbuild | |||
@@ -1 +1,18 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | header-y += abi.h | ||
3 | header-y += chip.h | ||
4 | header-y += chip_tile64.h | ||
5 | header-y += chip_tilegx.h | ||
6 | header-y += chip_tilepro.h | ||
7 | header-y += icache.h | ||
8 | header-y += interrupts.h | ||
9 | header-y += interrupts_32.h | ||
10 | header-y += interrupts_64.h | ||
11 | header-y += opcode.h | ||
12 | header-y += opcode_tilegx.h | ||
13 | header-y += opcode_tilepro.h | ||
14 | header-y += sim.h | ||
15 | header-y += sim_def.h | ||
16 | header-y += spr_def.h | ||
17 | header-y += spr_def_32.h | ||
18 | header-y += spr_def_64.h | ||
diff --git a/arch/tile/include/arch/abi.h b/arch/tile/include/uapi/arch/abi.h index c55a3d43264..c55a3d43264 100644 --- a/arch/tile/include/arch/abi.h +++ b/arch/tile/include/uapi/arch/abi.h | |||
diff --git a/arch/tile/include/arch/chip.h b/arch/tile/include/uapi/arch/chip.h index 926d3db0e91..926d3db0e91 100644 --- a/arch/tile/include/arch/chip.h +++ b/arch/tile/include/uapi/arch/chip.h | |||
diff --git a/arch/tile/include/arch/chip_tile64.h b/arch/tile/include/uapi/arch/chip_tile64.h index 261aaba092d..261aaba092d 100644 --- a/arch/tile/include/arch/chip_tile64.h +++ b/arch/tile/include/uapi/arch/chip_tile64.h | |||
diff --git a/arch/tile/include/arch/chip_tilegx.h b/arch/tile/include/uapi/arch/chip_tilegx.h index ea8e4f2c948..ea8e4f2c948 100644 --- a/arch/tile/include/arch/chip_tilegx.h +++ b/arch/tile/include/uapi/arch/chip_tilegx.h | |||
diff --git a/arch/tile/include/arch/chip_tilepro.h b/arch/tile/include/uapi/arch/chip_tilepro.h index 70017699a74..70017699a74 100644 --- a/arch/tile/include/arch/chip_tilepro.h +++ b/arch/tile/include/uapi/arch/chip_tilepro.h | |||
diff --git a/arch/tile/include/arch/icache.h b/arch/tile/include/uapi/arch/icache.h index 762eafa8a11..762eafa8a11 100644 --- a/arch/tile/include/arch/icache.h +++ b/arch/tile/include/uapi/arch/icache.h | |||
diff --git a/arch/tile/include/arch/interrupts.h b/arch/tile/include/uapi/arch/interrupts.h index 20f8f07d2de..20f8f07d2de 100644 --- a/arch/tile/include/arch/interrupts.h +++ b/arch/tile/include/uapi/arch/interrupts.h | |||
diff --git a/arch/tile/include/arch/interrupts_32.h b/arch/tile/include/uapi/arch/interrupts_32.h index 96b5710505b..96b5710505b 100644 --- a/arch/tile/include/arch/interrupts_32.h +++ b/arch/tile/include/uapi/arch/interrupts_32.h | |||
diff --git a/arch/tile/include/arch/interrupts_64.h b/arch/tile/include/uapi/arch/interrupts_64.h index 5bb58b2e4e6..5bb58b2e4e6 100644 --- a/arch/tile/include/arch/interrupts_64.h +++ b/arch/tile/include/uapi/arch/interrupts_64.h | |||
diff --git a/arch/tile/include/arch/opcode.h b/arch/tile/include/uapi/arch/opcode.h index 92d15229ece..92d15229ece 100644 --- a/arch/tile/include/arch/opcode.h +++ b/arch/tile/include/uapi/arch/opcode.h | |||
diff --git a/arch/tile/include/arch/opcode_tilegx.h b/arch/tile/include/uapi/arch/opcode_tilegx.h index c14d02c8160..c14d02c8160 100644 --- a/arch/tile/include/arch/opcode_tilegx.h +++ b/arch/tile/include/uapi/arch/opcode_tilegx.h | |||
diff --git a/arch/tile/include/arch/opcode_tilepro.h b/arch/tile/include/uapi/arch/opcode_tilepro.h index 71b763b8ce8..71b763b8ce8 100644 --- a/arch/tile/include/arch/opcode_tilepro.h +++ b/arch/tile/include/uapi/arch/opcode_tilepro.h | |||
diff --git a/arch/tile/include/arch/sim.h b/arch/tile/include/uapi/arch/sim.h index e54b7b0527f..e54b7b0527f 100644 --- a/arch/tile/include/arch/sim.h +++ b/arch/tile/include/uapi/arch/sim.h | |||
diff --git a/arch/tile/include/arch/sim_def.h b/arch/tile/include/uapi/arch/sim_def.h index 4b44a2b6a09..4b44a2b6a09 100644 --- a/arch/tile/include/arch/sim_def.h +++ b/arch/tile/include/uapi/arch/sim_def.h | |||
diff --git a/arch/tile/include/uapi/arch/spr_def.h b/arch/tile/include/uapi/arch/spr_def.h new file mode 100644 index 00000000000..c250c5adb1a --- /dev/null +++ b/arch/tile/include/uapi/arch/spr_def.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _UAPI__ARCH_SPR_DEF_H__ | ||
16 | #define _UAPI__ARCH_SPR_DEF_H__ | ||
17 | |||
18 | /* Include the proper base SPR definition file. */ | ||
19 | #ifdef __tilegx__ | ||
20 | #include <arch/spr_def_64.h> | ||
21 | #else | ||
22 | #include <arch/spr_def_32.h> | ||
23 | #endif | ||
24 | |||
25 | |||
26 | #endif /* _UAPI__ARCH_SPR_DEF_H__ */ | ||
diff --git a/arch/tile/include/arch/spr_def_32.h b/arch/tile/include/uapi/arch/spr_def_32.h index 78bbce2fb19..c689446e628 100644 --- a/arch/tile/include/arch/spr_def_32.h +++ b/arch/tile/include/uapi/arch/spr_def_32.h | |||
@@ -14,8 +14,8 @@ | |||
14 | 14 | ||
15 | #ifndef __DOXYGEN__ | 15 | #ifndef __DOXYGEN__ |
16 | 16 | ||
17 | #ifndef __ARCH_SPR_DEF_H__ | 17 | #ifndef __ARCH_SPR_DEF_32_H__ |
18 | #define __ARCH_SPR_DEF_H__ | 18 | #define __ARCH_SPR_DEF_32_H__ |
19 | 19 | ||
20 | #define SPR_AUX_PERF_COUNT_0 0x6005 | 20 | #define SPR_AUX_PERF_COUNT_0 0x6005 |
21 | #define SPR_AUX_PERF_COUNT_1 0x6006 | 21 | #define SPR_AUX_PERF_COUNT_1 0x6006 |
@@ -252,6 +252,6 @@ | |||
252 | #define SPR_WATCH_MASK 0x420a | 252 | #define SPR_WATCH_MASK 0x420a |
253 | #define SPR_WATCH_VAL 0x420b | 253 | #define SPR_WATCH_VAL 0x420b |
254 | 254 | ||
255 | #endif /* !defined(__ARCH_SPR_DEF_H__) */ | 255 | #endif /* !defined(__ARCH_SPR_DEF_32_H__) */ |
256 | 256 | ||
257 | #endif /* !defined(__DOXYGEN__) */ | 257 | #endif /* !defined(__DOXYGEN__) */ |
diff --git a/arch/tile/include/arch/spr_def_64.h b/arch/tile/include/uapi/arch/spr_def_64.h index 0da86faa337..67a6c1751e3 100644 --- a/arch/tile/include/arch/spr_def_64.h +++ b/arch/tile/include/uapi/arch/spr_def_64.h | |||
@@ -14,8 +14,8 @@ | |||
14 | 14 | ||
15 | #ifndef __DOXYGEN__ | 15 | #ifndef __DOXYGEN__ |
16 | 16 | ||
17 | #ifndef __ARCH_SPR_DEF_H__ | 17 | #ifndef __ARCH_SPR_DEF_64_H__ |
18 | #define __ARCH_SPR_DEF_H__ | 18 | #define __ARCH_SPR_DEF_64_H__ |
19 | 19 | ||
20 | #define SPR_AUX_PERF_COUNT_0 0x2105 | 20 | #define SPR_AUX_PERF_COUNT_0 0x2105 |
21 | #define SPR_AUX_PERF_COUNT_1 0x2106 | 21 | #define SPR_AUX_PERF_COUNT_1 0x2106 |
@@ -211,6 +211,6 @@ | |||
211 | #define SPR_WATCH_MASK 0x200a | 211 | #define SPR_WATCH_MASK 0x200a |
212 | #define SPR_WATCH_VAL 0x200b | 212 | #define SPR_WATCH_VAL 0x200b |
213 | 213 | ||
214 | #endif /* !defined(__ARCH_SPR_DEF_H__) */ | 214 | #endif /* !defined(__ARCH_SPR_DEF_64_H__) */ |
215 | 215 | ||
216 | #endif /* !defined(__DOXYGEN__) */ | 216 | #endif /* !defined(__DOXYGEN__) */ |
diff --git a/arch/tile/include/uapi/asm/Kbuild b/arch/tile/include/uapi/asm/Kbuild index baebb3da1d4..5c6915fd30b 100644 --- a/arch/tile/include/uapi/asm/Kbuild +++ b/arch/tile/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,18 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += auxvec.h | ||
5 | header-y += bitsperlong.h | ||
6 | header-y += byteorder.h | ||
7 | header-y += cachectl.h | ||
8 | header-y += hardwall.h | ||
9 | header-y += kvm_para.h | ||
10 | header-y += mman.h | ||
11 | header-y += ptrace.h | ||
12 | header-y += setup.h | ||
13 | header-y += sigcontext.h | ||
14 | header-y += siginfo.h | ||
15 | header-y += signal.h | ||
16 | header-y += stat.h | ||
17 | header-y += swab.h | ||
18 | header-y += unistd.h | ||
diff --git a/arch/tile/include/asm/auxvec.h b/arch/tile/include/uapi/asm/auxvec.h index 1d393edb064..1d393edb064 100644 --- a/arch/tile/include/asm/auxvec.h +++ b/arch/tile/include/uapi/asm/auxvec.h | |||
diff --git a/arch/tile/include/asm/bitsperlong.h b/arch/tile/include/uapi/asm/bitsperlong.h index 58c771f2af2..58c771f2af2 100644 --- a/arch/tile/include/asm/bitsperlong.h +++ b/arch/tile/include/uapi/asm/bitsperlong.h | |||
diff --git a/arch/tile/include/asm/byteorder.h b/arch/tile/include/uapi/asm/byteorder.h index fb72ecf4921..fb72ecf4921 100644 --- a/arch/tile/include/asm/byteorder.h +++ b/arch/tile/include/uapi/asm/byteorder.h | |||
diff --git a/arch/tile/include/asm/cachectl.h b/arch/tile/include/uapi/asm/cachectl.h index af4c9f9154d..af4c9f9154d 100644 --- a/arch/tile/include/asm/cachectl.h +++ b/arch/tile/include/uapi/asm/cachectl.h | |||
diff --git a/arch/tile/include/uapi/asm/hardwall.h b/arch/tile/include/uapi/asm/hardwall.h new file mode 100644 index 00000000000..c2169d4f401 --- /dev/null +++ b/arch/tile/include/uapi/asm/hardwall.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * Provide methods for access control of per-cpu resources like | ||
15 | * UDN, IDN, or IPI. | ||
16 | */ | ||
17 | |||
18 | #ifndef _UAPI_ASM_TILE_HARDWALL_H | ||
19 | #define _UAPI_ASM_TILE_HARDWALL_H | ||
20 | |||
21 | #include <arch/chip.h> | ||
22 | #include <linux/ioctl.h> | ||
23 | |||
24 | #define HARDWALL_IOCTL_BASE 0xa2 | ||
25 | |||
26 | /* | ||
27 | * The HARDWALL_CREATE() ioctl is a macro with a "size" argument. | ||
28 | * The resulting ioctl value is passed to the kernel in conjunction | ||
29 | * with a pointer to a standard kernel bitmask of cpus. | ||
30 | * For network resources (UDN or IDN) the bitmask must physically | ||
31 | * represent a rectangular configuration on the chip. | ||
32 | * The "size" is the number of bytes of cpu mask data. | ||
33 | */ | ||
34 | #define _HARDWALL_CREATE 1 | ||
35 | #define HARDWALL_CREATE(size) \ | ||
36 | _IOC(_IOC_READ, HARDWALL_IOCTL_BASE, _HARDWALL_CREATE, (size)) | ||
37 | |||
38 | #define _HARDWALL_ACTIVATE 2 | ||
39 | #define HARDWALL_ACTIVATE \ | ||
40 | _IO(HARDWALL_IOCTL_BASE, _HARDWALL_ACTIVATE) | ||
41 | |||
42 | #define _HARDWALL_DEACTIVATE 3 | ||
43 | #define HARDWALL_DEACTIVATE \ | ||
44 | _IO(HARDWALL_IOCTL_BASE, _HARDWALL_DEACTIVATE) | ||
45 | |||
46 | #define _HARDWALL_GET_ID 4 | ||
47 | #define HARDWALL_GET_ID \ | ||
48 | _IO(HARDWALL_IOCTL_BASE, _HARDWALL_GET_ID) | ||
49 | |||
50 | |||
51 | #endif /* _UAPI_ASM_TILE_HARDWALL_H */ | ||
diff --git a/arch/tile/include/asm/kvm_para.h b/arch/tile/include/uapi/asm/kvm_para.h index 14fab8f0b95..14fab8f0b95 100644 --- a/arch/tile/include/asm/kvm_para.h +++ b/arch/tile/include/uapi/asm/kvm_para.h | |||
diff --git a/arch/tile/include/asm/mman.h b/arch/tile/include/uapi/asm/mman.h index 81b8fc348d6..81b8fc348d6 100644 --- a/arch/tile/include/asm/mman.h +++ b/arch/tile/include/uapi/asm/mman.h | |||
diff --git a/arch/tile/include/uapi/asm/ptrace.h b/arch/tile/include/uapi/asm/ptrace.h new file mode 100644 index 00000000000..c717d0fec72 --- /dev/null +++ b/arch/tile/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,88 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _UAPI_ASM_TILE_PTRACE_H | ||
16 | #define _UAPI_ASM_TILE_PTRACE_H | ||
17 | |||
18 | #include <arch/chip.h> | ||
19 | #include <arch/abi.h> | ||
20 | |||
21 | /* These must match struct pt_regs, below. */ | ||
22 | #if CHIP_WORD_SIZE() == 32 | ||
23 | #define PTREGS_OFFSET_REG(n) ((n)*4) | ||
24 | #else | ||
25 | #define PTREGS_OFFSET_REG(n) ((n)*8) | ||
26 | #endif | ||
27 | #define PTREGS_OFFSET_BASE 0 | ||
28 | #define PTREGS_OFFSET_TP PTREGS_OFFSET_REG(53) | ||
29 | #define PTREGS_OFFSET_SP PTREGS_OFFSET_REG(54) | ||
30 | #define PTREGS_OFFSET_LR PTREGS_OFFSET_REG(55) | ||
31 | #define PTREGS_NR_GPRS 56 | ||
32 | #define PTREGS_OFFSET_PC PTREGS_OFFSET_REG(56) | ||
33 | #define PTREGS_OFFSET_EX1 PTREGS_OFFSET_REG(57) | ||
34 | #define PTREGS_OFFSET_FAULTNUM PTREGS_OFFSET_REG(58) | ||
35 | #define PTREGS_OFFSET_ORIG_R0 PTREGS_OFFSET_REG(59) | ||
36 | #define PTREGS_OFFSET_FLAGS PTREGS_OFFSET_REG(60) | ||
37 | #if CHIP_HAS_CMPEXCH() | ||
38 | #define PTREGS_OFFSET_CMPEXCH PTREGS_OFFSET_REG(61) | ||
39 | #endif | ||
40 | #define PTREGS_SIZE PTREGS_OFFSET_REG(64) | ||
41 | |||
42 | |||
43 | #ifndef __ASSEMBLY__ | ||
44 | |||
45 | #ifndef __KERNEL__ | ||
46 | /* Provide appropriate length type to userspace regardless of -m32/-m64. */ | ||
47 | typedef uint_reg_t pt_reg_t; | ||
48 | #endif | ||
49 | |||
50 | /* | ||
51 | * This struct defines the way the registers are stored on the stack during a | ||
52 | * system call or exception. "struct sigcontext" has the same shape. | ||
53 | */ | ||
54 | struct pt_regs { | ||
55 | /* Saved main processor registers; 56..63 are special. */ | ||
56 | /* tp, sp, and lr must immediately follow regs[] for aliasing. */ | ||
57 | pt_reg_t regs[53]; | ||
58 | pt_reg_t tp; /* aliases regs[TREG_TP] */ | ||
59 | pt_reg_t sp; /* aliases regs[TREG_SP] */ | ||
60 | pt_reg_t lr; /* aliases regs[TREG_LR] */ | ||
61 | |||
62 | /* Saved special registers. */ | ||
63 | pt_reg_t pc; /* stored in EX_CONTEXT_K_0 */ | ||
64 | pt_reg_t ex1; /* stored in EX_CONTEXT_K_1 (PL and ICS bit) */ | ||
65 | pt_reg_t faultnum; /* fault number (INT_SWINT_1 for syscall) */ | ||
66 | pt_reg_t orig_r0; /* r0 at syscall entry, else zero */ | ||
67 | pt_reg_t flags; /* flags (see below) */ | ||
68 | #if !CHIP_HAS_CMPEXCH() | ||
69 | pt_reg_t pad[3]; | ||
70 | #else | ||
71 | pt_reg_t cmpexch; /* value of CMPEXCH_VALUE SPR at interrupt */ | ||
72 | pt_reg_t pad[2]; | ||
73 | #endif | ||
74 | }; | ||
75 | |||
76 | #endif /* __ASSEMBLY__ */ | ||
77 | |||
78 | #define PTRACE_GETREGS 12 | ||
79 | #define PTRACE_SETREGS 13 | ||
80 | #define PTRACE_GETFPREGS 14 | ||
81 | #define PTRACE_SETFPREGS 15 | ||
82 | |||
83 | /* Support TILE-specific ptrace options, with events starting at 16. */ | ||
84 | #define PTRACE_O_TRACEMIGRATE 0x00010000 | ||
85 | #define PTRACE_EVENT_MIGRATE 16 | ||
86 | |||
87 | |||
88 | #endif /* _UAPI_ASM_TILE_PTRACE_H */ | ||
diff --git a/arch/tile/include/uapi/asm/setup.h b/arch/tile/include/uapi/asm/setup.h new file mode 100644 index 00000000000..e6f7da265ac --- /dev/null +++ b/arch/tile/include/uapi/asm/setup.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _UAPI_ASM_TILE_SETUP_H | ||
16 | #define _UAPI_ASM_TILE_SETUP_H | ||
17 | |||
18 | #define COMMAND_LINE_SIZE 2048 | ||
19 | |||
20 | |||
21 | #endif /* _UAPI_ASM_TILE_SETUP_H */ | ||
diff --git a/arch/tile/include/asm/sigcontext.h b/arch/tile/include/uapi/asm/sigcontext.h index 6348e59d372..6348e59d372 100644 --- a/arch/tile/include/asm/sigcontext.h +++ b/arch/tile/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/tile/include/asm/siginfo.h b/arch/tile/include/uapi/asm/siginfo.h index 56d661bb010..56d661bb010 100644 --- a/arch/tile/include/asm/siginfo.h +++ b/arch/tile/include/uapi/asm/siginfo.h | |||
diff --git a/arch/tile/include/uapi/asm/signal.h b/arch/tile/include/uapi/asm/signal.h new file mode 100644 index 00000000000..ef0d32d84a4 --- /dev/null +++ b/arch/tile/include/uapi/asm/signal.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _UAPI_ASM_TILE_SIGNAL_H | ||
16 | #define _UAPI_ASM_TILE_SIGNAL_H | ||
17 | |||
18 | /* Do not notify a ptracer when this signal is handled. */ | ||
19 | #define SA_NOPTRACE 0x02000000u | ||
20 | |||
21 | /* Used in earlier Tilera releases, so keeping for binary compatibility. */ | ||
22 | #define SA_RESTORER 0x04000000u | ||
23 | |||
24 | #include <asm-generic/signal.h> | ||
25 | |||
26 | |||
27 | #endif /* _UAPI_ASM_TILE_SIGNAL_H */ | ||
diff --git a/arch/tile/include/asm/stat.h b/arch/tile/include/uapi/asm/stat.h index c0db34d56be..c0db34d56be 100644 --- a/arch/tile/include/asm/stat.h +++ b/arch/tile/include/uapi/asm/stat.h | |||
diff --git a/arch/tile/include/asm/swab.h b/arch/tile/include/uapi/asm/swab.h index 7c37b38f6c8..7c37b38f6c8 100644 --- a/arch/tile/include/asm/swab.h +++ b/arch/tile/include/uapi/asm/swab.h | |||
diff --git a/arch/tile/include/uapi/asm/unistd.h b/arch/tile/include/uapi/asm/unistd.h new file mode 100644 index 00000000000..cd7b6dd9d47 --- /dev/null +++ b/arch/tile/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation, version 2. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
12 | * more details. | ||
13 | */ | ||
14 | |||
15 | #if !defined(__LP64__) || defined(__SYSCALL_COMPAT) | ||
16 | /* Use the flavor of this syscall that matches the 32-bit API better. */ | ||
17 | #define __ARCH_WANT_SYNC_FILE_RANGE2 | ||
18 | #endif | ||
19 | |||
20 | /* Use the standard ABI for syscalls. */ | ||
21 | #include <asm-generic/unistd.h> | ||
22 | |||
23 | /* Additional Tilera-specific syscalls. */ | ||
24 | #define __NR_cacheflush (__NR_arch_specific_syscall + 1) | ||
25 | __SYSCALL(__NR_cacheflush, sys_cacheflush) | ||
26 | |||
27 | #ifndef __tilegx__ | ||
28 | /* "Fast" syscalls provide atomic support for 32-bit chips. */ | ||
29 | #define __NR_FAST_cmpxchg -1 | ||
30 | #define __NR_FAST_atomic_update -2 | ||
31 | #define __NR_FAST_cmpxchg64 -3 | ||
32 | #define __NR_cmpxchg_badaddr (__NR_arch_specific_syscall + 0) | ||
33 | __SYSCALL(__NR_cmpxchg_badaddr, sys_cmpxchg_badaddr) | ||
34 | #endif | ||
diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c index 7bc0859a9f5..08b4fe1717b 100644 --- a/arch/tile/kernel/compat_signal.c +++ b/arch/tile/kernel/compat_signal.c | |||
@@ -354,15 +354,6 @@ int compat_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
354 | regs->regs[1] = ptr_to_compat_reg(&frame->info); | 354 | regs->regs[1] = ptr_to_compat_reg(&frame->info); |
355 | regs->regs[2] = ptr_to_compat_reg(&frame->uc); | 355 | regs->regs[2] = ptr_to_compat_reg(&frame->uc); |
356 | regs->flags |= PT_FLAGS_CALLER_SAVES; | 356 | regs->flags |= PT_FLAGS_CALLER_SAVES; |
357 | |||
358 | /* | ||
359 | * Notify any tracer that was single-stepping it. | ||
360 | * The tracer may want to single-step inside the | ||
361 | * handler too. | ||
362 | */ | ||
363 | if (test_thread_flag(TIF_SINGLESTEP)) | ||
364 | ptrace_notify(SIGTRAP); | ||
365 | |||
366 | return 0; | 357 | return 0; |
367 | 358 | ||
368 | give_sigsegv: | 359 | give_sigsegv: |
diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c index 6be79915050..307d010696c 100644 --- a/arch/tile/kernel/process.c +++ b/arch/tile/kernel/process.c | |||
@@ -548,6 +548,9 @@ int do_work_pending(struct pt_regs *regs, u32 thread_info_flags) | |||
548 | if (!user_mode(regs)) | 548 | if (!user_mode(regs)) |
549 | return 0; | 549 | return 0; |
550 | 550 | ||
551 | /* Enable interrupts; they are disabled again on return to caller. */ | ||
552 | local_irq_enable(); | ||
553 | |||
551 | if (thread_info_flags & _TIF_NEED_RESCHED) { | 554 | if (thread_info_flags & _TIF_NEED_RESCHED) { |
552 | schedule(); | 555 | schedule(); |
553 | return 1; | 556 | return 1; |
@@ -594,13 +597,13 @@ SYSCALL_DEFINE4(execve, const char __user *, path, | |||
594 | struct pt_regs *, regs) | 597 | struct pt_regs *, regs) |
595 | { | 598 | { |
596 | long error; | 599 | long error; |
597 | char *filename; | 600 | struct filename *filename; |
598 | 601 | ||
599 | filename = getname(path); | 602 | filename = getname(path); |
600 | error = PTR_ERR(filename); | 603 | error = PTR_ERR(filename); |
601 | if (IS_ERR(filename)) | 604 | if (IS_ERR(filename)) |
602 | goto out; | 605 | goto out; |
603 | error = do_execve(filename, argv, envp, regs); | 606 | error = do_execve(filename->name, argv, envp, regs); |
604 | putname(filename); | 607 | putname(filename); |
605 | if (error == 0) | 608 | if (error == 0) |
606 | single_step_execve(); | 609 | single_step_execve(); |
@@ -615,13 +618,13 @@ long compat_sys_execve(const char __user *path, | |||
615 | struct pt_regs *regs) | 618 | struct pt_regs *regs) |
616 | { | 619 | { |
617 | long error; | 620 | long error; |
618 | char *filename; | 621 | struct filename *filename; |
619 | 622 | ||
620 | filename = getname(path); | 623 | filename = getname(path); |
621 | error = PTR_ERR(filename); | 624 | error = PTR_ERR(filename); |
622 | if (IS_ERR(filename)) | 625 | if (IS_ERR(filename)) |
623 | goto out; | 626 | goto out; |
624 | error = compat_do_execve(filename, argv, envp, regs); | 627 | error = compat_do_execve(filename->name, argv, envp, regs); |
625 | putname(filename); | 628 | putname(filename); |
626 | if (error == 0) | 629 | if (error == 0) |
627 | single_step_execve(); | 630 | single_step_execve(); |
diff --git a/arch/tile/kernel/signal.c b/arch/tile/kernel/signal.c index e29b0553211..67efb656d10 100644 --- a/arch/tile/kernel/signal.c +++ b/arch/tile/kernel/signal.c | |||
@@ -219,15 +219,6 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
219 | regs->regs[1] = (unsigned long) &frame->info; | 219 | regs->regs[1] = (unsigned long) &frame->info; |
220 | regs->regs[2] = (unsigned long) &frame->uc; | 220 | regs->regs[2] = (unsigned long) &frame->uc; |
221 | regs->flags |= PT_FLAGS_CALLER_SAVES; | 221 | regs->flags |= PT_FLAGS_CALLER_SAVES; |
222 | |||
223 | /* | ||
224 | * Notify any tracer that was single-stepping it. | ||
225 | * The tracer may want to single-step inside the | ||
226 | * handler too. | ||
227 | */ | ||
228 | if (test_thread_flag(TIF_SINGLESTEP)) | ||
229 | ptrace_notify(SIGTRAP); | ||
230 | |||
231 | return 0; | 222 | return 0; |
232 | 223 | ||
233 | give_sigsegv: | 224 | give_sigsegv: |
@@ -278,7 +269,8 @@ static void handle_signal(unsigned long sig, siginfo_t *info, | |||
278 | ret = setup_rt_frame(sig, ka, info, oldset, regs); | 269 | ret = setup_rt_frame(sig, ka, info, oldset, regs); |
279 | if (ret) | 270 | if (ret) |
280 | return; | 271 | return; |
281 | signal_delivered(sig, info, ka, regs, 0); | 272 | signal_delivered(sig, info, ka, regs, |
273 | test_thread_flag(TIF_SINGLESTEP)); | ||
282 | } | 274 | } |
283 | 275 | ||
284 | /* | 276 | /* |
diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/processor-generic.h index 1e82e954e97..c03cd5a0236 100644 --- a/arch/um/include/asm/processor-generic.h +++ b/arch/um/include/asm/processor-generic.h | |||
@@ -26,7 +26,6 @@ struct thread_struct { | |||
26 | jmp_buf *fault_catcher; | 26 | jmp_buf *fault_catcher; |
27 | struct task_struct *prev_sched; | 27 | struct task_struct *prev_sched; |
28 | unsigned long temp_stack; | 28 | unsigned long temp_stack; |
29 | jmp_buf *exec_buf; | ||
30 | struct arch_thread arch; | 29 | struct arch_thread arch; |
31 | jmp_buf switch_buf; | 30 | jmp_buf switch_buf; |
32 | int mm_count; | 31 | int mm_count; |
@@ -54,7 +53,6 @@ struct thread_struct { | |||
54 | .fault_addr = NULL, \ | 53 | .fault_addr = NULL, \ |
55 | .prev_sched = NULL, \ | 54 | .prev_sched = NULL, \ |
56 | .temp_stack = 0, \ | 55 | .temp_stack = 0, \ |
57 | .exec_buf = NULL, \ | ||
58 | .arch = INIT_ARCH_THREAD, \ | 56 | .arch = INIT_ARCH_THREAD, \ |
59 | .request = { 0 } \ | 57 | .request = { 0 } \ |
60 | } | 58 | } |
diff --git a/arch/um/include/asm/thread_info.h b/arch/um/include/asm/thread_info.h index c04e5ab68f5..2c8eeb2df8b 100644 --- a/arch/um/include/asm/thread_info.h +++ b/arch/um/include/asm/thread_info.h | |||
@@ -65,8 +65,6 @@ static inline struct thread_info *current_thread_info(void) | |||
65 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 65 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
66 | #define TIF_SIGPENDING 1 /* signal pending */ | 66 | #define TIF_SIGPENDING 1 /* signal pending */ |
67 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 67 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
68 | #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling | ||
69 | * TIF_NEED_RESCHED */ | ||
70 | #define TIF_RESTART_BLOCK 4 | 68 | #define TIF_RESTART_BLOCK 4 |
71 | #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ | 69 | #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ |
72 | #define TIF_SYSCALL_AUDIT 6 | 70 | #define TIF_SYSCALL_AUDIT 6 |
@@ -76,7 +74,6 @@ static inline struct thread_info *current_thread_info(void) | |||
76 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 74 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
77 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 75 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
78 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 76 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
79 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | ||
80 | #define _TIF_MEMDIE (1 << TIF_MEMDIE) | 77 | #define _TIF_MEMDIE (1 << TIF_MEMDIE) |
81 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 78 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
82 | 79 | ||
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h index 44883049c11..95feaa47a2f 100644 --- a/arch/um/include/shared/os.h +++ b/arch/um/include/shared/os.h | |||
@@ -191,7 +191,6 @@ extern int os_getpid(void); | |||
191 | extern int os_getpgrp(void); | 191 | extern int os_getpgrp(void); |
192 | 192 | ||
193 | extern void init_new_thread_signals(void); | 193 | extern void init_new_thread_signals(void); |
194 | extern int run_kernel_thread(int (*fn)(void *), void *arg, jmp_buf **jmp_ptr); | ||
195 | 194 | ||
196 | extern int os_map_memory(void *virt, int fd, unsigned long long off, | 195 | extern int os_map_memory(void *virt, int fd, unsigned long long off, |
197 | unsigned long len, int r, int w, int x); | 196 | unsigned long len, int r, int w, int x); |
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index ab019c7f0b5..3a8ece7d09c 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c | |||
@@ -47,8 +47,3 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) | |||
47 | #endif | 47 | #endif |
48 | } | 48 | } |
49 | EXPORT_SYMBOL(start_thread); | 49 | EXPORT_SYMBOL(start_thread); |
50 | |||
51 | void __noreturn ret_from_kernel_execve(struct pt_regs *unused) | ||
52 | { | ||
53 | UML_LONGJMP(current->thread.exec_buf, 1); | ||
54 | } | ||
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 30629783b3e..b6d699cdd55 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
@@ -135,14 +135,10 @@ void new_thread_handler(void) | |||
135 | arg = current->thread.request.u.thread.arg; | 135 | arg = current->thread.request.u.thread.arg; |
136 | 136 | ||
137 | /* | 137 | /* |
138 | * The return value is 1 if the kernel thread execs a process, | 138 | * callback returns only if the kernel thread execs a process |
139 | * 0 if it just exits | ||
140 | */ | 139 | */ |
141 | n = run_kernel_thread(fn, arg, ¤t->thread.exec_buf); | 140 | n = fn(arg); |
142 | if (n == 1) | 141 | userspace(¤t->thread.regs.regs); |
143 | userspace(¤t->thread.regs.regs); | ||
144 | else | ||
145 | do_exit(0); | ||
146 | } | 142 | } |
147 | 143 | ||
148 | /* Called magically, see new_thread_handler above */ | 144 | /* Called magically, see new_thread_handler above */ |
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c index 162bea3d91b..b8f34c9e53a 100644 --- a/arch/um/os-Linux/process.c +++ b/arch/um/os-Linux/process.c | |||
@@ -244,16 +244,3 @@ void init_new_thread_signals(void) | |||
244 | signal(SIGWINCH, SIG_IGN); | 244 | signal(SIGWINCH, SIG_IGN); |
245 | signal(SIGTERM, SIG_DFL); | 245 | signal(SIGTERM, SIG_DFL); |
246 | } | 246 | } |
247 | |||
248 | int run_kernel_thread(int (*fn)(void *), void *arg, jmp_buf **jmp_ptr) | ||
249 | { | ||
250 | jmp_buf buf; | ||
251 | int n; | ||
252 | |||
253 | *jmp_ptr = &buf; | ||
254 | n = UML_SETJMP(&buf); | ||
255 | if (n != 0) | ||
256 | return n; | ||
257 | (*fn)(arg); | ||
258 | return 0; | ||
259 | } | ||
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index 35ee2bf6635..e5c5473e69c 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig | |||
@@ -15,6 +15,7 @@ config UNICORE32 | |||
15 | select GENERIC_IRQ_SHOW | 15 | select GENERIC_IRQ_SHOW |
16 | select ARCH_WANT_FRAME_POINTERS | 16 | select ARCH_WANT_FRAME_POINTERS |
17 | select GENERIC_IOMAP | 17 | select GENERIC_IOMAP |
18 | select MODULES_USE_ELF_REL | ||
18 | help | 19 | help |
19 | UniCore-32 is 32-bit Instruction Set Architecture, | 20 | UniCore-32 is 32-bit Instruction Set Architecture, |
20 | including a series of low-power-consumption RISC chip | 21 | including a series of low-power-consumption RISC chip |
diff --git a/arch/unicore32/include/asm/thread_info.h b/arch/unicore32/include/asm/thread_info.h index 89f7557583b..818b4a1edb5 100644 --- a/arch/unicore32/include/asm/thread_info.h +++ b/arch/unicore32/include/asm/thread_info.h | |||
@@ -141,12 +141,12 @@ static inline struct thread_info *current_thread_info(void) | |||
141 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 141 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
142 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 142 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
143 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 143 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
144 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | ||
145 | 144 | ||
146 | /* | 145 | /* |
147 | * Change these and you break ASM code in entry-common.S | 146 | * Change these and you break ASM code in entry-common.S |
148 | */ | 147 | */ |
149 | #define _TIF_WORK_MASK 0x000000ff | 148 | #define _TIF_WORK_MASK \ |
149 | (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_NOTIFY_RESUME) | ||
150 | 150 | ||
151 | #endif /* __KERNEL__ */ | 151 | #endif /* __KERNEL__ */ |
152 | #endif /* __UNICORE_THREAD_INFO_H__ */ | 152 | #endif /* __UNICORE_THREAD_INFO_H__ */ |
diff --git a/arch/unicore32/kernel/entry.S b/arch/unicore32/kernel/entry.S index 00a259f9819..dcb87ab19dd 100644 --- a/arch/unicore32/kernel/entry.S +++ b/arch/unicore32/kernel/entry.S | |||
@@ -544,8 +544,6 @@ fast_work_pending: | |||
544 | work_pending: | 544 | work_pending: |
545 | cand.a r1, #_TIF_NEED_RESCHED | 545 | cand.a r1, #_TIF_NEED_RESCHED |
546 | bne work_resched | 546 | bne work_resched |
547 | cand.a r1, #_TIF_SIGPENDING|_TIF_NOTIFY_RESUME | ||
548 | beq no_work_pending | ||
549 | mov r0, sp @ 'regs' | 547 | mov r0, sp @ 'regs' |
550 | mov r2, why @ 'syscall' | 548 | mov r2, why @ 'syscall' |
551 | cand.a r1, #_TIF_SIGPENDING @ delivering a signal? | 549 | cand.a r1, #_TIF_SIGPENDING @ delivering a signal? |
diff --git a/arch/unicore32/kernel/signal.c b/arch/unicore32/kernel/signal.c index 8adedb37720..b8b2ffd774d 100644 --- a/arch/unicore32/kernel/signal.c +++ b/arch/unicore32/kernel/signal.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/signal.h> | 13 | #include <linux/signal.h> |
14 | #include <linux/personality.h> | 14 | #include <linux/personality.h> |
15 | #include <linux/freezer.h> | ||
16 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
17 | #include <linux/tracehook.h> | 16 | #include <linux/tracehook.h> |
18 | #include <linux/elf.h> | 17 | #include <linux/elf.h> |
diff --git a/arch/unicore32/kernel/sys.c b/arch/unicore32/kernel/sys.c index 5fd9af773e1..fabdee96110 100644 --- a/arch/unicore32/kernel/sys.c +++ b/arch/unicore32/kernel/sys.c | |||
@@ -51,13 +51,13 @@ asmlinkage long __sys_execve(const char __user *filename, | |||
51 | struct pt_regs *regs) | 51 | struct pt_regs *regs) |
52 | { | 52 | { |
53 | int error; | 53 | int error; |
54 | char *fn; | 54 | struct filename *fn; |
55 | 55 | ||
56 | fn = getname(filename); | 56 | fn = getname(filename); |
57 | error = PTR_ERR(fn); | 57 | error = PTR_ERR(fn); |
58 | if (IS_ERR(fn)) | 58 | if (IS_ERR(fn)) |
59 | goto out; | 59 | goto out; |
60 | error = do_execve(fn, argv, envp, regs); | 60 | error = do_execve(fn->name, argv, envp, regs); |
61 | putname(fn); | 61 | putname(fn); |
62 | out: | 62 | out: |
63 | return error; | 63 | return error; |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 42d2c35a5bb..46c3bff3ced 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -109,6 +109,9 @@ config X86 | |||
109 | select HAVE_RCU_USER_QS if X86_64 | 109 | select HAVE_RCU_USER_QS if X86_64 |
110 | select HAVE_IRQ_TIME_ACCOUNTING | 110 | select HAVE_IRQ_TIME_ACCOUNTING |
111 | select GENERIC_KERNEL_THREAD | 111 | select GENERIC_KERNEL_THREAD |
112 | select GENERIC_KERNEL_EXECVE | ||
113 | select MODULES_USE_ELF_REL if X86_32 | ||
114 | select MODULES_USE_ELF_RELA if X86_64 | ||
112 | 115 | ||
113 | config INSTRUCTION_DECODER | 116 | config INSTRUCTION_DECODER |
114 | def_bool y | 117 | def_bool y |
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index ce03476d8c8..ccce0ed67dd 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -37,7 +37,8 @@ setup-y += video-bios.o | |||
37 | targets += $(setup-y) | 37 | targets += $(setup-y) |
38 | hostprogs-y := mkcpustr tools/build | 38 | hostprogs-y := mkcpustr tools/build |
39 | 39 | ||
40 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include $(USERINCLUDE) \ | 40 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include \ |
41 | -include include/generated/autoconf.h \ | ||
41 | -D__EXPORTED_HEADERS__ | 42 | -D__EXPORTED_HEADERS__ |
42 | 43 | ||
43 | $(obj)/cpu.o: $(obj)/cpustr.h | 44 | $(obj)/cpu.o: $(obj)/cpustr.h |
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index fbee9714d9a..7f0edceb756 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h | |||
@@ -121,6 +121,11 @@ | |||
121 | #define MSR_P6_EVNTSEL0 0x00000186 | 121 | #define MSR_P6_EVNTSEL0 0x00000186 |
122 | #define MSR_P6_EVNTSEL1 0x00000187 | 122 | #define MSR_P6_EVNTSEL1 0x00000187 |
123 | 123 | ||
124 | #define MSR_KNC_PERFCTR0 0x00000020 | ||
125 | #define MSR_KNC_PERFCTR1 0x00000021 | ||
126 | #define MSR_KNC_EVNTSEL0 0x00000028 | ||
127 | #define MSR_KNC_EVNTSEL1 0x00000029 | ||
128 | |||
124 | /* AMD64 MSRs. Not complete. See the architecture manual for a more | 129 | /* AMD64 MSRs. Not complete. See the architecture manual for a more |
125 | complete list. */ | 130 | complete list. */ |
126 | 131 | ||
diff --git a/arch/x86/include/asm/unistd.h b/arch/x86/include/asm/unistd.h index 55d155560fd..16f3fc6ebf2 100644 --- a/arch/x86/include/asm/unistd.h +++ b/arch/x86/include/asm/unistd.h | |||
@@ -51,7 +51,6 @@ | |||
51 | # define __ARCH_WANT_SYS_UTIME | 51 | # define __ARCH_WANT_SYS_UTIME |
52 | # define __ARCH_WANT_SYS_WAITPID | 52 | # define __ARCH_WANT_SYS_WAITPID |
53 | # define __ARCH_WANT_SYS_EXECVE | 53 | # define __ARCH_WANT_SYS_EXECVE |
54 | # define __ARCH_WANT_KERNEL_EXECVE | ||
55 | 54 | ||
56 | /* | 55 | /* |
57 | * "Conditional" syscalls | 56 | * "Conditional" syscalls |
diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h index 8b38be2de9e..46e24d36b7d 100644 --- a/arch/x86/include/asm/vgtod.h +++ b/arch/x86/include/asm/vgtod.h | |||
@@ -17,8 +17,8 @@ struct vsyscall_gtod_data { | |||
17 | 17 | ||
18 | /* open coded 'struct timespec' */ | 18 | /* open coded 'struct timespec' */ |
19 | time_t wall_time_sec; | 19 | time_t wall_time_sec; |
20 | u32 wall_time_nsec; | 20 | u64 wall_time_snsec; |
21 | u32 monotonic_time_nsec; | 21 | u64 monotonic_time_snsec; |
22 | time_t monotonic_time_sec; | 22 | time_t monotonic_time_sec; |
23 | 23 | ||
24 | struct timezone sys_tz; | 24 | struct timezone sys_tz; |
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile index d30a6a9a012..a0e067d3d96 100644 --- a/arch/x86/kernel/cpu/Makefile +++ b/arch/x86/kernel/cpu/Makefile | |||
@@ -32,7 +32,7 @@ obj-$(CONFIG_PERF_EVENTS) += perf_event.o | |||
32 | 32 | ||
33 | ifdef CONFIG_PERF_EVENTS | 33 | ifdef CONFIG_PERF_EVENTS |
34 | obj-$(CONFIG_CPU_SUP_AMD) += perf_event_amd.o | 34 | obj-$(CONFIG_CPU_SUP_AMD) += perf_event_amd.o |
35 | obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_p6.o perf_event_p4.o | 35 | obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_p6.o perf_event_knc.o perf_event_p4.o |
36 | obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_intel_lbr.o perf_event_intel_ds.o perf_event_intel.o | 36 | obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_intel_lbr.o perf_event_intel_ds.o perf_event_intel.o |
37 | obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_intel_uncore.o | 37 | obj-$(CONFIG_CPU_SUP_INTEL) += perf_event_intel_uncore.o |
38 | endif | 38 | endif |
diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h index 8b6defe7eef..271d2570029 100644 --- a/arch/x86/kernel/cpu/perf_event.h +++ b/arch/x86/kernel/cpu/perf_event.h | |||
@@ -626,6 +626,8 @@ int p4_pmu_init(void); | |||
626 | 626 | ||
627 | int p6_pmu_init(void); | 627 | int p6_pmu_init(void); |
628 | 628 | ||
629 | int knc_pmu_init(void); | ||
630 | |||
629 | #else /* CONFIG_CPU_SUP_INTEL */ | 631 | #else /* CONFIG_CPU_SUP_INTEL */ |
630 | 632 | ||
631 | static inline void reserve_ds_buffers(void) | 633 | static inline void reserve_ds_buffers(void) |
diff --git a/arch/x86/kernel/cpu/perf_event_amd_ibs.c b/arch/x86/kernel/cpu/perf_event_amd_ibs.c index eebd5ffe1bb..6336bcbd061 100644 --- a/arch/x86/kernel/cpu/perf_event_amd_ibs.c +++ b/arch/x86/kernel/cpu/perf_event_amd_ibs.c | |||
@@ -41,17 +41,22 @@ struct cpu_perf_ibs { | |||
41 | }; | 41 | }; |
42 | 42 | ||
43 | struct perf_ibs { | 43 | struct perf_ibs { |
44 | struct pmu pmu; | 44 | struct pmu pmu; |
45 | unsigned int msr; | 45 | unsigned int msr; |
46 | u64 config_mask; | 46 | u64 config_mask; |
47 | u64 cnt_mask; | 47 | u64 cnt_mask; |
48 | u64 enable_mask; | 48 | u64 enable_mask; |
49 | u64 valid_mask; | 49 | u64 valid_mask; |
50 | u64 max_period; | 50 | u64 max_period; |
51 | unsigned long offset_mask[1]; | 51 | unsigned long offset_mask[1]; |
52 | int offset_max; | 52 | int offset_max; |
53 | struct cpu_perf_ibs __percpu *pcpu; | 53 | struct cpu_perf_ibs __percpu *pcpu; |
54 | u64 (*get_count)(u64 config); | 54 | |
55 | struct attribute **format_attrs; | ||
56 | struct attribute_group format_group; | ||
57 | const struct attribute_group *attr_groups[2]; | ||
58 | |||
59 | u64 (*get_count)(u64 config); | ||
55 | }; | 60 | }; |
56 | 61 | ||
57 | struct perf_ibs_data { | 62 | struct perf_ibs_data { |
@@ -446,6 +451,19 @@ static void perf_ibs_del(struct perf_event *event, int flags) | |||
446 | 451 | ||
447 | static void perf_ibs_read(struct perf_event *event) { } | 452 | static void perf_ibs_read(struct perf_event *event) { } |
448 | 453 | ||
454 | PMU_FORMAT_ATTR(rand_en, "config:57"); | ||
455 | PMU_FORMAT_ATTR(cnt_ctl, "config:19"); | ||
456 | |||
457 | static struct attribute *ibs_fetch_format_attrs[] = { | ||
458 | &format_attr_rand_en.attr, | ||
459 | NULL, | ||
460 | }; | ||
461 | |||
462 | static struct attribute *ibs_op_format_attrs[] = { | ||
463 | NULL, /* &format_attr_cnt_ctl.attr if IBS_CAPS_OPCNT */ | ||
464 | NULL, | ||
465 | }; | ||
466 | |||
449 | static struct perf_ibs perf_ibs_fetch = { | 467 | static struct perf_ibs perf_ibs_fetch = { |
450 | .pmu = { | 468 | .pmu = { |
451 | .task_ctx_nr = perf_invalid_context, | 469 | .task_ctx_nr = perf_invalid_context, |
@@ -465,6 +483,7 @@ static struct perf_ibs perf_ibs_fetch = { | |||
465 | .max_period = IBS_FETCH_MAX_CNT << 4, | 483 | .max_period = IBS_FETCH_MAX_CNT << 4, |
466 | .offset_mask = { MSR_AMD64_IBSFETCH_REG_MASK }, | 484 | .offset_mask = { MSR_AMD64_IBSFETCH_REG_MASK }, |
467 | .offset_max = MSR_AMD64_IBSFETCH_REG_COUNT, | 485 | .offset_max = MSR_AMD64_IBSFETCH_REG_COUNT, |
486 | .format_attrs = ibs_fetch_format_attrs, | ||
468 | 487 | ||
469 | .get_count = get_ibs_fetch_count, | 488 | .get_count = get_ibs_fetch_count, |
470 | }; | 489 | }; |
@@ -488,6 +507,7 @@ static struct perf_ibs perf_ibs_op = { | |||
488 | .max_period = IBS_OP_MAX_CNT << 4, | 507 | .max_period = IBS_OP_MAX_CNT << 4, |
489 | .offset_mask = { MSR_AMD64_IBSOP_REG_MASK }, | 508 | .offset_mask = { MSR_AMD64_IBSOP_REG_MASK }, |
490 | .offset_max = MSR_AMD64_IBSOP_REG_COUNT, | 509 | .offset_max = MSR_AMD64_IBSOP_REG_COUNT, |
510 | .format_attrs = ibs_op_format_attrs, | ||
491 | 511 | ||
492 | .get_count = get_ibs_op_count, | 512 | .get_count = get_ibs_op_count, |
493 | }; | 513 | }; |
@@ -597,6 +617,17 @@ static __init int perf_ibs_pmu_init(struct perf_ibs *perf_ibs, char *name) | |||
597 | 617 | ||
598 | perf_ibs->pcpu = pcpu; | 618 | perf_ibs->pcpu = pcpu; |
599 | 619 | ||
620 | /* register attributes */ | ||
621 | if (perf_ibs->format_attrs[0]) { | ||
622 | memset(&perf_ibs->format_group, 0, sizeof(perf_ibs->format_group)); | ||
623 | perf_ibs->format_group.name = "format"; | ||
624 | perf_ibs->format_group.attrs = perf_ibs->format_attrs; | ||
625 | |||
626 | memset(&perf_ibs->attr_groups, 0, sizeof(perf_ibs->attr_groups)); | ||
627 | perf_ibs->attr_groups[0] = &perf_ibs->format_group; | ||
628 | perf_ibs->pmu.attr_groups = perf_ibs->attr_groups; | ||
629 | } | ||
630 | |||
600 | ret = perf_pmu_register(&perf_ibs->pmu, name, -1); | 631 | ret = perf_pmu_register(&perf_ibs->pmu, name, -1); |
601 | if (ret) { | 632 | if (ret) { |
602 | perf_ibs->pcpu = NULL; | 633 | perf_ibs->pcpu = NULL; |
@@ -608,13 +639,19 @@ static __init int perf_ibs_pmu_init(struct perf_ibs *perf_ibs, char *name) | |||
608 | 639 | ||
609 | static __init int perf_event_ibs_init(void) | 640 | static __init int perf_event_ibs_init(void) |
610 | { | 641 | { |
642 | struct attribute **attr = ibs_op_format_attrs; | ||
643 | |||
611 | if (!ibs_caps) | 644 | if (!ibs_caps) |
612 | return -ENODEV; /* ibs not supported by the cpu */ | 645 | return -ENODEV; /* ibs not supported by the cpu */ |
613 | 646 | ||
614 | perf_ibs_pmu_init(&perf_ibs_fetch, "ibs_fetch"); | 647 | perf_ibs_pmu_init(&perf_ibs_fetch, "ibs_fetch"); |
615 | if (ibs_caps & IBS_CAPS_OPCNT) | 648 | |
649 | if (ibs_caps & IBS_CAPS_OPCNT) { | ||
616 | perf_ibs_op.config_mask |= IBS_OP_CNT_CTL; | 650 | perf_ibs_op.config_mask |= IBS_OP_CNT_CTL; |
651 | *attr++ = &format_attr_cnt_ctl.attr; | ||
652 | } | ||
617 | perf_ibs_pmu_init(&perf_ibs_op, "ibs_op"); | 653 | perf_ibs_pmu_init(&perf_ibs_op, "ibs_op"); |
654 | |||
618 | register_nmi_handler(NMI_LOCAL, perf_ibs_nmi_handler, 0, "perf_ibs"); | 655 | register_nmi_handler(NMI_LOCAL, perf_ibs_nmi_handler, 0, "perf_ibs"); |
619 | printk(KERN_INFO "perf: AMD IBS detected (0x%08x)\n", ibs_caps); | 656 | printk(KERN_INFO "perf: AMD IBS detected (0x%08x)\n", ibs_caps); |
620 | 657 | ||
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 6bca492b854..324bb523d9d 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -1906,6 +1906,8 @@ __init int intel_pmu_init(void) | |||
1906 | switch (boot_cpu_data.x86) { | 1906 | switch (boot_cpu_data.x86) { |
1907 | case 0x6: | 1907 | case 0x6: |
1908 | return p6_pmu_init(); | 1908 | return p6_pmu_init(); |
1909 | case 0xb: | ||
1910 | return knc_pmu_init(); | ||
1909 | case 0xf: | 1911 | case 0xf: |
1910 | return p4_pmu_init(); | 1912 | return p4_pmu_init(); |
1911 | } | 1913 | } |
diff --git a/arch/x86/kernel/cpu/perf_event_knc.c b/arch/x86/kernel/cpu/perf_event_knc.c new file mode 100644 index 00000000000..7c46bfdbc37 --- /dev/null +++ b/arch/x86/kernel/cpu/perf_event_knc.c | |||
@@ -0,0 +1,248 @@ | |||
1 | /* Driver for Intel Xeon Phi "Knights Corner" PMU */ | ||
2 | |||
3 | #include <linux/perf_event.h> | ||
4 | #include <linux/types.h> | ||
5 | |||
6 | #include "perf_event.h" | ||
7 | |||
8 | static const u64 knc_perfmon_event_map[] = | ||
9 | { | ||
10 | [PERF_COUNT_HW_CPU_CYCLES] = 0x002a, | ||
11 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x0016, | ||
12 | [PERF_COUNT_HW_CACHE_REFERENCES] = 0x0028, | ||
13 | [PERF_COUNT_HW_CACHE_MISSES] = 0x0029, | ||
14 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x0012, | ||
15 | [PERF_COUNT_HW_BRANCH_MISSES] = 0x002b, | ||
16 | }; | ||
17 | |||
18 | static __initconst u64 knc_hw_cache_event_ids | ||
19 | [PERF_COUNT_HW_CACHE_MAX] | ||
20 | [PERF_COUNT_HW_CACHE_OP_MAX] | ||
21 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = | ||
22 | { | ||
23 | [ C(L1D) ] = { | ||
24 | [ C(OP_READ) ] = { | ||
25 | /* On Xeon Phi event "0" is a valid DATA_READ */ | ||
26 | /* (L1 Data Cache Reads) Instruction. */ | ||
27 | /* We code this as ARCH_PERFMON_EVENTSEL_INT as this */ | ||
28 | /* bit will always be set in x86_pmu_hw_config(). */ | ||
29 | [ C(RESULT_ACCESS) ] = ARCH_PERFMON_EVENTSEL_INT, | ||
30 | /* DATA_READ */ | ||
31 | [ C(RESULT_MISS) ] = 0x0003, /* DATA_READ_MISS */ | ||
32 | }, | ||
33 | [ C(OP_WRITE) ] = { | ||
34 | [ C(RESULT_ACCESS) ] = 0x0001, /* DATA_WRITE */ | ||
35 | [ C(RESULT_MISS) ] = 0x0004, /* DATA_WRITE_MISS */ | ||
36 | }, | ||
37 | [ C(OP_PREFETCH) ] = { | ||
38 | [ C(RESULT_ACCESS) ] = 0x0011, /* L1_DATA_PF1 */ | ||
39 | [ C(RESULT_MISS) ] = 0x001c, /* L1_DATA_PF1_MISS */ | ||
40 | }, | ||
41 | }, | ||
42 | [ C(L1I ) ] = { | ||
43 | [ C(OP_READ) ] = { | ||
44 | [ C(RESULT_ACCESS) ] = 0x000c, /* CODE_READ */ | ||
45 | [ C(RESULT_MISS) ] = 0x000e, /* CODE_CACHE_MISS */ | ||
46 | }, | ||
47 | [ C(OP_WRITE) ] = { | ||
48 | [ C(RESULT_ACCESS) ] = -1, | ||
49 | [ C(RESULT_MISS) ] = -1, | ||
50 | }, | ||
51 | [ C(OP_PREFETCH) ] = { | ||
52 | [ C(RESULT_ACCESS) ] = 0x0, | ||
53 | [ C(RESULT_MISS) ] = 0x0, | ||
54 | }, | ||
55 | }, | ||
56 | [ C(LL ) ] = { | ||
57 | [ C(OP_READ) ] = { | ||
58 | [ C(RESULT_ACCESS) ] = 0, | ||
59 | [ C(RESULT_MISS) ] = 0x10cb, /* L2_READ_MISS */ | ||
60 | }, | ||
61 | [ C(OP_WRITE) ] = { | ||
62 | [ C(RESULT_ACCESS) ] = 0x10cc, /* L2_WRITE_HIT */ | ||
63 | [ C(RESULT_MISS) ] = 0, | ||
64 | }, | ||
65 | [ C(OP_PREFETCH) ] = { | ||
66 | [ C(RESULT_ACCESS) ] = 0x10fc, /* L2_DATA_PF2 */ | ||
67 | [ C(RESULT_MISS) ] = 0x10fe, /* L2_DATA_PF2_MISS */ | ||
68 | }, | ||
69 | }, | ||
70 | [ C(DTLB) ] = { | ||
71 | [ C(OP_READ) ] = { | ||
72 | [ C(RESULT_ACCESS) ] = ARCH_PERFMON_EVENTSEL_INT, | ||
73 | /* DATA_READ */ | ||
74 | /* see note on L1 OP_READ */ | ||
75 | [ C(RESULT_MISS) ] = 0x0002, /* DATA_PAGE_WALK */ | ||
76 | }, | ||
77 | [ C(OP_WRITE) ] = { | ||
78 | [ C(RESULT_ACCESS) ] = 0x0001, /* DATA_WRITE */ | ||
79 | [ C(RESULT_MISS) ] = 0x0002, /* DATA_PAGE_WALK */ | ||
80 | }, | ||
81 | [ C(OP_PREFETCH) ] = { | ||
82 | [ C(RESULT_ACCESS) ] = 0x0, | ||
83 | [ C(RESULT_MISS) ] = 0x0, | ||
84 | }, | ||
85 | }, | ||
86 | [ C(ITLB) ] = { | ||
87 | [ C(OP_READ) ] = { | ||
88 | [ C(RESULT_ACCESS) ] = 0x000c, /* CODE_READ */ | ||
89 | [ C(RESULT_MISS) ] = 0x000d, /* CODE_PAGE_WALK */ | ||
90 | }, | ||
91 | [ C(OP_WRITE) ] = { | ||
92 | [ C(RESULT_ACCESS) ] = -1, | ||
93 | [ C(RESULT_MISS) ] = -1, | ||
94 | }, | ||
95 | [ C(OP_PREFETCH) ] = { | ||
96 | [ C(RESULT_ACCESS) ] = -1, | ||
97 | [ C(RESULT_MISS) ] = -1, | ||
98 | }, | ||
99 | }, | ||
100 | [ C(BPU ) ] = { | ||
101 | [ C(OP_READ) ] = { | ||
102 | [ C(RESULT_ACCESS) ] = 0x0012, /* BRANCHES */ | ||
103 | [ C(RESULT_MISS) ] = 0x002b, /* BRANCHES_MISPREDICTED */ | ||
104 | }, | ||
105 | [ C(OP_WRITE) ] = { | ||
106 | [ C(RESULT_ACCESS) ] = -1, | ||
107 | [ C(RESULT_MISS) ] = -1, | ||
108 | }, | ||
109 | [ C(OP_PREFETCH) ] = { | ||
110 | [ C(RESULT_ACCESS) ] = -1, | ||
111 | [ C(RESULT_MISS) ] = -1, | ||
112 | }, | ||
113 | }, | ||
114 | }; | ||
115 | |||
116 | |||
117 | static u64 knc_pmu_event_map(int hw_event) | ||
118 | { | ||
119 | return knc_perfmon_event_map[hw_event]; | ||
120 | } | ||
121 | |||
122 | static struct event_constraint knc_event_constraints[] = | ||
123 | { | ||
124 | INTEL_EVENT_CONSTRAINT(0xc3, 0x1), /* HWP_L2HIT */ | ||
125 | INTEL_EVENT_CONSTRAINT(0xc4, 0x1), /* HWP_L2MISS */ | ||
126 | INTEL_EVENT_CONSTRAINT(0xc8, 0x1), /* L2_READ_HIT_E */ | ||
127 | INTEL_EVENT_CONSTRAINT(0xc9, 0x1), /* L2_READ_HIT_M */ | ||
128 | INTEL_EVENT_CONSTRAINT(0xca, 0x1), /* L2_READ_HIT_S */ | ||
129 | INTEL_EVENT_CONSTRAINT(0xcb, 0x1), /* L2_READ_MISS */ | ||
130 | INTEL_EVENT_CONSTRAINT(0xcc, 0x1), /* L2_WRITE_HIT */ | ||
131 | INTEL_EVENT_CONSTRAINT(0xce, 0x1), /* L2_STRONGLY_ORDERED_STREAMING_VSTORES_MISS */ | ||
132 | INTEL_EVENT_CONSTRAINT(0xcf, 0x1), /* L2_WEAKLY_ORDERED_STREAMING_VSTORE_MISS */ | ||
133 | INTEL_EVENT_CONSTRAINT(0xd7, 0x1), /* L2_VICTIM_REQ_WITH_DATA */ | ||
134 | INTEL_EVENT_CONSTRAINT(0xe3, 0x1), /* SNP_HITM_BUNIT */ | ||
135 | INTEL_EVENT_CONSTRAINT(0xe6, 0x1), /* SNP_HIT_L2 */ | ||
136 | INTEL_EVENT_CONSTRAINT(0xe7, 0x1), /* SNP_HITM_L2 */ | ||
137 | INTEL_EVENT_CONSTRAINT(0xf1, 0x1), /* L2_DATA_READ_MISS_CACHE_FILL */ | ||
138 | INTEL_EVENT_CONSTRAINT(0xf2, 0x1), /* L2_DATA_WRITE_MISS_CACHE_FILL */ | ||
139 | INTEL_EVENT_CONSTRAINT(0xf6, 0x1), /* L2_DATA_READ_MISS_MEM_FILL */ | ||
140 | INTEL_EVENT_CONSTRAINT(0xf7, 0x1), /* L2_DATA_WRITE_MISS_MEM_FILL */ | ||
141 | INTEL_EVENT_CONSTRAINT(0xfc, 0x1), /* L2_DATA_PF2 */ | ||
142 | INTEL_EVENT_CONSTRAINT(0xfd, 0x1), /* L2_DATA_PF2_DROP */ | ||
143 | INTEL_EVENT_CONSTRAINT(0xfe, 0x1), /* L2_DATA_PF2_MISS */ | ||
144 | INTEL_EVENT_CONSTRAINT(0xff, 0x1), /* L2_DATA_HIT_INFLIGHT_PF2 */ | ||
145 | EVENT_CONSTRAINT_END | ||
146 | }; | ||
147 | |||
148 | #define MSR_KNC_IA32_PERF_GLOBAL_STATUS 0x0000002d | ||
149 | #define MSR_KNC_IA32_PERF_GLOBAL_OVF_CONTROL 0x0000002e | ||
150 | #define MSR_KNC_IA32_PERF_GLOBAL_CTRL 0x0000002f | ||
151 | |||
152 | #define KNC_ENABLE_COUNTER0 0x00000001 | ||
153 | #define KNC_ENABLE_COUNTER1 0x00000002 | ||
154 | |||
155 | static void knc_pmu_disable_all(void) | ||
156 | { | ||
157 | u64 val; | ||
158 | |||
159 | rdmsrl(MSR_KNC_IA32_PERF_GLOBAL_CTRL, val); | ||
160 | val &= ~(KNC_ENABLE_COUNTER0|KNC_ENABLE_COUNTER1); | ||
161 | wrmsrl(MSR_KNC_IA32_PERF_GLOBAL_CTRL, val); | ||
162 | } | ||
163 | |||
164 | static void knc_pmu_enable_all(int added) | ||
165 | { | ||
166 | u64 val; | ||
167 | |||
168 | rdmsrl(MSR_KNC_IA32_PERF_GLOBAL_CTRL, val); | ||
169 | val |= (KNC_ENABLE_COUNTER0|KNC_ENABLE_COUNTER1); | ||
170 | wrmsrl(MSR_KNC_IA32_PERF_GLOBAL_CTRL, val); | ||
171 | } | ||
172 | |||
173 | static inline void | ||
174 | knc_pmu_disable_event(struct perf_event *event) | ||
175 | { | ||
176 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | ||
177 | struct hw_perf_event *hwc = &event->hw; | ||
178 | u64 val; | ||
179 | |||
180 | val = hwc->config; | ||
181 | if (cpuc->enabled) | ||
182 | val &= ~ARCH_PERFMON_EVENTSEL_ENABLE; | ||
183 | |||
184 | (void)wrmsrl_safe(hwc->config_base + hwc->idx, val); | ||
185 | } | ||
186 | |||
187 | static void knc_pmu_enable_event(struct perf_event *event) | ||
188 | { | ||
189 | struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); | ||
190 | struct hw_perf_event *hwc = &event->hw; | ||
191 | u64 val; | ||
192 | |||
193 | val = hwc->config; | ||
194 | if (cpuc->enabled) | ||
195 | val |= ARCH_PERFMON_EVENTSEL_ENABLE; | ||
196 | |||
197 | (void)wrmsrl_safe(hwc->config_base + hwc->idx, val); | ||
198 | } | ||
199 | |||
200 | PMU_FORMAT_ATTR(event, "config:0-7" ); | ||
201 | PMU_FORMAT_ATTR(umask, "config:8-15" ); | ||
202 | PMU_FORMAT_ATTR(edge, "config:18" ); | ||
203 | PMU_FORMAT_ATTR(inv, "config:23" ); | ||
204 | PMU_FORMAT_ATTR(cmask, "config:24-31" ); | ||
205 | |||
206 | static struct attribute *intel_knc_formats_attr[] = { | ||
207 | &format_attr_event.attr, | ||
208 | &format_attr_umask.attr, | ||
209 | &format_attr_edge.attr, | ||
210 | &format_attr_inv.attr, | ||
211 | &format_attr_cmask.attr, | ||
212 | NULL, | ||
213 | }; | ||
214 | |||
215 | static __initconst struct x86_pmu knc_pmu = { | ||
216 | .name = "knc", | ||
217 | .handle_irq = x86_pmu_handle_irq, | ||
218 | .disable_all = knc_pmu_disable_all, | ||
219 | .enable_all = knc_pmu_enable_all, | ||
220 | .enable = knc_pmu_enable_event, | ||
221 | .disable = knc_pmu_disable_event, | ||
222 | .hw_config = x86_pmu_hw_config, | ||
223 | .schedule_events = x86_schedule_events, | ||
224 | .eventsel = MSR_KNC_EVNTSEL0, | ||
225 | .perfctr = MSR_KNC_PERFCTR0, | ||
226 | .event_map = knc_pmu_event_map, | ||
227 | .max_events = ARRAY_SIZE(knc_perfmon_event_map), | ||
228 | .apic = 1, | ||
229 | .max_period = (1ULL << 31) - 1, | ||
230 | .version = 0, | ||
231 | .num_counters = 2, | ||
232 | /* in theory 40 bits, early silicon is buggy though */ | ||
233 | .cntval_bits = 32, | ||
234 | .cntval_mask = (1ULL << 32) - 1, | ||
235 | .get_event_constraints = x86_get_event_constraints, | ||
236 | .event_constraints = knc_event_constraints, | ||
237 | .format_attrs = intel_knc_formats_attr, | ||
238 | }; | ||
239 | |||
240 | __init int knc_pmu_init(void) | ||
241 | { | ||
242 | x86_pmu = knc_pmu; | ||
243 | |||
244 | memcpy(hw_cache_event_ids, knc_hw_cache_event_ids, | ||
245 | sizeof(hw_cache_event_ids)); | ||
246 | |||
247 | return 0; | ||
248 | } | ||
diff --git a/arch/x86/kernel/cpu/perfctr-watchdog.c b/arch/x86/kernel/cpu/perfctr-watchdog.c index 966512b2cac..2e8caf03f59 100644 --- a/arch/x86/kernel/cpu/perfctr-watchdog.c +++ b/arch/x86/kernel/cpu/perfctr-watchdog.c | |||
@@ -56,6 +56,8 @@ static inline unsigned int nmi_perfctr_msr_to_bit(unsigned int msr) | |||
56 | switch (boot_cpu_data.x86) { | 56 | switch (boot_cpu_data.x86) { |
57 | case 6: | 57 | case 6: |
58 | return msr - MSR_P6_PERFCTR0; | 58 | return msr - MSR_P6_PERFCTR0; |
59 | case 11: | ||
60 | return msr - MSR_KNC_PERFCTR0; | ||
59 | case 15: | 61 | case 15: |
60 | return msr - MSR_P4_BPU_PERFCTR0; | 62 | return msr - MSR_P4_BPU_PERFCTR0; |
61 | } | 63 | } |
@@ -82,6 +84,8 @@ static inline unsigned int nmi_evntsel_msr_to_bit(unsigned int msr) | |||
82 | switch (boot_cpu_data.x86) { | 84 | switch (boot_cpu_data.x86) { |
83 | case 6: | 85 | case 6: |
84 | return msr - MSR_P6_EVNTSEL0; | 86 | return msr - MSR_P6_EVNTSEL0; |
87 | case 11: | ||
88 | return msr - MSR_KNC_EVNTSEL0; | ||
85 | case 15: | 89 | case 15: |
86 | return msr - MSR_P4_BSU_ESCR0; | 90 | return msr - MSR_P4_BSU_ESCR0; |
87 | } | 91 | } |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 8f9ed1afde8..a1193aef6d7 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -299,12 +299,20 @@ ENTRY(ret_from_fork) | |||
299 | CFI_ENDPROC | 299 | CFI_ENDPROC |
300 | END(ret_from_fork) | 300 | END(ret_from_fork) |
301 | 301 | ||
302 | ENTRY(ret_from_kernel_execve) | 302 | ENTRY(ret_from_kernel_thread) |
303 | movl %eax, %esp | 303 | CFI_STARTPROC |
304 | movl $0,PT_EAX(%esp) | 304 | pushl_cfi %eax |
305 | call schedule_tail | ||
305 | GET_THREAD_INFO(%ebp) | 306 | GET_THREAD_INFO(%ebp) |
307 | popl_cfi %eax | ||
308 | pushl_cfi $0x0202 # Reset kernel eflags | ||
309 | popfl_cfi | ||
310 | movl PT_EBP(%esp),%eax | ||
311 | call *PT_EBX(%esp) | ||
312 | movl $0,PT_EAX(%esp) | ||
306 | jmp syscall_exit | 313 | jmp syscall_exit |
307 | END(ret_from_kernel_execve) | 314 | CFI_ENDPROC |
315 | ENDPROC(ret_from_kernel_thread) | ||
308 | 316 | ||
309 | /* | 317 | /* |
310 | * Interrupt exit functions should be protected against kprobes | 318 | * Interrupt exit functions should be protected against kprobes |
@@ -622,6 +630,10 @@ work_notifysig: # deal with pending signals and | |||
622 | movl %esp, %eax | 630 | movl %esp, %eax |
623 | jne work_notifysig_v86 # returning to kernel-space or | 631 | jne work_notifysig_v86 # returning to kernel-space or |
624 | # vm86-space | 632 | # vm86-space |
633 | 1: | ||
634 | #else | ||
635 | movl %esp, %eax | ||
636 | #endif | ||
625 | TRACE_IRQS_ON | 637 | TRACE_IRQS_ON |
626 | ENABLE_INTERRUPTS(CLBR_NONE) | 638 | ENABLE_INTERRUPTS(CLBR_NONE) |
627 | movb PT_CS(%esp), %bl | 639 | movb PT_CS(%esp), %bl |
@@ -632,24 +644,15 @@ work_notifysig: # deal with pending signals and | |||
632 | call do_notify_resume | 644 | call do_notify_resume |
633 | jmp resume_userspace | 645 | jmp resume_userspace |
634 | 646 | ||
647 | #ifdef CONFIG_VM86 | ||
635 | ALIGN | 648 | ALIGN |
636 | work_notifysig_v86: | 649 | work_notifysig_v86: |
637 | pushl_cfi %ecx # save ti_flags for do_notify_resume | 650 | pushl_cfi %ecx # save ti_flags for do_notify_resume |
638 | call save_v86_state # %eax contains pt_regs pointer | 651 | call save_v86_state # %eax contains pt_regs pointer |
639 | popl_cfi %ecx | 652 | popl_cfi %ecx |
640 | movl %eax, %esp | 653 | movl %eax, %esp |
641 | #else | 654 | jmp 1b |
642 | movl %esp, %eax | ||
643 | #endif | 655 | #endif |
644 | TRACE_IRQS_ON | ||
645 | ENABLE_INTERRUPTS(CLBR_NONE) | ||
646 | movb PT_CS(%esp), %bl | ||
647 | andb $SEGMENT_RPL_MASK, %bl | ||
648 | cmpb $USER_RPL, %bl | ||
649 | jb resume_kernel | ||
650 | xorl %edx, %edx | ||
651 | call do_notify_resume | ||
652 | jmp resume_userspace | ||
653 | END(work_pending) | 656 | END(work_pending) |
654 | 657 | ||
655 | # perform syscall exit tracing | 658 | # perform syscall exit tracing |
@@ -1020,21 +1023,6 @@ END(spurious_interrupt_bug) | |||
1020 | */ | 1023 | */ |
1021 | .popsection | 1024 | .popsection |
1022 | 1025 | ||
1023 | ENTRY(ret_from_kernel_thread) | ||
1024 | CFI_STARTPROC | ||
1025 | pushl_cfi %eax | ||
1026 | call schedule_tail | ||
1027 | GET_THREAD_INFO(%ebp) | ||
1028 | popl_cfi %eax | ||
1029 | pushl_cfi $0x0202 # Reset kernel eflags | ||
1030 | popfl_cfi | ||
1031 | movl PT_EBP(%esp),%eax | ||
1032 | call *PT_EBX(%esp) | ||
1033 | call do_exit | ||
1034 | ud2 # padding for call trace | ||
1035 | CFI_ENDPROC | ||
1036 | ENDPROC(ret_from_kernel_thread) | ||
1037 | |||
1038 | #ifdef CONFIG_XEN | 1026 | #ifdef CONFIG_XEN |
1039 | /* Xen doesn't set %esp to be precisely what the normal sysenter | 1027 | /* Xen doesn't set %esp to be precisely what the normal sysenter |
1040 | entrypoint expects, so fix it up before using the normal path. */ | 1028 | entrypoint expects, so fix it up before using the normal path. */ |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index cdc790c78f3..0c58952d64e 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -563,15 +563,13 @@ ENTRY(ret_from_fork) | |||
563 | jmp ret_from_sys_call # go to the SYSRET fastpath | 563 | jmp ret_from_sys_call # go to the SYSRET fastpath |
564 | 564 | ||
565 | 1: | 565 | 1: |
566 | subq $REST_SKIP, %rsp # move the stack pointer back | 566 | subq $REST_SKIP, %rsp # leave space for volatiles |
567 | CFI_ADJUST_CFA_OFFSET REST_SKIP | 567 | CFI_ADJUST_CFA_OFFSET REST_SKIP |
568 | movq %rbp, %rdi | 568 | movq %rbp, %rdi |
569 | call *%rbx | 569 | call *%rbx |
570 | # exit | 570 | movl $0, RAX(%rsp) |
571 | mov %eax, %edi | 571 | RESTORE_REST |
572 | call do_exit | 572 | jmp int_ret_from_sys_call |
573 | ud2 # padding for call trace | ||
574 | |||
575 | CFI_ENDPROC | 573 | CFI_ENDPROC |
576 | END(ret_from_fork) | 574 | END(ret_from_fork) |
577 | 575 | ||
@@ -1326,20 +1324,6 @@ bad_gs: | |||
1326 | jmp 2b | 1324 | jmp 2b |
1327 | .previous | 1325 | .previous |
1328 | 1326 | ||
1329 | ENTRY(ret_from_kernel_execve) | ||
1330 | movq %rdi, %rsp | ||
1331 | movl $0, RAX(%rsp) | ||
1332 | // RESTORE_REST | ||
1333 | movq 0*8(%rsp), %r15 | ||
1334 | movq 1*8(%rsp), %r14 | ||
1335 | movq 2*8(%rsp), %r13 | ||
1336 | movq 3*8(%rsp), %r12 | ||
1337 | movq 4*8(%rsp), %rbp | ||
1338 | movq 5*8(%rsp), %rbx | ||
1339 | addq $(6*8), %rsp | ||
1340 | jmp int_ret_from_sys_call | ||
1341 | END(ret_from_kernel_execve) | ||
1342 | |||
1343 | /* Call softirq on interrupt stack. Interrupts are off. */ | 1327 | /* Call softirq on interrupt stack. Interrupts are off. */ |
1344 | ENTRY(call_softirq) | 1328 | ENTRY(call_softirq) |
1345 | CFI_STARTPROC | 1329 | CFI_STARTPROC |
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c index 3f61904365c..836f8322960 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c | |||
@@ -746,7 +746,9 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip) | |||
746 | int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt) | 746 | int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt) |
747 | { | 747 | { |
748 | int err; | 748 | int err; |
749 | #ifdef CONFIG_DEBUG_RODATA | ||
749 | char opc[BREAK_INSTR_SIZE]; | 750 | char opc[BREAK_INSTR_SIZE]; |
751 | #endif /* CONFIG_DEBUG_RODATA */ | ||
750 | 752 | ||
751 | bpt->type = BP_BREAKPOINT; | 753 | bpt->type = BP_BREAKPOINT; |
752 | err = probe_kernel_read(bpt->saved_instr, (char *)bpt->bpt_addr, | 754 | err = probe_kernel_read(bpt->saved_instr, (char *)bpt->bpt_addr, |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index d609be046b5..a2bb18e0283 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -68,6 +68,7 @@ | |||
68 | #include <linux/percpu.h> | 68 | #include <linux/percpu.h> |
69 | #include <linux/crash_dump.h> | 69 | #include <linux/crash_dump.h> |
70 | #include <linux/tboot.h> | 70 | #include <linux/tboot.h> |
71 | #include <linux/jiffies.h> | ||
71 | 72 | ||
72 | #include <video/edid.h> | 73 | #include <video/edid.h> |
73 | 74 | ||
@@ -1032,6 +1033,8 @@ void __init setup_arch(char **cmdline_p) | |||
1032 | mcheck_init(); | 1033 | mcheck_init(); |
1033 | 1034 | ||
1034 | arch_init_ideal_nops(); | 1035 | arch_init_ideal_nops(); |
1036 | |||
1037 | register_refined_jiffies(CLOCK_TICK_RATE); | ||
1035 | } | 1038 | } |
1036 | 1039 | ||
1037 | #ifdef CONFIG_X86_32 | 1040 | #ifdef CONFIG_X86_32 |
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c index 8d141b30904..3a3e8c9e280 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/jiffies.h> | 28 | #include <linux/jiffies.h> |
29 | #include <linux/sysctl.h> | 29 | #include <linux/sysctl.h> |
30 | #include <linux/topology.h> | 30 | #include <linux/topology.h> |
31 | #include <linux/clocksource.h> | 31 | #include <linux/timekeeper_internal.h> |
32 | #include <linux/getcpu.h> | 32 | #include <linux/getcpu.h> |
33 | #include <linux/cpu.h> | 33 | #include <linux/cpu.h> |
34 | #include <linux/smp.h> | 34 | #include <linux/smp.h> |
@@ -82,32 +82,41 @@ void update_vsyscall_tz(void) | |||
82 | vsyscall_gtod_data.sys_tz = sys_tz; | 82 | vsyscall_gtod_data.sys_tz = sys_tz; |
83 | } | 83 | } |
84 | 84 | ||
85 | void update_vsyscall(struct timespec *wall_time, struct timespec *wtm, | 85 | void update_vsyscall(struct timekeeper *tk) |
86 | struct clocksource *clock, u32 mult) | ||
87 | { | 86 | { |
88 | struct timespec monotonic; | 87 | struct vsyscall_gtod_data *vdata = &vsyscall_gtod_data; |
89 | 88 | ||
90 | write_seqcount_begin(&vsyscall_gtod_data.seq); | 89 | write_seqcount_begin(&vdata->seq); |
91 | 90 | ||
92 | /* copy vsyscall data */ | 91 | /* copy vsyscall data */ |
93 | vsyscall_gtod_data.clock.vclock_mode = clock->archdata.vclock_mode; | 92 | vdata->clock.vclock_mode = tk->clock->archdata.vclock_mode; |
94 | vsyscall_gtod_data.clock.cycle_last = clock->cycle_last; | 93 | vdata->clock.cycle_last = tk->clock->cycle_last; |
95 | vsyscall_gtod_data.clock.mask = clock->mask; | 94 | vdata->clock.mask = tk->clock->mask; |
96 | vsyscall_gtod_data.clock.mult = mult; | 95 | vdata->clock.mult = tk->mult; |
97 | vsyscall_gtod_data.clock.shift = clock->shift; | 96 | vdata->clock.shift = tk->shift; |
98 | 97 | ||
99 | vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec; | 98 | vdata->wall_time_sec = tk->xtime_sec; |
100 | vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec; | 99 | vdata->wall_time_snsec = tk->xtime_nsec; |
100 | |||
101 | vdata->monotonic_time_sec = tk->xtime_sec | ||
102 | + tk->wall_to_monotonic.tv_sec; | ||
103 | vdata->monotonic_time_snsec = tk->xtime_nsec | ||
104 | + (tk->wall_to_monotonic.tv_nsec | ||
105 | << tk->shift); | ||
106 | while (vdata->monotonic_time_snsec >= | ||
107 | (((u64)NSEC_PER_SEC) << tk->shift)) { | ||
108 | vdata->monotonic_time_snsec -= | ||
109 | ((u64)NSEC_PER_SEC) << tk->shift; | ||
110 | vdata->monotonic_time_sec++; | ||
111 | } | ||
101 | 112 | ||
102 | monotonic = timespec_add(*wall_time, *wtm); | 113 | vdata->wall_time_coarse.tv_sec = tk->xtime_sec; |
103 | vsyscall_gtod_data.monotonic_time_sec = monotonic.tv_sec; | 114 | vdata->wall_time_coarse.tv_nsec = (long)(tk->xtime_nsec >> tk->shift); |
104 | vsyscall_gtod_data.monotonic_time_nsec = monotonic.tv_nsec; | ||
105 | 115 | ||
106 | vsyscall_gtod_data.wall_time_coarse = __current_kernel_time(); | 116 | vdata->monotonic_time_coarse = timespec_add(vdata->wall_time_coarse, |
107 | vsyscall_gtod_data.monotonic_time_coarse = | 117 | tk->wall_to_monotonic); |
108 | timespec_add(vsyscall_gtod_data.wall_time_coarse, *wtm); | ||
109 | 118 | ||
110 | write_seqcount_end(&vsyscall_gtod_data.seq); | 119 | write_seqcount_end(&vdata->seq); |
111 | } | 120 | } |
112 | 121 | ||
113 | static void warn_bad_vsyscall(const char *level, struct pt_regs *regs, | 122 | static void warn_bad_vsyscall(const char *level, struct pt_regs *regs, |
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig index 30c4eec033a..07611759ce3 100644 --- a/arch/x86/um/Kconfig +++ b/arch/x86/um/Kconfig | |||
@@ -14,6 +14,7 @@ config UML_X86 | |||
14 | def_bool y | 14 | def_bool y |
15 | select GENERIC_FIND_FIRST_BIT | 15 | select GENERIC_FIND_FIRST_BIT |
16 | select GENERIC_KERNEL_THREAD | 16 | select GENERIC_KERNEL_THREAD |
17 | select GENERIC_KERNEL_EXECVE | ||
17 | 18 | ||
18 | config 64BIT | 19 | config 64BIT |
19 | bool "64-bit kernel" if SUBARCH = "x86" | 20 | bool "64-bit kernel" if SUBARCH = "x86" |
@@ -23,9 +24,11 @@ config X86_32 | |||
23 | def_bool !64BIT | 24 | def_bool !64BIT |
24 | select HAVE_AOUT | 25 | select HAVE_AOUT |
25 | select ARCH_WANT_IPC_PARSE_VERSION | 26 | select ARCH_WANT_IPC_PARSE_VERSION |
27 | select MODULES_USE_ELF_REL | ||
26 | 28 | ||
27 | config X86_64 | 29 | config X86_64 |
28 | def_bool 64BIT | 30 | def_bool 64BIT |
31 | select MODULES_USE_ELF_RELA | ||
29 | 32 | ||
30 | config RWSEM_XCHGADD_ALGORITHM | 33 | config RWSEM_XCHGADD_ALGORITHM |
31 | def_bool X86_XADD && 64BIT | 34 | def_bool X86_XADD && 64BIT |
diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c index 885eff49d6a..4df6c373421 100644 --- a/arch/x86/vdso/vclock_gettime.c +++ b/arch/x86/vdso/vclock_gettime.c | |||
@@ -80,7 +80,7 @@ notrace static long vdso_fallback_gtod(struct timeval *tv, struct timezone *tz) | |||
80 | } | 80 | } |
81 | 81 | ||
82 | 82 | ||
83 | notrace static inline long vgetns(void) | 83 | notrace static inline u64 vgetsns(void) |
84 | { | 84 | { |
85 | long v; | 85 | long v; |
86 | cycles_t cycles; | 86 | cycles_t cycles; |
@@ -91,21 +91,24 @@ notrace static inline long vgetns(void) | |||
91 | else | 91 | else |
92 | return 0; | 92 | return 0; |
93 | v = (cycles - gtod->clock.cycle_last) & gtod->clock.mask; | 93 | v = (cycles - gtod->clock.cycle_last) & gtod->clock.mask; |
94 | return (v * gtod->clock.mult) >> gtod->clock.shift; | 94 | return v * gtod->clock.mult; |
95 | } | 95 | } |
96 | 96 | ||
97 | /* Code size doesn't matter (vdso is 4k anyway) and this is faster. */ | 97 | /* Code size doesn't matter (vdso is 4k anyway) and this is faster. */ |
98 | notrace static int __always_inline do_realtime(struct timespec *ts) | 98 | notrace static int __always_inline do_realtime(struct timespec *ts) |
99 | { | 99 | { |
100 | unsigned long seq, ns; | 100 | unsigned long seq; |
101 | u64 ns; | ||
101 | int mode; | 102 | int mode; |
102 | 103 | ||
104 | ts->tv_nsec = 0; | ||
103 | do { | 105 | do { |
104 | seq = read_seqcount_begin(>od->seq); | 106 | seq = read_seqcount_begin(>od->seq); |
105 | mode = gtod->clock.vclock_mode; | 107 | mode = gtod->clock.vclock_mode; |
106 | ts->tv_sec = gtod->wall_time_sec; | 108 | ts->tv_sec = gtod->wall_time_sec; |
107 | ts->tv_nsec = gtod->wall_time_nsec; | 109 | ns = gtod->wall_time_snsec; |
108 | ns = vgetns(); | 110 | ns += vgetsns(); |
111 | ns >>= gtod->clock.shift; | ||
109 | } while (unlikely(read_seqcount_retry(>od->seq, seq))); | 112 | } while (unlikely(read_seqcount_retry(>od->seq, seq))); |
110 | 113 | ||
111 | timespec_add_ns(ts, ns); | 114 | timespec_add_ns(ts, ns); |
@@ -114,15 +117,18 @@ notrace static int __always_inline do_realtime(struct timespec *ts) | |||
114 | 117 | ||
115 | notrace static int do_monotonic(struct timespec *ts) | 118 | notrace static int do_monotonic(struct timespec *ts) |
116 | { | 119 | { |
117 | unsigned long seq, ns; | 120 | unsigned long seq; |
121 | u64 ns; | ||
118 | int mode; | 122 | int mode; |
119 | 123 | ||
124 | ts->tv_nsec = 0; | ||
120 | do { | 125 | do { |
121 | seq = read_seqcount_begin(>od->seq); | 126 | seq = read_seqcount_begin(>od->seq); |
122 | mode = gtod->clock.vclock_mode; | 127 | mode = gtod->clock.vclock_mode; |
123 | ts->tv_sec = gtod->monotonic_time_sec; | 128 | ts->tv_sec = gtod->monotonic_time_sec; |
124 | ts->tv_nsec = gtod->monotonic_time_nsec; | 129 | ns = gtod->monotonic_time_snsec; |
125 | ns = vgetns(); | 130 | ns += vgetsns(); |
131 | ns >>= gtod->clock.shift; | ||
126 | } while (unlikely(read_seqcount_retry(>od->seq, seq))); | 132 | } while (unlikely(read_seqcount_retry(>od->seq, seq))); |
127 | timespec_add_ns(ts, ns); | 133 | timespec_add_ns(ts, ns); |
128 | 134 | ||
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index bf788d34530..e3497f240ea 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -987,7 +987,16 @@ static void xen_write_cr4(unsigned long cr4) | |||
987 | 987 | ||
988 | native_write_cr4(cr4); | 988 | native_write_cr4(cr4); |
989 | } | 989 | } |
990 | 990 | #ifdef CONFIG_X86_64 | |
991 | static inline unsigned long xen_read_cr8(void) | ||
992 | { | ||
993 | return 0; | ||
994 | } | ||
995 | static inline void xen_write_cr8(unsigned long val) | ||
996 | { | ||
997 | BUG_ON(val); | ||
998 | } | ||
999 | #endif | ||
991 | static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high) | 1000 | static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high) |
992 | { | 1001 | { |
993 | int ret; | 1002 | int ret; |
@@ -1156,6 +1165,11 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = { | |||
1156 | .read_cr4_safe = native_read_cr4_safe, | 1165 | .read_cr4_safe = native_read_cr4_safe, |
1157 | .write_cr4 = xen_write_cr4, | 1166 | .write_cr4 = xen_write_cr4, |
1158 | 1167 | ||
1168 | #ifdef CONFIG_X86_64 | ||
1169 | .read_cr8 = xen_read_cr8, | ||
1170 | .write_cr8 = xen_write_cr8, | ||
1171 | #endif | ||
1172 | |||
1159 | .wbinvd = native_wbinvd, | 1173 | .wbinvd = native_wbinvd, |
1160 | 1174 | ||
1161 | .read_msr = native_read_msr_safe, | 1175 | .read_msr = native_read_msr_safe, |
@@ -1164,6 +1178,8 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = { | |||
1164 | .read_tsc = native_read_tsc, | 1178 | .read_tsc = native_read_tsc, |
1165 | .read_pmc = native_read_pmc, | 1179 | .read_pmc = native_read_pmc, |
1166 | 1180 | ||
1181 | .read_tscp = native_read_tscp, | ||
1182 | |||
1167 | .iret = xen_iret, | 1183 | .iret = xen_iret, |
1168 | .irq_enable_sysexit = xen_sysexit, | 1184 | .irq_enable_sysexit = xen_sysexit, |
1169 | #ifdef CONFIG_X86_64 | 1185 | #ifdef CONFIG_X86_64 |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index fd28d86fe3d..6226c99729b 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/gfp.h> | 47 | #include <linux/gfp.h> |
48 | #include <linux/memblock.h> | 48 | #include <linux/memblock.h> |
49 | #include <linux/seq_file.h> | 49 | #include <linux/seq_file.h> |
50 | #include <linux/crash_dump.h> | ||
50 | 51 | ||
51 | #include <trace/events/xen.h> | 52 | #include <trace/events/xen.h> |
52 | 53 | ||
@@ -2381,6 +2382,43 @@ void xen_destroy_contiguous_region(unsigned long vstart, unsigned int order) | |||
2381 | EXPORT_SYMBOL_GPL(xen_destroy_contiguous_region); | 2382 | EXPORT_SYMBOL_GPL(xen_destroy_contiguous_region); |
2382 | 2383 | ||
2383 | #ifdef CONFIG_XEN_PVHVM | 2384 | #ifdef CONFIG_XEN_PVHVM |
2385 | #ifdef CONFIG_PROC_VMCORE | ||
2386 | /* | ||
2387 | * This function is used in two contexts: | ||
2388 | * - the kdump kernel has to check whether a pfn of the crashed kernel | ||
2389 | * was a ballooned page. vmcore is using this function to decide | ||
2390 | * whether to access a pfn of the crashed kernel. | ||
2391 | * - the kexec kernel has to check whether a pfn was ballooned by the | ||
2392 | * previous kernel. If the pfn is ballooned, handle it properly. | ||
2393 | * Returns 0 if the pfn is not backed by a RAM page, the caller may | ||
2394 | * handle the pfn special in this case. | ||
2395 | */ | ||
2396 | static int xen_oldmem_pfn_is_ram(unsigned long pfn) | ||
2397 | { | ||
2398 | struct xen_hvm_get_mem_type a = { | ||
2399 | .domid = DOMID_SELF, | ||
2400 | .pfn = pfn, | ||
2401 | }; | ||
2402 | int ram; | ||
2403 | |||
2404 | if (HYPERVISOR_hvm_op(HVMOP_get_mem_type, &a)) | ||
2405 | return -ENXIO; | ||
2406 | |||
2407 | switch (a.mem_type) { | ||
2408 | case HVMMEM_mmio_dm: | ||
2409 | ram = 0; | ||
2410 | break; | ||
2411 | case HVMMEM_ram_rw: | ||
2412 | case HVMMEM_ram_ro: | ||
2413 | default: | ||
2414 | ram = 1; | ||
2415 | break; | ||
2416 | } | ||
2417 | |||
2418 | return ram; | ||
2419 | } | ||
2420 | #endif | ||
2421 | |||
2384 | static void xen_hvm_exit_mmap(struct mm_struct *mm) | 2422 | static void xen_hvm_exit_mmap(struct mm_struct *mm) |
2385 | { | 2423 | { |
2386 | struct xen_hvm_pagetable_dying a; | 2424 | struct xen_hvm_pagetable_dying a; |
@@ -2411,6 +2449,9 @@ void __init xen_hvm_init_mmu_ops(void) | |||
2411 | { | 2449 | { |
2412 | if (is_pagetable_dying_supported()) | 2450 | if (is_pagetable_dying_supported()) |
2413 | pv_mmu_ops.exit_mmap = xen_hvm_exit_mmap; | 2451 | pv_mmu_ops.exit_mmap = xen_hvm_exit_mmap; |
2452 | #ifdef CONFIG_PROC_VMCORE | ||
2453 | register_oldmem_pfn_is_ram(&xen_oldmem_pfn_is_ram); | ||
2454 | #endif | ||
2414 | } | 2455 | } |
2415 | #endif | 2456 | #endif |
2416 | 2457 | ||
diff --git a/arch/xtensa/include/asm/module.h b/arch/xtensa/include/asm/module.h index d9b34bee4d4..488b40c6f9b 100644 --- a/arch/xtensa/include/asm/module.h +++ b/arch/xtensa/include/asm/module.h | |||
@@ -13,15 +13,8 @@ | |||
13 | #ifndef _XTENSA_MODULE_H | 13 | #ifndef _XTENSA_MODULE_H |
14 | #define _XTENSA_MODULE_H | 14 | #define _XTENSA_MODULE_H |
15 | 15 | ||
16 | struct mod_arch_specific | ||
17 | { | ||
18 | /* No special elements, yet. */ | ||
19 | }; | ||
20 | |||
21 | #define MODULE_ARCH_VERMAGIC "xtensa-" __stringify(XCHAL_CORE_ID) " " | 16 | #define MODULE_ARCH_VERMAGIC "xtensa-" __stringify(XCHAL_CORE_ID) " " |
22 | 17 | ||
23 | #define Elf_Shdr Elf32_Shdr | 18 | #include <asm-generic/module.h> |
24 | #define Elf_Sym Elf32_Sym | ||
25 | #define Elf_Ehdr Elf32_Ehdr | ||
26 | 19 | ||
27 | #endif /* _XTENSA_MODULE_H */ | 20 | #endif /* _XTENSA_MODULE_H */ |
diff --git a/arch/xtensa/include/asm/thread_info.h b/arch/xtensa/include/asm/thread_info.h index 81abfd5d01a..9481004ac11 100644 --- a/arch/xtensa/include/asm/thread_info.h +++ b/arch/xtensa/include/asm/thread_info.h | |||
@@ -128,19 +128,14 @@ static inline struct thread_info *current_thread_info(void) | |||
128 | #define TIF_SIGPENDING 1 /* signal pending */ | 128 | #define TIF_SIGPENDING 1 /* signal pending */ |
129 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 129 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
130 | #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ | 130 | #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ |
131 | #define TIF_IRET 4 /* return with iret */ | ||
132 | #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ | 131 | #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ |
133 | #define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ | 132 | #define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ |
134 | #define TIF_NOTIFY_RESUME 7 /* callback before returning to user */ | 133 | #define TIF_NOTIFY_RESUME 7 /* callback before returning to user */ |
135 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | ||
136 | 134 | ||
137 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 135 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
138 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 136 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
139 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 137 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
140 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 138 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
141 | #define _TIF_IRET (1<<TIF_IRET) | ||
142 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
143 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
144 | 139 | ||
145 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 140 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
146 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ | 141 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ |
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index bc44311aa18..bc020825cce 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -328,13 +328,13 @@ long xtensa_execve(const char __user *name, | |||
328 | struct pt_regs *regs) | 328 | struct pt_regs *regs) |
329 | { | 329 | { |
330 | long error; | 330 | long error; |
331 | char * filename; | 331 | struct filename *filename; |
332 | 332 | ||
333 | filename = getname(name); | 333 | filename = getname(name); |
334 | error = PTR_ERR(filename); | 334 | error = PTR_ERR(filename); |
335 | if (IS_ERR(filename)) | 335 | if (IS_ERR(filename)) |
336 | goto out; | 336 | goto out; |
337 | error = do_execve(filename, argv, envp, regs); | 337 | error = do_execve(filename->name, argv, envp, regs); |
338 | putname(filename); | 338 | putname(filename); |
339 | out: | 339 | out: |
340 | return error; | 340 | return error; |
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index efe4e854b3c..63c566f627b 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/ptrace.h> | 20 | #include <linux/ptrace.h> |
21 | #include <linux/personality.h> | 21 | #include <linux/personality.h> |
22 | #include <linux/freezer.h> | ||
23 | #include <linux/tracehook.h> | 22 | #include <linux/tracehook.h> |
24 | 23 | ||
25 | #include <asm/ucontext.h> | 24 | #include <asm/ucontext.h> |
@@ -527,9 +526,6 @@ static void do_signal(struct pt_regs *regs) | |||
527 | 526 | ||
528 | void do_notify_resume(struct pt_regs *regs) | 527 | void do_notify_resume(struct pt_regs *regs) |
529 | { | 528 | { |
530 | if (!user_mode(regs)) | ||
531 | return; | ||
532 | |||
533 | if (test_thread_flag(TIF_SIGPENDING)) | 529 | if (test_thread_flag(TIF_SIGPENDING)) |
534 | do_signal(regs); | 530 | do_signal(regs); |
535 | 531 | ||