diff options
94 files changed, 1368 insertions, 2768 deletions
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl index 0f4a4b6321e4..4215f69ce7e6 100644 --- a/Documentation/DocBook/genericirq.tmpl +++ b/Documentation/DocBook/genericirq.tmpl | |||
@@ -303,10 +303,10 @@ desc->status |= running; | |||
303 | do { | 303 | do { |
304 | if (desc->status & masked) | 304 | if (desc->status & masked) |
305 | desc->chip->enable(); | 305 | desc->chip->enable(); |
306 | desc-status &= ~pending; | 306 | desc->status &= ~pending; |
307 | handle_IRQ_event(desc->action); | 307 | handle_IRQ_event(desc->action); |
308 | } while (status & pending); | 308 | } while (status & pending); |
309 | desc-status &= ~running; | 309 | desc->status &= ~running; |
310 | desc->chip->end(); | 310 | desc->chip->end(); |
311 | </programlisting> | 311 | </programlisting> |
312 | </para> | 312 | </para> |
diff --git a/MAINTAINERS b/MAINTAINERS index 7f7c7db174cc..db38a4d28039 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1277,6 +1277,12 @@ L: linux-nvidia@lists.surfsouth.com | |||
1277 | W: http://drama.obuda.kando.hu/~fero/cgi-bin/hgafb.shtml | 1277 | W: http://drama.obuda.kando.hu/~fero/cgi-bin/hgafb.shtml |
1278 | S: Maintained | 1278 | S: Maintained |
1279 | 1279 | ||
1280 | HID CORE LAYER | ||
1281 | P: Jiri Kosina | ||
1282 | M: jkosina@suse.cz | ||
1283 | L: linux-input@atrey.karlin.mff.cuni.cz | ||
1284 | S: Maintained | ||
1285 | |||
1280 | HIGH-SPEED SCC DRIVER FOR AX.25 | 1286 | HIGH-SPEED SCC DRIVER FOR AX.25 |
1281 | P: Klaus Kudielka | 1287 | P: Klaus Kudielka |
1282 | M: klaus.kudielka@ieee.org | 1288 | M: klaus.kudielka@ieee.org |
@@ -496,11 +496,6 @@ else | |||
496 | CFLAGS += -fomit-frame-pointer | 496 | CFLAGS += -fomit-frame-pointer |
497 | endif | 497 | endif |
498 | 498 | ||
499 | ifdef CONFIG_UNWIND_INFO | ||
500 | CFLAGS += -fasynchronous-unwind-tables | ||
501 | LDFLAGS_vmlinux += --eh-frame-hdr | ||
502 | endif | ||
503 | |||
504 | ifdef CONFIG_DEBUG_INFO | 499 | ifdef CONFIG_DEBUG_INFO |
505 | CFLAGS += -g | 500 | CFLAGS += -g |
506 | endif | 501 | endif |
diff --git a/arch/i386/defconfig b/arch/i386/defconfig index 3265208e5899..e075ff05c46d 100644 --- a/arch/i386/defconfig +++ b/arch/i386/defconfig | |||
@@ -1493,8 +1493,6 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
1493 | # CONFIG_DEBUG_VM is not set | 1493 | # CONFIG_DEBUG_VM is not set |
1494 | # CONFIG_DEBUG_LIST is not set | 1494 | # CONFIG_DEBUG_LIST is not set |
1495 | # CONFIG_FRAME_POINTER is not set | 1495 | # CONFIG_FRAME_POINTER is not set |
1496 | CONFIG_UNWIND_INFO=y | ||
1497 | CONFIG_STACK_UNWIND=y | ||
1498 | # CONFIG_FORCED_INLINING is not set | 1496 | # CONFIG_FORCED_INLINING is not set |
1499 | # CONFIG_HEADERS_CHECK is not set | 1497 | # CONFIG_HEADERS_CHECK is not set |
1500 | # CONFIG_RCU_TORTURE_TEST is not set | 1498 | # CONFIG_RCU_TORTURE_TEST is not set |
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index 18f4715c655d..b735458c6e3a 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -126,27 +126,6 @@ static unsigned extract_freq(u32 val, struct acpi_cpufreq_data *data) | |||
126 | } | 126 | } |
127 | } | 127 | } |
128 | 128 | ||
129 | static void wrport(u16 port, u8 bit_width, u32 value) | ||
130 | { | ||
131 | if (bit_width <= 8) | ||
132 | outb(value, port); | ||
133 | else if (bit_width <= 16) | ||
134 | outw(value, port); | ||
135 | else if (bit_width <= 32) | ||
136 | outl(value, port); | ||
137 | } | ||
138 | |||
139 | static void rdport(u16 port, u8 bit_width, u32 * ret) | ||
140 | { | ||
141 | *ret = 0; | ||
142 | if (bit_width <= 8) | ||
143 | *ret = inb(port); | ||
144 | else if (bit_width <= 16) | ||
145 | *ret = inw(port); | ||
146 | else if (bit_width <= 32) | ||
147 | *ret = inl(port); | ||
148 | } | ||
149 | |||
150 | struct msr_addr { | 129 | struct msr_addr { |
151 | u32 reg; | 130 | u32 reg; |
152 | }; | 131 | }; |
@@ -177,7 +156,9 @@ static void do_drv_read(struct drv_cmd *cmd) | |||
177 | rdmsr(cmd->addr.msr.reg, cmd->val, h); | 156 | rdmsr(cmd->addr.msr.reg, cmd->val, h); |
178 | break; | 157 | break; |
179 | case SYSTEM_IO_CAPABLE: | 158 | case SYSTEM_IO_CAPABLE: |
180 | rdport(cmd->addr.io.port, cmd->addr.io.bit_width, &cmd->val); | 159 | acpi_os_read_port((acpi_io_address)cmd->addr.io.port, |
160 | &cmd->val, | ||
161 | (u32)cmd->addr.io.bit_width); | ||
181 | break; | 162 | break; |
182 | default: | 163 | default: |
183 | break; | 164 | break; |
@@ -193,7 +174,9 @@ static void do_drv_write(struct drv_cmd *cmd) | |||
193 | wrmsr(cmd->addr.msr.reg, cmd->val, h); | 174 | wrmsr(cmd->addr.msr.reg, cmd->val, h); |
194 | break; | 175 | break; |
195 | case SYSTEM_IO_CAPABLE: | 176 | case SYSTEM_IO_CAPABLE: |
196 | wrport(cmd->addr.io.port, cmd->addr.io.bit_width, cmd->val); | 177 | acpi_os_write_port((acpi_io_address)cmd->addr.io.port, |
178 | cmd->val, | ||
179 | (u32)cmd->addr.io.bit_width); | ||
197 | break; | 180 | break; |
198 | default: | 181 | default: |
199 | break; | 182 | break; |
@@ -699,14 +682,14 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
699 | if (result) | 682 | if (result) |
700 | goto err_freqfree; | 683 | goto err_freqfree; |
701 | 684 | ||
702 | switch (data->cpu_feature) { | 685 | switch (perf->control_register.space_id) { |
703 | case ACPI_ADR_SPACE_SYSTEM_IO: | 686 | case ACPI_ADR_SPACE_SYSTEM_IO: |
704 | /* Current speed is unknown and not detectable by IO port */ | 687 | /* Current speed is unknown and not detectable by IO port */ |
705 | policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu); | 688 | policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu); |
706 | break; | 689 | break; |
707 | case ACPI_ADR_SPACE_FIXED_HARDWARE: | 690 | case ACPI_ADR_SPACE_FIXED_HARDWARE: |
708 | acpi_cpufreq_driver.get = get_cur_freq_on_cpu; | 691 | acpi_cpufreq_driver.get = get_cur_freq_on_cpu; |
709 | get_cur_freq_on_cpu(cpu); | 692 | policy->cur = get_cur_freq_on_cpu(cpu); |
710 | break; | 693 | break; |
711 | default: | 694 | default: |
712 | break; | 695 | break; |
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index c548daad3476..6d9c97a690fd 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c | |||
@@ -787,8 +787,10 @@ static int __init longhaul_init(void) | |||
787 | switch (c->x86_model) { | 787 | switch (c->x86_model) { |
788 | case 6 ... 9: | 788 | case 6 ... 9: |
789 | return cpufreq_register_driver(&longhaul_driver); | 789 | return cpufreq_register_driver(&longhaul_driver); |
790 | case 10: | ||
791 | printk(KERN_ERR PFX "Use acpi-cpufreq driver for VIA C7\n"); | ||
790 | default: | 792 | default: |
791 | printk (KERN_INFO PFX "Unknown VIA CPU. Contact davej@codemonkey.org.uk\n"); | 793 | ;; |
792 | } | 794 | } |
793 | 795 | ||
794 | return -ENODEV; | 796 | return -ENODEV; |
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index de34b7fed3c1..06461b8b715d 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S | |||
@@ -979,38 +979,6 @@ ENTRY(spurious_interrupt_bug) | |||
979 | jmp error_code | 979 | jmp error_code |
980 | CFI_ENDPROC | 980 | CFI_ENDPROC |
981 | 981 | ||
982 | #ifdef CONFIG_STACK_UNWIND | ||
983 | ENTRY(arch_unwind_init_running) | ||
984 | CFI_STARTPROC | ||
985 | movl 4(%esp), %edx | ||
986 | movl (%esp), %ecx | ||
987 | leal 4(%esp), %eax | ||
988 | movl %ebx, PT_EBX(%edx) | ||
989 | xorl %ebx, %ebx | ||
990 | movl %ebx, PT_ECX(%edx) | ||
991 | movl %ebx, PT_EDX(%edx) | ||
992 | movl %esi, PT_ESI(%edx) | ||
993 | movl %edi, PT_EDI(%edx) | ||
994 | movl %ebp, PT_EBP(%edx) | ||
995 | movl %ebx, PT_EAX(%edx) | ||
996 | movl $__USER_DS, PT_DS(%edx) | ||
997 | movl $__USER_DS, PT_ES(%edx) | ||
998 | movl $0, PT_GS(%edx) | ||
999 | movl %ebx, PT_ORIG_EAX(%edx) | ||
1000 | movl %ecx, PT_EIP(%edx) | ||
1001 | movl 12(%esp), %ecx | ||
1002 | movl $__KERNEL_CS, PT_CS(%edx) | ||
1003 | movl %ebx, PT_EFLAGS(%edx) | ||
1004 | movl %eax, PT_OLDESP(%edx) | ||
1005 | movl 8(%esp), %eax | ||
1006 | movl %ecx, 8(%esp) | ||
1007 | movl PT_EBX(%edx), %ebx | ||
1008 | movl $__KERNEL_DS, PT_OLDSS(%edx) | ||
1009 | jmpl *%eax | ||
1010 | CFI_ENDPROC | ||
1011 | ENDPROC(arch_unwind_init_running) | ||
1012 | #endif | ||
1013 | |||
1014 | ENTRY(kernel_thread_helper) | 982 | ENTRY(kernel_thread_helper) |
1015 | pushl $0 # fake return address for unwinder | 983 | pushl $0 # fake return address for unwinder |
1016 | CFI_STARTPROC | 984 | CFI_STARTPROC |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 2b30dbf8d117..0efad8aeb41a 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -94,11 +94,6 @@ asmlinkage void spurious_interrupt_bug(void); | |||
94 | asmlinkage void machine_check(void); | 94 | asmlinkage void machine_check(void); |
95 | 95 | ||
96 | int kstack_depth_to_print = 24; | 96 | int kstack_depth_to_print = 24; |
97 | #ifdef CONFIG_STACK_UNWIND | ||
98 | static int call_trace = 1; | ||
99 | #else | ||
100 | #define call_trace (-1) | ||
101 | #endif | ||
102 | ATOMIC_NOTIFIER_HEAD(i386die_chain); | 97 | ATOMIC_NOTIFIER_HEAD(i386die_chain); |
103 | 98 | ||
104 | int register_die_notifier(struct notifier_block *nb) | 99 | int register_die_notifier(struct notifier_block *nb) |
@@ -152,33 +147,6 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo, | |||
152 | return ebp; | 147 | return ebp; |
153 | } | 148 | } |
154 | 149 | ||
155 | struct ops_and_data { | ||
156 | struct stacktrace_ops *ops; | ||
157 | void *data; | ||
158 | }; | ||
159 | |||
160 | static asmlinkage int | ||
161 | dump_trace_unwind(struct unwind_frame_info *info, void *data) | ||
162 | { | ||
163 | struct ops_and_data *oad = (struct ops_and_data *)data; | ||
164 | int n = 0; | ||
165 | unsigned long sp = UNW_SP(info); | ||
166 | |||
167 | if (arch_unw_user_mode(info)) | ||
168 | return -1; | ||
169 | while (unwind(info) == 0 && UNW_PC(info)) { | ||
170 | n++; | ||
171 | oad->ops->address(oad->data, UNW_PC(info)); | ||
172 | if (arch_unw_user_mode(info)) | ||
173 | break; | ||
174 | if ((sp & ~(PAGE_SIZE - 1)) == (UNW_SP(info) & ~(PAGE_SIZE - 1)) | ||
175 | && sp > UNW_SP(info)) | ||
176 | break; | ||
177 | sp = UNW_SP(info); | ||
178 | } | ||
179 | return n; | ||
180 | } | ||
181 | |||
182 | #define MSG(msg) ops->warning(data, msg) | 150 | #define MSG(msg) ops->warning(data, msg) |
183 | 151 | ||
184 | void dump_trace(struct task_struct *task, struct pt_regs *regs, | 152 | void dump_trace(struct task_struct *task, struct pt_regs *regs, |
@@ -190,41 +158,6 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs, | |||
190 | if (!task) | 158 | if (!task) |
191 | task = current; | 159 | task = current; |
192 | 160 | ||
193 | if (call_trace >= 0) { | ||
194 | int unw_ret = 0; | ||
195 | struct unwind_frame_info info; | ||
196 | struct ops_and_data oad = { .ops = ops, .data = data }; | ||
197 | |||
198 | if (regs) { | ||
199 | if (unwind_init_frame_info(&info, task, regs) == 0) | ||
200 | unw_ret = dump_trace_unwind(&info, &oad); | ||
201 | } else if (task == current) | ||
202 | unw_ret = unwind_init_running(&info, dump_trace_unwind, | ||
203 | &oad); | ||
204 | else { | ||
205 | if (unwind_init_blocked(&info, task) == 0) | ||
206 | unw_ret = dump_trace_unwind(&info, &oad); | ||
207 | } | ||
208 | if (unw_ret > 0) { | ||
209 | if (call_trace == 1 && !arch_unw_user_mode(&info)) { | ||
210 | ops->warning_symbol(data, | ||
211 | "DWARF2 unwinder stuck at %s", | ||
212 | UNW_PC(&info)); | ||
213 | if (UNW_SP(&info) >= PAGE_OFFSET) { | ||
214 | MSG("Leftover inexact backtrace:"); | ||
215 | stack = (void *)UNW_SP(&info); | ||
216 | if (!stack) | ||
217 | return; | ||
218 | ebp = UNW_FP(&info); | ||
219 | } else | ||
220 | MSG("Full inexact backtrace again:"); | ||
221 | } else if (call_trace >= 1) | ||
222 | return; | ||
223 | else | ||
224 | MSG("Full inexact backtrace again:"); | ||
225 | } else | ||
226 | MSG("Inexact backtrace:"); | ||
227 | } | ||
228 | if (!stack) { | 161 | if (!stack) { |
229 | unsigned long dummy; | 162 | unsigned long dummy; |
230 | stack = &dummy; | 163 | stack = &dummy; |
@@ -1258,19 +1191,3 @@ static int __init kstack_setup(char *s) | |||
1258 | return 1; | 1191 | return 1; |
1259 | } | 1192 | } |
1260 | __setup("kstack=", kstack_setup); | 1193 | __setup("kstack=", kstack_setup); |
1261 | |||
1262 | #ifdef CONFIG_STACK_UNWIND | ||
1263 | static int __init call_trace_setup(char *s) | ||
1264 | { | ||
1265 | if (strcmp(s, "old") == 0) | ||
1266 | call_trace = -1; | ||
1267 | else if (strcmp(s, "both") == 0) | ||
1268 | call_trace = 0; | ||
1269 | else if (strcmp(s, "newfallback") == 0) | ||
1270 | call_trace = 1; | ||
1271 | else if (strcmp(s, "new") == 2) | ||
1272 | call_trace = 2; | ||
1273 | return 1; | ||
1274 | } | ||
1275 | __setup("call_trace=", call_trace_setup); | ||
1276 | #endif | ||
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index a6ec919ba83f..5368cf4a350e 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,14 +1,15 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.19-rc2 | 3 | # Linux kernel version: 2.6.20-rc1 |
4 | # Wed Oct 18 17:11:10 2006 | 4 | # Fri Dec 15 16:52:28 2006 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_LOCKDEP_SUPPORT=y | 7 | CONFIG_LOCKDEP_SUPPORT=y |
8 | CONFIG_STACKTRACE_SUPPORT=y | 8 | CONFIG_STACKTRACE_SUPPORT=y |
9 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 9 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
10 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
11 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
10 | CONFIG_GENERIC_HWEIGHT=y | 12 | CONFIG_GENERIC_HWEIGHT=y |
11 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
12 | CONFIG_GENERIC_TIME=y | 13 | CONFIG_GENERIC_TIME=y |
13 | CONFIG_S390=y | 14 | CONFIG_S390=y |
14 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 15 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
@@ -37,12 +38,13 @@ CONFIG_AUDIT=y | |||
37 | CONFIG_IKCONFIG=y | 38 | CONFIG_IKCONFIG=y |
38 | CONFIG_IKCONFIG_PROC=y | 39 | CONFIG_IKCONFIG_PROC=y |
39 | # CONFIG_CPUSETS is not set | 40 | # CONFIG_CPUSETS is not set |
41 | CONFIG_SYSFS_DEPRECATED=y | ||
40 | # CONFIG_RELAY is not set | 42 | # CONFIG_RELAY is not set |
41 | CONFIG_INITRAMFS_SOURCE="" | 43 | CONFIG_INITRAMFS_SOURCE="" |
42 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
43 | CONFIG_SYSCTL=y | 45 | CONFIG_SYSCTL=y |
44 | # CONFIG_EMBEDDED is not set | 46 | # CONFIG_EMBEDDED is not set |
45 | # CONFIG_SYSCTL_SYSCALL is not set | 47 | CONFIG_SYSCTL_SYSCALL=y |
46 | CONFIG_KALLSYMS=y | 48 | CONFIG_KALLSYMS=y |
47 | # CONFIG_KALLSYMS_ALL is not set | 49 | # CONFIG_KALLSYMS_ALL is not set |
48 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 50 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -119,6 +121,7 @@ CONFIG_PACK_STACK=y | |||
119 | CONFIG_CHECK_STACK=y | 121 | CONFIG_CHECK_STACK=y |
120 | CONFIG_STACK_GUARD=256 | 122 | CONFIG_STACK_GUARD=256 |
121 | # CONFIG_WARN_STACK is not set | 123 | # CONFIG_WARN_STACK is not set |
124 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
122 | CONFIG_SELECT_MEMORY_MODEL=y | 125 | CONFIG_SELECT_MEMORY_MODEL=y |
123 | CONFIG_FLATMEM_MANUAL=y | 126 | CONFIG_FLATMEM_MANUAL=y |
124 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 127 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
@@ -128,6 +131,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y | |||
128 | # CONFIG_SPARSEMEM_STATIC is not set | 131 | # CONFIG_SPARSEMEM_STATIC is not set |
129 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 132 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
130 | CONFIG_RESOURCES_64BIT=y | 133 | CONFIG_RESOURCES_64BIT=y |
134 | CONFIG_HOLES_IN_ZONE=y | ||
131 | 135 | ||
132 | # | 136 | # |
133 | # I/O subsystem configuration | 137 | # I/O subsystem configuration |
@@ -196,6 +200,7 @@ CONFIG_INET_TCP_DIAG=y | |||
196 | # CONFIG_TCP_CONG_ADVANCED is not set | 200 | # CONFIG_TCP_CONG_ADVANCED is not set |
197 | CONFIG_TCP_CONG_CUBIC=y | 201 | CONFIG_TCP_CONG_CUBIC=y |
198 | CONFIG_DEFAULT_TCP_CONG="cubic" | 202 | CONFIG_DEFAULT_TCP_CONG="cubic" |
203 | # CONFIG_TCP_MD5SIG is not set | ||
199 | CONFIG_IPV6=y | 204 | CONFIG_IPV6=y |
200 | # CONFIG_IPV6_PRIVACY is not set | 205 | # CONFIG_IPV6_PRIVACY is not set |
201 | # CONFIG_IPV6_ROUTER_PREF is not set | 206 | # CONFIG_IPV6_ROUTER_PREF is not set |
@@ -211,7 +216,6 @@ CONFIG_INET6_XFRM_MODE_BEET=y | |||
211 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | 216 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set |
212 | CONFIG_IPV6_SIT=y | 217 | CONFIG_IPV6_SIT=y |
213 | # CONFIG_IPV6_TUNNEL is not set | 218 | # CONFIG_IPV6_TUNNEL is not set |
214 | # CONFIG_IPV6_SUBTREES is not set | ||
215 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | 219 | # CONFIG_IPV6_MULTIPLE_TABLES is not set |
216 | # CONFIG_NETWORK_SECMARK is not set | 220 | # CONFIG_NETWORK_SECMARK is not set |
217 | # CONFIG_NETFILTER is not set | 221 | # CONFIG_NETFILTER is not set |
@@ -246,6 +250,7 @@ CONFIG_IPV6_SIT=y | |||
246 | # QoS and/or fair queueing | 250 | # QoS and/or fair queueing |
247 | # | 251 | # |
248 | CONFIG_NET_SCHED=y | 252 | CONFIG_NET_SCHED=y |
253 | CONFIG_NET_SCH_FIFO=y | ||
249 | CONFIG_NET_SCH_CLK_JIFFIES=y | 254 | CONFIG_NET_SCH_CLK_JIFFIES=y |
250 | # CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set | 255 | # CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set |
251 | # CONFIG_NET_SCH_CLK_CPU is not set | 256 | # CONFIG_NET_SCH_CLK_CPU is not set |
@@ -277,6 +282,7 @@ CONFIG_NET_CLS_ROUTE=y | |||
277 | CONFIG_NET_CLS_FW=m | 282 | CONFIG_NET_CLS_FW=m |
278 | CONFIG_NET_CLS_U32=m | 283 | CONFIG_NET_CLS_U32=m |
279 | # CONFIG_CLS_U32_PERF is not set | 284 | # CONFIG_CLS_U32_PERF is not set |
285 | CONFIG_CLS_U32_MARK=y | ||
280 | CONFIG_NET_CLS_RSVP=m | 286 | CONFIG_NET_CLS_RSVP=m |
281 | CONFIG_NET_CLS_RSVP6=m | 287 | CONFIG_NET_CLS_RSVP6=m |
282 | # CONFIG_NET_EMATCH is not set | 288 | # CONFIG_NET_EMATCH is not set |
@@ -315,6 +321,7 @@ CONFIG_SYS_HYPERVISOR=y | |||
315 | # | 321 | # |
316 | # CONFIG_RAID_ATTRS is not set | 322 | # CONFIG_RAID_ATTRS is not set |
317 | CONFIG_SCSI=y | 323 | CONFIG_SCSI=y |
324 | # CONFIG_SCSI_TGT is not set | ||
318 | CONFIG_SCSI_NETLINK=y | 325 | CONFIG_SCSI_NETLINK=y |
319 | CONFIG_SCSI_PROC_FS=y | 326 | CONFIG_SCSI_PROC_FS=y |
320 | 327 | ||
@@ -335,6 +342,7 @@ CONFIG_CHR_DEV_SG=y | |||
335 | CONFIG_SCSI_MULTI_LUN=y | 342 | CONFIG_SCSI_MULTI_LUN=y |
336 | CONFIG_SCSI_CONSTANTS=y | 343 | CONFIG_SCSI_CONSTANTS=y |
337 | CONFIG_SCSI_LOGGING=y | 344 | CONFIG_SCSI_LOGGING=y |
345 | CONFIG_SCSI_SCAN_ASYNC=y | ||
338 | 346 | ||
339 | # | 347 | # |
340 | # SCSI Transports | 348 | # SCSI Transports |
@@ -546,6 +554,7 @@ CONFIG_DNOTIFY=y | |||
546 | # CONFIG_AUTOFS_FS is not set | 554 | # CONFIG_AUTOFS_FS is not set |
547 | # CONFIG_AUTOFS4_FS is not set | 555 | # CONFIG_AUTOFS4_FS is not set |
548 | # CONFIG_FUSE_FS is not set | 556 | # CONFIG_FUSE_FS is not set |
557 | CONFIG_GENERIC_ACL=y | ||
549 | 558 | ||
550 | # | 559 | # |
551 | # CD-ROM/DVD Filesystems | 560 | # CD-ROM/DVD Filesystems |
@@ -571,7 +580,7 @@ CONFIG_TMPFS=y | |||
571 | CONFIG_TMPFS_POSIX_ACL=y | 580 | CONFIG_TMPFS_POSIX_ACL=y |
572 | # CONFIG_HUGETLB_PAGE is not set | 581 | # CONFIG_HUGETLB_PAGE is not set |
573 | CONFIG_RAMFS=y | 582 | CONFIG_RAMFS=y |
574 | # CONFIG_CONFIGFS_FS is not set | 583 | CONFIG_CONFIGFS_FS=m |
575 | 584 | ||
576 | # | 585 | # |
577 | # Miscellaneous filesystems | 586 | # Miscellaneous filesystems |
@@ -616,7 +625,6 @@ CONFIG_SUNRPC=y | |||
616 | # CONFIG_CODA_FS is not set | 625 | # CONFIG_CODA_FS is not set |
617 | # CONFIG_AFS_FS is not set | 626 | # CONFIG_AFS_FS is not set |
618 | # CONFIG_9P_FS is not set | 627 | # CONFIG_9P_FS is not set |
619 | CONFIG_GENERIC_ACL=y | ||
620 | 628 | ||
621 | # | 629 | # |
622 | # Partition Types | 630 | # Partition Types |
@@ -646,6 +654,14 @@ CONFIG_MSDOS_PARTITION=y | |||
646 | # CONFIG_NLS is not set | 654 | # CONFIG_NLS is not set |
647 | 655 | ||
648 | # | 656 | # |
657 | # Distributed Lock Manager | ||
658 | # | ||
659 | CONFIG_DLM=m | ||
660 | CONFIG_DLM_TCP=y | ||
661 | # CONFIG_DLM_SCTP is not set | ||
662 | # CONFIG_DLM_DEBUG is not set | ||
663 | |||
664 | # | ||
649 | # Instrumentation Support | 665 | # Instrumentation Support |
650 | # | 666 | # |
651 | 667 | ||
@@ -663,6 +679,8 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y | |||
663 | CONFIG_ENABLE_MUST_CHECK=y | 679 | CONFIG_ENABLE_MUST_CHECK=y |
664 | CONFIG_MAGIC_SYSRQ=y | 680 | CONFIG_MAGIC_SYSRQ=y |
665 | # CONFIG_UNUSED_SYMBOLS is not set | 681 | # CONFIG_UNUSED_SYMBOLS is not set |
682 | CONFIG_DEBUG_FS=y | ||
683 | CONFIG_HEADERS_CHECK=y | ||
666 | CONFIG_DEBUG_KERNEL=y | 684 | CONFIG_DEBUG_KERNEL=y |
667 | CONFIG_LOG_BUF_SHIFT=17 | 685 | CONFIG_LOG_BUF_SHIFT=17 |
668 | # CONFIG_SCHEDSTATS is not set | 686 | # CONFIG_SCHEDSTATS is not set |
@@ -679,13 +697,11 @@ CONFIG_DEBUG_SPINLOCK_SLEEP=y | |||
679 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 697 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
680 | # CONFIG_DEBUG_KOBJECT is not set | 698 | # CONFIG_DEBUG_KOBJECT is not set |
681 | # CONFIG_DEBUG_INFO is not set | 699 | # CONFIG_DEBUG_INFO is not set |
682 | CONFIG_DEBUG_FS=y | ||
683 | # CONFIG_DEBUG_VM is not set | 700 | # CONFIG_DEBUG_VM is not set |
684 | # CONFIG_DEBUG_LIST is not set | 701 | # CONFIG_DEBUG_LIST is not set |
685 | # CONFIG_FRAME_POINTER is not set | 702 | # CONFIG_FRAME_POINTER is not set |
686 | # CONFIG_UNWIND_INFO is not set | 703 | # CONFIG_UNWIND_INFO is not set |
687 | CONFIG_FORCED_INLINING=y | 704 | CONFIG_FORCED_INLINING=y |
688 | CONFIG_HEADERS_CHECK=y | ||
689 | # CONFIG_RCU_TORTURE_TEST is not set | 705 | # CONFIG_RCU_TORTURE_TEST is not set |
690 | # CONFIG_LKDTM is not set | 706 | # CONFIG_LKDTM is not set |
691 | 707 | ||
@@ -699,10 +715,11 @@ CONFIG_HEADERS_CHECK=y | |||
699 | # Cryptographic options | 715 | # Cryptographic options |
700 | # | 716 | # |
701 | CONFIG_CRYPTO=y | 717 | CONFIG_CRYPTO=y |
702 | CONFIG_CRYPTO_ALGAPI=m | 718 | CONFIG_CRYPTO_ALGAPI=y |
703 | CONFIG_CRYPTO_BLKCIPHER=m | 719 | CONFIG_CRYPTO_BLKCIPHER=y |
704 | CONFIG_CRYPTO_MANAGER=m | 720 | CONFIG_CRYPTO_MANAGER=y |
705 | # CONFIG_CRYPTO_HMAC is not set | 721 | # CONFIG_CRYPTO_HMAC is not set |
722 | # CONFIG_CRYPTO_XCBC is not set | ||
706 | # CONFIG_CRYPTO_NULL is not set | 723 | # CONFIG_CRYPTO_NULL is not set |
707 | # CONFIG_CRYPTO_MD4 is not set | 724 | # CONFIG_CRYPTO_MD4 is not set |
708 | # CONFIG_CRYPTO_MD5 is not set | 725 | # CONFIG_CRYPTO_MD5 is not set |
@@ -713,8 +730,10 @@ CONFIG_CRYPTO_MANAGER=m | |||
713 | # CONFIG_CRYPTO_SHA512 is not set | 730 | # CONFIG_CRYPTO_SHA512 is not set |
714 | # CONFIG_CRYPTO_WP512 is not set | 731 | # CONFIG_CRYPTO_WP512 is not set |
715 | # CONFIG_CRYPTO_TGR192 is not set | 732 | # CONFIG_CRYPTO_TGR192 is not set |
733 | # CONFIG_CRYPTO_GF128MUL is not set | ||
716 | CONFIG_CRYPTO_ECB=m | 734 | CONFIG_CRYPTO_ECB=m |
717 | CONFIG_CRYPTO_CBC=m | 735 | CONFIG_CRYPTO_CBC=y |
736 | # CONFIG_CRYPTO_LRW is not set | ||
718 | # CONFIG_CRYPTO_DES is not set | 737 | # CONFIG_CRYPTO_DES is not set |
719 | # CONFIG_CRYPTO_DES_S390 is not set | 738 | # CONFIG_CRYPTO_DES_S390 is not set |
720 | # CONFIG_CRYPTO_BLOWFISH is not set | 739 | # CONFIG_CRYPTO_BLOWFISH is not set |
@@ -740,8 +759,10 @@ CONFIG_CRYPTO_CBC=m | |||
740 | # | 759 | # |
741 | # Library routines | 760 | # Library routines |
742 | # | 761 | # |
762 | CONFIG_BITREVERSE=m | ||
743 | # CONFIG_CRC_CCITT is not set | 763 | # CONFIG_CRC_CCITT is not set |
744 | # CONFIG_CRC16 is not set | 764 | # CONFIG_CRC16 is not set |
745 | CONFIG_CRC32=m | 765 | CONFIG_CRC32=m |
746 | # CONFIG_LIBCRC32C is not set | 766 | # CONFIG_LIBCRC32C is not set |
747 | CONFIG_PLIST=y | 767 | CONFIG_PLIST=y |
768 | CONFIG_IOMAP_COPY=y | ||
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c index 443fa377d9ff..2782cf9da5b4 100644 --- a/arch/s390/hypfs/hypfs_diag.c +++ b/arch/s390/hypfs/hypfs_diag.c | |||
@@ -379,7 +379,7 @@ static void *diag204_alloc_vbuf(int pages) | |||
379 | static void *diag204_alloc_rbuf(void) | 379 | static void *diag204_alloc_rbuf(void) |
380 | { | 380 | { |
381 | diag204_buf = (void*)__get_free_pages(GFP_KERNEL,0); | 381 | diag204_buf = (void*)__get_free_pages(GFP_KERNEL,0); |
382 | if (diag204_buf) | 382 | if (!diag204_buf) |
383 | return ERR_PTR(-ENOMEM); | 383 | return ERR_PTR(-ENOMEM); |
384 | diag204_buf_pages = 1; | 384 | diag204_buf_pages = 1; |
385 | return diag204_buf; | 385 | return diag204_buf; |
@@ -521,7 +521,7 @@ __init int hypfs_diag_init(void) | |||
521 | } | 521 | } |
522 | rc = diag224_get_name_table(); | 522 | rc = diag224_get_name_table(); |
523 | if (rc) { | 523 | if (rc) { |
524 | diag224_delete_name_table(); | 524 | diag204_free_buffer(); |
525 | printk(KERN_ERR "hypfs: could not get name table.\n"); | 525 | printk(KERN_ERR "hypfs: could not get name table.\n"); |
526 | } | 526 | } |
527 | return rc; | 527 | return rc; |
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index a36bea1188d9..9e9972e8a52b 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -609,42 +609,12 @@ static ssize_t on_panic_store(struct subsystem *subsys, const char *buf, | |||
609 | static struct subsys_attribute on_panic_attr = | 609 | static struct subsys_attribute on_panic_attr = |
610 | __ATTR(on_panic, 0644, on_panic_show, on_panic_store); | 610 | __ATTR(on_panic, 0644, on_panic_show, on_panic_store); |
611 | 611 | ||
612 | static void print_fcp_block(struct ipl_parameter_block *fcp_block) | ||
613 | { | ||
614 | printk(KERN_EMERG "wwpn: %016llx\n", | ||
615 | (unsigned long long)fcp_block->ipl_info.fcp.wwpn); | ||
616 | printk(KERN_EMERG "lun: %016llx\n", | ||
617 | (unsigned long long)fcp_block->ipl_info.fcp.lun); | ||
618 | printk(KERN_EMERG "bootprog: %lld\n", | ||
619 | (unsigned long long)fcp_block->ipl_info.fcp.bootprog); | ||
620 | printk(KERN_EMERG "br_lba: %lld\n", | ||
621 | (unsigned long long)fcp_block->ipl_info.fcp.br_lba); | ||
622 | printk(KERN_EMERG "device: %llx\n", | ||
623 | (unsigned long long)fcp_block->ipl_info.fcp.devno); | ||
624 | printk(KERN_EMERG "opt: %x\n", fcp_block->ipl_info.fcp.opt); | ||
625 | } | ||
626 | |||
627 | void do_reipl(void) | 612 | void do_reipl(void) |
628 | { | 613 | { |
629 | struct ccw_dev_id devid; | 614 | struct ccw_dev_id devid; |
630 | static char buf[100]; | 615 | static char buf[100]; |
631 | char loadparm[LOADPARM_LEN + 1]; | 616 | char loadparm[LOADPARM_LEN + 1]; |
632 | 617 | ||
633 | switch (reipl_type) { | ||
634 | case IPL_TYPE_CCW: | ||
635 | reipl_get_ascii_loadparm(loadparm); | ||
636 | printk(KERN_EMERG "reboot on ccw device: 0.0.%04x\n", | ||
637 | reipl_block_ccw->ipl_info.ccw.devno); | ||
638 | printk(KERN_EMERG "loadparm = '%s'\n", loadparm); | ||
639 | break; | ||
640 | case IPL_TYPE_FCP: | ||
641 | printk(KERN_EMERG "reboot on fcp device:\n"); | ||
642 | print_fcp_block(reipl_block_fcp); | ||
643 | break; | ||
644 | default: | ||
645 | break; | ||
646 | } | ||
647 | |||
648 | switch (reipl_method) { | 618 | switch (reipl_method) { |
649 | case IPL_METHOD_CCW_CIO: | 619 | case IPL_METHOD_CCW_CIO: |
650 | devid.devno = reipl_block_ccw->ipl_info.ccw.devno; | 620 | devid.devno = reipl_block_ccw->ipl_info.ccw.devno; |
@@ -654,6 +624,7 @@ void do_reipl(void) | |||
654 | reipl_ccw_dev(&devid); | 624 | reipl_ccw_dev(&devid); |
655 | break; | 625 | break; |
656 | case IPL_METHOD_CCW_VM: | 626 | case IPL_METHOD_CCW_VM: |
627 | reipl_get_ascii_loadparm(loadparm); | ||
657 | if (strlen(loadparm) == 0) | 628 | if (strlen(loadparm) == 0) |
658 | sprintf(buf, "IPL %X", | 629 | sprintf(buf, "IPL %X", |
659 | reipl_block_ccw->ipl_info.ccw.devno); | 630 | reipl_block_ccw->ipl_info.ccw.devno); |
@@ -683,7 +654,6 @@ void do_reipl(void) | |||
683 | diag308(DIAG308_IPL, NULL); | 654 | diag308(DIAG308_IPL, NULL); |
684 | break; | 655 | break; |
685 | } | 656 | } |
686 | printk(KERN_EMERG "reboot failed!\n"); | ||
687 | signal_processor(smp_processor_id(), sigp_stop_and_store_status); | 657 | signal_processor(smp_processor_id(), sigp_stop_and_store_status); |
688 | } | 658 | } |
689 | 659 | ||
@@ -692,19 +662,6 @@ static void do_dump(void) | |||
692 | struct ccw_dev_id devid; | 662 | struct ccw_dev_id devid; |
693 | static char buf[100]; | 663 | static char buf[100]; |
694 | 664 | ||
695 | switch (dump_type) { | ||
696 | case IPL_TYPE_CCW: | ||
697 | printk(KERN_EMERG "Automatic dump on ccw device: 0.0.%04x\n", | ||
698 | dump_block_ccw->ipl_info.ccw.devno); | ||
699 | break; | ||
700 | case IPL_TYPE_FCP: | ||
701 | printk(KERN_EMERG "Automatic dump on fcp device:\n"); | ||
702 | print_fcp_block(dump_block_fcp); | ||
703 | break; | ||
704 | default: | ||
705 | return; | ||
706 | } | ||
707 | |||
708 | switch (dump_method) { | 665 | switch (dump_method) { |
709 | case IPL_METHOD_CCW_CIO: | 666 | case IPL_METHOD_CCW_CIO: |
710 | smp_send_stop(); | 667 | smp_send_stop(); |
@@ -1037,15 +994,21 @@ static void do_reset_calls(void) | |||
1037 | } | 994 | } |
1038 | 995 | ||
1039 | extern void reset_mcck_handler(void); | 996 | extern void reset_mcck_handler(void); |
997 | extern void reset_pgm_handler(void); | ||
998 | extern __u32 dump_prefix_page; | ||
1040 | 999 | ||
1041 | void s390_reset_system(void) | 1000 | void s390_reset_system(void) |
1042 | { | 1001 | { |
1043 | struct _lowcore *lc; | 1002 | struct _lowcore *lc; |
1044 | 1003 | ||
1045 | /* Stack for interrupt/machine check handler */ | ||
1046 | lc = (struct _lowcore *)(unsigned long) store_prefix(); | 1004 | lc = (struct _lowcore *)(unsigned long) store_prefix(); |
1005 | |||
1006 | /* Stack for interrupt/machine check handler */ | ||
1047 | lc->panic_stack = S390_lowcore.panic_stack; | 1007 | lc->panic_stack = S390_lowcore.panic_stack; |
1048 | 1008 | ||
1009 | /* Save prefix page address for dump case */ | ||
1010 | dump_prefix_page = (unsigned long) lc; | ||
1011 | |||
1049 | /* Disable prefixing */ | 1012 | /* Disable prefixing */ |
1050 | set_prefix(0); | 1013 | set_prefix(0); |
1051 | 1014 | ||
@@ -1056,5 +1019,11 @@ void s390_reset_system(void) | |||
1056 | S390_lowcore.mcck_new_psw.mask = PSW_KERNEL_BITS & ~PSW_MASK_MCHECK; | 1019 | S390_lowcore.mcck_new_psw.mask = PSW_KERNEL_BITS & ~PSW_MASK_MCHECK; |
1057 | S390_lowcore.mcck_new_psw.addr = | 1020 | S390_lowcore.mcck_new_psw.addr = |
1058 | PSW_ADDR_AMODE | (unsigned long) &reset_mcck_handler; | 1021 | PSW_ADDR_AMODE | (unsigned long) &reset_mcck_handler; |
1022 | |||
1023 | /* Set new program check handler */ | ||
1024 | S390_lowcore.program_new_psw.mask = PSW_KERNEL_BITS & ~PSW_MASK_MCHECK; | ||
1025 | S390_lowcore.program_new_psw.addr = | ||
1026 | PSW_ADDR_AMODE | (unsigned long) &reset_pgm_handler; | ||
1027 | |||
1059 | do_reset_calls(); | 1028 | do_reset_calls(); |
1060 | } | 1029 | } |
diff --git a/arch/s390/kernel/reipl.S b/arch/s390/kernel/reipl.S index f9434d42ce9f..c3f4d9b95083 100644 --- a/arch/s390/kernel/reipl.S +++ b/arch/s390/kernel/reipl.S | |||
@@ -16,7 +16,7 @@ do_reipl_asm: basr %r13,0 | |||
16 | stm %r0,%r15,__LC_GPREGS_SAVE_AREA | 16 | stm %r0,%r15,__LC_GPREGS_SAVE_AREA |
17 | stctl %c0,%c15,__LC_CREGS_SAVE_AREA | 17 | stctl %c0,%c15,__LC_CREGS_SAVE_AREA |
18 | stam %a0,%a15,__LC_AREGS_SAVE_AREA | 18 | stam %a0,%a15,__LC_AREGS_SAVE_AREA |
19 | stpx __LC_PREFIX_SAVE_AREA | 19 | mvc __LC_PREFIX_SAVE_AREA(4),dump_prefix_page-.Lpg0(%r13) |
20 | stckc .Lclkcmp-.Lpg0(%r13) | 20 | stckc .Lclkcmp-.Lpg0(%r13) |
21 | mvc __LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13) | 21 | mvc __LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13) |
22 | stpt __LC_CPU_TIMER_SAVE_AREA | 22 | stpt __LC_CPU_TIMER_SAVE_AREA |
@@ -79,3 +79,7 @@ do_reipl_asm: basr %r13,0 | |||
79 | .long 0x00000000,0x00000000 | 79 | .long 0x00000000,0x00000000 |
80 | .long 0x00000000,0x00000000 | 80 | .long 0x00000000,0x00000000 |
81 | .long 0x00000000,0x00000000 | 81 | .long 0x00000000,0x00000000 |
82 | .globl dump_prefix_page | ||
83 | dump_prefix_page: | ||
84 | .long 0x00000000 | ||
85 | |||
diff --git a/arch/s390/kernel/reipl64.S b/arch/s390/kernel/reipl64.S index f18ef260ca23..dbb3eed38865 100644 --- a/arch/s390/kernel/reipl64.S +++ b/arch/s390/kernel/reipl64.S | |||
@@ -20,7 +20,7 @@ do_reipl_asm: basr %r13,0 | |||
20 | stg %r0,__LC_GPREGS_SAVE_AREA-0x1000+8(%r1) | 20 | stg %r0,__LC_GPREGS_SAVE_AREA-0x1000+8(%r1) |
21 | stctg %c0,%c15,__LC_CREGS_SAVE_AREA-0x1000(%r1) | 21 | stctg %c0,%c15,__LC_CREGS_SAVE_AREA-0x1000(%r1) |
22 | stam %a0,%a15,__LC_AREGS_SAVE_AREA-0x1000(%r1) | 22 | stam %a0,%a15,__LC_AREGS_SAVE_AREA-0x1000(%r1) |
23 | stpx __LC_PREFIX_SAVE_AREA-0x1000(%r1) | 23 | mvc __LC_PREFIX_SAVE_AREA-0x1000(4,%r1),dump_prefix_page-.Lpg0(%r13) |
24 | stfpc __LC_FP_CREG_SAVE_AREA-0x1000(%r1) | 24 | stfpc __LC_FP_CREG_SAVE_AREA-0x1000(%r1) |
25 | stckc .Lclkcmp-.Lpg0(%r13) | 25 | stckc .Lclkcmp-.Lpg0(%r13) |
26 | mvc __LC_CLOCK_COMP_SAVE_AREA-0x1000(8,%r1),.Lclkcmp-.Lpg0(%r13) | 26 | mvc __LC_CLOCK_COMP_SAVE_AREA-0x1000(8,%r1),.Lclkcmp-.Lpg0(%r13) |
@@ -103,3 +103,6 @@ do_reipl_asm: basr %r13,0 | |||
103 | .long 0x00000000,0x00000000 | 103 | .long 0x00000000,0x00000000 |
104 | .long 0x00000000,0x00000000 | 104 | .long 0x00000000,0x00000000 |
105 | .long 0x00000000,0x00000000 | 105 | .long 0x00000000,0x00000000 |
106 | .globl dump_prefix_page | ||
107 | dump_prefix_page: | ||
108 | .long 0x00000000 | ||
diff --git a/arch/s390/kernel/reset.S b/arch/s390/kernel/reset.S index be8688c0665c..8a87355161fa 100644 --- a/arch/s390/kernel/reset.S +++ b/arch/s390/kernel/reset.S | |||
@@ -3,6 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) IBM Corp. 2006 | 4 | * Copyright (C) IBM Corp. 2006 |
5 | * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com> | 5 | * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com> |
6 | * Michael Holzheu <holzheu@de.ibm.com> | ||
6 | */ | 7 | */ |
7 | 8 | ||
8 | #include <asm/ptrace.h> | 9 | #include <asm/ptrace.h> |
@@ -27,6 +28,26 @@ reset_mcck_handler: | |||
27 | s390_reset_mcck_handler: | 28 | s390_reset_mcck_handler: |
28 | .quad 0 | 29 | .quad 0 |
29 | 30 | ||
31 | .globl reset_pgm_handler | ||
32 | reset_pgm_handler: | ||
33 | stmg %r0,%r15,__LC_SAVE_AREA | ||
34 | basr %r13,0 | ||
35 | 0: lg %r15,__LC_PANIC_STACK # load panic stack | ||
36 | aghi %r15,-STACK_FRAME_OVERHEAD | ||
37 | lg %r1,s390_reset_pgm_handler-0b(%r13) | ||
38 | ltgr %r1,%r1 | ||
39 | jz 1f | ||
40 | basr %r14,%r1 | ||
41 | lmg %r0,%r15,__LC_SAVE_AREA | ||
42 | lpswe __LC_PGM_OLD_PSW | ||
43 | 1: lpswe disabled_wait_psw-0b(%r13) | ||
44 | .globl s390_reset_pgm_handler | ||
45 | s390_reset_pgm_handler: | ||
46 | .quad 0 | ||
47 | .align 8 | ||
48 | disabled_wait_psw: | ||
49 | .quad 0x0002000180000000,0x0000000000000000 + reset_pgm_handler | ||
50 | |||
30 | #else /* CONFIG_64BIT */ | 51 | #else /* CONFIG_64BIT */ |
31 | 52 | ||
32 | .globl reset_mcck_handler | 53 | .globl reset_mcck_handler |
@@ -45,4 +66,25 @@ reset_mcck_handler: | |||
45 | s390_reset_mcck_handler: | 66 | s390_reset_mcck_handler: |
46 | .long 0 | 67 | .long 0 |
47 | 68 | ||
69 | .globl reset_pgm_handler | ||
70 | reset_pgm_handler: | ||
71 | stm %r0,%r15,__LC_SAVE_AREA | ||
72 | basr %r13,0 | ||
73 | 0: l %r15,__LC_PANIC_STACK # load panic stack | ||
74 | ahi %r15,-STACK_FRAME_OVERHEAD | ||
75 | l %r1,s390_reset_pgm_handler-0b(%r13) | ||
76 | ltr %r1,%r1 | ||
77 | jz 1f | ||
78 | basr %r14,%r1 | ||
79 | lm %r0,%r15,__LC_SAVE_AREA | ||
80 | lpsw __LC_PGM_OLD_PSW | ||
81 | |||
82 | 1: lpsw disabled_wait_psw-0b(%r13) | ||
83 | .globl s390_reset_pgm_handler | ||
84 | s390_reset_pgm_handler: | ||
85 | .long 0 | ||
86 | disabled_wait_psw: | ||
87 | .align 8 | ||
88 | .long 0x000a0000,0x00000000 + reset_pgm_handler | ||
89 | |||
48 | #endif /* CONFIG_64BIT */ | 90 | #endif /* CONFIG_64BIT */ |
diff --git a/arch/sparc/defconfig b/arch/sparc/defconfig index a69856263009..79e54894529d 100644 --- a/arch/sparc/defconfig +++ b/arch/sparc/defconfig | |||
@@ -1,41 +1,59 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.20-rc1 | ||
4 | # Sun Dec 17 14:20:47 2006 | ||
3 | # | 5 | # |
4 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
5 | CONFIG_UID16=y | ||
6 | CONFIG_HIGHMEM=y | 7 | CONFIG_HIGHMEM=y |
7 | CONFIG_GENERIC_ISA_DMA=y | 8 | CONFIG_GENERIC_ISA_DMA=y |
9 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
8 | 10 | ||
9 | # | 11 | # |
10 | # Code maturity level options | 12 | # Code maturity level options |
11 | # | 13 | # |
12 | CONFIG_EXPERIMENTAL=y | 14 | CONFIG_EXPERIMENTAL=y |
13 | CONFIG_CLEAN_COMPILE=y | ||
14 | CONFIG_STANDALONE=y | ||
15 | CONFIG_BROKEN_ON_SMP=y | 15 | CONFIG_BROKEN_ON_SMP=y |
16 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
16 | 17 | ||
17 | # | 18 | # |
18 | # General setup | 19 | # General setup |
19 | # | 20 | # |
21 | CONFIG_LOCALVERSION="" | ||
22 | CONFIG_LOCALVERSION_AUTO=y | ||
20 | CONFIG_SWAP=y | 23 | CONFIG_SWAP=y |
21 | CONFIG_SYSVIPC=y | 24 | CONFIG_SYSVIPC=y |
25 | # CONFIG_IPC_NS is not set | ||
22 | CONFIG_POSIX_MQUEUE=y | 26 | CONFIG_POSIX_MQUEUE=y |
23 | # CONFIG_BSD_PROCESS_ACCT is not set | 27 | # CONFIG_BSD_PROCESS_ACCT is not set |
24 | CONFIG_SYSCTL=y | 28 | # CONFIG_TASKSTATS is not set |
29 | # CONFIG_UTS_NS is not set | ||
25 | # CONFIG_AUDIT is not set | 30 | # CONFIG_AUDIT is not set |
26 | CONFIG_LOG_BUF_SHIFT=14 | ||
27 | # CONFIG_HOTPLUG is not set | ||
28 | # CONFIG_IKCONFIG is not set | 31 | # CONFIG_IKCONFIG is not set |
32 | CONFIG_SYSFS_DEPRECATED=y | ||
33 | # CONFIG_RELAY is not set | ||
34 | CONFIG_INITRAMFS_SOURCE="" | ||
35 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
36 | CONFIG_SYSCTL=y | ||
29 | # CONFIG_EMBEDDED is not set | 37 | # CONFIG_EMBEDDED is not set |
38 | CONFIG_UID16=y | ||
39 | CONFIG_SYSCTL_SYSCALL=y | ||
30 | CONFIG_KALLSYMS=y | 40 | CONFIG_KALLSYMS=y |
31 | # CONFIG_KALLSYMS_ALL is not set | 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 | ||
32 | CONFIG_FUTEX=y | 48 | CONFIG_FUTEX=y |
33 | CONFIG_EPOLL=y | 49 | CONFIG_EPOLL=y |
34 | CONFIG_IOSCHED_NOOP=y | 50 | CONFIG_SHMEM=y |
35 | CONFIG_IOSCHED_AS=y | 51 | CONFIG_SLAB=y |
36 | CONFIG_IOSCHED_DEADLINE=y | 52 | CONFIG_VM_EVENT_COUNTERS=y |
37 | CONFIG_IOSCHED_CFQ=y | 53 | CONFIG_RT_MUTEXES=y |
38 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 54 | # CONFIG_TINY_SHMEM is not set |
55 | CONFIG_BASE_SMALL=0 | ||
56 | # CONFIG_SLOB is not set | ||
39 | 57 | ||
40 | # | 58 | # |
41 | # Loadable module support | 59 | # Loadable module support |
@@ -43,17 +61,36 @@ CONFIG_IOSCHED_CFQ=y | |||
43 | CONFIG_MODULES=y | 61 | CONFIG_MODULES=y |
44 | CONFIG_MODULE_UNLOAD=y | 62 | CONFIG_MODULE_UNLOAD=y |
45 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 63 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
46 | CONFIG_OBSOLETE_MODPARM=y | ||
47 | # CONFIG_MODVERSIONS is not set | 64 | # CONFIG_MODVERSIONS is not set |
65 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
48 | CONFIG_KMOD=y | 66 | CONFIG_KMOD=y |
49 | 67 | ||
50 | # | 68 | # |
51 | # General setup | 69 | # Block layer |
70 | # | ||
71 | CONFIG_BLOCK=y | ||
72 | # CONFIG_LBD is not set | ||
73 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
74 | # CONFIG_LSF is not set | ||
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 is not set | ||
84 | # CONFIG_DEFAULT_DEADLINE is not set | ||
85 | CONFIG_DEFAULT_CFQ=y | ||
86 | # CONFIG_DEFAULT_NOOP is not set | ||
87 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
88 | |||
89 | # | ||
90 | # General machine setup | ||
52 | # | 91 | # |
53 | CONFIG_VT=y | ||
54 | CONFIG_VT_CONSOLE=y | ||
55 | CONFIG_HW_CONSOLE=y | ||
56 | # CONFIG_SMP is not set | 92 | # CONFIG_SMP is not set |
93 | CONFIG_SPARC=y | ||
57 | CONFIG_SPARC32=y | 94 | CONFIG_SPARC32=y |
58 | CONFIG_SBUS=y | 95 | CONFIG_SBUS=y |
59 | CONFIG_SBUSCHAR=y | 96 | CONFIG_SBUSCHAR=y |
@@ -61,73 +98,170 @@ CONFIG_SERIAL_CONSOLE=y | |||
61 | CONFIG_SUN_AUXIO=y | 98 | CONFIG_SUN_AUXIO=y |
62 | CONFIG_SUN_IO=y | 99 | CONFIG_SUN_IO=y |
63 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 100 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
101 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
102 | CONFIG_GENERIC_HWEIGHT=y | ||
103 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
104 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
105 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
106 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
64 | CONFIG_SUN_PM=y | 107 | CONFIG_SUN_PM=y |
65 | # CONFIG_SUN4 is not set | 108 | # CONFIG_SUN4 is not set |
66 | CONFIG_PCI=y | 109 | CONFIG_PCI=y |
67 | # CONFIG_PCI_LEGACY_PROC is not set | 110 | # CONFIG_PCI_MULTITHREAD_PROBE is not set |
68 | # CONFIG_PCI_NAMES is not set | 111 | # CONFIG_PCI_DEBUG is not set |
69 | CONFIG_SUN_OPENPROMFS=m | 112 | CONFIG_SUN_OPENPROMFS=m |
113 | # CONFIG_SPARC_LED is not set | ||
70 | CONFIG_BINFMT_ELF=y | 114 | CONFIG_BINFMT_ELF=y |
71 | CONFIG_BINFMT_AOUT=y | 115 | CONFIG_BINFMT_AOUT=y |
72 | CONFIG_BINFMT_MISC=m | 116 | CONFIG_BINFMT_MISC=m |
73 | CONFIG_SUNOS_EMUL=y | 117 | CONFIG_SUNOS_EMUL=y |
118 | CONFIG_SELECT_MEMORY_MODEL=y | ||
119 | CONFIG_FLATMEM_MANUAL=y | ||
120 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
121 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
122 | CONFIG_FLATMEM=y | ||
123 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
124 | # CONFIG_SPARSEMEM_STATIC is not set | ||
125 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
126 | # CONFIG_RESOURCES_64BIT is not set | ||
74 | 127 | ||
75 | # | 128 | # |
76 | # Parallel port support | 129 | # Networking |
77 | # | 130 | # |
78 | # CONFIG_PARPORT is not set | 131 | CONFIG_NET=y |
79 | 132 | ||
80 | # | 133 | # |
81 | # Generic Driver Options | 134 | # Networking options |
82 | # | 135 | # |
83 | # CONFIG_DEBUG_DRIVER is not set | 136 | # CONFIG_NETDEBUG is not set |
137 | CONFIG_PACKET=y | ||
138 | # CONFIG_PACKET_MMAP is not set | ||
139 | CONFIG_UNIX=y | ||
140 | CONFIG_XFRM=y | ||
141 | CONFIG_XFRM_USER=m | ||
142 | # CONFIG_XFRM_SUB_POLICY is not set | ||
143 | CONFIG_NET_KEY=m | ||
144 | CONFIG_INET=y | ||
145 | # CONFIG_IP_MULTICAST is not set | ||
146 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
147 | CONFIG_IP_FIB_HASH=y | ||
148 | CONFIG_IP_PNP=y | ||
149 | CONFIG_IP_PNP_DHCP=y | ||
150 | # CONFIG_IP_PNP_BOOTP is not set | ||
151 | # CONFIG_IP_PNP_RARP is not set | ||
152 | # CONFIG_NET_IPIP is not set | ||
153 | # CONFIG_NET_IPGRE is not set | ||
154 | # CONFIG_ARPD is not set | ||
155 | # CONFIG_SYN_COOKIES is not set | ||
156 | CONFIG_INET_AH=y | ||
157 | CONFIG_INET_ESP=y | ||
158 | CONFIG_INET_IPCOMP=y | ||
159 | CONFIG_INET_XFRM_TUNNEL=y | ||
160 | CONFIG_INET_TUNNEL=y | ||
161 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
162 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
163 | CONFIG_INET_XFRM_MODE_BEET=y | ||
164 | CONFIG_INET_DIAG=y | ||
165 | CONFIG_INET_TCP_DIAG=y | ||
166 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
167 | CONFIG_TCP_CONG_CUBIC=y | ||
168 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
169 | # CONFIG_TCP_MD5SIG is not set | ||
170 | CONFIG_IPV6=m | ||
171 | CONFIG_IPV6_PRIVACY=y | ||
172 | # CONFIG_IPV6_ROUTER_PREF is not set | ||
173 | CONFIG_INET6_AH=m | ||
174 | CONFIG_INET6_ESP=m | ||
175 | CONFIG_INET6_IPCOMP=m | ||
176 | # CONFIG_IPV6_MIP6 is not set | ||
177 | CONFIG_INET6_XFRM_TUNNEL=m | ||
178 | CONFIG_INET6_TUNNEL=m | ||
179 | CONFIG_INET6_XFRM_MODE_TRANSPORT=m | ||
180 | CONFIG_INET6_XFRM_MODE_TUNNEL=m | ||
181 | CONFIG_INET6_XFRM_MODE_BEET=m | ||
182 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | ||
183 | CONFIG_IPV6_SIT=m | ||
184 | CONFIG_IPV6_TUNNEL=m | ||
185 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | ||
186 | # CONFIG_NETWORK_SECMARK is not set | ||
187 | # CONFIG_NETFILTER is not set | ||
84 | 188 | ||
85 | # | 189 | # |
86 | # Graphics support | 190 | # DCCP Configuration (EXPERIMENTAL) |
87 | # | 191 | # |
88 | # CONFIG_FB is not set | 192 | # CONFIG_IP_DCCP is not set |
89 | 193 | ||
90 | # | 194 | # |
91 | # Console display driver support | 195 | # SCTP Configuration (EXPERIMENTAL) |
92 | # | 196 | # |
93 | # CONFIG_MDA_CONSOLE is not set | 197 | CONFIG_IP_SCTP=m |
94 | # CONFIG_PROM_CONSOLE is not set | 198 | # CONFIG_SCTP_DBG_MSG is not set |
95 | CONFIG_DUMMY_CONSOLE=y | 199 | CONFIG_SCTP_DBG_OBJCNT=y |
200 | # CONFIG_SCTP_HMAC_NONE is not set | ||
201 | # CONFIG_SCTP_HMAC_SHA1 is not set | ||
202 | CONFIG_SCTP_HMAC_MD5=y | ||
96 | 203 | ||
97 | # | 204 | # |
98 | # Memory Technology Devices (MTD) | 205 | # TIPC Configuration (EXPERIMENTAL) |
99 | # | 206 | # |
100 | # CONFIG_MTD is not set | 207 | # CONFIG_TIPC is not set |
208 | # CONFIG_ATM is not set | ||
209 | # CONFIG_BRIDGE is not set | ||
210 | # CONFIG_VLAN_8021Q is not set | ||
211 | # CONFIG_DECNET is not set | ||
212 | # CONFIG_LLC2 is not set | ||
213 | # CONFIG_IPX is not set | ||
214 | # CONFIG_ATALK is not set | ||
215 | # CONFIG_X25 is not set | ||
216 | # CONFIG_LAPB is not set | ||
217 | # CONFIG_ECONET is not set | ||
218 | # CONFIG_WAN_ROUTER is not set | ||
101 | 219 | ||
102 | # | 220 | # |
103 | # Serial drivers | 221 | # QoS and/or fair queueing |
104 | # | 222 | # |
105 | # CONFIG_SERIAL_8250 is not set | 223 | # CONFIG_NET_SCHED is not set |
106 | 224 | ||
107 | # | 225 | # |
108 | # Non-8250 serial port support | 226 | # Network testing |
109 | # | 227 | # |
110 | CONFIG_SERIAL_SUNCORE=y | 228 | CONFIG_NET_PKTGEN=m |
111 | CONFIG_SERIAL_SUNZILOG=y | 229 | # CONFIG_HAMRADIO is not set |
112 | CONFIG_SERIAL_SUNZILOG_CONSOLE=y | 230 | # CONFIG_IRDA is not set |
113 | CONFIG_SERIAL_SUNSU=y | 231 | # CONFIG_BT is not set |
114 | CONFIG_SERIAL_SUNSU_CONSOLE=y | 232 | # CONFIG_IEEE80211 is not set |
115 | # CONFIG_SERIAL_SUNSAB is not set | ||
116 | CONFIG_SERIAL_CORE=y | ||
117 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
118 | 233 | ||
119 | # | 234 | # |
120 | # Misc Linux/SPARC drivers | 235 | # Device Drivers |
236 | # | ||
237 | |||
238 | # | ||
239 | # Generic Driver Options | ||
240 | # | ||
241 | CONFIG_STANDALONE=y | ||
242 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
243 | # CONFIG_FW_LOADER is not set | ||
244 | # CONFIG_DEBUG_DRIVER is not set | ||
245 | # CONFIG_SYS_HYPERVISOR is not set | ||
246 | |||
247 | # | ||
248 | # Connector - unified userspace <-> kernelspace linker | ||
249 | # | ||
250 | # CONFIG_CONNECTOR is not set | ||
251 | |||
252 | # | ||
253 | # Memory Technology Devices (MTD) | ||
254 | # | ||
255 | # CONFIG_MTD is not set | ||
256 | |||
257 | # | ||
258 | # Parallel port support | ||
259 | # | ||
260 | # CONFIG_PARPORT is not set | ||
261 | |||
262 | # | ||
263 | # Plug and Play support | ||
121 | # | 264 | # |
122 | CONFIG_SUN_OPENPROMIO=m | ||
123 | CONFIG_SUN_MOSTEK_RTC=m | ||
124 | # CONFIG_SUN_BPP is not set | ||
125 | # CONFIG_SUN_VIDEOPIX is not set | ||
126 | # CONFIG_SUN_AURORA is not set | ||
127 | # CONFIG_TADPOLE_TS102_UCTRL is not set | ||
128 | # CONFIG_SUN_JSFLASH is not set | ||
129 | CONFIG_APM_RTC_IS_GMT=y | ||
130 | CONFIG_RTC=m | ||
131 | 265 | ||
132 | # | 266 | # |
133 | # Block devices | 267 | # Block devices |
@@ -137,28 +271,37 @@ CONFIG_RTC=m | |||
137 | # CONFIG_BLK_CPQ_CISS_DA is not set | 271 | # CONFIG_BLK_CPQ_CISS_DA is not set |
138 | # CONFIG_BLK_DEV_DAC960 is not set | 272 | # CONFIG_BLK_DEV_DAC960 is not set |
139 | # CONFIG_BLK_DEV_UMEM is not set | 273 | # CONFIG_BLK_DEV_UMEM is not set |
274 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
140 | CONFIG_BLK_DEV_LOOP=m | 275 | CONFIG_BLK_DEV_LOOP=m |
141 | CONFIG_BLK_DEV_CRYPTOLOOP=m | 276 | CONFIG_BLK_DEV_CRYPTOLOOP=m |
142 | # CONFIG_BLK_DEV_NBD is not set | 277 | # CONFIG_BLK_DEV_NBD is not set |
143 | # CONFIG_BLK_DEV_CARMEL is not set | 278 | # CONFIG_BLK_DEV_SX8 is not set |
144 | CONFIG_BLK_DEV_RAM=y | 279 | CONFIG_BLK_DEV_RAM=y |
280 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
145 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 281 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
282 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
146 | CONFIG_BLK_DEV_INITRD=y | 283 | CONFIG_BLK_DEV_INITRD=y |
284 | # CONFIG_CDROM_PKTCDVD is not set | ||
285 | # CONFIG_ATA_OVER_ETH is not set | ||
147 | 286 | ||
148 | # | 287 | # |
149 | # ATA/ATAPI/MFM/RLL support | 288 | # Misc devices |
150 | # | 289 | # |
151 | # CONFIG_IDE is not set | 290 | # CONFIG_SGI_IOC4 is not set |
291 | # CONFIG_TIFM_CORE is not set | ||
152 | 292 | ||
153 | # | 293 | # |
154 | # ISDN subsystem | 294 | # ATA/ATAPI/MFM/RLL support |
155 | # | 295 | # |
156 | # CONFIG_ISDN is not set | 296 | # CONFIG_IDE is not set |
157 | 297 | ||
158 | # | 298 | # |
159 | # SCSI device support | 299 | # SCSI device support |
160 | # | 300 | # |
301 | # CONFIG_RAID_ATTRS is not set | ||
161 | CONFIG_SCSI=y | 302 | CONFIG_SCSI=y |
303 | # CONFIG_SCSI_TGT is not set | ||
304 | # CONFIG_SCSI_NETLINK is not set | ||
162 | CONFIG_SCSI_PROC_FS=y | 305 | CONFIG_SCSI_PROC_FS=y |
163 | 306 | ||
164 | # | 307 | # |
@@ -170,6 +313,7 @@ CONFIG_BLK_DEV_SD=y | |||
170 | CONFIG_BLK_DEV_SR=m | 313 | CONFIG_BLK_DEV_SR=m |
171 | # CONFIG_BLK_DEV_SR_VENDOR is not set | 314 | # CONFIG_BLK_DEV_SR_VENDOR is not set |
172 | CONFIG_CHR_DEV_SG=m | 315 | CONFIG_CHR_DEV_SG=m |
316 | # CONFIG_CHR_DEV_SCH is not set | ||
173 | 317 | ||
174 | # | 318 | # |
175 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | 319 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs |
@@ -177,57 +321,58 @@ CONFIG_CHR_DEV_SG=m | |||
177 | # CONFIG_SCSI_MULTI_LUN is not set | 321 | # CONFIG_SCSI_MULTI_LUN is not set |
178 | # CONFIG_SCSI_CONSTANTS is not set | 322 | # CONFIG_SCSI_CONSTANTS is not set |
179 | # CONFIG_SCSI_LOGGING is not set | 323 | # CONFIG_SCSI_LOGGING is not set |
324 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
180 | 325 | ||
181 | # | 326 | # |
182 | # SCSI Transport Attributes | 327 | # SCSI Transports |
183 | # | 328 | # |
184 | CONFIG_SCSI_SPI_ATTRS=m | 329 | CONFIG_SCSI_SPI_ATTRS=m |
185 | # CONFIG_SCSI_FC_ATTRS is not set | 330 | # CONFIG_SCSI_FC_ATTRS is not set |
331 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
332 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
333 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
186 | 334 | ||
187 | # | 335 | # |
188 | # SCSI low-level drivers | 336 | # SCSI low-level drivers |
189 | # | 337 | # |
338 | # CONFIG_ISCSI_TCP is not set | ||
190 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | 339 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set |
340 | # CONFIG_SCSI_3W_9XXX is not set | ||
191 | # CONFIG_SCSI_ACARD is not set | 341 | # CONFIG_SCSI_ACARD is not set |
192 | # CONFIG_SCSI_AACRAID is not set | 342 | # CONFIG_SCSI_AACRAID is not set |
193 | # CONFIG_SCSI_AIC7XXX is not set | 343 | # CONFIG_SCSI_AIC7XXX is not set |
194 | # CONFIG_SCSI_AIC7XXX_OLD is not set | 344 | # CONFIG_SCSI_AIC7XXX_OLD is not set |
195 | # CONFIG_SCSI_AIC79XX is not set | 345 | # CONFIG_SCSI_AIC79XX is not set |
346 | # CONFIG_SCSI_AIC94XX is not set | ||
196 | # CONFIG_SCSI_DPT_I2O is not set | 347 | # CONFIG_SCSI_DPT_I2O is not set |
197 | # CONFIG_SCSI_ADVANSYS is not set | 348 | # CONFIG_SCSI_ARCMSR is not set |
198 | # CONFIG_SCSI_MEGARAID is not set | 349 | # CONFIG_MEGARAID_NEWGEN is not set |
199 | # CONFIG_SCSI_SATA is not set | 350 | # CONFIG_MEGARAID_LEGACY is not set |
200 | # CONFIG_SCSI_BUSLOGIC is not set | 351 | # CONFIG_MEGARAID_SAS is not set |
352 | # CONFIG_SCSI_HPTIOP is not set | ||
201 | # CONFIG_SCSI_DMX3191D is not set | 353 | # CONFIG_SCSI_DMX3191D is not set |
202 | # CONFIG_SCSI_EATA is not set | ||
203 | # CONFIG_SCSI_EATA_PIO is not set | ||
204 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | 354 | # CONFIG_SCSI_FUTURE_DOMAIN is not set |
205 | # CONFIG_SCSI_GDTH is not set | ||
206 | # CONFIG_SCSI_IPS is not set | 355 | # CONFIG_SCSI_IPS is not set |
356 | # CONFIG_SCSI_INITIO is not set | ||
207 | # CONFIG_SCSI_INIA100 is not set | 357 | # CONFIG_SCSI_INIA100 is not set |
358 | # CONFIG_SCSI_STEX is not set | ||
208 | # CONFIG_SCSI_SYM53C8XX_2 is not set | 359 | # CONFIG_SCSI_SYM53C8XX_2 is not set |
209 | # CONFIG_SCSI_IPR is not set | ||
210 | # CONFIG_SCSI_QLOGIC_ISP is not set | ||
211 | # CONFIG_SCSI_QLOGIC_FC is not set | ||
212 | # CONFIG_SCSI_QLOGIC_1280 is not set | 360 | # CONFIG_SCSI_QLOGIC_1280 is not set |
213 | CONFIG_SCSI_QLOGICPTI=m | 361 | CONFIG_SCSI_QLOGICPTI=m |
214 | CONFIG_SCSI_QLA2XXX=y | 362 | # CONFIG_SCSI_QLA_FC is not set |
215 | # CONFIG_SCSI_QLA21XX is not set | 363 | # CONFIG_SCSI_QLA_ISCSI is not set |
216 | # CONFIG_SCSI_QLA22XX is not set | 364 | # CONFIG_SCSI_LPFC is not set |
217 | # CONFIG_SCSI_QLA2300 is not set | ||
218 | # CONFIG_SCSI_QLA2322 is not set | ||
219 | # CONFIG_SCSI_QLA6312 is not set | ||
220 | # CONFIG_SCSI_QLA6322 is not set | ||
221 | # CONFIG_SCSI_DC395x is not set | 365 | # CONFIG_SCSI_DC395x is not set |
222 | # CONFIG_SCSI_DC390T is not set | 366 | # CONFIG_SCSI_DC390T is not set |
223 | # CONFIG_SCSI_NSP32 is not set | 367 | # CONFIG_SCSI_NSP32 is not set |
224 | # CONFIG_SCSI_DEBUG is not set | 368 | # CONFIG_SCSI_DEBUG is not set |
225 | CONFIG_SCSI_SUNESP=y | 369 | CONFIG_SCSI_SUNESP=y |
370 | # CONFIG_SCSI_SRP is not set | ||
226 | 371 | ||
227 | # | 372 | # |
228 | # Fibre Channel support | 373 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
229 | # | 374 | # |
230 | # CONFIG_FC4 is not set | 375 | # CONFIG_ATA is not set |
231 | 376 | ||
232 | # | 377 | # |
233 | # Multi-device support (RAID and LVM) | 378 | # Multi-device support (RAID and LVM) |
@@ -235,85 +380,31 @@ CONFIG_SCSI_SUNESP=y | |||
235 | # CONFIG_MD is not set | 380 | # CONFIG_MD is not set |
236 | 381 | ||
237 | # | 382 | # |
238 | # Networking support | 383 | # Fusion MPT device support |
239 | # | ||
240 | CONFIG_NET=y | ||
241 | |||
242 | # | ||
243 | # Networking options | ||
244 | # | 384 | # |
245 | CONFIG_PACKET=y | 385 | # CONFIG_FUSION is not set |
246 | # CONFIG_PACKET_MMAP is not set | 386 | # CONFIG_FUSION_SPI is not set |
247 | CONFIG_NETLINK_DEV=y | 387 | # CONFIG_FUSION_FC is not set |
248 | CONFIG_UNIX=y | 388 | # CONFIG_FUSION_SAS is not set |
249 | CONFIG_NET_KEY=m | ||
250 | CONFIG_INET=y | ||
251 | # CONFIG_IP_MULTICAST is not set | ||
252 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
253 | CONFIG_IP_PNP=y | ||
254 | CONFIG_IP_PNP_DHCP=y | ||
255 | # CONFIG_IP_PNP_BOOTP is not set | ||
256 | # CONFIG_IP_PNP_RARP is not set | ||
257 | # CONFIG_NET_IPIP is not set | ||
258 | # CONFIG_NET_IPGRE is not set | ||
259 | # CONFIG_ARPD is not set | ||
260 | # CONFIG_SYN_COOKIES is not set | ||
261 | CONFIG_INET_AH=y | ||
262 | CONFIG_INET_ESP=y | ||
263 | CONFIG_INET_IPCOMP=y | ||
264 | CONFIG_IPV6=m | ||
265 | CONFIG_IPV6_PRIVACY=y | ||
266 | CONFIG_INET6_AH=m | ||
267 | CONFIG_INET6_ESP=m | ||
268 | CONFIG_INET6_IPCOMP=m | ||
269 | CONFIG_IPV6_TUNNEL=m | ||
270 | # CONFIG_NETFILTER is not set | ||
271 | CONFIG_XFRM=y | ||
272 | CONFIG_XFRM_USER=m | ||
273 | 389 | ||
274 | # | 390 | # |
275 | # SCTP Configuration (EXPERIMENTAL) | 391 | # IEEE 1394 (FireWire) support |
276 | # | 392 | # |
277 | CONFIG_IP_SCTP=m | 393 | # CONFIG_IEEE1394 is not set |
278 | # CONFIG_SCTP_DBG_MSG is not set | ||
279 | CONFIG_SCTP_DBG_OBJCNT=y | ||
280 | # CONFIG_SCTP_HMAC_NONE is not set | ||
281 | # CONFIG_SCTP_HMAC_SHA1 is not set | ||
282 | CONFIG_SCTP_HMAC_MD5=y | ||
283 | # CONFIG_ATM is not set | ||
284 | # CONFIG_BRIDGE is not set | ||
285 | # CONFIG_VLAN_8021Q is not set | ||
286 | # CONFIG_DECNET is not set | ||
287 | # CONFIG_LLC2 is not set | ||
288 | # CONFIG_IPX is not set | ||
289 | # CONFIG_ATALK is not set | ||
290 | # CONFIG_X25 is not set | ||
291 | # CONFIG_LAPB is not set | ||
292 | # CONFIG_NET_DIVERT is not set | ||
293 | # CONFIG_ECONET is not set | ||
294 | # CONFIG_WAN_ROUTER is not set | ||
295 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
296 | 394 | ||
297 | # | 395 | # |
298 | # QoS and/or fair queueing | 396 | # I2O device support |
299 | # | 397 | # |
300 | # CONFIG_NET_SCHED is not set | 398 | # CONFIG_I2O is not set |
301 | 399 | ||
302 | # | 400 | # |
303 | # Network testing | 401 | # Network device support |
304 | # | 402 | # |
305 | CONFIG_NET_PKTGEN=m | ||
306 | # CONFIG_NETPOLL is not set | ||
307 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
308 | # CONFIG_HAMRADIO is not set | ||
309 | # CONFIG_IRDA is not set | ||
310 | # CONFIG_BT is not set | ||
311 | CONFIG_NETDEVICES=y | 403 | CONFIG_NETDEVICES=y |
312 | CONFIG_DUMMY=m | 404 | CONFIG_DUMMY=m |
313 | # CONFIG_BONDING is not set | 405 | # CONFIG_BONDING is not set |
314 | # CONFIG_EQUALIZER is not set | 406 | # CONFIG_EQUALIZER is not set |
315 | CONFIG_TUN=m | 407 | CONFIG_TUN=m |
316 | # CONFIG_ETHERTAP is not set | ||
317 | 408 | ||
318 | # | 409 | # |
319 | # ARCnet devices | 410 | # ARCnet devices |
@@ -321,6 +412,11 @@ CONFIG_TUN=m | |||
321 | # CONFIG_ARCNET is not set | 412 | # CONFIG_ARCNET is not set |
322 | 413 | ||
323 | # | 414 | # |
415 | # PHY device support | ||
416 | # | ||
417 | # CONFIG_PHYLIB is not set | ||
418 | |||
419 | # | ||
324 | # Ethernet (10 or 100Mbit) | 420 | # Ethernet (10 or 100Mbit) |
325 | # | 421 | # |
326 | CONFIG_NET_ETHERNET=y | 422 | CONFIG_NET_ETHERNET=y |
@@ -330,6 +426,7 @@ CONFIG_HAPPYMEAL=m | |||
330 | CONFIG_SUNBMAC=m | 426 | CONFIG_SUNBMAC=m |
331 | CONFIG_SUNQE=m | 427 | CONFIG_SUNQE=m |
332 | # CONFIG_SUNGEM is not set | 428 | # CONFIG_SUNGEM is not set |
429 | # CONFIG_CASSINI is not set | ||
333 | # CONFIG_NET_VENDOR_3COM is not set | 430 | # CONFIG_NET_VENDOR_3COM is not set |
334 | 431 | ||
335 | # | 432 | # |
@@ -350,14 +447,22 @@ CONFIG_SUNQE=m | |||
350 | # CONFIG_HAMACHI is not set | 447 | # CONFIG_HAMACHI is not set |
351 | # CONFIG_YELLOWFIN is not set | 448 | # CONFIG_YELLOWFIN is not set |
352 | # CONFIG_R8169 is not set | 449 | # CONFIG_R8169 is not set |
450 | # CONFIG_SIS190 is not set | ||
451 | # CONFIG_SKGE is not set | ||
452 | # CONFIG_SKY2 is not set | ||
353 | # CONFIG_SK98LIN is not set | 453 | # CONFIG_SK98LIN is not set |
354 | # CONFIG_TIGON3 is not set | 454 | # CONFIG_TIGON3 is not set |
455 | # CONFIG_BNX2 is not set | ||
456 | # CONFIG_QLA3XXX is not set | ||
355 | 457 | ||
356 | # | 458 | # |
357 | # Ethernet (10000 Mbit) | 459 | # Ethernet (10000 Mbit) |
358 | # | 460 | # |
461 | # CONFIG_CHELSIO_T1 is not set | ||
359 | # CONFIG_IXGB is not set | 462 | # CONFIG_IXGB is not set |
360 | # CONFIG_S2IO is not set | 463 | # CONFIG_S2IO is not set |
464 | # CONFIG_MYRI10GE is not set | ||
465 | # CONFIG_NETXEN_NIC is not set | ||
361 | 466 | ||
362 | # | 467 | # |
363 | # Token Ring devices | 468 | # Token Ring devices |
@@ -380,17 +485,24 @@ CONFIG_SUNQE=m | |||
380 | # CONFIG_NET_FC is not set | 485 | # CONFIG_NET_FC is not set |
381 | # CONFIG_SHAPER is not set | 486 | # CONFIG_SHAPER is not set |
382 | # CONFIG_NETCONSOLE is not set | 487 | # CONFIG_NETCONSOLE is not set |
488 | # CONFIG_NETPOLL is not set | ||
489 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
383 | 490 | ||
384 | # | 491 | # |
385 | # Unix98 PTY support | 492 | # ISDN subsystem |
386 | # | 493 | # |
387 | CONFIG_UNIX98_PTYS=y | 494 | # CONFIG_ISDN is not set |
388 | CONFIG_UNIX98_PTY_COUNT=256 | 495 | |
496 | # | ||
497 | # Telephony Support | ||
498 | # | ||
499 | # CONFIG_PHONE is not set | ||
389 | 500 | ||
390 | # | 501 | # |
391 | # Input device support | 502 | # Input device support |
392 | # | 503 | # |
393 | CONFIG_INPUT=y | 504 | CONFIG_INPUT=y |
505 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
394 | 506 | ||
395 | # | 507 | # |
396 | # Userland interfaces | 508 | # Userland interfaces |
@@ -405,17 +517,6 @@ CONFIG_INPUT_EVDEV=m | |||
405 | CONFIG_INPUT_EVBUG=m | 517 | CONFIG_INPUT_EVBUG=m |
406 | 518 | ||
407 | # | 519 | # |
408 | # Input I/O drivers | ||
409 | # | ||
410 | # CONFIG_GAMEPORT is not set | ||
411 | CONFIG_SOUND_GAMEPORT=y | ||
412 | CONFIG_SERIO=m | ||
413 | # CONFIG_SERIO_I8042 is not set | ||
414 | CONFIG_SERIO_SERPORT=m | ||
415 | # CONFIG_SERIO_CT82C710 is not set | ||
416 | # CONFIG_SERIO_PCIPS2 is not set | ||
417 | |||
418 | # | ||
419 | # Input Device Drivers | 520 | # Input Device Drivers |
420 | # | 521 | # |
421 | CONFIG_INPUT_KEYBOARD=y | 522 | CONFIG_INPUT_KEYBOARD=y |
@@ -424,6 +525,7 @@ CONFIG_KEYBOARD_SUNKBD=m | |||
424 | # CONFIG_KEYBOARD_LKKBD is not set | 525 | # CONFIG_KEYBOARD_LKKBD is not set |
425 | # CONFIG_KEYBOARD_XTKBD is not set | 526 | # CONFIG_KEYBOARD_XTKBD is not set |
426 | # CONFIG_KEYBOARD_NEWTON is not set | 527 | # CONFIG_KEYBOARD_NEWTON is not set |
528 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
427 | CONFIG_INPUT_MOUSE=y | 529 | CONFIG_INPUT_MOUSE=y |
428 | CONFIG_MOUSE_PS2=m | 530 | CONFIG_MOUSE_PS2=m |
429 | CONFIG_MOUSE_SERIAL=m | 531 | CONFIG_MOUSE_SERIAL=m |
@@ -433,29 +535,239 @@ CONFIG_MOUSE_SERIAL=m | |||
433 | # CONFIG_INPUT_MISC is not set | 535 | # CONFIG_INPUT_MISC is not set |
434 | 536 | ||
435 | # | 537 | # |
538 | # Hardware I/O ports | ||
539 | # | ||
540 | CONFIG_SERIO=m | ||
541 | # CONFIG_SERIO_I8042 is not set | ||
542 | CONFIG_SERIO_SERPORT=m | ||
543 | # CONFIG_SERIO_PCIPS2 is not set | ||
544 | CONFIG_SERIO_LIBPS2=m | ||
545 | # CONFIG_SERIO_RAW is not set | ||
546 | # CONFIG_GAMEPORT is not set | ||
547 | |||
548 | # | ||
549 | # Character devices | ||
550 | # | ||
551 | CONFIG_VT=y | ||
552 | CONFIG_VT_CONSOLE=y | ||
553 | CONFIG_HW_CONSOLE=y | ||
554 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
555 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
556 | |||
557 | # | ||
558 | # Serial drivers | ||
559 | # | ||
560 | |||
561 | # | ||
562 | # Non-8250 serial port support | ||
563 | # | ||
564 | CONFIG_SERIAL_SUNCORE=y | ||
565 | CONFIG_SERIAL_SUNZILOG=y | ||
566 | CONFIG_SERIAL_SUNZILOG_CONSOLE=y | ||
567 | CONFIG_SERIAL_SUNSU=y | ||
568 | CONFIG_SERIAL_SUNSU_CONSOLE=y | ||
569 | # CONFIG_SERIAL_SUNSAB is not set | ||
570 | CONFIG_SERIAL_CORE=y | ||
571 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
572 | # CONFIG_SERIAL_JSM is not set | ||
573 | CONFIG_UNIX98_PTYS=y | ||
574 | CONFIG_LEGACY_PTYS=y | ||
575 | CONFIG_LEGACY_PTY_COUNT=256 | ||
576 | |||
577 | # | ||
578 | # IPMI | ||
579 | # | ||
580 | # CONFIG_IPMI_HANDLER is not set | ||
581 | |||
582 | # | ||
583 | # Watchdog Cards | ||
584 | # | ||
585 | # CONFIG_WATCHDOG is not set | ||
586 | CONFIG_HW_RANDOM=m | ||
587 | CONFIG_RTC=m | ||
588 | # CONFIG_DTLK is not set | ||
589 | # CONFIG_R3964 is not set | ||
590 | # CONFIG_APPLICOM is not set | ||
591 | # CONFIG_DRM is not set | ||
592 | # CONFIG_RAW_DRIVER is not set | ||
593 | |||
594 | # | ||
595 | # TPM devices | ||
596 | # | ||
597 | # CONFIG_TCG_TPM is not set | ||
598 | |||
599 | # | ||
600 | # I2C support | ||
601 | # | ||
602 | # CONFIG_I2C is not set | ||
603 | |||
604 | # | ||
605 | # SPI support | ||
606 | # | ||
607 | # CONFIG_SPI is not set | ||
608 | # CONFIG_SPI_MASTER is not set | ||
609 | |||
610 | # | ||
611 | # Dallas's 1-wire bus | ||
612 | # | ||
613 | # CONFIG_W1 is not set | ||
614 | |||
615 | # | ||
616 | # Hardware Monitoring support | ||
617 | # | ||
618 | CONFIG_HWMON=y | ||
619 | # CONFIG_HWMON_VID is not set | ||
620 | # CONFIG_SENSORS_ABITUGURU is not set | ||
621 | # CONFIG_SENSORS_F71805F is not set | ||
622 | # CONFIG_SENSORS_PC87427 is not set | ||
623 | # CONFIG_SENSORS_VT1211 is not set | ||
624 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
625 | |||
626 | # | ||
627 | # Multimedia devices | ||
628 | # | ||
629 | # CONFIG_VIDEO_DEV is not set | ||
630 | |||
631 | # | ||
632 | # Digital Video Broadcasting Devices | ||
633 | # | ||
634 | # CONFIG_DVB is not set | ||
635 | |||
636 | # | ||
637 | # Graphics support | ||
638 | # | ||
639 | CONFIG_FIRMWARE_EDID=y | ||
640 | # CONFIG_FB is not set | ||
641 | |||
642 | # | ||
643 | # Console display driver support | ||
644 | # | ||
645 | # CONFIG_PROM_CONSOLE is not set | ||
646 | CONFIG_DUMMY_CONSOLE=y | ||
647 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
648 | |||
649 | # | ||
650 | # Sound | ||
651 | # | ||
652 | # CONFIG_SOUND is not set | ||
653 | |||
654 | # | ||
655 | # HID Devices | ||
656 | # | ||
657 | CONFIG_HID=y | ||
658 | |||
659 | # | ||
660 | # USB support | ||
661 | # | ||
662 | CONFIG_USB_ARCH_HAS_HCD=y | ||
663 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
664 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
665 | # CONFIG_USB is not set | ||
666 | |||
667 | # | ||
668 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
669 | # | ||
670 | |||
671 | # | ||
672 | # USB Gadget Support | ||
673 | # | ||
674 | # CONFIG_USB_GADGET is not set | ||
675 | |||
676 | # | ||
677 | # MMC/SD Card support | ||
678 | # | ||
679 | # CONFIG_MMC is not set | ||
680 | |||
681 | # | ||
682 | # LED devices | ||
683 | # | ||
684 | # CONFIG_NEW_LEDS is not set | ||
685 | |||
686 | # | ||
687 | # LED drivers | ||
688 | # | ||
689 | |||
690 | # | ||
691 | # LED Triggers | ||
692 | # | ||
693 | |||
694 | # | ||
695 | # InfiniBand support | ||
696 | # | ||
697 | # CONFIG_INFINIBAND is not set | ||
698 | |||
699 | # | ||
700 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
701 | # | ||
702 | |||
703 | # | ||
704 | # Real Time Clock | ||
705 | # | ||
706 | # CONFIG_RTC_CLASS is not set | ||
707 | |||
708 | # | ||
709 | # DMA Engine support | ||
710 | # | ||
711 | # CONFIG_DMA_ENGINE is not set | ||
712 | |||
713 | # | ||
714 | # DMA Clients | ||
715 | # | ||
716 | |||
717 | # | ||
718 | # DMA Devices | ||
719 | # | ||
720 | |||
721 | # | ||
722 | # Virtualization | ||
723 | # | ||
724 | |||
725 | # | ||
726 | # Misc Linux/SPARC drivers | ||
727 | # | ||
728 | CONFIG_SUN_OPENPROMIO=m | ||
729 | CONFIG_SUN_MOSTEK_RTC=m | ||
730 | # CONFIG_SUN_BPP is not set | ||
731 | # CONFIG_SUN_VIDEOPIX is not set | ||
732 | # CONFIG_TADPOLE_TS102_UCTRL is not set | ||
733 | # CONFIG_SUN_JSFLASH is not set | ||
734 | |||
735 | # | ||
736 | # Unix98 PTY support | ||
737 | # | ||
738 | CONFIG_UNIX98_PTY_COUNT=256 | ||
739 | |||
740 | # | ||
436 | # File systems | 741 | # File systems |
437 | # | 742 | # |
438 | CONFIG_EXT2_FS=y | 743 | CONFIG_EXT2_FS=y |
439 | CONFIG_EXT2_FS_XATTR=y | 744 | CONFIG_EXT2_FS_XATTR=y |
440 | CONFIG_EXT2_FS_POSIX_ACL=y | 745 | CONFIG_EXT2_FS_POSIX_ACL=y |
441 | CONFIG_EXT2_FS_SECURITY=y | 746 | CONFIG_EXT2_FS_SECURITY=y |
747 | # CONFIG_EXT2_FS_XIP is not set | ||
442 | # CONFIG_EXT3_FS is not set | 748 | # CONFIG_EXT3_FS is not set |
443 | # CONFIG_JBD is not set | 749 | # CONFIG_EXT4DEV_FS is not set |
444 | CONFIG_FS_MBCACHE=y | 750 | CONFIG_FS_MBCACHE=y |
445 | # CONFIG_REISERFS_FS is not set | 751 | # CONFIG_REISERFS_FS is not set |
446 | # CONFIG_JFS_FS is not set | 752 | # CONFIG_JFS_FS is not set |
447 | CONFIG_FS_POSIX_ACL=y | 753 | CONFIG_FS_POSIX_ACL=y |
448 | CONFIG_XFS_FS=m | 754 | CONFIG_XFS_FS=m |
449 | CONFIG_XFS_RT=y | ||
450 | CONFIG_XFS_QUOTA=y | 755 | CONFIG_XFS_QUOTA=y |
451 | CONFIG_XFS_SECURITY=y | 756 | CONFIG_XFS_SECURITY=y |
452 | CONFIG_XFS_POSIX_ACL=y | 757 | CONFIG_XFS_POSIX_ACL=y |
758 | CONFIG_XFS_RT=y | ||
759 | # CONFIG_GFS2_FS is not set | ||
760 | # CONFIG_OCFS2_FS is not set | ||
453 | # CONFIG_MINIX_FS is not set | 761 | # CONFIG_MINIX_FS is not set |
454 | CONFIG_ROMFS_FS=m | 762 | CONFIG_ROMFS_FS=m |
763 | CONFIG_INOTIFY=y | ||
764 | CONFIG_INOTIFY_USER=y | ||
455 | # CONFIG_QUOTA is not set | 765 | # CONFIG_QUOTA is not set |
456 | CONFIG_QUOTACTL=y | 766 | CONFIG_QUOTACTL=y |
767 | CONFIG_DNOTIFY=y | ||
457 | CONFIG_AUTOFS_FS=m | 768 | CONFIG_AUTOFS_FS=m |
458 | CONFIG_AUTOFS4_FS=m | 769 | CONFIG_AUTOFS4_FS=m |
770 | # CONFIG_FUSE_FS is not set | ||
459 | 771 | ||
460 | # | 772 | # |
461 | # CD-ROM/DVD Filesystems | 773 | # CD-ROM/DVD Filesystems |
@@ -468,7 +780,8 @@ CONFIG_ISO9660_FS=m | |||
468 | # | 780 | # |
469 | # DOS/FAT/NT Filesystems | 781 | # DOS/FAT/NT Filesystems |
470 | # | 782 | # |
471 | # CONFIG_FAT_FS is not set | 783 | # CONFIG_MSDOS_FS is not set |
784 | # CONFIG_VFAT_FS is not set | ||
472 | # CONFIG_NTFS_FS is not set | 785 | # CONFIG_NTFS_FS is not set |
473 | 786 | ||
474 | # | 787 | # |
@@ -476,13 +789,12 @@ CONFIG_ISO9660_FS=m | |||
476 | # | 789 | # |
477 | CONFIG_PROC_FS=y | 790 | CONFIG_PROC_FS=y |
478 | CONFIG_PROC_KCORE=y | 791 | CONFIG_PROC_KCORE=y |
792 | CONFIG_PROC_SYSCTL=y | ||
479 | CONFIG_SYSFS=y | 793 | CONFIG_SYSFS=y |
480 | # CONFIG_DEVFS_FS is not set | ||
481 | CONFIG_DEVPTS_FS_XATTR=y | ||
482 | # CONFIG_DEVPTS_FS_SECURITY is not set | ||
483 | # CONFIG_TMPFS is not set | 794 | # CONFIG_TMPFS is not set |
484 | # CONFIG_HUGETLB_PAGE is not set | 795 | # CONFIG_HUGETLB_PAGE is not set |
485 | CONFIG_RAMFS=y | 796 | CONFIG_RAMFS=y |
797 | # CONFIG_CONFIGFS_FS is not set | ||
486 | 798 | ||
487 | # | 799 | # |
488 | # Miscellaneous filesystems | 800 | # Miscellaneous filesystems |
@@ -512,17 +824,23 @@ CONFIG_NFS_FS=y | |||
512 | # CONFIG_NFSD is not set | 824 | # CONFIG_NFSD is not set |
513 | CONFIG_ROOT_NFS=y | 825 | CONFIG_ROOT_NFS=y |
514 | CONFIG_LOCKD=y | 826 | CONFIG_LOCKD=y |
515 | # CONFIG_EXPORTFS is not set | 827 | CONFIG_NFS_COMMON=y |
516 | CONFIG_SUNRPC=y | 828 | CONFIG_SUNRPC=y |
517 | CONFIG_SUNRPC_GSS=m | 829 | CONFIG_SUNRPC_GSS=m |
518 | CONFIG_RPCSEC_GSS_KRB5=m | 830 | CONFIG_RPCSEC_GSS_KRB5=m |
831 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
519 | # CONFIG_SMB_FS is not set | 832 | # CONFIG_SMB_FS is not set |
520 | CONFIG_CIFS=m | 833 | CONFIG_CIFS=m |
521 | # CONFIG_CIFS_STATS is not set | 834 | # CONFIG_CIFS_STATS is not set |
835 | # CONFIG_CIFS_WEAK_PW_HASH is not set | ||
836 | # CONFIG_CIFS_XATTR is not set | ||
837 | # CONFIG_CIFS_DEBUG2 is not set | ||
838 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
522 | # CONFIG_NCP_FS is not set | 839 | # CONFIG_NCP_FS is not set |
523 | # CONFIG_CODA_FS is not set | 840 | # CONFIG_CODA_FS is not set |
524 | CONFIG_AFS_FS=m | 841 | CONFIG_AFS_FS=m |
525 | CONFIG_RXRPC=m | 842 | CONFIG_RXRPC=m |
843 | # CONFIG_9P_FS is not set | ||
526 | 844 | ||
527 | # | 845 | # |
528 | # Partition Types | 846 | # Partition Types |
@@ -559,6 +877,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
559 | # CONFIG_NLS_ISO8859_8 is not set | 877 | # CONFIG_NLS_ISO8859_8 is not set |
560 | # CONFIG_NLS_CODEPAGE_1250 is not set | 878 | # CONFIG_NLS_CODEPAGE_1250 is not set |
561 | # CONFIG_NLS_CODEPAGE_1251 is not set | 879 | # CONFIG_NLS_CODEPAGE_1251 is not set |
880 | # CONFIG_NLS_ASCII is not set | ||
562 | # CONFIG_NLS_ISO8859_1 is not set | 881 | # CONFIG_NLS_ISO8859_1 is not set |
563 | # CONFIG_NLS_ISO8859_2 is not set | 882 | # CONFIG_NLS_ISO8859_2 is not set |
564 | # CONFIG_NLS_ISO8859_3 is not set | 883 | # CONFIG_NLS_ISO8859_3 is not set |
@@ -575,70 +894,104 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
575 | # CONFIG_NLS_UTF8 is not set | 894 | # CONFIG_NLS_UTF8 is not set |
576 | 895 | ||
577 | # | 896 | # |
578 | # Sound | 897 | # Distributed Lock Manager |
579 | # | ||
580 | # CONFIG_SOUND is not set | ||
581 | |||
582 | # | ||
583 | # USB support | ||
584 | # | 898 | # |
585 | # CONFIG_USB is not set | 899 | # CONFIG_DLM is not set |
586 | |||
587 | # | ||
588 | # USB Gadget Support | ||
589 | # | ||
590 | # CONFIG_USB_GADGET is not set | ||
591 | 900 | ||
592 | # | 901 | # |
593 | # Watchdog Cards | 902 | # Instrumentation Support |
594 | # | 903 | # |
595 | # CONFIG_WATCHDOG is not set | 904 | # CONFIG_PROFILING is not set |
596 | 905 | ||
597 | # | 906 | # |
598 | # Kernel hacking | 907 | # Kernel hacking |
599 | # | 908 | # |
909 | # CONFIG_PRINTK_TIME is not set | ||
910 | CONFIG_ENABLE_MUST_CHECK=y | ||
911 | CONFIG_MAGIC_SYSRQ=y | ||
912 | # CONFIG_UNUSED_SYMBOLS is not set | ||
913 | # CONFIG_DEBUG_FS is not set | ||
914 | # CONFIG_HEADERS_CHECK is not set | ||
600 | CONFIG_DEBUG_KERNEL=y | 915 | CONFIG_DEBUG_KERNEL=y |
601 | # CONFIG_DEBUG_STACK_USAGE is not set | 916 | CONFIG_LOG_BUF_SHIFT=14 |
917 | CONFIG_DETECT_SOFTLOCKUP=y | ||
918 | # CONFIG_SCHEDSTATS is not set | ||
602 | # CONFIG_DEBUG_SLAB is not set | 919 | # CONFIG_DEBUG_SLAB is not set |
603 | CONFIG_MAGIC_SYSRQ=y | 920 | # CONFIG_DEBUG_RT_MUTEXES is not set |
921 | # CONFIG_RT_MUTEX_TESTER is not set | ||
604 | # CONFIG_DEBUG_SPINLOCK is not set | 922 | # CONFIG_DEBUG_SPINLOCK is not set |
605 | # CONFIG_DEBUG_HIGHMEM is not set | 923 | # CONFIG_DEBUG_MUTEXES is not set |
924 | # CONFIG_DEBUG_RWSEMS is not set | ||
606 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 925 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
607 | # CONFIG_DEBUG_BUGVERBOSE is not set | 926 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
927 | # CONFIG_DEBUG_KOBJECT is not set | ||
928 | # CONFIG_DEBUG_HIGHMEM is not set | ||
929 | CONFIG_DEBUG_BUGVERBOSE=y | ||
930 | # CONFIG_DEBUG_INFO is not set | ||
931 | # CONFIG_DEBUG_VM is not set | ||
932 | # CONFIG_DEBUG_LIST is not set | ||
933 | CONFIG_FORCED_INLINING=y | ||
934 | # CONFIG_RCU_TORTURE_TEST is not set | ||
935 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
608 | 936 | ||
609 | # | 937 | # |
610 | # Security options | 938 | # Security options |
611 | # | 939 | # |
940 | # CONFIG_KEYS is not set | ||
612 | # CONFIG_SECURITY is not set | 941 | # CONFIG_SECURITY is not set |
613 | 942 | ||
614 | # | 943 | # |
615 | # Cryptographic options | 944 | # Cryptographic options |
616 | # | 945 | # |
617 | CONFIG_CRYPTO=y | 946 | CONFIG_CRYPTO=y |
947 | CONFIG_CRYPTO_ALGAPI=y | ||
948 | CONFIG_CRYPTO_BLKCIPHER=y | ||
949 | CONFIG_CRYPTO_HASH=y | ||
950 | CONFIG_CRYPTO_MANAGER=y | ||
618 | CONFIG_CRYPTO_HMAC=y | 951 | CONFIG_CRYPTO_HMAC=y |
952 | # CONFIG_CRYPTO_XCBC is not set | ||
619 | CONFIG_CRYPTO_NULL=m | 953 | CONFIG_CRYPTO_NULL=m |
620 | CONFIG_CRYPTO_MD4=y | 954 | CONFIG_CRYPTO_MD4=y |
621 | CONFIG_CRYPTO_MD5=y | 955 | CONFIG_CRYPTO_MD5=y |
622 | CONFIG_CRYPTO_SHA1=y | 956 | CONFIG_CRYPTO_SHA1=y |
623 | CONFIG_CRYPTO_SHA256=m | 957 | CONFIG_CRYPTO_SHA256=m |
624 | CONFIG_CRYPTO_SHA512=m | 958 | CONFIG_CRYPTO_SHA512=m |
959 | # CONFIG_CRYPTO_WP512 is not set | ||
960 | # CONFIG_CRYPTO_TGR192 is not set | ||
961 | # CONFIG_CRYPTO_GF128MUL is not set | ||
962 | CONFIG_CRYPTO_ECB=m | ||
963 | CONFIG_CRYPTO_CBC=y | ||
964 | # CONFIG_CRYPTO_LRW is not set | ||
625 | CONFIG_CRYPTO_DES=y | 965 | CONFIG_CRYPTO_DES=y |
626 | CONFIG_CRYPTO_BLOWFISH=m | 966 | CONFIG_CRYPTO_BLOWFISH=m |
627 | CONFIG_CRYPTO_TWOFISH=m | 967 | CONFIG_CRYPTO_TWOFISH=m |
968 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
628 | CONFIG_CRYPTO_SERPENT=m | 969 | CONFIG_CRYPTO_SERPENT=m |
629 | CONFIG_CRYPTO_AES=m | 970 | CONFIG_CRYPTO_AES=m |
630 | CONFIG_CRYPTO_CAST5=m | 971 | CONFIG_CRYPTO_CAST5=m |
631 | CONFIG_CRYPTO_CAST6=m | 972 | CONFIG_CRYPTO_CAST6=m |
973 | # CONFIG_CRYPTO_TEA is not set | ||
632 | CONFIG_CRYPTO_ARC4=m | 974 | CONFIG_CRYPTO_ARC4=m |
975 | # CONFIG_CRYPTO_KHAZAD is not set | ||
976 | # CONFIG_CRYPTO_ANUBIS is not set | ||
633 | CONFIG_CRYPTO_DEFLATE=y | 977 | CONFIG_CRYPTO_DEFLATE=y |
634 | CONFIG_CRYPTO_MICHAEL_MIC=m | 978 | CONFIG_CRYPTO_MICHAEL_MIC=m |
635 | CONFIG_CRYPTO_CRC32C=m | 979 | CONFIG_CRYPTO_CRC32C=m |
636 | # CONFIG_CRYPTO_TEST is not set | 980 | # CONFIG_CRYPTO_TEST is not set |
637 | 981 | ||
638 | # | 982 | # |
983 | # Hardware crypto devices | ||
984 | # | ||
985 | |||
986 | # | ||
639 | # Library routines | 987 | # Library routines |
640 | # | 988 | # |
989 | CONFIG_BITREVERSE=y | ||
990 | # CONFIG_CRC_CCITT is not set | ||
991 | # CONFIG_CRC16 is not set | ||
641 | CONFIG_CRC32=y | 992 | CONFIG_CRC32=y |
642 | CONFIG_LIBCRC32C=m | 993 | CONFIG_LIBCRC32C=m |
643 | CONFIG_ZLIB_INFLATE=y | 994 | CONFIG_ZLIB_INFLATE=y |
644 | CONFIG_ZLIB_DEFLATE=y | 995 | CONFIG_ZLIB_DEFLATE=y |
996 | CONFIG_PLIST=y | ||
997 | CONFIG_IOMAP_COPY=y | ||
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index 33dadd9f2871..d8e008a04e2b 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c | |||
@@ -83,9 +83,6 @@ extern int __divdi3(int, int); | |||
83 | /* Private functions with odd calling conventions. */ | 83 | /* Private functions with odd calling conventions. */ |
84 | extern void ___atomic24_add(void); | 84 | extern void ___atomic24_add(void); |
85 | extern void ___atomic24_sub(void); | 85 | extern void ___atomic24_sub(void); |
86 | extern void ___set_bit(void); | ||
87 | extern void ___clear_bit(void); | ||
88 | extern void ___change_bit(void); | ||
89 | extern void ___rw_read_enter(void); | 86 | extern void ___rw_read_enter(void); |
90 | extern void ___rw_read_try(void); | 87 | extern void ___rw_read_try(void); |
91 | extern void ___rw_read_exit(void); | 88 | extern void ___rw_read_exit(void); |
@@ -125,11 +122,6 @@ EXPORT_SYMBOL(pfn_base); | |||
125 | EXPORT_SYMBOL(___atomic24_add); | 122 | EXPORT_SYMBOL(___atomic24_add); |
126 | EXPORT_SYMBOL(___atomic24_sub); | 123 | EXPORT_SYMBOL(___atomic24_sub); |
127 | 124 | ||
128 | /* Bit operations. */ | ||
129 | EXPORT_SYMBOL(___set_bit); | ||
130 | EXPORT_SYMBOL(___clear_bit); | ||
131 | EXPORT_SYMBOL(___change_bit); | ||
132 | |||
133 | /* Per-CPU information table */ | 125 | /* Per-CPU information table */ |
134 | EXPORT_PER_CPU_SYMBOL(__cpu_data); | 126 | EXPORT_PER_CPU_SYMBOL(__cpu_data); |
135 | 127 | ||
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c index 6c7aa51b590f..2fcce000d877 100644 --- a/arch/sparc/kernel/time.c +++ b/arch/sparc/kernel/time.c | |||
@@ -78,7 +78,6 @@ unsigned long profile_pc(struct pt_regs *regs) | |||
78 | extern char __copy_user_begin[], __copy_user_end[]; | 78 | extern char __copy_user_begin[], __copy_user_end[]; |
79 | extern char __atomic_begin[], __atomic_end[]; | 79 | extern char __atomic_begin[], __atomic_end[]; |
80 | extern char __bzero_begin[], __bzero_end[]; | 80 | extern char __bzero_begin[], __bzero_end[]; |
81 | extern char __bitops_begin[], __bitops_end[]; | ||
82 | 81 | ||
83 | unsigned long pc = regs->pc; | 82 | unsigned long pc = regs->pc; |
84 | 83 | ||
@@ -88,9 +87,7 @@ unsigned long profile_pc(struct pt_regs *regs) | |||
88 | (pc >= (unsigned long) __atomic_begin && | 87 | (pc >= (unsigned long) __atomic_begin && |
89 | pc < (unsigned long) __atomic_end) || | 88 | pc < (unsigned long) __atomic_end) || |
90 | (pc >= (unsigned long) __bzero_begin && | 89 | (pc >= (unsigned long) __bzero_begin && |
91 | pc < (unsigned long) __bzero_end) || | 90 | pc < (unsigned long) __bzero_end)) |
92 | (pc >= (unsigned long) __bitops_begin && | ||
93 | pc < (unsigned long) __bitops_end)) | ||
94 | pc = regs->u_regs[UREG_RETPC]; | 91 | pc = regs->u_regs[UREG_RETPC]; |
95 | return pc; | 92 | return pc; |
96 | } | 93 | } |
diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile index 5db7e1d85385..9ddc5b9ce3bd 100644 --- a/arch/sparc/lib/Makefile +++ b/arch/sparc/lib/Makefile | |||
@@ -7,7 +7,7 @@ EXTRA_AFLAGS := -ansi -DST_DIV0=0x02 | |||
7 | lib-y := mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o memcpy.o memset.o \ | 7 | lib-y := mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o memcpy.o memset.o \ |
8 | strlen.o checksum.o blockops.o memscan.o memcmp.o strncmp.o \ | 8 | strlen.o checksum.o blockops.o memscan.o memcmp.o strncmp.o \ |
9 | strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \ | 9 | strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \ |
10 | copy_user.o locks.o atomic.o atomic32.o bitops.o \ | 10 | copy_user.o locks.o atomic.o \ |
11 | lshrdi3.o ashldi3.o rwsem.o muldi3.o bitext.o | 11 | lshrdi3.o ashldi3.o rwsem.o muldi3.o bitext.o |
12 | 12 | ||
13 | obj-y += iomap.o | 13 | obj-y += iomap.o atomic32.o |
diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c index de84f8534bac..53ddcd9d1e60 100644 --- a/arch/sparc/lib/atomic32.c +++ b/arch/sparc/lib/atomic32.c | |||
@@ -76,3 +76,42 @@ void atomic_set(atomic_t *v, int i) | |||
76 | spin_unlock_irqrestore(ATOMIC_HASH(v), flags); | 76 | spin_unlock_irqrestore(ATOMIC_HASH(v), flags); |
77 | } | 77 | } |
78 | EXPORT_SYMBOL(atomic_set); | 78 | EXPORT_SYMBOL(atomic_set); |
79 | |||
80 | unsigned long ___set_bit(unsigned long *addr, unsigned long mask) | ||
81 | { | ||
82 | unsigned long old, flags; | ||
83 | |||
84 | spin_lock_irqsave(ATOMIC_HASH(addr), flags); | ||
85 | old = *addr; | ||
86 | *addr = old | mask; | ||
87 | spin_unlock_irqrestore(ATOMIC_HASH(addr), flags); | ||
88 | |||
89 | return old & mask; | ||
90 | } | ||
91 | EXPORT_SYMBOL(___set_bit); | ||
92 | |||
93 | unsigned long ___clear_bit(unsigned long *addr, unsigned long mask) | ||
94 | { | ||
95 | unsigned long old, flags; | ||
96 | |||
97 | spin_lock_irqsave(ATOMIC_HASH(addr), flags); | ||
98 | old = *addr; | ||
99 | *addr = old & ~mask; | ||
100 | spin_unlock_irqrestore(ATOMIC_HASH(addr), flags); | ||
101 | |||
102 | return old & mask; | ||
103 | } | ||
104 | EXPORT_SYMBOL(___clear_bit); | ||
105 | |||
106 | unsigned long ___change_bit(unsigned long *addr, unsigned long mask) | ||
107 | { | ||
108 | unsigned long old, flags; | ||
109 | |||
110 | spin_lock_irqsave(ATOMIC_HASH(addr), flags); | ||
111 | old = *addr; | ||
112 | *addr = old ^ mask; | ||
113 | spin_unlock_irqrestore(ATOMIC_HASH(addr), flags); | ||
114 | |||
115 | return old & mask; | ||
116 | } | ||
117 | EXPORT_SYMBOL(___change_bit); | ||
diff --git a/arch/sparc/lib/bitops.S b/arch/sparc/lib/bitops.S deleted file mode 100644 index cb7fb66a40c8..000000000000 --- a/arch/sparc/lib/bitops.S +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | /* bitops.S: Low level assembler bit operations. | ||
2 | * | ||
3 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | ||
4 | */ | ||
5 | |||
6 | #include <asm/ptrace.h> | ||
7 | #include <asm/psr.h> | ||
8 | |||
9 | .text | ||
10 | .align 4 | ||
11 | |||
12 | .globl __bitops_begin | ||
13 | __bitops_begin: | ||
14 | |||
15 | /* Take bits in %g2 and set them in word at %g1, | ||
16 | * return whether bits were set in original value | ||
17 | * in %g2. %g4 holds value to restore into %o7 | ||
18 | * in delay slot of jmpl return, %g3 + %g5 + %g7 can be | ||
19 | * used as temporaries and thus is considered clobbered | ||
20 | * by all callers. | ||
21 | */ | ||
22 | .globl ___set_bit | ||
23 | ___set_bit: | ||
24 | rd %psr, %g3 | ||
25 | nop; nop; nop; | ||
26 | or %g3, PSR_PIL, %g5 | ||
27 | wr %g5, 0x0, %psr | ||
28 | nop; nop; nop | ||
29 | #ifdef CONFIG_SMP | ||
30 | set bitops_spinlock, %g5 | ||
31 | 2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP. | ||
32 | orcc %g7, 0x0, %g0 ! Did we get it? | ||
33 | bne 2b ! Nope... | ||
34 | #endif | ||
35 | ld [%g1], %g7 | ||
36 | or %g7, %g2, %g5 | ||
37 | and %g7, %g2, %g2 | ||
38 | #ifdef CONFIG_SMP | ||
39 | st %g5, [%g1] | ||
40 | set bitops_spinlock, %g5 | ||
41 | stb %g0, [%g5] | ||
42 | #else | ||
43 | st %g5, [%g1] | ||
44 | #endif | ||
45 | wr %g3, 0x0, %psr | ||
46 | nop; nop; nop | ||
47 | jmpl %o7, %g0 | ||
48 | mov %g4, %o7 | ||
49 | |||
50 | /* Same as above, but clears the bits from %g2 instead. */ | ||
51 | .globl ___clear_bit | ||
52 | ___clear_bit: | ||
53 | rd %psr, %g3 | ||
54 | nop; nop; nop | ||
55 | or %g3, PSR_PIL, %g5 | ||
56 | wr %g5, 0x0, %psr | ||
57 | nop; nop; nop | ||
58 | #ifdef CONFIG_SMP | ||
59 | set bitops_spinlock, %g5 | ||
60 | 2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP. | ||
61 | orcc %g7, 0x0, %g0 ! Did we get it? | ||
62 | bne 2b ! Nope... | ||
63 | #endif | ||
64 | ld [%g1], %g7 | ||
65 | andn %g7, %g2, %g5 | ||
66 | and %g7, %g2, %g2 | ||
67 | #ifdef CONFIG_SMP | ||
68 | st %g5, [%g1] | ||
69 | set bitops_spinlock, %g5 | ||
70 | stb %g0, [%g5] | ||
71 | #else | ||
72 | st %g5, [%g1] | ||
73 | #endif | ||
74 | wr %g3, 0x0, %psr | ||
75 | nop; nop; nop | ||
76 | jmpl %o7, %g0 | ||
77 | mov %g4, %o7 | ||
78 | |||
79 | /* Same thing again, but this time toggles the bits from %g2. */ | ||
80 | .globl ___change_bit | ||
81 | ___change_bit: | ||
82 | rd %psr, %g3 | ||
83 | nop; nop; nop | ||
84 | or %g3, PSR_PIL, %g5 | ||
85 | wr %g5, 0x0, %psr | ||
86 | nop; nop; nop | ||
87 | #ifdef CONFIG_SMP | ||
88 | set bitops_spinlock, %g5 | ||
89 | 2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP. | ||
90 | orcc %g7, 0x0, %g0 ! Did we get it? | ||
91 | bne 2b ! Nope... | ||
92 | #endif | ||
93 | ld [%g1], %g7 | ||
94 | xor %g7, %g2, %g5 | ||
95 | and %g7, %g2, %g2 | ||
96 | #ifdef CONFIG_SMP | ||
97 | st %g5, [%g1] | ||
98 | set bitops_spinlock, %g5 | ||
99 | stb %g0, [%g5] | ||
100 | #else | ||
101 | st %g5, [%g1] | ||
102 | #endif | ||
103 | wr %g3, 0x0, %psr | ||
104 | nop; nop; nop | ||
105 | jmpl %o7, %g0 | ||
106 | mov %g4, %o7 | ||
107 | |||
108 | .globl __bitops_end | ||
109 | __bitops_end: | ||
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index 03ffaf895a22..baea10a98196 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S | |||
@@ -78,11 +78,7 @@ sparc_ramdisk_image64: | |||
78 | 78 | ||
79 | /* PROM cif handler code address is in %o4. */ | 79 | /* PROM cif handler code address is in %o4. */ |
80 | sparc64_boot: | 80 | sparc64_boot: |
81 | 1: rd %pc, %g7 | 81 | mov %o4, %l7 |
82 | set 1b, %g1 | ||
83 | cmp %g1, %g7 | ||
84 | be,pn %xcc, sparc64_boot_after_remap | ||
85 | mov %o4, %l7 | ||
86 | 82 | ||
87 | /* We need to remap the kernel. Use position independant | 83 | /* We need to remap the kernel. Use position independant |
88 | * code to remap us to KERNBASE. | 84 | * code to remap us to KERNBASE. |
@@ -295,7 +291,6 @@ is_sun4v: | |||
295 | 291 | ||
296 | add %sp, (192 + 128), %sp | 292 | add %sp, (192 + 128), %sp |
297 | 293 | ||
298 | sparc64_boot_after_remap: | ||
299 | sethi %hi(prom_root_compatible), %g1 | 294 | sethi %hi(prom_root_compatible), %g1 |
300 | or %g1, %lo(prom_root_compatible), %g1 | 295 | or %g1, %lo(prom_root_compatible), %g1 |
301 | sethi %hi(prom_sun4v_name), %g7 | 296 | sethi %hi(prom_sun4v_name), %g7 |
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index d64b1ea848de..c3d068c7a412 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -372,14 +372,14 @@ static void run_pre_handler(unsigned int virt_irq) | |||
372 | } | 372 | } |
373 | } | 373 | } |
374 | 374 | ||
375 | static struct hw_interrupt_type sun4u_irq = { | 375 | static struct irq_chip sun4u_irq = { |
376 | .typename = "sun4u", | 376 | .typename = "sun4u", |
377 | .enable = sun4u_irq_enable, | 377 | .enable = sun4u_irq_enable, |
378 | .disable = sun4u_irq_disable, | 378 | .disable = sun4u_irq_disable, |
379 | .end = sun4u_irq_end, | 379 | .end = sun4u_irq_end, |
380 | }; | 380 | }; |
381 | 381 | ||
382 | static struct hw_interrupt_type sun4u_irq_ack = { | 382 | static struct irq_chip sun4u_irq_ack = { |
383 | .typename = "sun4u+ack", | 383 | .typename = "sun4u+ack", |
384 | .enable = sun4u_irq_enable, | 384 | .enable = sun4u_irq_enable, |
385 | .disable = sun4u_irq_disable, | 385 | .disable = sun4u_irq_disable, |
@@ -387,14 +387,14 @@ static struct hw_interrupt_type sun4u_irq_ack = { | |||
387 | .end = sun4u_irq_end, | 387 | .end = sun4u_irq_end, |
388 | }; | 388 | }; |
389 | 389 | ||
390 | static struct hw_interrupt_type sun4v_irq = { | 390 | static struct irq_chip sun4v_irq = { |
391 | .typename = "sun4v", | 391 | .typename = "sun4v", |
392 | .enable = sun4v_irq_enable, | 392 | .enable = sun4v_irq_enable, |
393 | .disable = sun4v_irq_disable, | 393 | .disable = sun4v_irq_disable, |
394 | .end = sun4v_irq_end, | 394 | .end = sun4v_irq_end, |
395 | }; | 395 | }; |
396 | 396 | ||
397 | static struct hw_interrupt_type sun4v_irq_ack = { | 397 | static struct irq_chip sun4v_irq_ack = { |
398 | .typename = "sun4v+ack", | 398 | .typename = "sun4v+ack", |
399 | .enable = sun4v_irq_enable, | 399 | .enable = sun4v_irq_enable, |
400 | .disable = sun4v_irq_disable, | 400 | .disable = sun4v_irq_disable, |
@@ -493,22 +493,6 @@ out: | |||
493 | return bucket->virt_irq; | 493 | return bucket->virt_irq; |
494 | } | 494 | } |
495 | 495 | ||
496 | void hw_resend_irq(struct hw_interrupt_type *handler, unsigned int virt_irq) | ||
497 | { | ||
498 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); | ||
499 | unsigned long pstate; | ||
500 | unsigned int *ent; | ||
501 | |||
502 | __asm__ __volatile__("rdpr %%pstate, %0" : "=r" (pstate)); | ||
503 | __asm__ __volatile__("wrpr %0, %1, %%pstate" | ||
504 | : : "r" (pstate), "i" (PSTATE_IE)); | ||
505 | ent = irq_work(smp_processor_id()); | ||
506 | bucket->irq_chain = *ent; | ||
507 | *ent = __irq(bucket); | ||
508 | set_softint(1 << PIL_DEVICE_IRQ); | ||
509 | __asm__ __volatile__("wrpr %0, 0x0, %%pstate" : : "r" (pstate)); | ||
510 | } | ||
511 | |||
512 | void ack_bad_irq(unsigned int virt_irq) | 496 | void ack_bad_irq(unsigned int virt_irq) |
513 | { | 497 | { |
514 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); | 498 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index cc09d8266414..0a4958536bcd 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -1447,11 +1447,8 @@ void __init setup_per_cpu_areas(void) | |||
1447 | char *ptr; | 1447 | char *ptr; |
1448 | 1448 | ||
1449 | /* Copy section for each CPU (we discard the original) */ | 1449 | /* Copy section for each CPU (we discard the original) */ |
1450 | goal = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES); | 1450 | goal = PERCPU_ENOUGH_ROOM; |
1451 | #ifdef CONFIG_MODULES | 1451 | |
1452 | if (goal < PERCPU_ENOUGH_ROOM) | ||
1453 | goal = PERCPU_ENOUGH_ROOM; | ||
1454 | #endif | ||
1455 | __per_cpu_shift = 0; | 1452 | __per_cpu_shift = 0; |
1456 | for (size = 1UL; size < goal; size <<= 1UL) | 1453 | for (size = 1UL; size < goal; size <<= 1UL) |
1457 | __per_cpu_shift++; | 1454 | __per_cpu_shift++; |
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index b471b8550d03..2941a915d4ef 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile | |||
@@ -45,9 +45,7 @@ cflags-kernel-$(CONFIG_REORDER) += -ffunction-sections | |||
45 | # actually it makes the kernel smaller too. | 45 | # actually it makes the kernel smaller too. |
46 | cflags-y += -fno-reorder-blocks | 46 | cflags-y += -fno-reorder-blocks |
47 | cflags-y += -Wno-sign-compare | 47 | cflags-y += -Wno-sign-compare |
48 | ifneq ($(CONFIG_UNWIND_INFO),y) | ||
49 | cflags-y += -fno-asynchronous-unwind-tables | 48 | cflags-y += -fno-asynchronous-unwind-tables |
50 | endif | ||
51 | ifneq ($(CONFIG_DEBUG_INFO),y) | 49 | ifneq ($(CONFIG_DEBUG_INFO),y) |
52 | # -fweb shrinks the kernel a bit, but the difference is very small | 50 | # -fweb shrinks the kernel a bit, but the difference is very small |
53 | # it also messes up debugging, so don't use it for now. | 51 | # it also messes up debugging, so don't use it for now. |
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index 1a1c6a1a299b..ac80b1209fc0 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig | |||
@@ -1523,8 +1523,6 @@ CONFIG_DEBUG_FS=y | |||
1523 | # CONFIG_DEBUG_VM is not set | 1523 | # CONFIG_DEBUG_VM is not set |
1524 | # CONFIG_DEBUG_LIST is not set | 1524 | # CONFIG_DEBUG_LIST is not set |
1525 | # CONFIG_FRAME_POINTER is not set | 1525 | # CONFIG_FRAME_POINTER is not set |
1526 | CONFIG_UNWIND_INFO=y | ||
1527 | CONFIG_STACK_UNWIND=y | ||
1528 | # CONFIG_FORCED_INLINING is not set | 1526 | # CONFIG_FORCED_INLINING is not set |
1529 | # CONFIG_HEADERS_CHECK is not set | 1527 | # CONFIG_HEADERS_CHECK is not set |
1530 | # CONFIG_RCU_TORTURE_TEST is not set | 1528 | # CONFIG_RCU_TORTURE_TEST is not set |
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 601d332c4b79..9f5dac64aa8f 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -1155,36 +1155,3 @@ ENTRY(call_softirq) | |||
1155 | ret | 1155 | ret |
1156 | CFI_ENDPROC | 1156 | CFI_ENDPROC |
1157 | ENDPROC(call_softirq) | 1157 | ENDPROC(call_softirq) |
1158 | |||
1159 | #ifdef CONFIG_STACK_UNWIND | ||
1160 | ENTRY(arch_unwind_init_running) | ||
1161 | CFI_STARTPROC | ||
1162 | movq %r15, R15(%rdi) | ||
1163 | movq %r14, R14(%rdi) | ||
1164 | xchgq %rsi, %rdx | ||
1165 | movq %r13, R13(%rdi) | ||
1166 | movq %r12, R12(%rdi) | ||
1167 | xorl %eax, %eax | ||
1168 | movq %rbp, RBP(%rdi) | ||
1169 | movq %rbx, RBX(%rdi) | ||
1170 | movq (%rsp), %rcx | ||
1171 | movq %rax, R11(%rdi) | ||
1172 | movq %rax, R10(%rdi) | ||
1173 | movq %rax, R9(%rdi) | ||
1174 | movq %rax, R8(%rdi) | ||
1175 | movq %rax, RAX(%rdi) | ||
1176 | movq %rax, RCX(%rdi) | ||
1177 | movq %rax, RDX(%rdi) | ||
1178 | movq %rax, RSI(%rdi) | ||
1179 | movq %rax, RDI(%rdi) | ||
1180 | movq %rax, ORIG_RAX(%rdi) | ||
1181 | movq %rcx, RIP(%rdi) | ||
1182 | leaq 8(%rsp), %rcx | ||
1183 | movq $__KERNEL_CS, CS(%rdi) | ||
1184 | movq %rax, EFLAGS(%rdi) | ||
1185 | movq %rcx, RSP(%rdi) | ||
1186 | movq $__KERNEL_DS, SS(%rdi) | ||
1187 | jmpq *%rdx | ||
1188 | CFI_ENDPROC | ||
1189 | ENDPROC(arch_unwind_init_running) | ||
1190 | #endif | ||
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index b54ccc07f379..1d9eb6db732a 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -110,11 +110,6 @@ static inline void preempt_conditional_cli(struct pt_regs *regs) | |||
110 | } | 110 | } |
111 | 111 | ||
112 | int kstack_depth_to_print = 12; | 112 | int kstack_depth_to_print = 12; |
113 | #ifdef CONFIG_STACK_UNWIND | ||
114 | static int call_trace = 1; | ||
115 | #else | ||
116 | #define call_trace (-1) | ||
117 | #endif | ||
118 | 113 | ||
119 | #ifdef CONFIG_KALLSYMS | 114 | #ifdef CONFIG_KALLSYMS |
120 | void printk_address(unsigned long address) | 115 | void printk_address(unsigned long address) |
@@ -217,32 +212,6 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, | |||
217 | return NULL; | 212 | return NULL; |
218 | } | 213 | } |
219 | 214 | ||
220 | struct ops_and_data { | ||
221 | struct stacktrace_ops *ops; | ||
222 | void *data; | ||
223 | }; | ||
224 | |||
225 | static int dump_trace_unwind(struct unwind_frame_info *info, void *context) | ||
226 | { | ||
227 | struct ops_and_data *oad = (struct ops_and_data *)context; | ||
228 | int n = 0; | ||
229 | unsigned long sp = UNW_SP(info); | ||
230 | |||
231 | if (arch_unw_user_mode(info)) | ||
232 | return -1; | ||
233 | while (unwind(info) == 0 && UNW_PC(info)) { | ||
234 | n++; | ||
235 | oad->ops->address(oad->data, UNW_PC(info)); | ||
236 | if (arch_unw_user_mode(info)) | ||
237 | break; | ||
238 | if ((sp & ~(PAGE_SIZE - 1)) == (UNW_SP(info) & ~(PAGE_SIZE - 1)) | ||
239 | && sp > UNW_SP(info)) | ||
240 | break; | ||
241 | sp = UNW_SP(info); | ||
242 | } | ||
243 | return n; | ||
244 | } | ||
245 | |||
246 | #define MSG(txt) ops->warning(data, txt) | 215 | #define MSG(txt) ops->warning(data, txt) |
247 | 216 | ||
248 | /* | 217 | /* |
@@ -270,40 +239,6 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, | |||
270 | if (!tsk) | 239 | if (!tsk) |
271 | tsk = current; | 240 | tsk = current; |
272 | 241 | ||
273 | if (call_trace >= 0) { | ||
274 | int unw_ret = 0; | ||
275 | struct unwind_frame_info info; | ||
276 | struct ops_and_data oad = { .ops = ops, .data = data }; | ||
277 | |||
278 | if (regs) { | ||
279 | if (unwind_init_frame_info(&info, tsk, regs) == 0) | ||
280 | unw_ret = dump_trace_unwind(&info, &oad); | ||
281 | } else if (tsk == current) | ||
282 | unw_ret = unwind_init_running(&info, dump_trace_unwind, | ||
283 | &oad); | ||
284 | else { | ||
285 | if (unwind_init_blocked(&info, tsk) == 0) | ||
286 | unw_ret = dump_trace_unwind(&info, &oad); | ||
287 | } | ||
288 | if (unw_ret > 0) { | ||
289 | if (call_trace == 1 && !arch_unw_user_mode(&info)) { | ||
290 | ops->warning_symbol(data, | ||
291 | "DWARF2 unwinder stuck at %s", | ||
292 | UNW_PC(&info)); | ||
293 | if ((long)UNW_SP(&info) < 0) { | ||
294 | MSG("Leftover inexact backtrace:"); | ||
295 | stack = (unsigned long *)UNW_SP(&info); | ||
296 | if (!stack) | ||
297 | goto out; | ||
298 | } else | ||
299 | MSG("Full inexact backtrace again:"); | ||
300 | } else if (call_trace >= 1) | ||
301 | goto out; | ||
302 | else | ||
303 | MSG("Full inexact backtrace again:"); | ||
304 | } else | ||
305 | MSG("Inexact backtrace:"); | ||
306 | } | ||
307 | if (!stack) { | 242 | if (!stack) { |
308 | unsigned long dummy; | 243 | unsigned long dummy; |
309 | stack = &dummy; | 244 | stack = &dummy; |
@@ -387,7 +322,6 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, | |||
387 | tinfo = current_thread_info(); | 322 | tinfo = current_thread_info(); |
388 | HANDLE_STACK (valid_stack_ptr(tinfo, stack)); | 323 | HANDLE_STACK (valid_stack_ptr(tinfo, stack)); |
389 | #undef HANDLE_STACK | 324 | #undef HANDLE_STACK |
390 | out: | ||
391 | put_cpu(); | 325 | put_cpu(); |
392 | } | 326 | } |
393 | EXPORT_SYMBOL(dump_trace); | 327 | EXPORT_SYMBOL(dump_trace); |
@@ -1188,21 +1122,3 @@ static int __init kstack_setup(char *s) | |||
1188 | return 0; | 1122 | return 0; |
1189 | } | 1123 | } |
1190 | early_param("kstack", kstack_setup); | 1124 | early_param("kstack", kstack_setup); |
1191 | |||
1192 | #ifdef CONFIG_STACK_UNWIND | ||
1193 | static int __init call_trace_setup(char *s) | ||
1194 | { | ||
1195 | if (!s) | ||
1196 | return -EINVAL; | ||
1197 | if (strcmp(s, "old") == 0) | ||
1198 | call_trace = -1; | ||
1199 | else if (strcmp(s, "both") == 0) | ||
1200 | call_trace = 0; | ||
1201 | else if (strcmp(s, "newfallback") == 0) | ||
1202 | call_trace = 1; | ||
1203 | else if (strcmp(s, "new") == 0) | ||
1204 | call_trace = 2; | ||
1205 | return 0; | ||
1206 | } | ||
1207 | early_param("call_trace", call_trace_setup); | ||
1208 | #endif | ||
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S index 514be5dd2303..1e54ddf2338d 100644 --- a/arch/x86_64/kernel/vmlinux.lds.S +++ b/arch/x86_64/kernel/vmlinux.lds.S | |||
@@ -221,9 +221,7 @@ SECTIONS | |||
221 | /* Sections to be discarded */ | 221 | /* Sections to be discarded */ |
222 | /DISCARD/ : { | 222 | /DISCARD/ : { |
223 | *(.exitcall.exit) | 223 | *(.exitcall.exit) |
224 | #ifndef CONFIG_UNWIND_INFO | ||
225 | *(.eh_frame) | 224 | *(.eh_frame) |
226 | #endif | ||
227 | } | 225 | } |
228 | 226 | ||
229 | STABS_DEBUG | 227 | STABS_DEBUG |
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 984ab284382a..b34e0a958d0f 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig | |||
@@ -40,9 +40,9 @@ config ATA_PIIX | |||
40 | tristate "Intel PIIX/ICH SATA support" | 40 | tristate "Intel PIIX/ICH SATA support" |
41 | depends on PCI | 41 | depends on PCI |
42 | help | 42 | help |
43 | This option enables support for ICH5/6/7/8 Serial ATA. | 43 | This option enables support for ICH5/6/7/8 Serial ATA |
44 | If PATA support was enabled previously, this enables | 44 | and support for PATA on the Intel PIIX3/PIIX4/ICH series |
45 | support for select Intel PIIX/ICH PATA host controllers. | 45 | PATA host controllers. |
46 | 46 | ||
47 | If unsure, say N. | 47 | If unsure, say N. |
48 | 48 | ||
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index f36da488a2c1..dbae6d971041 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -645,8 +645,6 @@ static int ahci_reset_controller(void __iomem *mmio, struct pci_dev *pdev) | |||
645 | u32 cap_save, impl_save, tmp; | 645 | u32 cap_save, impl_save, tmp; |
646 | 646 | ||
647 | cap_save = readl(mmio + HOST_CAP); | 647 | cap_save = readl(mmio + HOST_CAP); |
648 | cap_save &= ( (1<<28) | (1<<17) ); | ||
649 | cap_save |= (1 << 27); | ||
650 | impl_save = readl(mmio + HOST_PORTS_IMPL); | 648 | impl_save = readl(mmio + HOST_PORTS_IMPL); |
651 | 649 | ||
652 | /* global controller reset */ | 650 | /* global controller reset */ |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index c7de0bb1591f..47701b286f8b 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -226,14 +226,26 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
226 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 226 | { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
227 | /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ | 227 | /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ |
228 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, | 228 | { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, |
229 | /* Enterprise Southbridge 2 (where's the datasheet?) */ | 229 | /* Enterprise Southbridge 2 (631xESB/632xESB) */ |
230 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, | 230 | { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, |
231 | /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ | 231 | /* SATA Controller 1 IDE (ICH8) */ |
232 | { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | 232 | { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, |
233 | /* SATA Controller 2 IDE (ICH8, ditto) */ | 233 | /* SATA Controller 2 IDE (ICH8) */ |
234 | { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | 234 | { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, |
235 | /* Mobile SATA Controller IDE (ICH8M, ditto) */ | 235 | /* Mobile SATA Controller IDE (ICH8M) */ |
236 | { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | 236 | { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, |
237 | /* SATA Controller IDE (ICH9) */ | ||
238 | { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | ||
239 | /* SATA Controller IDE (ICH9) */ | ||
240 | { 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | ||
241 | /* SATA Controller IDE (ICH9) */ | ||
242 | { 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | ||
243 | /* SATA Controller IDE (ICH9M) */ | ||
244 | { 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | ||
245 | /* SATA Controller IDE (ICH9M) */ | ||
246 | { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | ||
247 | /* SATA Controller IDE (ICH9M) */ | ||
248 | { 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | ||
237 | 249 | ||
238 | { } /* terminate list */ | 250 | { } /* terminate list */ |
239 | }; | 251 | }; |
@@ -330,7 +342,7 @@ static const struct ata_port_operations ich_pata_ops = { | |||
330 | 342 | ||
331 | .port_start = ata_port_start, | 343 | .port_start = ata_port_start, |
332 | .port_stop = ata_port_stop, | 344 | .port_stop = ata_port_stop, |
333 | .host_stop = ata_host_stop, | 345 | .host_stop = piix_host_stop, |
334 | }; | 346 | }; |
335 | 347 | ||
336 | static const struct ata_port_operations piix_sata_ops = { | 348 | static const struct ata_port_operations piix_sata_ops = { |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 011c0a8a2dcc..0d51d13b16bf 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -1332,7 +1332,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, | |||
1332 | } | 1332 | } |
1333 | 1333 | ||
1334 | /** | 1334 | /** |
1335 | * ata_exec_internal_sg - execute libata internal command | 1335 | * ata_exec_internal - execute libata internal command |
1336 | * @dev: Device to which the command is sent | 1336 | * @dev: Device to which the command is sent |
1337 | * @tf: Taskfile registers for the command and the result | 1337 | * @tf: Taskfile registers for the command and the result |
1338 | * @cdb: CDB for packet command | 1338 | * @cdb: CDB for packet command |
@@ -1353,11 +1353,17 @@ unsigned ata_exec_internal(struct ata_device *dev, | |||
1353 | struct ata_taskfile *tf, const u8 *cdb, | 1353 | struct ata_taskfile *tf, const u8 *cdb, |
1354 | int dma_dir, void *buf, unsigned int buflen) | 1354 | int dma_dir, void *buf, unsigned int buflen) |
1355 | { | 1355 | { |
1356 | struct scatterlist sg; | 1356 | struct scatterlist *psg = NULL, sg; |
1357 | unsigned int n_elem = 0; | ||
1357 | 1358 | ||
1358 | sg_init_one(&sg, buf, buflen); | 1359 | if (dma_dir != DMA_NONE) { |
1360 | WARN_ON(!buf); | ||
1361 | sg_init_one(&sg, buf, buflen); | ||
1362 | psg = &sg; | ||
1363 | n_elem++; | ||
1364 | } | ||
1359 | 1365 | ||
1360 | return ata_exec_internal_sg(dev, tf, cdb, dma_dir, &sg, 1); | 1366 | return ata_exec_internal_sg(dev, tf, cdb, dma_dir, psg, n_elem); |
1361 | } | 1367 | } |
1362 | 1368 | ||
1363 | /** | 1369 | /** |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 664e1377b54c..a4790be41d1c 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1539,7 +1539,7 @@ static unsigned int ata_scsi_rbuf_get(struct scsi_cmnd *cmd, u8 **buf_out) | |||
1539 | struct scatterlist *sg; | 1539 | struct scatterlist *sg; |
1540 | 1540 | ||
1541 | sg = (struct scatterlist *) cmd->request_buffer; | 1541 | sg = (struct scatterlist *) cmd->request_buffer; |
1542 | buf = kmap_atomic(sg->page, KM_USER0) + sg->offset; | 1542 | buf = kmap_atomic(sg->page, KM_IRQ0) + sg->offset; |
1543 | buflen = sg->length; | 1543 | buflen = sg->length; |
1544 | } else { | 1544 | } else { |
1545 | buf = cmd->request_buffer; | 1545 | buf = cmd->request_buffer; |
@@ -1567,7 +1567,7 @@ static inline void ata_scsi_rbuf_put(struct scsi_cmnd *cmd, u8 *buf) | |||
1567 | struct scatterlist *sg; | 1567 | struct scatterlist *sg; |
1568 | 1568 | ||
1569 | sg = (struct scatterlist *) cmd->request_buffer; | 1569 | sg = (struct scatterlist *) cmd->request_buffer; |
1570 | kunmap_atomic(buf - sg->offset, KM_USER0); | 1570 | kunmap_atomic(buf - sg->offset, KM_IRQ0); |
1571 | } | 1571 | } |
1572 | } | 1572 | } |
1573 | 1573 | ||
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index c7d1738e4e69..e7bf9d89c8ee 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c | |||
@@ -698,8 +698,10 @@ static __init int legacy_init_one(int port, unsigned long io, unsigned long ctrl | |||
698 | goto fail_io; | 698 | goto fail_io; |
699 | 699 | ||
700 | pdev = platform_device_register_simple(DRV_NAME, nr_legacy_host, NULL, 0); | 700 | pdev = platform_device_register_simple(DRV_NAME, nr_legacy_host, NULL, 0); |
701 | if (pdev == NULL) | 701 | if (IS_ERR(pdev)) { |
702 | ret = PTR_ERR(pdev); | ||
702 | goto fail_dev; | 703 | goto fail_dev; |
704 | } | ||
703 | 705 | ||
704 | if (ht6560a & mask) { | 706 | if (ht6560a & mask) { |
705 | ops = &ht6560a_port_ops; | 707 | ops = &ht6560a_port_ops; |
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c index 36f621abc390..afc0d990e7d6 100644 --- a/drivers/ata/pata_qdi.c +++ b/drivers/ata/pata_qdi.c | |||
@@ -247,8 +247,8 @@ static __init int qdi_init_one(unsigned long port, int type, unsigned long io, i | |||
247 | */ | 247 | */ |
248 | 248 | ||
249 | pdev = platform_device_register_simple(DRV_NAME, nr_qdi_host, NULL, 0); | 249 | pdev = platform_device_register_simple(DRV_NAME, nr_qdi_host, NULL, 0); |
250 | if (pdev == NULL) | 250 | if (IS_ERR(pdev)) |
251 | return -ENOMEM; | 251 | return PTR_ERR(pdev); |
252 | 252 | ||
253 | memset(&ae, 0, sizeof(struct ata_probe_ent)); | 253 | memset(&ae, 0, sizeof(struct ata_probe_ent)); |
254 | INIT_LIST_HEAD(&ae.node); | 254 | INIT_LIST_HEAD(&ae.node); |
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c index 3677c642c9f9..adf4cc134f25 100644 --- a/drivers/ata/pata_rz1000.c +++ b/drivers/ata/pata_rz1000.c | |||
@@ -105,8 +105,6 @@ static struct ata_port_operations rz1000_port_ops = { | |||
105 | .exec_command = ata_exec_command, | 105 | .exec_command = ata_exec_command, |
106 | .dev_select = ata_std_dev_select, | 106 | .dev_select = ata_std_dev_select, |
107 | 107 | ||
108 | .error_handler = rz1000_error_handler, | ||
109 | |||
110 | .bmdma_setup = ata_bmdma_setup, | 108 | .bmdma_setup = ata_bmdma_setup, |
111 | .bmdma_start = ata_bmdma_start, | 109 | .bmdma_start = ata_bmdma_start, |
112 | .bmdma_stop = ata_bmdma_stop, | 110 | .bmdma_stop = ata_bmdma_stop, |
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index cc09d47fb927..ff93e8f71cf8 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -161,10 +161,15 @@ static int via_pre_reset(struct ata_port *ap) | |||
161 | return -ENOENT; | 161 | return -ENOENT; |
162 | } | 162 | } |
163 | 163 | ||
164 | if ((config->flags & VIA_UDMA) >= VIA_UDMA_66) | 164 | if ((config->flags & VIA_UDMA) >= VIA_UDMA_100) |
165 | ap->cbl = via_cable_detect(ap); | 165 | ap->cbl = via_cable_detect(ap); |
166 | else | 166 | /* The UDMA66 series has no cable detect so do drive side detect */ |
167 | else if ((config->flags & VIA_UDMA) < VIA_UDMA_66) | ||
167 | ap->cbl = ATA_CBL_PATA40; | 168 | ap->cbl = ATA_CBL_PATA40; |
169 | else | ||
170 | ap->cbl = ATA_CBL_PATA_UNK; | ||
171 | |||
172 | |||
168 | return ata_std_prereset(ap); | 173 | return ata_std_prereset(ap); |
169 | } | 174 | } |
170 | 175 | ||
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c index 3ea345cde52e..5d1f518e1cc7 100644 --- a/drivers/ata/pata_winbond.c +++ b/drivers/ata/pata_winbond.c | |||
@@ -206,8 +206,8 @@ static __init int winbond_init_one(unsigned long port) | |||
206 | */ | 206 | */ |
207 | 207 | ||
208 | pdev = platform_device_register_simple(DRV_NAME, nr_winbond_host, NULL, 0); | 208 | pdev = platform_device_register_simple(DRV_NAME, nr_winbond_host, NULL, 0); |
209 | if (pdev == NULL) | 209 | if (IS_ERR(pdev)) |
210 | return -ENOMEM; | 210 | return PTR_ERR(pdev); |
211 | 211 | ||
212 | memset(&ae, 0, sizeof(struct ata_probe_ent)); | 212 | memset(&ae, 0, sizeof(struct ata_probe_ent)); |
213 | INIT_LIST_HEAD(&ae.node); | 213 | INIT_LIST_HEAD(&ae.node); |
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c index db32d15b7fa1..d89c9590b845 100644 --- a/drivers/ata/sata_svw.c +++ b/drivers/ata/sata_svw.c | |||
@@ -56,6 +56,8 @@ | |||
56 | #define DRV_VERSION "2.0" | 56 | #define DRV_VERSION "2.0" |
57 | 57 | ||
58 | enum { | 58 | enum { |
59 | K2_FLAG_NO_ATAPI_DMA = (1 << 29), | ||
60 | |||
59 | /* Taskfile registers offsets */ | 61 | /* Taskfile registers offsets */ |
60 | K2_SATA_TF_CMD_OFFSET = 0x00, | 62 | K2_SATA_TF_CMD_OFFSET = 0x00, |
61 | K2_SATA_TF_DATA_OFFSET = 0x00, | 63 | K2_SATA_TF_DATA_OFFSET = 0x00, |
@@ -83,11 +85,33 @@ enum { | |||
83 | 85 | ||
84 | /* Port stride */ | 86 | /* Port stride */ |
85 | K2_SATA_PORT_OFFSET = 0x100, | 87 | K2_SATA_PORT_OFFSET = 0x100, |
88 | |||
89 | board_svw4 = 0, | ||
90 | board_svw8 = 1, | ||
91 | }; | ||
92 | |||
93 | static const struct k2_board_info { | ||
94 | unsigned int n_ports; | ||
95 | unsigned long port_flags; | ||
96 | } k2_board_info[] = { | ||
97 | /* board_svw4 */ | ||
98 | { 4, K2_FLAG_NO_ATAPI_DMA }, | ||
99 | |||
100 | /* board_svw8 */ | ||
101 | { 8, K2_FLAG_NO_ATAPI_DMA }, | ||
86 | }; | 102 | }; |
87 | 103 | ||
88 | static u8 k2_stat_check_status(struct ata_port *ap); | 104 | static u8 k2_stat_check_status(struct ata_port *ap); |
89 | 105 | ||
90 | 106 | ||
107 | static int k2_sata_check_atapi_dma(struct ata_queued_cmd *qc) | ||
108 | { | ||
109 | if (qc->ap->flags & K2_FLAG_NO_ATAPI_DMA) | ||
110 | return -1; /* ATAPI DMA not supported */ | ||
111 | |||
112 | return 0; | ||
113 | } | ||
114 | |||
91 | static u32 k2_sata_scr_read (struct ata_port *ap, unsigned int sc_reg) | 115 | static u32 k2_sata_scr_read (struct ata_port *ap, unsigned int sc_reg) |
92 | { | 116 | { |
93 | if (sc_reg > SCR_CONTROL) | 117 | if (sc_reg > SCR_CONTROL) |
@@ -313,6 +337,7 @@ static const struct ata_port_operations k2_sata_ops = { | |||
313 | .check_status = k2_stat_check_status, | 337 | .check_status = k2_stat_check_status, |
314 | .exec_command = ata_exec_command, | 338 | .exec_command = ata_exec_command, |
315 | .dev_select = ata_std_dev_select, | 339 | .dev_select = ata_std_dev_select, |
340 | .check_atapi_dma = k2_sata_check_atapi_dma, | ||
316 | .bmdma_setup = k2_bmdma_setup_mmio, | 341 | .bmdma_setup = k2_bmdma_setup_mmio, |
317 | .bmdma_start = k2_bmdma_start_mmio, | 342 | .bmdma_start = k2_bmdma_start_mmio, |
318 | .bmdma_stop = ata_bmdma_stop, | 343 | .bmdma_stop = ata_bmdma_stop, |
@@ -359,6 +384,8 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
359 | struct ata_probe_ent *probe_ent = NULL; | 384 | struct ata_probe_ent *probe_ent = NULL; |
360 | unsigned long base; | 385 | unsigned long base; |
361 | void __iomem *mmio_base; | 386 | void __iomem *mmio_base; |
387 | const struct k2_board_info *board_info = | ||
388 | &k2_board_info[ent->driver_data]; | ||
362 | int pci_dev_busy = 0; | 389 | int pci_dev_busy = 0; |
363 | int rc; | 390 | int rc; |
364 | int i; | 391 | int i; |
@@ -424,7 +451,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
424 | 451 | ||
425 | probe_ent->sht = &k2_sata_sht; | 452 | probe_ent->sht = &k2_sata_sht; |
426 | probe_ent->port_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | | 453 | probe_ent->port_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | |
427 | ATA_FLAG_MMIO; | 454 | ATA_FLAG_MMIO | board_info->port_flags; |
428 | probe_ent->port_ops = &k2_sata_ops; | 455 | probe_ent->port_ops = &k2_sata_ops; |
429 | probe_ent->n_ports = 4; | 456 | probe_ent->n_ports = 4; |
430 | probe_ent->irq = pdev->irq; | 457 | probe_ent->irq = pdev->irq; |
@@ -441,7 +468,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
441 | /* different controllers have different number of ports - currently 4 or 8 */ | 468 | /* different controllers have different number of ports - currently 4 or 8 */ |
442 | /* All ports are on the same function. Multi-function device is no | 469 | /* All ports are on the same function. Multi-function device is no |
443 | * longer available. This should not be seen in any system. */ | 470 | * longer available. This should not be seen in any system. */ |
444 | for (i = 0; i < ent->driver_data; i++) | 471 | for (i = 0; i < board_info->n_ports; i++) |
445 | k2_sata_setup_port(&probe_ent->port[i], base + i * K2_SATA_PORT_OFFSET); | 472 | k2_sata_setup_port(&probe_ent->port[i], base + i * K2_SATA_PORT_OFFSET); |
446 | 473 | ||
447 | pci_set_master(pdev); | 474 | pci_set_master(pdev); |
@@ -469,11 +496,11 @@ err_out: | |||
469 | * controller | 496 | * controller |
470 | * */ | 497 | * */ |
471 | static const struct pci_device_id k2_sata_pci_tbl[] = { | 498 | static const struct pci_device_id k2_sata_pci_tbl[] = { |
472 | { PCI_VDEVICE(SERVERWORKS, 0x0240), 4 }, | 499 | { PCI_VDEVICE(SERVERWORKS, 0x0240), board_svw4 }, |
473 | { PCI_VDEVICE(SERVERWORKS, 0x0241), 4 }, | 500 | { PCI_VDEVICE(SERVERWORKS, 0x0241), board_svw4 }, |
474 | { PCI_VDEVICE(SERVERWORKS, 0x0242), 8 }, | 501 | { PCI_VDEVICE(SERVERWORKS, 0x0242), board_svw8 }, |
475 | { PCI_VDEVICE(SERVERWORKS, 0x024a), 4 }, | 502 | { PCI_VDEVICE(SERVERWORKS, 0x024a), board_svw4 }, |
476 | { PCI_VDEVICE(SERVERWORKS, 0x024b), 4 }, | 503 | { PCI_VDEVICE(SERVERWORKS, 0x024b), board_svw4 }, |
477 | 504 | ||
478 | { } | 505 | { } |
479 | }; | 506 | }; |
diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c index b418b16e910e..296f51002b55 100644 --- a/drivers/connector/cn_queue.c +++ b/drivers/connector/cn_queue.c | |||
@@ -34,7 +34,7 @@ | |||
34 | void cn_queue_wrapper(struct work_struct *work) | 34 | void cn_queue_wrapper(struct work_struct *work) |
35 | { | 35 | { |
36 | struct cn_callback_entry *cbq = | 36 | struct cn_callback_entry *cbq = |
37 | container_of(work, struct cn_callback_entry, work.work); | 37 | container_of(work, struct cn_callback_entry, work); |
38 | struct cn_callback_data *d = &cbq->data; | 38 | struct cn_callback_data *d = &cbq->data; |
39 | 39 | ||
40 | d->callback(d->callback_priv); | 40 | d->callback(d->callback_priv); |
@@ -59,13 +59,12 @@ static struct cn_callback_entry *cn_queue_alloc_callback_entry(char *name, struc | |||
59 | memcpy(&cbq->id.id, id, sizeof(struct cb_id)); | 59 | memcpy(&cbq->id.id, id, sizeof(struct cb_id)); |
60 | cbq->data.callback = callback; | 60 | cbq->data.callback = callback; |
61 | 61 | ||
62 | INIT_DELAYED_WORK(&cbq->work, &cn_queue_wrapper); | 62 | INIT_WORK(&cbq->work, &cn_queue_wrapper); |
63 | return cbq; | 63 | return cbq; |
64 | } | 64 | } |
65 | 65 | ||
66 | static void cn_queue_free_callback(struct cn_callback_entry *cbq) | 66 | static void cn_queue_free_callback(struct cn_callback_entry *cbq) |
67 | { | 67 | { |
68 | cancel_delayed_work(&cbq->work); | ||
69 | flush_workqueue(cbq->pdev->cn_queue); | 68 | flush_workqueue(cbq->pdev->cn_queue); |
70 | 69 | ||
71 | kfree(cbq); | 70 | kfree(cbq); |
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index 5e7cd45d10ee..a44db75bc25b 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c | |||
@@ -135,17 +135,15 @@ static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), v | |||
135 | spin_lock_bh(&dev->cbdev->queue_lock); | 135 | spin_lock_bh(&dev->cbdev->queue_lock); |
136 | list_for_each_entry(__cbq, &dev->cbdev->queue_list, callback_entry) { | 136 | list_for_each_entry(__cbq, &dev->cbdev->queue_list, callback_entry) { |
137 | if (cn_cb_equal(&__cbq->id.id, &msg->id)) { | 137 | if (cn_cb_equal(&__cbq->id.id, &msg->id)) { |
138 | if (likely(!test_bit(WORK_STRUCT_PENDING, | 138 | if (likely(!work_pending(&__cbq->work) && |
139 | &__cbq->work.work.management) && | ||
140 | __cbq->data.ddata == NULL)) { | 139 | __cbq->data.ddata == NULL)) { |
141 | __cbq->data.callback_priv = msg; | 140 | __cbq->data.callback_priv = msg; |
142 | 141 | ||
143 | __cbq->data.ddata = data; | 142 | __cbq->data.ddata = data; |
144 | __cbq->data.destruct_data = destruct_data; | 143 | __cbq->data.destruct_data = destruct_data; |
145 | 144 | ||
146 | if (queue_delayed_work( | 145 | if (queue_work(dev->cbdev->cn_queue, |
147 | dev->cbdev->cn_queue, | 146 | &__cbq->work)) |
148 | &__cbq->work, 0)) | ||
149 | err = 0; | 147 | err = 0; |
150 | } else { | 148 | } else { |
151 | struct cn_callback_data *d; | 149 | struct cn_callback_data *d; |
@@ -159,12 +157,11 @@ static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), v | |||
159 | d->destruct_data = destruct_data; | 157 | d->destruct_data = destruct_data; |
160 | d->free = __cbq; | 158 | d->free = __cbq; |
161 | 159 | ||
162 | INIT_DELAYED_WORK(&__cbq->work, | 160 | INIT_WORK(&__cbq->work, |
163 | &cn_queue_wrapper); | 161 | &cn_queue_wrapper); |
164 | 162 | ||
165 | if (queue_delayed_work( | 163 | if (queue_work(dev->cbdev->cn_queue, |
166 | dev->cbdev->cn_queue, | 164 | &__cbq->work)) |
167 | &__cbq->work, 0)) | ||
168 | err = 0; | 165 | err = 0; |
169 | else { | 166 | else { |
170 | kfree(__cbq); | 167 | kfree(__cbq); |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 9fb2edf36611..d91330432ba2 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -959,7 +959,7 @@ static void cpufreq_out_of_sync(unsigned int cpu, unsigned int old_freq, | |||
959 | 959 | ||
960 | 960 | ||
961 | /** | 961 | /** |
962 | * cpufreq_quick_get - get the CPU frequency (in kHz) frpm policy->cur | 962 | * cpufreq_quick_get - get the CPU frequency (in kHz) from policy->cur |
963 | * @cpu: CPU number | 963 | * @cpu: CPU number |
964 | * | 964 | * |
965 | * This is the last known freq, without actually getting it from the driver. | 965 | * This is the last known freq, without actually getting it from the driver. |
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 14cdf09316ce..998638020ea0 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -415,12 +415,31 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
415 | case 0x000: goto ignore; | 415 | case 0x000: goto ignore; |
416 | case 0x034: map_key_clear(KEY_SLEEP); break; | 416 | case 0x034: map_key_clear(KEY_SLEEP); break; |
417 | case 0x036: map_key_clear(BTN_MISC); break; | 417 | case 0x036: map_key_clear(BTN_MISC); break; |
418 | case 0x040: map_key_clear(KEY_MENU); break; | ||
418 | case 0x045: map_key_clear(KEY_RADIO); break; | 419 | case 0x045: map_key_clear(KEY_RADIO); break; |
420 | |||
421 | case 0x088: map_key_clear(KEY_PC); break; | ||
422 | case 0x089: map_key_clear(KEY_TV); break; | ||
419 | case 0x08a: map_key_clear(KEY_WWW); break; | 423 | case 0x08a: map_key_clear(KEY_WWW); break; |
424 | case 0x08b: map_key_clear(KEY_DVD); break; | ||
425 | case 0x08c: map_key_clear(KEY_PHONE); break; | ||
420 | case 0x08d: map_key_clear(KEY_PROGRAM); break; | 426 | case 0x08d: map_key_clear(KEY_PROGRAM); break; |
427 | case 0x08e: map_key_clear(KEY_VIDEOPHONE); break; | ||
428 | case 0x08f: map_key_clear(KEY_GAMES); break; | ||
429 | case 0x090: map_key_clear(KEY_MEMO); break; | ||
430 | case 0x091: map_key_clear(KEY_CD); break; | ||
431 | case 0x092: map_key_clear(KEY_VCR); break; | ||
432 | case 0x093: map_key_clear(KEY_TUNER); break; | ||
433 | case 0x094: map_key_clear(KEY_EXIT); break; | ||
421 | case 0x095: map_key_clear(KEY_HELP); break; | 434 | case 0x095: map_key_clear(KEY_HELP); break; |
435 | case 0x096: map_key_clear(KEY_TAPE); break; | ||
436 | case 0x097: map_key_clear(KEY_TV2); break; | ||
437 | case 0x098: map_key_clear(KEY_SAT); break; | ||
438 | |||
422 | case 0x09c: map_key_clear(KEY_CHANNELUP); break; | 439 | case 0x09c: map_key_clear(KEY_CHANNELUP); break; |
423 | case 0x09d: map_key_clear(KEY_CHANNELDOWN); break; | 440 | case 0x09d: map_key_clear(KEY_CHANNELDOWN); break; |
441 | case 0x0a0: map_key_clear(KEY_VCR2); break; | ||
442 | |||
424 | case 0x0b0: map_key_clear(KEY_PLAY); break; | 443 | case 0x0b0: map_key_clear(KEY_PLAY); break; |
425 | case 0x0b1: map_key_clear(KEY_PAUSE); break; | 444 | case 0x0b1: map_key_clear(KEY_PAUSE); break; |
426 | case 0x0b2: map_key_clear(KEY_RECORD); break; | 445 | case 0x0b2: map_key_clear(KEY_RECORD); break; |
@@ -430,6 +449,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
430 | case 0x0b6: map_key_clear(KEY_PREVIOUSSONG); break; | 449 | case 0x0b6: map_key_clear(KEY_PREVIOUSSONG); break; |
431 | case 0x0b7: map_key_clear(KEY_STOPCD); break; | 450 | case 0x0b7: map_key_clear(KEY_STOPCD); break; |
432 | case 0x0b8: map_key_clear(KEY_EJECTCD); break; | 451 | case 0x0b8: map_key_clear(KEY_EJECTCD); break; |
452 | |||
433 | case 0x0cd: map_key_clear(KEY_PLAYPAUSE); break; | 453 | case 0x0cd: map_key_clear(KEY_PLAYPAUSE); break; |
434 | case 0x0e0: map_abs_clear(ABS_VOLUME); break; | 454 | case 0x0e0: map_abs_clear(ABS_VOLUME); break; |
435 | case 0x0e2: map_key_clear(KEY_MUTE); break; | 455 | case 0x0e2: map_key_clear(KEY_MUTE); break; |
@@ -437,11 +457,30 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
437 | case 0x0e9: map_key_clear(KEY_VOLUMEUP); break; | 457 | case 0x0e9: map_key_clear(KEY_VOLUMEUP); break; |
438 | case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break; | 458 | case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break; |
439 | case 0x183: map_key_clear(KEY_CONFIG); break; | 459 | case 0x183: map_key_clear(KEY_CONFIG); break; |
460 | case 0x184: map_key_clear(KEY_WORDPROCESSOR); break; | ||
461 | case 0x185: map_key_clear(KEY_EDITOR); break; | ||
462 | case 0x186: map_key_clear(KEY_SPREADSHEET); break; | ||
463 | case 0x187: map_key_clear(KEY_GRAPHICSEDITOR); break; | ||
464 | case 0x188: map_key_clear(KEY_PRESENTATION); break; | ||
465 | case 0x189: map_key_clear(KEY_DATABASE); break; | ||
440 | case 0x18a: map_key_clear(KEY_MAIL); break; | 466 | case 0x18a: map_key_clear(KEY_MAIL); break; |
467 | case 0x18b: map_key_clear(KEY_NEWS); break; | ||
468 | case 0x18c: map_key_clear(KEY_VOICEMAIL); break; | ||
469 | case 0x18d: map_key_clear(KEY_ADDRESSBOOK); break; | ||
470 | case 0x18e: map_key_clear(KEY_CALENDAR); break; | ||
471 | case 0x191: map_key_clear(KEY_FINANCE); break; | ||
441 | case 0x192: map_key_clear(KEY_CALC); break; | 472 | case 0x192: map_key_clear(KEY_CALC); break; |
442 | case 0x194: map_key_clear(KEY_FILE); break; | 473 | case 0x194: map_key_clear(KEY_FILE); break; |
474 | case 0x196: map_key_clear(KEY_WWW); break; | ||
475 | case 0x19e: map_key_clear(KEY_COFFEE); break; | ||
476 | case 0x1a6: map_key_clear(KEY_HELP); break; | ||
443 | case 0x1a7: map_key_clear(KEY_DOCUMENTS); break; | 477 | case 0x1a7: map_key_clear(KEY_DOCUMENTS); break; |
478 | case 0x1bc: map_key_clear(KEY_MESSENGER); break; | ||
479 | case 0x1bd: map_key_clear(KEY_INFO); break; | ||
444 | case 0x201: map_key_clear(KEY_NEW); break; | 480 | case 0x201: map_key_clear(KEY_NEW); break; |
481 | case 0x202: map_key_clear(KEY_OPEN); break; | ||
482 | case 0x203: map_key_clear(KEY_CLOSE); break; | ||
483 | case 0x204: map_key_clear(KEY_EXIT); break; | ||
445 | case 0x207: map_key_clear(KEY_SAVE); break; | 484 | case 0x207: map_key_clear(KEY_SAVE); break; |
446 | case 0x208: map_key_clear(KEY_PRINT); break; | 485 | case 0x208: map_key_clear(KEY_PRINT); break; |
447 | case 0x209: map_key_clear(KEY_PROPS); break; | 486 | case 0x209: map_key_clear(KEY_PROPS); break; |
@@ -456,10 +495,15 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
456 | case 0x226: map_key_clear(KEY_STOP); break; | 495 | case 0x226: map_key_clear(KEY_STOP); break; |
457 | case 0x227: map_key_clear(KEY_REFRESH); break; | 496 | case 0x227: map_key_clear(KEY_REFRESH); break; |
458 | case 0x22a: map_key_clear(KEY_BOOKMARKS); break; | 497 | case 0x22a: map_key_clear(KEY_BOOKMARKS); break; |
498 | case 0x22d: map_key_clear(KEY_ZOOMIN); break; | ||
499 | case 0x22e: map_key_clear(KEY_ZOOMOUT); break; | ||
500 | case 0x22f: map_key_clear(KEY_ZOOMRESET); break; | ||
459 | case 0x233: map_key_clear(KEY_SCROLLUP); break; | 501 | case 0x233: map_key_clear(KEY_SCROLLUP); break; |
460 | case 0x234: map_key_clear(KEY_SCROLLDOWN); break; | 502 | case 0x234: map_key_clear(KEY_SCROLLDOWN); break; |
461 | case 0x238: map_rel(REL_HWHEEL); break; | 503 | case 0x238: map_rel(REL_HWHEEL); break; |
504 | case 0x25f: map_key_clear(KEY_CANCEL); break; | ||
462 | case 0x279: map_key_clear(KEY_REDO); break; | 505 | case 0x279: map_key_clear(KEY_REDO); break; |
506 | |||
463 | case 0x289: map_key_clear(KEY_REPLY); break; | 507 | case 0x289: map_key_clear(KEY_REPLY); break; |
464 | case 0x28b: map_key_clear(KEY_FORWARDMAIL); break; | 508 | case 0x28b: map_key_clear(KEY_FORWARDMAIL); break; |
465 | case 0x28c: map_key_clear(KEY_SEND); break; | 509 | case 0x28c: map_key_clear(KEY_SEND); break; |
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 0491ec7a7c0a..44bc6cc734ab 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -80,24 +80,61 @@ static int tune_pci = 0; | |||
80 | module_param(tune_pci, int, 0444); | 80 | module_param(tune_pci, int, 0444); |
81 | MODULE_PARM_DESC(tune_pci, "increase PCI burst from the default set by BIOS if nonzero"); | 81 | MODULE_PARM_DESC(tune_pci, "increase PCI burst from the default set by BIOS if nonzero"); |
82 | 82 | ||
83 | struct mutex mthca_device_mutex; | 83 | DEFINE_MUTEX(mthca_device_mutex); |
84 | |||
85 | #define MTHCA_DEFAULT_NUM_QP (1 << 16) | ||
86 | #define MTHCA_DEFAULT_RDB_PER_QP (1 << 2) | ||
87 | #define MTHCA_DEFAULT_NUM_CQ (1 << 16) | ||
88 | #define MTHCA_DEFAULT_NUM_MCG (1 << 13) | ||
89 | #define MTHCA_DEFAULT_NUM_MPT (1 << 17) | ||
90 | #define MTHCA_DEFAULT_NUM_MTT (1 << 20) | ||
91 | #define MTHCA_DEFAULT_NUM_UDAV (1 << 15) | ||
92 | #define MTHCA_DEFAULT_NUM_RESERVED_MTTS (1 << 18) | ||
93 | #define MTHCA_DEFAULT_NUM_UARC_SIZE (1 << 18) | ||
94 | |||
95 | static struct mthca_profile hca_profile = { | ||
96 | .num_qp = MTHCA_DEFAULT_NUM_QP, | ||
97 | .rdb_per_qp = MTHCA_DEFAULT_RDB_PER_QP, | ||
98 | .num_cq = MTHCA_DEFAULT_NUM_CQ, | ||
99 | .num_mcg = MTHCA_DEFAULT_NUM_MCG, | ||
100 | .num_mpt = MTHCA_DEFAULT_NUM_MPT, | ||
101 | .num_mtt = MTHCA_DEFAULT_NUM_MTT, | ||
102 | .num_udav = MTHCA_DEFAULT_NUM_UDAV, /* Tavor only */ | ||
103 | .fmr_reserved_mtts = MTHCA_DEFAULT_NUM_RESERVED_MTTS, /* Tavor only */ | ||
104 | .uarc_size = MTHCA_DEFAULT_NUM_UARC_SIZE, /* Arbel only */ | ||
105 | }; | ||
106 | |||
107 | module_param_named(num_qp, hca_profile.num_qp, int, 0444); | ||
108 | MODULE_PARM_DESC(num_qp, "maximum number of QPs per HCA"); | ||
109 | |||
110 | module_param_named(rdb_per_qp, hca_profile.rdb_per_qp, int, 0444); | ||
111 | MODULE_PARM_DESC(rdb_per_qp, "number of RDB buffers per QP"); | ||
112 | |||
113 | module_param_named(num_cq, hca_profile.num_cq, int, 0444); | ||
114 | MODULE_PARM_DESC(num_cq, "maximum number of CQs per HCA"); | ||
115 | |||
116 | module_param_named(num_mcg, hca_profile.num_mcg, int, 0444); | ||
117 | MODULE_PARM_DESC(num_mcg, "maximum number of multicast groups per HCA"); | ||
118 | |||
119 | module_param_named(num_mpt, hca_profile.num_mpt, int, 0444); | ||
120 | MODULE_PARM_DESC(num_mpt, | ||
121 | "maximum number of memory protection table entries per HCA"); | ||
122 | |||
123 | module_param_named(num_mtt, hca_profile.num_mtt, int, 0444); | ||
124 | MODULE_PARM_DESC(num_mtt, | ||
125 | "maximum number of memory translation table segments per HCA"); | ||
126 | |||
127 | module_param_named(num_udav, hca_profile.num_udav, int, 0444); | ||
128 | MODULE_PARM_DESC(num_udav, "maximum number of UD address vectors per HCA"); | ||
129 | |||
130 | module_param_named(fmr_reserved_mtts, hca_profile.fmr_reserved_mtts, int, 0444); | ||
131 | MODULE_PARM_DESC(fmr_reserved_mtts, | ||
132 | "number of memory translation table segments reserved for FMR"); | ||
84 | 133 | ||
85 | static const char mthca_version[] __devinitdata = | 134 | static const char mthca_version[] __devinitdata = |
86 | DRV_NAME ": Mellanox InfiniBand HCA driver v" | 135 | DRV_NAME ": Mellanox InfiniBand HCA driver v" |
87 | DRV_VERSION " (" DRV_RELDATE ")\n"; | 136 | DRV_VERSION " (" DRV_RELDATE ")\n"; |
88 | 137 | ||
89 | static struct mthca_profile default_profile = { | ||
90 | .num_qp = 1 << 16, | ||
91 | .rdb_per_qp = 4, | ||
92 | .num_cq = 1 << 16, | ||
93 | .num_mcg = 1 << 13, | ||
94 | .num_mpt = 1 << 17, | ||
95 | .num_mtt = 1 << 20, | ||
96 | .num_udav = 1 << 15, /* Tavor only */ | ||
97 | .fmr_reserved_mtts = 1 << 18, /* Tavor only */ | ||
98 | .uarc_size = 1 << 18, /* Arbel only */ | ||
99 | }; | ||
100 | |||
101 | static int mthca_tune_pci(struct mthca_dev *mdev) | 138 | static int mthca_tune_pci(struct mthca_dev *mdev) |
102 | { | 139 | { |
103 | int cap; | 140 | int cap; |
@@ -303,7 +340,7 @@ static int mthca_init_tavor(struct mthca_dev *mdev) | |||
303 | goto err_disable; | 340 | goto err_disable; |
304 | } | 341 | } |
305 | 342 | ||
306 | profile = default_profile; | 343 | profile = hca_profile; |
307 | profile.num_uar = dev_lim.uar_size / PAGE_SIZE; | 344 | profile.num_uar = dev_lim.uar_size / PAGE_SIZE; |
308 | profile.uarc_size = 0; | 345 | profile.uarc_size = 0; |
309 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | 346 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) |
@@ -621,7 +658,7 @@ static int mthca_init_arbel(struct mthca_dev *mdev) | |||
621 | goto err_stop_fw; | 658 | goto err_stop_fw; |
622 | } | 659 | } |
623 | 660 | ||
624 | profile = default_profile; | 661 | profile = hca_profile; |
625 | profile.num_uar = dev_lim.uar_size / PAGE_SIZE; | 662 | profile.num_uar = dev_lim.uar_size / PAGE_SIZE; |
626 | profile.num_udav = 0; | 663 | profile.num_udav = 0; |
627 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | 664 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) |
@@ -1278,11 +1315,55 @@ static struct pci_driver mthca_driver = { | |||
1278 | .remove = __devexit_p(mthca_remove_one) | 1315 | .remove = __devexit_p(mthca_remove_one) |
1279 | }; | 1316 | }; |
1280 | 1317 | ||
1318 | static void __init __mthca_check_profile_val(const char *name, int *pval, | ||
1319 | int pval_default) | ||
1320 | { | ||
1321 | /* value must be positive and power of 2 */ | ||
1322 | int old_pval = *pval; | ||
1323 | |||
1324 | if (old_pval <= 0) | ||
1325 | *pval = pval_default; | ||
1326 | else | ||
1327 | *pval = roundup_pow_of_two(old_pval); | ||
1328 | |||
1329 | if (old_pval != *pval) { | ||
1330 | printk(KERN_WARNING PFX "Invalid value %d for %s in module parameter.\n", | ||
1331 | old_pval, name); | ||
1332 | printk(KERN_WARNING PFX "Corrected %s to %d.\n", name, *pval); | ||
1333 | } | ||
1334 | } | ||
1335 | |||
1336 | #define mthca_check_profile_val(name, default) \ | ||
1337 | __mthca_check_profile_val(#name, &hca_profile.name, default) | ||
1338 | |||
1339 | static void __init mthca_validate_profile(void) | ||
1340 | { | ||
1341 | mthca_check_profile_val(num_qp, MTHCA_DEFAULT_NUM_QP); | ||
1342 | mthca_check_profile_val(rdb_per_qp, MTHCA_DEFAULT_RDB_PER_QP); | ||
1343 | mthca_check_profile_val(num_cq, MTHCA_DEFAULT_NUM_CQ); | ||
1344 | mthca_check_profile_val(num_mcg, MTHCA_DEFAULT_NUM_MCG); | ||
1345 | mthca_check_profile_val(num_mpt, MTHCA_DEFAULT_NUM_MPT); | ||
1346 | mthca_check_profile_val(num_mtt, MTHCA_DEFAULT_NUM_MTT); | ||
1347 | mthca_check_profile_val(num_udav, MTHCA_DEFAULT_NUM_UDAV); | ||
1348 | mthca_check_profile_val(fmr_reserved_mtts, MTHCA_DEFAULT_NUM_RESERVED_MTTS); | ||
1349 | |||
1350 | if (hca_profile.fmr_reserved_mtts >= hca_profile.num_mtt) { | ||
1351 | printk(KERN_WARNING PFX "Invalid fmr_reserved_mtts module parameter %d.\n", | ||
1352 | hca_profile.fmr_reserved_mtts); | ||
1353 | printk(KERN_WARNING PFX "(Must be smaller than num_mtt %d)\n", | ||
1354 | hca_profile.num_mtt); | ||
1355 | hca_profile.fmr_reserved_mtts = hca_profile.num_mtt / 2; | ||
1356 | printk(KERN_WARNING PFX "Corrected fmr_reserved_mtts to %d.\n", | ||
1357 | hca_profile.fmr_reserved_mtts); | ||
1358 | } | ||
1359 | } | ||
1360 | |||
1281 | static int __init mthca_init(void) | 1361 | static int __init mthca_init(void) |
1282 | { | 1362 | { |
1283 | int ret; | 1363 | int ret; |
1284 | 1364 | ||
1285 | mutex_init(&mthca_device_mutex); | 1365 | mthca_validate_profile(); |
1366 | |||
1286 | ret = mthca_catas_init(); | 1367 | ret = mthca_catas_init(); |
1287 | if (ret) | 1368 | if (ret) |
1288 | return ret; | 1369 | return ret; |
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index e9b6a6f07dd7..cdecbf5911c8 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
@@ -1898,7 +1898,7 @@ static void srp_add_one(struct ib_device *device) | |||
1898 | */ | 1898 | */ |
1899 | srp_dev->fmr_page_shift = max(9, ffs(dev_attr->page_size_cap) - 1); | 1899 | srp_dev->fmr_page_shift = max(9, ffs(dev_attr->page_size_cap) - 1); |
1900 | srp_dev->fmr_page_size = 1 << srp_dev->fmr_page_shift; | 1900 | srp_dev->fmr_page_size = 1 << srp_dev->fmr_page_shift; |
1901 | srp_dev->fmr_page_mask = ~((unsigned long) srp_dev->fmr_page_size - 1); | 1901 | srp_dev->fmr_page_mask = ~((u64) srp_dev->fmr_page_size - 1); |
1902 | 1902 | ||
1903 | INIT_LIST_HEAD(&srp_dev->dev_list); | 1903 | INIT_LIST_HEAD(&srp_dev->dev_list); |
1904 | 1904 | ||
diff --git a/drivers/infiniband/ulp/srp/ib_srp.h b/drivers/infiniband/ulp/srp/ib_srp.h index 868a540ef7cd..c21772317b86 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.h +++ b/drivers/infiniband/ulp/srp/ib_srp.h | |||
@@ -87,7 +87,7 @@ struct srp_device { | |||
87 | struct ib_fmr_pool *fmr_pool; | 87 | struct ib_fmr_pool *fmr_pool; |
88 | int fmr_page_shift; | 88 | int fmr_page_shift; |
89 | int fmr_page_size; | 89 | int fmr_page_size; |
90 | unsigned long fmr_page_mask; | 90 | u64 fmr_page_mask; |
91 | }; | 91 | }; |
92 | 92 | ||
93 | struct srp_host { | 93 | struct srp_host { |
diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c index 16583d71753b..c67e84ec2d6a 100644 --- a/drivers/input/keyboard/amikbd.c +++ b/drivers/input/keyboard/amikbd.c | |||
@@ -187,7 +187,7 @@ static irqreturn_t amikbd_interrupt(int irq, void *dummy) | |||
187 | 187 | ||
188 | static int __init amikbd_init(void) | 188 | static int __init amikbd_init(void) |
189 | { | 189 | { |
190 | int i, j; | 190 | int i, j, err; |
191 | 191 | ||
192 | if (!AMIGAHW_PRESENT(AMI_KEYBOARD)) | 192 | if (!AMIGAHW_PRESENT(AMI_KEYBOARD)) |
193 | return -ENODEV; | 193 | return -ENODEV; |
diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c index 3826db9403e6..cc0238366414 100644 --- a/drivers/input/keyboard/sunkbd.c +++ b/drivers/input/keyboard/sunkbd.c | |||
@@ -225,7 +225,7 @@ static void sunkbd_reinit(struct work_struct *work) | |||
225 | static void sunkbd_enable(struct sunkbd *sunkbd, int enable) | 225 | static void sunkbd_enable(struct sunkbd *sunkbd, int enable) |
226 | { | 226 | { |
227 | serio_pause_rx(sunkbd->serio); | 227 | serio_pause_rx(sunkbd->serio); |
228 | sunkbd->enabled = 1; | 228 | sunkbd->enabled = enable; |
229 | serio_continue_rx(sunkbd->serio); | 229 | serio_continue_rx(sunkbd->serio); |
230 | } | 230 | } |
231 | 231 | ||
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 7d824cf8ee2d..ada5e9b9988c 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -57,8 +57,8 @@ | |||
57 | 57 | ||
58 | #define DRV_MODULE_NAME "bnx2" | 58 | #define DRV_MODULE_NAME "bnx2" |
59 | #define PFX DRV_MODULE_NAME ": " | 59 | #define PFX DRV_MODULE_NAME ": " |
60 | #define DRV_MODULE_VERSION "1.5.1" | 60 | #define DRV_MODULE_VERSION "1.5.2" |
61 | #define DRV_MODULE_RELDATE "November 15, 2006" | 61 | #define DRV_MODULE_RELDATE "December 13, 2006" |
62 | 62 | ||
63 | #define RUN_AT(x) (jiffies + (x)) | 63 | #define RUN_AT(x) (jiffies + (x)) |
64 | 64 | ||
@@ -217,9 +217,16 @@ static inline u32 bnx2_tx_avail(struct bnx2 *bp) | |||
217 | u32 diff; | 217 | u32 diff; |
218 | 218 | ||
219 | smp_mb(); | 219 | smp_mb(); |
220 | diff = TX_RING_IDX(bp->tx_prod) - TX_RING_IDX(bp->tx_cons); | 220 | |
221 | if (diff > MAX_TX_DESC_CNT) | 221 | /* The ring uses 256 indices for 255 entries, one of them |
222 | diff = (diff & MAX_TX_DESC_CNT) - 1; | 222 | * needs to be skipped. |
223 | */ | ||
224 | diff = bp->tx_prod - bp->tx_cons; | ||
225 | if (unlikely(diff >= TX_DESC_CNT)) { | ||
226 | diff &= 0xffff; | ||
227 | if (diff == TX_DESC_CNT) | ||
228 | diff = MAX_TX_DESC_CNT; | ||
229 | } | ||
223 | return (bp->tx_ring_size - diff); | 230 | return (bp->tx_ring_size - diff); |
224 | } | 231 | } |
225 | 232 | ||
@@ -3089,7 +3096,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
3089 | 3096 | ||
3090 | if ((align_start = (offset32 & 3))) { | 3097 | if ((align_start = (offset32 & 3))) { |
3091 | offset32 &= ~3; | 3098 | offset32 &= ~3; |
3092 | len32 += align_start; | 3099 | len32 += (4 - align_start); |
3093 | if ((rc = bnx2_nvram_read(bp, offset32, start, 4))) | 3100 | if ((rc = bnx2_nvram_read(bp, offset32, start, 4))) |
3094 | return rc; | 3101 | return rc; |
3095 | } | 3102 | } |
@@ -3107,7 +3114,7 @@ bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, | |||
3107 | 3114 | ||
3108 | if (align_start || align_end) { | 3115 | if (align_start || align_end) { |
3109 | buf = kmalloc(len32, GFP_KERNEL); | 3116 | buf = kmalloc(len32, GFP_KERNEL); |
3110 | if (buf == 0) | 3117 | if (buf == NULL) |
3111 | return -ENOMEM; | 3118 | return -ENOMEM; |
3112 | if (align_start) { | 3119 | if (align_start) { |
3113 | memcpy(buf, start, 4); | 3120 | memcpy(buf, start, 4); |
@@ -3998,7 +4005,7 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode) | |||
3998 | if (!skb) | 4005 | if (!skb) |
3999 | return -ENOMEM; | 4006 | return -ENOMEM; |
4000 | packet = skb_put(skb, pkt_size); | 4007 | packet = skb_put(skb, pkt_size); |
4001 | memcpy(packet, bp->mac_addr, 6); | 4008 | memcpy(packet, bp->dev->dev_addr, 6); |
4002 | memset(packet + 6, 0x0, 8); | 4009 | memset(packet + 6, 0x0, 8); |
4003 | for (i = 14; i < pkt_size; i++) | 4010 | for (i = 14; i < pkt_size; i++) |
4004 | packet[i] = (unsigned char) (i & 0xff); | 4011 | packet[i] = (unsigned char) (i & 0xff); |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 571320ae87ab..4056ba1ff3c7 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -68,8 +68,8 @@ | |||
68 | 68 | ||
69 | #define DRV_MODULE_NAME "tg3" | 69 | #define DRV_MODULE_NAME "tg3" |
70 | #define PFX DRV_MODULE_NAME ": " | 70 | #define PFX DRV_MODULE_NAME ": " |
71 | #define DRV_MODULE_VERSION "3.70" | 71 | #define DRV_MODULE_VERSION "3.71" |
72 | #define DRV_MODULE_RELDATE "December 1, 2006" | 72 | #define DRV_MODULE_RELDATE "December 15, 2006" |
73 | 73 | ||
74 | #define TG3_DEF_MAC_MODE 0 | 74 | #define TG3_DEF_MAC_MODE 0 |
75 | #define TG3_DEF_RX_MODE 0 | 75 | #define TG3_DEF_RX_MODE 0 |
@@ -959,6 +959,13 @@ static int tg3_phy_reset(struct tg3 *tp) | |||
959 | u32 phy_status; | 959 | u32 phy_status; |
960 | int err; | 960 | int err; |
961 | 961 | ||
962 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { | ||
963 | u32 val; | ||
964 | |||
965 | val = tr32(GRC_MISC_CFG); | ||
966 | tw32_f(GRC_MISC_CFG, val & ~GRC_MISC_CFG_EPHY_IDDQ); | ||
967 | udelay(40); | ||
968 | } | ||
962 | err = tg3_readphy(tp, MII_BMSR, &phy_status); | 969 | err = tg3_readphy(tp, MII_BMSR, &phy_status); |
963 | err |= tg3_readphy(tp, MII_BMSR, &phy_status); | 970 | err |= tg3_readphy(tp, MII_BMSR, &phy_status); |
964 | if (err != 0) | 971 | if (err != 0) |
@@ -1170,7 +1177,15 @@ static void tg3_power_down_phy(struct tg3 *tp) | |||
1170 | if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) | 1177 | if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) |
1171 | return; | 1178 | return; |
1172 | 1179 | ||
1173 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906) { | 1180 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { |
1181 | u32 val; | ||
1182 | |||
1183 | tg3_bmcr_reset(tp); | ||
1184 | val = tr32(GRC_MISC_CFG); | ||
1185 | tw32_f(GRC_MISC_CFG, val | GRC_MISC_CFG_EPHY_IDDQ); | ||
1186 | udelay(40); | ||
1187 | return; | ||
1188 | } else { | ||
1174 | tg3_writephy(tp, MII_TG3_EXT_CTRL, | 1189 | tg3_writephy(tp, MII_TG3_EXT_CTRL, |
1175 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); | 1190 | MII_TG3_EXT_CTRL_FORCE_LED_OFF); |
1176 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); | 1191 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); |
@@ -4426,7 +4441,7 @@ static void tg3_free_consistent(struct tg3 *tp) | |||
4426 | */ | 4441 | */ |
4427 | static int tg3_alloc_consistent(struct tg3 *tp) | 4442 | static int tg3_alloc_consistent(struct tg3 *tp) |
4428 | { | 4443 | { |
4429 | tp->rx_std_buffers = kmalloc((sizeof(struct ring_info) * | 4444 | tp->rx_std_buffers = kzalloc((sizeof(struct ring_info) * |
4430 | (TG3_RX_RING_SIZE + | 4445 | (TG3_RX_RING_SIZE + |
4431 | TG3_RX_JUMBO_RING_SIZE)) + | 4446 | TG3_RX_JUMBO_RING_SIZE)) + |
4432 | (sizeof(struct tx_ring_info) * | 4447 | (sizeof(struct tx_ring_info) * |
@@ -4435,13 +4450,6 @@ static int tg3_alloc_consistent(struct tg3 *tp) | |||
4435 | if (!tp->rx_std_buffers) | 4450 | if (!tp->rx_std_buffers) |
4436 | return -ENOMEM; | 4451 | return -ENOMEM; |
4437 | 4452 | ||
4438 | memset(tp->rx_std_buffers, 0, | ||
4439 | (sizeof(struct ring_info) * | ||
4440 | (TG3_RX_RING_SIZE + | ||
4441 | TG3_RX_JUMBO_RING_SIZE)) + | ||
4442 | (sizeof(struct tx_ring_info) * | ||
4443 | TG3_TX_RING_SIZE)); | ||
4444 | |||
4445 | tp->rx_jumbo_buffers = &tp->rx_std_buffers[TG3_RX_RING_SIZE]; | 4453 | tp->rx_jumbo_buffers = &tp->rx_std_buffers[TG3_RX_RING_SIZE]; |
4446 | tp->tx_buffers = (struct tx_ring_info *) | 4454 | tp->tx_buffers = (struct tx_ring_info *) |
4447 | &tp->rx_jumbo_buffers[TG3_RX_JUMBO_RING_SIZE]; | 4455 | &tp->rx_jumbo_buffers[TG3_RX_JUMBO_RING_SIZE]; |
@@ -6988,6 +6996,8 @@ static int tg3_open(struct net_device *dev) | |||
6988 | struct tg3 *tp = netdev_priv(dev); | 6996 | struct tg3 *tp = netdev_priv(dev); |
6989 | int err; | 6997 | int err; |
6990 | 6998 | ||
6999 | netif_carrier_off(tp->dev); | ||
7000 | |||
6991 | tg3_full_lock(tp, 0); | 7001 | tg3_full_lock(tp, 0); |
6992 | 7002 | ||
6993 | err = tg3_set_power_state(tp, PCI_D0); | 7003 | err = tg3_set_power_state(tp, PCI_D0); |
@@ -7981,6 +7991,10 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
7981 | tp->link_config.duplex = cmd->duplex; | 7991 | tp->link_config.duplex = cmd->duplex; |
7982 | } | 7992 | } |
7983 | 7993 | ||
7994 | tp->link_config.orig_speed = tp->link_config.speed; | ||
7995 | tp->link_config.orig_duplex = tp->link_config.duplex; | ||
7996 | tp->link_config.orig_autoneg = tp->link_config.autoneg; | ||
7997 | |||
7984 | if (netif_running(dev)) | 7998 | if (netif_running(dev)) |
7985 | tg3_setup_phy(tp, 1); | 7999 | tg3_setup_phy(tp, 1); |
7986 | 8000 | ||
@@ -11923,6 +11937,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
11923 | */ | 11937 | */ |
11924 | pci_save_state(tp->pdev); | 11938 | pci_save_state(tp->pdev); |
11925 | 11939 | ||
11940 | pci_set_drvdata(pdev, dev); | ||
11941 | |||
11926 | err = register_netdev(dev); | 11942 | err = register_netdev(dev); |
11927 | if (err) { | 11943 | if (err) { |
11928 | printk(KERN_ERR PFX "Cannot register net device, " | 11944 | printk(KERN_ERR PFX "Cannot register net device, " |
@@ -11930,8 +11946,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
11930 | goto err_out_iounmap; | 11946 | goto err_out_iounmap; |
11931 | } | 11947 | } |
11932 | 11948 | ||
11933 | pci_set_drvdata(pdev, dev); | ||
11934 | |||
11935 | printk(KERN_INFO "%s: Tigon3 [partno(%s) rev %04x PHY(%s)] (%s) %s Ethernet ", | 11949 | printk(KERN_INFO "%s: Tigon3 [partno(%s) rev %04x PHY(%s)] (%s) %s Ethernet ", |
11936 | dev->name, | 11950 | dev->name, |
11937 | tp->board_part_number, | 11951 | tp->board_part_number, |
@@ -11962,8 +11976,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
11962 | (pdev->dma_mask == DMA_32BIT_MASK) ? 32 : | 11976 | (pdev->dma_mask == DMA_32BIT_MASK) ? 32 : |
11963 | (((u64) pdev->dma_mask == DMA_40BIT_MASK) ? 40 : 64)); | 11977 | (((u64) pdev->dma_mask == DMA_40BIT_MASK) ? 40 : 64)); |
11964 | 11978 | ||
11965 | netif_carrier_off(tp->dev); | ||
11966 | |||
11967 | return 0; | 11979 | return 0; |
11968 | 11980 | ||
11969 | err_out_iounmap: | 11981 | err_out_iounmap: |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index dfaf4ed127bd..cf78a7e5997b 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -1350,6 +1350,7 @@ | |||
1350 | #define GRC_MISC_CFG_BOARD_ID_5788 0x00010000 | 1350 | #define GRC_MISC_CFG_BOARD_ID_5788 0x00010000 |
1351 | #define GRC_MISC_CFG_BOARD_ID_5788M 0x00018000 | 1351 | #define GRC_MISC_CFG_BOARD_ID_5788M 0x00018000 |
1352 | #define GRC_MISC_CFG_BOARD_ID_AC91002A1 0x00018000 | 1352 | #define GRC_MISC_CFG_BOARD_ID_AC91002A1 0x00018000 |
1353 | #define GRC_MISC_CFG_EPHY_IDDQ 0x00200000 | ||
1353 | #define GRC_MISC_CFG_KEEP_GPHY_POWER 0x04000000 | 1354 | #define GRC_MISC_CFG_KEEP_GPHY_POWER 0x04000000 |
1354 | #define GRC_LOCAL_CTRL 0x00006808 | 1355 | #define GRC_LOCAL_CTRL 0x00006808 |
1355 | #define GRC_LCLCTRL_INT_ACTIVE 0x00000001 | 1356 | #define GRC_LCLCTRL_INT_ACTIVE 0x00000001 |
diff --git a/drivers/s390/char/sclp_cpi.c b/drivers/s390/char/sclp_cpi.c index f7c10d954ec6..4f873ae148b7 100644 --- a/drivers/s390/char/sclp_cpi.c +++ b/drivers/s390/char/sclp_cpi.c | |||
@@ -49,6 +49,8 @@ static struct sclp_register sclp_cpi_event = | |||
49 | .send_mask = EvTyp_CtlProgIdent_Mask | 49 | .send_mask = EvTyp_CtlProgIdent_Mask |
50 | }; | 50 | }; |
51 | 51 | ||
52 | MODULE_LICENSE("GPL"); | ||
53 | |||
52 | MODULE_AUTHOR( | 54 | MODULE_AUTHOR( |
53 | "Martin Peschke, IBM Deutschland Entwicklung GmbH " | 55 | "Martin Peschke, IBM Deutschland Entwicklung GmbH " |
54 | "<mpeschke@de.ibm.com>"); | 56 | "<mpeschke@de.ibm.com>"); |
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 7835a714a405..3a403f195cf8 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -871,11 +871,32 @@ __clear_subchannel_easy(struct subchannel_id schid) | |||
871 | return -EBUSY; | 871 | return -EBUSY; |
872 | } | 872 | } |
873 | 873 | ||
874 | static int pgm_check_occured; | ||
875 | |||
876 | static void cio_reset_pgm_check_handler(void) | ||
877 | { | ||
878 | pgm_check_occured = 1; | ||
879 | } | ||
880 | |||
881 | static int stsch_reset(struct subchannel_id schid, volatile struct schib *addr) | ||
882 | { | ||
883 | int rc; | ||
884 | |||
885 | pgm_check_occured = 0; | ||
886 | s390_reset_pgm_handler = cio_reset_pgm_check_handler; | ||
887 | rc = stsch(schid, addr); | ||
888 | s390_reset_pgm_handler = NULL; | ||
889 | if (pgm_check_occured) | ||
890 | return -EIO; | ||
891 | else | ||
892 | return rc; | ||
893 | } | ||
894 | |||
874 | static int __shutdown_subchannel_easy(struct subchannel_id schid, void *data) | 895 | static int __shutdown_subchannel_easy(struct subchannel_id schid, void *data) |
875 | { | 896 | { |
876 | struct schib schib; | 897 | struct schib schib; |
877 | 898 | ||
878 | if (stsch_err(schid, &schib)) | 899 | if (stsch_reset(schid, &schib)) |
879 | return -ENXIO; | 900 | return -ENXIO; |
880 | if (!schib.pmcw.ena) | 901 | if (!schib.pmcw.ena) |
881 | return 0; | 902 | return 0; |
@@ -972,7 +993,7 @@ static int __reipl_subchannel_match(struct subchannel_id schid, void *data) | |||
972 | struct schib schib; | 993 | struct schib schib; |
973 | struct sch_match_id *match_id = data; | 994 | struct sch_match_id *match_id = data; |
974 | 995 | ||
975 | if (stsch_err(schid, &schib)) | 996 | if (stsch_reset(schid, &schib)) |
976 | return -ENXIO; | 997 | return -ENXIO; |
977 | if (schib.pmcw.dnv && | 998 | if (schib.pmcw.dnv && |
978 | (schib.pmcw.dev == match_id->devid.devno) && | 999 | (schib.pmcw.dev == match_id->devid.devno) && |
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 4c81d890791e..9d6c02446863 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -139,6 +139,8 @@ css_register_subchannel(struct subchannel *sch) | |||
139 | sch->dev.release = &css_subchannel_release; | 139 | sch->dev.release = &css_subchannel_release; |
140 | sch->dev.groups = subch_attr_groups; | 140 | sch->dev.groups = subch_attr_groups; |
141 | 141 | ||
142 | css_get_ssd_info(sch); | ||
143 | |||
142 | /* make it known to the system */ | 144 | /* make it known to the system */ |
143 | ret = css_sch_device_register(sch); | 145 | ret = css_sch_device_register(sch); |
144 | if (ret) { | 146 | if (ret) { |
@@ -146,7 +148,6 @@ css_register_subchannel(struct subchannel *sch) | |||
146 | __func__, sch->dev.bus_id); | 148 | __func__, sch->dev.bus_id); |
147 | return ret; | 149 | return ret; |
148 | } | 150 | } |
149 | css_get_ssd_info(sch); | ||
150 | return ret; | 151 | return ret; |
151 | } | 152 | } |
152 | 153 | ||
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index 9d4ea449a608..6fd1940842eb 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c | |||
@@ -979,12 +979,11 @@ __qdio_outbound_processing(struct qdio_q *q) | |||
979 | 979 | ||
980 | if (q->is_iqdio_q) { | 980 | if (q->is_iqdio_q) { |
981 | /* | 981 | /* |
982 | * for asynchronous queues, we better check, if the fill | 982 | * for asynchronous queues, we better check, if the sent |
983 | * level is too high. for synchronous queues, the fill | 983 | * buffer is already switched from PRIMED to EMPTY. |
984 | * level will never be that high. | ||
985 | */ | 984 | */ |
986 | if (atomic_read(&q->number_of_buffers_used)> | 985 | if ((q->queue_type == QDIO_IQDIO_QFMT_ASYNCH) && |
987 | IQDIO_FILL_LEVEL_TO_POLL) | 986 | !qdio_is_outbound_q_done(q)) |
988 | qdio_mark_q(q); | 987 | qdio_mark_q(q); |
989 | 988 | ||
990 | } else if (!q->hydra_gives_outbound_pcis) | 989 | } else if (!q->hydra_gives_outbound_pcis) |
@@ -1825,6 +1824,10 @@ qdio_fill_qs(struct qdio_irq *irq_ptr, struct ccw_device *cdev, | |||
1825 | q->sbal[j]=*(outbound_sbals_array++); | 1824 | q->sbal[j]=*(outbound_sbals_array++); |
1826 | 1825 | ||
1827 | q->queue_type=q_format; | 1826 | q->queue_type=q_format; |
1827 | if ((q->queue_type == QDIO_IQDIO_QFMT) && | ||
1828 | (no_output_qs > 1) && | ||
1829 | (i == no_output_qs-1)) | ||
1830 | q->queue_type = QDIO_IQDIO_QFMT_ASYNCH; | ||
1828 | q->int_parm=int_parm; | 1831 | q->int_parm=int_parm; |
1829 | q->is_input_q=0; | 1832 | q->is_input_q=0; |
1830 | q->schid = irq_ptr->schid; | 1833 | q->schid = irq_ptr->schid; |
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index ad60afe5dd11..81b5899f4010 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -1129,7 +1129,15 @@ static void ap_poll_thread_stop(void) | |||
1129 | mutex_unlock(&ap_poll_thread_mutex); | 1129 | mutex_unlock(&ap_poll_thread_mutex); |
1130 | } | 1130 | } |
1131 | 1131 | ||
1132 | static void ap_reset(void) | 1132 | static void ap_reset_domain(void) |
1133 | { | ||
1134 | int i; | ||
1135 | |||
1136 | for (i = 0; i < AP_DEVICES; i++) | ||
1137 | ap_reset_queue(AP_MKQID(i, ap_domain_index)); | ||
1138 | } | ||
1139 | |||
1140 | static void ap_reset_all(void) | ||
1133 | { | 1141 | { |
1134 | int i, j; | 1142 | int i, j; |
1135 | 1143 | ||
@@ -1139,7 +1147,7 @@ static void ap_reset(void) | |||
1139 | } | 1147 | } |
1140 | 1148 | ||
1141 | static struct reset_call ap_reset_call = { | 1149 | static struct reset_call ap_reset_call = { |
1142 | .fn = ap_reset, | 1150 | .fn = ap_reset_all, |
1143 | }; | 1151 | }; |
1144 | 1152 | ||
1145 | /** | 1153 | /** |
@@ -1229,10 +1237,12 @@ void ap_module_exit(void) | |||
1229 | int i; | 1237 | int i; |
1230 | struct device *dev; | 1238 | struct device *dev; |
1231 | 1239 | ||
1240 | ap_reset_domain(); | ||
1232 | ap_poll_thread_stop(); | 1241 | ap_poll_thread_stop(); |
1233 | del_timer_sync(&ap_config_timer); | 1242 | del_timer_sync(&ap_config_timer); |
1234 | del_timer_sync(&ap_poll_timer); | 1243 | del_timer_sync(&ap_poll_timer); |
1235 | destroy_workqueue(ap_work_queue); | 1244 | destroy_workqueue(ap_work_queue); |
1245 | tasklet_kill(&ap_tasklet); | ||
1236 | s390_root_dev_unregister(ap_root_device); | 1246 | s390_root_dev_unregister(ap_root_device); |
1237 | while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, | 1247 | while ((dev = bus_find_device(&ap_bus_type, NULL, NULL, |
1238 | __ap_match_all))) | 1248 | __ap_match_all))) |
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c index 43f5b6aa7dc4..98e3fe10c1dc 100644 --- a/drivers/scsi/sun3_NCR5380.c +++ b/drivers/scsi/sun3_NCR5380.c | |||
@@ -266,7 +266,7 @@ static struct scsi_host_template *the_template = NULL; | |||
266 | (struct NCR5380_hostdata *)(in)->hostdata | 266 | (struct NCR5380_hostdata *)(in)->hostdata |
267 | #define HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata) | 267 | #define HOSTDATA(in) ((struct NCR5380_hostdata *)(in)->hostdata) |
268 | 268 | ||
269 | #define NEXT(cmd) ((struct scsi_cmnd *)((cmd)->host_scribble)) | 269 | #define NEXT(cmd) (*(struct scsi_cmnd **)&((cmd)->host_scribble)) |
270 | #define NEXTADDR(cmd) ((struct scsi_cmnd **)&((cmd)->host_scribble)) | 270 | #define NEXTADDR(cmd) ((struct scsi_cmnd **)&((cmd)->host_scribble)) |
271 | 271 | ||
272 | #define HOSTNO instance->host_no | 272 | #define HOSTNO instance->host_no |
@@ -650,7 +650,7 @@ __inline__ void NCR5380_print_phase(struct Scsi_Host *instance) { }; | |||
650 | #include <linux/interrupt.h> | 650 | #include <linux/interrupt.h> |
651 | 651 | ||
652 | static volatile int main_running = 0; | 652 | static volatile int main_running = 0; |
653 | static DECLARE_WORK(NCR5380_tqueue, (void (*)(void*))NCR5380_main, NULL); | 653 | static DECLARE_WORK(NCR5380_tqueue, NCR5380_main); |
654 | 654 | ||
655 | static __inline__ void queue_main(void) | 655 | static __inline__ void queue_main(void) |
656 | { | 656 | { |
@@ -1031,7 +1031,7 @@ static int NCR5380_queue_command(struct scsi_cmnd *cmd, | |||
1031 | * reenable them. This prevents reentrancy and kernel stack overflow. | 1031 | * reenable them. This prevents reentrancy and kernel stack overflow. |
1032 | */ | 1032 | */ |
1033 | 1033 | ||
1034 | static void NCR5380_main (void *bl) | 1034 | static void NCR5380_main (struct work_struct *bl) |
1035 | { | 1035 | { |
1036 | struct scsi_cmnd *tmp, *prev; | 1036 | struct scsi_cmnd *tmp, *prev; |
1037 | struct Scsi_Host *instance = first_instance; | 1037 | struct Scsi_Host *instance = first_instance; |
diff --git a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig index 8a62d4785755..e308f6dc2b87 100644 --- a/drivers/usb/input/Kconfig +++ b/drivers/usb/input/Kconfig | |||
@@ -7,7 +7,8 @@ comment "USB Input Devices" | |||
7 | config USB_HID | 7 | config USB_HID |
8 | tristate "USB Human Interface Device (full HID) support" | 8 | tristate "USB Human Interface Device (full HID) support" |
9 | default y | 9 | default y |
10 | depends on USB && HID | 10 | depends on USB |
11 | select HID | ||
11 | ---help--- | 12 | ---help--- |
12 | Say Y here if you want full HID support to connect USB keyboards, | 13 | Say Y here if you want full HID support to connect USB keyboards, |
13 | mice, joysticks, graphic tablets, or any other HID based devices | 14 | mice, joysticks, graphic tablets, or any other HID based devices |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 7437ccaada77..1587121730c5 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -119,8 +119,6 @@ | |||
119 | *(__ksymtab_strings) \ | 119 | *(__ksymtab_strings) \ |
120 | } \ | 120 | } \ |
121 | \ | 121 | \ |
122 | EH_FRAME \ | ||
123 | \ | ||
124 | /* Built-in module parameters. */ \ | 122 | /* Built-in module parameters. */ \ |
125 | __param : AT(ADDR(__param) - LOAD_OFFSET) { \ | 123 | __param : AT(ADDR(__param) - LOAD_OFFSET) { \ |
126 | VMLINUX_SYMBOL(__start___param) = .; \ | 124 | VMLINUX_SYMBOL(__start___param) = .; \ |
@@ -160,26 +158,6 @@ | |||
160 | *(.kprobes.text) \ | 158 | *(.kprobes.text) \ |
161 | VMLINUX_SYMBOL(__kprobes_text_end) = .; | 159 | VMLINUX_SYMBOL(__kprobes_text_end) = .; |
162 | 160 | ||
163 | #ifdef CONFIG_STACK_UNWIND | ||
164 | #define EH_FRAME \ | ||
165 | /* Unwind data binary search table */ \ | ||
166 | . = ALIGN(8); \ | ||
167 | .eh_frame_hdr : AT(ADDR(.eh_frame_hdr) - LOAD_OFFSET) { \ | ||
168 | VMLINUX_SYMBOL(__start_unwind_hdr) = .; \ | ||
169 | *(.eh_frame_hdr) \ | ||
170 | VMLINUX_SYMBOL(__end_unwind_hdr) = .; \ | ||
171 | } \ | ||
172 | /* Unwind data */ \ | ||
173 | . = ALIGN(8); \ | ||
174 | .eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) { \ | ||
175 | VMLINUX_SYMBOL(__start_unwind) = .; \ | ||
176 | *(.eh_frame) \ | ||
177 | VMLINUX_SYMBOL(__end_unwind) = .; \ | ||
178 | } | ||
179 | #else | ||
180 | #define EH_FRAME | ||
181 | #endif | ||
182 | |||
183 | /* DWARF debug sections. | 161 | /* DWARF debug sections. |
184 | Symbols in the DWARF debugging sections are relative to | 162 | Symbols in the DWARF debugging sections are relative to |
185 | the beginning of the section so we begin them at 0. */ | 163 | the beginning of the section so we begin them at 0. */ |
diff --git a/include/asm-i386/unwind.h b/include/asm-i386/unwind.h index aa2c931e30db..43c70c3de2f9 100644 --- a/include/asm-i386/unwind.h +++ b/include/asm-i386/unwind.h | |||
@@ -1,95 +1,6 @@ | |||
1 | #ifndef _ASM_I386_UNWIND_H | 1 | #ifndef _ASM_I386_UNWIND_H |
2 | #define _ASM_I386_UNWIND_H | 2 | #define _ASM_I386_UNWIND_H |
3 | 3 | ||
4 | /* | ||
5 | * Copyright (C) 2002-2006 Novell, Inc. | ||
6 | * Jan Beulich <jbeulich@novell.com> | ||
7 | * This code is released under version 2 of the GNU GPL. | ||
8 | */ | ||
9 | |||
10 | #ifdef CONFIG_STACK_UNWIND | ||
11 | |||
12 | #include <linux/sched.h> | ||
13 | #include <asm/fixmap.h> | ||
14 | #include <asm/ptrace.h> | ||
15 | #include <asm/uaccess.h> | ||
16 | |||
17 | struct unwind_frame_info | ||
18 | { | ||
19 | struct pt_regs regs; | ||
20 | struct task_struct *task; | ||
21 | unsigned call_frame:1; | ||
22 | }; | ||
23 | |||
24 | #define UNW_PC(frame) (frame)->regs.eip | ||
25 | #define UNW_SP(frame) (frame)->regs.esp | ||
26 | #ifdef CONFIG_FRAME_POINTER | ||
27 | #define UNW_FP(frame) (frame)->regs.ebp | ||
28 | #define FRAME_RETADDR_OFFSET 4 | ||
29 | #define FRAME_LINK_OFFSET 0 | ||
30 | #define STACK_BOTTOM(tsk) STACK_LIMIT((tsk)->thread.esp0) | ||
31 | #define STACK_TOP(tsk) ((tsk)->thread.esp0) | ||
32 | #else | ||
33 | #define UNW_FP(frame) ((void)(frame), 0) | ||
34 | #endif | ||
35 | #define STACK_LIMIT(ptr) (((ptr) - 1) & ~(THREAD_SIZE - 1)) | ||
36 | |||
37 | #define UNW_REGISTER_INFO \ | ||
38 | PTREGS_INFO(eax), \ | ||
39 | PTREGS_INFO(ecx), \ | ||
40 | PTREGS_INFO(edx), \ | ||
41 | PTREGS_INFO(ebx), \ | ||
42 | PTREGS_INFO(esp), \ | ||
43 | PTREGS_INFO(ebp), \ | ||
44 | PTREGS_INFO(esi), \ | ||
45 | PTREGS_INFO(edi), \ | ||
46 | PTREGS_INFO(eip) | ||
47 | |||
48 | #define UNW_DEFAULT_RA(raItem, dataAlign) \ | ||
49 | ((raItem).where == Memory && \ | ||
50 | !((raItem).value * (dataAlign) + 4)) | ||
51 | |||
52 | static inline void arch_unw_init_frame_info(struct unwind_frame_info *info, | ||
53 | /*const*/ struct pt_regs *regs) | ||
54 | { | ||
55 | if (user_mode_vm(regs)) | ||
56 | info->regs = *regs; | ||
57 | else { | ||
58 | memcpy(&info->regs, regs, offsetof(struct pt_regs, esp)); | ||
59 | info->regs.esp = (unsigned long)®s->esp; | ||
60 | info->regs.xss = __KERNEL_DS; | ||
61 | } | ||
62 | } | ||
63 | |||
64 | static inline void arch_unw_init_blocked(struct unwind_frame_info *info) | ||
65 | { | ||
66 | memset(&info->regs, 0, sizeof(info->regs)); | ||
67 | info->regs.eip = info->task->thread.eip; | ||
68 | info->regs.xcs = __KERNEL_CS; | ||
69 | __get_user(info->regs.ebp, (long *)info->task->thread.esp); | ||
70 | info->regs.esp = info->task->thread.esp; | ||
71 | info->regs.xss = __KERNEL_DS; | ||
72 | info->regs.xds = __USER_DS; | ||
73 | info->regs.xes = __USER_DS; | ||
74 | info->regs.xgs = __KERNEL_PDA; | ||
75 | } | ||
76 | |||
77 | extern asmlinkage int arch_unwind_init_running(struct unwind_frame_info *, | ||
78 | asmlinkage int (*callback)(struct unwind_frame_info *, | ||
79 | void *arg), | ||
80 | void *arg); | ||
81 | |||
82 | static inline int arch_unw_user_mode(/*const*/ struct unwind_frame_info *info) | ||
83 | { | ||
84 | return user_mode_vm(&info->regs) | ||
85 | || info->regs.eip < PAGE_OFFSET | ||
86 | || (info->regs.eip >= __fix_to_virt(FIX_VDSO) | ||
87 | && info->regs.eip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE) | ||
88 | || info->regs.esp < PAGE_OFFSET; | ||
89 | } | ||
90 | |||
91 | #else | ||
92 | |||
93 | #define UNW_PC(frame) ((void)(frame), 0) | 4 | #define UNW_PC(frame) ((void)(frame), 0) |
94 | #define UNW_SP(frame) ((void)(frame), 0) | 5 | #define UNW_SP(frame) ((void)(frame), 0) |
95 | #define UNW_FP(frame) ((void)(frame), 0) | 6 | #define UNW_FP(frame) ((void)(frame), 0) |
@@ -99,6 +10,4 @@ static inline int arch_unw_user_mode(const void *info) | |||
99 | return 0; | 10 | return 0; |
100 | } | 11 | } |
101 | 12 | ||
102 | #endif | ||
103 | |||
104 | #endif /* _ASM_I386_UNWIND_H */ | 13 | #endif /* _ASM_I386_UNWIND_H */ |
diff --git a/include/asm-s390/qdio.h b/include/asm-s390/qdio.h index 7189c79bc673..127f72e77419 100644 --- a/include/asm-s390/qdio.h +++ b/include/asm-s390/qdio.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #define QDIO_QETH_QFMT 0 | 34 | #define QDIO_QETH_QFMT 0 |
35 | #define QDIO_ZFCP_QFMT 1 | 35 | #define QDIO_ZFCP_QFMT 1 |
36 | #define QDIO_IQDIO_QFMT 2 | 36 | #define QDIO_IQDIO_QFMT 2 |
37 | #define QDIO_IQDIO_QFMT_ASYNCH 3 | ||
37 | 38 | ||
38 | struct qdio_buffer_element{ | 39 | struct qdio_buffer_element{ |
39 | unsigned int flags; | 40 | unsigned int flags; |
diff --git a/include/asm-s390/reset.h b/include/asm-s390/reset.h index 9b439cf67800..532e65a2aafc 100644 --- a/include/asm-s390/reset.h +++ b/include/asm-s390/reset.h | |||
@@ -19,5 +19,6 @@ extern void register_reset_call(struct reset_call *reset); | |||
19 | extern void unregister_reset_call(struct reset_call *reset); | 19 | extern void unregister_reset_call(struct reset_call *reset); |
20 | extern void s390_reset_system(void); | 20 | extern void s390_reset_system(void); |
21 | extern void (*s390_reset_mcck_handler)(void); | 21 | extern void (*s390_reset_mcck_handler)(void); |
22 | extern void (*s390_reset_pgm_handler)(void); | ||
22 | 23 | ||
23 | #endif /* _ASM_S390_RESET_H */ | 24 | #endif /* _ASM_S390_RESET_H */ |
diff --git a/include/asm-sparc/bitops.h b/include/asm-sparc/bitops.h index 04aa3318f76a..329e696e7751 100644 --- a/include/asm-sparc/bitops.h +++ b/include/asm-sparc/bitops.h | |||
@@ -14,6 +14,10 @@ | |||
14 | 14 | ||
15 | #ifdef __KERNEL__ | 15 | #ifdef __KERNEL__ |
16 | 16 | ||
17 | extern unsigned long ___set_bit(unsigned long *addr, unsigned long mask); | ||
18 | extern unsigned long ___clear_bit(unsigned long *addr, unsigned long mask); | ||
19 | extern unsigned long ___change_bit(unsigned long *addr, unsigned long mask); | ||
20 | |||
17 | /* | 21 | /* |
18 | * Set bit 'nr' in 32-bit quantity at address 'addr' where bit '0' | 22 | * Set bit 'nr' in 32-bit quantity at address 'addr' where bit '0' |
19 | * is in the highest of the four bytes and bit '31' is the high bit | 23 | * is in the highest of the four bytes and bit '31' is the high bit |
@@ -22,134 +26,62 @@ | |||
22 | */ | 26 | */ |
23 | static inline int test_and_set_bit(unsigned long nr, volatile unsigned long *addr) | 27 | static inline int test_and_set_bit(unsigned long nr, volatile unsigned long *addr) |
24 | { | 28 | { |
25 | register unsigned long mask asm("g2"); | 29 | unsigned long *ADDR, mask; |
26 | register unsigned long *ADDR asm("g1"); | ||
27 | register int tmp1 asm("g3"); | ||
28 | register int tmp2 asm("g4"); | ||
29 | register int tmp3 asm("g5"); | ||
30 | register int tmp4 asm("g7"); | ||
31 | 30 | ||
32 | ADDR = ((unsigned long *) addr) + (nr >> 5); | 31 | ADDR = ((unsigned long *) addr) + (nr >> 5); |
33 | mask = 1 << (nr & 31); | 32 | mask = 1 << (nr & 31); |
34 | 33 | ||
35 | __asm__ __volatile__( | 34 | return ___set_bit(ADDR, mask) != 0; |
36 | "mov %%o7, %%g4\n\t" | ||
37 | "call ___set_bit\n\t" | ||
38 | " add %%o7, 8, %%o7\n" | ||
39 | : "=&r" (mask), "=r" (tmp1), "=r" (tmp2), "=r" (tmp3), "=r" (tmp4) | ||
40 | : "0" (mask), "r" (ADDR) | ||
41 | : "memory", "cc"); | ||
42 | |||
43 | return mask != 0; | ||
44 | } | 35 | } |
45 | 36 | ||
46 | static inline void set_bit(unsigned long nr, volatile unsigned long *addr) | 37 | static inline void set_bit(unsigned long nr, volatile unsigned long *addr) |
47 | { | 38 | { |
48 | register unsigned long mask asm("g2"); | 39 | unsigned long *ADDR, mask; |
49 | register unsigned long *ADDR asm("g1"); | ||
50 | register int tmp1 asm("g3"); | ||
51 | register int tmp2 asm("g4"); | ||
52 | register int tmp3 asm("g5"); | ||
53 | register int tmp4 asm("g7"); | ||
54 | 40 | ||
55 | ADDR = ((unsigned long *) addr) + (nr >> 5); | 41 | ADDR = ((unsigned long *) addr) + (nr >> 5); |
56 | mask = 1 << (nr & 31); | 42 | mask = 1 << (nr & 31); |
57 | 43 | ||
58 | __asm__ __volatile__( | 44 | (void) ___set_bit(ADDR, mask); |
59 | "mov %%o7, %%g4\n\t" | ||
60 | "call ___set_bit\n\t" | ||
61 | " add %%o7, 8, %%o7\n" | ||
62 | : "=&r" (mask), "=r" (tmp1), "=r" (tmp2), "=r" (tmp3), "=r" (tmp4) | ||
63 | : "0" (mask), "r" (ADDR) | ||
64 | : "memory", "cc"); | ||
65 | } | 45 | } |
66 | 46 | ||
67 | static inline int test_and_clear_bit(unsigned long nr, volatile unsigned long *addr) | 47 | static inline int test_and_clear_bit(unsigned long nr, volatile unsigned long *addr) |
68 | { | 48 | { |
69 | register unsigned long mask asm("g2"); | 49 | unsigned long *ADDR, mask; |
70 | register unsigned long *ADDR asm("g1"); | ||
71 | register int tmp1 asm("g3"); | ||
72 | register int tmp2 asm("g4"); | ||
73 | register int tmp3 asm("g5"); | ||
74 | register int tmp4 asm("g7"); | ||
75 | 50 | ||
76 | ADDR = ((unsigned long *) addr) + (nr >> 5); | 51 | ADDR = ((unsigned long *) addr) + (nr >> 5); |
77 | mask = 1 << (nr & 31); | 52 | mask = 1 << (nr & 31); |
78 | 53 | ||
79 | __asm__ __volatile__( | 54 | return ___clear_bit(ADDR, mask) != 0; |
80 | "mov %%o7, %%g4\n\t" | ||
81 | "call ___clear_bit\n\t" | ||
82 | " add %%o7, 8, %%o7\n" | ||
83 | : "=&r" (mask), "=r" (tmp1), "=r" (tmp2), "=r" (tmp3), "=r" (tmp4) | ||
84 | : "0" (mask), "r" (ADDR) | ||
85 | : "memory", "cc"); | ||
86 | |||
87 | return mask != 0; | ||
88 | } | 55 | } |
89 | 56 | ||
90 | static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) | 57 | static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) |
91 | { | 58 | { |
92 | register unsigned long mask asm("g2"); | 59 | unsigned long *ADDR, mask; |
93 | register unsigned long *ADDR asm("g1"); | ||
94 | register int tmp1 asm("g3"); | ||
95 | register int tmp2 asm("g4"); | ||
96 | register int tmp3 asm("g5"); | ||
97 | register int tmp4 asm("g7"); | ||
98 | 60 | ||
99 | ADDR = ((unsigned long *) addr) + (nr >> 5); | 61 | ADDR = ((unsigned long *) addr) + (nr >> 5); |
100 | mask = 1 << (nr & 31); | 62 | mask = 1 << (nr & 31); |
101 | 63 | ||
102 | __asm__ __volatile__( | 64 | (void) ___clear_bit(ADDR, mask); |
103 | "mov %%o7, %%g4\n\t" | ||
104 | "call ___clear_bit\n\t" | ||
105 | " add %%o7, 8, %%o7\n" | ||
106 | : "=&r" (mask), "=r" (tmp1), "=r" (tmp2), "=r" (tmp3), "=r" (tmp4) | ||
107 | : "0" (mask), "r" (ADDR) | ||
108 | : "memory", "cc"); | ||
109 | } | 65 | } |
110 | 66 | ||
111 | static inline int test_and_change_bit(unsigned long nr, volatile unsigned long *addr) | 67 | static inline int test_and_change_bit(unsigned long nr, volatile unsigned long *addr) |
112 | { | 68 | { |
113 | register unsigned long mask asm("g2"); | 69 | unsigned long *ADDR, mask; |
114 | register unsigned long *ADDR asm("g1"); | ||
115 | register int tmp1 asm("g3"); | ||
116 | register int tmp2 asm("g4"); | ||
117 | register int tmp3 asm("g5"); | ||
118 | register int tmp4 asm("g7"); | ||
119 | 70 | ||
120 | ADDR = ((unsigned long *) addr) + (nr >> 5); | 71 | ADDR = ((unsigned long *) addr) + (nr >> 5); |
121 | mask = 1 << (nr & 31); | 72 | mask = 1 << (nr & 31); |
122 | 73 | ||
123 | __asm__ __volatile__( | 74 | return ___change_bit(ADDR, mask) != 0; |
124 | "mov %%o7, %%g4\n\t" | ||
125 | "call ___change_bit\n\t" | ||
126 | " add %%o7, 8, %%o7\n" | ||
127 | : "=&r" (mask), "=r" (tmp1), "=r" (tmp2), "=r" (tmp3), "=r" (tmp4) | ||
128 | : "0" (mask), "r" (ADDR) | ||
129 | : "memory", "cc"); | ||
130 | |||
131 | return mask != 0; | ||
132 | } | 75 | } |
133 | 76 | ||
134 | static inline void change_bit(unsigned long nr, volatile unsigned long *addr) | 77 | static inline void change_bit(unsigned long nr, volatile unsigned long *addr) |
135 | { | 78 | { |
136 | register unsigned long mask asm("g2"); | 79 | unsigned long *ADDR, mask; |
137 | register unsigned long *ADDR asm("g1"); | ||
138 | register int tmp1 asm("g3"); | ||
139 | register int tmp2 asm("g4"); | ||
140 | register int tmp3 asm("g5"); | ||
141 | register int tmp4 asm("g7"); | ||
142 | 80 | ||
143 | ADDR = ((unsigned long *) addr) + (nr >> 5); | 81 | ADDR = ((unsigned long *) addr) + (nr >> 5); |
144 | mask = 1 << (nr & 31); | 82 | mask = 1 << (nr & 31); |
145 | 83 | ||
146 | __asm__ __volatile__( | 84 | (void) ___change_bit(ADDR, mask); |
147 | "mov %%o7, %%g4\n\t" | ||
148 | "call ___change_bit\n\t" | ||
149 | " add %%o7, 8, %%o7\n" | ||
150 | : "=&r" (mask), "=r" (tmp1), "=r" (tmp2), "=r" (tmp3), "=r" (tmp4) | ||
151 | : "0" (mask), "r" (ADDR) | ||
152 | : "memory", "cc"); | ||
153 | } | 85 | } |
154 | 86 | ||
155 | #include <asm-generic/bitops/non-atomic.h> | 87 | #include <asm-generic/bitops/non-atomic.h> |
diff --git a/include/asm-sparc64/hw_irq.h b/include/asm-sparc64/hw_irq.h index 599b3b073450..8e44a8360829 100644 --- a/include/asm-sparc64/hw_irq.h +++ b/include/asm-sparc64/hw_irq.h | |||
@@ -1,6 +1,4 @@ | |||
1 | #ifndef __ASM_SPARC64_HW_IRQ_H | 1 | #ifndef __ASM_SPARC64_HW_IRQ_H |
2 | #define __ASM_SPARC64_HW_IRQ_H | 2 | #define __ASM_SPARC64_HW_IRQ_H |
3 | 3 | ||
4 | extern void hw_resend_irq(struct hw_interrupt_type *handler, unsigned int virt_irq); | ||
5 | |||
6 | #endif | 4 | #endif |
diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h index ced8cbde046d..0d3df76aa47f 100644 --- a/include/asm-sparc64/percpu.h +++ b/include/asm-sparc64/percpu.h | |||
@@ -5,6 +5,16 @@ | |||
5 | 5 | ||
6 | #ifdef CONFIG_SMP | 6 | #ifdef CONFIG_SMP |
7 | 7 | ||
8 | #ifdef CONFIG_MODULES | ||
9 | # define PERCPU_MODULE_RESERVE 8192 | ||
10 | #else | ||
11 | # define PERCPU_MODULE_RESERVE 0 | ||
12 | #endif | ||
13 | |||
14 | #define PERCPU_ENOUGH_ROOM \ | ||
15 | (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \ | ||
16 | PERCPU_MODULE_RESERVE) | ||
17 | |||
8 | extern void setup_per_cpu_areas(void); | 18 | extern void setup_per_cpu_areas(void); |
9 | 19 | ||
10 | extern unsigned long __per_cpu_base; | 20 | extern unsigned long __per_cpu_base; |
diff --git a/include/asm-x86_64/unwind.h b/include/asm-x86_64/unwind.h index 2f6349e48717..02710f6a4560 100644 --- a/include/asm-x86_64/unwind.h +++ b/include/asm-x86_64/unwind.h | |||
@@ -1,100 +1,6 @@ | |||
1 | #ifndef _ASM_X86_64_UNWIND_H | 1 | #ifndef _ASM_X86_64_UNWIND_H |
2 | #define _ASM_X86_64_UNWIND_H | 2 | #define _ASM_X86_64_UNWIND_H |
3 | 3 | ||
4 | /* | ||
5 | * Copyright (C) 2002-2006 Novell, Inc. | ||
6 | * Jan Beulich <jbeulich@novell.com> | ||
7 | * This code is released under version 2 of the GNU GPL. | ||
8 | */ | ||
9 | |||
10 | #ifdef CONFIG_STACK_UNWIND | ||
11 | |||
12 | #include <linux/sched.h> | ||
13 | #include <asm/ptrace.h> | ||
14 | #include <asm/uaccess.h> | ||
15 | #include <asm/vsyscall.h> | ||
16 | |||
17 | struct unwind_frame_info | ||
18 | { | ||
19 | struct pt_regs regs; | ||
20 | struct task_struct *task; | ||
21 | unsigned call_frame:1; | ||
22 | }; | ||
23 | |||
24 | #define UNW_PC(frame) (frame)->regs.rip | ||
25 | #define UNW_SP(frame) (frame)->regs.rsp | ||
26 | #ifdef CONFIG_FRAME_POINTER | ||
27 | #define UNW_FP(frame) (frame)->regs.rbp | ||
28 | #define FRAME_RETADDR_OFFSET 8 | ||
29 | #define FRAME_LINK_OFFSET 0 | ||
30 | #define STACK_BOTTOM(tsk) (((tsk)->thread.rsp0 - 1) & ~(THREAD_SIZE - 1)) | ||
31 | #define STACK_TOP(tsk) ((tsk)->thread.rsp0) | ||
32 | #endif | ||
33 | /* Might need to account for the special exception and interrupt handling | ||
34 | stacks here, since normally | ||
35 | EXCEPTION_STACK_ORDER < THREAD_ORDER < IRQSTACK_ORDER, | ||
36 | but the construct is needed only for getting across the stack switch to | ||
37 | the interrupt stack - thus considering the IRQ stack itself is unnecessary, | ||
38 | and the overhead of comparing against all exception handling stacks seems | ||
39 | not desirable. */ | ||
40 | #define STACK_LIMIT(ptr) (((ptr) - 1) & ~(THREAD_SIZE - 1)) | ||
41 | |||
42 | #define UNW_REGISTER_INFO \ | ||
43 | PTREGS_INFO(rax), \ | ||
44 | PTREGS_INFO(rdx), \ | ||
45 | PTREGS_INFO(rcx), \ | ||
46 | PTREGS_INFO(rbx), \ | ||
47 | PTREGS_INFO(rsi), \ | ||
48 | PTREGS_INFO(rdi), \ | ||
49 | PTREGS_INFO(rbp), \ | ||
50 | PTREGS_INFO(rsp), \ | ||
51 | PTREGS_INFO(r8), \ | ||
52 | PTREGS_INFO(r9), \ | ||
53 | PTREGS_INFO(r10), \ | ||
54 | PTREGS_INFO(r11), \ | ||
55 | PTREGS_INFO(r12), \ | ||
56 | PTREGS_INFO(r13), \ | ||
57 | PTREGS_INFO(r14), \ | ||
58 | PTREGS_INFO(r15), \ | ||
59 | PTREGS_INFO(rip) | ||
60 | |||
61 | #define UNW_DEFAULT_RA(raItem, dataAlign) \ | ||
62 | ((raItem).where == Memory && \ | ||
63 | !((raItem).value * (dataAlign) + 8)) | ||
64 | |||
65 | static inline void arch_unw_init_frame_info(struct unwind_frame_info *info, | ||
66 | /*const*/ struct pt_regs *regs) | ||
67 | { | ||
68 | info->regs = *regs; | ||
69 | } | ||
70 | |||
71 | static inline void arch_unw_init_blocked(struct unwind_frame_info *info) | ||
72 | { | ||
73 | extern const char thread_return[]; | ||
74 | |||
75 | memset(&info->regs, 0, sizeof(info->regs)); | ||
76 | info->regs.rip = (unsigned long)thread_return; | ||
77 | info->regs.cs = __KERNEL_CS; | ||
78 | __get_user(info->regs.rbp, (unsigned long *)info->task->thread.rsp); | ||
79 | info->regs.rsp = info->task->thread.rsp; | ||
80 | info->regs.ss = __KERNEL_DS; | ||
81 | } | ||
82 | |||
83 | extern int arch_unwind_init_running(struct unwind_frame_info *, | ||
84 | int (*callback)(struct unwind_frame_info *, | ||
85 | void *arg), | ||
86 | void *arg); | ||
87 | |||
88 | static inline int arch_unw_user_mode(const struct unwind_frame_info *info) | ||
89 | { | ||
90 | return user_mode(&info->regs) | ||
91 | || (long)info->regs.rip >= 0 | ||
92 | || (info->regs.rip >= VSYSCALL_START && info->regs.rip < VSYSCALL_END) | ||
93 | || (long)info->regs.rsp >= 0; | ||
94 | } | ||
95 | |||
96 | #else | ||
97 | |||
98 | #define UNW_PC(frame) ((void)(frame), 0UL) | 4 | #define UNW_PC(frame) ((void)(frame), 0UL) |
99 | #define UNW_SP(frame) ((void)(frame), 0UL) | 5 | #define UNW_SP(frame) ((void)(frame), 0UL) |
100 | 6 | ||
@@ -103,6 +9,4 @@ static inline int arch_unw_user_mode(const void *info) | |||
103 | return 0; | 9 | return 0; |
104 | } | 10 | } |
105 | 11 | ||
106 | #endif | ||
107 | |||
108 | #endif /* _ASM_X86_64_UNWIND_H */ | 12 | #endif /* _ASM_X86_64_UNWIND_H */ |
diff --git a/include/linux/connector.h b/include/linux/connector.h index 3ea1cd58de97..10eb56b2940a 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -133,7 +133,7 @@ struct cn_callback_data { | |||
133 | struct cn_callback_entry { | 133 | struct cn_callback_entry { |
134 | struct list_head callback_entry; | 134 | struct list_head callback_entry; |
135 | struct cn_callback *cb; | 135 | struct cn_callback *cb; |
136 | struct delayed_work work; | 136 | struct work_struct work; |
137 | struct cn_queue_dev *pdev; | 137 | struct cn_queue_dev *pdev; |
138 | 138 | ||
139 | struct cn_callback_id id; | 139 | struct cn_callback_id id; |
diff --git a/include/linux/input.h b/include/linux/input.h index 4e61158b06a0..bde65c8a3519 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -491,6 +491,21 @@ struct input_absinfo { | |||
491 | #define KEY_DIGITS 0x19d | 491 | #define KEY_DIGITS 0x19d |
492 | #define KEY_TEEN 0x19e | 492 | #define KEY_TEEN 0x19e |
493 | #define KEY_TWEN 0x19f | 493 | #define KEY_TWEN 0x19f |
494 | #define KEY_VIDEOPHONE 0x1a0 | ||
495 | #define KEY_GAMES 0x1a1 | ||
496 | #define KEY_ZOOMIN 0x1a2 | ||
497 | #define KEY_ZOOMOUT 0x1a3 | ||
498 | #define KEY_ZOOMRESET 0x1a4 | ||
499 | #define KEY_WORDPROCESSOR 0x1a5 | ||
500 | #define KEY_EDITOR 0x1a6 | ||
501 | #define KEY_SPREADSHEET 0x1a7 | ||
502 | #define KEY_GRAPHICSEDITOR 0x1a8 | ||
503 | #define KEY_PRESENTATION 0x1a9 | ||
504 | #define KEY_DATABASE 0x1aa | ||
505 | #define KEY_NEWS 0x1ab | ||
506 | #define KEY_VOICEMAIL 0x1ac | ||
507 | #define KEY_ADDRESSBOOK 0x1ad | ||
508 | #define KEY_MESSENGER 0x1ae | ||
494 | 509 | ||
495 | #define KEY_DEL_EOL 0x1c0 | 510 | #define KEY_DEL_EOL 0x1c0 |
496 | #define KEY_DEL_EOS 0x1c1 | 511 | #define KEY_DEL_EOS 0x1c1 |
diff --git a/include/linux/unwind.h b/include/linux/unwind.h index 749928c161fb..7760860fa170 100644 --- a/include/linux/unwind.h +++ b/include/linux/unwind.h | |||
@@ -14,63 +14,6 @@ | |||
14 | 14 | ||
15 | struct module; | 15 | struct module; |
16 | 16 | ||
17 | #ifdef CONFIG_STACK_UNWIND | ||
18 | |||
19 | #include <asm/unwind.h> | ||
20 | |||
21 | #ifndef ARCH_UNWIND_SECTION_NAME | ||
22 | #define ARCH_UNWIND_SECTION_NAME ".eh_frame" | ||
23 | #endif | ||
24 | |||
25 | /* | ||
26 | * Initialize unwind support. | ||
27 | */ | ||
28 | extern void unwind_init(void); | ||
29 | extern void unwind_setup(void); | ||
30 | |||
31 | #ifdef CONFIG_MODULES | ||
32 | |||
33 | extern void *unwind_add_table(struct module *, | ||
34 | const void *table_start, | ||
35 | unsigned long table_size); | ||
36 | |||
37 | extern void unwind_remove_table(void *handle, int init_only); | ||
38 | |||
39 | #endif | ||
40 | |||
41 | extern int unwind_init_frame_info(struct unwind_frame_info *, | ||
42 | struct task_struct *, | ||
43 | /*const*/ struct pt_regs *); | ||
44 | |||
45 | /* | ||
46 | * Prepare to unwind a blocked task. | ||
47 | */ | ||
48 | extern int unwind_init_blocked(struct unwind_frame_info *, | ||
49 | struct task_struct *); | ||
50 | |||
51 | /* | ||
52 | * Prepare to unwind the currently running thread. | ||
53 | */ | ||
54 | extern int unwind_init_running(struct unwind_frame_info *, | ||
55 | asmlinkage int (*callback)(struct unwind_frame_info *, | ||
56 | void *arg), | ||
57 | void *arg); | ||
58 | |||
59 | /* | ||
60 | * Unwind to previous to frame. Returns 0 if successful, negative | ||
61 | * number in case of an error. | ||
62 | */ | ||
63 | extern int unwind(struct unwind_frame_info *); | ||
64 | |||
65 | /* | ||
66 | * Unwind until the return pointer is in user-land (or until an error | ||
67 | * occurs). Returns 0 if successful, negative number in case of | ||
68 | * error. | ||
69 | */ | ||
70 | extern int unwind_to_user(struct unwind_frame_info *); | ||
71 | |||
72 | #else | ||
73 | |||
74 | struct unwind_frame_info {}; | 17 | struct unwind_frame_info {}; |
75 | 18 | ||
76 | static inline void unwind_init(void) {} | 19 | static inline void unwind_init(void) {} |
@@ -85,12 +28,12 @@ static inline void *unwind_add_table(struct module *mod, | |||
85 | return NULL; | 28 | return NULL; |
86 | } | 29 | } |
87 | 30 | ||
88 | #endif | ||
89 | |||
90 | static inline void unwind_remove_table(void *handle, int init_only) | 31 | static inline void unwind_remove_table(void *handle, int init_only) |
91 | { | 32 | { |
92 | } | 33 | } |
93 | 34 | ||
35 | #endif | ||
36 | |||
94 | static inline int unwind_init_frame_info(struct unwind_frame_info *info, | 37 | static inline int unwind_init_frame_info(struct unwind_frame_info *info, |
95 | struct task_struct *tsk, | 38 | struct task_struct *tsk, |
96 | const struct pt_regs *regs) | 39 | const struct pt_regs *regs) |
@@ -122,6 +65,4 @@ static inline int unwind_to_user(struct unwind_frame_info *info) | |||
122 | return -ENOSYS; | 65 | return -ENOSYS; |
123 | } | 66 | } |
124 | 67 | ||
125 | #endif | ||
126 | |||
127 | #endif /* _LINUX_UNWIND_H */ | 68 | #endif /* _LINUX_UNWIND_H */ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index edef8d50b26b..2a7b38d87018 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -8,16 +8,21 @@ | |||
8 | #include <linux/timer.h> | 8 | #include <linux/timer.h> |
9 | #include <linux/linkage.h> | 9 | #include <linux/linkage.h> |
10 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
11 | #include <asm/atomic.h> | ||
11 | 12 | ||
12 | struct workqueue_struct; | 13 | struct workqueue_struct; |
13 | 14 | ||
14 | struct work_struct; | 15 | struct work_struct; |
15 | typedef void (*work_func_t)(struct work_struct *work); | 16 | typedef void (*work_func_t)(struct work_struct *work); |
16 | 17 | ||
18 | /* | ||
19 | * The first word is the work queue pointer and the flags rolled into | ||
20 | * one | ||
21 | */ | ||
22 | #define work_data_bits(work) ((unsigned long *)(&(work)->data)) | ||
23 | |||
17 | struct work_struct { | 24 | struct work_struct { |
18 | /* the first word is the work queue pointer and the flags rolled into | 25 | atomic_long_t data; |
19 | * one */ | ||
20 | unsigned long management; | ||
21 | #define WORK_STRUCT_PENDING 0 /* T if work item pending execution */ | 26 | #define WORK_STRUCT_PENDING 0 /* T if work item pending execution */ |
22 | #define WORK_STRUCT_NOAUTOREL 1 /* F if work item automatically released on exec */ | 27 | #define WORK_STRUCT_NOAUTOREL 1 /* F if work item automatically released on exec */ |
23 | #define WORK_STRUCT_FLAG_MASK (3UL) | 28 | #define WORK_STRUCT_FLAG_MASK (3UL) |
@@ -26,6 +31,9 @@ struct work_struct { | |||
26 | work_func_t func; | 31 | work_func_t func; |
27 | }; | 32 | }; |
28 | 33 | ||
34 | #define WORK_DATA_INIT(autorelease) \ | ||
35 | ATOMIC_LONG_INIT((autorelease) << WORK_STRUCT_NOAUTOREL) | ||
36 | |||
29 | struct delayed_work { | 37 | struct delayed_work { |
30 | struct work_struct work; | 38 | struct work_struct work; |
31 | struct timer_list timer; | 39 | struct timer_list timer; |
@@ -36,13 +44,13 @@ struct execute_work { | |||
36 | }; | 44 | }; |
37 | 45 | ||
38 | #define __WORK_INITIALIZER(n, f) { \ | 46 | #define __WORK_INITIALIZER(n, f) { \ |
39 | .management = 0, \ | 47 | .data = WORK_DATA_INIT(0), \ |
40 | .entry = { &(n).entry, &(n).entry }, \ | 48 | .entry = { &(n).entry, &(n).entry }, \ |
41 | .func = (f), \ | 49 | .func = (f), \ |
42 | } | 50 | } |
43 | 51 | ||
44 | #define __WORK_INITIALIZER_NAR(n, f) { \ | 52 | #define __WORK_INITIALIZER_NAR(n, f) { \ |
45 | .management = (1 << WORK_STRUCT_NOAUTOREL), \ | 53 | .data = WORK_DATA_INIT(1), \ |
46 | .entry = { &(n).entry, &(n).entry }, \ | 54 | .entry = { &(n).entry, &(n).entry }, \ |
47 | .func = (f), \ | 55 | .func = (f), \ |
48 | } | 56 | } |
@@ -82,17 +90,21 @@ struct execute_work { | |||
82 | 90 | ||
83 | /* | 91 | /* |
84 | * initialize all of a work item in one go | 92 | * initialize all of a work item in one go |
93 | * | ||
94 | * NOTE! No point in using "atomic_long_set()": useing a direct | ||
95 | * assignment of the work data initializer allows the compiler | ||
96 | * to generate better code. | ||
85 | */ | 97 | */ |
86 | #define INIT_WORK(_work, _func) \ | 98 | #define INIT_WORK(_work, _func) \ |
87 | do { \ | 99 | do { \ |
88 | (_work)->management = 0; \ | 100 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(0); \ |
89 | INIT_LIST_HEAD(&(_work)->entry); \ | 101 | INIT_LIST_HEAD(&(_work)->entry); \ |
90 | PREPARE_WORK((_work), (_func)); \ | 102 | PREPARE_WORK((_work), (_func)); \ |
91 | } while (0) | 103 | } while (0) |
92 | 104 | ||
93 | #define INIT_WORK_NAR(_work, _func) \ | 105 | #define INIT_WORK_NAR(_work, _func) \ |
94 | do { \ | 106 | do { \ |
95 | (_work)->management = (1 << WORK_STRUCT_NOAUTOREL); \ | 107 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(1); \ |
96 | INIT_LIST_HEAD(&(_work)->entry); \ | 108 | INIT_LIST_HEAD(&(_work)->entry); \ |
97 | PREPARE_WORK((_work), (_func)); \ | 109 | PREPARE_WORK((_work), (_func)); \ |
98 | } while (0) | 110 | } while (0) |
@@ -114,15 +126,15 @@ struct execute_work { | |||
114 | * @work: The work item in question | 126 | * @work: The work item in question |
115 | */ | 127 | */ |
116 | #define work_pending(work) \ | 128 | #define work_pending(work) \ |
117 | test_bit(WORK_STRUCT_PENDING, &(work)->management) | 129 | test_bit(WORK_STRUCT_PENDING, work_data_bits(work)) |
118 | 130 | ||
119 | /** | 131 | /** |
120 | * delayed_work_pending - Find out whether a delayable work item is currently | 132 | * delayed_work_pending - Find out whether a delayable work item is currently |
121 | * pending | 133 | * pending |
122 | * @work: The work item in question | 134 | * @work: The work item in question |
123 | */ | 135 | */ |
124 | #define delayed_work_pending(work) \ | 136 | #define delayed_work_pending(w) \ |
125 | test_bit(WORK_STRUCT_PENDING, &(work)->work.management) | 137 | work_pending(&(w)->work) |
126 | 138 | ||
127 | /** | 139 | /** |
128 | * work_release - Release a work item under execution | 140 | * work_release - Release a work item under execution |
@@ -143,7 +155,7 @@ struct execute_work { | |||
143 | * This should also be used to release a delayed work item. | 155 | * This should also be used to release a delayed work item. |
144 | */ | 156 | */ |
145 | #define work_release(work) \ | 157 | #define work_release(work) \ |
146 | clear_bit(WORK_STRUCT_PENDING, &(work)->management) | 158 | clear_bit(WORK_STRUCT_PENDING, work_data_bits(work)) |
147 | 159 | ||
148 | 160 | ||
149 | extern struct workqueue_struct *__create_workqueue(const char *name, | 161 | extern struct workqueue_struct *__create_workqueue(const char *name, |
@@ -188,7 +200,7 @@ static inline int cancel_delayed_work(struct delayed_work *work) | |||
188 | 200 | ||
189 | ret = del_timer_sync(&work->timer); | 201 | ret = del_timer_sync(&work->timer); |
190 | if (ret) | 202 | if (ret) |
191 | clear_bit(WORK_STRUCT_PENDING, &work->work.management); | 203 | work_release(&work->work); |
192 | return ret; | 204 | return ret; |
193 | } | 205 | } |
194 | 206 | ||
diff --git a/include/net/ax25.h b/include/net/ax25.h index 14b72d868f03..5ae10dd2e32e 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -277,7 +277,7 @@ struct sock *ax25_get_socket(ax25_address *, ax25_address *, int); | |||
277 | extern ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *, struct net_device *); | 277 | extern ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *, struct net_device *); |
278 | extern void ax25_send_to_raw(ax25_address *, struct sk_buff *, int); | 278 | extern void ax25_send_to_raw(ax25_address *, struct sk_buff *, int); |
279 | extern void ax25_destroy_socket(ax25_cb *); | 279 | extern void ax25_destroy_socket(ax25_cb *); |
280 | extern ax25_cb *ax25_create_cb(void); | 280 | extern ax25_cb * __must_check ax25_create_cb(void); |
281 | extern void ax25_fillin_cb(ax25_cb *, ax25_dev *); | 281 | extern void ax25_fillin_cb(ax25_cb *, ax25_dev *); |
282 | extern struct sock *ax25_make_new(struct sock *, struct ax25_dev *); | 282 | extern struct sock *ax25_make_new(struct sock *, struct ax25_dev *); |
283 | 283 | ||
@@ -333,11 +333,25 @@ extern void ax25_ds_t3timer_expiry(ax25_cb *); | |||
333 | extern void ax25_ds_idletimer_expiry(ax25_cb *); | 333 | extern void ax25_ds_idletimer_expiry(ax25_cb *); |
334 | 334 | ||
335 | /* ax25_iface.c */ | 335 | /* ax25_iface.c */ |
336 | extern int ax25_protocol_register(unsigned int, int (*)(struct sk_buff *, ax25_cb *)); | 336 | |
337 | struct ax25_protocol { | ||
338 | struct ax25_protocol *next; | ||
339 | unsigned int pid; | ||
340 | int (*func)(struct sk_buff *, ax25_cb *); | ||
341 | }; | ||
342 | |||
343 | extern void ax25_register_pid(struct ax25_protocol *ap); | ||
337 | extern void ax25_protocol_release(unsigned int); | 344 | extern void ax25_protocol_release(unsigned int); |
338 | extern int ax25_linkfail_register(void (*)(ax25_cb *, int)); | 345 | |
339 | extern void ax25_linkfail_release(void (*)(ax25_cb *, int)); | 346 | struct ax25_linkfail { |
340 | extern int ax25_listen_register(ax25_address *, struct net_device *); | 347 | struct hlist_node lf_node; |
348 | void (*func)(ax25_cb *, int); | ||
349 | }; | ||
350 | |||
351 | extern void ax25_linkfail_register(struct ax25_linkfail *lf); | ||
352 | extern void ax25_linkfail_release(struct ax25_linkfail *lf); | ||
353 | extern int __must_check ax25_listen_register(ax25_address *, | ||
354 | struct net_device *); | ||
341 | extern void ax25_listen_release(ax25_address *, struct net_device *); | 355 | extern void ax25_listen_release(ax25_address *, struct net_device *); |
342 | extern int (*ax25_protocol_function(unsigned int))(struct sk_buff *, ax25_cb *); | 356 | extern int (*ax25_protocol_function(unsigned int))(struct sk_buff *, ax25_cb *); |
343 | extern int ax25_listen_mine(ax25_address *, struct net_device *); | 357 | extern int ax25_listen_mine(ax25_address *, struct net_device *); |
@@ -415,7 +429,7 @@ extern unsigned long ax25_display_timer(struct timer_list *); | |||
415 | /* ax25_uid.c */ | 429 | /* ax25_uid.c */ |
416 | extern int ax25_uid_policy; | 430 | extern int ax25_uid_policy; |
417 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); | 431 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); |
418 | extern int ax25_uid_ioctl(int, struct sockaddr_ax25 *); | 432 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); |
419 | extern struct file_operations ax25_uid_fops; | 433 | extern struct file_operations ax25_uid_fops; |
420 | extern void ax25_uid_free(void); | 434 | extern void ax25_uid_free(void); |
421 | 435 | ||
diff --git a/include/net/rose.h b/include/net/rose.h index 012b09ed2401..4c05a88b921b 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -188,13 +188,13 @@ extern void rose_kick(struct sock *); | |||
188 | extern void rose_enquiry_response(struct sock *); | 188 | extern void rose_enquiry_response(struct sock *); |
189 | 189 | ||
190 | /* rose_route.c */ | 190 | /* rose_route.c */ |
191 | extern struct rose_neigh *rose_loopback_neigh; | 191 | extern struct rose_neigh rose_loopback_neigh; |
192 | extern struct file_operations rose_neigh_fops; | 192 | extern struct file_operations rose_neigh_fops; |
193 | extern struct file_operations rose_nodes_fops; | 193 | extern struct file_operations rose_nodes_fops; |
194 | extern struct file_operations rose_routes_fops; | 194 | extern struct file_operations rose_routes_fops; |
195 | 195 | ||
196 | extern int rose_add_loopback_neigh(void); | 196 | extern void rose_add_loopback_neigh(void); |
197 | extern int rose_add_loopback_node(rose_address *); | 197 | extern int __must_check rose_add_loopback_node(rose_address *); |
198 | extern void rose_del_loopback_node(rose_address *); | 198 | extern void rose_del_loopback_node(rose_address *); |
199 | extern void rose_rt_device_down(struct net_device *); | 199 | extern void rose_rt_device_down(struct net_device *); |
200 | extern void rose_link_device_down(struct net_device *); | 200 | extern void rose_link_device_down(struct net_device *); |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 3c2e10574b23..0bfa3328d686 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -1639,7 +1639,14 @@ static inline void *ib_dma_alloc_coherent(struct ib_device *dev, | |||
1639 | { | 1639 | { |
1640 | if (dev->dma_ops) | 1640 | if (dev->dma_ops) |
1641 | return dev->dma_ops->alloc_coherent(dev, size, dma_handle, flag); | 1641 | return dev->dma_ops->alloc_coherent(dev, size, dma_handle, flag); |
1642 | return dma_alloc_coherent(dev->dma_device, size, dma_handle, flag); | 1642 | else { |
1643 | dma_addr_t handle; | ||
1644 | void *ret; | ||
1645 | |||
1646 | ret = dma_alloc_coherent(dev->dma_device, size, &handle, flag); | ||
1647 | *dma_handle = handle; | ||
1648 | return ret; | ||
1649 | } | ||
1643 | } | 1650 | } |
1644 | 1651 | ||
1645 | /** | 1652 | /** |
diff --git a/kernel/Makefile b/kernel/Makefile index 5e3f3b75563a..14f4d45e0ae9 100644 --- a/kernel/Makefile +++ b/kernel/Makefile | |||
@@ -31,7 +31,6 @@ obj-$(CONFIG_PROVE_LOCKING) += spinlock.o | |||
31 | obj-$(CONFIG_UID16) += uid16.o | 31 | obj-$(CONFIG_UID16) += uid16.o |
32 | obj-$(CONFIG_MODULES) += module.o | 32 | obj-$(CONFIG_MODULES) += module.o |
33 | obj-$(CONFIG_KALLSYMS) += kallsyms.o | 33 | obj-$(CONFIG_KALLSYMS) += kallsyms.o |
34 | obj-$(CONFIG_STACK_UNWIND) += unwind.o | ||
35 | obj-$(CONFIG_PM) += power/ | 34 | obj-$(CONFIG_PM) += power/ |
36 | obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o | 35 | obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o |
37 | obj-$(CONFIG_KEXEC) += kexec.o | 36 | obj-$(CONFIG_KEXEC) += kexec.o |
diff --git a/kernel/unwind.c b/kernel/unwind.c deleted file mode 100644 index 09c261329249..000000000000 --- a/kernel/unwind.c +++ /dev/null | |||
@@ -1,1305 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002-2006 Novell, Inc. | ||
3 | * Jan Beulich <jbeulich@novell.com> | ||
4 | * This code is released under version 2 of the GNU GPL. | ||
5 | * | ||
6 | * A simple API for unwinding kernel stacks. This is used for | ||
7 | * debugging and error reporting purposes. The kernel doesn't need | ||
8 | * full-blown stack unwinding with all the bells and whistles, so there | ||
9 | * is not much point in implementing the full Dwarf2 unwind API. | ||
10 | */ | ||
11 | |||
12 | #include <linux/unwind.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/bootmem.h> | ||
15 | #include <linux/sort.h> | ||
16 | #include <linux/stop_machine.h> | ||
17 | #include <linux/uaccess.h> | ||
18 | #include <asm/sections.h> | ||
19 | #include <asm/uaccess.h> | ||
20 | #include <asm/unaligned.h> | ||
21 | |||
22 | extern const char __start_unwind[], __end_unwind[]; | ||
23 | extern const u8 __start_unwind_hdr[], __end_unwind_hdr[]; | ||
24 | |||
25 | #define MAX_STACK_DEPTH 8 | ||
26 | |||
27 | #define EXTRA_INFO(f) { \ | ||
28 | BUILD_BUG_ON_ZERO(offsetof(struct unwind_frame_info, f) \ | ||
29 | % FIELD_SIZEOF(struct unwind_frame_info, f)) \ | ||
30 | + offsetof(struct unwind_frame_info, f) \ | ||
31 | / FIELD_SIZEOF(struct unwind_frame_info, f), \ | ||
32 | FIELD_SIZEOF(struct unwind_frame_info, f) \ | ||
33 | } | ||
34 | #define PTREGS_INFO(f) EXTRA_INFO(regs.f) | ||
35 | |||
36 | static const struct { | ||
37 | unsigned offs:BITS_PER_LONG / 2; | ||
38 | unsigned width:BITS_PER_LONG / 2; | ||
39 | } reg_info[] = { | ||
40 | UNW_REGISTER_INFO | ||
41 | }; | ||
42 | |||
43 | #undef PTREGS_INFO | ||
44 | #undef EXTRA_INFO | ||
45 | |||
46 | #ifndef REG_INVALID | ||
47 | #define REG_INVALID(r) (reg_info[r].width == 0) | ||
48 | #endif | ||
49 | |||
50 | #define DW_CFA_nop 0x00 | ||
51 | #define DW_CFA_set_loc 0x01 | ||
52 | #define DW_CFA_advance_loc1 0x02 | ||
53 | #define DW_CFA_advance_loc2 0x03 | ||
54 | #define DW_CFA_advance_loc4 0x04 | ||
55 | #define DW_CFA_offset_extended 0x05 | ||
56 | #define DW_CFA_restore_extended 0x06 | ||
57 | #define DW_CFA_undefined 0x07 | ||
58 | #define DW_CFA_same_value 0x08 | ||
59 | #define DW_CFA_register 0x09 | ||
60 | #define DW_CFA_remember_state 0x0a | ||
61 | #define DW_CFA_restore_state 0x0b | ||
62 | #define DW_CFA_def_cfa 0x0c | ||
63 | #define DW_CFA_def_cfa_register 0x0d | ||
64 | #define DW_CFA_def_cfa_offset 0x0e | ||
65 | #define DW_CFA_def_cfa_expression 0x0f | ||
66 | #define DW_CFA_expression 0x10 | ||
67 | #define DW_CFA_offset_extended_sf 0x11 | ||
68 | #define DW_CFA_def_cfa_sf 0x12 | ||
69 | #define DW_CFA_def_cfa_offset_sf 0x13 | ||
70 | #define DW_CFA_val_offset 0x14 | ||
71 | #define DW_CFA_val_offset_sf 0x15 | ||
72 | #define DW_CFA_val_expression 0x16 | ||
73 | #define DW_CFA_lo_user 0x1c | ||
74 | #define DW_CFA_GNU_window_save 0x2d | ||
75 | #define DW_CFA_GNU_args_size 0x2e | ||
76 | #define DW_CFA_GNU_negative_offset_extended 0x2f | ||
77 | #define DW_CFA_hi_user 0x3f | ||
78 | |||
79 | #define DW_EH_PE_FORM 0x07 | ||
80 | #define DW_EH_PE_native 0x00 | ||
81 | #define DW_EH_PE_leb128 0x01 | ||
82 | #define DW_EH_PE_data2 0x02 | ||
83 | #define DW_EH_PE_data4 0x03 | ||
84 | #define DW_EH_PE_data8 0x04 | ||
85 | #define DW_EH_PE_signed 0x08 | ||
86 | #define DW_EH_PE_ADJUST 0x70 | ||
87 | #define DW_EH_PE_abs 0x00 | ||
88 | #define DW_EH_PE_pcrel 0x10 | ||
89 | #define DW_EH_PE_textrel 0x20 | ||
90 | #define DW_EH_PE_datarel 0x30 | ||
91 | #define DW_EH_PE_funcrel 0x40 | ||
92 | #define DW_EH_PE_aligned 0x50 | ||
93 | #define DW_EH_PE_indirect 0x80 | ||
94 | #define DW_EH_PE_omit 0xff | ||
95 | |||
96 | typedef unsigned long uleb128_t; | ||
97 | typedef signed long sleb128_t; | ||
98 | #define sleb128abs __builtin_labs | ||
99 | |||
100 | static struct unwind_table { | ||
101 | struct { | ||
102 | unsigned long pc; | ||
103 | unsigned long range; | ||
104 | } core, init; | ||
105 | const void *address; | ||
106 | unsigned long size; | ||
107 | const unsigned char *header; | ||
108 | unsigned long hdrsz; | ||
109 | struct unwind_table *link; | ||
110 | const char *name; | ||
111 | } root_table; | ||
112 | |||
113 | struct unwind_item { | ||
114 | enum item_location { | ||
115 | Nowhere, | ||
116 | Memory, | ||
117 | Register, | ||
118 | Value | ||
119 | } where; | ||
120 | uleb128_t value; | ||
121 | }; | ||
122 | |||
123 | struct unwind_state { | ||
124 | uleb128_t loc, org; | ||
125 | const u8 *cieStart, *cieEnd; | ||
126 | uleb128_t codeAlign; | ||
127 | sleb128_t dataAlign; | ||
128 | struct cfa { | ||
129 | uleb128_t reg, offs; | ||
130 | } cfa; | ||
131 | struct unwind_item regs[ARRAY_SIZE(reg_info)]; | ||
132 | unsigned stackDepth:8; | ||
133 | unsigned version:8; | ||
134 | const u8 *label; | ||
135 | const u8 *stack[MAX_STACK_DEPTH]; | ||
136 | }; | ||
137 | |||
138 | static const struct cfa badCFA = { ARRAY_SIZE(reg_info), 1 }; | ||
139 | |||
140 | static unsigned unwind_debug; | ||
141 | static int __init unwind_debug_setup(char *s) | ||
142 | { | ||
143 | unwind_debug = simple_strtoul(s, NULL, 0); | ||
144 | return 1; | ||
145 | } | ||
146 | __setup("unwind_debug=", unwind_debug_setup); | ||
147 | #define dprintk(lvl, fmt, args...) \ | ||
148 | ((void)(lvl > unwind_debug \ | ||
149 | || printk(KERN_DEBUG "unwind: " fmt "\n", ##args))) | ||
150 | |||
151 | static struct unwind_table *find_table(unsigned long pc) | ||
152 | { | ||
153 | struct unwind_table *table; | ||
154 | |||
155 | for (table = &root_table; table; table = table->link) | ||
156 | if ((pc >= table->core.pc | ||
157 | && pc < table->core.pc + table->core.range) | ||
158 | || (pc >= table->init.pc | ||
159 | && pc < table->init.pc + table->init.range)) | ||
160 | break; | ||
161 | |||
162 | return table; | ||
163 | } | ||
164 | |||
165 | static unsigned long read_pointer(const u8 **pLoc, | ||
166 | const void *end, | ||
167 | signed ptrType, | ||
168 | unsigned long text_base, | ||
169 | unsigned long data_base); | ||
170 | |||
171 | static void init_unwind_table(struct unwind_table *table, | ||
172 | const char *name, | ||
173 | const void *core_start, | ||
174 | unsigned long core_size, | ||
175 | const void *init_start, | ||
176 | unsigned long init_size, | ||
177 | const void *table_start, | ||
178 | unsigned long table_size, | ||
179 | const u8 *header_start, | ||
180 | unsigned long header_size) | ||
181 | { | ||
182 | const u8 *ptr = header_start + 4; | ||
183 | const u8 *end = header_start + header_size; | ||
184 | |||
185 | table->core.pc = (unsigned long)core_start; | ||
186 | table->core.range = core_size; | ||
187 | table->init.pc = (unsigned long)init_start; | ||
188 | table->init.range = init_size; | ||
189 | table->address = table_start; | ||
190 | table->size = table_size; | ||
191 | /* See if the linker provided table looks valid. */ | ||
192 | if (header_size <= 4 | ||
193 | || header_start[0] != 1 | ||
194 | || (void *)read_pointer(&ptr, end, header_start[1], 0, 0) | ||
195 | != table_start | ||
196 | || !read_pointer(&ptr, end, header_start[2], 0, 0) | ||
197 | || !read_pointer(&ptr, end, header_start[3], 0, | ||
198 | (unsigned long)header_start) | ||
199 | || !read_pointer(&ptr, end, header_start[3], 0, | ||
200 | (unsigned long)header_start)) | ||
201 | header_start = NULL; | ||
202 | table->hdrsz = header_size; | ||
203 | smp_wmb(); | ||
204 | table->header = header_start; | ||
205 | table->link = NULL; | ||
206 | table->name = name; | ||
207 | } | ||
208 | |||
209 | void __init unwind_init(void) | ||
210 | { | ||
211 | init_unwind_table(&root_table, "kernel", | ||
212 | _text, _end - _text, | ||
213 | NULL, 0, | ||
214 | __start_unwind, __end_unwind - __start_unwind, | ||
215 | __start_unwind_hdr, __end_unwind_hdr - __start_unwind_hdr); | ||
216 | } | ||
217 | |||
218 | static const u32 bad_cie, not_fde; | ||
219 | static const u32 *cie_for_fde(const u32 *fde, const struct unwind_table *); | ||
220 | static signed fde_pointer_type(const u32 *cie); | ||
221 | |||
222 | struct eh_frame_hdr_table_entry { | ||
223 | unsigned long start, fde; | ||
224 | }; | ||
225 | |||
226 | static int cmp_eh_frame_hdr_table_entries(const void *p1, const void *p2) | ||
227 | { | ||
228 | const struct eh_frame_hdr_table_entry *e1 = p1; | ||
229 | const struct eh_frame_hdr_table_entry *e2 = p2; | ||
230 | |||
231 | return (e1->start > e2->start) - (e1->start < e2->start); | ||
232 | } | ||
233 | |||
234 | static void swap_eh_frame_hdr_table_entries(void *p1, void *p2, int size) | ||
235 | { | ||
236 | struct eh_frame_hdr_table_entry *e1 = p1; | ||
237 | struct eh_frame_hdr_table_entry *e2 = p2; | ||
238 | unsigned long v; | ||
239 | |||
240 | v = e1->start; | ||
241 | e1->start = e2->start; | ||
242 | e2->start = v; | ||
243 | v = e1->fde; | ||
244 | e1->fde = e2->fde; | ||
245 | e2->fde = v; | ||
246 | } | ||
247 | |||
248 | static void __init setup_unwind_table(struct unwind_table *table, | ||
249 | void *(*alloc)(unsigned long)) | ||
250 | { | ||
251 | const u8 *ptr; | ||
252 | unsigned long tableSize = table->size, hdrSize; | ||
253 | unsigned n; | ||
254 | const u32 *fde; | ||
255 | struct { | ||
256 | u8 version; | ||
257 | u8 eh_frame_ptr_enc; | ||
258 | u8 fde_count_enc; | ||
259 | u8 table_enc; | ||
260 | unsigned long eh_frame_ptr; | ||
261 | unsigned int fde_count; | ||
262 | struct eh_frame_hdr_table_entry table[]; | ||
263 | } __attribute__((__packed__)) *header; | ||
264 | |||
265 | if (table->header) | ||
266 | return; | ||
267 | |||
268 | if (table->hdrsz) | ||
269 | printk(KERN_WARNING ".eh_frame_hdr for '%s' present but unusable\n", | ||
270 | table->name); | ||
271 | |||
272 | if (tableSize & (sizeof(*fde) - 1)) | ||
273 | return; | ||
274 | |||
275 | for (fde = table->address, n = 0; | ||
276 | tableSize > sizeof(*fde) && tableSize - sizeof(*fde) >= *fde; | ||
277 | tableSize -= sizeof(*fde) + *fde, fde += 1 + *fde / sizeof(*fde)) { | ||
278 | const u32 *cie = cie_for_fde(fde, table); | ||
279 | signed ptrType; | ||
280 | |||
281 | if (cie == ¬_fde) | ||
282 | continue; | ||
283 | if (cie == NULL | ||
284 | || cie == &bad_cie | ||
285 | || (ptrType = fde_pointer_type(cie)) < 0) | ||
286 | return; | ||
287 | ptr = (const u8 *)(fde + 2); | ||
288 | if (!read_pointer(&ptr, | ||
289 | (const u8 *)(fde + 1) + *fde, | ||
290 | ptrType, 0, 0)) | ||
291 | return; | ||
292 | ++n; | ||
293 | } | ||
294 | |||
295 | if (tableSize || !n) | ||
296 | return; | ||
297 | |||
298 | hdrSize = 4 + sizeof(unsigned long) + sizeof(unsigned int) | ||
299 | + 2 * n * sizeof(unsigned long); | ||
300 | dprintk(2, "Binary lookup table size for %s: %lu bytes", table->name, hdrSize); | ||
301 | header = alloc(hdrSize); | ||
302 | if (!header) | ||
303 | return; | ||
304 | header->version = 1; | ||
305 | header->eh_frame_ptr_enc = DW_EH_PE_abs|DW_EH_PE_native; | ||
306 | header->fde_count_enc = DW_EH_PE_abs|DW_EH_PE_data4; | ||
307 | header->table_enc = DW_EH_PE_abs|DW_EH_PE_native; | ||
308 | put_unaligned((unsigned long)table->address, &header->eh_frame_ptr); | ||
309 | BUILD_BUG_ON(offsetof(typeof(*header), fde_count) | ||
310 | % __alignof(typeof(header->fde_count))); | ||
311 | header->fde_count = n; | ||
312 | |||
313 | BUILD_BUG_ON(offsetof(typeof(*header), table) | ||
314 | % __alignof(typeof(*header->table))); | ||
315 | for (fde = table->address, tableSize = table->size, n = 0; | ||
316 | tableSize; | ||
317 | tableSize -= sizeof(*fde) + *fde, fde += 1 + *fde / sizeof(*fde)) { | ||
318 | const u32 *cie = fde + 1 - fde[1] / sizeof(*fde); | ||
319 | |||
320 | if (!fde[1]) | ||
321 | continue; /* this is a CIE */ | ||
322 | ptr = (const u8 *)(fde + 2); | ||
323 | header->table[n].start = read_pointer(&ptr, | ||
324 | (const u8 *)(fde + 1) + *fde, | ||
325 | fde_pointer_type(cie), 0, 0); | ||
326 | header->table[n].fde = (unsigned long)fde; | ||
327 | ++n; | ||
328 | } | ||
329 | WARN_ON(n != header->fde_count); | ||
330 | |||
331 | sort(header->table, | ||
332 | n, | ||
333 | sizeof(*header->table), | ||
334 | cmp_eh_frame_hdr_table_entries, | ||
335 | swap_eh_frame_hdr_table_entries); | ||
336 | |||
337 | table->hdrsz = hdrSize; | ||
338 | smp_wmb(); | ||
339 | table->header = (const void *)header; | ||
340 | } | ||
341 | |||
342 | static void *__init balloc(unsigned long sz) | ||
343 | { | ||
344 | return __alloc_bootmem_nopanic(sz, | ||
345 | sizeof(unsigned int), | ||
346 | __pa(MAX_DMA_ADDRESS)); | ||
347 | } | ||
348 | |||
349 | void __init unwind_setup(void) | ||
350 | { | ||
351 | setup_unwind_table(&root_table, balloc); | ||
352 | } | ||
353 | |||
354 | #ifdef CONFIG_MODULES | ||
355 | |||
356 | static struct unwind_table *last_table; | ||
357 | |||
358 | /* Must be called with module_mutex held. */ | ||
359 | void *unwind_add_table(struct module *module, | ||
360 | const void *table_start, | ||
361 | unsigned long table_size) | ||
362 | { | ||
363 | struct unwind_table *table; | ||
364 | |||
365 | if (table_size <= 0) | ||
366 | return NULL; | ||
367 | |||
368 | table = kmalloc(sizeof(*table), GFP_KERNEL); | ||
369 | if (!table) | ||
370 | return NULL; | ||
371 | |||
372 | init_unwind_table(table, module->name, | ||
373 | module->module_core, module->core_size, | ||
374 | module->module_init, module->init_size, | ||
375 | table_start, table_size, | ||
376 | NULL, 0); | ||
377 | |||
378 | if (last_table) | ||
379 | last_table->link = table; | ||
380 | else | ||
381 | root_table.link = table; | ||
382 | last_table = table; | ||
383 | |||
384 | return table; | ||
385 | } | ||
386 | |||
387 | struct unlink_table_info | ||
388 | { | ||
389 | struct unwind_table *table; | ||
390 | int init_only; | ||
391 | }; | ||
392 | |||
393 | static int unlink_table(void *arg) | ||
394 | { | ||
395 | struct unlink_table_info *info = arg; | ||
396 | struct unwind_table *table = info->table, *prev; | ||
397 | |||
398 | for (prev = &root_table; prev->link && prev->link != table; prev = prev->link) | ||
399 | ; | ||
400 | |||
401 | if (prev->link) { | ||
402 | if (info->init_only) { | ||
403 | table->init.pc = 0; | ||
404 | table->init.range = 0; | ||
405 | info->table = NULL; | ||
406 | } else { | ||
407 | prev->link = table->link; | ||
408 | if (!prev->link) | ||
409 | last_table = prev; | ||
410 | } | ||
411 | } else | ||
412 | info->table = NULL; | ||
413 | |||
414 | return 0; | ||
415 | } | ||
416 | |||
417 | /* Must be called with module_mutex held. */ | ||
418 | void unwind_remove_table(void *handle, int init_only) | ||
419 | { | ||
420 | struct unwind_table *table = handle; | ||
421 | struct unlink_table_info info; | ||
422 | |||
423 | if (!table || table == &root_table) | ||
424 | return; | ||
425 | |||
426 | if (init_only && table == last_table) { | ||
427 | table->init.pc = 0; | ||
428 | table->init.range = 0; | ||
429 | return; | ||
430 | } | ||
431 | |||
432 | info.table = table; | ||
433 | info.init_only = init_only; | ||
434 | stop_machine_run(unlink_table, &info, NR_CPUS); | ||
435 | |||
436 | if (info.table) | ||
437 | kfree(table); | ||
438 | } | ||
439 | |||
440 | #endif /* CONFIG_MODULES */ | ||
441 | |||
442 | static uleb128_t get_uleb128(const u8 **pcur, const u8 *end) | ||
443 | { | ||
444 | const u8 *cur = *pcur; | ||
445 | uleb128_t value; | ||
446 | unsigned shift; | ||
447 | |||
448 | for (shift = 0, value = 0; cur < end; shift += 7) { | ||
449 | if (shift + 7 > 8 * sizeof(value) | ||
450 | && (*cur & 0x7fU) >= (1U << (8 * sizeof(value) - shift))) { | ||
451 | cur = end + 1; | ||
452 | break; | ||
453 | } | ||
454 | value |= (uleb128_t)(*cur & 0x7f) << shift; | ||
455 | if (!(*cur++ & 0x80)) | ||
456 | break; | ||
457 | } | ||
458 | *pcur = cur; | ||
459 | |||
460 | return value; | ||
461 | } | ||
462 | |||
463 | static sleb128_t get_sleb128(const u8 **pcur, const u8 *end) | ||
464 | { | ||
465 | const u8 *cur = *pcur; | ||
466 | sleb128_t value; | ||
467 | unsigned shift; | ||
468 | |||
469 | for (shift = 0, value = 0; cur < end; shift += 7) { | ||
470 | if (shift + 7 > 8 * sizeof(value) | ||
471 | && (*cur & 0x7fU) >= (1U << (8 * sizeof(value) - shift))) { | ||
472 | cur = end + 1; | ||
473 | break; | ||
474 | } | ||
475 | value |= (sleb128_t)(*cur & 0x7f) << shift; | ||
476 | if (!(*cur & 0x80)) { | ||
477 | value |= -(*cur++ & 0x40) << shift; | ||
478 | break; | ||
479 | } | ||
480 | } | ||
481 | *pcur = cur; | ||
482 | |||
483 | return value; | ||
484 | } | ||
485 | |||
486 | static const u32 *cie_for_fde(const u32 *fde, const struct unwind_table *table) | ||
487 | { | ||
488 | const u32 *cie; | ||
489 | |||
490 | if (!*fde || (*fde & (sizeof(*fde) - 1))) | ||
491 | return &bad_cie; | ||
492 | if (!fde[1]) | ||
493 | return ¬_fde; /* this is a CIE */ | ||
494 | if ((fde[1] & (sizeof(*fde) - 1)) | ||
495 | || fde[1] > (unsigned long)(fde + 1) - (unsigned long)table->address) | ||
496 | return NULL; /* this is not a valid FDE */ | ||
497 | cie = fde + 1 - fde[1] / sizeof(*fde); | ||
498 | if (*cie <= sizeof(*cie) + 4 | ||
499 | || *cie >= fde[1] - sizeof(*fde) | ||
500 | || (*cie & (sizeof(*cie) - 1)) | ||
501 | || cie[1]) | ||
502 | return NULL; /* this is not a (valid) CIE */ | ||
503 | return cie; | ||
504 | } | ||
505 | |||
506 | static unsigned long read_pointer(const u8 **pLoc, | ||
507 | const void *end, | ||
508 | signed ptrType, | ||
509 | unsigned long text_base, | ||
510 | unsigned long data_base) | ||
511 | { | ||
512 | unsigned long value = 0; | ||
513 | union { | ||
514 | const u8 *p8; | ||
515 | const u16 *p16u; | ||
516 | const s16 *p16s; | ||
517 | const u32 *p32u; | ||
518 | const s32 *p32s; | ||
519 | const unsigned long *pul; | ||
520 | } ptr; | ||
521 | |||
522 | if (ptrType < 0 || ptrType == DW_EH_PE_omit) { | ||
523 | dprintk(1, "Invalid pointer encoding %02X (%p,%p).", ptrType, *pLoc, end); | ||
524 | return 0; | ||
525 | } | ||
526 | ptr.p8 = *pLoc; | ||
527 | switch(ptrType & DW_EH_PE_FORM) { | ||
528 | case DW_EH_PE_data2: | ||
529 | if (end < (const void *)(ptr.p16u + 1)) { | ||
530 | dprintk(1, "Data16 overrun (%p,%p).", ptr.p8, end); | ||
531 | return 0; | ||
532 | } | ||
533 | if(ptrType & DW_EH_PE_signed) | ||
534 | value = get_unaligned(ptr.p16s++); | ||
535 | else | ||
536 | value = get_unaligned(ptr.p16u++); | ||
537 | break; | ||
538 | case DW_EH_PE_data4: | ||
539 | #ifdef CONFIG_64BIT | ||
540 | if (end < (const void *)(ptr.p32u + 1)) { | ||
541 | dprintk(1, "Data32 overrun (%p,%p).", ptr.p8, end); | ||
542 | return 0; | ||
543 | } | ||
544 | if(ptrType & DW_EH_PE_signed) | ||
545 | value = get_unaligned(ptr.p32s++); | ||
546 | else | ||
547 | value = get_unaligned(ptr.p32u++); | ||
548 | break; | ||
549 | case DW_EH_PE_data8: | ||
550 | BUILD_BUG_ON(sizeof(u64) != sizeof(value)); | ||
551 | #else | ||
552 | BUILD_BUG_ON(sizeof(u32) != sizeof(value)); | ||
553 | #endif | ||
554 | case DW_EH_PE_native: | ||
555 | if (end < (const void *)(ptr.pul + 1)) { | ||
556 | dprintk(1, "DataUL overrun (%p,%p).", ptr.p8, end); | ||
557 | return 0; | ||
558 | } | ||
559 | value = get_unaligned(ptr.pul++); | ||
560 | break; | ||
561 | case DW_EH_PE_leb128: | ||
562 | BUILD_BUG_ON(sizeof(uleb128_t) > sizeof(value)); | ||
563 | value = ptrType & DW_EH_PE_signed | ||
564 | ? get_sleb128(&ptr.p8, end) | ||
565 | : get_uleb128(&ptr.p8, end); | ||
566 | if ((const void *)ptr.p8 > end) { | ||
567 | dprintk(1, "DataLEB overrun (%p,%p).", ptr.p8, end); | ||
568 | return 0; | ||
569 | } | ||
570 | break; | ||
571 | default: | ||
572 | dprintk(2, "Cannot decode pointer type %02X (%p,%p).", | ||
573 | ptrType, ptr.p8, end); | ||
574 | return 0; | ||
575 | } | ||
576 | switch(ptrType & DW_EH_PE_ADJUST) { | ||
577 | case DW_EH_PE_abs: | ||
578 | break; | ||
579 | case DW_EH_PE_pcrel: | ||
580 | value += (unsigned long)*pLoc; | ||
581 | break; | ||
582 | case DW_EH_PE_textrel: | ||
583 | if (likely(text_base)) { | ||
584 | value += text_base; | ||
585 | break; | ||
586 | } | ||
587 | dprintk(2, "Text-relative encoding %02X (%p,%p), but zero text base.", | ||
588 | ptrType, *pLoc, end); | ||
589 | return 0; | ||
590 | case DW_EH_PE_datarel: | ||
591 | if (likely(data_base)) { | ||
592 | value += data_base; | ||
593 | break; | ||
594 | } | ||
595 | dprintk(2, "Data-relative encoding %02X (%p,%p), but zero data base.", | ||
596 | ptrType, *pLoc, end); | ||
597 | return 0; | ||
598 | default: | ||
599 | dprintk(2, "Cannot adjust pointer type %02X (%p,%p).", | ||
600 | ptrType, *pLoc, end); | ||
601 | return 0; | ||
602 | } | ||
603 | if ((ptrType & DW_EH_PE_indirect) | ||
604 | && probe_kernel_address((unsigned long *)value, value)) { | ||
605 | dprintk(1, "Cannot read indirect value %lx (%p,%p).", | ||
606 | value, *pLoc, end); | ||
607 | return 0; | ||
608 | } | ||
609 | *pLoc = ptr.p8; | ||
610 | |||
611 | return value; | ||
612 | } | ||
613 | |||
614 | static signed fde_pointer_type(const u32 *cie) | ||
615 | { | ||
616 | const u8 *ptr = (const u8 *)(cie + 2); | ||
617 | unsigned version = *ptr; | ||
618 | |||
619 | if (version != 1) | ||
620 | return -1; /* unsupported */ | ||
621 | if (*++ptr) { | ||
622 | const char *aug; | ||
623 | const u8 *end = (const u8 *)(cie + 1) + *cie; | ||
624 | uleb128_t len; | ||
625 | |||
626 | /* check if augmentation size is first (and thus present) */ | ||
627 | if (*ptr != 'z') | ||
628 | return -1; | ||
629 | /* check if augmentation string is nul-terminated */ | ||
630 | if ((ptr = memchr(aug = (const void *)ptr, 0, end - ptr)) == NULL) | ||
631 | return -1; | ||
632 | ++ptr; /* skip terminator */ | ||
633 | get_uleb128(&ptr, end); /* skip code alignment */ | ||
634 | get_sleb128(&ptr, end); /* skip data alignment */ | ||
635 | /* skip return address column */ | ||
636 | version <= 1 ? (void)++ptr : (void)get_uleb128(&ptr, end); | ||
637 | len = get_uleb128(&ptr, end); /* augmentation length */ | ||
638 | if (ptr + len < ptr || ptr + len > end) | ||
639 | return -1; | ||
640 | end = ptr + len; | ||
641 | while (*++aug) { | ||
642 | if (ptr >= end) | ||
643 | return -1; | ||
644 | switch(*aug) { | ||
645 | case 'L': | ||
646 | ++ptr; | ||
647 | break; | ||
648 | case 'P': { | ||
649 | signed ptrType = *ptr++; | ||
650 | |||
651 | if (!read_pointer(&ptr, end, ptrType, 0, 0) | ||
652 | || ptr > end) | ||
653 | return -1; | ||
654 | } | ||
655 | break; | ||
656 | case 'R': | ||
657 | return *ptr; | ||
658 | default: | ||
659 | return -1; | ||
660 | } | ||
661 | } | ||
662 | } | ||
663 | return DW_EH_PE_native|DW_EH_PE_abs; | ||
664 | } | ||
665 | |||
666 | static int advance_loc(unsigned long delta, struct unwind_state *state) | ||
667 | { | ||
668 | state->loc += delta * state->codeAlign; | ||
669 | |||
670 | return delta > 0; | ||
671 | } | ||
672 | |||
673 | static void set_rule(uleb128_t reg, | ||
674 | enum item_location where, | ||
675 | uleb128_t value, | ||
676 | struct unwind_state *state) | ||
677 | { | ||
678 | if (reg < ARRAY_SIZE(state->regs)) { | ||
679 | state->regs[reg].where = where; | ||
680 | state->regs[reg].value = value; | ||
681 | } | ||
682 | } | ||
683 | |||
684 | static int processCFI(const u8 *start, | ||
685 | const u8 *end, | ||
686 | unsigned long targetLoc, | ||
687 | signed ptrType, | ||
688 | struct unwind_state *state) | ||
689 | { | ||
690 | union { | ||
691 | const u8 *p8; | ||
692 | const u16 *p16; | ||
693 | const u32 *p32; | ||
694 | } ptr; | ||
695 | int result = 1; | ||
696 | |||
697 | if (start != state->cieStart) { | ||
698 | state->loc = state->org; | ||
699 | result = processCFI(state->cieStart, state->cieEnd, 0, ptrType, state); | ||
700 | if (targetLoc == 0 && state->label == NULL) | ||
701 | return result; | ||
702 | } | ||
703 | for (ptr.p8 = start; result && ptr.p8 < end; ) { | ||
704 | switch(*ptr.p8 >> 6) { | ||
705 | uleb128_t value; | ||
706 | |||
707 | case 0: | ||
708 | switch(*ptr.p8++) { | ||
709 | case DW_CFA_nop: | ||
710 | break; | ||
711 | case DW_CFA_set_loc: | ||
712 | state->loc = read_pointer(&ptr.p8, end, ptrType, 0, 0); | ||
713 | if (state->loc == 0) | ||
714 | result = 0; | ||
715 | break; | ||
716 | case DW_CFA_advance_loc1: | ||
717 | result = ptr.p8 < end && advance_loc(*ptr.p8++, state); | ||
718 | break; | ||
719 | case DW_CFA_advance_loc2: | ||
720 | result = ptr.p8 <= end + 2 | ||
721 | && advance_loc(*ptr.p16++, state); | ||
722 | break; | ||
723 | case DW_CFA_advance_loc4: | ||
724 | result = ptr.p8 <= end + 4 | ||
725 | && advance_loc(*ptr.p32++, state); | ||
726 | break; | ||
727 | case DW_CFA_offset_extended: | ||
728 | value = get_uleb128(&ptr.p8, end); | ||
729 | set_rule(value, Memory, get_uleb128(&ptr.p8, end), state); | ||
730 | break; | ||
731 | case DW_CFA_val_offset: | ||
732 | value = get_uleb128(&ptr.p8, end); | ||
733 | set_rule(value, Value, get_uleb128(&ptr.p8, end), state); | ||
734 | break; | ||
735 | case DW_CFA_offset_extended_sf: | ||
736 | value = get_uleb128(&ptr.p8, end); | ||
737 | set_rule(value, Memory, get_sleb128(&ptr.p8, end), state); | ||
738 | break; | ||
739 | case DW_CFA_val_offset_sf: | ||
740 | value = get_uleb128(&ptr.p8, end); | ||
741 | set_rule(value, Value, get_sleb128(&ptr.p8, end), state); | ||
742 | break; | ||
743 | case DW_CFA_restore_extended: | ||
744 | case DW_CFA_undefined: | ||
745 | case DW_CFA_same_value: | ||
746 | set_rule(get_uleb128(&ptr.p8, end), Nowhere, 0, state); | ||
747 | break; | ||
748 | case DW_CFA_register: | ||
749 | value = get_uleb128(&ptr.p8, end); | ||
750 | set_rule(value, | ||
751 | Register, | ||
752 | get_uleb128(&ptr.p8, end), state); | ||
753 | break; | ||
754 | case DW_CFA_remember_state: | ||
755 | if (ptr.p8 == state->label) { | ||
756 | state->label = NULL; | ||
757 | return 1; | ||
758 | } | ||
759 | if (state->stackDepth >= MAX_STACK_DEPTH) { | ||
760 | dprintk(1, "State stack overflow (%p,%p).", ptr.p8, end); | ||
761 | return 0; | ||
762 | } | ||
763 | state->stack[state->stackDepth++] = ptr.p8; | ||
764 | break; | ||
765 | case DW_CFA_restore_state: | ||
766 | if (state->stackDepth) { | ||
767 | const uleb128_t loc = state->loc; | ||
768 | const u8 *label = state->label; | ||
769 | |||
770 | state->label = state->stack[state->stackDepth - 1]; | ||
771 | memcpy(&state->cfa, &badCFA, sizeof(state->cfa)); | ||
772 | memset(state->regs, 0, sizeof(state->regs)); | ||
773 | state->stackDepth = 0; | ||
774 | result = processCFI(start, end, 0, ptrType, state); | ||
775 | state->loc = loc; | ||
776 | state->label = label; | ||
777 | } else { | ||
778 | dprintk(1, "State stack underflow (%p,%p).", ptr.p8, end); | ||
779 | return 0; | ||
780 | } | ||
781 | break; | ||
782 | case DW_CFA_def_cfa: | ||
783 | state->cfa.reg = get_uleb128(&ptr.p8, end); | ||
784 | /*nobreak*/ | ||
785 | case DW_CFA_def_cfa_offset: | ||
786 | state->cfa.offs = get_uleb128(&ptr.p8, end); | ||
787 | break; | ||
788 | case DW_CFA_def_cfa_sf: | ||
789 | state->cfa.reg = get_uleb128(&ptr.p8, end); | ||
790 | /*nobreak*/ | ||
791 | case DW_CFA_def_cfa_offset_sf: | ||
792 | state->cfa.offs = get_sleb128(&ptr.p8, end) | ||
793 | * state->dataAlign; | ||
794 | break; | ||
795 | case DW_CFA_def_cfa_register: | ||
796 | state->cfa.reg = get_uleb128(&ptr.p8, end); | ||
797 | break; | ||
798 | /*todo case DW_CFA_def_cfa_expression: */ | ||
799 | /*todo case DW_CFA_expression: */ | ||
800 | /*todo case DW_CFA_val_expression: */ | ||
801 | case DW_CFA_GNU_args_size: | ||
802 | get_uleb128(&ptr.p8, end); | ||
803 | break; | ||
804 | case DW_CFA_GNU_negative_offset_extended: | ||
805 | value = get_uleb128(&ptr.p8, end); | ||
806 | set_rule(value, | ||
807 | Memory, | ||
808 | (uleb128_t)0 - get_uleb128(&ptr.p8, end), state); | ||
809 | break; | ||
810 | case DW_CFA_GNU_window_save: | ||
811 | default: | ||
812 | dprintk(1, "Unrecognized CFI op %02X (%p,%p).", ptr.p8[-1], ptr.p8 - 1, end); | ||
813 | result = 0; | ||
814 | break; | ||
815 | } | ||
816 | break; | ||
817 | case 1: | ||
818 | result = advance_loc(*ptr.p8++ & 0x3f, state); | ||
819 | break; | ||
820 | case 2: | ||
821 | value = *ptr.p8++ & 0x3f; | ||
822 | set_rule(value, Memory, get_uleb128(&ptr.p8, end), state); | ||
823 | break; | ||
824 | case 3: | ||
825 | set_rule(*ptr.p8++ & 0x3f, Nowhere, 0, state); | ||
826 | break; | ||
827 | } | ||
828 | if (ptr.p8 > end) { | ||
829 | dprintk(1, "Data overrun (%p,%p).", ptr.p8, end); | ||
830 | result = 0; | ||
831 | } | ||
832 | if (result && targetLoc != 0 && targetLoc < state->loc) | ||
833 | return 1; | ||
834 | } | ||
835 | |||
836 | if (result && ptr.p8 < end) | ||
837 | dprintk(1, "Data underrun (%p,%p).", ptr.p8, end); | ||
838 | |||
839 | return result | ||
840 | && ptr.p8 == end | ||
841 | && (targetLoc == 0 | ||
842 | || (/*todo While in theory this should apply, gcc in practice omits | ||
843 | everything past the function prolog, and hence the location | ||
844 | never reaches the end of the function. | ||
845 | targetLoc < state->loc &&*/ state->label == NULL)); | ||
846 | } | ||
847 | |||
848 | /* Unwind to previous to frame. Returns 0 if successful, negative | ||
849 | * number in case of an error. */ | ||
850 | int unwind(struct unwind_frame_info *frame) | ||
851 | { | ||
852 | #define FRAME_REG(r, t) (((t *)frame)[reg_info[r].offs]) | ||
853 | const u32 *fde = NULL, *cie = NULL; | ||
854 | const u8 *ptr = NULL, *end = NULL; | ||
855 | unsigned long pc = UNW_PC(frame) - frame->call_frame, sp; | ||
856 | unsigned long startLoc = 0, endLoc = 0, cfa; | ||
857 | unsigned i; | ||
858 | signed ptrType = -1; | ||
859 | uleb128_t retAddrReg = 0; | ||
860 | const struct unwind_table *table; | ||
861 | struct unwind_state state; | ||
862 | |||
863 | if (UNW_PC(frame) == 0) | ||
864 | return -EINVAL; | ||
865 | if ((table = find_table(pc)) != NULL | ||
866 | && !(table->size & (sizeof(*fde) - 1))) { | ||
867 | const u8 *hdr = table->header; | ||
868 | unsigned long tableSize; | ||
869 | |||
870 | smp_rmb(); | ||
871 | if (hdr && hdr[0] == 1) { | ||
872 | switch(hdr[3] & DW_EH_PE_FORM) { | ||
873 | case DW_EH_PE_native: tableSize = sizeof(unsigned long); break; | ||
874 | case DW_EH_PE_data2: tableSize = 2; break; | ||
875 | case DW_EH_PE_data4: tableSize = 4; break; | ||
876 | case DW_EH_PE_data8: tableSize = 8; break; | ||
877 | default: tableSize = 0; break; | ||
878 | } | ||
879 | ptr = hdr + 4; | ||
880 | end = hdr + table->hdrsz; | ||
881 | if (tableSize | ||
882 | && read_pointer(&ptr, end, hdr[1], 0, 0) | ||
883 | == (unsigned long)table->address | ||
884 | && (i = read_pointer(&ptr, end, hdr[2], 0, 0)) > 0 | ||
885 | && i == (end - ptr) / (2 * tableSize) | ||
886 | && !((end - ptr) % (2 * tableSize))) { | ||
887 | do { | ||
888 | const u8 *cur = ptr + (i / 2) * (2 * tableSize); | ||
889 | |||
890 | startLoc = read_pointer(&cur, | ||
891 | cur + tableSize, | ||
892 | hdr[3], 0, | ||
893 | (unsigned long)hdr); | ||
894 | if (pc < startLoc) | ||
895 | i /= 2; | ||
896 | else { | ||
897 | ptr = cur - tableSize; | ||
898 | i = (i + 1) / 2; | ||
899 | } | ||
900 | } while (startLoc && i > 1); | ||
901 | if (i == 1 | ||
902 | && (startLoc = read_pointer(&ptr, | ||
903 | ptr + tableSize, | ||
904 | hdr[3], 0, | ||
905 | (unsigned long)hdr)) != 0 | ||
906 | && pc >= startLoc) | ||
907 | fde = (void *)read_pointer(&ptr, | ||
908 | ptr + tableSize, | ||
909 | hdr[3], 0, | ||
910 | (unsigned long)hdr); | ||
911 | } | ||
912 | } | ||
913 | if(hdr && !fde) | ||
914 | dprintk(3, "Binary lookup for %lx failed.", pc); | ||
915 | |||
916 | if (fde != NULL) { | ||
917 | cie = cie_for_fde(fde, table); | ||
918 | ptr = (const u8 *)(fde + 2); | ||
919 | if(cie != NULL | ||
920 | && cie != &bad_cie | ||
921 | && cie != ¬_fde | ||
922 | && (ptrType = fde_pointer_type(cie)) >= 0 | ||
923 | && read_pointer(&ptr, | ||
924 | (const u8 *)(fde + 1) + *fde, | ||
925 | ptrType, 0, 0) == startLoc) { | ||
926 | if (!(ptrType & DW_EH_PE_indirect)) | ||
927 | ptrType &= DW_EH_PE_FORM|DW_EH_PE_signed; | ||
928 | endLoc = startLoc | ||
929 | + read_pointer(&ptr, | ||
930 | (const u8 *)(fde + 1) + *fde, | ||
931 | ptrType, 0, 0); | ||
932 | if(pc >= endLoc) | ||
933 | fde = NULL; | ||
934 | } else | ||
935 | fde = NULL; | ||
936 | if(!fde) | ||
937 | dprintk(1, "Binary lookup result for %lx discarded.", pc); | ||
938 | } | ||
939 | if (fde == NULL) { | ||
940 | for (fde = table->address, tableSize = table->size; | ||
941 | cie = NULL, tableSize > sizeof(*fde) | ||
942 | && tableSize - sizeof(*fde) >= *fde; | ||
943 | tableSize -= sizeof(*fde) + *fde, | ||
944 | fde += 1 + *fde / sizeof(*fde)) { | ||
945 | cie = cie_for_fde(fde, table); | ||
946 | if (cie == &bad_cie) { | ||
947 | cie = NULL; | ||
948 | break; | ||
949 | } | ||
950 | if (cie == NULL | ||
951 | || cie == ¬_fde | ||
952 | || (ptrType = fde_pointer_type(cie)) < 0) | ||
953 | continue; | ||
954 | ptr = (const u8 *)(fde + 2); | ||
955 | startLoc = read_pointer(&ptr, | ||
956 | (const u8 *)(fde + 1) + *fde, | ||
957 | ptrType, 0, 0); | ||
958 | if (!startLoc) | ||
959 | continue; | ||
960 | if (!(ptrType & DW_EH_PE_indirect)) | ||
961 | ptrType &= DW_EH_PE_FORM|DW_EH_PE_signed; | ||
962 | endLoc = startLoc | ||
963 | + read_pointer(&ptr, | ||
964 | (const u8 *)(fde + 1) + *fde, | ||
965 | ptrType, 0, 0); | ||
966 | if (pc >= startLoc && pc < endLoc) | ||
967 | break; | ||
968 | } | ||
969 | if(!fde) | ||
970 | dprintk(3, "Linear lookup for %lx failed.", pc); | ||
971 | } | ||
972 | } | ||
973 | if (cie != NULL) { | ||
974 | memset(&state, 0, sizeof(state)); | ||
975 | state.cieEnd = ptr; /* keep here temporarily */ | ||
976 | ptr = (const u8 *)(cie + 2); | ||
977 | end = (const u8 *)(cie + 1) + *cie; | ||
978 | frame->call_frame = 1; | ||
979 | if ((state.version = *ptr) != 1) | ||
980 | cie = NULL; /* unsupported version */ | ||
981 | else if (*++ptr) { | ||
982 | /* check if augmentation size is first (and thus present) */ | ||
983 | if (*ptr == 'z') { | ||
984 | while (++ptr < end && *ptr) { | ||
985 | switch(*ptr) { | ||
986 | /* check for ignorable (or already handled) | ||
987 | * nul-terminated augmentation string */ | ||
988 | case 'L': | ||
989 | case 'P': | ||
990 | case 'R': | ||
991 | continue; | ||
992 | case 'S': | ||
993 | frame->call_frame = 0; | ||
994 | continue; | ||
995 | default: | ||
996 | break; | ||
997 | } | ||
998 | break; | ||
999 | } | ||
1000 | } | ||
1001 | if (ptr >= end || *ptr) | ||
1002 | cie = NULL; | ||
1003 | } | ||
1004 | if(!cie) | ||
1005 | dprintk(1, "CIE unusable (%p,%p).", ptr, end); | ||
1006 | ++ptr; | ||
1007 | } | ||
1008 | if (cie != NULL) { | ||
1009 | /* get code aligment factor */ | ||
1010 | state.codeAlign = get_uleb128(&ptr, end); | ||
1011 | /* get data aligment factor */ | ||
1012 | state.dataAlign = get_sleb128(&ptr, end); | ||
1013 | if (state.codeAlign == 0 || state.dataAlign == 0 || ptr >= end) | ||
1014 | cie = NULL; | ||
1015 | else if (UNW_PC(frame) % state.codeAlign | ||
1016 | || UNW_SP(frame) % sleb128abs(state.dataAlign)) { | ||
1017 | dprintk(1, "Input pointer(s) misaligned (%lx,%lx).", | ||
1018 | UNW_PC(frame), UNW_SP(frame)); | ||
1019 | return -EPERM; | ||
1020 | } else { | ||
1021 | retAddrReg = state.version <= 1 ? *ptr++ : get_uleb128(&ptr, end); | ||
1022 | /* skip augmentation */ | ||
1023 | if (((const char *)(cie + 2))[1] == 'z') { | ||
1024 | uleb128_t augSize = get_uleb128(&ptr, end); | ||
1025 | |||
1026 | ptr += augSize; | ||
1027 | } | ||
1028 | if (ptr > end | ||
1029 | || retAddrReg >= ARRAY_SIZE(reg_info) | ||
1030 | || REG_INVALID(retAddrReg) | ||
1031 | || reg_info[retAddrReg].width != sizeof(unsigned long)) | ||
1032 | cie = NULL; | ||
1033 | } | ||
1034 | if(!cie) | ||
1035 | dprintk(1, "CIE validation failed (%p,%p).", ptr, end); | ||
1036 | } | ||
1037 | if (cie != NULL) { | ||
1038 | state.cieStart = ptr; | ||
1039 | ptr = state.cieEnd; | ||
1040 | state.cieEnd = end; | ||
1041 | end = (const u8 *)(fde + 1) + *fde; | ||
1042 | /* skip augmentation */ | ||
1043 | if (((const char *)(cie + 2))[1] == 'z') { | ||
1044 | uleb128_t augSize = get_uleb128(&ptr, end); | ||
1045 | |||
1046 | if ((ptr += augSize) > end) | ||
1047 | fde = NULL; | ||
1048 | } | ||
1049 | if(!fde) | ||
1050 | dprintk(1, "FDE validation failed (%p,%p).", ptr, end); | ||
1051 | } | ||
1052 | if (cie == NULL || fde == NULL) { | ||
1053 | #ifdef CONFIG_FRAME_POINTER | ||
1054 | unsigned long top, bottom; | ||
1055 | |||
1056 | if ((UNW_SP(frame) | UNW_FP(frame)) % sizeof(unsigned long)) | ||
1057 | return -EPERM; | ||
1058 | top = STACK_TOP(frame->task); | ||
1059 | bottom = STACK_BOTTOM(frame->task); | ||
1060 | # if FRAME_RETADDR_OFFSET < 0 | ||
1061 | if (UNW_SP(frame) < top | ||
1062 | && UNW_FP(frame) <= UNW_SP(frame) | ||
1063 | && bottom < UNW_FP(frame) | ||
1064 | # else | ||
1065 | if (UNW_SP(frame) > top | ||
1066 | && UNW_FP(frame) >= UNW_SP(frame) | ||
1067 | && bottom > UNW_FP(frame) | ||
1068 | # endif | ||
1069 | && !((UNW_SP(frame) | UNW_FP(frame)) | ||
1070 | & (sizeof(unsigned long) - 1))) { | ||
1071 | unsigned long link; | ||
1072 | |||
1073 | if (!probe_kernel_address( | ||
1074 | (unsigned long *)(UNW_FP(frame) | ||
1075 | + FRAME_LINK_OFFSET), | ||
1076 | link) | ||
1077 | # if FRAME_RETADDR_OFFSET < 0 | ||
1078 | && link > bottom && link < UNW_FP(frame) | ||
1079 | # else | ||
1080 | && link > UNW_FP(frame) && link < bottom | ||
1081 | # endif | ||
1082 | && !(link & (sizeof(link) - 1)) | ||
1083 | && !probe_kernel_address( | ||
1084 | (unsigned long *)(UNW_FP(frame) | ||
1085 | + FRAME_RETADDR_OFFSET), UNW_PC(frame))) { | ||
1086 | UNW_SP(frame) = UNW_FP(frame) + FRAME_RETADDR_OFFSET | ||
1087 | # if FRAME_RETADDR_OFFSET < 0 | ||
1088 | - | ||
1089 | # else | ||
1090 | + | ||
1091 | # endif | ||
1092 | sizeof(UNW_PC(frame)); | ||
1093 | UNW_FP(frame) = link; | ||
1094 | return 0; | ||
1095 | } | ||
1096 | } | ||
1097 | #endif | ||
1098 | return -ENXIO; | ||
1099 | } | ||
1100 | state.org = startLoc; | ||
1101 | memcpy(&state.cfa, &badCFA, sizeof(state.cfa)); | ||
1102 | /* process instructions */ | ||
1103 | if (!processCFI(ptr, end, pc, ptrType, &state) | ||
1104 | || state.loc > endLoc | ||
1105 | || state.regs[retAddrReg].where == Nowhere | ||
1106 | || state.cfa.reg >= ARRAY_SIZE(reg_info) | ||
1107 | || reg_info[state.cfa.reg].width != sizeof(unsigned long) | ||
1108 | || FRAME_REG(state.cfa.reg, unsigned long) % sizeof(unsigned long) | ||
1109 | || state.cfa.offs % sizeof(unsigned long)) { | ||
1110 | dprintk(1, "Unusable unwind info (%p,%p).", ptr, end); | ||
1111 | return -EIO; | ||
1112 | } | ||
1113 | /* update frame */ | ||
1114 | #ifndef CONFIG_AS_CFI_SIGNAL_FRAME | ||
1115 | if(frame->call_frame | ||
1116 | && !UNW_DEFAULT_RA(state.regs[retAddrReg], state.dataAlign)) | ||
1117 | frame->call_frame = 0; | ||
1118 | #endif | ||
1119 | cfa = FRAME_REG(state.cfa.reg, unsigned long) + state.cfa.offs; | ||
1120 | startLoc = min((unsigned long)UNW_SP(frame), cfa); | ||
1121 | endLoc = max((unsigned long)UNW_SP(frame), cfa); | ||
1122 | if (STACK_LIMIT(startLoc) != STACK_LIMIT(endLoc)) { | ||
1123 | startLoc = min(STACK_LIMIT(cfa), cfa); | ||
1124 | endLoc = max(STACK_LIMIT(cfa), cfa); | ||
1125 | } | ||
1126 | #ifndef CONFIG_64BIT | ||
1127 | # define CASES CASE(8); CASE(16); CASE(32) | ||
1128 | #else | ||
1129 | # define CASES CASE(8); CASE(16); CASE(32); CASE(64) | ||
1130 | #endif | ||
1131 | pc = UNW_PC(frame); | ||
1132 | sp = UNW_SP(frame); | ||
1133 | for (i = 0; i < ARRAY_SIZE(state.regs); ++i) { | ||
1134 | if (REG_INVALID(i)) { | ||
1135 | if (state.regs[i].where == Nowhere) | ||
1136 | continue; | ||
1137 | dprintk(1, "Cannot restore register %u (%d).", | ||
1138 | i, state.regs[i].where); | ||
1139 | return -EIO; | ||
1140 | } | ||
1141 | switch(state.regs[i].where) { | ||
1142 | default: | ||
1143 | break; | ||
1144 | case Register: | ||
1145 | if (state.regs[i].value >= ARRAY_SIZE(reg_info) | ||
1146 | || REG_INVALID(state.regs[i].value) | ||
1147 | || reg_info[i].width > reg_info[state.regs[i].value].width) { | ||
1148 | dprintk(1, "Cannot restore register %u from register %lu.", | ||
1149 | i, state.regs[i].value); | ||
1150 | return -EIO; | ||
1151 | } | ||
1152 | switch(reg_info[state.regs[i].value].width) { | ||
1153 | #define CASE(n) \ | ||
1154 | case sizeof(u##n): \ | ||
1155 | state.regs[i].value = FRAME_REG(state.regs[i].value, \ | ||
1156 | const u##n); \ | ||
1157 | break | ||
1158 | CASES; | ||
1159 | #undef CASE | ||
1160 | default: | ||
1161 | dprintk(1, "Unsupported register size %u (%lu).", | ||
1162 | reg_info[state.regs[i].value].width, | ||
1163 | state.regs[i].value); | ||
1164 | return -EIO; | ||
1165 | } | ||
1166 | break; | ||
1167 | } | ||
1168 | } | ||
1169 | for (i = 0; i < ARRAY_SIZE(state.regs); ++i) { | ||
1170 | if (REG_INVALID(i)) | ||
1171 | continue; | ||
1172 | switch(state.regs[i].where) { | ||
1173 | case Nowhere: | ||
1174 | if (reg_info[i].width != sizeof(UNW_SP(frame)) | ||
1175 | || &FRAME_REG(i, __typeof__(UNW_SP(frame))) | ||
1176 | != &UNW_SP(frame)) | ||
1177 | continue; | ||
1178 | UNW_SP(frame) = cfa; | ||
1179 | break; | ||
1180 | case Register: | ||
1181 | switch(reg_info[i].width) { | ||
1182 | #define CASE(n) case sizeof(u##n): \ | ||
1183 | FRAME_REG(i, u##n) = state.regs[i].value; \ | ||
1184 | break | ||
1185 | CASES; | ||
1186 | #undef CASE | ||
1187 | default: | ||
1188 | dprintk(1, "Unsupported register size %u (%u).", | ||
1189 | reg_info[i].width, i); | ||
1190 | return -EIO; | ||
1191 | } | ||
1192 | break; | ||
1193 | case Value: | ||
1194 | if (reg_info[i].width != sizeof(unsigned long)) { | ||
1195 | dprintk(1, "Unsupported value size %u (%u).", | ||
1196 | reg_info[i].width, i); | ||
1197 | return -EIO; | ||
1198 | } | ||
1199 | FRAME_REG(i, unsigned long) = cfa + state.regs[i].value | ||
1200 | * state.dataAlign; | ||
1201 | break; | ||
1202 | case Memory: { | ||
1203 | unsigned long addr = cfa + state.regs[i].value | ||
1204 | * state.dataAlign; | ||
1205 | |||
1206 | if ((state.regs[i].value * state.dataAlign) | ||
1207 | % sizeof(unsigned long) | ||
1208 | || addr < startLoc | ||
1209 | || addr + sizeof(unsigned long) < addr | ||
1210 | || addr + sizeof(unsigned long) > endLoc) { | ||
1211 | dprintk(1, "Bad memory location %lx (%lx).", | ||
1212 | addr, state.regs[i].value); | ||
1213 | return -EIO; | ||
1214 | } | ||
1215 | switch(reg_info[i].width) { | ||
1216 | #define CASE(n) case sizeof(u##n): \ | ||
1217 | probe_kernel_address((u##n *)addr, FRAME_REG(i, u##n)); \ | ||
1218 | break | ||
1219 | CASES; | ||
1220 | #undef CASE | ||
1221 | default: | ||
1222 | dprintk(1, "Unsupported memory size %u (%u).", | ||
1223 | reg_info[i].width, i); | ||
1224 | return -EIO; | ||
1225 | } | ||
1226 | } | ||
1227 | break; | ||
1228 | } | ||
1229 | } | ||
1230 | |||
1231 | if (UNW_PC(frame) % state.codeAlign | ||
1232 | || UNW_SP(frame) % sleb128abs(state.dataAlign)) { | ||
1233 | dprintk(1, "Output pointer(s) misaligned (%lx,%lx).", | ||
1234 | UNW_PC(frame), UNW_SP(frame)); | ||
1235 | return -EIO; | ||
1236 | } | ||
1237 | if (pc == UNW_PC(frame) && sp == UNW_SP(frame)) { | ||
1238 | dprintk(1, "No progress (%lx,%lx).", pc, sp); | ||
1239 | return -EIO; | ||
1240 | } | ||
1241 | |||
1242 | return 0; | ||
1243 | #undef CASES | ||
1244 | #undef FRAME_REG | ||
1245 | } | ||
1246 | EXPORT_SYMBOL(unwind); | ||
1247 | |||
1248 | int unwind_init_frame_info(struct unwind_frame_info *info, | ||
1249 | struct task_struct *tsk, | ||
1250 | /*const*/ struct pt_regs *regs) | ||
1251 | { | ||
1252 | info->task = tsk; | ||
1253 | info->call_frame = 0; | ||
1254 | arch_unw_init_frame_info(info, regs); | ||
1255 | |||
1256 | return 0; | ||
1257 | } | ||
1258 | EXPORT_SYMBOL(unwind_init_frame_info); | ||
1259 | |||
1260 | /* | ||
1261 | * Prepare to unwind a blocked task. | ||
1262 | */ | ||
1263 | int unwind_init_blocked(struct unwind_frame_info *info, | ||
1264 | struct task_struct *tsk) | ||
1265 | { | ||
1266 | info->task = tsk; | ||
1267 | info->call_frame = 0; | ||
1268 | arch_unw_init_blocked(info); | ||
1269 | |||
1270 | return 0; | ||
1271 | } | ||
1272 | EXPORT_SYMBOL(unwind_init_blocked); | ||
1273 | |||
1274 | /* | ||
1275 | * Prepare to unwind the currently running thread. | ||
1276 | */ | ||
1277 | int unwind_init_running(struct unwind_frame_info *info, | ||
1278 | asmlinkage int (*callback)(struct unwind_frame_info *, | ||
1279 | void *arg), | ||
1280 | void *arg) | ||
1281 | { | ||
1282 | info->task = current; | ||
1283 | info->call_frame = 0; | ||
1284 | |||
1285 | return arch_unwind_init_running(info, callback, arg); | ||
1286 | } | ||
1287 | EXPORT_SYMBOL(unwind_init_running); | ||
1288 | |||
1289 | /* | ||
1290 | * Unwind until the return pointer is in user-land (or until an error | ||
1291 | * occurs). Returns 0 if successful, negative number in case of | ||
1292 | * error. | ||
1293 | */ | ||
1294 | int unwind_to_user(struct unwind_frame_info *info) | ||
1295 | { | ||
1296 | while (!arch_unw_user_mode(info)) { | ||
1297 | int err = unwind(info); | ||
1298 | |||
1299 | if (err < 0) | ||
1300 | return err; | ||
1301 | } | ||
1302 | |||
1303 | return 0; | ||
1304 | } | ||
1305 | EXPORT_SYMBOL(unwind_to_user); | ||
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index db49886bfae1..742cbbe49bdc 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -96,13 +96,13 @@ static inline void set_wq_data(struct work_struct *work, void *wq) | |||
96 | BUG_ON(!work_pending(work)); | 96 | BUG_ON(!work_pending(work)); |
97 | 97 | ||
98 | new = (unsigned long) wq | (1UL << WORK_STRUCT_PENDING); | 98 | new = (unsigned long) wq | (1UL << WORK_STRUCT_PENDING); |
99 | new |= work->management & WORK_STRUCT_FLAG_MASK; | 99 | new |= WORK_STRUCT_FLAG_MASK & *work_data_bits(work); |
100 | work->management = new; | 100 | atomic_long_set(&work->data, new); |
101 | } | 101 | } |
102 | 102 | ||
103 | static inline void *get_wq_data(struct work_struct *work) | 103 | static inline void *get_wq_data(struct work_struct *work) |
104 | { | 104 | { |
105 | return (void *) (work->management & WORK_STRUCT_WQ_DATA_MASK); | 105 | return (void *) (atomic_long_read(&work->data) & WORK_STRUCT_WQ_DATA_MASK); |
106 | } | 106 | } |
107 | 107 | ||
108 | static int __run_work(struct cpu_workqueue_struct *cwq, struct work_struct *work) | 108 | static int __run_work(struct cpu_workqueue_struct *cwq, struct work_struct *work) |
@@ -133,7 +133,7 @@ static int __run_work(struct cpu_workqueue_struct *cwq, struct work_struct *work | |||
133 | list_del_init(&work->entry); | 133 | list_del_init(&work->entry); |
134 | spin_unlock_irqrestore(&cwq->lock, flags); | 134 | spin_unlock_irqrestore(&cwq->lock, flags); |
135 | 135 | ||
136 | if (!test_bit(WORK_STRUCT_NOAUTOREL, &work->management)) | 136 | if (!test_bit(WORK_STRUCT_NOAUTOREL, work_data_bits(work))) |
137 | work_release(work); | 137 | work_release(work); |
138 | f(work); | 138 | f(work); |
139 | 139 | ||
@@ -206,7 +206,7 @@ int fastcall queue_work(struct workqueue_struct *wq, struct work_struct *work) | |||
206 | { | 206 | { |
207 | int ret = 0, cpu = get_cpu(); | 207 | int ret = 0, cpu = get_cpu(); |
208 | 208 | ||
209 | if (!test_and_set_bit(WORK_STRUCT_PENDING, &work->management)) { | 209 | if (!test_and_set_bit(WORK_STRUCT_PENDING, work_data_bits(work))) { |
210 | if (unlikely(is_single_threaded(wq))) | 210 | if (unlikely(is_single_threaded(wq))) |
211 | cpu = singlethread_cpu; | 211 | cpu = singlethread_cpu; |
212 | BUG_ON(!list_empty(&work->entry)); | 212 | BUG_ON(!list_empty(&work->entry)); |
@@ -248,7 +248,7 @@ int fastcall queue_delayed_work(struct workqueue_struct *wq, | |||
248 | if (delay == 0) | 248 | if (delay == 0) |
249 | return queue_work(wq, work); | 249 | return queue_work(wq, work); |
250 | 250 | ||
251 | if (!test_and_set_bit(WORK_STRUCT_PENDING, &work->management)) { | 251 | if (!test_and_set_bit(WORK_STRUCT_PENDING, work_data_bits(work))) { |
252 | BUG_ON(timer_pending(timer)); | 252 | BUG_ON(timer_pending(timer)); |
253 | BUG_ON(!list_empty(&work->entry)); | 253 | BUG_ON(!list_empty(&work->entry)); |
254 | 254 | ||
@@ -280,7 +280,7 @@ int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, | |||
280 | struct timer_list *timer = &dwork->timer; | 280 | struct timer_list *timer = &dwork->timer; |
281 | struct work_struct *work = &dwork->work; | 281 | struct work_struct *work = &dwork->work; |
282 | 282 | ||
283 | if (!test_and_set_bit(WORK_STRUCT_PENDING, &work->management)) { | 283 | if (!test_and_set_bit(WORK_STRUCT_PENDING, work_data_bits(work))) { |
284 | BUG_ON(timer_pending(timer)); | 284 | BUG_ON(timer_pending(timer)); |
285 | BUG_ON(!list_empty(&work->entry)); | 285 | BUG_ON(!list_empty(&work->entry)); |
286 | 286 | ||
@@ -321,7 +321,7 @@ static void run_workqueue(struct cpu_workqueue_struct *cwq) | |||
321 | spin_unlock_irqrestore(&cwq->lock, flags); | 321 | spin_unlock_irqrestore(&cwq->lock, flags); |
322 | 322 | ||
323 | BUG_ON(get_wq_data(work) != cwq); | 323 | BUG_ON(get_wq_data(work) != cwq); |
324 | if (!test_bit(WORK_STRUCT_NOAUTOREL, &work->management)) | 324 | if (!test_bit(WORK_STRUCT_NOAUTOREL, work_data_bits(work))) |
325 | work_release(work); | 325 | work_release(work); |
326 | f(work); | 326 | f(work); |
327 | 327 | ||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 818e4589f718..5c2681875b9a 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -354,24 +354,6 @@ config FRAME_POINTER | |||
354 | some architectures or if you use external debuggers. | 354 | some architectures or if you use external debuggers. |
355 | If you don't debug the kernel, you can say N. | 355 | If you don't debug the kernel, you can say N. |
356 | 356 | ||
357 | config UNWIND_INFO | ||
358 | bool "Compile the kernel with frame unwind information" | ||
359 | depends on !IA64 && !PARISC && !ARM | ||
360 | depends on !MODULES || !(MIPS || PPC || SUPERH || V850) | ||
361 | help | ||
362 | If you say Y here the resulting kernel image will be slightly larger | ||
363 | but not slower, and it will give very useful debugging information. | ||
364 | If you don't debug the kernel, you can say N, but we may not be able | ||
365 | to solve problems without frame unwind information or frame pointers. | ||
366 | |||
367 | config STACK_UNWIND | ||
368 | bool "Stack unwind support" | ||
369 | depends on UNWIND_INFO | ||
370 | depends on X86 | ||
371 | help | ||
372 | This enables more precise stack traces, omitting all unrelated | ||
373 | occurrences of pointers into kernel code from the dump. | ||
374 | |||
375 | config FORCED_INLINING | 357 | config FORCED_INLINING |
376 | bool "Force gcc to inline functions marked 'inline'" | 358 | bool "Force gcc to inline functions marked 'inline'" |
377 | depends on DEBUG_KERNEL | 359 | depends on DEBUG_KERNEL |
diff --git a/lib/fault-inject.c b/lib/fault-inject.c index d143c0faf248..b5a90fc056d3 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c | |||
@@ -55,37 +55,7 @@ static bool fail_task(struct fault_attr *attr, struct task_struct *task) | |||
55 | 55 | ||
56 | #define MAX_STACK_TRACE_DEPTH 32 | 56 | #define MAX_STACK_TRACE_DEPTH 32 |
57 | 57 | ||
58 | #ifdef CONFIG_STACK_UNWIND | 58 | #if defined(CONFIG_STACKTRACE) |
59 | |||
60 | static asmlinkage int fail_stacktrace_callback(struct unwind_frame_info *info, | ||
61 | void *arg) | ||
62 | { | ||
63 | int depth; | ||
64 | struct fault_attr *attr = arg; | ||
65 | bool found = (attr->require_start == 0 && attr->require_end == ULONG_MAX); | ||
66 | |||
67 | for (depth = 0; depth < attr->stacktrace_depth | ||
68 | && unwind(info) == 0 && UNW_PC(info); depth++) { | ||
69 | if (arch_unw_user_mode(info)) | ||
70 | break; | ||
71 | if (attr->reject_start <= UNW_PC(info) && | ||
72 | UNW_PC(info) < attr->reject_end) | ||
73 | return false; | ||
74 | if (attr->require_start <= UNW_PC(info) && | ||
75 | UNW_PC(info) < attr->require_end) | ||
76 | found = true; | ||
77 | } | ||
78 | return found; | ||
79 | } | ||
80 | |||
81 | static bool fail_stacktrace(struct fault_attr *attr) | ||
82 | { | ||
83 | struct unwind_frame_info info; | ||
84 | |||
85 | return unwind_init_running(&info, fail_stacktrace_callback, attr); | ||
86 | } | ||
87 | |||
88 | #elif defined(CONFIG_STACKTRACE) | ||
89 | 59 | ||
90 | static bool fail_stacktrace(struct fault_attr *attr) | 60 | static bool fail_stacktrace(struct fault_attr *attr) |
91 | { | 61 | { |
diff --git a/mm/mincore.c b/mm/mincore.c index 72890780c1c9..8aca6f7167bb 100644 --- a/mm/mincore.c +++ b/mm/mincore.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/mm/mincore.c | 2 | * linux/mm/mincore.c |
3 | * | 3 | * |
4 | * Copyright (C) 1994-1999 Linus Torvalds | 4 | * Copyright (C) 1994-2006 Linus Torvalds |
5 | */ | 5 | */ |
6 | 6 | ||
7 | /* | 7 | /* |
@@ -38,46 +38,51 @@ static unsigned char mincore_page(struct vm_area_struct * vma, | |||
38 | return present; | 38 | return present; |
39 | } | 39 | } |
40 | 40 | ||
41 | static long mincore_vma(struct vm_area_struct * vma, | 41 | /* |
42 | unsigned long start, unsigned long end, unsigned char __user * vec) | 42 | * Do a chunk of "sys_mincore()". We've already checked |
43 | * all the arguments, we hold the mmap semaphore: we should | ||
44 | * just return the amount of info we're asked for. | ||
45 | */ | ||
46 | static long do_mincore(unsigned long addr, unsigned char *vec, unsigned long pages) | ||
43 | { | 47 | { |
44 | long error, i, remaining; | 48 | unsigned long i, nr, pgoff; |
45 | unsigned char * tmp; | 49 | struct vm_area_struct *vma = find_vma(current->mm, addr); |
46 | |||
47 | error = -ENOMEM; | ||
48 | if (!vma->vm_file) | ||
49 | return error; | ||
50 | |||
51 | start = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff; | ||
52 | if (end > vma->vm_end) | ||
53 | end = vma->vm_end; | ||
54 | end = ((end - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff; | ||
55 | 50 | ||
56 | error = -EAGAIN; | 51 | /* |
57 | tmp = (unsigned char *) __get_free_page(GFP_KERNEL); | 52 | * find_vma() didn't find anything above us, or we're |
58 | if (!tmp) | 53 | * in an unmapped hole in the address space: ENOMEM. |
59 | return error; | 54 | */ |
55 | if (!vma || addr < vma->vm_start) | ||
56 | return -ENOMEM; | ||
60 | 57 | ||
61 | /* (end - start) is # of pages, and also # of bytes in "vec */ | 58 | /* |
62 | remaining = (end - start), | 59 | * Ok, got it. But check whether it's a segment we support |
60 | * mincore() on. Right now, we don't do any anonymous mappings. | ||
61 | * | ||
62 | * FIXME: This is just stupid. And returning ENOMEM is | ||
63 | * stupid too. We should just look at the page tables. But | ||
64 | * this is what we've traditionally done, so we'll just | ||
65 | * continue doing it. | ||
66 | */ | ||
67 | if (!vma->vm_file) | ||
68 | return -ENOMEM; | ||
63 | 69 | ||
64 | error = 0; | 70 | /* |
65 | for (i = 0; remaining > 0; remaining -= PAGE_SIZE, i++) { | 71 | * Calculate how many pages there are left in the vma, and |
66 | int j = 0; | 72 | * what the pgoff is for our address. |
67 | long thispiece = (remaining < PAGE_SIZE) ? | 73 | */ |
68 | remaining : PAGE_SIZE; | 74 | nr = (vma->vm_end - addr) >> PAGE_SHIFT; |
75 | if (nr > pages) | ||
76 | nr = pages; | ||
69 | 77 | ||
70 | while (j < thispiece) | 78 | pgoff = (addr - vma->vm_start) >> PAGE_SHIFT; |
71 | tmp[j++] = mincore_page(vma, start++); | 79 | pgoff += vma->vm_pgoff; |
72 | 80 | ||
73 | if (copy_to_user(vec + PAGE_SIZE * i, tmp, thispiece)) { | 81 | /* And then we just fill the sucker in.. */ |
74 | error = -EFAULT; | 82 | for (i = 0 ; i < nr; i++, pgoff++) |
75 | break; | 83 | vec[i] = mincore_page(vma, pgoff); |
76 | } | ||
77 | } | ||
78 | 84 | ||
79 | free_page((unsigned long) tmp); | 85 | return nr; |
80 | return error; | ||
81 | } | 86 | } |
82 | 87 | ||
83 | /* | 88 | /* |
@@ -107,82 +112,50 @@ static long mincore_vma(struct vm_area_struct * vma, | |||
107 | asmlinkage long sys_mincore(unsigned long start, size_t len, | 112 | asmlinkage long sys_mincore(unsigned long start, size_t len, |
108 | unsigned char __user * vec) | 113 | unsigned char __user * vec) |
109 | { | 114 | { |
110 | int index = 0; | 115 | long retval; |
111 | unsigned long end, limit; | 116 | unsigned long pages; |
112 | struct vm_area_struct * vma; | 117 | unsigned char *tmp; |
113 | size_t max; | ||
114 | int unmapped_error = 0; | ||
115 | long error; | ||
116 | |||
117 | /* check the arguments */ | ||
118 | if (start & ~PAGE_CACHE_MASK) | ||
119 | goto einval; | ||
120 | |||
121 | limit = TASK_SIZE; | ||
122 | if (start >= limit) | ||
123 | goto enomem; | ||
124 | |||
125 | if (!len) | ||
126 | return 0; | ||
127 | |||
128 | max = limit - start; | ||
129 | len = PAGE_CACHE_ALIGN(len); | ||
130 | if (len > max || !len) | ||
131 | goto enomem; | ||
132 | 118 | ||
133 | end = start + len; | 119 | /* Check the start address: needs to be page-aligned.. */ |
120 | if (start & ~PAGE_CACHE_MASK) | ||
121 | return -EINVAL; | ||
134 | 122 | ||
135 | /* check the output buffer whilst holding the lock */ | 123 | /* ..and we need to be passed a valid user-space range */ |
136 | error = -EFAULT; | 124 | if (!access_ok(VERIFY_READ, (void __user *) start, len)) |
137 | down_read(¤t->mm->mmap_sem); | 125 | return -ENOMEM; |
138 | 126 | ||
139 | if (!access_ok(VERIFY_WRITE, vec, len >> PAGE_SHIFT)) | 127 | /* This also avoids any overflows on PAGE_CACHE_ALIGN */ |
140 | goto out; | 128 | pages = len >> PAGE_SHIFT; |
129 | pages += (len & ~PAGE_MASK) != 0; | ||
141 | 130 | ||
142 | /* | 131 | if (!access_ok(VERIFY_WRITE, vec, pages)) |
143 | * If the interval [start,end) covers some unmapped address | 132 | return -EFAULT; |
144 | * ranges, just ignore them, but return -ENOMEM at the end. | ||
145 | */ | ||
146 | error = 0; | ||
147 | |||
148 | vma = find_vma(current->mm, start); | ||
149 | while (vma) { | ||
150 | /* Here start < vma->vm_end. */ | ||
151 | if (start < vma->vm_start) { | ||
152 | unmapped_error = -ENOMEM; | ||
153 | start = vma->vm_start; | ||
154 | } | ||
155 | 133 | ||
156 | /* Here vma->vm_start <= start < vma->vm_end. */ | 134 | tmp = (void *) __get_free_page(GFP_USER); |
157 | if (end <= vma->vm_end) { | 135 | if (!tmp) |
158 | if (start < end) { | 136 | return -EAGAIN; |
159 | error = mincore_vma(vma, start, end, | 137 | |
160 | &vec[index]); | 138 | retval = 0; |
161 | if (error) | 139 | while (pages) { |
162 | goto out; | 140 | /* |
163 | } | 141 | * Do at most PAGE_SIZE entries per iteration, due to |
164 | error = unmapped_error; | 142 | * the temporary buffer size. |
165 | goto out; | 143 | */ |
144 | down_read(¤t->mm->mmap_sem); | ||
145 | retval = do_mincore(start, tmp, min(pages, PAGE_SIZE)); | ||
146 | up_read(¤t->mm->mmap_sem); | ||
147 | |||
148 | if (retval <= 0) | ||
149 | break; | ||
150 | if (copy_to_user(vec, tmp, retval)) { | ||
151 | retval = -EFAULT; | ||
152 | break; | ||
166 | } | 153 | } |
167 | 154 | pages -= retval; | |
168 | /* Here vma->vm_start <= start < vma->vm_end < end. */ | 155 | vec += retval; |
169 | error = mincore_vma(vma, start, vma->vm_end, &vec[index]); | 156 | start += retval << PAGE_SHIFT; |
170 | if (error) | 157 | retval = 0; |
171 | goto out; | ||
172 | index += (vma->vm_end - start) >> PAGE_CACHE_SHIFT; | ||
173 | start = vma->vm_end; | ||
174 | vma = vma->vm_next; | ||
175 | } | 158 | } |
176 | 159 | free_page((unsigned long) tmp); | |
177 | /* we found a hole in the area queried if we arrive here */ | 160 | return retval; |
178 | error = -ENOMEM; | ||
179 | |||
180 | out: | ||
181 | up_read(¤t->mm->mmap_sem); | ||
182 | return error; | ||
183 | |||
184 | einval: | ||
185 | return -EINVAL; | ||
186 | enomem: | ||
187 | return -ENOMEM; | ||
188 | } | 161 | } |
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 6cabf6d8a751..42233df2b099 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -1088,8 +1088,8 @@ out: | |||
1088 | /* | 1088 | /* |
1089 | * FIXME: nonblock behaviour looks like it may have a bug. | 1089 | * FIXME: nonblock behaviour looks like it may have a bug. |
1090 | */ | 1090 | */ |
1091 | static int ax25_connect(struct socket *sock, struct sockaddr *uaddr, | 1091 | static int __must_check ax25_connect(struct socket *sock, |
1092 | int addr_len, int flags) | 1092 | struct sockaddr *uaddr, int addr_len, int flags) |
1093 | { | 1093 | { |
1094 | struct sock *sk = sock->sk; | 1094 | struct sock *sk = sock->sk; |
1095 | ax25_cb *ax25 = ax25_sk(sk), *ax25t; | 1095 | ax25_cb *ax25 = ax25_sk(sk), *ax25t; |
diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c index 07ac0207eb69..aff3e652c2d1 100644 --- a/net/ax25/ax25_iface.c +++ b/net/ax25/ax25_iface.c | |||
@@ -29,17 +29,10 @@ | |||
29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
31 | 31 | ||
32 | static struct protocol_struct { | 32 | static struct ax25_protocol *protocol_list; |
33 | struct protocol_struct *next; | ||
34 | unsigned int pid; | ||
35 | int (*func)(struct sk_buff *, ax25_cb *); | ||
36 | } *protocol_list = NULL; | ||
37 | static DEFINE_RWLOCK(protocol_list_lock); | 33 | static DEFINE_RWLOCK(protocol_list_lock); |
38 | 34 | ||
39 | static struct linkfail_struct { | 35 | static HLIST_HEAD(ax25_linkfail_list); |
40 | struct linkfail_struct *next; | ||
41 | void (*func)(ax25_cb *, int); | ||
42 | } *linkfail_list = NULL; | ||
43 | static DEFINE_SPINLOCK(linkfail_lock); | 36 | static DEFINE_SPINLOCK(linkfail_lock); |
44 | 37 | ||
45 | static struct listen_struct { | 38 | static struct listen_struct { |
@@ -49,36 +42,23 @@ static struct listen_struct { | |||
49 | } *listen_list = NULL; | 42 | } *listen_list = NULL; |
50 | static DEFINE_SPINLOCK(listen_lock); | 43 | static DEFINE_SPINLOCK(listen_lock); |
51 | 44 | ||
52 | int ax25_protocol_register(unsigned int pid, | 45 | /* |
53 | int (*func)(struct sk_buff *, ax25_cb *)) | 46 | * Do not register the internal protocols AX25_P_TEXT, AX25_P_SEGMENT, |
47 | * AX25_P_IP or AX25_P_ARP ... | ||
48 | */ | ||
49 | void ax25_register_pid(struct ax25_protocol *ap) | ||
54 | { | 50 | { |
55 | struct protocol_struct *protocol; | ||
56 | |||
57 | if (pid == AX25_P_TEXT || pid == AX25_P_SEGMENT) | ||
58 | return 0; | ||
59 | #ifdef CONFIG_INET | ||
60 | if (pid == AX25_P_IP || pid == AX25_P_ARP) | ||
61 | return 0; | ||
62 | #endif | ||
63 | if ((protocol = kmalloc(sizeof(*protocol), GFP_ATOMIC)) == NULL) | ||
64 | return 0; | ||
65 | |||
66 | protocol->pid = pid; | ||
67 | protocol->func = func; | ||
68 | |||
69 | write_lock_bh(&protocol_list_lock); | 51 | write_lock_bh(&protocol_list_lock); |
70 | protocol->next = protocol_list; | 52 | ap->next = protocol_list; |
71 | protocol_list = protocol; | 53 | protocol_list = ap; |
72 | write_unlock_bh(&protocol_list_lock); | 54 | write_unlock_bh(&protocol_list_lock); |
73 | |||
74 | return 1; | ||
75 | } | 55 | } |
76 | 56 | ||
77 | EXPORT_SYMBOL(ax25_protocol_register); | 57 | EXPORT_SYMBOL_GPL(ax25_register_pid); |
78 | 58 | ||
79 | void ax25_protocol_release(unsigned int pid) | 59 | void ax25_protocol_release(unsigned int pid) |
80 | { | 60 | { |
81 | struct protocol_struct *s, *protocol; | 61 | struct ax25_protocol *s, *protocol; |
82 | 62 | ||
83 | write_lock_bh(&protocol_list_lock); | 63 | write_lock_bh(&protocol_list_lock); |
84 | protocol = protocol_list; | 64 | protocol = protocol_list; |
@@ -110,54 +90,19 @@ void ax25_protocol_release(unsigned int pid) | |||
110 | 90 | ||
111 | EXPORT_SYMBOL(ax25_protocol_release); | 91 | EXPORT_SYMBOL(ax25_protocol_release); |
112 | 92 | ||
113 | int ax25_linkfail_register(void (*func)(ax25_cb *, int)) | 93 | void ax25_linkfail_register(struct ax25_linkfail *lf) |
114 | { | 94 | { |
115 | struct linkfail_struct *linkfail; | ||
116 | |||
117 | if ((linkfail = kmalloc(sizeof(*linkfail), GFP_ATOMIC)) == NULL) | ||
118 | return 0; | ||
119 | |||
120 | linkfail->func = func; | ||
121 | |||
122 | spin_lock_bh(&linkfail_lock); | 95 | spin_lock_bh(&linkfail_lock); |
123 | linkfail->next = linkfail_list; | 96 | hlist_add_head(&lf->lf_node, &ax25_linkfail_list); |
124 | linkfail_list = linkfail; | ||
125 | spin_unlock_bh(&linkfail_lock); | 97 | spin_unlock_bh(&linkfail_lock); |
126 | |||
127 | return 1; | ||
128 | } | 98 | } |
129 | 99 | ||
130 | EXPORT_SYMBOL(ax25_linkfail_register); | 100 | EXPORT_SYMBOL(ax25_linkfail_register); |
131 | 101 | ||
132 | void ax25_linkfail_release(void (*func)(ax25_cb *, int)) | 102 | void ax25_linkfail_release(struct ax25_linkfail *lf) |
133 | { | 103 | { |
134 | struct linkfail_struct *s, *linkfail; | ||
135 | |||
136 | spin_lock_bh(&linkfail_lock); | 104 | spin_lock_bh(&linkfail_lock); |
137 | linkfail = linkfail_list; | 105 | hlist_del_init(&lf->lf_node); |
138 | if (linkfail == NULL) { | ||
139 | spin_unlock_bh(&linkfail_lock); | ||
140 | return; | ||
141 | } | ||
142 | |||
143 | if (linkfail->func == func) { | ||
144 | linkfail_list = linkfail->next; | ||
145 | spin_unlock_bh(&linkfail_lock); | ||
146 | kfree(linkfail); | ||
147 | return; | ||
148 | } | ||
149 | |||
150 | while (linkfail != NULL && linkfail->next != NULL) { | ||
151 | if (linkfail->next->func == func) { | ||
152 | s = linkfail->next; | ||
153 | linkfail->next = linkfail->next->next; | ||
154 | spin_unlock_bh(&linkfail_lock); | ||
155 | kfree(s); | ||
156 | return; | ||
157 | } | ||
158 | |||
159 | linkfail = linkfail->next; | ||
160 | } | ||
161 | spin_unlock_bh(&linkfail_lock); | 106 | spin_unlock_bh(&linkfail_lock); |
162 | } | 107 | } |
163 | 108 | ||
@@ -171,7 +116,7 @@ int ax25_listen_register(ax25_address *callsign, struct net_device *dev) | |||
171 | return 0; | 116 | return 0; |
172 | 117 | ||
173 | if ((listen = kmalloc(sizeof(*listen), GFP_ATOMIC)) == NULL) | 118 | if ((listen = kmalloc(sizeof(*listen), GFP_ATOMIC)) == NULL) |
174 | return 0; | 119 | return -ENOMEM; |
175 | 120 | ||
176 | listen->callsign = *callsign; | 121 | listen->callsign = *callsign; |
177 | listen->dev = dev; | 122 | listen->dev = dev; |
@@ -181,7 +126,7 @@ int ax25_listen_register(ax25_address *callsign, struct net_device *dev) | |||
181 | listen_list = listen; | 126 | listen_list = listen; |
182 | spin_unlock_bh(&listen_lock); | 127 | spin_unlock_bh(&listen_lock); |
183 | 128 | ||
184 | return 1; | 129 | return 0; |
185 | } | 130 | } |
186 | 131 | ||
187 | EXPORT_SYMBOL(ax25_listen_register); | 132 | EXPORT_SYMBOL(ax25_listen_register); |
@@ -223,7 +168,7 @@ EXPORT_SYMBOL(ax25_listen_release); | |||
223 | int (*ax25_protocol_function(unsigned int pid))(struct sk_buff *, ax25_cb *) | 168 | int (*ax25_protocol_function(unsigned int pid))(struct sk_buff *, ax25_cb *) |
224 | { | 169 | { |
225 | int (*res)(struct sk_buff *, ax25_cb *) = NULL; | 170 | int (*res)(struct sk_buff *, ax25_cb *) = NULL; |
226 | struct protocol_struct *protocol; | 171 | struct ax25_protocol *protocol; |
227 | 172 | ||
228 | read_lock(&protocol_list_lock); | 173 | read_lock(&protocol_list_lock); |
229 | for (protocol = protocol_list; protocol != NULL; protocol = protocol->next) | 174 | for (protocol = protocol_list; protocol != NULL; protocol = protocol->next) |
@@ -242,7 +187,8 @@ int ax25_listen_mine(ax25_address *callsign, struct net_device *dev) | |||
242 | 187 | ||
243 | spin_lock_bh(&listen_lock); | 188 | spin_lock_bh(&listen_lock); |
244 | for (listen = listen_list; listen != NULL; listen = listen->next) | 189 | for (listen = listen_list; listen != NULL; listen = listen->next) |
245 | if (ax25cmp(&listen->callsign, callsign) == 0 && (listen->dev == dev || listen->dev == NULL)) { | 190 | if (ax25cmp(&listen->callsign, callsign) == 0 && |
191 | (listen->dev == dev || listen->dev == NULL)) { | ||
246 | spin_unlock_bh(&listen_lock); | 192 | spin_unlock_bh(&listen_lock); |
247 | return 1; | 193 | return 1; |
248 | } | 194 | } |
@@ -253,17 +199,18 @@ int ax25_listen_mine(ax25_address *callsign, struct net_device *dev) | |||
253 | 199 | ||
254 | void ax25_link_failed(ax25_cb *ax25, int reason) | 200 | void ax25_link_failed(ax25_cb *ax25, int reason) |
255 | { | 201 | { |
256 | struct linkfail_struct *linkfail; | 202 | struct ax25_linkfail *lf; |
203 | struct hlist_node *node; | ||
257 | 204 | ||
258 | spin_lock_bh(&linkfail_lock); | 205 | spin_lock_bh(&linkfail_lock); |
259 | for (linkfail = linkfail_list; linkfail != NULL; linkfail = linkfail->next) | 206 | hlist_for_each_entry(lf, node, &ax25_linkfail_list, lf_node) |
260 | (linkfail->func)(ax25, reason); | 207 | lf->func(ax25, reason); |
261 | spin_unlock_bh(&linkfail_lock); | 208 | spin_unlock_bh(&linkfail_lock); |
262 | } | 209 | } |
263 | 210 | ||
264 | int ax25_protocol_is_registered(unsigned int pid) | 211 | int ax25_protocol_is_registered(unsigned int pid) |
265 | { | 212 | { |
266 | struct protocol_struct *protocol; | 213 | struct ax25_protocol *protocol; |
267 | int res = 0; | 214 | int res = 0; |
268 | 215 | ||
269 | read_lock_bh(&protocol_list_lock); | 216 | read_lock_bh(&protocol_list_lock); |
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c index 8580356ace5c..0a0381622b1c 100644 --- a/net/ax25/ax25_route.c +++ b/net/ax25/ax25_route.c | |||
@@ -71,7 +71,7 @@ void ax25_rt_device_down(struct net_device *dev) | |||
71 | write_unlock(&ax25_route_lock); | 71 | write_unlock(&ax25_route_lock); |
72 | } | 72 | } |
73 | 73 | ||
74 | static int ax25_rt_add(struct ax25_routes_struct *route) | 74 | static int __must_check ax25_rt_add(struct ax25_routes_struct *route) |
75 | { | 75 | { |
76 | ax25_route *ax25_rt; | 76 | ax25_route *ax25_rt; |
77 | ax25_dev *ax25_dev; | 77 | ax25_dev *ax25_dev; |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 1aaff0a2e098..2daa0dc19d33 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1325,7 +1325,8 @@ void ip_rt_send_redirect(struct sk_buff *skb) | |||
1325 | /* Check for load limit; set rate_last to the latest sent | 1325 | /* Check for load limit; set rate_last to the latest sent |
1326 | * redirect. | 1326 | * redirect. |
1327 | */ | 1327 | */ |
1328 | if (time_after(jiffies, | 1328 | if (rt->u.dst.rate_tokens == 0 || |
1329 | time_after(jiffies, | ||
1329 | (rt->u.dst.rate_last + | 1330 | (rt->u.dst.rate_last + |
1330 | (ip_rt_redirect_load << rt->u.dst.rate_tokens)))) { | 1331 | (ip_rt_redirect_load << rt->u.dst.rate_tokens)))) { |
1331 | icmp_send(skb, ICMP_REDIRECT, ICMP_REDIR_HOST, rt->rt_gateway); | 1332 | icmp_send(skb, ICMP_REDIRECT, ICMP_REDIR_HOST, rt->rt_gateway); |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index a1222d6968c4..bf7a22412bcb 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -928,6 +928,7 @@ int tcp_v4_md5_do_del(struct sock *sk, __be32 addr) | |||
928 | if (tp->md5sig_info->entries4 == 0) { | 928 | if (tp->md5sig_info->entries4 == 0) { |
929 | kfree(tp->md5sig_info->keys4); | 929 | kfree(tp->md5sig_info->keys4); |
930 | tp->md5sig_info->keys4 = NULL; | 930 | tp->md5sig_info->keys4 = NULL; |
931 | tp->md5sig_info->alloced4 = 0; | ||
931 | } else if (tp->md5sig_info->entries4 != i) { | 932 | } else if (tp->md5sig_info->entries4 != i) { |
932 | /* Need to do some manipulation */ | 933 | /* Need to do some manipulation */ |
933 | memcpy(&tp->md5sig_info->keys4[i], | 934 | memcpy(&tp->md5sig_info->keys4[i], |
@@ -1185,7 +1186,7 @@ done_opts: | |||
1185 | return 0; | 1186 | return 0; |
1186 | 1187 | ||
1187 | if (hash_expected && !hash_location) { | 1188 | if (hash_expected && !hash_location) { |
1188 | LIMIT_NETDEBUG(KERN_INFO "MD5 Hash NOT expected but found " | 1189 | LIMIT_NETDEBUG(KERN_INFO "MD5 Hash expected but NOT found " |
1189 | "(" NIPQUAD_FMT ", %d)->(" NIPQUAD_FMT ", %d)\n", | 1190 | "(" NIPQUAD_FMT ", %d)->(" NIPQUAD_FMT ", %d)\n", |
1190 | NIPQUAD(iph->saddr), ntohs(th->source), | 1191 | NIPQUAD(iph->saddr), ntohs(th->source), |
1191 | NIPQUAD(iph->daddr), ntohs(th->dest)); | 1192 | NIPQUAD(iph->daddr), ntohs(th->dest)); |
diff --git a/net/ipv6/netfilter/Kconfig b/net/ipv6/netfilter/Kconfig index fc3e5eb4bc3f..adcd6131df2a 100644 --- a/net/ipv6/netfilter/Kconfig +++ b/net/ipv6/netfilter/Kconfig | |||
@@ -7,7 +7,7 @@ menu "IPv6: Netfilter Configuration (EXPERIMENTAL)" | |||
7 | 7 | ||
8 | config NF_CONNTRACK_IPV6 | 8 | config NF_CONNTRACK_IPV6 |
9 | tristate "IPv6 connection tracking support (EXPERIMENTAL)" | 9 | tristate "IPv6 connection tracking support (EXPERIMENTAL)" |
10 | depends on EXPERIMENTAL && NF_CONNTRACK | 10 | depends on INET && IPV6 && EXPERIMENTAL && NF_CONNTRACK |
11 | ---help--- | 11 | ---help--- |
12 | Connection tracking keeps a record of what packets have passed | 12 | Connection tracking keeps a record of what packets have passed |
13 | through your machine, in order to figure out how they are related | 13 | through your machine, in order to figure out how they are related |
@@ -21,6 +21,7 @@ config NF_CONNTRACK_IPV6 | |||
21 | 21 | ||
22 | config IP6_NF_QUEUE | 22 | config IP6_NF_QUEUE |
23 | tristate "IP6 Userspace queueing via NETLINK (OBSOLETE)" | 23 | tristate "IP6 Userspace queueing via NETLINK (OBSOLETE)" |
24 | depends on INET && IPV6 && NETFILTER && EXPERIMENTAL | ||
24 | ---help--- | 25 | ---help--- |
25 | 26 | ||
26 | This option adds a queue handler to the kernel for IPv6 | 27 | This option adds a queue handler to the kernel for IPv6 |
@@ -41,7 +42,7 @@ config IP6_NF_QUEUE | |||
41 | 42 | ||
42 | config IP6_NF_IPTABLES | 43 | config IP6_NF_IPTABLES |
43 | tristate "IP6 tables support (required for filtering)" | 44 | tristate "IP6 tables support (required for filtering)" |
44 | depends on NETFILTER_XTABLES | 45 | depends on INET && IPV6 && EXPERIMENTAL && NETFILTER_XTABLES |
45 | help | 46 | help |
46 | ip6tables is a general, extensible packet identification framework. | 47 | ip6tables is a general, extensible packet identification framework. |
47 | Currently only the packet filtering and packet mangling subsystem | 48 | Currently only the packet filtering and packet mangling subsystem |
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 1d50f801f181..43bbe2c9e49a 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -1377,6 +1377,15 @@ static struct notifier_block nr_dev_notifier = { | |||
1377 | 1377 | ||
1378 | static struct net_device **dev_nr; | 1378 | static struct net_device **dev_nr; |
1379 | 1379 | ||
1380 | static struct ax25_protocol nr_pid = { | ||
1381 | .pid = AX25_P_NETROM, | ||
1382 | .func = nr_route_frame | ||
1383 | }; | ||
1384 | |||
1385 | static struct ax25_linkfail nr_linkfail_notifier = { | ||
1386 | .func = nr_link_failed, | ||
1387 | }; | ||
1388 | |||
1380 | static int __init nr_proto_init(void) | 1389 | static int __init nr_proto_init(void) |
1381 | { | 1390 | { |
1382 | int i; | 1391 | int i; |
@@ -1424,8 +1433,8 @@ static int __init nr_proto_init(void) | |||
1424 | 1433 | ||
1425 | register_netdevice_notifier(&nr_dev_notifier); | 1434 | register_netdevice_notifier(&nr_dev_notifier); |
1426 | 1435 | ||
1427 | ax25_protocol_register(AX25_P_NETROM, nr_route_frame); | 1436 | ax25_register_pid(&nr_pid); |
1428 | ax25_linkfail_register(nr_link_failed); | 1437 | ax25_linkfail_register(&nr_linkfail_notifier); |
1429 | 1438 | ||
1430 | #ifdef CONFIG_SYSCTL | 1439 | #ifdef CONFIG_SYSCTL |
1431 | nr_register_sysctl(); | 1440 | nr_register_sysctl(); |
@@ -1474,7 +1483,7 @@ static void __exit nr_exit(void) | |||
1474 | nr_unregister_sysctl(); | 1483 | nr_unregister_sysctl(); |
1475 | #endif | 1484 | #endif |
1476 | 1485 | ||
1477 | ax25_linkfail_release(nr_link_failed); | 1486 | ax25_linkfail_release(&nr_linkfail_notifier); |
1478 | ax25_protocol_release(AX25_P_NETROM); | 1487 | ax25_protocol_release(AX25_P_NETROM); |
1479 | 1488 | ||
1480 | unregister_netdevice_notifier(&nr_dev_notifier); | 1489 | unregister_netdevice_notifier(&nr_dev_notifier); |
diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c index 9b8eb54971ab..4700d5225b78 100644 --- a/net/netrom/nr_dev.c +++ b/net/netrom/nr_dev.c | |||
@@ -128,25 +128,37 @@ static int nr_header(struct sk_buff *skb, struct net_device *dev, unsigned short | |||
128 | return -37; | 128 | return -37; |
129 | } | 129 | } |
130 | 130 | ||
131 | static int nr_set_mac_address(struct net_device *dev, void *addr) | 131 | static int __must_check nr_set_mac_address(struct net_device *dev, void *addr) |
132 | { | 132 | { |
133 | struct sockaddr *sa = addr; | 133 | struct sockaddr *sa = addr; |
134 | int err; | ||
135 | |||
136 | if (!memcmp(dev->dev_addr, sa->sa_data, dev->addr_len)) | ||
137 | return 0; | ||
138 | |||
139 | if (dev->flags & IFF_UP) { | ||
140 | err = ax25_listen_register((ax25_address *)sa->sa_data, NULL); | ||
141 | if (err) | ||
142 | return err; | ||
134 | 143 | ||
135 | if (dev->flags & IFF_UP) | ||
136 | ax25_listen_release((ax25_address *)dev->dev_addr, NULL); | 144 | ax25_listen_release((ax25_address *)dev->dev_addr, NULL); |
145 | } | ||
137 | 146 | ||
138 | memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); | 147 | memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); |
139 | 148 | ||
140 | if (dev->flags & IFF_UP) | ||
141 | ax25_listen_register((ax25_address *)dev->dev_addr, NULL); | ||
142 | |||
143 | return 0; | 149 | return 0; |
144 | } | 150 | } |
145 | 151 | ||
146 | static int nr_open(struct net_device *dev) | 152 | static int nr_open(struct net_device *dev) |
147 | { | 153 | { |
154 | int err; | ||
155 | |||
156 | err = ax25_listen_register((ax25_address *)dev->dev_addr, NULL); | ||
157 | if (err) | ||
158 | return err; | ||
159 | |||
148 | netif_start_queue(dev); | 160 | netif_start_queue(dev); |
149 | ax25_listen_register((ax25_address *)dev->dev_addr, NULL); | 161 | |
150 | return 0; | 162 | return 0; |
151 | } | 163 | } |
152 | 164 | ||
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index 0096105bcd47..8f88964099ef 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c | |||
@@ -87,8 +87,9 @@ static void nr_remove_neigh(struct nr_neigh *); | |||
87 | * Add a new route to a node, and in the process add the node and the | 87 | * Add a new route to a node, and in the process add the node and the |
88 | * neighbour if it is new. | 88 | * neighbour if it is new. |
89 | */ | 89 | */ |
90 | static int nr_add_node(ax25_address *nr, const char *mnemonic, ax25_address *ax25, | 90 | static int __must_check nr_add_node(ax25_address *nr, const char *mnemonic, |
91 | ax25_digi *ax25_digi, struct net_device *dev, int quality, int obs_count) | 91 | ax25_address *ax25, ax25_digi *ax25_digi, struct net_device *dev, |
92 | int quality, int obs_count) | ||
92 | { | 93 | { |
93 | struct nr_node *nr_node; | 94 | struct nr_node *nr_node; |
94 | struct nr_neigh *nr_neigh; | 95 | struct nr_neigh *nr_neigh; |
@@ -406,7 +407,8 @@ static int nr_del_node(ax25_address *callsign, ax25_address *neighbour, struct n | |||
406 | /* | 407 | /* |
407 | * Lock a neighbour with a quality. | 408 | * Lock a neighbour with a quality. |
408 | */ | 409 | */ |
409 | static int nr_add_neigh(ax25_address *callsign, ax25_digi *ax25_digi, struct net_device *dev, unsigned int quality) | 410 | static int __must_check nr_add_neigh(ax25_address *callsign, |
411 | ax25_digi *ax25_digi, struct net_device *dev, unsigned int quality) | ||
410 | { | 412 | { |
411 | struct nr_neigh *nr_neigh; | 413 | struct nr_neigh *nr_neigh; |
412 | 414 | ||
@@ -777,9 +779,13 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25) | |||
777 | nr_src = (ax25_address *)(skb->data + 0); | 779 | nr_src = (ax25_address *)(skb->data + 0); |
778 | nr_dest = (ax25_address *)(skb->data + 7); | 780 | nr_dest = (ax25_address *)(skb->data + 7); |
779 | 781 | ||
780 | if (ax25 != NULL) | 782 | if (ax25 != NULL) { |
781 | nr_add_node(nr_src, "", &ax25->dest_addr, ax25->digipeat, | 783 | ret = nr_add_node(nr_src, "", &ax25->dest_addr, ax25->digipeat, |
782 | ax25->ax25_dev->dev, 0, sysctl_netrom_obsolescence_count_initialiser); | 784 | ax25->ax25_dev->dev, 0, |
785 | sysctl_netrom_obsolescence_count_initialiser); | ||
786 | if (ret) | ||
787 | return ret; | ||
788 | } | ||
783 | 789 | ||
784 | if ((dev = nr_dev_get(nr_dest)) != NULL) { /* Its for me */ | 790 | if ((dev = nr_dev_get(nr_dest)) != NULL) { /* Its for me */ |
785 | if (ax25 == NULL) /* Its from me */ | 791 | if (ax25 == NULL) /* Its from me */ |
@@ -844,6 +850,7 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25) | |||
844 | ret = (nr_neigh->ax25 != NULL); | 850 | ret = (nr_neigh->ax25 != NULL); |
845 | nr_node_unlock(nr_node); | 851 | nr_node_unlock(nr_node); |
846 | nr_node_put(nr_node); | 852 | nr_node_put(nr_node); |
853 | |||
847 | return ret; | 854 | return ret; |
848 | } | 855 | } |
849 | 856 | ||
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 08a542855654..9e279464c9d1 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -1314,7 +1314,8 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
1314 | if (copy_from_user(&rose_callsign, argp, sizeof(ax25_address))) | 1314 | if (copy_from_user(&rose_callsign, argp, sizeof(ax25_address))) |
1315 | return -EFAULT; | 1315 | return -EFAULT; |
1316 | if (ax25cmp(&rose_callsign, &null_ax25_address) != 0) | 1316 | if (ax25cmp(&rose_callsign, &null_ax25_address) != 0) |
1317 | ax25_listen_register(&rose_callsign, NULL); | 1317 | return ax25_listen_register(&rose_callsign, NULL); |
1318 | |||
1318 | return 0; | 1319 | return 0; |
1319 | 1320 | ||
1320 | case SIOCRSGL2CALL: | 1321 | case SIOCRSGL2CALL: |
@@ -1481,6 +1482,15 @@ static struct notifier_block rose_dev_notifier = { | |||
1481 | 1482 | ||
1482 | static struct net_device **dev_rose; | 1483 | static struct net_device **dev_rose; |
1483 | 1484 | ||
1485 | static struct ax25_protocol rose_pid = { | ||
1486 | .pid = AX25_P_ROSE, | ||
1487 | .func = rose_route_frame | ||
1488 | }; | ||
1489 | |||
1490 | static struct ax25_linkfail rose_linkfail_notifier = { | ||
1491 | .func = rose_link_failed | ||
1492 | }; | ||
1493 | |||
1484 | static int __init rose_proto_init(void) | 1494 | static int __init rose_proto_init(void) |
1485 | { | 1495 | { |
1486 | int i; | 1496 | int i; |
@@ -1530,8 +1540,8 @@ static int __init rose_proto_init(void) | |||
1530 | sock_register(&rose_family_ops); | 1540 | sock_register(&rose_family_ops); |
1531 | register_netdevice_notifier(&rose_dev_notifier); | 1541 | register_netdevice_notifier(&rose_dev_notifier); |
1532 | 1542 | ||
1533 | ax25_protocol_register(AX25_P_ROSE, rose_route_frame); | 1543 | ax25_register_pid(&rose_pid); |
1534 | ax25_linkfail_register(rose_link_failed); | 1544 | ax25_linkfail_register(&rose_linkfail_notifier); |
1535 | 1545 | ||
1536 | #ifdef CONFIG_SYSCTL | 1546 | #ifdef CONFIG_SYSCTL |
1537 | rose_register_sysctl(); | 1547 | rose_register_sysctl(); |
@@ -1579,7 +1589,7 @@ static void __exit rose_exit(void) | |||
1579 | rose_rt_free(); | 1589 | rose_rt_free(); |
1580 | 1590 | ||
1581 | ax25_protocol_release(AX25_P_ROSE); | 1591 | ax25_protocol_release(AX25_P_ROSE); |
1582 | ax25_linkfail_release(rose_link_failed); | 1592 | ax25_linkfail_release(&rose_linkfail_notifier); |
1583 | 1593 | ||
1584 | if (ax25cmp(&rose_callsign, &null_ax25_address) != 0) | 1594 | if (ax25cmp(&rose_callsign, &null_ax25_address) != 0) |
1585 | ax25_listen_release(&rose_callsign, NULL); | 1595 | ax25_listen_release(&rose_callsign, NULL); |
diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c index 7c279e2659ec..50824d345fa6 100644 --- a/net/rose/rose_dev.c +++ b/net/rose/rose_dev.c | |||
@@ -93,20 +93,34 @@ static int rose_rebuild_header(struct sk_buff *skb) | |||
93 | static int rose_set_mac_address(struct net_device *dev, void *addr) | 93 | static int rose_set_mac_address(struct net_device *dev, void *addr) |
94 | { | 94 | { |
95 | struct sockaddr *sa = addr; | 95 | struct sockaddr *sa = addr; |
96 | int err; | ||
96 | 97 | ||
97 | rose_del_loopback_node((rose_address *)dev->dev_addr); | 98 | if (!memcpy(dev->dev_addr, sa->sa_data, dev->addr_len)) |
99 | return 0; | ||
98 | 100 | ||
99 | memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); | 101 | if (dev->flags & IFF_UP) { |
102 | err = rose_add_loopback_node((rose_address *)dev->dev_addr); | ||
103 | if (err) | ||
104 | return err; | ||
105 | |||
106 | rose_del_loopback_node((rose_address *)dev->dev_addr); | ||
107 | } | ||
100 | 108 | ||
101 | rose_add_loopback_node((rose_address *)dev->dev_addr); | 109 | memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); |
102 | 110 | ||
103 | return 0; | 111 | return 0; |
104 | } | 112 | } |
105 | 113 | ||
106 | static int rose_open(struct net_device *dev) | 114 | static int rose_open(struct net_device *dev) |
107 | { | 115 | { |
116 | int err; | ||
117 | |||
118 | err = rose_add_loopback_node((rose_address *)dev->dev_addr); | ||
119 | if (err) | ||
120 | return err; | ||
121 | |||
108 | netif_start_queue(dev); | 122 | netif_start_queue(dev); |
109 | rose_add_loopback_node((rose_address *)dev->dev_addr); | 123 | |
110 | return 0; | 124 | return 0; |
111 | } | 125 | } |
112 | 126 | ||
diff --git a/net/rose/rose_loopback.c b/net/rose/rose_loopback.c index 103b4d38f88a..3e41bd93ab9f 100644 --- a/net/rose/rose_loopback.c +++ b/net/rose/rose_loopback.c | |||
@@ -79,7 +79,8 @@ static void rose_loopback_timer(unsigned long param) | |||
79 | 79 | ||
80 | skb->h.raw = skb->data; | 80 | skb->h.raw = skb->data; |
81 | 81 | ||
82 | if ((sk = rose_find_socket(lci_o, rose_loopback_neigh)) != NULL) { | 82 | sk = rose_find_socket(lci_o, &rose_loopback_neigh); |
83 | if (sk) { | ||
83 | if (rose_process_rx_frame(sk, skb) == 0) | 84 | if (rose_process_rx_frame(sk, skb) == 0) |
84 | kfree_skb(skb); | 85 | kfree_skb(skb); |
85 | continue; | 86 | continue; |
@@ -87,7 +88,7 @@ static void rose_loopback_timer(unsigned long param) | |||
87 | 88 | ||
88 | if (frametype == ROSE_CALL_REQUEST) { | 89 | if (frametype == ROSE_CALL_REQUEST) { |
89 | if ((dev = rose_dev_get(dest)) != NULL) { | 90 | if ((dev = rose_dev_get(dest)) != NULL) { |
90 | if (rose_rx_call_request(skb, dev, rose_loopback_neigh, lci_o) == 0) | 91 | if (rose_rx_call_request(skb, dev, &rose_loopback_neigh, lci_o) == 0) |
91 | kfree_skb(skb); | 92 | kfree_skb(skb); |
92 | } else { | 93 | } else { |
93 | kfree_skb(skb); | 94 | kfree_skb(skb); |
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index 7252344779a0..8028c0d425dc 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -46,13 +46,13 @@ static DEFINE_SPINLOCK(rose_neigh_list_lock); | |||
46 | static struct rose_route *rose_route_list; | 46 | static struct rose_route *rose_route_list; |
47 | static DEFINE_SPINLOCK(rose_route_list_lock); | 47 | static DEFINE_SPINLOCK(rose_route_list_lock); |
48 | 48 | ||
49 | struct rose_neigh *rose_loopback_neigh; | 49 | struct rose_neigh rose_loopback_neigh; |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * Add a new route to a node, and in the process add the node and the | 52 | * Add a new route to a node, and in the process add the node and the |
53 | * neighbour if it is new. | 53 | * neighbour if it is new. |
54 | */ | 54 | */ |
55 | static int rose_add_node(struct rose_route_struct *rose_route, | 55 | static int __must_check rose_add_node(struct rose_route_struct *rose_route, |
56 | struct net_device *dev) | 56 | struct net_device *dev) |
57 | { | 57 | { |
58 | struct rose_node *rose_node, *rose_tmpn, *rose_tmpp; | 58 | struct rose_node *rose_node, *rose_tmpn, *rose_tmpp; |
@@ -361,33 +361,30 @@ out: | |||
361 | /* | 361 | /* |
362 | * Add the loopback neighbour. | 362 | * Add the loopback neighbour. |
363 | */ | 363 | */ |
364 | int rose_add_loopback_neigh(void) | 364 | void rose_add_loopback_neigh(void) |
365 | { | 365 | { |
366 | if ((rose_loopback_neigh = kmalloc(sizeof(struct rose_neigh), GFP_ATOMIC)) == NULL) | 366 | struct rose_neigh *sn = &rose_loopback_neigh; |
367 | return -ENOMEM; | ||
368 | 367 | ||
369 | rose_loopback_neigh->callsign = null_ax25_address; | 368 | sn->callsign = null_ax25_address; |
370 | rose_loopback_neigh->digipeat = NULL; | 369 | sn->digipeat = NULL; |
371 | rose_loopback_neigh->ax25 = NULL; | 370 | sn->ax25 = NULL; |
372 | rose_loopback_neigh->dev = NULL; | 371 | sn->dev = NULL; |
373 | rose_loopback_neigh->count = 0; | 372 | sn->count = 0; |
374 | rose_loopback_neigh->use = 0; | 373 | sn->use = 0; |
375 | rose_loopback_neigh->dce_mode = 1; | 374 | sn->dce_mode = 1; |
376 | rose_loopback_neigh->loopback = 1; | 375 | sn->loopback = 1; |
377 | rose_loopback_neigh->number = rose_neigh_no++; | 376 | sn->number = rose_neigh_no++; |
378 | rose_loopback_neigh->restarted = 1; | 377 | sn->restarted = 1; |
379 | 378 | ||
380 | skb_queue_head_init(&rose_loopback_neigh->queue); | 379 | skb_queue_head_init(&sn->queue); |
381 | 380 | ||
382 | init_timer(&rose_loopback_neigh->ftimer); | 381 | init_timer(&sn->ftimer); |
383 | init_timer(&rose_loopback_neigh->t0timer); | 382 | init_timer(&sn->t0timer); |
384 | 383 | ||
385 | spin_lock_bh(&rose_neigh_list_lock); | 384 | spin_lock_bh(&rose_neigh_list_lock); |
386 | rose_loopback_neigh->next = rose_neigh_list; | 385 | sn->next = rose_neigh_list; |
387 | rose_neigh_list = rose_loopback_neigh; | 386 | rose_neigh_list = sn; |
388 | spin_unlock_bh(&rose_neigh_list_lock); | 387 | spin_unlock_bh(&rose_neigh_list_lock); |
389 | |||
390 | return 0; | ||
391 | } | 388 | } |
392 | 389 | ||
393 | /* | 390 | /* |
@@ -421,13 +418,13 @@ int rose_add_loopback_node(rose_address *address) | |||
421 | rose_node->mask = 10; | 418 | rose_node->mask = 10; |
422 | rose_node->count = 1; | 419 | rose_node->count = 1; |
423 | rose_node->loopback = 1; | 420 | rose_node->loopback = 1; |
424 | rose_node->neighbour[0] = rose_loopback_neigh; | 421 | rose_node->neighbour[0] = &rose_loopback_neigh; |
425 | 422 | ||
426 | /* Insert at the head of list. Address is always mask=10 */ | 423 | /* Insert at the head of list. Address is always mask=10 */ |
427 | rose_node->next = rose_node_list; | 424 | rose_node->next = rose_node_list; |
428 | rose_node_list = rose_node; | 425 | rose_node_list = rose_node; |
429 | 426 | ||
430 | rose_loopback_neigh->count++; | 427 | rose_loopback_neigh.count++; |
431 | 428 | ||
432 | out: | 429 | out: |
433 | spin_unlock_bh(&rose_node_list_lock); | 430 | spin_unlock_bh(&rose_node_list_lock); |
@@ -458,7 +455,7 @@ void rose_del_loopback_node(rose_address *address) | |||
458 | 455 | ||
459 | rose_remove_node(rose_node); | 456 | rose_remove_node(rose_node); |
460 | 457 | ||
461 | rose_loopback_neigh->count--; | 458 | rose_loopback_neigh.count--; |
462 | 459 | ||
463 | out: | 460 | out: |
464 | spin_unlock_bh(&rose_node_list_lock); | 461 | spin_unlock_bh(&rose_node_list_lock); |
diff --git a/sound/oss/dmasound/tas3001c.c b/sound/oss/dmasound/tas3001c.c index f227c9f688cc..2f21a3c00374 100644 --- a/sound/oss/dmasound/tas3001c.c +++ b/sound/oss/dmasound/tas3001c.c | |||
@@ -50,6 +50,7 @@ struct tas3001c_data_t { | |||
50 | int output_id; | 50 | int output_id; |
51 | int speaker_id; | 51 | int speaker_id; |
52 | struct tas_drce_t drce_state; | 52 | struct tas_drce_t drce_state; |
53 | struct work_struct change; | ||
53 | }; | 54 | }; |
54 | 55 | ||
55 | 56 | ||
@@ -667,14 +668,13 @@ tas3001c_update_device_parameters(struct tas3001c_data_t *self) | |||
667 | } | 668 | } |
668 | 669 | ||
669 | static void | 670 | static void |
670 | tas3001c_device_change_handler(void *self) | 671 | tas3001c_device_change_handler(struct work_struct *work) |
671 | { | 672 | { |
672 | if (self) | 673 | struct tas3001c_data_t *self; |
673 | tas3001c_update_device_parameters(self); | 674 | self = container_of(work, struct tas3001c_data_t, change); |
675 | tas3001c_update_device_parameters(self); | ||
674 | } | 676 | } |
675 | 677 | ||
676 | static struct work_struct device_change; | ||
677 | |||
678 | static int | 678 | static int |
679 | tas3001c_output_device_change( struct tas3001c_data_t *self, | 679 | tas3001c_output_device_change( struct tas3001c_data_t *self, |
680 | int device_id, | 680 | int device_id, |
@@ -685,7 +685,7 @@ tas3001c_output_device_change( struct tas3001c_data_t *self, | |||
685 | self->output_id=output_id; | 685 | self->output_id=output_id; |
686 | self->speaker_id=speaker_id; | 686 | self->speaker_id=speaker_id; |
687 | 687 | ||
688 | schedule_work(&device_change); | 688 | schedule_work(&self->change); |
689 | return 0; | 689 | return 0; |
690 | } | 690 | } |
691 | 691 | ||
@@ -823,7 +823,7 @@ tas3001c_init(struct i2c_client *client) | |||
823 | tas3001c_write_biquad_shadow(self, i, j, | 823 | tas3001c_write_biquad_shadow(self, i, j, |
824 | &tas3001c_eq_unity); | 824 | &tas3001c_eq_unity); |
825 | 825 | ||
826 | INIT_WORK(&device_change, tas3001c_device_change_handler, self); | 826 | INIT_WORK(&self->change, tas3001c_device_change_handler); |
827 | return 0; | 827 | return 0; |
828 | } | 828 | } |
829 | 829 | ||
diff --git a/sound/oss/dmasound/tas3004.c b/sound/oss/dmasound/tas3004.c index 82eaaca2db9a..af34fb39bc29 100644 --- a/sound/oss/dmasound/tas3004.c +++ b/sound/oss/dmasound/tas3004.c | |||
@@ -48,6 +48,7 @@ struct tas3004_data_t { | |||
48 | int output_id; | 48 | int output_id; |
49 | int speaker_id; | 49 | int speaker_id; |
50 | struct tas_drce_t drce_state; | 50 | struct tas_drce_t drce_state; |
51 | struct work_struct change; | ||
51 | }; | 52 | }; |
52 | 53 | ||
53 | #define MAKE_TIME(sec,usec) (((sec)<<12) + (50000+(usec/10)*(1<<12))/100000) | 54 | #define MAKE_TIME(sec,usec) (((sec)<<12) + (50000+(usec/10)*(1<<12))/100000) |
@@ -914,15 +915,13 @@ tas3004_update_device_parameters(struct tas3004_data_t *self) | |||
914 | } | 915 | } |
915 | 916 | ||
916 | static void | 917 | static void |
917 | tas3004_device_change_handler(void *self) | 918 | tas3004_device_change_handler(struct work_struct *work) |
918 | { | 919 | { |
919 | if (!self) return; | 920 | struct tas3004_data_t *self; |
920 | 921 | self = container_of(work, struct tas3004_data_t, change); | |
921 | tas3004_update_device_parameters((struct tas3004_data_t *)self); | 922 | tas3004_update_device_parameters(self); |
922 | } | 923 | } |
923 | 924 | ||
924 | static struct work_struct device_change; | ||
925 | |||
926 | static int | 925 | static int |
927 | tas3004_output_device_change( struct tas3004_data_t *self, | 926 | tas3004_output_device_change( struct tas3004_data_t *self, |
928 | int device_id, | 927 | int device_id, |
@@ -933,7 +932,7 @@ tas3004_output_device_change( struct tas3004_data_t *self, | |||
933 | self->output_id=output_id; | 932 | self->output_id=output_id; |
934 | self->speaker_id=speaker_id; | 933 | self->speaker_id=speaker_id; |
935 | 934 | ||
936 | schedule_work(&device_change); | 935 | schedule_work(&self->change); |
937 | 936 | ||
938 | return 0; | 937 | return 0; |
939 | } | 938 | } |
@@ -1112,7 +1111,7 @@ tas3004_init(struct i2c_client *client) | |||
1112 | tas3004_write_register(self, TAS3004_REG_MCR2, &mcr2, WRITE_SHADOW); | 1111 | tas3004_write_register(self, TAS3004_REG_MCR2, &mcr2, WRITE_SHADOW); |
1113 | tas3004_write_register(self, TAS3004_REG_DRC, drce_init, WRITE_SHADOW); | 1112 | tas3004_write_register(self, TAS3004_REG_DRC, drce_init, WRITE_SHADOW); |
1114 | 1113 | ||
1115 | INIT_WORK(&device_change, tas3004_device_change_handler, self); | 1114 | INIT_WORK(&self->change, tas3004_device_change_handler); |
1116 | return 0; | 1115 | return 0; |
1117 | } | 1116 | } |
1118 | 1117 | ||