diff options
Diffstat (limited to 'arch')
110 files changed, 1860 insertions, 1783 deletions
diff --git a/arch/alpha/kernel/asm-offsets.c b/arch/alpha/kernel/asm-offsets.c index 8f2e5c718b50..6c56c754a0b5 100644 --- a/arch/alpha/kernel/asm-offsets.c +++ b/arch/alpha/kernel/asm-offsets.c | |||
@@ -28,6 +28,7 @@ void foo(void) | |||
28 | DEFINE(TASK_GID, offsetof(struct task_struct, gid)); | 28 | DEFINE(TASK_GID, offsetof(struct task_struct, gid)); |
29 | DEFINE(TASK_EGID, offsetof(struct task_struct, egid)); | 29 | DEFINE(TASK_EGID, offsetof(struct task_struct, egid)); |
30 | DEFINE(TASK_REAL_PARENT, offsetof(struct task_struct, real_parent)); | 30 | DEFINE(TASK_REAL_PARENT, offsetof(struct task_struct, real_parent)); |
31 | DEFINE(TASK_GROUP_LEADER, offsetof(struct task_struct, group_leader)); | ||
31 | DEFINE(TASK_TGID, offsetof(struct task_struct, tgid)); | 32 | DEFINE(TASK_TGID, offsetof(struct task_struct, tgid)); |
32 | BLANK(); | 33 | BLANK(); |
33 | 34 | ||
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index e38671c922bc..7af15bf7e5ab 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S | |||
@@ -879,17 +879,19 @@ sys_getxpid: | |||
879 | 879 | ||
880 | /* See linux/kernel/timer.c sys_getppid for discussion | 880 | /* See linux/kernel/timer.c sys_getppid for discussion |
881 | about this loop. */ | 881 | about this loop. */ |
882 | ldq $3, TASK_REAL_PARENT($2) | 882 | ldq $3, TASK_GROUP_LEADER($2) |
883 | 1: ldl $1, TASK_TGID($3) | 883 | ldq $4, TASK_REAL_PARENT($3) |
884 | ldl $0, TASK_TGID($2) | ||
885 | 1: ldl $1, TASK_TGID($4) | ||
884 | #ifdef CONFIG_SMP | 886 | #ifdef CONFIG_SMP |
885 | mov $3, $4 | 887 | mov $4, $5 |
886 | mb | 888 | mb |
887 | ldq $3, TASK_REAL_PARENT($2) | 889 | ldq $3, TASK_GROUP_LEADER($2) |
888 | cmpeq $3, $4, $4 | 890 | ldq $4, TASK_REAL_PARENT($3) |
889 | beq $4, 1b | 891 | cmpeq $4, $5, $5 |
892 | beq $5, 1b | ||
890 | #endif | 893 | #endif |
891 | stq $1, 80($sp) | 894 | stq $1, 80($sp) |
892 | ldl $0, TASK_TGID($2) | ||
893 | ret | 895 | ret |
894 | .end sys_getxpid | 896 | .end sys_getxpid |
895 | 897 | ||
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index 76be5cf0de13..9006063e7369 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c | |||
@@ -68,34 +68,32 @@ show_interrupts(struct seq_file *p, void *v) | |||
68 | #ifdef CONFIG_SMP | 68 | #ifdef CONFIG_SMP |
69 | int j; | 69 | int j; |
70 | #endif | 70 | #endif |
71 | int i = *(loff_t *) v; | 71 | int irq = *(loff_t *) v; |
72 | struct irqaction * action; | 72 | struct irqaction * action; |
73 | unsigned long flags; | 73 | unsigned long flags; |
74 | 74 | ||
75 | #ifdef CONFIG_SMP | 75 | #ifdef CONFIG_SMP |
76 | if (i == 0) { | 76 | if (irq == 0) { |
77 | seq_puts(p, " "); | 77 | seq_puts(p, " "); |
78 | for (i = 0; i < NR_CPUS; i++) | 78 | for_each_online_cpu(j) |
79 | if (cpu_online(i)) | 79 | seq_printf(p, "CPU%d ", j); |
80 | seq_printf(p, "CPU%d ", i); | ||
81 | seq_putc(p, '\n'); | 80 | seq_putc(p, '\n'); |
82 | } | 81 | } |
83 | #endif | 82 | #endif |
84 | 83 | ||
85 | if (i < ACTUAL_NR_IRQS) { | 84 | if (irq < ACTUAL_NR_IRQS) { |
86 | spin_lock_irqsave(&irq_desc[i].lock, flags); | 85 | spin_lock_irqsave(&irq_desc[irq].lock, flags); |
87 | action = irq_desc[i].action; | 86 | action = irq_desc[irq].action; |
88 | if (!action) | 87 | if (!action) |
89 | goto unlock; | 88 | goto unlock; |
90 | seq_printf(p, "%3d: ",i); | 89 | seq_printf(p, "%3d: ", irq); |
91 | #ifndef CONFIG_SMP | 90 | #ifndef CONFIG_SMP |
92 | seq_printf(p, "%10u ", kstat_irqs(i)); | 91 | seq_printf(p, "%10u ", kstat_irqs(irq)); |
93 | #else | 92 | #else |
94 | for (j = 0; j < NR_CPUS; j++) | 93 | for_each_online_cpu(j) |
95 | if (cpu_online(j)) | 94 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[irq]); |
96 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | ||
97 | #endif | 95 | #endif |
98 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 96 | seq_printf(p, " %14s", irq_desc[irq].handler->typename); |
99 | seq_printf(p, " %c%s", | 97 | seq_printf(p, " %c%s", |
100 | (action->flags & SA_INTERRUPT)?'+':' ', | 98 | (action->flags & SA_INTERRUPT)?'+':' ', |
101 | action->name); | 99 | action->name); |
@@ -108,13 +106,12 @@ show_interrupts(struct seq_file *p, void *v) | |||
108 | 106 | ||
109 | seq_putc(p, '\n'); | 107 | seq_putc(p, '\n'); |
110 | unlock: | 108 | unlock: |
111 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 109 | spin_unlock_irqrestore(&irq_desc[irq].lock, flags); |
112 | } else if (i == ACTUAL_NR_IRQS) { | 110 | } else if (irq == ACTUAL_NR_IRQS) { |
113 | #ifdef CONFIG_SMP | 111 | #ifdef CONFIG_SMP |
114 | seq_puts(p, "IPI: "); | 112 | seq_puts(p, "IPI: "); |
115 | for (i = 0; i < NR_CPUS; i++) | 113 | for_each_online_cpu(j) |
116 | if (cpu_online(i)) | 114 | seq_printf(p, "%10lu ", cpu_data[j].ipi_count); |
117 | seq_printf(p, "%10lu ", cpu_data[i].ipi_count); | ||
118 | seq_putc(p, '\n'); | 115 | seq_putc(p, '\n'); |
119 | #endif | 116 | #endif |
120 | seq_printf(p, "ERR: %10lu\n", irq_err_count); | 117 | seq_printf(p, "ERR: %10lu\n", irq_err_count); |
@@ -122,7 +119,6 @@ unlock: | |||
122 | return 0; | 119 | return 0; |
123 | } | 120 | } |
124 | 121 | ||
125 | |||
126 | /* | 122 | /* |
127 | * handle_irq handles all normal device IRQ's (the special | 123 | * handle_irq handles all normal device IRQ's (the special |
128 | * SMP cross-CPU interrupts have their own specific | 124 | * SMP cross-CPU interrupts have their own specific |
diff --git a/arch/arm/configs/bast_defconfig b/arch/arm/configs/bast_defconfig index 6886001b5366..4a8564f386af 100644 --- a/arch/arm/configs/bast_defconfig +++ b/arch/arm/configs/bast_defconfig | |||
@@ -14,8 +14,7 @@ CONFIG_GENERIC_IOMAP=y | |||
14 | # Code maturity level options | 14 | # Code maturity level options |
15 | # | 15 | # |
16 | CONFIG_EXPERIMENTAL=y | 16 | CONFIG_EXPERIMENTAL=y |
17 | # CONFIG_CLEAN_COMPILE is not set | 17 | CONFIG_CLEAN_COMPILE=y |
18 | CONFIG_BROKEN=y | ||
19 | CONFIG_BROKEN_ON_SMP=y | 18 | CONFIG_BROKEN_ON_SMP=y |
20 | 19 | ||
21 | # | 20 | # |
@@ -360,7 +359,6 @@ CONFIG_BLK_DEV_IDE_BAST=y | |||
360 | # | 359 | # |
361 | # IEEE 1394 (FireWire) support | 360 | # IEEE 1394 (FireWire) support |
362 | # | 361 | # |
363 | # CONFIG_IEEE1394 is not set | ||
364 | 362 | ||
365 | # | 363 | # |
366 | # I2O device support | 364 | # I2O device support |
@@ -781,7 +779,6 @@ CONFIG_SYSFS=y | |||
781 | # CONFIG_DEVFS_FS is not set | 779 | # CONFIG_DEVFS_FS is not set |
782 | # CONFIG_DEVPTS_FS_XATTR is not set | 780 | # CONFIG_DEVPTS_FS_XATTR is not set |
783 | # CONFIG_TMPFS is not set | 781 | # CONFIG_TMPFS is not set |
784 | # CONFIG_HUGETLBFS is not set | ||
785 | # CONFIG_HUGETLB_PAGE is not set | 782 | # CONFIG_HUGETLB_PAGE is not set |
786 | CONFIG_RAMFS=y | 783 | CONFIG_RAMFS=y |
787 | 784 | ||
diff --git a/arch/arm/configs/collie_defconfig b/arch/arm/configs/collie_defconfig index 15468a0cf70e..c9aa878e610a 100644 --- a/arch/arm/configs/collie_defconfig +++ b/arch/arm/configs/collie_defconfig | |||
@@ -13,8 +13,7 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y | |||
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | # CONFIG_CLEAN_COMPILE is not set | 16 | CONFIG_CLEAN_COMPILE=y |
17 | CONFIG_BROKEN=y | ||
18 | CONFIG_BROKEN_ON_SMP=y | 17 | CONFIG_BROKEN_ON_SMP=y |
19 | CONFIG_LOCK_KERNEL=y | 18 | CONFIG_LOCK_KERNEL=y |
20 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 19 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
@@ -308,9 +307,7 @@ CONFIG_MTD_CFI_I2=y | |||
308 | # CONFIG_MTD_ROM is not set | 307 | # CONFIG_MTD_ROM is not set |
309 | # CONFIG_MTD_ABSENT is not set | 308 | # CONFIG_MTD_ABSENT is not set |
310 | CONFIG_MTD_OBSOLETE_CHIPS=y | 309 | CONFIG_MTD_OBSOLETE_CHIPS=y |
311 | # CONFIG_MTD_AMDSTD is not set | ||
312 | CONFIG_MTD_SHARP=y | 310 | CONFIG_MTD_SHARP=y |
313 | # CONFIG_MTD_JEDEC is not set | ||
314 | 311 | ||
315 | # | 312 | # |
316 | # Mapping drivers for chip access | 313 | # Mapping drivers for chip access |
@@ -396,7 +393,6 @@ CONFIG_ATA_OVER_ETH=m | |||
396 | # | 393 | # |
397 | # IEEE 1394 (FireWire) support | 394 | # IEEE 1394 (FireWire) support |
398 | # | 395 | # |
399 | # CONFIG_IEEE1394 is not set | ||
400 | 396 | ||
401 | # | 397 | # |
402 | # I2O device support | 398 | # I2O device support |
@@ -741,7 +737,6 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
741 | CONFIG_PROC_FS=y | 737 | CONFIG_PROC_FS=y |
742 | CONFIG_SYSFS=y | 738 | CONFIG_SYSFS=y |
743 | CONFIG_TMPFS=y | 739 | CONFIG_TMPFS=y |
744 | # CONFIG_HUGETLBFS is not set | ||
745 | # CONFIG_HUGETLB_PAGE is not set | 740 | # CONFIG_HUGETLB_PAGE is not set |
746 | CONFIG_RAMFS=y | 741 | CONFIG_RAMFS=y |
747 | # CONFIG_RELAYFS_FS is not set | 742 | # CONFIG_RELAYFS_FS is not set |
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig index 33f31080a98c..1964ccd8a71f 100644 --- a/arch/arm/configs/s3c2410_defconfig +++ b/arch/arm/configs/s3c2410_defconfig | |||
@@ -13,8 +13,7 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y | |||
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | # CONFIG_CLEAN_COMPILE is not set | 16 | CONFIG_CLEAN_COMPILE=y |
17 | CONFIG_BROKEN=y | ||
18 | CONFIG_BROKEN_ON_SMP=y | 17 | CONFIG_BROKEN_ON_SMP=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 18 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
20 | 19 | ||
@@ -473,7 +472,6 @@ CONFIG_BLK_DEV_IDE_BAST=y | |||
473 | # | 472 | # |
474 | # IEEE 1394 (FireWire) support | 473 | # IEEE 1394 (FireWire) support |
475 | # | 474 | # |
476 | # CONFIG_IEEE1394 is not set | ||
477 | 475 | ||
478 | # | 476 | # |
479 | # I2O device support | 477 | # I2O device support |
@@ -896,7 +894,6 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
896 | CONFIG_PROC_FS=y | 894 | CONFIG_PROC_FS=y |
897 | CONFIG_SYSFS=y | 895 | CONFIG_SYSFS=y |
898 | # CONFIG_TMPFS is not set | 896 | # CONFIG_TMPFS is not set |
899 | # CONFIG_HUGETLBFS is not set | ||
900 | # CONFIG_HUGETLB_PAGE is not set | 897 | # CONFIG_HUGETLB_PAGE is not set |
901 | CONFIG_RAMFS=y | 898 | CONFIG_RAMFS=y |
902 | # CONFIG_RELAYFS_FS is not set | 899 | # CONFIG_RELAYFS_FS is not set |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 75e6f9a94713..d058e7c12568 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -7,337 +7,334 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * This file is included twice in entry-common.S | 10 | * This file is included thrice in entry-common.S |
11 | */ | 11 | */ |
12 | #ifndef NR_syscalls | 12 | /* 0 */ CALL(sys_restart_syscall) |
13 | #define NR_syscalls 328 | 13 | CALL(sys_exit) |
14 | #else | 14 | CALL(sys_fork_wrapper) |
15 | 15 | CALL(sys_read) | |
16 | 100: | 16 | CALL(sys_write) |
17 | /* 0 */ .long sys_restart_syscall | 17 | /* 5 */ CALL(sys_open) |
18 | .long sys_exit | 18 | CALL(sys_close) |
19 | .long sys_fork_wrapper | 19 | CALL(sys_ni_syscall) /* was sys_waitpid */ |
20 | .long sys_read | 20 | CALL(sys_creat) |
21 | .long sys_write | 21 | CALL(sys_link) |
22 | /* 5 */ .long sys_open | 22 | /* 10 */ CALL(sys_unlink) |
23 | .long sys_close | 23 | CALL(sys_execve_wrapper) |
24 | .long sys_ni_syscall /* was sys_waitpid */ | 24 | CALL(sys_chdir) |
25 | .long sys_creat | 25 | CALL(OBSOLETE(sys_time)) /* used by libc4 */ |
26 | .long sys_link | 26 | CALL(sys_mknod) |
27 | /* 10 */ .long sys_unlink | 27 | /* 15 */ CALL(sys_chmod) |
28 | .long sys_execve_wrapper | 28 | CALL(sys_lchown16) |
29 | .long sys_chdir | 29 | CALL(sys_ni_syscall) /* was sys_break */ |
30 | .long OBSOLETE(sys_time) /* used by libc4 */ | 30 | CALL(sys_ni_syscall) /* was sys_stat */ |
31 | .long sys_mknod | 31 | CALL(sys_lseek) |
32 | /* 15 */ .long sys_chmod | 32 | /* 20 */ CALL(sys_getpid) |
33 | .long sys_lchown16 | 33 | CALL(sys_mount) |
34 | .long sys_ni_syscall /* was sys_break */ | 34 | CALL(OBSOLETE(sys_oldumount)) /* used by libc4 */ |
35 | .long sys_ni_syscall /* was sys_stat */ | 35 | CALL(sys_setuid16) |
36 | .long sys_lseek | 36 | CALL(sys_getuid16) |
37 | /* 20 */ .long sys_getpid | 37 | /* 25 */ CALL(OBSOLETE(sys_stime)) |
38 | .long sys_mount | 38 | CALL(sys_ptrace) |
39 | .long OBSOLETE(sys_oldumount) /* used by libc4 */ | 39 | CALL(OBSOLETE(sys_alarm)) /* used by libc4 */ |
40 | .long sys_setuid16 | 40 | CALL(sys_ni_syscall) /* was sys_fstat */ |
41 | .long sys_getuid16 | 41 | CALL(sys_pause) |
42 | /* 25 */ .long OBSOLETE(sys_stime) | 42 | /* 30 */ CALL(OBSOLETE(sys_utime)) /* used by libc4 */ |
43 | .long sys_ptrace | 43 | CALL(sys_ni_syscall) /* was sys_stty */ |
44 | .long OBSOLETE(sys_alarm) /* used by libc4 */ | 44 | CALL(sys_ni_syscall) /* was sys_getty */ |
45 | .long sys_ni_syscall /* was sys_fstat */ | 45 | CALL(sys_access) |
46 | .long sys_pause | 46 | CALL(sys_nice) |
47 | /* 30 */ .long OBSOLETE(sys_utime) /* used by libc4 */ | 47 | /* 35 */ CALL(sys_ni_syscall) /* was sys_ftime */ |
48 | .long sys_ni_syscall /* was sys_stty */ | 48 | CALL(sys_sync) |
49 | .long sys_ni_syscall /* was sys_getty */ | 49 | CALL(sys_kill) |
50 | .long sys_access | 50 | CALL(sys_rename) |
51 | .long sys_nice | 51 | CALL(sys_mkdir) |
52 | /* 35 */ .long sys_ni_syscall /* was sys_ftime */ | 52 | /* 40 */ CALL(sys_rmdir) |
53 | .long sys_sync | 53 | CALL(sys_dup) |
54 | .long sys_kill | 54 | CALL(sys_pipe) |
55 | .long sys_rename | 55 | CALL(sys_times) |
56 | .long sys_mkdir | 56 | CALL(sys_ni_syscall) /* was sys_prof */ |
57 | /* 40 */ .long sys_rmdir | 57 | /* 45 */ CALL(sys_brk) |
58 | .long sys_dup | 58 | CALL(sys_setgid16) |
59 | .long sys_pipe | 59 | CALL(sys_getgid16) |
60 | .long sys_times | 60 | CALL(sys_ni_syscall) /* was sys_signal */ |
61 | .long sys_ni_syscall /* was sys_prof */ | 61 | CALL(sys_geteuid16) |
62 | /* 45 */ .long sys_brk | 62 | /* 50 */ CALL(sys_getegid16) |
63 | .long sys_setgid16 | 63 | CALL(sys_acct) |
64 | .long sys_getgid16 | 64 | CALL(sys_umount) |
65 | .long sys_ni_syscall /* was sys_signal */ | 65 | CALL(sys_ni_syscall) /* was sys_lock */ |
66 | .long sys_geteuid16 | 66 | CALL(sys_ioctl) |
67 | /* 50 */ .long sys_getegid16 | 67 | /* 55 */ CALL(sys_fcntl) |
68 | .long sys_acct | 68 | CALL(sys_ni_syscall) /* was sys_mpx */ |
69 | .long sys_umount | 69 | CALL(sys_setpgid) |
70 | .long sys_ni_syscall /* was sys_lock */ | 70 | CALL(sys_ni_syscall) /* was sys_ulimit */ |
71 | .long sys_ioctl | 71 | CALL(sys_ni_syscall) /* was sys_olduname */ |
72 | /* 55 */ .long sys_fcntl | 72 | /* 60 */ CALL(sys_umask) |
73 | .long sys_ni_syscall /* was sys_mpx */ | 73 | CALL(sys_chroot) |
74 | .long sys_setpgid | 74 | CALL(sys_ustat) |
75 | .long sys_ni_syscall /* was sys_ulimit */ | 75 | CALL(sys_dup2) |
76 | .long sys_ni_syscall /* was sys_olduname */ | 76 | CALL(sys_getppid) |
77 | /* 60 */ .long sys_umask | 77 | /* 65 */ CALL(sys_getpgrp) |
78 | .long sys_chroot | 78 | CALL(sys_setsid) |
79 | .long sys_ustat | 79 | CALL(sys_sigaction) |
80 | .long sys_dup2 | 80 | CALL(sys_ni_syscall) /* was sys_sgetmask */ |
81 | .long sys_getppid | 81 | CALL(sys_ni_syscall) /* was sys_ssetmask */ |
82 | /* 65 */ .long sys_getpgrp | 82 | /* 70 */ CALL(sys_setreuid16) |
83 | .long sys_setsid | 83 | CALL(sys_setregid16) |
84 | .long sys_sigaction | 84 | CALL(sys_sigsuspend_wrapper) |
85 | .long sys_ni_syscall /* was sys_sgetmask */ | 85 | CALL(sys_sigpending) |
86 | .long sys_ni_syscall /* was sys_ssetmask */ | 86 | CALL(sys_sethostname) |
87 | /* 70 */ .long sys_setreuid16 | 87 | /* 75 */ CALL(sys_setrlimit) |
88 | .long sys_setregid16 | 88 | CALL(OBSOLETE(sys_old_getrlimit)) /* used by libc4 */ |
89 | .long sys_sigsuspend_wrapper | 89 | CALL(sys_getrusage) |
90 | .long sys_sigpending | 90 | CALL(sys_gettimeofday) |
91 | .long sys_sethostname | 91 | CALL(sys_settimeofday) |
92 | /* 75 */ .long sys_setrlimit | 92 | /* 80 */ CALL(sys_getgroups16) |
93 | .long OBSOLETE(sys_old_getrlimit) /* used by libc4 */ | 93 | CALL(sys_setgroups16) |
94 | .long sys_getrusage | 94 | CALL(OBSOLETE(old_select)) /* used by libc4 */ |
95 | .long sys_gettimeofday | 95 | CALL(sys_symlink) |
96 | .long sys_settimeofday | 96 | CALL(sys_ni_syscall) /* was sys_lstat */ |
97 | /* 80 */ .long sys_getgroups16 | 97 | /* 85 */ CALL(sys_readlink) |
98 | .long sys_setgroups16 | 98 | CALL(sys_uselib) |
99 | .long OBSOLETE(old_select) /* used by libc4 */ | 99 | CALL(sys_swapon) |
100 | .long sys_symlink | 100 | CALL(sys_reboot) |
101 | .long sys_ni_syscall /* was sys_lstat */ | 101 | CALL(OBSOLETE(old_readdir)) /* used by libc4 */ |
102 | /* 85 */ .long sys_readlink | 102 | /* 90 */ CALL(OBSOLETE(old_mmap)) /* used by libc4 */ |
103 | .long sys_uselib | 103 | CALL(sys_munmap) |
104 | .long sys_swapon | 104 | CALL(sys_truncate) |
105 | .long sys_reboot | 105 | CALL(sys_ftruncate) |
106 | .long OBSOLETE(old_readdir) /* used by libc4 */ | 106 | CALL(sys_fchmod) |
107 | /* 90 */ .long OBSOLETE(old_mmap) /* used by libc4 */ | 107 | /* 95 */ CALL(sys_fchown16) |
108 | .long sys_munmap | 108 | CALL(sys_getpriority) |
109 | .long sys_truncate | 109 | CALL(sys_setpriority) |
110 | .long sys_ftruncate | 110 | CALL(sys_ni_syscall) /* was sys_profil */ |
111 | .long sys_fchmod | 111 | CALL(sys_statfs) |
112 | /* 95 */ .long sys_fchown16 | 112 | /* 100 */ CALL(sys_fstatfs) |
113 | .long sys_getpriority | 113 | CALL(sys_ni_syscall) |
114 | .long sys_setpriority | 114 | CALL(OBSOLETE(sys_socketcall)) |
115 | .long sys_ni_syscall /* was sys_profil */ | 115 | CALL(sys_syslog) |
116 | .long sys_statfs | 116 | CALL(sys_setitimer) |
117 | /* 100 */ .long sys_fstatfs | 117 | /* 105 */ CALL(sys_getitimer) |
118 | .long sys_ni_syscall | 118 | CALL(sys_newstat) |
119 | .long OBSOLETE(sys_socketcall) | 119 | CALL(sys_newlstat) |
120 | .long sys_syslog | 120 | CALL(sys_newfstat) |
121 | .long sys_setitimer | 121 | CALL(sys_ni_syscall) /* was sys_uname */ |
122 | /* 105 */ .long sys_getitimer | 122 | /* 110 */ CALL(sys_ni_syscall) /* was sys_iopl */ |
123 | .long sys_newstat | 123 | CALL(sys_vhangup) |
124 | .long sys_newlstat | 124 | CALL(sys_ni_syscall) |
125 | .long sys_newfstat | 125 | CALL(OBSOLETE(sys_syscall)) /* call a syscall */ |
126 | .long sys_ni_syscall /* was sys_uname */ | 126 | CALL(sys_wait4) |
127 | /* 110 */ .long sys_ni_syscall /* was sys_iopl */ | 127 | /* 115 */ CALL(sys_swapoff) |
128 | .long sys_vhangup | 128 | CALL(sys_sysinfo) |
129 | .long sys_ni_syscall | 129 | CALL(OBSOLETE(ABI(sys_ipc, sys_oabi_ipc))) |
130 | .long OBSOLETE(sys_syscall) /* call a syscall */ | 130 | CALL(sys_fsync) |
131 | .long sys_wait4 | 131 | CALL(sys_sigreturn_wrapper) |
132 | /* 115 */ .long sys_swapoff | 132 | /* 120 */ CALL(sys_clone_wrapper) |
133 | .long sys_sysinfo | 133 | CALL(sys_setdomainname) |
134 | .long OBSOLETE(ABI(sys_ipc, sys_oabi_ipc)) | 134 | CALL(sys_newuname) |
135 | .long sys_fsync | 135 | CALL(sys_ni_syscall) |
136 | .long sys_sigreturn_wrapper | 136 | CALL(sys_adjtimex) |
137 | /* 120 */ .long sys_clone_wrapper | 137 | /* 125 */ CALL(sys_mprotect) |
138 | .long sys_setdomainname | 138 | CALL(sys_sigprocmask) |
139 | .long sys_newuname | 139 | CALL(sys_ni_syscall) /* was sys_create_module */ |
140 | .long sys_ni_syscall | 140 | CALL(sys_init_module) |
141 | .long sys_adjtimex | 141 | CALL(sys_delete_module) |
142 | /* 125 */ .long sys_mprotect | 142 | /* 130 */ CALL(sys_ni_syscall) /* was sys_get_kernel_syms */ |
143 | .long sys_sigprocmask | 143 | CALL(sys_quotactl) |
144 | .long sys_ni_syscall /* was sys_create_module */ | 144 | CALL(sys_getpgid) |
145 | .long sys_init_module | 145 | CALL(sys_fchdir) |
146 | .long sys_delete_module | 146 | CALL(sys_bdflush) |
147 | /* 130 */ .long sys_ni_syscall /* was sys_get_kernel_syms */ | 147 | /* 135 */ CALL(sys_sysfs) |
148 | .long sys_quotactl | 148 | CALL(sys_personality) |
149 | .long sys_getpgid | 149 | CALL(sys_ni_syscall) /* CALL(_sys_afs_syscall) */ |
150 | .long sys_fchdir | 150 | CALL(sys_setfsuid16) |
151 | .long sys_bdflush | 151 | CALL(sys_setfsgid16) |
152 | /* 135 */ .long sys_sysfs | 152 | /* 140 */ CALL(sys_llseek) |
153 | .long sys_personality | 153 | CALL(sys_getdents) |
154 | .long sys_ni_syscall /* .long _sys_afs_syscall */ | 154 | CALL(sys_select) |
155 | .long sys_setfsuid16 | 155 | CALL(sys_flock) |
156 | .long sys_setfsgid16 | 156 | CALL(sys_msync) |
157 | /* 140 */ .long sys_llseek | 157 | /* 145 */ CALL(sys_readv) |
158 | .long sys_getdents | 158 | CALL(sys_writev) |
159 | .long sys_select | 159 | CALL(sys_getsid) |
160 | .long sys_flock | 160 | CALL(sys_fdatasync) |
161 | .long sys_msync | 161 | CALL(sys_sysctl) |
162 | /* 145 */ .long sys_readv | 162 | /* 150 */ CALL(sys_mlock) |
163 | .long sys_writev | 163 | CALL(sys_munlock) |
164 | .long sys_getsid | 164 | CALL(sys_mlockall) |
165 | .long sys_fdatasync | 165 | CALL(sys_munlockall) |
166 | .long sys_sysctl | 166 | CALL(sys_sched_setparam) |
167 | /* 150 */ .long sys_mlock | 167 | /* 155 */ CALL(sys_sched_getparam) |
168 | .long sys_munlock | 168 | CALL(sys_sched_setscheduler) |
169 | .long sys_mlockall | 169 | CALL(sys_sched_getscheduler) |
170 | .long sys_munlockall | 170 | CALL(sys_sched_yield) |
171 | .long sys_sched_setparam | 171 | CALL(sys_sched_get_priority_max) |
172 | /* 155 */ .long sys_sched_getparam | 172 | /* 160 */ CALL(sys_sched_get_priority_min) |
173 | .long sys_sched_setscheduler | 173 | CALL(sys_sched_rr_get_interval) |
174 | .long sys_sched_getscheduler | 174 | CALL(sys_nanosleep) |
175 | .long sys_sched_yield | 175 | CALL(sys_arm_mremap) |
176 | .long sys_sched_get_priority_max | 176 | CALL(sys_setresuid16) |
177 | /* 160 */ .long sys_sched_get_priority_min | 177 | /* 165 */ CALL(sys_getresuid16) |
178 | .long sys_sched_rr_get_interval | 178 | CALL(sys_ni_syscall) |
179 | .long sys_nanosleep | 179 | CALL(sys_ni_syscall) /* was sys_query_module */ |
180 | .long sys_arm_mremap | 180 | CALL(sys_poll) |
181 | .long sys_setresuid16 | 181 | CALL(sys_nfsservctl) |
182 | /* 165 */ .long sys_getresuid16 | 182 | /* 170 */ CALL(sys_setresgid16) |
183 | .long sys_ni_syscall | 183 | CALL(sys_getresgid16) |
184 | .long sys_ni_syscall /* was sys_query_module */ | 184 | CALL(sys_prctl) |
185 | .long sys_poll | 185 | CALL(sys_rt_sigreturn_wrapper) |
186 | .long sys_nfsservctl | 186 | CALL(sys_rt_sigaction) |
187 | /* 170 */ .long sys_setresgid16 | 187 | /* 175 */ CALL(sys_rt_sigprocmask) |
188 | .long sys_getresgid16 | 188 | CALL(sys_rt_sigpending) |
189 | .long sys_prctl | 189 | CALL(sys_rt_sigtimedwait) |
190 | .long sys_rt_sigreturn_wrapper | 190 | CALL(sys_rt_sigqueueinfo) |
191 | .long sys_rt_sigaction | 191 | CALL(sys_rt_sigsuspend_wrapper) |
192 | /* 175 */ .long sys_rt_sigprocmask | 192 | /* 180 */ CALL(ABI(sys_pread64, sys_oabi_pread64)) |
193 | .long sys_rt_sigpending | 193 | CALL(ABI(sys_pwrite64, sys_oabi_pwrite64)) |
194 | .long sys_rt_sigtimedwait | 194 | CALL(sys_chown16) |
195 | .long sys_rt_sigqueueinfo | 195 | CALL(sys_getcwd) |
196 | .long sys_rt_sigsuspend_wrapper | 196 | CALL(sys_capget) |
197 | /* 180 */ .long ABI(sys_pread64, sys_oabi_pread64) | 197 | /* 185 */ CALL(sys_capset) |
198 | .long ABI(sys_pwrite64, sys_oabi_pwrite64) | 198 | CALL(sys_sigaltstack_wrapper) |
199 | .long sys_chown16 | 199 | CALL(sys_sendfile) |
200 | .long sys_getcwd | 200 | CALL(sys_ni_syscall) |
201 | .long sys_capget | 201 | CALL(sys_ni_syscall) |
202 | /* 185 */ .long sys_capset | 202 | /* 190 */ CALL(sys_vfork_wrapper) |
203 | .long sys_sigaltstack_wrapper | 203 | CALL(sys_getrlimit) |
204 | .long sys_sendfile | 204 | CALL(sys_mmap2) |
205 | .long sys_ni_syscall | 205 | CALL(ABI(sys_truncate64, sys_oabi_truncate64)) |
206 | .long sys_ni_syscall | 206 | CALL(ABI(sys_ftruncate64, sys_oabi_ftruncate64)) |
207 | /* 190 */ .long sys_vfork_wrapper | 207 | /* 195 */ CALL(ABI(sys_stat64, sys_oabi_stat64)) |
208 | .long sys_getrlimit | 208 | CALL(ABI(sys_lstat64, sys_oabi_lstat64)) |
209 | .long sys_mmap2 | 209 | CALL(ABI(sys_fstat64, sys_oabi_fstat64)) |
210 | .long ABI(sys_truncate64, sys_oabi_truncate64) | 210 | CALL(sys_lchown) |
211 | .long ABI(sys_ftruncate64, sys_oabi_ftruncate64) | 211 | CALL(sys_getuid) |
212 | /* 195 */ .long ABI(sys_stat64, sys_oabi_stat64) | 212 | /* 200 */ CALL(sys_getgid) |
213 | .long ABI(sys_lstat64, sys_oabi_lstat64) | 213 | CALL(sys_geteuid) |
214 | .long ABI(sys_fstat64, sys_oabi_fstat64) | 214 | CALL(sys_getegid) |
215 | .long sys_lchown | 215 | CALL(sys_setreuid) |
216 | .long sys_getuid | 216 | CALL(sys_setregid) |
217 | /* 200 */ .long sys_getgid | 217 | /* 205 */ CALL(sys_getgroups) |
218 | .long sys_geteuid | 218 | CALL(sys_setgroups) |
219 | .long sys_getegid | 219 | CALL(sys_fchown) |
220 | .long sys_setreuid | 220 | CALL(sys_setresuid) |
221 | .long sys_setregid | 221 | CALL(sys_getresuid) |
222 | /* 205 */ .long sys_getgroups | 222 | /* 210 */ CALL(sys_setresgid) |
223 | .long sys_setgroups | 223 | CALL(sys_getresgid) |
224 | .long sys_fchown | 224 | CALL(sys_chown) |
225 | .long sys_setresuid | 225 | CALL(sys_setuid) |
226 | .long sys_getresuid | 226 | CALL(sys_setgid) |
227 | /* 210 */ .long sys_setresgid | 227 | /* 215 */ CALL(sys_setfsuid) |
228 | .long sys_getresgid | 228 | CALL(sys_setfsgid) |
229 | .long sys_chown | 229 | CALL(sys_getdents64) |
230 | .long sys_setuid | 230 | CALL(sys_pivot_root) |
231 | .long sys_setgid | 231 | CALL(sys_mincore) |
232 | /* 215 */ .long sys_setfsuid | 232 | /* 220 */ CALL(sys_madvise) |
233 | .long sys_setfsgid | 233 | CALL(ABI(sys_fcntl64, sys_oabi_fcntl64)) |
234 | .long sys_getdents64 | 234 | CALL(sys_ni_syscall) /* TUX */ |
235 | .long sys_pivot_root | 235 | CALL(sys_ni_syscall) |
236 | .long sys_mincore | 236 | CALL(sys_gettid) |
237 | /* 220 */ .long sys_madvise | 237 | /* 225 */ CALL(ABI(sys_readahead, sys_oabi_readahead)) |
238 | .long ABI(sys_fcntl64, sys_oabi_fcntl64) | 238 | CALL(sys_setxattr) |
239 | .long sys_ni_syscall /* TUX */ | 239 | CALL(sys_lsetxattr) |
240 | .long sys_ni_syscall | 240 | CALL(sys_fsetxattr) |
241 | .long sys_gettid | 241 | CALL(sys_getxattr) |
242 | /* 225 */ .long ABI(sys_readahead, sys_oabi_readahead) | 242 | /* 230 */ CALL(sys_lgetxattr) |
243 | .long sys_setxattr | 243 | CALL(sys_fgetxattr) |
244 | .long sys_lsetxattr | 244 | CALL(sys_listxattr) |
245 | .long sys_fsetxattr | 245 | CALL(sys_llistxattr) |
246 | .long sys_getxattr | 246 | CALL(sys_flistxattr) |
247 | /* 230 */ .long sys_lgetxattr | 247 | /* 235 */ CALL(sys_removexattr) |
248 | .long sys_fgetxattr | 248 | CALL(sys_lremovexattr) |
249 | .long sys_listxattr | 249 | CALL(sys_fremovexattr) |
250 | .long sys_llistxattr | 250 | CALL(sys_tkill) |
251 | .long sys_flistxattr | 251 | CALL(sys_sendfile64) |
252 | /* 235 */ .long sys_removexattr | 252 | /* 240 */ CALL(sys_futex) |
253 | .long sys_lremovexattr | 253 | CALL(sys_sched_setaffinity) |
254 | .long sys_fremovexattr | 254 | CALL(sys_sched_getaffinity) |
255 | .long sys_tkill | 255 | CALL(sys_io_setup) |
256 | .long sys_sendfile64 | 256 | CALL(sys_io_destroy) |
257 | /* 240 */ .long sys_futex | 257 | /* 245 */ CALL(sys_io_getevents) |
258 | .long sys_sched_setaffinity | 258 | CALL(sys_io_submit) |
259 | .long sys_sched_getaffinity | 259 | CALL(sys_io_cancel) |
260 | .long sys_io_setup | 260 | CALL(sys_exit_group) |
261 | .long sys_io_destroy | 261 | CALL(sys_lookup_dcookie) |
262 | /* 245 */ .long sys_io_getevents | 262 | /* 250 */ CALL(sys_epoll_create) |
263 | .long sys_io_submit | 263 | CALL(ABI(sys_epoll_ctl, sys_oabi_epoll_ctl)) |
264 | .long sys_io_cancel | 264 | CALL(ABI(sys_epoll_wait, sys_oabi_epoll_wait)) |
265 | .long sys_exit_group | 265 | CALL(sys_remap_file_pages) |
266 | .long sys_lookup_dcookie | 266 | CALL(sys_ni_syscall) /* sys_set_thread_area */ |
267 | /* 250 */ .long sys_epoll_create | 267 | /* 255 */ CALL(sys_ni_syscall) /* sys_get_thread_area */ |
268 | .long ABI(sys_epoll_ctl, sys_oabi_epoll_ctl) | 268 | CALL(sys_set_tid_address) |
269 | .long ABI(sys_epoll_wait, sys_oabi_epoll_wait) | 269 | CALL(sys_timer_create) |
270 | .long sys_remap_file_pages | 270 | CALL(sys_timer_settime) |
271 | .long sys_ni_syscall /* sys_set_thread_area */ | 271 | CALL(sys_timer_gettime) |
272 | /* 255 */ .long sys_ni_syscall /* sys_get_thread_area */ | 272 | /* 260 */ CALL(sys_timer_getoverrun) |
273 | .long sys_set_tid_address | 273 | CALL(sys_timer_delete) |
274 | .long sys_timer_create | 274 | CALL(sys_clock_settime) |
275 | .long sys_timer_settime | 275 | CALL(sys_clock_gettime) |
276 | .long sys_timer_gettime | 276 | CALL(sys_clock_getres) |
277 | /* 260 */ .long sys_timer_getoverrun | 277 | /* 265 */ CALL(sys_clock_nanosleep) |
278 | .long sys_timer_delete | 278 | CALL(sys_statfs64_wrapper) |
279 | .long sys_clock_settime | 279 | CALL(sys_fstatfs64_wrapper) |
280 | .long sys_clock_gettime | 280 | CALL(sys_tgkill) |
281 | .long sys_clock_getres | 281 | CALL(sys_utimes) |
282 | /* 265 */ .long sys_clock_nanosleep | 282 | /* 270 */ CALL(sys_arm_fadvise64_64) |
283 | .long sys_statfs64_wrapper | 283 | CALL(sys_pciconfig_iobase) |
284 | .long sys_fstatfs64_wrapper | 284 | CALL(sys_pciconfig_read) |
285 | .long sys_tgkill | 285 | CALL(sys_pciconfig_write) |
286 | .long sys_utimes | 286 | CALL(sys_mq_open) |
287 | /* 270 */ .long sys_arm_fadvise64_64 | 287 | /* 275 */ CALL(sys_mq_unlink) |
288 | .long sys_pciconfig_iobase | 288 | CALL(sys_mq_timedsend) |
289 | .long sys_pciconfig_read | 289 | CALL(sys_mq_timedreceive) |
290 | .long sys_pciconfig_write | 290 | CALL(sys_mq_notify) |
291 | .long sys_mq_open | 291 | CALL(sys_mq_getsetattr) |
292 | /* 275 */ .long sys_mq_unlink | 292 | /* 280 */ CALL(sys_waitid) |
293 | .long sys_mq_timedsend | 293 | CALL(sys_socket) |
294 | .long sys_mq_timedreceive | 294 | CALL(sys_bind) |
295 | .long sys_mq_notify | 295 | CALL(sys_connect) |
296 | .long sys_mq_getsetattr | 296 | CALL(sys_listen) |
297 | /* 280 */ .long sys_waitid | 297 | /* 285 */ CALL(sys_accept) |
298 | .long sys_socket | 298 | CALL(sys_getsockname) |
299 | .long sys_bind | 299 | CALL(sys_getpeername) |
300 | .long sys_connect | 300 | CALL(sys_socketpair) |
301 | .long sys_listen | 301 | CALL(sys_send) |
302 | /* 285 */ .long sys_accept | 302 | /* 290 */ CALL(sys_sendto) |
303 | .long sys_getsockname | 303 | CALL(sys_recv) |
304 | .long sys_getpeername | 304 | CALL(sys_recvfrom) |
305 | .long sys_socketpair | 305 | CALL(sys_shutdown) |
306 | .long sys_send | 306 | CALL(sys_setsockopt) |
307 | /* 290 */ .long sys_sendto | 307 | /* 295 */ CALL(sys_getsockopt) |
308 | .long sys_recv | 308 | CALL(sys_sendmsg) |
309 | .long sys_recvfrom | 309 | CALL(sys_recvmsg) |
310 | .long sys_shutdown | 310 | CALL(ABI(sys_semop, sys_oabi_semop)) |
311 | .long sys_setsockopt | 311 | CALL(sys_semget) |
312 | /* 295 */ .long sys_getsockopt | 312 | /* 300 */ CALL(sys_semctl) |
313 | .long sys_sendmsg | 313 | CALL(sys_msgsnd) |
314 | .long sys_recvmsg | 314 | CALL(sys_msgrcv) |
315 | .long ABI(sys_semop, sys_oabi_semop) | 315 | CALL(sys_msgget) |
316 | .long sys_semget | 316 | CALL(sys_msgctl) |
317 | /* 300 */ .long sys_semctl | 317 | /* 305 */ CALL(sys_shmat) |
318 | .long sys_msgsnd | 318 | CALL(sys_shmdt) |
319 | .long sys_msgrcv | 319 | CALL(sys_shmget) |
320 | .long sys_msgget | 320 | CALL(sys_shmctl) |
321 | .long sys_msgctl | 321 | CALL(sys_add_key) |
322 | /* 305 */ .long sys_shmat | 322 | /* 310 */ CALL(sys_request_key) |
323 | .long sys_shmdt | 323 | CALL(sys_keyctl) |
324 | .long sys_shmget | 324 | CALL(ABI(sys_semtimedop, sys_oabi_semtimedop)) |
325 | .long sys_shmctl | 325 | /* vserver */ CALL(sys_ni_syscall) |
326 | .long sys_add_key | 326 | CALL(sys_ioprio_set) |
327 | /* 310 */ .long sys_request_key | 327 | /* 315 */ CALL(sys_ioprio_get) |
328 | .long sys_keyctl | 328 | CALL(sys_inotify_init) |
329 | .long ABI(sys_semtimedop, sys_oabi_semtimedop) | 329 | CALL(sys_inotify_add_watch) |
330 | /* vserver */ .long sys_ni_syscall | 330 | CALL(sys_inotify_rm_watch) |
331 | .long sys_ioprio_set | 331 | CALL(sys_mbind) |
332 | /* 315 */ .long sys_ioprio_get | 332 | /* 320 */ CALL(sys_get_mempolicy) |
333 | .long sys_inotify_init | 333 | CALL(sys_set_mempolicy) |
334 | .long sys_inotify_add_watch | 334 | #ifndef syscalls_counted |
335 | .long sys_inotify_rm_watch | 335 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls |
336 | .long sys_mbind | 336 | #define syscalls_counted |
337 | /* 320 */ .long sys_get_mempolicy | ||
338 | .long sys_set_mempolicy | ||
339 | |||
340 | .rept NR_syscalls - (. - 100b) / 4 | ||
341 | .long sys_ni_syscall | ||
342 | .endr | ||
343 | #endif | 337 | #endif |
338 | .rept syscalls_padding | ||
339 | CALL(sys_ni_syscall) | ||
340 | .endr | ||
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 2b92ce85f97f..dbcb11a31f78 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -87,7 +87,11 @@ ENTRY(ret_from_fork) | |||
87 | b ret_slow_syscall | 87 | b ret_slow_syscall |
88 | 88 | ||
89 | 89 | ||
90 | .equ NR_syscalls,0 | ||
91 | #define CALL(x) .equ NR_syscalls,NR_syscalls+1 | ||
90 | #include "calls.S" | 92 | #include "calls.S" |
93 | #undef CALL | ||
94 | #define CALL(x) .long x | ||
91 | 95 | ||
92 | /*============================================================================= | 96 | /*============================================================================= |
93 | * SWI handler | 97 | * SWI handler |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 31820170f306..a0724f2b24ce 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -469,7 +469,9 @@ static void cp_clcd_enable(struct clcd_fb *fb) | |||
469 | if (fb->fb.var.bits_per_pixel <= 8) | 469 | if (fb->fb.var.bits_per_pixel <= 8) |
470 | val = CM_CTRL_LCDMUXSEL_VGA_8421BPP; | 470 | val = CM_CTRL_LCDMUXSEL_VGA_8421BPP; |
471 | else if (fb->fb.var.bits_per_pixel <= 16) | 471 | else if (fb->fb.var.bits_per_pixel <= 16) |
472 | val = CM_CTRL_LCDMUXSEL_VGA_16BPP; | 472 | val = CM_CTRL_LCDMUXSEL_VGA_16BPP |
473 | | CM_CTRL_LCDEN0 | CM_CTRL_LCDEN1 | ||
474 | | CM_CTRL_STATIC1 | CM_CTRL_STATIC2; | ||
473 | else | 475 | else |
474 | val = 0; /* no idea for this, don't trust the docs */ | 476 | val = 0; /* no idea for this, don't trust the docs */ |
475 | 477 | ||
diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h index 9cbe5eef492b..fc1067783f6d 100644 --- a/arch/arm/mach-s3c2410/cpu.h +++ b/arch/arm/mach-s3c2410/cpu.h | |||
@@ -17,11 +17,12 @@ | |||
17 | * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call | 17 | * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call |
18 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT | 18 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT |
19 | * 14-Mar-2005 BJD Updated for __iomem | 19 | * 14-Mar-2005 BJD Updated for __iomem |
20 | * 15-Jan-2006 LCVR Updated S3C2410_PA_##x to new S3C24XX_PA_##x macro | ||
20 | */ | 21 | */ |
21 | 22 | ||
22 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ | 23 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ |
23 | 24 | ||
24 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C2410_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } | 25 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } |
25 | 26 | ||
26 | #ifndef MHZ | 27 | #ifndef MHZ |
27 | #define MHZ (1000*1000) | 28 | #define MHZ (1000*1000) |
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c index f58406e6ef5a..b8d994a24d1c 100644 --- a/arch/arm/mach-s3c2410/devs.c +++ b/arch/arm/mach-s3c2410/devs.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | * Modifications: | 12 | * Modifications: |
13 | * 15-Jan-2006 LCVR Using S3C24XX_PA_##x macro for common S3C24XX devices | ||
13 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} | 14 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} |
14 | * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv | 15 | * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv |
15 | * 29-Aug-2004 BJD Added timers 0 through 3 | 16 | * 29-Aug-2004 BJD Added timers 0 through 3 |
@@ -46,8 +47,8 @@ struct platform_device *s3c24xx_uart_devs[3]; | |||
46 | 47 | ||
47 | static struct resource s3c_usb_resource[] = { | 48 | static struct resource s3c_usb_resource[] = { |
48 | [0] = { | 49 | [0] = { |
49 | .start = S3C2410_PA_USBHOST, | 50 | .start = S3C24XX_PA_USBHOST, |
50 | .end = S3C2410_PA_USBHOST + S3C24XX_SZ_USBHOST - 1, | 51 | .end = S3C24XX_PA_USBHOST + S3C24XX_SZ_USBHOST - 1, |
51 | .flags = IORESOURCE_MEM, | 52 | .flags = IORESOURCE_MEM, |
52 | }, | 53 | }, |
53 | [1] = { | 54 | [1] = { |
@@ -76,8 +77,8 @@ EXPORT_SYMBOL(s3c_device_usb); | |||
76 | 77 | ||
77 | static struct resource s3c_lcd_resource[] = { | 78 | static struct resource s3c_lcd_resource[] = { |
78 | [0] = { | 79 | [0] = { |
79 | .start = S3C2410_PA_LCD, | 80 | .start = S3C24XX_PA_LCD, |
80 | .end = S3C2410_PA_LCD + S3C24XX_SZ_LCD - 1, | 81 | .end = S3C24XX_PA_LCD + S3C24XX_SZ_LCD - 1, |
81 | .flags = IORESOURCE_MEM, | 82 | .flags = IORESOURCE_MEM, |
82 | }, | 83 | }, |
83 | [1] = { | 84 | [1] = { |
@@ -139,8 +140,8 @@ EXPORT_SYMBOL(s3c_device_nand); | |||
139 | 140 | ||
140 | static struct resource s3c_usbgadget_resource[] = { | 141 | static struct resource s3c_usbgadget_resource[] = { |
141 | [0] = { | 142 | [0] = { |
142 | .start = S3C2410_PA_USBDEV, | 143 | .start = S3C24XX_PA_USBDEV, |
143 | .end = S3C2410_PA_USBDEV + S3C24XX_SZ_USBDEV - 1, | 144 | .end = S3C24XX_PA_USBDEV + S3C24XX_SZ_USBDEV - 1, |
144 | .flags = IORESOURCE_MEM, | 145 | .flags = IORESOURCE_MEM, |
145 | }, | 146 | }, |
146 | [1] = { | 147 | [1] = { |
@@ -164,8 +165,8 @@ EXPORT_SYMBOL(s3c_device_usbgadget); | |||
164 | 165 | ||
165 | static struct resource s3c_wdt_resource[] = { | 166 | static struct resource s3c_wdt_resource[] = { |
166 | [0] = { | 167 | [0] = { |
167 | .start = S3C2410_PA_WATCHDOG, | 168 | .start = S3C24XX_PA_WATCHDOG, |
168 | .end = S3C2410_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1, | 169 | .end = S3C24XX_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1, |
169 | .flags = IORESOURCE_MEM, | 170 | .flags = IORESOURCE_MEM, |
170 | }, | 171 | }, |
171 | [1] = { | 172 | [1] = { |
@@ -189,8 +190,8 @@ EXPORT_SYMBOL(s3c_device_wdt); | |||
189 | 190 | ||
190 | static struct resource s3c_i2c_resource[] = { | 191 | static struct resource s3c_i2c_resource[] = { |
191 | [0] = { | 192 | [0] = { |
192 | .start = S3C2410_PA_IIC, | 193 | .start = S3C24XX_PA_IIC, |
193 | .end = S3C2410_PA_IIC + S3C24XX_SZ_IIC - 1, | 194 | .end = S3C24XX_PA_IIC + S3C24XX_SZ_IIC - 1, |
194 | .flags = IORESOURCE_MEM, | 195 | .flags = IORESOURCE_MEM, |
195 | }, | 196 | }, |
196 | [1] = { | 197 | [1] = { |
@@ -214,8 +215,8 @@ EXPORT_SYMBOL(s3c_device_i2c); | |||
214 | 215 | ||
215 | static struct resource s3c_iis_resource[] = { | 216 | static struct resource s3c_iis_resource[] = { |
216 | [0] = { | 217 | [0] = { |
217 | .start = S3C2410_PA_IIS, | 218 | .start = S3C24XX_PA_IIS, |
218 | .end = S3C2410_PA_IIS + S3C24XX_SZ_IIS -1, | 219 | .end = S3C24XX_PA_IIS + S3C24XX_SZ_IIS -1, |
219 | .flags = IORESOURCE_MEM, | 220 | .flags = IORESOURCE_MEM, |
220 | } | 221 | } |
221 | }; | 222 | }; |
@@ -239,8 +240,8 @@ EXPORT_SYMBOL(s3c_device_iis); | |||
239 | 240 | ||
240 | static struct resource s3c_rtc_resource[] = { | 241 | static struct resource s3c_rtc_resource[] = { |
241 | [0] = { | 242 | [0] = { |
242 | .start = S3C2410_PA_RTC, | 243 | .start = S3C24XX_PA_RTC, |
243 | .end = S3C2410_PA_RTC + 0xff, | 244 | .end = S3C24XX_PA_RTC + 0xff, |
244 | .flags = IORESOURCE_MEM, | 245 | .flags = IORESOURCE_MEM, |
245 | }, | 246 | }, |
246 | [1] = { | 247 | [1] = { |
@@ -268,8 +269,8 @@ EXPORT_SYMBOL(s3c_device_rtc); | |||
268 | 269 | ||
269 | static struct resource s3c_adc_resource[] = { | 270 | static struct resource s3c_adc_resource[] = { |
270 | [0] = { | 271 | [0] = { |
271 | .start = S3C2410_PA_ADC, | 272 | .start = S3C24XX_PA_ADC, |
272 | .end = S3C2410_PA_ADC + S3C24XX_SZ_ADC - 1, | 273 | .end = S3C24XX_PA_ADC + S3C24XX_SZ_ADC - 1, |
273 | .flags = IORESOURCE_MEM, | 274 | .flags = IORESOURCE_MEM, |
274 | }, | 275 | }, |
275 | [1] = { | 276 | [1] = { |
@@ -316,8 +317,8 @@ EXPORT_SYMBOL(s3c_device_sdi); | |||
316 | 317 | ||
317 | static struct resource s3c_spi0_resource[] = { | 318 | static struct resource s3c_spi0_resource[] = { |
318 | [0] = { | 319 | [0] = { |
319 | .start = S3C2410_PA_SPI, | 320 | .start = S3C24XX_PA_SPI, |
320 | .end = S3C2410_PA_SPI + 0x1f, | 321 | .end = S3C24XX_PA_SPI + 0x1f, |
321 | .flags = IORESOURCE_MEM, | 322 | .flags = IORESOURCE_MEM, |
322 | }, | 323 | }, |
323 | [1] = { | 324 | [1] = { |
@@ -341,8 +342,8 @@ EXPORT_SYMBOL(s3c_device_spi0); | |||
341 | 342 | ||
342 | static struct resource s3c_spi1_resource[] = { | 343 | static struct resource s3c_spi1_resource[] = { |
343 | [0] = { | 344 | [0] = { |
344 | .start = S3C2410_PA_SPI + 0x20, | 345 | .start = S3C24XX_PA_SPI + 0x20, |
345 | .end = S3C2410_PA_SPI + 0x20 + 0x1f, | 346 | .end = S3C24XX_PA_SPI + 0x20 + 0x1f, |
346 | .flags = IORESOURCE_MEM, | 347 | .flags = IORESOURCE_MEM, |
347 | }, | 348 | }, |
348 | [1] = { | 349 | [1] = { |
@@ -366,8 +367,8 @@ EXPORT_SYMBOL(s3c_device_spi1); | |||
366 | 367 | ||
367 | static struct resource s3c_timer0_resource[] = { | 368 | static struct resource s3c_timer0_resource[] = { |
368 | [0] = { | 369 | [0] = { |
369 | .start = S3C2410_PA_TIMER + 0x0C, | 370 | .start = S3C24XX_PA_TIMER + 0x0C, |
370 | .end = S3C2410_PA_TIMER + 0x0C + 0xB, | 371 | .end = S3C24XX_PA_TIMER + 0x0C + 0xB, |
371 | .flags = IORESOURCE_MEM, | 372 | .flags = IORESOURCE_MEM, |
372 | }, | 373 | }, |
373 | [1] = { | 374 | [1] = { |
@@ -391,8 +392,8 @@ EXPORT_SYMBOL(s3c_device_timer0); | |||
391 | 392 | ||
392 | static struct resource s3c_timer1_resource[] = { | 393 | static struct resource s3c_timer1_resource[] = { |
393 | [0] = { | 394 | [0] = { |
394 | .start = S3C2410_PA_TIMER + 0x18, | 395 | .start = S3C24XX_PA_TIMER + 0x18, |
395 | .end = S3C2410_PA_TIMER + 0x23, | 396 | .end = S3C24XX_PA_TIMER + 0x23, |
396 | .flags = IORESOURCE_MEM, | 397 | .flags = IORESOURCE_MEM, |
397 | }, | 398 | }, |
398 | [1] = { | 399 | [1] = { |
@@ -416,8 +417,8 @@ EXPORT_SYMBOL(s3c_device_timer1); | |||
416 | 417 | ||
417 | static struct resource s3c_timer2_resource[] = { | 418 | static struct resource s3c_timer2_resource[] = { |
418 | [0] = { | 419 | [0] = { |
419 | .start = S3C2410_PA_TIMER + 0x24, | 420 | .start = S3C24XX_PA_TIMER + 0x24, |
420 | .end = S3C2410_PA_TIMER + 0x2F, | 421 | .end = S3C24XX_PA_TIMER + 0x2F, |
421 | .flags = IORESOURCE_MEM, | 422 | .flags = IORESOURCE_MEM, |
422 | }, | 423 | }, |
423 | [1] = { | 424 | [1] = { |
@@ -441,8 +442,8 @@ EXPORT_SYMBOL(s3c_device_timer2); | |||
441 | 442 | ||
442 | static struct resource s3c_timer3_resource[] = { | 443 | static struct resource s3c_timer3_resource[] = { |
443 | [0] = { | 444 | [0] = { |
444 | .start = S3C2410_PA_TIMER + 0x30, | 445 | .start = S3C24XX_PA_TIMER + 0x30, |
445 | .end = S3C2410_PA_TIMER + 0x3B, | 446 | .end = S3C24XX_PA_TIMER + 0x3B, |
446 | .flags = IORESOURCE_MEM, | 447 | .flags = IORESOURCE_MEM, |
447 | }, | 448 | }, |
448 | [1] = { | 449 | [1] = { |
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index 65feaf20d23e..4dbd8e758ea6 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c | |||
@@ -1152,7 +1152,7 @@ static int __init s3c2410_init_dma(void) | |||
1152 | 1152 | ||
1153 | printk("S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics\n"); | 1153 | printk("S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics\n"); |
1154 | 1154 | ||
1155 | dma_base = ioremap(S3C2410_PA_DMA, 0x200); | 1155 | dma_base = ioremap(S3C24XX_PA_DMA, 0x200); |
1156 | if (dma_base == NULL) { | 1156 | if (dma_base == NULL) { |
1157 | printk(KERN_ERR "dma failed to remap register block\n"); | 1157 | printk(KERN_ERR "dma failed to remap register block\n"); |
1158 | return -ENOMEM; | 1158 | return -ENOMEM; |
diff --git a/arch/arm/mach-s3c2410/sleep.S b/arch/arm/mach-s3c2410/sleep.S index 61768dac7fee..e9a055b779b7 100644 --- a/arch/arm/mach-s3c2410/sleep.S +++ b/arch/arm/mach-s3c2410/sleep.S | |||
@@ -133,12 +133,12 @@ ENTRY(s3c2410_cpu_resume) | |||
133 | @@ load UART to allow us to print the two characters for | 133 | @@ load UART to allow us to print the two characters for |
134 | @@ resume debug | 134 | @@ resume debug |
135 | 135 | ||
136 | mov r2, #S3C2410_PA_UART & 0xff000000 | 136 | mov r2, #S3C24XX_PA_UART & 0xff000000 |
137 | orr r2, r2, #S3C2410_PA_UART & 0xff000 | 137 | orr r2, r2, #S3C24XX_PA_UART & 0xff000 |
138 | 138 | ||
139 | #if 0 | 139 | #if 0 |
140 | /* SMDK2440 LED set */ | 140 | /* SMDK2440 LED set */ |
141 | mov r14, #S3C2410_PA_GPIO | 141 | mov r14, #S3C24XX_PA_GPIO |
142 | ldr r12, [ r14, #0x54 ] | 142 | ldr r12, [ r14, #0x54 ] |
143 | bic r12, r12, #3<<4 | 143 | bic r12, r12, #3<<4 |
144 | orr r12, r12, #1<<7 | 144 | orr r12, r12, #1<<7 |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index de3ce1eec2ec..da9b35974118 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -142,7 +142,7 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, | |||
142 | return NULL; | 142 | return NULL; |
143 | addr = (unsigned long)area->addr; | 143 | addr = (unsigned long)area->addr; |
144 | if (remap_area_pages(addr, pfn, size, flags)) { | 144 | if (remap_area_pages(addr, pfn, size, flags)) { |
145 | vfree(addr); | 145 | vfree((void *)addr); |
146 | return NULL; | 146 | return NULL; |
147 | } | 147 | } |
148 | return (void __iomem *) (offset + (char *)addr); | 148 | return (void __iomem *) (offset + (char *)addr); |
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index d0245a31d4dd..ef8d30a185a9 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c | |||
@@ -343,6 +343,12 @@ static struct mem_types mem_types[] __initdata = { | |||
343 | PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | | 343 | PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | |
344 | PMD_SECT_TEX(1), | 344 | PMD_SECT_TEX(1), |
345 | .domain = DOMAIN_IO, | 345 | .domain = DOMAIN_IO, |
346 | }, | ||
347 | [MT_NONSHARED_DEVICE] = { | ||
348 | .prot_l1 = PMD_TYPE_TABLE, | ||
349 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_NONSHARED_DEV | | ||
350 | PMD_SECT_AP_WRITE, | ||
351 | .domain = DOMAIN_IO, | ||
346 | } | 352 | } |
347 | }; | 353 | }; |
348 | 354 | ||
diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig index 274e07019b46..dee23d87fc5a 100644 --- a/arch/arm26/Kconfig +++ b/arch/arm26/Kconfig | |||
@@ -53,14 +53,14 @@ config GENERIC_ISA_DMA | |||
53 | 53 | ||
54 | config ARCH_MAY_HAVE_PC_FDC | 54 | config ARCH_MAY_HAVE_PC_FDC |
55 | bool | 55 | bool |
56 | default y | ||
57 | 56 | ||
58 | source "init/Kconfig" | 57 | source "init/Kconfig" |
59 | 58 | ||
60 | 59 | ||
61 | menu "System Type" | 60 | menu "System Type" |
62 | 61 | ||
63 | comment "Archimedes/A5000 Implementations (select only ONE)" | 62 | choice |
63 | prompt "Archimedes/A5000 Implementations" | ||
64 | 64 | ||
65 | config ARCH_ARC | 65 | config ARCH_ARC |
66 | bool "Archimedes" | 66 | bool "Archimedes" |
@@ -73,6 +73,7 @@ config ARCH_ARC | |||
73 | 73 | ||
74 | config ARCH_A5K | 74 | config ARCH_A5K |
75 | bool "A5000" | 75 | bool "A5000" |
76 | select ARCH_MAY_HAVE_PC_FDC | ||
76 | help | 77 | help |
77 | Say Y here to to support the Acorn A5000. | 78 | Say Y here to to support the Acorn A5000. |
78 | 79 | ||
@@ -87,6 +88,7 @@ config PAGESIZE_16 | |||
87 | Say Y here if your Archimedes or A5000 system has only 2MB of | 88 | Say Y here if your Archimedes or A5000 system has only 2MB of |
88 | memory, otherwise say N. The resulting kernel will not run on a | 89 | memory, otherwise say N. The resulting kernel will not run on a |
89 | machine with 4MB of memory. | 90 | machine with 4MB of memory. |
91 | endchoice | ||
90 | endmenu | 92 | endmenu |
91 | 93 | ||
92 | config ISA_DMA_API | 94 | config ISA_DMA_API |
diff --git a/arch/arm26/kernel/fiq.c b/arch/arm26/kernel/fiq.c index 08a97c9498ff..a24272b61f30 100644 --- a/arch/arm26/kernel/fiq.c +++ b/arch/arm26/kernel/fiq.c | |||
@@ -104,14 +104,14 @@ void set_fiq_regs(struct pt_regs *regs) | |||
104 | { | 104 | { |
105 | register unsigned long tmp, tmp2; | 105 | register unsigned long tmp, tmp2; |
106 | __asm__ volatile ( | 106 | __asm__ volatile ( |
107 | "mov %0, pc | 107 | "mov %0, pc \n" |
108 | bic %1, %0, #0x3 | 108 | "bic %1, %0, #0x3 \n" |
109 | orr %1, %1, %3 | 109 | "orr %1, %1, %3 \n" |
110 | teqp %1, #0 @ select FIQ mode | 110 | "teqp %1, #0 @ select FIQ mode \n" |
111 | mov r0, r0 | 111 | "mov r0, r0 \n" |
112 | ldmia %2, {r8 - r14} | 112 | "ldmia %2, {r8 - r14} \n" |
113 | teqp %0, #0 @ return to SVC mode | 113 | "teqp %0, #0 @ return to SVC mode \n" |
114 | mov r0, r0" | 114 | "mov r0, r0 " |
115 | : "=&r" (tmp), "=&r" (tmp2) | 115 | : "=&r" (tmp), "=&r" (tmp2) |
116 | : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | MODE_FIQ26) | 116 | : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | MODE_FIQ26) |
117 | /* These registers aren't modified by the above code in a way | 117 | /* These registers aren't modified by the above code in a way |
@@ -125,14 +125,14 @@ void get_fiq_regs(struct pt_regs *regs) | |||
125 | { | 125 | { |
126 | register unsigned long tmp, tmp2; | 126 | register unsigned long tmp, tmp2; |
127 | __asm__ volatile ( | 127 | __asm__ volatile ( |
128 | "mov %0, pc | 128 | "mov %0, pc \n" |
129 | bic %1, %0, #0x3 | 129 | "bic %1, %0, #0x3 \n" |
130 | orr %1, %1, %3 | 130 | "orr %1, %1, %3 \n" |
131 | teqp %1, #0 @ select FIQ mode | 131 | "teqp %1, #0 @ select FIQ mode \n" |
132 | mov r0, r0 | 132 | "mov r0, r0 \n" |
133 | stmia %2, {r8 - r14} | 133 | "stmia %2, {r8 - r14} \n" |
134 | teqp %0, #0 @ return to SVC mode | 134 | "teqp %0, #0 @ return to SVC mode \n" |
135 | mov r0, r0" | 135 | "mov r0, r0 " |
136 | : "=&r" (tmp), "=&r" (tmp2) | 136 | : "=&r" (tmp), "=&r" (tmp2) |
137 | : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | MODE_FIQ26) | 137 | : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | MODE_FIQ26) |
138 | /* These registers aren't modified by the above code in a way | 138 | /* These registers aren't modified by the above code in a way |
diff --git a/arch/arm26/kernel/signal.c b/arch/arm26/kernel/signal.c index ce2055bdc9ee..2a48c12100c0 100644 --- a/arch/arm26/kernel/signal.c +++ b/arch/arm26/kernel/signal.c | |||
@@ -480,6 +480,7 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) | |||
480 | { | 480 | { |
481 | siginfo_t info; | 481 | siginfo_t info; |
482 | int signr; | 482 | int signr; |
483 | struct k_sigaction ka; | ||
483 | 484 | ||
484 | /* | 485 | /* |
485 | * We want the common case to go fast, which | 486 | * We want the common case to go fast, which |
@@ -493,7 +494,7 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) | |||
493 | if (current->ptrace & PT_SINGLESTEP) | 494 | if (current->ptrace & PT_SINGLESTEP) |
494 | ptrace_cancel_bpt(current); | 495 | ptrace_cancel_bpt(current); |
495 | 496 | ||
496 | signr = get_signal_to_deliver(&info, regs, NULL); | 497 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
497 | if (signr > 0) { | 498 | if (signr > 0) { |
498 | handle_signal(signr, &info, oldset, regs, syscall); | 499 | handle_signal(signr, &info, oldset, regs, syscall); |
499 | if (current->ptrace & PT_SINGLESTEP) | 500 | if (current->ptrace & PT_SINGLESTEP) |
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index cbde675bc95c..d86c865a7cd2 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -47,15 +47,6 @@ config DMI | |||
47 | 47 | ||
48 | source "init/Kconfig" | 48 | source "init/Kconfig" |
49 | 49 | ||
50 | config DOUBLEFAULT | ||
51 | default y | ||
52 | bool "Enable doublefault exception handler" if EMBEDDED | ||
53 | help | ||
54 | This option allows trapping of rare doublefault exceptions that | ||
55 | would otherwise cause a system to silently reboot. Disabling this | ||
56 | option saves about 4k and might cause you much additional grey | ||
57 | hair. | ||
58 | |||
59 | menu "Processor type and features" | 50 | menu "Processor type and features" |
60 | 51 | ||
61 | choice | 52 | choice |
@@ -457,6 +448,43 @@ config HIGHMEM64G | |||
457 | 448 | ||
458 | endchoice | 449 | endchoice |
459 | 450 | ||
451 | choice | ||
452 | depends on EXPERIMENTAL && !X86_PAE | ||
453 | prompt "Memory split" | ||
454 | default VMSPLIT_3G | ||
455 | help | ||
456 | Select the desired split between kernel and user memory. | ||
457 | |||
458 | If the address range available to the kernel is less than the | ||
459 | physical memory installed, the remaining memory will be available | ||
460 | as "high memory". Accessing high memory is a little more costly | ||
461 | than low memory, as it needs to be mapped into the kernel first. | ||
462 | Note that increasing the kernel address space limits the range | ||
463 | available to user programs, making the address space there | ||
464 | tighter. Selecting anything other than the default 3G/1G split | ||
465 | will also likely make your kernel incompatible with binary-only | ||
466 | kernel modules. | ||
467 | |||
468 | If you are not absolutely sure what you are doing, leave this | ||
469 | option alone! | ||
470 | |||
471 | config VMSPLIT_3G | ||
472 | bool "3G/1G user/kernel split" | ||
473 | config VMSPLIT_3G_OPT | ||
474 | bool "3G/1G user/kernel split (for full 1G low memory)" | ||
475 | config VMSPLIT_2G | ||
476 | bool "2G/2G user/kernel split" | ||
477 | config VMSPLIT_1G | ||
478 | bool "1G/3G user/kernel split" | ||
479 | endchoice | ||
480 | |||
481 | config PAGE_OFFSET | ||
482 | hex | ||
483 | default 0xB0000000 if VMSPLIT_3G_OPT | ||
484 | default 0x78000000 if VMSPLIT_2G | ||
485 | default 0x40000000 if VMSPLIT_1G | ||
486 | default 0xC0000000 | ||
487 | |||
460 | config HIGHMEM | 488 | config HIGHMEM |
461 | bool | 489 | bool |
462 | depends on HIGHMEM64G || HIGHMEM4G | 490 | depends on HIGHMEM64G || HIGHMEM4G |
@@ -711,6 +739,15 @@ config HOTPLUG_CPU | |||
711 | 739 | ||
712 | Say N. | 740 | Say N. |
713 | 741 | ||
742 | config DOUBLEFAULT | ||
743 | default y | ||
744 | bool "Enable doublefault exception handler" if EMBEDDED | ||
745 | help | ||
746 | This option allows trapping of rare doublefault exceptions that | ||
747 | would otherwise cause a system to silently reboot. Disabling this | ||
748 | option saves about 4k and might cause you much additional grey | ||
749 | hair. | ||
750 | |||
714 | endmenu | 751 | endmenu |
715 | 752 | ||
716 | 753 | ||
diff --git a/arch/i386/kernel/acpi/Makefile b/arch/i386/kernel/acpi/Makefile index 267ca48e1b6c..d51c7313cae8 100644 --- a/arch/i386/kernel/acpi/Makefile +++ b/arch/i386/kernel/acpi/Makefile | |||
@@ -3,6 +3,6 @@ obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o | |||
3 | obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o | 3 | obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o |
4 | 4 | ||
5 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | 5 | ifneq ($(CONFIG_ACPI_PROCESSOR),) |
6 | obj-y += cstate.o | 6 | obj-y += cstate.o processor.o |
7 | endif | 7 | endif |
8 | 8 | ||
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 2111529dea77..f21fa0d4482f 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -464,7 +464,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) | |||
464 | * success: return IRQ number (>=0) | 464 | * success: return IRQ number (>=0) |
465 | * failure: return < 0 | 465 | * failure: return < 0 |
466 | */ | 466 | */ |
467 | int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) | 467 | int acpi_register_gsi(u32 gsi, int triggering, int polarity) |
468 | { | 468 | { |
469 | unsigned int irq; | 469 | unsigned int irq; |
470 | unsigned int plat_gsi = gsi; | 470 | unsigned int plat_gsi = gsi; |
@@ -476,14 +476,14 @@ int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) | |||
476 | if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { | 476 | if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { |
477 | extern void eisa_set_level_irq(unsigned int irq); | 477 | extern void eisa_set_level_irq(unsigned int irq); |
478 | 478 | ||
479 | if (edge_level == ACPI_LEVEL_SENSITIVE) | 479 | if (triggering == ACPI_LEVEL_SENSITIVE) |
480 | eisa_set_level_irq(gsi); | 480 | eisa_set_level_irq(gsi); |
481 | } | 481 | } |
482 | #endif | 482 | #endif |
483 | 483 | ||
484 | #ifdef CONFIG_X86_IO_APIC | 484 | #ifdef CONFIG_X86_IO_APIC |
485 | if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { | 485 | if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { |
486 | plat_gsi = mp_register_gsi(gsi, edge_level, active_high_low); | 486 | plat_gsi = mp_register_gsi(gsi, triggering, polarity); |
487 | } | 487 | } |
488 | #endif | 488 | #endif |
489 | acpi_gsi_to_irq(plat_gsi, &irq); | 489 | acpi_gsi_to_irq(plat_gsi, &irq); |
diff --git a/arch/i386/kernel/acpi/cstate.c b/arch/i386/kernel/acpi/cstate.c index 4c3036ba65df..25db49ef1770 100644 --- a/arch/i386/kernel/acpi/cstate.c +++ b/arch/i386/kernel/acpi/cstate.c | |||
@@ -14,64 +14,6 @@ | |||
14 | #include <acpi/processor.h> | 14 | #include <acpi/processor.h> |
15 | #include <asm/acpi.h> | 15 | #include <asm/acpi.h> |
16 | 16 | ||
17 | static void acpi_processor_power_init_intel_pdc(struct acpi_processor_power | ||
18 | *pow) | ||
19 | { | ||
20 | struct acpi_object_list *obj_list; | ||
21 | union acpi_object *obj; | ||
22 | u32 *buf; | ||
23 | |||
24 | /* allocate and initialize pdc. It will be used later. */ | ||
25 | obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); | ||
26 | if (!obj_list) { | ||
27 | printk(KERN_ERR "Memory allocation error\n"); | ||
28 | return; | ||
29 | } | ||
30 | |||
31 | obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); | ||
32 | if (!obj) { | ||
33 | printk(KERN_ERR "Memory allocation error\n"); | ||
34 | kfree(obj_list); | ||
35 | return; | ||
36 | } | ||
37 | |||
38 | buf = kmalloc(12, GFP_KERNEL); | ||
39 | if (!buf) { | ||
40 | printk(KERN_ERR "Memory allocation error\n"); | ||
41 | kfree(obj); | ||
42 | kfree(obj_list); | ||
43 | return; | ||
44 | } | ||
45 | |||
46 | buf[0] = ACPI_PDC_REVISION_ID; | ||
47 | buf[1] = 1; | ||
48 | buf[2] = ACPI_PDC_C_CAPABILITY_SMP; | ||
49 | |||
50 | obj->type = ACPI_TYPE_BUFFER; | ||
51 | obj->buffer.length = 12; | ||
52 | obj->buffer.pointer = (u8 *) buf; | ||
53 | obj_list->count = 1; | ||
54 | obj_list->pointer = obj; | ||
55 | pow->pdc = obj_list; | ||
56 | |||
57 | return; | ||
58 | } | ||
59 | |||
60 | /* Initialize _PDC data based on the CPU vendor */ | ||
61 | void acpi_processor_power_init_pdc(struct acpi_processor_power *pow, | ||
62 | unsigned int cpu) | ||
63 | { | ||
64 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
65 | |||
66 | pow->pdc = NULL; | ||
67 | if (c->x86_vendor == X86_VENDOR_INTEL) | ||
68 | acpi_processor_power_init_intel_pdc(pow); | ||
69 | |||
70 | return; | ||
71 | } | ||
72 | |||
73 | EXPORT_SYMBOL(acpi_processor_power_init_pdc); | ||
74 | |||
75 | /* | 17 | /* |
76 | * Initialize bm_flags based on the CPU cache properties | 18 | * Initialize bm_flags based on the CPU cache properties |
77 | * On SMP it depends on cache configuration | 19 | * On SMP it depends on cache configuration |
diff --git a/arch/i386/kernel/acpi/processor.c b/arch/i386/kernel/acpi/processor.c new file mode 100644 index 000000000000..9f4cc02717ec --- /dev/null +++ b/arch/i386/kernel/acpi/processor.c | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * arch/i386/kernel/acpi/processor.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Intel Corporation | ||
5 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | ||
6 | * - Added _PDC for platforms with Intel CPUs | ||
7 | */ | ||
8 | |||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/module.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/acpi.h> | ||
13 | |||
14 | #include <acpi/processor.h> | ||
15 | #include <asm/acpi.h> | ||
16 | |||
17 | static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c) | ||
18 | { | ||
19 | struct acpi_object_list *obj_list; | ||
20 | union acpi_object *obj; | ||
21 | u32 *buf; | ||
22 | |||
23 | /* allocate and initialize pdc. It will be used later. */ | ||
24 | obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); | ||
25 | if (!obj_list) { | ||
26 | printk(KERN_ERR "Memory allocation error\n"); | ||
27 | return; | ||
28 | } | ||
29 | |||
30 | obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); | ||
31 | if (!obj) { | ||
32 | printk(KERN_ERR "Memory allocation error\n"); | ||
33 | kfree(obj_list); | ||
34 | return; | ||
35 | } | ||
36 | |||
37 | buf = kmalloc(12, GFP_KERNEL); | ||
38 | if (!buf) { | ||
39 | printk(KERN_ERR "Memory allocation error\n"); | ||
40 | kfree(obj); | ||
41 | kfree(obj_list); | ||
42 | return; | ||
43 | } | ||
44 | |||
45 | buf[0] = ACPI_PDC_REVISION_ID; | ||
46 | buf[1] = 1; | ||
47 | buf[2] = ACPI_PDC_C_CAPABILITY_SMP; | ||
48 | |||
49 | if (cpu_has(c, X86_FEATURE_EST)) | ||
50 | buf[2] |= ACPI_PDC_EST_CAPABILITY_SMP; | ||
51 | |||
52 | obj->type = ACPI_TYPE_BUFFER; | ||
53 | obj->buffer.length = 12; | ||
54 | obj->buffer.pointer = (u8 *) buf; | ||
55 | obj_list->count = 1; | ||
56 | obj_list->pointer = obj; | ||
57 | pr->pdc = obj_list; | ||
58 | |||
59 | return; | ||
60 | } | ||
61 | |||
62 | /* Initialize _PDC data based on the CPU vendor */ | ||
63 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr) | ||
64 | { | ||
65 | unsigned int cpu = pr->id; | ||
66 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
67 | |||
68 | pr->pdc = NULL; | ||
69 | if (c->x86_vendor == X86_VENDOR_INTEL) | ||
70 | init_intel_pdc(pr, c); | ||
71 | |||
72 | return; | ||
73 | } | ||
74 | |||
75 | EXPORT_SYMBOL(arch_acpi_processor_init_pdc); | ||
diff --git a/arch/i386/kernel/cpu/centaur.c b/arch/i386/kernel/cpu/centaur.c index 394814e57672..0dd92a23d622 100644 --- a/arch/i386/kernel/cpu/centaur.c +++ b/arch/i386/kernel/cpu/centaur.c | |||
@@ -405,10 +405,6 @@ static void __init init_centaur(struct cpuinfo_x86 *c) | |||
405 | winchip2_protect_mcr(); | 405 | winchip2_protect_mcr(); |
406 | #endif | 406 | #endif |
407 | break; | 407 | break; |
408 | case 10: | ||
409 | name="4"; | ||
410 | /* no info on the WC4 yet */ | ||
411 | break; | ||
412 | default: | 408 | default: |
413 | name="??"; | 409 | name="??"; |
414 | } | 410 | } |
diff --git a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig index 0f1eb507233b..26892d2099b0 100644 --- a/arch/i386/kernel/cpu/cpufreq/Kconfig +++ b/arch/i386/kernel/cpu/cpufreq/Kconfig | |||
@@ -96,6 +96,7 @@ config X86_POWERNOW_K8_ACPI | |||
96 | 96 | ||
97 | config X86_GX_SUSPMOD | 97 | config X86_GX_SUSPMOD |
98 | tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" | 98 | tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" |
99 | depends on PCI | ||
99 | help | 100 | help |
100 | This add the CPUFreq driver for NatSemi Geode processors which | 101 | This add the CPUFreq driver for NatSemi Geode processors which |
101 | support suspend modulation. | 102 | support suspend modulation. |
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index 7975e79d5fa4..3852d0a4c1b5 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -295,68 +295,6 @@ acpi_cpufreq_guess_freq ( | |||
295 | } | 295 | } |
296 | 296 | ||
297 | 297 | ||
298 | /* | ||
299 | * acpi_processor_cpu_init_pdc_est - let BIOS know about the SMP capabilities | ||
300 | * of this driver | ||
301 | * @perf: processor-specific acpi_io_data struct | ||
302 | * @cpu: CPU being initialized | ||
303 | * | ||
304 | * To avoid issues with legacy OSes, some BIOSes require to be informed of | ||
305 | * the SMP capabilities of OS P-state driver. Here we set the bits in _PDC | ||
306 | * accordingly, for Enhanced Speedstep. Actual call to _PDC is done in | ||
307 | * driver/acpi/processor.c | ||
308 | */ | ||
309 | static void | ||
310 | acpi_processor_cpu_init_pdc_est( | ||
311 | struct acpi_processor_performance *perf, | ||
312 | unsigned int cpu, | ||
313 | struct acpi_object_list *obj_list | ||
314 | ) | ||
315 | { | ||
316 | union acpi_object *obj; | ||
317 | u32 *buf; | ||
318 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
319 | dprintk("acpi_processor_cpu_init_pdc_est\n"); | ||
320 | |||
321 | if (!cpu_has(c, X86_FEATURE_EST)) | ||
322 | return; | ||
323 | |||
324 | /* Initialize pdc. It will be used later. */ | ||
325 | if (!obj_list) | ||
326 | return; | ||
327 | |||
328 | if (!(obj_list->count && obj_list->pointer)) | ||
329 | return; | ||
330 | |||
331 | obj = obj_list->pointer; | ||
332 | if ((obj->buffer.length == 12) && obj->buffer.pointer) { | ||
333 | buf = (u32 *)obj->buffer.pointer; | ||
334 | buf[0] = ACPI_PDC_REVISION_ID; | ||
335 | buf[1] = 1; | ||
336 | buf[2] = ACPI_PDC_EST_CAPABILITY_SMP; | ||
337 | perf->pdc = obj_list; | ||
338 | } | ||
339 | return; | ||
340 | } | ||
341 | |||
342 | |||
343 | /* CPU specific PDC initialization */ | ||
344 | static void | ||
345 | acpi_processor_cpu_init_pdc( | ||
346 | struct acpi_processor_performance *perf, | ||
347 | unsigned int cpu, | ||
348 | struct acpi_object_list *obj_list | ||
349 | ) | ||
350 | { | ||
351 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
352 | dprintk("acpi_processor_cpu_init_pdc\n"); | ||
353 | perf->pdc = NULL; | ||
354 | if (cpu_has(c, X86_FEATURE_EST)) | ||
355 | acpi_processor_cpu_init_pdc_est(perf, cpu, obj_list); | ||
356 | return; | ||
357 | } | ||
358 | |||
359 | |||
360 | static int | 298 | static int |
361 | acpi_cpufreq_cpu_init ( | 299 | acpi_cpufreq_cpu_init ( |
362 | struct cpufreq_policy *policy) | 300 | struct cpufreq_policy *policy) |
@@ -367,14 +305,7 @@ acpi_cpufreq_cpu_init ( | |||
367 | unsigned int result = 0; | 305 | unsigned int result = 0; |
368 | struct cpuinfo_x86 *c = &cpu_data[policy->cpu]; | 306 | struct cpuinfo_x86 *c = &cpu_data[policy->cpu]; |
369 | 307 | ||
370 | union acpi_object arg0 = {ACPI_TYPE_BUFFER}; | ||
371 | u32 arg0_buf[3]; | ||
372 | struct acpi_object_list arg_list = {1, &arg0}; | ||
373 | |||
374 | dprintk("acpi_cpufreq_cpu_init\n"); | 308 | dprintk("acpi_cpufreq_cpu_init\n"); |
375 | /* setup arg_list for _PDC settings */ | ||
376 | arg0.buffer.length = 12; | ||
377 | arg0.buffer.pointer = (u8 *) arg0_buf; | ||
378 | 309 | ||
379 | data = kzalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); | 310 | data = kzalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); |
380 | if (!data) | 311 | if (!data) |
@@ -382,9 +313,7 @@ acpi_cpufreq_cpu_init ( | |||
382 | 313 | ||
383 | acpi_io_data[cpu] = data; | 314 | acpi_io_data[cpu] = data; |
384 | 315 | ||
385 | acpi_processor_cpu_init_pdc(&data->acpi_data, cpu, &arg_list); | ||
386 | result = acpi_processor_register_performance(&data->acpi_data, cpu); | 316 | result = acpi_processor_register_performance(&data->acpi_data, cpu); |
387 | data->acpi_data.pdc = NULL; | ||
388 | 317 | ||
389 | if (result) | 318 | if (result) |
390 | goto err_free; | 319 | goto err_free; |
diff --git a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c index 270f2188d68b..cc73a7ae34bc 100644 --- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c | |||
@@ -52,6 +52,7 @@ enum { | |||
52 | 52 | ||
53 | 53 | ||
54 | static int has_N44_O17_errata[NR_CPUS]; | 54 | static int has_N44_O17_errata[NR_CPUS]; |
55 | static int has_N60_errata[NR_CPUS]; | ||
55 | static unsigned int stock_freq; | 56 | static unsigned int stock_freq; |
56 | static struct cpufreq_driver p4clockmod_driver; | 57 | static struct cpufreq_driver p4clockmod_driver; |
57 | static unsigned int cpufreq_p4_get(unsigned int cpu); | 58 | static unsigned int cpufreq_p4_get(unsigned int cpu); |
@@ -226,6 +227,12 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
226 | case 0x0f12: | 227 | case 0x0f12: |
227 | has_N44_O17_errata[policy->cpu] = 1; | 228 | has_N44_O17_errata[policy->cpu] = 1; |
228 | dprintk("has errata -- disabling low frequencies\n"); | 229 | dprintk("has errata -- disabling low frequencies\n"); |
230 | break; | ||
231 | |||
232 | case 0x0f29: | ||
233 | has_N60_errata[policy->cpu] = 1; | ||
234 | dprintk("has errata -- disabling frequencies lower than 2ghz\n"); | ||
235 | break; | ||
229 | } | 236 | } |
230 | 237 | ||
231 | /* get max frequency */ | 238 | /* get max frequency */ |
@@ -237,6 +244,8 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
237 | for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { | 244 | for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { |
238 | if ((i<2) && (has_N44_O17_errata[policy->cpu])) | 245 | if ((i<2) && (has_N44_O17_errata[policy->cpu])) |
239 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; | 246 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; |
247 | else if (has_N60_errata[policy->cpu] && p4clockmod_table[i].frequency < 2000000) | ||
248 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; | ||
240 | else | 249 | else |
241 | p4clockmod_table[i].frequency = (stock_freq * i)/8; | 250 | p4clockmod_table[i].frequency = (stock_freq * i)/8; |
242 | } | 251 | } |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c index 9a826cde4fd1..c173c0fa117a 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -362,22 +362,10 @@ static struct acpi_processor_performance p; | |||
362 | */ | 362 | */ |
363 | static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) | 363 | static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) |
364 | { | 364 | { |
365 | union acpi_object arg0 = {ACPI_TYPE_BUFFER}; | ||
366 | u32 arg0_buf[3]; | ||
367 | struct acpi_object_list arg_list = {1, &arg0}; | ||
368 | unsigned long cur_freq; | 365 | unsigned long cur_freq; |
369 | int result = 0, i; | 366 | int result = 0, i; |
370 | unsigned int cpu = policy->cpu; | 367 | unsigned int cpu = policy->cpu; |
371 | 368 | ||
372 | /* _PDC settings */ | ||
373 | arg0.buffer.length = 12; | ||
374 | arg0.buffer.pointer = (u8 *) arg0_buf; | ||
375 | arg0_buf[0] = ACPI_PDC_REVISION_ID; | ||
376 | arg0_buf[1] = 1; | ||
377 | arg0_buf[2] = ACPI_PDC_EST_CAPABILITY_SMP_MSR; | ||
378 | |||
379 | p.pdc = &arg_list; | ||
380 | |||
381 | /* register with ACPI core */ | 369 | /* register with ACPI core */ |
382 | if (acpi_processor_register_performance(&p, cpu)) { | 370 | if (acpi_processor_register_performance(&p, cpu)) { |
383 | dprintk(KERN_INFO PFX "obtaining ACPI data failed\n"); | 371 | dprintk(KERN_INFO PFX "obtaining ACPI data failed\n"); |
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c index fbfd374aa336..af591c73345f 100644 --- a/arch/i386/kernel/cpu/intel_cacheinfo.c +++ b/arch/i386/kernel/cpu/intel_cacheinfo.c | |||
@@ -43,13 +43,23 @@ static struct _cache_table cache_table[] __cpuinitdata = | |||
43 | { 0x2c, LVL_1_DATA, 32 }, /* 8-way set assoc, 64 byte line size */ | 43 | { 0x2c, LVL_1_DATA, 32 }, /* 8-way set assoc, 64 byte line size */ |
44 | { 0x30, LVL_1_INST, 32 }, /* 8-way set assoc, 64 byte line size */ | 44 | { 0x30, LVL_1_INST, 32 }, /* 8-way set assoc, 64 byte line size */ |
45 | { 0x39, LVL_2, 128 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | 45 | { 0x39, LVL_2, 128 }, /* 4-way set assoc, sectored cache, 64 byte line size */ |
46 | { 0x3a, LVL_2, 192 }, /* 6-way set assoc, sectored cache, 64 byte line size */ | ||
46 | { 0x3b, LVL_2, 128 }, /* 2-way set assoc, sectored cache, 64 byte line size */ | 47 | { 0x3b, LVL_2, 128 }, /* 2-way set assoc, sectored cache, 64 byte line size */ |
47 | { 0x3c, LVL_2, 256 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | 48 | { 0x3c, LVL_2, 256 }, /* 4-way set assoc, sectored cache, 64 byte line size */ |
49 | { 0x3d, LVL_2, 384 }, /* 6-way set assoc, sectored cache, 64 byte line size */ | ||
50 | { 0x3e, LVL_2, 512 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | ||
48 | { 0x41, LVL_2, 128 }, /* 4-way set assoc, 32 byte line size */ | 51 | { 0x41, LVL_2, 128 }, /* 4-way set assoc, 32 byte line size */ |
49 | { 0x42, LVL_2, 256 }, /* 4-way set assoc, 32 byte line size */ | 52 | { 0x42, LVL_2, 256 }, /* 4-way set assoc, 32 byte line size */ |
50 | { 0x43, LVL_2, 512 }, /* 4-way set assoc, 32 byte line size */ | 53 | { 0x43, LVL_2, 512 }, /* 4-way set assoc, 32 byte line size */ |
51 | { 0x44, LVL_2, 1024 }, /* 4-way set assoc, 32 byte line size */ | 54 | { 0x44, LVL_2, 1024 }, /* 4-way set assoc, 32 byte line size */ |
52 | { 0x45, LVL_2, 2048 }, /* 4-way set assoc, 32 byte line size */ | 55 | { 0x45, LVL_2, 2048 }, /* 4-way set assoc, 32 byte line size */ |
56 | { 0x46, LVL_3, 4096 }, /* 4-way set assoc, 64 byte line size */ | ||
57 | { 0x47, LVL_3, 8192 }, /* 8-way set assoc, 64 byte line size */ | ||
58 | { 0x49, LVL_3, 4096 }, /* 16-way set assoc, 64 byte line size */ | ||
59 | { 0x4a, LVL_3, 6144 }, /* 12-way set assoc, 64 byte line size */ | ||
60 | { 0x4b, LVL_3, 8192 }, /* 16-way set assoc, 64 byte line size */ | ||
61 | { 0x4c, LVL_3, 12288 }, /* 12-way set assoc, 64 byte line size */ | ||
62 | { 0x4d, LVL_3, 16384 }, /* 16-way set assoc, 64 byte line size */ | ||
53 | { 0x60, LVL_1_DATA, 16 }, /* 8-way set assoc, sectored cache, 64 byte line size */ | 63 | { 0x60, LVL_1_DATA, 16 }, /* 8-way set assoc, sectored cache, 64 byte line size */ |
54 | { 0x66, LVL_1_DATA, 8 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | 64 | { 0x66, LVL_1_DATA, 8 }, /* 4-way set assoc, sectored cache, 64 byte line size */ |
55 | { 0x67, LVL_1_DATA, 16 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | 65 | { 0x67, LVL_1_DATA, 16 }, /* 4-way set assoc, sectored cache, 64 byte line size */ |
@@ -57,6 +67,7 @@ static struct _cache_table cache_table[] __cpuinitdata = | |||
57 | { 0x70, LVL_TRACE, 12 }, /* 8-way set assoc */ | 67 | { 0x70, LVL_TRACE, 12 }, /* 8-way set assoc */ |
58 | { 0x71, LVL_TRACE, 16 }, /* 8-way set assoc */ | 68 | { 0x71, LVL_TRACE, 16 }, /* 8-way set assoc */ |
59 | { 0x72, LVL_TRACE, 32 }, /* 8-way set assoc */ | 69 | { 0x72, LVL_TRACE, 32 }, /* 8-way set assoc */ |
70 | { 0x73, LVL_TRACE, 64 }, /* 8-way set assoc */ | ||
60 | { 0x78, LVL_2, 1024 }, /* 4-way set assoc, 64 byte line size */ | 71 | { 0x78, LVL_2, 1024 }, /* 4-way set assoc, 64 byte line size */ |
61 | { 0x79, LVL_2, 128 }, /* 8-way set assoc, sectored cache, 64 byte line size */ | 72 | { 0x79, LVL_2, 128 }, /* 8-way set assoc, sectored cache, 64 byte line size */ |
62 | { 0x7a, LVL_2, 256 }, /* 8-way set assoc, sectored cache, 64 byte line size */ | 73 | { 0x7a, LVL_2, 256 }, /* 8-way set assoc, sectored cache, 64 byte line size */ |
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c index 1e9db198c440..3b4618bed70d 100644 --- a/arch/i386/kernel/cpu/mtrr/main.c +++ b/arch/i386/kernel/cpu/mtrr/main.c | |||
@@ -44,12 +44,10 @@ | |||
44 | #include <asm/msr.h> | 44 | #include <asm/msr.h> |
45 | #include "mtrr.h" | 45 | #include "mtrr.h" |
46 | 46 | ||
47 | #define MTRR_VERSION "2.0 (20020519)" | ||
48 | |||
49 | u32 num_var_ranges = 0; | 47 | u32 num_var_ranges = 0; |
50 | 48 | ||
51 | unsigned int *usage_table; | 49 | unsigned int *usage_table; |
52 | static DECLARE_MUTEX(main_lock); | 50 | static DECLARE_MUTEX(mtrr_sem); |
53 | 51 | ||
54 | u32 size_or_mask, size_and_mask; | 52 | u32 size_or_mask, size_and_mask; |
55 | 53 | ||
@@ -335,7 +333,7 @@ int mtrr_add_page(unsigned long base, unsigned long size, | |||
335 | /* No CPU hotplug when we change MTRR entries */ | 333 | /* No CPU hotplug when we change MTRR entries */ |
336 | lock_cpu_hotplug(); | 334 | lock_cpu_hotplug(); |
337 | /* Search for existing MTRR */ | 335 | /* Search for existing MTRR */ |
338 | down(&main_lock); | 336 | down(&mtrr_sem); |
339 | for (i = 0; i < num_var_ranges; ++i) { | 337 | for (i = 0; i < num_var_ranges; ++i) { |
340 | mtrr_if->get(i, &lbase, &lsize, <ype); | 338 | mtrr_if->get(i, &lbase, &lsize, <ype); |
341 | if (base >= lbase + lsize) | 339 | if (base >= lbase + lsize) |
@@ -373,7 +371,7 @@ int mtrr_add_page(unsigned long base, unsigned long size, | |||
373 | printk(KERN_INFO "mtrr: no more MTRRs available\n"); | 371 | printk(KERN_INFO "mtrr: no more MTRRs available\n"); |
374 | error = i; | 372 | error = i; |
375 | out: | 373 | out: |
376 | up(&main_lock); | 374 | up(&mtrr_sem); |
377 | unlock_cpu_hotplug(); | 375 | unlock_cpu_hotplug(); |
378 | return error; | 376 | return error; |
379 | } | 377 | } |
@@ -466,7 +464,7 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size) | |||
466 | max = num_var_ranges; | 464 | max = num_var_ranges; |
467 | /* No CPU hotplug when we change MTRR entries */ | 465 | /* No CPU hotplug when we change MTRR entries */ |
468 | lock_cpu_hotplug(); | 466 | lock_cpu_hotplug(); |
469 | down(&main_lock); | 467 | down(&mtrr_sem); |
470 | if (reg < 0) { | 468 | if (reg < 0) { |
471 | /* Search for existing MTRR */ | 469 | /* Search for existing MTRR */ |
472 | for (i = 0; i < max; ++i) { | 470 | for (i = 0; i < max; ++i) { |
@@ -505,7 +503,7 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size) | |||
505 | set_mtrr(reg, 0, 0, 0); | 503 | set_mtrr(reg, 0, 0, 0); |
506 | error = reg; | 504 | error = reg; |
507 | out: | 505 | out: |
508 | up(&main_lock); | 506 | up(&mtrr_sem); |
509 | unlock_cpu_hotplug(); | 507 | unlock_cpu_hotplug(); |
510 | return error; | 508 | return error; |
511 | } | 509 | } |
@@ -671,7 +669,6 @@ void __init mtrr_bp_init(void) | |||
671 | break; | 669 | break; |
672 | } | 670 | } |
673 | } | 671 | } |
674 | printk(KERN_INFO "mtrr: v%s\n",MTRR_VERSION); | ||
675 | 672 | ||
676 | if (mtrr_if) { | 673 | if (mtrr_if) { |
677 | set_num_var_ranges(); | 674 | set_num_var_ranges(); |
@@ -688,7 +685,7 @@ void mtrr_ap_init(void) | |||
688 | if (!mtrr_if || !use_intel()) | 685 | if (!mtrr_if || !use_intel()) |
689 | return; | 686 | return; |
690 | /* | 687 | /* |
691 | * Ideally we should hold main_lock here to avoid mtrr entries changed, | 688 | * Ideally we should hold mtrr_sem here to avoid mtrr entries changed, |
692 | * but this routine will be called in cpu boot time, holding the lock | 689 | * but this routine will be called in cpu boot time, holding the lock |
693 | * breaks it. This routine is called in two cases: 1.very earily time | 690 | * breaks it. This routine is called in two cases: 1.very earily time |
694 | * of software resume, when there absolutely isn't mtrr entry changes; | 691 | * of software resume, when there absolutely isn't mtrr entry changes; |
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 91a64016956e..0102f3d50e57 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -1080,7 +1080,7 @@ void __init mp_config_acpi_legacy_irqs (void) | |||
1080 | 1080 | ||
1081 | #define MAX_GSI_NUM 4096 | 1081 | #define MAX_GSI_NUM 4096 |
1082 | 1082 | ||
1083 | int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) | 1083 | int mp_register_gsi (u32 gsi, int triggering, int polarity) |
1084 | { | 1084 | { |
1085 | int ioapic = -1; | 1085 | int ioapic = -1; |
1086 | int ioapic_pin = 0; | 1086 | int ioapic_pin = 0; |
@@ -1129,7 +1129,7 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) | |||
1129 | 1129 | ||
1130 | mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit); | 1130 | mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit); |
1131 | 1131 | ||
1132 | if (edge_level) { | 1132 | if (triggering == ACPI_LEVEL_SENSITIVE) { |
1133 | /* | 1133 | /* |
1134 | * For PCI devices assign IRQs in order, avoiding gaps | 1134 | * For PCI devices assign IRQs in order, avoiding gaps |
1135 | * due to unused I/O APIC pins. | 1135 | * due to unused I/O APIC pins. |
@@ -1151,8 +1151,8 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) | |||
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, | 1153 | io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, |
1154 | edge_level == ACPI_EDGE_SENSITIVE ? 0 : 1, | 1154 | triggering == ACPI_EDGE_SENSITIVE ? 0 : 1, |
1155 | active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1); | 1155 | polarity == ACPI_ACTIVE_HIGH ? 0 : 1); |
1156 | return gsi; | 1156 | return gsi; |
1157 | } | 1157 | } |
1158 | 1158 | ||
diff --git a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c index 47675bbbb316..7c86e3c5f1c1 100644 --- a/arch/i386/kernel/timers/timer_tsc.c +++ b/arch/i386/kernel/timers/timer_tsc.c | |||
@@ -45,6 +45,15 @@ static unsigned long last_tsc_high; /* msb 32 bits of Time Stamp Counter */ | |||
45 | static unsigned long long monotonic_base; | 45 | static unsigned long long monotonic_base; |
46 | static seqlock_t monotonic_lock = SEQLOCK_UNLOCKED; | 46 | static seqlock_t monotonic_lock = SEQLOCK_UNLOCKED; |
47 | 47 | ||
48 | /* Avoid compensating for lost ticks before TSCs are synched */ | ||
49 | static int detect_lost_ticks; | ||
50 | static int __init start_lost_tick_compensation(void) | ||
51 | { | ||
52 | detect_lost_ticks = 1; | ||
53 | return 0; | ||
54 | } | ||
55 | late_initcall(start_lost_tick_compensation); | ||
56 | |||
48 | /* convert from cycles(64bits) => nanoseconds (64bits) | 57 | /* convert from cycles(64bits) => nanoseconds (64bits) |
49 | * basic equation: | 58 | * basic equation: |
50 | * ns = cycles / (freq / ns_per_sec) | 59 | * ns = cycles / (freq / ns_per_sec) |
@@ -196,7 +205,8 @@ static void mark_offset_tsc_hpet(void) | |||
196 | 205 | ||
197 | /* lost tick compensation */ | 206 | /* lost tick compensation */ |
198 | offset = hpet_readl(HPET_T0_CMP) - hpet_tick; | 207 | offset = hpet_readl(HPET_T0_CMP) - hpet_tick; |
199 | if (unlikely(((offset - hpet_last) > hpet_tick) && (hpet_last != 0))) { | 208 | if (unlikely(((offset - hpet_last) > hpet_tick) && (hpet_last != 0)) |
209 | && detect_lost_ticks) { | ||
200 | int lost_ticks = (offset - hpet_last) / hpet_tick; | 210 | int lost_ticks = (offset - hpet_last) / hpet_tick; |
201 | jiffies_64 += lost_ticks; | 211 | jiffies_64 += lost_ticks; |
202 | } | 212 | } |
@@ -421,7 +431,7 @@ static void mark_offset_tsc(void) | |||
421 | delta += delay_at_last_interrupt; | 431 | delta += delay_at_last_interrupt; |
422 | lost = delta/(1000000/HZ); | 432 | lost = delta/(1000000/HZ); |
423 | delay = delta%(1000000/HZ); | 433 | delay = delta%(1000000/HZ); |
424 | if (lost >= 2) { | 434 | if (lost >= 2 && detect_lost_ticks) { |
425 | jiffies_64 += lost-1; | 435 | jiffies_64 += lost-1; |
426 | 436 | ||
427 | /* sanity check to ensure we're not always losing ticks */ | 437 | /* sanity check to ensure we're not always losing ticks */ |
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c index e715aa930036..3ca59cad05f3 100644 --- a/arch/i386/pci/irq.c +++ b/arch/i386/pci/irq.c | |||
@@ -539,6 +539,11 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route | |||
539 | case PCI_DEVICE_ID_INTEL_ICH7_30: | 539 | case PCI_DEVICE_ID_INTEL_ICH7_30: |
540 | case PCI_DEVICE_ID_INTEL_ICH7_31: | 540 | case PCI_DEVICE_ID_INTEL_ICH7_31: |
541 | case PCI_DEVICE_ID_INTEL_ESB2_0: | 541 | case PCI_DEVICE_ID_INTEL_ESB2_0: |
542 | case PCI_DEVICE_ID_INTEL_ICH8_0: | ||
543 | case PCI_DEVICE_ID_INTEL_ICH8_1: | ||
544 | case PCI_DEVICE_ID_INTEL_ICH8_2: | ||
545 | case PCI_DEVICE_ID_INTEL_ICH8_3: | ||
546 | case PCI_DEVICE_ID_INTEL_ICH8_4: | ||
542 | r->name = "PIIX/ICH"; | 547 | r->name = "PIIX/ICH"; |
543 | r->get = pirq_piix_get; | 548 | r->get = pirq_piix_get; |
544 | r->set = pirq_piix_set; | 549 | r->set = pirq_piix_set; |
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c index 4bb4d4b0f73a..0ee8a983708c 100644 --- a/arch/i386/pci/mmconfig.c +++ b/arch/i386/pci/mmconfig.c | |||
@@ -36,8 +36,7 @@ static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn) | |||
36 | while (1) { | 36 | while (1) { |
37 | ++cfg_num; | 37 | ++cfg_num; |
38 | if (cfg_num >= pci_mmcfg_config_num) { | 38 | if (cfg_num >= pci_mmcfg_config_num) { |
39 | /* Not found - fallback to type 1 */ | 39 | break; |
40 | return 0; | ||
41 | } | 40 | } |
42 | cfg = &pci_mmcfg_config[cfg_num]; | 41 | cfg = &pci_mmcfg_config[cfg_num]; |
43 | if (cfg->pci_segment_group_number != seg) | 42 | if (cfg->pci_segment_group_number != seg) |
@@ -46,6 +45,18 @@ static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn) | |||
46 | (cfg->end_bus_number >= bus)) | 45 | (cfg->end_bus_number >= bus)) |
47 | return cfg->base_address; | 46 | return cfg->base_address; |
48 | } | 47 | } |
48 | |||
49 | /* Handle more broken MCFG tables on Asus etc. | ||
50 | They only contain a single entry for bus 0-0. Assume | ||
51 | this applies to all busses. */ | ||
52 | cfg = &pci_mmcfg_config[0]; | ||
53 | if (pci_mmcfg_config_num == 1 && | ||
54 | cfg->pci_segment_group_number == 0 && | ||
55 | (cfg->start_bus_number | cfg->end_bus_number) == 0) | ||
56 | return cfg->base_address; | ||
57 | |||
58 | /* Fall back to type 0 */ | ||
59 | return 0; | ||
49 | } | 60 | } |
50 | 61 | ||
51 | static inline void pci_exp_set_dev_base(unsigned int base, int bus, int devfn) | 62 | static inline void pci_exp_set_dev_base(unsigned int base, int bus, int devfn) |
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index 307514f7a282..09a0dbc17fb6 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile | |||
@@ -13,6 +13,11 @@ obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o | |||
13 | obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o | 13 | obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o |
14 | obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o | 14 | obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o |
15 | obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o | 15 | obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o |
16 | |||
17 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | ||
18 | obj-y += acpi-processor.o | ||
19 | endif | ||
20 | |||
16 | obj-$(CONFIG_IA64_PALINFO) += palinfo.o | 21 | obj-$(CONFIG_IA64_PALINFO) += palinfo.o |
17 | obj-$(CONFIG_IOSAPIC) += iosapic.o | 22 | obj-$(CONFIG_IOSAPIC) += iosapic.o |
18 | obj-$(CONFIG_MODULES) += module.o | 23 | obj-$(CONFIG_MODULES) += module.o |
diff --git a/arch/ia64/kernel/acpi-ext.c b/arch/ia64/kernel/acpi-ext.c index 13a5b3b49bf8..4a5574ff007b 100644 --- a/arch/ia64/kernel/acpi-ext.c +++ b/arch/ia64/kernel/acpi-ext.c | |||
@@ -33,33 +33,33 @@ acpi_vendor_resource_match(struct acpi_resource *resource, void *context) | |||
33 | struct acpi_vendor_info *info = (struct acpi_vendor_info *)context; | 33 | struct acpi_vendor_info *info = (struct acpi_vendor_info *)context; |
34 | struct acpi_resource_vendor *vendor; | 34 | struct acpi_resource_vendor *vendor; |
35 | struct acpi_vendor_descriptor *descriptor; | 35 | struct acpi_vendor_descriptor *descriptor; |
36 | u32 length; | 36 | u32 byte_length; |
37 | 37 | ||
38 | if (resource->id != ACPI_RSTYPE_VENDOR) | 38 | if (resource->type != ACPI_RESOURCE_TYPE_VENDOR) |
39 | return AE_OK; | 39 | return AE_OK; |
40 | 40 | ||
41 | vendor = (struct acpi_resource_vendor *)&resource->data; | 41 | vendor = (struct acpi_resource_vendor *)&resource->data; |
42 | descriptor = (struct acpi_vendor_descriptor *)vendor->reserved; | 42 | descriptor = (struct acpi_vendor_descriptor *)vendor->byte_data; |
43 | if (vendor->length <= sizeof(*info->descriptor) || | 43 | if (vendor->byte_length <= sizeof(*info->descriptor) || |
44 | descriptor->guid_id != info->descriptor->guid_id || | 44 | descriptor->guid_id != info->descriptor->guid_id || |
45 | efi_guidcmp(descriptor->guid, info->descriptor->guid)) | 45 | efi_guidcmp(descriptor->guid, info->descriptor->guid)) |
46 | return AE_OK; | 46 | return AE_OK; |
47 | 47 | ||
48 | length = vendor->length - sizeof(struct acpi_vendor_descriptor); | 48 | byte_length = vendor->byte_length - sizeof(struct acpi_vendor_descriptor); |
49 | info->data = acpi_os_allocate(length); | 49 | info->data = acpi_os_allocate(byte_length); |
50 | if (!info->data) | 50 | if (!info->data) |
51 | return AE_NO_MEMORY; | 51 | return AE_NO_MEMORY; |
52 | 52 | ||
53 | memcpy(info->data, | 53 | memcpy(info->data, |
54 | vendor->reserved + sizeof(struct acpi_vendor_descriptor), | 54 | vendor->byte_data + sizeof(struct acpi_vendor_descriptor), |
55 | length); | 55 | byte_length); |
56 | info->length = length; | 56 | info->length = byte_length; |
57 | return AE_CTRL_TERMINATE; | 57 | return AE_CTRL_TERMINATE; |
58 | } | 58 | } |
59 | 59 | ||
60 | acpi_status | 60 | acpi_status |
61 | acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor * id, | 61 | acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor * id, |
62 | u8 ** data, u32 * length) | 62 | u8 ** data, u32 * byte_length) |
63 | { | 63 | { |
64 | struct acpi_vendor_info info; | 64 | struct acpi_vendor_info info; |
65 | 65 | ||
@@ -72,7 +72,7 @@ acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor * id, | |||
72 | return AE_NOT_FOUND; | 72 | return AE_NOT_FOUND; |
73 | 73 | ||
74 | *data = info.data; | 74 | *data = info.data; |
75 | *length = info.length; | 75 | *byte_length = info.length; |
76 | return AE_OK; | 76 | return AE_OK; |
77 | } | 77 | } |
78 | 78 | ||
diff --git a/arch/ia64/kernel/acpi-processor.c b/arch/ia64/kernel/acpi-processor.c new file mode 100644 index 000000000000..e683630c8ce2 --- /dev/null +++ b/arch/ia64/kernel/acpi-processor.c | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * arch/ia64/kernel/cpufreq/processor.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Intel Corporation | ||
5 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | ||
6 | * - Added _PDC for platforms with Intel CPUs | ||
7 | */ | ||
8 | |||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/module.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/acpi.h> | ||
13 | |||
14 | #include <acpi/processor.h> | ||
15 | #include <asm/acpi.h> | ||
16 | |||
17 | static void init_intel_pdc(struct acpi_processor *pr) | ||
18 | { | ||
19 | struct acpi_object_list *obj_list; | ||
20 | union acpi_object *obj; | ||
21 | u32 *buf; | ||
22 | |||
23 | /* allocate and initialize pdc. It will be used later. */ | ||
24 | obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); | ||
25 | if (!obj_list) { | ||
26 | printk(KERN_ERR "Memory allocation error\n"); | ||
27 | return; | ||
28 | } | ||
29 | |||
30 | obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); | ||
31 | if (!obj) { | ||
32 | printk(KERN_ERR "Memory allocation error\n"); | ||
33 | kfree(obj_list); | ||
34 | return; | ||
35 | } | ||
36 | |||
37 | buf = kmalloc(12, GFP_KERNEL); | ||
38 | if (!buf) { | ||
39 | printk(KERN_ERR "Memory allocation error\n"); | ||
40 | kfree(obj); | ||
41 | kfree(obj_list); | ||
42 | return; | ||
43 | } | ||
44 | |||
45 | buf[0] = ACPI_PDC_REVISION_ID; | ||
46 | buf[1] = 1; | ||
47 | buf[2] |= ACPI_PDC_EST_CAPABILITY_SMP; | ||
48 | |||
49 | obj->type = ACPI_TYPE_BUFFER; | ||
50 | obj->buffer.length = 12; | ||
51 | obj->buffer.pointer = (u8 *) buf; | ||
52 | obj_list->count = 1; | ||
53 | obj_list->pointer = obj; | ||
54 | pr->pdc = obj_list; | ||
55 | |||
56 | return; | ||
57 | } | ||
58 | |||
59 | /* Initialize _PDC data based on the CPU vendor */ | ||
60 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr) | ||
61 | { | ||
62 | pr->pdc = NULL; | ||
63 | init_intel_pdc(pr); | ||
64 | return; | ||
65 | } | ||
66 | |||
67 | EXPORT_SYMBOL(arch_acpi_processor_init_pdc); | ||
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 9ad94ddf6687..d2702c419cf8 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -567,16 +567,16 @@ void __init acpi_numa_arch_fixup(void) | |||
567 | * success: return IRQ number (>=0) | 567 | * success: return IRQ number (>=0) |
568 | * failure: return < 0 | 568 | * failure: return < 0 |
569 | */ | 569 | */ |
570 | int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) | 570 | int acpi_register_gsi(u32 gsi, int triggering, int polarity) |
571 | { | 571 | { |
572 | if (has_8259 && gsi < 16) | 572 | if (has_8259 && gsi < 16) |
573 | return isa_irq_to_vector(gsi); | 573 | return isa_irq_to_vector(gsi); |
574 | 574 | ||
575 | return iosapic_register_intr(gsi, | 575 | return iosapic_register_intr(gsi, |
576 | (active_high_low == | 576 | (polarity == |
577 | ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : | 577 | ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : |
578 | IOSAPIC_POL_LOW, | 578 | IOSAPIC_POL_LOW, |
579 | (edge_level == | 579 | (triggering == |
580 | ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : | 580 | ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : |
581 | IOSAPIC_LEVEL); | 581 | IOSAPIC_LEVEL); |
582 | } | 582 | } |
diff --git a/arch/ia64/kernel/cpufreq/Makefile b/arch/ia64/kernel/cpufreq/Makefile index f748d34c02f0..4838f2a57c7a 100644 --- a/arch/ia64/kernel/cpufreq/Makefile +++ b/arch/ia64/kernel/cpufreq/Makefile | |||
@@ -1 +1,2 @@ | |||
1 | obj-$(CONFIG_IA64_ACPI_CPUFREQ) += acpi-cpufreq.o | 1 | obj-$(CONFIG_IA64_ACPI_CPUFREQ) += acpi-cpufreq.o |
2 | |||
diff --git a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c index da4d5cf80a48..5a1bf815282d 100644 --- a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c +++ b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c | |||
@@ -269,48 +269,6 @@ acpi_cpufreq_verify ( | |||
269 | } | 269 | } |
270 | 270 | ||
271 | 271 | ||
272 | /* | ||
273 | * processor_init_pdc - let BIOS know about the SMP capabilities | ||
274 | * of this driver | ||
275 | * @perf: processor-specific acpi_io_data struct | ||
276 | * @cpu: CPU being initialized | ||
277 | * | ||
278 | * To avoid issues with legacy OSes, some BIOSes require to be informed of | ||
279 | * the SMP capabilities of OS P-state driver. Here we set the bits in _PDC | ||
280 | * accordingly. Actual call to _PDC is done in driver/acpi/processor.c | ||
281 | */ | ||
282 | static void | ||
283 | processor_init_pdc ( | ||
284 | struct acpi_processor_performance *perf, | ||
285 | unsigned int cpu, | ||
286 | struct acpi_object_list *obj_list | ||
287 | ) | ||
288 | { | ||
289 | union acpi_object *obj; | ||
290 | u32 *buf; | ||
291 | |||
292 | dprintk("processor_init_pdc\n"); | ||
293 | |||
294 | perf->pdc = NULL; | ||
295 | /* Initialize pdc. It will be used later. */ | ||
296 | if (!obj_list) | ||
297 | return; | ||
298 | |||
299 | if (!(obj_list->count && obj_list->pointer)) | ||
300 | return; | ||
301 | |||
302 | obj = obj_list->pointer; | ||
303 | if ((obj->buffer.length == 12) && obj->buffer.pointer) { | ||
304 | buf = (u32 *)obj->buffer.pointer; | ||
305 | buf[0] = ACPI_PDC_REVISION_ID; | ||
306 | buf[1] = 1; | ||
307 | buf[2] = ACPI_PDC_EST_CAPABILITY_SMP; | ||
308 | perf->pdc = obj_list; | ||
309 | } | ||
310 | return; | ||
311 | } | ||
312 | |||
313 | |||
314 | static int | 272 | static int |
315 | acpi_cpufreq_cpu_init ( | 273 | acpi_cpufreq_cpu_init ( |
316 | struct cpufreq_policy *policy) | 274 | struct cpufreq_policy *policy) |
@@ -320,14 +278,7 @@ acpi_cpufreq_cpu_init ( | |||
320 | struct cpufreq_acpi_io *data; | 278 | struct cpufreq_acpi_io *data; |
321 | unsigned int result = 0; | 279 | unsigned int result = 0; |
322 | 280 | ||
323 | union acpi_object arg0 = {ACPI_TYPE_BUFFER}; | ||
324 | u32 arg0_buf[3]; | ||
325 | struct acpi_object_list arg_list = {1, &arg0}; | ||
326 | |||
327 | dprintk("acpi_cpufreq_cpu_init\n"); | 281 | dprintk("acpi_cpufreq_cpu_init\n"); |
328 | /* setup arg_list for _PDC settings */ | ||
329 | arg0.buffer.length = 12; | ||
330 | arg0.buffer.pointer = (u8 *) arg0_buf; | ||
331 | 282 | ||
332 | data = kmalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); | 283 | data = kmalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); |
333 | if (!data) | 284 | if (!data) |
@@ -337,9 +288,7 @@ acpi_cpufreq_cpu_init ( | |||
337 | 288 | ||
338 | acpi_io_data[cpu] = data; | 289 | acpi_io_data[cpu] = data; |
339 | 290 | ||
340 | processor_init_pdc(&data->acpi_data, cpu, &arg_list); | ||
341 | result = acpi_processor_register_performance(&data->acpi_data, cpu); | 291 | result = acpi_processor_register_performance(&data->acpi_data, cpu); |
342 | data->acpi_data.pdc = NULL; | ||
343 | 292 | ||
344 | if (result) | 293 | if (result) |
345 | goto err_free; | 294 | goto err_free; |
diff --git a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S index 403a80a58c13..60a464bfd9e2 100644 --- a/arch/ia64/kernel/mca_asm.S +++ b/arch/ia64/kernel/mca_asm.S | |||
@@ -512,7 +512,7 @@ ia64_state_save: | |||
512 | st8 [temp1]=r12 // os_status, default is cold boot | 512 | st8 [temp1]=r12 // os_status, default is cold boot |
513 | mov r6=IA64_MCA_SAME_CONTEXT | 513 | mov r6=IA64_MCA_SAME_CONTEXT |
514 | ;; | 514 | ;; |
515 | st8 [temp1]=r6 // context, default is same context | 515 | st8 [temp2]=r6 // context, default is same context |
516 | 516 | ||
517 | // Save the pt_regs data that is not in minstate. The previous code | 517 | // Save the pt_regs data that is not in minstate. The previous code |
518 | // left regs at sos. | 518 | // left regs at sos. |
diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c index 43b45b65ee5a..f9e0ae936d1a 100644 --- a/arch/ia64/kernel/unaligned.c +++ b/arch/ia64/kernel/unaligned.c | |||
@@ -1283,8 +1283,9 @@ within_logging_rate_limit (void) | |||
1283 | 1283 | ||
1284 | if (jiffies - last_time > 5*HZ) | 1284 | if (jiffies - last_time > 5*HZ) |
1285 | count = 0; | 1285 | count = 0; |
1286 | if (++count < 5) { | 1286 | if (count < 5) { |
1287 | last_time = jiffies; | 1287 | last_time = jiffies; |
1288 | count++; | ||
1288 | return 1; | 1289 | return 1; |
1289 | } | 1290 | } |
1290 | return 0; | 1291 | return 0; |
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index d27ecdcb6fca..0b30ca006286 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
@@ -193,12 +193,12 @@ add_io_space (struct pci_root_info *info, struct acpi_resource_address64 *addr) | |||
193 | goto free_resource; | 193 | goto free_resource; |
194 | } | 194 | } |
195 | 195 | ||
196 | min = addr->min_address_range; | 196 | min = addr->minimum; |
197 | max = min + addr->address_length - 1; | 197 | max = min + addr->address_length - 1; |
198 | if (addr->attribute.io.translation_attribute == ACPI_SPARSE_TRANSLATION) | 198 | if (addr->info.io.translation_type == ACPI_SPARSE_TRANSLATION) |
199 | sparse = 1; | 199 | sparse = 1; |
200 | 200 | ||
201 | space_nr = new_space(addr->address_translation_offset, sparse); | 201 | space_nr = new_space(addr->translation_offset, sparse); |
202 | if (space_nr == ~0) | 202 | if (space_nr == ~0) |
203 | goto free_name; | 203 | goto free_name; |
204 | 204 | ||
@@ -285,7 +285,7 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data) | |||
285 | if (addr.resource_type == ACPI_MEMORY_RANGE) { | 285 | if (addr.resource_type == ACPI_MEMORY_RANGE) { |
286 | flags = IORESOURCE_MEM; | 286 | flags = IORESOURCE_MEM; |
287 | root = &iomem_resource; | 287 | root = &iomem_resource; |
288 | offset = addr.address_translation_offset; | 288 | offset = addr.translation_offset; |
289 | } else if (addr.resource_type == ACPI_IO_RANGE) { | 289 | } else if (addr.resource_type == ACPI_IO_RANGE) { |
290 | flags = IORESOURCE_IO; | 290 | flags = IORESOURCE_IO; |
291 | root = &ioport_resource; | 291 | root = &ioport_resource; |
@@ -298,7 +298,7 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data) | |||
298 | window = &info->controller->window[info->controller->windows++]; | 298 | window = &info->controller->window[info->controller->windows++]; |
299 | window->resource.name = info->name; | 299 | window->resource.name = info->name; |
300 | window->resource.flags = flags; | 300 | window->resource.flags = flags; |
301 | window->resource.start = addr.min_address_range + offset; | 301 | window->resource.start = addr.minimum + offset; |
302 | window->resource.end = window->resource.start + addr.address_length - 1; | 302 | window->resource.end = window->resource.start + addr.address_length - 1; |
303 | window->resource.child = NULL; | 303 | window->resource.child = NULL; |
304 | window->offset = offset; | 304 | window->offset = offset; |
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 00700f7e6837..a4c78152b336 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/nodemask.h> | 10 | #include <linux/nodemask.h> |
11 | #include <asm/sn/types.h> | 11 | #include <asm/sn/types.h> |
12 | #include <asm/sn/addrs.h> | 12 | #include <asm/sn/addrs.h> |
13 | #include <asm/sn/sn_feature_sets.h> | ||
13 | #include <asm/sn/geo.h> | 14 | #include <asm/sn/geo.h> |
14 | #include <asm/sn/io.h> | 15 | #include <asm/sn/io.h> |
15 | #include <asm/sn/pcibr_provider.h> | 16 | #include <asm/sn/pcibr_provider.h> |
@@ -173,8 +174,8 @@ sn_pcidev_info_get(struct pci_dev *dev) | |||
173 | */ | 174 | */ |
174 | static u8 war_implemented = 0; | 175 | static u8 war_implemented = 0; |
175 | 176 | ||
176 | static void sn_device_fixup_war(u64 nasid, u64 widget, int device, | 177 | static s64 sn_device_fixup_war(u64 nasid, u64 widget, int device, |
177 | struct sn_flush_device_common *common) | 178 | struct sn_flush_device_common *common) |
178 | { | 179 | { |
179 | struct sn_flush_device_war *war_list; | 180 | struct sn_flush_device_war *war_list; |
180 | struct sn_flush_device_war *dev_entry; | 181 | struct sn_flush_device_war *dev_entry; |
@@ -198,8 +199,9 @@ static void sn_device_fixup_war(u64 nasid, u64 widget, int device, | |||
198 | 199 | ||
199 | dev_entry = war_list + device; | 200 | dev_entry = war_list + device; |
200 | memcpy(common,dev_entry, sizeof(*common)); | 201 | memcpy(common,dev_entry, sizeof(*common)); |
201 | |||
202 | kfree(war_list); | 202 | kfree(war_list); |
203 | |||
204 | return isrv.status; | ||
203 | } | 205 | } |
204 | 206 | ||
205 | /* | 207 | /* |
@@ -279,23 +281,21 @@ static void sn_fixup_ionodes(void) | |||
279 | memset(dev_entry->common, 0x0, sizeof(struct | 281 | memset(dev_entry->common, 0x0, sizeof(struct |
280 | sn_flush_device_common)); | 282 | sn_flush_device_common)); |
281 | 283 | ||
282 | status = sal_get_device_dmaflush_list(nasid, | 284 | if (sn_prom_feature_available( |
283 | widget, | 285 | PRF_DEVICE_FLUSH_LIST)) |
284 | device, | 286 | status = sal_get_device_dmaflush_list( |
287 | nasid, | ||
288 | widget, | ||
289 | device, | ||
285 | (u64)(dev_entry->common)); | 290 | (u64)(dev_entry->common)); |
286 | if (status) { | 291 | else |
287 | if (sn_sal_rev() < 0x0450) { | 292 | status = sn_device_fixup_war(nasid, |
288 | /* shortlived WAR for older | 293 | widget, |
289 | * PROM images | 294 | device, |
290 | */ | ||
291 | sn_device_fixup_war(nasid, | ||
292 | widget, | ||
293 | device, | ||
294 | dev_entry->common); | 295 | dev_entry->common); |
295 | } | 296 | if (status != SALRET_OK) |
296 | else | 297 | panic("SAL call failed: %s\n", |
297 | BUG(); | 298 | ia64_sal_strerror(status)); |
298 | } | ||
299 | 299 | ||
300 | spin_lock_init(&dev_entry->sfdl_flush_lock); | 300 | spin_lock_init(&dev_entry->sfdl_flush_lock); |
301 | } | 301 | } |
diff --git a/arch/ia64/sn/kernel/xpc_channel.c b/arch/ia64/sn/kernel/xpc_channel.c index 8d950c778bb6..36e5437a0fb6 100644 --- a/arch/ia64/sn/kernel/xpc_channel.c +++ b/arch/ia64/sn/kernel/xpc_channel.c | |||
@@ -447,7 +447,7 @@ xpc_allocate_local_msgqueue(struct xpc_channel *ch) | |||
447 | 447 | ||
448 | nbytes = nentries * ch->msg_size; | 448 | nbytes = nentries * ch->msg_size; |
449 | ch->local_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, | 449 | ch->local_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, |
450 | (GFP_KERNEL | GFP_DMA), | 450 | GFP_KERNEL, |
451 | &ch->local_msgqueue_base); | 451 | &ch->local_msgqueue_base); |
452 | if (ch->local_msgqueue == NULL) { | 452 | if (ch->local_msgqueue == NULL) { |
453 | continue; | 453 | continue; |
@@ -455,7 +455,7 @@ xpc_allocate_local_msgqueue(struct xpc_channel *ch) | |||
455 | memset(ch->local_msgqueue, 0, nbytes); | 455 | memset(ch->local_msgqueue, 0, nbytes); |
456 | 456 | ||
457 | nbytes = nentries * sizeof(struct xpc_notify); | 457 | nbytes = nentries * sizeof(struct xpc_notify); |
458 | ch->notify_queue = kmalloc(nbytes, (GFP_KERNEL | GFP_DMA)); | 458 | ch->notify_queue = kmalloc(nbytes, GFP_KERNEL); |
459 | if (ch->notify_queue == NULL) { | 459 | if (ch->notify_queue == NULL) { |
460 | kfree(ch->local_msgqueue_base); | 460 | kfree(ch->local_msgqueue_base); |
461 | ch->local_msgqueue = NULL; | 461 | ch->local_msgqueue = NULL; |
@@ -502,7 +502,7 @@ xpc_allocate_remote_msgqueue(struct xpc_channel *ch) | |||
502 | 502 | ||
503 | nbytes = nentries * ch->msg_size; | 503 | nbytes = nentries * ch->msg_size; |
504 | ch->remote_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, | 504 | ch->remote_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, |
505 | (GFP_KERNEL | GFP_DMA), | 505 | GFP_KERNEL, |
506 | &ch->remote_msgqueue_base); | 506 | &ch->remote_msgqueue_base); |
507 | if (ch->remote_msgqueue == NULL) { | 507 | if (ch->remote_msgqueue == NULL) { |
508 | continue; | 508 | continue; |
diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c index 9bf9f23b9a1f..5a36292388eb 100644 --- a/arch/ia64/sn/pci/pci_dma.c +++ b/arch/ia64/sn/pci/pci_dma.c | |||
@@ -90,14 +90,14 @@ void *sn_dma_alloc_coherent(struct device *dev, size_t size, | |||
90 | */ | 90 | */ |
91 | node = pcibus_to_node(pdev->bus); | 91 | node = pcibus_to_node(pdev->bus); |
92 | if (likely(node >=0)) { | 92 | if (likely(node >=0)) { |
93 | struct page *p = alloc_pages_node(node, GFP_ATOMIC, get_order(size)); | 93 | struct page *p = alloc_pages_node(node, flags, get_order(size)); |
94 | 94 | ||
95 | if (likely(p)) | 95 | if (likely(p)) |
96 | cpuaddr = page_address(p); | 96 | cpuaddr = page_address(p); |
97 | else | 97 | else |
98 | return NULL; | 98 | return NULL; |
99 | } else | 99 | } else |
100 | cpuaddr = (void *)__get_free_pages(GFP_ATOMIC, get_order(size)); | 100 | cpuaddr = (void *)__get_free_pages(flags, get_order(size)); |
101 | 101 | ||
102 | if (unlikely(!cpuaddr)) | 102 | if (unlikely(!cpuaddr)) |
103 | return NULL; | 103 | return NULL; |
diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c index 96d18c43dca0..d4f88e0af24c 100644 --- a/arch/mips/kernel/gdb-stub.c +++ b/arch/mips/kernel/gdb-stub.c | |||
@@ -178,7 +178,7 @@ int kgdb_enabled; | |||
178 | */ | 178 | */ |
179 | static DEFINE_SPINLOCK(kgdb_lock); | 179 | static DEFINE_SPINLOCK(kgdb_lock); |
180 | static raw_spinlock_t kgdb_cpulock[NR_CPUS] = { | 180 | static raw_spinlock_t kgdb_cpulock[NR_CPUS] = { |
181 | [0 ... NR_CPUS-1] = __RAW_SPIN_LOCK_UNLOCKED; | 181 | [0 ... NR_CPUS-1] = __RAW_SPIN_LOCK_UNLOCKED, |
182 | }; | 182 | }; |
183 | 183 | ||
184 | /* | 184 | /* |
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index f970ace208d3..c7a799a09516 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c | |||
@@ -134,7 +134,6 @@ static int __init add_legacy_soc_port(struct device_node *np, | |||
134 | return add_legacy_port(np, -1, UPIO_MEM, addr, addr, NO_IRQ, flags); | 134 | return add_legacy_port(np, -1, UPIO_MEM, addr, addr, NO_IRQ, flags); |
135 | } | 135 | } |
136 | 136 | ||
137 | #ifdef CONFIG_ISA | ||
138 | static int __init add_legacy_isa_port(struct device_node *np, | 137 | static int __init add_legacy_isa_port(struct device_node *np, |
139 | struct device_node *isa_brg) | 138 | struct device_node *isa_brg) |
140 | { | 139 | { |
@@ -168,7 +167,6 @@ static int __init add_legacy_isa_port(struct device_node *np, | |||
168 | return add_legacy_port(np, index, UPIO_PORT, reg[1], taddr, NO_IRQ, UPF_BOOT_AUTOCONF); | 167 | return add_legacy_port(np, index, UPIO_PORT, reg[1], taddr, NO_IRQ, UPF_BOOT_AUTOCONF); |
169 | 168 | ||
170 | } | 169 | } |
171 | #endif | ||
172 | 170 | ||
173 | #ifdef CONFIG_PCI | 171 | #ifdef CONFIG_PCI |
174 | static int __init add_legacy_pci_port(struct device_node *np, | 172 | static int __init add_legacy_pci_port(struct device_node *np, |
@@ -276,7 +274,6 @@ void __init find_legacy_serial_ports(void) | |||
276 | of_node_put(soc); | 274 | of_node_put(soc); |
277 | } | 275 | } |
278 | 276 | ||
279 | #ifdef CONFIG_ISA | ||
280 | /* First fill our array with ISA ports */ | 277 | /* First fill our array with ISA ports */ |
281 | for (np = NULL; (np = of_find_node_by_type(np, "serial"));) { | 278 | for (np = NULL; (np = of_find_node_by_type(np, "serial"));) { |
282 | struct device_node *isa = of_get_parent(np); | 279 | struct device_node *isa = of_get_parent(np); |
@@ -287,7 +284,6 @@ void __init find_legacy_serial_ports(void) | |||
287 | } | 284 | } |
288 | of_node_put(isa); | 285 | of_node_put(isa); |
289 | } | 286 | } |
290 | #endif | ||
291 | 287 | ||
292 | #ifdef CONFIG_PCI | 288 | #ifdef CONFIG_PCI |
293 | /* Next, try to locate PCI ports */ | 289 | /* Next, try to locate PCI ports */ |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 3747ab0dac3f..c6d0595da6b5 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -254,11 +254,9 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs); | |||
254 | */ | 254 | */ |
255 | long sys_sigsuspend(old_sigset_t mask) | 255 | long sys_sigsuspend(old_sigset_t mask) |
256 | { | 256 | { |
257 | sigset_t saveset; | ||
258 | |||
259 | mask &= _BLOCKABLE; | 257 | mask &= _BLOCKABLE; |
260 | spin_lock_irq(¤t->sighand->siglock); | 258 | spin_lock_irq(¤t->sighand->siglock); |
261 | saveset = current->blocked; | 259 | current->saved_sigmask = current->blocked; |
262 | siginitset(¤t->blocked, mask); | 260 | siginitset(¤t->blocked, mask); |
263 | recalc_sigpending(); | 261 | recalc_sigpending(); |
264 | spin_unlock_irq(¤t->sighand->siglock); | 262 | spin_unlock_irq(¤t->sighand->siglock); |
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c index c32c623001dc..356a739e52b2 100644 --- a/arch/powerpc/platforms/powermac/pfunc_core.c +++ b/arch/powerpc/platforms/powermac/pfunc_core.c | |||
@@ -862,21 +862,28 @@ int pmf_register_irq_client(struct device_node *target, | |||
862 | spin_unlock_irqrestore(&pmf_lock, flags); | 862 | spin_unlock_irqrestore(&pmf_lock, flags); |
863 | return -ENODEV; | 863 | return -ENODEV; |
864 | } | 864 | } |
865 | if (list_empty(&func->irq_clients)) | ||
866 | func->dev->handlers->irq_enable(func); | ||
865 | list_add(&client->link, &func->irq_clients); | 867 | list_add(&client->link, &func->irq_clients); |
868 | client->func = func; | ||
866 | spin_unlock_irqrestore(&pmf_lock, flags); | 869 | spin_unlock_irqrestore(&pmf_lock, flags); |
867 | 870 | ||
868 | return 0; | 871 | return 0; |
869 | } | 872 | } |
870 | EXPORT_SYMBOL_GPL(pmf_register_irq_client); | 873 | EXPORT_SYMBOL_GPL(pmf_register_irq_client); |
871 | 874 | ||
872 | void pmf_unregister_irq_client(struct device_node *np, | 875 | void pmf_unregister_irq_client(struct pmf_irq_client *client) |
873 | const char *name, | ||
874 | struct pmf_irq_client *client) | ||
875 | { | 876 | { |
877 | struct pmf_function *func = client->func; | ||
876 | unsigned long flags; | 878 | unsigned long flags; |
877 | 879 | ||
880 | BUG_ON(func == NULL); | ||
881 | |||
878 | spin_lock_irqsave(&pmf_lock, flags); | 882 | spin_lock_irqsave(&pmf_lock, flags); |
883 | client->func = NULL; | ||
879 | list_del(&client->link); | 884 | list_del(&client->link); |
885 | if (list_empty(&func->irq_clients)) | ||
886 | func->dev->handlers->irq_disable(func); | ||
880 | spin_unlock_irqrestore(&pmf_lock, flags); | 887 | spin_unlock_irqrestore(&pmf_lock, flags); |
881 | } | 888 | } |
882 | EXPORT_SYMBOL_GPL(pmf_unregister_irq_client); | 889 | EXPORT_SYMBOL_GPL(pmf_unregister_irq_client); |
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index 21934784f936..bdaa8aabdaa6 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
@@ -58,6 +58,7 @@ pcibios_find_pci_bus(struct device_node *dn) | |||
58 | 58 | ||
59 | return find_bus_among_children(pdn->phb->bus, dn); | 59 | return find_bus_among_children(pdn->phb->bus, dn); |
60 | } | 60 | } |
61 | EXPORT_SYMBOL_GPL(pcibios_find_pci_bus); | ||
61 | 62 | ||
62 | /** | 63 | /** |
63 | * pcibios_remove_pci_devices - remove all devices under this bus | 64 | * pcibios_remove_pci_devices - remove all devices under this bus |
@@ -106,6 +107,7 @@ pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus) | |||
106 | } | 107 | } |
107 | } | 108 | } |
108 | } | 109 | } |
110 | EXPORT_SYMBOL_GPL(pcibios_fixup_new_pci_devices); | ||
109 | 111 | ||
110 | static int | 112 | static int |
111 | pcibios_pci_config_bridge(struct pci_dev *dev) | 113 | pcibios_pci_config_bridge(struct pci_dev *dev) |
@@ -172,3 +174,4 @@ pcibios_add_pci_devices(struct pci_bus * bus) | |||
172 | pcibios_pci_config_bridge(dev); | 174 | pcibios_pci_config_bridge(dev); |
173 | } | 175 | } |
174 | } | 176 | } |
177 | EXPORT_SYMBOL_GPL(pcibios_add_pci_devices); | ||
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c index 94ea346b7b4b..1f01b7e2376b 100644 --- a/arch/ppc/syslib/mv64x60.c +++ b/arch/ppc/syslib/mv64x60.c | |||
@@ -313,7 +313,7 @@ static struct platform_device mpsc1_device = { | |||
313 | }; | 313 | }; |
314 | #endif | 314 | #endif |
315 | 315 | ||
316 | #ifdef CONFIG_MV643XX_ETH | 316 | #if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) |
317 | static struct resource mv64x60_eth_shared_resources[] = { | 317 | static struct resource mv64x60_eth_shared_resources[] = { |
318 | [0] = { | 318 | [0] = { |
319 | .name = "ethernet shared base", | 319 | .name = "ethernet shared base", |
@@ -456,7 +456,7 @@ static struct platform_device *mv64x60_pd_devs[] __initdata = { | |||
456 | &mpsc0_device, | 456 | &mpsc0_device, |
457 | &mpsc1_device, | 457 | &mpsc1_device, |
458 | #endif | 458 | #endif |
459 | #ifdef CONFIG_MV643XX_ETH | 459 | #if defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) |
460 | &mv64x60_eth_shared_device, | 460 | &mv64x60_eth_shared_device, |
461 | #endif | 461 | #endif |
462 | #ifdef CONFIG_MV643XX_ETH_0 | 462 | #ifdef CONFIG_MV643XX_ETH_0 |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 7d23edc6facb..3525c91204d4 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,13 +1,12 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.15-rc2 | 3 | # Linux kernel version: 2.6.16-rc1 |
4 | # Mon Nov 21 13:51:30 2005 | 4 | # Thu Jan 19 10:58:53 2006 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 7 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
8 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 8 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
9 | CONFIG_S390=y | 9 | CONFIG_S390=y |
10 | CONFIG_UID16=y | ||
11 | 10 | ||
12 | # | 11 | # |
13 | # Code maturity level options | 12 | # Code maturity level options |
@@ -29,18 +28,20 @@ CONFIG_POSIX_MQUEUE=y | |||
29 | CONFIG_SYSCTL=y | 28 | CONFIG_SYSCTL=y |
30 | CONFIG_AUDIT=y | 29 | CONFIG_AUDIT=y |
31 | # CONFIG_AUDITSYSCALL is not set | 30 | # CONFIG_AUDITSYSCALL is not set |
32 | CONFIG_HOTPLUG=y | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | CONFIG_IKCONFIG=y | 31 | CONFIG_IKCONFIG=y |
35 | CONFIG_IKCONFIG_PROC=y | 32 | CONFIG_IKCONFIG_PROC=y |
36 | # CONFIG_CPUSETS is not set | 33 | # CONFIG_CPUSETS is not set |
37 | CONFIG_INITRAMFS_SOURCE="" | 34 | CONFIG_INITRAMFS_SOURCE="" |
35 | CONFIG_UID16=y | ||
36 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
38 | # CONFIG_EMBEDDED is not set | 37 | # CONFIG_EMBEDDED is not set |
39 | CONFIG_KALLSYMS=y | 38 | CONFIG_KALLSYMS=y |
40 | # CONFIG_KALLSYMS_ALL is not set | 39 | # CONFIG_KALLSYMS_ALL is not set |
41 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 40 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
41 | CONFIG_HOTPLUG=y | ||
42 | CONFIG_PRINTK=y | 42 | CONFIG_PRINTK=y |
43 | CONFIG_BUG=y | 43 | CONFIG_BUG=y |
44 | CONFIG_ELF_CORE=y | ||
44 | CONFIG_BASE_FULL=y | 45 | CONFIG_BASE_FULL=y |
45 | CONFIG_FUTEX=y | 46 | CONFIG_FUTEX=y |
46 | CONFIG_EPOLL=y | 47 | CONFIG_EPOLL=y |
@@ -49,8 +50,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0 | |||
49 | CONFIG_CC_ALIGN_LABELS=0 | 50 | CONFIG_CC_ALIGN_LABELS=0 |
50 | CONFIG_CC_ALIGN_LOOPS=0 | 51 | CONFIG_CC_ALIGN_LOOPS=0 |
51 | CONFIG_CC_ALIGN_JUMPS=0 | 52 | CONFIG_CC_ALIGN_JUMPS=0 |
53 | CONFIG_SLAB=y | ||
52 | # CONFIG_TINY_SHMEM is not set | 54 | # CONFIG_TINY_SHMEM is not set |
53 | CONFIG_BASE_SMALL=0 | 55 | CONFIG_BASE_SMALL=0 |
56 | # CONFIG_SLOB is not set | ||
54 | 57 | ||
55 | # | 58 | # |
56 | # Loadable module support | 59 | # Loadable module support |
@@ -76,11 +79,11 @@ CONFIG_IOSCHED_NOOP=y | |||
76 | CONFIG_IOSCHED_AS=y | 79 | CONFIG_IOSCHED_AS=y |
77 | CONFIG_IOSCHED_DEADLINE=y | 80 | CONFIG_IOSCHED_DEADLINE=y |
78 | CONFIG_IOSCHED_CFQ=y | 81 | CONFIG_IOSCHED_CFQ=y |
79 | CONFIG_DEFAULT_AS=y | 82 | # CONFIG_DEFAULT_AS is not set |
80 | # CONFIG_DEFAULT_DEADLINE is not set | 83 | CONFIG_DEFAULT_DEADLINE=y |
81 | # CONFIG_DEFAULT_CFQ is not set | 84 | # CONFIG_DEFAULT_CFQ is not set |
82 | # CONFIG_DEFAULT_NOOP is not set | 85 | # CONFIG_DEFAULT_NOOP is not set |
83 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 86 | CONFIG_DEFAULT_IOSCHED="deadline" |
84 | 87 | ||
85 | # | 88 | # |
86 | # Base setup | 89 | # Base setup |
@@ -193,6 +196,11 @@ CONFIG_IPV6=y | |||
193 | # SCTP Configuration (EXPERIMENTAL) | 196 | # SCTP Configuration (EXPERIMENTAL) |
194 | # | 197 | # |
195 | # CONFIG_IP_SCTP is not set | 198 | # CONFIG_IP_SCTP is not set |
199 | |||
200 | # | ||
201 | # TIPC Configuration (EXPERIMENTAL) | ||
202 | # | ||
203 | # CONFIG_TIPC is not set | ||
196 | # CONFIG_ATM is not set | 204 | # CONFIG_ATM is not set |
197 | # CONFIG_BRIDGE is not set | 205 | # CONFIG_BRIDGE is not set |
198 | # CONFIG_VLAN_8021Q is not set | 206 | # CONFIG_VLAN_8021Q is not set |
@@ -362,6 +370,7 @@ CONFIG_DM_MULTIPATH=y | |||
362 | # | 370 | # |
363 | CONFIG_UNIX98_PTYS=y | 371 | CONFIG_UNIX98_PTYS=y |
364 | CONFIG_UNIX98_PTY_COUNT=2048 | 372 | CONFIG_UNIX98_PTY_COUNT=2048 |
373 | # CONFIG_HANGCHECK_TIMER is not set | ||
365 | 374 | ||
366 | # | 375 | # |
367 | # Watchdog Cards | 376 | # Watchdog Cards |
@@ -488,6 +497,7 @@ CONFIG_FS_MBCACHE=y | |||
488 | # CONFIG_JFS_FS is not set | 497 | # CONFIG_JFS_FS is not set |
489 | # CONFIG_FS_POSIX_ACL is not set | 498 | # CONFIG_FS_POSIX_ACL is not set |
490 | # CONFIG_XFS_FS is not set | 499 | # CONFIG_XFS_FS is not set |
500 | # CONFIG_OCFS2_FS is not set | ||
491 | # CONFIG_MINIX_FS is not set | 501 | # CONFIG_MINIX_FS is not set |
492 | # CONFIG_ROMFS_FS is not set | 502 | # CONFIG_ROMFS_FS is not set |
493 | CONFIG_INOTIFY=y | 503 | CONFIG_INOTIFY=y |
@@ -520,6 +530,7 @@ CONFIG_TMPFS=y | |||
520 | # CONFIG_HUGETLB_PAGE is not set | 530 | # CONFIG_HUGETLB_PAGE is not set |
521 | CONFIG_RAMFS=y | 531 | CONFIG_RAMFS=y |
522 | # CONFIG_RELAYFS_FS is not set | 532 | # CONFIG_RELAYFS_FS is not set |
533 | # CONFIG_CONFIGFS_FS is not set | ||
523 | 534 | ||
524 | # | 535 | # |
525 | # Miscellaneous filesystems | 536 | # Miscellaneous filesystems |
@@ -584,6 +595,7 @@ CONFIG_MSDOS_PARTITION=y | |||
584 | # CONFIG_SGI_PARTITION is not set | 595 | # CONFIG_SGI_PARTITION is not set |
585 | # CONFIG_ULTRIX_PARTITION is not set | 596 | # CONFIG_ULTRIX_PARTITION is not set |
586 | # CONFIG_SUN_PARTITION is not set | 597 | # CONFIG_SUN_PARTITION is not set |
598 | # CONFIG_KARMA_PARTITION is not set | ||
587 | # CONFIG_EFI_PARTITION is not set | 599 | # CONFIG_EFI_PARTITION is not set |
588 | 600 | ||
589 | # | 601 | # |
@@ -592,7 +604,7 @@ CONFIG_MSDOS_PARTITION=y | |||
592 | # CONFIG_NLS is not set | 604 | # CONFIG_NLS is not set |
593 | 605 | ||
594 | # | 606 | # |
595 | # Profiling support | 607 | # Instrumentation Support |
596 | # | 608 | # |
597 | # CONFIG_PROFILING is not set | 609 | # CONFIG_PROFILING is not set |
598 | 610 | ||
@@ -600,19 +612,21 @@ CONFIG_MSDOS_PARTITION=y | |||
600 | # Kernel hacking | 612 | # Kernel hacking |
601 | # | 613 | # |
602 | # CONFIG_PRINTK_TIME is not set | 614 | # CONFIG_PRINTK_TIME is not set |
603 | CONFIG_DEBUG_KERNEL=y | ||
604 | CONFIG_MAGIC_SYSRQ=y | 615 | CONFIG_MAGIC_SYSRQ=y |
616 | CONFIG_DEBUG_KERNEL=y | ||
605 | CONFIG_LOG_BUF_SHIFT=17 | 617 | CONFIG_LOG_BUF_SHIFT=17 |
606 | CONFIG_DETECT_SOFTLOCKUP=y | 618 | # CONFIG_DETECT_SOFTLOCKUP is not set |
607 | # CONFIG_SCHEDSTATS is not set | 619 | # CONFIG_SCHEDSTATS is not set |
608 | # CONFIG_DEBUG_SLAB is not set | 620 | # CONFIG_DEBUG_SLAB is not set |
609 | CONFIG_DEBUG_PREEMPT=y | 621 | # CONFIG_DEBUG_PREEMPT is not set |
622 | CONFIG_DEBUG_MUTEXES=y | ||
610 | # CONFIG_DEBUG_SPINLOCK is not set | 623 | # CONFIG_DEBUG_SPINLOCK is not set |
611 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 624 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
612 | # CONFIG_DEBUG_KOBJECT is not set | 625 | # CONFIG_DEBUG_KOBJECT is not set |
613 | # CONFIG_DEBUG_INFO is not set | 626 | # CONFIG_DEBUG_INFO is not set |
614 | CONFIG_DEBUG_FS=y | 627 | # CONFIG_DEBUG_FS is not set |
615 | # CONFIG_DEBUG_VM is not set | 628 | # CONFIG_DEBUG_VM is not set |
629 | CONFIG_FORCED_INLINING=y | ||
616 | # CONFIG_RCU_TORTURE_TEST is not set | 630 | # CONFIG_RCU_TORTURE_TEST is not set |
617 | 631 | ||
618 | # | 632 | # |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index fa2b3bc22f20..ef706694a0c1 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -1,8 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/s390/kernel/signal32.c | 2 | * arch/s390/kernel/compat_signal.c |
3 | * | 3 | * |
4 | * S390 version | 4 | * Copyright (C) IBM Corp. 2000,2006 |
5 | * Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation | ||
6 | * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) | 5 | * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) |
7 | * Gerhard Tonn (ton@de.ibm.com) | 6 | * Gerhard Tonn (ton@de.ibm.com) |
8 | * | 7 | * |
@@ -52,8 +51,6 @@ typedef struct | |||
52 | struct ucontext32 uc; | 51 | struct ucontext32 uc; |
53 | } rt_sigframe32; | 52 | } rt_sigframe32; |
54 | 53 | ||
55 | asmlinkage int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset)); | ||
56 | |||
57 | int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) | 54 | int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) |
58 | { | 55 | { |
59 | int err; | 56 | int err; |
@@ -161,66 +158,6 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) | |||
161 | return err; | 158 | return err; |
162 | } | 159 | } |
163 | 160 | ||
164 | /* | ||
165 | * Atomically swap in the new signal mask, and wait for a signal. | ||
166 | */ | ||
167 | asmlinkage int | ||
168 | sys32_sigsuspend(struct pt_regs * regs,int history0, int history1, old_sigset_t mask) | ||
169 | { | ||
170 | sigset_t saveset; | ||
171 | |||
172 | mask &= _BLOCKABLE; | ||
173 | spin_lock_irq(¤t->sighand->siglock); | ||
174 | saveset = current->blocked; | ||
175 | siginitset(¤t->blocked, mask); | ||
176 | recalc_sigpending(); | ||
177 | spin_unlock_irq(¤t->sighand->siglock); | ||
178 | regs->gprs[2] = -EINTR; | ||
179 | |||
180 | while (1) { | ||
181 | set_current_state(TASK_INTERRUPTIBLE); | ||
182 | schedule(); | ||
183 | if (do_signal(regs, &saveset)) | ||
184 | return -EINTR; | ||
185 | } | ||
186 | } | ||
187 | |||
188 | asmlinkage int | ||
189 | sys32_rt_sigsuspend(struct pt_regs * regs, compat_sigset_t __user *unewset, | ||
190 | size_t sigsetsize) | ||
191 | { | ||
192 | sigset_t saveset, newset; | ||
193 | compat_sigset_t set32; | ||
194 | |||
195 | /* XXX: Don't preclude handling different sized sigset_t's. */ | ||
196 | if (sigsetsize != sizeof(sigset_t)) | ||
197 | return -EINVAL; | ||
198 | |||
199 | if (copy_from_user(&set32, unewset, sizeof(set32))) | ||
200 | return -EFAULT; | ||
201 | switch (_NSIG_WORDS) { | ||
202 | case 4: newset.sig[3] = set32.sig[6] + (((long)set32.sig[7]) << 32); | ||
203 | case 3: newset.sig[2] = set32.sig[4] + (((long)set32.sig[5]) << 32); | ||
204 | case 2: newset.sig[1] = set32.sig[2] + (((long)set32.sig[3]) << 32); | ||
205 | case 1: newset.sig[0] = set32.sig[0] + (((long)set32.sig[1]) << 32); | ||
206 | } | ||
207 | sigdelsetmask(&newset, ~_BLOCKABLE); | ||
208 | |||
209 | spin_lock_irq(¤t->sighand->siglock); | ||
210 | saveset = current->blocked; | ||
211 | current->blocked = newset; | ||
212 | recalc_sigpending(); | ||
213 | spin_unlock_irq(¤t->sighand->siglock); | ||
214 | regs->gprs[2] = -EINTR; | ||
215 | |||
216 | while (1) { | ||
217 | set_current_state(TASK_INTERRUPTIBLE); | ||
218 | schedule(); | ||
219 | if (do_signal(regs, &saveset)) | ||
220 | return -EINTR; | ||
221 | } | ||
222 | } | ||
223 | |||
224 | asmlinkage long | 161 | asmlinkage long |
225 | sys32_sigaction(int sig, const struct old_sigaction32 __user *act, | 162 | sys32_sigaction(int sig, const struct old_sigaction32 __user *act, |
226 | struct old_sigaction32 __user *oact) | 163 | struct old_sigaction32 __user *oact) |
@@ -520,7 +457,7 @@ static inline int map_signal(int sig) | |||
520 | return sig; | 457 | return sig; |
521 | } | 458 | } |
522 | 459 | ||
523 | static void setup_frame32(int sig, struct k_sigaction *ka, | 460 | static int setup_frame32(int sig, struct k_sigaction *ka, |
524 | sigset_t *set, struct pt_regs * regs) | 461 | sigset_t *set, struct pt_regs * regs) |
525 | { | 462 | { |
526 | sigframe32 __user *frame = get_sigframe(ka, regs, sizeof(sigframe32)); | 463 | sigframe32 __user *frame = get_sigframe(ka, regs, sizeof(sigframe32)); |
@@ -565,13 +502,14 @@ static void setup_frame32(int sig, struct k_sigaction *ka, | |||
565 | /* Place signal number on stack to allow backtrace from handler. */ | 502 | /* Place signal number on stack to allow backtrace from handler. */ |
566 | if (__put_user(regs->gprs[2], (int __user *) &frame->signo)) | 503 | if (__put_user(regs->gprs[2], (int __user *) &frame->signo)) |
567 | goto give_sigsegv; | 504 | goto give_sigsegv; |
568 | return; | 505 | return 0; |
569 | 506 | ||
570 | give_sigsegv: | 507 | give_sigsegv: |
571 | force_sigsegv(sig, current); | 508 | force_sigsegv(sig, current); |
509 | return -EFAULT; | ||
572 | } | 510 | } |
573 | 511 | ||
574 | static void setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info, | 512 | static int setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info, |
575 | sigset_t *set, struct pt_regs * regs) | 513 | sigset_t *set, struct pt_regs * regs) |
576 | { | 514 | { |
577 | int err = 0; | 515 | int err = 0; |
@@ -615,31 +553,37 @@ static void setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
615 | regs->gprs[2] = map_signal(sig); | 553 | regs->gprs[2] = map_signal(sig); |
616 | regs->gprs[3] = (__u64) &frame->info; | 554 | regs->gprs[3] = (__u64) &frame->info; |
617 | regs->gprs[4] = (__u64) &frame->uc; | 555 | regs->gprs[4] = (__u64) &frame->uc; |
618 | return; | 556 | return 0; |
619 | 557 | ||
620 | give_sigsegv: | 558 | give_sigsegv: |
621 | force_sigsegv(sig, current); | 559 | force_sigsegv(sig, current); |
560 | return -EFAULT; | ||
622 | } | 561 | } |
623 | 562 | ||
624 | /* | 563 | /* |
625 | * OK, we're invoking a handler | 564 | * OK, we're invoking a handler |
626 | */ | 565 | */ |
627 | 566 | ||
628 | void | 567 | int |
629 | handle_signal32(unsigned long sig, struct k_sigaction *ka, | 568 | handle_signal32(unsigned long sig, struct k_sigaction *ka, |
630 | siginfo_t *info, sigset_t *oldset, struct pt_regs * regs) | 569 | siginfo_t *info, sigset_t *oldset, struct pt_regs * regs) |
631 | { | 570 | { |
571 | int ret; | ||
572 | |||
632 | /* Set up the stack frame */ | 573 | /* Set up the stack frame */ |
633 | if (ka->sa.sa_flags & SA_SIGINFO) | 574 | if (ka->sa.sa_flags & SA_SIGINFO) |
634 | setup_rt_frame32(sig, ka, info, oldset, regs); | 575 | ret = setup_rt_frame32(sig, ka, info, oldset, regs); |
635 | else | 576 | else |
636 | setup_frame32(sig, ka, oldset, regs); | 577 | ret = setup_frame32(sig, ka, oldset, regs); |
637 | 578 | ||
638 | spin_lock_irq(¤t->sighand->siglock); | 579 | if (ret == 0) { |
639 | sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); | 580 | spin_lock_irq(¤t->sighand->siglock); |
640 | if (!(ka->sa.sa_flags & SA_NODEFER)) | 581 | sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); |
641 | sigaddset(¤t->blocked,sig); | 582 | if (!(ka->sa.sa_flags & SA_NODEFER)) |
642 | recalc_sigpending(); | 583 | sigaddset(¤t->blocked,sig); |
643 | spin_unlock_irq(¤t->sighand->siglock); | 584 | recalc_sigpending(); |
585 | spin_unlock_irq(¤t->sighand->siglock); | ||
586 | } | ||
587 | return ret; | ||
644 | } | 588 | } |
645 | 589 | ||
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index cfde1905d07d..6e27ac68ec3f 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -1,9 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * arch/s390/kernel/sys_wrapper31.S | 2 | * arch/s390/kernel/compat_wrapper.S |
3 | * wrapper for 31 bit compatible system calls. | 3 | * wrapper for 31 bit compatible system calls. |
4 | * | 4 | * |
5 | * S390 version | 5 | * Copyright (C) IBM Corp. 2000,2006 |
6 | * Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation | ||
7 | * Author(s): Gerhard Tonn (ton@de.ibm.com), | 6 | * Author(s): Gerhard Tonn (ton@de.ibm.com), |
8 | * Thomas Spatzier (tspat@de.ibm.com) | 7 | * Thomas Spatzier (tspat@de.ibm.com) |
9 | */ | 8 | */ |
@@ -288,7 +287,12 @@ sys32_setregid16_wrapper: | |||
288 | llgfr %r3,%r3 # __kernel_old_gid_emu31_t | 287 | llgfr %r3,%r3 # __kernel_old_gid_emu31_t |
289 | jg sys32_setregid16 # branch to system call | 288 | jg sys32_setregid16 # branch to system call |
290 | 289 | ||
291 | #sys32_sigsuspend_wrapper # done in sigsuspend_glue | 290 | .globl sys_sigsuspend_wrapper |
291 | sys_sigsuspend_wrapper: | ||
292 | lgfr %r2,%r2 # int | ||
293 | lgfr %r3,%r3 # int | ||
294 | llgfr %r4,%r4 # old_sigset_t | ||
295 | jg sys_sigsuspend | ||
292 | 296 | ||
293 | .globl compat_sys_sigpending_wrapper | 297 | .globl compat_sys_sigpending_wrapper |
294 | compat_sys_sigpending_wrapper: | 298 | compat_sys_sigpending_wrapper: |
@@ -855,7 +859,11 @@ sys32_rt_sigqueueinfo_wrapper: | |||
855 | llgtr %r4,%r4 # siginfo_emu31_t * | 859 | llgtr %r4,%r4 # siginfo_emu31_t * |
856 | jg sys32_rt_sigqueueinfo # branch to system call | 860 | jg sys32_rt_sigqueueinfo # branch to system call |
857 | 861 | ||
858 | #sys32_rt_sigsuspend_wrapper # done in rt_sigsuspend_glue | 862 | .globl compat_sys_rt_sigsuspend_wrapper |
863 | compat_sys_rt_sigsuspend_wrapper: | ||
864 | llgtr %r2,%r2 # compat_sigset_t * | ||
865 | llgfr %r3,%r3 # compat_size_t | ||
866 | jg compat_sys_rt_sigsuspend | ||
859 | 867 | ||
860 | .globl sys32_pread64_wrapper | 868 | .globl sys32_pread64_wrapper |
861 | sys32_pread64_wrapper: | 869 | sys32_pread64_wrapper: |
@@ -1475,3 +1483,122 @@ sys_inotify_rm_watch_wrapper: | |||
1475 | lgfr %r2,%r2 # int | 1483 | lgfr %r2,%r2 # int |
1476 | llgfr %r3,%r3 # u32 | 1484 | llgfr %r3,%r3 # u32 |
1477 | jg sys_inotify_rm_watch | 1485 | jg sys_inotify_rm_watch |
1486 | |||
1487 | .globl compat_sys_openat_wrapper | ||
1488 | compat_sys_openat_wrapper: | ||
1489 | lgfr %r2,%r2 # int | ||
1490 | llgtr %r3,%r3 # const char * | ||
1491 | lgfr %r4,%r4 # int | ||
1492 | lgfr %r5,%r5 # int | ||
1493 | jg compat_sys_openat | ||
1494 | |||
1495 | .globl sys_mkdirat_wrapper | ||
1496 | sys_mkdirat_wrapper: | ||
1497 | lgfr %r2,%r2 # int | ||
1498 | llgtr %r3,%r3 # const char * | ||
1499 | lgfr %r4,%r4 # int | ||
1500 | jg sys_mkdirat | ||
1501 | |||
1502 | .globl sys_mknodat_wrapper | ||
1503 | sys_mknodat_wrapper: | ||
1504 | lgfr %r2,%r2 # int | ||
1505 | llgtr %r3,%r3 # const char * | ||
1506 | lgfr %r4,%r4 # int | ||
1507 | llgfr %r5,%r5 # unsigned int | ||
1508 | jg sys_mknodat | ||
1509 | |||
1510 | .globl sys_fchownat_wrapper | ||
1511 | sys_fchownat_wrapper: | ||
1512 | lgfr %r2,%r2 # int | ||
1513 | llgtr %r3,%r3 # const char * | ||
1514 | llgfr %r4,%r4 # uid_t | ||
1515 | llgfr %r5,%r5 # gid_t | ||
1516 | lgfr %r6,%r6 # int | ||
1517 | jg sys_fchownat | ||
1518 | |||
1519 | .globl compat_sys_futimesat_wrapper | ||
1520 | compat_sys_futimesat_wrapper: | ||
1521 | lgfr %r2,%r2 # int | ||
1522 | llgtr %r3,%r3 # char * | ||
1523 | llgtr %r4,%r4 # struct timeval * | ||
1524 | jg compat_sys_futimesat | ||
1525 | |||
1526 | .globl compat_sys_newfstatat_wrapper | ||
1527 | compat_sys_newfstatat_wrapper: | ||
1528 | lgfr %r2,%r2 # int | ||
1529 | llgtr %r3,%r3 # char * | ||
1530 | llgtr %r4,%r4 # struct stat * | ||
1531 | lgfr %r5,%r5 # int | ||
1532 | jg compat_sys_newfstatat | ||
1533 | |||
1534 | .globl sys_unlinkat_wrapper | ||
1535 | sys_unlinkat_wrapper: | ||
1536 | lgfr %r2,%r2 # int | ||
1537 | llgtr %r3,%r3 # const char * | ||
1538 | lgfr %r4,%r4 # int | ||
1539 | jg sys_unlinkat | ||
1540 | |||
1541 | .globl sys_renameat_wrapper | ||
1542 | sys_renameat_wrapper: | ||
1543 | lgfr %r2,%r2 # int | ||
1544 | llgtr %r3,%r3 # const char * | ||
1545 | lgfr %r4,%r4 # int | ||
1546 | llgtr %r5,%r5 # const char * | ||
1547 | jg sys_renameat | ||
1548 | |||
1549 | .globl sys_linkat_wrapper | ||
1550 | sys_linkat_wrapper: | ||
1551 | lgfr %r2,%r2 # int | ||
1552 | llgtr %r3,%r3 # const char * | ||
1553 | lgfr %r4,%r4 # int | ||
1554 | llgtr %r5,%r5 # const char * | ||
1555 | jg sys_linkat | ||
1556 | |||
1557 | .globl sys_symlinkat_wrapper | ||
1558 | sys_symlinkat_wrapper: | ||
1559 | llgtr %r2,%r2 # const char * | ||
1560 | lgfr %r3,%r3 # int | ||
1561 | llgtr %r4,%r4 # const char * | ||
1562 | jg sys_symlinkat | ||
1563 | |||
1564 | .globl sys_readlinkat_wrapper | ||
1565 | sys_readlinkat_wrapper: | ||
1566 | lgfr %r2,%r2 # int | ||
1567 | llgtr %r3,%r3 # const char * | ||
1568 | llgtr %r4,%r4 # char * | ||
1569 | lgfr %r5,%r5 # int | ||
1570 | jg sys_readlinkat | ||
1571 | |||
1572 | .globl sys_fchmodat_wrapper | ||
1573 | sys_fchmodat_wrapper: | ||
1574 | lgfr %r2,%r2 # int | ||
1575 | llgtr %r3,%r3 # const char * | ||
1576 | llgfr %r4,%r4 # mode_t | ||
1577 | jg sys_fchmodat | ||
1578 | |||
1579 | .globl sys_faccessat_wrapper | ||
1580 | sys_faccessat_wrapper: | ||
1581 | lgfr %r2,%r2 # int | ||
1582 | llgtr %r3,%r3 # const char * | ||
1583 | lgfr %r4,%r4 # int | ||
1584 | jg sys_faccessat | ||
1585 | |||
1586 | .globl compat_sys_pselect6_wrapper | ||
1587 | compat_sys_pselect6_wrapper: | ||
1588 | lgfr %r2,%r2 # int | ||
1589 | llgtr %r3,%r3 # fd_set * | ||
1590 | llgtr %r4,%r4 # fd_set * | ||
1591 | llgtr %r5,%r5 # fd_set * | ||
1592 | llgtr %r6,%r6 # struct timespec * | ||
1593 | llgt %r0,164(%r15) # void * | ||
1594 | stg %r0,160(%r15) | ||
1595 | jg compat_sys_pselect6 | ||
1596 | |||
1597 | .globl compat_sys_ppoll_wrapper | ||
1598 | compat_sys_ppoll_wrapper: | ||
1599 | llgtr %r2,%r2 # struct pollfd * | ||
1600 | llgfr %r3,%r3 # unsigned int | ||
1601 | llgtr %r4,%r4 # struct timespec * | ||
1602 | llgtr %r5,%r5 # const sigset_t * | ||
1603 | llgfr %r6,%r6 # size_t | ||
1604 | jg compat_sys_ppoll | ||
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 27b07730b7b8..b2448487854c 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -2,8 +2,7 @@ | |||
2 | * arch/s390/kernel/entry.S | 2 | * arch/s390/kernel/entry.S |
3 | * S390 low-level entry points. | 3 | * S390 low-level entry points. |
4 | * | 4 | * |
5 | * S390 version | 5 | * Copyright (C) IBM Corp. 1999,2006 |
6 | * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation | ||
7 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), | 6 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), |
8 | * Hartmut Penner (hp@de.ibm.com), | 7 | * Hartmut Penner (hp@de.ibm.com), |
9 | * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com), | 8 | * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com), |
@@ -50,9 +49,10 @@ SP_ILC = STACK_FRAME_OVERHEAD + __PT_ILC | |||
50 | SP_TRAP = STACK_FRAME_OVERHEAD + __PT_TRAP | 49 | SP_TRAP = STACK_FRAME_OVERHEAD + __PT_TRAP |
51 | SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE | 50 | SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE |
52 | 51 | ||
53 | _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING | \ | 52 | _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ |
54 | _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) | 53 | _TIF_MCCK_PENDING | _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) |
55 | _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING) | 54 | _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ |
55 | _TIF_MCCK_PENDING) | ||
56 | 56 | ||
57 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER | 57 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER |
58 | STACK_SIZE = 1 << STACK_SHIFT | 58 | STACK_SIZE = 1 << STACK_SHIFT |
@@ -251,8 +251,8 @@ sysc_work: | |||
251 | bo BASED(sysc_mcck_pending) | 251 | bo BASED(sysc_mcck_pending) |
252 | tm __TI_flags+3(%r9),_TIF_NEED_RESCHED | 252 | tm __TI_flags+3(%r9),_TIF_NEED_RESCHED |
253 | bo BASED(sysc_reschedule) | 253 | bo BASED(sysc_reschedule) |
254 | tm __TI_flags+3(%r9),_TIF_SIGPENDING | 254 | tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) |
255 | bo BASED(sysc_sigpending) | 255 | bnz BASED(sysc_sigpending) |
256 | tm __TI_flags+3(%r9),_TIF_RESTART_SVC | 256 | tm __TI_flags+3(%r9),_TIF_RESTART_SVC |
257 | bo BASED(sysc_restart) | 257 | bo BASED(sysc_restart) |
258 | tm __TI_flags+3(%r9),_TIF_SINGLE_STEP | 258 | tm __TI_flags+3(%r9),_TIF_SINGLE_STEP |
@@ -276,12 +276,11 @@ sysc_mcck_pending: | |||
276 | br %r1 # TIF bit will be cleared by handler | 276 | br %r1 # TIF bit will be cleared by handler |
277 | 277 | ||
278 | # | 278 | # |
279 | # _TIF_SIGPENDING is set, call do_signal | 279 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal |
280 | # | 280 | # |
281 | sysc_sigpending: | 281 | sysc_sigpending: |
282 | ni __TI_flags+3(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP | 282 | ni __TI_flags+3(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP |
283 | la %r2,SP_PTREGS(%r15) # load pt_regs | 283 | la %r2,SP_PTREGS(%r15) # load pt_regs |
284 | sr %r3,%r3 # clear *oldset | ||
285 | l %r1,BASED(.Ldo_signal) | 284 | l %r1,BASED(.Ldo_signal) |
286 | basr %r14,%r1 # call do_signal | 285 | basr %r14,%r1 # call do_signal |
287 | tm __TI_flags+3(%r9),_TIF_RESTART_SVC | 286 | tm __TI_flags+3(%r9),_TIF_RESTART_SVC |
@@ -397,30 +396,6 @@ sys_rt_sigreturn_glue: | |||
397 | l %r1,BASED(.Lrt_sigreturn) | 396 | l %r1,BASED(.Lrt_sigreturn) |
398 | br %r1 # branch to sys_sigreturn | 397 | br %r1 # branch to sys_sigreturn |
399 | 398 | ||
400 | # | ||
401 | # sigsuspend and rt_sigsuspend need pt_regs as an additional | ||
402 | # parameter and they have to skip the store of %r2 into the | ||
403 | # user register %r2 because the return value was set in | ||
404 | # sigsuspend and rt_sigsuspend already and must not be overwritten! | ||
405 | # | ||
406 | |||
407 | sys_sigsuspend_glue: | ||
408 | lr %r5,%r4 # move mask back | ||
409 | lr %r4,%r3 # move history1 parameter | ||
410 | lr %r3,%r2 # move history0 parameter | ||
411 | la %r2,SP_PTREGS(%r15) # load pt_regs as first parameter | ||
412 | l %r1,BASED(.Lsigsuspend) | ||
413 | la %r14,4(%r14) # skip store of return value | ||
414 | br %r1 # branch to sys_sigsuspend | ||
415 | |||
416 | sys_rt_sigsuspend_glue: | ||
417 | lr %r4,%r3 # move sigsetsize parameter | ||
418 | lr %r3,%r2 # move unewset parameter | ||
419 | la %r2,SP_PTREGS(%r15) # load pt_regs as first parameter | ||
420 | l %r1,BASED(.Lrt_sigsuspend) | ||
421 | la %r14,4(%r14) # skip store of return value | ||
422 | br %r1 # branch to sys_rt_sigsuspend | ||
423 | |||
424 | sys_sigaltstack_glue: | 399 | sys_sigaltstack_glue: |
425 | la %r4,SP_PTREGS(%r15) # load pt_regs as parameter | 400 | la %r4,SP_PTREGS(%r15) # load pt_regs as parameter |
426 | l %r1,BASED(.Lsigaltstack) | 401 | l %r1,BASED(.Lsigaltstack) |
@@ -604,15 +579,16 @@ io_work: | |||
604 | lr %r15,%r1 | 579 | lr %r15,%r1 |
605 | # | 580 | # |
606 | # One of the work bits is on. Find out which one. | 581 | # One of the work bits is on. Find out which one. |
607 | # Checked are: _TIF_SIGPENDING, _TIF_NEED_RESCHED and _TIF_MCCK_PENDING | 582 | # Checked are: _TIF_SIGPENDING, _TIF_RESTORE_SIGMASK, _TIF_NEED_RESCHED |
583 | # and _TIF_MCCK_PENDING | ||
608 | # | 584 | # |
609 | io_work_loop: | 585 | io_work_loop: |
610 | tm __TI_flags+3(%r9),_TIF_MCCK_PENDING | 586 | tm __TI_flags+3(%r9),_TIF_MCCK_PENDING |
611 | bo BASED(io_mcck_pending) | 587 | bo BASED(io_mcck_pending) |
612 | tm __TI_flags+3(%r9),_TIF_NEED_RESCHED | 588 | tm __TI_flags+3(%r9),_TIF_NEED_RESCHED |
613 | bo BASED(io_reschedule) | 589 | bo BASED(io_reschedule) |
614 | tm __TI_flags+3(%r9),_TIF_SIGPENDING | 590 | tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) |
615 | bo BASED(io_sigpending) | 591 | bnz BASED(io_sigpending) |
616 | b BASED(io_leave) | 592 | b BASED(io_leave) |
617 | 593 | ||
618 | # | 594 | # |
@@ -636,12 +612,11 @@ io_reschedule: | |||
636 | b BASED(io_work_loop) | 612 | b BASED(io_work_loop) |
637 | 613 | ||
638 | # | 614 | # |
639 | # _TIF_SIGPENDING is set, call do_signal | 615 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal |
640 | # | 616 | # |
641 | io_sigpending: | 617 | io_sigpending: |
642 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 618 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts |
643 | la %r2,SP_PTREGS(%r15) # load pt_regs | 619 | la %r2,SP_PTREGS(%r15) # load pt_regs |
644 | sr %r3,%r3 # clear *oldset | ||
645 | l %r1,BASED(.Ldo_signal) | 620 | l %r1,BASED(.Ldo_signal) |
646 | basr %r14,%r1 # call do_signal | 621 | basr %r14,%r1 # call do_signal |
647 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts | 622 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 369ab4413ec7..2ac095bc0e25 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -1,9 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * arch/s390/kernel/entry.S | 2 | * arch/s390/kernel/entry64.S |
3 | * S390 low-level entry points. | 3 | * S390 low-level entry points. |
4 | * | 4 | * |
5 | * S390 version | 5 | * Copyright (C) IBM Corp. 1999,2006 |
6 | * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation | ||
7 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), | 6 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), |
8 | * Hartmut Penner (hp@de.ibm.com), | 7 | * Hartmut Penner (hp@de.ibm.com), |
9 | * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com), | 8 | * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com), |
@@ -53,9 +52,10 @@ SP_SIZE = STACK_FRAME_OVERHEAD + __PT_SIZE | |||
53 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER | 52 | STACK_SHIFT = PAGE_SHIFT + THREAD_ORDER |
54 | STACK_SIZE = 1 << STACK_SHIFT | 53 | STACK_SIZE = 1 << STACK_SHIFT |
55 | 54 | ||
56 | _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING | \ | 55 | _TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ |
57 | _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) | 56 | _TIF_MCCK_PENDING | _TIF_RESTART_SVC | _TIF_SINGLE_STEP ) |
58 | _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING) | 57 | _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ |
58 | _TIF_MCCK_PENDING) | ||
59 | 59 | ||
60 | #define BASED(name) name-system_call(%r13) | 60 | #define BASED(name) name-system_call(%r13) |
61 | 61 | ||
@@ -249,8 +249,8 @@ sysc_work: | |||
249 | jo sysc_mcck_pending | 249 | jo sysc_mcck_pending |
250 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED | 250 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED |
251 | jo sysc_reschedule | 251 | jo sysc_reschedule |
252 | tm __TI_flags+7(%r9),_TIF_SIGPENDING | 252 | tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) |
253 | jo sysc_sigpending | 253 | jnz sysc_sigpending |
254 | tm __TI_flags+7(%r9),_TIF_RESTART_SVC | 254 | tm __TI_flags+7(%r9),_TIF_RESTART_SVC |
255 | jo sysc_restart | 255 | jo sysc_restart |
256 | tm __TI_flags+7(%r9),_TIF_SINGLE_STEP | 256 | tm __TI_flags+7(%r9),_TIF_SINGLE_STEP |
@@ -272,12 +272,11 @@ sysc_mcck_pending: | |||
272 | jg s390_handle_mcck # TIF bit will be cleared by handler | 272 | jg s390_handle_mcck # TIF bit will be cleared by handler |
273 | 273 | ||
274 | # | 274 | # |
275 | # _TIF_SIGPENDING is set, call do_signal | 275 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal |
276 | # | 276 | # |
277 | sysc_sigpending: | 277 | sysc_sigpending: |
278 | ni __TI_flags+7(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP | 278 | ni __TI_flags+7(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP |
279 | la %r2,SP_PTREGS(%r15) # load pt_regs | 279 | la %r2,SP_PTREGS(%r15) # load pt_regs |
280 | sgr %r3,%r3 # clear *oldset | ||
281 | brasl %r14,do_signal # call do_signal | 280 | brasl %r14,do_signal # call do_signal |
282 | tm __TI_flags+7(%r9),_TIF_RESTART_SVC | 281 | tm __TI_flags+7(%r9),_TIF_RESTART_SVC |
283 | jo sysc_restart | 282 | jo sysc_restart |
@@ -414,52 +413,6 @@ sys32_rt_sigreturn_glue: | |||
414 | jg sys32_rt_sigreturn # branch to sys32_sigreturn | 413 | jg sys32_rt_sigreturn # branch to sys32_sigreturn |
415 | #endif | 414 | #endif |
416 | 415 | ||
417 | # | ||
418 | # sigsuspend and rt_sigsuspend need pt_regs as an additional | ||
419 | # parameter and they have to skip the store of %r2 into the | ||
420 | # user register %r2 because the return value was set in | ||
421 | # sigsuspend and rt_sigsuspend already and must not be overwritten! | ||
422 | # | ||
423 | |||
424 | sys_sigsuspend_glue: | ||
425 | lgr %r5,%r4 # move mask back | ||
426 | lgr %r4,%r3 # move history1 parameter | ||
427 | lgr %r3,%r2 # move history0 parameter | ||
428 | la %r2,SP_PTREGS(%r15) # load pt_regs as first parameter | ||
429 | la %r14,6(%r14) # skip store of return value | ||
430 | jg sys_sigsuspend # branch to sys_sigsuspend | ||
431 | |||
432 | #ifdef CONFIG_COMPAT | ||
433 | sys32_sigsuspend_glue: | ||
434 | llgfr %r4,%r4 # unsigned long | ||
435 | lgr %r5,%r4 # move mask back | ||
436 | lgfr %r3,%r3 # int | ||
437 | lgr %r4,%r3 # move history1 parameter | ||
438 | lgfr %r2,%r2 # int | ||
439 | lgr %r3,%r2 # move history0 parameter | ||
440 | la %r2,SP_PTREGS(%r15) # load pt_regs as first parameter | ||
441 | la %r14,6(%r14) # skip store of return value | ||
442 | jg sys32_sigsuspend # branch to sys32_sigsuspend | ||
443 | #endif | ||
444 | |||
445 | sys_rt_sigsuspend_glue: | ||
446 | lgr %r4,%r3 # move sigsetsize parameter | ||
447 | lgr %r3,%r2 # move unewset parameter | ||
448 | la %r2,SP_PTREGS(%r15) # load pt_regs as first parameter | ||
449 | la %r14,6(%r14) # skip store of return value | ||
450 | jg sys_rt_sigsuspend # branch to sys_rt_sigsuspend | ||
451 | |||
452 | #ifdef CONFIG_COMPAT | ||
453 | sys32_rt_sigsuspend_glue: | ||
454 | llgfr %r3,%r3 # size_t | ||
455 | lgr %r4,%r3 # move sigsetsize parameter | ||
456 | llgtr %r2,%r2 # sigset_emu31_t * | ||
457 | lgr %r3,%r2 # move unewset parameter | ||
458 | la %r2,SP_PTREGS(%r15) # load pt_regs as first parameter | ||
459 | la %r14,6(%r14) # skip store of return value | ||
460 | jg sys32_rt_sigsuspend # branch to sys32_rt_sigsuspend | ||
461 | #endif | ||
462 | |||
463 | sys_sigaltstack_glue: | 416 | sys_sigaltstack_glue: |
464 | la %r4,SP_PTREGS(%r15) # load pt_regs as parameter | 417 | la %r4,SP_PTREGS(%r15) # load pt_regs as parameter |
465 | jg sys_sigaltstack # branch to sys_sigreturn | 418 | jg sys_sigaltstack # branch to sys_sigreturn |
@@ -646,15 +599,16 @@ io_work: | |||
646 | lgr %r15,%r1 | 599 | lgr %r15,%r1 |
647 | # | 600 | # |
648 | # One of the work bits is on. Find out which one. | 601 | # One of the work bits is on. Find out which one. |
649 | # Checked are: _TIF_SIGPENDING, _TIF_NEED_RESCHED and _TIF_MCCK_PENDING | 602 | # Checked are: _TIF_SIGPENDING, _TIF_RESTORE_SIGPENDING, _TIF_NEED_RESCHED |
603 | # and _TIF_MCCK_PENDING | ||
650 | # | 604 | # |
651 | io_work_loop: | 605 | io_work_loop: |
652 | tm __TI_flags+7(%r9),_TIF_MCCK_PENDING | 606 | tm __TI_flags+7(%r9),_TIF_MCCK_PENDING |
653 | jo io_mcck_pending | 607 | jo io_mcck_pending |
654 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED | 608 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED |
655 | jo io_reschedule | 609 | jo io_reschedule |
656 | tm __TI_flags+7(%r9),_TIF_SIGPENDING | 610 | tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) |
657 | jo io_sigpending | 611 | jnz io_sigpending |
658 | j io_leave | 612 | j io_leave |
659 | 613 | ||
660 | # | 614 | # |
@@ -676,12 +630,11 @@ io_reschedule: | |||
676 | j io_work_loop | 630 | j io_work_loop |
677 | 631 | ||
678 | # | 632 | # |
679 | # _TIF_SIGPENDING is set, call do_signal | 633 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal |
680 | # | 634 | # |
681 | io_sigpending: | 635 | io_sigpending: |
682 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 636 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts |
683 | la %r2,SP_PTREGS(%r15) # load pt_regs | 637 | la %r2,SP_PTREGS(%r15) # load pt_regs |
684 | slgr %r3,%r3 # clear *oldset | ||
685 | brasl %r14,do_signal # call do_signal | 638 | brasl %r14,do_signal # call do_signal |
686 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts | 639 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts |
687 | j io_work_loop | 640 | j io_work_loop |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 6ae4a77270b5..ae1927e48cfb 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -1,8 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/s390/kernel/signal.c | 2 | * arch/s390/kernel/signal.c |
3 | * | 3 | * |
4 | * S390 version | 4 | * Copyright (C) IBM Corp. 1999,2006 |
5 | * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation | ||
6 | * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) | 5 | * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) |
7 | * | 6 | * |
8 | * Based on Intel version | 7 | * Based on Intel version |
@@ -51,60 +50,24 @@ typedef struct | |||
51 | struct ucontext uc; | 50 | struct ucontext uc; |
52 | } rt_sigframe; | 51 | } rt_sigframe; |
53 | 52 | ||
54 | int do_signal(struct pt_regs *regs, sigset_t *oldset); | ||
55 | |||
56 | /* | 53 | /* |
57 | * Atomically swap in the new signal mask, and wait for a signal. | 54 | * Atomically swap in the new signal mask, and wait for a signal. |
58 | */ | 55 | */ |
59 | asmlinkage int | 56 | asmlinkage int |
60 | sys_sigsuspend(struct pt_regs * regs, int history0, int history1, | 57 | sys_sigsuspend(int history0, int history1, old_sigset_t mask) |
61 | old_sigset_t mask) | ||
62 | { | 58 | { |
63 | sigset_t saveset; | ||
64 | |||
65 | mask &= _BLOCKABLE; | 59 | mask &= _BLOCKABLE; |
66 | spin_lock_irq(¤t->sighand->siglock); | 60 | spin_lock_irq(¤t->sighand->siglock); |
67 | saveset = current->blocked; | 61 | current->saved_sigmask = current->blocked; |
68 | siginitset(¤t->blocked, mask); | 62 | siginitset(¤t->blocked, mask); |
69 | recalc_sigpending(); | 63 | recalc_sigpending(); |
70 | spin_unlock_irq(¤t->sighand->siglock); | 64 | spin_unlock_irq(¤t->sighand->siglock); |
71 | regs->gprs[2] = -EINTR; | ||
72 | |||
73 | while (1) { | ||
74 | set_current_state(TASK_INTERRUPTIBLE); | ||
75 | schedule(); | ||
76 | if (do_signal(regs, &saveset)) | ||
77 | return -EINTR; | ||
78 | } | ||
79 | } | ||
80 | |||
81 | asmlinkage long | ||
82 | sys_rt_sigsuspend(struct pt_regs *regs, sigset_t __user *unewset, | ||
83 | size_t sigsetsize) | ||
84 | { | ||
85 | sigset_t saveset, newset; | ||
86 | 65 | ||
87 | /* XXX: Don't preclude handling different sized sigset_t's. */ | 66 | current->state = TASK_INTERRUPTIBLE; |
88 | if (sigsetsize != sizeof(sigset_t)) | 67 | schedule(); |
89 | return -EINVAL; | 68 | set_thread_flag(TIF_RESTORE_SIGMASK); |
90 | 69 | ||
91 | if (copy_from_user(&newset, unewset, sizeof(newset))) | 70 | return -ERESTARTNOHAND; |
92 | return -EFAULT; | ||
93 | sigdelsetmask(&newset, ~_BLOCKABLE); | ||
94 | |||
95 | spin_lock_irq(¤t->sighand->siglock); | ||
96 | saveset = current->blocked; | ||
97 | current->blocked = newset; | ||
98 | recalc_sigpending(); | ||
99 | spin_unlock_irq(¤t->sighand->siglock); | ||
100 | regs->gprs[2] = -EINTR; | ||
101 | |||
102 | while (1) { | ||
103 | set_current_state(TASK_INTERRUPTIBLE); | ||
104 | schedule(); | ||
105 | if (do_signal(regs, &saveset)) | ||
106 | return -EINTR; | ||
107 | } | ||
108 | } | 71 | } |
109 | 72 | ||
110 | asmlinkage long | 73 | asmlinkage long |
@@ -306,8 +269,8 @@ static inline int map_signal(int sig) | |||
306 | return sig; | 269 | return sig; |
307 | } | 270 | } |
308 | 271 | ||
309 | static void setup_frame(int sig, struct k_sigaction *ka, | 272 | static int setup_frame(int sig, struct k_sigaction *ka, |
310 | sigset_t *set, struct pt_regs * regs) | 273 | sigset_t *set, struct pt_regs * regs) |
311 | { | 274 | { |
312 | sigframe __user *frame; | 275 | sigframe __user *frame; |
313 | 276 | ||
@@ -355,13 +318,14 @@ static void setup_frame(int sig, struct k_sigaction *ka, | |||
355 | /* Place signal number on stack to allow backtrace from handler. */ | 318 | /* Place signal number on stack to allow backtrace from handler. */ |
356 | if (__put_user(regs->gprs[2], (int __user *) &frame->signo)) | 319 | if (__put_user(regs->gprs[2], (int __user *) &frame->signo)) |
357 | goto give_sigsegv; | 320 | goto give_sigsegv; |
358 | return; | 321 | return 0; |
359 | 322 | ||
360 | give_sigsegv: | 323 | give_sigsegv: |
361 | force_sigsegv(sig, current); | 324 | force_sigsegv(sig, current); |
325 | return -EFAULT; | ||
362 | } | 326 | } |
363 | 327 | ||
364 | static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | 328 | static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, |
365 | sigset_t *set, struct pt_regs * regs) | 329 | sigset_t *set, struct pt_regs * regs) |
366 | { | 330 | { |
367 | int err = 0; | 331 | int err = 0; |
@@ -409,32 +373,39 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
409 | regs->gprs[2] = map_signal(sig); | 373 | regs->gprs[2] = map_signal(sig); |
410 | regs->gprs[3] = (unsigned long) &frame->info; | 374 | regs->gprs[3] = (unsigned long) &frame->info; |
411 | regs->gprs[4] = (unsigned long) &frame->uc; | 375 | regs->gprs[4] = (unsigned long) &frame->uc; |
412 | return; | 376 | return 0; |
413 | 377 | ||
414 | give_sigsegv: | 378 | give_sigsegv: |
415 | force_sigsegv(sig, current); | 379 | force_sigsegv(sig, current); |
380 | return -EFAULT; | ||
416 | } | 381 | } |
417 | 382 | ||
418 | /* | 383 | /* |
419 | * OK, we're invoking a handler | 384 | * OK, we're invoking a handler |
420 | */ | 385 | */ |
421 | 386 | ||
422 | static void | 387 | static int |
423 | handle_signal(unsigned long sig, struct k_sigaction *ka, | 388 | handle_signal(unsigned long sig, struct k_sigaction *ka, |
424 | siginfo_t *info, sigset_t *oldset, struct pt_regs * regs) | 389 | siginfo_t *info, sigset_t *oldset, struct pt_regs * regs) |
425 | { | 390 | { |
391 | int ret; | ||
392 | |||
426 | /* Set up the stack frame */ | 393 | /* Set up the stack frame */ |
427 | if (ka->sa.sa_flags & SA_SIGINFO) | 394 | if (ka->sa.sa_flags & SA_SIGINFO) |
428 | setup_rt_frame(sig, ka, info, oldset, regs); | 395 | ret = setup_rt_frame(sig, ka, info, oldset, regs); |
429 | else | 396 | else |
430 | setup_frame(sig, ka, oldset, regs); | 397 | ret = setup_frame(sig, ka, oldset, regs); |
398 | |||
399 | if (ret == 0) { | ||
400 | spin_lock_irq(¤t->sighand->siglock); | ||
401 | sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); | ||
402 | if (!(ka->sa.sa_flags & SA_NODEFER)) | ||
403 | sigaddset(¤t->blocked,sig); | ||
404 | recalc_sigpending(); | ||
405 | spin_unlock_irq(¤t->sighand->siglock); | ||
406 | } | ||
431 | 407 | ||
432 | spin_lock_irq(¤t->sighand->siglock); | 408 | return ret; |
433 | sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); | ||
434 | if (!(ka->sa.sa_flags & SA_NODEFER)) | ||
435 | sigaddset(¤t->blocked,sig); | ||
436 | recalc_sigpending(); | ||
437 | spin_unlock_irq(¤t->sighand->siglock); | ||
438 | } | 409 | } |
439 | 410 | ||
440 | /* | 411 | /* |
@@ -446,12 +417,13 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, | |||
446 | * the kernel can handle, and then we build all the user-level signal handling | 417 | * the kernel can handle, and then we build all the user-level signal handling |
447 | * stack-frames in one go after that. | 418 | * stack-frames in one go after that. |
448 | */ | 419 | */ |
449 | int do_signal(struct pt_regs *regs, sigset_t *oldset) | 420 | void do_signal(struct pt_regs *regs) |
450 | { | 421 | { |
451 | unsigned long retval = 0, continue_addr = 0, restart_addr = 0; | 422 | unsigned long retval = 0, continue_addr = 0, restart_addr = 0; |
452 | siginfo_t info; | 423 | siginfo_t info; |
453 | int signr; | 424 | int signr; |
454 | struct k_sigaction ka; | 425 | struct k_sigaction ka; |
426 | sigset_t *oldset; | ||
455 | 427 | ||
456 | /* | 428 | /* |
457 | * We want the common case to go fast, which | 429 | * We want the common case to go fast, which |
@@ -460,9 +432,11 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
460 | * if so. | 432 | * if so. |
461 | */ | 433 | */ |
462 | if (!user_mode(regs)) | 434 | if (!user_mode(regs)) |
463 | return 1; | 435 | return; |
464 | 436 | ||
465 | if (!oldset) | 437 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
438 | oldset = ¤t->saved_sigmask; | ||
439 | else | ||
466 | oldset = ¤t->blocked; | 440 | oldset = ¤t->blocked; |
467 | 441 | ||
468 | /* Are we from a system call? */ | 442 | /* Are we from a system call? */ |
@@ -473,12 +447,14 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
473 | 447 | ||
474 | /* Prepare for system call restart. We do this here so that a | 448 | /* Prepare for system call restart. We do this here so that a |
475 | debugger will see the already changed PSW. */ | 449 | debugger will see the already changed PSW. */ |
476 | if (retval == -ERESTARTNOHAND || | 450 | switch (retval) { |
477 | retval == -ERESTARTSYS || | 451 | case -ERESTARTNOHAND: |
478 | retval == -ERESTARTNOINTR) { | 452 | case -ERESTARTSYS: |
453 | case -ERESTARTNOINTR: | ||
479 | regs->gprs[2] = regs->orig_gpr2; | 454 | regs->gprs[2] = regs->orig_gpr2; |
480 | regs->psw.addr = restart_addr; | 455 | regs->psw.addr = restart_addr; |
481 | } else if (retval == -ERESTART_RESTARTBLOCK) { | 456 | break; |
457 | case -ERESTART_RESTARTBLOCK: | ||
482 | regs->gprs[2] = -EINTR; | 458 | regs->gprs[2] = -EINTR; |
483 | } | 459 | } |
484 | } | 460 | } |
@@ -503,17 +479,38 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
503 | /* Whee! Actually deliver the signal. */ | 479 | /* Whee! Actually deliver the signal. */ |
504 | #ifdef CONFIG_COMPAT | 480 | #ifdef CONFIG_COMPAT |
505 | if (test_thread_flag(TIF_31BIT)) { | 481 | if (test_thread_flag(TIF_31BIT)) { |
506 | extern void handle_signal32(unsigned long sig, | 482 | extern int handle_signal32(unsigned long sig, |
507 | struct k_sigaction *ka, | 483 | struct k_sigaction *ka, |
508 | siginfo_t *info, | 484 | siginfo_t *info, |
509 | sigset_t *oldset, | 485 | sigset_t *oldset, |
510 | struct pt_regs *regs); | 486 | struct pt_regs *regs); |
511 | handle_signal32(signr, &ka, &info, oldset, regs); | 487 | if (handle_signal32( |
512 | return 1; | 488 | signr, &ka, &info, oldset, regs) == 0) { |
489 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
490 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
491 | } | ||
492 | return; | ||
513 | } | 493 | } |
514 | #endif | 494 | #endif |
515 | handle_signal(signr, &ka, &info, oldset, regs); | 495 | if (handle_signal(signr, &ka, &info, oldset, regs) == 0) { |
516 | return 1; | 496 | /* |
497 | * A signal was successfully delivered; the saved | ||
498 | * sigmask will have been stored in the signal frame, | ||
499 | * and will be restored by sigreturn, so we can simply | ||
500 | * clear the TIF_RESTORE_SIGMASK flag. | ||
501 | */ | ||
502 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
503 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
504 | } | ||
505 | return; | ||
506 | } | ||
507 | |||
508 | /* | ||
509 | * If there's no signal to deliver, we just put the saved sigmask back. | ||
510 | */ | ||
511 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | ||
512 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
513 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | ||
517 | } | 514 | } |
518 | 515 | ||
519 | /* Restart a different system call. */ | 516 | /* Restart a different system call. */ |
@@ -522,5 +519,4 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
522 | regs->gprs[2] = __NR_restart_syscall; | 519 | regs->gprs[2] = __NR_restart_syscall; |
523 | set_thread_flag(TIF_RESTART_SVC); | 520 | set_thread_flag(TIF_RESTART_SVC); |
524 | } | 521 | } |
525 | return 0; | ||
526 | } | 522 | } |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 426d7cafdab3..3280345efacd 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -80,7 +80,7 @@ NI_SYSCALL /* old sgetmask syscall*/ | |||
80 | NI_SYSCALL /* old ssetmask syscall*/ | 80 | NI_SYSCALL /* old ssetmask syscall*/ |
81 | SYSCALL(sys_setreuid16,sys_ni_syscall,sys32_setreuid16_wrapper) /* old setreuid16 syscall */ | 81 | SYSCALL(sys_setreuid16,sys_ni_syscall,sys32_setreuid16_wrapper) /* old setreuid16 syscall */ |
82 | SYSCALL(sys_setregid16,sys_ni_syscall,sys32_setregid16_wrapper) /* old setregid16 syscall */ | 82 | SYSCALL(sys_setregid16,sys_ni_syscall,sys32_setregid16_wrapper) /* old setregid16 syscall */ |
83 | SYSCALL(sys_sigsuspend_glue,sys_sigsuspend_glue,sys32_sigsuspend_glue) | 83 | SYSCALL(sys_sigsuspend,sys_sigsuspend,sys_sigsuspend_wrapper) |
84 | SYSCALL(sys_sigpending,sys_sigpending,compat_sys_sigpending_wrapper) | 84 | SYSCALL(sys_sigpending,sys_sigpending,compat_sys_sigpending_wrapper) |
85 | SYSCALL(sys_sethostname,sys_sethostname,sys32_sethostname_wrapper) | 85 | SYSCALL(sys_sethostname,sys_sethostname,sys32_sethostname_wrapper) |
86 | SYSCALL(sys_setrlimit,sys_setrlimit,compat_sys_setrlimit_wrapper) /* 75 */ | 86 | SYSCALL(sys_setrlimit,sys_setrlimit,compat_sys_setrlimit_wrapper) /* 75 */ |
@@ -187,7 +187,7 @@ SYSCALL(sys_rt_sigprocmask,sys_rt_sigprocmask,sys32_rt_sigprocmask_wrapper) /* 1 | |||
187 | SYSCALL(sys_rt_sigpending,sys_rt_sigpending,sys32_rt_sigpending_wrapper) | 187 | SYSCALL(sys_rt_sigpending,sys_rt_sigpending,sys32_rt_sigpending_wrapper) |
188 | SYSCALL(sys_rt_sigtimedwait,sys_rt_sigtimedwait,compat_sys_rt_sigtimedwait_wrapper) | 188 | SYSCALL(sys_rt_sigtimedwait,sys_rt_sigtimedwait,compat_sys_rt_sigtimedwait_wrapper) |
189 | SYSCALL(sys_rt_sigqueueinfo,sys_rt_sigqueueinfo,sys32_rt_sigqueueinfo_wrapper) | 189 | SYSCALL(sys_rt_sigqueueinfo,sys_rt_sigqueueinfo,sys32_rt_sigqueueinfo_wrapper) |
190 | SYSCALL(sys_rt_sigsuspend_glue,sys_rt_sigsuspend_glue,sys32_rt_sigsuspend_glue) | 190 | SYSCALL(sys_rt_sigsuspend,sys_rt_sigsuspend,compat_sys_rt_sigsuspend_wrapper) |
191 | SYSCALL(sys_pread64,sys_pread64,sys32_pread64_wrapper) /* 180 */ | 191 | SYSCALL(sys_pread64,sys_pread64,sys32_pread64_wrapper) /* 180 */ |
192 | SYSCALL(sys_pwrite64,sys_pwrite64,sys32_pwrite64_wrapper) | 192 | SYSCALL(sys_pwrite64,sys_pwrite64,sys32_pwrite64_wrapper) |
193 | SYSCALL(sys_chown16,sys_ni_syscall,sys32_chown16_wrapper) /* old chown16 syscall */ | 193 | SYSCALL(sys_chown16,sys_ni_syscall,sys32_chown16_wrapper) /* old chown16 syscall */ |
@@ -293,5 +293,21 @@ SYSCALL(sys_waitid,sys_waitid,compat_sys_waitid_wrapper) | |||
293 | SYSCALL(sys_ioprio_set,sys_ioprio_set,sys_ioprio_set_wrapper) | 293 | SYSCALL(sys_ioprio_set,sys_ioprio_set,sys_ioprio_set_wrapper) |
294 | SYSCALL(sys_ioprio_get,sys_ioprio_get,sys_ioprio_get_wrapper) | 294 | SYSCALL(sys_ioprio_get,sys_ioprio_get,sys_ioprio_get_wrapper) |
295 | SYSCALL(sys_inotify_init,sys_inotify_init,sys_inotify_init) | 295 | SYSCALL(sys_inotify_init,sys_inotify_init,sys_inotify_init) |
296 | SYSCALL(sys_inotify_add_watch,sys_inotify_add_watch,sys_inotify_add_watch_wrapper) | 296 | SYSCALL(sys_inotify_add_watch,sys_inotify_add_watch,sys_inotify_add_watch_wrapper) /* 285 */ |
297 | SYSCALL(sys_inotify_rm_watch,sys_inotify_rm_watch,sys_inotify_rm_watch_wrapper) | 297 | SYSCALL(sys_inotify_rm_watch,sys_inotify_rm_watch,sys_inotify_rm_watch_wrapper) |
298 | NI_SYSCALL /* 287 sys_migrate_pages */ | ||
299 | SYSCALL(sys_openat,sys_openat,compat_sys_openat_wrapper) | ||
300 | SYSCALL(sys_mkdirat,sys_mkdirat,sys_mkdirat_wrapper) | ||
301 | SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */ | ||
302 | SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper) | ||
303 | SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat_wrapper) | ||
304 | SYSCALL(sys_newfstatat,sys_newfstatat,compat_sys_newfstatat_wrapper) | ||
305 | SYSCALL(sys_unlinkat,sys_unlinkat,sys_unlinkat_wrapper) | ||
306 | SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */ | ||
307 | SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper) | ||
308 | SYSCALL(sys_symlinkat,sys_symlinkat,sys_symlinkat_wrapper) | ||
309 | SYSCALL(sys_readlinkat,sys_readlinkat,sys_readlinkat_wrapper) | ||
310 | SYSCALL(sys_fchmodat,sys_fchmodat,sys_fchmodat_wrapper) | ||
311 | SYSCALL(sys_faccessat,sys_faccessat,sys_faccessat_wrapper) /* 300 */ | ||
312 | SYSCALL(sys_pselect6,sys_pselect6,compat_sys_pselect6_wrapper) | ||
313 | SYSCALL(sys_ppoll,sys_ppoll,compat_sys_ppoll_wrapper) | ||
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 7c0fe152a111..fea043b69b91 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -61,9 +61,18 @@ extern unsigned long wall_jiffies; | |||
61 | */ | 61 | */ |
62 | unsigned long long sched_clock(void) | 62 | unsigned long long sched_clock(void) |
63 | { | 63 | { |
64 | return ((get_clock() - jiffies_timer_cc) * 1000) >> 12; | 64 | return ((get_clock() - jiffies_timer_cc) * 125) >> 9; |
65 | } | 65 | } |
66 | 66 | ||
67 | /* | ||
68 | * Monotonic_clock - returns # of nanoseconds passed since time_init() | ||
69 | */ | ||
70 | unsigned long long monotonic_clock(void) | ||
71 | { | ||
72 | return sched_clock(); | ||
73 | } | ||
74 | EXPORT_SYMBOL(monotonic_clock); | ||
75 | |||
67 | void tod_to_timeval(__u64 todval, struct timespec *xtime) | 76 | void tod_to_timeval(__u64 todval, struct timespec *xtime) |
68 | { | 77 | { |
69 | unsigned long long sec; | 78 | unsigned long long sec; |
diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile index f20b51ff1d86..e05d087a6eae 100644 --- a/arch/s390/lib/Makefile +++ b/arch/s390/lib/Makefile | |||
@@ -6,4 +6,4 @@ EXTRA_AFLAGS := -traditional | |||
6 | 6 | ||
7 | lib-y += delay.o string.o | 7 | lib-y += delay.o string.o |
8 | lib-y += $(if $(CONFIG_64BIT),uaccess64.o,uaccess.o) | 8 | lib-y += $(if $(CONFIG_64BIT),uaccess64.o,uaccess.o) |
9 | lib-$(CONFIG_SMP) += spinlock.o \ No newline at end of file | 9 | lib-$(CONFIG_SMP) += spinlock.o |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 01bc7d589afe..504d56f8ca7f 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -396,14 +396,8 @@ source "arch/sh/boards/renesas/hs7751rvoip/Kconfig" | |||
396 | 396 | ||
397 | source "arch/sh/boards/renesas/rts7751r2d/Kconfig" | 397 | source "arch/sh/boards/renesas/rts7751r2d/Kconfig" |
398 | 398 | ||
399 | config SH_PCLK_FREQ_BOOL | ||
400 | bool "Set default pclk frequency" | ||
401 | default y if !SH_RTC | ||
402 | default n | ||
403 | |||
404 | config SH_PCLK_FREQ | 399 | config SH_PCLK_FREQ |
405 | int "Peripheral clock frequency (in Hz)" | 400 | int "Peripheral clock frequency (in Hz)" |
406 | depends on SH_PCLK_FREQ_BOOL | ||
407 | default "50000000" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7780 | 401 | default "50000000" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7780 |
408 | default "60000000" if CPU_SUBTYPE_SH7751 | 402 | default "60000000" if CPU_SUBTYPE_SH7751 |
409 | default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || CPU_SUBTYPE_SH7760 | 403 | default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || CPU_SUBTYPE_SH7760 |
diff --git a/arch/sh/boards/superh/microdev/io.c b/arch/sh/boards/superh/microdev/io.c index fe83b2c03076..1ed7f880b8c7 100644 --- a/arch/sh/boards/superh/microdev/io.c +++ b/arch/sh/boards/superh/microdev/io.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
17 | #include <linux/wait.h> | 17 | #include <linux/wait.h> |
18 | #include <asm/io.h> | 18 | #include <asm/io.h> |
19 | #include <asm/mach/io.h> | 19 | #include <asm/microdev.h> |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * we need to have a 'safe' address to re-direct all I/O requests | 22 | * we need to have a 'safe' address to re-direct all I/O requests |
@@ -52,8 +52,90 @@ | |||
52 | #define IO_ISP1161_PHYS 0xa7700000ul /* Physical address of Philips ISP1161x USB chip */ | 52 | #define IO_ISP1161_PHYS 0xa7700000ul /* Physical address of Philips ISP1161x USB chip */ |
53 | #define IO_SUPERIO_PHYS 0xa7800000ul /* Physical address of SMSC FDC37C93xAPM SuperIO chip */ | 53 | #define IO_SUPERIO_PHYS 0xa7800000ul /* Physical address of SMSC FDC37C93xAPM SuperIO chip */ |
54 | 54 | ||
55 | #define PORT2ADDR(x) (microdev_isa_port2addr(x)) | 55 | /* |
56 | * map I/O ports to memory-mapped addresses | ||
57 | */ | ||
58 | static unsigned long microdev_isa_port2addr(unsigned long offset) | ||
59 | { | ||
60 | unsigned long result; | ||
61 | |||
62 | if ((offset >= IO_LAN91C111_BASE) && | ||
63 | (offset < IO_LAN91C111_BASE + IO_LAN91C111_EXTENT)) { | ||
64 | /* | ||
65 | * SMSC LAN91C111 Ethernet chip | ||
66 | */ | ||
67 | result = IO_LAN91C111_PHYS + offset - IO_LAN91C111_BASE; | ||
68 | } else if ((offset >= IO_SUPERIO_BASE) && | ||
69 | (offset < IO_SUPERIO_BASE + IO_SUPERIO_EXTENT)) { | ||
70 | /* | ||
71 | * SMSC FDC37C93xAPM SuperIO chip | ||
72 | * | ||
73 | * Configuration Registers | ||
74 | */ | ||
75 | result = IO_SUPERIO_PHYS + (offset << 1); | ||
76 | #if 0 | ||
77 | } else if (offset == KBD_DATA_REG || offset == KBD_CNTL_REG || | ||
78 | offset == KBD_STATUS_REG) { | ||
79 | /* | ||
80 | * SMSC FDC37C93xAPM SuperIO chip | ||
81 | * | ||
82 | * PS/2 Keyboard + Mouse (ports 0x60 and 0x64). | ||
83 | */ | ||
84 | result = IO_SUPERIO_PHYS + (offset << 1); | ||
85 | #endif | ||
86 | } else if (((offset >= IO_IDE1_BASE) && | ||
87 | (offset < IO_IDE1_BASE + IO_IDE_EXTENT)) || | ||
88 | (offset == IO_IDE1_MISC)) { | ||
89 | /* | ||
90 | * SMSC FDC37C93xAPM SuperIO chip | ||
91 | * | ||
92 | * IDE #1 | ||
93 | */ | ||
94 | result = IO_SUPERIO_PHYS + (offset << 1); | ||
95 | } else if (((offset >= IO_IDE2_BASE) && | ||
96 | (offset < IO_IDE2_BASE + IO_IDE_EXTENT)) || | ||
97 | (offset == IO_IDE2_MISC)) { | ||
98 | /* | ||
99 | * SMSC FDC37C93xAPM SuperIO chip | ||
100 | * | ||
101 | * IDE #2 | ||
102 | */ | ||
103 | result = IO_SUPERIO_PHYS + (offset << 1); | ||
104 | } else if ((offset >= IO_SERIAL1_BASE) && | ||
105 | (offset < IO_SERIAL1_BASE + IO_SERIAL_EXTENT)) { | ||
106 | /* | ||
107 | * SMSC FDC37C93xAPM SuperIO chip | ||
108 | * | ||
109 | * Serial #1 | ||
110 | */ | ||
111 | result = IO_SUPERIO_PHYS + (offset << 1); | ||
112 | } else if ((offset >= IO_SERIAL2_BASE) && | ||
113 | (offset < IO_SERIAL2_BASE + IO_SERIAL_EXTENT)) { | ||
114 | /* | ||
115 | * SMSC FDC37C93xAPM SuperIO chip | ||
116 | * | ||
117 | * Serial #2 | ||
118 | */ | ||
119 | result = IO_SUPERIO_PHYS + (offset << 1); | ||
120 | } else if ((offset >= IO_ISP1161_BASE) && | ||
121 | (offset < IO_ISP1161_BASE + IO_ISP1161_EXTENT)) { | ||
122 | /* | ||
123 | * Philips USB ISP1161x chip | ||
124 | */ | ||
125 | result = IO_ISP1161_PHYS + offset - IO_ISP1161_BASE; | ||
126 | } else { | ||
127 | /* | ||
128 | * safe default. | ||
129 | */ | ||
130 | printk("Warning: unexpected port in %s( offset = 0x%lx )\n", | ||
131 | __FUNCTION__, offset); | ||
132 | result = PVR; | ||
133 | } | ||
134 | |||
135 | return result; | ||
136 | } | ||
56 | 137 | ||
138 | #define PORT2ADDR(x) (microdev_isa_port2addr(x)) | ||
57 | 139 | ||
58 | static inline void delay(void) | 140 | static inline void delay(void) |
59 | { | 141 | { |
@@ -94,6 +176,17 @@ unsigned int microdev_inl(unsigned long port) | |||
94 | return *(volatile unsigned int*)PORT2ADDR(port); | 176 | return *(volatile unsigned int*)PORT2ADDR(port); |
95 | } | 177 | } |
96 | 178 | ||
179 | void microdev_outw(unsigned short b, unsigned long port) | ||
180 | { | ||
181 | #ifdef CONFIG_PCI | ||
182 | if (port >= PCIBIOS_MIN_IO) { | ||
183 | microdev_pci_outw(b, port); | ||
184 | return; | ||
185 | } | ||
186 | #endif | ||
187 | *(volatile unsigned short*)PORT2ADDR(port) = b; | ||
188 | } | ||
189 | |||
97 | void microdev_outb(unsigned char b, unsigned long port) | 190 | void microdev_outb(unsigned char b, unsigned long port) |
98 | { | 191 | { |
99 | #ifdef CONFIG_PCI | 192 | #ifdef CONFIG_PCI |
@@ -158,17 +251,6 @@ void microdev_outb(unsigned char b, unsigned long port) | |||
158 | } | 251 | } |
159 | } | 252 | } |
160 | 253 | ||
161 | void microdev_outw(unsigned short b, unsigned long port) | ||
162 | { | ||
163 | #ifdef CONFIG_PCI | ||
164 | if (port >= PCIBIOS_MIN_IO) { | ||
165 | microdev_pci_outw(b, port); | ||
166 | return; | ||
167 | } | ||
168 | #endif | ||
169 | *(volatile unsigned short*)PORT2ADDR(port) = b; | ||
170 | } | ||
171 | |||
172 | void microdev_outl(unsigned int b, unsigned long port) | 254 | void microdev_outl(unsigned int b, unsigned long port) |
173 | { | 255 | { |
174 | #ifdef CONFIG_PCI | 256 | #ifdef CONFIG_PCI |
@@ -284,87 +366,3 @@ void microdev_outsl(unsigned long port, const void *buffer, unsigned long count) | |||
284 | while (count--) | 366 | while (count--) |
285 | *port_addr = *buf++; | 367 | *port_addr = *buf++; |
286 | } | 368 | } |
287 | |||
288 | /* | ||
289 | * map I/O ports to memory-mapped addresses | ||
290 | */ | ||
291 | unsigned long microdev_isa_port2addr(unsigned long offset) | ||
292 | { | ||
293 | unsigned long result; | ||
294 | |||
295 | if ((offset >= IO_LAN91C111_BASE) && | ||
296 | (offset < IO_LAN91C111_BASE + IO_LAN91C111_EXTENT)) { | ||
297 | /* | ||
298 | * SMSC LAN91C111 Ethernet chip | ||
299 | */ | ||
300 | result = IO_LAN91C111_PHYS + offset - IO_LAN91C111_BASE; | ||
301 | } else if ((offset >= IO_SUPERIO_BASE) && | ||
302 | (offset < IO_SUPERIO_BASE + IO_SUPERIO_EXTENT)) { | ||
303 | /* | ||
304 | * SMSC FDC37C93xAPM SuperIO chip | ||
305 | * | ||
306 | * Configuration Registers | ||
307 | */ | ||
308 | result = IO_SUPERIO_PHYS + (offset << 1); | ||
309 | #if 0 | ||
310 | } else if (offset == KBD_DATA_REG || offset == KBD_CNTL_REG || | ||
311 | offset == KBD_STATUS_REG) { | ||
312 | /* | ||
313 | * SMSC FDC37C93xAPM SuperIO chip | ||
314 | * | ||
315 | * PS/2 Keyboard + Mouse (ports 0x60 and 0x64). | ||
316 | */ | ||
317 | result = IO_SUPERIO_PHYS + (offset << 1); | ||
318 | #endif | ||
319 | } else if (((offset >= IO_IDE1_BASE) && | ||
320 | (offset < IO_IDE1_BASE + IO_IDE_EXTENT)) || | ||
321 | (offset == IO_IDE1_MISC)) { | ||
322 | /* | ||
323 | * SMSC FDC37C93xAPM SuperIO chip | ||
324 | * | ||
325 | * IDE #1 | ||
326 | */ | ||
327 | result = IO_SUPERIO_PHYS + (offset << 1); | ||
328 | } else if (((offset >= IO_IDE2_BASE) && | ||
329 | (offset < IO_IDE2_BASE + IO_IDE_EXTENT)) || | ||
330 | (offset == IO_IDE2_MISC)) { | ||
331 | /* | ||
332 | * SMSC FDC37C93xAPM SuperIO chip | ||
333 | * | ||
334 | * IDE #2 | ||
335 | */ | ||
336 | result = IO_SUPERIO_PHYS + (offset << 1); | ||
337 | } else if ((offset >= IO_SERIAL1_BASE) && | ||
338 | (offset < IO_SERIAL1_BASE + IO_SERIAL_EXTENT)) { | ||
339 | /* | ||
340 | * SMSC FDC37C93xAPM SuperIO chip | ||
341 | * | ||
342 | * Serial #1 | ||
343 | */ | ||
344 | result = IO_SUPERIO_PHYS + (offset << 1); | ||
345 | } else if ((offset >= IO_SERIAL2_BASE) && | ||
346 | (offset < IO_SERIAL2_BASE + IO_SERIAL_EXTENT)) { | ||
347 | /* | ||
348 | * SMSC FDC37C93xAPM SuperIO chip | ||
349 | * | ||
350 | * Serial #2 | ||
351 | */ | ||
352 | result = IO_SUPERIO_PHYS + (offset << 1); | ||
353 | } else if ((offset >= IO_ISP1161_BASE) && | ||
354 | (offset < IO_ISP1161_BASE + IO_ISP1161_EXTENT)) { | ||
355 | /* | ||
356 | * Philips USB ISP1161x chip | ||
357 | */ | ||
358 | result = IO_ISP1161_PHYS + offset - IO_ISP1161_BASE; | ||
359 | } else { | ||
360 | /* | ||
361 | * safe default. | ||
362 | */ | ||
363 | printk("Warning: unexpected port in %s( offset = 0x%lx )\n", | ||
364 | __FUNCTION__, offset); | ||
365 | result = PVR; | ||
366 | } | ||
367 | |||
368 | return result; | ||
369 | } | ||
370 | |||
diff --git a/arch/sh/boards/superh/microdev/irq.c b/arch/sh/boards/superh/microdev/irq.c index 1395c1e65da4..efcbd86b7cd2 100644 --- a/arch/sh/boards/superh/microdev/irq.c +++ b/arch/sh/boards/superh/microdev/irq.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <asm/system.h> | 16 | #include <asm/system.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/mach/irq.h> | 18 | #include <asm/microdev.h> |
19 | 19 | ||
20 | #define NUM_EXTERNAL_IRQS 16 /* IRL0 .. IRL15 */ | 20 | #define NUM_EXTERNAL_IRQS 16 /* IRL0 .. IRL15 */ |
21 | 21 | ||
diff --git a/arch/sh/boards/superh/microdev/setup.c b/arch/sh/boards/superh/microdev/setup.c index 1c1d65fb12df..892b14d31405 100644 --- a/arch/sh/boards/superh/microdev/setup.c +++ b/arch/sh/boards/superh/microdev/setup.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) | 4 | * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) |
5 | * Copyright (C) 2003, 2004 SuperH, Inc. | 5 | * Copyright (C) 2003, 2004 SuperH, Inc. |
6 | * Copyright (C) 2004 Paul Mundt | 6 | * Copyright (C) 2004, 2005 Paul Mundt |
7 | * | 7 | * |
8 | * SuperH SH4-202 MicroDev board support. | 8 | * SuperH SH4-202 MicroDev board support. |
9 | * | 9 | * |
@@ -15,11 +15,10 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
18 | #include <video/s1d13xxxfb.h> | ||
19 | #include <asm/microdev.h> | ||
18 | #include <asm/io.h> | 20 | #include <asm/io.h> |
19 | #include <asm/mach/irq.h> | ||
20 | #include <asm/mach/io.h> | ||
21 | #include <asm/machvec.h> | 21 | #include <asm/machvec.h> |
22 | #include <asm/machvec_init.h> | ||
23 | 22 | ||
24 | extern void microdev_heartbeat(void); | 23 | extern void microdev_heartbeat(void); |
25 | 24 | ||
@@ -51,8 +50,6 @@ struct sh_machine_vector mv_sh4202_microdev __initmv = { | |||
51 | .mv_outsw = microdev_outsw, | 50 | .mv_outsw = microdev_outsw, |
52 | .mv_outsl = microdev_outsl, | 51 | .mv_outsl = microdev_outsl, |
53 | 52 | ||
54 | .mv_isa_port2addr = microdev_isa_port2addr, | ||
55 | |||
56 | .mv_init_irq = init_microdev_irq, | 53 | .mv_init_irq = init_microdev_irq, |
57 | 54 | ||
58 | #ifdef CONFIG_HEARTBEAT | 55 | #ifdef CONFIG_HEARTBEAT |
@@ -142,16 +139,161 @@ static struct platform_device smc91x_device = { | |||
142 | .resource = smc91x_resources, | 139 | .resource = smc91x_resources, |
143 | }; | 140 | }; |
144 | 141 | ||
145 | static int __init smc91x_setup(void) | 142 | #ifdef CONFIG_FB_S1D13XXX |
143 | static struct s1d13xxxfb_regval s1d13806_initregs[] = { | ||
144 | { S1DREG_MISC, 0x00 }, | ||
145 | { S1DREG_COM_DISP_MODE, 0x00 }, | ||
146 | { S1DREG_GPIO_CNF0, 0x00 }, | ||
147 | { S1DREG_GPIO_CNF1, 0x00 }, | ||
148 | { S1DREG_GPIO_CTL0, 0x00 }, | ||
149 | { S1DREG_GPIO_CTL1, 0x00 }, | ||
150 | { S1DREG_CLK_CNF, 0x02 }, | ||
151 | { S1DREG_LCD_CLK_CNF, 0x01 }, | ||
152 | { S1DREG_CRT_CLK_CNF, 0x03 }, | ||
153 | { S1DREG_MPLUG_CLK_CNF, 0x03 }, | ||
154 | { S1DREG_CPU2MEM_WST_SEL, 0x02 }, | ||
155 | { S1DREG_SDRAM_REF_RATE, 0x03 }, | ||
156 | { S1DREG_SDRAM_TC0, 0x00 }, | ||
157 | { S1DREG_SDRAM_TC1, 0x01 }, | ||
158 | { S1DREG_MEM_CNF, 0x80 }, | ||
159 | { S1DREG_PANEL_TYPE, 0x25 }, | ||
160 | { S1DREG_MOD_RATE, 0x00 }, | ||
161 | { S1DREG_LCD_DISP_HWIDTH, 0x63 }, | ||
162 | { S1DREG_LCD_NDISP_HPER, 0x1e }, | ||
163 | { S1DREG_TFT_FPLINE_START, 0x06 }, | ||
164 | { S1DREG_TFT_FPLINE_PWIDTH, 0x03 }, | ||
165 | { S1DREG_LCD_DISP_VHEIGHT0, 0x57 }, | ||
166 | { S1DREG_LCD_DISP_VHEIGHT1, 0x02 }, | ||
167 | { S1DREG_LCD_NDISP_VPER, 0x00 }, | ||
168 | { S1DREG_TFT_FPFRAME_START, 0x0a }, | ||
169 | { S1DREG_TFT_FPFRAME_PWIDTH, 0x81 }, | ||
170 | { S1DREG_LCD_DISP_MODE, 0x03 }, | ||
171 | { S1DREG_LCD_MISC, 0x00 }, | ||
172 | { S1DREG_LCD_DISP_START0, 0x00 }, | ||
173 | { S1DREG_LCD_DISP_START1, 0x00 }, | ||
174 | { S1DREG_LCD_DISP_START2, 0x00 }, | ||
175 | { S1DREG_LCD_MEM_OFF0, 0x90 }, | ||
176 | { S1DREG_LCD_MEM_OFF1, 0x01 }, | ||
177 | { S1DREG_LCD_PIX_PAN, 0x00 }, | ||
178 | { S1DREG_LCD_DISP_FIFO_HTC, 0x00 }, | ||
179 | { S1DREG_LCD_DISP_FIFO_LTC, 0x00 }, | ||
180 | { S1DREG_CRT_DISP_HWIDTH, 0x63 }, | ||
181 | { S1DREG_CRT_NDISP_HPER, 0x1f }, | ||
182 | { S1DREG_CRT_HRTC_START, 0x04 }, | ||
183 | { S1DREG_CRT_HRTC_PWIDTH, 0x8f }, | ||
184 | { S1DREG_CRT_DISP_VHEIGHT0, 0x57 }, | ||
185 | { S1DREG_CRT_DISP_VHEIGHT1, 0x02 }, | ||
186 | { S1DREG_CRT_NDISP_VPER, 0x1b }, | ||
187 | { S1DREG_CRT_VRTC_START, 0x00 }, | ||
188 | { S1DREG_CRT_VRTC_PWIDTH, 0x83 }, | ||
189 | { S1DREG_TV_OUT_CTL, 0x10 }, | ||
190 | { S1DREG_CRT_DISP_MODE, 0x05 }, | ||
191 | { S1DREG_CRT_DISP_START0, 0x00 }, | ||
192 | { S1DREG_CRT_DISP_START1, 0x00 }, | ||
193 | { S1DREG_CRT_DISP_START2, 0x00 }, | ||
194 | { S1DREG_CRT_MEM_OFF0, 0x20 }, | ||
195 | { S1DREG_CRT_MEM_OFF1, 0x03 }, | ||
196 | { S1DREG_CRT_PIX_PAN, 0x00 }, | ||
197 | { S1DREG_CRT_DISP_FIFO_HTC, 0x00 }, | ||
198 | { S1DREG_CRT_DISP_FIFO_LTC, 0x00 }, | ||
199 | { S1DREG_LCD_CUR_CTL, 0x00 }, | ||
200 | { S1DREG_LCD_CUR_START, 0x01 }, | ||
201 | { S1DREG_LCD_CUR_XPOS0, 0x00 }, | ||
202 | { S1DREG_LCD_CUR_XPOS1, 0x00 }, | ||
203 | { S1DREG_LCD_CUR_YPOS0, 0x00 }, | ||
204 | { S1DREG_LCD_CUR_YPOS1, 0x00 }, | ||
205 | { S1DREG_LCD_CUR_BCTL0, 0x00 }, | ||
206 | { S1DREG_LCD_CUR_GCTL0, 0x00 }, | ||
207 | { S1DREG_LCD_CUR_RCTL0, 0x00 }, | ||
208 | { S1DREG_LCD_CUR_BCTL1, 0x1f }, | ||
209 | { S1DREG_LCD_CUR_GCTL1, 0x3f }, | ||
210 | { S1DREG_LCD_CUR_RCTL1, 0x1f }, | ||
211 | { S1DREG_LCD_CUR_FIFO_HTC, 0x00 }, | ||
212 | { S1DREG_CRT_CUR_CTL, 0x00 }, | ||
213 | { S1DREG_CRT_CUR_START, 0x01 }, | ||
214 | { S1DREG_CRT_CUR_XPOS0, 0x00 }, | ||
215 | { S1DREG_CRT_CUR_XPOS1, 0x00 }, | ||
216 | { S1DREG_CRT_CUR_YPOS0, 0x00 }, | ||
217 | { S1DREG_CRT_CUR_YPOS1, 0x00 }, | ||
218 | { S1DREG_CRT_CUR_BCTL0, 0x00 }, | ||
219 | { S1DREG_CRT_CUR_GCTL0, 0x00 }, | ||
220 | { S1DREG_CRT_CUR_RCTL0, 0x00 }, | ||
221 | { S1DREG_CRT_CUR_BCTL1, 0x1f }, | ||
222 | { S1DREG_CRT_CUR_GCTL1, 0x3f }, | ||
223 | { S1DREG_CRT_CUR_RCTL1, 0x1f }, | ||
224 | { S1DREG_CRT_CUR_FIFO_HTC, 0x00 }, | ||
225 | { S1DREG_BBLT_CTL0, 0x00 }, | ||
226 | { S1DREG_BBLT_CTL1, 0x00 }, | ||
227 | { S1DREG_BBLT_CC_EXP, 0x00 }, | ||
228 | { S1DREG_BBLT_OP, 0x00 }, | ||
229 | { S1DREG_BBLT_SRC_START0, 0x00 }, | ||
230 | { S1DREG_BBLT_SRC_START1, 0x00 }, | ||
231 | { S1DREG_BBLT_SRC_START2, 0x00 }, | ||
232 | { S1DREG_BBLT_DST_START0, 0x00 }, | ||
233 | { S1DREG_BBLT_DST_START1, 0x00 }, | ||
234 | { S1DREG_BBLT_DST_START2, 0x00 }, | ||
235 | { S1DREG_BBLT_MEM_OFF0, 0x00 }, | ||
236 | { S1DREG_BBLT_MEM_OFF1, 0x00 }, | ||
237 | { S1DREG_BBLT_WIDTH0, 0x00 }, | ||
238 | { S1DREG_BBLT_WIDTH1, 0x00 }, | ||
239 | { S1DREG_BBLT_HEIGHT0, 0x00 }, | ||
240 | { S1DREG_BBLT_HEIGHT1, 0x00 }, | ||
241 | { S1DREG_BBLT_BGC0, 0x00 }, | ||
242 | { S1DREG_BBLT_BGC1, 0x00 }, | ||
243 | { S1DREG_BBLT_FGC0, 0x00 }, | ||
244 | { S1DREG_BBLT_FGC1, 0x00 }, | ||
245 | { S1DREG_LKUP_MODE, 0x00 }, | ||
246 | { S1DREG_LKUP_ADDR, 0x00 }, | ||
247 | { S1DREG_PS_CNF, 0x10 }, | ||
248 | { S1DREG_PS_STATUS, 0x00 }, | ||
249 | { S1DREG_CPU2MEM_WDOGT, 0x00 }, | ||
250 | { S1DREG_COM_DISP_MODE, 0x02 }, | ||
251 | }; | ||
252 | |||
253 | static struct s1d13xxxfb_pdata s1d13806_platform_data = { | ||
254 | .initregs = s1d13806_initregs, | ||
255 | .initregssize = ARRAY_SIZE(s1d13806_initregs), | ||
256 | }; | ||
257 | |||
258 | static struct resource s1d13806_resources[] = { | ||
259 | [0] = { | ||
260 | .start = 0x07200000, | ||
261 | .end = 0x07200000 + 0x00200000 - 1, | ||
262 | .flags = IORESOURCE_MEM, | ||
263 | }, | ||
264 | [1] = { | ||
265 | .start = 0x07000000, | ||
266 | .end = 0x07000000 + 0x00200000 - 1, | ||
267 | .flags = IORESOURCE_MEM, | ||
268 | }, | ||
269 | }; | ||
270 | |||
271 | static struct platform_device s1d13806_device = { | ||
272 | .name = "s1d13806fb", | ||
273 | .id = -1, | ||
274 | .num_resources = ARRAY_SIZE(s1d13806_resources), | ||
275 | .resource = s1d13806_resources, | ||
276 | |||
277 | .dev = { | ||
278 | .platform_data = &s1d13806_platform_data, | ||
279 | }, | ||
280 | }; | ||
281 | #endif | ||
282 | |||
283 | static struct platform_device *microdev_devices[] __initdata = { | ||
284 | &smc91x_device, | ||
285 | #ifdef CONFIG_FB_S1D13XXX | ||
286 | &s1d13806_device, | ||
287 | #endif | ||
288 | }; | ||
289 | |||
290 | static int __init microdev_devices_setup(void) | ||
146 | { | 291 | { |
147 | return platform_device_register(&smc91x_device); | 292 | return platform_add_devices(microdev_devices, ARRAY_SIZE(microdev_devices)); |
148 | } | 293 | } |
149 | 294 | ||
150 | __initcall(smc91x_setup); | 295 | __initcall(microdev_devices_setup); |
151 | 296 | ||
152 | /* | ||
153 | * Initialize the board | ||
154 | */ | ||
155 | void __init platform_setup(void) | 297 | void __init platform_setup(void) |
156 | { | 298 | { |
157 | int * const fpgaRevisionRegister = (int*)(MICRODEV_FPGA_GP_BASE + 0x8ul); | 299 | int * const fpgaRevisionRegister = (int*)(MICRODEV_FPGA_GP_BASE + 0x8ul); |
diff --git a/arch/sh/boards/unknown/Makefile b/arch/sh/boards/unknown/Makefile index cffc21031e71..7d18f408b0c5 100644 --- a/arch/sh/boards/unknown/Makefile +++ b/arch/sh/boards/unknown/Makefile | |||
@@ -2,5 +2,5 @@ | |||
2 | # Makefile for unknown SH boards | 2 | # Makefile for unknown SH boards |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := mach.o io.o setup.o | 5 | obj-y := setup.o |
6 | 6 | ||
diff --git a/arch/sh/boards/unknown/io.c b/arch/sh/boards/unknown/io.c deleted file mode 100644 index 8f3f17267bd9..000000000000 --- a/arch/sh/boards/unknown/io.c +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/kernel/io_unknown.c | ||
3 | * | ||
4 | * Copyright (C) 2000 Stuart Menefy (stuart.menefy@st.com) | ||
5 | * | ||
6 | * May be copied or modified under the terms of the GNU General Public | ||
7 | * License. See linux/COPYING for more information. | ||
8 | * | ||
9 | * I/O routine for unknown hardware. | ||
10 | */ | ||
11 | |||
12 | static unsigned int unknown_handler(void) | ||
13 | { | ||
14 | return 0; | ||
15 | } | ||
16 | |||
17 | #define UNKNOWN_ALIAS(fn) \ | ||
18 | void unknown_##fn(void) __attribute__ ((alias ("unknown_handler"))); | ||
19 | |||
20 | UNKNOWN_ALIAS(inb) | ||
21 | UNKNOWN_ALIAS(inw) | ||
22 | UNKNOWN_ALIAS(inl) | ||
23 | UNKNOWN_ALIAS(outb) | ||
24 | UNKNOWN_ALIAS(outw) | ||
25 | UNKNOWN_ALIAS(outl) | ||
26 | UNKNOWN_ALIAS(inb_p) | ||
27 | UNKNOWN_ALIAS(inw_p) | ||
28 | UNKNOWN_ALIAS(inl_p) | ||
29 | UNKNOWN_ALIAS(outb_p) | ||
30 | UNKNOWN_ALIAS(outw_p) | ||
31 | UNKNOWN_ALIAS(outl_p) | ||
32 | UNKNOWN_ALIAS(insb) | ||
33 | UNKNOWN_ALIAS(insw) | ||
34 | UNKNOWN_ALIAS(insl) | ||
35 | UNKNOWN_ALIAS(outsb) | ||
36 | UNKNOWN_ALIAS(outsw) | ||
37 | UNKNOWN_ALIAS(outsl) | ||
38 | UNKNOWN_ALIAS(readb) | ||
39 | UNKNOWN_ALIAS(readw) | ||
40 | UNKNOWN_ALIAS(readl) | ||
41 | UNKNOWN_ALIAS(writeb) | ||
42 | UNKNOWN_ALIAS(writew) | ||
43 | UNKNOWN_ALIAS(writel) | ||
44 | UNKNOWN_ALIAS(isa_port2addr) | ||
45 | UNKNOWN_ALIAS(ioremap) | ||
46 | UNKNOWN_ALIAS(iounmap) | ||
diff --git a/arch/sh/boards/unknown/mach.c b/arch/sh/boards/unknown/mach.c deleted file mode 100644 index ad0bcc60a640..000000000000 --- a/arch/sh/boards/unknown/mach.c +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/kernel/mach_unknown.c | ||
3 | * | ||
4 | * Copyright (C) 2000 Stuart Menefy (stuart.menefy@st.com) | ||
5 | * | ||
6 | * May be copied or modified under the terms of the GNU General Public | ||
7 | * License. See linux/COPYING for more information. | ||
8 | * | ||
9 | * Machine specific code for an unknown machine (internal peripherials only) | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/init.h> | ||
14 | |||
15 | #include <asm/machvec.h> | ||
16 | #include <asm/machvec_init.h> | ||
17 | |||
18 | #include <asm/io_unknown.h> | ||
19 | |||
20 | #include <asm/rtc.h> | ||
21 | /* | ||
22 | * The Machine Vector | ||
23 | */ | ||
24 | |||
25 | struct sh_machine_vector mv_unknown __initmv = { | ||
26 | #if defined(CONFIG_CPU_SH4) | ||
27 | .mv_nr_irqs = 48, | ||
28 | #elif defined(CONFIG_CPU_SUBTYPE_SH7708) | ||
29 | .mv_nr_irqs = 32, | ||
30 | #elif defined(CONFIG_CPU_SUBTYPE_SH7709) | ||
31 | .mv_nr_irqs = 61, | ||
32 | #endif | ||
33 | |||
34 | .mv_inb = unknown_inb, | ||
35 | .mv_inw = unknown_inw, | ||
36 | .mv_inl = unknown_inl, | ||
37 | .mv_outb = unknown_outb, | ||
38 | .mv_outw = unknown_outw, | ||
39 | .mv_outl = unknown_outl, | ||
40 | |||
41 | .mv_inb_p = unknown_inb_p, | ||
42 | .mv_inw_p = unknown_inw_p, | ||
43 | .mv_inl_p = unknown_inl_p, | ||
44 | .mv_outb_p = unknown_outb_p, | ||
45 | .mv_outw_p = unknown_outw_p, | ||
46 | .mv_outl_p = unknown_outl_p, | ||
47 | |||
48 | .mv_insb = unknown_insb, | ||
49 | .mv_insw = unknown_insw, | ||
50 | .mv_insl = unknown_insl, | ||
51 | .mv_outsb = unknown_outsb, | ||
52 | .mv_outsw = unknown_outsw, | ||
53 | .mv_outsl = unknown_outsl, | ||
54 | |||
55 | .mv_readb = unknown_readb, | ||
56 | .mv_readw = unknown_readw, | ||
57 | .mv_readl = unknown_readl, | ||
58 | .mv_writeb = unknown_writeb, | ||
59 | .mv_writew = unknown_writew, | ||
60 | .mv_writel = unknown_writel, | ||
61 | |||
62 | .mv_ioremap = unknown_ioremap, | ||
63 | .mv_iounmap = unknown_iounmap, | ||
64 | |||
65 | .mv_isa_port2addr = unknown_isa_port2addr, | ||
66 | }; | ||
67 | ALIAS_MV(unknown) | ||
diff --git a/arch/sh/boards/unknown/setup.c b/arch/sh/boards/unknown/setup.c index 7d772a6f8865..02e84f03f45c 100644 --- a/arch/sh/boards/unknown/setup.c +++ b/arch/sh/boards/unknown/setup.c | |||
@@ -7,10 +7,20 @@ | |||
7 | * License. See linux/COPYING for more information. | 7 | * License. See linux/COPYING for more information. |
8 | * | 8 | * |
9 | * Setup code for an unknown machine (internal peripherials only) | 9 | * Setup code for an unknown machine (internal peripherials only) |
10 | * | ||
11 | * This is the simplest of all boards, and serves only as a quick and dirty | ||
12 | * method to start debugging a new board during bring-up until proper board | ||
13 | * setup code is written. | ||
10 | */ | 14 | */ |
11 | |||
12 | #include <linux/config.h> | 15 | #include <linux/config.h> |
13 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <asm/machvec.h> | ||
18 | #include <asm/irq.h> | ||
19 | |||
20 | struct sh_machine_vector mv_unknown __initmv = { | ||
21 | .mv_nr_irqs = NR_IRQS, | ||
22 | }; | ||
23 | ALIAS_MV(unknown) | ||
14 | 24 | ||
15 | const char *get_system_type(void) | 25 | const char *get_system_type(void) |
16 | { | 26 | { |
diff --git a/arch/sh/cchips/voyagergx/consistent.c b/arch/sh/cchips/voyagergx/consistent.c index 3d9a02c093a3..07e8b9c5a531 100644 --- a/arch/sh/cchips/voyagergx/consistent.c +++ b/arch/sh/cchips/voyagergx/consistent.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/bus-sh.h> | 18 | |
19 | 19 | ||
20 | struct voya_alloc_entry { | 20 | struct voya_alloc_entry { |
21 | struct list_head list; | 21 | struct list_head list; |
@@ -30,12 +30,13 @@ static LIST_HEAD(voya_alloc_list); | |||
30 | #define OHCI_HCCA_SIZE 0x100 | 30 | #define OHCI_HCCA_SIZE 0x100 |
31 | #define OHCI_SRAM_SIZE 0x10000 | 31 | #define OHCI_SRAM_SIZE 0x10000 |
32 | 32 | ||
33 | #define VOYAGER_OHCI_NAME "voyager-ohci" | ||
34 | |||
33 | void *voyagergx_consistent_alloc(struct device *dev, size_t size, | 35 | void *voyagergx_consistent_alloc(struct device *dev, size_t size, |
34 | dma_addr_t *handle, gfp_t flag) | 36 | dma_addr_t *handle, gfp_t flag) |
35 | { | 37 | { |
36 | struct list_head *list = &voya_alloc_list; | 38 | struct list_head *list = &voya_alloc_list; |
37 | struct voya_alloc_entry *entry; | 39 | struct voya_alloc_entry *entry; |
38 | struct sh_dev *shdev = to_sh_dev(dev); | ||
39 | unsigned long start, end; | 40 | unsigned long start, end; |
40 | unsigned long flags; | 41 | unsigned long flags; |
41 | 42 | ||
@@ -46,9 +47,7 @@ void *voyagergx_consistent_alloc(struct device *dev, size_t size, | |||
46 | * | 47 | * |
47 | * Everything else goes through consistent_alloc(). | 48 | * Everything else goes through consistent_alloc(). |
48 | */ | 49 | */ |
49 | if (!dev || dev->bus != &sh_bus_types[SH_BUS_VIRT] || | 50 | if (!dev || strcmp(dev->driver->name, VOYAGER_OHCI_NAME)) |
50 | (dev->bus == &sh_bus_types[SH_BUS_VIRT] && | ||
51 | shdev->dev_id != SH_DEV_ID_USB_OHCI)) | ||
52 | return NULL; | 51 | return NULL; |
53 | 52 | ||
54 | start = OHCI_SRAM_START + OHCI_HCCA_SIZE; | 53 | start = OHCI_SRAM_START + OHCI_HCCA_SIZE; |
@@ -98,12 +97,9 @@ int voyagergx_consistent_free(struct device *dev, size_t size, | |||
98 | void *vaddr, dma_addr_t handle) | 97 | void *vaddr, dma_addr_t handle) |
99 | { | 98 | { |
100 | struct voya_alloc_entry *entry; | 99 | struct voya_alloc_entry *entry; |
101 | struct sh_dev *shdev = to_sh_dev(dev); | ||
102 | unsigned long flags; | 100 | unsigned long flags; |
103 | 101 | ||
104 | if (!dev || dev->bus != &sh_bus_types[SH_BUS_VIRT] || | 102 | if (!dev || strcmp(dev->driver->name, VOYAGER_OHCI_NAME)) |
105 | (dev->bus == &sh_bus_types[SH_BUS_VIRT] && | ||
106 | shdev->dev_id != SH_DEV_ID_USB_OHCI)) | ||
107 | return -EINVAL; | 103 | return -EINVAL; |
108 | 104 | ||
109 | spin_lock_irqsave(&voya_list_lock, flags); | 105 | spin_lock_irqsave(&voya_list_lock, flags); |
@@ -123,4 +119,3 @@ int voyagergx_consistent_free(struct device *dev, size_t size, | |||
123 | 119 | ||
124 | EXPORT_SYMBOL(voyagergx_consistent_alloc); | 120 | EXPORT_SYMBOL(voyagergx_consistent_alloc); |
125 | EXPORT_SYMBOL(voyagergx_consistent_free); | 121 | EXPORT_SYMBOL(voyagergx_consistent_free); |
126 | |||
diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c index 1b6ac523b458..2ee330b3c38f 100644 --- a/arch/sh/cchips/voyagergx/irq.c +++ b/arch/sh/cchips/voyagergx/irq.c | |||
@@ -163,7 +163,12 @@ int voyagergx_irq_demux(int irq) | |||
163 | return irq; | 163 | return irq; |
164 | } | 164 | } |
165 | 165 | ||
166 | static struct irqaction irq0 = { voyagergx_interrupt, SA_INTERRUPT, 0, "VOYAGERGX", NULL, NULL}; | 166 | static struct irqaction irq0 = { |
167 | .name = "voyagergx", | ||
168 | .handler = voyagergx_interrupt, | ||
169 | .flags = SA_INTERRUPT, | ||
170 | .mask = CPU_MASK_NONE, | ||
171 | }; | ||
167 | 172 | ||
168 | void __init setup_voyagergx_irq(void) | 173 | void __init setup_voyagergx_irq(void) |
169 | { | 174 | { |
diff --git a/arch/sh/configs/microdev_defconfig b/arch/sh/configs/microdev_defconfig index a3bd280b53d6..ab3db76d1e51 100644 --- a/arch/sh/configs/microdev_defconfig +++ b/arch/sh/configs/microdev_defconfig | |||
@@ -1,10 +1,9 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.11-sh | 3 | # Linux kernel version: 2.6.16-rc1 |
4 | # Wed Mar 2 15:09:41 2005 | 4 | # Fri Jan 27 19:43:20 2006 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_UID16=y | ||
8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
9 | CONFIG_GENERIC_HARDIRQS=y | 8 | CONFIG_GENERIC_HARDIRQS=y |
10 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
@@ -17,11 +16,13 @@ CONFIG_EXPERIMENTAL=y | |||
17 | CONFIG_CLEAN_COMPILE=y | 16 | CONFIG_CLEAN_COMPILE=y |
18 | CONFIG_BROKEN_ON_SMP=y | 17 | CONFIG_BROKEN_ON_SMP=y |
19 | CONFIG_LOCK_KERNEL=y | 18 | CONFIG_LOCK_KERNEL=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
20 | 20 | ||
21 | # | 21 | # |
22 | # General setup | 22 | # General setup |
23 | # | 23 | # |
24 | CONFIG_LOCALVERSION="" | 24 | CONFIG_LOCALVERSION="" |
25 | CONFIG_LOCALVERSION_AUTO=y | ||
25 | CONFIG_SWAP=y | 26 | CONFIG_SWAP=y |
26 | # CONFIG_SYSVIPC is not set | 27 | # CONFIG_SYSVIPC is not set |
27 | # CONFIG_POSIX_MQUEUE is not set | 28 | # CONFIG_POSIX_MQUEUE is not set |
@@ -29,22 +30,29 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 30 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
30 | CONFIG_SYSCTL=y | 31 | CONFIG_SYSCTL=y |
31 | # CONFIG_AUDIT is not set | 32 | # CONFIG_AUDIT is not set |
32 | CONFIG_LOG_BUF_SHIFT=14 | ||
33 | CONFIG_HOTPLUG=y | ||
34 | CONFIG_KOBJECT_UEVENT=y | ||
35 | # CONFIG_IKCONFIG is not set | 33 | # CONFIG_IKCONFIG is not set |
34 | CONFIG_INITRAMFS_SOURCE="" | ||
35 | CONFIG_UID16=y | ||
36 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
36 | CONFIG_EMBEDDED=y | 37 | CONFIG_EMBEDDED=y |
37 | CONFIG_KALLSYMS=y | 38 | CONFIG_KALLSYMS=y |
38 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 39 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
40 | CONFIG_HOTPLUG=y | ||
41 | CONFIG_PRINTK=y | ||
42 | CONFIG_BUG=y | ||
43 | CONFIG_ELF_CORE=y | ||
44 | CONFIG_BASE_FULL=y | ||
39 | CONFIG_FUTEX=y | 45 | CONFIG_FUTEX=y |
40 | CONFIG_EPOLL=y | 46 | CONFIG_EPOLL=y |
41 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
42 | CONFIG_SHMEM=y | 47 | CONFIG_SHMEM=y |
43 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 48 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
44 | CONFIG_CC_ALIGN_LABELS=0 | 49 | CONFIG_CC_ALIGN_LABELS=0 |
45 | CONFIG_CC_ALIGN_LOOPS=0 | 50 | CONFIG_CC_ALIGN_LOOPS=0 |
46 | CONFIG_CC_ALIGN_JUMPS=0 | 51 | CONFIG_CC_ALIGN_JUMPS=0 |
52 | CONFIG_SLAB=y | ||
47 | # CONFIG_TINY_SHMEM is not set | 53 | # CONFIG_TINY_SHMEM is not set |
54 | CONFIG_BASE_SMALL=0 | ||
55 | # CONFIG_SLOB is not set | ||
48 | 56 | ||
49 | # | 57 | # |
50 | # Loadable module support | 58 | # Loadable module support |
@@ -52,6 +60,24 @@ CONFIG_CC_ALIGN_JUMPS=0 | |||
52 | # CONFIG_MODULES is not set | 60 | # CONFIG_MODULES is not set |
53 | 61 | ||
54 | # | 62 | # |
63 | # Block layer | ||
64 | # | ||
65 | # CONFIG_LBD is not set | ||
66 | |||
67 | # | ||
68 | # IO Schedulers | ||
69 | # | ||
70 | CONFIG_IOSCHED_NOOP=y | ||
71 | CONFIG_IOSCHED_AS=y | ||
72 | CONFIG_IOSCHED_DEADLINE=y | ||
73 | CONFIG_IOSCHED_CFQ=y | ||
74 | CONFIG_DEFAULT_AS=y | ||
75 | # CONFIG_DEFAULT_DEADLINE is not set | ||
76 | # CONFIG_DEFAULT_CFQ is not set | ||
77 | # CONFIG_DEFAULT_NOOP is not set | ||
78 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
79 | |||
80 | # | ||
55 | # System type | 81 | # System type |
56 | # | 82 | # |
57 | # CONFIG_SH_SOLUTION_ENGINE is not set | 83 | # CONFIG_SH_SOLUTION_ENGINE is not set |
@@ -61,9 +87,7 @@ CONFIG_CC_ALIGN_JUMPS=0 | |||
61 | # CONFIG_SH_7751_SYSTEMH is not set | 87 | # CONFIG_SH_7751_SYSTEMH is not set |
62 | # CONFIG_SH_STB1_HARP is not set | 88 | # CONFIG_SH_STB1_HARP is not set |
63 | # CONFIG_SH_STB1_OVERDRIVE is not set | 89 | # CONFIG_SH_STB1_OVERDRIVE is not set |
64 | # CONFIG_SH_HP620 is not set | 90 | # CONFIG_SH_HP6XX is not set |
65 | # CONFIG_SH_HP680 is not set | ||
66 | # CONFIG_SH_HP690 is not set | ||
67 | # CONFIG_SH_CQREEK is not set | 91 | # CONFIG_SH_CQREEK is not set |
68 | # CONFIG_SH_DMIDA is not set | 92 | # CONFIG_SH_DMIDA is not set |
69 | # CONFIG_SH_EC3104 is not set | 93 | # CONFIG_SH_EC3104 is not set |
@@ -78,45 +102,94 @@ CONFIG_CC_ALIGN_JUMPS=0 | |||
78 | # CONFIG_SH_SECUREEDGE5410 is not set | 102 | # CONFIG_SH_SECUREEDGE5410 is not set |
79 | # CONFIG_SH_HS7751RVOIP is not set | 103 | # CONFIG_SH_HS7751RVOIP is not set |
80 | # CONFIG_SH_RTS7751R2D is not set | 104 | # CONFIG_SH_RTS7751R2D is not set |
105 | # CONFIG_SH_R7780RP is not set | ||
81 | # CONFIG_SH_EDOSK7705 is not set | 106 | # CONFIG_SH_EDOSK7705 is not set |
82 | CONFIG_SH_SH4202_MICRODEV=y | 107 | CONFIG_SH_SH4202_MICRODEV=y |
108 | # CONFIG_SH_LANDISK is not set | ||
109 | # CONFIG_SH_TITAN is not set | ||
83 | # CONFIG_SH_UNKNOWN is not set | 110 | # CONFIG_SH_UNKNOWN is not set |
84 | # CONFIG_CPU_SH2 is not set | 111 | |
85 | # CONFIG_CPU_SH3 is not set | 112 | # |
113 | # Processor selection | ||
114 | # | ||
86 | CONFIG_CPU_SH4=y | 115 | CONFIG_CPU_SH4=y |
116 | |||
117 | # | ||
118 | # SH-2 Processor Support | ||
119 | # | ||
87 | # CONFIG_CPU_SUBTYPE_SH7604 is not set | 120 | # CONFIG_CPU_SUBTYPE_SH7604 is not set |
121 | |||
122 | # | ||
123 | # SH-3 Processor Support | ||
124 | # | ||
88 | # CONFIG_CPU_SUBTYPE_SH7300 is not set | 125 | # CONFIG_CPU_SUBTYPE_SH7300 is not set |
89 | # CONFIG_CPU_SUBTYPE_SH7705 is not set | 126 | # CONFIG_CPU_SUBTYPE_SH7705 is not set |
90 | # CONFIG_CPU_SUBTYPE_SH7707 is not set | 127 | # CONFIG_CPU_SUBTYPE_SH7707 is not set |
91 | # CONFIG_CPU_SUBTYPE_SH7708 is not set | 128 | # CONFIG_CPU_SUBTYPE_SH7708 is not set |
92 | # CONFIG_CPU_SUBTYPE_SH7709 is not set | 129 | # CONFIG_CPU_SUBTYPE_SH7709 is not set |
130 | |||
131 | # | ||
132 | # SH-4 Processor Support | ||
133 | # | ||
93 | # CONFIG_CPU_SUBTYPE_SH7750 is not set | 134 | # CONFIG_CPU_SUBTYPE_SH7750 is not set |
135 | # CONFIG_CPU_SUBTYPE_SH7091 is not set | ||
136 | # CONFIG_CPU_SUBTYPE_SH7750R is not set | ||
137 | # CONFIG_CPU_SUBTYPE_SH7750S is not set | ||
94 | # CONFIG_CPU_SUBTYPE_SH7751 is not set | 138 | # CONFIG_CPU_SUBTYPE_SH7751 is not set |
139 | # CONFIG_CPU_SUBTYPE_SH7751R is not set | ||
95 | # CONFIG_CPU_SUBTYPE_SH7760 is not set | 140 | # CONFIG_CPU_SUBTYPE_SH7760 is not set |
96 | # CONFIG_CPU_SUBTYPE_SH73180 is not set | 141 | CONFIG_CPU_SUBTYPE_SH4_202=y |
142 | |||
143 | # | ||
144 | # ST40 Processor Support | ||
145 | # | ||
97 | # CONFIG_CPU_SUBTYPE_ST40STB1 is not set | 146 | # CONFIG_CPU_SUBTYPE_ST40STB1 is not set |
98 | # CONFIG_CPU_SUBTYPE_ST40GX1 is not set | 147 | # CONFIG_CPU_SUBTYPE_ST40GX1 is not set |
99 | CONFIG_CPU_SUBTYPE_SH4_202=y | 148 | |
149 | # | ||
150 | # SH-4A Processor Support | ||
151 | # | ||
152 | # CONFIG_CPU_SUBTYPE_SH73180 is not set | ||
153 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | ||
154 | # CONFIG_CPU_SUBTYPE_SH7780 is not set | ||
155 | |||
156 | # | ||
157 | # Memory management options | ||
158 | # | ||
100 | CONFIG_MMU=y | 159 | CONFIG_MMU=y |
101 | CONFIG_CMDLINE_BOOL=y | 160 | CONFIG_SELECT_MEMORY_MODEL=y |
102 | CONFIG_CMDLINE="console=ttySC0,115200" | 161 | CONFIG_FLATMEM_MANUAL=y |
162 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
163 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
164 | CONFIG_FLATMEM=y | ||
165 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
166 | # CONFIG_SPARSEMEM_STATIC is not set | ||
167 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
168 | |||
169 | # | ||
170 | # Cache configuration | ||
171 | # | ||
172 | # CONFIG_SH_DIRECT_MAPPED is not set | ||
173 | # CONFIG_SH_WRITETHROUGH is not set | ||
174 | # CONFIG_SH_OCRAM is not set | ||
103 | CONFIG_MEMORY_START=0x08000000 | 175 | CONFIG_MEMORY_START=0x08000000 |
104 | CONFIG_MEMORY_SIZE=0x04000000 | 176 | CONFIG_MEMORY_SIZE=0x04000000 |
105 | CONFIG_MEMORY_SET=y | 177 | |
106 | # CONFIG_MEMORY_OVERRIDE is not set | 178 | # |
179 | # Processor features | ||
180 | # | ||
181 | CONFIG_CPU_LITTLE_ENDIAN=y | ||
107 | CONFIG_SH_RTC=y | 182 | CONFIG_SH_RTC=y |
108 | CONFIG_SH_FPU=y | 183 | CONFIG_SH_FPU=y |
109 | CONFIG_ZERO_PAGE_OFFSET=0x00001000 | ||
110 | CONFIG_BOOT_LINK_OFFSET=0x00800000 | ||
111 | CONFIG_CPU_LITTLE_ENDIAN=y | ||
112 | CONFIG_PREEMPT=y | ||
113 | # CONFIG_UBC_WAKEUP is not set | ||
114 | # CONFIG_SH_WRITETHROUGH is not set | ||
115 | # CONFIG_SH_OCRAM is not set | ||
116 | # CONFIG_SH_STORE_QUEUES is not set | 184 | # CONFIG_SH_STORE_QUEUES is not set |
117 | # CONFIG_SMP is not set | 185 | CONFIG_CPU_HAS_INTEVT=y |
118 | CONFIG_SH_PCLK_CALC=y | 186 | CONFIG_CPU_HAS_SR_RB=y |
119 | CONFIG_SH_PCLK_FREQ=65986048 | 187 | |
188 | # | ||
189 | # Timer support | ||
190 | # | ||
191 | CONFIG_SH_TMU=y | ||
192 | CONFIG_SH_PCLK_FREQ=66000000 | ||
120 | 193 | ||
121 | # | 194 | # |
122 | # CPU Frequency scaling | 195 | # CPU Frequency scaling |
@@ -137,20 +210,31 @@ CONFIG_NR_ONCHIP_DMA_CHANNELS=4 | |||
137 | CONFIG_HEARTBEAT=y | 210 | CONFIG_HEARTBEAT=y |
138 | 211 | ||
139 | # | 212 | # |
140 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 213 | # Kernel features |
141 | # | 214 | # |
142 | CONFIG_ISA=y | 215 | # CONFIG_KEXEC is not set |
143 | # CONFIG_PCI is not set | 216 | CONFIG_PREEMPT=y |
217 | # CONFIG_SMP is not set | ||
144 | 218 | ||
145 | # | 219 | # |
146 | # PCCARD (PCMCIA/CardBus) support | 220 | # Boot options |
147 | # | 221 | # |
148 | # CONFIG_PCCARD is not set | 222 | CONFIG_ZERO_PAGE_OFFSET=0x00001000 |
223 | CONFIG_BOOT_LINK_OFFSET=0x00800000 | ||
224 | # CONFIG_UBC_WAKEUP is not set | ||
225 | CONFIG_CMDLINE_BOOL=y | ||
226 | CONFIG_CMDLINE="console=ttySC0,115200" | ||
149 | 227 | ||
150 | # | 228 | # |
151 | # PC-card bridges | 229 | # Bus options |
152 | # | 230 | # |
153 | CONFIG_PCMCIA_PROBE=y | 231 | # CONFIG_SUPERHYWAY is not set |
232 | # CONFIG_PCI is not set | ||
233 | |||
234 | # | ||
235 | # PCCARD (PCMCIA/CardBus) support | ||
236 | # | ||
237 | # CONFIG_PCCARD is not set | ||
154 | 238 | ||
155 | # | 239 | # |
156 | # PCI Hotplug Support | 240 | # PCI Hotplug Support |
@@ -164,9 +248,79 @@ CONFIG_BINFMT_ELF=y | |||
164 | # CONFIG_BINFMT_MISC is not set | 248 | # CONFIG_BINFMT_MISC is not set |
165 | 249 | ||
166 | # | 250 | # |
167 | # SH initrd options | 251 | # Networking |
252 | # | ||
253 | CONFIG_NET=y | ||
254 | |||
255 | # | ||
256 | # Networking options | ||
257 | # | ||
258 | # CONFIG_PACKET is not set | ||
259 | # CONFIG_UNIX is not set | ||
260 | # CONFIG_NET_KEY is not set | ||
261 | CONFIG_INET=y | ||
262 | # CONFIG_IP_MULTICAST is not set | ||
263 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
264 | CONFIG_IP_FIB_HASH=y | ||
265 | CONFIG_IP_PNP=y | ||
266 | CONFIG_IP_PNP_DHCP=y | ||
267 | # CONFIG_IP_PNP_BOOTP is not set | ||
268 | # CONFIG_IP_PNP_RARP is not set | ||
269 | # CONFIG_NET_IPIP is not set | ||
270 | # CONFIG_NET_IPGRE is not set | ||
271 | # CONFIG_ARPD is not set | ||
272 | # CONFIG_SYN_COOKIES is not set | ||
273 | # CONFIG_INET_AH is not set | ||
274 | # CONFIG_INET_ESP is not set | ||
275 | # CONFIG_INET_IPCOMP is not set | ||
276 | # CONFIG_INET_TUNNEL is not set | ||
277 | CONFIG_INET_DIAG=y | ||
278 | CONFIG_INET_TCP_DIAG=y | ||
279 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
280 | CONFIG_TCP_CONG_BIC=y | ||
281 | # CONFIG_IPV6 is not set | ||
282 | # CONFIG_NETFILTER is not set | ||
283 | |||
284 | # | ||
285 | # DCCP Configuration (EXPERIMENTAL) | ||
286 | # | ||
287 | # CONFIG_IP_DCCP is not set | ||
288 | |||
289 | # | ||
290 | # SCTP Configuration (EXPERIMENTAL) | ||
168 | # | 291 | # |
169 | # CONFIG_EMBEDDED_RAMDISK is not set | 292 | # CONFIG_IP_SCTP is not set |
293 | |||
294 | # | ||
295 | # TIPC Configuration (EXPERIMENTAL) | ||
296 | # | ||
297 | # CONFIG_TIPC is not set | ||
298 | # CONFIG_ATM is not set | ||
299 | # CONFIG_BRIDGE is not set | ||
300 | # CONFIG_VLAN_8021Q is not set | ||
301 | # CONFIG_DECNET is not set | ||
302 | # CONFIG_LLC2 is not set | ||
303 | # CONFIG_IPX is not set | ||
304 | # CONFIG_ATALK is not set | ||
305 | # CONFIG_X25 is not set | ||
306 | # CONFIG_LAPB is not set | ||
307 | # CONFIG_NET_DIVERT is not set | ||
308 | # CONFIG_ECONET is not set | ||
309 | # CONFIG_WAN_ROUTER is not set | ||
310 | |||
311 | # | ||
312 | # QoS and/or fair queueing | ||
313 | # | ||
314 | # CONFIG_NET_SCHED is not set | ||
315 | |||
316 | # | ||
317 | # Network testing | ||
318 | # | ||
319 | # CONFIG_NET_PKTGEN is not set | ||
320 | # CONFIG_HAMRADIO is not set | ||
321 | # CONFIG_IRDA is not set | ||
322 | # CONFIG_BT is not set | ||
323 | # CONFIG_IEEE80211 is not set | ||
170 | 324 | ||
171 | # | 325 | # |
172 | # Device Drivers | 326 | # Device Drivers |
@@ -180,6 +334,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
180 | # CONFIG_FW_LOADER is not set | 334 | # CONFIG_FW_LOADER is not set |
181 | 335 | ||
182 | # | 336 | # |
337 | # Connector - unified userspace <-> kernelspace linker | ||
338 | # | ||
339 | # CONFIG_CONNECTOR is not set | ||
340 | |||
341 | # | ||
183 | # Memory Technology Devices (MTD) | 342 | # Memory Technology Devices (MTD) |
184 | # | 343 | # |
185 | # CONFIG_MTD is not set | 344 | # CONFIG_MTD is not set |
@@ -192,13 +351,10 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
192 | # | 351 | # |
193 | # Plug and Play support | 352 | # Plug and Play support |
194 | # | 353 | # |
195 | # CONFIG_PNP is not set | ||
196 | 354 | ||
197 | # | 355 | # |
198 | # Block devices | 356 | # Block devices |
199 | # | 357 | # |
200 | # CONFIG_BLK_DEV_FD is not set | ||
201 | # CONFIG_BLK_DEV_XD is not set | ||
202 | # CONFIG_BLK_DEV_COW_COMMON is not set | 358 | # CONFIG_BLK_DEV_COW_COMMON is not set |
203 | # CONFIG_BLK_DEV_LOOP is not set | 359 | # CONFIG_BLK_DEV_LOOP is not set |
204 | # CONFIG_BLK_DEV_NBD is not set | 360 | # CONFIG_BLK_DEV_NBD is not set |
@@ -206,17 +362,7 @@ CONFIG_BLK_DEV_RAM=y | |||
206 | CONFIG_BLK_DEV_RAM_COUNT=16 | 362 | CONFIG_BLK_DEV_RAM_COUNT=16 |
207 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 363 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
208 | CONFIG_BLK_DEV_INITRD=y | 364 | CONFIG_BLK_DEV_INITRD=y |
209 | CONFIG_INITRAMFS_SOURCE="" | ||
210 | # CONFIG_LBD is not set | ||
211 | # CONFIG_CDROM_PKTCDVD is not set | 365 | # CONFIG_CDROM_PKTCDVD is not set |
212 | |||
213 | # | ||
214 | # IO Schedulers | ||
215 | # | ||
216 | CONFIG_IOSCHED_NOOP=y | ||
217 | CONFIG_IOSCHED_AS=y | ||
218 | CONFIG_IOSCHED_DEADLINE=y | ||
219 | CONFIG_IOSCHED_CFQ=y | ||
220 | # CONFIG_ATA_OVER_ETH is not set | 366 | # CONFIG_ATA_OVER_ETH is not set |
221 | 367 | ||
222 | # | 368 | # |
@@ -241,9 +387,7 @@ CONFIG_BLK_DEV_IDECD=y | |||
241 | # IDE chipset support/bugfixes | 387 | # IDE chipset support/bugfixes |
242 | # | 388 | # |
243 | CONFIG_IDE_GENERIC=y | 389 | CONFIG_IDE_GENERIC=y |
244 | CONFIG_IDE_SH=y | ||
245 | # CONFIG_IDE_ARM is not set | 390 | # CONFIG_IDE_ARM is not set |
246 | # CONFIG_IDE_CHIPSETS is not set | ||
247 | # CONFIG_BLK_DEV_IDEDMA is not set | 391 | # CONFIG_BLK_DEV_IDEDMA is not set |
248 | # CONFIG_IDEDMA_AUTO is not set | 392 | # CONFIG_IDEDMA_AUTO is not set |
249 | # CONFIG_BLK_DEV_HD is not set | 393 | # CONFIG_BLK_DEV_HD is not set |
@@ -251,14 +395,10 @@ CONFIG_IDE_SH=y | |||
251 | # | 395 | # |
252 | # SCSI device support | 396 | # SCSI device support |
253 | # | 397 | # |
398 | # CONFIG_RAID_ATTRS is not set | ||
254 | # CONFIG_SCSI is not set | 399 | # CONFIG_SCSI is not set |
255 | 400 | ||
256 | # | 401 | # |
257 | # Old CD-ROM drivers (not SCSI, not IDE) | ||
258 | # | ||
259 | # CONFIG_CD_NO_IDESCSI is not set | ||
260 | |||
261 | # | ||
262 | # Multi-device support (RAID and LVM) | 402 | # Multi-device support (RAID and LVM) |
263 | # | 403 | # |
264 | # CONFIG_MD is not set | 404 | # CONFIG_MD is not set |
@@ -266,6 +406,7 @@ CONFIG_IDE_SH=y | |||
266 | # | 406 | # |
267 | # Fusion MPT device support | 407 | # Fusion MPT device support |
268 | # | 408 | # |
409 | # CONFIG_FUSION is not set | ||
269 | 410 | ||
270 | # | 411 | # |
271 | # IEEE 1394 (FireWire) support | 412 | # IEEE 1394 (FireWire) support |
@@ -276,69 +417,8 @@ CONFIG_IDE_SH=y | |||
276 | # | 417 | # |
277 | 418 | ||
278 | # | 419 | # |
279 | # Networking support | 420 | # Network device support |
280 | # | ||
281 | CONFIG_NET=y | ||
282 | |||
283 | # | ||
284 | # Networking options | ||
285 | # | ||
286 | # CONFIG_PACKET is not set | ||
287 | # CONFIG_NETLINK_DEV is not set | ||
288 | # CONFIG_UNIX is not set | ||
289 | # CONFIG_NET_KEY is not set | ||
290 | CONFIG_INET=y | ||
291 | # CONFIG_IP_MULTICAST is not set | ||
292 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
293 | CONFIG_IP_PNP=y | ||
294 | CONFIG_IP_PNP_DHCP=y | ||
295 | # CONFIG_IP_PNP_BOOTP is not set | ||
296 | # CONFIG_IP_PNP_RARP is not set | ||
297 | # CONFIG_NET_IPIP is not set | ||
298 | # CONFIG_NET_IPGRE is not set | ||
299 | # CONFIG_ARPD is not set | ||
300 | # CONFIG_SYN_COOKIES is not set | ||
301 | # CONFIG_INET_AH is not set | ||
302 | # CONFIG_INET_ESP is not set | ||
303 | # CONFIG_INET_IPCOMP is not set | ||
304 | # CONFIG_INET_TUNNEL is not set | ||
305 | CONFIG_IP_TCPDIAG=y | ||
306 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
307 | # CONFIG_IPV6 is not set | ||
308 | # CONFIG_NETFILTER is not set | ||
309 | |||
310 | # | ||
311 | # SCTP Configuration (EXPERIMENTAL) | ||
312 | # | ||
313 | # CONFIG_IP_SCTP is not set | ||
314 | # CONFIG_ATM is not set | ||
315 | # CONFIG_BRIDGE is not set | ||
316 | # CONFIG_VLAN_8021Q is not set | ||
317 | # CONFIG_DECNET is not set | ||
318 | # CONFIG_LLC2 is not set | ||
319 | # CONFIG_IPX is not set | ||
320 | # CONFIG_ATALK is not set | ||
321 | # CONFIG_X25 is not set | ||
322 | # CONFIG_LAPB is not set | ||
323 | # CONFIG_NET_DIVERT is not set | ||
324 | # CONFIG_ECONET is not set | ||
325 | # CONFIG_WAN_ROUTER is not set | ||
326 | |||
327 | # | ||
328 | # QoS and/or fair queueing | ||
329 | # | ||
330 | # CONFIG_NET_SCHED is not set | ||
331 | # CONFIG_NET_CLS_ROUTE is not set | ||
332 | |||
333 | # | ||
334 | # Network testing | ||
335 | # | 421 | # |
336 | # CONFIG_NET_PKTGEN is not set | ||
337 | # CONFIG_NETPOLL is not set | ||
338 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
339 | # CONFIG_HAMRADIO is not set | ||
340 | # CONFIG_IRDA is not set | ||
341 | # CONFIG_BT is not set | ||
342 | CONFIG_NETDEVICES=y | 422 | CONFIG_NETDEVICES=y |
343 | # CONFIG_DUMMY is not set | 423 | # CONFIG_DUMMY is not set |
344 | # CONFIG_BONDING is not set | 424 | # CONFIG_BONDING is not set |
@@ -346,9 +426,9 @@ CONFIG_NETDEVICES=y | |||
346 | # CONFIG_TUN is not set | 426 | # CONFIG_TUN is not set |
347 | 427 | ||
348 | # | 428 | # |
349 | # ARCnet devices | 429 | # PHY device support |
350 | # | 430 | # |
351 | # CONFIG_ARCNET is not set | 431 | # CONFIG_PHYLIB is not set |
352 | 432 | ||
353 | # | 433 | # |
354 | # Ethernet (10 or 100Mbit) | 434 | # Ethernet (10 or 100Mbit) |
@@ -356,17 +436,7 @@ CONFIG_NETDEVICES=y | |||
356 | CONFIG_NET_ETHERNET=y | 436 | CONFIG_NET_ETHERNET=y |
357 | CONFIG_MII=y | 437 | CONFIG_MII=y |
358 | # CONFIG_STNIC is not set | 438 | # CONFIG_STNIC is not set |
359 | # CONFIG_NET_VENDOR_3COM is not set | ||
360 | # CONFIG_LANCE is not set | ||
361 | # CONFIG_NET_VENDOR_SMC is not set | ||
362 | CONFIG_SMC91X=y | 439 | CONFIG_SMC91X=y |
363 | # CONFIG_NET_VENDOR_RACAL is not set | ||
364 | # CONFIG_AT1700 is not set | ||
365 | # CONFIG_DEPCA is not set | ||
366 | # CONFIG_HP100 is not set | ||
367 | # CONFIG_NET_ISA is not set | ||
368 | # CONFIG_NET_PCI is not set | ||
369 | # CONFIG_NET_POCKET is not set | ||
370 | 440 | ||
371 | # | 441 | # |
372 | # Ethernet (1000 Mbit) | 442 | # Ethernet (1000 Mbit) |
@@ -379,7 +449,6 @@ CONFIG_SMC91X=y | |||
379 | # | 449 | # |
380 | # Token Ring devices | 450 | # Token Ring devices |
381 | # | 451 | # |
382 | # CONFIG_TR is not set | ||
383 | 452 | ||
384 | # | 453 | # |
385 | # Wireless LAN (non-hamradio) | 454 | # Wireless LAN (non-hamradio) |
@@ -394,6 +463,8 @@ CONFIG_SMC91X=y | |||
394 | # CONFIG_SLIP is not set | 463 | # CONFIG_SLIP is not set |
395 | # CONFIG_SHAPER is not set | 464 | # CONFIG_SHAPER is not set |
396 | # CONFIG_NETCONSOLE is not set | 465 | # CONFIG_NETCONSOLE is not set |
466 | # CONFIG_NETPOLL is not set | ||
467 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
397 | 468 | ||
398 | # | 469 | # |
399 | # ISDN subsystem | 470 | # ISDN subsystem |
@@ -411,20 +482,10 @@ CONFIG_SMC91X=y | |||
411 | # CONFIG_INPUT is not set | 482 | # CONFIG_INPUT is not set |
412 | 483 | ||
413 | # | 484 | # |
414 | # Userland interfaces | 485 | # Hardware I/O ports |
415 | # | ||
416 | |||
417 | # | ||
418 | # Input I/O drivers | ||
419 | # | 486 | # |
420 | # CONFIG_GAMEPORT is not set | ||
421 | CONFIG_SOUND_GAMEPORT=y | ||
422 | # CONFIG_SERIO is not set | 487 | # CONFIG_SERIO is not set |
423 | # CONFIG_SERIO_I8042 is not set | 488 | # CONFIG_GAMEPORT is not set |
424 | |||
425 | # | ||
426 | # Input Device Drivers | ||
427 | # | ||
428 | 489 | ||
429 | # | 490 | # |
430 | # Character devices | 491 | # Character devices |
@@ -464,24 +525,46 @@ CONFIG_RTC=y | |||
464 | # | 525 | # |
465 | # Ftape, the floppy tape device driver | 526 | # Ftape, the floppy tape device driver |
466 | # | 527 | # |
467 | # CONFIG_DRM is not set | ||
468 | # CONFIG_RAW_DRIVER is not set | 528 | # CONFIG_RAW_DRIVER is not set |
469 | 529 | ||
470 | # | 530 | # |
531 | # TPM devices | ||
532 | # | ||
533 | # CONFIG_TCG_TPM is not set | ||
534 | # CONFIG_TELCLOCK is not set | ||
535 | |||
536 | # | ||
471 | # I2C support | 537 | # I2C support |
472 | # | 538 | # |
473 | # CONFIG_I2C is not set | 539 | # CONFIG_I2C is not set |
474 | 540 | ||
475 | # | 541 | # |
542 | # SPI support | ||
543 | # | ||
544 | # CONFIG_SPI is not set | ||
545 | # CONFIG_SPI_MASTER is not set | ||
546 | |||
547 | # | ||
476 | # Dallas's 1-wire bus | 548 | # Dallas's 1-wire bus |
477 | # | 549 | # |
478 | # CONFIG_W1 is not set | 550 | # CONFIG_W1 is not set |
479 | 551 | ||
480 | # | 552 | # |
553 | # Hardware Monitoring support | ||
554 | # | ||
555 | CONFIG_HWMON=y | ||
556 | # CONFIG_HWMON_VID is not set | ||
557 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
558 | |||
559 | # | ||
481 | # Misc devices | 560 | # Misc devices |
482 | # | 561 | # |
483 | 562 | ||
484 | # | 563 | # |
564 | # Multimedia Capabilities Port drivers | ||
565 | # | ||
566 | |||
567 | # | ||
485 | # Multimedia devices | 568 | # Multimedia devices |
486 | # | 569 | # |
487 | # CONFIG_VIDEO_DEV is not set | 570 | # CONFIG_VIDEO_DEV is not set |
@@ -508,7 +591,7 @@ CONFIG_RTC=y | |||
508 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 591 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
509 | 592 | ||
510 | # | 593 | # |
511 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | 594 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
512 | # | 595 | # |
513 | 596 | ||
514 | # | 597 | # |
@@ -524,13 +607,21 @@ CONFIG_RTC=y | |||
524 | # | 607 | # |
525 | # InfiniBand support | 608 | # InfiniBand support |
526 | # | 609 | # |
527 | # CONFIG_INFINIBAND is not set | 610 | |
611 | # | ||
612 | # SN Devices | ||
613 | # | ||
614 | |||
615 | # | ||
616 | # EDAC - error detection and reporting (RAS) | ||
617 | # | ||
528 | 618 | ||
529 | # | 619 | # |
530 | # File systems | 620 | # File systems |
531 | # | 621 | # |
532 | CONFIG_EXT2_FS=y | 622 | CONFIG_EXT2_FS=y |
533 | # CONFIG_EXT2_FS_XATTR is not set | 623 | # CONFIG_EXT2_FS_XATTR is not set |
624 | # CONFIG_EXT2_FS_XIP is not set | ||
534 | CONFIG_EXT3_FS=y | 625 | CONFIG_EXT3_FS=y |
535 | CONFIG_EXT3_FS_XATTR=y | 626 | CONFIG_EXT3_FS_XATTR=y |
536 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 627 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
@@ -540,17 +631,17 @@ CONFIG_JBD=y | |||
540 | CONFIG_FS_MBCACHE=y | 631 | CONFIG_FS_MBCACHE=y |
541 | # CONFIG_REISERFS_FS is not set | 632 | # CONFIG_REISERFS_FS is not set |
542 | # CONFIG_JFS_FS is not set | 633 | # CONFIG_JFS_FS is not set |
543 | 634 | # CONFIG_FS_POSIX_ACL is not set | |
544 | # | ||
545 | # XFS support | ||
546 | # | ||
547 | # CONFIG_XFS_FS is not set | 635 | # CONFIG_XFS_FS is not set |
636 | # CONFIG_OCFS2_FS is not set | ||
548 | # CONFIG_MINIX_FS is not set | 637 | # CONFIG_MINIX_FS is not set |
549 | # CONFIG_ROMFS_FS is not set | 638 | # CONFIG_ROMFS_FS is not set |
639 | CONFIG_INOTIFY=y | ||
550 | # CONFIG_QUOTA is not set | 640 | # CONFIG_QUOTA is not set |
551 | CONFIG_DNOTIFY=y | 641 | CONFIG_DNOTIFY=y |
552 | # CONFIG_AUTOFS_FS is not set | 642 | # CONFIG_AUTOFS_FS is not set |
553 | # CONFIG_AUTOFS4_FS is not set | 643 | # CONFIG_AUTOFS4_FS is not set |
644 | # CONFIG_FUSE_FS is not set | ||
554 | 645 | ||
555 | # | 646 | # |
556 | # CD-ROM/DVD Filesystems | 647 | # CD-ROM/DVD Filesystems |
@@ -574,16 +665,12 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
574 | CONFIG_PROC_FS=y | 665 | CONFIG_PROC_FS=y |
575 | CONFIG_PROC_KCORE=y | 666 | CONFIG_PROC_KCORE=y |
576 | CONFIG_SYSFS=y | 667 | CONFIG_SYSFS=y |
577 | CONFIG_DEVFS_FS=y | ||
578 | CONFIG_DEVFS_MOUNT=y | ||
579 | # CONFIG_DEVFS_DEBUG is not set | ||
580 | CONFIG_DEVPTS_FS_XATTR=y | ||
581 | # CONFIG_DEVPTS_FS_SECURITY is not set | ||
582 | CONFIG_TMPFS=y | 668 | CONFIG_TMPFS=y |
583 | # CONFIG_TMPFS_XATTR is not set | ||
584 | # CONFIG_HUGETLBFS is not set | 669 | # CONFIG_HUGETLBFS is not set |
585 | # CONFIG_HUGETLB_PAGE is not set | 670 | # CONFIG_HUGETLB_PAGE is not set |
586 | CONFIG_RAMFS=y | 671 | CONFIG_RAMFS=y |
672 | # CONFIG_RELAYFS_FS is not set | ||
673 | # CONFIG_CONFIGFS_FS is not set | ||
587 | 674 | ||
588 | # | 675 | # |
589 | # Miscellaneous filesystems | 676 | # Miscellaneous filesystems |
@@ -607,12 +694,14 @@ CONFIG_RAMFS=y | |||
607 | # | 694 | # |
608 | CONFIG_NFS_FS=y | 695 | CONFIG_NFS_FS=y |
609 | CONFIG_NFS_V3=y | 696 | CONFIG_NFS_V3=y |
697 | # CONFIG_NFS_V3_ACL is not set | ||
610 | CONFIG_NFS_V4=y | 698 | CONFIG_NFS_V4=y |
611 | # CONFIG_NFS_DIRECTIO is not set | 699 | # CONFIG_NFS_DIRECTIO is not set |
612 | # CONFIG_NFSD is not set | 700 | # CONFIG_NFSD is not set |
613 | CONFIG_ROOT_NFS=y | 701 | CONFIG_ROOT_NFS=y |
614 | CONFIG_LOCKD=y | 702 | CONFIG_LOCKD=y |
615 | CONFIG_LOCKD_V4=y | 703 | CONFIG_LOCKD_V4=y |
704 | CONFIG_NFS_COMMON=y | ||
616 | CONFIG_SUNRPC=y | 705 | CONFIG_SUNRPC=y |
617 | CONFIG_SUNRPC_GSS=y | 706 | CONFIG_SUNRPC_GSS=y |
618 | CONFIG_RPCSEC_GSS_KRB5=y | 707 | CONFIG_RPCSEC_GSS_KRB5=y |
@@ -622,6 +711,7 @@ CONFIG_RPCSEC_GSS_KRB5=y | |||
622 | # CONFIG_NCP_FS is not set | 711 | # CONFIG_NCP_FS is not set |
623 | # CONFIG_CODA_FS is not set | 712 | # CONFIG_CODA_FS is not set |
624 | # CONFIG_AFS_FS is not set | 713 | # CONFIG_AFS_FS is not set |
714 | # CONFIG_9P_FS is not set | ||
625 | 715 | ||
626 | # | 716 | # |
627 | # Partition Types | 717 | # Partition Types |
@@ -681,8 +771,10 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
681 | # | 771 | # |
682 | # Kernel hacking | 772 | # Kernel hacking |
683 | # | 773 | # |
774 | # CONFIG_PRINTK_TIME is not set | ||
775 | # CONFIG_MAGIC_SYSRQ is not set | ||
684 | # CONFIG_DEBUG_KERNEL is not set | 776 | # CONFIG_DEBUG_KERNEL is not set |
685 | CONFIG_DEBUG_PREEMPT=y | 777 | CONFIG_LOG_BUF_SHIFT=14 |
686 | # CONFIG_FRAME_POINTER is not set | 778 | # CONFIG_FRAME_POINTER is not set |
687 | # CONFIG_SH_STANDARD_BIOS is not set | 779 | # CONFIG_SH_STANDARD_BIOS is not set |
688 | # CONFIG_EARLY_SCIF_CONSOLE is not set | 780 | # CONFIG_EARLY_SCIF_CONSOLE is not set |
@@ -706,6 +798,7 @@ CONFIG_CRYPTO_MD5=y | |||
706 | # CONFIG_CRYPTO_SHA256 is not set | 798 | # CONFIG_CRYPTO_SHA256 is not set |
707 | # CONFIG_CRYPTO_SHA512 is not set | 799 | # CONFIG_CRYPTO_SHA512 is not set |
708 | # CONFIG_CRYPTO_WP512 is not set | 800 | # CONFIG_CRYPTO_WP512 is not set |
801 | # CONFIG_CRYPTO_TGR192 is not set | ||
709 | CONFIG_CRYPTO_DES=y | 802 | CONFIG_CRYPTO_DES=y |
710 | # CONFIG_CRYPTO_BLOWFISH is not set | 803 | # CONFIG_CRYPTO_BLOWFISH is not set |
711 | # CONFIG_CRYPTO_TWOFISH is not set | 804 | # CONFIG_CRYPTO_TWOFISH is not set |
@@ -730,5 +823,6 @@ CONFIG_CRYPTO_DES=y | |||
730 | # Library routines | 823 | # Library routines |
731 | # | 824 | # |
732 | # CONFIG_CRC_CCITT is not set | 825 | # CONFIG_CRC_CCITT is not set |
826 | # CONFIG_CRC16 is not set | ||
733 | CONFIG_CRC32=y | 827 | CONFIG_CRC32=y |
734 | # CONFIG_LIBCRC32C is not set | 828 | # CONFIG_LIBCRC32C is not set |
diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile index 7a86eeb22655..f05cd96f8867 100644 --- a/arch/sh/kernel/Makefile +++ b/arch/sh/kernel/Makefile | |||
@@ -8,7 +8,7 @@ obj-y := process.o signal.o entry.o traps.o irq.o \ | |||
8 | ptrace.o setup.o time.o sys_sh.o semaphore.o \ | 8 | ptrace.o setup.o time.o sys_sh.o semaphore.o \ |
9 | io.o io_generic.o sh_ksyms.o | 9 | io.o io_generic.o sh_ksyms.o |
10 | 10 | ||
11 | obj-y += cpu/ | 11 | obj-y += cpu/ timers/ |
12 | 12 | ||
13 | obj-$(CONFIG_SMP) += smp.o | 13 | obj-$(CONFIG_SMP) += smp.o |
14 | obj-$(CONFIG_CF_ENABLER) += cf-enabler.o | 14 | obj-$(CONFIG_CF_ENABLER) += cf-enabler.o |
diff --git a/arch/sh/kernel/cpu/Makefile b/arch/sh/kernel/cpu/Makefile index 5bfc33bec5d0..59d5b748752f 100644 --- a/arch/sh/kernel/cpu/Makefile +++ b/arch/sh/kernel/cpu/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the Linux/SuperH CPU-specifc backends. | 2 | # Makefile for the Linux/SuperH CPU-specifc backends. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += irq/ init.o bus.o clock.o | 5 | obj-y += irq/ init.o clock.o |
6 | 6 | ||
7 | obj-$(CONFIG_CPU_SH2) += sh2/ | 7 | obj-$(CONFIG_CPU_SH2) += sh2/ |
8 | obj-$(CONFIG_CPU_SH3) += sh3/ | 8 | obj-$(CONFIG_CPU_SH3) += sh3/ |
diff --git a/arch/sh/kernel/cpu/bus.c b/arch/sh/kernel/cpu/bus.c deleted file mode 100644 index fc6c4bd40c65..000000000000 --- a/arch/sh/kernel/cpu/bus.c +++ /dev/null | |||
@@ -1,197 +0,0 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/cpu/bus.c | ||
3 | * | ||
4 | * Virtual bus for SuperH. | ||
5 | * | ||
6 | * Copyright (C) 2004 Paul Mundt | ||
7 | * | ||
8 | * Shamelessly cloned from arch/arm/mach-omap/bus.c, which was written | ||
9 | * by: | ||
10 | * | ||
11 | * Copyright (C) 2003 - 2004 Nokia Corporation | ||
12 | * Written by Tony Lindgren <tony@atomide.com> | ||
13 | * Portions of code based on sa1111.c. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify it | ||
16 | * under the terms of the GNU General Public License as published by the | ||
17 | * Free Software Foundation; either version 2 of the License, or (at your | ||
18 | * option) any later version. | ||
19 | */ | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/device.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/module.h> | ||
24 | #include <asm/bus-sh.h> | ||
25 | |||
26 | static int sh_bus_match(struct device *dev, struct device_driver *drv) | ||
27 | { | ||
28 | struct sh_driver *shdrv = to_sh_driver(drv); | ||
29 | struct sh_dev *shdev = to_sh_dev(dev); | ||
30 | |||
31 | return shdev->dev_id == shdrv->dev_id; | ||
32 | } | ||
33 | |||
34 | static int sh_bus_suspend(struct device *dev, pm_message_t state) | ||
35 | { | ||
36 | struct sh_dev *shdev = to_sh_dev(dev); | ||
37 | struct sh_driver *shdrv = to_sh_driver(dev->driver); | ||
38 | |||
39 | if (shdrv && shdrv->suspend) | ||
40 | return shdrv->suspend(shdev, state); | ||
41 | |||
42 | return 0; | ||
43 | } | ||
44 | |||
45 | static int sh_bus_resume(struct device *dev) | ||
46 | { | ||
47 | struct sh_dev *shdev = to_sh_dev(dev); | ||
48 | struct sh_driver *shdrv = to_sh_driver(dev->driver); | ||
49 | |||
50 | if (shdrv && shdrv->resume) | ||
51 | return shdrv->resume(shdev); | ||
52 | |||
53 | return 0; | ||
54 | } | ||
55 | |||
56 | static int sh_device_probe(struct device *dev) | ||
57 | { | ||
58 | struct sh_dev *shdev = to_sh_dev(dev); | ||
59 | struct sh_driver *shdrv = to_sh_driver(dev->driver); | ||
60 | |||
61 | if (shdrv && shdrv->probe) | ||
62 | return shdrv->probe(shdev); | ||
63 | |||
64 | return -ENODEV; | ||
65 | } | ||
66 | |||
67 | static int sh_device_remove(struct device *dev) | ||
68 | { | ||
69 | struct sh_dev *shdev = to_sh_dev(dev); | ||
70 | struct sh_driver *shdrv = to_sh_driver(dev->driver); | ||
71 | |||
72 | if (shdrv && shdrv->remove) | ||
73 | return shdrv->remove(shdev); | ||
74 | |||
75 | return 0; | ||
76 | } | ||
77 | |||
78 | static struct device sh_bus_devices[SH_NR_BUSES] = { | ||
79 | { | ||
80 | .bus_id = SH_BUS_NAME_VIRT, | ||
81 | }, | ||
82 | }; | ||
83 | |||
84 | struct bus_type sh_bus_types[SH_NR_BUSES] = { | ||
85 | { | ||
86 | .name = SH_BUS_NAME_VIRT, | ||
87 | .match = sh_bus_match, | ||
88 | .probe = sh_bus_probe, | ||
89 | .remove = sh_bus_remove, | ||
90 | .suspend = sh_bus_suspend, | ||
91 | .resume = sh_bus_resume, | ||
92 | }, | ||
93 | }; | ||
94 | |||
95 | int sh_device_register(struct sh_dev *dev) | ||
96 | { | ||
97 | if (!dev) | ||
98 | return -EINVAL; | ||
99 | |||
100 | if (dev->bus_id < 0 || dev->bus_id >= SH_NR_BUSES) { | ||
101 | printk(KERN_ERR "%s: bus_id invalid: %s bus: %d\n", | ||
102 | __FUNCTION__, dev->name, dev->bus_id); | ||
103 | return -EINVAL; | ||
104 | } | ||
105 | |||
106 | dev->dev.parent = &sh_bus_devices[dev->bus_id]; | ||
107 | dev->dev.bus = &sh_bus_types[dev->bus_id]; | ||
108 | |||
109 | /* This is needed for USB OHCI to work */ | ||
110 | if (dev->dma_mask) | ||
111 | dev->dev.dma_mask = dev->dma_mask; | ||
112 | if (dev->coherent_dma_mask) | ||
113 | dev->dev.coherent_dma_mask = dev->coherent_dma_mask; | ||
114 | |||
115 | snprintf(dev->dev.bus_id, BUS_ID_SIZE, "%s%u", | ||
116 | dev->name, dev->dev_id); | ||
117 | |||
118 | printk(KERN_INFO "Registering SH device '%s'. Parent at %s\n", | ||
119 | dev->dev.bus_id, dev->dev.parent->bus_id); | ||
120 | |||
121 | return device_register(&dev->dev); | ||
122 | } | ||
123 | |||
124 | void sh_device_unregister(struct sh_dev *dev) | ||
125 | { | ||
126 | device_unregister(&dev->dev); | ||
127 | } | ||
128 | |||
129 | int sh_driver_register(struct sh_driver *drv) | ||
130 | { | ||
131 | if (!drv) | ||
132 | return -EINVAL; | ||
133 | |||
134 | if (drv->bus_id < 0 || drv->bus_id >= SH_NR_BUSES) { | ||
135 | printk(KERN_ERR "%s: bus_id invalid: bus: %d device %d\n", | ||
136 | __FUNCTION__, drv->bus_id, drv->dev_id); | ||
137 | return -EINVAL; | ||
138 | } | ||
139 | |||
140 | drv->drv.bus = &sh_bus_types[drv->bus_id]; | ||
141 | |||
142 | return driver_register(&drv->drv); | ||
143 | } | ||
144 | |||
145 | void sh_driver_unregister(struct sh_driver *drv) | ||
146 | { | ||
147 | driver_unregister(&drv->drv); | ||
148 | } | ||
149 | |||
150 | static int __init sh_bus_init(void) | ||
151 | { | ||
152 | int i, ret = 0; | ||
153 | |||
154 | for (i = 0; i < SH_NR_BUSES; i++) { | ||
155 | ret = device_register(&sh_bus_devices[i]); | ||
156 | if (ret != 0) { | ||
157 | printk(KERN_ERR "Unable to register bus device %s\n", | ||
158 | sh_bus_devices[i].bus_id); | ||
159 | continue; | ||
160 | } | ||
161 | |||
162 | ret = bus_register(&sh_bus_types[i]); | ||
163 | if (ret != 0) { | ||
164 | printk(KERN_ERR "Unable to register bus %s\n", | ||
165 | sh_bus_types[i].name); | ||
166 | device_unregister(&sh_bus_devices[i]); | ||
167 | } | ||
168 | } | ||
169 | |||
170 | printk(KERN_INFO "SH Virtual Bus initialized\n"); | ||
171 | |||
172 | return ret; | ||
173 | } | ||
174 | |||
175 | static void __exit sh_bus_exit(void) | ||
176 | { | ||
177 | int i; | ||
178 | |||
179 | for (i = 0; i < SH_NR_BUSES; i++) { | ||
180 | bus_unregister(&sh_bus_types[i]); | ||
181 | device_unregister(&sh_bus_devices[i]); | ||
182 | } | ||
183 | } | ||
184 | |||
185 | module_init(sh_bus_init); | ||
186 | module_exit(sh_bus_exit); | ||
187 | |||
188 | MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>"); | ||
189 | MODULE_DESCRIPTION("SH Virtual Bus"); | ||
190 | MODULE_LICENSE("GPL"); | ||
191 | |||
192 | EXPORT_SYMBOL(sh_bus_types); | ||
193 | EXPORT_SYMBOL(sh_device_register); | ||
194 | EXPORT_SYMBOL(sh_device_unregister); | ||
195 | EXPORT_SYMBOL(sh_driver_register); | ||
196 | EXPORT_SYMBOL(sh_driver_unregister); | ||
197 | |||
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index 989e7fdd524d..97fa37f42b84 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c | |||
@@ -38,9 +38,7 @@ static DECLARE_MUTEX(clock_list_sem); | |||
38 | static struct clk master_clk = { | 38 | static struct clk master_clk = { |
39 | .name = "master_clk", | 39 | .name = "master_clk", |
40 | .flags = CLK_ALWAYS_ENABLED | CLK_RATE_PROPAGATES, | 40 | .flags = CLK_ALWAYS_ENABLED | CLK_RATE_PROPAGATES, |
41 | #ifdef CONFIG_SH_PCLK_FREQ_BOOL | ||
42 | .rate = CONFIG_SH_PCLK_FREQ, | 41 | .rate = CONFIG_SH_PCLK_FREQ, |
43 | #endif | ||
44 | }; | 42 | }; |
45 | 43 | ||
46 | static struct clk module_clk = { | 44 | static struct clk module_clk = { |
@@ -227,16 +225,7 @@ int __init clk_init(void) | |||
227 | { | 225 | { |
228 | int i, ret = 0; | 226 | int i, ret = 0; |
229 | 227 | ||
230 | if (unlikely(!master_clk.rate)) | 228 | BUG_ON(unlikely(!master_clk.rate)); |
231 | /* | ||
232 | * NOTE: This will break if the default divisor has been | ||
233 | * changed. | ||
234 | * | ||
235 | * No one should be changing the default on us however, | ||
236 | * expect that a sane value for CONFIG_SH_PCLK_FREQ will | ||
237 | * be defined in the event of a different divisor. | ||
238 | */ | ||
239 | master_clk.rate = get_timer_frequency() * 4; | ||
240 | 229 | ||
241 | for (i = 0; i < ARRAY_SIZE(onchip_clocks); i++) { | 230 | for (i = 0; i < ARRAY_SIZE(onchip_clocks); i++) { |
242 | struct clk *clk = onchip_clocks[i]; | 231 | struct clk *clk = onchip_clocks[i]; |
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c index fdbd718ae5c6..e55150ed0856 100644 --- a/arch/sh/kernel/cpu/irq/ipr.c +++ b/arch/sh/kernel/cpu/irq/ipr.c | |||
@@ -108,8 +108,7 @@ static void end_ipr_irq(unsigned int irq) | |||
108 | enable_ipr_irq(irq); | 108 | enable_ipr_irq(irq); |
109 | } | 109 | } |
110 | 110 | ||
111 | void make_ipr_irq(unsigned int irq, unsigned int addr, int pos, | 111 | void make_ipr_irq(unsigned int irq, unsigned int addr, int pos, int priority) |
112 | int priority, int maskpos) | ||
113 | { | 112 | { |
114 | disable_irq_nosync(irq); | 113 | disable_irq_nosync(irq); |
115 | ipr_data[irq].addr = addr; | 114 | ipr_data[irq].addr = addr; |
@@ -123,44 +122,44 @@ void make_ipr_irq(unsigned int irq, unsigned int addr, int pos, | |||
123 | void __init init_IRQ(void) | 122 | void __init init_IRQ(void) |
124 | { | 123 | { |
125 | #ifndef CONFIG_CPU_SUBTYPE_SH7780 | 124 | #ifndef CONFIG_CPU_SUBTYPE_SH7780 |
126 | make_ipr_irq(TIMER_IRQ, TIMER_IPR_ADDR, TIMER_IPR_POS, TIMER_PRIORITY, 0); | 125 | make_ipr_irq(TIMER_IRQ, TIMER_IPR_ADDR, TIMER_IPR_POS, TIMER_PRIORITY); |
127 | make_ipr_irq(TIMER1_IRQ, TIMER1_IPR_ADDR, TIMER1_IPR_POS, TIMER1_PRIORITY, 0); | 126 | make_ipr_irq(TIMER1_IRQ, TIMER1_IPR_ADDR, TIMER1_IPR_POS, TIMER1_PRIORITY); |
128 | #if defined(CONFIG_SH_RTC) | 127 | #if defined(CONFIG_SH_RTC) |
129 | make_ipr_irq(RTC_IRQ, RTC_IPR_ADDR, RTC_IPR_POS, RTC_PRIORITY, 0); | 128 | make_ipr_irq(RTC_IRQ, RTC_IPR_ADDR, RTC_IPR_POS, RTC_PRIORITY); |
130 | #endif | 129 | #endif |
131 | 130 | ||
132 | #ifdef SCI_ERI_IRQ | 131 | #ifdef SCI_ERI_IRQ |
133 | make_ipr_irq(SCI_ERI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY, 0); | 132 | make_ipr_irq(SCI_ERI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY); |
134 | make_ipr_irq(SCI_RXI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY, 0); | 133 | make_ipr_irq(SCI_RXI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY); |
135 | make_ipr_irq(SCI_TXI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY, 0); | 134 | make_ipr_irq(SCI_TXI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY); |
136 | #endif | 135 | #endif |
137 | 136 | ||
138 | #ifdef SCIF1_ERI_IRQ | 137 | #ifdef SCIF1_ERI_IRQ |
139 | make_ipr_irq(SCIF1_ERI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY, 0); | 138 | make_ipr_irq(SCIF1_ERI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY); |
140 | make_ipr_irq(SCIF1_RXI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY, 0); | 139 | make_ipr_irq(SCIF1_RXI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY); |
141 | make_ipr_irq(SCIF1_BRI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY, 0); | 140 | make_ipr_irq(SCIF1_BRI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY); |
142 | make_ipr_irq(SCIF1_TXI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY, 0); | 141 | make_ipr_irq(SCIF1_TXI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY); |
143 | #endif | 142 | #endif |
144 | 143 | ||
145 | #if defined(CONFIG_CPU_SUBTYPE_SH7300) | 144 | #if defined(CONFIG_CPU_SUBTYPE_SH7300) |
146 | make_ipr_irq(SCIF0_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY, 0); | 145 | make_ipr_irq(SCIF0_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY); |
147 | make_ipr_irq(DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY, 0); | 146 | make_ipr_irq(DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); |
148 | make_ipr_irq(DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY, 0); | 147 | make_ipr_irq(DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); |
149 | make_ipr_irq(VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY, 0); | 148 | make_ipr_irq(VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); |
150 | #endif | 149 | #endif |
151 | 150 | ||
152 | #ifdef SCIF_ERI_IRQ | 151 | #ifdef SCIF_ERI_IRQ |
153 | make_ipr_irq(SCIF_ERI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY, 0); | 152 | make_ipr_irq(SCIF_ERI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY); |
154 | make_ipr_irq(SCIF_RXI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY, 0); | 153 | make_ipr_irq(SCIF_RXI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY); |
155 | make_ipr_irq(SCIF_BRI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY, 0); | 154 | make_ipr_irq(SCIF_BRI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY); |
156 | make_ipr_irq(SCIF_TXI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY, 0); | 155 | make_ipr_irq(SCIF_TXI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY); |
157 | #endif | 156 | #endif |
158 | 157 | ||
159 | #ifdef IRDA_ERI_IRQ | 158 | #ifdef IRDA_ERI_IRQ |
160 | make_ipr_irq(IRDA_ERI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY, 0); | 159 | make_ipr_irq(IRDA_ERI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY); |
161 | make_ipr_irq(IRDA_RXI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY, 0); | 160 | make_ipr_irq(IRDA_RXI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY); |
162 | make_ipr_irq(IRDA_BRI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY, 0); | 161 | make_ipr_irq(IRDA_BRI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY); |
163 | make_ipr_irq(IRDA_TXI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY, 0); | 162 | make_ipr_irq(IRDA_TXI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY); |
164 | #endif | 163 | #endif |
165 | 164 | ||
166 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | 165 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ |
@@ -175,12 +174,12 @@ void __init init_IRQ(void) | |||
175 | * You should set corresponding bits of PFC to "00" | 174 | * You should set corresponding bits of PFC to "00" |
176 | * to enable these interrupts. | 175 | * to enable these interrupts. |
177 | */ | 176 | */ |
178 | make_ipr_irq(IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, IRQ0_PRIORITY, 0); | 177 | make_ipr_irq(IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, IRQ0_PRIORITY); |
179 | make_ipr_irq(IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, IRQ1_PRIORITY, 0); | 178 | make_ipr_irq(IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, IRQ1_PRIORITY); |
180 | make_ipr_irq(IRQ2_IRQ, IRQ2_IPR_ADDR, IRQ2_IPR_POS, IRQ2_PRIORITY, 0); | 179 | make_ipr_irq(IRQ2_IRQ, IRQ2_IPR_ADDR, IRQ2_IPR_POS, IRQ2_PRIORITY); |
181 | make_ipr_irq(IRQ3_IRQ, IRQ3_IPR_ADDR, IRQ3_IPR_POS, IRQ3_PRIORITY, 0); | 180 | make_ipr_irq(IRQ3_IRQ, IRQ3_IPR_ADDR, IRQ3_IPR_POS, IRQ3_PRIORITY); |
182 | make_ipr_irq(IRQ4_IRQ, IRQ4_IPR_ADDR, IRQ4_IPR_POS, IRQ4_PRIORITY, 0); | 181 | make_ipr_irq(IRQ4_IRQ, IRQ4_IPR_ADDR, IRQ4_IPR_POS, IRQ4_PRIORITY); |
183 | make_ipr_irq(IRQ5_IRQ, IRQ5_IPR_ADDR, IRQ5_IPR_POS, IRQ5_PRIORITY, 0); | 182 | make_ipr_irq(IRQ5_IRQ, IRQ5_IPR_ADDR, IRQ5_IPR_POS, IRQ5_PRIORITY); |
184 | #endif | 183 | #endif |
185 | #endif | 184 | #endif |
186 | 185 | ||
diff --git a/arch/sh/kernel/entry.S b/arch/sh/kernel/entry.S index fb6368159dd0..a440d36ee618 100644 --- a/arch/sh/kernel/entry.S +++ b/arch/sh/kernel/entry.S | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | #include <asm/asm-offsets.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/thread_info.h> | 18 | #include <asm/thread_info.h> |
19 | #include <asm/cpu/mmu_context.h> | ||
19 | #include <asm/unistd.h> | 20 | #include <asm/unistd.h> |
20 | 21 | ||
21 | #if !defined(CONFIG_NFSD) && !defined(CONFIG_NFSD_MODULE) | 22 | #if !defined(CONFIG_NFSD) && !defined(CONFIG_NFSD_MODULE) |
@@ -75,23 +76,6 @@ | |||
75 | ENOSYS = 38 | 76 | ENOSYS = 38 |
76 | EINVAL = 22 | 77 | EINVAL = 22 |
77 | 78 | ||
78 | #if defined(CONFIG_CPU_SH3) | ||
79 | TRA = 0xffffffd0 | ||
80 | EXPEVT = 0xffffffd4 | ||
81 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | ||
82 | defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
83 | INTEVT = 0xa4000000 ! INTEVTE2(0xa4000000) | ||
84 | #else | ||
85 | INTEVT = 0xffffffd8 | ||
86 | #endif | ||
87 | MMU_TEA = 0xfffffffc ! TLB Exception Address Register | ||
88 | #elif defined(CONFIG_CPU_SH4) | ||
89 | TRA = 0xff000020 | ||
90 | EXPEVT = 0xff000024 | ||
91 | INTEVT = 0xff000028 | ||
92 | MMU_TEA = 0xff00000c ! TLB Exception Address Register | ||
93 | #endif | ||
94 | |||
95 | #if defined(CONFIG_KGDB_NMI) | 79 | #if defined(CONFIG_KGDB_NMI) |
96 | NMI_VEC = 0x1c0 ! Must catch early for debounce | 80 | NMI_VEC = 0x1c0 ! Must catch early for debounce |
97 | #endif | 81 | #endif |
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index a4dc2b532e10..9fd1723e6219 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -15,21 +15,18 @@ | |||
15 | #include <linux/unistd.h> | 15 | #include <linux/unistd.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/elfcore.h> | 17 | #include <linux/elfcore.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/a.out.h> | 18 | #include <linux/a.out.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/pm.h> | ||
20 | #include <linux/ptrace.h> | 21 | #include <linux/ptrace.h> |
21 | #include <linux/platform.h> | 22 | #include <linux/platform.h> |
22 | #include <linux/kallsyms.h> | 23 | #include <linux/kallsyms.h> |
24 | #include <linux/kexec.h> | ||
23 | 25 | ||
24 | #include <asm/io.h> | 26 | #include <asm/io.h> |
25 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
26 | #include <asm/mmu_context.h> | 28 | #include <asm/mmu_context.h> |
27 | #include <asm/elf.h> | 29 | #include <asm/elf.h> |
28 | #if defined(CONFIG_SH_HS7751RVOIP) | ||
29 | #include <asm/hs7751rvoip/hs7751rvoip.h> | ||
30 | #elif defined(CONFIG_SH_RTS7751R2D) | ||
31 | #include <asm/rts7751r2d/rts7751r2d.h> | ||
32 | #endif | ||
33 | 30 | ||
34 | static int hlt_counter=0; | 31 | static int hlt_counter=0; |
35 | 32 | ||
@@ -37,6 +34,11 @@ int ubc_usercnt = 0; | |||
37 | 34 | ||
38 | #define HARD_IDLE_TIMEOUT (HZ / 3) | 35 | #define HARD_IDLE_TIMEOUT (HZ / 3) |
39 | 36 | ||
37 | void (*pm_idle)(void); | ||
38 | |||
39 | void (*pm_power_off)(void); | ||
40 | EXPORT_SYMBOL(pm_power_off); | ||
41 | |||
40 | void disable_hlt(void) | 42 | void disable_hlt(void) |
41 | { | 43 | { |
42 | hlt_counter++; | 44 | hlt_counter++; |
@@ -51,17 +53,25 @@ void enable_hlt(void) | |||
51 | 53 | ||
52 | EXPORT_SYMBOL(enable_hlt); | 54 | EXPORT_SYMBOL(enable_hlt); |
53 | 55 | ||
56 | void default_idle(void) | ||
57 | { | ||
58 | if (!hlt_counter) | ||
59 | cpu_sleep(); | ||
60 | else | ||
61 | cpu_relax(); | ||
62 | } | ||
63 | |||
54 | void cpu_idle(void) | 64 | void cpu_idle(void) |
55 | { | 65 | { |
56 | /* endless idle loop with no priority at all */ | 66 | /* endless idle loop with no priority at all */ |
57 | while (1) { | 67 | while (1) { |
58 | if (hlt_counter) { | 68 | void (*idle)(void) = pm_idle; |
59 | while (!need_resched()) | 69 | |
60 | cpu_relax(); | 70 | if (!idle) |
61 | } else { | 71 | idle = default_idle; |
62 | while (!need_resched()) | 72 | |
63 | cpu_sleep(); | 73 | while (!need_resched()) |
64 | } | 74 | idle(); |
65 | 75 | ||
66 | preempt_enable_no_resched(); | 76 | preempt_enable_no_resched(); |
67 | schedule(); | 77 | schedule(); |
@@ -88,28 +98,16 @@ void machine_restart(char * __unused) | |||
88 | 98 | ||
89 | void machine_halt(void) | 99 | void machine_halt(void) |
90 | { | 100 | { |
91 | #if defined(CONFIG_SH_HS7751RVOIP) | 101 | local_irq_disable(); |
92 | unsigned short value; | ||
93 | 102 | ||
94 | value = ctrl_inw(PA_OUTPORTR); | ||
95 | ctrl_outw((value & 0xffdf), PA_OUTPORTR); | ||
96 | #elif defined(CONFIG_SH_RTS7751R2D) | ||
97 | ctrl_outw(0x0001, PA_POWOFF); | ||
98 | #endif | ||
99 | while (1) | 103 | while (1) |
100 | cpu_sleep(); | 104 | cpu_sleep(); |
101 | } | 105 | } |
102 | 106 | ||
103 | void machine_power_off(void) | 107 | void machine_power_off(void) |
104 | { | 108 | { |
105 | #if defined(CONFIG_SH_HS7751RVOIP) | 109 | if (pm_power_off) |
106 | unsigned short value; | 110 | pm_power_off(); |
107 | |||
108 | value = ctrl_inw(PA_OUTPORTR); | ||
109 | ctrl_outw((value & 0xffdf), PA_OUTPORTR); | ||
110 | #elif defined(CONFIG_SH_RTS7751R2D) | ||
111 | ctrl_outw(0x0001, PA_POWOFF); | ||
112 | #endif | ||
113 | } | 111 | } |
114 | 112 | ||
115 | void show_regs(struct pt_regs * regs) | 113 | void show_regs(struct pt_regs * regs) |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 036050b377cd..a067a34e0b64 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -22,10 +22,10 @@ | |||
22 | #include <linux/cpu.h> | 22 | #include <linux/cpu.h> |
23 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
24 | #include <asm/io.h> | 24 | #include <asm/io.h> |
25 | #include <asm/io_generic.h> | ||
26 | #include <asm/sections.h> | 25 | #include <asm/sections.h> |
27 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
28 | #include <asm/setup.h> | 27 | #include <asm/setup.h> |
28 | #include <asm/clock.h> | ||
29 | 29 | ||
30 | #ifdef CONFIG_SH_KGDB | 30 | #ifdef CONFIG_SH_KGDB |
31 | #include <asm/kgdb.h> | 31 | #include <asm/kgdb.h> |
@@ -41,7 +41,7 @@ extern void * __rd_start, * __rd_end; | |||
41 | * This value will be used at the very early stage of serial setup. | 41 | * This value will be used at the very early stage of serial setup. |
42 | * The bigger value means no problem. | 42 | * The bigger value means no problem. |
43 | */ | 43 | */ |
44 | struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 0, 10000000, }; | 44 | struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, }; |
45 | struct screen_info screen_info; | 45 | struct screen_info screen_info; |
46 | 46 | ||
47 | #if defined(CONFIG_SH_UNKNOWN) | 47 | #if defined(CONFIG_SH_UNKNOWN) |
@@ -186,7 +186,7 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | |||
186 | 186 | ||
187 | static int __init sh_mv_setup(char **cmdline_p) | 187 | static int __init sh_mv_setup(char **cmdline_p) |
188 | { | 188 | { |
189 | #if defined(CONFIG_SH_UNKNOWN) | 189 | #ifdef CONFIG_SH_UNKNOWN |
190 | extern struct sh_machine_vector mv_unknown; | 190 | extern struct sh_machine_vector mv_unknown; |
191 | #endif | 191 | #endif |
192 | struct sh_machine_vector *mv = NULL; | 192 | struct sh_machine_vector *mv = NULL; |
@@ -196,7 +196,7 @@ static int __init sh_mv_setup(char **cmdline_p) | |||
196 | 196 | ||
197 | parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base, &mv_mmio_enable); | 197 | parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base, &mv_mmio_enable); |
198 | 198 | ||
199 | #ifdef CONFIG_SH_GENERIC | 199 | #ifdef CONFIG_SH_UNKNOWN |
200 | if (mv == NULL) { | 200 | if (mv == NULL) { |
201 | mv = &mv_unknown; | 201 | mv = &mv_unknown; |
202 | if (*mv_name != '\0') { | 202 | if (*mv_name != '\0') { |
@@ -206,9 +206,6 @@ static int __init sh_mv_setup(char **cmdline_p) | |||
206 | } | 206 | } |
207 | sh_mv = *mv; | 207 | sh_mv = *mv; |
208 | #endif | 208 | #endif |
209 | #ifdef CONFIG_SH_UNKNOWN | ||
210 | sh_mv = mv_unknown; | ||
211 | #endif | ||
212 | 209 | ||
213 | /* | 210 | /* |
214 | * Manually walk the vec, fill in anything that the board hasn't yet | 211 | * Manually walk the vec, fill in anything that the board hasn't yet |
@@ -231,10 +228,8 @@ static int __init sh_mv_setup(char **cmdline_p) | |||
231 | mv_set(readb); mv_set(readw); mv_set(readl); | 228 | mv_set(readb); mv_set(readw); mv_set(readl); |
232 | mv_set(writeb); mv_set(writew); mv_set(writel); | 229 | mv_set(writeb); mv_set(writew); mv_set(writel); |
233 | 230 | ||
234 | mv_set(ioremap); | 231 | mv_set(ioport_map); |
235 | mv_set(iounmap); | 232 | mv_set(ioport_unmap); |
236 | |||
237 | mv_set(isa_port2addr); | ||
238 | mv_set(irq_demux); | 233 | mv_set(irq_demux); |
239 | 234 | ||
240 | #ifdef CONFIG_SH_UNKNOWN | 235 | #ifdef CONFIG_SH_UNKNOWN |
@@ -273,10 +268,10 @@ void __init setup_arch(char **cmdline_p) | |||
273 | init_mm.end_data = (unsigned long) _edata; | 268 | init_mm.end_data = (unsigned long) _edata; |
274 | init_mm.brk = (unsigned long) _end; | 269 | init_mm.brk = (unsigned long) _end; |
275 | 270 | ||
276 | code_resource.start = virt_to_bus(_text); | 271 | code_resource.start = (unsigned long)virt_to_phys(_text); |
277 | code_resource.end = virt_to_bus(_etext)-1; | 272 | code_resource.end = (unsigned long)virt_to_phys(_etext)-1; |
278 | data_resource.start = virt_to_bus(_etext); | 273 | data_resource.start = (unsigned long)virt_to_phys(_etext); |
279 | data_resource.end = virt_to_bus(_edata)-1; | 274 | data_resource.end = (unsigned long)virt_to_phys(_edata)-1; |
280 | 275 | ||
281 | sh_mv_setup(cmdline_p); | 276 | sh_mv_setup(cmdline_p); |
282 | 277 | ||
@@ -435,6 +430,9 @@ static const char *cpu_name[] = { | |||
435 | [CPU_ST40GX1] = "ST40GX1", | 430 | [CPU_ST40GX1] = "ST40GX1", |
436 | [CPU_SH4_202] = "SH4-202", | 431 | [CPU_SH4_202] = "SH4-202", |
437 | [CPU_SH4_501] = "SH4-501", | 432 | [CPU_SH4_501] = "SH4-501", |
433 | [CPU_SH7770] = "SH7770", | ||
434 | [CPU_SH7780] = "SH7780", | ||
435 | [CPU_SH7781] = "SH7781", | ||
438 | [CPU_SH_NONE] = "Unknown" | 436 | [CPU_SH_NONE] = "Unknown" |
439 | }; | 437 | }; |
440 | 438 | ||
@@ -445,7 +443,7 @@ const char *get_cpu_subtype(void) | |||
445 | 443 | ||
446 | #ifdef CONFIG_PROC_FS | 444 | #ifdef CONFIG_PROC_FS |
447 | static const char *cpu_flags[] = { | 445 | static const char *cpu_flags[] = { |
448 | "none", "fpu", "p2flush", "mmuassoc", "dsp", "perfctr", | 446 | "none", "fpu", "p2flush", "mmuassoc", "dsp", "perfctr", "ptea", NULL |
449 | }; | 447 | }; |
450 | 448 | ||
451 | static void show_cpuflags(struct seq_file *m) | 449 | static void show_cpuflags(struct seq_file *m) |
@@ -459,7 +457,7 @@ static void show_cpuflags(struct seq_file *m) | |||
459 | return; | 457 | return; |
460 | } | 458 | } |
461 | 459 | ||
462 | for (i = 0; i < cpu_data->flags; i++) | 460 | for (i = 0; cpu_flags[i]; i++) |
463 | if ((cpu_data->flags & (1 << i))) | 461 | if ((cpu_data->flags & (1 << i))) |
464 | seq_printf(m, " %s", cpu_flags[i+1]); | 462 | seq_printf(m, " %s", cpu_flags[i+1]); |
465 | 463 | ||
@@ -472,7 +470,8 @@ static void show_cacheinfo(struct seq_file *m, const char *type, struct cache_in | |||
472 | 470 | ||
473 | cache_size = info.ways * info.sets * info.linesz; | 471 | cache_size = info.ways * info.sets * info.linesz; |
474 | 472 | ||
475 | seq_printf(m, "%s size\t: %dKiB\n", type, cache_size >> 10); | 473 | seq_printf(m, "%s size\t: %2dKiB (%d-way)\n", |
474 | type, cache_size >> 10, info.ways); | ||
476 | } | 475 | } |
477 | 476 | ||
478 | /* | 477 | /* |
@@ -511,21 +510,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
511 | boot_cpu_data.loops_per_jiffy/(500000/HZ), | 510 | boot_cpu_data.loops_per_jiffy/(500000/HZ), |
512 | (boot_cpu_data.loops_per_jiffy/(5000/HZ)) % 100); | 511 | (boot_cpu_data.loops_per_jiffy/(5000/HZ)) % 100); |
513 | 512 | ||
514 | #define PRINT_CLOCK(name, value) \ | 513 | return show_clocks(m); |
515 | seq_printf(m, name " clock\t: %d.%02dMHz\n", \ | ||
516 | ((value) / 1000000), ((value) % 1000000)/10000) | ||
517 | |||
518 | PRINT_CLOCK("cpu", boot_cpu_data.cpu_clock); | ||
519 | PRINT_CLOCK("bus", boot_cpu_data.bus_clock); | ||
520 | #ifdef CONFIG_CPU_SUBTYPE_ST40STB1 | ||
521 | PRINT_CLOCK("memory", boot_cpu_data.memory_clock); | ||
522 | #endif | ||
523 | PRINT_CLOCK("module", boot_cpu_data.module_clock); | ||
524 | |||
525 | return 0; | ||
526 | } | 514 | } |
527 | 515 | ||
528 | |||
529 | static void *c_start(struct seq_file *m, loff_t *pos) | 516 | static void *c_start(struct seq_file *m, loff_t *pos) |
530 | { | 517 | { |
531 | return *pos < NR_CPUS ? cpu_data + *pos : NULL; | 518 | return *pos < NR_CPUS ? cpu_data + *pos : NULL; |
@@ -596,7 +583,7 @@ static int __init kgdb_parse_options(char *options) | |||
596 | options += map->namelen + 1; | 583 | options += map->namelen + 1; |
597 | 584 | ||
598 | options = (*options == ',') ? options+1 : options; | 585 | options = (*options == ',') ? options+1 : options; |
599 | 586 | ||
600 | /* Read optional parameters (baud/parity/bits) */ | 587 | /* Read optional parameters (baud/parity/bits) */ |
601 | baud = simple_strtoul(options, &options, 10); | 588 | baud = simple_strtoul(options, &options, 10); |
602 | if (baud != 0) { | 589 | if (baud != 0) { |
diff --git a/arch/sh64/kernel/time.c b/arch/sh64/kernel/time.c index 1195af37ee5a..0773c9f389f3 100644 --- a/arch/sh64/kernel/time.c +++ b/arch/sh64/kernel/time.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/profile.h> | 30 | #include <linux/profile.h> |
31 | #include <linux/smp.h> | 31 | #include <linux/smp.h> |
32 | #include <linux/module.h> | ||
32 | 33 | ||
33 | #include <asm/registers.h> /* required by inline __asm__ stmt. */ | 34 | #include <asm/registers.h> /* required by inline __asm__ stmt. */ |
34 | 35 | ||
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index c51d08d218ef..267ec8f6fb58 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | #define curptr g6 | 39 | #define curptr g6 |
40 | 40 | ||
41 | #define NR_SYSCALLS 284 /* Each OS is different... */ | 41 | #define NR_SYSCALLS 299 /* Each OS is different... */ |
42 | 42 | ||
43 | /* These are just handy. */ | 43 | /* These are just handy. */ |
44 | #define _SV save %sp, -STACKFRAME_SZ, %sp | 44 | #define _SV save %sp, -STACKFRAME_SZ, %sp |
diff --git a/arch/sparc/math-emu/math.c b/arch/sparc/math-emu/math.c index be2c80932e26..8613b3eb877c 100644 --- a/arch/sparc/math-emu/math.c +++ b/arch/sparc/math-emu/math.c | |||
@@ -323,11 +323,6 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs) | |||
323 | case FMOVS: | 323 | case FMOVS: |
324 | case FABSS: | 324 | case FABSS: |
325 | case FNEGS: TYPE(2,1,0,1,0,0,0); break; | 325 | case FNEGS: TYPE(2,1,0,1,0,0,0); break; |
326 | default: | ||
327 | #ifdef DEBUG_MATHEMU | ||
328 | printk("unknown FPop1: %03lx\n",(insn>>5)&0x1ff); | ||
329 | #endif | ||
330 | break; | ||
331 | } | 326 | } |
332 | } else if ((insn & 0xc1f80000) == 0x81a80000) /* FPOP2 */ { | 327 | } else if ((insn & 0xc1f80000) == 0x81a80000) /* FPOP2 */ { |
333 | switch ((insn >> 5) & 0x1ff) { | 328 | switch ((insn >> 5) & 0x1ff) { |
@@ -337,11 +332,6 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs) | |||
337 | case FCMPED: TYPE(3,0,0,2,1,2,1); break; | 332 | case FCMPED: TYPE(3,0,0,2,1,2,1); break; |
338 | case FCMPQ: TYPE(3,0,0,3,1,3,1); break; | 333 | case FCMPQ: TYPE(3,0,0,3,1,3,1); break; |
339 | case FCMPEQ: TYPE(3,0,0,3,1,3,1); break; | 334 | case FCMPEQ: TYPE(3,0,0,3,1,3,1); break; |
340 | default: | ||
341 | #ifdef DEBUG_MATHEMU | ||
342 | printk("unknown FPop2: %03lx\n",(insn>>5)&0x1ff); | ||
343 | #endif | ||
344 | break; | ||
345 | } | 335 | } |
346 | } | 336 | } |
347 | 337 | ||
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index e50e56e4ab61..12911e7463f2 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #define curptr g6 | 26 | #define curptr g6 |
27 | 27 | ||
28 | #define NR_SYSCALLS 284 /* Each OS is different... */ | 28 | #define NR_SYSCALLS 299 /* Each OS is different... */ |
29 | 29 | ||
30 | .text | 30 | .text |
31 | .align 32 | 31 | .align 32 |
diff --git a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S index 9cd272ac3ac1..60b59375aa78 100644 --- a/arch/sparc64/kernel/sys32.S +++ b/arch/sparc64/kernel/sys32.S | |||
@@ -84,7 +84,6 @@ SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5) | |||
84 | SIGN2(sys32_bdflush, sys_bdflush, %o0, %o1) | 84 | SIGN2(sys32_bdflush, sys_bdflush, %o0, %o1) |
85 | SIGN1(sys32_mlockall, sys_mlockall, %o0) | 85 | SIGN1(sys32_mlockall, sys_mlockall, %o0) |
86 | SIGN1(sys32_nfsservctl, compat_sys_nfsservctl, %o0) | 86 | SIGN1(sys32_nfsservctl, compat_sys_nfsservctl, %o0) |
87 | SIGN1(sys32_clock_settime, compat_sys_clock_settime, %o1) | ||
88 | SIGN1(sys32_clock_nanosleep, compat_sys_clock_nanosleep, %o1) | 87 | SIGN1(sys32_clock_nanosleep, compat_sys_clock_nanosleep, %o1) |
89 | SIGN1(sys32_timer_settime, compat_sys_timer_settime, %o1) | 88 | SIGN1(sys32_timer_settime, compat_sys_timer_settime, %o1) |
90 | SIGN1(sys32_io_submit, compat_sys_io_submit, %o1) | 89 | SIGN1(sys32_io_submit, compat_sys_io_submit, %o1) |
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index bf0fc5bfbfbe..2881faf36635 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S | |||
@@ -71,7 +71,7 @@ sys_call_table32: | |||
71 | /*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler | 71 | /*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler |
72 | .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep | 72 | .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep |
73 | /*250*/ .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl | 73 | /*250*/ .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl |
74 | .word sys_ni_syscall, sys32_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep | 74 | .word sys_ni_syscall, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep |
75 | /*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun | 75 | /*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun |
76 | .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy | 76 | .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy |
77 | /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink | 77 | /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink |
diff --git a/arch/um/Makefile b/arch/um/Makefile index 6430a6383853..c58b657f0097 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -47,13 +47,16 @@ ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include | |||
47 | endif | 47 | endif |
48 | SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) | 48 | SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) |
49 | 49 | ||
50 | # -Dvmap=kernel_vmap affects everything, and prevents anything from | 50 | # -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so |
51 | # referencing the libpcap.o symbol so named. | 51 | # named - it's a common symbol in libpcap, so we get a binary which crashes. |
52 | # | 52 | # |
53 | # Same things for in6addr_loopback - found in libc. | 53 | # Same things for in6addr_loopback and mktime - found in libc. For these two we |
54 | # only get link-time error, luckily. | ||
55 | # | ||
56 | # These apply to USER_CFLAGS to. | ||
54 | 57 | ||
55 | CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ | 58 | CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ |
56 | $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ | 59 | $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ |
57 | -Din6addr_loopback=kernel_in6addr_loopback | 60 | -Din6addr_loopback=kernel_in6addr_loopback |
58 | 61 | ||
59 | AFLAGS += $(ARCH_INCLUDE) | 62 | AFLAGS += $(ARCH_INCLUDE) |
@@ -66,6 +69,7 @@ USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \ | |||
66 | # kernel_errno to separate them from the libc errno. This allows -fno-common | 69 | # kernel_errno to separate them from the libc errno. This allows -fno-common |
67 | # in CFLAGS. Otherwise, it would cause ld to complain about the two different | 70 | # in CFLAGS. Otherwise, it would cause ld to complain about the two different |
68 | # errnos. | 71 | # errnos. |
72 | # These apply to kernelspace only. | ||
69 | 73 | ||
70 | CFLAGS += -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ | 74 | CFLAGS += -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ |
71 | -Dmktime=kernel_mktime | 75 | -Dmktime=kernel_mktime |
@@ -168,10 +172,13 @@ else | |||
168 | $(Q)cd $(TOPDIR)/include/asm-um && ln -sf ../asm-$(SUBARCH) arch | 172 | $(Q)cd $(TOPDIR)/include/asm-um && ln -sf ../asm-$(SUBARCH) arch |
169 | endif | 173 | endif |
170 | 174 | ||
171 | $(ARCH_DIR)/include/sysdep: | 175 | $(objtree)/$(ARCH_DIR)/include: |
176 | @echo ' MKDIR $@' | ||
177 | $(Q)mkdir -p $@ | ||
178 | |||
179 | $(ARCH_DIR)/include/sysdep: $(objtree)/$(ARCH_DIR)/include | ||
172 | @echo ' SYMLINK $@' | 180 | @echo ' SYMLINK $@' |
173 | ifneq ($(KBUILD_SRC),) | 181 | ifneq ($(KBUILD_SRC),) |
174 | $(Q)mkdir -p $(ARCH_DIR)/include | ||
175 | $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/include/sysdep-$(SUBARCH) $(ARCH_DIR)/include/sysdep | 182 | $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/include/sysdep-$(SUBARCH) $(ARCH_DIR)/include/sysdep |
176 | else | 183 | else |
177 | $(Q)cd $(ARCH_DIR)/include && ln -sf sysdep-$(SUBARCH) sysdep | 184 | $(Q)cd $(ARCH_DIR)/include && ln -sf sysdep-$(SUBARCH) sysdep |
@@ -214,7 +221,7 @@ $(ARCH_DIR)/include/user_constants.h: $(ARCH_DIR)/user-offsets.s | |||
214 | 221 | ||
215 | CLEAN_FILES += $(ARCH_DIR)/user-offsets.s | 222 | CLEAN_FILES += $(ARCH_DIR)/user-offsets.s |
216 | 223 | ||
217 | $(ARCH_DIR)/include/kern_constants.h: | 224 | $(ARCH_DIR)/include/kern_constants.h: $(objtree)/$(ARCH_DIR)/include |
218 | @echo ' SYMLINK $@' | 225 | @echo ' SYMLINK $@' |
219 | $(Q) ln -sf ../../../include/asm-um/asm-offsets.h $@ | 226 | $(Q) ln -sf ../../../include/asm-um/asm-offsets.h $@ |
220 | 227 | ||
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c index ab0d0b170816..7218c754505b 100644 --- a/arch/um/drivers/chan_kern.c +++ b/arch/um/drivers/chan_kern.c | |||
@@ -403,7 +403,7 @@ int chan_window_size(struct list_head *chans, unsigned short *rows_out, | |||
403 | return 0; | 403 | return 0; |
404 | } | 404 | } |
405 | 405 | ||
406 | void free_one_chan(struct chan *chan, int delay_free_irq) | 406 | static void free_one_chan(struct chan *chan, int delay_free_irq) |
407 | { | 407 | { |
408 | list_del(&chan->list); | 408 | list_del(&chan->list); |
409 | 409 | ||
@@ -416,7 +416,7 @@ void free_one_chan(struct chan *chan, int delay_free_irq) | |||
416 | kfree(chan); | 416 | kfree(chan); |
417 | } | 417 | } |
418 | 418 | ||
419 | void free_chan(struct list_head *chans, int delay_free_irq) | 419 | static void free_chan(struct list_head *chans, int delay_free_irq) |
420 | { | 420 | { |
421 | struct list_head *ele, *next; | 421 | struct list_head *ele, *next; |
422 | struct chan *chan; | 422 | struct chan *chan; |
@@ -497,7 +497,7 @@ struct chan_type { | |||
497 | struct chan_ops *ops; | 497 | struct chan_ops *ops; |
498 | }; | 498 | }; |
499 | 499 | ||
500 | struct chan_type chan_table[] = { | 500 | static struct chan_type chan_table[] = { |
501 | { "fd", &fd_ops }, | 501 | { "fd", &fd_ops }, |
502 | 502 | ||
503 | #ifdef CONFIG_NULL_CHAN | 503 | #ifdef CONFIG_NULL_CHAN |
diff --git a/arch/um/drivers/daemon_kern.c b/arch/um/drivers/daemon_kern.c index 507e3cbac9d3..a61b7b46bc02 100644 --- a/arch/um/drivers/daemon_kern.c +++ b/arch/um/drivers/daemon_kern.c | |||
@@ -18,7 +18,7 @@ struct daemon_init { | |||
18 | char *ctl_sock; | 18 | char *ctl_sock; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | void daemon_init(struct net_device *dev, void *data) | 21 | static void daemon_init(struct net_device *dev, void *data) |
22 | { | 22 | { |
23 | struct uml_net_private *pri; | 23 | struct uml_net_private *pri; |
24 | struct daemon_data *dpri; | 24 | struct daemon_data *dpri; |
@@ -64,7 +64,7 @@ static struct net_kern_info daemon_kern_info = { | |||
64 | .write = daemon_write, | 64 | .write = daemon_write, |
65 | }; | 65 | }; |
66 | 66 | ||
67 | int daemon_setup(char *str, char **mac_out, void *data) | 67 | static int daemon_setup(char *str, char **mac_out, void *data) |
68 | { | 68 | { |
69 | struct daemon_init *init = data; | 69 | struct daemon_init *init = data; |
70 | char *remain; | 70 | char *remain; |
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 46ceb25a9959..6c2d4ccaf20f 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -714,7 +714,7 @@ struct winch { | |||
714 | struct tty_struct *tty; | 714 | struct tty_struct *tty; |
715 | }; | 715 | }; |
716 | 716 | ||
717 | irqreturn_t winch_interrupt(int irq, void *data, struct pt_regs *unused) | 717 | static irqreturn_t winch_interrupt(int irq, void *data, struct pt_regs *unused) |
718 | { | 718 | { |
719 | struct winch *winch = data; | 719 | struct winch *winch = data; |
720 | struct tty_struct *tty; | 720 | struct tty_struct *tty; |
diff --git a/arch/um/drivers/mcast_kern.c b/arch/um/drivers/mcast_kern.c index 217438cdef33..c9b078fba03e 100644 --- a/arch/um/drivers/mcast_kern.c +++ b/arch/um/drivers/mcast_kern.c | |||
@@ -26,7 +26,7 @@ struct mcast_init { | |||
26 | int ttl; | 26 | int ttl; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | void mcast_init(struct net_device *dev, void *data) | 29 | static void mcast_init(struct net_device *dev, void *data) |
30 | { | 30 | { |
31 | struct uml_net_private *pri; | 31 | struct uml_net_private *pri; |
32 | struct mcast_data *dpri; | 32 | struct mcast_data *dpri; |
@@ -40,7 +40,7 @@ void mcast_init(struct net_device *dev, void *data) | |||
40 | dpri->dev = dev; | 40 | dpri->dev = dev; |
41 | 41 | ||
42 | printk("mcast backend "); | 42 | printk("mcast backend "); |
43 | printk("multicast adddress: %s:%u, TTL:%u ", | 43 | printk("multicast address: %s:%u, TTL:%u ", |
44 | dpri->addr, dpri->port, dpri->ttl); | 44 | dpri->addr, dpri->port, dpri->ttl); |
45 | 45 | ||
46 | printk("\n"); | 46 | printk("\n"); |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index e3d576567172..54388d10bcf9 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -273,7 +273,7 @@ void mconsole_proc(struct mc_request *req) | |||
273 | config <dev> - Query the configuration of a device \n\ | 273 | config <dev> - Query the configuration of a device \n\ |
274 | remove <dev> - Remove a device from UML \n\ | 274 | remove <dev> - Remove a device from UML \n\ |
275 | sysrq <letter> - Performs the SysRq action controlled by the letter \n\ | 275 | sysrq <letter> - Performs the SysRq action controlled by the letter \n\ |
276 | cad - invoke the Ctl-Alt-Del handler \n\ | 276 | cad - invoke the Ctrl-Alt-Del handler \n\ |
277 | stop - pause the UML; it will do nothing until it receives a 'go' \n\ | 277 | stop - pause the UML; it will do nothing until it receives a 'go' \n\ |
278 | go - continue the UML after a 'stop' \n\ | 278 | go - continue the UML after a 'stop' \n\ |
279 | log <string> - make UML enter <string> into the kernel log\n\ | 279 | log <string> - make UML enter <string> into the kernel log\n\ |
@@ -327,7 +327,7 @@ void mconsole_stop(struct mc_request *req) | |||
327 | 327 | ||
328 | /* This list is populated by __initcall routines. */ | 328 | /* This list is populated by __initcall routines. */ |
329 | 329 | ||
330 | LIST_HEAD(mconsole_devices); | 330 | static LIST_HEAD(mconsole_devices); |
331 | 331 | ||
332 | void mconsole_register_dev(struct mc_device *new) | 332 | void mconsole_register_dev(struct mc_device *new) |
333 | { | 333 | { |
@@ -561,6 +561,8 @@ void mconsole_sysrq(struct mc_request *req) | |||
561 | } | 561 | } |
562 | #endif | 562 | #endif |
563 | 563 | ||
564 | #ifdef CONFIG_MODE_SKAS | ||
565 | |||
564 | static void stack_proc(void *arg) | 566 | static void stack_proc(void *arg) |
565 | { | 567 | { |
566 | struct task_struct *from = current, *to = arg; | 568 | struct task_struct *from = current, *to = arg; |
@@ -574,7 +576,7 @@ static void stack_proc(void *arg) | |||
574 | * Dumps a stacks registers to the linux console. | 576 | * Dumps a stacks registers to the linux console. |
575 | * Usage stack <pid>. | 577 | * Usage stack <pid>. |
576 | */ | 578 | */ |
577 | void do_stack(struct mc_request *req) | 579 | static void do_stack_trace(struct mc_request *req) |
578 | { | 580 | { |
579 | char *ptr = req->request.data; | 581 | char *ptr = req->request.data; |
580 | int pid_requested= -1; | 582 | int pid_requested= -1; |
@@ -605,6 +607,7 @@ void do_stack(struct mc_request *req) | |||
605 | } | 607 | } |
606 | with_console(req, stack_proc, to); | 608 | with_console(req, stack_proc, to); |
607 | } | 609 | } |
610 | #endif /* CONFIG_MODE_SKAS */ | ||
608 | 611 | ||
609 | void mconsole_stack(struct mc_request *req) | 612 | void mconsole_stack(struct mc_request *req) |
610 | { | 613 | { |
@@ -613,7 +616,7 @@ void mconsole_stack(struct mc_request *req) | |||
613 | */ | 616 | */ |
614 | CHOOSE_MODE(mconsole_reply(req, "Sorry, this doesn't work in TT mode", | 617 | CHOOSE_MODE(mconsole_reply(req, "Sorry, this doesn't work in TT mode", |
615 | 1, 0), | 618 | 1, 0), |
616 | do_stack(req)); | 619 | do_stack_trace(req)); |
617 | } | 620 | } |
618 | 621 | ||
619 | /* Changed by mconsole_setup, which is __setup, and called before SMP is | 622 | /* Changed by mconsole_setup, which is __setup, and called before SMP is |
diff --git a/arch/um/drivers/slip_common.h b/arch/um/drivers/slip_common.h index 2ae76d8f1be1..d574e0a9dc13 100644 --- a/arch/um/drivers/slip_common.h +++ b/arch/um/drivers/slip_common.h | |||
@@ -88,12 +88,13 @@ struct slip_proto { | |||
88 | int esc; | 88 | int esc; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | #define SLIP_PROTO_INIT { \ | 91 | static inline void slip_proto_init(struct slip_proto * slip) |
92 | .ibuf = { '\0' }, \ | 92 | { |
93 | .obuf = { '\0' }, \ | 93 | memset(slip->ibuf, 0, sizeof(slip->ibuf)); |
94 | .more = 0, \ | 94 | memset(slip->obuf, 0, sizeof(slip->obuf)); |
95 | .pos = 0, \ | 95 | slip->more = 0; |
96 | .esc = 0 \ | 96 | slip->pos = 0; |
97 | slip->esc = 0; | ||
97 | } | 98 | } |
98 | 99 | ||
99 | extern int slip_proto_read(int fd, void *buf, int len, | 100 | extern int slip_proto_read(int fd, void *buf, int len, |
diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c index 9a6f5c85f902..a62f5ef445cf 100644 --- a/arch/um/drivers/slip_kern.c +++ b/arch/um/drivers/slip_kern.c | |||
@@ -21,13 +21,14 @@ void slip_init(struct net_device *dev, void *data) | |||
21 | 21 | ||
22 | private = dev->priv; | 22 | private = dev->priv; |
23 | spri = (struct slip_data *) private->user; | 23 | spri = (struct slip_data *) private->user; |
24 | *spri = ((struct slip_data) | 24 | |
25 | { .name = { '\0' }, | 25 | memset(spri->name, 0, sizeof(spri->name)); |
26 | .addr = NULL, | 26 | spri->addr = NULL; |
27 | .gate_addr = init->gate_addr, | 27 | spri->gate_addr = init->gate_addr; |
28 | .slave = -1, | 28 | spri->slave = -1; |
29 | .slip = SLIP_PROTO_INIT, | 29 | spri->dev = dev; |
30 | .dev = dev }); | 30 | |
31 | slip_proto_init(&spri->slip); | ||
31 | 32 | ||
32 | dev->init = NULL; | 33 | dev->init = NULL; |
33 | dev->header_cache_update = NULL; | 34 | dev->header_cache_update = NULL; |
diff --git a/arch/um/drivers/slirp_kern.c b/arch/um/drivers/slirp_kern.c index 9864d27afdbe..33d7982be5d3 100644 --- a/arch/um/drivers/slirp_kern.c +++ b/arch/um/drivers/slirp_kern.c | |||
@@ -21,12 +21,13 @@ void slirp_init(struct net_device *dev, void *data) | |||
21 | 21 | ||
22 | private = dev->priv; | 22 | private = dev->priv; |
23 | spri = (struct slirp_data *) private->user; | 23 | spri = (struct slirp_data *) private->user; |
24 | *spri = ((struct slirp_data) | 24 | |
25 | { .argw = init->argw, | 25 | spri->argw = init->argw; |
26 | .pid = -1, | 26 | spri->pid = -1; |
27 | .slave = -1, | 27 | spri->slave = -1; |
28 | .slip = SLIP_PROTO_INIT, | 28 | spri->dev = dev; |
29 | .dev = dev }); | 29 | |
30 | slip_proto_init(&spri->slip); | ||
30 | 31 | ||
31 | dev->init = NULL; | 32 | dev->init = NULL; |
32 | dev->hard_header_len = 0; | 33 | dev->hard_header_len = 0; |
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c index a32ef55cb244..a4d6415bc8c4 100644 --- a/arch/um/drivers/ssl.c +++ b/arch/um/drivers/ssl.c | |||
@@ -33,7 +33,7 @@ static struct tty_driver *ssl_driver; | |||
33 | 33 | ||
34 | #define NR_PORTS 64 | 34 | #define NR_PORTS 64 |
35 | 35 | ||
36 | void ssl_announce(char *dev_name, int dev) | 36 | static void ssl_announce(char *dev_name, int dev) |
37 | { | 37 | { |
38 | printk(KERN_INFO "Serial line %d assigned device '%s'\n", dev, | 38 | printk(KERN_INFO "Serial line %d assigned device '%s'\n", dev, |
39 | dev_name); | 39 | dev_name); |
@@ -98,7 +98,7 @@ static int ssl_remove(int n) | |||
98 | return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n); | 98 | return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n); |
99 | } | 99 | } |
100 | 100 | ||
101 | int ssl_open(struct tty_struct *tty, struct file *filp) | 101 | static int ssl_open(struct tty_struct *tty, struct file *filp) |
102 | { | 102 | { |
103 | return line_open(serial_lines, tty); | 103 | return line_open(serial_lines, tty); |
104 | } | 104 | } |
@@ -182,7 +182,7 @@ static struct console ssl_cons = { | |||
182 | .index = -1, | 182 | .index = -1, |
183 | }; | 183 | }; |
184 | 184 | ||
185 | int ssl_init(void) | 185 | static int ssl_init(void) |
186 | { | 186 | { |
187 | char *new_title; | 187 | char *new_title; |
188 | 188 | ||
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index c649108a9e9f..07176d92e1c9 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h | |||
@@ -31,8 +31,6 @@ extern int timer_irq_inited; | |||
31 | extern int jail; | 31 | extern int jail; |
32 | extern int nsyscalls; | 32 | extern int nsyscalls; |
33 | 33 | ||
34 | extern struct task_struct *idle_threads[NR_CPUS]; | ||
35 | |||
36 | #define UML_ROUND_DOWN(addr) ((void *)(((unsigned long) addr) & PAGE_MASK)) | 34 | #define UML_ROUND_DOWN(addr) ((void *)(((unsigned long) addr) & PAGE_MASK)) |
37 | #define UML_ROUND_UP(addr) \ | 35 | #define UML_ROUND_UP(addr) \ |
38 | UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1) | 36 | UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1) |
diff --git a/arch/um/kernel/exec_kern.c b/arch/um/kernel/exec_kern.c index 569fe8b9b053..c264e1c05ab3 100644 --- a/arch/um/kernel/exec_kern.c +++ b/arch/um/kernel/exec_kern.c | |||
@@ -33,7 +33,7 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) | |||
33 | extern void log_exec(char **argv, void *tty); | 33 | extern void log_exec(char **argv, void *tty); |
34 | 34 | ||
35 | static long execve1(char *file, char __user * __user *argv, | 35 | static long execve1(char *file, char __user * __user *argv, |
36 | char *__user __user *env) | 36 | char __user *__user *env) |
37 | { | 37 | { |
38 | long error; | 38 | long error; |
39 | 39 | ||
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index f3b583a878a6..544665e04513 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c | |||
@@ -265,7 +265,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem) | |||
265 | highmem_len = highmem_pages * sizeof(struct page); | 265 | highmem_len = highmem_pages * sizeof(struct page); |
266 | 266 | ||
267 | total_pages = phys_pages + iomem_pages + highmem_pages; | 267 | total_pages = phys_pages + iomem_pages + highmem_pages; |
268 | total_len = phys_len + iomem_pages + highmem_len; | 268 | total_len = phys_len + iomem_len + highmem_len; |
269 | 269 | ||
270 | if(kmalloc_ok){ | 270 | if(kmalloc_ok){ |
271 | map = kmalloc(total_len, GFP_KERNEL); | 271 | map = kmalloc(total_len, GFP_KERNEL); |
diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c index 6f1a3a288117..3ef73bf2e781 100644 --- a/arch/um/kernel/reboot.c +++ b/arch/um/kernel/reboot.c | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include "linux/module.h" | 6 | #include "linux/module.h" |
7 | #include "linux/sched.h" | 7 | #include "linux/sched.h" |
8 | #include "asm/smp.h" | ||
8 | #include "user_util.h" | 9 | #include "user_util.h" |
9 | #include "kern_util.h" | 10 | #include "kern_util.h" |
10 | #include "kern.h" | 11 | #include "kern.h" |
diff --git a/arch/um/kernel/tt/syscall_kern.c b/arch/um/kernel/tt/syscall_kern.c index 3d29c90514cc..3fda9a03c59a 100644 --- a/arch/um/kernel/tt/syscall_kern.c +++ b/arch/um/kernel/tt/syscall_kern.c | |||
@@ -23,16 +23,20 @@ void syscall_handler_tt(int sig, struct pt_regs *regs) | |||
23 | int syscall; | 23 | int syscall; |
24 | #ifdef CONFIG_SYSCALL_DEBUG | 24 | #ifdef CONFIG_SYSCALL_DEBUG |
25 | int index; | 25 | int index; |
26 | index = record_syscall_start(syscall); | ||
27 | #endif | 26 | #endif |
28 | sc = UPT_SC(®s->regs); | 27 | sc = UPT_SC(®s->regs); |
29 | SC_START_SYSCALL(sc); | 28 | SC_START_SYSCALL(sc); |
30 | 29 | ||
30 | syscall = UPT_SYSCALL_NR(®s->regs); | ||
31 | |||
32 | #ifdef CONFIG_SYSCALL_DEBUG | ||
33 | index = record_syscall_start(syscall); | ||
34 | #endif | ||
35 | |||
31 | syscall_trace(®s->regs, 0); | 36 | syscall_trace(®s->regs, 0); |
32 | 37 | ||
33 | current->thread.nsyscalls++; | 38 | current->thread.nsyscalls++; |
34 | nsyscalls++; | 39 | nsyscalls++; |
35 | syscall = UPT_SYSCALL_NR(®s->regs); | ||
36 | 40 | ||
37 | if((syscall >= NR_syscalls) || (syscall < 0)) | 41 | if((syscall >= NR_syscalls) || (syscall < 0)) |
38 | result = -ENOSYS; | 42 | result = -ENOSYS; |
diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-i386/ldt.c index 0cdfd4481d5e..1fa09a79a10b 100644 --- a/arch/um/sys-i386/ldt.c +++ b/arch/um/sys-i386/ldt.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include "choose-mode.h" | 16 | #include "choose-mode.h" |
17 | #include "kern.h" | 17 | #include "kern.h" |
18 | #include "mode_kern.h" | 18 | #include "mode_kern.h" |
19 | #include "proc_mm.h" | ||
20 | #include "os.h" | 19 | #include "os.h" |
21 | 20 | ||
22 | extern int modify_ldt(int func, void *ptr, unsigned long bytecount); | 21 | extern int modify_ldt(int func, void *ptr, unsigned long bytecount); |
@@ -90,6 +89,7 @@ out: | |||
90 | #include "skas.h" | 89 | #include "skas.h" |
91 | #include "skas_ptrace.h" | 90 | #include "skas_ptrace.h" |
92 | #include "asm/mmu_context.h" | 91 | #include "asm/mmu_context.h" |
92 | #include "proc_mm.h" | ||
93 | 93 | ||
94 | long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc, | 94 | long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc, |
95 | void **addr, int done) | 95 | void **addr, int done) |
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index f05c2a802489..067c0f47bd0d 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S | |||
@@ -676,7 +676,7 @@ ia32_sys_call_table: | |||
676 | .quad sys_mkdirat | 676 | .quad sys_mkdirat |
677 | .quad sys_mknodat | 677 | .quad sys_mknodat |
678 | .quad sys_fchownat | 678 | .quad sys_fchownat |
679 | .quad sys_futimesat | 679 | .quad compat_sys_futimesat |
680 | .quad compat_sys_newfstatat /* 300 */ | 680 | .quad compat_sys_newfstatat /* 300 */ |
681 | .quad sys_unlinkat | 681 | .quad sys_unlinkat |
682 | .quad sys_renameat | 682 | .quad sys_renameat |
diff --git a/arch/x86_64/kernel/acpi/Makefile b/arch/x86_64/kernel/acpi/Makefile index 7da9ace890bd..4fe97071f297 100644 --- a/arch/x86_64/kernel/acpi/Makefile +++ b/arch/x86_64/kernel/acpi/Makefile | |||
@@ -1,3 +1,8 @@ | |||
1 | obj-y := boot.o | 1 | obj-y := boot.o |
2 | boot-y := ../../../i386/kernel/acpi/boot.o | 2 | boot-y := ../../../i386/kernel/acpi/boot.o |
3 | obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o | 3 | obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o |
4 | |||
5 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | ||
6 | obj-y += processor.o | ||
7 | endif | ||
8 | |||
diff --git a/arch/x86_64/kernel/acpi/processor.c b/arch/x86_64/kernel/acpi/processor.c new file mode 100644 index 000000000000..3bdc2baa5bb1 --- /dev/null +++ b/arch/x86_64/kernel/acpi/processor.c | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * arch/x86_64/kernel/acpi/processor.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Intel Corporation | ||
5 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | ||
6 | * - Added _PDC for platforms with Intel CPUs | ||
7 | */ | ||
8 | |||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/module.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/acpi.h> | ||
13 | |||
14 | #include <acpi/processor.h> | ||
15 | #include <asm/acpi.h> | ||
16 | |||
17 | static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c) | ||
18 | { | ||
19 | struct acpi_object_list *obj_list; | ||
20 | union acpi_object *obj; | ||
21 | u32 *buf; | ||
22 | |||
23 | /* allocate and initialize pdc. It will be used later. */ | ||
24 | obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); | ||
25 | if (!obj_list) { | ||
26 | printk(KERN_ERR "Memory allocation error\n"); | ||
27 | return; | ||
28 | } | ||
29 | |||
30 | obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); | ||
31 | if (!obj) { | ||
32 | printk(KERN_ERR "Memory allocation error\n"); | ||
33 | kfree(obj_list); | ||
34 | return; | ||
35 | } | ||
36 | |||
37 | buf = kmalloc(12, GFP_KERNEL); | ||
38 | if (!buf) { | ||
39 | printk(KERN_ERR "Memory allocation error\n"); | ||
40 | kfree(obj); | ||
41 | kfree(obj_list); | ||
42 | return; | ||
43 | } | ||
44 | |||
45 | buf[0] = ACPI_PDC_REVISION_ID; | ||
46 | buf[1] = 1; | ||
47 | buf[2] = ACPI_PDC_EST_CAPABILITY_SMP; | ||
48 | |||
49 | obj->type = ACPI_TYPE_BUFFER; | ||
50 | obj->buffer.length = 12; | ||
51 | obj->buffer.pointer = (u8 *) buf; | ||
52 | obj_list->count = 1; | ||
53 | obj_list->pointer = obj; | ||
54 | pr->pdc = obj_list; | ||
55 | |||
56 | return; | ||
57 | } | ||
58 | |||
59 | /* Initialize _PDC data based on the CPU vendor */ | ||
60 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr) | ||
61 | { | ||
62 | unsigned int cpu = pr->id; | ||
63 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
64 | |||
65 | pr->pdc = NULL; | ||
66 | if (c->x86_vendor == X86_VENDOR_INTEL && cpu_has(c, X86_FEATURE_EST)) | ||
67 | init_intel_pdc(pr, c); | ||
68 | |||
69 | return; | ||
70 | } | ||
71 | |||
72 | EXPORT_SYMBOL(arch_acpi_processor_init_pdc); | ||
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index e8cf44ef8778..1a5060b434b8 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -2027,7 +2027,7 @@ int __init io_apic_get_redir_entries (int ioapic) | |||
2027 | } | 2027 | } |
2028 | 2028 | ||
2029 | 2029 | ||
2030 | int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low) | 2030 | int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int polarity) |
2031 | { | 2031 | { |
2032 | struct IO_APIC_route_entry entry; | 2032 | struct IO_APIC_route_entry entry; |
2033 | unsigned long flags; | 2033 | unsigned long flags; |
@@ -2049,8 +2049,8 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a | |||
2049 | entry.delivery_mode = INT_DELIVERY_MODE; | 2049 | entry.delivery_mode = INT_DELIVERY_MODE; |
2050 | entry.dest_mode = INT_DEST_MODE; | 2050 | entry.dest_mode = INT_DEST_MODE; |
2051 | entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS); | 2051 | entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS); |
2052 | entry.trigger = edge_level; | 2052 | entry.trigger = triggering; |
2053 | entry.polarity = active_high_low; | 2053 | entry.polarity = polarity; |
2054 | entry.mask = 1; /* Disabled (masked) */ | 2054 | entry.mask = 1; /* Disabled (masked) */ |
2055 | 2055 | ||
2056 | irq = gsi_irq_sharing(irq); | 2056 | irq = gsi_irq_sharing(irq); |
@@ -2065,9 +2065,9 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a | |||
2065 | apic_printk(APIC_VERBOSE,KERN_DEBUG "IOAPIC[%d]: Set PCI routing entry (%d-%d -> 0x%x -> " | 2065 | apic_printk(APIC_VERBOSE,KERN_DEBUG "IOAPIC[%d]: Set PCI routing entry (%d-%d -> 0x%x -> " |
2066 | "IRQ %d Mode:%i Active:%i)\n", ioapic, | 2066 | "IRQ %d Mode:%i Active:%i)\n", ioapic, |
2067 | mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, | 2067 | mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, |
2068 | edge_level, active_high_low); | 2068 | triggering, polarity); |
2069 | 2069 | ||
2070 | ioapic_register_intr(irq, entry.vector, edge_level); | 2070 | ioapic_register_intr(irq, entry.vector, triggering); |
2071 | 2071 | ||
2072 | if (!ioapic && (irq < 16)) | 2072 | if (!ioapic && (irq < 16)) |
2073 | disable_8259A_irq(irq); | 2073 | disable_8259A_irq(irq); |
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index 1105250bf02c..dc49bfb6db0a 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c | |||
@@ -915,7 +915,7 @@ void __init mp_config_acpi_legacy_irqs (void) | |||
915 | 915 | ||
916 | #define MAX_GSI_NUM 4096 | 916 | #define MAX_GSI_NUM 4096 |
917 | 917 | ||
918 | int mp_register_gsi(u32 gsi, int edge_level, int active_high_low) | 918 | int mp_register_gsi(u32 gsi, int triggering, int polarity) |
919 | { | 919 | { |
920 | int ioapic = -1; | 920 | int ioapic = -1; |
921 | int ioapic_pin = 0; | 921 | int ioapic_pin = 0; |
@@ -964,7 +964,7 @@ int mp_register_gsi(u32 gsi, int edge_level, int active_high_low) | |||
964 | 964 | ||
965 | mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit); | 965 | mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit); |
966 | 966 | ||
967 | if (edge_level) { | 967 | if (triggering == ACPI_LEVEL_SENSITIVE) { |
968 | /* | 968 | /* |
969 | * For PCI devices assign IRQs in order, avoiding gaps | 969 | * For PCI devices assign IRQs in order, avoiding gaps |
970 | * due to unused I/O APIC pins. | 970 | * due to unused I/O APIC pins. |
@@ -986,8 +986,8 @@ int mp_register_gsi(u32 gsi, int edge_level, int active_high_low) | |||
986 | } | 986 | } |
987 | 987 | ||
988 | io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, | 988 | io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, |
989 | edge_level == ACPI_EDGE_SENSITIVE ? 0 : 1, | 989 | triggering == ACPI_EDGE_SENSITIVE ? 0 : 1, |
990 | active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1); | 990 | polarity == ACPI_ACTIVE_HIGH ? 0 : 1); |
991 | return gsi; | 991 | return gsi; |
992 | } | 992 | } |
993 | 993 | ||
diff --git a/arch/x86_64/lib/Makefile b/arch/x86_64/lib/Makefile index bba5db6cebd6..ccef6ae747a3 100644 --- a/arch/x86_64/lib/Makefile +++ b/arch/x86_64/lib/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | CFLAGS_csum-partial.o := -funroll-loops | 5 | CFLAGS_csum-partial.o := -funroll-loops |
6 | 6 | ||
7 | obj-y := io.o | 7 | obj-y := io.o iomap_copy.o |
8 | 8 | ||
9 | lib-y := csum-partial.o csum-copy.o csum-wrappers.o delay.o \ | 9 | lib-y := csum-partial.o csum-copy.o csum-wrappers.o delay.o \ |
10 | usercopy.o getuser.o putuser.o \ | 10 | usercopy.o getuser.o putuser.o \ |
diff --git a/arch/x86_64/lib/iomap_copy.S b/arch/x86_64/lib/iomap_copy.S new file mode 100644 index 000000000000..8bbade5fea05 --- /dev/null +++ b/arch/x86_64/lib/iomap_copy.S | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * Copyright 2006 PathScale, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This file is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of version 2 of the GNU General Public License | ||
6 | * as 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, write to the Free Software Foundation, | ||
15 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | ||
16 | */ | ||
17 | |||
18 | /* | ||
19 | * override generic version in lib/iomap_copy.c | ||
20 | */ | ||
21 | .globl __iowrite32_copy | ||
22 | .p2align 4 | ||
23 | __iowrite32_copy: | ||
24 | movl %edx,%ecx | ||
25 | rep movsd | ||
26 | ret | ||
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index f16c0d57c552..00d4ddbf980c 100644 --- a/arch/x86_64/pci/mmconfig.c +++ b/arch/x86_64/pci/mmconfig.c | |||
@@ -29,11 +29,8 @@ static char __iomem *get_virt(unsigned int seg, unsigned bus) | |||
29 | 29 | ||
30 | while (1) { | 30 | while (1) { |
31 | ++cfg_num; | 31 | ++cfg_num; |
32 | if (cfg_num >= pci_mmcfg_config_num) { | 32 | if (cfg_num >= pci_mmcfg_config_num) |
33 | /* Not found - fall back to type 1. This happens | 33 | break; |
34 | e.g. on the internal devices of a K8 northbridge. */ | ||
35 | return NULL; | ||
36 | } | ||
37 | cfg = pci_mmcfg_virt[cfg_num].cfg; | 34 | cfg = pci_mmcfg_virt[cfg_num].cfg; |
38 | if (cfg->pci_segment_group_number != seg) | 35 | if (cfg->pci_segment_group_number != seg) |
39 | continue; | 36 | continue; |
@@ -41,6 +38,18 @@ static char __iomem *get_virt(unsigned int seg, unsigned bus) | |||
41 | (cfg->end_bus_number >= bus)) | 38 | (cfg->end_bus_number >= bus)) |
42 | return pci_mmcfg_virt[cfg_num].virt; | 39 | return pci_mmcfg_virt[cfg_num].virt; |
43 | } | 40 | } |
41 | |||
42 | /* Handle more broken MCFG tables on Asus etc. | ||
43 | They only contain a single entry for bus 0-0. Assume | ||
44 | this applies to all busses. */ | ||
45 | cfg = &pci_mmcfg_config[0]; | ||
46 | if (pci_mmcfg_config_num == 1 && | ||
47 | cfg->pci_segment_group_number == 0 && | ||
48 | (cfg->start_bus_number | cfg->end_bus_number) == 0) | ||
49 | return cfg->base_address; | ||
50 | |||
51 | /* Fall back to type 0 */ | ||
52 | return 0; | ||
44 | } | 53 | } |
45 | 54 | ||
46 | static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) | 55 | static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) |