diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 22:43:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 22:43:57 -0400 |
commit | bf67f3a5c456a18f2e8d062f7e88506ef2cd9837 (patch) | |
tree | 2a2324b2572162059307db82f9238eeb25673a77 /arch/hexagon | |
parent | 226da0dbc84ed97f448523e2a4cb91c27fa68ed9 (diff) | |
parent | 203dacbdca977bedaba61ad2fca75d934060a5d5 (diff) |
Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull smp hotplug cleanups from Thomas Gleixner:
"This series is merily a cleanup of code copied around in arch/* and
not changing any of the real cpu hotplug horrors yet. I wish I'd had
something more substantial for 3.5, but I underestimated the lurking
horror..."
Fix up trivial conflicts in arch/{arm,sparc,x86}/Kconfig and
arch/sparc/include/asm/thread_info_32.h
* 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (79 commits)
um: Remove leftover declaration of alloc_task_struct_node()
task_allocator: Use config switches instead of magic defines
sparc: Use common threadinfo allocator
score: Use common threadinfo allocator
sh-use-common-threadinfo-allocator
mn10300: Use common threadinfo allocator
powerpc: Use common threadinfo allocator
mips: Use common threadinfo allocator
hexagon: Use common threadinfo allocator
m32r: Use common threadinfo allocator
frv: Use common threadinfo allocator
cris: Use common threadinfo allocator
x86: Use common threadinfo allocator
c6x: Use common threadinfo allocator
fork: Provide kmemcache based thread_info allocator
tile: Use common threadinfo allocator
fork: Provide weak arch_release_[task_struct|thread_info] functions
fork: Move thread info gfp flags to header
fork: Remove the weak insanity
sh: Remove cpu_idle_wait()
...
Diffstat (limited to 'arch/hexagon')
-rw-r--r-- | arch/hexagon/Kconfig | 1 | ||||
-rw-r--r-- | arch/hexagon/Makefile | 3 | ||||
-rw-r--r-- | arch/hexagon/include/asm/thread_info.h | 8 | ||||
-rw-r--r-- | arch/hexagon/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/hexagon/kernel/init_task.c | 54 | ||||
-rw-r--r-- | arch/hexagon/kernel/process.c | 37 | ||||
-rw-r--r-- | arch/hexagon/kernel/smp.c | 11 |
7 files changed, 5 insertions, 111 deletions
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index 9059e3905887..d2e4a3330336 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig | |||
@@ -27,6 +27,7 @@ config HEXAGON | |||
27 | select HAVE_ARCH_TRACEHOOK | 27 | select HAVE_ARCH_TRACEHOOK |
28 | select NO_IOPORT | 28 | select NO_IOPORT |
29 | select GENERIC_IOMAP | 29 | select GENERIC_IOMAP |
30 | select GENERIC_SMP_IDLE_THREAD | ||
30 | # mostly generic routines, with some accelerated ones | 31 | # mostly generic routines, with some accelerated ones |
31 | ---help--- | 32 | ---help--- |
32 | Qualcomm Hexagon is a processor architecture designed for high | 33 | Qualcomm Hexagon is a processor architecture designed for high |
diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile index 0c4de8790fd5..e27d030846ae 100644 --- a/arch/hexagon/Makefile +++ b/arch/hexagon/Makefile | |||
@@ -45,8 +45,7 @@ KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME) | |||
45 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | 45 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
46 | libs-y += $(LIBGCC) | 46 | libs-y += $(LIBGCC) |
47 | 47 | ||
48 | head-y := arch/hexagon/kernel/head.o \ | 48 | head-y := arch/hexagon/kernel/head.o |
49 | arch/hexagon/kernel/init_task.o | ||
50 | 49 | ||
51 | core-y += arch/hexagon/kernel/ \ | 50 | core-y += arch/hexagon/kernel/ \ |
52 | arch/hexagon/mm/ \ | 51 | arch/hexagon/mm/ \ |
diff --git a/arch/hexagon/include/asm/thread_info.h b/arch/hexagon/include/asm/thread_info.h index 9c2934ff5756..4f936a7ee847 100644 --- a/arch/hexagon/include/asm/thread_info.h +++ b/arch/hexagon/include/asm/thread_info.h | |||
@@ -31,15 +31,7 @@ | |||
31 | 31 | ||
32 | #define THREAD_SHIFT 12 | 32 | #define THREAD_SHIFT 12 |
33 | #define THREAD_SIZE (1<<THREAD_SHIFT) | 33 | #define THREAD_SIZE (1<<THREAD_SHIFT) |
34 | |||
35 | #if THREAD_SHIFT >= PAGE_SHIFT | ||
36 | #define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) | 34 | #define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) |
37 | #else /* don't use standard allocator */ | ||
38 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | ||
39 | extern struct thread_info *alloc_thread_info_node(struct task_struct *tsk, int node); | ||
40 | extern void free_thread_info(struct thread_info *ti); | ||
41 | #endif | ||
42 | |||
43 | 35 | ||
44 | #ifndef __ASSEMBLY__ | 36 | #ifndef __ASSEMBLY__ |
45 | 37 | ||
diff --git a/arch/hexagon/kernel/Makefile b/arch/hexagon/kernel/Makefile index 3689f3754d09..536aec093e62 100644 --- a/arch/hexagon/kernel/Makefile +++ b/arch/hexagon/kernel/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | extra-y := head.o vmlinux.lds init_task.o | 1 | extra-y := head.o vmlinux.lds |
2 | 2 | ||
3 | obj-$(CONFIG_SMP) += smp.o topology.o | 3 | obj-$(CONFIG_SMP) += smp.o topology.o |
4 | 4 | ||
diff --git a/arch/hexagon/kernel/init_task.c b/arch/hexagon/kernel/init_task.c deleted file mode 100644 index 73283d3edf09..000000000000 --- a/arch/hexagon/kernel/init_task.c +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* | ||
2 | * Init task definition | ||
3 | * | ||
4 | * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 and | ||
8 | * only version 2 as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
18 | * 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/mm.h> | ||
22 | #include <linux/module.h> | ||
23 | #include <linux/sched.h> | ||
24 | #include <linux/init_task.h> | ||
25 | #include <linux/fs.h> | ||
26 | #include <linux/mqueue.h> | ||
27 | #include <asm/thread_info.h> | ||
28 | #include <asm/uaccess.h> | ||
29 | #include <asm/pgtable.h> | ||
30 | |||
31 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | ||
32 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | ||
33 | |||
34 | /* | ||
35 | * Initial thread structure. | ||
36 | * | ||
37 | * We need to make sure that this is 8192-byte aligned due to the | ||
38 | * way process stacks are handled. This is done by making sure | ||
39 | * the linker maps this in the .text segment right after head.S, | ||
40 | * and making head.S ensure the proper alignment. | ||
41 | */ | ||
42 | union thread_union init_thread_union | ||
43 | __attribute__((__section__(".data.init_task"), | ||
44 | __aligned__(THREAD_SIZE))) = { | ||
45 | INIT_THREAD_INFO(init_task) | ||
46 | }; | ||
47 | |||
48 | /* | ||
49 | * Initial task structure. | ||
50 | * | ||
51 | * All other task structs will be allocated on slabs in fork.c | ||
52 | */ | ||
53 | struct task_struct init_task = INIT_TASK(init_task); | ||
54 | EXPORT_SYMBOL(init_task); | ||
diff --git a/arch/hexagon/kernel/process.c b/arch/hexagon/kernel/process.c index ff02821bfb7e..af51de63b835 100644 --- a/arch/hexagon/kernel/process.c +++ b/arch/hexagon/kernel/process.c | |||
@@ -234,43 +234,6 @@ unsigned long get_wchan(struct task_struct *p) | |||
234 | } | 234 | } |
235 | 235 | ||
236 | /* | 236 | /* |
237 | * Borrowed from PowerPC -- basically allow smaller kernel stacks if we | ||
238 | * go crazy with the page sizes. | ||
239 | */ | ||
240 | #if THREAD_SHIFT < PAGE_SHIFT | ||
241 | |||
242 | static struct kmem_cache *thread_info_cache; | ||
243 | |||
244 | struct thread_info *alloc_thread_info_node(struct task_struct *tsk, int node) | ||
245 | { | ||
246 | struct thread_info *ti; | ||
247 | |||
248 | ti = kmem_cache_alloc_node(thread_info_cache, GFP_KERNEL, node); | ||
249 | if (unlikely(ti == NULL)) | ||
250 | return NULL; | ||
251 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
252 | memset(ti, 0, THREAD_SIZE); | ||
253 | #endif | ||
254 | return ti; | ||
255 | } | ||
256 | |||
257 | void free_thread_info(struct thread_info *ti) | ||
258 | { | ||
259 | kmem_cache_free(thread_info_cache, ti); | ||
260 | } | ||
261 | |||
262 | /* Weak symbol; called by init/main.c */ | ||
263 | |||
264 | void thread_info_cache_init(void) | ||
265 | { | ||
266 | thread_info_cache = kmem_cache_create("thread_info", THREAD_SIZE, | ||
267 | THREAD_SIZE, 0, NULL); | ||
268 | BUG_ON(thread_info_cache == NULL); | ||
269 | } | ||
270 | |||
271 | #endif /* THREAD_SHIFT < PAGE_SHIFT */ | ||
272 | |||
273 | /* | ||
274 | * Required placeholder. | 237 | * Required placeholder. |
275 | */ | 238 | */ |
276 | int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) | 239 | int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) |
diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c index 1298141874a3..f7264621e58d 100644 --- a/arch/hexagon/kernel/smp.c +++ b/arch/hexagon/kernel/smp.c | |||
@@ -196,18 +196,11 @@ void __cpuinit start_secondary(void) | |||
196 | * maintains control until "cpu_online(cpu)" is set. | 196 | * maintains control until "cpu_online(cpu)" is set. |
197 | */ | 197 | */ |
198 | 198 | ||
199 | int __cpuinit __cpu_up(unsigned int cpu) | 199 | int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle) |
200 | { | 200 | { |
201 | struct task_struct *idle; | 201 | struct thread_info *thread = (struct thread_info *)idle->stack; |
202 | struct thread_info *thread; | ||
203 | void *stack_start; | 202 | void *stack_start; |
204 | 203 | ||
205 | /* Create new init task for the CPU */ | ||
206 | idle = fork_idle(cpu); | ||
207 | if (IS_ERR(idle)) | ||
208 | panic(KERN_ERR "fork_idle failed\n"); | ||
209 | |||
210 | thread = (struct thread_info *)idle->stack; | ||
211 | thread->cpu = cpu; | 204 | thread->cpu = cpu; |
212 | 205 | ||
213 | /* Boot to the head. */ | 206 | /* Boot to the head. */ |