diff options
Diffstat (limited to 'arch')
265 files changed, 7419 insertions, 3091 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/at91rm9200dk_defconfig b/arch/arm/configs/at91rm9200dk_defconfig index 5cdd13acf8ff..1fe73d198888 100644 --- a/arch/arm/configs/at91rm9200dk_defconfig +++ b/arch/arm/configs/at91rm9200dk_defconfig | |||
@@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
85 | # CONFIG_ARCH_CLPS711X is not set | 85 | # CONFIG_ARCH_CLPS711X is not set |
86 | # CONFIG_ARCH_CO285 is not set | 86 | # CONFIG_ARCH_CO285 is not set |
87 | # CONFIG_ARCH_EBSA110 is not set | 87 | # CONFIG_ARCH_EBSA110 is not set |
88 | # CONFIG_ARCH_CAMELOT is not set | ||
89 | # CONFIG_ARCH_FOOTBRIDGE is not set | 88 | # CONFIG_ARCH_FOOTBRIDGE is not set |
90 | # CONFIG_ARCH_INTEGRATOR is not set | 89 | # CONFIG_ARCH_INTEGRATOR is not set |
91 | # CONFIG_ARCH_IOP3XX is not set | 90 | # CONFIG_ARCH_IOP3XX is not set |
diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig index 20838ccf1da7..b7d934cdb1b7 100644 --- a/arch/arm/configs/at91rm9200ek_defconfig +++ b/arch/arm/configs/at91rm9200ek_defconfig | |||
@@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
85 | # CONFIG_ARCH_CLPS711X is not set | 85 | # CONFIG_ARCH_CLPS711X is not set |
86 | # CONFIG_ARCH_CO285 is not set | 86 | # CONFIG_ARCH_CO285 is not set |
87 | # CONFIG_ARCH_EBSA110 is not set | 87 | # CONFIG_ARCH_EBSA110 is not set |
88 | # CONFIG_ARCH_CAMELOT is not set | ||
89 | # CONFIG_ARCH_FOOTBRIDGE is not set | 88 | # CONFIG_ARCH_FOOTBRIDGE is not set |
90 | # CONFIG_ARCH_INTEGRATOR is not set | 89 | # CONFIG_ARCH_INTEGRATOR is not set |
91 | # CONFIG_ARCH_IOP3XX is not set | 90 | # CONFIG_ARCH_IOP3XX is not set |
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/csb337_defconfig b/arch/arm/configs/csb337_defconfig index 885a3184830a..94bd9932a402 100644 --- a/arch/arm/configs/csb337_defconfig +++ b/arch/arm/configs/csb337_defconfig | |||
@@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
85 | # CONFIG_ARCH_CLPS711X is not set | 85 | # CONFIG_ARCH_CLPS711X is not set |
86 | # CONFIG_ARCH_CO285 is not set | 86 | # CONFIG_ARCH_CO285 is not set |
87 | # CONFIG_ARCH_EBSA110 is not set | 87 | # CONFIG_ARCH_EBSA110 is not set |
88 | # CONFIG_ARCH_CAMELOT is not set | ||
89 | # CONFIG_ARCH_FOOTBRIDGE is not set | 88 | # CONFIG_ARCH_FOOTBRIDGE is not set |
90 | # CONFIG_ARCH_INTEGRATOR is not set | 89 | # CONFIG_ARCH_INTEGRATOR is not set |
91 | # CONFIG_ARCH_IOP3XX is not set | 90 | # CONFIG_ARCH_IOP3XX is not set |
diff --git a/arch/arm/configs/csb637_defconfig b/arch/arm/configs/csb637_defconfig index 95a96a5462a0..1519124c5501 100644 --- a/arch/arm/configs/csb637_defconfig +++ b/arch/arm/configs/csb637_defconfig | |||
@@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
85 | # CONFIG_ARCH_CLPS711X is not set | 85 | # CONFIG_ARCH_CLPS711X is not set |
86 | # CONFIG_ARCH_CO285 is not set | 86 | # CONFIG_ARCH_CO285 is not set |
87 | # CONFIG_ARCH_EBSA110 is not set | 87 | # CONFIG_ARCH_EBSA110 is not set |
88 | # CONFIG_ARCH_CAMELOT is not set | ||
89 | # CONFIG_ARCH_FOOTBRIDGE is not set | 88 | # CONFIG_ARCH_FOOTBRIDGE is not set |
90 | # CONFIG_ARCH_INTEGRATOR is not set | 89 | # CONFIG_ARCH_INTEGRATOR is not set |
91 | # CONFIG_ARCH_IOP3XX is not set | 90 | # CONFIG_ARCH_IOP3XX 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-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index b41b1efaa2cf..3baa70819f24 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -44,7 +44,7 @@ unsigned int get_clk_frequency_khz( int info) | |||
44 | 44 | ||
45 | /* Read clkcfg register: it has turbo, b, half-turbo (and f) */ | 45 | /* Read clkcfg register: it has turbo, b, half-turbo (and f) */ |
46 | asm( "mrc\tp14, 0, %0, c6, c0, 0" : "=r" (clkcfg) ); | 46 | asm( "mrc\tp14, 0, %0, c6, c0, 0" : "=r" (clkcfg) ); |
47 | t = clkcfg & (1 << 1); | 47 | t = clkcfg & (1 << 0); |
48 | ht = clkcfg & (1 << 2); | 48 | ht = clkcfg & (1 << 2); |
49 | b = clkcfg & (1 << 3); | 49 | b = clkcfg & (1 << 3); |
50 | 50 | ||
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index b4f1e051c768..1217bf00309c 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile | |||
@@ -10,9 +10,13 @@ obj-m := | |||
10 | obj-n := | 10 | obj-n := |
11 | obj- := | 11 | obj- := |
12 | 12 | ||
13 | # S3C2400 support files | ||
14 | obj-$(CONFIG_CPU_S3C2400) += s3c2400-gpio.o | ||
15 | |||
13 | # S3C2410 support files | 16 | # S3C2410 support files |
14 | 17 | ||
15 | obj-$(CONFIG_CPU_S3C2410) += s3c2410.o | 18 | obj-$(CONFIG_CPU_S3C2410) += s3c2410.o |
19 | obj-$(CONFIG_CPU_S3C2410) += s3c2410-gpio.o | ||
16 | obj-$(CONFIG_S3C2410_DMA) += dma.o | 20 | obj-$(CONFIG_S3C2410_DMA) += dma.o |
17 | 21 | ||
18 | # Power Management support | 22 | # Power Management support |
@@ -25,6 +29,7 @@ obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o | |||
25 | obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o | 29 | obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o |
26 | obj-$(CONFIG_CPU_S3C2440) += s3c2440-irq.o | 30 | obj-$(CONFIG_CPU_S3C2440) += s3c2440-irq.o |
27 | obj-$(CONFIG_CPU_S3C2440) += s3c2440-clock.o | 31 | obj-$(CONFIG_CPU_S3C2440) += s3c2440-clock.o |
32 | obj-$(CONFIG_CPU_S3C2440) += s3c2410-gpio.o | ||
28 | 33 | ||
29 | # bast extras | 34 | # bast extras |
30 | 35 | ||
diff --git a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c index 687fe371369d..00a379334b60 100644 --- a/arch/arm/mach-s3c2410/cpu.c +++ b/arch/arm/mach-s3c2410/cpu.c | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | #include "cpu.h" | 41 | #include "cpu.h" |
42 | #include "clock.h" | 42 | #include "clock.h" |
43 | #include "s3c2400.h" | ||
43 | #include "s3c2410.h" | 44 | #include "s3c2410.h" |
44 | #include "s3c2440.h" | 45 | #include "s3c2440.h" |
45 | 46 | ||
@@ -55,6 +56,7 @@ struct cpu_table { | |||
55 | 56 | ||
56 | /* table of supported CPUs */ | 57 | /* table of supported CPUs */ |
57 | 58 | ||
59 | static const char name_s3c2400[] = "S3C2400"; | ||
58 | static const char name_s3c2410[] = "S3C2410"; | 60 | static const char name_s3c2410[] = "S3C2410"; |
59 | static const char name_s3c2440[] = "S3C2440"; | 61 | static const char name_s3c2440[] = "S3C2440"; |
60 | static const char name_s3c2410a[] = "S3C2410A"; | 62 | static const char name_s3c2410a[] = "S3C2410A"; |
@@ -96,7 +98,16 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
96 | .init_uarts = s3c2440_init_uarts, | 98 | .init_uarts = s3c2440_init_uarts, |
97 | .init = s3c2440_init, | 99 | .init = s3c2440_init, |
98 | .name = name_s3c2440a | 100 | .name = name_s3c2440a |
99 | } | 101 | }, |
102 | { | ||
103 | .idcode = 0x0, /* S3C2400 doesn't have an idcode */ | ||
104 | .idmask = 0xffffffff, | ||
105 | .map_io = s3c2400_map_io, | ||
106 | .init_clocks = s3c2400_init_clocks, | ||
107 | .init_uarts = s3c2400_init_uarts, | ||
108 | .init = s3c2400_init, | ||
109 | .name = name_s3c2400 | ||
110 | }, | ||
100 | }; | 111 | }; |
101 | 112 | ||
102 | /* minimal IO mapping */ | 113 | /* minimal IO mapping */ |
@@ -148,12 +159,15 @@ static struct cpu_table *cpu; | |||
148 | 159 | ||
149 | void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) | 160 | void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) |
150 | { | 161 | { |
151 | unsigned long idcode; | 162 | unsigned long idcode = 0x0; |
152 | 163 | ||
153 | /* initialise the io descriptors we need for initialisation */ | 164 | /* initialise the io descriptors we need for initialisation */ |
154 | iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); | 165 | iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); |
155 | 166 | ||
167 | #ifndef CONFIG_CPU_S3C2400 | ||
156 | idcode = __raw_readl(S3C2410_GSTATUS1); | 168 | idcode = __raw_readl(S3C2410_GSTATUS1); |
169 | #endif | ||
170 | |||
157 | cpu = s3c_lookup_cpu(idcode); | 171 | cpu = s3c_lookup_cpu(idcode); |
158 | 172 | ||
159 | if (cpu == NULL) { | 173 | if (cpu == NULL) { |
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/gpio.c b/arch/arm/mach-s3c2410/gpio.c index 23ea3d5fa09c..cd39e8684584 100644 --- a/arch/arm/mach-s3c2410/gpio.c +++ b/arch/arm/mach-s3c2410/gpio.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * 05-Nov-2004 BJD EXPORT_SYMBOL() added for all code | 31 | * 05-Nov-2004 BJD EXPORT_SYMBOL() added for all code |
32 | * 13-Mar-2005 BJD Updates for __iomem | 32 | * 13-Mar-2005 BJD Updates for __iomem |
33 | * 26-Oct-2005 BJD Added generic configuration types | 33 | * 26-Oct-2005 BJD Added generic configuration types |
34 | * 15-Jan-2006 LCVR Added support for the S3C2400 | ||
34 | */ | 35 | */ |
35 | 36 | ||
36 | 37 | ||
@@ -48,7 +49,7 @@ | |||
48 | 49 | ||
49 | void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function) | 50 | void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function) |
50 | { | 51 | { |
51 | void __iomem *base = S3C2410_GPIO_BASE(pin); | 52 | void __iomem *base = S3C24XX_GPIO_BASE(pin); |
52 | unsigned long mask; | 53 | unsigned long mask; |
53 | unsigned long con; | 54 | unsigned long con; |
54 | unsigned long flags; | 55 | unsigned long flags; |
@@ -95,7 +96,7 @@ EXPORT_SYMBOL(s3c2410_gpio_cfgpin); | |||
95 | 96 | ||
96 | unsigned int s3c2410_gpio_getcfg(unsigned int pin) | 97 | unsigned int s3c2410_gpio_getcfg(unsigned int pin) |
97 | { | 98 | { |
98 | void __iomem *base = S3C2410_GPIO_BASE(pin); | 99 | void __iomem *base = S3C24XX_GPIO_BASE(pin); |
99 | unsigned long mask; | 100 | unsigned long mask; |
100 | 101 | ||
101 | if (pin < S3C2410_GPIO_BANKB) { | 102 | if (pin < S3C2410_GPIO_BANKB) { |
@@ -111,7 +112,7 @@ EXPORT_SYMBOL(s3c2410_gpio_getcfg); | |||
111 | 112 | ||
112 | void s3c2410_gpio_pullup(unsigned int pin, unsigned int to) | 113 | void s3c2410_gpio_pullup(unsigned int pin, unsigned int to) |
113 | { | 114 | { |
114 | void __iomem *base = S3C2410_GPIO_BASE(pin); | 115 | void __iomem *base = S3C24XX_GPIO_BASE(pin); |
115 | unsigned long offs = S3C2410_GPIO_OFFSET(pin); | 116 | unsigned long offs = S3C2410_GPIO_OFFSET(pin); |
116 | unsigned long flags; | 117 | unsigned long flags; |
117 | unsigned long up; | 118 | unsigned long up; |
@@ -133,7 +134,7 @@ EXPORT_SYMBOL(s3c2410_gpio_pullup); | |||
133 | 134 | ||
134 | void s3c2410_gpio_setpin(unsigned int pin, unsigned int to) | 135 | void s3c2410_gpio_setpin(unsigned int pin, unsigned int to) |
135 | { | 136 | { |
136 | void __iomem *base = S3C2410_GPIO_BASE(pin); | 137 | void __iomem *base = S3C24XX_GPIO_BASE(pin); |
137 | unsigned long offs = S3C2410_GPIO_OFFSET(pin); | 138 | unsigned long offs = S3C2410_GPIO_OFFSET(pin); |
138 | unsigned long flags; | 139 | unsigned long flags; |
139 | unsigned long dat; | 140 | unsigned long dat; |
@@ -152,7 +153,7 @@ EXPORT_SYMBOL(s3c2410_gpio_setpin); | |||
152 | 153 | ||
153 | unsigned int s3c2410_gpio_getpin(unsigned int pin) | 154 | unsigned int s3c2410_gpio_getpin(unsigned int pin) |
154 | { | 155 | { |
155 | void __iomem *base = S3C2410_GPIO_BASE(pin); | 156 | void __iomem *base = S3C24XX_GPIO_BASE(pin); |
156 | unsigned long offs = S3C2410_GPIO_OFFSET(pin); | 157 | unsigned long offs = S3C2410_GPIO_OFFSET(pin); |
157 | 158 | ||
158 | return __raw_readl(base + 0x04) & (1<< offs); | 159 | return __raw_readl(base + 0x04) & (1<< offs); |
@@ -166,70 +167,13 @@ unsigned int s3c2410_modify_misccr(unsigned int clear, unsigned int change) | |||
166 | unsigned long misccr; | 167 | unsigned long misccr; |
167 | 168 | ||
168 | local_irq_save(flags); | 169 | local_irq_save(flags); |
169 | misccr = __raw_readl(S3C2410_MISCCR); | 170 | misccr = __raw_readl(S3C24XX_MISCCR); |
170 | misccr &= ~clear; | 171 | misccr &= ~clear; |
171 | misccr ^= change; | 172 | misccr ^= change; |
172 | __raw_writel(misccr, S3C2410_MISCCR); | 173 | __raw_writel(misccr, S3C24XX_MISCCR); |
173 | local_irq_restore(flags); | 174 | local_irq_restore(flags); |
174 | 175 | ||
175 | return misccr; | 176 | return misccr; |
176 | } | 177 | } |
177 | 178 | ||
178 | EXPORT_SYMBOL(s3c2410_modify_misccr); | 179 | EXPORT_SYMBOL(s3c2410_modify_misccr); |
179 | |||
180 | int s3c2410_gpio_getirq(unsigned int pin) | ||
181 | { | ||
182 | if (pin < S3C2410_GPF0 || pin > S3C2410_GPG15_EINT23) | ||
183 | return -1; /* not valid interrupts */ | ||
184 | |||
185 | if (pin < S3C2410_GPG0 && pin > S3C2410_GPF7) | ||
186 | return -1; /* not valid pin */ | ||
187 | |||
188 | if (pin < S3C2410_GPF4) | ||
189 | return (pin - S3C2410_GPF0) + IRQ_EINT0; | ||
190 | |||
191 | if (pin < S3C2410_GPG0) | ||
192 | return (pin - S3C2410_GPF4) + IRQ_EINT4; | ||
193 | |||
194 | return (pin - S3C2410_GPG0) + IRQ_EINT8; | ||
195 | } | ||
196 | |||
197 | EXPORT_SYMBOL(s3c2410_gpio_getirq); | ||
198 | |||
199 | int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on, | ||
200 | unsigned int config) | ||
201 | { | ||
202 | void __iomem *reg = S3C2410_EINFLT0; | ||
203 | unsigned long flags; | ||
204 | unsigned long val; | ||
205 | |||
206 | if (pin < S3C2410_GPG8 || pin > S3C2410_GPG15) | ||
207 | return -1; | ||
208 | |||
209 | config &= 0xff; | ||
210 | |||
211 | pin -= S3C2410_GPG8_EINT16; | ||
212 | reg += pin & ~3; | ||
213 | |||
214 | local_irq_save(flags); | ||
215 | |||
216 | /* update filter width and clock source */ | ||
217 | |||
218 | val = __raw_readl(reg); | ||
219 | val &= ~(0xff << ((pin & 3) * 8)); | ||
220 | val |= config << ((pin & 3) * 8); | ||
221 | __raw_writel(val, reg); | ||
222 | |||
223 | /* update filter enable */ | ||
224 | |||
225 | val = __raw_readl(S3C2410_EXTINT2); | ||
226 | val &= ~(1 << ((pin * 4) + 3)); | ||
227 | val |= on << ((pin * 4) + 3); | ||
228 | __raw_writel(val, S3C2410_EXTINT2); | ||
229 | |||
230 | local_irq_restore(flags); | ||
231 | |||
232 | return 0; | ||
233 | } | ||
234 | |||
235 | EXPORT_SYMBOL(s3c2410_gpio_irqfilter); | ||
diff --git a/arch/arm/mach-s3c2410/s3c2400-gpio.c b/arch/arm/mach-s3c2410/s3c2400-gpio.c new file mode 100644 index 000000000000..5127f39fa9bf --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2400-gpio.c | |||
@@ -0,0 +1,45 @@ | |||
1 | /* linux/arch/arm/mach-s3c2410/gpio.c | ||
2 | * | ||
3 | * Copyright (c) 2006 Lucas Correia Villa Real <lucasvr@gobolinux.org> | ||
4 | * | ||
5 | * S3C2400 GPIO support | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | * Changelog | ||
22 | * 15-Jan-2006 LCVR Splitted from gpio.c, adding support for the S3C2400 | ||
23 | */ | ||
24 | |||
25 | #include <linux/kernel.h> | ||
26 | #include <linux/init.h> | ||
27 | #include <linux/module.h> | ||
28 | #include <linux/interrupt.h> | ||
29 | #include <linux/ioport.h> | ||
30 | |||
31 | #include <asm/hardware.h> | ||
32 | #include <asm/irq.h> | ||
33 | #include <asm/io.h> | ||
34 | |||
35 | #include <asm/arch/regs-gpio.h> | ||
36 | |||
37 | int s3c2400_gpio_getirq(unsigned int pin) | ||
38 | { | ||
39 | if (pin < S3C2410_GPE0 || pin > S3C2400_GPE7_EINT7) | ||
40 | return -1; /* not valid interrupts */ | ||
41 | |||
42 | return (pin - S3C2410_GPE0) + IRQ_EINT0; | ||
43 | } | ||
44 | |||
45 | EXPORT_SYMBOL(s3c2400_gpio_getirq); | ||
diff --git a/arch/arm/mach-s3c2410/s3c2410-gpio.c b/arch/arm/mach-s3c2410/s3c2410-gpio.c new file mode 100644 index 000000000000..d5e1caea1d23 --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2410-gpio.c | |||
@@ -0,0 +1,93 @@ | |||
1 | /* linux/arch/arm/mach-s3c2410/gpio.c | ||
2 | * | ||
3 | * Copyright (c) 2004-2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * S3C2410 GPIO support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | * Changelog | ||
23 | * 15-Jan-2006 LCVR Splitted from gpio.c | ||
24 | */ | ||
25 | |||
26 | #include <linux/kernel.h> | ||
27 | #include <linux/init.h> | ||
28 | #include <linux/module.h> | ||
29 | #include <linux/interrupt.h> | ||
30 | #include <linux/ioport.h> | ||
31 | |||
32 | #include <asm/hardware.h> | ||
33 | #include <asm/irq.h> | ||
34 | #include <asm/io.h> | ||
35 | |||
36 | #include <asm/arch/regs-gpio.h> | ||
37 | |||
38 | int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on, | ||
39 | unsigned int config) | ||
40 | { | ||
41 | void __iomem *reg = S3C2410_EINFLT0; | ||
42 | unsigned long flags; | ||
43 | unsigned long val; | ||
44 | |||
45 | if (pin < S3C2410_GPG8 || pin > S3C2410_GPG15) | ||
46 | return -1; | ||
47 | |||
48 | config &= 0xff; | ||
49 | |||
50 | pin -= S3C2410_GPG8_EINT16; | ||
51 | reg += pin & ~3; | ||
52 | |||
53 | local_irq_save(flags); | ||
54 | |||
55 | /* update filter width and clock source */ | ||
56 | |||
57 | val = __raw_readl(reg); | ||
58 | val &= ~(0xff << ((pin & 3) * 8)); | ||
59 | val |= config << ((pin & 3) * 8); | ||
60 | __raw_writel(val, reg); | ||
61 | |||
62 | /* update filter enable */ | ||
63 | |||
64 | val = __raw_readl(S3C2410_EXTINT2); | ||
65 | val &= ~(1 << ((pin * 4) + 3)); | ||
66 | val |= on << ((pin * 4) + 3); | ||
67 | __raw_writel(val, S3C2410_EXTINT2); | ||
68 | |||
69 | local_irq_restore(flags); | ||
70 | |||
71 | return 0; | ||
72 | } | ||
73 | |||
74 | EXPORT_SYMBOL(s3c2410_gpio_irqfilter); | ||
75 | |||
76 | int s3c2410_gpio_getirq(unsigned int pin) | ||
77 | { | ||
78 | if (pin < S3C2410_GPF0 || pin > S3C2410_GPG15_EINT23) | ||
79 | return -1; /* not valid interrupts */ | ||
80 | |||
81 | if (pin < S3C2410_GPG0 && pin > S3C2410_GPF7) | ||
82 | return -1; /* not valid pin */ | ||
83 | |||
84 | if (pin < S3C2410_GPF4) | ||
85 | return (pin - S3C2410_GPF0) + IRQ_EINT0; | ||
86 | |||
87 | if (pin < S3C2410_GPG0) | ||
88 | return (pin - S3C2410_GPF4) + IRQ_EINT4; | ||
89 | |||
90 | return (pin - S3C2410_GPG0) + IRQ_EINT8; | ||
91 | } | ||
92 | |||
93 | EXPORT_SYMBOL(s3c2410_gpio_getirq); | ||
diff --git a/arch/arm/mach-s3c2410/sleep.S b/arch/arm/mach-s3c2410/sleep.S index 61768dac7fee..832fb86a03b4 100644 --- a/arch/arm/mach-s3c2410/sleep.S +++ b/arch/arm/mach-s3c2410/sleep.S | |||
@@ -72,7 +72,7 @@ ENTRY(s3c2410_cpu_suspend) | |||
72 | @@ prepare cpu to sleep | 72 | @@ prepare cpu to sleep |
73 | 73 | ||
74 | ldr r4, =S3C2410_REFRESH | 74 | ldr r4, =S3C2410_REFRESH |
75 | ldr r5, =S3C2410_MISCCR | 75 | ldr r5, =S3C24XX_MISCCR |
76 | ldr r6, =S3C2410_CLKCON | 76 | ldr r6, =S3C2410_CLKCON |
77 | ldr r7, [ r4 ] @ get REFRESH (and ensure in TLB) | 77 | ldr r7, [ r4 ] @ get REFRESH (and ensure in TLB) |
78 | ldr r8, [ r5 ] @ get MISCCR (and ensure in TLB) | 78 | ldr r8, [ r5 ] @ get MISCCR (and ensure in TLB) |
@@ -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/cache-v6.S b/arch/arm/mm/cache-v6.S index 72966d90e956..d921c1024ae0 100644 --- a/arch/arm/mm/cache-v6.S +++ b/arch/arm/mm/cache-v6.S | |||
@@ -92,22 +92,16 @@ ENTRY(v6_coherent_kern_range) | |||
92 | * - the Icache does not read data from the write buffer | 92 | * - the Icache does not read data from the write buffer |
93 | */ | 93 | */ |
94 | ENTRY(v6_coherent_user_range) | 94 | ENTRY(v6_coherent_user_range) |
95 | bic r0, r0, #CACHE_LINE_SIZE - 1 | 95 | |
96 | 1: | ||
97 | #ifdef HARVARD_CACHE | 96 | #ifdef HARVARD_CACHE |
98 | mcr p15, 0, r0, c7, c10, 1 @ clean D line | 97 | bic r0, r0, #CACHE_LINE_SIZE - 1 |
98 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D line | ||
99 | mcr p15, 0, r0, c7, c5, 1 @ invalidate I line | 99 | mcr p15, 0, r0, c7, c5, 1 @ invalidate I line |
100 | #endif | 100 | add r0, r0, #CACHE_LINE_SIZE |
101 | mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry | ||
102 | add r0, r0, #BTB_FLUSH_SIZE | ||
103 | mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry | ||
104 | add r0, r0, #BTB_FLUSH_SIZE | ||
105 | mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry | ||
106 | add r0, r0, #BTB_FLUSH_SIZE | ||
107 | mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry | ||
108 | add r0, r0, #BTB_FLUSH_SIZE | ||
109 | cmp r0, r1 | 101 | cmp r0, r1 |
110 | blo 1b | 102 | blo 1b |
103 | #endif | ||
104 | mcr p15, 0, r0, c7, c5, 6 @ invalidate BTB | ||
111 | #ifdef HARVARD_CACHE | 105 | #ifdef HARVARD_CACHE |
112 | mov r0, #0 | 106 | mov r0, #0 |
113 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer | 107 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer |
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/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 861b35947280..2d3823ec3153 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
@@ -241,7 +241,15 @@ ENTRY(xscale_flush_user_cache_range) | |||
241 | * it also trashes the mini I-cache used by JTAG debuggers. | 241 | * it also trashes the mini I-cache used by JTAG debuggers. |
242 | */ | 242 | */ |
243 | ENTRY(xscale_coherent_kern_range) | 243 | ENTRY(xscale_coherent_kern_range) |
244 | /* FALLTHROUGH */ | 244 | bic r0, r0, #CACHELINESIZE - 1 |
245 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | ||
246 | add r0, r0, #CACHELINESIZE | ||
247 | cmp r0, r1 | ||
248 | blo 1b | ||
249 | mov r0, #0 | ||
250 | mcr p15, 0, r0, c7, c5, 0 @ Invalidate I cache & BTB | ||
251 | mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer | ||
252 | mov pc, lr | ||
245 | 253 | ||
246 | /* | 254 | /* |
247 | * coherent_user_range(start, end) | 255 | * coherent_user_range(start, end) |
@@ -252,18 +260,16 @@ ENTRY(xscale_coherent_kern_range) | |||
252 | * | 260 | * |
253 | * - start - virtual start address | 261 | * - start - virtual start address |
254 | * - end - virtual end address | 262 | * - end - virtual end address |
255 | * | ||
256 | * Note: single I-cache line invalidation isn't used here since | ||
257 | * it also trashes the mini I-cache used by JTAG debuggers. | ||
258 | */ | 263 | */ |
259 | ENTRY(xscale_coherent_user_range) | 264 | ENTRY(xscale_coherent_user_range) |
260 | bic r0, r0, #CACHELINESIZE - 1 | 265 | bic r0, r0, #CACHELINESIZE - 1 |
261 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 266 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
267 | mcr p15, 0, r0, c7, c5, 1 @ Invalidate I cache entry | ||
262 | add r0, r0, #CACHELINESIZE | 268 | add r0, r0, #CACHELINESIZE |
263 | cmp r0, r1 | 269 | cmp r0, r1 |
264 | blo 1b | 270 | blo 1b |
265 | mov r0, #0 | 271 | mov r0, #0 |
266 | mcr p15, 0, r0, c7, c5, 0 @ Invalidate I cache & BTB | 272 | mcr p15, 0, r0, c7, c5, 6 @ Invalidate BTB |
267 | mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer | 273 | mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer |
268 | mov pc, lr | 274 | mov pc, lr |
269 | 275 | ||
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index 1415930ceee1..6f8bc1f0e6a1 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c | |||
@@ -137,8 +137,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
137 | if (spec) { | 137 | if (spec) { |
138 | init_MUTEX(&op_arm_sem); | 138 | init_MUTEX(&op_arm_sem); |
139 | 139 | ||
140 | if (spec->init() < 0) | 140 | ret = spec->init(); |
141 | return -ENODEV; | 141 | if (ret < 0) |
142 | return ret; | ||
142 | 143 | ||
143 | op_arm_model = spec; | 144 | op_arm_model = spec; |
144 | init_driverfs(); | 145 | init_driverfs(); |
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..0afec8566e7b 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 |
@@ -451,12 +442,50 @@ config HIGHMEM4G | |||
451 | 442 | ||
452 | config HIGHMEM64G | 443 | config HIGHMEM64G |
453 | bool "64GB" | 444 | bool "64GB" |
445 | depends on X86_CMPXCHG64 | ||
454 | help | 446 | help |
455 | Select this if you have a 32-bit processor and more than 4 | 447 | Select this if you have a 32-bit processor and more than 4 |
456 | gigabytes of physical RAM. | 448 | gigabytes of physical RAM. |
457 | 449 | ||
458 | endchoice | 450 | endchoice |
459 | 451 | ||
452 | choice | ||
453 | depends on EXPERIMENTAL && !X86_PAE | ||
454 | prompt "Memory split" | ||
455 | default VMSPLIT_3G | ||
456 | help | ||
457 | Select the desired split between kernel and user memory. | ||
458 | |||
459 | If the address range available to the kernel is less than the | ||
460 | physical memory installed, the remaining memory will be available | ||
461 | as "high memory". Accessing high memory is a little more costly | ||
462 | than low memory, as it needs to be mapped into the kernel first. | ||
463 | Note that increasing the kernel address space limits the range | ||
464 | available to user programs, making the address space there | ||
465 | tighter. Selecting anything other than the default 3G/1G split | ||
466 | will also likely make your kernel incompatible with binary-only | ||
467 | kernel modules. | ||
468 | |||
469 | If you are not absolutely sure what you are doing, leave this | ||
470 | option alone! | ||
471 | |||
472 | config VMSPLIT_3G | ||
473 | bool "3G/1G user/kernel split" | ||
474 | config VMSPLIT_3G_OPT | ||
475 | bool "3G/1G user/kernel split (for full 1G low memory)" | ||
476 | config VMSPLIT_2G | ||
477 | bool "2G/2G user/kernel split" | ||
478 | config VMSPLIT_1G | ||
479 | bool "1G/3G user/kernel split" | ||
480 | endchoice | ||
481 | |||
482 | config PAGE_OFFSET | ||
483 | hex | ||
484 | default 0xB0000000 if VMSPLIT_3G_OPT | ||
485 | default 0x78000000 if VMSPLIT_2G | ||
486 | default 0x40000000 if VMSPLIT_1G | ||
487 | default 0xC0000000 | ||
488 | |||
460 | config HIGHMEM | 489 | config HIGHMEM |
461 | bool | 490 | bool |
462 | depends on HIGHMEM64G || HIGHMEM4G | 491 | depends on HIGHMEM64G || HIGHMEM4G |
@@ -711,6 +740,15 @@ config HOTPLUG_CPU | |||
711 | 740 | ||
712 | Say N. | 741 | Say N. |
713 | 742 | ||
743 | config DOUBLEFAULT | ||
744 | default y | ||
745 | bool "Enable doublefault exception handler" if EMBEDDED | ||
746 | help | ||
747 | This option allows trapping of rare doublefault exceptions that | ||
748 | would otherwise cause a system to silently reboot. Disabling this | ||
749 | option saves about 4k and might cause you much additional grey | ||
750 | hair. | ||
751 | |||
714 | endmenu | 752 | endmenu |
715 | 753 | ||
716 | 754 | ||
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..79577f0ace98 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -248,10 +248,17 @@ acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end) | |||
248 | 248 | ||
249 | acpi_table_print_madt_entry(header); | 249 | acpi_table_print_madt_entry(header); |
250 | 250 | ||
251 | /* Register even disabled CPUs for cpu hotplug */ | 251 | /* Record local apic id only when enabled */ |
252 | 252 | if (processor->flags.enabled) | |
253 | x86_acpiid_to_apicid[processor->acpi_id] = processor->id; | 253 | x86_acpiid_to_apicid[processor->acpi_id] = processor->id; |
254 | 254 | ||
255 | /* | ||
256 | * We need to register disabled CPU as well to permit | ||
257 | * counting disabled CPUs. This allows us to size | ||
258 | * cpus_possible_map more accurately, to permit | ||
259 | * to not preallocating memory for all NR_CPUS | ||
260 | * when we use CPU hotplug. | ||
261 | */ | ||
255 | mp_register_lapic(processor->id, /* APIC ID */ | 262 | mp_register_lapic(processor->id, /* APIC ID */ |
256 | processor->flags.enabled); /* Enabled? */ | 263 | processor->flags.enabled); /* Enabled? */ |
257 | 264 | ||
@@ -464,7 +471,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) | |||
464 | * success: return IRQ number (>=0) | 471 | * success: return IRQ number (>=0) |
465 | * failure: return < 0 | 472 | * failure: return < 0 |
466 | */ | 473 | */ |
467 | int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) | 474 | int acpi_register_gsi(u32 gsi, int triggering, int polarity) |
468 | { | 475 | { |
469 | unsigned int irq; | 476 | unsigned int irq; |
470 | unsigned int plat_gsi = gsi; | 477 | unsigned int plat_gsi = gsi; |
@@ -476,14 +483,14 @@ int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) | |||
476 | if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { | 483 | if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { |
477 | extern void eisa_set_level_irq(unsigned int irq); | 484 | extern void eisa_set_level_irq(unsigned int irq); |
478 | 485 | ||
479 | if (edge_level == ACPI_LEVEL_SENSITIVE) | 486 | if (triggering == ACPI_LEVEL_SENSITIVE) |
480 | eisa_set_level_irq(gsi); | 487 | eisa_set_level_irq(gsi); |
481 | } | 488 | } |
482 | #endif | 489 | #endif |
483 | 490 | ||
484 | #ifdef CONFIG_X86_IO_APIC | 491 | #ifdef CONFIG_X86_IO_APIC |
485 | if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { | 492 | if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { |
486 | plat_gsi = mp_register_gsi(gsi, edge_level, active_high_low); | 493 | plat_gsi = mp_register_gsi(gsi, triggering, polarity); |
487 | } | 494 | } |
488 | #endif | 495 | #endif |
489 | acpi_gsi_to_irq(plat_gsi, &irq); | 496 | 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/apic.c b/arch/i386/kernel/apic.c index acd3f1e34ca6..98a5c23cf3df 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -75,8 +75,10 @@ void ack_bad_irq(unsigned int irq) | |||
75 | * holds up an irq slot - in excessive cases (when multiple | 75 | * holds up an irq slot - in excessive cases (when multiple |
76 | * unexpected vectors occur) that might lock up the APIC | 76 | * unexpected vectors occur) that might lock up the APIC |
77 | * completely. | 77 | * completely. |
78 | * But only ack when the APIC is enabled -AK | ||
78 | */ | 79 | */ |
79 | ack_APIC_irq(); | 80 | if (!cpu_has_apic) |
81 | ack_APIC_irq(); | ||
80 | } | 82 | } |
81 | 83 | ||
82 | void __init apic_intr_init(void) | 84 | void __init apic_intr_init(void) |
@@ -1303,6 +1305,7 @@ int __init APIC_init_uniprocessor (void) | |||
1303 | if (!cpu_has_apic && APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) { | 1305 | if (!cpu_has_apic && APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) { |
1304 | printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", | 1306 | printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", |
1305 | boot_cpu_physical_apicid); | 1307 | boot_cpu_physical_apicid); |
1308 | clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); | ||
1306 | return -1; | 1309 | return -1; |
1307 | } | 1310 | } |
1308 | 1311 | ||
diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index 333578a4e91a..0810f81f2a05 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c | |||
@@ -282,3 +282,11 @@ int __init amd_init_cpu(void) | |||
282 | } | 282 | } |
283 | 283 | ||
284 | //early_arch_initcall(amd_init_cpu); | 284 | //early_arch_initcall(amd_init_cpu); |
285 | |||
286 | static int __init amd_exit_cpu(void) | ||
287 | { | ||
288 | cpu_devs[X86_VENDOR_AMD] = NULL; | ||
289 | return 0; | ||
290 | } | ||
291 | |||
292 | late_initcall(amd_exit_cpu); | ||
diff --git a/arch/i386/kernel/cpu/centaur.c b/arch/i386/kernel/cpu/centaur.c index 394814e57672..f52669ecb93f 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 | } |
@@ -474,3 +470,11 @@ int __init centaur_init_cpu(void) | |||
474 | } | 470 | } |
475 | 471 | ||
476 | //early_arch_initcall(centaur_init_cpu); | 472 | //early_arch_initcall(centaur_init_cpu); |
473 | |||
474 | static int __init centaur_exit_cpu(void) | ||
475 | { | ||
476 | cpu_devs[X86_VENDOR_CENTAUR] = NULL; | ||
477 | return 0; | ||
478 | } | ||
479 | |||
480 | late_initcall(centaur_exit_cpu); | ||
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 15aee26ec2b6..7eb9213734a3 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
@@ -44,6 +44,7 @@ static void default_init(struct cpuinfo_x86 * c) | |||
44 | 44 | ||
45 | static struct cpu_dev default_cpu = { | 45 | static struct cpu_dev default_cpu = { |
46 | .c_init = default_init, | 46 | .c_init = default_init, |
47 | .c_vendor = "Unknown", | ||
47 | }; | 48 | }; |
48 | static struct cpu_dev * this_cpu = &default_cpu; | 49 | static struct cpu_dev * this_cpu = &default_cpu; |
49 | 50 | ||
@@ -150,6 +151,7 @@ static void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) | |||
150 | { | 151 | { |
151 | char *v = c->x86_vendor_id; | 152 | char *v = c->x86_vendor_id; |
152 | int i; | 153 | int i; |
154 | static int printed; | ||
153 | 155 | ||
154 | for (i = 0; i < X86_VENDOR_NUM; i++) { | 156 | for (i = 0; i < X86_VENDOR_NUM; i++) { |
155 | if (cpu_devs[i]) { | 157 | if (cpu_devs[i]) { |
@@ -159,10 +161,17 @@ static void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) | |||
159 | c->x86_vendor = i; | 161 | c->x86_vendor = i; |
160 | if (!early) | 162 | if (!early) |
161 | this_cpu = cpu_devs[i]; | 163 | this_cpu = cpu_devs[i]; |
162 | break; | 164 | return; |
163 | } | 165 | } |
164 | } | 166 | } |
165 | } | 167 | } |
168 | if (!printed) { | ||
169 | printed++; | ||
170 | printk(KERN_ERR "CPU: Vendor unknown, using generic init.\n"); | ||
171 | printk(KERN_ERR "CPU: Your system may be unstable.\n"); | ||
172 | } | ||
173 | c->x86_vendor = X86_VENDOR_UNKNOWN; | ||
174 | this_cpu = &default_cpu; | ||
166 | } | 175 | } |
167 | 176 | ||
168 | 177 | ||
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/cyrix.c b/arch/i386/kernel/cpu/cyrix.c index 75015975d038..00f2e058797c 100644 --- a/arch/i386/kernel/cpu/cyrix.c +++ b/arch/i386/kernel/cpu/cyrix.c | |||
@@ -345,7 +345,7 @@ static void __init init_cyrix(struct cpuinfo_x86 *c) | |||
345 | /* | 345 | /* |
346 | * Handle National Semiconductor branded processors | 346 | * Handle National Semiconductor branded processors |
347 | */ | 347 | */ |
348 | static void __devinit init_nsc(struct cpuinfo_x86 *c) | 348 | static void __init init_nsc(struct cpuinfo_x86 *c) |
349 | { | 349 | { |
350 | /* There may be GX1 processors in the wild that are branded | 350 | /* There may be GX1 processors in the wild that are branded |
351 | * NSC and not Cyrix. | 351 | * NSC and not Cyrix. |
@@ -444,6 +444,14 @@ int __init cyrix_init_cpu(void) | |||
444 | 444 | ||
445 | //early_arch_initcall(cyrix_init_cpu); | 445 | //early_arch_initcall(cyrix_init_cpu); |
446 | 446 | ||
447 | static int __init cyrix_exit_cpu(void) | ||
448 | { | ||
449 | cpu_devs[X86_VENDOR_CYRIX] = NULL; | ||
450 | return 0; | ||
451 | } | ||
452 | |||
453 | late_initcall(cyrix_exit_cpu); | ||
454 | |||
447 | static struct cpu_dev nsc_cpu_dev __initdata = { | 455 | static struct cpu_dev nsc_cpu_dev __initdata = { |
448 | .c_vendor = "NSC", | 456 | .c_vendor = "NSC", |
449 | .c_ident = { "Geode by NSC" }, | 457 | .c_ident = { "Geode by NSC" }, |
@@ -458,3 +466,11 @@ int __init nsc_init_cpu(void) | |||
458 | } | 466 | } |
459 | 467 | ||
460 | //early_arch_initcall(nsc_init_cpu); | 468 | //early_arch_initcall(nsc_init_cpu); |
469 | |||
470 | static int __init nsc_exit_cpu(void) | ||
471 | { | ||
472 | cpu_devs[X86_VENDOR_NSC] = NULL; | ||
473 | return 0; | ||
474 | } | ||
475 | |||
476 | late_initcall(nsc_exit_cpu); | ||
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c index fbfd374aa336..ffe58cee0c48 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 */ |
@@ -141,6 +152,7 @@ static int __cpuinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_le | |||
141 | return 0; | 152 | return 0; |
142 | } | 153 | } |
143 | 154 | ||
155 | /* will only be called once; __init is safe here */ | ||
144 | static int __init find_num_cache_leaves(void) | 156 | static int __init find_num_cache_leaves(void) |
145 | { | 157 | { |
146 | unsigned int eax, ebx, ecx, edx; | 158 | unsigned int eax, ebx, ecx, edx; |
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/cpu/nexgen.c b/arch/i386/kernel/cpu/nexgen.c index 30898a260a5c..ad87fa58058d 100644 --- a/arch/i386/kernel/cpu/nexgen.c +++ b/arch/i386/kernel/cpu/nexgen.c | |||
@@ -61,3 +61,11 @@ int __init nexgen_init_cpu(void) | |||
61 | } | 61 | } |
62 | 62 | ||
63 | //early_arch_initcall(nexgen_init_cpu); | 63 | //early_arch_initcall(nexgen_init_cpu); |
64 | |||
65 | static int __init nexgen_exit_cpu(void) | ||
66 | { | ||
67 | cpu_devs[X86_VENDOR_NEXGEN] = NULL; | ||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | late_initcall(nexgen_exit_cpu); | ||
diff --git a/arch/i386/kernel/cpu/rise.c b/arch/i386/kernel/cpu/rise.c index 8602425628ca..d08d5a2811c8 100644 --- a/arch/i386/kernel/cpu/rise.c +++ b/arch/i386/kernel/cpu/rise.c | |||
@@ -51,3 +51,11 @@ int __init rise_init_cpu(void) | |||
51 | } | 51 | } |
52 | 52 | ||
53 | //early_arch_initcall(rise_init_cpu); | 53 | //early_arch_initcall(rise_init_cpu); |
54 | |||
55 | static int __init rise_exit_cpu(void) | ||
56 | { | ||
57 | cpu_devs[X86_VENDOR_RISE] = NULL; | ||
58 | return 0; | ||
59 | } | ||
60 | |||
61 | late_initcall(rise_exit_cpu); | ||
diff --git a/arch/i386/kernel/cpu/transmeta.c b/arch/i386/kernel/cpu/transmeta.c index fc426380366b..bdbeb77f4e22 100644 --- a/arch/i386/kernel/cpu/transmeta.c +++ b/arch/i386/kernel/cpu/transmeta.c | |||
@@ -84,7 +84,7 @@ static void __init init_transmeta(struct cpuinfo_x86 *c) | |||
84 | #endif | 84 | #endif |
85 | } | 85 | } |
86 | 86 | ||
87 | static void transmeta_identify(struct cpuinfo_x86 * c) | 87 | static void __init transmeta_identify(struct cpuinfo_x86 * c) |
88 | { | 88 | { |
89 | u32 xlvl; | 89 | u32 xlvl; |
90 | generic_identify(c); | 90 | generic_identify(c); |
@@ -111,3 +111,11 @@ int __init transmeta_init_cpu(void) | |||
111 | } | 111 | } |
112 | 112 | ||
113 | //early_arch_initcall(transmeta_init_cpu); | 113 | //early_arch_initcall(transmeta_init_cpu); |
114 | |||
115 | static int __init transmeta_exit_cpu(void) | ||
116 | { | ||
117 | cpu_devs[X86_VENDOR_TRANSMETA] = NULL; | ||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | late_initcall(transmeta_exit_cpu); | ||
diff --git a/arch/i386/kernel/cpu/umc.c b/arch/i386/kernel/cpu/umc.c index 264fcad559d5..2cd988f6dc55 100644 --- a/arch/i386/kernel/cpu/umc.c +++ b/arch/i386/kernel/cpu/umc.c | |||
@@ -31,3 +31,11 @@ int __init umc_init_cpu(void) | |||
31 | } | 31 | } |
32 | 32 | ||
33 | //early_arch_initcall(umc_init_cpu); | 33 | //early_arch_initcall(umc_init_cpu); |
34 | |||
35 | static int __init umc_exit_cpu(void) | ||
36 | { | ||
37 | cpu_devs[X86_VENDOR_UMC] = NULL; | ||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | late_initcall(umc_exit_cpu); | ||
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/nmi.c b/arch/i386/kernel/nmi.c index d661703ac1cb..63f39a7e2c96 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -138,7 +138,7 @@ static int __init check_nmi_watchdog(void) | |||
138 | if (nmi_watchdog == NMI_LOCAL_APIC) | 138 | if (nmi_watchdog == NMI_LOCAL_APIC) |
139 | smp_call_function(nmi_cpu_busy, (void *)&endflag, 0, 0); | 139 | smp_call_function(nmi_cpu_busy, (void *)&endflag, 0, 0); |
140 | 140 | ||
141 | for (cpu = 0; cpu < NR_CPUS; cpu++) | 141 | for_each_cpu(cpu) |
142 | prev_nmi_count[cpu] = per_cpu(irq_stat, cpu).__nmi_count; | 142 | prev_nmi_count[cpu] = per_cpu(irq_stat, cpu).__nmi_count; |
143 | local_irq_enable(); | 143 | local_irq_enable(); |
144 | mdelay((10*1000)/nmi_hz); // wait 10 ticks | 144 | mdelay((10*1000)/nmi_hz); // wait 10 ticks |
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 2185377fdde1..0480454ebffa 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -297,8 +297,10 @@ void show_regs(struct pt_regs * regs) | |||
297 | 297 | ||
298 | if (user_mode(regs)) | 298 | if (user_mode(regs)) |
299 | printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); | 299 | printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); |
300 | printk(" EFLAGS: %08lx %s (%s)\n", | 300 | printk(" EFLAGS: %08lx %s (%s %.*s)\n", |
301 | regs->eflags, print_tainted(), system_utsname.release); | 301 | regs->eflags, print_tainted(), system_utsname.release, |
302 | (int)strcspn(system_utsname.version, " "), | ||
303 | system_utsname.version); | ||
302 | printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", | 304 | printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", |
303 | regs->eax,regs->ebx,regs->ecx,regs->edx); | 305 | regs->eax,regs->ebx,regs->ecx,regs->edx); |
304 | printk("ESI: %08lx EDI: %08lx EBP: %08lx", | 306 | printk("ESI: %08lx EDI: %08lx EBP: %08lx", |
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/kernel/traps.c b/arch/i386/kernel/traps.c index 0aaebf3e1cfa..b814dbdcc91e 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -166,7 +166,8 @@ static void show_trace_log_lvl(struct task_struct *task, | |||
166 | stack = (unsigned long*)context->previous_esp; | 166 | stack = (unsigned long*)context->previous_esp; |
167 | if (!stack) | 167 | if (!stack) |
168 | break; | 168 | break; |
169 | printk(KERN_EMERG " =======================\n"); | 169 | printk(log_lvl); |
170 | printk(" =======================\n"); | ||
170 | } | 171 | } |
171 | } | 172 | } |
172 | 173 | ||
@@ -239,9 +240,11 @@ void show_registers(struct pt_regs *regs) | |||
239 | } | 240 | } |
240 | print_modules(); | 241 | print_modules(); |
241 | printk(KERN_EMERG "CPU: %d\nEIP: %04x:[<%08lx>] %s VLI\n" | 242 | printk(KERN_EMERG "CPU: %d\nEIP: %04x:[<%08lx>] %s VLI\n" |
242 | "EFLAGS: %08lx (%s) \n", | 243 | "EFLAGS: %08lx (%s %.*s) \n", |
243 | smp_processor_id(), 0xffff & regs->xcs, regs->eip, | 244 | smp_processor_id(), 0xffff & regs->xcs, regs->eip, |
244 | print_tainted(), regs->eflags, system_utsname.release); | 245 | print_tainted(), regs->eflags, system_utsname.release, |
246 | (int)strcspn(system_utsname.version, " "), | ||
247 | system_utsname.version); | ||
245 | print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip); | 248 | print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip); |
246 | printk(KERN_EMERG "eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", | 249 | printk(KERN_EMERG "eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", |
247 | regs->eax, regs->ebx, regs->ecx, regs->edx); | 250 | regs->eax, regs->ebx, regs->ecx, regs->edx); |
diff --git a/arch/i386/oprofile/backtrace.c b/arch/i386/oprofile/backtrace.c index 21654be3f73f..acc18138fb22 100644 --- a/arch/i386/oprofile/backtrace.c +++ b/arch/i386/oprofile/backtrace.c | |||
@@ -49,7 +49,9 @@ dump_backtrace(struct frame_head * head) | |||
49 | * | stack | | 49 | * | stack | |
50 | * --------------- saved regs->ebp value if valid (frame_head address) | 50 | * --------------- saved regs->ebp value if valid (frame_head address) |
51 | * . . | 51 | * . . |
52 | * --------------- struct pt_regs stored on stack (struct pt_regs *) | 52 | * --------------- saved regs->rsp value if x86_64 |
53 | * | | | ||
54 | * --------------- struct pt_regs * stored on stack if 32-bit | ||
53 | * | | | 55 | * | | |
54 | * . . | 56 | * . . |
55 | * | | | 57 | * | | |
@@ -57,13 +59,26 @@ dump_backtrace(struct frame_head * head) | |||
57 | * | | | 59 | * | | |
58 | * | | \/ Lower addresses | 60 | * | | \/ Lower addresses |
59 | * | 61 | * |
60 | * Thus, &pt_regs <-> stack base restricts the valid(ish) ebp values | 62 | * Thus, regs (or regs->rsp for x86_64) <-> stack base restricts the |
63 | * valid(ish) ebp values. Note: (1) for x86_64, NMI and several other | ||
64 | * exceptions use special stacks, maintained by the interrupt stack table | ||
65 | * (IST). These stacks are set up in trap_init() in | ||
66 | * arch/x86_64/kernel/traps.c. Thus, for x86_64, regs now does not point | ||
67 | * to the kernel stack; instead, it points to some location on the NMI | ||
68 | * stack. On the other hand, regs->rsp is the stack pointer saved when the | ||
69 | * NMI occurred. (2) For 32-bit, regs->esp is not valid because the | ||
70 | * processor does not save %esp on the kernel stack when interrupts occur | ||
71 | * in the kernel mode. | ||
61 | */ | 72 | */ |
62 | #ifdef CONFIG_FRAME_POINTER | 73 | #ifdef CONFIG_FRAME_POINTER |
63 | static int valid_kernel_stack(struct frame_head * head, struct pt_regs * regs) | 74 | static int valid_kernel_stack(struct frame_head * head, struct pt_regs * regs) |
64 | { | 75 | { |
65 | unsigned long headaddr = (unsigned long)head; | 76 | unsigned long headaddr = (unsigned long)head; |
77 | #ifdef CONFIG_X86_64 | ||
78 | unsigned long stack = (unsigned long)regs->rsp; | ||
79 | #else | ||
66 | unsigned long stack = (unsigned long)regs; | 80 | unsigned long stack = (unsigned long)regs; |
81 | #endif | ||
67 | unsigned long stack_base = (stack & ~(THREAD_SIZE - 1)) + THREAD_SIZE; | 82 | unsigned long stack_base = (stack & ~(THREAD_SIZE - 1)) + THREAD_SIZE; |
68 | 83 | ||
69 | return headaddr > stack && headaddr < stack_base; | 84 | return headaddr > stack && headaddr < stack_base; |
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/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index 3945d378bd7e..70dba1f0e2ee 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -52,9 +52,9 @@ | |||
52 | #include <linux/compat.h> | 52 | #include <linux/compat.h> |
53 | #include <linux/vfs.h> | 53 | #include <linux/vfs.h> |
54 | #include <linux/mman.h> | 54 | #include <linux/mman.h> |
55 | #include <linux/mutex.h> | ||
55 | 56 | ||
56 | #include <asm/intrinsics.h> | 57 | #include <asm/intrinsics.h> |
57 | #include <asm/semaphore.h> | ||
58 | #include <asm/types.h> | 58 | #include <asm/types.h> |
59 | #include <asm/uaccess.h> | 59 | #include <asm/uaccess.h> |
60 | #include <asm/unistd.h> | 60 | #include <asm/unistd.h> |
@@ -86,7 +86,7 @@ | |||
86 | * while doing so. | 86 | * while doing so. |
87 | */ | 87 | */ |
88 | /* XXX make per-mm: */ | 88 | /* XXX make per-mm: */ |
89 | static DECLARE_MUTEX(ia32_mmap_sem); | 89 | static DEFINE_MUTEX(ia32_mmap_mutex); |
90 | 90 | ||
91 | asmlinkage long | 91 | asmlinkage long |
92 | sys32_execve (char __user *name, compat_uptr_t __user *argv, compat_uptr_t __user *envp, | 92 | sys32_execve (char __user *name, compat_uptr_t __user *argv, compat_uptr_t __user *envp, |
@@ -895,11 +895,11 @@ ia32_do_mmap (struct file *file, unsigned long addr, unsigned long len, int prot | |||
895 | prot = get_prot32(prot); | 895 | prot = get_prot32(prot); |
896 | 896 | ||
897 | #if PAGE_SHIFT > IA32_PAGE_SHIFT | 897 | #if PAGE_SHIFT > IA32_PAGE_SHIFT |
898 | down(&ia32_mmap_sem); | 898 | mutex_lock(&ia32_mmap_mutex); |
899 | { | 899 | { |
900 | addr = emulate_mmap(file, addr, len, prot, flags, offset); | 900 | addr = emulate_mmap(file, addr, len, prot, flags, offset); |
901 | } | 901 | } |
902 | up(&ia32_mmap_sem); | 902 | mutex_unlock(&ia32_mmap_mutex); |
903 | #else | 903 | #else |
904 | down_write(¤t->mm->mmap_sem); | 904 | down_write(¤t->mm->mmap_sem); |
905 | { | 905 | { |
@@ -1000,11 +1000,9 @@ sys32_munmap (unsigned int start, unsigned int len) | |||
1000 | if (start >= end) | 1000 | if (start >= end) |
1001 | return 0; | 1001 | return 0; |
1002 | 1002 | ||
1003 | down(&ia32_mmap_sem); | 1003 | mutex_lock(&ia32_mmap_mutex); |
1004 | { | 1004 | ret = sys_munmap(start, end - start); |
1005 | ret = sys_munmap(start, end - start); | 1005 | mutex_unlock(&ia32_mmap_mutex); |
1006 | } | ||
1007 | up(&ia32_mmap_sem); | ||
1008 | #endif | 1006 | #endif |
1009 | return ret; | 1007 | return ret; |
1010 | } | 1008 | } |
@@ -1056,7 +1054,7 @@ sys32_mprotect (unsigned int start, unsigned int len, int prot) | |||
1056 | if (retval < 0) | 1054 | if (retval < 0) |
1057 | return retval; | 1055 | return retval; |
1058 | 1056 | ||
1059 | down(&ia32_mmap_sem); | 1057 | mutex_lock(&ia32_mmap_mutex); |
1060 | { | 1058 | { |
1061 | if (offset_in_page(start)) { | 1059 | if (offset_in_page(start)) { |
1062 | /* start address is 4KB aligned but not page aligned. */ | 1060 | /* start address is 4KB aligned but not page aligned. */ |
@@ -1080,7 +1078,7 @@ sys32_mprotect (unsigned int start, unsigned int len, int prot) | |||
1080 | retval = sys_mprotect(start, end - start, prot); | 1078 | retval = sys_mprotect(start, end - start, prot); |
1081 | } | 1079 | } |
1082 | out: | 1080 | out: |
1083 | up(&ia32_mmap_sem); | 1081 | mutex_unlock(&ia32_mmap_mutex); |
1084 | return retval; | 1082 | return retval; |
1085 | #endif | 1083 | #endif |
1086 | } | 1084 | } |
@@ -1124,11 +1122,9 @@ sys32_mremap (unsigned int addr, unsigned int old_len, unsigned int new_len, | |||
1124 | old_len = PAGE_ALIGN(old_end) - addr; | 1122 | old_len = PAGE_ALIGN(old_end) - addr; |
1125 | new_len = PAGE_ALIGN(new_end) - addr; | 1123 | new_len = PAGE_ALIGN(new_end) - addr; |
1126 | 1124 | ||
1127 | down(&ia32_mmap_sem); | 1125 | mutex_lock(&ia32_mmap_mutex); |
1128 | { | 1126 | ret = sys_mremap(addr, old_len, new_len, flags, new_addr); |
1129 | ret = sys_mremap(addr, old_len, new_len, flags, new_addr); | 1127 | mutex_unlock(&ia32_mmap_mutex); |
1130 | } | ||
1131 | up(&ia32_mmap_sem); | ||
1132 | 1128 | ||
1133 | if ((ret >= 0) && (old_len < new_len)) { | 1129 | if ((ret >= 0) && (old_len < new_len)) { |
1134 | /* mremap expanded successfully */ | 1130 | /* mremap expanded successfully */ |
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/perfmon.c b/arch/ia64/kernel/perfmon.c index 2ea4b39efffa..9c5194b385da 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/bitops.h> | 40 | #include <linux/bitops.h> |
41 | #include <linux/capability.h> | 41 | #include <linux/capability.h> |
42 | #include <linux/rcupdate.h> | 42 | #include <linux/rcupdate.h> |
43 | #include <linux/completion.h> | ||
43 | 44 | ||
44 | #include <asm/errno.h> | 45 | #include <asm/errno.h> |
45 | #include <asm/intrinsics.h> | 46 | #include <asm/intrinsics.h> |
@@ -286,7 +287,7 @@ typedef struct pfm_context { | |||
286 | 287 | ||
287 | unsigned long ctx_ovfl_regs[4]; /* which registers overflowed (notification) */ | 288 | unsigned long ctx_ovfl_regs[4]; /* which registers overflowed (notification) */ |
288 | 289 | ||
289 | struct semaphore ctx_restart_sem; /* use for blocking notification mode */ | 290 | struct completion ctx_restart_done; /* use for blocking notification mode */ |
290 | 291 | ||
291 | unsigned long ctx_used_pmds[4]; /* bitmask of PMD used */ | 292 | unsigned long ctx_used_pmds[4]; /* bitmask of PMD used */ |
292 | unsigned long ctx_all_pmds[4]; /* bitmask of all accessible PMDs */ | 293 | unsigned long ctx_all_pmds[4]; /* bitmask of all accessible PMDs */ |
@@ -1991,7 +1992,7 @@ pfm_close(struct inode *inode, struct file *filp) | |||
1991 | /* | 1992 | /* |
1992 | * force task to wake up from MASKED state | 1993 | * force task to wake up from MASKED state |
1993 | */ | 1994 | */ |
1994 | up(&ctx->ctx_restart_sem); | 1995 | complete(&ctx->ctx_restart_done); |
1995 | 1996 | ||
1996 | DPRINT(("waking up ctx_state=%d\n", state)); | 1997 | DPRINT(("waking up ctx_state=%d\n", state)); |
1997 | 1998 | ||
@@ -2706,7 +2707,7 @@ pfm_context_create(pfm_context_t *ctx, void *arg, int count, struct pt_regs *reg | |||
2706 | /* | 2707 | /* |
2707 | * init restart semaphore to locked | 2708 | * init restart semaphore to locked |
2708 | */ | 2709 | */ |
2709 | sema_init(&ctx->ctx_restart_sem, 0); | 2710 | init_completion(&ctx->ctx_restart_done); |
2710 | 2711 | ||
2711 | /* | 2712 | /* |
2712 | * activation is used in SMP only | 2713 | * activation is used in SMP only |
@@ -3687,7 +3688,7 @@ pfm_restart(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) | |||
3687 | */ | 3688 | */ |
3688 | if (CTX_OVFL_NOBLOCK(ctx) == 0 && state == PFM_CTX_MASKED) { | 3689 | if (CTX_OVFL_NOBLOCK(ctx) == 0 && state == PFM_CTX_MASKED) { |
3689 | DPRINT(("unblocking [%d] \n", task->pid)); | 3690 | DPRINT(("unblocking [%d] \n", task->pid)); |
3690 | up(&ctx->ctx_restart_sem); | 3691 | complete(&ctx->ctx_restart_done); |
3691 | } else { | 3692 | } else { |
3692 | DPRINT(("[%d] armed exit trap\n", task->pid)); | 3693 | DPRINT(("[%d] armed exit trap\n", task->pid)); |
3693 | 3694 | ||
@@ -5089,7 +5090,7 @@ pfm_handle_work(void) | |||
5089 | * may go through without blocking on SMP systems | 5090 | * may go through without blocking on SMP systems |
5090 | * if restart has been received already by the time we call down() | 5091 | * if restart has been received already by the time we call down() |
5091 | */ | 5092 | */ |
5092 | ret = down_interruptible(&ctx->ctx_restart_sem); | 5093 | ret = wait_for_completion_interruptible(&ctx->ctx_restart_done); |
5093 | 5094 | ||
5094 | DPRINT(("after block sleeping ret=%d\n", ret)); | 5095 | DPRINT(("after block sleeping ret=%d\n", ret)); |
5095 | 5096 | ||
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 706b7734e191..6e5eea19fa67 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -71,31 +71,33 @@ static int __init topology_init(void) | |||
71 | int i, err = 0; | 71 | int i, err = 0; |
72 | 72 | ||
73 | #ifdef CONFIG_NUMA | 73 | #ifdef CONFIG_NUMA |
74 | sysfs_nodes = kmalloc(sizeof(struct node) * MAX_NUMNODES, GFP_KERNEL); | 74 | sysfs_nodes = kzalloc(sizeof(struct node) * MAX_NUMNODES, GFP_KERNEL); |
75 | if (!sysfs_nodes) { | 75 | if (!sysfs_nodes) { |
76 | err = -ENOMEM; | 76 | err = -ENOMEM; |
77 | goto out; | 77 | goto out; |
78 | } | 78 | } |
79 | memset(sysfs_nodes, 0, sizeof(struct node) * MAX_NUMNODES); | ||
80 | 79 | ||
81 | /* MCD - Do we want to register all ONLINE nodes, or all POSSIBLE nodes? */ | 80 | /* |
82 | for_each_online_node(i) | 81 | * MCD - Do we want to register all ONLINE nodes, or all POSSIBLE nodes? |
82 | */ | ||
83 | for_each_online_node(i) { | ||
83 | if ((err = register_node(&sysfs_nodes[i], i, 0))) | 84 | if ((err = register_node(&sysfs_nodes[i], i, 0))) |
84 | goto out; | 85 | goto out; |
86 | } | ||
85 | #endif | 87 | #endif |
86 | 88 | ||
87 | sysfs_cpus = kmalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL); | 89 | sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL); |
88 | if (!sysfs_cpus) { | 90 | if (!sysfs_cpus) { |
89 | err = -ENOMEM; | 91 | err = -ENOMEM; |
90 | goto out; | 92 | goto out; |
91 | } | 93 | } |
92 | memset(sysfs_cpus, 0, sizeof(struct ia64_cpu) * NR_CPUS); | ||
93 | 94 | ||
94 | for_each_present_cpu(i) | 95 | for_each_present_cpu(i) { |
95 | if((err = arch_register_cpu(i))) | 96 | if((err = arch_register_cpu(i))) |
96 | goto out; | 97 | goto out; |
98 | } | ||
97 | out: | 99 | out: |
98 | return err; | 100 | return err; |
99 | } | 101 | } |
100 | 102 | ||
101 | __initcall(topology_init); | 103 | subsys_initcall(topology_init); |
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/kernel/uncached.c b/arch/ia64/kernel/uncached.c index b631cf86ed44..fcd2bad0286f 100644 --- a/arch/ia64/kernel/uncached.c +++ b/arch/ia64/kernel/uncached.c | |||
@@ -210,6 +210,7 @@ uncached_build_memmap(unsigned long start, unsigned long end, void *arg) | |||
210 | 210 | ||
211 | dprintk(KERN_ERR "uncached_build_memmap(%lx %lx)\n", start, end); | 211 | dprintk(KERN_ERR "uncached_build_memmap(%lx %lx)\n", start, end); |
212 | 212 | ||
213 | touch_softlockup_watchdog(); | ||
213 | memset((char *)start, 0, length); | 214 | memset((char *)start, 0, length); |
214 | 215 | ||
215 | node = paddr_to_nid(start - __IA64_UNCACHED_OFFSET); | 216 | node = paddr_to_nid(start - __IA64_UNCACHED_OFFSET); |
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/include/xtalk/hubdev.h b/arch/ia64/sn/include/xtalk/hubdev.h index 7c88e9a58516..8182583c762c 100644 --- a/arch/ia64/sn/include/xtalk/hubdev.h +++ b/arch/ia64/sn/include/xtalk/hubdev.h | |||
@@ -51,6 +51,15 @@ struct sn_flush_device_kernel { | |||
51 | struct sn_flush_device_common *common; | 51 | struct sn_flush_device_common *common; |
52 | }; | 52 | }; |
53 | 53 | ||
54 | /* 01/16/06 This struct is the old PROM/kernel struct and needs to be included | ||
55 | * for older official PROMs to function on the new kernel base. This struct | ||
56 | * will be removed when the next official PROM release occurs. */ | ||
57 | |||
58 | struct sn_flush_device_war { | ||
59 | struct sn_flush_device_common common; | ||
60 | u32 filler; /* older PROMs expect the default size of a spinlock_t */ | ||
61 | }; | ||
62 | |||
54 | /* | 63 | /* |
55 | * **widget_p - Used as an array[wid_num][device] of sn_flush_device_kernel. | 64 | * **widget_p - Used as an array[wid_num][device] of sn_flush_device_kernel. |
56 | */ | 65 | */ |
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 233d55115d33..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> |
@@ -165,8 +166,46 @@ sn_pcidev_info_get(struct pci_dev *dev) | |||
165 | return NULL; | 166 | return NULL; |
166 | } | 167 | } |
167 | 168 | ||
169 | /* Older PROM flush WAR | ||
170 | * | ||
171 | * 01/16/06 -- This war will be in place until a new official PROM is released. | ||
172 | * Additionally note that the struct sn_flush_device_war also has to be | ||
173 | * removed from arch/ia64/sn/include/xtalk/hubdev.h | ||
174 | */ | ||
175 | static u8 war_implemented = 0; | ||
176 | |||
177 | static s64 sn_device_fixup_war(u64 nasid, u64 widget, int device, | ||
178 | struct sn_flush_device_common *common) | ||
179 | { | ||
180 | struct sn_flush_device_war *war_list; | ||
181 | struct sn_flush_device_war *dev_entry; | ||
182 | struct ia64_sal_retval isrv = {0,0,0,0}; | ||
183 | |||
184 | if (!war_implemented) { | ||
185 | printk(KERN_WARNING "PROM version < 4.50 -- implementing old " | ||
186 | "PROM flush WAR\n"); | ||
187 | war_implemented = 1; | ||
188 | } | ||
189 | |||
190 | war_list = kzalloc(DEV_PER_WIDGET * sizeof(*war_list), GFP_KERNEL); | ||
191 | if (!war_list) | ||
192 | BUG(); | ||
193 | |||
194 | SAL_CALL_NOLOCK(isrv, SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST, | ||
195 | nasid, widget, __pa(war_list), 0, 0, 0 ,0); | ||
196 | if (isrv.status) | ||
197 | panic("sn_device_fixup_war failed: %s\n", | ||
198 | ia64_sal_strerror(isrv.status)); | ||
199 | |||
200 | dev_entry = war_list + device; | ||
201 | memcpy(common,dev_entry, sizeof(*common)); | ||
202 | kfree(war_list); | ||
203 | |||
204 | return isrv.status; | ||
205 | } | ||
206 | |||
168 | /* | 207 | /* |
169 | * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for | 208 | * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for |
170 | * each node in the system. | 209 | * each node in the system. |
171 | */ | 210 | */ |
172 | static void sn_fixup_ionodes(void) | 211 | static void sn_fixup_ionodes(void) |
@@ -242,12 +281,21 @@ static void sn_fixup_ionodes(void) | |||
242 | memset(dev_entry->common, 0x0, sizeof(struct | 281 | memset(dev_entry->common, 0x0, sizeof(struct |
243 | sn_flush_device_common)); | 282 | sn_flush_device_common)); |
244 | 283 | ||
245 | status = sal_get_device_dmaflush_list(nasid, | 284 | if (sn_prom_feature_available( |
246 | widget, | 285 | PRF_DEVICE_FLUSH_LIST)) |
247 | device, | 286 | status = sal_get_device_dmaflush_list( |
287 | nasid, | ||
288 | widget, | ||
289 | device, | ||
248 | (u64)(dev_entry->common)); | 290 | (u64)(dev_entry->common)); |
249 | if (status) | 291 | else |
250 | BUG(); | 292 | status = sn_device_fixup_war(nasid, |
293 | widget, | ||
294 | device, | ||
295 | dev_entry->common); | ||
296 | if (status != SALRET_OK) | ||
297 | panic("SAL call failed: %s\n", | ||
298 | ia64_sal_strerror(status)); | ||
251 | 299 | ||
252 | spin_lock_init(&dev_entry->sfdl_flush_lock); | 300 | spin_lock_init(&dev_entry->sfdl_flush_lock); |
253 | } | 301 | } |
diff --git a/arch/ia64/sn/kernel/mca.c b/arch/ia64/sn/kernel/mca.c index 6546db6abdba..9ab684d1bb55 100644 --- a/arch/ia64/sn/kernel/mca.c +++ b/arch/ia64/sn/kernel/mca.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/timer.h> | 11 | #include <linux/timer.h> |
12 | #include <linux/vmalloc.h> | 12 | #include <linux/vmalloc.h> |
13 | #include <linux/mutex.h> | ||
13 | #include <asm/mca.h> | 14 | #include <asm/mca.h> |
14 | #include <asm/sal.h> | 15 | #include <asm/sal.h> |
15 | #include <asm/sn/sn_sal.h> | 16 | #include <asm/sn/sn_sal.h> |
@@ -27,7 +28,7 @@ void sn_init_cpei_timer(void); | |||
27 | /* Printing oemdata from mca uses data that is not passed through SAL, it is | 28 | /* Printing oemdata from mca uses data that is not passed through SAL, it is |
28 | * global. Only one user at a time. | 29 | * global. Only one user at a time. |
29 | */ | 30 | */ |
30 | static DECLARE_MUTEX(sn_oemdata_mutex); | 31 | static DEFINE_MUTEX(sn_oemdata_mutex); |
31 | static u8 **sn_oemdata; | 32 | static u8 **sn_oemdata; |
32 | static u64 *sn_oemdata_size, sn_oemdata_bufsize; | 33 | static u64 *sn_oemdata_size, sn_oemdata_bufsize; |
33 | 34 | ||
@@ -89,7 +90,7 @@ static int | |||
89 | sn_platform_plat_specific_err_print(const u8 * sect_header, u8 ** oemdata, | 90 | sn_platform_plat_specific_err_print(const u8 * sect_header, u8 ** oemdata, |
90 | u64 * oemdata_size) | 91 | u64 * oemdata_size) |
91 | { | 92 | { |
92 | down(&sn_oemdata_mutex); | 93 | mutex_lock(&sn_oemdata_mutex); |
93 | sn_oemdata = oemdata; | 94 | sn_oemdata = oemdata; |
94 | sn_oemdata_size = oemdata_size; | 95 | sn_oemdata_size = oemdata_size; |
95 | sn_oemdata_bufsize = 0; | 96 | sn_oemdata_bufsize = 0; |
@@ -107,7 +108,7 @@ sn_platform_plat_specific_err_print(const u8 * sect_header, u8 ** oemdata, | |||
107 | *sn_oemdata_size = 0; | 108 | *sn_oemdata_size = 0; |
108 | ia64_sn_plat_specific_err_print(print_hook, (char *)sect_header); | 109 | ia64_sn_plat_specific_err_print(print_hook, (char *)sect_header); |
109 | } | 110 | } |
110 | up(&sn_oemdata_mutex); | 111 | mutex_unlock(&sn_oemdata_mutex); |
111 | return 0; | 112 | return 0; |
112 | } | 113 | } |
113 | 114 | ||
diff --git a/arch/ia64/sn/kernel/xp_main.c b/arch/ia64/sn/kernel/xp_main.c index 3be52a34c80f..b7ea46645e12 100644 --- a/arch/ia64/sn/kernel/xp_main.c +++ b/arch/ia64/sn/kernel/xp_main.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/mutex.h> | ||
22 | #include <asm/sn/intr.h> | 23 | #include <asm/sn/intr.h> |
23 | #include <asm/sn/sn_sal.h> | 24 | #include <asm/sn/sn_sal.h> |
24 | #include <asm/sn/xp.h> | 25 | #include <asm/sn/xp.h> |
@@ -136,13 +137,13 @@ xpc_connect(int ch_number, xpc_channel_func func, void *key, u16 payload_size, | |||
136 | 137 | ||
137 | registration = &xpc_registrations[ch_number]; | 138 | registration = &xpc_registrations[ch_number]; |
138 | 139 | ||
139 | if (down_interruptible(®istration->sema) != 0) { | 140 | if (mutex_lock_interruptible(®istration->mutex) != 0) { |
140 | return xpcInterrupted; | 141 | return xpcInterrupted; |
141 | } | 142 | } |
142 | 143 | ||
143 | /* if XPC_CHANNEL_REGISTERED(ch_number) */ | 144 | /* if XPC_CHANNEL_REGISTERED(ch_number) */ |
144 | if (registration->func != NULL) { | 145 | if (registration->func != NULL) { |
145 | up(®istration->sema); | 146 | mutex_unlock(®istration->mutex); |
146 | return xpcAlreadyRegistered; | 147 | return xpcAlreadyRegistered; |
147 | } | 148 | } |
148 | 149 | ||
@@ -154,7 +155,7 @@ xpc_connect(int ch_number, xpc_channel_func func, void *key, u16 payload_size, | |||
154 | registration->key = key; | 155 | registration->key = key; |
155 | registration->func = func; | 156 | registration->func = func; |
156 | 157 | ||
157 | up(®istration->sema); | 158 | mutex_unlock(®istration->mutex); |
158 | 159 | ||
159 | xpc_interface.connect(ch_number); | 160 | xpc_interface.connect(ch_number); |
160 | 161 | ||
@@ -190,11 +191,11 @@ xpc_disconnect(int ch_number) | |||
190 | * figured XPC's users will just turn around and call xpc_disconnect() | 191 | * figured XPC's users will just turn around and call xpc_disconnect() |
191 | * again anyways, so we might as well wait, if need be. | 192 | * again anyways, so we might as well wait, if need be. |
192 | */ | 193 | */ |
193 | down(®istration->sema); | 194 | mutex_lock(®istration->mutex); |
194 | 195 | ||
195 | /* if !XPC_CHANNEL_REGISTERED(ch_number) */ | 196 | /* if !XPC_CHANNEL_REGISTERED(ch_number) */ |
196 | if (registration->func == NULL) { | 197 | if (registration->func == NULL) { |
197 | up(®istration->sema); | 198 | mutex_unlock(®istration->mutex); |
198 | return; | 199 | return; |
199 | } | 200 | } |
200 | 201 | ||
@@ -208,7 +209,7 @@ xpc_disconnect(int ch_number) | |||
208 | 209 | ||
209 | xpc_interface.disconnect(ch_number); | 210 | xpc_interface.disconnect(ch_number); |
210 | 211 | ||
211 | up(®istration->sema); | 212 | mutex_unlock(®istration->mutex); |
212 | 213 | ||
213 | return; | 214 | return; |
214 | } | 215 | } |
@@ -250,9 +251,9 @@ xp_init(void) | |||
250 | xp_nofault_PIOR_target = SH1_IPI_ACCESS; | 251 | xp_nofault_PIOR_target = SH1_IPI_ACCESS; |
251 | } | 252 | } |
252 | 253 | ||
253 | /* initialize the connection registration semaphores */ | 254 | /* initialize the connection registration mutex */ |
254 | for (ch_number = 0; ch_number < XPC_NCHANNELS; ch_number++) { | 255 | for (ch_number = 0; ch_number < XPC_NCHANNELS; ch_number++) { |
255 | sema_init(&xpc_registrations[ch_number].sema, 1); /* mutex */ | 256 | mutex_init(&xpc_registrations[ch_number].mutex); |
256 | } | 257 | } |
257 | 258 | ||
258 | return 0; | 259 | return 0; |
diff --git a/arch/ia64/sn/kernel/xpc_channel.c b/arch/ia64/sn/kernel/xpc_channel.c index 0c0a68902409..36e5437a0fb6 100644 --- a/arch/ia64/sn/kernel/xpc_channel.c +++ b/arch/ia64/sn/kernel/xpc_channel.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include <linux/cache.h> | 22 | #include <linux/cache.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/mutex.h> | ||
26 | #include <linux/completion.h> | ||
25 | #include <asm/sn/bte.h> | 27 | #include <asm/sn/bte.h> |
26 | #include <asm/sn/sn_sal.h> | 28 | #include <asm/sn/sn_sal.h> |
27 | #include <asm/sn/xpc.h> | 29 | #include <asm/sn/xpc.h> |
@@ -56,8 +58,8 @@ xpc_initialize_channels(struct xpc_partition *part, partid_t partid) | |||
56 | atomic_set(&ch->n_to_notify, 0); | 58 | atomic_set(&ch->n_to_notify, 0); |
57 | 59 | ||
58 | spin_lock_init(&ch->lock); | 60 | spin_lock_init(&ch->lock); |
59 | sema_init(&ch->msg_to_pull_sema, 1); /* mutex */ | 61 | mutex_init(&ch->msg_to_pull_mutex); |
60 | sema_init(&ch->wdisconnect_sema, 0); /* event wait */ | 62 | init_completion(&ch->wdisconnect_wait); |
61 | 63 | ||
62 | atomic_set(&ch->n_on_msg_allocate_wq, 0); | 64 | atomic_set(&ch->n_on_msg_allocate_wq, 0); |
63 | init_waitqueue_head(&ch->msg_allocate_wq); | 65 | init_waitqueue_head(&ch->msg_allocate_wq); |
@@ -445,7 +447,7 @@ xpc_allocate_local_msgqueue(struct xpc_channel *ch) | |||
445 | 447 | ||
446 | nbytes = nentries * ch->msg_size; | 448 | nbytes = nentries * ch->msg_size; |
447 | ch->local_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, | 449 | ch->local_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, |
448 | (GFP_KERNEL | GFP_DMA), | 450 | GFP_KERNEL, |
449 | &ch->local_msgqueue_base); | 451 | &ch->local_msgqueue_base); |
450 | if (ch->local_msgqueue == NULL) { | 452 | if (ch->local_msgqueue == NULL) { |
451 | continue; | 453 | continue; |
@@ -453,7 +455,7 @@ xpc_allocate_local_msgqueue(struct xpc_channel *ch) | |||
453 | memset(ch->local_msgqueue, 0, nbytes); | 455 | memset(ch->local_msgqueue, 0, nbytes); |
454 | 456 | ||
455 | nbytes = nentries * sizeof(struct xpc_notify); | 457 | nbytes = nentries * sizeof(struct xpc_notify); |
456 | ch->notify_queue = kmalloc(nbytes, (GFP_KERNEL | GFP_DMA)); | 458 | ch->notify_queue = kmalloc(nbytes, GFP_KERNEL); |
457 | if (ch->notify_queue == NULL) { | 459 | if (ch->notify_queue == NULL) { |
458 | kfree(ch->local_msgqueue_base); | 460 | kfree(ch->local_msgqueue_base); |
459 | ch->local_msgqueue = NULL; | 461 | ch->local_msgqueue = NULL; |
@@ -500,7 +502,7 @@ xpc_allocate_remote_msgqueue(struct xpc_channel *ch) | |||
500 | 502 | ||
501 | nbytes = nentries * ch->msg_size; | 503 | nbytes = nentries * ch->msg_size; |
502 | ch->remote_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, | 504 | ch->remote_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, |
503 | (GFP_KERNEL | GFP_DMA), | 505 | GFP_KERNEL, |
504 | &ch->remote_msgqueue_base); | 506 | &ch->remote_msgqueue_base); |
505 | if (ch->remote_msgqueue == NULL) { | 507 | if (ch->remote_msgqueue == NULL) { |
506 | continue; | 508 | continue; |
@@ -534,7 +536,6 @@ static enum xpc_retval | |||
534 | xpc_allocate_msgqueues(struct xpc_channel *ch) | 536 | xpc_allocate_msgqueues(struct xpc_channel *ch) |
535 | { | 537 | { |
536 | unsigned long irq_flags; | 538 | unsigned long irq_flags; |
537 | int i; | ||
538 | enum xpc_retval ret; | 539 | enum xpc_retval ret; |
539 | 540 | ||
540 | 541 | ||
@@ -552,11 +553,6 @@ xpc_allocate_msgqueues(struct xpc_channel *ch) | |||
552 | return ret; | 553 | return ret; |
553 | } | 554 | } |
554 | 555 | ||
555 | for (i = 0; i < ch->local_nentries; i++) { | ||
556 | /* use a semaphore as an event wait queue */ | ||
557 | sema_init(&ch->notify_queue[i].sema, 0); | ||
558 | } | ||
559 | |||
560 | spin_lock_irqsave(&ch->lock, irq_flags); | 556 | spin_lock_irqsave(&ch->lock, irq_flags); |
561 | ch->flags |= XPC_C_SETUP; | 557 | ch->flags |= XPC_C_SETUP; |
562 | spin_unlock_irqrestore(&ch->lock, irq_flags); | 558 | spin_unlock_irqrestore(&ch->lock, irq_flags); |
@@ -799,10 +795,8 @@ xpc_process_disconnect(struct xpc_channel *ch, unsigned long *irq_flags) | |||
799 | } | 795 | } |
800 | 796 | ||
801 | if (ch->flags & XPC_C_WDISCONNECT) { | 797 | if (ch->flags & XPC_C_WDISCONNECT) { |
802 | spin_unlock_irqrestore(&ch->lock, *irq_flags); | 798 | /* we won't lose the CPU since we're holding ch->lock */ |
803 | up(&ch->wdisconnect_sema); | 799 | complete(&ch->wdisconnect_wait); |
804 | spin_lock_irqsave(&ch->lock, *irq_flags); | ||
805 | |||
806 | } else if (ch->delayed_IPI_flags) { | 800 | } else if (ch->delayed_IPI_flags) { |
807 | if (part->act_state != XPC_P_DEACTIVATING) { | 801 | if (part->act_state != XPC_P_DEACTIVATING) { |
808 | /* time to take action on any delayed IPI flags */ | 802 | /* time to take action on any delayed IPI flags */ |
@@ -1092,12 +1086,12 @@ xpc_connect_channel(struct xpc_channel *ch) | |||
1092 | struct xpc_registration *registration = &xpc_registrations[ch->number]; | 1086 | struct xpc_registration *registration = &xpc_registrations[ch->number]; |
1093 | 1087 | ||
1094 | 1088 | ||
1095 | if (down_trylock(®istration->sema) != 0) { | 1089 | if (mutex_trylock(®istration->mutex) == 0) { |
1096 | return xpcRetry; | 1090 | return xpcRetry; |
1097 | } | 1091 | } |
1098 | 1092 | ||
1099 | if (!XPC_CHANNEL_REGISTERED(ch->number)) { | 1093 | if (!XPC_CHANNEL_REGISTERED(ch->number)) { |
1100 | up(®istration->sema); | 1094 | mutex_unlock(®istration->mutex); |
1101 | return xpcUnregistered; | 1095 | return xpcUnregistered; |
1102 | } | 1096 | } |
1103 | 1097 | ||
@@ -1108,7 +1102,7 @@ xpc_connect_channel(struct xpc_channel *ch) | |||
1108 | 1102 | ||
1109 | if (ch->flags & XPC_C_DISCONNECTING) { | 1103 | if (ch->flags & XPC_C_DISCONNECTING) { |
1110 | spin_unlock_irqrestore(&ch->lock, irq_flags); | 1104 | spin_unlock_irqrestore(&ch->lock, irq_flags); |
1111 | up(®istration->sema); | 1105 | mutex_unlock(®istration->mutex); |
1112 | return ch->reason; | 1106 | return ch->reason; |
1113 | } | 1107 | } |
1114 | 1108 | ||
@@ -1140,7 +1134,7 @@ xpc_connect_channel(struct xpc_channel *ch) | |||
1140 | * channel lock be locked and will unlock and relock | 1134 | * channel lock be locked and will unlock and relock |
1141 | * the channel lock as needed. | 1135 | * the channel lock as needed. |
1142 | */ | 1136 | */ |
1143 | up(®istration->sema); | 1137 | mutex_unlock(®istration->mutex); |
1144 | XPC_DISCONNECT_CHANNEL(ch, xpcUnequalMsgSizes, | 1138 | XPC_DISCONNECT_CHANNEL(ch, xpcUnequalMsgSizes, |
1145 | &irq_flags); | 1139 | &irq_flags); |
1146 | spin_unlock_irqrestore(&ch->lock, irq_flags); | 1140 | spin_unlock_irqrestore(&ch->lock, irq_flags); |
@@ -1155,7 +1149,7 @@ xpc_connect_channel(struct xpc_channel *ch) | |||
1155 | atomic_inc(&xpc_partitions[ch->partid].nchannels_active); | 1149 | atomic_inc(&xpc_partitions[ch->partid].nchannels_active); |
1156 | } | 1150 | } |
1157 | 1151 | ||
1158 | up(®istration->sema); | 1152 | mutex_unlock(®istration->mutex); |
1159 | 1153 | ||
1160 | 1154 | ||
1161 | /* initiate the connection */ | 1155 | /* initiate the connection */ |
@@ -2089,7 +2083,7 @@ xpc_pull_remote_msg(struct xpc_channel *ch, s64 get) | |||
2089 | enum xpc_retval ret; | 2083 | enum xpc_retval ret; |
2090 | 2084 | ||
2091 | 2085 | ||
2092 | if (down_interruptible(&ch->msg_to_pull_sema) != 0) { | 2086 | if (mutex_lock_interruptible(&ch->msg_to_pull_mutex) != 0) { |
2093 | /* we were interrupted by a signal */ | 2087 | /* we were interrupted by a signal */ |
2094 | return NULL; | 2088 | return NULL; |
2095 | } | 2089 | } |
@@ -2125,7 +2119,7 @@ xpc_pull_remote_msg(struct xpc_channel *ch, s64 get) | |||
2125 | 2119 | ||
2126 | XPC_DEACTIVATE_PARTITION(part, ret); | 2120 | XPC_DEACTIVATE_PARTITION(part, ret); |
2127 | 2121 | ||
2128 | up(&ch->msg_to_pull_sema); | 2122 | mutex_unlock(&ch->msg_to_pull_mutex); |
2129 | return NULL; | 2123 | return NULL; |
2130 | } | 2124 | } |
2131 | 2125 | ||
@@ -2134,7 +2128,7 @@ xpc_pull_remote_msg(struct xpc_channel *ch, s64 get) | |||
2134 | ch->next_msg_to_pull += nmsgs; | 2128 | ch->next_msg_to_pull += nmsgs; |
2135 | } | 2129 | } |
2136 | 2130 | ||
2137 | up(&ch->msg_to_pull_sema); | 2131 | mutex_unlock(&ch->msg_to_pull_mutex); |
2138 | 2132 | ||
2139 | /* return the message we were looking for */ | 2133 | /* return the message we were looking for */ |
2140 | msg_offset = (get % ch->remote_nentries) * ch->msg_size; | 2134 | msg_offset = (get % ch->remote_nentries) * ch->msg_size; |
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index 8930586e0eb4..c75f8aeefc2b 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c | |||
@@ -55,6 +55,7 @@ | |||
55 | #include <linux/slab.h> | 55 | #include <linux/slab.h> |
56 | #include <linux/delay.h> | 56 | #include <linux/delay.h> |
57 | #include <linux/reboot.h> | 57 | #include <linux/reboot.h> |
58 | #include <linux/completion.h> | ||
58 | #include <asm/sn/intr.h> | 59 | #include <asm/sn/intr.h> |
59 | #include <asm/sn/sn_sal.h> | 60 | #include <asm/sn/sn_sal.h> |
60 | #include <asm/kdebug.h> | 61 | #include <asm/kdebug.h> |
@@ -177,10 +178,10 @@ static DECLARE_WAIT_QUEUE_HEAD(xpc_act_IRQ_wq); | |||
177 | static unsigned long xpc_hb_check_timeout; | 178 | static unsigned long xpc_hb_check_timeout; |
178 | 179 | ||
179 | /* notification that the xpc_hb_checker thread has exited */ | 180 | /* notification that the xpc_hb_checker thread has exited */ |
180 | static DECLARE_MUTEX_LOCKED(xpc_hb_checker_exited); | 181 | static DECLARE_COMPLETION(xpc_hb_checker_exited); |
181 | 182 | ||
182 | /* notification that the xpc_discovery thread has exited */ | 183 | /* notification that the xpc_discovery thread has exited */ |
183 | static DECLARE_MUTEX_LOCKED(xpc_discovery_exited); | 184 | static DECLARE_COMPLETION(xpc_discovery_exited); |
184 | 185 | ||
185 | 186 | ||
186 | static struct timer_list xpc_hb_timer; | 187 | static struct timer_list xpc_hb_timer; |
@@ -321,7 +322,7 @@ xpc_hb_checker(void *ignore) | |||
321 | 322 | ||
322 | 323 | ||
323 | /* mark this thread as having exited */ | 324 | /* mark this thread as having exited */ |
324 | up(&xpc_hb_checker_exited); | 325 | complete(&xpc_hb_checker_exited); |
325 | return 0; | 326 | return 0; |
326 | } | 327 | } |
327 | 328 | ||
@@ -341,7 +342,7 @@ xpc_initiate_discovery(void *ignore) | |||
341 | dev_dbg(xpc_part, "discovery thread is exiting\n"); | 342 | dev_dbg(xpc_part, "discovery thread is exiting\n"); |
342 | 343 | ||
343 | /* mark this thread as having exited */ | 344 | /* mark this thread as having exited */ |
344 | up(&xpc_discovery_exited); | 345 | complete(&xpc_discovery_exited); |
345 | return 0; | 346 | return 0; |
346 | } | 347 | } |
347 | 348 | ||
@@ -893,7 +894,7 @@ xpc_disconnect_wait(int ch_number) | |||
893 | continue; | 894 | continue; |
894 | } | 895 | } |
895 | 896 | ||
896 | (void) down(&ch->wdisconnect_sema); | 897 | wait_for_completion(&ch->wdisconnect_wait); |
897 | 898 | ||
898 | spin_lock_irqsave(&ch->lock, irq_flags); | 899 | spin_lock_irqsave(&ch->lock, irq_flags); |
899 | DBUG_ON(!(ch->flags & XPC_C_DISCONNECTED)); | 900 | DBUG_ON(!(ch->flags & XPC_C_DISCONNECTED)); |
@@ -946,10 +947,10 @@ xpc_do_exit(enum xpc_retval reason) | |||
946 | free_irq(SGI_XPC_ACTIVATE, NULL); | 947 | free_irq(SGI_XPC_ACTIVATE, NULL); |
947 | 948 | ||
948 | /* wait for the discovery thread to exit */ | 949 | /* wait for the discovery thread to exit */ |
949 | down(&xpc_discovery_exited); | 950 | wait_for_completion(&xpc_discovery_exited); |
950 | 951 | ||
951 | /* wait for the heartbeat checker thread to exit */ | 952 | /* wait for the heartbeat checker thread to exit */ |
952 | down(&xpc_hb_checker_exited); | 953 | wait_for_completion(&xpc_hb_checker_exited); |
953 | 954 | ||
954 | 955 | ||
955 | /* sleep for a 1/3 of a second or so */ | 956 | /* sleep for a 1/3 of a second or so */ |
@@ -1367,7 +1368,7 @@ xpc_init(void) | |||
1367 | dev_err(xpc_part, "failed while forking discovery thread\n"); | 1368 | dev_err(xpc_part, "failed while forking discovery thread\n"); |
1368 | 1369 | ||
1369 | /* mark this new thread as a non-starter */ | 1370 | /* mark this new thread as a non-starter */ |
1370 | up(&xpc_discovery_exited); | 1371 | complete(&xpc_discovery_exited); |
1371 | 1372 | ||
1372 | xpc_do_exit(xpcUnloading); | 1373 | xpc_do_exit(xpcUnloading); |
1373 | return -EBUSY; | 1374 | return -EBUSY; |
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/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c index 77a1262751d3..2fac27049bf6 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c | |||
@@ -24,13 +24,15 @@ sal_pcibr_slot_enable(struct pcibus_info *soft, int device, void *resp) | |||
24 | { | 24 | { |
25 | struct ia64_sal_retval ret_stuff; | 25 | struct ia64_sal_retval ret_stuff; |
26 | u64 busnum; | 26 | u64 busnum; |
27 | u64 segment; | ||
27 | 28 | ||
28 | ret_stuff.status = 0; | 29 | ret_stuff.status = 0; |
29 | ret_stuff.v0 = 0; | 30 | ret_stuff.v0 = 0; |
30 | 31 | ||
32 | segment = soft->pbi_buscommon.bs_persist_segment; | ||
31 | busnum = soft->pbi_buscommon.bs_persist_busnum; | 33 | busnum = soft->pbi_buscommon.bs_persist_busnum; |
32 | SAL_CALL_NOLOCK(ret_stuff, (u64) SN_SAL_IOIF_SLOT_ENABLE, (u64) busnum, | 34 | SAL_CALL_NOLOCK(ret_stuff, (u64) SN_SAL_IOIF_SLOT_ENABLE, segment, |
33 | (u64) device, (u64) resp, 0, 0, 0, 0); | 35 | busnum, (u64) device, (u64) resp, 0, 0, 0); |
34 | 36 | ||
35 | return (int)ret_stuff.v0; | 37 | return (int)ret_stuff.v0; |
36 | } | 38 | } |
@@ -41,14 +43,16 @@ sal_pcibr_slot_disable(struct pcibus_info *soft, int device, int action, | |||
41 | { | 43 | { |
42 | struct ia64_sal_retval ret_stuff; | 44 | struct ia64_sal_retval ret_stuff; |
43 | u64 busnum; | 45 | u64 busnum; |
46 | u64 segment; | ||
44 | 47 | ||
45 | ret_stuff.status = 0; | 48 | ret_stuff.status = 0; |
46 | ret_stuff.v0 = 0; | 49 | ret_stuff.v0 = 0; |
47 | 50 | ||
51 | segment = soft->pbi_buscommon.bs_persist_segment; | ||
48 | busnum = soft->pbi_buscommon.bs_persist_busnum; | 52 | busnum = soft->pbi_buscommon.bs_persist_busnum; |
49 | SAL_CALL_NOLOCK(ret_stuff, (u64) SN_SAL_IOIF_SLOT_DISABLE, | 53 | SAL_CALL_NOLOCK(ret_stuff, (u64) SN_SAL_IOIF_SLOT_DISABLE, |
50 | (u64) busnum, (u64) device, (u64) action, | 54 | segment, busnum, (u64) device, (u64) action, |
51 | (u64) resp, 0, 0, 0); | 55 | (u64) resp, 0, 0); |
52 | 56 | ||
53 | return (int)ret_stuff.v0; | 57 | return (int)ret_stuff.v0; |
54 | } | 58 | } |
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/parisc/Kconfig b/arch/parisc/Kconfig index e77a06e9621e..7c914a4c67c3 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -149,14 +149,20 @@ config HOTPLUG_CPU | |||
149 | default y if SMP | 149 | default y if SMP |
150 | select HOTPLUG | 150 | select HOTPLUG |
151 | 151 | ||
152 | config ARCH_SELECT_MEMORY_MODEL | ||
153 | def_bool y | ||
154 | depends on 64BIT | ||
155 | |||
152 | config ARCH_DISCONTIGMEM_ENABLE | 156 | config ARCH_DISCONTIGMEM_ENABLE |
153 | bool "Discontiguous memory support (EXPERIMENTAL)" | 157 | def_bool y |
154 | depends on 64BIT && EXPERIMENTAL | 158 | depends on 64BIT |
155 | help | 159 | |
156 | Say Y to support efficient handling of discontiguous physical memory, | 160 | config ARCH_FLATMEM_ENABLE |
157 | for architectures which are either NUMA (Non-Uniform Memory Access) | 161 | def_bool y |
158 | or have huge holes in the physical address space for other reasons. | 162 | |
159 | See <file:Documentation/vm/numa> for more. | 163 | config ARCH_DISCONTIGMEM_DEFAULT |
164 | def_bool y | ||
165 | depends on ARCH_DISCONTIGMEM_ENABLE | ||
160 | 166 | ||
161 | source "kernel/Kconfig.hz" | 167 | source "kernel/Kconfig.hz" |
162 | source "mm/Kconfig" | 168 | source "mm/Kconfig" |
diff --git a/arch/parisc/Kconfig.debug b/arch/parisc/Kconfig.debug index 8caaed187a1f..9166bd117267 100644 --- a/arch/parisc/Kconfig.debug +++ b/arch/parisc/Kconfig.debug | |||
@@ -11,4 +11,14 @@ config DEBUG_RWLOCK | |||
11 | too many attempts. If you suspect a rwlock problem or a kernel | 11 | too many attempts. If you suspect a rwlock problem or a kernel |
12 | hacker asks for this option then say Y. Otherwise say N. | 12 | hacker asks for this option then say Y. Otherwise say N. |
13 | 13 | ||
14 | config DEBUG_RODATA | ||
15 | bool "Write protect kernel read-only data structures" | ||
16 | depends on DEBUG_KERNEL | ||
17 | help | ||
18 | Mark the kernel read-only data as write-protected in the pagetables, | ||
19 | in order to catch accidental (and incorrect) writes to such const | ||
20 | data. This option may have a slight performance impact because a | ||
21 | portion of the kernel code won't be covered by a TLB anymore. | ||
22 | If in doubt, say "N". | ||
23 | |||
14 | endmenu | 24 | endmenu |
diff --git a/arch/parisc/configs/b180_defconfig b/arch/parisc/configs/b180_defconfig index 8819e7e6ae3f..37e98241ce4b 100644 --- a/arch/parisc/configs/b180_defconfig +++ b/arch/parisc/configs/b180_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.14-rc5-pa1 | 3 | # Linux kernel version: 2.6.16-rc1-pa0 |
4 | # Fri Oct 21 23:06:10 2005 | 4 | # Tue Jan 17 08:21:01 2006 |
5 | # | 5 | # |
6 | CONFIG_PARISC=y | 6 | CONFIG_PARISC=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -29,8 +29,6 @@ CONFIG_SYSVIPC=y | |||
29 | # CONFIG_BSD_PROCESS_ACCT is not set | 29 | # CONFIG_BSD_PROCESS_ACCT is not set |
30 | CONFIG_SYSCTL=y | 30 | CONFIG_SYSCTL=y |
31 | # CONFIG_AUDIT is not set | 31 | # CONFIG_AUDIT is not set |
32 | # CONFIG_HOTPLUG is not set | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | CONFIG_IKCONFIG=y | 32 | CONFIG_IKCONFIG=y |
35 | CONFIG_IKCONFIG_PROC=y | 33 | CONFIG_IKCONFIG_PROC=y |
36 | CONFIG_INITRAMFS_SOURCE="" | 34 | CONFIG_INITRAMFS_SOURCE="" |
@@ -38,8 +36,10 @@ CONFIG_INITRAMFS_SOURCE="" | |||
38 | CONFIG_KALLSYMS=y | 36 | CONFIG_KALLSYMS=y |
39 | # CONFIG_KALLSYMS_ALL is not set | 37 | # CONFIG_KALLSYMS_ALL is not set |
40 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 38 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
39 | CONFIG_HOTPLUG=y | ||
41 | CONFIG_PRINTK=y | 40 | CONFIG_PRINTK=y |
42 | CONFIG_BUG=y | 41 | CONFIG_BUG=y |
42 | CONFIG_ELF_CORE=y | ||
43 | CONFIG_BASE_FULL=y | 43 | CONFIG_BASE_FULL=y |
44 | CONFIG_FUTEX=y | 44 | CONFIG_FUTEX=y |
45 | CONFIG_EPOLL=y | 45 | CONFIG_EPOLL=y |
@@ -48,8 +48,10 @@ CONFIG_CC_ALIGN_FUNCTIONS=0 | |||
48 | CONFIG_CC_ALIGN_LABELS=0 | 48 | CONFIG_CC_ALIGN_LABELS=0 |
49 | CONFIG_CC_ALIGN_LOOPS=0 | 49 | CONFIG_CC_ALIGN_LOOPS=0 |
50 | CONFIG_CC_ALIGN_JUMPS=0 | 50 | CONFIG_CC_ALIGN_JUMPS=0 |
51 | CONFIG_SLAB=y | ||
51 | # CONFIG_TINY_SHMEM is not set | 52 | # CONFIG_TINY_SHMEM is not set |
52 | CONFIG_BASE_SMALL=0 | 53 | CONFIG_BASE_SMALL=0 |
54 | # CONFIG_SLOB is not set | ||
53 | 55 | ||
54 | # | 56 | # |
55 | # Loadable module support | 57 | # Loadable module support |
@@ -57,10 +59,28 @@ CONFIG_BASE_SMALL=0 | |||
57 | CONFIG_MODULES=y | 59 | CONFIG_MODULES=y |
58 | # CONFIG_MODULE_UNLOAD is not set | 60 | # CONFIG_MODULE_UNLOAD is not set |
59 | CONFIG_OBSOLETE_MODPARM=y | 61 | CONFIG_OBSOLETE_MODPARM=y |
62 | CONFIG_MODVERSIONS=y | ||
60 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 63 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
61 | # CONFIG_KMOD is not set | 64 | # CONFIG_KMOD is not set |
62 | 65 | ||
63 | # | 66 | # |
67 | # Block layer | ||
68 | # | ||
69 | |||
70 | # | ||
71 | # IO Schedulers | ||
72 | # | ||
73 | CONFIG_IOSCHED_NOOP=y | ||
74 | CONFIG_IOSCHED_AS=y | ||
75 | CONFIG_IOSCHED_DEADLINE=y | ||
76 | CONFIG_IOSCHED_CFQ=y | ||
77 | # CONFIG_DEFAULT_AS is not set | ||
78 | # CONFIG_DEFAULT_DEADLINE is not set | ||
79 | CONFIG_DEFAULT_CFQ=y | ||
80 | # CONFIG_DEFAULT_NOOP is not set | ||
81 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
82 | |||
83 | # | ||
64 | # Processor type and features | 84 | # Processor type and features |
65 | # | 85 | # |
66 | # CONFIG_PA7000 is not set | 86 | # CONFIG_PA7000 is not set |
@@ -77,6 +97,7 @@ CONFIG_HZ=250 | |||
77 | CONFIG_FLATMEM=y | 97 | CONFIG_FLATMEM=y |
78 | CONFIG_FLAT_NODE_MEM_MAP=y | 98 | CONFIG_FLAT_NODE_MEM_MAP=y |
79 | # CONFIG_SPARSEMEM_STATIC is not set | 99 | # CONFIG_SPARSEMEM_STATIC is not set |
100 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
80 | # CONFIG_PREEMPT is not set | 101 | # CONFIG_PREEMPT is not set |
81 | # CONFIG_HPUX is not set | 102 | # CONFIG_HPUX is not set |
82 | 103 | ||
@@ -84,8 +105,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y | |||
84 | # Bus options (PCI, PCMCIA, EISA, GSC, ISA) | 105 | # Bus options (PCI, PCMCIA, EISA, GSC, ISA) |
85 | # | 106 | # |
86 | CONFIG_GSC=y | 107 | CONFIG_GSC=y |
87 | # CONFIG_HPPB is not set | 108 | CONFIG_HPPB=y |
88 | # CONFIG_IOMMU_CCIO is not set | 109 | CONFIG_IOMMU_CCIO=y |
89 | CONFIG_GSC_LASI=y | 110 | CONFIG_GSC_LASI=y |
90 | CONFIG_GSC_WAX=y | 111 | CONFIG_GSC_WAX=y |
91 | CONFIG_EISA=y | 112 | CONFIG_EISA=y |
@@ -165,8 +186,11 @@ CONFIG_IPV6=y | |||
165 | # CONFIG_LLC2 is not set | 186 | # CONFIG_LLC2 is not set |
166 | # CONFIG_IPX is not set | 187 | # CONFIG_IPX is not set |
167 | # CONFIG_ATALK is not set | 188 | # CONFIG_ATALK is not set |
189 | |||
190 | # | ||
191 | # QoS and/or fair queueing | ||
192 | # | ||
168 | # CONFIG_NET_SCHED is not set | 193 | # CONFIG_NET_SCHED is not set |
169 | # CONFIG_NET_CLS_ROUTE is not set | ||
170 | 194 | ||
171 | # | 195 | # |
172 | # Network testing | 196 | # Network testing |
@@ -205,6 +229,7 @@ CONFIG_STANDALONE=y | |||
205 | CONFIG_PARPORT=y | 229 | CONFIG_PARPORT=y |
206 | CONFIG_PARPORT_PC=y | 230 | CONFIG_PARPORT_PC=y |
207 | # CONFIG_PARPORT_SERIAL is not set | 231 | # CONFIG_PARPORT_SERIAL is not set |
232 | CONFIG_PARPORT_NOT_PC=y | ||
208 | CONFIG_PARPORT_GSC=y | 233 | CONFIG_PARPORT_GSC=y |
209 | # CONFIG_PARPORT_1284 is not set | 234 | # CONFIG_PARPORT_1284 is not set |
210 | 235 | ||
@@ -230,14 +255,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16 | |||
230 | CONFIG_CDROM_PKTCDVD=m | 255 | CONFIG_CDROM_PKTCDVD=m |
231 | CONFIG_CDROM_PKTCDVD_BUFFERS=8 | 256 | CONFIG_CDROM_PKTCDVD_BUFFERS=8 |
232 | # CONFIG_CDROM_PKTCDVD_WCACHE is not set | 257 | # CONFIG_CDROM_PKTCDVD_WCACHE is not set |
233 | |||
234 | # | ||
235 | # IO Schedulers | ||
236 | # | ||
237 | CONFIG_IOSCHED_NOOP=y | ||
238 | CONFIG_IOSCHED_AS=y | ||
239 | CONFIG_IOSCHED_DEADLINE=y | ||
240 | CONFIG_IOSCHED_CFQ=y | ||
241 | CONFIG_ATA_OVER_ETH=y | 258 | CONFIG_ATA_OVER_ETH=y |
242 | 259 | ||
243 | # | 260 | # |
@@ -281,6 +298,7 @@ CONFIG_SCSI_SPI_ATTRS=y | |||
281 | # | 298 | # |
282 | # SCSI low-level drivers | 299 | # SCSI low-level drivers |
283 | # | 300 | # |
301 | # CONFIG_ISCSI_TCP is not set | ||
284 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | 302 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set |
285 | # CONFIG_SCSI_3W_9XXX is not set | 303 | # CONFIG_SCSI_3W_9XXX is not set |
286 | # CONFIG_SCSI_ACARD is not set | 304 | # CONFIG_SCSI_ACARD is not set |
@@ -313,21 +331,19 @@ CONFIG_SCSI_SYM53C8XX_2=y | |||
313 | CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 | 331 | CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 |
314 | CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 | 332 | CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 |
315 | CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 | 333 | CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 |
316 | # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set | 334 | CONFIG_SCSI_SYM53C8XX_MMIO=y |
317 | # CONFIG_SCSI_IPR is not set | 335 | # CONFIG_SCSI_IPR is not set |
318 | # CONFIG_SCSI_ZALON is not set | 336 | CONFIG_SCSI_ZALON=y |
337 | CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8 | ||
338 | CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32 | ||
339 | CONFIG_SCSI_NCR53C8XX_SYNC=40 | ||
340 | # CONFIG_SCSI_NCR53C8XX_PROFILE is not set | ||
319 | # CONFIG_SCSI_PAS16 is not set | 341 | # CONFIG_SCSI_PAS16 is not set |
320 | # CONFIG_SCSI_PSI240I is not set | 342 | # CONFIG_SCSI_PSI240I is not set |
321 | # CONFIG_SCSI_QLOGIC_FAS is not set | 343 | # CONFIG_SCSI_QLOGIC_FAS is not set |
322 | # CONFIG_SCSI_QLOGIC_FC is not set | 344 | # CONFIG_SCSI_QLOGIC_FC is not set |
323 | # CONFIG_SCSI_QLOGIC_1280 is not set | 345 | # CONFIG_SCSI_QLOGIC_1280 is not set |
324 | CONFIG_SCSI_QLA2XXX=y | 346 | # CONFIG_SCSI_QLA_FC is not set |
325 | # CONFIG_SCSI_QLA21XX is not set | ||
326 | # CONFIG_SCSI_QLA22XX is not set | ||
327 | # CONFIG_SCSI_QLA2300 is not set | ||
328 | # CONFIG_SCSI_QLA2322 is not set | ||
329 | # CONFIG_SCSI_QLA6312 is not set | ||
330 | # CONFIG_SCSI_QLA24XX is not set | ||
331 | # CONFIG_SCSI_LPFC is not set | 347 | # CONFIG_SCSI_LPFC is not set |
332 | # CONFIG_SCSI_SIM710 is not set | 348 | # CONFIG_SCSI_SIM710 is not set |
333 | # CONFIG_SCSI_SYM53C416 is not set | 349 | # CONFIG_SCSI_SYM53C416 is not set |
@@ -397,7 +413,7 @@ CONFIG_NETDEVICES=y | |||
397 | # | 413 | # |
398 | CONFIG_NET_ETHERNET=y | 414 | CONFIG_NET_ETHERNET=y |
399 | # CONFIG_MII is not set | 415 | # CONFIG_MII is not set |
400 | # CONFIG_LASI_82596 is not set | 416 | CONFIG_LASI_82596=y |
401 | # CONFIG_HAPPYMEAL is not set | 417 | # CONFIG_HAPPYMEAL is not set |
402 | # CONFIG_SUNGEM is not set | 418 | # CONFIG_SUNGEM is not set |
403 | # CONFIG_CASSINI is not set | 419 | # CONFIG_CASSINI is not set |
@@ -464,6 +480,7 @@ CONFIG_NET_RADIO=y | |||
464 | # Wireless 802.11b ISA/PCI cards support | 480 | # Wireless 802.11b ISA/PCI cards support |
465 | # | 481 | # |
466 | # CONFIG_HERMES is not set | 482 | # CONFIG_HERMES is not set |
483 | # CONFIG_ATMEL is not set | ||
467 | 484 | ||
468 | # | 485 | # |
469 | # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support | 486 | # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support |
@@ -527,7 +544,7 @@ CONFIG_KEYBOARD_ATKBD_HP_KEYCODES=y | |||
527 | # CONFIG_KEYBOARD_XTKBD is not set | 544 | # CONFIG_KEYBOARD_XTKBD is not set |
528 | # CONFIG_KEYBOARD_NEWTON is not set | 545 | # CONFIG_KEYBOARD_NEWTON is not set |
529 | # CONFIG_KEYBOARD_HIL_OLD is not set | 546 | # CONFIG_KEYBOARD_HIL_OLD is not set |
530 | # CONFIG_KEYBOARD_HIL is not set | 547 | CONFIG_KEYBOARD_HIL=y |
531 | CONFIG_INPUT_MOUSE=y | 548 | CONFIG_INPUT_MOUSE=y |
532 | CONFIG_MOUSE_PS2=y | 549 | CONFIG_MOUSE_PS2=y |
533 | # CONFIG_MOUSE_SERIAL is not set | 550 | # CONFIG_MOUSE_SERIAL is not set |
@@ -535,7 +552,7 @@ CONFIG_MOUSE_PS2=y | |||
535 | # CONFIG_MOUSE_LOGIBM is not set | 552 | # CONFIG_MOUSE_LOGIBM is not set |
536 | # CONFIG_MOUSE_PC110PAD is not set | 553 | # CONFIG_MOUSE_PC110PAD is not set |
537 | # CONFIG_MOUSE_VSXXXAA is not set | 554 | # CONFIG_MOUSE_VSXXXAA is not set |
538 | # CONFIG_MOUSE_HIL is not set | 555 | CONFIG_MOUSE_HIL=y |
539 | # CONFIG_INPUT_JOYSTICK is not set | 556 | # CONFIG_INPUT_JOYSTICK is not set |
540 | # CONFIG_INPUT_TOUCHSCREEN is not set | 557 | # CONFIG_INPUT_TOUCHSCREEN is not set |
541 | CONFIG_INPUT_MISC=y | 558 | CONFIG_INPUT_MISC=y |
@@ -549,7 +566,8 @@ CONFIG_SERIO=y | |||
549 | # CONFIG_SERIO_SERPORT is not set | 566 | # CONFIG_SERIO_SERPORT is not set |
550 | # CONFIG_SERIO_PARKBD is not set | 567 | # CONFIG_SERIO_PARKBD is not set |
551 | CONFIG_SERIO_GSCPS2=y | 568 | CONFIG_SERIO_GSCPS2=y |
552 | # CONFIG_HP_SDC is not set | 569 | CONFIG_HP_SDC=y |
570 | CONFIG_HIL_MLC=y | ||
553 | # CONFIG_SERIO_PCIPS2 is not set | 571 | # CONFIG_SERIO_PCIPS2 is not set |
554 | CONFIG_SERIO_LIBPS2=y | 572 | CONFIG_SERIO_LIBPS2=y |
555 | # CONFIG_SERIO_RAW is not set | 573 | # CONFIG_SERIO_RAW is not set |
@@ -569,6 +587,7 @@ CONFIG_HW_CONSOLE=y | |||
569 | CONFIG_SERIAL_8250=y | 587 | CONFIG_SERIAL_8250=y |
570 | CONFIG_SERIAL_8250_CONSOLE=y | 588 | CONFIG_SERIAL_8250_CONSOLE=y |
571 | CONFIG_SERIAL_8250_NR_UARTS=13 | 589 | CONFIG_SERIAL_8250_NR_UARTS=13 |
590 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
572 | CONFIG_SERIAL_8250_EXTENDED=y | 591 | CONFIG_SERIAL_8250_EXTENDED=y |
573 | CONFIG_SERIAL_8250_MANY_PORTS=y | 592 | CONFIG_SERIAL_8250_MANY_PORTS=y |
574 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 593 | CONFIG_SERIAL_8250_SHARE_IRQ=y |
@@ -582,11 +601,10 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y | |||
582 | # | 601 | # |
583 | # Non-8250 serial port support | 602 | # Non-8250 serial port support |
584 | # | 603 | # |
585 | # CONFIG_SERIAL_MUX is not set | 604 | CONFIG_SERIAL_MUX=y |
586 | # CONFIG_PDC_CONSOLE is not set | 605 | CONFIG_SERIAL_MUX_CONSOLE=y |
587 | CONFIG_SERIAL_CORE=y | 606 | CONFIG_SERIAL_CORE=y |
588 | CONFIG_SERIAL_CORE_CONSOLE=y | 607 | CONFIG_SERIAL_CORE_CONSOLE=y |
589 | # CONFIG_SERIAL_JSM is not set | ||
590 | CONFIG_UNIX98_PTYS=y | 608 | CONFIG_UNIX98_PTYS=y |
591 | CONFIG_LEGACY_PTYS=y | 609 | CONFIG_LEGACY_PTYS=y |
592 | CONFIG_LEGACY_PTY_COUNT=256 | 610 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -626,6 +644,12 @@ CONFIG_GEN_RTC=y | |||
626 | # CONFIG_I2C is not set | 644 | # CONFIG_I2C is not set |
627 | 645 | ||
628 | # | 646 | # |
647 | # SPI support | ||
648 | # | ||
649 | # CONFIG_SPI is not set | ||
650 | # CONFIG_SPI_MASTER is not set | ||
651 | |||
652 | # | ||
629 | # Dallas's 1-wire bus | 653 | # Dallas's 1-wire bus |
630 | # | 654 | # |
631 | # CONFIG_W1 is not set | 655 | # CONFIG_W1 is not set |
@@ -661,7 +685,6 @@ CONFIG_FB=y | |||
661 | CONFIG_FB_CFB_FILLRECT=y | 685 | CONFIG_FB_CFB_FILLRECT=y |
662 | CONFIG_FB_CFB_COPYAREA=y | 686 | CONFIG_FB_CFB_COPYAREA=y |
663 | CONFIG_FB_CFB_IMAGEBLIT=y | 687 | CONFIG_FB_CFB_IMAGEBLIT=y |
664 | CONFIG_FB_SOFT_CURSOR=y | ||
665 | # CONFIG_FB_MACMODES is not set | 688 | # CONFIG_FB_MACMODES is not set |
666 | # CONFIG_FB_MODE_HELPERS is not set | 689 | # CONFIG_FB_MODE_HELPERS is not set |
667 | # CONFIG_FB_TILEBLITTING is not set | 690 | # CONFIG_FB_TILEBLITTING is not set |
@@ -671,6 +694,7 @@ CONFIG_FB_SOFT_CURSOR=y | |||
671 | # CONFIG_FB_ASILIANT is not set | 694 | # CONFIG_FB_ASILIANT is not set |
672 | # CONFIG_FB_IMSTT is not set | 695 | # CONFIG_FB_IMSTT is not set |
673 | CONFIG_FB_STI=y | 696 | CONFIG_FB_STI=y |
697 | # CONFIG_FB_S1D13XXX is not set | ||
674 | # CONFIG_FB_NVIDIA is not set | 698 | # CONFIG_FB_NVIDIA is not set |
675 | # CONFIG_FB_RIVA is not set | 699 | # CONFIG_FB_RIVA is not set |
676 | # CONFIG_FB_MATROX is not set | 700 | # CONFIG_FB_MATROX is not set |
@@ -683,9 +707,7 @@ CONFIG_FB_STI=y | |||
683 | # CONFIG_FB_KYRO is not set | 707 | # CONFIG_FB_KYRO is not set |
684 | # CONFIG_FB_3DFX is not set | 708 | # CONFIG_FB_3DFX is not set |
685 | # CONFIG_FB_VOODOO1 is not set | 709 | # CONFIG_FB_VOODOO1 is not set |
686 | # CONFIG_FB_CYBLA is not set | ||
687 | # CONFIG_FB_TRIDENT is not set | 710 | # CONFIG_FB_TRIDENT is not set |
688 | # CONFIG_FB_S1D13XXX is not set | ||
689 | # CONFIG_FB_VIRTUAL is not set | 711 | # CONFIG_FB_VIRTUAL is not set |
690 | 712 | ||
691 | # | 713 | # |
@@ -695,6 +717,7 @@ CONFIG_DUMMY_CONSOLE=y | |||
695 | CONFIG_DUMMY_CONSOLE_COLUMNS=160 | 717 | CONFIG_DUMMY_CONSOLE_COLUMNS=160 |
696 | CONFIG_DUMMY_CONSOLE_ROWS=64 | 718 | CONFIG_DUMMY_CONSOLE_ROWS=64 |
697 | CONFIG_FRAMEBUFFER_CONSOLE=y | 719 | CONFIG_FRAMEBUFFER_CONSOLE=y |
720 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | ||
698 | CONFIG_STI_CONSOLE=y | 721 | CONFIG_STI_CONSOLE=y |
699 | # CONFIG_FONTS is not set | 722 | # CONFIG_FONTS is not set |
700 | CONFIG_FONT_8x8=y | 723 | CONFIG_FONT_8x8=y |
@@ -713,7 +736,85 @@ CONFIG_LOGO_PARISC_CLUT224=y | |||
713 | # | 736 | # |
714 | # Sound | 737 | # Sound |
715 | # | 738 | # |
716 | # CONFIG_SOUND is not set | 739 | CONFIG_SOUND=y |
740 | |||
741 | # | ||
742 | # Advanced Linux Sound Architecture | ||
743 | # | ||
744 | CONFIG_SND=y | ||
745 | CONFIG_SND_TIMER=y | ||
746 | CONFIG_SND_PCM=y | ||
747 | CONFIG_SND_SEQUENCER=y | ||
748 | # CONFIG_SND_SEQ_DUMMY is not set | ||
749 | CONFIG_SND_OSSEMUL=y | ||
750 | CONFIG_SND_MIXER_OSS=y | ||
751 | CONFIG_SND_PCM_OSS=y | ||
752 | CONFIG_SND_SEQUENCER_OSS=y | ||
753 | CONFIG_SND_SUPPORT_OLD_API=y | ||
754 | # CONFIG_SND_VERBOSE_PRINTK is not set | ||
755 | # CONFIG_SND_DEBUG is not set | ||
756 | |||
757 | # | ||
758 | # Generic devices | ||
759 | # | ||
760 | # CONFIG_SND_DUMMY is not set | ||
761 | # CONFIG_SND_VIRMIDI is not set | ||
762 | # CONFIG_SND_MTPAV is not set | ||
763 | # CONFIG_SND_SERIAL_U16550 is not set | ||
764 | # CONFIG_SND_MPU401 is not set | ||
765 | |||
766 | # | ||
767 | # PCI devices | ||
768 | # | ||
769 | # CONFIG_SND_AD1889 is not set | ||
770 | # CONFIG_SND_ALI5451 is not set | ||
771 | # CONFIG_SND_ATIIXP is not set | ||
772 | # CONFIG_SND_ATIIXP_MODEM is not set | ||
773 | # CONFIG_SND_AU8810 is not set | ||
774 | # CONFIG_SND_AU8820 is not set | ||
775 | # CONFIG_SND_AU8830 is not set | ||
776 | # CONFIG_SND_BT87X is not set | ||
777 | # CONFIG_SND_CA0106 is not set | ||
778 | # CONFIG_SND_CMIPCI is not set | ||
779 | # CONFIG_SND_CS4281 is not set | ||
780 | # CONFIG_SND_CS46XX is not set | ||
781 | # CONFIG_SND_EMU10K1 is not set | ||
782 | # CONFIG_SND_EMU10K1X is not set | ||
783 | # CONFIG_SND_ENS1370 is not set | ||
784 | # CONFIG_SND_ENS1371 is not set | ||
785 | # CONFIG_SND_ES1938 is not set | ||
786 | # CONFIG_SND_ES1968 is not set | ||
787 | # CONFIG_SND_FM801 is not set | ||
788 | # CONFIG_SND_HDA_INTEL is not set | ||
789 | # CONFIG_SND_HDSP is not set | ||
790 | # CONFIG_SND_HDSPM is not set | ||
791 | # CONFIG_SND_ICE1712 is not set | ||
792 | # CONFIG_SND_ICE1724 is not set | ||
793 | # CONFIG_SND_INTEL8X0 is not set | ||
794 | # CONFIG_SND_KORG1212 is not set | ||
795 | # CONFIG_SND_MAESTRO3 is not set | ||
796 | # CONFIG_SND_MIXART is not set | ||
797 | # CONFIG_SND_NM256 is not set | ||
798 | # CONFIG_SND_PCXHR is not set | ||
799 | # CONFIG_SND_RME32 is not set | ||
800 | # CONFIG_SND_RME96 is not set | ||
801 | # CONFIG_SND_RME9652 is not set | ||
802 | # CONFIG_SND_SONICVIBES is not set | ||
803 | # CONFIG_SND_TRIDENT is not set | ||
804 | # CONFIG_SND_VIA82XX is not set | ||
805 | # CONFIG_SND_VIA82XX_MODEM is not set | ||
806 | # CONFIG_SND_VX222 is not set | ||
807 | # CONFIG_SND_YMFPCI is not set | ||
808 | |||
809 | # | ||
810 | # GSC devices | ||
811 | # | ||
812 | CONFIG_SND_HARMONY=y | ||
813 | |||
814 | # | ||
815 | # Open Sound System | ||
816 | # | ||
817 | # CONFIG_SOUND_PRIME is not set | ||
717 | 818 | ||
718 | # | 819 | # |
719 | # USB support | 820 | # USB support |
@@ -723,6 +824,10 @@ CONFIG_USB_ARCH_HAS_OHCI=y | |||
723 | # CONFIG_USB is not set | 824 | # CONFIG_USB is not set |
724 | 825 | ||
725 | # | 826 | # |
827 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
828 | # | ||
829 | |||
830 | # | ||
726 | # USB Gadget Support | 831 | # USB Gadget Support |
727 | # | 832 | # |
728 | # CONFIG_USB_GADGET is not set | 833 | # CONFIG_USB_GADGET is not set |
@@ -877,18 +982,23 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
877 | # Kernel hacking | 982 | # Kernel hacking |
878 | # | 983 | # |
879 | # CONFIG_PRINTK_TIME is not set | 984 | # CONFIG_PRINTK_TIME is not set |
880 | CONFIG_DEBUG_KERNEL=y | ||
881 | CONFIG_MAGIC_SYSRQ=y | 985 | CONFIG_MAGIC_SYSRQ=y |
986 | CONFIG_DEBUG_KERNEL=y | ||
882 | CONFIG_LOG_BUF_SHIFT=16 | 987 | CONFIG_LOG_BUF_SHIFT=16 |
883 | CONFIG_DETECT_SOFTLOCKUP=y | 988 | CONFIG_DETECT_SOFTLOCKUP=y |
884 | # CONFIG_SCHEDSTATS is not set | 989 | # CONFIG_SCHEDSTATS is not set |
885 | # CONFIG_DEBUG_SLAB is not set | 990 | # CONFIG_DEBUG_SLAB is not set |
991 | # CONFIG_DEBUG_MUTEXES is not set | ||
886 | # CONFIG_DEBUG_SPINLOCK is not set | 992 | # CONFIG_DEBUG_SPINLOCK is not set |
887 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 993 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
888 | # CONFIG_DEBUG_KOBJECT is not set | 994 | # CONFIG_DEBUG_KOBJECT is not set |
889 | # CONFIG_DEBUG_INFO is not set | 995 | # CONFIG_DEBUG_INFO is not set |
890 | # CONFIG_DEBUG_IOREMAP is not set | 996 | # CONFIG_DEBUG_IOREMAP is not set |
891 | # CONFIG_DEBUG_FS is not set | 997 | # CONFIG_DEBUG_FS is not set |
998 | # CONFIG_DEBUG_VM is not set | ||
999 | CONFIG_FORCED_INLINING=y | ||
1000 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1001 | # CONFIG_DEBUG_RODATA is not set | ||
892 | 1002 | ||
893 | # | 1003 | # |
894 | # Security options | 1004 | # Security options |
diff --git a/arch/parisc/hpux/entry_hpux.S b/arch/parisc/hpux/entry_hpux.S index fa9bf38787e7..31c8cccfba31 100644 --- a/arch/parisc/hpux/entry_hpux.S +++ b/arch/parisc/hpux/entry_hpux.S | |||
@@ -22,10 +22,9 @@ | |||
22 | #include <linux/linkage.h> | 22 | #include <linux/linkage.h> |
23 | #include <asm/unistd.h> | 23 | #include <asm/unistd.h> |
24 | 24 | ||
25 | .text | ||
26 | |||
27 | #define ENTRY_NAME(_name_) .word _name_ | 25 | #define ENTRY_NAME(_name_) .word _name_ |
28 | 26 | ||
27 | .section .rodata,"a" | ||
29 | .align 4 | 28 | .align 4 |
30 | .export hpux_call_table | 29 | .export hpux_call_table |
31 | .import hpux_unimplemented_wrapper | 30 | .import hpux_unimplemented_wrapper |
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index 2d804e2d16d1..3d569a485a1a 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c | |||
@@ -408,11 +408,10 @@ static void setup_bus_id(struct parisc_device *padev) | |||
408 | 408 | ||
409 | struct parisc_device * create_tree_node(char id, struct device *parent) | 409 | struct parisc_device * create_tree_node(char id, struct device *parent) |
410 | { | 410 | { |
411 | struct parisc_device *dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 411 | struct parisc_device *dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
412 | if (!dev) | 412 | if (!dev) |
413 | return NULL; | 413 | return NULL; |
414 | 414 | ||
415 | memset(dev, 0, sizeof(*dev)); | ||
416 | dev->hw_path = id; | 415 | dev->hw_path = id; |
417 | dev->id.hw_type = HPHW_FAULTY; | 416 | dev->id.hw_type = HPHW_FAULTY; |
418 | 417 | ||
diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c index f40a777dd388..1d00c365f2b1 100644 --- a/arch/parisc/kernel/parisc_ksyms.c +++ b/arch/parisc/kernel/parisc_ksyms.c | |||
@@ -48,9 +48,6 @@ EXPORT_SYMBOL(strrchr); | |||
48 | EXPORT_SYMBOL(strstr); | 48 | EXPORT_SYMBOL(strstr); |
49 | EXPORT_SYMBOL(strpbrk); | 49 | EXPORT_SYMBOL(strpbrk); |
50 | 50 | ||
51 | #include <linux/pm.h> | ||
52 | EXPORT_SYMBOL(pm_power_off); | ||
53 | |||
54 | #include <asm/atomic.h> | 51 | #include <asm/atomic.h> |
55 | EXPORT_SYMBOL(__xchg8); | 52 | EXPORT_SYMBOL(__xchg8); |
56 | EXPORT_SYMBOL(__xchg32); | 53 | EXPORT_SYMBOL(__xchg32); |
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c index 88cba49c5301..79c7db2705fd 100644 --- a/arch/parisc/kernel/pci.c +++ b/arch/parisc/kernel/pci.c | |||
@@ -47,18 +47,17 @@ | |||
47 | * this makes the boot time much longer than necessary. | 47 | * this makes the boot time much longer than necessary. |
48 | * 20ms seems to work for all the HP PCI implementations to date. | 48 | * 20ms seems to work for all the HP PCI implementations to date. |
49 | * | 49 | * |
50 | * XXX: turn into a #defined constant in <asm/pci.h> ? | 50 | * #define pci_post_reset_delay 50 |
51 | */ | 51 | */ |
52 | int pci_post_reset_delay = 50; | ||
53 | 52 | ||
54 | struct pci_port_ops *pci_port; | 53 | struct pci_port_ops *pci_port __read_mostly; |
55 | struct pci_bios_ops *pci_bios; | 54 | struct pci_bios_ops *pci_bios __read_mostly; |
56 | 55 | ||
57 | int pci_hba_count = 0; | 56 | static int pci_hba_count __read_mostly; |
58 | 57 | ||
59 | /* parisc_pci_hba used by pci_port->in/out() ops to lookup bus data. */ | 58 | /* parisc_pci_hba used by pci_port->in/out() ops to lookup bus data. */ |
60 | #define PCI_HBA_MAX 32 | 59 | #define PCI_HBA_MAX 32 |
61 | struct pci_hba_data *parisc_pci_hba[PCI_HBA_MAX]; | 60 | static struct pci_hba_data *parisc_pci_hba[PCI_HBA_MAX] __read_mostly; |
62 | 61 | ||
63 | 62 | ||
64 | /******************************************************************** | 63 | /******************************************************************** |
@@ -259,8 +258,10 @@ void __devinit pcibios_resource_to_bus(struct pci_dev *dev, | |||
259 | void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 258 | void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
260 | struct pci_bus_region *region) | 259 | struct pci_bus_region *region) |
261 | { | 260 | { |
261 | #ifdef CONFIG_64BIT | ||
262 | struct pci_bus *bus = dev->bus; | 262 | struct pci_bus *bus = dev->bus; |
263 | struct pci_hba_data *hba = HBA_DATA(bus->bridge->platform_data); | 263 | struct pci_hba_data *hba = HBA_DATA(bus->bridge->platform_data); |
264 | #endif | ||
264 | 265 | ||
265 | if (res->flags & IORESOURCE_MEM) { | 266 | if (res->flags & IORESOURCE_MEM) { |
266 | res->start = PCI_HOST_ADDR(hba, region->start); | 267 | res->start = PCI_HOST_ADDR(hba, region->start); |
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c index 11d406cd0b3e..53f861c82f93 100644 --- a/arch/parisc/kernel/perf.c +++ b/arch/parisc/kernel/perf.c | |||
@@ -68,20 +68,20 @@ struct rdr_tbl_ent { | |||
68 | }; | 68 | }; |
69 | 69 | ||
70 | static int perf_processor_interface __read_mostly = UNKNOWN_INTF; | 70 | static int perf_processor_interface __read_mostly = UNKNOWN_INTF; |
71 | static int perf_enabled __read_mostly = 0; | 71 | static int perf_enabled __read_mostly; |
72 | static spinlock_t perf_lock; | 72 | static spinlock_t perf_lock; |
73 | struct parisc_device *cpu_device __read_mostly = NULL; | 73 | struct parisc_device *cpu_device __read_mostly; |
74 | 74 | ||
75 | /* RDRs to write for PCX-W */ | 75 | /* RDRs to write for PCX-W */ |
76 | static int perf_rdrs_W[] = | 76 | static const int perf_rdrs_W[] = |
77 | { 0, 1, 4, 5, 6, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, -1 }; | 77 | { 0, 1, 4, 5, 6, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, -1 }; |
78 | 78 | ||
79 | /* RDRs to write for PCX-U */ | 79 | /* RDRs to write for PCX-U */ |
80 | static int perf_rdrs_U[] = | 80 | static const int perf_rdrs_U[] = |
81 | { 0, 1, 4, 5, 6, 7, 16, 17, 18, 20, 21, 22, 23, 24, 25, -1 }; | 81 | { 0, 1, 4, 5, 6, 7, 16, 17, 18, 20, 21, 22, 23, 24, 25, -1 }; |
82 | 82 | ||
83 | /* RDR register descriptions for PCX-W */ | 83 | /* RDR register descriptions for PCX-W */ |
84 | static struct rdr_tbl_ent perf_rdr_tbl_W[] = { | 84 | static const struct rdr_tbl_ent perf_rdr_tbl_W[] = { |
85 | { 19, 1, 8 }, /* RDR 0 */ | 85 | { 19, 1, 8 }, /* RDR 0 */ |
86 | { 16, 1, 16 }, /* RDR 1 */ | 86 | { 16, 1, 16 }, /* RDR 1 */ |
87 | { 72, 2, 0 }, /* RDR 2 */ | 87 | { 72, 2, 0 }, /* RDR 2 */ |
@@ -117,7 +117,7 @@ static struct rdr_tbl_ent perf_rdr_tbl_W[] = { | |||
117 | }; | 117 | }; |
118 | 118 | ||
119 | /* RDR register descriptions for PCX-U */ | 119 | /* RDR register descriptions for PCX-U */ |
120 | static struct rdr_tbl_ent perf_rdr_tbl_U[] = { | 120 | static const struct rdr_tbl_ent perf_rdr_tbl_U[] = { |
121 | { 19, 1, 8 }, /* RDR 0 */ | 121 | { 19, 1, 8 }, /* RDR 0 */ |
122 | { 32, 1, 16 }, /* RDR 1 */ | 122 | { 32, 1, 16 }, /* RDR 1 */ |
123 | { 20, 1, 0 }, /* RDR 2 */ | 123 | { 20, 1, 0 }, /* RDR 2 */ |
@@ -156,7 +156,7 @@ static struct rdr_tbl_ent perf_rdr_tbl_U[] = { | |||
156 | * A non-zero write_control in the above tables is a byte offset into | 156 | * A non-zero write_control in the above tables is a byte offset into |
157 | * this array. | 157 | * this array. |
158 | */ | 158 | */ |
159 | static uint64_t perf_bitmasks[] = { | 159 | static const uint64_t perf_bitmasks[] = { |
160 | 0x0000000000000000ul, /* first dbl word must be zero */ | 160 | 0x0000000000000000ul, /* first dbl word must be zero */ |
161 | 0xfdffe00000000000ul, /* RDR0 bitmask */ | 161 | 0xfdffe00000000000ul, /* RDR0 bitmask */ |
162 | 0x003f000000000000ul, /* RDR1 bitmask */ | 162 | 0x003f000000000000ul, /* RDR1 bitmask */ |
@@ -173,7 +173,7 @@ static uint64_t perf_bitmasks[] = { | |||
173 | * Write control bitmasks for Pa-8700 processor given | 173 | * Write control bitmasks for Pa-8700 processor given |
174 | * somethings have changed slightly. | 174 | * somethings have changed slightly. |
175 | */ | 175 | */ |
176 | static uint64_t perf_bitmasks_piranha[] = { | 176 | static const uint64_t perf_bitmasks_piranha[] = { |
177 | 0x0000000000000000ul, /* first dbl word must be zero */ | 177 | 0x0000000000000000ul, /* first dbl word must be zero */ |
178 | 0xfdffe00000000000ul, /* RDR0 bitmask */ | 178 | 0xfdffe00000000000ul, /* RDR0 bitmask */ |
179 | 0x003f000000000000ul, /* RDR1 bitmask */ | 179 | 0x003f000000000000ul, /* RDR1 bitmask */ |
@@ -186,7 +186,7 @@ static uint64_t perf_bitmasks_piranha[] = { | |||
186 | 0xfffc000000000000ul | 186 | 0xfffc000000000000ul |
187 | }; | 187 | }; |
188 | 188 | ||
189 | static uint64_t *bitmask_array; /* array of bitmasks to use */ | 189 | static const uint64_t *bitmask_array; /* array of bitmasks to use */ |
190 | 190 | ||
191 | /****************************************************************************** | 191 | /****************************************************************************** |
192 | * Function Prototypes | 192 | * Function Prototypes |
@@ -200,7 +200,7 @@ static ssize_t perf_write(struct file *file, const char __user *buf, size_t coun | |||
200 | static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg); | 200 | static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
201 | static void perf_start_counters(void); | 201 | static void perf_start_counters(void); |
202 | static int perf_stop_counters(uint32_t *raddr); | 202 | static int perf_stop_counters(uint32_t *raddr); |
203 | static struct rdr_tbl_ent * perf_rdr_get_entry(uint32_t rdr_num); | 203 | static const struct rdr_tbl_ent * perf_rdr_get_entry(uint32_t rdr_num); |
204 | static int perf_rdr_read_ubuf(uint32_t rdr_num, uint64_t *buffer); | 204 | static int perf_rdr_read_ubuf(uint32_t rdr_num, uint64_t *buffer); |
205 | static int perf_rdr_clear(uint32_t rdr_num); | 205 | static int perf_rdr_clear(uint32_t rdr_num); |
206 | static int perf_write_image(uint64_t *memaddr); | 206 | static int perf_write_image(uint64_t *memaddr); |
@@ -444,7 +444,6 @@ static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
444 | uint32_t raddr[4]; | 444 | uint32_t raddr[4]; |
445 | int error = 0; | 445 | int error = 0; |
446 | 446 | ||
447 | lock_kernel(); | ||
448 | switch (cmd) { | 447 | switch (cmd) { |
449 | 448 | ||
450 | case PA_PERF_ON: | 449 | case PA_PERF_ON: |
@@ -477,8 +476,6 @@ static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
477 | error = -ENOTTY; | 476 | error = -ENOTTY; |
478 | } | 477 | } |
479 | 478 | ||
480 | unlock_kernel(); | ||
481 | |||
482 | return error; | 479 | return error; |
483 | } | 480 | } |
484 | 481 | ||
@@ -655,7 +652,7 @@ static int perf_stop_counters(uint32_t *raddr) | |||
655 | * Retrieve a pointer to the description of what this | 652 | * Retrieve a pointer to the description of what this |
656 | * RDR contains. | 653 | * RDR contains. |
657 | */ | 654 | */ |
658 | static struct rdr_tbl_ent * perf_rdr_get_entry(uint32_t rdr_num) | 655 | static const struct rdr_tbl_ent * perf_rdr_get_entry(uint32_t rdr_num) |
659 | { | 656 | { |
660 | if (perf_processor_interface == ONYX_INTF) { | 657 | if (perf_processor_interface == ONYX_INTF) { |
661 | return &perf_rdr_tbl_U[rdr_num]; | 658 | return &perf_rdr_tbl_U[rdr_num]; |
@@ -673,7 +670,7 @@ static int perf_rdr_read_ubuf(uint32_t rdr_num, uint64_t *buffer) | |||
673 | { | 670 | { |
674 | uint64_t data, data_mask = 0; | 671 | uint64_t data, data_mask = 0; |
675 | uint32_t width, xbits, i; | 672 | uint32_t width, xbits, i; |
676 | struct rdr_tbl_ent *tentry; | 673 | const struct rdr_tbl_ent *tentry; |
677 | 674 | ||
678 | tentry = perf_rdr_get_entry(rdr_num); | 675 | tentry = perf_rdr_get_entry(rdr_num); |
679 | if ((width = tentry->width) == 0) | 676 | if ((width = tentry->width) == 0) |
@@ -721,7 +718,7 @@ static int perf_rdr_read_ubuf(uint32_t rdr_num, uint64_t *buffer) | |||
721 | */ | 718 | */ |
722 | static int perf_rdr_clear(uint32_t rdr_num) | 719 | static int perf_rdr_clear(uint32_t rdr_num) |
723 | { | 720 | { |
724 | struct rdr_tbl_ent *tentry; | 721 | const struct rdr_tbl_ent *tentry; |
725 | int32_t i; | 722 | int32_t i; |
726 | 723 | ||
727 | tentry = perf_rdr_get_entry(rdr_num); | 724 | tentry = perf_rdr_get_entry(rdr_num); |
@@ -753,10 +750,11 @@ static int perf_write_image(uint64_t *memaddr) | |||
753 | uint64_t buffer[MAX_RDR_WORDS]; | 750 | uint64_t buffer[MAX_RDR_WORDS]; |
754 | uint64_t *bptr; | 751 | uint64_t *bptr; |
755 | uint32_t dwords; | 752 | uint32_t dwords; |
756 | uint32_t *intrigue_rdr; | 753 | const uint32_t *intrigue_rdr; |
757 | uint64_t *intrigue_bitmask, tmp64; | 754 | const uint64_t *intrigue_bitmask; |
755 | uint64_t tmp64; | ||
758 | void __iomem *runway; | 756 | void __iomem *runway; |
759 | struct rdr_tbl_ent *tentry; | 757 | const struct rdr_tbl_ent *tentry; |
760 | int i; | 758 | int i; |
761 | 759 | ||
762 | /* Clear out counters */ | 760 | /* Clear out counters */ |
@@ -830,7 +828,7 @@ static int perf_write_image(uint64_t *memaddr) | |||
830 | */ | 828 | */ |
831 | static void perf_rdr_write(uint32_t rdr_num, uint64_t *buffer) | 829 | static void perf_rdr_write(uint32_t rdr_num, uint64_t *buffer) |
832 | { | 830 | { |
833 | struct rdr_tbl_ent *tentry; | 831 | const struct rdr_tbl_ent *tentry; |
834 | int32_t i; | 832 | int32_t i; |
835 | 833 | ||
836 | printk("perf_rdr_write\n"); | 834 | printk("perf_rdr_write\n"); |
diff --git a/arch/parisc/kernel/perf_images.h b/arch/parisc/kernel/perf_images.h index d9562fe3f75c..7fef9644df47 100644 --- a/arch/parisc/kernel/perf_images.h +++ b/arch/parisc/kernel/perf_images.h | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #define PCXU_IMAGE_SIZE 584 | 26 | #define PCXU_IMAGE_SIZE 584 |
27 | 27 | ||
28 | static uint32_t onyx_images[][PCXU_IMAGE_SIZE/sizeof(uint32_t)] = { | 28 | static uint32_t onyx_images[][PCXU_IMAGE_SIZE/sizeof(uint32_t)] __read_mostly = { |
29 | /* | 29 | /* |
30 | * CPI: | 30 | * CPI: |
31 | * | 31 | * |
@@ -2093,7 +2093,7 @@ static uint32_t onyx_images[][PCXU_IMAGE_SIZE/sizeof(uint32_t)] = { | |||
2093 | }; | 2093 | }; |
2094 | #define PCXW_IMAGE_SIZE 576 | 2094 | #define PCXW_IMAGE_SIZE 576 |
2095 | 2095 | ||
2096 | static uint32_t cuda_images[][PCXW_IMAGE_SIZE/sizeof(uint32_t)] = { | 2096 | static uint32_t cuda_images[][PCXW_IMAGE_SIZE/sizeof(uint32_t)] __read_mostly = { |
2097 | /* | 2097 | /* |
2098 | * CPI: FROM CPI.IDF (Image 0) | 2098 | * CPI: FROM CPI.IDF (Image 0) |
2099 | * | 2099 | * |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 5da41677e70b..e8dea4177113 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -54,27 +54,6 @@ | |||
54 | #include <asm/uaccess.h> | 54 | #include <asm/uaccess.h> |
55 | #include <asm/unwind.h> | 55 | #include <asm/unwind.h> |
56 | 56 | ||
57 | static int hlt_counter __read_mostly; | ||
58 | |||
59 | /* | ||
60 | * Power off function, if any | ||
61 | */ | ||
62 | void (*pm_power_off)(void); | ||
63 | |||
64 | void disable_hlt(void) | ||
65 | { | ||
66 | hlt_counter++; | ||
67 | } | ||
68 | |||
69 | EXPORT_SYMBOL(disable_hlt); | ||
70 | |||
71 | void enable_hlt(void) | ||
72 | { | ||
73 | hlt_counter--; | ||
74 | } | ||
75 | |||
76 | EXPORT_SYMBOL(enable_hlt); | ||
77 | |||
78 | void default_idle(void) | 57 | void default_idle(void) |
79 | { | 58 | { |
80 | barrier(); | 59 | barrier(); |
@@ -102,12 +81,7 @@ void cpu_idle(void) | |||
102 | } | 81 | } |
103 | 82 | ||
104 | 83 | ||
105 | #ifdef __LP64__ | 84 | #define COMMAND_GLOBAL F_EXTEND(0xfffe0030) |
106 | #define COMMAND_GLOBAL 0xfffffffffffe0030UL | ||
107 | #else | ||
108 | #define COMMAND_GLOBAL 0xfffe0030 | ||
109 | #endif | ||
110 | |||
111 | #define CMD_RESET 5 /* reset any module */ | 85 | #define CMD_RESET 5 /* reset any module */ |
112 | 86 | ||
113 | /* | 87 | /* |
@@ -162,6 +136,7 @@ void machine_halt(void) | |||
162 | */ | 136 | */ |
163 | } | 137 | } |
164 | 138 | ||
139 | void (*chassis_power_off)(void); | ||
165 | 140 | ||
166 | /* | 141 | /* |
167 | * This routine is called from sys_reboot to actually turn off the | 142 | * This routine is called from sys_reboot to actually turn off the |
@@ -170,8 +145,8 @@ void machine_halt(void) | |||
170 | void machine_power_off(void) | 145 | void machine_power_off(void) |
171 | { | 146 | { |
172 | /* If there is a registered power off handler, call it. */ | 147 | /* If there is a registered power off handler, call it. */ |
173 | if(pm_power_off) | 148 | if (chassis_power_off) |
174 | pm_power_off(); | 149 | chassis_power_off(); |
175 | 150 | ||
176 | /* Put the soft power button back under hardware control. | 151 | /* Put the soft power button back under hardware control. |
177 | * If the user had already pressed the power button, the | 152 | * If the user had already pressed the power button, the |
@@ -187,6 +162,8 @@ void machine_power_off(void) | |||
187 | KERN_EMERG "Please power this system off now."); | 162 | KERN_EMERG "Please power this system off now."); |
188 | } | 163 | } |
189 | 164 | ||
165 | void (*pm_power_off)(void) = machine_power_off; | ||
166 | EXPORT_SYMBOL(pm_power_off); | ||
190 | 167 | ||
191 | /* | 168 | /* |
192 | * Create a kernel thread | 169 | * Create a kernel thread |
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index 27160e8bf15b..413292f1a4a3 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c | |||
@@ -91,7 +91,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
91 | int copied; | 91 | int copied; |
92 | 92 | ||
93 | #ifdef __LP64__ | 93 | #ifdef __LP64__ |
94 | if (is_compat_task(child)) { | 94 | if (personality(child->personality) == PER_LINUX32) { |
95 | unsigned int tmp; | 95 | unsigned int tmp; |
96 | 96 | ||
97 | addr &= 0xffffffffL; | 97 | addr &= 0xffffffffL; |
@@ -123,7 +123,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
123 | case PTRACE_POKEDATA: | 123 | case PTRACE_POKEDATA: |
124 | ret = 0; | 124 | ret = 0; |
125 | #ifdef __LP64__ | 125 | #ifdef __LP64__ |
126 | if (is_compat_task(child)) { | 126 | if (personality(child->personality) == PER_LINUX32) { |
127 | unsigned int tmp = (unsigned int)data; | 127 | unsigned int tmp = (unsigned int)data; |
128 | DBG("sys_ptrace(POKE%s, %d, %lx, %lx)\n", | 128 | DBG("sys_ptrace(POKE%s, %d, %lx, %lx)\n", |
129 | request == PTRACE_POKETEXT ? "TEXT" : "DATA", | 129 | request == PTRACE_POKETEXT ? "TEXT" : "DATA", |
@@ -146,7 +146,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
146 | case PTRACE_PEEKUSR: { | 146 | case PTRACE_PEEKUSR: { |
147 | ret = -EIO; | 147 | ret = -EIO; |
148 | #ifdef __LP64__ | 148 | #ifdef __LP64__ |
149 | if (is_compat_task(child)) { | 149 | if (personality(child->personality) == PER_LINUX32) { |
150 | unsigned int tmp; | 150 | unsigned int tmp; |
151 | 151 | ||
152 | if (addr & (sizeof(int)-1)) | 152 | if (addr & (sizeof(int)-1)) |
@@ -205,7 +205,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
205 | goto out_tsk; | 205 | goto out_tsk; |
206 | } | 206 | } |
207 | #ifdef __LP64__ | 207 | #ifdef __LP64__ |
208 | if (is_compat_task(child)) { | 208 | if (personality(child->personality) == PER_LINUX32) { |
209 | if (addr & (sizeof(int)-1)) | 209 | if (addr & (sizeof(int)-1)) |
210 | goto out_tsk; | 210 | goto out_tsk; |
211 | if ((addr = translate_usr_offset(addr)) < 0) | 211 | if ((addr = translate_usr_offset(addr)) < 0) |
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 3a25a7bd673e..05767e83cf2d 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -317,7 +317,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
317 | 317 | ||
318 | if(personality(current->personality) == PER_LINUX32) { | 318 | if(personality(current->personality) == PER_LINUX32) { |
319 | DBG(1,"setup_rt_frame: frame->info = 0x%p\n", &compat_frame->info); | 319 | DBG(1,"setup_rt_frame: frame->info = 0x%p\n", &compat_frame->info); |
320 | err |= compat_copy_siginfo_to_user(&compat_frame->info, info); | 320 | err |= copy_siginfo_to_user32(&compat_frame->info, info); |
321 | DBG(1,"SETUP_RT_FRAME: 1\n"); | 321 | DBG(1,"SETUP_RT_FRAME: 1\n"); |
322 | compat_val = (compat_int_t)current->sas_ss_sp; | 322 | compat_val = (compat_int_t)current->sas_ss_sp; |
323 | err |= __put_user(compat_val, &compat_frame->uc.uc_stack.ss_sp); | 323 | err |= __put_user(compat_val, &compat_frame->uc.uc_stack.ss_sp); |
diff --git a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c index 0792e20efef3..a6b4231cafa1 100644 --- a/arch/parisc/kernel/signal32.c +++ b/arch/parisc/kernel/signal32.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
33 | 33 | ||
34 | #include <asm/compat_signal.h> | ||
35 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
36 | 35 | ||
37 | #include "signal32.h" | 36 | #include "signal32.h" |
@@ -398,3 +397,104 @@ setup_sigcontext32(struct compat_sigcontext __user *sc, struct compat_regfile __ | |||
398 | 397 | ||
399 | return err; | 398 | return err; |
400 | } | 399 | } |
400 | |||
401 | int | ||
402 | copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from) | ||
403 | { | ||
404 | unsigned long tmp; | ||
405 | int err; | ||
406 | |||
407 | if (!access_ok(VERIFY_READ, from, sizeof(compat_siginfo_t))) | ||
408 | return -EFAULT; | ||
409 | |||
410 | err = __get_user(to->si_signo, &from->si_signo); | ||
411 | err |= __get_user(to->si_errno, &from->si_errno); | ||
412 | err |= __get_user(to->si_code, &from->si_code); | ||
413 | |||
414 | if (to->si_code < 0) | ||
415 | err |= __copy_from_user(&to->_sifields._pad, &from->_sifields._pad, SI_PAD_SIZE); | ||
416 | else { | ||
417 | switch (to->si_code >> 16) { | ||
418 | case __SI_CHLD >> 16: | ||
419 | err |= __get_user(to->si_utime, &from->si_utime); | ||
420 | err |= __get_user(to->si_stime, &from->si_stime); | ||
421 | err |= __get_user(to->si_status, &from->si_status); | ||
422 | default: | ||
423 | err |= __get_user(to->si_pid, &from->si_pid); | ||
424 | err |= __get_user(to->si_uid, &from->si_uid); | ||
425 | break; | ||
426 | case __SI_FAULT >> 16: | ||
427 | err |= __get_user(tmp, &from->si_addr); | ||
428 | to->si_addr = (void __user *) tmp; | ||
429 | break; | ||
430 | case __SI_POLL >> 16: | ||
431 | err |= __get_user(to->si_band, &from->si_band); | ||
432 | err |= __get_user(to->si_fd, &from->si_fd); | ||
433 | break; | ||
434 | case __SI_RT >> 16: /* This is not generated by the kernel as of now. */ | ||
435 | case __SI_MESGQ >> 16: | ||
436 | err |= __get_user(to->si_pid, &from->si_pid); | ||
437 | err |= __get_user(to->si_uid, &from->si_uid); | ||
438 | err |= __get_user(to->si_int, &from->si_int); | ||
439 | break; | ||
440 | } | ||
441 | } | ||
442 | return err; | ||
443 | } | ||
444 | |||
445 | int | ||
446 | copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from) | ||
447 | { | ||
448 | unsigned int addr; | ||
449 | int err; | ||
450 | |||
451 | if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t))) | ||
452 | return -EFAULT; | ||
453 | |||
454 | /* If you change siginfo_t structure, please be sure | ||
455 | this code is fixed accordingly. | ||
456 | It should never copy any pad contained in the structure | ||
457 | to avoid security leaks, but must copy the generic | ||
458 | 3 ints plus the relevant union member. | ||
459 | This routine must convert siginfo from 64bit to 32bit as well | ||
460 | at the same time. */ | ||
461 | err = __put_user(from->si_signo, &to->si_signo); | ||
462 | err |= __put_user(from->si_errno, &to->si_errno); | ||
463 | err |= __put_user((short)from->si_code, &to->si_code); | ||
464 | if (from->si_code < 0) | ||
465 | err |= __copy_to_user(&to->_sifields._pad, &from->_sifields._pad, SI_PAD_SIZE); | ||
466 | else { | ||
467 | switch (from->si_code >> 16) { | ||
468 | case __SI_CHLD >> 16: | ||
469 | err |= __put_user(from->si_utime, &to->si_utime); | ||
470 | err |= __put_user(from->si_stime, &to->si_stime); | ||
471 | err |= __put_user(from->si_status, &to->si_status); | ||
472 | default: | ||
473 | err |= __put_user(from->si_pid, &to->si_pid); | ||
474 | err |= __put_user(from->si_uid, &to->si_uid); | ||
475 | break; | ||
476 | case __SI_FAULT >> 16: | ||
477 | /* avoid type-checking warnings by copying _pad[0] in lieu of si_addr... */ | ||
478 | err |= __put_user(from->_sifields._pad[0], &to->si_addr); | ||
479 | break; | ||
480 | case __SI_POLL >> 16: | ||
481 | err |= __put_user(from->si_band, &to->si_band); | ||
482 | err |= __put_user(from->si_fd, &to->si_fd); | ||
483 | break; | ||
484 | case __SI_TIMER >> 16: | ||
485 | err |= __put_user(from->si_tid, &to->si_tid); | ||
486 | err |= __put_user(from->si_overrun, &to->si_overrun); | ||
487 | addr = (unsigned long) from->si_ptr; | ||
488 | err |= __put_user(addr, &to->si_ptr); | ||
489 | break; | ||
490 | case __SI_RT >> 16: /* Not generated by the kernel as of now. */ | ||
491 | case __SI_MESGQ >> 16: | ||
492 | err |= __put_user(from->si_uid, &to->si_uid); | ||
493 | err |= __put_user(from->si_pid, &to->si_pid); | ||
494 | addr = (unsigned long) from->si_ptr; | ||
495 | err |= __put_user(addr, &to->si_ptr); | ||
496 | break; | ||
497 | } | ||
498 | } | ||
499 | return err; | ||
500 | } | ||
diff --git a/arch/parisc/kernel/signal32.h b/arch/parisc/kernel/signal32.h index 4d1569e717cc..e39b38a67a87 100644 --- a/arch/parisc/kernel/signal32.h +++ b/arch/parisc/kernel/signal32.h | |||
@@ -20,8 +20,34 @@ | |||
20 | #define _PARISC64_KERNEL_SIGNAL32_H | 20 | #define _PARISC64_KERNEL_SIGNAL32_H |
21 | 21 | ||
22 | #include <linux/compat.h> | 22 | #include <linux/compat.h> |
23 | #include <asm/compat_signal.h> | 23 | |
24 | #include <asm/compat_rt_sigframe.h> | 24 | typedef compat_uptr_t compat_sighandler_t; |
25 | |||
26 | typedef struct compat_sigaltstack { | ||
27 | compat_uptr_t ss_sp; | ||
28 | compat_int_t ss_flags; | ||
29 | compat_size_t ss_size; | ||
30 | } compat_stack_t; | ||
31 | |||
32 | /* Most things should be clean enough to redefine this at will, if care | ||
33 | is taken to make libc match. */ | ||
34 | |||
35 | struct compat_sigaction { | ||
36 | compat_sighandler_t sa_handler; | ||
37 | compat_uint_t sa_flags; | ||
38 | compat_sigset_t sa_mask; /* mask last for extensibility */ | ||
39 | }; | ||
40 | |||
41 | /* 32-bit ucontext as seen from an 64-bit kernel */ | ||
42 | struct compat_ucontext { | ||
43 | compat_uint_t uc_flags; | ||
44 | compat_uptr_t uc_link; | ||
45 | compat_stack_t uc_stack; /* struct compat_sigaltstack (12 bytes)*/ | ||
46 | /* FIXME: Pad out to get uc_mcontext to start at an 8-byte aligned boundary */ | ||
47 | compat_uint_t pad[1]; | ||
48 | struct compat_sigcontext uc_mcontext; | ||
49 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ | ||
50 | }; | ||
25 | 51 | ||
26 | /* ELF32 signal handling */ | 52 | /* ELF32 signal handling */ |
27 | 53 | ||
@@ -29,6 +55,103 @@ struct k_sigaction32 { | |||
29 | struct compat_sigaction sa; | 55 | struct compat_sigaction sa; |
30 | }; | 56 | }; |
31 | 57 | ||
58 | typedef struct compat_siginfo { | ||
59 | int si_signo; | ||
60 | int si_errno; | ||
61 | int si_code; | ||
62 | |||
63 | union { | ||
64 | int _pad[((128/sizeof(int)) - 3)]; | ||
65 | |||
66 | /* kill() */ | ||
67 | struct { | ||
68 | unsigned int _pid; /* sender's pid */ | ||
69 | unsigned int _uid; /* sender's uid */ | ||
70 | } _kill; | ||
71 | |||
72 | /* POSIX.1b timers */ | ||
73 | struct { | ||
74 | compat_timer_t _tid; /* timer id */ | ||
75 | int _overrun; /* overrun count */ | ||
76 | char _pad[sizeof(unsigned int) - sizeof(int)]; | ||
77 | compat_sigval_t _sigval; /* same as below */ | ||
78 | int _sys_private; /* not to be passed to user */ | ||
79 | } _timer; | ||
80 | |||
81 | /* POSIX.1b signals */ | ||
82 | struct { | ||
83 | unsigned int _pid; /* sender's pid */ | ||
84 | unsigned int _uid; /* sender's uid */ | ||
85 | compat_sigval_t _sigval; | ||
86 | } _rt; | ||
87 | |||
88 | /* SIGCHLD */ | ||
89 | struct { | ||
90 | unsigned int _pid; /* which child */ | ||
91 | unsigned int _uid; /* sender's uid */ | ||
92 | int _status; /* exit code */ | ||
93 | compat_clock_t _utime; | ||
94 | compat_clock_t _stime; | ||
95 | } _sigchld; | ||
96 | |||
97 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ | ||
98 | struct { | ||
99 | unsigned int _addr; /* faulting insn/memory ref. */ | ||
100 | } _sigfault; | ||
101 | |||
102 | /* SIGPOLL */ | ||
103 | struct { | ||
104 | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | ||
105 | int _fd; | ||
106 | } _sigpoll; | ||
107 | } _sifields; | ||
108 | } compat_siginfo_t; | ||
109 | |||
110 | int copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from); | ||
111 | int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from); | ||
112 | |||
113 | /* In a deft move of uber-hackery, we decide to carry the top half of all | ||
114 | * 64-bit registers in a non-portable, non-ABI, hidden structure. | ||
115 | * Userspace can read the hidden structure if it *wants* but is never | ||
116 | * guaranteed to be in the same place. Infact the uc_sigmask from the | ||
117 | * ucontext_t structure may push the hidden register file downards | ||
118 | */ | ||
119 | struct compat_regfile { | ||
120 | /* Upper half of all the 64-bit registers that were truncated | ||
121 | on a copy to a 32-bit userspace */ | ||
122 | compat_int_t rf_gr[32]; | ||
123 | compat_int_t rf_iasq[2]; | ||
124 | compat_int_t rf_iaoq[2]; | ||
125 | compat_int_t rf_sar; | ||
126 | }; | ||
127 | |||
128 | #define COMPAT_SIGRETURN_TRAMP 4 | ||
129 | #define COMPAT_SIGRESTARTBLOCK_TRAMP 5 | ||
130 | #define COMPAT_TRAMP_SIZE (COMPAT_SIGRETURN_TRAMP + \ | ||
131 | COMPAT_SIGRESTARTBLOCK_TRAMP) | ||
132 | |||
133 | struct compat_rt_sigframe { | ||
134 | /* XXX: Must match trampoline size in arch/parisc/kernel/signal.c | ||
135 | Secondary to that it must protect the ERESTART_RESTARTBLOCK | ||
136 | trampoline we left on the stack (we were bad and didn't | ||
137 | change sp so we could run really fast.) */ | ||
138 | compat_uint_t tramp[COMPAT_TRAMP_SIZE]; | ||
139 | compat_siginfo_t info; | ||
140 | struct compat_ucontext uc; | ||
141 | /* Hidden location of truncated registers, *must* be last. */ | ||
142 | struct compat_regfile regs; | ||
143 | }; | ||
144 | |||
145 | /* | ||
146 | * The 32-bit ABI wants at least 48 bytes for a function call frame: | ||
147 | * 16 bytes for arg0-arg3, and 32 bytes for magic (the only part of | ||
148 | * which Linux/parisc uses is sp-20 for the saved return pointer...) | ||
149 | * Then, the stack pointer must be rounded to a cache line (64 bytes). | ||
150 | */ | ||
151 | #define SIGFRAME32 64 | ||
152 | #define FUNCTIONCALLFRAME32 48 | ||
153 | #define PARISC_RT_SIGFRAME_SIZE32 (((sizeof(struct compat_rt_sigframe) + FUNCTIONCALLFRAME32) + SIGFRAME32) & -SIGFRAME32) | ||
154 | |||
32 | void sigset_32to64(sigset_t *s64, compat_sigset_t *s32); | 155 | void sigset_32to64(sigset_t *s64, compat_sigset_t *s32); |
33 | void sigset_64to32(compat_sigset_t *s32, sigset_t *s64); | 156 | void sigset_64to32(compat_sigset_t *s32, sigset_t *s64); |
34 | int do_sigaltstack32 (const compat_stack_t __user *uss32, | 157 | int do_sigaltstack32 (const compat_stack_t __user *uss32, |
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index d66163492890..af88afef41bd 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
@@ -650,6 +650,8 @@ end_linux_gateway_page: | |||
650 | #define LWS_ENTRY(_name_) .word (lws_##_name_ - linux_gateway_page) | 650 | #define LWS_ENTRY(_name_) .word (lws_##_name_ - linux_gateway_page) |
651 | #endif | 651 | #endif |
652 | 652 | ||
653 | .section .rodata,"a" | ||
654 | |||
653 | .align 4096 | 655 | .align 4096 |
654 | /* Light-weight-syscall table */ | 656 | /* Light-weight-syscall table */ |
655 | /* Start of lws table. */ | 657 | /* Start of lws table. */ |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 32cbc0489324..51d2480627d1 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -374,5 +374,24 @@ | |||
374 | ENTRY_SAME(keyctl) | 374 | ENTRY_SAME(keyctl) |
375 | ENTRY_SAME(ioprio_set) | 375 | ENTRY_SAME(ioprio_set) |
376 | ENTRY_SAME(ioprio_get) | 376 | ENTRY_SAME(ioprio_get) |
377 | ENTRY_SAME(inotify_init) | ||
378 | ENTRY_SAME(inotify_add_watch) /* 270 */ | ||
379 | ENTRY_SAME(inotify_rm_watch) | ||
380 | ENTRY_COMP(pselect6) | ||
381 | ENTRY_COMP(ppoll) | ||
382 | ENTRY_SAME(migrate_pages) | ||
383 | ENTRY_COMP(openat) /* 275 */ | ||
384 | ENTRY_SAME(mkdirat) | ||
385 | ENTRY_SAME(mknodat) | ||
386 | ENTRY_SAME(fchownat) | ||
387 | ENTRY_COMP(futimesat) | ||
388 | ENTRY_COMP(newfstatat) /* 280 */ | ||
389 | ENTRY_SAME(unlinkat) | ||
390 | ENTRY_SAME(renameat) | ||
391 | ENTRY_SAME(linkat) | ||
392 | ENTRY_SAME(symlinkat) | ||
393 | ENTRY_SAME(readlinkat) /* 285 */ | ||
394 | ENTRY_SAME(fchmodat) | ||
395 | ENTRY_SAME(faccessat) | ||
377 | /* Nothing yet */ | 396 | /* Nothing yet */ |
378 | 397 | ||
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 15914f0235a0..ff200608c851 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -193,10 +193,9 @@ void show_stack(struct task_struct *task, unsigned long *s) | |||
193 | 193 | ||
194 | HERE: | 194 | HERE: |
195 | asm volatile ("copy %%r30, %0" : "=r"(sp)); | 195 | asm volatile ("copy %%r30, %0" : "=r"(sp)); |
196 | r = (struct pt_regs *)kmalloc(sizeof(struct pt_regs), GFP_KERNEL); | 196 | r = kzalloc(sizeof(struct pt_regs), GFP_KERNEL); |
197 | if (!r) | 197 | if (!r) |
198 | return; | 198 | return; |
199 | memset(r, 0, sizeof(struct pt_regs)); | ||
200 | r->iaoq[0] = (unsigned long)&&HERE; | 199 | r->iaoq[0] = (unsigned long)&&HERE; |
201 | r->gr[2] = (unsigned long)__builtin_return_address(0); | 200 | r->gr[2] = (unsigned long)__builtin_return_address(0); |
202 | r->gr[30] = sp; | 201 | r->gr[30] = sp; |
diff --git a/arch/parisc/math-emu/decode_exc.c b/arch/parisc/math-emu/decode_exc.c index f84f2586672b..66c8a9f6a27e 100644 --- a/arch/parisc/math-emu/decode_exc.c +++ b/arch/parisc/math-emu/decode_exc.c | |||
@@ -337,6 +337,7 @@ decode_fpu(unsigned int Fpu_register[], unsigned int trap_counts[]) | |||
337 | } | 337 | } |
338 | break; | 338 | break; |
339 | case INVALIDEXCEPTION: | 339 | case INVALIDEXCEPTION: |
340 | case OPC_2E_INVALIDEXCEPTION: | ||
340 | update_trap_counts(Fpu_register, aflags, bflags, trap_counts); | 341 | update_trap_counts(Fpu_register, aflags, bflags, trap_counts); |
341 | return SIGNALCODE(SIGFPE, FPE_FLTINV); | 342 | return SIGNALCODE(SIGFPE, FPE_FLTINV); |
342 | case DIVISIONBYZEROEXCEPTION: | 343 | case DIVISIONBYZEROEXCEPTION: |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 720287d46e55..7847ca13d6c2 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -371,17 +371,11 @@ static void __init setup_bootmem(void) | |||
371 | 371 | ||
372 | void free_initmem(void) | 372 | void free_initmem(void) |
373 | { | 373 | { |
374 | /* FIXME: */ | ||
375 | #if 0 | ||
376 | printk(KERN_INFO "NOT FREEING INITMEM (%dk)\n", | ||
377 | (&__init_end - &__init_begin) >> 10); | ||
378 | return; | ||
379 | #else | ||
380 | unsigned long addr; | 374 | unsigned long addr; |
381 | 375 | ||
382 | printk(KERN_INFO "Freeing unused kernel memory: "); | 376 | printk(KERN_INFO "Freeing unused kernel memory: "); |
383 | 377 | ||
384 | #if 1 | 378 | #ifdef CONFIG_DEBUG_KERNEL |
385 | /* Attempt to catch anyone trying to execute code here | 379 | /* Attempt to catch anyone trying to execute code here |
386 | * by filling the page with BRK insns. | 380 | * by filling the page with BRK insns. |
387 | * | 381 | * |
@@ -414,9 +408,21 @@ void free_initmem(void) | |||
414 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE); | 408 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE); |
415 | 409 | ||
416 | printk("%luk freed\n", (unsigned long)(&__init_end - &__init_begin) >> 10); | 410 | printk("%luk freed\n", (unsigned long)(&__init_end - &__init_begin) >> 10); |
417 | #endif | ||
418 | } | 411 | } |
419 | 412 | ||
413 | |||
414 | #ifdef CONFIG_DEBUG_RODATA | ||
415 | void mark_rodata_ro(void) | ||
416 | { | ||
417 | extern char __start_rodata, __end_rodata; | ||
418 | /* rodata memory was already mapped with KERNEL_RO access rights by | ||
419 | pagetable_init() and map_pages(). No need to do additional stuff here */ | ||
420 | printk (KERN_INFO "Write protecting the kernel read-only data: %luk\n", | ||
421 | (unsigned long)(&__end_rodata - &__start_rodata) >> 10); | ||
422 | } | ||
423 | #endif | ||
424 | |||
425 | |||
420 | /* | 426 | /* |
421 | * Just an arbitrary offset to serve as a "hole" between mapping areas | 427 | * Just an arbitrary offset to serve as a "hole" between mapping areas |
422 | * (between top of physical memory and a potential pcxl dma mapping | 428 | * (between top of physical memory and a potential pcxl dma mapping |
@@ -477,11 +483,6 @@ void __init mem_init(void) | |||
477 | 483 | ||
478 | } | 484 | } |
479 | 485 | ||
480 | int do_check_pgt_cache(int low, int high) | ||
481 | { | ||
482 | return 0; | ||
483 | } | ||
484 | |||
485 | unsigned long *empty_zero_page __read_mostly; | 486 | unsigned long *empty_zero_page __read_mostly; |
486 | 487 | ||
487 | void show_mem(void) | 488 | void show_mem(void) |
@@ -690,7 +691,7 @@ static void __init pagetable_init(void) | |||
690 | 691 | ||
691 | #ifdef CONFIG_BLK_DEV_INITRD | 692 | #ifdef CONFIG_BLK_DEV_INITRD |
692 | if (initrd_end && initrd_end > mem_limit) { | 693 | if (initrd_end && initrd_end > mem_limit) { |
693 | printk("initrd: mapping %08lx-%08lx\n", initrd_start, initrd_end); | 694 | printk(KERN_INFO "initrd: mapping %08lx-%08lx\n", initrd_start, initrd_end); |
694 | map_pages(initrd_start, __pa(initrd_start), | 695 | map_pages(initrd_start, __pa(initrd_start), |
695 | initrd_end - initrd_start, PAGE_KERNEL); | 696 | initrd_end - initrd_start, PAGE_KERNEL); |
696 | } | 697 | } |
@@ -792,8 +793,6 @@ map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm) | |||
792 | EXPORT_SYMBOL(map_hpux_gateway_page); | 793 | EXPORT_SYMBOL(map_hpux_gateway_page); |
793 | #endif | 794 | #endif |
794 | 795 | ||
795 | extern void flush_tlb_all_local(void); | ||
796 | |||
797 | void __init paging_init(void) | 796 | void __init paging_init(void) |
798 | { | 797 | { |
799 | int i; | 798 | int i; |
@@ -802,7 +801,7 @@ void __init paging_init(void) | |||
802 | pagetable_init(); | 801 | pagetable_init(); |
803 | gateway_init(); | 802 | gateway_init(); |
804 | flush_cache_all_local(); /* start with known state */ | 803 | flush_cache_all_local(); /* start with known state */ |
805 | flush_tlb_all_local(); | 804 | flush_tlb_all_local(NULL); |
806 | 805 | ||
807 | for (i = 0; i < npmem_ranges; i++) { | 806 | for (i = 0; i < npmem_ranges; i++) { |
808 | unsigned long zones_size[MAX_NR_ZONES] = { 0, 0, 0 }; | 807 | unsigned long zones_size[MAX_NR_ZONES] = { 0, 0, 0 }; |
@@ -993,7 +992,7 @@ void flush_tlb_all(void) | |||
993 | do_recycle++; | 992 | do_recycle++; |
994 | } | 993 | } |
995 | spin_unlock(&sid_lock); | 994 | spin_unlock(&sid_lock); |
996 | on_each_cpu((void (*)(void *))flush_tlb_all_local, NULL, 1, 1); | 995 | on_each_cpu(flush_tlb_all_local, NULL, 1, 1); |
997 | if (do_recycle) { | 996 | if (do_recycle) { |
998 | spin_lock(&sid_lock); | 997 | spin_lock(&sid_lock); |
999 | recycle_sids(recycle_ndirty,recycle_dirty_array); | 998 | recycle_sids(recycle_ndirty,recycle_dirty_array); |
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 55ec59867250..816446f0e497 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c | |||
@@ -152,7 +152,7 @@ static int is_elf64(void *hdr) | |||
152 | elf64ph = (Elf64_Phdr *)((unsigned long)elf64 + | 152 | elf64ph = (Elf64_Phdr *)((unsigned long)elf64 + |
153 | (unsigned long)elf64->e_phoff); | 153 | (unsigned long)elf64->e_phoff); |
154 | for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++) | 154 | for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++) |
155 | if (elf64ph->p_type == PT_LOAD && elf64ph->p_offset != 0) | 155 | if (elf64ph->p_type == PT_LOAD) |
156 | break; | 156 | break; |
157 | if (i >= (unsigned int)elf64->e_phnum) | 157 | if (i >= (unsigned int)elf64->e_phnum) |
158 | return 0; | 158 | return 0; |
@@ -193,7 +193,7 @@ static int is_elf32(void *hdr) | |||
193 | elf32 = (Elf32_Ehdr *)elfheader; | 193 | elf32 = (Elf32_Ehdr *)elfheader; |
194 | elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff); | 194 | elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff); |
195 | for (i = 0; i < elf32->e_phnum; i++, elf32ph++) | 195 | for (i = 0; i < elf32->e_phnum; i++, elf32ph++) |
196 | if (elf32ph->p_type == PT_LOAD && elf32ph->p_offset != 0) | 196 | if (elf32ph->p_type == PT_LOAD) |
197 | break; | 197 | break; |
198 | if (i >= elf32->e_phnum) | 198 | if (i >= elf32->e_phnum) |
199 | return 0; | 199 | return 0; |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 10696456a4c6..3191be7135fe 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -891,7 +891,7 @@ struct cpu_spec cpu_specs[] = { | |||
891 | .platform = "ppc405", | 891 | .platform = "ppc405", |
892 | }, | 892 | }, |
893 | { /* Xilinx Virtex-II Pro */ | 893 | { /* Xilinx Virtex-II Pro */ |
894 | .pvr_mask = 0xffff0000, | 894 | .pvr_mask = 0xfffff000, |
895 | .pvr_value = 0x20010000, | 895 | .pvr_value = 0x20010000, |
896 | .cpu_name = "Virtex-II Pro", | 896 | .cpu_name = "Virtex-II Pro", |
897 | .cpu_features = CPU_FTRS_40X, | 897 | .cpu_features = CPU_FTRS_40X, |
@@ -901,6 +901,16 @@ struct cpu_spec cpu_specs[] = { | |||
901 | .dcache_bsize = 32, | 901 | .dcache_bsize = 32, |
902 | .platform = "ppc405", | 902 | .platform = "ppc405", |
903 | }, | 903 | }, |
904 | { /* Xilinx Virtex-4 FX */ | ||
905 | .pvr_mask = 0xfffff000, | ||
906 | .pvr_value = 0x20011000, | ||
907 | .cpu_name = "Virtex-4 FX", | ||
908 | .cpu_features = CPU_FTRS_40X, | ||
909 | .cpu_user_features = PPC_FEATURE_32 | | ||
910 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | ||
911 | .icache_bsize = 32, | ||
912 | .dcache_bsize = 32, | ||
913 | }, | ||
904 | { /* 405EP */ | 914 | { /* 405EP */ |
905 | .pvr_mask = 0xffff0000, | 915 | .pvr_mask = 0xffff0000, |
906 | .pvr_value = 0x51210000, | 916 | .pvr_value = 0x51210000, |
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S index e4362dfa37fb..340730fb8c91 100644 --- a/arch/powerpc/kernel/fpu.S +++ b/arch/powerpc/kernel/fpu.S | |||
@@ -66,7 +66,7 @@ _GLOBAL(load_up_fpu) | |||
66 | #else | 66 | #else |
67 | ld r4,PACACURRENT(r13) | 67 | ld r4,PACACURRENT(r13) |
68 | addi r5,r4,THREAD /* Get THREAD */ | 68 | addi r5,r4,THREAD /* Get THREAD */ |
69 | ld r4,THREAD_FPEXC_MODE(r5) | 69 | lwz r4,THREAD_FPEXC_MODE(r5) |
70 | ori r12,r12,MSR_FP | 70 | ori r12,r12,MSR_FP |
71 | or r12,r12,r4 | 71 | or r12,r12,r4 |
72 | std r12,_MSR(r1) | 72 | std r12,_MSR(r1) |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 308268466342..415659629394 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -749,11 +749,12 @@ iSeries_secondary_smp_loop: | |||
749 | 749 | ||
750 | .globl decrementer_iSeries_masked | 750 | .globl decrementer_iSeries_masked |
751 | decrementer_iSeries_masked: | 751 | decrementer_iSeries_masked: |
752 | /* We may not have a valid TOC pointer in here. */ | ||
752 | li r11,1 | 753 | li r11,1 |
753 | ld r12,PACALPPACAPTR(r13) | 754 | ld r12,PACALPPACAPTR(r13) |
754 | stb r11,LPPACADECRINT(r12) | 755 | stb r11,LPPACADECRINT(r12) |
755 | LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy) | 756 | LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy) |
756 | lwz r12,ADDROFF(tb_ticks_per_jiffy)(r12) | 757 | lwz r12,0(r12) |
757 | mtspr SPRN_DEC,r12 | 758 | mtspr SPRN_DEC,r12 |
758 | /* fall through */ | 759 | /* fall through */ |
759 | 760 | ||
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 4d9b4388918b..946f3219fd29 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -334,9 +334,6 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
334 | 334 | ||
335 | spin_unlock_irqrestore(&(tbl->it_lock), flags); | 335 | spin_unlock_irqrestore(&(tbl->it_lock), flags); |
336 | 336 | ||
337 | /* Make sure updates are seen by hardware */ | ||
338 | mb(); | ||
339 | |||
340 | DBG("mapped %d elements:\n", outcount); | 337 | DBG("mapped %d elements:\n", outcount); |
341 | 338 | ||
342 | /* For the sake of iommu_unmap_sg, we clear out the length in the | 339 | /* For the sake of iommu_unmap_sg, we clear out the length in the |
@@ -347,6 +344,10 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
347 | outs->dma_address = DMA_ERROR_CODE; | 344 | outs->dma_address = DMA_ERROR_CODE; |
348 | outs->dma_length = 0; | 345 | outs->dma_length = 0; |
349 | } | 346 | } |
347 | |||
348 | /* Make sure updates are seen by hardware */ | ||
349 | mb(); | ||
350 | |||
350 | return outcount; | 351 | return outcount; |
351 | 352 | ||
352 | failure: | 353 | failure: |
@@ -358,6 +359,8 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
358 | npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr) | 359 | npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr) |
359 | >> PAGE_SHIFT; | 360 | >> PAGE_SHIFT; |
360 | __iommu_free(tbl, vaddr, npages); | 361 | __iommu_free(tbl, vaddr, npages); |
362 | s->dma_address = DMA_ERROR_CODE; | ||
363 | s->dma_length = 0; | ||
361 | } | 364 | } |
362 | } | 365 | } |
363 | spin_unlock_irqrestore(&(tbl->it_lock), flags); | 366 | spin_unlock_irqrestore(&(tbl->it_lock), flags); |
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/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index d9a459c144d8..b212d3e64b8d 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -57,7 +57,6 @@ extern void machine_check_exception(struct pt_regs *regs); | |||
57 | extern void alignment_exception(struct pt_regs *regs); | 57 | extern void alignment_exception(struct pt_regs *regs); |
58 | extern void program_check_exception(struct pt_regs *regs); | 58 | extern void program_check_exception(struct pt_regs *regs); |
59 | extern void single_step_exception(struct pt_regs *regs); | 59 | extern void single_step_exception(struct pt_regs *regs); |
60 | extern int pmac_newworld; | ||
61 | extern int sys_sigreturn(struct pt_regs *regs); | 60 | extern int sys_sigreturn(struct pt_regs *regs); |
62 | 61 | ||
63 | EXPORT_SYMBOL(clear_pages); | 62 | EXPORT_SYMBOL(clear_pages); |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index d50c8df0183e..82d117c60d7f 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -491,7 +491,12 @@ void __init finish_device_tree(void) | |||
491 | size = 16; | 491 | size = 16; |
492 | finish_node(allnodes, &size, 1); | 492 | finish_node(allnodes, &size, 1); |
493 | size -= 16; | 493 | size -= 16; |
494 | end = start = (unsigned long) __va(lmb_alloc(size, 128)); | 494 | |
495 | if (0 == size) | ||
496 | end = start = 0; | ||
497 | else | ||
498 | end = start = (unsigned long)__va(lmb_alloc(size, 128)); | ||
499 | |||
495 | finish_node(allnodes, &end, 0); | 500 | finish_node(allnodes, &end, 0); |
496 | BUG_ON(end != start + size); | 501 | BUG_ON(end != start + size); |
497 | 502 | ||
@@ -826,10 +831,6 @@ void __init unflatten_device_tree(void) | |||
826 | 831 | ||
827 | /* Allocate memory for the expanded device tree */ | 832 | /* Allocate memory for the expanded device tree */ |
828 | mem = lmb_alloc(size + 4, __alignof__(struct device_node)); | 833 | mem = lmb_alloc(size + 4, __alignof__(struct device_node)); |
829 | if (!mem) { | ||
830 | DBG("Couldn't allocate memory with lmb_alloc()!\n"); | ||
831 | panic("Couldn't allocate memory with lmb_alloc()!\n"); | ||
832 | } | ||
833 | mem = (unsigned long) __va(mem); | 834 | mem = (unsigned long) __va(mem); |
834 | 835 | ||
835 | ((u32 *)mem)[size / 4] = 0xdeadbeef; | 836 | ((u32 *)mem)[size / 4] = 0xdeadbeef; |
@@ -1398,8 +1399,8 @@ struct device_node *of_find_node_by_name(struct device_node *from, | |||
1398 | 1399 | ||
1399 | read_lock(&devtree_lock); | 1400 | read_lock(&devtree_lock); |
1400 | np = from ? from->allnext : allnodes; | 1401 | np = from ? from->allnext : allnodes; |
1401 | for (; np != 0; np = np->allnext) | 1402 | for (; np != NULL; np = np->allnext) |
1402 | if (np->name != 0 && strcasecmp(np->name, name) == 0 | 1403 | if (np->name != NULL && strcasecmp(np->name, name) == 0 |
1403 | && of_node_get(np)) | 1404 | && of_node_get(np)) |
1404 | break; | 1405 | break; |
1405 | if (from) | 1406 | if (from) |
@@ -1917,3 +1918,30 @@ int prom_update_property(struct device_node *np, | |||
1917 | 1918 | ||
1918 | return 0; | 1919 | return 0; |
1919 | } | 1920 | } |
1921 | |||
1922 | #ifdef CONFIG_KEXEC | ||
1923 | /* We may have allocated the flat device tree inside the crash kernel region | ||
1924 | * in prom_init. If so we need to move it out into regular memory. */ | ||
1925 | void kdump_move_device_tree(void) | ||
1926 | { | ||
1927 | unsigned long start, end; | ||
1928 | struct boot_param_header *new; | ||
1929 | |||
1930 | start = __pa((unsigned long)initial_boot_params); | ||
1931 | end = start + initial_boot_params->totalsize; | ||
1932 | |||
1933 | if (end < crashk_res.start || start > crashk_res.end) | ||
1934 | return; | ||
1935 | |||
1936 | new = (struct boot_param_header*) | ||
1937 | __va(lmb_alloc(initial_boot_params->totalsize, PAGE_SIZE)); | ||
1938 | |||
1939 | memcpy(new, initial_boot_params, initial_boot_params->totalsize); | ||
1940 | |||
1941 | initial_boot_params = new; | ||
1942 | |||
1943 | DBG("Flat device tree blob moved to %p\n", initial_boot_params); | ||
1944 | |||
1945 | /* XXX should we unreserve the old DT? */ | ||
1946 | } | ||
1947 | #endif /* CONFIG_KEXEC */ | ||
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 7881ec96ef11..ec7153f4d47c 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -2098,6 +2098,10 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, | |||
2098 | */ | 2098 | */ |
2099 | prom_init_stdout(); | 2099 | prom_init_stdout(); |
2100 | 2100 | ||
2101 | /* Bail if this is a kdump kernel. */ | ||
2102 | if (PHYSICAL_START > 0) | ||
2103 | prom_panic("Error: You can't boot a kdump kernel from OF!\n"); | ||
2104 | |||
2101 | /* | 2105 | /* |
2102 | * Check for an initrd | 2106 | * Check for an initrd |
2103 | */ | 2107 | */ |
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index a8099c806150..3934c227549b 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c | |||
@@ -465,8 +465,10 @@ u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, | |||
465 | if (parent == NULL) | 465 | if (parent == NULL) |
466 | return NULL; | 466 | return NULL; |
467 | bus = of_match_bus(parent); | 467 | bus = of_match_bus(parent); |
468 | if (strcmp(bus->name, "pci")) | 468 | if (strcmp(bus->name, "pci")) { |
469 | of_node_put(parent); | ||
469 | return NULL; | 470 | return NULL; |
471 | } | ||
470 | bus->count_cells(dev, &na, &ns); | 472 | bus->count_cells(dev, &na, &ns); |
471 | of_node_put(parent); | 473 | of_node_put(parent); |
472 | if (!OF_CHECK_COUNTS(na, ns)) | 474 | if (!OF_CHECK_COUNTS(na, ns)) |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 7fe4a5c944c9..b5b2add7ad1e 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/prom.h> | 23 | #include <asm/prom.h> |
24 | #include <asm/rtas.h> | 24 | #include <asm/rtas.h> |
25 | #include <asm/hvcall.h> | ||
25 | #include <asm/semaphore.h> | 26 | #include <asm/semaphore.h> |
26 | #include <asm/machdep.h> | 27 | #include <asm/machdep.h> |
27 | #include <asm/page.h> | 28 | #include <asm/page.h> |
@@ -565,6 +566,7 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE; | |||
565 | #ifdef CONFIG_PPC_PSERIES | 566 | #ifdef CONFIG_PPC_PSERIES |
566 | static void rtas_percpu_suspend_me(void *info) | 567 | static void rtas_percpu_suspend_me(void *info) |
567 | { | 568 | { |
569 | int i; | ||
568 | long rc; | 570 | long rc; |
569 | long flags; | 571 | long flags; |
570 | struct rtas_suspend_me_data *data = | 572 | struct rtas_suspend_me_data *data = |
@@ -587,18 +589,16 @@ static void rtas_percpu_suspend_me(void *info) | |||
587 | 589 | ||
588 | if (rc == H_Continue) { | 590 | if (rc == H_Continue) { |
589 | data->waiting = 0; | 591 | data->waiting = 0; |
590 | rtas_call(ibm_suspend_me_token, 0, 1, | 592 | data->args->args[data->args->nargs] = |
591 | data->args->args); | 593 | rtas_call(ibm_suspend_me_token, 0, 1, NULL); |
594 | for_each_cpu(i) | ||
595 | plpar_hcall_norets(H_PROD,i); | ||
592 | } else { | 596 | } else { |
593 | data->waiting = -EBUSY; | 597 | data->waiting = -EBUSY; |
594 | printk(KERN_ERR "Error on H_Join hypervisor call\n"); | 598 | printk(KERN_ERR "Error on H_Join hypervisor call\n"); |
595 | } | 599 | } |
596 | 600 | ||
597 | out: | 601 | out: |
598 | /* before we restore interrupts, make sure we don't | ||
599 | * generate a spurious soft lockup errors | ||
600 | */ | ||
601 | touch_softlockup_watchdog(); | ||
602 | local_irq_restore(flags); | 602 | local_irq_restore(flags); |
603 | return; | 603 | return; |
604 | } | 604 | } |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 50500093c97f..aaf384c3f04a 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -672,8 +672,7 @@ static void rtas_flash_firmware(int reboot_type) | |||
672 | static void remove_flash_pde(struct proc_dir_entry *dp) | 672 | static void remove_flash_pde(struct proc_dir_entry *dp) |
673 | { | 673 | { |
674 | if (dp) { | 674 | if (dp) { |
675 | if (dp->data != NULL) | 675 | kfree(dp->data); |
676 | kfree(dp->data); | ||
677 | dp->owner = NULL; | 676 | dp->owner = NULL; |
678 | remove_proc_entry(dp->name, dp->parent); | 677 | remove_proc_entry(dp->name, dp->parent); |
679 | } | 678 | } |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index e29b275e09e0..a717dff695ef 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -398,6 +398,9 @@ void __init setup_system(void) | |||
398 | { | 398 | { |
399 | DBG(" -> setup_system()\n"); | 399 | DBG(" -> setup_system()\n"); |
400 | 400 | ||
401 | #ifdef CONFIG_KEXEC | ||
402 | kdump_move_device_tree(); | ||
403 | #endif | ||
401 | /* | 404 | /* |
402 | * Unflatten the device-tree passed by prom_init or kexec | 405 | * Unflatten the device-tree passed by prom_init or kexec |
403 | */ | 406 | */ |
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/kernel/smp.c b/arch/powerpc/kernel/smp.c index c8458c531b25..13595a64f013 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -540,6 +540,9 @@ int __devinit start_secondary(void *unused) | |||
540 | if (smp_ops->take_timebase) | 540 | if (smp_ops->take_timebase) |
541 | smp_ops->take_timebase(); | 541 | smp_ops->take_timebase(); |
542 | 542 | ||
543 | if (system_state > SYSTEM_BOOTING) | ||
544 | per_cpu(last_jiffy, cpu) = get_tb(); | ||
545 | |||
543 | spin_lock(&call_lock); | 546 | spin_lock(&call_lock); |
544 | cpu_set(cpu, cpu_online_map); | 547 | cpu_set(cpu, cpu_online_map); |
545 | spin_unlock(&call_lock); | 548 | spin_unlock(&call_lock); |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index c4a294d657b9..1886045a2fd8 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -612,10 +612,10 @@ void __init generic_calibrate_decr(void) | |||
612 | 612 | ||
613 | ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ | 613 | ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ |
614 | node_found = 0; | 614 | node_found = 0; |
615 | if (cpu != 0) { | 615 | if (cpu) { |
616 | fp = (unsigned int *)get_property(cpu, "timebase-frequency", | 616 | fp = (unsigned int *)get_property(cpu, "timebase-frequency", |
617 | NULL); | 617 | NULL); |
618 | if (fp != 0) { | 618 | if (fp) { |
619 | node_found = 1; | 619 | node_found = 1; |
620 | ppc_tb_freq = *fp; | 620 | ppc_tb_freq = *fp; |
621 | } | 621 | } |
@@ -626,10 +626,10 @@ void __init generic_calibrate_decr(void) | |||
626 | 626 | ||
627 | ppc_proc_freq = DEFAULT_PROC_FREQ; | 627 | ppc_proc_freq = DEFAULT_PROC_FREQ; |
628 | node_found = 0; | 628 | node_found = 0; |
629 | if (cpu != 0) { | 629 | if (cpu) { |
630 | fp = (unsigned int *)get_property(cpu, "clock-frequency", | 630 | fp = (unsigned int *)get_property(cpu, "clock-frequency", |
631 | NULL); | 631 | NULL); |
632 | if (fp != 0) { | 632 | if (fp) { |
633 | node_found = 1; | 633 | node_found = 1; |
634 | ppc_proc_freq = *fp; | 634 | ppc_proc_freq = *fp; |
635 | } | 635 | } |
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index 2da65a9c93f6..5d29dcca523c 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c | |||
@@ -144,7 +144,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock) | |||
144 | } | 144 | } |
145 | 145 | ||
146 | #ifdef CONFIG_PPC_MAPLE | 146 | #ifdef CONFIG_PPC_MAPLE |
147 | void udbg_maple_real_putc(unsigned char c) | 147 | void udbg_maple_real_putc(char c) |
148 | { | 148 | { |
149 | if (udbg_comport) { | 149 | if (udbg_comport) { |
150 | while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) | 150 | while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0) |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 149351a84b94..95b4cd6b65e0 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -430,7 +430,6 @@ void __init htab_initialize(void) | |||
430 | * the absolute address space. | 430 | * the absolute address space. |
431 | */ | 431 | */ |
432 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); | 432 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); |
433 | BUG_ON(table == 0); | ||
434 | 433 | ||
435 | DBG("Hash table allocated at %lx, size: %lx\n", table, | 434 | DBG("Hash table allocated at %lx, size: %lx\n", table, |
436 | htab_size_bytes); | 435 | htab_size_bytes); |
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index 9584608fd768..874cd103ce6e 100644 --- a/arch/powerpc/mm/lmb.c +++ b/arch/powerpc/mm/lmb.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #define DBG(fmt...) | 31 | #define DBG(fmt...) |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #define LMB_ALLOC_ANYWHERE 0 | ||
35 | |||
34 | struct lmb lmb; | 36 | struct lmb lmb; |
35 | 37 | ||
36 | void lmb_dump_all(void) | 38 | void lmb_dump_all(void) |
@@ -197,6 +199,8 @@ long __init lmb_reserve(unsigned long base, unsigned long size) | |||
197 | { | 199 | { |
198 | struct lmb_region *_rgn = &(lmb.reserved); | 200 | struct lmb_region *_rgn = &(lmb.reserved); |
199 | 201 | ||
202 | BUG_ON(0 == size); | ||
203 | |||
200 | return lmb_add_region(_rgn, base, size); | 204 | return lmb_add_region(_rgn, base, size); |
201 | } | 205 | } |
202 | 206 | ||
@@ -224,9 +228,25 @@ unsigned long __init lmb_alloc(unsigned long size, unsigned long align) | |||
224 | unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, | 228 | unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, |
225 | unsigned long max_addr) | 229 | unsigned long max_addr) |
226 | { | 230 | { |
231 | unsigned long alloc; | ||
232 | |||
233 | alloc = __lmb_alloc_base(size, align, max_addr); | ||
234 | |||
235 | if (alloc < 0) | ||
236 | panic("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n", | ||
237 | size, max_addr); | ||
238 | |||
239 | return alloc; | ||
240 | } | ||
241 | |||
242 | unsigned long __init __lmb_alloc_base(unsigned long size, unsigned long align, | ||
243 | unsigned long max_addr) | ||
244 | { | ||
227 | long i, j; | 245 | long i, j; |
228 | unsigned long base = 0; | 246 | unsigned long base = 0; |
229 | 247 | ||
248 | BUG_ON(0 == size); | ||
249 | |||
230 | #ifdef CONFIG_PPC32 | 250 | #ifdef CONFIG_PPC32 |
231 | /* On 32-bit, make sure we allocate lowmem */ | 251 | /* On 32-bit, make sure we allocate lowmem */ |
232 | if (max_addr == LMB_ALLOC_ANYWHERE) | 252 | if (max_addr == LMB_ALLOC_ANYWHERE) |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 15aac0d78dfa..6809cdba6e94 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -249,7 +249,6 @@ void __init do_init_bootmem(void) | |||
249 | bootmap_pages = bootmem_bootmap_pages(total_pages); | 249 | bootmap_pages = bootmem_bootmap_pages(total_pages); |
250 | 250 | ||
251 | start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE); | 251 | start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE); |
252 | BUG_ON(!start); | ||
253 | 252 | ||
254 | boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages); | 253 | boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages); |
255 | 254 | ||
@@ -435,17 +434,12 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg) | |||
435 | { | 434 | { |
436 | clear_page(page); | 435 | clear_page(page); |
437 | 436 | ||
438 | if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) | ||
439 | return; | ||
440 | /* | 437 | /* |
441 | * We shouldnt have to do this, but some versions of glibc | 438 | * We shouldnt have to do this, but some versions of glibc |
442 | * require it (ld.so assumes zero filled pages are icache clean) | 439 | * require it (ld.so assumes zero filled pages are icache clean) |
443 | * - Anton | 440 | * - Anton |
444 | */ | 441 | */ |
445 | 442 | flush_dcache_page(pg); | |
446 | /* avoid an atomic op if possible */ | ||
447 | if (test_bit(PG_arch_1, &pg->flags)) | ||
448 | clear_bit(PG_arch_1, &pg->flags); | ||
449 | } | 443 | } |
450 | EXPORT_SYMBOL(clear_user_page); | 444 | EXPORT_SYMBOL(clear_user_page); |
451 | 445 | ||
@@ -469,12 +463,7 @@ void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, | |||
469 | return; | 463 | return; |
470 | #endif | 464 | #endif |
471 | 465 | ||
472 | if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) | 466 | flush_dcache_page(pg); |
473 | return; | ||
474 | |||
475 | /* avoid an atomic op if possible */ | ||
476 | if (test_bit(PG_arch_1, &pg->flags)) | ||
477 | clear_bit(PG_arch_1, &pg->flags); | ||
478 | } | 467 | } |
479 | 468 | ||
480 | void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, | 469 | void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 2863a912bcd0..da5280f8cf42 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -570,11 +570,11 @@ static void __init *careful_allocation(int nid, unsigned long size, | |||
570 | unsigned long end_pfn) | 570 | unsigned long end_pfn) |
571 | { | 571 | { |
572 | int new_nid; | 572 | int new_nid; |
573 | unsigned long ret = lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT); | 573 | unsigned long ret = __lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT); |
574 | 574 | ||
575 | /* retry over all memory */ | 575 | /* retry over all memory */ |
576 | if (!ret) | 576 | if (!ret) |
577 | ret = lmb_alloc_base(size, align, lmb_end_of_DRAM()); | 577 | ret = __lmb_alloc_base(size, align, lmb_end_of_DRAM()); |
578 | 578 | ||
579 | if (!ret) | 579 | if (!ret) |
580 | panic("numa.c: cannot allocate %lu bytes on node %d", | 580 | panic("numa.c: cannot allocate %lu bytes on node %d", |
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 82e4951826bc..91d25fb27f89 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
@@ -247,10 +247,6 @@ void stabs_alloc(void) | |||
247 | 247 | ||
248 | newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE, | 248 | newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE, |
249 | 1<<SID_SHIFT); | 249 | 1<<SID_SHIFT); |
250 | if (! newstab) | ||
251 | panic("Unable to allocate segment table for CPU %d.\n", | ||
252 | cpu); | ||
253 | |||
254 | newstab = (unsigned long)__va(newstab); | 250 | newstab = (unsigned long)__va(newstab); |
255 | 251 | ||
256 | memset((void *)newstab, 0, HW_PAGE_SIZE); | 252 | memset((void *)newstab, 0, HW_PAGE_SIZE); |
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile index 9d8b28ef3343..5c72367441a8 100644 --- a/arch/powerpc/platforms/83xx/Makefile +++ b/arch/powerpc/platforms/83xx/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the PowerPC 83xx linux kernel. | 2 | # Makefile for the PowerPC 83xx linux kernel. |
3 | # | 3 | # |
4 | obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o pci.o | 4 | obj-y := misc.o |
5 | obj-$(CONFIG_PCI) += pci.o | ||
6 | obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o | ||
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c new file mode 100644 index 000000000000..0eb3d99f1b93 --- /dev/null +++ b/arch/powerpc/platforms/83xx/misc.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * misc setup functions for MPC83xx | ||
3 | * | ||
4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/stddef.h> | ||
14 | #include <linux/kernel.h> | ||
15 | |||
16 | #include <asm/io.h> | ||
17 | #include <asm/hw_irq.h> | ||
18 | #include <sysdev/fsl_soc.h> | ||
19 | |||
20 | #include "mpc83xx.h" | ||
21 | |||
22 | void mpc83xx_restart(char *cmd) | ||
23 | { | ||
24 | #define RST_OFFSET 0x00000900 | ||
25 | #define RST_PROT_REG 0x00000018 | ||
26 | #define RST_CTRL_REG 0x0000001c | ||
27 | __be32 __iomem *reg; | ||
28 | |||
29 | /* map reset register space */ | ||
30 | reg = ioremap(get_immrbase() + 0x900, 0xff); | ||
31 | |||
32 | local_irq_disable(); | ||
33 | |||
34 | /* enable software reset "RSTE" */ | ||
35 | out_be32(reg + (RST_PROT_REG >> 2), 0x52535445); | ||
36 | |||
37 | /* set software hard reset */ | ||
38 | out_be32(reg + (RST_CTRL_REG >> 2), 0x52535445); | ||
39 | for (;;) ; | ||
40 | } | ||
41 | |||
42 | long __init mpc83xx_time_init(void) | ||
43 | { | ||
44 | #define SPCR_OFFSET 0x00000110 | ||
45 | #define SPCR_TBEN 0x00400000 | ||
46 | __be32 __iomem *spcr = ioremap(get_immrbase() + SPCR_OFFSET, 4); | ||
47 | __be32 tmp; | ||
48 | |||
49 | tmp = in_be32(spcr); | ||
50 | out_be32(spcr, tmp | SPCR_TBEN); | ||
51 | |||
52 | iounmap(spcr); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c index 2098dd05a773..7c18b4cd5db4 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.c +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c | |||
@@ -24,22 +24,15 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/seq_file.h> | 25 | #include <linux/seq_file.h> |
26 | #include <linux/root_dev.h> | 26 | #include <linux/root_dev.h> |
27 | #include <linux/module.h> | ||
28 | #include <linux/fsl_devices.h> | ||
29 | 27 | ||
30 | #include <asm/system.h> | 28 | #include <asm/system.h> |
31 | #include <asm/pgtable.h> | ||
32 | #include <asm/page.h> | ||
33 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
34 | #include <asm/time.h> | 30 | #include <asm/time.h> |
35 | #include <asm/io.h> | 31 | #include <asm/io.h> |
36 | #include <asm/machdep.h> | 32 | #include <asm/machdep.h> |
37 | #include <asm/ipic.h> | 33 | #include <asm/ipic.h> |
38 | #include <asm/bootinfo.h> | 34 | #include <asm/bootinfo.h> |
39 | #include <asm/pci-bridge.h> | ||
40 | #include <asm/mpc83xx.h> | ||
41 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
42 | #include <mm/mmu_decl.h> | ||
43 | #include <asm/prom.h> | 36 | #include <asm/prom.h> |
44 | #include <asm/udbg.h> | 37 | #include <asm/udbg.h> |
45 | #include <sysdev/fsl_soc.h> | 38 | #include <sysdev/fsl_soc.h> |
@@ -52,8 +45,6 @@ unsigned long isa_mem_base = 0; | |||
52 | #endif | 45 | #endif |
53 | 46 | ||
54 | #ifdef CONFIG_PCI | 47 | #ifdef CONFIG_PCI |
55 | extern int mpc83xx_pci2_busno; | ||
56 | |||
57 | static int | 48 | static int |
58 | mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | 49 | mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) |
59 | { | 50 | { |
@@ -78,26 +69,14 @@ mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | |||
78 | const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; | 69 | const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; |
79 | return PCI_IRQ_TABLE_LOOKUP; | 70 | return PCI_IRQ_TABLE_LOOKUP; |
80 | } | 71 | } |
81 | 72 | #endif /* CONFIG_PCI */ | |
82 | static int | ||
83 | mpc83xx_exclude_device(u_char bus, u_char devfn) | ||
84 | { | ||
85 | if (bus == 0 && PCI_SLOT(devfn) == 0) | ||
86 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
87 | if (mpc83xx_pci2_busno) | ||
88 | if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0) | ||
89 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
90 | return PCIBIOS_SUCCESSFUL; | ||
91 | } | ||
92 | #endif /* CONFIG_PCI */ | ||
93 | 73 | ||
94 | /* ************************************************************************ | 74 | /* ************************************************************************ |
95 | * | 75 | * |
96 | * Setup the architecture | 76 | * Setup the architecture |
97 | * | 77 | * |
98 | */ | 78 | */ |
99 | static void __init | 79 | static void __init mpc834x_sys_setup_arch(void) |
100 | mpc834x_sys_setup_arch(void) | ||
101 | { | 80 | { |
102 | struct device_node *np; | 81 | struct device_node *np; |
103 | 82 | ||
@@ -106,14 +85,14 @@ mpc834x_sys_setup_arch(void) | |||
106 | 85 | ||
107 | np = of_find_node_by_type(NULL, "cpu"); | 86 | np = of_find_node_by_type(NULL, "cpu"); |
108 | if (np != 0) { | 87 | if (np != 0) { |
109 | unsigned int *fp = (int *) get_property(np, "clock-frequency", NULL); | 88 | unsigned int *fp = |
89 | (int *)get_property(np, "clock-frequency", NULL); | ||
110 | if (fp != 0) | 90 | if (fp != 0) |
111 | loops_per_jiffy = *fp / HZ; | 91 | loops_per_jiffy = *fp / HZ; |
112 | else | 92 | else |
113 | loops_per_jiffy = 50000000 / HZ; | 93 | loops_per_jiffy = 50000000 / HZ; |
114 | of_node_put(np); | 94 | of_node_put(np); |
115 | } | 95 | } |
116 | |||
117 | #ifdef CONFIG_PCI | 96 | #ifdef CONFIG_PCI |
118 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 97 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
119 | add_bridge(np); | 98 | add_bridge(np); |
@@ -124,14 +103,13 @@ mpc834x_sys_setup_arch(void) | |||
124 | #endif | 103 | #endif |
125 | 104 | ||
126 | #ifdef CONFIG_ROOT_NFS | 105 | #ifdef CONFIG_ROOT_NFS |
127 | ROOT_DEV = Root_NFS; | 106 | ROOT_DEV = Root_NFS; |
128 | #else | 107 | #else |
129 | ROOT_DEV = Root_HDA1; | 108 | ROOT_DEV = Root_HDA1; |
130 | #endif | 109 | #endif |
131 | } | 110 | } |
132 | 111 | ||
133 | void __init | 112 | void __init mpc834x_sys_init_IRQ(void) |
134 | mpc834x_sys_init_IRQ(void) | ||
135 | { | 113 | { |
136 | u8 senses[8] = { | 114 | u8 senses[8] = { |
137 | 0, /* EXT 0 */ | 115 | 0, /* EXT 0 */ |
@@ -160,64 +138,27 @@ mpc834x_sys_init_IRQ(void) | |||
160 | } | 138 | } |
161 | 139 | ||
162 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) | 140 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) |
163 | extern ulong ds1374_get_rtc_time(void); | 141 | extern ulong ds1374_get_rtc_time(void); |
164 | extern int ds1374_set_rtc_time(ulong); | 142 | extern int ds1374_set_rtc_time(ulong); |
165 | 143 | ||
166 | static int __init | 144 | static int __init mpc834x_rtc_hookup(void) |
167 | mpc834x_rtc_hookup(void) | ||
168 | { | 145 | { |
169 | struct timespec tv; | 146 | struct timespec tv; |
170 | 147 | ||
171 | ppc_md.get_rtc_time = ds1374_get_rtc_time; | 148 | ppc_md.get_rtc_time = ds1374_get_rtc_time; |
172 | ppc_md.set_rtc_time = ds1374_set_rtc_time; | 149 | ppc_md.set_rtc_time = ds1374_set_rtc_time; |
173 | 150 | ||
174 | tv.tv_nsec = 0; | 151 | tv.tv_nsec = 0; |
175 | tv.tv_sec = (ppc_md.get_rtc_time)(); | 152 | tv.tv_sec = (ppc_md.get_rtc_time) (); |
176 | do_settimeofday(&tv); | 153 | do_settimeofday(&tv); |
177 | 154 | ||
178 | return 0; | 155 | return 0; |
179 | } | 156 | } |
157 | |||
180 | late_initcall(mpc834x_rtc_hookup); | 158 | late_initcall(mpc834x_rtc_hookup); |
181 | #endif | 159 | #endif |
182 | 160 | ||
183 | static void | 161 | void __init platform_init(void) |
184 | mpc83xx_restart(char *cmd) | ||
185 | { | ||
186 | #define RST_OFFSET 0x00000900 | ||
187 | #define RST_PROT_REG 0x00000018 | ||
188 | #define RST_CTRL_REG 0x0000001c | ||
189 | __be32 __iomem *reg; | ||
190 | |||
191 | // map reset register space | ||
192 | reg = ioremap(get_immrbase() + 0x900, 0xff); | ||
193 | |||
194 | local_irq_disable(); | ||
195 | |||
196 | /* enable software reset "RSTE" */ | ||
197 | out_be32(reg + (RST_PROT_REG >> 2), 0x52535445); | ||
198 | |||
199 | /* set software hard reset */ | ||
200 | out_be32(reg + (RST_CTRL_REG >> 2), 0x52535445); | ||
201 | for(;;); | ||
202 | } | ||
203 | |||
204 | static long __init | ||
205 | mpc83xx_time_init(void) | ||
206 | { | ||
207 | #define SPCR_OFFSET 0x00000110 | ||
208 | #define SPCR_TBEN 0x00400000 | ||
209 | __be32 __iomem *spcr = ioremap(get_immrbase() + SPCR_OFFSET, 4); | ||
210 | __be32 tmp; | ||
211 | |||
212 | tmp = in_be32(spcr); | ||
213 | out_be32(spcr, tmp|SPCR_TBEN); | ||
214 | |||
215 | iounmap(spcr); | ||
216 | |||
217 | return 0; | ||
218 | } | ||
219 | void __init | ||
220 | platform_init(void) | ||
221 | { | 162 | { |
222 | /* setup the PowerPC module struct */ | 163 | /* setup the PowerPC module struct */ |
223 | ppc_md.setup_arch = mpc834x_sys_setup_arch; | 164 | ppc_md.setup_arch = mpc834x_sys_setup_arch; |
@@ -239,5 +180,3 @@ platform_init(void) | |||
239 | 180 | ||
240 | return; | 181 | return; |
241 | } | 182 | } |
242 | |||
243 | |||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.h b/arch/powerpc/platforms/83xx/mpc834x_sys.h index e4ca39f6a862..fedecb73f7ff 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.h +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.h | |||
@@ -20,4 +20,4 @@ | |||
20 | #define PIRQC MPC83xx_IRQ_EXT6 | 20 | #define PIRQC MPC83xx_IRQ_EXT6 |
21 | #define PIRQD MPC83xx_IRQ_EXT7 | 21 | #define PIRQD MPC83xx_IRQ_EXT7 |
22 | 22 | ||
23 | #endif /* __MACH_MPC83XX_SYS_H__ */ | 23 | #endif /* __MACH_MPC83XX_SYS_H__ */ |
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index ce9e66abef24..01cae106912b 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h | |||
@@ -10,5 +10,8 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | extern int add_bridge(struct device_node *dev); | 12 | extern int add_bridge(struct device_node *dev); |
13 | extern int mpc83xx_exclude_device(u_char bus, u_char devfn); | ||
14 | extern void mpc83xx_restart(char *cmd); | ||
15 | extern long mpc83xx_time_init(void); | ||
13 | 16 | ||
14 | #endif /* __MPC83XX_H__ */ | 17 | #endif /* __MPC83XX_H__ */ |
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c index 469cdacc5bd4..16f7d3b30e1d 100644 --- a/arch/powerpc/platforms/83xx/pci.c +++ b/arch/powerpc/platforms/83xx/pci.c | |||
@@ -36,7 +36,16 @@ | |||
36 | 36 | ||
37 | int mpc83xx_pci2_busno; | 37 | int mpc83xx_pci2_busno; |
38 | 38 | ||
39 | #ifdef CONFIG_PCI | 39 | int mpc83xx_exclude_device(u_char bus, u_char devfn) |
40 | { | ||
41 | if (bus == 0 && PCI_SLOT(devfn) == 0) | ||
42 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
43 | if (mpc83xx_pci2_busno) | ||
44 | if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0) | ||
45 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
46 | return PCIBIOS_SUCCESSFUL; | ||
47 | } | ||
48 | |||
40 | int __init add_bridge(struct device_node *dev) | 49 | int __init add_bridge(struct device_node *dev) |
41 | { | 50 | { |
42 | int len; | 51 | int len; |
@@ -52,7 +61,7 @@ int __init add_bridge(struct device_node *dev) | |||
52 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); | 61 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); |
53 | 62 | ||
54 | /* Get bus range if any */ | 63 | /* Get bus range if any */ |
55 | bus_range = (int *) get_property(dev, "bus-range", &len); | 64 | bus_range = (int *)get_property(dev, "bus-range", &len); |
56 | if (bus_range == NULL || len < 2 * sizeof(int)) { | 65 | if (bus_range == NULL || len < 2 * sizeof(int)) { |
57 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | 66 | printk(KERN_WARNING "Can't get bus-range for %s, assume" |
58 | " bus 0\n", dev->full_name); | 67 | " bus 0\n", dev->full_name); |
@@ -74,7 +83,7 @@ int __init add_bridge(struct device_node *dev) | |||
74 | if ((rsrc.start & 0xfffff) == 0x8500) { | 83 | if ((rsrc.start & 0xfffff) == 0x8500) { |
75 | setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304); | 84 | setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304); |
76 | } | 85 | } |
77 | /* PCI 2*/ | 86 | /* PCI 2 */ |
78 | if ((rsrc.start & 0xfffff) == 0x8600) { | 87 | if ((rsrc.start & 0xfffff) == 0x8600) { |
79 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); | 88 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); |
80 | primary = 0; | 89 | primary = 0; |
@@ -84,10 +93,10 @@ int __init add_bridge(struct device_node *dev) | |||
84 | 93 | ||
85 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " | 94 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " |
86 | "Firmware bus number: %d->%d\n", | 95 | "Firmware bus number: %d->%d\n", |
87 | rsrc.start, hose->first_busno, hose->last_busno); | 96 | rsrc.start, hose->first_busno, hose->last_busno); |
88 | 97 | ||
89 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", | 98 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", |
90 | hose, hose->cfg_addr, hose->cfg_data); | 99 | hose, hose->cfg_addr, hose->cfg_data); |
91 | 100 | ||
92 | /* Interpret the "ranges" property */ | 101 | /* Interpret the "ranges" property */ |
93 | /* This also maps the I/O region and sets isa_io/mem_base */ | 102 | /* This also maps the I/O region and sets isa_io/mem_base */ |
@@ -95,5 +104,3 @@ int __init add_bridge(struct device_node *dev) | |||
95 | 104 | ||
96 | return 0; | 105 | return 0; |
97 | } | 106 | } |
98 | |||
99 | #endif | ||
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile index 16031b565be4..3b998a393e3f 100644 --- a/arch/powerpc/platforms/cell/Makefile +++ b/arch/powerpc/platforms/cell/Makefile | |||
@@ -2,7 +2,7 @@ obj-y += interrupt.o iommu.o setup.o spider-pic.o | |||
2 | obj-y += pervasive.o | 2 | obj-y += pervasive.o |
3 | 3 | ||
4 | obj-$(CONFIG_SMP) += smp.o | 4 | obj-$(CONFIG_SMP) += smp.o |
5 | obj-$(CONFIG_SPU_FS) += spufs/ spu-base.o | 5 | obj-$(CONFIG_SPU_FS) += spu-base.o spufs/ |
6 | 6 | ||
7 | spu-base-y += spu_base.o spu_priv1.o | 7 | spu-base-y += spu_base.o spu_priv1.o |
8 | 8 | ||
diff --git a/arch/powerpc/platforms/chrp/chrp.h b/arch/powerpc/platforms/chrp/chrp.h index 3a2057fa314a..814f54742e0f 100644 --- a/arch/powerpc/platforms/chrp/chrp.h +++ b/arch/powerpc/platforms/chrp/chrp.h | |||
@@ -5,7 +5,6 @@ | |||
5 | extern void chrp_nvram_init(void); | 5 | extern void chrp_nvram_init(void); |
6 | extern void chrp_get_rtc_time(struct rtc_time *); | 6 | extern void chrp_get_rtc_time(struct rtc_time *); |
7 | extern int chrp_set_rtc_time(struct rtc_time *); | 7 | extern int chrp_set_rtc_time(struct rtc_time *); |
8 | extern void chrp_calibrate_decr(void); | ||
9 | extern long chrp_time_init(void); | 8 | extern long chrp_time_init(void); |
10 | 9 | ||
11 | extern void chrp_find_bridges(void); | 10 | extern void chrp_find_bridges(void); |
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 00c52f27ef4f..8ef279ad36ad 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
@@ -204,9 +204,11 @@ static void __init setup_peg2(struct pci_controller *hose, struct device_node *d | |||
204 | struct device_node *root = find_path_device("/"); | 204 | struct device_node *root = find_path_device("/"); |
205 | struct device_node *rtas; | 205 | struct device_node *rtas; |
206 | 206 | ||
207 | of_node_get(root); | ||
207 | rtas = of_find_node_by_name (root, "rtas"); | 208 | rtas = of_find_node_by_name (root, "rtas"); |
208 | if (rtas) { | 209 | if (rtas) { |
209 | hose->ops = &rtas_pci_ops; | 210 | hose->ops = &rtas_pci_ops; |
211 | of_node_put(rtas); | ||
210 | } else { | 212 | } else { |
211 | printk ("RTAS supporting Pegasos OF not found, please upgrade" | 213 | printk ("RTAS supporting Pegasos OF not found, please upgrade" |
212 | " your firmware\n"); | 214 | " your firmware\n"); |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 2dc87aa5962f..e1fadbf49150 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -506,7 +506,7 @@ void __init chrp_init(void) | |||
506 | ppc_md.halt = rtas_halt; | 506 | ppc_md.halt = rtas_halt; |
507 | 507 | ||
508 | ppc_md.time_init = chrp_time_init; | 508 | ppc_md.time_init = chrp_time_init; |
509 | ppc_md.calibrate_decr = chrp_calibrate_decr; | 509 | ppc_md.calibrate_decr = generic_calibrate_decr; |
510 | 510 | ||
511 | /* this may get overridden with rtas routines later... */ | 511 | /* this may get overridden with rtas routines later... */ |
512 | ppc_md.set_rtc_time = chrp_set_rtc_time; | 512 | ppc_md.set_rtc_time = chrp_set_rtc_time; |
diff --git a/arch/powerpc/platforms/chrp/time.c b/arch/powerpc/platforms/chrp/time.c index 36a0f97bb7b1..78df2e7ca88a 100644 --- a/arch/powerpc/platforms/chrp/time.c +++ b/arch/powerpc/platforms/chrp/time.c | |||
@@ -167,24 +167,3 @@ void chrp_get_rtc_time(struct rtc_time *tm) | |||
167 | tm->tm_mon = mon; | 167 | tm->tm_mon = mon; |
168 | tm->tm_year = year; | 168 | tm->tm_year = year; |
169 | } | 169 | } |
170 | |||
171 | |||
172 | void __init chrp_calibrate_decr(void) | ||
173 | { | ||
174 | struct device_node *cpu; | ||
175 | unsigned int freq, *fp; | ||
176 | |||
177 | /* | ||
178 | * The cpu node should have a timebase-frequency property | ||
179 | * to tell us the rate at which the decrementer counts. | ||
180 | */ | ||
181 | freq = 16666000; /* hardcoded default */ | ||
182 | cpu = find_type_devices("cpu"); | ||
183 | if (cpu != 0) { | ||
184 | fp = (unsigned int *) | ||
185 | get_property(cpu, "timebase-frequency", NULL); | ||
186 | if (fp != 0) | ||
187 | freq = *fp; | ||
188 | } | ||
189 | ppc_tb_freq = freq; | ||
190 | } | ||
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/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 89c4c3636161..616b1e3ebe04 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -88,11 +88,10 @@ int ppc_override_l2cr = 0; | |||
88 | int ppc_override_l2cr_value; | 88 | int ppc_override_l2cr_value; |
89 | int has_l2cache = 0; | 89 | int has_l2cache = 0; |
90 | 90 | ||
91 | int pmac_newworld = 1; | 91 | int pmac_newworld; |
92 | 92 | ||
93 | static int current_root_goodness = -1; | 93 | static int current_root_goodness = -1; |
94 | 94 | ||
95 | extern int pmac_newworld; | ||
96 | extern struct machdep_calls pmac_md; | 95 | extern struct machdep_calls pmac_md; |
97 | 96 | ||
98 | #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */ | 97 | #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */ |
@@ -310,9 +309,10 @@ static void __init pmac_setup_arch(void) | |||
310 | for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; ) | 309 | for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; ) |
311 | if (get_property(ic, "interrupt-controller", NULL)) | 310 | if (get_property(ic, "interrupt-controller", NULL)) |
312 | break; | 311 | break; |
313 | pmac_newworld = (ic != NULL); | 312 | if (ic) { |
314 | if (ic) | 313 | pmac_newworld = 1; |
315 | of_node_put(ic); | 314 | of_node_put(ic); |
315 | } | ||
316 | 316 | ||
317 | /* Lookup PCI hosts */ | 317 | /* Lookup PCI hosts */ |
318 | pmac_pci_init(); | 318 | pmac_pci_init(); |
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/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index da6cebaf72cd..9edeca83f434 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -585,7 +585,7 @@ static int pSeries_pci_probe_mode(struct pci_bus *bus) | |||
585 | static void pseries_kexec_cpu_down(int crash_shutdown, int secondary) | 585 | static void pseries_kexec_cpu_down(int crash_shutdown, int secondary) |
586 | { | 586 | { |
587 | /* Don't risk a hypervisor call if we're crashing */ | 587 | /* Don't risk a hypervisor call if we're crashing */ |
588 | if (!crash_shutdown) { | 588 | if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { |
589 | unsigned long vpa = __pa(get_lppaca()); | 589 | unsigned long vpa = __pa(get_lppaca()); |
590 | 590 | ||
591 | if (unregister_vpa(hard_smp_processor_id(), vpa)) { | 591 | if (unregister_vpa(hard_smp_processor_id(), vpa)) { |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 977de9db8754..929ad2333aab 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -194,8 +194,6 @@ static int dart_init(struct device_node *dart_node) | |||
194 | * prefetching into invalid pages and corrupting data | 194 | * prefetching into invalid pages and corrupting data |
195 | */ | 195 | */ |
196 | tmp = lmb_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE); | 196 | tmp = lmb_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE); |
197 | if (!tmp) | ||
198 | panic("DART: Cannot allocate spare page!"); | ||
199 | dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) & | 197 | dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) & |
200 | DARTMAP_RPNMASK); | 198 | DARTMAP_RPNMASK); |
201 | 199 | ||
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 064c9de47732..ceb584682fa3 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -40,7 +40,7 @@ phys_addr_t get_immrbase(void) | |||
40 | return immrbase; | 40 | return immrbase; |
41 | 41 | ||
42 | soc = of_find_node_by_type(NULL, "soc"); | 42 | soc = of_find_node_by_type(NULL, "soc"); |
43 | if (soc != 0) { | 43 | if (soc) { |
44 | unsigned int size; | 44 | unsigned int size; |
45 | void *prop = get_property(soc, "reg", &size); | 45 | void *prop = get_property(soc, "reg", &size); |
46 | immrbase = of_translate_address(soc, prop); | 46 | immrbase = of_translate_address(soc, prop); |
@@ -49,21 +49,20 @@ phys_addr_t get_immrbase(void) | |||
49 | 49 | ||
50 | return immrbase; | 50 | return immrbase; |
51 | } | 51 | } |
52 | EXPORT_SYMBOL(get_immrbase); | ||
53 | 52 | ||
54 | static const char * gfar_tx_intr = "tx"; | 53 | EXPORT_SYMBOL(get_immrbase); |
55 | static const char * gfar_rx_intr = "rx"; | ||
56 | static const char * gfar_err_intr = "error"; | ||
57 | 54 | ||
58 | static int __init gfar_of_init(void) | 55 | static int __init gfar_mdio_of_init(void) |
59 | { | 56 | { |
60 | struct device_node *np; | 57 | struct device_node *np; |
61 | unsigned int i; | 58 | unsigned int i; |
62 | struct platform_device *mdio_dev, *gfar_dev; | 59 | struct platform_device *mdio_dev; |
63 | struct resource res; | 60 | struct resource res; |
64 | int ret; | 61 | int ret; |
65 | 62 | ||
66 | for (np = NULL, i = 0; (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL; i++) { | 63 | for (np = NULL, i = 0; |
64 | (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL; | ||
65 | i++) { | ||
67 | int k; | 66 | int k; |
68 | struct device_node *child = NULL; | 67 | struct device_node *child = NULL; |
69 | struct gianfar_mdio_data mdio_data; | 68 | struct gianfar_mdio_data mdio_data; |
@@ -73,12 +72,14 @@ static int __init gfar_of_init(void) | |||
73 | 72 | ||
74 | ret = of_address_to_resource(np, 0, &res); | 73 | ret = of_address_to_resource(np, 0, &res); |
75 | if (ret) | 74 | if (ret) |
76 | goto mdio_err; | 75 | goto err; |
77 | 76 | ||
78 | mdio_dev = platform_device_register_simple("fsl-gianfar_mdio", res.start, &res, 1); | 77 | mdio_dev = |
78 | platform_device_register_simple("fsl-gianfar_mdio", | ||
79 | res.start, &res, 1); | ||
79 | if (IS_ERR(mdio_dev)) { | 80 | if (IS_ERR(mdio_dev)) { |
80 | ret = PTR_ERR(mdio_dev); | 81 | ret = PTR_ERR(mdio_dev); |
81 | goto mdio_err; | 82 | goto err; |
82 | } | 83 | } |
83 | 84 | ||
84 | for (k = 0; k < 32; k++) | 85 | for (k = 0; k < 32; k++) |
@@ -86,17 +87,44 @@ static int __init gfar_of_init(void) | |||
86 | 87 | ||
87 | while ((child = of_get_next_child(np, child)) != NULL) { | 88 | while ((child = of_get_next_child(np, child)) != NULL) { |
88 | if (child->n_intrs) { | 89 | if (child->n_intrs) { |
89 | u32 *id = (u32 *) get_property(child, "reg", NULL); | 90 | u32 *id = |
91 | (u32 *) get_property(child, "reg", NULL); | ||
90 | mdio_data.irq[*id] = child->intrs[0].line; | 92 | mdio_data.irq[*id] = child->intrs[0].line; |
91 | } | 93 | } |
92 | } | 94 | } |
93 | 95 | ||
94 | ret = platform_device_add_data(mdio_dev, &mdio_data, sizeof(struct gianfar_mdio_data)); | 96 | ret = |
97 | platform_device_add_data(mdio_dev, &mdio_data, | ||
98 | sizeof(struct gianfar_mdio_data)); | ||
95 | if (ret) | 99 | if (ret) |
96 | goto mdio_unreg; | 100 | goto unreg; |
97 | } | 101 | } |
98 | 102 | ||
99 | for (np = NULL, i = 0; (np = of_find_compatible_node(np, "network", "gianfar")) != NULL; i++) { | 103 | return 0; |
104 | |||
105 | unreg: | ||
106 | platform_device_unregister(mdio_dev); | ||
107 | err: | ||
108 | return ret; | ||
109 | } | ||
110 | |||
111 | arch_initcall(gfar_mdio_of_init); | ||
112 | |||
113 | static const char *gfar_tx_intr = "tx"; | ||
114 | static const char *gfar_rx_intr = "rx"; | ||
115 | static const char *gfar_err_intr = "error"; | ||
116 | |||
117 | static int __init gfar_of_init(void) | ||
118 | { | ||
119 | struct device_node *np; | ||
120 | unsigned int i; | ||
121 | struct platform_device *gfar_dev; | ||
122 | struct resource res; | ||
123 | int ret; | ||
124 | |||
125 | for (np = NULL, i = 0; | ||
126 | (np = of_find_compatible_node(np, "network", "gianfar")) != NULL; | ||
127 | i++) { | ||
100 | struct resource r[4]; | 128 | struct resource r[4]; |
101 | struct device_node *phy, *mdio; | 129 | struct device_node *phy, *mdio; |
102 | struct gianfar_platform_data gfar_data; | 130 | struct gianfar_platform_data gfar_data; |
@@ -110,7 +138,7 @@ static int __init gfar_of_init(void) | |||
110 | 138 | ||
111 | ret = of_address_to_resource(np, 0, &r[0]); | 139 | ret = of_address_to_resource(np, 0, &r[0]); |
112 | if (ret) | 140 | if (ret) |
113 | goto gfar_err; | 141 | goto err; |
114 | 142 | ||
115 | r[1].start = np->intrs[0].line; | 143 | r[1].start = np->intrs[0].line; |
116 | r[1].end = np->intrs[0].line; | 144 | r[1].end = np->intrs[0].line; |
@@ -133,11 +161,13 @@ static int __init gfar_of_init(void) | |||
133 | r[3].flags = IORESOURCE_IRQ; | 161 | r[3].flags = IORESOURCE_IRQ; |
134 | } | 162 | } |
135 | 163 | ||
136 | gfar_dev = platform_device_register_simple("fsl-gianfar", i, &r[0], np->n_intrs + 1); | 164 | gfar_dev = |
165 | platform_device_register_simple("fsl-gianfar", i, &r[0], | ||
166 | np->n_intrs + 1); | ||
137 | 167 | ||
138 | if (IS_ERR(gfar_dev)) { | 168 | if (IS_ERR(gfar_dev)) { |
139 | ret = PTR_ERR(gfar_dev); | 169 | ret = PTR_ERR(gfar_dev); |
140 | goto gfar_err; | 170 | goto err; |
141 | } | 171 | } |
142 | 172 | ||
143 | mac_addr = get_property(np, "address", NULL); | 173 | mac_addr = get_property(np, "address", NULL); |
@@ -145,26 +175,26 @@ static int __init gfar_of_init(void) | |||
145 | 175 | ||
146 | if (model && !strcasecmp(model, "TSEC")) | 176 | if (model && !strcasecmp(model, "TSEC")) |
147 | gfar_data.device_flags = | 177 | gfar_data.device_flags = |
148 | FSL_GIANFAR_DEV_HAS_GIGABIT | | 178 | FSL_GIANFAR_DEV_HAS_GIGABIT | |
149 | FSL_GIANFAR_DEV_HAS_COALESCE | | 179 | FSL_GIANFAR_DEV_HAS_COALESCE | |
150 | FSL_GIANFAR_DEV_HAS_RMON | | 180 | FSL_GIANFAR_DEV_HAS_RMON | |
151 | FSL_GIANFAR_DEV_HAS_MULTI_INTR; | 181 | FSL_GIANFAR_DEV_HAS_MULTI_INTR; |
152 | if (model && !strcasecmp(model, "eTSEC")) | 182 | if (model && !strcasecmp(model, "eTSEC")) |
153 | gfar_data.device_flags = | 183 | gfar_data.device_flags = |
154 | FSL_GIANFAR_DEV_HAS_GIGABIT | | 184 | FSL_GIANFAR_DEV_HAS_GIGABIT | |
155 | FSL_GIANFAR_DEV_HAS_COALESCE | | 185 | FSL_GIANFAR_DEV_HAS_COALESCE | |
156 | FSL_GIANFAR_DEV_HAS_RMON | | 186 | FSL_GIANFAR_DEV_HAS_RMON | |
157 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | | 187 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | |
158 | FSL_GIANFAR_DEV_HAS_CSUM | | 188 | FSL_GIANFAR_DEV_HAS_CSUM | |
159 | FSL_GIANFAR_DEV_HAS_VLAN | | 189 | FSL_GIANFAR_DEV_HAS_VLAN | |
160 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; | 190 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; |
161 | 191 | ||
162 | ph = (phandle *) get_property(np, "phy-handle", NULL); | 192 | ph = (phandle *) get_property(np, "phy-handle", NULL); |
163 | phy = of_find_node_by_phandle(*ph); | 193 | phy = of_find_node_by_phandle(*ph); |
164 | 194 | ||
165 | if (phy == NULL) { | 195 | if (phy == NULL) { |
166 | ret = -ENODEV; | 196 | ret = -ENODEV; |
167 | goto gfar_unreg; | 197 | goto unreg; |
168 | } | 198 | } |
169 | 199 | ||
170 | mdio = of_get_parent(phy); | 200 | mdio = of_get_parent(phy); |
@@ -174,7 +204,7 @@ static int __init gfar_of_init(void) | |||
174 | if (ret) { | 204 | if (ret) { |
175 | of_node_put(phy); | 205 | of_node_put(phy); |
176 | of_node_put(mdio); | 206 | of_node_put(mdio); |
177 | goto gfar_unreg; | 207 | goto unreg; |
178 | } | 208 | } |
179 | 209 | ||
180 | gfar_data.phy_id = *id; | 210 | gfar_data.phy_id = *id; |
@@ -183,23 +213,22 @@ static int __init gfar_of_init(void) | |||
183 | of_node_put(phy); | 213 | of_node_put(phy); |
184 | of_node_put(mdio); | 214 | of_node_put(mdio); |
185 | 215 | ||
186 | ret = platform_device_add_data(gfar_dev, &gfar_data, sizeof(struct gianfar_platform_data)); | 216 | ret = |
217 | platform_device_add_data(gfar_dev, &gfar_data, | ||
218 | sizeof(struct | ||
219 | gianfar_platform_data)); | ||
187 | if (ret) | 220 | if (ret) |
188 | goto gfar_unreg; | 221 | goto unreg; |
189 | } | 222 | } |
190 | 223 | ||
191 | return 0; | 224 | return 0; |
192 | 225 | ||
193 | mdio_unreg: | 226 | unreg: |
194 | platform_device_unregister(mdio_dev); | ||
195 | mdio_err: | ||
196 | return ret; | ||
197 | |||
198 | gfar_unreg: | ||
199 | platform_device_unregister(gfar_dev); | 227 | platform_device_unregister(gfar_dev); |
200 | gfar_err: | 228 | err: |
201 | return ret; | 229 | return ret; |
202 | } | 230 | } |
231 | |||
203 | arch_initcall(gfar_of_init); | 232 | arch_initcall(gfar_of_init); |
204 | 233 | ||
205 | static int __init fsl_i2c_of_init(void) | 234 | static int __init fsl_i2c_of_init(void) |
@@ -209,17 +238,19 @@ static int __init fsl_i2c_of_init(void) | |||
209 | struct platform_device *i2c_dev; | 238 | struct platform_device *i2c_dev; |
210 | int ret; | 239 | int ret; |
211 | 240 | ||
212 | for (np = NULL, i = 0; (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; i++) { | 241 | for (np = NULL, i = 0; |
242 | (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; | ||
243 | i++) { | ||
213 | struct resource r[2]; | 244 | struct resource r[2]; |
214 | struct fsl_i2c_platform_data i2c_data; | 245 | struct fsl_i2c_platform_data i2c_data; |
215 | unsigned char * flags = NULL; | 246 | unsigned char *flags = NULL; |
216 | 247 | ||
217 | memset(&r, 0, sizeof(r)); | 248 | memset(&r, 0, sizeof(r)); |
218 | memset(&i2c_data, 0, sizeof(i2c_data)); | 249 | memset(&i2c_data, 0, sizeof(i2c_data)); |
219 | 250 | ||
220 | ret = of_address_to_resource(np, 0, &r[0]); | 251 | ret = of_address_to_resource(np, 0, &r[0]); |
221 | if (ret) | 252 | if (ret) |
222 | goto i2c_err; | 253 | goto err; |
223 | 254 | ||
224 | r[1].start = np->intrs[0].line; | 255 | r[1].start = np->intrs[0].line; |
225 | r[1].end = np->intrs[0].line; | 256 | r[1].end = np->intrs[0].line; |
@@ -228,7 +259,7 @@ static int __init fsl_i2c_of_init(void) | |||
228 | i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); | 259 | i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); |
229 | if (IS_ERR(i2c_dev)) { | 260 | if (IS_ERR(i2c_dev)) { |
230 | ret = PTR_ERR(i2c_dev); | 261 | ret = PTR_ERR(i2c_dev); |
231 | goto i2c_err; | 262 | goto err; |
232 | } | 263 | } |
233 | 264 | ||
234 | i2c_data.device_flags = 0; | 265 | i2c_data.device_flags = 0; |
@@ -240,18 +271,22 @@ static int __init fsl_i2c_of_init(void) | |||
240 | if (flags) | 271 | if (flags) |
241 | i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200; | 272 | i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200; |
242 | 273 | ||
243 | ret = platform_device_add_data(i2c_dev, &i2c_data, sizeof(struct fsl_i2c_platform_data)); | 274 | ret = |
275 | platform_device_add_data(i2c_dev, &i2c_data, | ||
276 | sizeof(struct | ||
277 | fsl_i2c_platform_data)); | ||
244 | if (ret) | 278 | if (ret) |
245 | goto i2c_unreg; | 279 | goto unreg; |
246 | } | 280 | } |
247 | 281 | ||
248 | return 0; | 282 | return 0; |
249 | 283 | ||
250 | i2c_unreg: | 284 | unreg: |
251 | platform_device_unregister(i2c_dev); | 285 | platform_device_unregister(i2c_dev); |
252 | i2c_err: | 286 | err: |
253 | return ret; | 287 | return ret; |
254 | } | 288 | } |
289 | |||
255 | arch_initcall(fsl_i2c_of_init); | 290 | arch_initcall(fsl_i2c_of_init); |
256 | 291 | ||
257 | #ifdef CONFIG_PPC_83xx | 292 | #ifdef CONFIG_PPC_83xx |
@@ -267,51 +302,192 @@ static int __init mpc83xx_wdt_init(void) | |||
267 | 302 | ||
268 | if (!np) { | 303 | if (!np) { |
269 | ret = -ENODEV; | 304 | ret = -ENODEV; |
270 | goto mpc83xx_wdt_nodev; | 305 | goto nodev; |
271 | } | 306 | } |
272 | 307 | ||
273 | soc = of_find_node_by_type(NULL, "soc"); | 308 | soc = of_find_node_by_type(NULL, "soc"); |
274 | 309 | ||
275 | if (!soc) { | 310 | if (!soc) { |
276 | ret = -ENODEV; | 311 | ret = -ENODEV; |
277 | goto mpc83xx_wdt_nosoc; | 312 | goto nosoc; |
278 | } | 313 | } |
279 | 314 | ||
280 | freq = (unsigned int *)get_property(soc, "bus-frequency", NULL); | 315 | freq = (unsigned int *)get_property(soc, "bus-frequency", NULL); |
281 | if (!freq) { | 316 | if (!freq) { |
282 | ret = -ENODEV; | 317 | ret = -ENODEV; |
283 | goto mpc83xx_wdt_err; | 318 | goto err; |
284 | } | 319 | } |
285 | 320 | ||
286 | memset(&r, 0, sizeof(r)); | 321 | memset(&r, 0, sizeof(r)); |
287 | 322 | ||
288 | ret = of_address_to_resource(np, 0, &r); | 323 | ret = of_address_to_resource(np, 0, &r); |
289 | if (ret) | 324 | if (ret) |
290 | goto mpc83xx_wdt_err; | 325 | goto err; |
291 | 326 | ||
292 | dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1); | 327 | dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1); |
293 | if (IS_ERR(dev)) { | 328 | if (IS_ERR(dev)) { |
294 | ret = PTR_ERR(dev); | 329 | ret = PTR_ERR(dev); |
295 | goto mpc83xx_wdt_err; | 330 | goto err; |
296 | } | 331 | } |
297 | 332 | ||
298 | ret = platform_device_add_data(dev, freq, sizeof(int)); | 333 | ret = platform_device_add_data(dev, freq, sizeof(int)); |
299 | if (ret) | 334 | if (ret) |
300 | goto mpc83xx_wdt_unreg; | 335 | goto unreg; |
301 | 336 | ||
302 | of_node_put(soc); | 337 | of_node_put(soc); |
303 | of_node_put(np); | 338 | of_node_put(np); |
304 | 339 | ||
305 | return 0; | 340 | return 0; |
306 | 341 | ||
307 | mpc83xx_wdt_unreg: | 342 | unreg: |
308 | platform_device_unregister(dev); | 343 | platform_device_unregister(dev); |
309 | mpc83xx_wdt_err: | 344 | err: |
310 | of_node_put(soc); | 345 | of_node_put(soc); |
311 | mpc83xx_wdt_nosoc: | 346 | nosoc: |
312 | of_node_put(np); | 347 | of_node_put(np); |
313 | mpc83xx_wdt_nodev: | 348 | nodev: |
314 | return ret; | 349 | return ret; |
315 | } | 350 | } |
351 | |||
316 | arch_initcall(mpc83xx_wdt_init); | 352 | arch_initcall(mpc83xx_wdt_init); |
317 | #endif | 353 | #endif |
354 | |||
355 | static enum fsl_usb2_phy_modes determine_usb_phy(char * phy_type) | ||
356 | { | ||
357 | if (!phy_type) | ||
358 | return FSL_USB2_PHY_NONE; | ||
359 | if (!strcasecmp(phy_type, "ulpi")) | ||
360 | return FSL_USB2_PHY_ULPI; | ||
361 | if (!strcasecmp(phy_type, "utmi")) | ||
362 | return FSL_USB2_PHY_UTMI; | ||
363 | if (!strcasecmp(phy_type, "utmi_wide")) | ||
364 | return FSL_USB2_PHY_UTMI_WIDE; | ||
365 | if (!strcasecmp(phy_type, "serial")) | ||
366 | return FSL_USB2_PHY_SERIAL; | ||
367 | |||
368 | return FSL_USB2_PHY_NONE; | ||
369 | } | ||
370 | |||
371 | static int __init fsl_usb_of_init(void) | ||
372 | { | ||
373 | struct device_node *np; | ||
374 | unsigned int i; | ||
375 | struct platform_device *usb_dev; | ||
376 | int ret; | ||
377 | |||
378 | for (np = NULL, i = 0; | ||
379 | (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL; | ||
380 | i++) { | ||
381 | struct resource r[2]; | ||
382 | struct fsl_usb2_platform_data usb_data; | ||
383 | unsigned char *prop = NULL; | ||
384 | |||
385 | memset(&r, 0, sizeof(r)); | ||
386 | memset(&usb_data, 0, sizeof(usb_data)); | ||
387 | |||
388 | ret = of_address_to_resource(np, 0, &r[0]); | ||
389 | if (ret) | ||
390 | goto err; | ||
391 | |||
392 | r[1].start = np->intrs[0].line; | ||
393 | r[1].end = np->intrs[0].line; | ||
394 | r[1].flags = IORESOURCE_IRQ; | ||
395 | |||
396 | usb_dev = | ||
397 | platform_device_register_simple("fsl-usb2-mph", i, r, 2); | ||
398 | if (IS_ERR(usb_dev)) { | ||
399 | ret = PTR_ERR(usb_dev); | ||
400 | goto err; | ||
401 | } | ||
402 | |||
403 | usb_dev->dev.coherent_dma_mask = 0xffffffffUL; | ||
404 | usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask; | ||
405 | |||
406 | usb_data.operating_mode = FSL_USB2_MPH_HOST; | ||
407 | |||
408 | prop = get_property(np, "port0", NULL); | ||
409 | if (prop) | ||
410 | usb_data.port_enables |= FSL_USB2_PORT0_ENABLED; | ||
411 | |||
412 | prop = get_property(np, "port1", NULL); | ||
413 | if (prop) | ||
414 | usb_data.port_enables |= FSL_USB2_PORT1_ENABLED; | ||
415 | |||
416 | prop = get_property(np, "phy_type", NULL); | ||
417 | usb_data.phy_mode = determine_usb_phy(prop); | ||
418 | |||
419 | ret = | ||
420 | platform_device_add_data(usb_dev, &usb_data, | ||
421 | sizeof(struct | ||
422 | fsl_usb2_platform_data)); | ||
423 | if (ret) | ||
424 | goto unreg; | ||
425 | } | ||
426 | |||
427 | return 0; | ||
428 | |||
429 | unreg: | ||
430 | platform_device_unregister(usb_dev); | ||
431 | err: | ||
432 | return ret; | ||
433 | } | ||
434 | |||
435 | arch_initcall(fsl_usb_of_init); | ||
436 | |||
437 | static int __init fsl_usb_dr_of_init(void) | ||
438 | { | ||
439 | struct device_node *np; | ||
440 | unsigned int i; | ||
441 | struct platform_device *usb_dev; | ||
442 | int ret; | ||
443 | |||
444 | for (np = NULL, i = 0; | ||
445 | (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL; | ||
446 | i++) { | ||
447 | struct resource r[2]; | ||
448 | struct fsl_usb2_platform_data usb_data; | ||
449 | unsigned char *prop = NULL; | ||
450 | |||
451 | memset(&r, 0, sizeof(r)); | ||
452 | memset(&usb_data, 0, sizeof(usb_data)); | ||
453 | |||
454 | ret = of_address_to_resource(np, 0, &r[0]); | ||
455 | if (ret) | ||
456 | goto err; | ||
457 | |||
458 | r[1].start = np->intrs[0].line; | ||
459 | r[1].end = np->intrs[0].line; | ||
460 | r[1].flags = IORESOURCE_IRQ; | ||
461 | |||
462 | usb_dev = | ||
463 | platform_device_register_simple("fsl-usb2-dr", i, r, 2); | ||
464 | if (IS_ERR(usb_dev)) { | ||
465 | ret = PTR_ERR(usb_dev); | ||
466 | goto err; | ||
467 | } | ||
468 | |||
469 | usb_dev->dev.coherent_dma_mask = 0xffffffffUL; | ||
470 | usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask; | ||
471 | |||
472 | usb_data.operating_mode = FSL_USB2_DR_HOST; | ||
473 | |||
474 | prop = get_property(np, "phy_type", NULL); | ||
475 | usb_data.phy_mode = determine_usb_phy(prop); | ||
476 | |||
477 | ret = | ||
478 | platform_device_add_data(usb_dev, &usb_data, | ||
479 | sizeof(struct | ||
480 | fsl_usb2_platform_data)); | ||
481 | if (ret) | ||
482 | goto unreg; | ||
483 | } | ||
484 | |||
485 | return 0; | ||
486 | |||
487 | unreg: | ||
488 | platform_device_unregister(usb_dev); | ||
489 | err: | ||
490 | return ret; | ||
491 | } | ||
492 | |||
493 | arch_initcall(fsl_usb_dr_of_init); | ||
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 11899f06bf06..54a0a9bb12dd 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -481,6 +481,53 @@ config WINCEPT | |||
481 | 481 | ||
482 | endchoice | 482 | endchoice |
483 | 483 | ||
484 | menu "Freescale Ethernet driver platform-specific options" | ||
485 | depends on FS_ENET | ||
486 | |||
487 | config MPC8xx_SECOND_ETH | ||
488 | bool "Second Ethernet channel" | ||
489 | depends on (MPC885ADS || MPC86XADS) | ||
490 | default y | ||
491 | help | ||
492 | This enables support for second Ethernet on MPC885ADS and MPC86xADS boards. | ||
493 | The latter will use SCC1, for 885ADS you can select it below. | ||
494 | |||
495 | choice | ||
496 | prompt "Second Ethernet channel" | ||
497 | depends on MPC8xx_SECOND_ETH | ||
498 | default MPC8xx_SECOND_ETH_FEC2 | ||
499 | |||
500 | config MPC8xx_SECOND_ETH_FEC2 | ||
501 | bool "FEC2" | ||
502 | depends on MPC885ADS | ||
503 | help | ||
504 | Enable FEC2 to serve as 2-nd Ethernet channel. Note that SMC2 | ||
505 | (often 2-nd UART) will not work if this is enabled. | ||
506 | |||
507 | config MPC8xx_SECOND_ETH_SCC1 | ||
508 | bool "SCC1" | ||
509 | depends on MPC86XADS | ||
510 | select MPC8xx_SCC_ENET_FIXED | ||
511 | help | ||
512 | Enable SCC1 to serve as 2-nd Ethernet channel. Note that SMC1 | ||
513 | (often 1-nd UART) will not work if this is enabled. | ||
514 | |||
515 | config MPC8xx_SECOND_ETH_SCC3 | ||
516 | bool "SCC3" | ||
517 | depends on MPC885ADS | ||
518 | help | ||
519 | Enable SCC3 to serve as 2-nd Ethernet channel. Note that SMC1 | ||
520 | (often 1-nd UART) will not work if this is enabled. | ||
521 | |||
522 | endchoice | ||
523 | |||
524 | config MPC8xx_SCC_ENET_FIXED | ||
525 | depends on MPC8xx_SECOND_ETH_SCC | ||
526 | default n | ||
527 | bool "Use fixed MII-less mode for SCC Ethernet" | ||
528 | |||
529 | endmenu | ||
530 | |||
484 | choice | 531 | choice |
485 | prompt "Machine Type" | 532 | prompt "Machine Type" |
486 | depends on 6xx || POWER3 | 533 | depends on 6xx || POWER3 |
diff --git a/arch/ppc/Kconfig.debug b/arch/ppc/Kconfig.debug index 61653cb60c4e..8cc75abf3d83 100644 --- a/arch/ppc/Kconfig.debug +++ b/arch/ppc/Kconfig.debug | |||
@@ -67,7 +67,7 @@ config SERIAL_TEXT_DEBUG | |||
67 | 67 | ||
68 | config PPC_OCP | 68 | config PPC_OCP |
69 | bool | 69 | bool |
70 | depends on IBM_OCP || XILINX_OCP | 70 | depends on IBM_OCP |
71 | default y | 71 | default y |
72 | 72 | ||
73 | endmenu | 73 | endmenu |
diff --git a/arch/ppc/boot/common/ns16550.c b/arch/ppc/boot/common/ns16550.c index 26818bbb6cff..4f00c93ac870 100644 --- a/arch/ppc/boot/common/ns16550.c +++ b/arch/ppc/boot/common/ns16550.c | |||
@@ -8,6 +8,9 @@ | |||
8 | #include <linux/serial_reg.h> | 8 | #include <linux/serial_reg.h> |
9 | #include <asm/serial.h> | 9 | #include <asm/serial.h> |
10 | 10 | ||
11 | #if defined(CONFIG_XILINX_VIRTEX) | ||
12 | #include <platforms/4xx/xparameters/xparameters.h> | ||
13 | #endif | ||
11 | #include "nonstdio.h" | 14 | #include "nonstdio.h" |
12 | #include "serial.h" | 15 | #include "serial.h" |
13 | 16 | ||
diff --git a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile index 9533f8de238f..28be01b99c44 100644 --- a/arch/ppc/boot/simple/Makefile +++ b/arch/ppc/boot/simple/Makefile | |||
@@ -192,6 +192,7 @@ boot-$(CONFIG_8xx) += embed_config.o | |||
192 | boot-$(CONFIG_8260) += embed_config.o | 192 | boot-$(CONFIG_8260) += embed_config.o |
193 | boot-$(CONFIG_EP405) += embed_config.o | 193 | boot-$(CONFIG_EP405) += embed_config.o |
194 | boot-$(CONFIG_XILINX_ML300) += embed_config.o | 194 | boot-$(CONFIG_XILINX_ML300) += embed_config.o |
195 | boot-$(CONFIG_XILINX_ML403) += embed_config.o | ||
195 | boot-$(CONFIG_BSEIP) += iic.o | 196 | boot-$(CONFIG_BSEIP) += iic.o |
196 | boot-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o | 197 | boot-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o |
197 | boot-$(CONFIG_MV64X60) += misc-mv64x60.o | 198 | boot-$(CONFIG_MV64X60) += misc-mv64x60.o |
diff --git a/arch/ppc/boot/simple/embed_config.c b/arch/ppc/boot/simple/embed_config.c index 491a691d10cc..3a51b1062940 100644 --- a/arch/ppc/boot/simple/embed_config.c +++ b/arch/ppc/boot/simple/embed_config.c | |||
@@ -21,6 +21,9 @@ | |||
21 | #ifdef CONFIG_40x | 21 | #ifdef CONFIG_40x |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #endif | 23 | #endif |
24 | #ifdef CONFIG_XILINX_VIRTEX | ||
25 | #include <platforms/4xx/xparameters/xparameters.h> | ||
26 | #endif | ||
24 | extern unsigned long timebase_period_ns; | 27 | extern unsigned long timebase_period_ns; |
25 | 28 | ||
26 | /* For those boards that don't provide one. | 29 | /* For those boards that don't provide one. |
@@ -742,7 +745,7 @@ embed_config(bd_t **bdp) | |||
742 | } | 745 | } |
743 | #endif /* WILLOW */ | 746 | #endif /* WILLOW */ |
744 | 747 | ||
745 | #ifdef CONFIG_XILINX_ML300 | 748 | #if defined(CONFIG_XILINX_ML300) || defined(CONFIG_XILINX_ML403) |
746 | void | 749 | void |
747 | embed_config(bd_t ** bdp) | 750 | embed_config(bd_t ** bdp) |
748 | { | 751 | { |
@@ -779,7 +782,7 @@ embed_config(bd_t ** bdp) | |||
779 | timebase_period_ns = 1000000000 / bd->bi_tbfreq; | 782 | timebase_period_ns = 1000000000 / bd->bi_tbfreq; |
780 | /* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */ | 783 | /* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */ |
781 | } | 784 | } |
782 | #endif /* CONFIG_XILINX_ML300 */ | 785 | #endif /* CONFIG_XILINX_ML300 || CONFIG_XILINX_ML403 */ |
783 | 786 | ||
784 | #ifdef CONFIG_IBM_OPENBIOS | 787 | #ifdef CONFIG_IBM_OPENBIOS |
785 | /* This could possibly work for all treeboot roms. | 788 | /* This could possibly work for all treeboot roms. |
diff --git a/arch/ppc/boot/simple/head.S b/arch/ppc/boot/simple/head.S index 5e4adc298bf9..119b9dc89587 100644 --- a/arch/ppc/boot/simple/head.S +++ b/arch/ppc/boot/simple/head.S | |||
@@ -65,6 +65,13 @@ start_: | |||
65 | */ | 65 | */ |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #if defined(CONFIG_XILINX_VIRTEX_4_FX) | ||
69 | /* PPC errata 213: only for Virtex-4 FX */ | ||
70 | mfccr0 0 | ||
71 | oris 0,0,0x50000000@h | ||
72 | mtccr0 0 | ||
73 | #endif | ||
74 | |||
68 | mflr r3 /* Save our actual starting address. */ | 75 | mflr r3 /* Save our actual starting address. */ |
69 | 76 | ||
70 | /* The following functions we call must not modify r3 or r4..... | 77 | /* The following functions we call must not modify r3 or r4..... |
diff --git a/arch/ppc/configs/ml300_defconfig b/arch/ppc/configs/ml300_defconfig new file mode 100644 index 000000000000..4a33aca948cc --- /dev/null +++ b/arch/ppc/configs/ml300_defconfig | |||
@@ -0,0 +1,739 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.16-rc1 | ||
4 | # Wed Jan 18 00:49:20 2006 | ||
5 | # | ||
6 | CONFIG_MMU=y | ||
7 | CONFIG_GENERIC_HARDIRQS=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_PPC=y | ||
11 | CONFIG_PPC32=y | ||
12 | CONFIG_GENERIC_NVRAM=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | |||
16 | # | ||
17 | # Code maturity level options | ||
18 | # | ||
19 | CONFIG_EXPERIMENTAL=y | ||
20 | CONFIG_CLEAN_COMPILE=y | ||
21 | CONFIG_BROKEN_ON_SMP=y | ||
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | |||
24 | # | ||
25 | # General setup | ||
26 | # | ||
27 | CONFIG_LOCALVERSION="" | ||
28 | CONFIG_LOCALVERSION_AUTO=y | ||
29 | # CONFIG_SWAP is not set | ||
30 | CONFIG_SYSVIPC=y | ||
31 | # CONFIG_POSIX_MQUEUE is not set | ||
32 | CONFIG_BSD_PROCESS_ACCT=y | ||
33 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
34 | CONFIG_SYSCTL=y | ||
35 | # CONFIG_AUDIT is not set | ||
36 | # CONFIG_IKCONFIG is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
39 | # CONFIG_EMBEDDED is not set | ||
40 | CONFIG_KALLSYMS=y | ||
41 | # CONFIG_KALLSYMS_ALL is not set | ||
42 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
43 | CONFIG_HOTPLUG=y | ||
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
46 | CONFIG_ELF_CORE=y | ||
47 | CONFIG_BASE_FULL=y | ||
48 | CONFIG_FUTEX=y | ||
49 | CONFIG_EPOLL=y | ||
50 | CONFIG_SHMEM=y | ||
51 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
52 | CONFIG_CC_ALIGN_LABELS=0 | ||
53 | CONFIG_CC_ALIGN_LOOPS=0 | ||
54 | CONFIG_CC_ALIGN_JUMPS=0 | ||
55 | CONFIG_SLAB=y | ||
56 | # CONFIG_TINY_SHMEM is not set | ||
57 | CONFIG_BASE_SMALL=0 | ||
58 | # CONFIG_SLOB is not set | ||
59 | |||
60 | # | ||
61 | # Loadable module support | ||
62 | # | ||
63 | CONFIG_MODULES=y | ||
64 | CONFIG_MODULE_UNLOAD=y | ||
65 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
66 | CONFIG_OBSOLETE_MODPARM=y | ||
67 | CONFIG_MODVERSIONS=y | ||
68 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
69 | CONFIG_KMOD=y | ||
70 | |||
71 | # | ||
72 | # Block layer | ||
73 | # | ||
74 | CONFIG_LBD=y | ||
75 | |||
76 | # | ||
77 | # IO Schedulers | ||
78 | # | ||
79 | CONFIG_IOSCHED_NOOP=y | ||
80 | CONFIG_IOSCHED_AS=y | ||
81 | CONFIG_IOSCHED_DEADLINE=y | ||
82 | CONFIG_IOSCHED_CFQ=y | ||
83 | CONFIG_DEFAULT_AS=y | ||
84 | # CONFIG_DEFAULT_DEADLINE is not set | ||
85 | # CONFIG_DEFAULT_CFQ is not set | ||
86 | # CONFIG_DEFAULT_NOOP is not set | ||
87 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
88 | |||
89 | # | ||
90 | # Processor | ||
91 | # | ||
92 | # CONFIG_6xx is not set | ||
93 | CONFIG_40x=y | ||
94 | # CONFIG_44x is not set | ||
95 | # CONFIG_POWER3 is not set | ||
96 | # CONFIG_8xx is not set | ||
97 | # CONFIG_E200 is not set | ||
98 | # CONFIG_E500 is not set | ||
99 | # CONFIG_MATH_EMULATION is not set | ||
100 | # CONFIG_KEXEC is not set | ||
101 | # CONFIG_CPU_FREQ is not set | ||
102 | CONFIG_4xx=y | ||
103 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
104 | |||
105 | # | ||
106 | # IBM 4xx options | ||
107 | # | ||
108 | # CONFIG_BUBINGA is not set | ||
109 | # CONFIG_CPCI405 is not set | ||
110 | # CONFIG_EP405 is not set | ||
111 | # CONFIG_REDWOOD_5 is not set | ||
112 | # CONFIG_REDWOOD_6 is not set | ||
113 | # CONFIG_SYCAMORE is not set | ||
114 | # CONFIG_WALNUT is not set | ||
115 | CONFIG_XILINX_ML300=y | ||
116 | CONFIG_IBM405_ERR77=y | ||
117 | CONFIG_IBM405_ERR51=y | ||
118 | CONFIG_XILINX_VIRTEX=y | ||
119 | CONFIG_EMBEDDEDBOOT=y | ||
120 | # CONFIG_PPC4xx_DMA is not set | ||
121 | CONFIG_PPC_GEN550=y | ||
122 | CONFIG_UART0_TTYS0=y | ||
123 | # CONFIG_UART0_TTYS1 is not set | ||
124 | CONFIG_NOT_COHERENT_CACHE=y | ||
125 | |||
126 | # | ||
127 | # Platform options | ||
128 | # | ||
129 | # CONFIG_PC_KEYBOARD is not set | ||
130 | # CONFIG_HIGHMEM is not set | ||
131 | # CONFIG_HZ_100 is not set | ||
132 | CONFIG_HZ_250=y | ||
133 | # CONFIG_HZ_1000 is not set | ||
134 | CONFIG_HZ=250 | ||
135 | CONFIG_PREEMPT_NONE=y | ||
136 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
137 | # CONFIG_PREEMPT is not set | ||
138 | CONFIG_SELECT_MEMORY_MODEL=y | ||
139 | CONFIG_FLATMEM_MANUAL=y | ||
140 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
141 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
142 | CONFIG_FLATMEM=y | ||
143 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
144 | # CONFIG_SPARSEMEM_STATIC is not set | ||
145 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
146 | CONFIG_BINFMT_ELF=y | ||
147 | # CONFIG_BINFMT_MISC is not set | ||
148 | CONFIG_CMDLINE_BOOL=y | ||
149 | CONFIG_CMDLINE="console=ttyS0,9600" | ||
150 | # CONFIG_PM is not set | ||
151 | # CONFIG_SOFTWARE_SUSPEND is not set | ||
152 | CONFIG_SECCOMP=y | ||
153 | CONFIG_ISA_DMA_API=y | ||
154 | |||
155 | # | ||
156 | # Bus options | ||
157 | # | ||
158 | # CONFIG_PPC_I8259 is not set | ||
159 | # CONFIG_PCI is not set | ||
160 | # CONFIG_PCI_DOMAINS is not set | ||
161 | |||
162 | # | ||
163 | # PCCARD (PCMCIA/CardBus) support | ||
164 | # | ||
165 | # CONFIG_PCCARD is not set | ||
166 | |||
167 | # | ||
168 | # Advanced setup | ||
169 | # | ||
170 | # CONFIG_ADVANCED_OPTIONS is not set | ||
171 | |||
172 | # | ||
173 | # Default settings for advanced configuration options are used | ||
174 | # | ||
175 | CONFIG_HIGHMEM_START=0xfe000000 | ||
176 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
177 | CONFIG_KERNEL_START=0xc0000000 | ||
178 | CONFIG_TASK_SIZE=0x80000000 | ||
179 | CONFIG_CONSISTENT_START=0xff100000 | ||
180 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
181 | CONFIG_BOOT_LOAD=0x00400000 | ||
182 | |||
183 | # | ||
184 | # Networking | ||
185 | # | ||
186 | CONFIG_NET=y | ||
187 | |||
188 | # | ||
189 | # Networking options | ||
190 | # | ||
191 | CONFIG_PACKET=y | ||
192 | CONFIG_PACKET_MMAP=y | ||
193 | CONFIG_UNIX=y | ||
194 | # CONFIG_NET_KEY is not set | ||
195 | CONFIG_INET=y | ||
196 | # CONFIG_IP_MULTICAST is not set | ||
197 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
198 | CONFIG_IP_FIB_HASH=y | ||
199 | CONFIG_IP_PNP=y | ||
200 | CONFIG_IP_PNP_DHCP=y | ||
201 | # CONFIG_IP_PNP_BOOTP is not set | ||
202 | # CONFIG_IP_PNP_RARP is not set | ||
203 | # CONFIG_NET_IPIP is not set | ||
204 | # CONFIG_NET_IPGRE is not set | ||
205 | # CONFIG_ARPD is not set | ||
206 | # CONFIG_SYN_COOKIES is not set | ||
207 | # CONFIG_INET_AH is not set | ||
208 | # CONFIG_INET_ESP is not set | ||
209 | # CONFIG_INET_IPCOMP is not set | ||
210 | # CONFIG_INET_TUNNEL is not set | ||
211 | CONFIG_INET_DIAG=y | ||
212 | CONFIG_INET_TCP_DIAG=y | ||
213 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
214 | CONFIG_TCP_CONG_BIC=y | ||
215 | # CONFIG_IPV6 is not set | ||
216 | # CONFIG_NETFILTER is not set | ||
217 | |||
218 | # | ||
219 | # DCCP Configuration (EXPERIMENTAL) | ||
220 | # | ||
221 | # CONFIG_IP_DCCP is not set | ||
222 | |||
223 | # | ||
224 | # SCTP Configuration (EXPERIMENTAL) | ||
225 | # | ||
226 | # CONFIG_IP_SCTP is not set | ||
227 | # CONFIG_ATM is not set | ||
228 | # CONFIG_BRIDGE is not set | ||
229 | # CONFIG_VLAN_8021Q is not set | ||
230 | # CONFIG_DECNET is not set | ||
231 | # CONFIG_LLC2 is not set | ||
232 | # CONFIG_IPX is not set | ||
233 | # CONFIG_ATALK is not set | ||
234 | # CONFIG_X25 is not set | ||
235 | # CONFIG_LAPB is not set | ||
236 | |||
237 | # | ||
238 | # TIPC Configuration (EXPERIMENTAL) | ||
239 | # | ||
240 | # CONFIG_TIPC is not set | ||
241 | # CONFIG_NET_DIVERT is not set | ||
242 | # CONFIG_ECONET is not set | ||
243 | # CONFIG_WAN_ROUTER is not set | ||
244 | |||
245 | # | ||
246 | # QoS and/or fair queueing | ||
247 | # | ||
248 | # CONFIG_NET_SCHED is not set | ||
249 | |||
250 | # | ||
251 | # Network testing | ||
252 | # | ||
253 | # CONFIG_NET_PKTGEN is not set | ||
254 | # CONFIG_HAMRADIO is not set | ||
255 | # CONFIG_IRDA is not set | ||
256 | # CONFIG_BT is not set | ||
257 | # CONFIG_IEEE80211 is not set | ||
258 | |||
259 | # | ||
260 | # Device Drivers | ||
261 | # | ||
262 | |||
263 | # | ||
264 | # Generic Driver Options | ||
265 | # | ||
266 | CONFIG_STANDALONE=y | ||
267 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
268 | # CONFIG_FW_LOADER is not set | ||
269 | # CONFIG_DEBUG_DRIVER is not set | ||
270 | |||
271 | # | ||
272 | # Connector - unified userspace <-> kernelspace linker | ||
273 | # | ||
274 | # CONFIG_CONNECTOR is not set | ||
275 | |||
276 | # | ||
277 | # Memory Technology Devices (MTD) | ||
278 | # | ||
279 | # CONFIG_MTD is not set | ||
280 | |||
281 | # | ||
282 | # Parallel port support | ||
283 | # | ||
284 | # CONFIG_PARPORT is not set | ||
285 | |||
286 | # | ||
287 | # Plug and Play support | ||
288 | # | ||
289 | |||
290 | # | ||
291 | # Block devices | ||
292 | # | ||
293 | # CONFIG_BLK_DEV_FD is not set | ||
294 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
295 | # CONFIG_BLK_DEV_LOOP is not set | ||
296 | # CONFIG_BLK_DEV_NBD is not set | ||
297 | CONFIG_BLK_DEV_RAM=y | ||
298 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
299 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
300 | CONFIG_BLK_DEV_INITRD=y | ||
301 | # CONFIG_CDROM_PKTCDVD is not set | ||
302 | # CONFIG_ATA_OVER_ETH is not set | ||
303 | |||
304 | # | ||
305 | # ATA/ATAPI/MFM/RLL support | ||
306 | # | ||
307 | # CONFIG_IDE is not set | ||
308 | |||
309 | # | ||
310 | # SCSI device support | ||
311 | # | ||
312 | # CONFIG_RAID_ATTRS is not set | ||
313 | # CONFIG_SCSI is not set | ||
314 | |||
315 | # | ||
316 | # Multi-device support (RAID and LVM) | ||
317 | # | ||
318 | # CONFIG_MD is not set | ||
319 | |||
320 | # | ||
321 | # Fusion MPT device support | ||
322 | # | ||
323 | # CONFIG_FUSION is not set | ||
324 | |||
325 | # | ||
326 | # IEEE 1394 (FireWire) support | ||
327 | # | ||
328 | |||
329 | # | ||
330 | # I2O device support | ||
331 | # | ||
332 | |||
333 | # | ||
334 | # Macintosh device drivers | ||
335 | # | ||
336 | # CONFIG_WINDFARM is not set | ||
337 | |||
338 | # | ||
339 | # Network device support | ||
340 | # | ||
341 | CONFIG_NETDEVICES=y | ||
342 | # CONFIG_DUMMY is not set | ||
343 | # CONFIG_BONDING is not set | ||
344 | # CONFIG_EQUALIZER is not set | ||
345 | CONFIG_TUN=y | ||
346 | |||
347 | # | ||
348 | # PHY device support | ||
349 | # | ||
350 | |||
351 | # | ||
352 | # Ethernet (10 or 100Mbit) | ||
353 | # | ||
354 | # CONFIG_NET_ETHERNET is not set | ||
355 | # CONFIG_IBM_EMAC is not set | ||
356 | |||
357 | # | ||
358 | # Ethernet (1000 Mbit) | ||
359 | # | ||
360 | |||
361 | # | ||
362 | # Ethernet (10000 Mbit) | ||
363 | # | ||
364 | |||
365 | # | ||
366 | # Token Ring devices | ||
367 | # | ||
368 | |||
369 | # | ||
370 | # Wireless LAN (non-hamradio) | ||
371 | # | ||
372 | # CONFIG_NET_RADIO is not set | ||
373 | |||
374 | # | ||
375 | # Wan interfaces | ||
376 | # | ||
377 | # CONFIG_WAN is not set | ||
378 | # CONFIG_PPP is not set | ||
379 | # CONFIG_SLIP is not set | ||
380 | # CONFIG_SHAPER is not set | ||
381 | # CONFIG_NETCONSOLE is not set | ||
382 | # CONFIG_NETPOLL is not set | ||
383 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
384 | |||
385 | # | ||
386 | # ISDN subsystem | ||
387 | # | ||
388 | # CONFIG_ISDN is not set | ||
389 | |||
390 | # | ||
391 | # Telephony Support | ||
392 | # | ||
393 | # CONFIG_PHONE is not set | ||
394 | |||
395 | # | ||
396 | # Input device support | ||
397 | # | ||
398 | CONFIG_INPUT=y | ||
399 | |||
400 | # | ||
401 | # Userland interfaces | ||
402 | # | ||
403 | CONFIG_INPUT_MOUSEDEV=y | ||
404 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
405 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
406 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
407 | # CONFIG_INPUT_JOYDEV is not set | ||
408 | # CONFIG_INPUT_TSDEV is not set | ||
409 | # CONFIG_INPUT_EVDEV is not set | ||
410 | # CONFIG_INPUT_EVBUG is not set | ||
411 | |||
412 | # | ||
413 | # Input Device Drivers | ||
414 | # | ||
415 | # CONFIG_INPUT_KEYBOARD is not set | ||
416 | # CONFIG_INPUT_MOUSE is not set | ||
417 | # CONFIG_INPUT_JOYSTICK is not set | ||
418 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
419 | # CONFIG_INPUT_MISC is not set | ||
420 | |||
421 | # | ||
422 | # Hardware I/O ports | ||
423 | # | ||
424 | # CONFIG_SERIO is not set | ||
425 | # CONFIG_GAMEPORT is not set | ||
426 | |||
427 | # | ||
428 | # Character devices | ||
429 | # | ||
430 | CONFIG_VT=y | ||
431 | CONFIG_VT_CONSOLE=y | ||
432 | CONFIG_HW_CONSOLE=y | ||
433 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
434 | |||
435 | # | ||
436 | # Serial drivers | ||
437 | # | ||
438 | CONFIG_SERIAL_8250=y | ||
439 | CONFIG_SERIAL_8250_CONSOLE=y | ||
440 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
441 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
442 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
443 | |||
444 | # | ||
445 | # Non-8250 serial port support | ||
446 | # | ||
447 | CONFIG_SERIAL_CORE=y | ||
448 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
449 | CONFIG_UNIX98_PTYS=y | ||
450 | # CONFIG_LEGACY_PTYS is not set | ||
451 | |||
452 | # | ||
453 | # IPMI | ||
454 | # | ||
455 | # CONFIG_IPMI_HANDLER is not set | ||
456 | |||
457 | # | ||
458 | # Watchdog Cards | ||
459 | # | ||
460 | # CONFIG_WATCHDOG is not set | ||
461 | # CONFIG_NVRAM is not set | ||
462 | # CONFIG_GEN_RTC is not set | ||
463 | # CONFIG_DTLK is not set | ||
464 | # CONFIG_R3964 is not set | ||
465 | |||
466 | # | ||
467 | # Ftape, the floppy tape device driver | ||
468 | # | ||
469 | # CONFIG_AGP is not set | ||
470 | # CONFIG_RAW_DRIVER is not set | ||
471 | |||
472 | # | ||
473 | # TPM devices | ||
474 | # | ||
475 | # CONFIG_TCG_TPM is not set | ||
476 | # CONFIG_TELCLOCK is not set | ||
477 | |||
478 | # | ||
479 | # I2C support | ||
480 | # | ||
481 | # CONFIG_I2C is not set | ||
482 | |||
483 | # | ||
484 | # SPI support | ||
485 | # | ||
486 | # CONFIG_SPI is not set | ||
487 | # CONFIG_SPI_MASTER is not set | ||
488 | |||
489 | # | ||
490 | # Dallas's 1-wire bus | ||
491 | # | ||
492 | # CONFIG_W1 is not set | ||
493 | |||
494 | # | ||
495 | # Hardware Monitoring support | ||
496 | # | ||
497 | # CONFIG_HWMON is not set | ||
498 | # CONFIG_HWMON_VID is not set | ||
499 | |||
500 | # | ||
501 | # Misc devices | ||
502 | # | ||
503 | |||
504 | # | ||
505 | # Multimedia Capabilities Port drivers | ||
506 | # | ||
507 | |||
508 | # | ||
509 | # Multimedia devices | ||
510 | # | ||
511 | # CONFIG_VIDEO_DEV is not set | ||
512 | |||
513 | # | ||
514 | # Digital Video Broadcasting Devices | ||
515 | # | ||
516 | # CONFIG_DVB is not set | ||
517 | |||
518 | # | ||
519 | # Graphics support | ||
520 | # | ||
521 | # CONFIG_FB is not set | ||
522 | |||
523 | # | ||
524 | # Console display driver support | ||
525 | # | ||
526 | CONFIG_DUMMY_CONSOLE=y | ||
527 | |||
528 | # | ||
529 | # Sound | ||
530 | # | ||
531 | # CONFIG_SOUND is not set | ||
532 | |||
533 | # | ||
534 | # USB support | ||
535 | # | ||
536 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
537 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
538 | |||
539 | # | ||
540 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
541 | # | ||
542 | |||
543 | # | ||
544 | # USB Gadget Support | ||
545 | # | ||
546 | # CONFIG_USB_GADGET is not set | ||
547 | |||
548 | # | ||
549 | # MMC/SD Card support | ||
550 | # | ||
551 | # CONFIG_MMC is not set | ||
552 | |||
553 | # | ||
554 | # InfiniBand support | ||
555 | # | ||
556 | |||
557 | # | ||
558 | # SN Devices | ||
559 | # | ||
560 | |||
561 | # | ||
562 | # File systems | ||
563 | # | ||
564 | CONFIG_EXT2_FS=y | ||
565 | # CONFIG_EXT2_FS_XATTR is not set | ||
566 | # CONFIG_EXT2_FS_XIP is not set | ||
567 | # CONFIG_EXT3_FS is not set | ||
568 | # CONFIG_REISERFS_FS is not set | ||
569 | # CONFIG_JFS_FS is not set | ||
570 | # CONFIG_FS_POSIX_ACL is not set | ||
571 | # CONFIG_XFS_FS is not set | ||
572 | # CONFIG_OCFS2_FS is not set | ||
573 | # CONFIG_MINIX_FS is not set | ||
574 | # CONFIG_ROMFS_FS is not set | ||
575 | CONFIG_INOTIFY=y | ||
576 | # CONFIG_QUOTA is not set | ||
577 | CONFIG_DNOTIFY=y | ||
578 | # CONFIG_AUTOFS_FS is not set | ||
579 | # CONFIG_AUTOFS4_FS is not set | ||
580 | # CONFIG_FUSE_FS is not set | ||
581 | |||
582 | # | ||
583 | # CD-ROM/DVD Filesystems | ||
584 | # | ||
585 | # CONFIG_ISO9660_FS is not set | ||
586 | # CONFIG_UDF_FS is not set | ||
587 | |||
588 | # | ||
589 | # DOS/FAT/NT Filesystems | ||
590 | # | ||
591 | CONFIG_FAT_FS=y | ||
592 | CONFIG_MSDOS_FS=y | ||
593 | CONFIG_VFAT_FS=y | ||
594 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
595 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
596 | # CONFIG_NTFS_FS is not set | ||
597 | |||
598 | # | ||
599 | # Pseudo filesystems | ||
600 | # | ||
601 | CONFIG_PROC_FS=y | ||
602 | CONFIG_PROC_KCORE=y | ||
603 | CONFIG_SYSFS=y | ||
604 | CONFIG_TMPFS=y | ||
605 | # CONFIG_HUGETLB_PAGE is not set | ||
606 | CONFIG_RAMFS=y | ||
607 | # CONFIG_RELAYFS_FS is not set | ||
608 | # CONFIG_CONFIGFS_FS is not set | ||
609 | |||
610 | # | ||
611 | # Miscellaneous filesystems | ||
612 | # | ||
613 | # CONFIG_ADFS_FS is not set | ||
614 | # CONFIG_AFFS_FS is not set | ||
615 | # CONFIG_HFS_FS is not set | ||
616 | # CONFIG_HFSPLUS_FS is not set | ||
617 | # CONFIG_BEFS_FS is not set | ||
618 | # CONFIG_BFS_FS is not set | ||
619 | # CONFIG_EFS_FS is not set | ||
620 | # CONFIG_CRAMFS is not set | ||
621 | # CONFIG_VXFS_FS is not set | ||
622 | # CONFIG_HPFS_FS is not set | ||
623 | # CONFIG_QNX4FS_FS is not set | ||
624 | # CONFIG_SYSV_FS is not set | ||
625 | # CONFIG_UFS_FS is not set | ||
626 | |||
627 | # | ||
628 | # Network File Systems | ||
629 | # | ||
630 | # CONFIG_NFS_FS is not set | ||
631 | # CONFIG_NFSD is not set | ||
632 | # CONFIG_SMB_FS is not set | ||
633 | # CONFIG_CIFS is not set | ||
634 | # CONFIG_NCP_FS is not set | ||
635 | # CONFIG_CODA_FS is not set | ||
636 | # CONFIG_AFS_FS is not set | ||
637 | # CONFIG_9P_FS is not set | ||
638 | |||
639 | # | ||
640 | # Partition Types | ||
641 | # | ||
642 | # CONFIG_PARTITION_ADVANCED is not set | ||
643 | CONFIG_MSDOS_PARTITION=y | ||
644 | |||
645 | # | ||
646 | # Native Language Support | ||
647 | # | ||
648 | CONFIG_NLS=y | ||
649 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
650 | CONFIG_NLS_CODEPAGE_437=y | ||
651 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
652 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
653 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
654 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
655 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
656 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
657 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
658 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
659 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
660 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
661 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
662 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
663 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
664 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
665 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
666 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
667 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
668 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
669 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
670 | # CONFIG_NLS_ISO8859_8 is not set | ||
671 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
672 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
673 | CONFIG_NLS_ASCII=y | ||
674 | CONFIG_NLS_ISO8859_1=y | ||
675 | # CONFIG_NLS_ISO8859_2 is not set | ||
676 | # CONFIG_NLS_ISO8859_3 is not set | ||
677 | # CONFIG_NLS_ISO8859_4 is not set | ||
678 | # CONFIG_NLS_ISO8859_5 is not set | ||
679 | # CONFIG_NLS_ISO8859_6 is not set | ||
680 | # CONFIG_NLS_ISO8859_7 is not set | ||
681 | # CONFIG_NLS_ISO8859_9 is not set | ||
682 | # CONFIG_NLS_ISO8859_13 is not set | ||
683 | # CONFIG_NLS_ISO8859_14 is not set | ||
684 | # CONFIG_NLS_ISO8859_15 is not set | ||
685 | # CONFIG_NLS_KOI8_R is not set | ||
686 | # CONFIG_NLS_KOI8_U is not set | ||
687 | CONFIG_NLS_UTF8=y | ||
688 | |||
689 | # | ||
690 | # IBM 40x options | ||
691 | # | ||
692 | |||
693 | # | ||
694 | # Library routines | ||
695 | # | ||
696 | # CONFIG_CRC_CCITT is not set | ||
697 | # CONFIG_CRC16 is not set | ||
698 | CONFIG_CRC32=y | ||
699 | # CONFIG_LIBCRC32C is not set | ||
700 | # CONFIG_PROFILING is not set | ||
701 | |||
702 | # | ||
703 | # Kernel hacking | ||
704 | # | ||
705 | CONFIG_PRINTK_TIME=y | ||
706 | CONFIG_MAGIC_SYSRQ=y | ||
707 | CONFIG_DEBUG_KERNEL=y | ||
708 | CONFIG_LOG_BUF_SHIFT=14 | ||
709 | CONFIG_DETECT_SOFTLOCKUP=y | ||
710 | # CONFIG_SCHEDSTATS is not set | ||
711 | # CONFIG_DEBUG_SLAB is not set | ||
712 | CONFIG_DEBUG_MUTEXES=y | ||
713 | # CONFIG_DEBUG_SPINLOCK is not set | ||
714 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
715 | # CONFIG_DEBUG_KOBJECT is not set | ||
716 | CONFIG_DEBUG_INFO=y | ||
717 | # CONFIG_DEBUG_FS is not set | ||
718 | # CONFIG_DEBUG_VM is not set | ||
719 | CONFIG_FORCED_INLINING=y | ||
720 | # CONFIG_RCU_TORTURE_TEST is not set | ||
721 | # CONFIG_KGDB is not set | ||
722 | CONFIG_XMON=y | ||
723 | # CONFIG_BDI_SWITCH is not set | ||
724 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
725 | |||
726 | # | ||
727 | # Security options | ||
728 | # | ||
729 | # CONFIG_KEYS is not set | ||
730 | # CONFIG_SECURITY is not set | ||
731 | |||
732 | # | ||
733 | # Cryptographic options | ||
734 | # | ||
735 | # CONFIG_CRYPTO is not set | ||
736 | |||
737 | # | ||
738 | # Hardware crypto devices | ||
739 | # | ||
diff --git a/arch/ppc/configs/ml403_defconfig b/arch/ppc/configs/ml403_defconfig new file mode 100644 index 000000000000..fafd2516fa51 --- /dev/null +++ b/arch/ppc/configs/ml403_defconfig | |||
@@ -0,0 +1,740 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.16-rc1 | ||
4 | # Wed Jan 18 01:11:41 2006 | ||
5 | # | ||
6 | CONFIG_MMU=y | ||
7 | CONFIG_GENERIC_HARDIRQS=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_PPC=y | ||
11 | CONFIG_PPC32=y | ||
12 | CONFIG_GENERIC_NVRAM=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | |||
16 | # | ||
17 | # Code maturity level options | ||
18 | # | ||
19 | CONFIG_EXPERIMENTAL=y | ||
20 | CONFIG_CLEAN_COMPILE=y | ||
21 | CONFIG_BROKEN_ON_SMP=y | ||
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | |||
24 | # | ||
25 | # General setup | ||
26 | # | ||
27 | CONFIG_LOCALVERSION="" | ||
28 | CONFIG_LOCALVERSION_AUTO=y | ||
29 | # CONFIG_SWAP is not set | ||
30 | CONFIG_SYSVIPC=y | ||
31 | # CONFIG_POSIX_MQUEUE is not set | ||
32 | CONFIG_BSD_PROCESS_ACCT=y | ||
33 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
34 | CONFIG_SYSCTL=y | ||
35 | # CONFIG_AUDIT is not set | ||
36 | # CONFIG_IKCONFIG is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
39 | # CONFIG_EMBEDDED is not set | ||
40 | CONFIG_KALLSYMS=y | ||
41 | # CONFIG_KALLSYMS_ALL is not set | ||
42 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
43 | CONFIG_HOTPLUG=y | ||
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
46 | CONFIG_ELF_CORE=y | ||
47 | CONFIG_BASE_FULL=y | ||
48 | CONFIG_FUTEX=y | ||
49 | CONFIG_EPOLL=y | ||
50 | CONFIG_SHMEM=y | ||
51 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
52 | CONFIG_CC_ALIGN_LABELS=0 | ||
53 | CONFIG_CC_ALIGN_LOOPS=0 | ||
54 | CONFIG_CC_ALIGN_JUMPS=0 | ||
55 | CONFIG_SLAB=y | ||
56 | # CONFIG_TINY_SHMEM is not set | ||
57 | CONFIG_BASE_SMALL=0 | ||
58 | # CONFIG_SLOB is not set | ||
59 | |||
60 | # | ||
61 | # Loadable module support | ||
62 | # | ||
63 | CONFIG_MODULES=y | ||
64 | CONFIG_MODULE_UNLOAD=y | ||
65 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
66 | CONFIG_OBSOLETE_MODPARM=y | ||
67 | CONFIG_MODVERSIONS=y | ||
68 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
69 | CONFIG_KMOD=y | ||
70 | |||
71 | # | ||
72 | # Block layer | ||
73 | # | ||
74 | CONFIG_LBD=y | ||
75 | |||
76 | # | ||
77 | # IO Schedulers | ||
78 | # | ||
79 | CONFIG_IOSCHED_NOOP=y | ||
80 | CONFIG_IOSCHED_AS=y | ||
81 | CONFIG_IOSCHED_DEADLINE=y | ||
82 | CONFIG_IOSCHED_CFQ=y | ||
83 | CONFIG_DEFAULT_AS=y | ||
84 | # CONFIG_DEFAULT_DEADLINE is not set | ||
85 | # CONFIG_DEFAULT_CFQ is not set | ||
86 | # CONFIG_DEFAULT_NOOP is not set | ||
87 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
88 | |||
89 | # | ||
90 | # Processor | ||
91 | # | ||
92 | # CONFIG_6xx is not set | ||
93 | CONFIG_40x=y | ||
94 | # CONFIG_44x is not set | ||
95 | # CONFIG_POWER3 is not set | ||
96 | # CONFIG_8xx is not set | ||
97 | # CONFIG_E200 is not set | ||
98 | # CONFIG_E500 is not set | ||
99 | # CONFIG_MATH_EMULATION is not set | ||
100 | # CONFIG_KEXEC is not set | ||
101 | # CONFIG_CPU_FREQ is not set | ||
102 | CONFIG_4xx=y | ||
103 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
104 | |||
105 | # | ||
106 | # IBM 4xx options | ||
107 | # | ||
108 | # CONFIG_BUBINGA is not set | ||
109 | # CONFIG_CPCI405 is not set | ||
110 | # CONFIG_EP405 is not set | ||
111 | # CONFIG_REDWOOD_5 is not set | ||
112 | # CONFIG_REDWOOD_6 is not set | ||
113 | # CONFIG_SYCAMORE is not set | ||
114 | # CONFIG_WALNUT is not set | ||
115 | # CONFIG_XILINX_ML300 is not set | ||
116 | CONFIG_XILINX_ML403=y | ||
117 | CONFIG_IBM405_ERR77=y | ||
118 | CONFIG_IBM405_ERR51=y | ||
119 | CONFIG_XILINX_VIRTEX=y | ||
120 | CONFIG_EMBEDDEDBOOT=y | ||
121 | # CONFIG_PPC4xx_DMA is not set | ||
122 | CONFIG_PPC_GEN550=y | ||
123 | CONFIG_UART0_TTYS0=y | ||
124 | # CONFIG_UART0_TTYS1 is not set | ||
125 | CONFIG_NOT_COHERENT_CACHE=y | ||
126 | |||
127 | # | ||
128 | # Platform options | ||
129 | # | ||
130 | # CONFIG_PC_KEYBOARD is not set | ||
131 | # CONFIG_HIGHMEM is not set | ||
132 | # CONFIG_HZ_100 is not set | ||
133 | CONFIG_HZ_250=y | ||
134 | # CONFIG_HZ_1000 is not set | ||
135 | CONFIG_HZ=250 | ||
136 | CONFIG_PREEMPT_NONE=y | ||
137 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
138 | # CONFIG_PREEMPT is not set | ||
139 | CONFIG_SELECT_MEMORY_MODEL=y | ||
140 | CONFIG_FLATMEM_MANUAL=y | ||
141 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
142 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
143 | CONFIG_FLATMEM=y | ||
144 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
145 | # CONFIG_SPARSEMEM_STATIC is not set | ||
146 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
147 | CONFIG_BINFMT_ELF=y | ||
148 | # CONFIG_BINFMT_MISC is not set | ||
149 | CONFIG_CMDLINE_BOOL=y | ||
150 | CONFIG_CMDLINE="console=ttyS0,9600" | ||
151 | # CONFIG_PM is not set | ||
152 | # CONFIG_SOFTWARE_SUSPEND is not set | ||
153 | CONFIG_SECCOMP=y | ||
154 | CONFIG_ISA_DMA_API=y | ||
155 | |||
156 | # | ||
157 | # Bus options | ||
158 | # | ||
159 | # CONFIG_PPC_I8259 is not set | ||
160 | # CONFIG_PCI is not set | ||
161 | # CONFIG_PCI_DOMAINS is not set | ||
162 | |||
163 | # | ||
164 | # PCCARD (PCMCIA/CardBus) support | ||
165 | # | ||
166 | # CONFIG_PCCARD is not set | ||
167 | |||
168 | # | ||
169 | # Advanced setup | ||
170 | # | ||
171 | # CONFIG_ADVANCED_OPTIONS is not set | ||
172 | |||
173 | # | ||
174 | # Default settings for advanced configuration options are used | ||
175 | # | ||
176 | CONFIG_HIGHMEM_START=0xfe000000 | ||
177 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
178 | CONFIG_KERNEL_START=0xc0000000 | ||
179 | CONFIG_TASK_SIZE=0x80000000 | ||
180 | CONFIG_CONSISTENT_START=0xff100000 | ||
181 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
182 | CONFIG_BOOT_LOAD=0x00400000 | ||
183 | |||
184 | # | ||
185 | # Networking | ||
186 | # | ||
187 | CONFIG_NET=y | ||
188 | |||
189 | # | ||
190 | # Networking options | ||
191 | # | ||
192 | CONFIG_PACKET=y | ||
193 | CONFIG_PACKET_MMAP=y | ||
194 | CONFIG_UNIX=y | ||
195 | # CONFIG_NET_KEY is not set | ||
196 | CONFIG_INET=y | ||
197 | # CONFIG_IP_MULTICAST is not set | ||
198 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
199 | CONFIG_IP_FIB_HASH=y | ||
200 | CONFIG_IP_PNP=y | ||
201 | CONFIG_IP_PNP_DHCP=y | ||
202 | # CONFIG_IP_PNP_BOOTP is not set | ||
203 | # CONFIG_IP_PNP_RARP is not set | ||
204 | # CONFIG_NET_IPIP is not set | ||
205 | # CONFIG_NET_IPGRE is not set | ||
206 | # CONFIG_ARPD is not set | ||
207 | # CONFIG_SYN_COOKIES is not set | ||
208 | # CONFIG_INET_AH is not set | ||
209 | # CONFIG_INET_ESP is not set | ||
210 | # CONFIG_INET_IPCOMP is not set | ||
211 | # CONFIG_INET_TUNNEL is not set | ||
212 | CONFIG_INET_DIAG=y | ||
213 | CONFIG_INET_TCP_DIAG=y | ||
214 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
215 | CONFIG_TCP_CONG_BIC=y | ||
216 | # CONFIG_IPV6 is not set | ||
217 | # CONFIG_NETFILTER is not set | ||
218 | |||
219 | # | ||
220 | # DCCP Configuration (EXPERIMENTAL) | ||
221 | # | ||
222 | # CONFIG_IP_DCCP is not set | ||
223 | |||
224 | # | ||
225 | # SCTP Configuration (EXPERIMENTAL) | ||
226 | # | ||
227 | # CONFIG_IP_SCTP is not set | ||
228 | # CONFIG_ATM is not set | ||
229 | # CONFIG_BRIDGE is not set | ||
230 | # CONFIG_VLAN_8021Q is not set | ||
231 | # CONFIG_DECNET is not set | ||
232 | # CONFIG_LLC2 is not set | ||
233 | # CONFIG_IPX is not set | ||
234 | # CONFIG_ATALK is not set | ||
235 | # CONFIG_X25 is not set | ||
236 | # CONFIG_LAPB is not set | ||
237 | |||
238 | # | ||
239 | # TIPC Configuration (EXPERIMENTAL) | ||
240 | # | ||
241 | # CONFIG_TIPC is not set | ||
242 | # CONFIG_NET_DIVERT is not set | ||
243 | # CONFIG_ECONET is not set | ||
244 | # CONFIG_WAN_ROUTER is not set | ||
245 | |||
246 | # | ||
247 | # QoS and/or fair queueing | ||
248 | # | ||
249 | # CONFIG_NET_SCHED is not set | ||
250 | |||
251 | # | ||
252 | # Network testing | ||
253 | # | ||
254 | # CONFIG_NET_PKTGEN is not set | ||
255 | # CONFIG_HAMRADIO is not set | ||
256 | # CONFIG_IRDA is not set | ||
257 | # CONFIG_BT is not set | ||
258 | # CONFIG_IEEE80211 is not set | ||
259 | |||
260 | # | ||
261 | # Device Drivers | ||
262 | # | ||
263 | |||
264 | # | ||
265 | # Generic Driver Options | ||
266 | # | ||
267 | CONFIG_STANDALONE=y | ||
268 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
269 | # CONFIG_FW_LOADER is not set | ||
270 | # CONFIG_DEBUG_DRIVER is not set | ||
271 | |||
272 | # | ||
273 | # Connector - unified userspace <-> kernelspace linker | ||
274 | # | ||
275 | # CONFIG_CONNECTOR is not set | ||
276 | |||
277 | # | ||
278 | # Memory Technology Devices (MTD) | ||
279 | # | ||
280 | # CONFIG_MTD is not set | ||
281 | |||
282 | # | ||
283 | # Parallel port support | ||
284 | # | ||
285 | # CONFIG_PARPORT is not set | ||
286 | |||
287 | # | ||
288 | # Plug and Play support | ||
289 | # | ||
290 | |||
291 | # | ||
292 | # Block devices | ||
293 | # | ||
294 | # CONFIG_BLK_DEV_FD is not set | ||
295 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
296 | # CONFIG_BLK_DEV_LOOP is not set | ||
297 | # CONFIG_BLK_DEV_NBD is not set | ||
298 | CONFIG_BLK_DEV_RAM=y | ||
299 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
300 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
301 | CONFIG_BLK_DEV_INITRD=y | ||
302 | # CONFIG_CDROM_PKTCDVD is not set | ||
303 | # CONFIG_ATA_OVER_ETH is not set | ||
304 | |||
305 | # | ||
306 | # ATA/ATAPI/MFM/RLL support | ||
307 | # | ||
308 | # CONFIG_IDE is not set | ||
309 | |||
310 | # | ||
311 | # SCSI device support | ||
312 | # | ||
313 | # CONFIG_RAID_ATTRS is not set | ||
314 | # CONFIG_SCSI is not set | ||
315 | |||
316 | # | ||
317 | # Multi-device support (RAID and LVM) | ||
318 | # | ||
319 | # CONFIG_MD is not set | ||
320 | |||
321 | # | ||
322 | # Fusion MPT device support | ||
323 | # | ||
324 | # CONFIG_FUSION is not set | ||
325 | |||
326 | # | ||
327 | # IEEE 1394 (FireWire) support | ||
328 | # | ||
329 | |||
330 | # | ||
331 | # I2O device support | ||
332 | # | ||
333 | |||
334 | # | ||
335 | # Macintosh device drivers | ||
336 | # | ||
337 | # CONFIG_WINDFARM is not set | ||
338 | |||
339 | # | ||
340 | # Network device support | ||
341 | # | ||
342 | CONFIG_NETDEVICES=y | ||
343 | # CONFIG_DUMMY is not set | ||
344 | # CONFIG_BONDING is not set | ||
345 | # CONFIG_EQUALIZER is not set | ||
346 | CONFIG_TUN=y | ||
347 | |||
348 | # | ||
349 | # PHY device support | ||
350 | # | ||
351 | |||
352 | # | ||
353 | # Ethernet (10 or 100Mbit) | ||
354 | # | ||
355 | # CONFIG_NET_ETHERNET is not set | ||
356 | # CONFIG_IBM_EMAC is not set | ||
357 | |||
358 | # | ||
359 | # Ethernet (1000 Mbit) | ||
360 | # | ||
361 | |||
362 | # | ||
363 | # Ethernet (10000 Mbit) | ||
364 | # | ||
365 | |||
366 | # | ||
367 | # Token Ring devices | ||
368 | # | ||
369 | |||
370 | # | ||
371 | # Wireless LAN (non-hamradio) | ||
372 | # | ||
373 | # CONFIG_NET_RADIO is not set | ||
374 | |||
375 | # | ||
376 | # Wan interfaces | ||
377 | # | ||
378 | # CONFIG_WAN is not set | ||
379 | # CONFIG_PPP is not set | ||
380 | # CONFIG_SLIP is not set | ||
381 | # CONFIG_SHAPER is not set | ||
382 | # CONFIG_NETCONSOLE is not set | ||
383 | # CONFIG_NETPOLL is not set | ||
384 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
385 | |||
386 | # | ||
387 | # ISDN subsystem | ||
388 | # | ||
389 | # CONFIG_ISDN is not set | ||
390 | |||
391 | # | ||
392 | # Telephony Support | ||
393 | # | ||
394 | # CONFIG_PHONE is not set | ||
395 | |||
396 | # | ||
397 | # Input device support | ||
398 | # | ||
399 | CONFIG_INPUT=y | ||
400 | |||
401 | # | ||
402 | # Userland interfaces | ||
403 | # | ||
404 | CONFIG_INPUT_MOUSEDEV=y | ||
405 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
406 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
407 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
408 | # CONFIG_INPUT_JOYDEV is not set | ||
409 | # CONFIG_INPUT_TSDEV is not set | ||
410 | # CONFIG_INPUT_EVDEV is not set | ||
411 | # CONFIG_INPUT_EVBUG is not set | ||
412 | |||
413 | # | ||
414 | # Input Device Drivers | ||
415 | # | ||
416 | # CONFIG_INPUT_KEYBOARD is not set | ||
417 | # CONFIG_INPUT_MOUSE is not set | ||
418 | # CONFIG_INPUT_JOYSTICK is not set | ||
419 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
420 | # CONFIG_INPUT_MISC is not set | ||
421 | |||
422 | # | ||
423 | # Hardware I/O ports | ||
424 | # | ||
425 | # CONFIG_SERIO is not set | ||
426 | # CONFIG_GAMEPORT is not set | ||
427 | |||
428 | # | ||
429 | # Character devices | ||
430 | # | ||
431 | CONFIG_VT=y | ||
432 | CONFIG_VT_CONSOLE=y | ||
433 | CONFIG_HW_CONSOLE=y | ||
434 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
435 | |||
436 | # | ||
437 | # Serial drivers | ||
438 | # | ||
439 | CONFIG_SERIAL_8250=y | ||
440 | CONFIG_SERIAL_8250_CONSOLE=y | ||
441 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
442 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
443 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
444 | |||
445 | # | ||
446 | # Non-8250 serial port support | ||
447 | # | ||
448 | CONFIG_SERIAL_CORE=y | ||
449 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
450 | CONFIG_UNIX98_PTYS=y | ||
451 | # CONFIG_LEGACY_PTYS is not set | ||
452 | |||
453 | # | ||
454 | # IPMI | ||
455 | # | ||
456 | # CONFIG_IPMI_HANDLER is not set | ||
457 | |||
458 | # | ||
459 | # Watchdog Cards | ||
460 | # | ||
461 | # CONFIG_WATCHDOG is not set | ||
462 | # CONFIG_NVRAM is not set | ||
463 | # CONFIG_GEN_RTC is not set | ||
464 | # CONFIG_DTLK is not set | ||
465 | # CONFIG_R3964 is not set | ||
466 | |||
467 | # | ||
468 | # Ftape, the floppy tape device driver | ||
469 | # | ||
470 | # CONFIG_AGP is not set | ||
471 | # CONFIG_RAW_DRIVER is not set | ||
472 | |||
473 | # | ||
474 | # TPM devices | ||
475 | # | ||
476 | # CONFIG_TCG_TPM is not set | ||
477 | # CONFIG_TELCLOCK is not set | ||
478 | |||
479 | # | ||
480 | # I2C support | ||
481 | # | ||
482 | # CONFIG_I2C is not set | ||
483 | |||
484 | # | ||
485 | # SPI support | ||
486 | # | ||
487 | # CONFIG_SPI is not set | ||
488 | # CONFIG_SPI_MASTER is not set | ||
489 | |||
490 | # | ||
491 | # Dallas's 1-wire bus | ||
492 | # | ||
493 | # CONFIG_W1 is not set | ||
494 | |||
495 | # | ||
496 | # Hardware Monitoring support | ||
497 | # | ||
498 | # CONFIG_HWMON is not set | ||
499 | # CONFIG_HWMON_VID is not set | ||
500 | |||
501 | # | ||
502 | # Misc devices | ||
503 | # | ||
504 | |||
505 | # | ||
506 | # Multimedia Capabilities Port drivers | ||
507 | # | ||
508 | |||
509 | # | ||
510 | # Multimedia devices | ||
511 | # | ||
512 | # CONFIG_VIDEO_DEV is not set | ||
513 | |||
514 | # | ||
515 | # Digital Video Broadcasting Devices | ||
516 | # | ||
517 | # CONFIG_DVB is not set | ||
518 | |||
519 | # | ||
520 | # Graphics support | ||
521 | # | ||
522 | # CONFIG_FB is not set | ||
523 | |||
524 | # | ||
525 | # Console display driver support | ||
526 | # | ||
527 | CONFIG_DUMMY_CONSOLE=y | ||
528 | |||
529 | # | ||
530 | # Sound | ||
531 | # | ||
532 | # CONFIG_SOUND is not set | ||
533 | |||
534 | # | ||
535 | # USB support | ||
536 | # | ||
537 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
538 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
539 | |||
540 | # | ||
541 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
542 | # | ||
543 | |||
544 | # | ||
545 | # USB Gadget Support | ||
546 | # | ||
547 | # CONFIG_USB_GADGET is not set | ||
548 | |||
549 | # | ||
550 | # MMC/SD Card support | ||
551 | # | ||
552 | # CONFIG_MMC is not set | ||
553 | |||
554 | # | ||
555 | # InfiniBand support | ||
556 | # | ||
557 | |||
558 | # | ||
559 | # SN Devices | ||
560 | # | ||
561 | |||
562 | # | ||
563 | # File systems | ||
564 | # | ||
565 | CONFIG_EXT2_FS=y | ||
566 | # CONFIG_EXT2_FS_XATTR is not set | ||
567 | # CONFIG_EXT2_FS_XIP is not set | ||
568 | # CONFIG_EXT3_FS is not set | ||
569 | # CONFIG_REISERFS_FS is not set | ||
570 | # CONFIG_JFS_FS is not set | ||
571 | # CONFIG_FS_POSIX_ACL is not set | ||
572 | # CONFIG_XFS_FS is not set | ||
573 | # CONFIG_OCFS2_FS is not set | ||
574 | # CONFIG_MINIX_FS is not set | ||
575 | # CONFIG_ROMFS_FS is not set | ||
576 | CONFIG_INOTIFY=y | ||
577 | # CONFIG_QUOTA is not set | ||
578 | CONFIG_DNOTIFY=y | ||
579 | # CONFIG_AUTOFS_FS is not set | ||
580 | # CONFIG_AUTOFS4_FS is not set | ||
581 | # CONFIG_FUSE_FS is not set | ||
582 | |||
583 | # | ||
584 | # CD-ROM/DVD Filesystems | ||
585 | # | ||
586 | # CONFIG_ISO9660_FS is not set | ||
587 | # CONFIG_UDF_FS is not set | ||
588 | |||
589 | # | ||
590 | # DOS/FAT/NT Filesystems | ||
591 | # | ||
592 | CONFIG_FAT_FS=y | ||
593 | CONFIG_MSDOS_FS=y | ||
594 | CONFIG_VFAT_FS=y | ||
595 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
596 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
597 | # CONFIG_NTFS_FS is not set | ||
598 | |||
599 | # | ||
600 | # Pseudo filesystems | ||
601 | # | ||
602 | CONFIG_PROC_FS=y | ||
603 | CONFIG_PROC_KCORE=y | ||
604 | CONFIG_SYSFS=y | ||
605 | CONFIG_TMPFS=y | ||
606 | # CONFIG_HUGETLB_PAGE is not set | ||
607 | CONFIG_RAMFS=y | ||
608 | # CONFIG_RELAYFS_FS is not set | ||
609 | # CONFIG_CONFIGFS_FS is not set | ||
610 | |||
611 | # | ||
612 | # Miscellaneous filesystems | ||
613 | # | ||
614 | # CONFIG_ADFS_FS is not set | ||
615 | # CONFIG_AFFS_FS is not set | ||
616 | # CONFIG_HFS_FS is not set | ||
617 | # CONFIG_HFSPLUS_FS is not set | ||
618 | # CONFIG_BEFS_FS is not set | ||
619 | # CONFIG_BFS_FS is not set | ||
620 | # CONFIG_EFS_FS is not set | ||
621 | # CONFIG_CRAMFS is not set | ||
622 | # CONFIG_VXFS_FS is not set | ||
623 | # CONFIG_HPFS_FS is not set | ||
624 | # CONFIG_QNX4FS_FS is not set | ||
625 | # CONFIG_SYSV_FS is not set | ||
626 | # CONFIG_UFS_FS is not set | ||
627 | |||
628 | # | ||
629 | # Network File Systems | ||
630 | # | ||
631 | # CONFIG_NFS_FS is not set | ||
632 | # CONFIG_NFSD is not set | ||
633 | # CONFIG_SMB_FS is not set | ||
634 | # CONFIG_CIFS is not set | ||
635 | # CONFIG_NCP_FS is not set | ||
636 | # CONFIG_CODA_FS is not set | ||
637 | # CONFIG_AFS_FS is not set | ||
638 | # CONFIG_9P_FS is not set | ||
639 | |||
640 | # | ||
641 | # Partition Types | ||
642 | # | ||
643 | # CONFIG_PARTITION_ADVANCED is not set | ||
644 | CONFIG_MSDOS_PARTITION=y | ||
645 | |||
646 | # | ||
647 | # Native Language Support | ||
648 | # | ||
649 | CONFIG_NLS=y | ||
650 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
651 | CONFIG_NLS_CODEPAGE_437=y | ||
652 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
653 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
654 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
655 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
656 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
657 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
658 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
659 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
660 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
661 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
662 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
663 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
664 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
665 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
666 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
667 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
668 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
669 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
670 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
671 | # CONFIG_NLS_ISO8859_8 is not set | ||
672 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
673 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
674 | CONFIG_NLS_ASCII=y | ||
675 | CONFIG_NLS_ISO8859_1=y | ||
676 | # CONFIG_NLS_ISO8859_2 is not set | ||
677 | # CONFIG_NLS_ISO8859_3 is not set | ||
678 | # CONFIG_NLS_ISO8859_4 is not set | ||
679 | # CONFIG_NLS_ISO8859_5 is not set | ||
680 | # CONFIG_NLS_ISO8859_6 is not set | ||
681 | # CONFIG_NLS_ISO8859_7 is not set | ||
682 | # CONFIG_NLS_ISO8859_9 is not set | ||
683 | # CONFIG_NLS_ISO8859_13 is not set | ||
684 | # CONFIG_NLS_ISO8859_14 is not set | ||
685 | # CONFIG_NLS_ISO8859_15 is not set | ||
686 | # CONFIG_NLS_KOI8_R is not set | ||
687 | # CONFIG_NLS_KOI8_U is not set | ||
688 | CONFIG_NLS_UTF8=y | ||
689 | |||
690 | # | ||
691 | # IBM 40x options | ||
692 | # | ||
693 | |||
694 | # | ||
695 | # Library routines | ||
696 | # | ||
697 | # CONFIG_CRC_CCITT is not set | ||
698 | # CONFIG_CRC16 is not set | ||
699 | CONFIG_CRC32=y | ||
700 | # CONFIG_LIBCRC32C is not set | ||
701 | # CONFIG_PROFILING is not set | ||
702 | |||
703 | # | ||
704 | # Kernel hacking | ||
705 | # | ||
706 | CONFIG_PRINTK_TIME=y | ||
707 | CONFIG_MAGIC_SYSRQ=y | ||
708 | CONFIG_DEBUG_KERNEL=y | ||
709 | CONFIG_LOG_BUF_SHIFT=14 | ||
710 | CONFIG_DETECT_SOFTLOCKUP=y | ||
711 | # CONFIG_SCHEDSTATS is not set | ||
712 | # CONFIG_DEBUG_SLAB is not set | ||
713 | CONFIG_DEBUG_MUTEXES=y | ||
714 | # CONFIG_DEBUG_SPINLOCK is not set | ||
715 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
716 | # CONFIG_DEBUG_KOBJECT is not set | ||
717 | CONFIG_DEBUG_INFO=y | ||
718 | # CONFIG_DEBUG_FS is not set | ||
719 | # CONFIG_DEBUG_VM is not set | ||
720 | CONFIG_FORCED_INLINING=y | ||
721 | # CONFIG_RCU_TORTURE_TEST is not set | ||
722 | # CONFIG_KGDB is not set | ||
723 | CONFIG_XMON=y | ||
724 | # CONFIG_BDI_SWITCH is not set | ||
725 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
726 | |||
727 | # | ||
728 | # Security options | ||
729 | # | ||
730 | # CONFIG_KEYS is not set | ||
731 | # CONFIG_SECURITY is not set | ||
732 | |||
733 | # | ||
734 | # Cryptographic options | ||
735 | # | ||
736 | # CONFIG_CRYPTO is not set | ||
737 | |||
738 | # | ||
739 | # Hardware crypto devices | ||
740 | # | ||
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index 3e6ca7f5843f..c1e89ad0684d 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S | |||
@@ -810,13 +810,16 @@ initial_mmu: | |||
810 | mtspr SPRN_MD_TWC, r9 | 810 | mtspr SPRN_MD_TWC, r9 |
811 | li r11, MI_BOOTINIT /* Create RPN for address 0 */ | 811 | li r11, MI_BOOTINIT /* Create RPN for address 0 */ |
812 | addis r11, r11, 0x0080 /* Add 8M */ | 812 | addis r11, r11, 0x0080 /* Add 8M */ |
813 | mtspr SPRN_MD_RPN, r8 | 813 | mtspr SPRN_MD_RPN, r11 |
814 | |||
815 | addi r10, r10, 0x0100 | ||
816 | mtspr SPRN_MD_CTR, r10 | ||
814 | 817 | ||
815 | addis r8, r8, 0x0080 /* Add 8M */ | 818 | addis r8, r8, 0x0080 /* Add 8M */ |
816 | mtspr SPRN_MD_EPN, r8 | 819 | mtspr SPRN_MD_EPN, r8 |
817 | mtspr SPRN_MD_TWC, r9 | 820 | mtspr SPRN_MD_TWC, r9 |
818 | addis r11, r11, 0x0080 /* Add 8M */ | 821 | addis r11, r11, 0x0080 /* Add 8M */ |
819 | mtspr SPRN_MD_RPN, r8 | 822 | mtspr SPRN_MD_RPN, r11 |
820 | #endif | 823 | #endif |
821 | 824 | ||
822 | /* Since the cache is enabled according to the information we | 825 | /* Since the cache is enabled according to the information we |
diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig index d8837911bbc6..174ddbc9758b 100644 --- a/arch/ppc/platforms/4xx/Kconfig +++ b/arch/ppc/platforms/4xx/Kconfig | |||
@@ -57,6 +57,10 @@ config XILINX_ML300 | |||
57 | help | 57 | help |
58 | This option enables support for the Xilinx ML300 evaluation board. | 58 | This option enables support for the Xilinx ML300 evaluation board. |
59 | 59 | ||
60 | config XILINX_ML403 | ||
61 | bool "Xilinx-ML403" | ||
62 | help | ||
63 | This option enables support for the Xilinx ML403 evaluation board. | ||
60 | endchoice | 64 | endchoice |
61 | 65 | ||
62 | choice | 66 | choice |
@@ -172,11 +176,6 @@ config IBM_OCP | |||
172 | depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT | 176 | depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT |
173 | default y | 177 | default y |
174 | 178 | ||
175 | config XILINX_OCP | ||
176 | bool | ||
177 | depends on XILINX_ML300 | ||
178 | default y | ||
179 | |||
180 | config IBM_EMAC4 | 179 | config IBM_EMAC4 |
181 | bool | 180 | bool |
182 | depends on 440GX || 440SP || 440SPE | 181 | depends on 440GX || 440SP || 440SPE |
@@ -208,11 +207,21 @@ config 405GPR | |||
208 | depends on SYCAMORE | 207 | depends on SYCAMORE |
209 | default y | 208 | default y |
210 | 209 | ||
211 | config VIRTEX_II_PRO | 210 | config XILINX_VIRTEX_II_PRO |
212 | bool | 211 | bool |
213 | depends on XILINX_ML300 | 212 | depends on XILINX_ML300 |
214 | default y | 213 | default y |
215 | 214 | ||
215 | config XILINX_VIRTEX_4_FX | ||
216 | bool | ||
217 | depends on XILINX_ML403 | ||
218 | default y | ||
219 | |||
220 | config XILINX_VIRTEX | ||
221 | bool | ||
222 | depends on XILINX_VIRTEX_II_PRO || XILINX_VIRTEX_4_FX | ||
223 | default y | ||
224 | |||
216 | config STB03xxx | 225 | config STB03xxx |
217 | bool | 226 | bool |
218 | depends on REDWOOD_5 || REDWOOD_6 | 227 | depends on REDWOOD_5 || REDWOOD_6 |
@@ -220,7 +229,7 @@ config STB03xxx | |||
220 | 229 | ||
221 | config EMBEDDEDBOOT | 230 | config EMBEDDEDBOOT |
222 | bool | 231 | bool |
223 | depends on EP405 || XILINX_ML300 | 232 | depends on EP405 || XILINX_ML300 || XILINX_ML403 |
224 | default y | 233 | default y |
225 | 234 | ||
226 | config IBM_OPENBIOS | 235 | config IBM_OPENBIOS |
diff --git a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile index c9bb61170954..a04a0d0a0f5c 100644 --- a/arch/ppc/platforms/4xx/Makefile +++ b/arch/ppc/platforms/4xx/Makefile | |||
@@ -14,6 +14,7 @@ obj-$(CONFIG_REDWOOD_6) += redwood6.o | |||
14 | obj-$(CONFIG_SYCAMORE) += sycamore.o | 14 | obj-$(CONFIG_SYCAMORE) += sycamore.o |
15 | obj-$(CONFIG_WALNUT) += walnut.o | 15 | obj-$(CONFIG_WALNUT) += walnut.o |
16 | obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o | 16 | obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o |
17 | obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o | ||
17 | 18 | ||
18 | obj-$(CONFIG_405GP) += ibm405gp.o | 19 | obj-$(CONFIG_405GP) += ibm405gp.o |
19 | obj-$(CONFIG_REDWOOD_5) += ibmstb4.o | 20 | obj-$(CONFIG_REDWOOD_5) += ibmstb4.o |
@@ -26,4 +27,5 @@ obj-$(CONFIG_440SP) += ibm440sp.o | |||
26 | obj-$(CONFIG_440SPE) += ppc440spe.o | 27 | obj-$(CONFIG_440SPE) += ppc440spe.o |
27 | obj-$(CONFIG_405EP) += ibm405ep.o | 28 | obj-$(CONFIG_405EP) += ibm405ep.o |
28 | obj-$(CONFIG_405GPR) += ibm405gpr.o | 29 | obj-$(CONFIG_405GPR) += ibm405gpr.o |
29 | obj-$(CONFIG_VIRTEX_II_PRO) += virtex-ii_pro.o | 30 | obj-$(CONFIG_XILINX_VIRTEX) += virtex.o |
31 | |||
diff --git a/arch/ppc/platforms/4xx/virtex-ii_pro.c b/arch/ppc/platforms/4xx/virtex-ii_pro.c deleted file mode 100644 index 097cc9d5aca0..000000000000 --- a/arch/ppc/platforms/4xx/virtex-ii_pro.c +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/virtex-ii_pro.c | ||
3 | * | ||
4 | * Author: MontaVista Software, Inc. | ||
5 | * source@mvista.com | ||
6 | * | ||
7 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
8 | * terms of the GNU General Public License version 2. This program is licensed | ||
9 | * "as is" without any warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <asm/ocp.h> | ||
15 | #include "virtex-ii_pro.h" | ||
16 | |||
17 | /* Have OCP take care of the serial ports. */ | ||
18 | struct ocp_def core_ocp[] = { | ||
19 | #ifdef XPAR_UARTNS550_0_BASEADDR | ||
20 | { .vendor = OCP_VENDOR_XILINX, | ||
21 | .function = OCP_FUNC_16550, | ||
22 | .index = 0, | ||
23 | .paddr = XPAR_UARTNS550_0_BASEADDR, | ||
24 | .irq = XPAR_INTC_0_UARTNS550_0_VEC_ID, | ||
25 | .pm = OCP_CPM_NA | ||
26 | }, | ||
27 | #ifdef XPAR_UARTNS550_1_BASEADDR | ||
28 | { .vendor = OCP_VENDOR_XILINX, | ||
29 | .function = OCP_FUNC_16550, | ||
30 | .index = 1, | ||
31 | .paddr = XPAR_UARTNS550_1_BASEADDR, | ||
32 | .irq = XPAR_INTC_0_UARTNS550_1_VEC_ID, | ||
33 | .pm = OCP_CPM_NA | ||
34 | }, | ||
35 | #ifdef XPAR_UARTNS550_2_BASEADDR | ||
36 | { .vendor = OCP_VENDOR_XILINX, | ||
37 | .function = OCP_FUNC_16550, | ||
38 | .index = 2, | ||
39 | .paddr = XPAR_UARTNS550_2_BASEADDR, | ||
40 | .irq = XPAR_INTC_0_UARTNS550_2_VEC_ID, | ||
41 | .pm = OCP_CPM_NA | ||
42 | }, | ||
43 | #ifdef XPAR_UARTNS550_3_BASEADDR | ||
44 | { .vendor = OCP_VENDOR_XILINX, | ||
45 | .function = OCP_FUNC_16550, | ||
46 | .index = 3, | ||
47 | .paddr = XPAR_UARTNS550_3_BASEADDR, | ||
48 | .irq = XPAR_INTC_0_UARTNS550_3_VEC_ID, | ||
49 | .pm = OCP_CPM_NA | ||
50 | }, | ||
51 | #ifdef XPAR_UARTNS550_4_BASEADDR | ||
52 | #error Edit this file to add more devices. | ||
53 | #endif /* 4 */ | ||
54 | #endif /* 3 */ | ||
55 | #endif /* 2 */ | ||
56 | #endif /* 1 */ | ||
57 | #endif /* 0 */ | ||
58 | { .vendor = OCP_VENDOR_INVALID | ||
59 | } | ||
60 | }; | ||
diff --git a/arch/ppc/platforms/4xx/virtex-ii_pro.h b/arch/ppc/platforms/4xx/virtex-ii_pro.h deleted file mode 100644 index 9014c4887339..000000000000 --- a/arch/ppc/platforms/4xx/virtex-ii_pro.h +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/virtex-ii_pro.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx Virtex-II Pro processor | ||
5 | * | ||
6 | * Author: MontaVista Software, Inc. | ||
7 | * source@mvista.com | ||
8 | * | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
10 | * terms of the GNU General Public License version 2. This program is licensed | ||
11 | * "as is" without any warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | #ifndef __ASM_VIRTEXIIPRO_H__ | ||
16 | #define __ASM_VIRTEXIIPRO_H__ | ||
17 | |||
18 | #include <linux/config.h> | ||
19 | #include <asm/xparameters.h> | ||
20 | |||
21 | /* serial defines */ | ||
22 | |||
23 | #define RS_TABLE_SIZE 4 /* change this and add more devices below | ||
24 | if you have more then 4 16x50 UARTs */ | ||
25 | |||
26 | #define BASE_BAUD (XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16) | ||
27 | |||
28 | /* The serial ports in the Virtex-II Pro have each I/O byte in the | ||
29 | * LSByte of a word. This means that iomem_reg_shift needs to be 2 to | ||
30 | * change the byte offsets into word offsets. In addition the base | ||
31 | * addresses need to have 3 added to them to get to the LSByte. | ||
32 | */ | ||
33 | #define STD_UART_OP(num) \ | ||
34 | { 0, BASE_BAUD, 0, XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \ | ||
35 | ASYNC_BOOT_AUTOCONF, \ | ||
36 | .iomem_base = (u8 *)XPAR_UARTNS550_##num##_BASEADDR + 3, \ | ||
37 | .iomem_reg_shift = 2, \ | ||
38 | .io_type = SERIAL_IO_MEM}, | ||
39 | |||
40 | #if defined(XPAR_INTC_0_UARTNS550_0_VEC_ID) | ||
41 | #define ML300_UART0 STD_UART_OP(0) | ||
42 | #else | ||
43 | #define ML300_UART0 | ||
44 | #endif | ||
45 | |||
46 | #if defined(XPAR_INTC_0_UARTNS550_1_VEC_ID) | ||
47 | #define ML300_UART1 STD_UART_OP(1) | ||
48 | #else | ||
49 | #define ML300_UART1 | ||
50 | #endif | ||
51 | |||
52 | #if defined(XPAR_INTC_0_UARTNS550_2_VEC_ID) | ||
53 | #define ML300_UART2 STD_UART_OP(2) | ||
54 | #else | ||
55 | #define ML300_UART2 | ||
56 | #endif | ||
57 | |||
58 | #if defined(XPAR_INTC_0_UARTNS550_3_VEC_ID) | ||
59 | #define ML300_UART3 STD_UART_OP(3) | ||
60 | #else | ||
61 | #define ML300_UART3 | ||
62 | #endif | ||
63 | |||
64 | #if defined(XPAR_INTC_0_UARTNS550_4_VEC_ID) | ||
65 | #error Edit this file to add more devices. | ||
66 | #elif defined(XPAR_INTC_0_UARTNS550_3_VEC_ID) | ||
67 | #define NR_SER_PORTS 4 | ||
68 | #elif defined(XPAR_INTC_0_UARTNS550_2_VEC_ID) | ||
69 | #define NR_SER_PORTS 3 | ||
70 | #elif defined(XPAR_INTC_0_UARTNS550_1_VEC_ID) | ||
71 | #define NR_SER_PORTS 2 | ||
72 | #elif defined(XPAR_INTC_0_UARTNS550_0_VEC_ID) | ||
73 | #define NR_SER_PORTS 1 | ||
74 | #else | ||
75 | #define NR_SER_PORTS 0 | ||
76 | #endif | ||
77 | |||
78 | #if defined(CONFIG_UART0_TTYS0) | ||
79 | #define SERIAL_PORT_DFNS \ | ||
80 | ML300_UART0 \ | ||
81 | ML300_UART1 \ | ||
82 | ML300_UART2 \ | ||
83 | ML300_UART3 | ||
84 | #endif | ||
85 | |||
86 | #if defined(CONFIG_UART0_TTYS1) | ||
87 | #define SERIAL_PORT_DFNS \ | ||
88 | ML300_UART1 \ | ||
89 | ML300_UART0 \ | ||
90 | ML300_UART2 \ | ||
91 | ML300_UART3 | ||
92 | #endif | ||
93 | |||
94 | #define DCRN_CPMFR_BASE 0 | ||
95 | |||
96 | #include <asm/ibm405.h> | ||
97 | |||
98 | #endif /* __ASM_VIRTEXIIPRO_H__ */ | ||
99 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/virtex.c b/arch/ppc/platforms/4xx/virtex.c new file mode 100644 index 000000000000..133a83147199 --- /dev/null +++ b/arch/ppc/platforms/4xx/virtex.c | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Virtex-II Pro & Virtex-4 FX common infrastructure | ||
3 | * | ||
4 | * Maintainer: Grant Likely <grant.likely@secretlab.ca> | ||
5 | * | ||
6 | * Copyright 2005 Secret Lab Technologies Ltd. | ||
7 | * Copyright 2005 General Dynamics Canada Ltd. | ||
8 | * Copyright 2005 Freescale Semiconductor Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/device.h> | ||
19 | #include <linux/serial_8250.h> | ||
20 | #include <asm/ppc_sys.h> | ||
21 | #include <platforms/4xx/virtex.h> | ||
22 | #include <platforms/4xx/xparameters/xparameters.h> | ||
23 | |||
24 | #define XPAR_UART(num) { \ | ||
25 | .mapbase = XPAR_UARTNS550_##num##_BASEADDR + 3, \ | ||
26 | .irq = XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \ | ||
27 | .iotype = UPIO_MEM, \ | ||
28 | .uartclk = XPAR_UARTNS550_##num##_CLOCK_FREQ_HZ, \ | ||
29 | .flags = UPF_BOOT_AUTOCONF, \ | ||
30 | .regshift = 2, \ | ||
31 | } | ||
32 | |||
33 | struct plat_serial8250_port serial_platform_data[] = { | ||
34 | #ifdef XPAR_UARTNS550_0_BASEADDR | ||
35 | XPAR_UART(0), | ||
36 | #endif | ||
37 | #ifdef XPAR_UARTNS550_1_BASEADDR | ||
38 | XPAR_UART(1), | ||
39 | #endif | ||
40 | #ifdef XPAR_UARTNS550_2_BASEADDR | ||
41 | XPAR_UART(2), | ||
42 | #endif | ||
43 | #ifdef XPAR_UARTNS550_3_BASEADDR | ||
44 | XPAR_UART(3), | ||
45 | #endif | ||
46 | { }, /* terminated by empty record */ | ||
47 | }; | ||
48 | |||
49 | struct platform_device ppc_sys_platform_devices[] = { | ||
50 | [VIRTEX_UART] = { | ||
51 | .name = "serial8250", | ||
52 | .id = 0, | ||
53 | .dev.platform_data = serial_platform_data, | ||
54 | }, | ||
55 | }; | ||
56 | |||
diff --git a/arch/ppc/platforms/4xx/virtex.h b/arch/ppc/platforms/4xx/virtex.h new file mode 100644 index 000000000000..1a01b81cff11 --- /dev/null +++ b/arch/ppc/platforms/4xx/virtex.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/virtex.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx Virtex-II Pro processor | ||
5 | * | ||
6 | * Author: MontaVista Software, Inc. | ||
7 | * source@mvista.com | ||
8 | * | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
10 | * terms of the GNU General Public License version 2. This program is licensed | ||
11 | * "as is" without any warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | #ifndef __ASM_VIRTEX_H__ | ||
16 | #define __ASM_VIRTEX_H__ | ||
17 | |||
18 | /* serial defines */ | ||
19 | |||
20 | #include <asm/ibm405.h> | ||
21 | |||
22 | /* Ugly, ugly, ugly! BASE_BAUD defined here to keep 8250.c happy. */ | ||
23 | #if !defined(BASE_BAUD) | ||
24 | #define BASE_BAUD (0) /* dummy value; not used */ | ||
25 | #endif | ||
26 | |||
27 | /* Device type enumeration for platform bus definitions */ | ||
28 | #ifndef __ASSEMBLY__ | ||
29 | enum ppc_sys_devices { | ||
30 | VIRTEX_UART, | ||
31 | }; | ||
32 | #endif | ||
33 | |||
34 | #endif /* __ASM_VIRTEX_H__ */ | ||
35 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/xilinx_ml300.c b/arch/ppc/platforms/4xx/xilinx_ml300.c index 0b1b77d986bf..267afb50607e 100644 --- a/arch/ppc/platforms/4xx/xilinx_ml300.c +++ b/arch/ppc/platforms/4xx/xilinx_ml300.c | |||
@@ -17,12 +17,14 @@ | |||
17 | #include <linux/tty.h> | 17 | #include <linux/tty.h> |
18 | #include <linux/serial.h> | 18 | #include <linux/serial.h> |
19 | #include <linux/serial_core.h> | 19 | #include <linux/serial_core.h> |
20 | #include <linux/serial_8250.h> | ||
20 | #include <linux/serialP.h> | 21 | #include <linux/serialP.h> |
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | #include <asm/machdep.h> | 23 | #include <asm/machdep.h> |
23 | #include <asm/ocp.h> | 24 | #include <asm/ppc_sys.h> |
24 | 25 | ||
25 | #include <platforms/4xx/virtex-ii_pro.h> /* for NR_SER_PORTS */ | 26 | #include <syslib/gen550.h> |
27 | #include <platforms/4xx/xparameters/xparameters.h> | ||
26 | 28 | ||
27 | /* | 29 | /* |
28 | * As an overview of how the following functions (platform_init, | 30 | * As an overview of how the following functions (platform_init, |
@@ -54,6 +56,22 @@ | |||
54 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c | 56 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c |
55 | */ | 57 | */ |
56 | 58 | ||
59 | /* Board specifications structures */ | ||
60 | struct ppc_sys_spec *cur_ppc_sys_spec; | ||
61 | struct ppc_sys_spec ppc_sys_specs[] = { | ||
62 | { | ||
63 | /* Only one entry, always assume the same design */ | ||
64 | .ppc_sys_name = "Xilinx ML300 Reference Design", | ||
65 | .mask = 0x00000000, | ||
66 | .value = 0x00000000, | ||
67 | .num_devices = 1, | ||
68 | .device_list = (enum ppc_sys_devices[]) | ||
69 | { | ||
70 | VIRTEX_UART, | ||
71 | }, | ||
72 | }, | ||
73 | }; | ||
74 | |||
57 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | 75 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) |
58 | 76 | ||
59 | static volatile unsigned *powerdown_base = | 77 | static volatile unsigned *powerdown_base = |
@@ -80,28 +98,39 @@ ml300_map_io(void) | |||
80 | #endif | 98 | #endif |
81 | } | 99 | } |
82 | 100 | ||
101 | /* Early serial support functions */ | ||
83 | static void __init | 102 | static void __init |
103 | ml300_early_serial_init(int num, struct plat_serial8250_port *pdata) | ||
104 | { | ||
105 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | ||
106 | struct uart_port serial_req; | ||
107 | |||
108 | memset(&serial_req, 0, sizeof(serial_req)); | ||
109 | serial_req.mapbase = pdata->mapbase; | ||
110 | serial_req.membase = pdata->membase; | ||
111 | serial_req.irq = pdata->irq; | ||
112 | serial_req.uartclk = pdata->uartclk; | ||
113 | serial_req.regshift = pdata->regshift; | ||
114 | serial_req.iotype = pdata->iotype; | ||
115 | serial_req.flags = pdata->flags; | ||
116 | gen550_init(num, &serial_req); | ||
117 | #endif | ||
118 | } | ||
119 | |||
120 | void __init | ||
84 | ml300_early_serial_map(void) | 121 | ml300_early_serial_map(void) |
85 | { | 122 | { |
86 | #ifdef CONFIG_SERIAL_8250 | 123 | #ifdef CONFIG_SERIAL_8250 |
87 | struct serial_state old_ports[] = { SERIAL_PORT_DFNS }; | 124 | struct plat_serial8250_port *pdata; |
88 | struct uart_port port; | 125 | int i = 0; |
89 | int i; | 126 | |
90 | 127 | pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(VIRTEX_UART); | |
91 | /* Setup ioremapped serial port access */ | 128 | while(pdata && pdata->flags) |
92 | for (i = 0; i < ARRAY_SIZE(old_ports); i++ ) { | 129 | { |
93 | memset(&port, 0, sizeof(port)); | 130 | pdata->membase = ioremap(pdata->mapbase, 0x100); |
94 | port.membase = ioremap((phys_addr_t)(old_ports[i].iomem_base), 16); | 131 | ml300_early_serial_init(i, pdata); |
95 | port.irq = old_ports[i].irq; | 132 | pdata++; |
96 | port.uartclk = old_ports[i].baud_base * 16; | 133 | i++; |
97 | port.regshift = old_ports[i].iomem_reg_shift; | ||
98 | port.iotype = SERIAL_IO_MEM; | ||
99 | port.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; | ||
100 | port.line = i; | ||
101 | |||
102 | if (early_serial_setup(&port) != 0) { | ||
103 | printk("Early serial init of port %d failed\n", i); | ||
104 | } | ||
105 | } | 134 | } |
106 | #endif /* CONFIG_SERIAL_8250 */ | 135 | #endif /* CONFIG_SERIAL_8250 */ |
107 | } | 136 | } |
@@ -109,9 +138,8 @@ ml300_early_serial_map(void) | |||
109 | void __init | 138 | void __init |
110 | ml300_setup_arch(void) | 139 | ml300_setup_arch(void) |
111 | { | 140 | { |
112 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | ||
113 | |||
114 | ml300_early_serial_map(); | 141 | ml300_early_serial_map(); |
142 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | ||
115 | 143 | ||
116 | /* Identify the system */ | 144 | /* Identify the system */ |
117 | printk(KERN_INFO "Xilinx Virtex-II Pro port\n"); | 145 | printk(KERN_INFO "Xilinx Virtex-II Pro port\n"); |
@@ -131,6 +159,8 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
131 | { | 159 | { |
132 | ppc4xx_init(r3, r4, r5, r6, r7); | 160 | ppc4xx_init(r3, r4, r5, r6, r7); |
133 | 161 | ||
162 | identify_ppc_sys_by_id(mfspr(SPRN_PVR)); | ||
163 | |||
134 | ppc_md.setup_arch = ml300_setup_arch; | 164 | ppc_md.setup_arch = ml300_setup_arch; |
135 | ppc_md.setup_io_mappings = ml300_map_io; | 165 | ppc_md.setup_io_mappings = ml300_map_io; |
136 | ppc_md.init_IRQ = ml300_init_irq; | 166 | ppc_md.init_IRQ = ml300_init_irq; |
diff --git a/arch/ppc/platforms/4xx/xilinx_ml300.h b/arch/ppc/platforms/4xx/xilinx_ml300.h index f8c588412336..ae8bf1353b01 100644 --- a/arch/ppc/platforms/4xx/xilinx_ml300.h +++ b/arch/ppc/platforms/4xx/xilinx_ml300.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define __ASM_XILINX_ML300_H__ | 16 | #define __ASM_XILINX_ML300_H__ |
17 | 17 | ||
18 | /* ML300 has a Xilinx Virtex-II Pro processor */ | 18 | /* ML300 has a Xilinx Virtex-II Pro processor */ |
19 | #include <platforms/4xx/virtex-ii_pro.h> | 19 | #include <platforms/4xx/virtex.h> |
20 | 20 | ||
21 | #ifndef __ASSEMBLY__ | 21 | #ifndef __ASSEMBLY__ |
22 | 22 | ||
@@ -41,7 +41,7 @@ typedef struct board_info { | |||
41 | #define PPC4xx_ONB_IO_VADDR 0u | 41 | #define PPC4xx_ONB_IO_VADDR 0u |
42 | #define PPC4xx_ONB_IO_SIZE 0u | 42 | #define PPC4xx_ONB_IO_SIZE 0u |
43 | 43 | ||
44 | #define PPC4xx_MACHINE_NAME "Xilinx ML300" | 44 | #define PPC4xx_MACHINE_NAME "Xilinx ML300 Reference System" |
45 | 45 | ||
46 | #endif /* __ASM_XILINX_ML300_H__ */ | 46 | #endif /* __ASM_XILINX_ML300_H__ */ |
47 | #endif /* __KERNEL__ */ | 47 | #endif /* __KERNEL__ */ |
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.c b/arch/ppc/platforms/4xx/xilinx_ml403.c new file mode 100644 index 000000000000..4c0c7e4c1114 --- /dev/null +++ b/arch/ppc/platforms/4xx/xilinx_ml403.c | |||
@@ -0,0 +1,177 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/xilinx_ml403.c | ||
3 | * | ||
4 | * Xilinx ML403 evaluation board initialization | ||
5 | * | ||
6 | * Author: Grant Likely <grant.likely@secretlab.ca> | ||
7 | * | ||
8 | * 2005 (c) Secret Lab Technologies Ltd. | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | #include <linux/config.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/irq.h> | ||
19 | #include <linux/tty.h> | ||
20 | #include <linux/serial.h> | ||
21 | #include <linux/serial_core.h> | ||
22 | #include <linux/serial_8250.h> | ||
23 | #include <linux/serialP.h> | ||
24 | #include <asm/io.h> | ||
25 | #include <asm/machdep.h> | ||
26 | #include <asm/ppc_sys.h> | ||
27 | |||
28 | #include <syslib/gen550.h> | ||
29 | #include <platforms/4xx/xparameters/xparameters.h> | ||
30 | |||
31 | /* | ||
32 | * As an overview of how the following functions (platform_init, | ||
33 | * ml403_map_io, ml403_setup_arch and ml403_init_IRQ) fit into the | ||
34 | * kernel startup procedure, here's a call tree: | ||
35 | * | ||
36 | * start_here arch/ppc/kernel/head_4xx.S | ||
37 | * early_init arch/ppc/kernel/setup.c | ||
38 | * machine_init arch/ppc/kernel/setup.c | ||
39 | * platform_init this file | ||
40 | * ppc4xx_init arch/ppc/syslib/ppc4xx_setup.c | ||
41 | * parse_bootinfo | ||
42 | * find_bootinfo | ||
43 | * "setup some default ppc_md pointers" | ||
44 | * MMU_init arch/ppc/mm/init.c | ||
45 | * *ppc_md.setup_io_mappings == ml403_map_io this file | ||
46 | * ppc4xx_map_io arch/ppc/syslib/ppc4xx_setup.c | ||
47 | * start_kernel init/main.c | ||
48 | * setup_arch arch/ppc/kernel/setup.c | ||
49 | * #if defined(CONFIG_KGDB) | ||
50 | * *ppc_md.kgdb_map_scc() == gen550_kgdb_map_scc | ||
51 | * #endif | ||
52 | * *ppc_md.setup_arch == ml403_setup_arch this file | ||
53 | * ppc4xx_setup_arch arch/ppc/syslib/ppc4xx_setup.c | ||
54 | * ppc4xx_find_bridges arch/ppc/syslib/ppc405_pci.c | ||
55 | * init_IRQ arch/ppc/kernel/irq.c | ||
56 | * *ppc_md.init_IRQ == ml403_init_IRQ this file | ||
57 | * ppc4xx_init_IRQ arch/ppc/syslib/ppc4xx_setup.c | ||
58 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c | ||
59 | */ | ||
60 | |||
61 | /* Board specifications structures */ | ||
62 | struct ppc_sys_spec *cur_ppc_sys_spec; | ||
63 | struct ppc_sys_spec ppc_sys_specs[] = { | ||
64 | { | ||
65 | /* Only one entry, always assume the same design */ | ||
66 | .ppc_sys_name = "Xilinx ML403 Reference Design", | ||
67 | .mask = 0x00000000, | ||
68 | .value = 0x00000000, | ||
69 | .num_devices = 1, | ||
70 | .device_list = (enum ppc_sys_devices[]) | ||
71 | { | ||
72 | VIRTEX_UART, | ||
73 | }, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | ||
78 | |||
79 | static volatile unsigned *powerdown_base = | ||
80 | (volatile unsigned *) XPAR_POWER_0_POWERDOWN_BASEADDR; | ||
81 | |||
82 | static void | ||
83 | xilinx_power_off(void) | ||
84 | { | ||
85 | local_irq_disable(); | ||
86 | out_be32(powerdown_base, XPAR_POWER_0_POWERDOWN_VALUE); | ||
87 | while (1) ; | ||
88 | } | ||
89 | #endif | ||
90 | |||
91 | void __init | ||
92 | ml403_map_io(void) | ||
93 | { | ||
94 | ppc4xx_map_io(); | ||
95 | |||
96 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | ||
97 | powerdown_base = ioremap((unsigned long) powerdown_base, | ||
98 | XPAR_POWER_0_POWERDOWN_HIGHADDR - | ||
99 | XPAR_POWER_0_POWERDOWN_BASEADDR + 1); | ||
100 | #endif | ||
101 | } | ||
102 | |||
103 | /* Early serial support functions */ | ||
104 | static void __init | ||
105 | ml403_early_serial_init(int num, struct plat_serial8250_port *pdata) | ||
106 | { | ||
107 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | ||
108 | struct uart_port serial_req; | ||
109 | |||
110 | memset(&serial_req, 0, sizeof(serial_req)); | ||
111 | serial_req.mapbase = pdata->mapbase; | ||
112 | serial_req.membase = pdata->membase; | ||
113 | serial_req.irq = pdata->irq; | ||
114 | serial_req.uartclk = pdata->uartclk; | ||
115 | serial_req.regshift = pdata->regshift; | ||
116 | serial_req.iotype = pdata->iotype; | ||
117 | serial_req.flags = pdata->flags; | ||
118 | gen550_init(num, &serial_req); | ||
119 | #endif | ||
120 | } | ||
121 | |||
122 | void __init | ||
123 | ml403_early_serial_map(void) | ||
124 | { | ||
125 | #ifdef CONFIG_SERIAL_8250 | ||
126 | struct plat_serial8250_port *pdata; | ||
127 | int i = 0; | ||
128 | |||
129 | pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(VIRTEX_UART); | ||
130 | while(pdata && pdata->flags) | ||
131 | { | ||
132 | pdata->membase = ioremap(pdata->mapbase, 0x100); | ||
133 | ml403_early_serial_init(i, pdata); | ||
134 | pdata++; | ||
135 | i++; | ||
136 | } | ||
137 | #endif /* CONFIG_SERIAL_8250 */ | ||
138 | } | ||
139 | |||
140 | void __init | ||
141 | ml403_setup_arch(void) | ||
142 | { | ||
143 | ml403_early_serial_map(); | ||
144 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | ||
145 | |||
146 | /* Identify the system */ | ||
147 | printk(KERN_INFO "Xilinx ML403 Reference System (Virtex-4 FX)\n"); | ||
148 | } | ||
149 | |||
150 | /* Called after board_setup_irq from ppc4xx_init_IRQ(). */ | ||
151 | void __init | ||
152 | ml403_init_irq(void) | ||
153 | { | ||
154 | ppc4xx_init_IRQ(); | ||
155 | } | ||
156 | |||
157 | void __init | ||
158 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
159 | unsigned long r6, unsigned long r7) | ||
160 | { | ||
161 | ppc4xx_init(r3, r4, r5, r6, r7); | ||
162 | |||
163 | identify_ppc_sys_by_id(mfspr(SPRN_PVR)); | ||
164 | |||
165 | ppc_md.setup_arch = ml403_setup_arch; | ||
166 | ppc_md.setup_io_mappings = ml403_map_io; | ||
167 | ppc_md.init_IRQ = ml403_init_irq; | ||
168 | |||
169 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | ||
170 | ppc_md.power_off = xilinx_power_off; | ||
171 | #endif | ||
172 | |||
173 | #ifdef CONFIG_KGDB | ||
174 | ppc_md.early_serial_map = ml403_early_serial_map; | ||
175 | #endif | ||
176 | } | ||
177 | |||
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.h b/arch/ppc/platforms/4xx/xilinx_ml403.h new file mode 100644 index 000000000000..473596959902 --- /dev/null +++ b/arch/ppc/platforms/4xx/xilinx_ml403.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/xilinx_ml403.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx ML403 reference design | ||
5 | * | ||
6 | * Author: Grant Likely <grant.likely@secretlab.ca> | ||
7 | * | ||
8 | * 2005 (c) Secret Lab Technologies Ltd. | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | #ifdef __KERNEL__ | ||
17 | #ifndef __ASM_XILINX_ML403_H__ | ||
18 | #define __ASM_XILINX_ML403_H__ | ||
19 | |||
20 | /* ML403 has a Xilinx Virtex-4 FPGA with a PPC405 hard core */ | ||
21 | #include <platforms/4xx/virtex.h> | ||
22 | |||
23 | #ifndef __ASSEMBLY__ | ||
24 | |||
25 | #include <linux/types.h> | ||
26 | |||
27 | typedef struct board_info { | ||
28 | unsigned int bi_memsize; /* DRAM installed, in bytes */ | ||
29 | unsigned char bi_enetaddr[6]; /* Local Ethernet MAC address */ | ||
30 | unsigned int bi_intfreq; /* Processor speed, in Hz */ | ||
31 | unsigned int bi_busfreq; /* PLB Bus speed, in Hz */ | ||
32 | unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */ | ||
33 | } bd_t; | ||
34 | |||
35 | /* Some 4xx parts use a different timebase frequency from the internal clock. | ||
36 | */ | ||
37 | #define bi_tbfreq bi_intfreq | ||
38 | |||
39 | #endif /* !__ASSEMBLY__ */ | ||
40 | |||
41 | /* We don't need anything mapped. Size of zero will accomplish that. */ | ||
42 | #define PPC4xx_ONB_IO_PADDR 0u | ||
43 | #define PPC4xx_ONB_IO_VADDR 0u | ||
44 | #define PPC4xx_ONB_IO_SIZE 0u | ||
45 | |||
46 | #define PPC4xx_MACHINE_NAME "Xilinx ML403 Reference Design" | ||
47 | |||
48 | #endif /* __ASM_XILINX_ML403_H__ */ | ||
49 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters.h b/arch/ppc/platforms/4xx/xparameters/xparameters.h new file mode 100644 index 000000000000..4cf21f256356 --- /dev/null +++ b/arch/ppc/platforms/4xx/xparameters/xparameters.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * include/asm-ppc/xparameters.h | ||
3 | * | ||
4 | * This file includes the correct xparameters.h for the CONFIG'ed board plus | ||
5 | * fixups to translate board specific XPAR values to a common set of names | ||
6 | * | ||
7 | * Author: MontaVista Software, Inc. | ||
8 | * source@mvista.com | ||
9 | * | ||
10 | * 2004 (c) MontaVista Software, Inc. This file is licensed under the terms | ||
11 | * of the GNU General Public License version 2. This program is licensed | ||
12 | * "as is" without any warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #include <linux/config.h> | ||
16 | |||
17 | #if defined(CONFIG_XILINX_ML300) | ||
18 | #include "xparameters_ml300.h" | ||
19 | #elif defined(CONFIG_XILINX_ML403) | ||
20 | #include "xparameters_ml403.h" | ||
21 | #else | ||
22 | /* Add other board xparameter includes here before the #else */ | ||
23 | #error No xparameters_*.h file included | ||
24 | #endif | ||
25 | |||
26 | #ifndef SERIAL_PORT_DFNS | ||
27 | /* zImage serial port definitions */ | ||
28 | #define RS_TABLE_SIZE 1 | ||
29 | #define SERIAL_PORT_DFNS { \ | ||
30 | .baud_base = XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16, \ | ||
31 | .irq = XPAR_INTC_0_UARTNS550_0_VEC_ID, \ | ||
32 | .flags = ASYNC_BOOT_AUTOCONF, \ | ||
33 | .iomem_base = (u8 *)XPAR_UARTNS550_0_BASEADDR + 3, \ | ||
34 | .iomem_reg_shift = 2, \ | ||
35 | .io_type = SERIAL_IO_MEM, \ | ||
36 | }, | ||
37 | #endif | ||
diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h b/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h new file mode 100644 index 000000000000..5cacdcb3964d --- /dev/null +++ b/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h | |||
@@ -0,0 +1,243 @@ | |||
1 | |||
2 | /******************************************************************* | ||
3 | * | ||
4 | * CAUTION: This file is automatically generated by libgen. | ||
5 | * Version: Xilinx EDK 7.1.2 EDK_H.12.5.1 | ||
6 | * DO NOT EDIT. | ||
7 | * | ||
8 | * Copyright (c) 2005 Xilinx, Inc. All rights reserved. | ||
9 | * | ||
10 | * Description: Driver parameters | ||
11 | * | ||
12 | *******************************************************************/ | ||
13 | |||
14 | #define XPAR_PLB_BRAM_IF_CNTLR_0_BASEADDR 0xFFFF0000 | ||
15 | #define XPAR_PLB_BRAM_IF_CNTLR_0_HIGHADDR 0xFFFFFFFF | ||
16 | |||
17 | /******************************************************************/ | ||
18 | |||
19 | #define XPAR_OPB_EMC_0_MEM0_BASEADDR 0x20000000 | ||
20 | #define XPAR_OPB_EMC_0_MEM0_HIGHADDR 0x200FFFFF | ||
21 | #define XPAR_OPB_EMC_0_MEM1_BASEADDR 0x28000000 | ||
22 | #define XPAR_OPB_EMC_0_MEM1_HIGHADDR 0x287FFFFF | ||
23 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR 0xA6000000 | ||
24 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_HIGHADDR 0xA60000FF | ||
25 | #define XPAR_OPB_EMC_USB_0_MEM0_BASEADDR 0xA5000000 | ||
26 | #define XPAR_OPB_EMC_USB_0_MEM0_HIGHADDR 0xA50000FF | ||
27 | #define XPAR_PLB_DDR_0_MEM0_BASEADDR 0x00000000 | ||
28 | #define XPAR_PLB_DDR_0_MEM0_HIGHADDR 0x0FFFFFFF | ||
29 | |||
30 | /******************************************************************/ | ||
31 | |||
32 | #define XPAR_XEMAC_NUM_INSTANCES 1 | ||
33 | #define XPAR_OPB_ETHERNET_0_BASEADDR 0x60000000 | ||
34 | #define XPAR_OPB_ETHERNET_0_HIGHADDR 0x60003FFF | ||
35 | #define XPAR_OPB_ETHERNET_0_DEVICE_ID 0 | ||
36 | #define XPAR_OPB_ETHERNET_0_ERR_COUNT_EXIST 1 | ||
37 | #define XPAR_OPB_ETHERNET_0_DMA_PRESENT 1 | ||
38 | #define XPAR_OPB_ETHERNET_0_MII_EXIST 1 | ||
39 | |||
40 | /******************************************************************/ | ||
41 | |||
42 | #define XPAR_XUARTNS550_NUM_INSTANCES 1 | ||
43 | #define XPAR_XUARTNS550_CLOCK_HZ 100000000 | ||
44 | #define XPAR_OPB_UART16550_0_BASEADDR 0xA0000000 | ||
45 | #define XPAR_OPB_UART16550_0_HIGHADDR 0xA0001FFF | ||
46 | #define XPAR_OPB_UART16550_0_DEVICE_ID 0 | ||
47 | |||
48 | /******************************************************************/ | ||
49 | |||
50 | #define XPAR_XGPIO_NUM_INSTANCES 3 | ||
51 | #define XPAR_OPB_GPIO_0_BASEADDR 0x90000000 | ||
52 | #define XPAR_OPB_GPIO_0_HIGHADDR 0x900001FF | ||
53 | #define XPAR_OPB_GPIO_0_DEVICE_ID 0 | ||
54 | #define XPAR_OPB_GPIO_0_INTERRUPT_PRESENT 0 | ||
55 | #define XPAR_OPB_GPIO_0_IS_DUAL 1 | ||
56 | #define XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR 0x90001000 | ||
57 | #define XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR 0x900011FF | ||
58 | #define XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID 1 | ||
59 | #define XPAR_OPB_GPIO_EXP_HDR_0_INTERRUPT_PRESENT 0 | ||
60 | #define XPAR_OPB_GPIO_EXP_HDR_0_IS_DUAL 1 | ||
61 | #define XPAR_OPB_GPIO_CHAR_LCD_0_BASEADDR 0x90002000 | ||
62 | #define XPAR_OPB_GPIO_CHAR_LCD_0_HIGHADDR 0x900021FF | ||
63 | #define XPAR_OPB_GPIO_CHAR_LCD_0_DEVICE_ID 2 | ||
64 | #define XPAR_OPB_GPIO_CHAR_LCD_0_INTERRUPT_PRESENT 0 | ||
65 | #define XPAR_OPB_GPIO_CHAR_LCD_0_IS_DUAL 0 | ||
66 | |||
67 | /******************************************************************/ | ||
68 | |||
69 | #define XPAR_XPS2_NUM_INSTANCES 2 | ||
70 | #define XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_0 0 | ||
71 | #define XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_0 0xA9000000 | ||
72 | #define XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_0 (0xA9000000+0x3F) | ||
73 | #define XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_1 1 | ||
74 | #define XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_1 (0xA9000000+0x1000) | ||
75 | #define XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_1 (0xA9000000+0x103F) | ||
76 | |||
77 | /******************************************************************/ | ||
78 | |||
79 | #define XPAR_XIIC_NUM_INSTANCES 1 | ||
80 | #define XPAR_OPB_IIC_0_BASEADDR 0xA8000000 | ||
81 | #define XPAR_OPB_IIC_0_HIGHADDR 0xA80001FF | ||
82 | #define XPAR_OPB_IIC_0_DEVICE_ID 0 | ||
83 | #define XPAR_OPB_IIC_0_TEN_BIT_ADR 0 | ||
84 | #define XPAR_OPB_IIC_0_GPO_WIDTH 1 | ||
85 | |||
86 | /******************************************************************/ | ||
87 | |||
88 | #define XPAR_INTC_MAX_NUM_INTR_INPUTS 10 | ||
89 | #define XPAR_XINTC_HAS_IPR 1 | ||
90 | #define XPAR_XINTC_USE_DCR 0 | ||
91 | #define XPAR_XINTC_NUM_INSTANCES 1 | ||
92 | #define XPAR_OPB_INTC_0_BASEADDR 0xD1000FC0 | ||
93 | #define XPAR_OPB_INTC_0_HIGHADDR 0xD1000FDF | ||
94 | #define XPAR_OPB_INTC_0_DEVICE_ID 0 | ||
95 | #define XPAR_OPB_INTC_0_KIND_OF_INTR 0x00000000 | ||
96 | |||
97 | /******************************************************************/ | ||
98 | |||
99 | #define XPAR_INTC_SINGLE_BASEADDR 0xD1000FC0 | ||
100 | #define XPAR_INTC_SINGLE_HIGHADDR 0xD1000FDF | ||
101 | #define XPAR_INTC_SINGLE_DEVICE_ID XPAR_OPB_INTC_0_DEVICE_ID | ||
102 | #define XPAR_OPB_ETHERNET_0_IP2INTC_IRPT_MASK 0X000001 | ||
103 | #define XPAR_OPB_INTC_0_OPB_ETHERNET_0_IP2INTC_IRPT_INTR 0 | ||
104 | #define XPAR_SYSTEM_USB_HPI_INT_MASK 0X000002 | ||
105 | #define XPAR_OPB_INTC_0_SYSTEM_USB_HPI_INT_INTR 1 | ||
106 | #define XPAR_MISC_LOGIC_0_PHY_MII_INT_MASK 0X000004 | ||
107 | #define XPAR_OPB_INTC_0_MISC_LOGIC_0_PHY_MII_INT_INTR 2 | ||
108 | #define XPAR_OPB_SYSACE_0_SYSACE_IRQ_MASK 0X000008 | ||
109 | #define XPAR_OPB_INTC_0_OPB_SYSACE_0_SYSACE_IRQ_INTR 3 | ||
110 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_MASK 0X000010 | ||
111 | #define XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_INTR 4 | ||
112 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_MASK 0X000020 | ||
113 | #define XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_INTR 5 | ||
114 | #define XPAR_OPB_IIC_0_IP2INTC_IRPT_MASK 0X000040 | ||
115 | #define XPAR_OPB_INTC_0_OPB_IIC_0_IP2INTC_IRPT_INTR 6 | ||
116 | #define XPAR_OPB_PS2_DUAL_REF_0_SYS_INTR2_MASK 0X000080 | ||
117 | #define XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR2_INTR 7 | ||
118 | #define XPAR_OPB_PS2_DUAL_REF_0_SYS_INTR1_MASK 0X000100 | ||
119 | #define XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR1_INTR 8 | ||
120 | #define XPAR_OPB_UART16550_0_IP2INTC_IRPT_MASK 0X000200 | ||
121 | #define XPAR_OPB_INTC_0_OPB_UART16550_0_IP2INTC_IRPT_INTR 9 | ||
122 | |||
123 | /******************************************************************/ | ||
124 | |||
125 | #define XPAR_XTFT_NUM_INSTANCES 1 | ||
126 | #define XPAR_PLB_TFT_CNTLR_REF_0_DCR_BASEADDR 0xD0000200 | ||
127 | #define XPAR_PLB_TFT_CNTLR_REF_0_DCR_HIGHADDR 0xD0000207 | ||
128 | #define XPAR_PLB_TFT_CNTLR_REF_0_DEVICE_ID 0 | ||
129 | |||
130 | /******************************************************************/ | ||
131 | |||
132 | #define XPAR_XSYSACE_MEM_WIDTH 16 | ||
133 | #define XPAR_XSYSACE_NUM_INSTANCES 1 | ||
134 | #define XPAR_OPB_SYSACE_0_BASEADDR 0xCF000000 | ||
135 | #define XPAR_OPB_SYSACE_0_HIGHADDR 0xCF0001FF | ||
136 | #define XPAR_OPB_SYSACE_0_DEVICE_ID 0 | ||
137 | #define XPAR_OPB_SYSACE_0_MEM_WIDTH 16 | ||
138 | |||
139 | /******************************************************************/ | ||
140 | |||
141 | #define XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ 300000000 | ||
142 | |||
143 | /******************************************************************/ | ||
144 | |||
145 | |||
146 | /******************************************************************/ | ||
147 | |||
148 | /* Linux Redefines */ | ||
149 | |||
150 | /******************************************************************/ | ||
151 | |||
152 | #define XPAR_UARTNS550_0_BASEADDR (XPAR_OPB_UART16550_0_BASEADDR+0x1000) | ||
153 | #define XPAR_UARTNS550_0_HIGHADDR XPAR_OPB_UART16550_0_HIGHADDR | ||
154 | #define XPAR_UARTNS550_0_CLOCK_FREQ_HZ XPAR_XUARTNS550_CLOCK_HZ | ||
155 | #define XPAR_UARTNS550_0_DEVICE_ID XPAR_OPB_UART16550_0_DEVICE_ID | ||
156 | |||
157 | /******************************************************************/ | ||
158 | |||
159 | #define XPAR_INTC_0_BASEADDR XPAR_OPB_INTC_0_BASEADDR | ||
160 | #define XPAR_INTC_0_HIGHADDR XPAR_OPB_INTC_0_HIGHADDR | ||
161 | #define XPAR_INTC_0_KIND_OF_INTR XPAR_OPB_INTC_0_KIND_OF_INTR | ||
162 | #define XPAR_INTC_0_DEVICE_ID XPAR_OPB_INTC_0_DEVICE_ID | ||
163 | |||
164 | /******************************************************************/ | ||
165 | |||
166 | #define XPAR_INTC_0_EMAC_0_VEC_ID XPAR_OPB_INTC_0_OPB_ETHERNET_0_IP2INTC_IRPT_INTR | ||
167 | #define XPAR_INTC_0_SYSACE_0_VEC_ID XPAR_OPB_INTC_0_OPB_SYSACE_0_SYSACE_IRQ_INTR | ||
168 | #define XPAR_INTC_0_IIC_0_VEC_ID XPAR_OPB_INTC_0_OPB_IIC_0_IP2INTC_IRPT_INTR | ||
169 | #define XPAR_INTC_0_PS2_1_VEC_ID XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR2_INTR | ||
170 | #define XPAR_INTC_0_PS2_0_VEC_ID XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR1_INTR | ||
171 | #define XPAR_INTC_0_UARTNS550_0_VEC_ID XPAR_OPB_INTC_0_OPB_UART16550_0_IP2INTC_IRPT_INTR | ||
172 | |||
173 | /******************************************************************/ | ||
174 | |||
175 | #define XPAR_TFT_0_BASEADDR XPAR_PLB_TFT_CNTLR_REF_0_DCR_BASEADDR | ||
176 | |||
177 | /******************************************************************/ | ||
178 | |||
179 | #define XPAR_EMAC_0_BASEADDR XPAR_OPB_ETHERNET_0_BASEADDR | ||
180 | #define XPAR_EMAC_0_HIGHADDR XPAR_OPB_ETHERNET_0_HIGHADDR | ||
181 | #define XPAR_EMAC_0_DMA_PRESENT XPAR_OPB_ETHERNET_0_DMA_PRESENT | ||
182 | #define XPAR_EMAC_0_MII_EXIST XPAR_OPB_ETHERNET_0_MII_EXIST | ||
183 | #define XPAR_EMAC_0_ERR_COUNT_EXIST XPAR_OPB_ETHERNET_0_ERR_COUNT_EXIST | ||
184 | #define XPAR_EMAC_0_DEVICE_ID XPAR_OPB_ETHERNET_0_DEVICE_ID | ||
185 | |||
186 | /******************************************************************/ | ||
187 | |||
188 | #define XPAR_GPIO_0_BASEADDR XPAR_OPB_GPIO_0_BASEADDR_0 | ||
189 | #define XPAR_GPIO_0_HIGHADDR XPAR_OPB_GPIO_0_HIGHADDR_0 | ||
190 | #define XPAR_GPIO_0_DEVICE_ID XPAR_OPB_GPIO_0_DEVICE_ID_0 | ||
191 | #define XPAR_GPIO_1_BASEADDR XPAR_OPB_GPIO_0_BASEADDR_1 | ||
192 | #define XPAR_GPIO_1_HIGHADDR XPAR_OPB_GPIO_0_HIGHADDR_1 | ||
193 | #define XPAR_GPIO_1_DEVICE_ID XPAR_OPB_GPIO_0_DEVICE_ID_1 | ||
194 | #define XPAR_GPIO_2_BASEADDR XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR_0 | ||
195 | #define XPAR_GPIO_2_HIGHADDR XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR_0 | ||
196 | #define XPAR_GPIO_2_DEVICE_ID XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID_0 | ||
197 | #define XPAR_GPIO_3_BASEADDR XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR_1 | ||
198 | #define XPAR_GPIO_3_HIGHADDR XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR_1 | ||
199 | #define XPAR_GPIO_3_DEVICE_ID XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID_1 | ||
200 | #define XPAR_GPIO_4_BASEADDR XPAR_OPB_GPIO_CHAR_LCD_0_BASEADDR | ||
201 | #define XPAR_GPIO_4_HIGHADDR XPAR_OPB_GPIO_CHAR_LCD_0_HIGHADDR | ||
202 | #define XPAR_GPIO_4_DEVICE_ID XPAR_OPB_GPIO_CHAR_LCD_0_DEVICE_ID | ||
203 | |||
204 | /******************************************************************/ | ||
205 | |||
206 | #define XPAR_PS2_0_BASEADDR XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_0 | ||
207 | #define XPAR_PS2_0_HIGHADDR XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_0 | ||
208 | #define XPAR_PS2_0_DEVICE_ID XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_0 | ||
209 | #define XPAR_PS2_1_BASEADDR XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_1 | ||
210 | #define XPAR_PS2_1_HIGHADDR XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_1 | ||
211 | #define XPAR_PS2_1_DEVICE_ID XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_1 | ||
212 | |||
213 | /******************************************************************/ | ||
214 | |||
215 | #define XPAR_SYSACE_0_BASEADDR XPAR_OPB_SYSACE_0_BASEADDR | ||
216 | #define XPAR_SYSACE_0_HIGHADDR XPAR_OPB_SYSACE_0_HIGHADDR | ||
217 | #define XPAR_SYSACE_0_DEVICE_ID XPAR_OPB_SYSACE_0_DEVICE_ID | ||
218 | |||
219 | /******************************************************************/ | ||
220 | |||
221 | #define XPAR_IIC_0_BASEADDR XPAR_OPB_IIC_0_BASEADDR | ||
222 | #define XPAR_IIC_0_HIGHADDR XPAR_OPB_IIC_0_HIGHADDR | ||
223 | #define XPAR_IIC_0_TEN_BIT_ADR XPAR_OPB_IIC_0_TEN_BIT_ADR | ||
224 | #define XPAR_IIC_0_DEVICE_ID XPAR_OPB_IIC_0_DEVICE_ID | ||
225 | |||
226 | /******************************************************************/ | ||
227 | |||
228 | #define XPAR_PLB_CLOCK_FREQ_HZ 100000000 | ||
229 | #define XPAR_CORE_CLOCK_FREQ_HZ XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ | ||
230 | #define XPAR_DDR_0_SIZE 0x4000000 | ||
231 | |||
232 | /******************************************************************/ | ||
233 | |||
234 | #define XPAR_PERSISTENT_0_IIC_0_BASEADDR 0x00000400 | ||
235 | #define XPAR_PERSISTENT_0_IIC_0_HIGHADDR 0x000007FF | ||
236 | #define XPAR_PERSISTENT_0_IIC_0_EEPROMADDR 0xA0 | ||
237 | |||
238 | /******************************************************************/ | ||
239 | |||
240 | #define XPAR_PCI_0_CLOCK_FREQ_HZ 0 | ||
241 | |||
242 | /******************************************************************/ | ||
243 | |||
diff --git a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile index 51430e294b32..e8b91a33ce91 100644 --- a/arch/ppc/platforms/Makefile +++ b/arch/ppc/platforms/Makefile | |||
@@ -37,6 +37,9 @@ obj-$(CONFIG_SBC82xx) += sbc82xx.o | |||
37 | obj-$(CONFIG_SPRUCE) += spruce.o | 37 | obj-$(CONFIG_SPRUCE) += spruce.o |
38 | obj-$(CONFIG_LITE5200) += lite5200.o | 38 | obj-$(CONFIG_LITE5200) += lite5200.o |
39 | obj-$(CONFIG_EV64360) += ev64360.o | 39 | obj-$(CONFIG_EV64360) += ev64360.o |
40 | obj-$(CONFIG_MPC86XADS) += mpc866ads_setup.o | ||
41 | obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o | ||
42 | obj-$(CONFIG_ADS8272) += mpc8272ads_setup.o | ||
40 | 43 | ||
41 | ifeq ($(CONFIG_SMP),y) | 44 | ifeq ($(CONFIG_SMP),y) |
42 | obj-$(CONFIG_PPC_CHRP) += chrp_smp.o | 45 | obj-$(CONFIG_PPC_CHRP) += chrp_smp.o |
diff --git a/arch/ppc/platforms/fads.h b/arch/ppc/platforms/fads.h index a48fb8d723e4..e1c0b1b6dcb3 100644 --- a/arch/ppc/platforms/fads.h +++ b/arch/ppc/platforms/fads.h | |||
@@ -112,7 +112,7 @@ | |||
112 | 112 | ||
113 | /* CPM Ethernet through SCC1 or SCC2 */ | 113 | /* CPM Ethernet through SCC1 or SCC2 */ |
114 | 114 | ||
115 | #ifdef CONFIG_SCC1_ENET /* Probably 860 variant */ | 115 | #if defined(CONFIG_SCC1_ENET) || defined(CONFIG_MPC8xx_SECOND_ETH_SCC1) /* Probably 860 variant */ |
116 | /* Bits in parallel I/O port registers that have to be set/cleared | 116 | /* Bits in parallel I/O port registers that have to be set/cleared |
117 | * to configure the pins for SCC1 use. | 117 | * to configure the pins for SCC1 use. |
118 | * TCLK - CLK1, RCLK - CLK2. | 118 | * TCLK - CLK1, RCLK - CLK2. |
diff --git a/arch/ppc/platforms/mpc8272ads_setup.c b/arch/ppc/platforms/mpc8272ads_setup.c new file mode 100644 index 000000000000..bc9b94f77e39 --- /dev/null +++ b/arch/ppc/platforms/mpc8272ads_setup.c | |||
@@ -0,0 +1,236 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/82xx/pq2ads_pd.c | ||
3 | * | ||
4 | * MPC82xx Board-specific PlatformDevice descriptions | ||
5 | * | ||
6 | * 2005 (c) MontaVista Software, Inc. | ||
7 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/device.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/fs_enet_pd.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | |||
22 | #include <asm/io.h> | ||
23 | #include <asm/mpc8260.h> | ||
24 | #include <asm/cpm2.h> | ||
25 | #include <asm/immap_cpm2.h> | ||
26 | #include <asm/irq.h> | ||
27 | #include <asm/ppc_sys.h> | ||
28 | #include <asm/ppcboot.h> | ||
29 | |||
30 | #include "pq2ads_pd.h" | ||
31 | |||
32 | static void init_fcc1_ioports(void); | ||
33 | static void init_fcc2_ioports(void); | ||
34 | |||
35 | static struct fs_mii_bus_info mii_bus_info = { | ||
36 | .method = fsmii_bitbang, | ||
37 | .id = 0, | ||
38 | .i.bitbang = { | ||
39 | .mdio_port = fsiop_portc, | ||
40 | .mdio_bit = 18, | ||
41 | .mdc_port = fsiop_portc, | ||
42 | .mdc_bit = 19, | ||
43 | .delay = 1, | ||
44 | }, | ||
45 | }; | ||
46 | |||
47 | static struct fs_platform_info mpc82xx_fcc1_pdata = { | ||
48 | .fs_no = fsid_fcc1, | ||
49 | .cp_page = CPM_CR_FCC1_PAGE, | ||
50 | .cp_block = CPM_CR_FCC1_SBLOCK, | ||
51 | .clk_trx = (PC_F1RXCLK | PC_F1TXCLK), | ||
52 | .clk_route = CMX1_CLK_ROUTE, | ||
53 | .clk_mask = CMX1_CLK_MASK, | ||
54 | .init_ioports = init_fcc1_ioports, | ||
55 | |||
56 | .phy_addr = 0, | ||
57 | #ifdef PHY_INTERRUPT | ||
58 | .phy_irq = PHY_INTERRUPT, | ||
59 | #else | ||
60 | .phy_irq = -1; | ||
61 | #endif | ||
62 | .mem_offset = FCC1_MEM_OFFSET, | ||
63 | .bus_info = &mii_bus_info, | ||
64 | .rx_ring = 32, | ||
65 | .tx_ring = 32, | ||
66 | .rx_copybreak = 240, | ||
67 | .use_napi = 0, | ||
68 | .napi_weight = 17, | ||
69 | }; | ||
70 | |||
71 | static struct fs_platform_info mpc82xx_fcc2_pdata = { | ||
72 | .fs_no = fsid_fcc2, | ||
73 | .cp_page = CPM_CR_FCC2_PAGE, | ||
74 | .cp_block = CPM_CR_FCC2_SBLOCK, | ||
75 | .clk_trx = (PC_F2RXCLK | PC_F2TXCLK), | ||
76 | .clk_route = CMX2_CLK_ROUTE, | ||
77 | .clk_mask = CMX2_CLK_MASK, | ||
78 | .init_ioports = init_fcc2_ioports, | ||
79 | |||
80 | .phy_addr = 3, | ||
81 | #ifdef PHY_INTERRUPT | ||
82 | .phy_irq = PHY_INTERRUPT, | ||
83 | #else | ||
84 | .phy_irq = -1; | ||
85 | #endif | ||
86 | .mem_offset = FCC2_MEM_OFFSET, | ||
87 | .bus_info = &mii_bus_info, | ||
88 | .rx_ring = 32, | ||
89 | .tx_ring = 32, | ||
90 | .rx_copybreak = 240, | ||
91 | .use_napi = 0, | ||
92 | .napi_weight = 17, | ||
93 | }; | ||
94 | |||
95 | static void init_fcc1_ioports(void) | ||
96 | { | ||
97 | struct io_port *io; | ||
98 | u32 tempval; | ||
99 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); | ||
100 | u32 *bcsr = ioremap(BCSR_ADDR+4, sizeof(u32)); | ||
101 | |||
102 | io = &immap->im_ioport; | ||
103 | |||
104 | /* Enable the PHY */ | ||
105 | clrbits32(bcsr, BCSR1_FETHIEN); | ||
106 | setbits32(bcsr, BCSR1_FETH_RST); | ||
107 | |||
108 | /* FCC1 pins are on port A/C. */ | ||
109 | /* Configure port A and C pins for FCC1 Ethernet. */ | ||
110 | |||
111 | tempval = in_be32(&io->iop_pdira); | ||
112 | tempval &= ~PA1_DIRA0; | ||
113 | tempval |= PA1_DIRA1; | ||
114 | out_be32(&io->iop_pdira, tempval); | ||
115 | |||
116 | tempval = in_be32(&io->iop_psora); | ||
117 | tempval &= ~PA1_PSORA0; | ||
118 | tempval |= PA1_PSORA1; | ||
119 | out_be32(&io->iop_psora, tempval); | ||
120 | |||
121 | setbits32(&io->iop_ppara,PA1_DIRA0 | PA1_DIRA1); | ||
122 | |||
123 | /* Alter clocks */ | ||
124 | tempval = PC_F1TXCLK|PC_F1RXCLK; | ||
125 | |||
126 | clrbits32(&io->iop_psorc, tempval); | ||
127 | clrbits32(&io->iop_pdirc, tempval); | ||
128 | setbits32(&io->iop_pparc, tempval); | ||
129 | |||
130 | clrbits32(&immap->im_cpmux.cmx_fcr, CMX1_CLK_MASK); | ||
131 | setbits32(&immap->im_cpmux.cmx_fcr, CMX1_CLK_ROUTE); | ||
132 | iounmap(bcsr); | ||
133 | iounmap(immap); | ||
134 | } | ||
135 | |||
136 | static void init_fcc2_ioports(void) | ||
137 | { | ||
138 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); | ||
139 | u32 *bcsr = ioremap(BCSR_ADDR+12, sizeof(u32)); | ||
140 | |||
141 | struct io_port *io; | ||
142 | u32 tempval; | ||
143 | |||
144 | immap = cpm2_immr; | ||
145 | |||
146 | io = &immap->im_ioport; | ||
147 | |||
148 | /* Enable the PHY */ | ||
149 | clrbits32(bcsr, BCSR3_FETHIEN2); | ||
150 | setbits32(bcsr, BCSR3_FETH2_RST); | ||
151 | |||
152 | /* FCC2 are port B/C. */ | ||
153 | /* Configure port A and C pins for FCC2 Ethernet. */ | ||
154 | |||
155 | tempval = in_be32(&io->iop_pdirb); | ||
156 | tempval &= ~PB2_DIRB0; | ||
157 | tempval |= PB2_DIRB1; | ||
158 | out_be32(&io->iop_pdirb, tempval); | ||
159 | |||
160 | tempval = in_be32(&io->iop_psorb); | ||
161 | tempval &= ~PB2_PSORB0; | ||
162 | tempval |= PB2_PSORB1; | ||
163 | out_be32(&io->iop_psorb, tempval); | ||
164 | |||
165 | setbits32(&io->iop_pparb,PB2_DIRB0 | PB2_DIRB1); | ||
166 | |||
167 | tempval = PC_F2RXCLK|PC_F2TXCLK; | ||
168 | |||
169 | /* Alter clocks */ | ||
170 | clrbits32(&io->iop_psorc,tempval); | ||
171 | clrbits32(&io->iop_pdirc,tempval); | ||
172 | setbits32(&io->iop_pparc,tempval); | ||
173 | |||
174 | clrbits32(&immap->im_cpmux.cmx_fcr, CMX2_CLK_MASK); | ||
175 | setbits32(&immap->im_cpmux.cmx_fcr, CMX2_CLK_ROUTE); | ||
176 | |||
177 | iounmap(bcsr); | ||
178 | iounmap(immap); | ||
179 | } | ||
180 | |||
181 | |||
182 | static void __init mpc8272ads_fixup_enet_pdata(struct platform_device *pdev, | ||
183 | int idx) | ||
184 | { | ||
185 | bd_t* bi = (void*)__res; | ||
186 | int fs_no = fsid_fcc1+pdev->id-1; | ||
187 | |||
188 | mpc82xx_fcc1_pdata.dpram_offset = mpc82xx_fcc2_pdata.dpram_offset = (u32)cpm2_immr->im_dprambase; | ||
189 | mpc82xx_fcc1_pdata.fcc_regs_c = mpc82xx_fcc2_pdata.fcc_regs_c = (u32)cpm2_immr->im_fcc_c; | ||
190 | |||
191 | switch(fs_no) { | ||
192 | case fsid_fcc1: | ||
193 | memcpy(&mpc82xx_fcc1_pdata.macaddr,bi->bi_enetaddr,6); | ||
194 | pdev->dev.platform_data = &mpc82xx_fcc1_pdata; | ||
195 | break; | ||
196 | case fsid_fcc2: | ||
197 | memcpy(&mpc82xx_fcc2_pdata.macaddr,bi->bi_enetaddr,6); | ||
198 | mpc82xx_fcc2_pdata.macaddr[5] ^= 1; | ||
199 | pdev->dev.platform_data = &mpc82xx_fcc2_pdata; | ||
200 | break; | ||
201 | } | ||
202 | } | ||
203 | |||
204 | static int mpc8272ads_platform_notify(struct device *dev) | ||
205 | { | ||
206 | static const struct platform_notify_dev_map dev_map[] = { | ||
207 | { | ||
208 | .bus_id = "fsl-cpm-fcc", | ||
209 | .rtn = mpc8272ads_fixup_enet_pdata | ||
210 | }, | ||
211 | { | ||
212 | .bus_id = NULL | ||
213 | } | ||
214 | }; | ||
215 | platform_notify_map(dev_map,dev); | ||
216 | |||
217 | return 0; | ||
218 | |||
219 | } | ||
220 | |||
221 | int __init mpc8272ads_init(void) | ||
222 | { | ||
223 | printk(KERN_NOTICE "mpc8272ads: Init\n"); | ||
224 | |||
225 | platform_notify = mpc8272ads_platform_notify; | ||
226 | |||
227 | ppc_sys_device_initfunc(); | ||
228 | |||
229 | ppc_sys_device_disable_all(); | ||
230 | ppc_sys_device_enable(MPC82xx_CPM_FCC1); | ||
231 | ppc_sys_device_enable(MPC82xx_CPM_FCC2); | ||
232 | |||
233 | return 0; | ||
234 | } | ||
235 | |||
236 | arch_initcall(mpc8272ads_init); | ||
diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c new file mode 100644 index 000000000000..ac8fcc68afeb --- /dev/null +++ b/arch/ppc/platforms/mpc866ads_setup.c | |||
@@ -0,0 +1,273 @@ | |||
1 | /*arch/ppc/platforms/mpc885ads-setup.c | ||
2 | * | ||
3 | * Platform setup for the Freescale mpc885ads board | ||
4 | * | ||
5 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
6 | * | ||
7 | * Copyright 2005 MontaVista Software Inc. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/param.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/device.h> | ||
21 | |||
22 | #include <linux/fs_enet_pd.h> | ||
23 | #include <linux/mii.h> | ||
24 | |||
25 | #include <asm/delay.h> | ||
26 | #include <asm/io.h> | ||
27 | #include <asm/machdep.h> | ||
28 | #include <asm/page.h> | ||
29 | #include <asm/processor.h> | ||
30 | #include <asm/system.h> | ||
31 | #include <asm/time.h> | ||
32 | #include <asm/ppcboot.h> | ||
33 | #include <asm/8xx_immap.h> | ||
34 | #include <asm/commproc.h> | ||
35 | #include <asm/ppc_sys.h> | ||
36 | #include <asm/mpc8xx.h> | ||
37 | |||
38 | extern unsigned char __res[]; | ||
39 | |||
40 | static struct fs_mii_bus_info fec_mii_bus_info = { | ||
41 | .method = fsmii_fec, | ||
42 | .id = 0, | ||
43 | }; | ||
44 | |||
45 | static struct fs_mii_bus_info scc_mii_bus_info = { | ||
46 | .method = fsmii_fixed, | ||
47 | .id = 0, | ||
48 | .i.fixed.speed = 10, | ||
49 | .i.fixed.duplex = 0, | ||
50 | }; | ||
51 | |||
52 | static struct fs_platform_info mpc8xx_fec_pdata[] = { | ||
53 | { | ||
54 | .rx_ring = 128, | ||
55 | .tx_ring = 16, | ||
56 | .rx_copybreak = 240, | ||
57 | |||
58 | .use_napi = 1, | ||
59 | .napi_weight = 17, | ||
60 | |||
61 | .phy_addr = 15, | ||
62 | .phy_irq = -1, | ||
63 | |||
64 | .use_rmii = 0, | ||
65 | |||
66 | .bus_info = &fec_mii_bus_info, | ||
67 | } | ||
68 | }; | ||
69 | |||
70 | static struct fs_platform_info mpc8xx_scc_pdata = { | ||
71 | .rx_ring = 64, | ||
72 | .tx_ring = 8, | ||
73 | .rx_copybreak = 240, | ||
74 | |||
75 | .use_napi = 1, | ||
76 | .napi_weight = 17, | ||
77 | |||
78 | .phy_addr = -1, | ||
79 | .phy_irq = -1, | ||
80 | |||
81 | .bus_info = &scc_mii_bus_info, | ||
82 | }; | ||
83 | |||
84 | void __init board_init(void) | ||
85 | { | ||
86 | volatile cpm8xx_t *cp = cpmp; | ||
87 | unsigned *bcsr_io; | ||
88 | |||
89 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
90 | |||
91 | if (bcsr_io == NULL) { | ||
92 | printk(KERN_CRIT "Could not remap BCSR1\n"); | ||
93 | return; | ||
94 | } | ||
95 | #ifdef CONFIG_SERIAL_CPM_SMC1 | ||
96 | cp->cp_simode &= ~(0xe0000000 >> 17); /* brg1 */ | ||
97 | clrbits32(bcsr_io,(0x80000000 >> 7)); | ||
98 | #else | ||
99 | setbits32(bcsr_io,(0x80000000 >> 7)); | ||
100 | |||
101 | cp->cp_pbpar &= ~(0x000000c0); | ||
102 | cp->cp_pbdir |= 0x000000c0; | ||
103 | cp->cp_smc[0].smc_smcmr = 0; | ||
104 | cp->cp_smc[0].smc_smce = 0; | ||
105 | #endif | ||
106 | |||
107 | #ifdef CONFIG_SERIAL_CPM_SMC2 | ||
108 | cp->cp_simode &= ~(0xe0000000 >> 1); | ||
109 | cp->cp_simode |= (0x20000000 >> 1); /* brg2 */ | ||
110 | clrbits32(bcsr_io,(0x80000000 >> 13)); | ||
111 | #else | ||
112 | clrbits32(bcsr_io,(0x80000000 >> 13)); | ||
113 | cp->cp_pbpar &= ~(0x00000c00); | ||
114 | cp->cp_pbdir |= 0x00000c00; | ||
115 | cp->cp_smc[1].smc_smcmr = 0; | ||
116 | cp->cp_smc[1].smc_smce = 0; | ||
117 | #endif | ||
118 | iounmap(bcsr_io); | ||
119 | } | ||
120 | |||
121 | static void setup_fec1_ioports(void) | ||
122 | { | ||
123 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
124 | |||
125 | setbits16(&immap->im_ioport.iop_pdpar, 0x1fff); | ||
126 | setbits16(&immap->im_ioport.iop_pddir, 0x1fff); | ||
127 | } | ||
128 | |||
129 | static void setup_scc1_ioports(void) | ||
130 | { | ||
131 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
132 | unsigned *bcsr_io; | ||
133 | |||
134 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
135 | |||
136 | if (bcsr_io == NULL) { | ||
137 | printk(KERN_CRIT "Could not remap BCSR1\n"); | ||
138 | return; | ||
139 | } | ||
140 | |||
141 | /* Enable the PHY. | ||
142 | */ | ||
143 | clrbits32(bcsr_io,BCSR1_ETHEN); | ||
144 | |||
145 | /* Configure port A pins for Txd and Rxd. | ||
146 | */ | ||
147 | /* Disable receive and transmit in case EPPC-Bug started it. | ||
148 | */ | ||
149 | setbits16(&immap->im_ioport.iop_papar, PA_ENET_RXD | PA_ENET_TXD); | ||
150 | clrbits16(&immap->im_ioport.iop_padir, PA_ENET_RXD | PA_ENET_TXD); | ||
151 | clrbits16(&immap->im_ioport.iop_paodr, PA_ENET_TXD); | ||
152 | |||
153 | /* Configure port C pins to enable CLSN and RENA. | ||
154 | */ | ||
155 | clrbits16(&immap->im_ioport.iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA); | ||
156 | clrbits16(&immap->im_ioport.iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA); | ||
157 | setbits16(&immap->im_ioport.iop_pcso, PC_ENET_CLSN | PC_ENET_RENA); | ||
158 | /* Configure port A for TCLK and RCLK. | ||
159 | */ | ||
160 | setbits16(&immap->im_ioport.iop_papar, PA_ENET_TCLK | PA_ENET_RCLK); | ||
161 | clrbits16(&immap->im_ioport.iop_padir, PA_ENET_TCLK | PA_ENET_RCLK); | ||
162 | clrbits32(&immap->im_cpm.cp_pbpar, PB_ENET_TENA); | ||
163 | clrbits32(&immap->im_cpm.cp_pbdir, PB_ENET_TENA); | ||
164 | |||
165 | /* Configure Serial Interface clock routing. | ||
166 | * First, clear all SCC bits to zero, then set the ones we want. | ||
167 | */ | ||
168 | clrbits32(&immap->im_cpm.cp_sicr, SICR_ENET_MASK); | ||
169 | setbits32(&immap->im_cpm.cp_sicr, SICR_ENET_CLKRT); | ||
170 | |||
171 | /* In the original SCC enet driver the following code is placed at | ||
172 | the end of the initialization */ | ||
173 | setbits32(&immap->im_cpm.cp_pbpar, PB_ENET_TENA); | ||
174 | setbits32(&immap->im_cpm.cp_pbdir, PB_ENET_TENA); | ||
175 | |||
176 | } | ||
177 | |||
178 | static void mpc866ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) | ||
179 | { | ||
180 | struct fs_platform_info *fpi = pdev->dev.platform_data; | ||
181 | |||
182 | volatile cpm8xx_t *cp; | ||
183 | bd_t *bd = (bd_t *) __res; | ||
184 | char *e; | ||
185 | int i; | ||
186 | |||
187 | /* Get pointer to Communication Processor */ | ||
188 | cp = cpmp; | ||
189 | switch (fs_no) { | ||
190 | case fsid_fec1: | ||
191 | fpi = &mpc8xx_fec_pdata[0]; | ||
192 | fpi->init_ioports = &setup_fec1_ioports; | ||
193 | |||
194 | break; | ||
195 | case fsid_scc1: | ||
196 | fpi = &mpc8xx_scc_pdata; | ||
197 | fpi->init_ioports = &setup_scc1_ioports; | ||
198 | |||
199 | break; | ||
200 | default: | ||
201 | printk(KERN_WARNING"Device %s is not supported!\n", pdev->name); | ||
202 | return; | ||
203 | } | ||
204 | |||
205 | pdev->dev.platform_data = fpi; | ||
206 | fpi->fs_no = fs_no; | ||
207 | |||
208 | e = (unsigned char *)&bd->bi_enetaddr; | ||
209 | for (i = 0; i < 6; i++) | ||
210 | fpi->macaddr[i] = *e++; | ||
211 | |||
212 | fpi->macaddr[5 - pdev->id]++; | ||
213 | |||
214 | } | ||
215 | |||
216 | static void mpc866ads_fixup_fec_enet_pdata(struct platform_device *pdev, | ||
217 | int idx) | ||
218 | { | ||
219 | /* This is for FEC devices only */ | ||
220 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-fec"))) | ||
221 | return; | ||
222 | mpc866ads_fixup_enet_pdata(pdev, fsid_fec1 + pdev->id - 1); | ||
223 | } | ||
224 | |||
225 | static void mpc866ads_fixup_scc_enet_pdata(struct platform_device *pdev, | ||
226 | int idx) | ||
227 | { | ||
228 | /* This is for SCC devices only */ | ||
229 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-scc"))) | ||
230 | return; | ||
231 | |||
232 | mpc866ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); | ||
233 | } | ||
234 | |||
235 | static int mpc866ads_platform_notify(struct device *dev) | ||
236 | { | ||
237 | static const struct platform_notify_dev_map dev_map[] = { | ||
238 | { | ||
239 | .bus_id = "fsl-cpm-fec", | ||
240 | .rtn = mpc866ads_fixup_fec_enet_pdata, | ||
241 | }, | ||
242 | { | ||
243 | .bus_id = "fsl-cpm-scc", | ||
244 | .rtn = mpc866ads_fixup_scc_enet_pdata, | ||
245 | }, | ||
246 | { | ||
247 | .bus_id = NULL | ||
248 | } | ||
249 | }; | ||
250 | |||
251 | platform_notify_map(dev_map,dev); | ||
252 | |||
253 | return 0; | ||
254 | } | ||
255 | |||
256 | int __init mpc866ads_init(void) | ||
257 | { | ||
258 | printk(KERN_NOTICE "mpc866ads: Init\n"); | ||
259 | |||
260 | platform_notify = mpc866ads_platform_notify; | ||
261 | |||
262 | ppc_sys_device_initfunc(); | ||
263 | ppc_sys_device_disable_all(); | ||
264 | |||
265 | #ifdef MPC8xx_SECOND_ETH_SCC1 | ||
266 | ppc_sys_device_enable(MPC8xx_CPM_SCC1); | ||
267 | #endif | ||
268 | ppc_sys_device_enable(MPC8xx_CPM_FEC1); | ||
269 | |||
270 | return 0; | ||
271 | } | ||
272 | |||
273 | arch_initcall(mpc866ads_init); | ||
diff --git a/arch/ppc/platforms/mpc885ads_setup.c b/arch/ppc/platforms/mpc885ads_setup.c new file mode 100644 index 000000000000..50a99e5f7c68 --- /dev/null +++ b/arch/ppc/platforms/mpc885ads_setup.c | |||
@@ -0,0 +1,389 @@ | |||
1 | /*arch/ppc/platforms/mpc885ads-setup.c | ||
2 | * | ||
3 | * Platform setup for the Freescale mpc885ads board | ||
4 | * | ||
5 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
6 | * | ||
7 | * Copyright 2005 MontaVista Software Inc. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/param.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/device.h> | ||
21 | |||
22 | #include <linux/fs_enet_pd.h> | ||
23 | #include <linux/mii.h> | ||
24 | |||
25 | #include <asm/delay.h> | ||
26 | #include <asm/io.h> | ||
27 | #include <asm/machdep.h> | ||
28 | #include <asm/page.h> | ||
29 | #include <asm/processor.h> | ||
30 | #include <asm/system.h> | ||
31 | #include <asm/time.h> | ||
32 | #include <asm/ppcboot.h> | ||
33 | #include <asm/8xx_immap.h> | ||
34 | #include <asm/commproc.h> | ||
35 | #include <asm/ppc_sys.h> | ||
36 | |||
37 | extern unsigned char __res[]; | ||
38 | |||
39 | static void __init mpc885ads_scc_phy_init(char); | ||
40 | |||
41 | static struct fs_mii_bus_info fec_mii_bus_info = { | ||
42 | .method = fsmii_fec, | ||
43 | .id = 0, | ||
44 | }; | ||
45 | |||
46 | static struct fs_mii_bus_info scc_mii_bus_info = { | ||
47 | #ifdef CONFIG_SCC_ENET_8xx_FIXED | ||
48 | .method = fsmii_fixed, | ||
49 | #else | ||
50 | .method = fsmii_fec, | ||
51 | #endif | ||
52 | |||
53 | .id = 0, | ||
54 | }; | ||
55 | |||
56 | static struct fs_platform_info mpc8xx_fec_pdata[] = { | ||
57 | { | ||
58 | .rx_ring = 128, | ||
59 | .tx_ring = 16, | ||
60 | .rx_copybreak = 240, | ||
61 | |||
62 | .use_napi = 1, | ||
63 | .napi_weight = 17, | ||
64 | |||
65 | .phy_addr = 0, | ||
66 | .phy_irq = SIU_IRQ7, | ||
67 | |||
68 | .bus_info = &fec_mii_bus_info, | ||
69 | }, { | ||
70 | .rx_ring = 128, | ||
71 | .tx_ring = 16, | ||
72 | .rx_copybreak = 240, | ||
73 | |||
74 | .use_napi = 1, | ||
75 | .napi_weight = 17, | ||
76 | |||
77 | .phy_addr = 1, | ||
78 | .phy_irq = SIU_IRQ7, | ||
79 | |||
80 | .bus_info = &fec_mii_bus_info, | ||
81 | } | ||
82 | }; | ||
83 | |||
84 | static struct fs_platform_info mpc8xx_scc_pdata = { | ||
85 | .rx_ring = 64, | ||
86 | .tx_ring = 8, | ||
87 | .rx_copybreak = 240, | ||
88 | |||
89 | .use_napi = 1, | ||
90 | .napi_weight = 17, | ||
91 | |||
92 | .phy_addr = 2, | ||
93 | #ifdef CONFIG_MPC8xx_SCC_ENET_FIXED | ||
94 | .phy_irq = -1, | ||
95 | #else | ||
96 | .phy_irq = SIU_IRQ7, | ||
97 | #endif | ||
98 | |||
99 | .bus_info = &scc_mii_bus_info, | ||
100 | }; | ||
101 | |||
102 | void __init board_init(void) | ||
103 | { | ||
104 | volatile cpm8xx_t *cp = cpmp; | ||
105 | unsigned int *bcsr_io; | ||
106 | |||
107 | #ifdef CONFIG_FS_ENET | ||
108 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
109 | #endif | ||
110 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
111 | |||
112 | if (bcsr_io == NULL) { | ||
113 | printk(KERN_CRIT "Could not remap BCSR\n"); | ||
114 | return; | ||
115 | } | ||
116 | #ifdef CONFIG_SERIAL_CPM_SMC1 | ||
117 | cp->cp_simode &= ~(0xe0000000 >> 17); /* brg1 */ | ||
118 | clrbits32(bcsr_io, BCSR1_RS232EN_1); | ||
119 | #else | ||
120 | setbits32(bcsr_io,BCSR1_RS232EN_1); | ||
121 | cp->cp_smc[0].smc_smcmr = 0; | ||
122 | cp->cp_smc[0].smc_smce = 0; | ||
123 | #endif | ||
124 | |||
125 | #ifdef CONFIG_SERIAL_CPM_SMC2 | ||
126 | cp->cp_simode &= ~(0xe0000000 >> 1); | ||
127 | cp->cp_simode |= (0x20000000 >> 1); /* brg2 */ | ||
128 | clrbits32(bcsr_io,BCSR1_RS232EN_2); | ||
129 | #else | ||
130 | setbits32(bcsr_io,BCSR1_RS232EN_2); | ||
131 | cp->cp_smc[1].smc_smcmr = 0; | ||
132 | cp->cp_smc[1].smc_smce = 0; | ||
133 | #endif | ||
134 | iounmap(bcsr_io); | ||
135 | |||
136 | #ifdef CONFIG_FS_ENET | ||
137 | /* use MDC for MII (common) */ | ||
138 | setbits16(&immap->im_ioport.iop_pdpar, 0x0080); | ||
139 | clrbits16(&immap->im_ioport.iop_pddir, 0x0080); | ||
140 | #endif | ||
141 | } | ||
142 | |||
143 | static void setup_fec1_ioports(void) | ||
144 | { | ||
145 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
146 | |||
147 | /* configure FEC1 pins */ | ||
148 | setbits16(&immap->im_ioport.iop_papar, 0xf830); | ||
149 | setbits16(&immap->im_ioport.iop_padir, 0x0830); | ||
150 | clrbits16(&immap->im_ioport.iop_padir, 0xf000); | ||
151 | setbits32(&immap->im_cpm.cp_pbpar, 0x00001001); | ||
152 | |||
153 | clrbits32(&immap->im_cpm.cp_pbdir, 0x00001001); | ||
154 | setbits16(&immap->im_ioport.iop_pcpar, 0x000c); | ||
155 | clrbits16(&immap->im_ioport.iop_pcdir, 0x000c); | ||
156 | setbits32(&immap->im_cpm.cp_pepar, 0x00000003); | ||
157 | |||
158 | setbits32(&immap->im_cpm.cp_pedir, 0x00000003); | ||
159 | clrbits32(&immap->im_cpm.cp_peso, 0x00000003); | ||
160 | clrbits32(&immap->im_cpm.cp_cptr, 0x00000100); | ||
161 | } | ||
162 | |||
163 | static void setup_fec2_ioports(void) | ||
164 | { | ||
165 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
166 | |||
167 | /* configure FEC2 pins */ | ||
168 | setbits32(&immap->im_cpm.cp_pepar, 0x0003fffc); | ||
169 | setbits32(&immap->im_cpm.cp_pedir, 0x0003fffc); | ||
170 | setbits32(&immap->im_cpm.cp_peso, 0x00037800); | ||
171 | clrbits32(&immap->im_cpm.cp_peso, 0x000087fc); | ||
172 | clrbits32(&immap->im_cpm.cp_cptr, 0x00000080); | ||
173 | } | ||
174 | |||
175 | static void setup_scc3_ioports(void) | ||
176 | { | ||
177 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
178 | unsigned *bcsr_io; | ||
179 | |||
180 | bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE); | ||
181 | |||
182 | if (bcsr_io == NULL) { | ||
183 | printk(KERN_CRIT "Could not remap BCSR\n"); | ||
184 | return; | ||
185 | } | ||
186 | |||
187 | /* Enable the PHY. | ||
188 | */ | ||
189 | setbits32(bcsr_io+4, BCSR4_ETH10_RST); | ||
190 | /* Configure port A pins for Txd and Rxd. | ||
191 | */ | ||
192 | setbits16(&immap->im_ioport.iop_papar, PA_ENET_RXD | PA_ENET_TXD); | ||
193 | clrbits16(&immap->im_ioport.iop_padir, PA_ENET_RXD | PA_ENET_TXD); | ||
194 | |||
195 | /* Configure port C pins to enable CLSN and RENA. | ||
196 | */ | ||
197 | clrbits16(&immap->im_ioport.iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA); | ||
198 | clrbits16(&immap->im_ioport.iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA); | ||
199 | setbits16(&immap->im_ioport.iop_pcso, PC_ENET_CLSN | PC_ENET_RENA); | ||
200 | |||
201 | /* Configure port E for TCLK and RCLK. | ||
202 | */ | ||
203 | setbits32(&immap->im_cpm.cp_pepar, PE_ENET_TCLK | PE_ENET_RCLK); | ||
204 | clrbits32(&immap->im_cpm.cp_pepar, PE_ENET_TENA); | ||
205 | clrbits32(&immap->im_cpm.cp_pedir, | ||
206 | PE_ENET_TCLK | PE_ENET_RCLK | PE_ENET_TENA); | ||
207 | clrbits32(&immap->im_cpm.cp_peso, PE_ENET_TCLK | PE_ENET_RCLK); | ||
208 | setbits32(&immap->im_cpm.cp_peso, PE_ENET_TENA); | ||
209 | |||
210 | /* Configure Serial Interface clock routing. | ||
211 | * First, clear all SCC bits to zero, then set the ones we want. | ||
212 | */ | ||
213 | clrbits32(&immap->im_cpm.cp_sicr, SICR_ENET_MASK); | ||
214 | setbits32(&immap->im_cpm.cp_sicr, SICR_ENET_CLKRT); | ||
215 | |||
216 | /* Disable Rx and Tx. SMC1 sshould be stopped if SCC3 eternet are used. | ||
217 | */ | ||
218 | immap->im_cpm.cp_smc[0].smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN); | ||
219 | /* On the MPC885ADS SCC ethernet PHY is initialized in the full duplex mode | ||
220 | * by H/W setting after reset. SCC ethernet controller support only half duplex. | ||
221 | * This discrepancy of modes causes a lot of carrier lost errors. | ||
222 | */ | ||
223 | |||
224 | /* In the original SCC enet driver the following code is placed at | ||
225 | the end of the initialization */ | ||
226 | setbits32(&immap->im_cpm.cp_pepar, PE_ENET_TENA); | ||
227 | clrbits32(&immap->im_cpm.cp_pedir, PE_ENET_TENA); | ||
228 | setbits32(&immap->im_cpm.cp_peso, PE_ENET_TENA); | ||
229 | |||
230 | setbits32(bcsr_io+1, BCSR1_ETHEN); | ||
231 | iounmap(bcsr_io); | ||
232 | } | ||
233 | |||
234 | static void mpc885ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) | ||
235 | { | ||
236 | struct fs_platform_info *fpi = pdev->dev.platform_data; | ||
237 | |||
238 | volatile cpm8xx_t *cp; | ||
239 | bd_t *bd = (bd_t *) __res; | ||
240 | char *e; | ||
241 | int i; | ||
242 | |||
243 | /* Get pointer to Communication Processor */ | ||
244 | cp = cpmp; | ||
245 | switch (fs_no) { | ||
246 | case fsid_fec1: | ||
247 | fpi = &mpc8xx_fec_pdata[0]; | ||
248 | fpi->init_ioports = &setup_fec1_ioports; | ||
249 | break; | ||
250 | case fsid_fec2: | ||
251 | fpi = &mpc8xx_fec_pdata[1]; | ||
252 | fpi->init_ioports = &setup_fec2_ioports; | ||
253 | break; | ||
254 | case fsid_scc3: | ||
255 | fpi = &mpc8xx_scc_pdata; | ||
256 | fpi->init_ioports = &setup_scc3_ioports; | ||
257 | mpc885ads_scc_phy_init(fpi->phy_addr); | ||
258 | break; | ||
259 | default: | ||
260 | printk(KERN_WARNING"Device %s is not supported!\n", pdev->name); | ||
261 | return; | ||
262 | } | ||
263 | |||
264 | pdev->dev.platform_data = fpi; | ||
265 | fpi->fs_no = fs_no; | ||
266 | |||
267 | e = (unsigned char *)&bd->bi_enetaddr; | ||
268 | for (i = 0; i < 6; i++) | ||
269 | fpi->macaddr[i] = *e++; | ||
270 | |||
271 | fpi->macaddr[5 - pdev->id]++; | ||
272 | |||
273 | } | ||
274 | |||
275 | static void mpc885ads_fixup_fec_enet_pdata(struct platform_device *pdev, | ||
276 | int idx) | ||
277 | { | ||
278 | /* This is for FEC devices only */ | ||
279 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-fec"))) | ||
280 | return; | ||
281 | mpc885ads_fixup_enet_pdata(pdev, fsid_fec1 + pdev->id - 1); | ||
282 | } | ||
283 | |||
284 | static void __init mpc885ads_fixup_scc_enet_pdata(struct platform_device *pdev, | ||
285 | int idx) | ||
286 | { | ||
287 | /* This is for SCC devices only */ | ||
288 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-scc"))) | ||
289 | return; | ||
290 | |||
291 | mpc885ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); | ||
292 | } | ||
293 | |||
294 | /* SCC ethernet controller does not have MII management channel. FEC1 MII | ||
295 | * channel is used to communicate with the 10Mbit PHY. | ||
296 | */ | ||
297 | |||
298 | #define MII_ECNTRL_PINMUX 0x4 | ||
299 | #define FEC_ECNTRL_PINMUX 0x00000004 | ||
300 | #define FEC_RCNTRL_MII_MODE 0x00000004 | ||
301 | |||
302 | /* Make MII read/write commands. | ||
303 | */ | ||
304 | #define mk_mii_write(REG, VAL, PHY_ADDR) (0x50020000 | (((REG) & 0x1f) << 18) | \ | ||
305 | ((VAL) & 0xffff) | ((PHY_ADDR) << 23)) | ||
306 | |||
307 | static void mpc885ads_scc_phy_init(char phy_addr) | ||
308 | { | ||
309 | volatile immap_t *immap; | ||
310 | volatile fec_t *fecp; | ||
311 | bd_t *bd; | ||
312 | |||
313 | bd = (bd_t *) __res; | ||
314 | immap = (immap_t *) IMAP_ADDR; /* pointer to internal registers */ | ||
315 | fecp = &(immap->im_cpm.cp_fec); | ||
316 | |||
317 | /* Enable MII pins of the FEC1 | ||
318 | */ | ||
319 | setbits16(&immap->im_ioport.iop_pdpar, 0x0080); | ||
320 | clrbits16(&immap->im_ioport.iop_pddir, 0x0080); | ||
321 | /* Set MII speed to 2.5 MHz | ||
322 | */ | ||
323 | out_be32(&fecp->fec_mii_speed, | ||
324 | ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1); | ||
325 | |||
326 | /* Enable FEC pin MUX | ||
327 | */ | ||
328 | setbits32(&fecp->fec_ecntrl, MII_ECNTRL_PINMUX); | ||
329 | setbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); | ||
330 | |||
331 | out_be32(&fecp->fec_mii_data, | ||
332 | mk_mii_write(MII_BMCR, BMCR_ISOLATE, phy_addr)); | ||
333 | udelay(100); | ||
334 | out_be32(&fecp->fec_mii_data, | ||
335 | mk_mii_write(MII_ADVERTISE, | ||
336 | ADVERTISE_10HALF | ADVERTISE_CSMA, phy_addr)); | ||
337 | udelay(100); | ||
338 | |||
339 | /* Disable FEC MII settings | ||
340 | */ | ||
341 | clrbits32(&fecp->fec_ecntrl, MII_ECNTRL_PINMUX); | ||
342 | clrbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); | ||
343 | out_be32(&fecp->fec_mii_speed, 0); | ||
344 | } | ||
345 | |||
346 | static int mpc885ads_platform_notify(struct device *dev) | ||
347 | { | ||
348 | |||
349 | static const struct platform_notify_dev_map dev_map[] = { | ||
350 | { | ||
351 | .bus_id = "fsl-cpm-fec", | ||
352 | .rtn = mpc885ads_fixup_fec_enet_pdata, | ||
353 | }, | ||
354 | { | ||
355 | .bus_id = "fsl-cpm-scc", | ||
356 | .rtn = mpc885ads_fixup_scc_enet_pdata, | ||
357 | }, | ||
358 | { | ||
359 | .bus_id = NULL | ||
360 | } | ||
361 | }; | ||
362 | |||
363 | platform_notify_map(dev_map,dev); | ||
364 | |||
365 | } | ||
366 | |||
367 | int __init mpc885ads_init(void) | ||
368 | { | ||
369 | printk(KERN_NOTICE "mpc885ads: Init\n"); | ||
370 | |||
371 | platform_notify = mpc885ads_platform_notify; | ||
372 | |||
373 | ppc_sys_device_initfunc(); | ||
374 | ppc_sys_device_disable_all(); | ||
375 | |||
376 | ppc_sys_device_enable(MPC8xx_CPM_FEC1); | ||
377 | |||
378 | #ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3 | ||
379 | ppc_sys_device_enable(MPC8xx_CPM_SCC1); | ||
380 | |||
381 | #endif | ||
382 | #ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2 | ||
383 | ppc_sys_device_enable(MPC8xx_CPM_FEC2); | ||
384 | #endif | ||
385 | |||
386 | return 0; | ||
387 | } | ||
388 | |||
389 | arch_initcall(mpc885ads_init); | ||
diff --git a/arch/ppc/platforms/pq2ads.h b/arch/ppc/platforms/pq2ads.h index 067d9a5aebc1..6b26dd36c640 100644 --- a/arch/ppc/platforms/pq2ads.h +++ b/arch/ppc/platforms/pq2ads.h | |||
@@ -13,6 +13,10 @@ | |||
13 | 13 | ||
14 | #include <asm/ppcboot.h> | 14 | #include <asm/ppcboot.h> |
15 | 15 | ||
16 | #if defined(CONFIG_ADS8272) | ||
17 | #define BOARD_CHIP_NAME "8272" | ||
18 | #endif | ||
19 | |||
16 | /* Memory map is configured by the PROM startup. | 20 | /* Memory map is configured by the PROM startup. |
17 | * We just map a few things we need. The CSR is actually 4 byte-wide | 21 | * We just map a few things we need. The CSR is actually 4 byte-wide |
18 | * registers that can be accessed as 8-, 16-, or 32-bit values. | 22 | * registers that can be accessed as 8-, 16-, or 32-bit values. |
diff --git a/arch/ppc/platforms/pq2ads_pd.h b/arch/ppc/platforms/pq2ads_pd.h new file mode 100644 index 000000000000..8f14a43eafec --- /dev/null +++ b/arch/ppc/platforms/pq2ads_pd.h | |||
@@ -0,0 +1,114 @@ | |||
1 | #ifndef __PQ2ADS_PD_H | ||
2 | #define __PQ2ADS_PD_H | ||
3 | /* | ||
4 | * arch/ppc/platforms/82xx/pq2ads_pd.h | ||
5 | * | ||
6 | * Some defines for MPC82xx board-specific PlatformDevice descriptions | ||
7 | * | ||
8 | * 2005 (c) MontaVista Software, Inc. | ||
9 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | /* FCC1 Clock Source Configuration. These can be redefined in the board specific file. | ||
17 | Can only choose from CLK9-12 */ | ||
18 | |||
19 | #define F1_RXCLK 11 | ||
20 | #define F1_TXCLK 10 | ||
21 | |||
22 | /* FCC2 Clock Source Configuration. These can be redefined in the board specific file. | ||
23 | Can only choose from CLK13-16 */ | ||
24 | #define F2_RXCLK 15 | ||
25 | #define F2_TXCLK 16 | ||
26 | |||
27 | /* FCC3 Clock Source Configuration. These can be redefined in the board specific file. | ||
28 | Can only choose from CLK13-16 */ | ||
29 | #define F3_RXCLK 13 | ||
30 | #define F3_TXCLK 14 | ||
31 | |||
32 | /* Automatically generates register configurations */ | ||
33 | #define PC_CLK(x) ((uint)(1<<(x-1))) /* FCC CLK I/O ports */ | ||
34 | |||
35 | #define CMXFCR_RF1CS(x) ((uint)((x-5)<<27)) /* FCC1 Receive Clock Source */ | ||
36 | #define CMXFCR_TF1CS(x) ((uint)((x-5)<<24)) /* FCC1 Transmit Clock Source */ | ||
37 | #define CMXFCR_RF2CS(x) ((uint)((x-9)<<19)) /* FCC2 Receive Clock Source */ | ||
38 | #define CMXFCR_TF2CS(x) ((uint)((x-9)<<16)) /* FCC2 Transmit Clock Source */ | ||
39 | #define CMXFCR_RF3CS(x) ((uint)((x-9)<<11)) /* FCC3 Receive Clock Source */ | ||
40 | #define CMXFCR_TF3CS(x) ((uint)((x-9)<<8)) /* FCC3 Transmit Clock Source */ | ||
41 | |||
42 | #define PC_F1RXCLK PC_CLK(F1_RXCLK) | ||
43 | #define PC_F1TXCLK PC_CLK(F1_TXCLK) | ||
44 | #define CMX1_CLK_ROUTE (CMXFCR_RF1CS(F1_RXCLK) | CMXFCR_TF1CS(F1_TXCLK)) | ||
45 | #define CMX1_CLK_MASK ((uint)0xff000000) | ||
46 | |||
47 | #define PC_F2RXCLK PC_CLK(F2_RXCLK) | ||
48 | #define PC_F2TXCLK PC_CLK(F2_TXCLK) | ||
49 | #define CMX2_CLK_ROUTE (CMXFCR_RF2CS(F2_RXCLK) | CMXFCR_TF2CS(F2_TXCLK)) | ||
50 | #define CMX2_CLK_MASK ((uint)0x00ff0000) | ||
51 | |||
52 | #define PC_F3RXCLK PC_CLK(F3_RXCLK) | ||
53 | #define PC_F3TXCLK PC_CLK(F3_TXCLK) | ||
54 | #define CMX3_CLK_ROUTE (CMXFCR_RF3CS(F3_RXCLK) | CMXFCR_TF3CS(F3_TXCLK)) | ||
55 | #define CMX3_CLK_MASK ((uint)0x0000ff00) | ||
56 | |||
57 | /* I/O Pin assignment for FCC1. I don't yet know the best way to do this, | ||
58 | * but there is little variation among the choices. | ||
59 | */ | ||
60 | #define PA1_COL 0x00000001U | ||
61 | #define PA1_CRS 0x00000002U | ||
62 | #define PA1_TXER 0x00000004U | ||
63 | #define PA1_TXEN 0x00000008U | ||
64 | #define PA1_RXDV 0x00000010U | ||
65 | #define PA1_RXER 0x00000020U | ||
66 | #define PA1_TXDAT 0x00003c00U | ||
67 | #define PA1_RXDAT 0x0003c000U | ||
68 | #define PA1_PSORA0 (PA1_RXDAT | PA1_TXDAT) | ||
69 | #define PA1_PSORA1 (PA1_COL | PA1_CRS | PA1_TXER | PA1_TXEN | \ | ||
70 | PA1_RXDV | PA1_RXER) | ||
71 | #define PA1_DIRA0 (PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV) | ||
72 | #define PA1_DIRA1 (PA1_TXDAT | PA1_TXEN | PA1_TXER) | ||
73 | |||
74 | |||
75 | /* I/O Pin assignment for FCC2. I don't yet know the best way to do this, | ||
76 | * but there is little variation among the choices. | ||
77 | */ | ||
78 | #define PB2_TXER 0x00000001U | ||
79 | #define PB2_RXDV 0x00000002U | ||
80 | #define PB2_TXEN 0x00000004U | ||
81 | #define PB2_RXER 0x00000008U | ||
82 | #define PB2_COL 0x00000010U | ||
83 | #define PB2_CRS 0x00000020U | ||
84 | #define PB2_TXDAT 0x000003c0U | ||
85 | #define PB2_RXDAT 0x00003c00U | ||
86 | #define PB2_PSORB0 (PB2_RXDAT | PB2_TXDAT | PB2_CRS | PB2_COL | \ | ||
87 | PB2_RXER | PB2_RXDV | PB2_TXER) | ||
88 | #define PB2_PSORB1 (PB2_TXEN) | ||
89 | #define PB2_DIRB0 (PB2_RXDAT | PB2_CRS | PB2_COL | PB2_RXER | PB2_RXDV) | ||
90 | #define PB2_DIRB1 (PB2_TXDAT | PB2_TXEN | PB2_TXER) | ||
91 | |||
92 | |||
93 | /* I/O Pin assignment for FCC3. I don't yet know the best way to do this, | ||
94 | * but there is little variation among the choices. | ||
95 | */ | ||
96 | #define PB3_RXDV 0x00004000U | ||
97 | #define PB3_RXER 0x00008000U | ||
98 | #define PB3_TXER 0x00010000U | ||
99 | #define PB3_TXEN 0x00020000U | ||
100 | #define PB3_COL 0x00040000U | ||
101 | #define PB3_CRS 0x00080000U | ||
102 | #define PB3_TXDAT 0x0f000000U | ||
103 | #define PB3_RXDAT 0x00f00000U | ||
104 | #define PB3_PSORB0 (PB3_RXDAT | PB3_TXDAT | PB3_CRS | PB3_COL | \ | ||
105 | PB3_RXER | PB3_RXDV | PB3_TXER | PB3_TXEN) | ||
106 | #define PB3_PSORB1 0 | ||
107 | #define PB3_DIRB0 (PB3_RXDAT | PB3_CRS | PB3_COL | PB3_RXER | PB3_RXDV) | ||
108 | #define PB3_DIRB1 (PB3_TXDAT | PB3_TXEN | PB3_TXER) | ||
109 | |||
110 | #define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128)) | ||
111 | #define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0) | ||
112 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1) | ||
113 | |||
114 | #endif | ||
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index 159dcd92a6d1..5cb62c6a51c8 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile | |||
@@ -17,8 +17,8 @@ obj-$(CONFIG_440GX) += ibm440gx_common.o | |||
17 | obj-$(CONFIG_440SP) += ibm440gx_common.o ibm440sp_common.o | 17 | obj-$(CONFIG_440SP) += ibm440gx_common.o ibm440sp_common.o |
18 | obj-$(CONFIG_440SPE) += ibm440gx_common.o ibm440sp_common.o ppc440spe_pcie.o | 18 | obj-$(CONFIG_440SPE) += ibm440gx_common.o ibm440sp_common.o ppc440spe_pcie.o |
19 | ifeq ($(CONFIG_4xx),y) | 19 | ifeq ($(CONFIG_4xx),y) |
20 | ifeq ($(CONFIG_VIRTEX_II_PRO),y) | 20 | ifeq ($(CONFIG_XILINX_VIRTEX),y) |
21 | obj-$(CONFIG_40x) += xilinx_pic.o | 21 | obj-$(CONFIG_40x) += xilinx_pic.o ppc_sys.o |
22 | else | 22 | else |
23 | ifeq ($(CONFIG_403),y) | 23 | ifeq ($(CONFIG_403),y) |
24 | obj-$(CONFIG_40x) += ppc403_pic.o | 24 | obj-$(CONFIG_40x) += ppc403_pic.o |
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/ppc/syslib/ppc4xx_pm.c b/arch/ppc/syslib/ppc4xx_pm.c deleted file mode 100644 index 60a479204885..000000000000 --- a/arch/ppc/syslib/ppc4xx_pm.c +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Author: Armin Kuster <akuster@mvista.com> | ||
3 | * | ||
4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | ||
5 | * the terms of the GNU General Public License version 2. This program | ||
6 | * is licensed "as is" without any warranty of any kind, whether express | ||
7 | * or implied. | ||
8 | * | ||
9 | * This an attempt to get Power Management going for the IBM 4xx processor. | ||
10 | * This was derived from the ppc4xx._setup.c file | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | #include <linux/init.h> | ||
15 | |||
16 | #include <asm/ibm4xx.h> | ||
17 | |||
18 | void __init | ||
19 | ppc4xx_pm_init(void) | ||
20 | { | ||
21 | |||
22 | unsigned int value = 0; | ||
23 | |||
24 | /* turn off unused hardware to save power */ | ||
25 | #ifdef CONFIG_405GP | ||
26 | value |= CPM_DCP; /* CodePack */ | ||
27 | #endif | ||
28 | |||
29 | #if !defined(CONFIG_IBM_OCP_GPIO) | ||
30 | value |= CPM_GPIO0; | ||
31 | #endif | ||
32 | |||
33 | #if !defined(CONFIG_PPC405_I2C_ADAP) | ||
34 | value |= CPM_IIC0; | ||
35 | #ifdef CONFIG_STB03xxx | ||
36 | value |= CPM_IIC1; | ||
37 | #endif | ||
38 | #endif | ||
39 | |||
40 | |||
41 | #if !defined(CONFIG_405_DMA) | ||
42 | value |= CPM_DMA; | ||
43 | #endif | ||
44 | |||
45 | mtdcr(DCRN_CPMFR, value); | ||
46 | |||
47 | } | ||
diff --git a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c index 47f04c71fe9c..848fb512f3f8 100644 --- a/arch/ppc/syslib/xilinx_pic.c +++ b/arch/ppc/syslib/xilinx_pic.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/xparameters.h> | 18 | #include <platforms/4xx/xparameters/xparameters.h> |
19 | #include <asm/ibm4xx.h> | 19 | #include <asm/ibm4xx.h> |
20 | #include <asm/machdep.h> | 20 | #include <asm/machdep.h> |
21 | 21 | ||
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..83b33fe1923c 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 | llgfr %r2,%r2 # unsigned 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 | llgfr %r2,%r2 # unsigned 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 | llgfr %r2,%r2 # unsigned 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 03ecb4e4614e..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 |
@@ -1277,62 +1277,6 @@ sys_sigstack: | |||
1277 | mov %l5, %o7 | 1277 | mov %l5, %o7 |
1278 | 1278 | ||
1279 | .align 4 | 1279 | .align 4 |
1280 | .globl sys_sigpause | ||
1281 | sys_sigpause: | ||
1282 | /* Note: %o0 already has correct value... */ | ||
1283 | call do_sigpause | ||
1284 | add %sp, STACKFRAME_SZ, %o1 | ||
1285 | |||
1286 | ld [%curptr + TI_FLAGS], %l5 | ||
1287 | andcc %l5, _TIF_SYSCALL_TRACE, %g0 | ||
1288 | be 1f | ||
1289 | nop | ||
1290 | |||
1291 | call syscall_trace | ||
1292 | nop | ||
1293 | |||
1294 | 1: | ||
1295 | /* We are returning to a signal handler. */ | ||
1296 | RESTORE_ALL | ||
1297 | |||
1298 | .align 4 | ||
1299 | .globl sys_sigsuspend | ||
1300 | sys_sigsuspend: | ||
1301 | call do_sigsuspend | ||
1302 | add %sp, STACKFRAME_SZ, %o0 | ||
1303 | |||
1304 | ld [%curptr + TI_FLAGS], %l5 | ||
1305 | andcc %l5, _TIF_SYSCALL_TRACE, %g0 | ||
1306 | be 1f | ||
1307 | nop | ||
1308 | |||
1309 | call syscall_trace | ||
1310 | nop | ||
1311 | |||
1312 | 1: | ||
1313 | /* We are returning to a signal handler. */ | ||
1314 | RESTORE_ALL | ||
1315 | |||
1316 | .align 4 | ||
1317 | .globl sys_rt_sigsuspend | ||
1318 | sys_rt_sigsuspend: | ||
1319 | /* Note: %o0, %o1 already have correct value... */ | ||
1320 | call do_rt_sigsuspend | ||
1321 | add %sp, STACKFRAME_SZ, %o2 | ||
1322 | |||
1323 | ld [%curptr + TI_FLAGS], %l5 | ||
1324 | andcc %l5, _TIF_SYSCALL_TRACE, %g0 | ||
1325 | be 1f | ||
1326 | nop | ||
1327 | |||
1328 | call syscall_trace | ||
1329 | nop | ||
1330 | |||
1331 | 1: | ||
1332 | /* We are returning to a signal handler. */ | ||
1333 | RESTORE_ALL | ||
1334 | |||
1335 | .align 4 | ||
1336 | .globl sys_sigreturn | 1280 | .globl sys_sigreturn |
1337 | sys_sigreturn: | 1281 | sys_sigreturn: |
1338 | call do_sigreturn | 1282 | call do_sigreturn |
diff --git a/arch/sparc/kernel/rtrap.S b/arch/sparc/kernel/rtrap.S index f7460d897e79..77ca6fd81253 100644 --- a/arch/sparc/kernel/rtrap.S +++ b/arch/sparc/kernel/rtrap.S | |||
@@ -68,15 +68,14 @@ ret_trap_lockless_ipi: | |||
68 | 68 | ||
69 | ld [%curptr + TI_FLAGS], %g2 | 69 | ld [%curptr + TI_FLAGS], %g2 |
70 | signal_p: | 70 | signal_p: |
71 | andcc %g2, (_TIF_NOTIFY_RESUME|_TIF_SIGPENDING), %g0 | 71 | andcc %g2, (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK), %g0 |
72 | bz,a ret_trap_continue | 72 | bz,a ret_trap_continue |
73 | ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr | 73 | ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr |
74 | 74 | ||
75 | clr %o0 | 75 | mov %l5, %o1 |
76 | mov %l5, %o2 | 76 | mov %l6, %o2 |
77 | mov %l6, %o3 | ||
78 | call do_signal | 77 | call do_signal |
79 | add %sp, STACKFRAME_SZ, %o1 ! pt_regs ptr | 78 | add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr |
80 | 79 | ||
81 | /* Fall through. */ | 80 | /* Fall through. */ |
82 | ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr | 81 | ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr |
diff --git a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c index 5f34d7dc2b89..0748d8147bbf 100644 --- a/arch/sparc/kernel/signal.c +++ b/arch/sparc/kernel/signal.c | |||
@@ -35,9 +35,6 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr, | |||
35 | void *fpqueue, unsigned long *fpqdepth); | 35 | void *fpqueue, unsigned long *fpqdepth); |
36 | extern void fpload(unsigned long *fpregs, unsigned long *fsr); | 36 | extern void fpload(unsigned long *fpregs, unsigned long *fsr); |
37 | 37 | ||
38 | asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, | ||
39 | unsigned long orig_o0, int restart_syscall); | ||
40 | |||
41 | /* Signal frames: the original one (compatible with SunOS): | 38 | /* Signal frames: the original one (compatible with SunOS): |
42 | * | 39 | * |
43 | * Set up a signal frame... Make the stack look the way SunOS | 40 | * Set up a signal frame... Make the stack look the way SunOS |
@@ -95,98 +92,30 @@ struct rt_signal_frame { | |||
95 | #define NF_ALIGNEDSZ (((sizeof(struct new_signal_frame) + 7) & (~7))) | 92 | #define NF_ALIGNEDSZ (((sizeof(struct new_signal_frame) + 7) & (~7))) |
96 | #define RT_ALIGNEDSZ (((sizeof(struct rt_signal_frame) + 7) & (~7))) | 93 | #define RT_ALIGNEDSZ (((sizeof(struct rt_signal_frame) + 7) & (~7))) |
97 | 94 | ||
98 | /* | 95 | static int _sigpause_common(old_sigset_t set) |
99 | * atomically swap in the new signal mask, and wait for a signal. | ||
100 | * This is really tricky on the Sparc, watch out... | ||
101 | */ | ||
102 | asmlinkage void _sigpause_common(old_sigset_t set, struct pt_regs *regs) | ||
103 | { | 96 | { |
104 | sigset_t saveset; | ||
105 | |||
106 | set &= _BLOCKABLE; | 97 | set &= _BLOCKABLE; |
107 | spin_lock_irq(¤t->sighand->siglock); | 98 | spin_lock_irq(¤t->sighand->siglock); |
108 | saveset = current->blocked; | 99 | current->saved_sigmask = current->blocked; |
109 | siginitset(¤t->blocked, set); | 100 | siginitset(¤t->blocked, set); |
110 | recalc_sigpending(); | 101 | recalc_sigpending(); |
111 | spin_unlock_irq(¤t->sighand->siglock); | 102 | spin_unlock_irq(¤t->sighand->siglock); |
112 | 103 | ||
113 | regs->pc = regs->npc; | 104 | current->state = TASK_INTERRUPTIBLE; |
114 | regs->npc += 4; | 105 | schedule(); |
115 | 106 | set_thread_flag(TIF_RESTORE_SIGMASK); | |
116 | /* Condition codes and return value where set here for sigpause, | ||
117 | * and so got used by setup_frame, which again causes sigreturn() | ||
118 | * to return -EINTR. | ||
119 | */ | ||
120 | while (1) { | ||
121 | current->state = TASK_INTERRUPTIBLE; | ||
122 | schedule(); | ||
123 | /* | ||
124 | * Return -EINTR and set condition code here, | ||
125 | * so the interrupted system call actually returns | ||
126 | * these. | ||
127 | */ | ||
128 | regs->psr |= PSR_C; | ||
129 | regs->u_regs[UREG_I0] = EINTR; | ||
130 | if (do_signal(&saveset, regs, 0, 0)) | ||
131 | return; | ||
132 | } | ||
133 | } | ||
134 | 107 | ||
135 | asmlinkage void do_sigpause(unsigned int set, struct pt_regs *regs) | 108 | return -ERESTARTNOHAND; |
136 | { | ||
137 | _sigpause_common(set, regs); | ||
138 | } | 109 | } |
139 | 110 | ||
140 | asmlinkage void do_sigsuspend (struct pt_regs *regs) | 111 | asmlinkage int sys_sigpause(unsigned int set) |
141 | { | 112 | { |
142 | _sigpause_common(regs->u_regs[UREG_I0], regs); | 113 | return _sigpause_common(set); |
143 | } | 114 | } |
144 | 115 | ||
145 | asmlinkage void do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize, | 116 | asmlinkage int sys_sigsuspend(old_sigset_t set) |
146 | struct pt_regs *regs) | ||
147 | { | 117 | { |
148 | sigset_t oldset, set; | 118 | return _sigpause_common(set); |
149 | |||
150 | /* XXX: Don't preclude handling different sized sigset_t's. */ | ||
151 | if (sigsetsize != sizeof(sigset_t)) { | ||
152 | regs->psr |= PSR_C; | ||
153 | regs->u_regs[UREG_I0] = EINVAL; | ||
154 | return; | ||
155 | } | ||
156 | |||
157 | if (copy_from_user(&set, uset, sizeof(set))) { | ||
158 | regs->psr |= PSR_C; | ||
159 | regs->u_regs[UREG_I0] = EFAULT; | ||
160 | return; | ||
161 | } | ||
162 | |||
163 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
164 | spin_lock_irq(¤t->sighand->siglock); | ||
165 | oldset = current->blocked; | ||
166 | current->blocked = set; | ||
167 | recalc_sigpending(); | ||
168 | spin_unlock_irq(¤t->sighand->siglock); | ||
169 | |||
170 | regs->pc = regs->npc; | ||
171 | regs->npc += 4; | ||
172 | |||
173 | /* Condition codes and return value where set here for sigpause, | ||
174 | * and so got used by setup_frame, which again causes sigreturn() | ||
175 | * to return -EINTR. | ||
176 | */ | ||
177 | while (1) { | ||
178 | current->state = TASK_INTERRUPTIBLE; | ||
179 | schedule(); | ||
180 | /* | ||
181 | * Return -EINTR and set condition code here, | ||
182 | * so the interrupted system call actually returns | ||
183 | * these. | ||
184 | */ | ||
185 | regs->psr |= PSR_C; | ||
186 | regs->u_regs[UREG_I0] = EINTR; | ||
187 | if (do_signal(&oldset, regs, 0, 0)) | ||
188 | return; | ||
189 | } | ||
190 | } | 119 | } |
191 | 120 | ||
192 | static inline int | 121 | static inline int |
@@ -1067,13 +996,13 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs, | |||
1067 | * want to handle. Thus you cannot kill init even with a SIGKILL even by | 996 | * want to handle. Thus you cannot kill init even with a SIGKILL even by |
1068 | * mistake. | 997 | * mistake. |
1069 | */ | 998 | */ |
1070 | asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, | 999 | asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0, int restart_syscall) |
1071 | unsigned long orig_i0, int restart_syscall) | ||
1072 | { | 1000 | { |
1073 | siginfo_t info; | 1001 | siginfo_t info; |
1074 | struct sparc_deliver_cookie cookie; | 1002 | struct sparc_deliver_cookie cookie; |
1075 | struct k_sigaction ka; | 1003 | struct k_sigaction ka; |
1076 | int signr; | 1004 | int signr; |
1005 | sigset_t *oldset; | ||
1077 | 1006 | ||
1078 | /* | 1007 | /* |
1079 | * XXX Disable svr4 signal handling until solaris emulation works. | 1008 | * XXX Disable svr4 signal handling until solaris emulation works. |
@@ -1089,7 +1018,9 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, | |||
1089 | cookie.restart_syscall = restart_syscall; | 1018 | cookie.restart_syscall = restart_syscall; |
1090 | cookie.orig_i0 = orig_i0; | 1019 | cookie.orig_i0 = orig_i0; |
1091 | 1020 | ||
1092 | if (!oldset) | 1021 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
1022 | oldset = ¤t->saved_sigmask; | ||
1023 | else | ||
1093 | oldset = ¤t->blocked; | 1024 | oldset = ¤t->blocked; |
1094 | 1025 | ||
1095 | signr = get_signal_to_deliver(&info, &ka, regs, &cookie); | 1026 | signr = get_signal_to_deliver(&info, &ka, regs, &cookie); |
@@ -1098,7 +1029,14 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, | |||
1098 | syscall_restart(cookie.orig_i0, regs, &ka.sa); | 1029 | syscall_restart(cookie.orig_i0, regs, &ka.sa); |
1099 | handle_signal(signr, &ka, &info, oldset, | 1030 | handle_signal(signr, &ka, &info, oldset, |
1100 | regs, svr4_signal); | 1031 | regs, svr4_signal); |
1101 | return 1; | 1032 | /* a signal was successfully delivered; the saved |
1033 | * sigmask will have been stored in the signal frame, | ||
1034 | * and will be restored by sigreturn, so we can simply | ||
1035 | * clear the TIF_RESTORE_SIGMASK flag. | ||
1036 | */ | ||
1037 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
1038 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
1039 | return; | ||
1102 | } | 1040 | } |
1103 | if (cookie.restart_syscall && | 1041 | if (cookie.restart_syscall && |
1104 | (regs->u_regs[UREG_I0] == ERESTARTNOHAND || | 1042 | (regs->u_regs[UREG_I0] == ERESTARTNOHAND || |
@@ -1115,7 +1053,14 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, | |||
1115 | regs->pc -= 4; | 1053 | regs->pc -= 4; |
1116 | regs->npc -= 4; | 1054 | regs->npc -= 4; |
1117 | } | 1055 | } |
1118 | return 0; | 1056 | |
1057 | /* if there's no signal to deliver, we just put the saved sigmask | ||
1058 | * back | ||
1059 | */ | ||
1060 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | ||
1061 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
1062 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | ||
1063 | } | ||
1119 | } | 1064 | } |
1120 | 1065 | ||
1121 | asmlinkage int | 1066 | asmlinkage int |
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index 0b0d492c953b..19b25399d7e4 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c | |||
@@ -66,7 +66,6 @@ struct poll { | |||
66 | 66 | ||
67 | extern int svr4_getcontext (svr4_ucontext_t *, struct pt_regs *); | 67 | extern int svr4_getcontext (svr4_ucontext_t *, struct pt_regs *); |
68 | extern int svr4_setcontext (svr4_ucontext_t *, struct pt_regs *); | 68 | extern int svr4_setcontext (svr4_ucontext_t *, struct pt_regs *); |
69 | void _sigpause_common (unsigned int set, struct pt_regs *); | ||
70 | extern void (*__copy_1page)(void *, const void *); | 69 | extern void (*__copy_1page)(void *, const void *); |
71 | extern void __memmove(void *, const void *, __kernel_size_t); | 70 | extern void __memmove(void *, const void *, __kernel_size_t); |
72 | extern void (*bzero_1page)(void *); | 71 | extern void (*bzero_1page)(void *); |
@@ -227,7 +226,6 @@ EXPORT_SYMBOL(kunmap_atomic); | |||
227 | /* Solaris/SunOS binary compatibility */ | 226 | /* Solaris/SunOS binary compatibility */ |
228 | EXPORT_SYMBOL(svr4_setcontext); | 227 | EXPORT_SYMBOL(svr4_setcontext); |
229 | EXPORT_SYMBOL(svr4_getcontext); | 228 | EXPORT_SYMBOL(svr4_getcontext); |
230 | EXPORT_SYMBOL(_sigpause_common); | ||
231 | 229 | ||
232 | EXPORT_SYMBOL(dump_thread); | 230 | EXPORT_SYMBOL(dump_thread); |
233 | 231 | ||
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index e457a40838fc..6877ae4cd1d9 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S | |||
@@ -75,7 +75,10 @@ sys_call_table: | |||
75 | /*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy | 75 | /*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy |
76 | /*270*/ .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink | 76 | /*270*/ .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink |
77 | /*275*/ .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid | 77 | /*275*/ .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid |
78 | /*280*/ .long sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl | 78 | /*280*/ .long sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl, sys_openat |
79 | /*285*/ .long sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_newfstatat | ||
80 | /*290*/ .long sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat | ||
81 | /*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll | ||
79 | 82 | ||
80 | #ifdef CONFIG_SUNOS_EMUL | 83 | #ifdef CONFIG_SUNOS_EMUL |
81 | /* Now the SunOS syscall table. */ | 84 | /* Now the SunOS syscall table. */ |
@@ -181,6 +184,11 @@ sunos_sys_table: | |||
181 | .long sunos_nosys, sunos_nosys, sunos_nosys | 184 | .long sunos_nosys, sunos_nosys, sunos_nosys |
182 | .long sunos_nosys | 185 | .long sunos_nosys |
183 | /*280*/ .long sunos_nosys, sunos_nosys, sunos_nosys | 186 | /*280*/ .long sunos_nosys, sunos_nosys, sunos_nosys |
187 | .long sunos_nosys, sunos_nosys, sunos_nosys | ||
188 | .long sunos_nosys, sunos_nosys, sunos_nosys | ||
184 | .long sunos_nosys | 189 | .long sunos_nosys |
190 | /*290*/ .long sunos_nosys, sunos_nosys, sunos_nosys | ||
191 | .long sunos_nosys, sunos_nosys, sunos_nosys | ||
192 | .long sunos_nosys, sunos_nosys, sunos_nosys | ||
185 | 193 | ||
186 | #endif | 194 | #endif |
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/boot/.gitignore b/arch/sparc64/boot/.gitignore new file mode 100644 index 000000000000..36356f9d498e --- /dev/null +++ b/arch/sparc64/boot/.gitignore | |||
@@ -0,0 +1,4 @@ | |||
1 | image | ||
2 | tftpboot.img | ||
3 | vmlinux.aout | ||
4 | piggyback | ||
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 9ceddad0fb49..bc56a7d88308 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.16-rc1 | 3 | # Linux kernel version: 2.6.16-rc2 |
4 | # Wed Jan 18 13:41:02 2006 | 4 | # Sat Feb 4 02:31:38 2006 |
5 | # | 5 | # |
6 | CONFIG_SPARC=y | 6 | CONFIG_SPARC=y |
7 | CONFIG_SPARC64=y | 7 | CONFIG_SPARC64=y |
@@ -23,7 +23,6 @@ CONFIG_HZ=250 | |||
23 | # Code maturity level options | 23 | # Code maturity level options |
24 | # | 24 | # |
25 | CONFIG_EXPERIMENTAL=y | 25 | CONFIG_EXPERIMENTAL=y |
26 | CONFIG_CLEAN_COMPILE=y | ||
27 | CONFIG_BROKEN_ON_SMP=y | 26 | CONFIG_BROKEN_ON_SMP=y |
28 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 27 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
29 | 28 | ||
@@ -155,6 +154,7 @@ CONFIG_NET=y | |||
155 | # | 154 | # |
156 | # Networking options | 155 | # Networking options |
157 | # | 156 | # |
157 | # CONFIG_NETDEBUG is not set | ||
158 | CONFIG_PACKET=y | 158 | CONFIG_PACKET=y |
159 | CONFIG_PACKET_MMAP=y | 159 | CONFIG_PACKET_MMAP=y |
160 | CONFIG_UNIX=y | 160 | CONFIG_UNIX=y |
@@ -224,6 +224,11 @@ CONFIG_IP_DCCP_TFRC_LIB=m | |||
224 | # SCTP Configuration (EXPERIMENTAL) | 224 | # SCTP Configuration (EXPERIMENTAL) |
225 | # | 225 | # |
226 | # CONFIG_IP_SCTP is not set | 226 | # CONFIG_IP_SCTP is not set |
227 | |||
228 | # | ||
229 | # TIPC Configuration (EXPERIMENTAL) | ||
230 | # | ||
231 | # CONFIG_TIPC is not set | ||
227 | # CONFIG_ATM is not set | 232 | # CONFIG_ATM is not set |
228 | # CONFIG_BRIDGE is not set | 233 | # CONFIG_BRIDGE is not set |
229 | CONFIG_VLAN_8021Q=m | 234 | CONFIG_VLAN_8021Q=m |
@@ -233,11 +238,6 @@ CONFIG_VLAN_8021Q=m | |||
233 | # CONFIG_ATALK is not set | 238 | # CONFIG_ATALK is not set |
234 | # CONFIG_X25 is not set | 239 | # CONFIG_X25 is not set |
235 | # CONFIG_LAPB is not set | 240 | # CONFIG_LAPB is not set |
236 | |||
237 | # | ||
238 | # TIPC Configuration (EXPERIMENTAL) | ||
239 | # | ||
240 | # CONFIG_TIPC is not set | ||
241 | # CONFIG_NET_DIVERT is not set | 241 | # CONFIG_NET_DIVERT is not set |
242 | # CONFIG_ECONET is not set | 242 | # CONFIG_ECONET is not set |
243 | # CONFIG_WAN_ROUTER is not set | 243 | # CONFIG_WAN_ROUTER is not set |
@@ -657,6 +657,7 @@ CONFIG_SERIAL_SUNSU_CONSOLE=y | |||
657 | CONFIG_SERIAL_SUNSAB=m | 657 | CONFIG_SERIAL_SUNSAB=m |
658 | CONFIG_SERIAL_CORE=y | 658 | CONFIG_SERIAL_CORE=y |
659 | CONFIG_SERIAL_CORE_CONSOLE=y | 659 | CONFIG_SERIAL_CORE_CONSOLE=y |
660 | # CONFIG_SERIAL_JSM is not set | ||
660 | CONFIG_UNIX98_PTYS=y | 661 | CONFIG_UNIX98_PTYS=y |
661 | # CONFIG_LEGACY_PTYS is not set | 662 | # CONFIG_LEGACY_PTYS is not set |
662 | 663 | ||
@@ -1118,6 +1119,10 @@ CONFIG_USB_HIDDEV=y | |||
1118 | # | 1119 | # |
1119 | 1120 | ||
1120 | # | 1121 | # |
1122 | # EDAC - error detection and reporting (RAS) | ||
1123 | # | ||
1124 | |||
1125 | # | ||
1121 | # Misc Linux/SPARC drivers | 1126 | # Misc Linux/SPARC drivers |
1122 | # | 1127 | # |
1123 | CONFIG_SUN_OPENPROMIO=m | 1128 | CONFIG_SUN_OPENPROMIO=m |
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 710002991888..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 |
@@ -1416,7 +1416,6 @@ execve_merge: | |||
1416 | add %sp, PTREGS_OFF, %o0 | 1416 | add %sp, PTREGS_OFF, %o0 |
1417 | 1417 | ||
1418 | .globl sys_pipe, sys_sigpause, sys_nis_syscall | 1418 | .globl sys_pipe, sys_sigpause, sys_nis_syscall |
1419 | .globl sys_sigsuspend, sys_rt_sigsuspend | ||
1420 | .globl sys_rt_sigreturn | 1419 | .globl sys_rt_sigreturn |
1421 | .globl sys_ptrace | 1420 | .globl sys_ptrace |
1422 | .globl sys_sigaltstack | 1421 | .globl sys_sigaltstack |
@@ -1440,28 +1439,6 @@ sys32_sigaltstack: | |||
1440 | mov %i6, %o2 | 1439 | mov %i6, %o2 |
1441 | #endif | 1440 | #endif |
1442 | .align 32 | 1441 | .align 32 |
1443 | sys_sigsuspend: add %sp, PTREGS_OFF, %o0 | ||
1444 | call do_sigsuspend | ||
1445 | add %o7, 1f-.-4, %o7 | ||
1446 | nop | ||
1447 | sys_rt_sigsuspend: /* NOTE: %o0,%o1 have a correct value already */ | ||
1448 | add %sp, PTREGS_OFF, %o2 | ||
1449 | call do_rt_sigsuspend | ||
1450 | add %o7, 1f-.-4, %o7 | ||
1451 | nop | ||
1452 | #ifdef CONFIG_COMPAT | ||
1453 | .globl sys32_rt_sigsuspend | ||
1454 | sys32_rt_sigsuspend: /* NOTE: %o0,%o1 have a correct value already */ | ||
1455 | srl %o0, 0, %o0 | ||
1456 | add %sp, PTREGS_OFF, %o2 | ||
1457 | call do_rt_sigsuspend32 | ||
1458 | add %o7, 1f-.-4, %o7 | ||
1459 | #endif | ||
1460 | /* NOTE: %o0 has a correct value already */ | ||
1461 | sys_sigpause: add %sp, PTREGS_OFF, %o1 | ||
1462 | call do_sigpause | ||
1463 | add %o7, 1f-.-4, %o7 | ||
1464 | nop | ||
1465 | #ifdef CONFIG_COMPAT | 1442 | #ifdef CONFIG_COMPAT |
1466 | .globl sys32_sigreturn | 1443 | .globl sys32_sigreturn |
1467 | sys32_sigreturn: | 1444 | sys32_sigreturn: |
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 090dcca00d2a..b80eba0081ca 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S | |||
@@ -53,14 +53,13 @@ __handle_user_windows: | |||
53 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | 53 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate |
54 | ldx [%g6 + TI_FLAGS], %l0 | 54 | ldx [%g6 + TI_FLAGS], %l0 |
55 | 55 | ||
56 | 1: andcc %l0, (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING), %g0 | 56 | 1: andcc %l0, (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK), %g0 |
57 | be,pt %xcc, __handle_user_windows_continue | 57 | be,pt %xcc, __handle_user_windows_continue |
58 | nop | 58 | nop |
59 | clr %o0 | 59 | mov %l5, %o1 |
60 | mov %l5, %o2 | 60 | mov %l6, %o2 |
61 | mov %l6, %o3 | 61 | add %sp, PTREGS_OFF, %o0 |
62 | add %sp, PTREGS_OFF, %o1 | 62 | mov %l0, %o3 |
63 | mov %l0, %o4 | ||
64 | 63 | ||
65 | call do_notify_resume | 64 | call do_notify_resume |
66 | wrpr %g0, RTRAP_PSTATE, %pstate | 65 | wrpr %g0, RTRAP_PSTATE, %pstate |
@@ -96,15 +95,14 @@ __handle_perfctrs: | |||
96 | wrpr %g0, RTRAP_PSTATE, %pstate | 95 | wrpr %g0, RTRAP_PSTATE, %pstate |
97 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | 96 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate |
98 | ldx [%g6 + TI_FLAGS], %l0 | 97 | ldx [%g6 + TI_FLAGS], %l0 |
99 | 1: andcc %l0, (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING), %g0 | 98 | 1: andcc %l0, (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK), %g0 |
100 | 99 | ||
101 | be,pt %xcc, __handle_perfctrs_continue | 100 | be,pt %xcc, __handle_perfctrs_continue |
102 | sethi %hi(TSTATE_PEF), %o0 | 101 | sethi %hi(TSTATE_PEF), %o0 |
103 | clr %o0 | 102 | mov %l5, %o1 |
104 | mov %l5, %o2 | 103 | mov %l6, %o2 |
105 | mov %l6, %o3 | 104 | add %sp, PTREGS_OFF, %o0 |
106 | add %sp, PTREGS_OFF, %o1 | 105 | mov %l0, %o3 |
107 | mov %l0, %o4 | ||
108 | call do_notify_resume | 106 | call do_notify_resume |
109 | 107 | ||
110 | wrpr %g0, RTRAP_PSTATE, %pstate | 108 | wrpr %g0, RTRAP_PSTATE, %pstate |
@@ -129,11 +127,10 @@ __handle_userfpu: | |||
129 | ba,a,pt %xcc, __handle_userfpu_continue | 127 | ba,a,pt %xcc, __handle_userfpu_continue |
130 | 128 | ||
131 | __handle_signal: | 129 | __handle_signal: |
132 | clr %o0 | 130 | mov %l5, %o1 |
133 | mov %l5, %o2 | 131 | mov %l6, %o2 |
134 | mov %l6, %o3 | 132 | add %sp, PTREGS_OFF, %o0 |
135 | add %sp, PTREGS_OFF, %o1 | 133 | mov %l0, %o3 |
136 | mov %l0, %o4 | ||
137 | call do_notify_resume | 134 | call do_notify_resume |
138 | wrpr %g0, RTRAP_PSTATE, %pstate | 135 | wrpr %g0, RTRAP_PSTATE, %pstate |
139 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | 136 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate |
@@ -200,7 +197,7 @@ __handle_preemption_continue: | |||
200 | andcc %l1, %o0, %g0 | 197 | andcc %l1, %o0, %g0 |
201 | andcc %l0, _TIF_NEED_RESCHED, %g0 | 198 | andcc %l0, _TIF_NEED_RESCHED, %g0 |
202 | bne,pn %xcc, __handle_preemption | 199 | bne,pn %xcc, __handle_preemption |
203 | andcc %l0, (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING), %g0 | 200 | andcc %l0, (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK), %g0 |
204 | bne,pn %xcc, __handle_signal | 201 | bne,pn %xcc, __handle_signal |
205 | __handle_signal_continue: | 202 | __handle_signal_continue: |
206 | ldub [%g6 + TI_WSAVED], %o2 | 203 | ldub [%g6 + TI_WSAVED], %o2 |
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c index 60f5dfabb1e1..ca11a4c457d4 100644 --- a/arch/sparc64/kernel/signal.c +++ b/arch/sparc64/kernel/signal.c | |||
@@ -36,9 +36,6 @@ | |||
36 | 36 | ||
37 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 37 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
38 | 38 | ||
39 | static int do_signal(sigset_t *oldset, struct pt_regs * regs, | ||
40 | unsigned long orig_o0, int ret_from_syscall); | ||
41 | |||
42 | /* {set, get}context() needed for 64-bit SparcLinux userland. */ | 39 | /* {set, get}context() needed for 64-bit SparcLinux userland. */ |
43 | asmlinkage void sparc64_set_context(struct pt_regs *regs) | 40 | asmlinkage void sparc64_set_context(struct pt_regs *regs) |
44 | { | 41 | { |
@@ -242,114 +239,29 @@ struct rt_signal_frame { | |||
242 | /* Align macros */ | 239 | /* Align macros */ |
243 | #define RT_ALIGNEDSZ (((sizeof(struct rt_signal_frame) + 7) & (~7))) | 240 | #define RT_ALIGNEDSZ (((sizeof(struct rt_signal_frame) + 7) & (~7))) |
244 | 241 | ||
245 | /* | 242 | static long _sigpause_common(old_sigset_t set) |
246 | * atomically swap in the new signal mask, and wait for a signal. | ||
247 | * This is really tricky on the Sparc, watch out... | ||
248 | */ | ||
249 | asmlinkage void _sigpause_common(old_sigset_t set, struct pt_regs *regs) | ||
250 | { | 243 | { |
251 | sigset_t saveset; | ||
252 | |||
253 | #ifdef CONFIG_SPARC32_COMPAT | ||
254 | if (test_thread_flag(TIF_32BIT)) { | ||
255 | extern asmlinkage void _sigpause32_common(compat_old_sigset_t, | ||
256 | struct pt_regs *); | ||
257 | _sigpause32_common(set, regs); | ||
258 | return; | ||
259 | } | ||
260 | #endif | ||
261 | set &= _BLOCKABLE; | 244 | set &= _BLOCKABLE; |
262 | spin_lock_irq(¤t->sighand->siglock); | 245 | spin_lock_irq(¤t->sighand->siglock); |
263 | saveset = current->blocked; | 246 | current->saved_sigmask = current->blocked; |
264 | siginitset(¤t->blocked, set); | 247 | siginitset(¤t->blocked, set); |
265 | recalc_sigpending(); | 248 | recalc_sigpending(); |
266 | spin_unlock_irq(¤t->sighand->siglock); | 249 | spin_unlock_irq(¤t->sighand->siglock); |
267 | |||
268 | if (test_thread_flag(TIF_32BIT)) { | ||
269 | regs->tpc = (regs->tnpc & 0xffffffff); | ||
270 | regs->tnpc = (regs->tnpc + 4) & 0xffffffff; | ||
271 | } else { | ||
272 | regs->tpc = regs->tnpc; | ||
273 | regs->tnpc += 4; | ||
274 | } | ||
275 | 250 | ||
276 | /* Condition codes and return value where set here for sigpause, | 251 | current->state = TASK_INTERRUPTIBLE; |
277 | * and so got used by setup_frame, which again causes sigreturn() | 252 | schedule(); |
278 | * to return -EINTR. | 253 | set_thread_flag(TIF_RESTORE_SIGMASK); |
279 | */ | 254 | return -ERESTARTNOHAND; |
280 | while (1) { | ||
281 | current->state = TASK_INTERRUPTIBLE; | ||
282 | schedule(); | ||
283 | /* | ||
284 | * Return -EINTR and set condition code here, | ||
285 | * so the interrupted system call actually returns | ||
286 | * these. | ||
287 | */ | ||
288 | regs->tstate |= (TSTATE_ICARRY|TSTATE_XCARRY); | ||
289 | regs->u_regs[UREG_I0] = EINTR; | ||
290 | if (do_signal(&saveset, regs, 0, 0)) | ||
291 | return; | ||
292 | } | ||
293 | } | 255 | } |
294 | 256 | ||
295 | asmlinkage void do_sigpause(unsigned int set, struct pt_regs *regs) | 257 | asmlinkage long sys_sigpause(unsigned int set) |
296 | { | 258 | { |
297 | _sigpause_common(set, regs); | 259 | return _sigpause_common(set); |
298 | } | 260 | } |
299 | 261 | ||
300 | asmlinkage void do_sigsuspend(struct pt_regs *regs) | 262 | asmlinkage long sys_sigsuspend(old_sigset_t set) |
301 | { | 263 | { |
302 | _sigpause_common(regs->u_regs[UREG_I0], regs); | 264 | return _sigpause_common(set); |
303 | } | ||
304 | |||
305 | asmlinkage void do_rt_sigsuspend(sigset_t __user *uset, size_t sigsetsize, struct pt_regs *regs) | ||
306 | { | ||
307 | sigset_t oldset, set; | ||
308 | |||
309 | /* XXX: Don't preclude handling different sized sigset_t's. */ | ||
310 | if (sigsetsize != sizeof(sigset_t)) { | ||
311 | regs->tstate |= (TSTATE_ICARRY|TSTATE_XCARRY); | ||
312 | regs->u_regs[UREG_I0] = EINVAL; | ||
313 | return; | ||
314 | } | ||
315 | if (copy_from_user(&set, uset, sizeof(set))) { | ||
316 | regs->tstate |= (TSTATE_ICARRY|TSTATE_XCARRY); | ||
317 | regs->u_regs[UREG_I0] = EFAULT; | ||
318 | return; | ||
319 | } | ||
320 | |||
321 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
322 | spin_lock_irq(¤t->sighand->siglock); | ||
323 | oldset = current->blocked; | ||
324 | current->blocked = set; | ||
325 | recalc_sigpending(); | ||
326 | spin_unlock_irq(¤t->sighand->siglock); | ||
327 | |||
328 | if (test_thread_flag(TIF_32BIT)) { | ||
329 | regs->tpc = (regs->tnpc & 0xffffffff); | ||
330 | regs->tnpc = (regs->tnpc + 4) & 0xffffffff; | ||
331 | } else { | ||
332 | regs->tpc = regs->tnpc; | ||
333 | regs->tnpc += 4; | ||
334 | } | ||
335 | |||
336 | /* Condition codes and return value where set here for sigpause, | ||
337 | * and so got used by setup_frame, which again causes sigreturn() | ||
338 | * to return -EINTR. | ||
339 | */ | ||
340 | while (1) { | ||
341 | current->state = TASK_INTERRUPTIBLE; | ||
342 | schedule(); | ||
343 | /* | ||
344 | * Return -EINTR and set condition code here, | ||
345 | * so the interrupted system call actually returns | ||
346 | * these. | ||
347 | */ | ||
348 | regs->tstate |= (TSTATE_ICARRY|TSTATE_XCARRY); | ||
349 | regs->u_regs[UREG_I0] = EINTR; | ||
350 | if (do_signal(&oldset, regs, 0, 0)) | ||
351 | return; | ||
352 | } | ||
353 | } | 265 | } |
354 | 266 | ||
355 | static inline int | 267 | static inline int |
@@ -607,26 +519,29 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs, | |||
607 | * want to handle. Thus you cannot kill init even with a SIGKILL even by | 519 | * want to handle. Thus you cannot kill init even with a SIGKILL even by |
608 | * mistake. | 520 | * mistake. |
609 | */ | 521 | */ |
610 | static int do_signal(sigset_t *oldset, struct pt_regs * regs, | 522 | static void do_signal(struct pt_regs *regs, unsigned long orig_i0, int restart_syscall) |
611 | unsigned long orig_i0, int restart_syscall) | ||
612 | { | 523 | { |
613 | siginfo_t info; | 524 | siginfo_t info; |
614 | struct signal_deliver_cookie cookie; | 525 | struct signal_deliver_cookie cookie; |
615 | struct k_sigaction ka; | 526 | struct k_sigaction ka; |
616 | int signr; | 527 | int signr; |
528 | sigset_t *oldset; | ||
617 | 529 | ||
618 | cookie.restart_syscall = restart_syscall; | 530 | cookie.restart_syscall = restart_syscall; |
619 | cookie.orig_i0 = orig_i0; | 531 | cookie.orig_i0 = orig_i0; |
620 | 532 | ||
621 | if (!oldset) | 533 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
534 | oldset = ¤t->saved_sigmask; | ||
535 | else | ||
622 | oldset = ¤t->blocked; | 536 | oldset = ¤t->blocked; |
623 | 537 | ||
624 | #ifdef CONFIG_SPARC32_COMPAT | 538 | #ifdef CONFIG_SPARC32_COMPAT |
625 | if (test_thread_flag(TIF_32BIT)) { | 539 | if (test_thread_flag(TIF_32BIT)) { |
626 | extern int do_signal32(sigset_t *, struct pt_regs *, | 540 | extern void do_signal32(sigset_t *, struct pt_regs *, |
627 | unsigned long, int); | 541 | unsigned long, int); |
628 | return do_signal32(oldset, regs, orig_i0, | 542 | do_signal32(oldset, regs, orig_i0, |
629 | cookie.restart_syscall); | 543 | cookie.restart_syscall); |
544 | return; | ||
630 | } | 545 | } |
631 | #endif | 546 | #endif |
632 | 547 | ||
@@ -635,7 +550,15 @@ static int do_signal(sigset_t *oldset, struct pt_regs * regs, | |||
635 | if (cookie.restart_syscall) | 550 | if (cookie.restart_syscall) |
636 | syscall_restart(orig_i0, regs, &ka.sa); | 551 | syscall_restart(orig_i0, regs, &ka.sa); |
637 | handle_signal(signr, &ka, &info, oldset, regs); | 552 | handle_signal(signr, &ka, &info, oldset, regs); |
638 | return 1; | 553 | |
554 | /* a signal was successfully delivered; the saved | ||
555 | * sigmask will have been stored in the signal frame, | ||
556 | * and will be restored by sigreturn, so we can simply | ||
557 | * clear the TIF_RESTORE_SIGMASK flag. | ||
558 | */ | ||
559 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
560 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
561 | return; | ||
639 | } | 562 | } |
640 | if (cookie.restart_syscall && | 563 | if (cookie.restart_syscall && |
641 | (regs->u_regs[UREG_I0] == ERESTARTNOHAND || | 564 | (regs->u_regs[UREG_I0] == ERESTARTNOHAND || |
@@ -652,15 +575,21 @@ static int do_signal(sigset_t *oldset, struct pt_regs * regs, | |||
652 | regs->tpc -= 4; | 575 | regs->tpc -= 4; |
653 | regs->tnpc -= 4; | 576 | regs->tnpc -= 4; |
654 | } | 577 | } |
655 | return 0; | 578 | |
579 | /* if there's no signal to deliver, we just put the saved sigmask | ||
580 | * back | ||
581 | */ | ||
582 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | ||
583 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
584 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | ||
585 | } | ||
656 | } | 586 | } |
657 | 587 | ||
658 | void do_notify_resume(sigset_t *oldset, struct pt_regs *regs, | 588 | void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, int restart_syscall, |
659 | unsigned long orig_i0, int restart_syscall, | ||
660 | unsigned long thread_info_flags) | 589 | unsigned long thread_info_flags) |
661 | { | 590 | { |
662 | if (thread_info_flags & _TIF_SIGPENDING) | 591 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) |
663 | do_signal(oldset, regs, orig_i0, restart_syscall); | 592 | do_signal(regs, orig_i0, restart_syscall); |
664 | } | 593 | } |
665 | 594 | ||
666 | void ptrace_signal_deliver(struct pt_regs *regs, void *cookie) | 595 | void ptrace_signal_deliver(struct pt_regs *regs, void *cookie) |
diff --git a/arch/sparc64/kernel/signal32.c b/arch/sparc64/kernel/signal32.c index 009a86e5ded4..708ba9b42cda 100644 --- a/arch/sparc64/kernel/signal32.c +++ b/arch/sparc64/kernel/signal32.c | |||
@@ -32,9 +32,6 @@ | |||
32 | 32 | ||
33 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 33 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
34 | 34 | ||
35 | int do_signal32(sigset_t *oldset, struct pt_regs *regs, | ||
36 | unsigned long orig_o0, int ret_from_syscall); | ||
37 | |||
38 | /* Signal frames: the original one (compatible with SunOS): | 35 | /* Signal frames: the original one (compatible with SunOS): |
39 | * | 36 | * |
40 | * Set up a signal frame... Make the stack look the way SunOS | 37 | * Set up a signal frame... Make the stack look the way SunOS |
@@ -226,102 +223,6 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) | |||
226 | return 0; | 223 | return 0; |
227 | } | 224 | } |
228 | 225 | ||
229 | /* | ||
230 | * atomically swap in the new signal mask, and wait for a signal. | ||
231 | * This is really tricky on the Sparc, watch out... | ||
232 | */ | ||
233 | asmlinkage void _sigpause32_common(compat_old_sigset_t set, struct pt_regs *regs) | ||
234 | { | ||
235 | sigset_t saveset; | ||
236 | |||
237 | set &= _BLOCKABLE; | ||
238 | spin_lock_irq(¤t->sighand->siglock); | ||
239 | saveset = current->blocked; | ||
240 | siginitset(¤t->blocked, set); | ||
241 | recalc_sigpending(); | ||
242 | spin_unlock_irq(¤t->sighand->siglock); | ||
243 | |||
244 | regs->tpc = regs->tnpc; | ||
245 | regs->tnpc += 4; | ||
246 | if (test_thread_flag(TIF_32BIT)) { | ||
247 | regs->tpc &= 0xffffffff; | ||
248 | regs->tnpc &= 0xffffffff; | ||
249 | } | ||
250 | |||
251 | /* Condition codes and return value where set here for sigpause, | ||
252 | * and so got used by setup_frame, which again causes sigreturn() | ||
253 | * to return -EINTR. | ||
254 | */ | ||
255 | while (1) { | ||
256 | current->state = TASK_INTERRUPTIBLE; | ||
257 | schedule(); | ||
258 | /* | ||
259 | * Return -EINTR and set condition code here, | ||
260 | * so the interrupted system call actually returns | ||
261 | * these. | ||
262 | */ | ||
263 | regs->tstate |= TSTATE_ICARRY; | ||
264 | regs->u_regs[UREG_I0] = EINTR; | ||
265 | if (do_signal32(&saveset, regs, 0, 0)) | ||
266 | return; | ||
267 | } | ||
268 | } | ||
269 | |||
270 | asmlinkage void do_rt_sigsuspend32(u32 uset, size_t sigsetsize, struct pt_regs *regs) | ||
271 | { | ||
272 | sigset_t oldset, set; | ||
273 | compat_sigset_t set32; | ||
274 | |||
275 | /* XXX: Don't preclude handling different sized sigset_t's. */ | ||
276 | if (((compat_size_t)sigsetsize) != sizeof(sigset_t)) { | ||
277 | regs->tstate |= TSTATE_ICARRY; | ||
278 | regs->u_regs[UREG_I0] = EINVAL; | ||
279 | return; | ||
280 | } | ||
281 | if (copy_from_user(&set32, compat_ptr(uset), sizeof(set32))) { | ||
282 | regs->tstate |= TSTATE_ICARRY; | ||
283 | regs->u_regs[UREG_I0] = EFAULT; | ||
284 | return; | ||
285 | } | ||
286 | switch (_NSIG_WORDS) { | ||
287 | case 4: set.sig[3] = set32.sig[6] + (((long)set32.sig[7]) << 32); | ||
288 | case 3: set.sig[2] = set32.sig[4] + (((long)set32.sig[5]) << 32); | ||
289 | case 2: set.sig[1] = set32.sig[2] + (((long)set32.sig[3]) << 32); | ||
290 | case 1: set.sig[0] = set32.sig[0] + (((long)set32.sig[1]) << 32); | ||
291 | } | ||
292 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
293 | spin_lock_irq(¤t->sighand->siglock); | ||
294 | oldset = current->blocked; | ||
295 | current->blocked = set; | ||
296 | recalc_sigpending(); | ||
297 | spin_unlock_irq(¤t->sighand->siglock); | ||
298 | |||
299 | regs->tpc = regs->tnpc; | ||
300 | regs->tnpc += 4; | ||
301 | if (test_thread_flag(TIF_32BIT)) { | ||
302 | regs->tpc &= 0xffffffff; | ||
303 | regs->tnpc &= 0xffffffff; | ||
304 | } | ||
305 | |||
306 | /* Condition codes and return value where set here for sigpause, | ||
307 | * and so got used by setup_frame, which again causes sigreturn() | ||
308 | * to return -EINTR. | ||
309 | */ | ||
310 | while (1) { | ||
311 | current->state = TASK_INTERRUPTIBLE; | ||
312 | schedule(); | ||
313 | /* | ||
314 | * Return -EINTR and set condition code here, | ||
315 | * so the interrupted system call actually returns | ||
316 | * these. | ||
317 | */ | ||
318 | regs->tstate |= TSTATE_ICARRY; | ||
319 | regs->u_regs[UREG_I0] = EINTR; | ||
320 | if (do_signal32(&oldset, regs, 0, 0)) | ||
321 | return; | ||
322 | } | ||
323 | } | ||
324 | |||
325 | static int restore_fpu_state32(struct pt_regs *regs, __siginfo_fpu_t __user *fpu) | 226 | static int restore_fpu_state32(struct pt_regs *regs, __siginfo_fpu_t __user *fpu) |
326 | { | 227 | { |
327 | unsigned long *fpregs = current_thread_info()->fpregs; | 228 | unsigned long *fpregs = current_thread_info()->fpregs; |
@@ -1362,8 +1263,8 @@ static inline void syscall_restart32(unsigned long orig_i0, struct pt_regs *regs | |||
1362 | * want to handle. Thus you cannot kill init even with a SIGKILL even by | 1263 | * want to handle. Thus you cannot kill init even with a SIGKILL even by |
1363 | * mistake. | 1264 | * mistake. |
1364 | */ | 1265 | */ |
1365 | int do_signal32(sigset_t *oldset, struct pt_regs * regs, | 1266 | void do_signal32(sigset_t *oldset, struct pt_regs * regs, |
1366 | unsigned long orig_i0, int restart_syscall) | 1267 | unsigned long orig_i0, int restart_syscall) |
1367 | { | 1268 | { |
1368 | siginfo_t info; | 1269 | siginfo_t info; |
1369 | struct signal_deliver_cookie cookie; | 1270 | struct signal_deliver_cookie cookie; |
@@ -1380,7 +1281,15 @@ int do_signal32(sigset_t *oldset, struct pt_regs * regs, | |||
1380 | syscall_restart32(orig_i0, regs, &ka.sa); | 1281 | syscall_restart32(orig_i0, regs, &ka.sa); |
1381 | handle_signal32(signr, &ka, &info, oldset, | 1282 | handle_signal32(signr, &ka, &info, oldset, |
1382 | regs, svr4_signal); | 1283 | regs, svr4_signal); |
1383 | return 1; | 1284 | |
1285 | /* a signal was successfully delivered; the saved | ||
1286 | * sigmask will have been stored in the signal frame, | ||
1287 | * and will be restored by sigreturn, so we can simply | ||
1288 | * clear the TIF_RESTORE_SIGMASK flag. | ||
1289 | */ | ||
1290 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
1291 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
1292 | return; | ||
1384 | } | 1293 | } |
1385 | if (cookie.restart_syscall && | 1294 | if (cookie.restart_syscall && |
1386 | (regs->u_regs[UREG_I0] == ERESTARTNOHAND || | 1295 | (regs->u_regs[UREG_I0] == ERESTARTNOHAND || |
@@ -1397,7 +1306,14 @@ int do_signal32(sigset_t *oldset, struct pt_regs * regs, | |||
1397 | regs->tpc -= 4; | 1306 | regs->tpc -= 4; |
1398 | regs->tnpc -= 4; | 1307 | regs->tnpc -= 4; |
1399 | } | 1308 | } |
1400 | return 0; | 1309 | |
1310 | /* if there's no signal to deliver, we just put the saved sigmask | ||
1311 | * back | ||
1312 | */ | ||
1313 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | ||
1314 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
1315 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | ||
1316 | } | ||
1401 | } | 1317 | } |
1402 | 1318 | ||
1403 | struct sigstack32 { | 1319 | struct sigstack32 { |
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index d177d7e5c9d3..3c06bfb92a8c 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c | |||
@@ -69,7 +69,6 @@ struct poll { | |||
69 | 69 | ||
70 | extern void die_if_kernel(char *str, struct pt_regs *regs); | 70 | extern void die_if_kernel(char *str, struct pt_regs *regs); |
71 | extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | 71 | extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); |
72 | void _sigpause_common (unsigned int set, struct pt_regs *); | ||
73 | extern void *__bzero(void *, size_t); | 72 | extern void *__bzero(void *, size_t); |
74 | extern void *__memscan_zero(void *, size_t); | 73 | extern void *__memscan_zero(void *, size_t); |
75 | extern void *__memscan_generic(void *, int, size_t); | 74 | extern void *__memscan_generic(void *, int, size_t); |
@@ -236,9 +235,10 @@ EXPORT_SYMBOL(pci_dma_supported); | |||
236 | /* I/O device mmaping on Sparc64. */ | 235 | /* I/O device mmaping on Sparc64. */ |
237 | EXPORT_SYMBOL(io_remap_pfn_range); | 236 | EXPORT_SYMBOL(io_remap_pfn_range); |
238 | 237 | ||
238 | #ifdef CONFIG_COMPAT | ||
239 | /* Solaris/SunOS binary compatibility */ | 239 | /* Solaris/SunOS binary compatibility */ |
240 | EXPORT_SYMBOL(_sigpause_common); | ||
241 | EXPORT_SYMBOL(verify_compat_iovec); | 240 | EXPORT_SYMBOL(verify_compat_iovec); |
241 | #endif | ||
242 | 242 | ||
243 | EXPORT_SYMBOL(dump_fpu); | 243 | EXPORT_SYMBOL(dump_fpu); |
244 | EXPORT_SYMBOL(pte_alloc_one_kernel); | 244 | EXPORT_SYMBOL(pte_alloc_one_kernel); |
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 98d24bc00044..2881faf36635 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S | |||
@@ -41,7 +41,7 @@ sys_call_table32: | |||
41 | /*90*/ .word sys_dup2, sys_setfsuid, compat_sys_fcntl, sys32_select, sys_setfsgid | 41 | /*90*/ .word sys_dup2, sys_setfsuid, compat_sys_fcntl, sys32_select, sys_setfsgid |
42 | .word sys_fsync, sys32_setpriority, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall | 42 | .word sys_fsync, sys32_setpriority, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall |
43 | /*100*/ .word sys32_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, sys32_rt_sigprocmask, sys32_rt_sigpending | 43 | /*100*/ .word sys32_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, sys32_rt_sigprocmask, sys32_rt_sigpending |
44 | .word compat_sys_rt_sigtimedwait, sys32_rt_sigqueueinfo, sys32_rt_sigsuspend, sys_setresuid, sys_getresuid | 44 | .word compat_sys_rt_sigtimedwait, sys32_rt_sigqueueinfo, compat_sys_rt_sigsuspend, sys_setresuid, sys_getresuid |
45 | /*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall | 45 | /*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall |
46 | .word sys32_getgroups, sys32_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd | 46 | .word sys32_getgroups, sys32_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd |
47 | /*120*/ .word compat_sys_readv, compat_sys_writev, sys32_settimeofday, sys32_fchown16, sys_fchmod | 47 | /*120*/ .word compat_sys_readv, compat_sys_writev, sys32_settimeofday, sys32_fchown16, sys_fchmod |
@@ -71,12 +71,15 @@ 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 |
78 | .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid | 78 | .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid |
79 | /*280*/ .word sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl | 79 | /*280*/ .word sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl, compat_sys_openat |
80 | .word sys_mkdirat, sys_mknodat, sys_fchownat, compat_sys_futimesat, compat_sys_newfstatat | ||
81 | /*285*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat | ||
82 | .word sys_fchmodat, sys_faccessat, compat_sys_pselect6, compat_sys_ppoll | ||
80 | 83 | ||
81 | #endif /* CONFIG_COMPAT */ | 84 | #endif /* CONFIG_COMPAT */ |
82 | 85 | ||
@@ -142,7 +145,10 @@ sys_call_table: | |||
142 | .word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy | 145 | .word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy |
143 | /*270*/ .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink | 146 | /*270*/ .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink |
144 | .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid | 147 | .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid |
145 | /*280*/ .word sys_nis_syscall, sys_add_key, sys_request_key, sys_keyctl | 148 | /*280*/ .word sys_nis_syscall, sys_add_key, sys_request_key, sys_keyctl, sys_openat |
149 | .word sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, compat_sys_newfstatat | ||
150 | /*285*/ .word sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat | ||
151 | .word sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll | ||
146 | 152 | ||
147 | #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ | 153 | #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ |
148 | defined(CONFIG_SOLARIS_EMUL_MODULE) | 154 | defined(CONFIG_SOLARIS_EMUL_MODULE) |
@@ -239,13 +245,20 @@ sunos_sys_table: | |||
239 | /*250*/ .word sunos_nosys, sunos_nosys, sunos_nosys | 245 | /*250*/ .word sunos_nosys, sunos_nosys, sunos_nosys |
240 | .word sunos_nosys, sunos_nosys, sunos_nosys | 246 | .word sunos_nosys, sunos_nosys, sunos_nosys |
241 | .word sunos_nosys, sunos_nosys, sunos_nosys | 247 | .word sunos_nosys, sunos_nosys, sunos_nosys |
248 | .word sunos_nosys | ||
249 | /*260*/ .word sunos_nosys, sunos_nosys, sunos_nosys | ||
242 | .word sunos_nosys, sunos_nosys, sunos_nosys | 250 | .word sunos_nosys, sunos_nosys, sunos_nosys |
243 | .word sunos_nosys, sunos_nosys, sunos_nosys | 251 | .word sunos_nosys, sunos_nosys, sunos_nosys |
252 | .word sunos_nosys | ||
253 | /*270*/ .word sunos_nosys, sunos_nosys, sunos_nosys | ||
244 | .word sunos_nosys, sunos_nosys, sunos_nosys | 254 | .word sunos_nosys, sunos_nosys, sunos_nosys |
245 | .word sunos_nosys, sunos_nosys, sunos_nosys | 255 | .word sunos_nosys, sunos_nosys, sunos_nosys |
256 | .word sunos_nosys | ||
257 | /*280*/ .word sunos_nosys, sunos_nosys, sunos_nosys | ||
246 | .word sunos_nosys, sunos_nosys, sunos_nosys | 258 | .word sunos_nosys, sunos_nosys, sunos_nosys |
247 | .word sunos_nosys, sunos_nosys, sunos_nosys | 259 | .word sunos_nosys, sunos_nosys, sunos_nosys |
260 | .word sunos_nosys | ||
261 | /*290*/ .word sunos_nosys, sunos_nosys, sunos_nosys | ||
248 | .word sunos_nosys, sunos_nosys, sunos_nosys | 262 | .word sunos_nosys, sunos_nosys, sunos_nosys |
249 | .word sunos_nosys, sunos_nosys, sunos_nosys | 263 | .word sunos_nosys, sunos_nosys, sunos_nosys |
250 | .word sunos_nosys | ||
251 | #endif | 264 | #endif |
diff --git a/arch/sparc64/solaris/entry64.S b/arch/sparc64/solaris/entry64.S index 4b6ae583c0a3..eb314ed23cdb 100644 --- a/arch/sparc64/solaris/entry64.S +++ b/arch/sparc64/solaris/entry64.S | |||
@@ -180,6 +180,8 @@ solaris_sigsuspend: | |||
180 | nop | 180 | nop |
181 | call sys_sigsuspend | 181 | call sys_sigsuspend |
182 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | 182 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] |
183 | b,pt %xcc, ret_from_solaris | ||
184 | nop | ||
183 | 185 | ||
184 | .globl solaris_getpid | 186 | .globl solaris_getpid |
185 | solaris_getpid: | 187 | solaris_getpid: |
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/v850/kernel/simcons.c b/arch/v850/kernel/simcons.c index 7f0efaa025c9..3975aa02cef8 100644 --- a/arch/v850/kernel/simcons.c +++ b/arch/v850/kernel/simcons.c | |||
@@ -117,6 +117,7 @@ late_initcall(simcons_tty_init); | |||
117 | tty driver. */ | 117 | tty driver. */ |
118 | void simcons_poll_tty (struct tty_struct *tty) | 118 | void simcons_poll_tty (struct tty_struct *tty) |
119 | { | 119 | { |
120 | char buf[32]; /* Not the nicest way to do it but I need it correct first */ | ||
120 | int flip = 0, send_break = 0; | 121 | int flip = 0, send_break = 0; |
121 | struct pollfd pfd; | 122 | struct pollfd pfd; |
122 | pfd.fd = 0; | 123 | pfd.fd = 0; |
@@ -124,21 +125,15 @@ void simcons_poll_tty (struct tty_struct *tty) | |||
124 | 125 | ||
125 | if (V850_SIM_SYSCALL (poll, &pfd, 1, 0) > 0) { | 126 | if (V850_SIM_SYSCALL (poll, &pfd, 1, 0) > 0) { |
126 | if (pfd.revents & POLLIN) { | 127 | if (pfd.revents & POLLIN) { |
127 | int left = TTY_FLIPBUF_SIZE - tty->flip.count; | 128 | /* Real block hardware knows the transfer size before |
128 | 129 | transfer so the new tty buffering doesn't try to handle | |
129 | if (left > 0) { | 130 | this rather weird simulator specific case well */ |
130 | unsigned char *buf = tty->flip.char_buf_ptr; | 131 | int rd = V850_SIM_SYSCALL (read, 0, buf, 32); |
131 | int rd = V850_SIM_SYSCALL (read, 0, buf, left); | 132 | if (rd > 0) { |
132 | 133 | tty_insert_flip_string(tty, buf, rd); | |
133 | if (rd > 0) { | 134 | flip = 1; |
134 | tty->flip.count += rd; | 135 | } else |
135 | tty->flip.char_buf_ptr += rd; | 136 | send_break = 1; |
136 | memset (tty->flip.flag_buf_ptr, 0, rd); | ||
137 | tty->flip.flag_buf_ptr += rd; | ||
138 | flip = 1; | ||
139 | } else | ||
140 | send_break = 1; | ||
141 | } | ||
142 | } else if (pfd.revents & POLLERR) | 137 | } else if (pfd.revents & POLLERR) |
143 | send_break = 1; | 138 | send_break = 1; |
144 | } | 139 | } |
diff --git a/arch/x86_64/Kconfig.debug b/arch/x86_64/Kconfig.debug index fcb06a50fdd2..ea31b4c62105 100644 --- a/arch/x86_64/Kconfig.debug +++ b/arch/x86_64/Kconfig.debug | |||
@@ -2,13 +2,6 @@ menu "Kernel hacking" | |||
2 | 2 | ||
3 | source "lib/Kconfig.debug" | 3 | source "lib/Kconfig.debug" |
4 | 4 | ||
5 | config INIT_DEBUG | ||
6 | bool "Debug __init statements" | ||
7 | depends on DEBUG_KERNEL | ||
8 | help | ||
9 | Fill __init and __initdata at the end of boot. This helps debugging | ||
10 | illegal uses of __init and __initdata after initialization. | ||
11 | |||
12 | config DEBUG_RODATA | 5 | config DEBUG_RODATA |
13 | bool "Write protect kernel read-only data structures" | 6 | bool "Write protect kernel read-only data structures" |
14 | depends on DEBUG_KERNEL | 7 | depends on DEBUG_KERNEL |
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index 09a3eb743315..56832929a543 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.15-git12 | 3 | # Linux kernel version: 2.6.16-rc1-git2 |
4 | # Mon Jan 16 13:09:08 2006 | 4 | # Thu Jan 19 10:05:21 2006 |
5 | # | 5 | # |
6 | CONFIG_X86_64=y | 6 | CONFIG_X86_64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -310,6 +310,11 @@ CONFIG_IPV6=y | |||
310 | # SCTP Configuration (EXPERIMENTAL) | 310 | # SCTP Configuration (EXPERIMENTAL) |
311 | # | 311 | # |
312 | # CONFIG_IP_SCTP is not set | 312 | # CONFIG_IP_SCTP is not set |
313 | |||
314 | # | ||
315 | # TIPC Configuration (EXPERIMENTAL) | ||
316 | # | ||
317 | # CONFIG_TIPC is not set | ||
313 | # CONFIG_ATM is not set | 318 | # CONFIG_ATM is not set |
314 | # CONFIG_BRIDGE is not set | 319 | # CONFIG_BRIDGE is not set |
315 | # CONFIG_VLAN_8021Q is not set | 320 | # CONFIG_VLAN_8021Q is not set |
@@ -319,11 +324,6 @@ CONFIG_IPV6=y | |||
319 | # CONFIG_ATALK is not set | 324 | # CONFIG_ATALK is not set |
320 | # CONFIG_X25 is not set | 325 | # CONFIG_X25 is not set |
321 | # CONFIG_LAPB is not set | 326 | # CONFIG_LAPB is not set |
322 | |||
323 | # | ||
324 | # TIPC Configuration (EXPERIMENTAL) | ||
325 | # | ||
326 | # CONFIG_TIPC is not set | ||
327 | # CONFIG_NET_DIVERT is not set | 327 | # CONFIG_NET_DIVERT is not set |
328 | # CONFIG_ECONET is not set | 328 | # CONFIG_ECONET is not set |
329 | # CONFIG_WAN_ROUTER is not set | 329 | # CONFIG_WAN_ROUTER is not set |
@@ -1098,6 +1098,12 @@ CONFIG_USB_MON=y | |||
1098 | # | 1098 | # |
1099 | 1099 | ||
1100 | # | 1100 | # |
1101 | # EDAC - error detection and reporting (RAS) | ||
1102 | # | ||
1103 | # CONFIG_EDAC is not set | ||
1104 | # CONFIG_EDAC_POLL is not set | ||
1105 | |||
1106 | # | ||
1101 | # Firmware Drivers | 1107 | # Firmware Drivers |
1102 | # | 1108 | # |
1103 | # CONFIG_EDD is not set | 1109 | # CONFIG_EDD is not set |
@@ -1290,6 +1296,7 @@ CONFIG_DEBUG_FS=y | |||
1290 | # CONFIG_DEBUG_VM is not set | 1296 | # CONFIG_DEBUG_VM is not set |
1291 | # CONFIG_FRAME_POINTER is not set | 1297 | # CONFIG_FRAME_POINTER is not set |
1292 | # CONFIG_FORCED_INLINING is not set | 1298 | # CONFIG_FORCED_INLINING is not set |
1299 | # CONFIG_UNWIND_INFO is not set | ||
1293 | # CONFIG_RCU_TORTURE_TEST is not set | 1300 | # CONFIG_RCU_TORTURE_TEST is not set |
1294 | CONFIG_INIT_DEBUG=y | 1301 | CONFIG_INIT_DEBUG=y |
1295 | # CONFIG_DEBUG_RODATA is not set | 1302 | # CONFIG_DEBUG_RODATA is not set |
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/apic.c b/arch/x86_64/kernel/apic.c index 5d3c5b07b8db..6147770b4347 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c | |||
@@ -35,8 +35,12 @@ | |||
35 | #include <asm/mach_apic.h> | 35 | #include <asm/mach_apic.h> |
36 | #include <asm/nmi.h> | 36 | #include <asm/nmi.h> |
37 | #include <asm/idle.h> | 37 | #include <asm/idle.h> |
38 | #include <asm/proto.h> | ||
39 | #include <asm/timex.h> | ||
38 | 40 | ||
39 | int apic_verbosity; | 41 | int apic_verbosity; |
42 | int apic_runs_main_timer; | ||
43 | int apic_calibrate_pmtmr __initdata; | ||
40 | 44 | ||
41 | int disable_apic_timer __initdata; | 45 | int disable_apic_timer __initdata; |
42 | 46 | ||
@@ -68,6 +72,26 @@ int get_maxlvt(void) | |||
68 | return maxlvt; | 72 | return maxlvt; |
69 | } | 73 | } |
70 | 74 | ||
75 | /* | ||
76 | * 'what should we do if we get a hw irq event on an illegal vector'. | ||
77 | * each architecture has to answer this themselves. | ||
78 | */ | ||
79 | void ack_bad_irq(unsigned int irq) | ||
80 | { | ||
81 | printk("unexpected IRQ trap at vector %02x\n", irq); | ||
82 | /* | ||
83 | * Currently unexpected vectors happen only on SMP and APIC. | ||
84 | * We _must_ ack these because every local APIC has only N | ||
85 | * irq slots per priority level, and a 'hanging, unacked' IRQ | ||
86 | * holds up an irq slot - in excessive cases (when multiple | ||
87 | * unexpected vectors occur) that might lock up the APIC | ||
88 | * completely. | ||
89 | * But don't ack when the APIC is disabled. -AK | ||
90 | */ | ||
91 | if (!disable_apic) | ||
92 | ack_APIC_irq(); | ||
93 | } | ||
94 | |||
71 | void clear_local_APIC(void) | 95 | void clear_local_APIC(void) |
72 | { | 96 | { |
73 | int maxlvt; | 97 | int maxlvt; |
@@ -702,9 +726,17 @@ static void setup_APIC_timer(unsigned int clocks) | |||
702 | c2 |= inb_p(0x40) << 8; | 726 | c2 |= inb_p(0x40) << 8; |
703 | } while (c2 - c1 < 300); | 727 | } while (c2 - c1 < 300); |
704 | } | 728 | } |
705 | |||
706 | __setup_APIC_LVTT(clocks); | 729 | __setup_APIC_LVTT(clocks); |
707 | 730 | /* Turn off PIT interrupt if we use APIC timer as main timer. | |
731 | Only works with the PM timer right now | ||
732 | TBD fix it for HPET too. */ | ||
733 | if (vxtime.mode == VXTIME_PMTMR && | ||
734 | smp_processor_id() == boot_cpu_id && | ||
735 | apic_runs_main_timer == 1 && | ||
736 | !cpu_isset(boot_cpu_id, timer_interrupt_broadcast_ipi_mask)) { | ||
737 | stop_timer_interrupt(); | ||
738 | apic_runs_main_timer++; | ||
739 | } | ||
708 | local_irq_restore(flags); | 740 | local_irq_restore(flags); |
709 | } | 741 | } |
710 | 742 | ||
@@ -735,14 +767,27 @@ static int __init calibrate_APIC_clock(void) | |||
735 | __setup_APIC_LVTT(1000000000); | 767 | __setup_APIC_LVTT(1000000000); |
736 | 768 | ||
737 | apic_start = apic_read(APIC_TMCCT); | 769 | apic_start = apic_read(APIC_TMCCT); |
738 | rdtscl(tsc_start); | 770 | #ifdef CONFIG_X86_PM_TIMER |
739 | 771 | if (apic_calibrate_pmtmr && pmtmr_ioport) { | |
740 | do { | 772 | pmtimer_wait(5000); /* 5ms wait */ |
741 | apic = apic_read(APIC_TMCCT); | 773 | apic = apic_read(APIC_TMCCT); |
742 | rdtscl(tsc); | 774 | result = (apic_start - apic) * 1000L / 5; |
743 | } while ((tsc - tsc_start) < TICK_COUNT && (apic - apic_start) < TICK_COUNT); | 775 | } else |
776 | #endif | ||
777 | { | ||
778 | rdtscl(tsc_start); | ||
779 | |||
780 | do { | ||
781 | apic = apic_read(APIC_TMCCT); | ||
782 | rdtscl(tsc); | ||
783 | } while ((tsc - tsc_start) < TICK_COUNT && | ||
784 | (apic - apic_start) < TICK_COUNT); | ||
785 | |||
786 | result = (apic_start - apic) * 1000L * cpu_khz / | ||
787 | (tsc - tsc_start); | ||
788 | } | ||
789 | printk("result %d\n", result); | ||
744 | 790 | ||
745 | result = (apic_start - apic) * 1000L * cpu_khz / (tsc - tsc_start); | ||
746 | 791 | ||
747 | printk(KERN_INFO "Detected %d.%03d MHz APIC timer.\n", | 792 | printk(KERN_INFO "Detected %d.%03d MHz APIC timer.\n", |
748 | result / 1000 / 1000, result / 1000 % 1000); | 793 | result / 1000 / 1000, result / 1000 % 1000); |
@@ -872,6 +917,8 @@ void smp_local_timer_interrupt(struct pt_regs *regs) | |||
872 | #ifdef CONFIG_SMP | 917 | #ifdef CONFIG_SMP |
873 | update_process_times(user_mode(regs)); | 918 | update_process_times(user_mode(regs)); |
874 | #endif | 919 | #endif |
920 | if (apic_runs_main_timer > 1 && smp_processor_id() == boot_cpu_id) | ||
921 | main_timer_handler(regs); | ||
875 | /* | 922 | /* |
876 | * We take the 'long' return path, and there every subsystem | 923 | * We take the 'long' return path, and there every subsystem |
877 | * grabs the appropriate locks (kernel lock/ irq lock). | 924 | * grabs the appropriate locks (kernel lock/ irq lock). |
@@ -924,7 +971,7 @@ void smp_apic_timer_interrupt(struct pt_regs *regs) | |||
924 | * multi-chassis. Use available data to take a good guess. | 971 | * multi-chassis. Use available data to take a good guess. |
925 | * If in doubt, go HPET. | 972 | * If in doubt, go HPET. |
926 | */ | 973 | */ |
927 | __init int oem_force_hpet_timer(void) | 974 | __cpuinit int oem_force_hpet_timer(void) |
928 | { | 975 | { |
929 | int i, clusters, zeros; | 976 | int i, clusters, zeros; |
930 | unsigned id; | 977 | unsigned id; |
@@ -1081,10 +1128,34 @@ static __init int setup_nolapic(char *str) | |||
1081 | 1128 | ||
1082 | static __init int setup_noapictimer(char *str) | 1129 | static __init int setup_noapictimer(char *str) |
1083 | { | 1130 | { |
1131 | if (str[0] != ' ' && str[0] != 0) | ||
1132 | return -1; | ||
1084 | disable_apic_timer = 1; | 1133 | disable_apic_timer = 1; |
1085 | return 0; | 1134 | return 0; |
1086 | } | 1135 | } |
1087 | 1136 | ||
1137 | static __init int setup_apicmaintimer(char *str) | ||
1138 | { | ||
1139 | apic_runs_main_timer = 1; | ||
1140 | nohpet = 1; | ||
1141 | return 0; | ||
1142 | } | ||
1143 | __setup("apicmaintimer", setup_apicmaintimer); | ||
1144 | |||
1145 | static __init int setup_noapicmaintimer(char *str) | ||
1146 | { | ||
1147 | apic_runs_main_timer = -1; | ||
1148 | return 0; | ||
1149 | } | ||
1150 | __setup("noapicmaintimer", setup_noapicmaintimer); | ||
1151 | |||
1152 | static __init int setup_apicpmtimer(char *s) | ||
1153 | { | ||
1154 | apic_calibrate_pmtmr = 1; | ||
1155 | return setup_apicmaintimer(NULL); | ||
1156 | } | ||
1157 | __setup("apicpmtimer", setup_apicpmtimer); | ||
1158 | |||
1088 | /* dummy parsing: see setup.c */ | 1159 | /* dummy parsing: see setup.c */ |
1089 | 1160 | ||
1090 | __setup("disableapic", setup_disableapic); | 1161 | __setup("disableapic", setup_disableapic); |
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index dbdba56e8faa..b150c87a08c6 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -499,7 +499,9 @@ ENTRY(stub_rt_sigreturn) | |||
499 | movq %gs:pda_irqstackptr,%rax | 499 | movq %gs:pda_irqstackptr,%rax |
500 | cmoveq %rax,%rsp /*todo This needs CFI annotation! */ | 500 | cmoveq %rax,%rsp /*todo This needs CFI annotation! */ |
501 | pushq %rdi # save old stack | 501 | pushq %rdi # save old stack |
502 | #ifndef CONFIG_DEBUG_INFO | ||
502 | CFI_ADJUST_CFA_OFFSET 8 | 503 | CFI_ADJUST_CFA_OFFSET 8 |
504 | #endif | ||
503 | call \func | 505 | call \func |
504 | .endm | 506 | .endm |
505 | 507 | ||
@@ -509,7 +511,9 @@ ENTRY(common_interrupt) | |||
509 | /* 0(%rsp): oldrsp-ARGOFFSET */ | 511 | /* 0(%rsp): oldrsp-ARGOFFSET */ |
510 | ret_from_intr: | 512 | ret_from_intr: |
511 | popq %rdi | 513 | popq %rdi |
514 | #ifndef CONFIG_DEBUG_INFO | ||
512 | CFI_ADJUST_CFA_OFFSET -8 | 515 | CFI_ADJUST_CFA_OFFSET -8 |
516 | #endif | ||
513 | cli | 517 | cli |
514 | decl %gs:pda_irqcount | 518 | decl %gs:pda_irqcount |
515 | #ifdef CONFIG_DEBUG_INFO | 519 | #ifdef CONFIG_DEBUG_INFO |
@@ -922,7 +926,7 @@ KPROBE_ENTRY(debug) | |||
922 | .previous .text | 926 | .previous .text |
923 | 927 | ||
924 | /* runs on exception stack */ | 928 | /* runs on exception stack */ |
925 | ENTRY(nmi) | 929 | KPROBE_ENTRY(nmi) |
926 | INTR_FRAME | 930 | INTR_FRAME |
927 | pushq $-1 | 931 | pushq $-1 |
928 | CFI_ADJUST_CFA_OFFSET 8 | 932 | CFI_ADJUST_CFA_OFFSET 8 |
@@ -969,6 +973,7 @@ paranoid_schedule: | |||
969 | cli | 973 | cli |
970 | jmp paranoid_userspace | 974 | jmp paranoid_userspace |
971 | CFI_ENDPROC | 975 | CFI_ENDPROC |
976 | .previous .text | ||
972 | 977 | ||
973 | KPROBE_ENTRY(int3) | 978 | KPROBE_ENTRY(int3) |
974 | INTR_FRAME | 979 | INTR_FRAME |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index e8cf44ef8778..4282d72b2a26 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -304,6 +304,14 @@ void __init check_ioapic(void) | |||
304 | #endif | 304 | #endif |
305 | /* RED-PEN skip them on mptables too? */ | 305 | /* RED-PEN skip them on mptables too? */ |
306 | return; | 306 | return; |
307 | case PCI_VENDOR_ID_ATI: | ||
308 | if (apic_runs_main_timer != 0) | ||
309 | break; | ||
310 | printk(KERN_INFO | ||
311 | "ATI board detected. Using APIC/PM timer.\n"); | ||
312 | apic_runs_main_timer = 1; | ||
313 | nohpet = 1; | ||
314 | return; | ||
307 | } | 315 | } |
308 | 316 | ||
309 | /* No multi-function device? */ | 317 | /* No multi-function device? */ |
@@ -2027,7 +2035,7 @@ int __init io_apic_get_redir_entries (int ioapic) | |||
2027 | } | 2035 | } |
2028 | 2036 | ||
2029 | 2037 | ||
2030 | int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low) | 2038 | int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int polarity) |
2031 | { | 2039 | { |
2032 | struct IO_APIC_route_entry entry; | 2040 | struct IO_APIC_route_entry entry; |
2033 | unsigned long flags; | 2041 | unsigned long flags; |
@@ -2049,8 +2057,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; | 2057 | entry.delivery_mode = INT_DELIVERY_MODE; |
2050 | entry.dest_mode = INT_DEST_MODE; | 2058 | entry.dest_mode = INT_DEST_MODE; |
2051 | entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS); | 2059 | entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS); |
2052 | entry.trigger = edge_level; | 2060 | entry.trigger = triggering; |
2053 | entry.polarity = active_high_low; | 2061 | entry.polarity = polarity; |
2054 | entry.mask = 1; /* Disabled (masked) */ | 2062 | entry.mask = 1; /* Disabled (masked) */ |
2055 | 2063 | ||
2056 | irq = gsi_irq_sharing(irq); | 2064 | irq = gsi_irq_sharing(irq); |
@@ -2065,9 +2073,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 -> " | 2073 | 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, | 2074 | "IRQ %d Mode:%i Active:%i)\n", ioapic, |
2067 | mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, | 2075 | mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, |
2068 | edge_level, active_high_low); | 2076 | triggering, polarity); |
2069 | 2077 | ||
2070 | ioapic_register_intr(irq, entry.vector, edge_level); | 2078 | ioapic_register_intr(irq, entry.vector, triggering); |
2071 | 2079 | ||
2072 | if (!ioapic && (irq < 16)) | 2080 | if (!ioapic && (irq < 16)) |
2073 | disable_8259A_irq(irq); | 2081 | disable_8259A_irq(irq); |
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c index 13a2eada6c95..b8b9529fa89e 100644 --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c | |||
@@ -380,7 +380,7 @@ static void __cpuinit mce_cpu_features(struct cpuinfo_x86 *c) | |||
380 | */ | 380 | */ |
381 | void __cpuinit mcheck_init(struct cpuinfo_x86 *c) | 381 | void __cpuinit mcheck_init(struct cpuinfo_x86 *c) |
382 | { | 382 | { |
383 | static cpumask_t mce_cpus __initdata = CPU_MASK_NONE; | 383 | static cpumask_t mce_cpus = CPU_MASK_NONE; |
384 | 384 | ||
385 | mce_cpu_quirks(c); | 385 | mce_cpu_quirks(c); |
386 | 386 | ||
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/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 5fae6f0cd994..8be407a1f62d 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/sysdev.h> | 24 | #include <linux/sysdev.h> |
25 | #include <linux/nmi.h> | 25 | #include <linux/nmi.h> |
26 | #include <linux/sysctl.h> | 26 | #include <linux/sysctl.h> |
27 | #include <linux/kprobes.h> | ||
27 | 28 | ||
28 | #include <asm/smp.h> | 29 | #include <asm/smp.h> |
29 | #include <asm/mtrr.h> | 30 | #include <asm/mtrr.h> |
@@ -468,7 +469,7 @@ void touch_nmi_watchdog (void) | |||
468 | touch_softlockup_watchdog(); | 469 | touch_softlockup_watchdog(); |
469 | } | 470 | } |
470 | 471 | ||
471 | void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason) | 472 | void __kprobes nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) |
472 | { | 473 | { |
473 | int sum; | 474 | int sum; |
474 | int touched = 0; | 475 | int touched = 0; |
@@ -512,14 +513,14 @@ void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason) | |||
512 | } | 513 | } |
513 | } | 514 | } |
514 | 515 | ||
515 | static int dummy_nmi_callback(struct pt_regs * regs, int cpu) | 516 | static __kprobes int dummy_nmi_callback(struct pt_regs * regs, int cpu) |
516 | { | 517 | { |
517 | return 0; | 518 | return 0; |
518 | } | 519 | } |
519 | 520 | ||
520 | static nmi_callback_t nmi_callback = dummy_nmi_callback; | 521 | static nmi_callback_t nmi_callback = dummy_nmi_callback; |
521 | 522 | ||
522 | asmlinkage void do_nmi(struct pt_regs * regs, long error_code) | 523 | asmlinkage __kprobes void do_nmi(struct pt_regs * regs, long error_code) |
523 | { | 524 | { |
524 | int cpu = safe_smp_processor_id(); | 525 | int cpu = safe_smp_processor_id(); |
525 | 526 | ||
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c index 2f5d8328e2b9..4ed391edd47a 100644 --- a/arch/x86_64/kernel/pci-dma.c +++ b/arch/x86_64/kernel/pci-dma.c | |||
@@ -107,6 +107,9 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | |||
107 | goto again; | 107 | goto again; |
108 | } | 108 | } |
109 | 109 | ||
110 | /* Let low level make its own zone decisions */ | ||
111 | gfp &= ~(GFP_DMA32|GFP_DMA); | ||
112 | |||
110 | if (dma_ops->alloc_coherent) | 113 | if (dma_ops->alloc_coherent) |
111 | return dma_ops->alloc_coherent(dev, size, | 114 | return dma_ops->alloc_coherent(dev, size, |
112 | dma_handle, gfp); | 115 | dma_handle, gfp); |
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index c37fc7726ba6..2fe23a6c361b 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c | |||
@@ -457,9 +457,12 @@ int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, int dir) | |||
457 | error: | 457 | error: |
458 | flush_gart(NULL); | 458 | flush_gart(NULL); |
459 | gart_unmap_sg(dev, sg, nents, dir); | 459 | gart_unmap_sg(dev, sg, nents, dir); |
460 | /* When it was forced try again unforced */ | 460 | /* When it was forced or merged try again in a dumb way */ |
461 | if (force_iommu) | 461 | if (force_iommu || iommu_merge) { |
462 | return dma_map_sg_nonforce(dev, sg, nents, dir); | 462 | out = dma_map_sg_nonforce(dev, sg, nents, dir); |
463 | if (out > 0) | ||
464 | return out; | ||
465 | } | ||
463 | if (panic_on_overflow) | 466 | if (panic_on_overflow) |
464 | panic("dma_map_sg: overflow on %lu pages\n", pages); | 467 | panic("dma_map_sg: overflow on %lu pages\n", pages); |
465 | iommu_full(dev, pages << PAGE_SHIFT, dir); | 468 | iommu_full(dev, pages << PAGE_SHIFT, dir); |
@@ -642,9 +645,18 @@ static int __init pci_iommu_init(void) | |||
642 | (no_agp && init_k8_gatt(&info) < 0)) { | 645 | (no_agp && init_k8_gatt(&info) < 0)) { |
643 | no_iommu = 1; | 646 | no_iommu = 1; |
644 | no_iommu_init(); | 647 | no_iommu_init(); |
648 | printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); | ||
649 | if (end_pfn > MAX_DMA32_PFN) { | ||
650 | printk(KERN_ERR "WARNING more than 4GB of memory " | ||
651 | "but IOMMU not compiled in.\n" | ||
652 | KERN_ERR "WARNING 32bit PCI may malfunction.\n" | ||
653 | KERN_ERR "You might want to enable " | ||
654 | "CONFIG_GART_IOMMU\n"); | ||
655 | } | ||
645 | return -1; | 656 | return -1; |
646 | } | 657 | } |
647 | 658 | ||
659 | printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n"); | ||
648 | aper_size = info.aper_size * 1024 * 1024; | 660 | aper_size = info.aper_size * 1024 * 1024; |
649 | iommu_size = check_iommu_size(info.aper_base, aper_size); | 661 | iommu_size = check_iommu_size(info.aper_base, aper_size); |
650 | iommu_pages = iommu_size >> PAGE_SHIFT; | 662 | iommu_pages = iommu_size >> PAGE_SHIFT; |
@@ -718,7 +730,6 @@ static int __init pci_iommu_init(void) | |||
718 | 730 | ||
719 | flush_gart(NULL); | 731 | flush_gart(NULL); |
720 | 732 | ||
721 | printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n"); | ||
722 | dma_ops = &gart_dma_ops; | 733 | dma_ops = &gart_dma_ops; |
723 | 734 | ||
724 | return 0; | 735 | return 0; |
diff --git a/arch/x86_64/kernel/pci-nommu.c b/arch/x86_64/kernel/pci-nommu.c index e41564975195..44adcc2d5e5b 100644 --- a/arch/x86_64/kernel/pci-nommu.c +++ b/arch/x86_64/kernel/pci-nommu.c | |||
@@ -88,12 +88,5 @@ void __init no_iommu_init(void) | |||
88 | { | 88 | { |
89 | if (dma_ops) | 89 | if (dma_ops) |
90 | return; | 90 | return; |
91 | printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); | ||
92 | dma_ops = &nommu_dma_ops; | 91 | dma_ops = &nommu_dma_ops; |
93 | if (end_pfn > MAX_DMA32_PFN) { | ||
94 | printk(KERN_ERR | ||
95 | "WARNING more than 4GB of memory but IOMMU not compiled in.\n" | ||
96 | KERN_ERR "WARNING 32bit PCI may malfunction.\n" | ||
97 | KERN_ERR "You might want to enable CONFIG_GART_IOMMU\n"); | ||
98 | } | ||
99 | } | 92 | } |
diff --git a/arch/x86_64/kernel/pci-swiotlb.c b/arch/x86_64/kernel/pci-swiotlb.c index 3569a25ad7fb..990ed67896f2 100644 --- a/arch/x86_64/kernel/pci-swiotlb.c +++ b/arch/x86_64/kernel/pci-swiotlb.c | |||
@@ -35,8 +35,8 @@ void pci_swiotlb_init(void) | |||
35 | (end_pfn > MAX_DMA32_PFN || force_iommu)) | 35 | (end_pfn > MAX_DMA32_PFN || force_iommu)) |
36 | swiotlb = 1; | 36 | swiotlb = 1; |
37 | if (swiotlb) { | 37 | if (swiotlb) { |
38 | swiotlb_init(); | ||
39 | printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n"); | 38 | printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n"); |
39 | swiotlb_init(); | ||
40 | dma_ops = &swiotlb_dma_ops; | 40 | dma_ops = &swiotlb_dma_ops; |
41 | } | 41 | } |
42 | } | 42 | } |
diff --git a/arch/x86_64/kernel/pmtimer.c b/arch/x86_64/kernel/pmtimer.c index feb5f108dd26..5c51d10408a6 100644 --- a/arch/x86_64/kernel/pmtimer.c +++ b/arch/x86_64/kernel/pmtimer.c | |||
@@ -80,6 +80,31 @@ int pmtimer_mark_offset(void) | |||
80 | return lost - 1; | 80 | return lost - 1; |
81 | } | 81 | } |
82 | 82 | ||
83 | static unsigned pmtimer_wait_tick(void) | ||
84 | { | ||
85 | u32 a, b; | ||
86 | for (a = b = inl(pmtmr_ioport) & ACPI_PM_MASK; | ||
87 | a == b; | ||
88 | b = inl(pmtmr_ioport) & ACPI_PM_MASK) | ||
89 | ; | ||
90 | return b; | ||
91 | } | ||
92 | |||
93 | /* note: wait time is rounded up to one tick */ | ||
94 | void pmtimer_wait(unsigned us) | ||
95 | { | ||
96 | u32 a, b; | ||
97 | a = pmtimer_wait_tick(); | ||
98 | do { | ||
99 | b = inl(pmtmr_ioport); | ||
100 | } while (cyc2us(b - a) < us); | ||
101 | } | ||
102 | |||
103 | void pmtimer_resume(void) | ||
104 | { | ||
105 | last_pmtmr_tick = inl(pmtmr_ioport); | ||
106 | } | ||
107 | |||
83 | unsigned int do_gettimeoffset_pm(void) | 108 | unsigned int do_gettimeoffset_pm(void) |
84 | { | 109 | { |
85 | u32 now, offset, delta = 0; | 110 | u32 now, offset, delta = 0; |
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 8ded407e4a94..22a05dec81a2 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -516,8 +516,10 @@ out: | |||
516 | * This could still be optimized: | 516 | * This could still be optimized: |
517 | * - fold all the options into a flag word and test it with a single test. | 517 | * - fold all the options into a flag word and test it with a single test. |
518 | * - could test fs/gs bitsliced | 518 | * - could test fs/gs bitsliced |
519 | * | ||
520 | * Kprobes not supported here. Set the probe on schedule instead. | ||
519 | */ | 521 | */ |
520 | struct task_struct * | 522 | __kprobes struct task_struct * |
521 | __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | 523 | __switch_to(struct task_struct *prev_p, struct task_struct *next_p) |
522 | { | 524 | { |
523 | struct thread_struct *prev = &prev_p->thread, | 525 | struct thread_struct *prev = &prev_p->thread, |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 28895c03cb11..363db5a003df 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -741,7 +741,7 @@ void __init setup_arch(char **cmdline_p) | |||
741 | e820_setup_gap(); | 741 | e820_setup_gap(); |
742 | 742 | ||
743 | #ifdef CONFIG_GART_IOMMU | 743 | #ifdef CONFIG_GART_IOMMU |
744 | iommu_hole_init(); | 744 | iommu_hole_init(); |
745 | #endif | 745 | #endif |
746 | 746 | ||
747 | #ifdef CONFIG_VT | 747 | #ifdef CONFIG_VT |
@@ -877,6 +877,7 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) | |||
877 | static int __init init_amd(struct cpuinfo_x86 *c) | 877 | static int __init init_amd(struct cpuinfo_x86 *c) |
878 | { | 878 | { |
879 | int r; | 879 | int r; |
880 | unsigned level; | ||
880 | 881 | ||
881 | #ifdef CONFIG_SMP | 882 | #ifdef CONFIG_SMP |
882 | unsigned long value; | 883 | unsigned long value; |
@@ -899,6 +900,11 @@ static int __init init_amd(struct cpuinfo_x86 *c) | |||
899 | 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */ | 900 | 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */ |
900 | clear_bit(0*32+31, &c->x86_capability); | 901 | clear_bit(0*32+31, &c->x86_capability); |
901 | 902 | ||
903 | /* On C+ stepping K8 rep microcode works well for copy/memset */ | ||
904 | level = cpuid_eax(1); | ||
905 | if (c->x86 == 15 && ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58)) | ||
906 | set_bit(X86_FEATURE_REP_GOOD, &c->x86_capability); | ||
907 | |||
902 | r = get_model_name(c); | 908 | r = get_model_name(c); |
903 | if (!r) { | 909 | if (!r) { |
904 | switch (c->x86) { | 910 | switch (c->x86) { |
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index f8c47c688443..c0844bffbf84 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -51,7 +51,7 @@ extern int using_apic_timer; | |||
51 | DEFINE_SPINLOCK(rtc_lock); | 51 | DEFINE_SPINLOCK(rtc_lock); |
52 | DEFINE_SPINLOCK(i8253_lock); | 52 | DEFINE_SPINLOCK(i8253_lock); |
53 | 53 | ||
54 | static int nohpet __initdata = 0; | 54 | int nohpet __initdata = 0; |
55 | static int notsc __initdata = 0; | 55 | static int notsc __initdata = 0; |
56 | 56 | ||
57 | #undef HPET_HACK_ENABLE_DANGEROUS | 57 | #undef HPET_HACK_ENABLE_DANGEROUS |
@@ -345,7 +345,7 @@ static noinline void handle_lost_ticks(int lost, struct pt_regs *regs) | |||
345 | #endif | 345 | #endif |
346 | } | 346 | } |
347 | 347 | ||
348 | static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 348 | void main_timer_handler(struct pt_regs *regs) |
349 | { | 349 | { |
350 | static unsigned long rtc_update = 0; | 350 | static unsigned long rtc_update = 0; |
351 | unsigned long tsc; | 351 | unsigned long tsc; |
@@ -458,12 +458,17 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
458 | } | 458 | } |
459 | 459 | ||
460 | write_sequnlock(&xtime_lock); | 460 | write_sequnlock(&xtime_lock); |
461 | } | ||
461 | 462 | ||
463 | static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
464 | { | ||
465 | if (apic_runs_main_timer > 1) | ||
466 | return IRQ_HANDLED; | ||
467 | main_timer_handler(regs); | ||
462 | #ifdef CONFIG_X86_LOCAL_APIC | 468 | #ifdef CONFIG_X86_LOCAL_APIC |
463 | if (using_apic_timer) | 469 | if (using_apic_timer) |
464 | smp_send_timer_broadcast_ipi(); | 470 | smp_send_timer_broadcast_ipi(); |
465 | #endif | 471 | #endif |
466 | |||
467 | return IRQ_HANDLED; | 472 | return IRQ_HANDLED; |
468 | } | 473 | } |
469 | 474 | ||
@@ -843,17 +848,43 @@ static int hpet_reenable(void) | |||
843 | return hpet_timer_stop_set_go(hpet_tick); | 848 | return hpet_timer_stop_set_go(hpet_tick); |
844 | } | 849 | } |
845 | 850 | ||
846 | void __init pit_init(void) | 851 | #define PIT_MODE 0x43 |
852 | #define PIT_CH0 0x40 | ||
853 | |||
854 | static void __init __pit_init(int val, u8 mode) | ||
847 | { | 855 | { |
848 | unsigned long flags; | 856 | unsigned long flags; |
849 | 857 | ||
850 | spin_lock_irqsave(&i8253_lock, flags); | 858 | spin_lock_irqsave(&i8253_lock, flags); |
851 | outb_p(0x34, 0x43); /* binary, mode 2, LSB/MSB, ch 0 */ | 859 | outb_p(mode, PIT_MODE); |
852 | outb_p(LATCH & 0xff, 0x40); /* LSB */ | 860 | outb_p(val & 0xff, PIT_CH0); /* LSB */ |
853 | outb_p(LATCH >> 8, 0x40); /* MSB */ | 861 | outb_p(val >> 8, PIT_CH0); /* MSB */ |
854 | spin_unlock_irqrestore(&i8253_lock, flags); | 862 | spin_unlock_irqrestore(&i8253_lock, flags); |
855 | } | 863 | } |
856 | 864 | ||
865 | void __init pit_init(void) | ||
866 | { | ||
867 | __pit_init(LATCH, 0x34); /* binary, mode 2, LSB/MSB, ch 0 */ | ||
868 | } | ||
869 | |||
870 | void __init pit_stop_interrupt(void) | ||
871 | { | ||
872 | __pit_init(0, 0x30); /* mode 0 */ | ||
873 | } | ||
874 | |||
875 | void __init stop_timer_interrupt(void) | ||
876 | { | ||
877 | char *name; | ||
878 | if (vxtime.hpet_address) { | ||
879 | name = "HPET"; | ||
880 | hpet_timer_stop_set_go(0); | ||
881 | } else { | ||
882 | name = "PIT"; | ||
883 | pit_stop_interrupt(); | ||
884 | } | ||
885 | printk(KERN_INFO "timer: %s interrupt stopped.\n", name); | ||
886 | } | ||
887 | |||
857 | int __init time_setup(char *str) | 888 | int __init time_setup(char *str) |
858 | { | 889 | { |
859 | report_lost_ticks = 1; | 890 | report_lost_ticks = 1; |
@@ -932,7 +963,7 @@ void __init time_init(void) | |||
932 | * Make an educated guess if the TSC is trustworthy and synchronized | 963 | * Make an educated guess if the TSC is trustworthy and synchronized |
933 | * over all CPUs. | 964 | * over all CPUs. |
934 | */ | 965 | */ |
935 | __init int unsynchronized_tsc(void) | 966 | __cpuinit int unsynchronized_tsc(void) |
936 | { | 967 | { |
937 | #ifdef CONFIG_SMP | 968 | #ifdef CONFIG_SMP |
938 | if (oem_force_hpet_timer()) | 969 | if (oem_force_hpet_timer()) |
@@ -1016,9 +1047,21 @@ static int timer_resume(struct sys_device *dev) | |||
1016 | write_seqlock_irqsave(&xtime_lock,flags); | 1047 | write_seqlock_irqsave(&xtime_lock,flags); |
1017 | xtime.tv_sec = sec; | 1048 | xtime.tv_sec = sec; |
1018 | xtime.tv_nsec = 0; | 1049 | xtime.tv_nsec = 0; |
1050 | if (vxtime.mode == VXTIME_HPET) { | ||
1051 | if (hpet_use_timer) | ||
1052 | vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; | ||
1053 | else | ||
1054 | vxtime.last = hpet_readl(HPET_COUNTER); | ||
1055 | #ifdef CONFIG_X86_PM_TIMER | ||
1056 | } else if (vxtime.mode == VXTIME_PMTMR) { | ||
1057 | pmtimer_resume(); | ||
1058 | #endif | ||
1059 | } else | ||
1060 | vxtime.last_tsc = get_cycles_sync(); | ||
1019 | write_sequnlock_irqrestore(&xtime_lock,flags); | 1061 | write_sequnlock_irqrestore(&xtime_lock,flags); |
1020 | jiffies += sleep_length; | 1062 | jiffies += sleep_length; |
1021 | wall_jiffies += sleep_length; | 1063 | wall_jiffies += sleep_length; |
1064 | monotonic_base += sleep_length * (NSEC_PER_SEC/HZ); | ||
1022 | touch_softlockup_watchdog(); | 1065 | touch_softlockup_watchdog(); |
1023 | return 0; | 1066 | return 0; |
1024 | } | 1067 | } |
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 8bb0aeda78b9..ee1b2da9e5e7 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -372,7 +372,7 @@ void out_of_line_bug(void) | |||
372 | static DEFINE_SPINLOCK(die_lock); | 372 | static DEFINE_SPINLOCK(die_lock); |
373 | static int die_owner = -1; | 373 | static int die_owner = -1; |
374 | 374 | ||
375 | unsigned long oops_begin(void) | 375 | unsigned __kprobes long oops_begin(void) |
376 | { | 376 | { |
377 | int cpu = safe_smp_processor_id(); | 377 | int cpu = safe_smp_processor_id(); |
378 | unsigned long flags; | 378 | unsigned long flags; |
@@ -391,7 +391,7 @@ unsigned long oops_begin(void) | |||
391 | return flags; | 391 | return flags; |
392 | } | 392 | } |
393 | 393 | ||
394 | void oops_end(unsigned long flags) | 394 | void __kprobes oops_end(unsigned long flags) |
395 | { | 395 | { |
396 | die_owner = -1; | 396 | die_owner = -1; |
397 | bust_spinlocks(0); | 397 | bust_spinlocks(0); |
@@ -400,7 +400,7 @@ void oops_end(unsigned long flags) | |||
400 | panic("Oops"); | 400 | panic("Oops"); |
401 | } | 401 | } |
402 | 402 | ||
403 | void __die(const char * str, struct pt_regs * regs, long err) | 403 | void __kprobes __die(const char * str, struct pt_regs * regs, long err) |
404 | { | 404 | { |
405 | static int die_counter; | 405 | static int die_counter; |
406 | printk(KERN_EMERG "%s: %04lx [%u] ", str, err & 0xffff,++die_counter); | 406 | printk(KERN_EMERG "%s: %04lx [%u] ", str, err & 0xffff,++die_counter); |
@@ -432,7 +432,7 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
432 | do_exit(SIGSEGV); | 432 | do_exit(SIGSEGV); |
433 | } | 433 | } |
434 | 434 | ||
435 | void die_nmi(char *str, struct pt_regs *regs) | 435 | void __kprobes die_nmi(char *str, struct pt_regs *regs) |
436 | { | 436 | { |
437 | unsigned long flags = oops_begin(); | 437 | unsigned long flags = oops_begin(); |
438 | 438 | ||
@@ -575,7 +575,8 @@ asmlinkage void __kprobes do_general_protection(struct pt_regs * regs, | |||
575 | } | 575 | } |
576 | } | 576 | } |
577 | 577 | ||
578 | static void mem_parity_error(unsigned char reason, struct pt_regs * regs) | 578 | static __kprobes void |
579 | mem_parity_error(unsigned char reason, struct pt_regs * regs) | ||
579 | { | 580 | { |
580 | printk("Uhhuh. NMI received. Dazed and confused, but trying to continue\n"); | 581 | printk("Uhhuh. NMI received. Dazed and confused, but trying to continue\n"); |
581 | printk("You probably have a hardware problem with your RAM chips\n"); | 582 | printk("You probably have a hardware problem with your RAM chips\n"); |
@@ -585,7 +586,8 @@ static void mem_parity_error(unsigned char reason, struct pt_regs * regs) | |||
585 | outb(reason, 0x61); | 586 | outb(reason, 0x61); |
586 | } | 587 | } |
587 | 588 | ||
588 | static void io_check_error(unsigned char reason, struct pt_regs * regs) | 589 | static __kprobes void |
590 | io_check_error(unsigned char reason, struct pt_regs * regs) | ||
589 | { | 591 | { |
590 | printk("NMI: IOCK error (debug interrupt?)\n"); | 592 | printk("NMI: IOCK error (debug interrupt?)\n"); |
591 | show_registers(regs); | 593 | show_registers(regs); |
@@ -598,7 +600,8 @@ static void io_check_error(unsigned char reason, struct pt_regs * regs) | |||
598 | outb(reason, 0x61); | 600 | outb(reason, 0x61); |
599 | } | 601 | } |
600 | 602 | ||
601 | static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs) | 603 | static __kprobes void |
604 | unknown_nmi_error(unsigned char reason, struct pt_regs * regs) | ||
602 | { printk("Uhhuh. NMI received for unknown reason %02x.\n", reason); | 605 | { printk("Uhhuh. NMI received for unknown reason %02x.\n", reason); |
603 | printk("Dazed and confused, but trying to continue\n"); | 606 | printk("Dazed and confused, but trying to continue\n"); |
604 | printk("Do you have a strange power saving mode enabled?\n"); | 607 | printk("Do you have a strange power saving mode enabled?\n"); |
@@ -606,7 +609,7 @@ static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs) | |||
606 | 609 | ||
607 | /* Runs on IST stack. This code must keep interrupts off all the time. | 610 | /* Runs on IST stack. This code must keep interrupts off all the time. |
608 | Nested NMIs are prevented by the CPU. */ | 611 | Nested NMIs are prevented by the CPU. */ |
609 | asmlinkage void default_do_nmi(struct pt_regs *regs) | 612 | asmlinkage __kprobes void default_do_nmi(struct pt_regs *regs) |
610 | { | 613 | { |
611 | unsigned char reason = 0; | 614 | unsigned char reason = 0; |
612 | int cpu; | 615 | int cpu; |
@@ -658,7 +661,7 @@ asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code) | |||
658 | /* Help handler running on IST stack to switch back to user stack | 661 | /* Help handler running on IST stack to switch back to user stack |
659 | for scheduling or signal handling. The actual stack switch is done in | 662 | for scheduling or signal handling. The actual stack switch is done in |
660 | entry.S */ | 663 | entry.S */ |
661 | asmlinkage struct pt_regs *sync_regs(struct pt_regs *eregs) | 664 | asmlinkage __kprobes struct pt_regs *sync_regs(struct pt_regs *eregs) |
662 | { | 665 | { |
663 | struct pt_regs *regs = eregs; | 666 | struct pt_regs *regs = eregs; |
664 | /* Did already sync */ | 667 | /* Did already sync */ |
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S index b0eed1faf740..74db0062d4a2 100644 --- a/arch/x86_64/kernel/vmlinux.lds.S +++ b/arch/x86_64/kernel/vmlinux.lds.S | |||
@@ -172,13 +172,15 @@ SECTIONS | |||
172 | . = ALIGN(4096); | 172 | . = ALIGN(4096); |
173 | __initramfs_start = .; | 173 | __initramfs_start = .; |
174 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } | 174 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } |
175 | __initramfs_end = .; | 175 | __initramfs_end = .; |
176 | . = ALIGN(32); | 176 | /* temporary here to work around NR_CPUS. If you see this comment in 2.6.17+ |
177 | complain */ | ||
178 | . = ALIGN(4096); | ||
179 | __init_end = .; | ||
180 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); | ||
177 | __per_cpu_start = .; | 181 | __per_cpu_start = .; |
178 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) } | 182 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) } |
179 | __per_cpu_end = .; | 183 | __per_cpu_end = .; |
180 | . = ALIGN(4096); | ||
181 | __init_end = .; | ||
182 | 184 | ||
183 | . = ALIGN(4096); | 185 | . = ALIGN(4096); |
184 | __nosave_begin = .; | 186 | __nosave_begin = .; |
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/clear_page.S b/arch/x86_64/lib/clear_page.S index 43d9fa136180..1f81b79b796c 100644 --- a/arch/x86_64/lib/clear_page.S +++ b/arch/x86_64/lib/clear_page.S | |||
@@ -5,8 +5,46 @@ | |||
5 | .globl clear_page | 5 | .globl clear_page |
6 | .p2align 4 | 6 | .p2align 4 |
7 | clear_page: | 7 | clear_page: |
8 | xorl %eax,%eax | ||
9 | movl $4096/64,%ecx | ||
10 | .p2align 4 | ||
11 | .Lloop: | ||
12 | decl %ecx | ||
13 | #define PUT(x) movq %rax,x*8(%rdi) | ||
14 | movq %rax,(%rdi) | ||
15 | PUT(1) | ||
16 | PUT(2) | ||
17 | PUT(3) | ||
18 | PUT(4) | ||
19 | PUT(5) | ||
20 | PUT(6) | ||
21 | PUT(7) | ||
22 | leaq 64(%rdi),%rdi | ||
23 | jnz .Lloop | ||
24 | nop | ||
25 | ret | ||
26 | clear_page_end: | ||
27 | |||
28 | /* Some CPUs run faster using the string instructions. | ||
29 | It is also a lot simpler. Use this when possible */ | ||
30 | |||
31 | #include <asm/cpufeature.h> | ||
32 | |||
33 | .section .altinstructions,"a" | ||
34 | .align 8 | ||
35 | .quad clear_page | ||
36 | .quad clear_page_c | ||
37 | .byte X86_FEATURE_REP_GOOD | ||
38 | .byte clear_page_end-clear_page | ||
39 | .byte clear_page_c_end-clear_page_c | ||
40 | .previous | ||
41 | |||
42 | .section .altinstr_replacement,"ax" | ||
43 | clear_page_c: | ||
8 | movl $4096/8,%ecx | 44 | movl $4096/8,%ecx |
9 | xorl %eax,%eax | 45 | xorl %eax,%eax |
10 | rep | 46 | rep |
11 | stosq | 47 | stosq |
12 | ret | 48 | ret |
49 | clear_page_c_end: | ||
50 | .previous | ||
diff --git a/arch/x86_64/lib/copy_page.S b/arch/x86_64/lib/copy_page.S index 621a19769406..8fa19d96a7ee 100644 --- a/arch/x86_64/lib/copy_page.S +++ b/arch/x86_64/lib/copy_page.S | |||
@@ -8,7 +8,94 @@ | |||
8 | .globl copy_page | 8 | .globl copy_page |
9 | .p2align 4 | 9 | .p2align 4 |
10 | copy_page: | 10 | copy_page: |
11 | subq $3*8,%rsp | ||
12 | movq %rbx,(%rsp) | ||
13 | movq %r12,1*8(%rsp) | ||
14 | movq %r13,2*8(%rsp) | ||
15 | |||
16 | movl $(4096/64)-5,%ecx | ||
17 | .p2align 4 | ||
18 | .Loop64: | ||
19 | dec %rcx | ||
20 | |||
21 | movq (%rsi), %rax | ||
22 | movq 8 (%rsi), %rbx | ||
23 | movq 16 (%rsi), %rdx | ||
24 | movq 24 (%rsi), %r8 | ||
25 | movq 32 (%rsi), %r9 | ||
26 | movq 40 (%rsi), %r10 | ||
27 | movq 48 (%rsi), %r11 | ||
28 | movq 56 (%rsi), %r12 | ||
29 | |||
30 | prefetcht0 5*64(%rsi) | ||
31 | |||
32 | movq %rax, (%rdi) | ||
33 | movq %rbx, 8 (%rdi) | ||
34 | movq %rdx, 16 (%rdi) | ||
35 | movq %r8, 24 (%rdi) | ||
36 | movq %r9, 32 (%rdi) | ||
37 | movq %r10, 40 (%rdi) | ||
38 | movq %r11, 48 (%rdi) | ||
39 | movq %r12, 56 (%rdi) | ||
40 | |||
41 | leaq 64 (%rsi), %rsi | ||
42 | leaq 64 (%rdi), %rdi | ||
43 | |||
44 | jnz .Loop64 | ||
45 | |||
46 | movl $5,%ecx | ||
47 | .p2align 4 | ||
48 | .Loop2: | ||
49 | decl %ecx | ||
50 | |||
51 | movq (%rsi), %rax | ||
52 | movq 8 (%rsi), %rbx | ||
53 | movq 16 (%rsi), %rdx | ||
54 | movq 24 (%rsi), %r8 | ||
55 | movq 32 (%rsi), %r9 | ||
56 | movq 40 (%rsi), %r10 | ||
57 | movq 48 (%rsi), %r11 | ||
58 | movq 56 (%rsi), %r12 | ||
59 | |||
60 | movq %rax, (%rdi) | ||
61 | movq %rbx, 8 (%rdi) | ||
62 | movq %rdx, 16 (%rdi) | ||
63 | movq %r8, 24 (%rdi) | ||
64 | movq %r9, 32 (%rdi) | ||
65 | movq %r10, 40 (%rdi) | ||
66 | movq %r11, 48 (%rdi) | ||
67 | movq %r12, 56 (%rdi) | ||
68 | |||
69 | leaq 64(%rdi),%rdi | ||
70 | leaq 64(%rsi),%rsi | ||
71 | |||
72 | jnz .Loop2 | ||
73 | |||
74 | movq (%rsp),%rbx | ||
75 | movq 1*8(%rsp),%r12 | ||
76 | movq 2*8(%rsp),%r13 | ||
77 | addq $3*8,%rsp | ||
78 | ret | ||
79 | |||
80 | /* Some CPUs run faster using the string copy instructions. | ||
81 | It is also a lot simpler. Use this when possible */ | ||
82 | |||
83 | #include <asm/cpufeature.h> | ||
84 | |||
85 | .section .altinstructions,"a" | ||
86 | .align 8 | ||
87 | .quad copy_page | ||
88 | .quad copy_page_c | ||
89 | .byte X86_FEATURE_REP_GOOD | ||
90 | .byte copy_page_c_end-copy_page_c | ||
91 | .byte copy_page_c_end-copy_page_c | ||
92 | .previous | ||
93 | |||
94 | .section .altinstr_replacement,"ax" | ||
95 | copy_page_c: | ||
11 | movl $4096/8,%ecx | 96 | movl $4096/8,%ecx |
12 | rep | 97 | rep |
13 | movsq | 98 | movsq |
14 | ret | 99 | ret |
100 | copy_page_c_end: | ||
101 | .previous | ||
diff --git a/arch/x86_64/lib/copy_user.S b/arch/x86_64/lib/copy_user.S index 79422b6559c3..f64569b83b54 100644 --- a/arch/x86_64/lib/copy_user.S +++ b/arch/x86_64/lib/copy_user.S | |||
@@ -4,9 +4,12 @@ | |||
4 | * Functions to copy from and to user space. | 4 | * Functions to copy from and to user space. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #define FIX_ALIGNMENT 1 | ||
8 | |||
7 | #include <asm/current.h> | 9 | #include <asm/current.h> |
8 | #include <asm/asm-offsets.h> | 10 | #include <asm/asm-offsets.h> |
9 | #include <asm/thread_info.h> | 11 | #include <asm/thread_info.h> |
12 | #include <asm/cpufeature.h> | ||
10 | 13 | ||
11 | /* Standard copy_to_user with segment limit checking */ | 14 | /* Standard copy_to_user with segment limit checking */ |
12 | .globl copy_to_user | 15 | .globl copy_to_user |
@@ -18,7 +21,23 @@ copy_to_user: | |||
18 | jc bad_to_user | 21 | jc bad_to_user |
19 | cmpq threadinfo_addr_limit(%rax),%rcx | 22 | cmpq threadinfo_addr_limit(%rax),%rcx |
20 | jae bad_to_user | 23 | jae bad_to_user |
21 | jmp copy_user_generic | 24 | 2: |
25 | .byte 0xe9 /* 32bit jump */ | ||
26 | .long .Lcug-1f | ||
27 | 1: | ||
28 | |||
29 | .section .altinstr_replacement,"ax" | ||
30 | 3: .byte 0xe9 /* replacement jmp with 8 bit immediate */ | ||
31 | .long copy_user_generic_c-1b /* offset */ | ||
32 | .previous | ||
33 | .section .altinstructions,"a" | ||
34 | .align 8 | ||
35 | .quad 2b | ||
36 | .quad 3b | ||
37 | .byte X86_FEATURE_REP_GOOD | ||
38 | .byte 5 | ||
39 | .byte 5 | ||
40 | .previous | ||
22 | 41 | ||
23 | /* Standard copy_from_user with segment limit checking */ | 42 | /* Standard copy_from_user with segment limit checking */ |
24 | .globl copy_from_user | 43 | .globl copy_from_user |
@@ -53,44 +72,230 @@ bad_to_user: | |||
53 | * rsi source | 72 | * rsi source |
54 | * rdx count | 73 | * rdx count |
55 | * | 74 | * |
56 | * Only 4GB of copy is supported. This shouldn't be a problem | ||
57 | * because the kernel normally only writes from/to page sized chunks | ||
58 | * even if user space passed a longer buffer. | ||
59 | * And more would be dangerous because both Intel and AMD have | ||
60 | * errata with rep movsq > 4GB. If someone feels the need to fix | ||
61 | * this please consider this. | ||
62 | * | ||
63 | * Output: | 75 | * Output: |
64 | * eax uncopied bytes or 0 if successful. | 76 | * eax uncopied bytes or 0 if successful. |
65 | */ | 77 | */ |
66 | |||
67 | .globl copy_user_generic | 78 | .globl copy_user_generic |
79 | .p2align 4 | ||
68 | copy_user_generic: | 80 | copy_user_generic: |
81 | .byte 0x66,0x66,0x90 /* 5 byte nop for replacement jump */ | ||
82 | .byte 0x66,0x90 | ||
83 | 1: | ||
84 | .section .altinstr_replacement,"ax" | ||
85 | 2: .byte 0xe9 /* near jump with 32bit immediate */ | ||
86 | .long copy_user_generic_c-1b /* offset */ | ||
87 | .previous | ||
88 | .section .altinstructions,"a" | ||
89 | .align 8 | ||
90 | .quad copy_user_generic | ||
91 | .quad 2b | ||
92 | .byte X86_FEATURE_REP_GOOD | ||
93 | .byte 5 | ||
94 | .byte 5 | ||
95 | .previous | ||
96 | .Lcug: | ||
97 | pushq %rbx | ||
98 | xorl %eax,%eax /*zero for the exception handler */ | ||
99 | |||
100 | #ifdef FIX_ALIGNMENT | ||
101 | /* check for bad alignment of destination */ | ||
102 | movl %edi,%ecx | ||
103 | andl $7,%ecx | ||
104 | jnz .Lbad_alignment | ||
105 | .Lafter_bad_alignment: | ||
106 | #endif | ||
107 | |||
108 | movq %rdx,%rcx | ||
109 | |||
110 | movl $64,%ebx | ||
111 | shrq $6,%rdx | ||
112 | decq %rdx | ||
113 | js .Lhandle_tail | ||
114 | |||
115 | .p2align 4 | ||
116 | .Lloop: | ||
117 | .Ls1: movq (%rsi),%r11 | ||
118 | .Ls2: movq 1*8(%rsi),%r8 | ||
119 | .Ls3: movq 2*8(%rsi),%r9 | ||
120 | .Ls4: movq 3*8(%rsi),%r10 | ||
121 | .Ld1: movq %r11,(%rdi) | ||
122 | .Ld2: movq %r8,1*8(%rdi) | ||
123 | .Ld3: movq %r9,2*8(%rdi) | ||
124 | .Ld4: movq %r10,3*8(%rdi) | ||
125 | |||
126 | .Ls5: movq 4*8(%rsi),%r11 | ||
127 | .Ls6: movq 5*8(%rsi),%r8 | ||
128 | .Ls7: movq 6*8(%rsi),%r9 | ||
129 | .Ls8: movq 7*8(%rsi),%r10 | ||
130 | .Ld5: movq %r11,4*8(%rdi) | ||
131 | .Ld6: movq %r8,5*8(%rdi) | ||
132 | .Ld7: movq %r9,6*8(%rdi) | ||
133 | .Ld8: movq %r10,7*8(%rdi) | ||
134 | |||
135 | decq %rdx | ||
136 | |||
137 | leaq 64(%rsi),%rsi | ||
138 | leaq 64(%rdi),%rdi | ||
139 | |||
140 | jns .Lloop | ||
141 | |||
142 | .p2align 4 | ||
143 | .Lhandle_tail: | ||
144 | movl %ecx,%edx | ||
145 | andl $63,%ecx | ||
146 | shrl $3,%ecx | ||
147 | jz .Lhandle_7 | ||
148 | movl $8,%ebx | ||
149 | .p2align 4 | ||
150 | .Lloop_8: | ||
151 | .Ls9: movq (%rsi),%r8 | ||
152 | .Ld9: movq %r8,(%rdi) | ||
153 | decl %ecx | ||
154 | leaq 8(%rdi),%rdi | ||
155 | leaq 8(%rsi),%rsi | ||
156 | jnz .Lloop_8 | ||
157 | |||
158 | .Lhandle_7: | ||
159 | movl %edx,%ecx | ||
160 | andl $7,%ecx | ||
161 | jz .Lende | ||
162 | .p2align 4 | ||
163 | .Lloop_1: | ||
164 | .Ls10: movb (%rsi),%bl | ||
165 | .Ld10: movb %bl,(%rdi) | ||
166 | incq %rdi | ||
167 | incq %rsi | ||
168 | decl %ecx | ||
169 | jnz .Lloop_1 | ||
170 | |||
171 | .Lende: | ||
172 | popq %rbx | ||
173 | ret | ||
174 | |||
175 | #ifdef FIX_ALIGNMENT | ||
176 | /* align destination */ | ||
177 | .p2align 4 | ||
178 | .Lbad_alignment: | ||
179 | movl $8,%r9d | ||
180 | subl %ecx,%r9d | ||
181 | movl %r9d,%ecx | ||
182 | cmpq %r9,%rdx | ||
183 | jz .Lhandle_7 | ||
184 | js .Lhandle_7 | ||
185 | .Lalign_1: | ||
186 | .Ls11: movb (%rsi),%bl | ||
187 | .Ld11: movb %bl,(%rdi) | ||
188 | incq %rsi | ||
189 | incq %rdi | ||
190 | decl %ecx | ||
191 | jnz .Lalign_1 | ||
192 | subq %r9,%rdx | ||
193 | jmp .Lafter_bad_alignment | ||
194 | #endif | ||
195 | |||
196 | /* table sorted by exception address */ | ||
197 | .section __ex_table,"a" | ||
198 | .align 8 | ||
199 | .quad .Ls1,.Ls1e | ||
200 | .quad .Ls2,.Ls2e | ||
201 | .quad .Ls3,.Ls3e | ||
202 | .quad .Ls4,.Ls4e | ||
203 | .quad .Ld1,.Ls1e | ||
204 | .quad .Ld2,.Ls2e | ||
205 | .quad .Ld3,.Ls3e | ||
206 | .quad .Ld4,.Ls4e | ||
207 | .quad .Ls5,.Ls5e | ||
208 | .quad .Ls6,.Ls6e | ||
209 | .quad .Ls7,.Ls7e | ||
210 | .quad .Ls8,.Ls8e | ||
211 | .quad .Ld5,.Ls5e | ||
212 | .quad .Ld6,.Ls6e | ||
213 | .quad .Ld7,.Ls7e | ||
214 | .quad .Ld8,.Ls8e | ||
215 | .quad .Ls9,.Le_quad | ||
216 | .quad .Ld9,.Le_quad | ||
217 | .quad .Ls10,.Le_byte | ||
218 | .quad .Ld10,.Le_byte | ||
219 | #ifdef FIX_ALIGNMENT | ||
220 | .quad .Ls11,.Lzero_rest | ||
221 | .quad .Ld11,.Lzero_rest | ||
222 | #endif | ||
223 | .quad .Le5,.Le_zero | ||
224 | .previous | ||
225 | |||
226 | /* compute 64-offset for main loop. 8 bytes accuracy with error on the | ||
227 | pessimistic side. this is gross. it would be better to fix the | ||
228 | interface. */ | ||
229 | /* eax: zero, ebx: 64 */ | ||
230 | .Ls1e: addl $8,%eax | ||
231 | .Ls2e: addl $8,%eax | ||
232 | .Ls3e: addl $8,%eax | ||
233 | .Ls4e: addl $8,%eax | ||
234 | .Ls5e: addl $8,%eax | ||
235 | .Ls6e: addl $8,%eax | ||
236 | .Ls7e: addl $8,%eax | ||
237 | .Ls8e: addl $8,%eax | ||
238 | addq %rbx,%rdi /* +64 */ | ||
239 | subq %rax,%rdi /* correct destination with computed offset */ | ||
240 | |||
241 | shlq $6,%rdx /* loop counter * 64 (stride length) */ | ||
242 | addq %rax,%rdx /* add offset to loopcnt */ | ||
243 | andl $63,%ecx /* remaining bytes */ | ||
244 | addq %rcx,%rdx /* add them */ | ||
245 | jmp .Lzero_rest | ||
246 | |||
247 | /* exception on quad word loop in tail handling */ | ||
248 | /* ecx: loopcnt/8, %edx: length, rdi: correct */ | ||
249 | .Le_quad: | ||
250 | shll $3,%ecx | ||
251 | andl $7,%edx | ||
252 | addl %ecx,%edx | ||
253 | /* edx: bytes to zero, rdi: dest, eax:zero */ | ||
254 | .Lzero_rest: | ||
255 | movq %rdx,%rcx | ||
256 | .Le_byte: | ||
257 | xorl %eax,%eax | ||
258 | .Le5: rep | ||
259 | stosb | ||
260 | /* when there is another exception while zeroing the rest just return */ | ||
261 | .Le_zero: | ||
262 | movq %rdx,%rax | ||
263 | jmp .Lende | ||
264 | |||
265 | /* Some CPUs run faster using the string copy instructions. | ||
266 | This is also a lot simpler. Use them when possible. | ||
267 | Patch in jmps to this code instead of copying it fully | ||
268 | to avoid unwanted aliasing in the exception tables. */ | ||
269 | |||
270 | /* rdi destination | ||
271 | * rsi source | ||
272 | * rdx count | ||
273 | * | ||
274 | * Output: | ||
275 | * eax uncopied bytes or 0 if successfull. | ||
276 | * | ||
277 | * Only 4GB of copy is supported. This shouldn't be a problem | ||
278 | * because the kernel normally only writes from/to page sized chunks | ||
279 | * even if user space passed a longer buffer. | ||
280 | * And more would be dangerous because both Intel and AMD have | ||
281 | * errata with rep movsq > 4GB. If someone feels the need to fix | ||
282 | * this please consider this. | ||
283 | */ | ||
284 | copy_user_generic_c: | ||
69 | movl %edx,%ecx | 285 | movl %edx,%ecx |
70 | shrl $3,%ecx | 286 | shrl $3,%ecx |
71 | andl $7,%edx | 287 | andl $7,%edx |
72 | jz 5f | ||
73 | 1: rep | 288 | 1: rep |
74 | movsq | 289 | movsq |
75 | movl %edx,%ecx | 290 | movl %edx,%ecx |
76 | xor %eax,%eax | ||
77 | 2: rep | 291 | 2: rep |
78 | movsb | 292 | movsb |
293 | 4: movl %ecx,%eax | ||
79 | ret | 294 | ret |
80 | /* align here? */ | ||
81 | 5: xorl %eax,%eax | ||
82 | 6: rep movsq | ||
83 | ret | ||
84 | |||
85 | .section .fixup,"ax" | ||
86 | 3: lea (%rdx,%rcx,8),%rax | 295 | 3: lea (%rdx,%rcx,8),%rax |
87 | ret | 296 | ret |
88 | 4: movl %ecx,%eax | ||
89 | ret | ||
90 | .previous | ||
91 | 297 | ||
92 | .section __ex_table,"a" | 298 | .section __ex_table,"a" |
93 | .quad 1b,3b | 299 | .quad 1b,3b |
94 | .quad 2b,4b | 300 | .quad 2b,4b |
95 | .quad 6b,4b | ||
96 | .previous | 301 | .previous |
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/lib/memcpy.S b/arch/x86_64/lib/memcpy.S index 92dd80544602..5554948b5554 100644 --- a/arch/x86_64/lib/memcpy.S +++ b/arch/x86_64/lib/memcpy.S | |||
@@ -11,8 +11,6 @@ | |||
11 | * | 11 | * |
12 | * Output: | 12 | * Output: |
13 | * rax original destination | 13 | * rax original destination |
14 | * | ||
15 | * TODO: check best memcpy for PSC | ||
16 | */ | 14 | */ |
17 | 15 | ||
18 | .globl __memcpy | 16 | .globl __memcpy |
@@ -20,6 +18,95 @@ | |||
20 | .p2align 4 | 18 | .p2align 4 |
21 | __memcpy: | 19 | __memcpy: |
22 | memcpy: | 20 | memcpy: |
21 | pushq %rbx | ||
22 | movq %rdi,%rax | ||
23 | |||
24 | movl %edx,%ecx | ||
25 | shrl $6,%ecx | ||
26 | jz .Lhandle_tail | ||
27 | |||
28 | .p2align 4 | ||
29 | .Lloop_64: | ||
30 | decl %ecx | ||
31 | |||
32 | movq (%rsi),%r11 | ||
33 | movq 8(%rsi),%r8 | ||
34 | |||
35 | movq %r11,(%rdi) | ||
36 | movq %r8,1*8(%rdi) | ||
37 | |||
38 | movq 2*8(%rsi),%r9 | ||
39 | movq 3*8(%rsi),%r10 | ||
40 | |||
41 | movq %r9,2*8(%rdi) | ||
42 | movq %r10,3*8(%rdi) | ||
43 | |||
44 | movq 4*8(%rsi),%r11 | ||
45 | movq 5*8(%rsi),%r8 | ||
46 | |||
47 | movq %r11,4*8(%rdi) | ||
48 | movq %r8,5*8(%rdi) | ||
49 | |||
50 | movq 6*8(%rsi),%r9 | ||
51 | movq 7*8(%rsi),%r10 | ||
52 | |||
53 | movq %r9,6*8(%rdi) | ||
54 | movq %r10,7*8(%rdi) | ||
55 | |||
56 | leaq 64(%rsi),%rsi | ||
57 | leaq 64(%rdi),%rdi | ||
58 | jnz .Lloop_64 | ||
59 | |||
60 | .Lhandle_tail: | ||
61 | movl %edx,%ecx | ||
62 | andl $63,%ecx | ||
63 | shrl $3,%ecx | ||
64 | jz .Lhandle_7 | ||
65 | .p2align 4 | ||
66 | .Lloop_8: | ||
67 | decl %ecx | ||
68 | movq (%rsi),%r8 | ||
69 | movq %r8,(%rdi) | ||
70 | leaq 8(%rdi),%rdi | ||
71 | leaq 8(%rsi),%rsi | ||
72 | jnz .Lloop_8 | ||
73 | |||
74 | .Lhandle_7: | ||
75 | movl %edx,%ecx | ||
76 | andl $7,%ecx | ||
77 | jz .Lende | ||
78 | .p2align 4 | ||
79 | .Lloop_1: | ||
80 | movb (%rsi),%r8b | ||
81 | movb %r8b,(%rdi) | ||
82 | incq %rdi | ||
83 | incq %rsi | ||
84 | decl %ecx | ||
85 | jnz .Lloop_1 | ||
86 | |||
87 | .Lende: | ||
88 | popq %rbx | ||
89 | ret | ||
90 | .Lfinal: | ||
91 | |||
92 | /* Some CPUs run faster using the string copy instructions. | ||
93 | It is also a lot simpler. Use this when possible */ | ||
94 | |||
95 | .section .altinstructions,"a" | ||
96 | .align 8 | ||
97 | .quad memcpy | ||
98 | .quad memcpy_c | ||
99 | .byte X86_FEATURE_REP_GOOD | ||
100 | .byte .Lfinal-memcpy | ||
101 | .byte memcpy_c_end-memcpy_c | ||
102 | .previous | ||
103 | |||
104 | .section .altinstr_replacement,"ax" | ||
105 | /* rdi destination | ||
106 | * rsi source | ||
107 | * rdx count | ||
108 | */ | ||
109 | memcpy_c: | ||
23 | movq %rdi,%rax | 110 | movq %rdi,%rax |
24 | movl %edx,%ecx | 111 | movl %edx,%ecx |
25 | shrl $3,%ecx | 112 | shrl $3,%ecx |
@@ -30,3 +117,5 @@ memcpy: | |||
30 | rep | 117 | rep |
31 | movsb | 118 | movsb |
32 | ret | 119 | ret |
120 | memcpy_c_end: | ||
121 | .previous | ||
diff --git a/arch/x86_64/lib/memset.S b/arch/x86_64/lib/memset.S index 2aa48f24ed1e..ad397f2c7de8 100644 --- a/arch/x86_64/lib/memset.S +++ b/arch/x86_64/lib/memset.S | |||
@@ -13,6 +13,98 @@ | |||
13 | .p2align 4 | 13 | .p2align 4 |
14 | memset: | 14 | memset: |
15 | __memset: | 15 | __memset: |
16 | movq %rdi,%r10 | ||
17 | movq %rdx,%r11 | ||
18 | |||
19 | /* expand byte value */ | ||
20 | movzbl %sil,%ecx | ||
21 | movabs $0x0101010101010101,%rax | ||
22 | mul %rcx /* with rax, clobbers rdx */ | ||
23 | |||
24 | /* align dst */ | ||
25 | movl %edi,%r9d | ||
26 | andl $7,%r9d | ||
27 | jnz .Lbad_alignment | ||
28 | .Lafter_bad_alignment: | ||
29 | |||
30 | movl %r11d,%ecx | ||
31 | shrl $6,%ecx | ||
32 | jz .Lhandle_tail | ||
33 | |||
34 | .p2align 4 | ||
35 | .Lloop_64: | ||
36 | decl %ecx | ||
37 | movq %rax,(%rdi) | ||
38 | movq %rax,8(%rdi) | ||
39 | movq %rax,16(%rdi) | ||
40 | movq %rax,24(%rdi) | ||
41 | movq %rax,32(%rdi) | ||
42 | movq %rax,40(%rdi) | ||
43 | movq %rax,48(%rdi) | ||
44 | movq %rax,56(%rdi) | ||
45 | leaq 64(%rdi),%rdi | ||
46 | jnz .Lloop_64 | ||
47 | |||
48 | /* Handle tail in loops. The loops should be faster than hard | ||
49 | to predict jump tables. */ | ||
50 | .p2align 4 | ||
51 | .Lhandle_tail: | ||
52 | movl %r11d,%ecx | ||
53 | andl $63&(~7),%ecx | ||
54 | jz .Lhandle_7 | ||
55 | shrl $3,%ecx | ||
56 | .p2align 4 | ||
57 | .Lloop_8: | ||
58 | decl %ecx | ||
59 | movq %rax,(%rdi) | ||
60 | leaq 8(%rdi),%rdi | ||
61 | jnz .Lloop_8 | ||
62 | |||
63 | .Lhandle_7: | ||
64 | movl %r11d,%ecx | ||
65 | andl $7,%ecx | ||
66 | jz .Lende | ||
67 | .p2align 4 | ||
68 | .Lloop_1: | ||
69 | decl %ecx | ||
70 | movb %al,(%rdi) | ||
71 | leaq 1(%rdi),%rdi | ||
72 | jnz .Lloop_1 | ||
73 | |||
74 | .Lende: | ||
75 | movq %r10,%rax | ||
76 | ret | ||
77 | |||
78 | .Lbad_alignment: | ||
79 | cmpq $7,%r11 | ||
80 | jbe .Lhandle_7 | ||
81 | movq %rax,(%rdi) /* unaligned store */ | ||
82 | movq $8,%r8 | ||
83 | subq %r9,%r8 | ||
84 | addq %r8,%rdi | ||
85 | subq %r8,%r11 | ||
86 | jmp .Lafter_bad_alignment | ||
87 | |||
88 | /* Some CPUs run faster using the string instructions. | ||
89 | It is also a lot simpler. Use this when possible */ | ||
90 | |||
91 | #include <asm/cpufeature.h> | ||
92 | |||
93 | .section .altinstructions,"a" | ||
94 | .align 8 | ||
95 | .quad memset | ||
96 | .quad memset_c | ||
97 | .byte X86_FEATURE_REP_GOOD | ||
98 | .byte memset_c_end-memset_c | ||
99 | .byte memset_c_end-memset_c | ||
100 | .previous | ||
101 | |||
102 | .section .altinstr_replacement,"ax" | ||
103 | /* rdi destination | ||
104 | * rsi value | ||
105 | * rdx count | ||
106 | */ | ||
107 | memset_c: | ||
16 | movq %rdi,%r9 | 108 | movq %rdi,%r9 |
17 | movl %edx,%r8d | 109 | movl %edx,%r8d |
18 | andl $7,%r8d | 110 | andl $7,%r8d |
@@ -29,3 +121,5 @@ __memset: | |||
29 | stosb | 121 | stosb |
30 | movq %r9,%rax | 122 | movq %r9,%rax |
31 | ret | 123 | ret |
124 | memset_c_end: | ||
125 | .previous | ||
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index 26eac194064b..2e7c3c8ffe03 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <asm/proto.h> | 33 | #include <asm/proto.h> |
34 | #include <asm/kdebug.h> | 34 | #include <asm/kdebug.h> |
35 | #include <asm-generic/sections.h> | 35 | #include <asm-generic/sections.h> |
36 | #include <asm/kdebug.h> | ||
37 | 36 | ||
38 | /* Page fault error code bits */ | 37 | /* Page fault error code bits */ |
39 | #define PF_PROT (1<<0) /* or no page found */ | 38 | #define PF_PROT (1<<0) /* or no page found */ |
@@ -157,8 +156,8 @@ void dump_pagetable(unsigned long address) | |||
157 | 156 | ||
158 | pgd = __va((unsigned long)pgd & PHYSICAL_PAGE_MASK); | 157 | pgd = __va((unsigned long)pgd & PHYSICAL_PAGE_MASK); |
159 | pgd += pgd_index(address); | 158 | pgd += pgd_index(address); |
160 | printk("PGD %lx ", pgd_val(*pgd)); | ||
161 | if (bad_address(pgd)) goto bad; | 159 | if (bad_address(pgd)) goto bad; |
160 | printk("PGD %lx ", pgd_val(*pgd)); | ||
162 | if (!pgd_present(*pgd)) goto ret; | 161 | if (!pgd_present(*pgd)) goto ret; |
163 | 162 | ||
164 | pud = __pud_offset_k((pud_t *)pgd_page(*pgd), address); | 163 | pud = __pud_offset_k((pud_t *)pgd_page(*pgd), address); |
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c index 8b7f85608fa8..cd25300726fc 100644 --- a/arch/x86_64/mm/srat.c +++ b/arch/x86_64/mm/srat.c | |||
@@ -26,6 +26,10 @@ static nodemask_t nodes_found __initdata; | |||
26 | static struct node nodes[MAX_NUMNODES] __initdata; | 26 | static struct node nodes[MAX_NUMNODES] __initdata; |
27 | static u8 pxm2node[256] = { [0 ... 255] = 0xff }; | 27 | static u8 pxm2node[256] = { [0 ... 255] = 0xff }; |
28 | 28 | ||
29 | /* Too small nodes confuse the VM badly. Usually they result | ||
30 | from BIOS bugs. */ | ||
31 | #define NODE_MIN_SIZE (4*1024*1024) | ||
32 | |||
29 | static int node_to_pxm(int n); | 33 | static int node_to_pxm(int n); |
30 | 34 | ||
31 | int pxm_to_node(int pxm) | 35 | int pxm_to_node(int pxm) |
@@ -131,7 +135,12 @@ void __init | |||
131 | acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa) | 135 | acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa) |
132 | { | 136 | { |
133 | int pxm, node; | 137 | int pxm, node; |
134 | if (srat_disabled() || pa->flags.enabled == 0) | 138 | if (srat_disabled()) |
139 | return; | ||
140 | if (pa->header.length != sizeof(struct acpi_table_processor_affinity)) { bad_srat(); | ||
141 | return; | ||
142 | } | ||
143 | if (pa->flags.enabled == 0) | ||
135 | return; | 144 | return; |
136 | pxm = pa->proximity_domain; | 145 | pxm = pa->proximity_domain; |
137 | node = setup_node(pxm); | 146 | node = setup_node(pxm); |
@@ -155,8 +164,16 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) | |||
155 | int node, pxm; | 164 | int node, pxm; |
156 | int i; | 165 | int i; |
157 | 166 | ||
158 | if (srat_disabled() || ma->flags.enabled == 0) | 167 | if (srat_disabled()) |
168 | return; | ||
169 | if (ma->header.length != sizeof(struct acpi_table_memory_affinity)) { | ||
170 | bad_srat(); | ||
159 | return; | 171 | return; |
172 | } | ||
173 | if (ma->flags.enabled == 0) | ||
174 | return; | ||
175 | start = ma->base_addr_lo | ((u64)ma->base_addr_hi << 32); | ||
176 | end = start + (ma->length_lo | ((u64)ma->length_hi << 32)); | ||
160 | pxm = ma->proximity_domain; | 177 | pxm = ma->proximity_domain; |
161 | node = setup_node(pxm); | 178 | node = setup_node(pxm); |
162 | if (node < 0) { | 179 | if (node < 0) { |
@@ -164,8 +181,6 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) | |||
164 | bad_srat(); | 181 | bad_srat(); |
165 | return; | 182 | return; |
166 | } | 183 | } |
167 | start = ma->base_addr_lo | ((u64)ma->base_addr_hi << 32); | ||
168 | end = start + (ma->length_lo | ((u64)ma->length_hi << 32)); | ||
169 | /* It is fine to add this area to the nodes data it will be used later*/ | 184 | /* It is fine to add this area to the nodes data it will be used later*/ |
170 | if (ma->flags.hot_pluggable == 1) | 185 | if (ma->flags.hot_pluggable == 1) |
171 | printk(KERN_INFO "SRAT: hot plug zone found %lx - %lx \n", | 186 | printk(KERN_INFO "SRAT: hot plug zone found %lx - %lx \n", |
@@ -223,6 +238,16 @@ static int nodes_cover_memory(void) | |||
223 | return 1; | 238 | return 1; |
224 | } | 239 | } |
225 | 240 | ||
241 | static void unparse_node(int node) | ||
242 | { | ||
243 | int i; | ||
244 | node_clear(node, nodes_parsed); | ||
245 | for (i = 0; i < MAX_LOCAL_APIC; i++) { | ||
246 | if (apicid_to_node[i] == node) | ||
247 | apicid_to_node[i] = NUMA_NO_NODE; | ||
248 | } | ||
249 | } | ||
250 | |||
226 | void __init acpi_numa_arch_fixup(void) {} | 251 | void __init acpi_numa_arch_fixup(void) {} |
227 | 252 | ||
228 | /* Use the information discovered above to actually set up the nodes. */ | 253 | /* Use the information discovered above to actually set up the nodes. */ |
@@ -230,16 +255,16 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
230 | { | 255 | { |
231 | int i; | 256 | int i; |
232 | 257 | ||
233 | if (acpi_numa <= 0) | ||
234 | return -1; | ||
235 | |||
236 | /* First clean up the node list */ | 258 | /* First clean up the node list */ |
237 | for_each_node_mask(i, nodes_parsed) { | 259 | for (i = 0; i < MAX_NUMNODES; i++) { |
238 | cutoff_node(i, start, end); | 260 | cutoff_node(i, start, end); |
239 | if (nodes[i].start == nodes[i].end) | 261 | if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) |
240 | node_clear(i, nodes_parsed); | 262 | unparse_node(i); |
241 | } | 263 | } |
242 | 264 | ||
265 | if (acpi_numa <= 0) | ||
266 | return -1; | ||
267 | |||
243 | if (!nodes_cover_memory()) { | 268 | if (!nodes_cover_memory()) { |
244 | bad_srat(); | 269 | bad_srat(); |
245 | return -1; | 270 | return -1; |
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index f16c0d57c552..b4a3fe4ec249 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 pci_mmcfg_virt[0].virt; | ||
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) |
diff --git a/arch/xtensa/platform-iss/console.c b/arch/xtensa/platform-iss/console.c index 4fbddf92a921..94fdfe474ac1 100644 --- a/arch/xtensa/platform-iss/console.c +++ b/arch/xtensa/platform-iss/console.c | |||
@@ -128,9 +128,7 @@ static void rs_poll(unsigned long priv) | |||
128 | 128 | ||
129 | while (__simc(SYS_select_one, 0, XTISS_SELECT_ONE_READ, (int)&tv,0,0)){ | 129 | while (__simc(SYS_select_one, 0, XTISS_SELECT_ONE_READ, (int)&tv,0,0)){ |
130 | __simc (SYS_read, 0, (unsigned long)&c, 1, 0, 0); | 130 | __simc (SYS_read, 0, (unsigned long)&c, 1, 0, 0); |
131 | tty->flip.count++; | 131 | tty_insert_flip_char(tty, c, TTY_NORMAL); |
132 | *tty->flip.char_buf_ptr++ = c; | ||
133 | *tty->flip.flag_buf_ptr++ = TTY_NORMAL; | ||
134 | i++; | 132 | i++; |
135 | } | 133 | } |
136 | 134 | ||