diff options
author | Len Brown <len.brown@intel.com> | 2009-09-19 00:11:26 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-09-19 00:11:26 -0400 |
commit | c602c65b2f81d14456771d1e3f15d1381f4b7efa (patch) | |
tree | f1f833c8dd6c1519eeb101be32f7fe54a9605af5 /arch/alpha | |
parent | 3834f47291df475be3f0f0fb7ccaa098967cc054 (diff) | |
parent | 78f28b7c555359c67c2a0d23f7436e915329421e (diff) |
Merge branch 'linus' into sfi-release
Conflicts:
arch/x86/kernel/setup.c
drivers/acpi/power.c
init/main.c
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/include/asm/agp.h | 4 | ||||
-rw-r--r-- | arch/alpha/include/asm/pci.h | 1 | ||||
-rw-r--r-- | arch/alpha/include/asm/percpu.h | 100 | ||||
-rw-r--r-- | arch/alpha/include/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/alpha/include/asm/thread_info.h | 5 | ||||
-rw-r--r-- | arch/alpha/include/asm/tlbflush.h | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/signal.c | 8 | ||||
-rw-r--r-- | arch/alpha/kernel/vmlinux.lds.S | 9 |
8 files changed, 25 insertions, 105 deletions
diff --git a/arch/alpha/include/asm/agp.h b/arch/alpha/include/asm/agp.h index 26c179135293..a94d48b8677f 100644 --- a/arch/alpha/include/asm/agp.h +++ b/arch/alpha/include/asm/agp.h | |||
@@ -9,10 +9,6 @@ | |||
9 | #define unmap_page_from_agp(page) | 9 | #define unmap_page_from_agp(page) |
10 | #define flush_agp_cache() mb() | 10 | #define flush_agp_cache() mb() |
11 | 11 | ||
12 | /* Convert a physical address to an address suitable for the GART. */ | ||
13 | #define phys_to_gart(x) (x) | ||
14 | #define gart_to_phys(x) (x) | ||
15 | |||
16 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | 12 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ |
17 | #define alloc_gatt_pages(order) \ | 13 | #define alloc_gatt_pages(order) \ |
18 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | 14 | ((char *)__get_free_pages(GFP_KERNEL, (order))) |
diff --git a/arch/alpha/include/asm/pci.h b/arch/alpha/include/asm/pci.h index d22ace99d13d..dd8dcabf160f 100644 --- a/arch/alpha/include/asm/pci.h +++ b/arch/alpha/include/asm/pci.h | |||
@@ -52,7 +52,6 @@ struct pci_controller { | |||
52 | bus numbers. */ | 52 | bus numbers. */ |
53 | 53 | ||
54 | #define pcibios_assign_all_busses() 1 | 54 | #define pcibios_assign_all_busses() 1 |
55 | #define pcibios_scan_all_fns(a, b) 0 | ||
56 | 55 | ||
57 | #define PCIBIOS_MIN_IO alpha_mv.min_io_address | 56 | #define PCIBIOS_MIN_IO alpha_mv.min_io_address |
58 | #define PCIBIOS_MIN_MEM alpha_mv.min_mem_address | 57 | #define PCIBIOS_MIN_MEM alpha_mv.min_mem_address |
diff --git a/arch/alpha/include/asm/percpu.h b/arch/alpha/include/asm/percpu.h index b663f1f10b6a..2c12378e3aa9 100644 --- a/arch/alpha/include/asm/percpu.h +++ b/arch/alpha/include/asm/percpu.h | |||
@@ -1,102 +1,18 @@ | |||
1 | #ifndef __ALPHA_PERCPU_H | 1 | #ifndef __ALPHA_PERCPU_H |
2 | #define __ALPHA_PERCPU_H | 2 | #define __ALPHA_PERCPU_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | ||
5 | #include <linux/threads.h> | ||
6 | #include <linux/percpu-defs.h> | ||
7 | |||
8 | /* | ||
9 | * Determine the real variable name from the name visible in the | ||
10 | * kernel sources. | ||
11 | */ | ||
12 | #define per_cpu_var(var) per_cpu__##var | ||
13 | |||
14 | #ifdef CONFIG_SMP | ||
15 | |||
16 | /* | ||
17 | * per_cpu_offset() is the offset that has to be added to a | ||
18 | * percpu variable to get to the instance for a certain processor. | ||
19 | */ | ||
20 | extern unsigned long __per_cpu_offset[NR_CPUS]; | ||
21 | |||
22 | #define per_cpu_offset(x) (__per_cpu_offset[x]) | ||
23 | |||
24 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id()) | ||
25 | #ifdef CONFIG_DEBUG_PREEMPT | ||
26 | #define my_cpu_offset per_cpu_offset(smp_processor_id()) | ||
27 | #else | ||
28 | #define my_cpu_offset __my_cpu_offset | ||
29 | #endif | ||
30 | |||
31 | #ifndef MODULE | ||
32 | #define SHIFT_PERCPU_PTR(var, offset) RELOC_HIDE(&per_cpu_var(var), (offset)) | ||
33 | #define PER_CPU_DEF_ATTRIBUTES | ||
34 | #else | ||
35 | /* | 4 | /* |
36 | * To calculate addresses of locally defined variables, GCC uses 32-bit | 5 | * To calculate addresses of locally defined variables, GCC uses |
37 | * displacement from the GP. Which doesn't work for per cpu variables in | 6 | * 32-bit displacement from the GP. Which doesn't work for per cpu |
38 | * modules, as an offset to the kernel per cpu area is way above 4G. | 7 | * variables in modules, as an offset to the kernel per cpu area is |
8 | * way above 4G. | ||
39 | * | 9 | * |
40 | * This forces allocation of a GOT entry for per cpu variable using | 10 | * Always use weak definitions for percpu variables in modules. |
41 | * ldq instruction with a 'literal' relocation. | ||
42 | */ | ||
43 | #define SHIFT_PERCPU_PTR(var, offset) ({ \ | ||
44 | extern int simple_identifier_##var(void); \ | ||
45 | unsigned long __ptr, tmp_gp; \ | ||
46 | asm ( "br %1, 1f \n\ | ||
47 | 1: ldgp %1, 0(%1) \n\ | ||
48 | ldq %0, per_cpu__" #var"(%1)\t!literal" \ | ||
49 | : "=&r"(__ptr), "=&r"(tmp_gp)); \ | ||
50 | (typeof(&per_cpu_var(var)))(__ptr + (offset)); }) | ||
51 | |||
52 | #define PER_CPU_DEF_ATTRIBUTES __used | ||
53 | |||
54 | #endif /* MODULE */ | ||
55 | |||
56 | /* | ||
57 | * A percpu variable may point to a discarded regions. The following are | ||
58 | * established ways to produce a usable pointer from the percpu variable | ||
59 | * offset. | ||
60 | */ | 11 | */ |
61 | #define per_cpu(var, cpu) \ | 12 | #if defined(MODULE) && defined(CONFIG_SMP) |
62 | (*SHIFT_PERCPU_PTR(var, per_cpu_offset(cpu))) | 13 | #define ARCH_NEEDS_WEAK_PER_CPU |
63 | #define __get_cpu_var(var) \ | ||
64 | (*SHIFT_PERCPU_PTR(var, my_cpu_offset)) | ||
65 | #define __raw_get_cpu_var(var) \ | ||
66 | (*SHIFT_PERCPU_PTR(var, __my_cpu_offset)) | ||
67 | |||
68 | #else /* ! SMP */ | ||
69 | |||
70 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var))) | ||
71 | #define __get_cpu_var(var) per_cpu_var(var) | ||
72 | #define __raw_get_cpu_var(var) per_cpu_var(var) | ||
73 | |||
74 | #define PER_CPU_DEF_ATTRIBUTES | ||
75 | |||
76 | #endif /* SMP */ | ||
77 | |||
78 | #ifdef CONFIG_SMP | ||
79 | #define PER_CPU_BASE_SECTION ".data.percpu" | ||
80 | #else | ||
81 | #define PER_CPU_BASE_SECTION ".data" | ||
82 | #endif | ||
83 | |||
84 | #ifdef CONFIG_SMP | ||
85 | |||
86 | #ifdef MODULE | ||
87 | #define PER_CPU_SHARED_ALIGNED_SECTION "" | ||
88 | #else | ||
89 | #define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned" | ||
90 | #endif | ||
91 | #define PER_CPU_FIRST_SECTION ".first" | ||
92 | |||
93 | #else | ||
94 | |||
95 | #define PER_CPU_SHARED_ALIGNED_SECTION "" | ||
96 | #define PER_CPU_FIRST_SECTION "" | ||
97 | |||
98 | #endif | 14 | #endif |
99 | 15 | ||
100 | #define PER_CPU_ATTRIBUTES | 16 | #include <asm-generic/percpu.h> |
101 | 17 | ||
102 | #endif /* __ALPHA_PERCPU_H */ | 18 | #endif /* __ALPHA_PERCPU_H */ |
diff --git a/arch/alpha/include/asm/socket.h b/arch/alpha/include/asm/socket.h index 3641ec1452f4..26773e3246e2 100644 --- a/arch/alpha/include/asm/socket.h +++ b/arch/alpha/include/asm/socket.h | |||
@@ -32,6 +32,8 @@ | |||
32 | #define SO_RCVTIMEO 0x1012 | 32 | #define SO_RCVTIMEO 0x1012 |
33 | #define SO_SNDTIMEO 0x1013 | 33 | #define SO_SNDTIMEO 0x1013 |
34 | #define SO_ACCEPTCONN 0x1014 | 34 | #define SO_ACCEPTCONN 0x1014 |
35 | #define SO_PROTOCOL 0x1028 | ||
36 | #define SO_DOMAIN 0x1029 | ||
35 | 37 | ||
36 | /* linux-specific, might as well be the same as on i386 */ | 38 | /* linux-specific, might as well be the same as on i386 */ |
37 | #define SO_NO_CHECK 11 | 39 | #define SO_NO_CHECK 11 |
diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h index 60c83abfde70..5076a8860b18 100644 --- a/arch/alpha/include/asm/thread_info.h +++ b/arch/alpha/include/asm/thread_info.h | |||
@@ -75,6 +75,7 @@ register struct thread_info *__current_thread_info __asm__("$8"); | |||
75 | #define TIF_UAC_SIGBUS 7 | 75 | #define TIF_UAC_SIGBUS 7 |
76 | #define TIF_MEMDIE 8 | 76 | #define TIF_MEMDIE 8 |
77 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */ | 77 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */ |
78 | #define TIF_NOTIFY_RESUME 10 /* callback before returning to user */ | ||
78 | #define TIF_FREEZE 16 /* is freezing for suspend */ | 79 | #define TIF_FREEZE 16 /* is freezing for suspend */ |
79 | 80 | ||
80 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 81 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
@@ -82,10 +83,12 @@ register struct thread_info *__current_thread_info __asm__("$8"); | |||
82 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 83 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
83 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 84 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
84 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 85 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
86 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
85 | #define _TIF_FREEZE (1<<TIF_FREEZE) | 87 | #define _TIF_FREEZE (1<<TIF_FREEZE) |
86 | 88 | ||
87 | /* Work to do on interrupt/exception return. */ | 89 | /* Work to do on interrupt/exception return. */ |
88 | #define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED) | 90 | #define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \ |
91 | _TIF_NOTIFY_RESUME) | ||
89 | 92 | ||
90 | /* Work to do on any return to userspace. */ | 93 | /* Work to do on any return to userspace. */ |
91 | #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \ | 94 | #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \ |
diff --git a/arch/alpha/include/asm/tlbflush.h b/arch/alpha/include/asm/tlbflush.h index 9d87aaa08c0d..e89e0c2e15b1 100644 --- a/arch/alpha/include/asm/tlbflush.h +++ b/arch/alpha/include/asm/tlbflush.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _ALPHA_TLBFLUSH_H | 2 | #define _ALPHA_TLBFLUSH_H |
3 | 3 | ||
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <linux/sched.h> | ||
5 | #include <asm/compiler.h> | 6 | #include <asm/compiler.h> |
6 | #include <asm/pgalloc.h> | 7 | #include <asm/pgalloc.h> |
7 | 8 | ||
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index df65eaa84c4c..0932dbb1ef8e 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/binfmts.h> | 20 | #include <linux/binfmts.h> |
21 | #include <linux/bitops.h> | 21 | #include <linux/bitops.h> |
22 | #include <linux/syscalls.h> | 22 | #include <linux/syscalls.h> |
23 | #include <linux/tracehook.h> | ||
23 | 24 | ||
24 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
25 | #include <asm/sigcontext.h> | 26 | #include <asm/sigcontext.h> |
@@ -683,4 +684,11 @@ do_notify_resume(struct pt_regs *regs, struct switch_stack *sw, | |||
683 | { | 684 | { |
684 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | 685 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) |
685 | do_signal(regs, sw, r0, r19); | 686 | do_signal(regs, sw, r0, r19); |
687 | |||
688 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | ||
689 | clear_thread_flag(TIF_NOTIFY_RESUME); | ||
690 | tracehook_notify_resume(regs); | ||
691 | if (current->replacement_session_keyring) | ||
692 | key_replace_session_keyring(); | ||
693 | } | ||
686 | } | 694 | } |
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S index b9d6568e5f7f..6dc03c35caa0 100644 --- a/arch/alpha/kernel/vmlinux.lds.S +++ b/arch/alpha/kernel/vmlinux.lds.S | |||
@@ -134,13 +134,6 @@ SECTIONS | |||
134 | __bss_stop = .; | 134 | __bss_stop = .; |
135 | _end = .; | 135 | _end = .; |
136 | 136 | ||
137 | /* Sections to be discarded */ | ||
138 | /DISCARD/ : { | ||
139 | EXIT_TEXT | ||
140 | EXIT_DATA | ||
141 | *(.exitcall.exit) | ||
142 | } | ||
143 | |||
144 | .mdebug 0 : { | 137 | .mdebug 0 : { |
145 | *(.mdebug) | 138 | *(.mdebug) |
146 | } | 139 | } |
@@ -150,4 +143,6 @@ SECTIONS | |||
150 | 143 | ||
151 | STABS_DEBUG | 144 | STABS_DEBUG |
152 | DWARF_DEBUG | 145 | DWARF_DEBUG |
146 | |||
147 | DISCARDS | ||
153 | } | 148 | } |