diff options
author | David S. Miller <davem@davemloft.net> | 2009-06-15 06:02:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-15 06:02:23 -0400 |
commit | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (patch) | |
tree | 8d104ec2a459346b99413b0b77421ca7b9936c1a /arch/sparc | |
parent | ca44d6e60f9de26281fda203f58b570e1748c015 (diff) | |
parent | 45e3e1935e2857c54783291107d33323b3ef33c8 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/scsi/fcoe/fcoe.c
net/core/drop_monitor.c
net/core/net-traces.c
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/atomic_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/atomic_64.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/bitsperlong.h | 13 | ||||
-rw-r--r-- | arch/sparc/include/asm/elf_64.h | 5 | ||||
-rw-r--r-- | arch/sparc/include/asm/mman.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/page_32.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/page_64.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/signal.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/thread_info_64.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/types.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/uaccess_32.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/uaccess_64.h | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/irq_64.c | 12 | ||||
-rw-r--r-- | arch/sparc/kernel/module.c | 2 | ||||
-rw-r--r-- | arch/sparc/lib/csum_copy_from_user.S | 2 | ||||
-rw-r--r-- | arch/sparc/lib/csum_copy_to_user.S | 2 | ||||
-rw-r--r-- | arch/sparc/mm/extable.c | 29 |
17 files changed, 68 insertions, 22 deletions
diff --git a/arch/sparc/include/asm/atomic_32.h b/arch/sparc/include/asm/atomic_32.h index bb91b1248cd1..f0d343c3b956 100644 --- a/arch/sparc/include/asm/atomic_32.h +++ b/arch/sparc/include/asm/atomic_32.h | |||
@@ -161,5 +161,5 @@ static inline int __atomic24_sub(int i, atomic24_t *v) | |||
161 | 161 | ||
162 | #endif /* !(__KERNEL__) */ | 162 | #endif /* !(__KERNEL__) */ |
163 | 163 | ||
164 | #include <asm-generic/atomic.h> | 164 | #include <asm-generic/atomic-long.h> |
165 | #endif /* !(__ARCH_SPARC_ATOMIC__) */ | 165 | #endif /* !(__ARCH_SPARC_ATOMIC__) */ |
diff --git a/arch/sparc/include/asm/atomic_64.h b/arch/sparc/include/asm/atomic_64.h index a0a706492696..f2e48009989e 100644 --- a/arch/sparc/include/asm/atomic_64.h +++ b/arch/sparc/include/asm/atomic_64.h | |||
@@ -114,5 +114,5 @@ static inline int atomic64_add_unless(atomic64_t *v, long a, long u) | |||
114 | #define smp_mb__before_atomic_inc() barrier() | 114 | #define smp_mb__before_atomic_inc() barrier() |
115 | #define smp_mb__after_atomic_inc() barrier() | 115 | #define smp_mb__after_atomic_inc() barrier() |
116 | 116 | ||
117 | #include <asm-generic/atomic.h> | 117 | #include <asm-generic/atomic-long.h> |
118 | #endif /* !(__ARCH_SPARC64_ATOMIC__) */ | 118 | #endif /* !(__ARCH_SPARC64_ATOMIC__) */ |
diff --git a/arch/sparc/include/asm/bitsperlong.h b/arch/sparc/include/asm/bitsperlong.h new file mode 100644 index 000000000000..40dcaa3aaa56 --- /dev/null +++ b/arch/sparc/include/asm/bitsperlong.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef __ASM_ALPHA_BITSPERLONG_H | ||
2 | #define __ASM_ALPHA_BITSPERLONG_H | ||
3 | |||
4 | #if defined(__sparc__) && defined(__arch64__) | ||
5 | #define __BITS_PER_LONG 64 | ||
6 | #else | ||
7 | #define __BITS_PER_LONG 32 | ||
8 | #endif | ||
9 | |||
10 | #include <asm-generic/bitsperlong.h> | ||
11 | |||
12 | #endif /* __ASM_ALPHA_BITSPERLONG_H */ | ||
13 | |||
diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h index 425c2f9be6d5..d42e393078c4 100644 --- a/arch/sparc/include/asm/elf_64.h +++ b/arch/sparc/include/asm/elf_64.h | |||
@@ -208,8 +208,9 @@ do { unsigned long new_flags = current_thread_info()->flags; \ | |||
208 | else \ | 208 | else \ |
209 | clear_thread_flag(TIF_ABI_PENDING); \ | 209 | clear_thread_flag(TIF_ABI_PENDING); \ |
210 | /* flush_thread will update pgd cache */ \ | 210 | /* flush_thread will update pgd cache */ \ |
211 | if (current->personality != PER_LINUX32) \ | 211 | if (personality(current->personality) != PER_LINUX32) \ |
212 | set_personality(PER_LINUX); \ | 212 | set_personality(PER_LINUX | \ |
213 | (current->personality & (~PER_MASK))); \ | ||
213 | } while (0) | 214 | } while (0) |
214 | 215 | ||
215 | #endif /* !(__ASM_SPARC64_ELF_H) */ | 216 | #endif /* !(__ASM_SPARC64_ELF_H) */ |
diff --git a/arch/sparc/include/asm/mman.h b/arch/sparc/include/asm/mman.h index fdfbbf0a4736..988192e8e956 100644 --- a/arch/sparc/include/asm/mman.h +++ b/arch/sparc/include/asm/mman.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __SPARC_MMAN_H__ | 1 | #ifndef __SPARC_MMAN_H__ |
2 | #define __SPARC_MMAN_H__ | 2 | #define __SPARC_MMAN_H__ |
3 | 3 | ||
4 | #include <asm-generic/mman.h> | 4 | #include <asm-generic/mman-common.h> |
5 | 5 | ||
6 | /* SunOS'ified... */ | 6 | /* SunOS'ified... */ |
7 | 7 | ||
diff --git a/arch/sparc/include/asm/page_32.h b/arch/sparc/include/asm/page_32.h index d1806edc0958..f72080bdda94 100644 --- a/arch/sparc/include/asm/page_32.h +++ b/arch/sparc/include/asm/page_32.h | |||
@@ -152,6 +152,6 @@ extern unsigned long pfn_base; | |||
152 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 152 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
153 | 153 | ||
154 | #include <asm-generic/memory_model.h> | 154 | #include <asm-generic/memory_model.h> |
155 | #include <asm-generic/page.h> | 155 | #include <asm-generic/getorder.h> |
156 | 156 | ||
157 | #endif /* _SPARC_PAGE_H */ | 157 | #endif /* _SPARC_PAGE_H */ |
diff --git a/arch/sparc/include/asm/page_64.h b/arch/sparc/include/asm/page_64.h index 4274ed13ddb2..f0d09b401036 100644 --- a/arch/sparc/include/asm/page_64.h +++ b/arch/sparc/include/asm/page_64.h | |||
@@ -132,6 +132,6 @@ typedef struct page *pgtable_t; | |||
132 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 132 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
133 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 133 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
134 | 134 | ||
135 | #include <asm-generic/page.h> | 135 | #include <asm-generic/getorder.h> |
136 | 136 | ||
137 | #endif /* _SPARC64_PAGE_H */ | 137 | #endif /* _SPARC64_PAGE_H */ |
diff --git a/arch/sparc/include/asm/signal.h b/arch/sparc/include/asm/signal.h index cba45206b7f2..e49b828a2471 100644 --- a/arch/sparc/include/asm/signal.h +++ b/arch/sparc/include/asm/signal.h | |||
@@ -176,7 +176,7 @@ struct sigstack { | |||
176 | #define SA_STATIC_ALLOC 0x8000 | 176 | #define SA_STATIC_ALLOC 0x8000 |
177 | #endif | 177 | #endif |
178 | 178 | ||
179 | #include <asm-generic/signal.h> | 179 | #include <asm-generic/signal-defs.h> |
180 | 180 | ||
181 | struct __new_sigaction { | 181 | struct __new_sigaction { |
182 | __sighandler_t sa_handler; | 182 | __sighandler_t sa_handler; |
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h index 639ac805448a..65865726b283 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h | |||
@@ -102,8 +102,8 @@ struct thread_info { | |||
102 | #define TI_KERN_CNTD1 0x00000488 | 102 | #define TI_KERN_CNTD1 0x00000488 |
103 | #define TI_PCR 0x00000490 | 103 | #define TI_PCR 0x00000490 |
104 | #define TI_RESTART_BLOCK 0x00000498 | 104 | #define TI_RESTART_BLOCK 0x00000498 |
105 | #define TI_KUNA_REGS 0x000004c0 | 105 | #define TI_KUNA_REGS 0x000004c8 |
106 | #define TI_KUNA_INSN 0x000004c8 | 106 | #define TI_KUNA_INSN 0x000004d0 |
107 | #define TI_FPREGS 0x00000500 | 107 | #define TI_FPREGS 0x00000500 |
108 | 108 | ||
109 | /* We embed this in the uppermost byte of thread_info->flags */ | 109 | /* We embed this in the uppermost byte of thread_info->flags */ |
diff --git a/arch/sparc/include/asm/types.h b/arch/sparc/include/asm/types.h index 2237118825d0..de671d73baed 100644 --- a/arch/sparc/include/asm/types.h +++ b/arch/sparc/include/asm/types.h | |||
@@ -21,8 +21,6 @@ typedef unsigned short umode_t; | |||
21 | 21 | ||
22 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
23 | 23 | ||
24 | #define BITS_PER_LONG 64 | ||
25 | |||
26 | #ifndef __ASSEMBLY__ | 24 | #ifndef __ASSEMBLY__ |
27 | 25 | ||
28 | /* Dma addresses come in generic and 64-bit flavours. */ | 26 | /* Dma addresses come in generic and 64-bit flavours. */ |
@@ -46,8 +44,6 @@ typedef unsigned short umode_t; | |||
46 | 44 | ||
47 | #ifdef __KERNEL__ | 45 | #ifdef __KERNEL__ |
48 | 46 | ||
49 | #define BITS_PER_LONG 32 | ||
50 | |||
51 | #ifndef __ASSEMBLY__ | 47 | #ifndef __ASSEMBLY__ |
52 | 48 | ||
53 | typedef u32 dma_addr_t; | 49 | typedef u32 dma_addr_t; |
diff --git a/arch/sparc/include/asm/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h index 47d5619d43fa..8303ac481034 100644 --- a/arch/sparc/include/asm/uaccess_32.h +++ b/arch/sparc/include/asm/uaccess_32.h | |||
@@ -17,6 +17,9 @@ | |||
17 | 17 | ||
18 | #ifndef __ASSEMBLY__ | 18 | #ifndef __ASSEMBLY__ |
19 | 19 | ||
20 | #define ARCH_HAS_SORT_EXTABLE | ||
21 | #define ARCH_HAS_SEARCH_EXTABLE | ||
22 | |||
20 | /* Sparc is not segmented, however we need to be able to fool access_ok() | 23 | /* Sparc is not segmented, however we need to be able to fool access_ok() |
21 | * when doing system calls from kernel mode legitimately. | 24 | * when doing system calls from kernel mode legitimately. |
22 | * | 25 | * |
diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h index c64e767a3e4b..a38c03238918 100644 --- a/arch/sparc/include/asm/uaccess_64.h +++ b/arch/sparc/include/asm/uaccess_64.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <asm/asi.h> | 12 | #include <asm/asi.h> |
13 | #include <asm/system.h> | 13 | #include <asm/system.h> |
14 | #include <asm/spitfire.h> | 14 | #include <asm/spitfire.h> |
15 | #include <asm-generic/uaccess.h> | 15 | #include <asm-generic/uaccess-unaligned.h> |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | #ifndef __ASSEMBLY__ | 18 | #ifndef __ASSEMBLY__ |
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index 5deabe921a47..e5e78f9cfc95 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c | |||
@@ -318,10 +318,12 @@ static void sun4u_irq_enable(unsigned int virt_irq) | |||
318 | } | 318 | } |
319 | } | 319 | } |
320 | 320 | ||
321 | static void sun4u_set_affinity(unsigned int virt_irq, | 321 | static int sun4u_set_affinity(unsigned int virt_irq, |
322 | const struct cpumask *mask) | 322 | const struct cpumask *mask) |
323 | { | 323 | { |
324 | sun4u_irq_enable(virt_irq); | 324 | sun4u_irq_enable(virt_irq); |
325 | |||
326 | return 0; | ||
325 | } | 327 | } |
326 | 328 | ||
327 | /* Don't do anything. The desc->status check for IRQ_DISABLED in | 329 | /* Don't do anything. The desc->status check for IRQ_DISABLED in |
@@ -377,7 +379,7 @@ static void sun4v_irq_enable(unsigned int virt_irq) | |||
377 | ino, err); | 379 | ino, err); |
378 | } | 380 | } |
379 | 381 | ||
380 | static void sun4v_set_affinity(unsigned int virt_irq, | 382 | static int sun4v_set_affinity(unsigned int virt_irq, |
381 | const struct cpumask *mask) | 383 | const struct cpumask *mask) |
382 | { | 384 | { |
383 | unsigned int ino = virt_irq_table[virt_irq].dev_ino; | 385 | unsigned int ino = virt_irq_table[virt_irq].dev_ino; |
@@ -388,6 +390,8 @@ static void sun4v_set_affinity(unsigned int virt_irq, | |||
388 | if (err != HV_EOK) | 390 | if (err != HV_EOK) |
389 | printk(KERN_ERR "sun4v_intr_settarget(%x,%lu): " | 391 | printk(KERN_ERR "sun4v_intr_settarget(%x,%lu): " |
390 | "err(%d)\n", ino, cpuid, err); | 392 | "err(%d)\n", ino, cpuid, err); |
393 | |||
394 | return 0; | ||
391 | } | 395 | } |
392 | 396 | ||
393 | static void sun4v_irq_disable(unsigned int virt_irq) | 397 | static void sun4v_irq_disable(unsigned int virt_irq) |
@@ -445,7 +449,7 @@ static void sun4v_virq_enable(unsigned int virt_irq) | |||
445 | dev_handle, dev_ino, err); | 449 | dev_handle, dev_ino, err); |
446 | } | 450 | } |
447 | 451 | ||
448 | static void sun4v_virt_set_affinity(unsigned int virt_irq, | 452 | static int sun4v_virt_set_affinity(unsigned int virt_irq, |
449 | const struct cpumask *mask) | 453 | const struct cpumask *mask) |
450 | { | 454 | { |
451 | unsigned long cpuid, dev_handle, dev_ino; | 455 | unsigned long cpuid, dev_handle, dev_ino; |
@@ -461,6 +465,8 @@ static void sun4v_virt_set_affinity(unsigned int virt_irq, | |||
461 | printk(KERN_ERR "sun4v_vintr_set_target(%lx,%lx,%lu): " | 465 | printk(KERN_ERR "sun4v_vintr_set_target(%lx,%lx,%lu): " |
462 | "err(%d)\n", | 466 | "err(%d)\n", |
463 | dev_handle, dev_ino, cpuid, err); | 467 | dev_handle, dev_ino, cpuid, err); |
468 | |||
469 | return 0; | ||
464 | } | 470 | } |
465 | 471 | ||
466 | static void sun4v_virq_disable(unsigned int virt_irq) | 472 | static void sun4v_virq_disable(unsigned int virt_irq) |
diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c index 90273765e81f..0ee642f63234 100644 --- a/arch/sparc/kernel/module.c +++ b/arch/sparc/kernel/module.c | |||
@@ -75,8 +75,6 @@ void *module_alloc(unsigned long size) | |||
75 | void module_free(struct module *mod, void *module_region) | 75 | void module_free(struct module *mod, void *module_region) |
76 | { | 76 | { |
77 | vfree(module_region); | 77 | vfree(module_region); |
78 | /* FIXME: If module_region == mod->init_region, trim exception | ||
79 | table entries. */ | ||
80 | } | 78 | } |
81 | 79 | ||
82 | /* Make generic code ignore STT_REGISTER dummy undefined symbols. */ | 80 | /* Make generic code ignore STT_REGISTER dummy undefined symbols. */ |
diff --git a/arch/sparc/lib/csum_copy_from_user.S b/arch/sparc/lib/csum_copy_from_user.S index a22eddbe5dba..e0304e6a2242 100644 --- a/arch/sparc/lib/csum_copy_from_user.S +++ b/arch/sparc/lib/csum_copy_from_user.S | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | #define EX_LD(x) \ | 6 | #define EX_LD(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | 8 | .section .fixup, "ax"; \ |
9 | .align 4; \ | 9 | .align 4; \ |
10 | 99: retl; \ | 10 | 99: retl; \ |
11 | mov -1, %o0; \ | 11 | mov -1, %o0; \ |
diff --git a/arch/sparc/lib/csum_copy_to_user.S b/arch/sparc/lib/csum_copy_to_user.S index d5b12f441f02..afd01acc587c 100644 --- a/arch/sparc/lib/csum_copy_to_user.S +++ b/arch/sparc/lib/csum_copy_to_user.S | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | #define EX_ST(x) \ | 6 | #define EX_ST(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | 8 | .section .fixup,"ax"; \ |
9 | .align 4; \ | 9 | .align 4; \ |
10 | 99: retl; \ | 10 | 99: retl; \ |
11 | mov -1, %o0; \ | 11 | mov -1, %o0; \ |
diff --git a/arch/sparc/mm/extable.c b/arch/sparc/mm/extable.c index 16cc28935e39..a61c349448e1 100644 --- a/arch/sparc/mm/extable.c +++ b/arch/sparc/mm/extable.c | |||
@@ -28,6 +28,10 @@ search_extable(const struct exception_table_entry *start, | |||
28 | * word 3: last insn address + 4 bytes | 28 | * word 3: last insn address + 4 bytes |
29 | * word 4: fixup code address | 29 | * word 4: fixup code address |
30 | * | 30 | * |
31 | * Deleted entries are encoded as: | ||
32 | * word 1: unused | ||
33 | * word 2: -1 | ||
34 | * | ||
31 | * See asm/uaccess.h for more details. | 35 | * See asm/uaccess.h for more details. |
32 | */ | 36 | */ |
33 | 37 | ||
@@ -39,6 +43,10 @@ search_extable(const struct exception_table_entry *start, | |||
39 | continue; | 43 | continue; |
40 | } | 44 | } |
41 | 45 | ||
46 | /* A deleted entry; see trim_init_extable */ | ||
47 | if (walk->fixup == -1) | ||
48 | continue; | ||
49 | |||
42 | if (walk->insn == value) | 50 | if (walk->insn == value) |
43 | return walk; | 51 | return walk; |
44 | } | 52 | } |
@@ -57,6 +65,27 @@ search_extable(const struct exception_table_entry *start, | |||
57 | return NULL; | 65 | return NULL; |
58 | } | 66 | } |
59 | 67 | ||
68 | #ifdef CONFIG_MODULES | ||
69 | /* We could memmove them around; easier to mark the trimmed ones. */ | ||
70 | void trim_init_extable(struct module *m) | ||
71 | { | ||
72 | unsigned int i; | ||
73 | bool range; | ||
74 | |||
75 | for (i = 0; i < m->num_exentries; i += range ? 2 : 1) { | ||
76 | range = m->extable[i].fixup == 0; | ||
77 | |||
78 | if (within_module_init(m->extable[i].insn, m)) { | ||
79 | m->extable[i].fixup = -1; | ||
80 | if (range) | ||
81 | m->extable[i+1].fixup = -1; | ||
82 | } | ||
83 | if (range) | ||
84 | i++; | ||
85 | } | ||
86 | } | ||
87 | #endif /* CONFIG_MODULES */ | ||
88 | |||
60 | /* Special extable search, which handles ranges. Returns fixup */ | 89 | /* Special extable search, which handles ranges. Returns fixup */ |
61 | unsigned long search_extables_range(unsigned long addr, unsigned long *g2) | 90 | unsigned long search_extables_range(unsigned long addr, unsigned long *g2) |
62 | { | 91 | { |