aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-21 22:43:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-21 22:43:57 -0400
commitbf67f3a5c456a18f2e8d062f7e88506ef2cd9837 (patch)
tree2a2324b2572162059307db82f9238eeb25673a77 /arch/parisc
parent226da0dbc84ed97f448523e2a4cb91c27fa68ed9 (diff)
parent203dacbdca977bedaba61ad2fca75d934060a5d5 (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/parisc')
-rw-r--r--arch/parisc/Kconfig1
-rw-r--r--arch/parisc/Makefile2
-rw-r--r--arch/parisc/kernel/Makefile2
-rw-r--r--arch/parisc/kernel/init_task.c70
-rw-r--r--arch/parisc/kernel/smp.c25
-rw-r--r--arch/parisc/mm/init.c12
6 files changed, 18 insertions, 94 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 242a1b7ac759..ddb8b24b823d 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -17,6 +17,7 @@ config PARISC
17 select GENERIC_PCI_IOMAP 17 select GENERIC_PCI_IOMAP
18 select IRQ_PER_CPU 18 select IRQ_PER_CPU
19 select ARCH_HAVE_NMI_SAFE_CMPXCHG 19 select ARCH_HAVE_NMI_SAFE_CMPXCHG
20 select GENERIC_SMP_IDLE_THREAD
20 21
21 help 22 help
22 The PA-RISC microprocessor is designed by Hewlett-Packard and used 23 The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 19ab7b2ea1cd..dbc3850b1d0d 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -75,7 +75,7 @@ head-y := arch/parisc/kernel/head.o
75 75
76KBUILD_CFLAGS += $(cflags-y) 76KBUILD_CFLAGS += $(cflags-y)
77 77
78kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o 78kernel-y := mm/ kernel/ math-emu/
79kernel-$(CONFIG_HPUX) += hpux/ 79kernel-$(CONFIG_HPUX) += hpux/
80 80
81core-y += $(addprefix arch/parisc/, $(kernel-y)) 81core-y += $(addprefix arch/parisc/, $(kernel-y))
diff --git a/arch/parisc/kernel/Makefile b/arch/parisc/kernel/Makefile
index 67db0722e6ca..66ee3f12df58 100644
--- a/arch/parisc/kernel/Makefile
+++ b/arch/parisc/kernel/Makefile
@@ -2,7 +2,7 @@
2# Makefile for arch/parisc/kernel 2# Makefile for arch/parisc/kernel
3# 3#
4 4
5extra-y := init_task.o head.o vmlinux.lds 5extra-y := head.o vmlinux.lds
6 6
7obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \ 7obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \
8 pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \ 8 pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \
diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c
deleted file mode 100644
index 4a91e433416f..000000000000
--- a/arch/parisc/kernel/init_task.c
+++ /dev/null
@@ -1,70 +0,0 @@
1/*
2 * Static declaration of "init" task data structure.
3 *
4 * Copyright (C) 2000 Paul Bame <bame at parisc-linux.org>
5 * Copyright (C) 2000-2001 John Marvin <jsm at parisc-linux.org>
6 * Copyright (C) 2001 Helge Deller <deller @ parisc-linux.org>
7 * Copyright (C) 2002 Matthew Wilcox <willy with parisc-linux.org>
8 *
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24
25#include <linux/mm.h>
26#include <linux/fs.h>
27#include <linux/module.h>
28#include <linux/sched.h>
29#include <linux/init.h>
30#include <linux/init_task.h>
31#include <linux/mqueue.h>
32
33#include <asm/uaccess.h>
34#include <asm/pgtable.h>
35#include <asm/pgalloc.h>
36
37static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
38static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
39/*
40 * Initial task structure.
41 *
42 * We need to make sure that this is 16384-byte aligned due to the
43 * way process stacks are handled. This is done by having a special
44 * "init_task" linker map entry..
45 */
46union thread_union init_thread_union __init_task_data
47 __attribute__((aligned(128))) =
48 { INIT_THREAD_INFO(init_task) };
49
50#if PT_NLEVELS == 3
51/* NOTE: This layout exactly conforms to the hybrid L2/L3 page table layout
52 * with the first pmd adjacent to the pgd and below it. gcc doesn't actually
53 * guarantee that global objects will be laid out in memory in the same order
54 * as the order of declaration, so put these in different sections and use
55 * the linker script to order them. */
56pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((__section__ (".data..vm0.pmd"), aligned(PAGE_SIZE)));
57#endif
58
59pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((__section__ (".data..vm0.pgd"), aligned(PAGE_SIZE)));
60pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((__section__ (".data..vm0.pte"), aligned(PAGE_SIZE)));
61
62/*
63 * Initial task structure.
64 *
65 * All other task structs will be allocated on slabs in fork.c
66 */
67EXPORT_SYMBOL(init_task);
68
69__asm__(".data");
70struct task_struct init_task = INIT_TASK(init_task);
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 4dc7b7942b4c..a47828d31fe6 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -340,26 +340,11 @@ void __init smp_callin(void)
340/* 340/*
341 * Bring one cpu online. 341 * Bring one cpu online.
342 */ 342 */
343int __cpuinit smp_boot_one_cpu(int cpuid) 343int __cpuinit smp_boot_one_cpu(int cpuid, struct task_struct *idle)
344{ 344{
345 const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid); 345 const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid);
346 struct task_struct *idle;
347 long timeout; 346 long timeout;
348 347
349 /*
350 * Create an idle task for this CPU. Note the address wed* give
351 * to kernel_thread is irrelevant -- it's going to start
352 * where OS_BOOT_RENDEVZ vector in SAL says to start. But
353 * this gets all the other task-y sort of data structures set
354 * up like we wish. We need to pull the just created idle task
355 * off the run queue and stuff it into the init_tasks[] array.
356 * Sheesh . . .
357 */
358
359 idle = fork_idle(cpuid);
360 if (IS_ERR(idle))
361 panic("SMP: fork failed for CPU:%d", cpuid);
362
363 task_thread_info(idle)->cpu = cpuid; 348 task_thread_info(idle)->cpu = cpuid;
364 349
365 /* Let _start know what logical CPU we're booting 350 /* Let _start know what logical CPU we're booting
@@ -403,10 +388,6 @@ int __cpuinit smp_boot_one_cpu(int cpuid)
403 udelay(100); 388 udelay(100);
404 barrier(); 389 barrier();
405 } 390 }
406
407 put_task_struct(idle);
408 idle = NULL;
409
410 printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid); 391 printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid);
411 return -1; 392 return -1;
412 393
@@ -455,10 +436,10 @@ void smp_cpus_done(unsigned int cpu_max)
455} 436}
456 437
457 438
458int __cpuinit __cpu_up(unsigned int cpu) 439int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle)
459{ 440{
460 if (cpu != 0 && cpu < parisc_max_cpus) 441 if (cpu != 0 && cpu < parisc_max_cpus)
461 smp_boot_one_cpu(cpu); 442 smp_boot_one_cpu(cpu, tidle);
462 443
463 return cpu_online(cpu) ? 0 : -ENOSYS; 444 return cpu_online(cpu) ? 0 : -ENOSYS;
464} 445}
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 82f364e209fc..3ac462de53a4 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -33,6 +33,18 @@
33 33
34extern int data_start; 34extern int data_start;
35 35
36#if PT_NLEVELS == 3
37/* NOTE: This layout exactly conforms to the hybrid L2/L3 page table layout
38 * with the first pmd adjacent to the pgd and below it. gcc doesn't actually
39 * guarantee that global objects will be laid out in memory in the same order
40 * as the order of declaration, so put these in different sections and use
41 * the linker script to order them. */
42pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((__section__ (".data..vm0.pmd"), aligned(PAGE_SIZE)));
43#endif
44
45pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((__section__ (".data..vm0.pgd"), aligned(PAGE_SIZE)));
46pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((__section__ (".data..vm0.pte"), aligned(PAGE_SIZE)));
47
36#ifdef CONFIG_DISCONTIGMEM 48#ifdef CONFIG_DISCONTIGMEM
37struct node_map_data node_data[MAX_NUMNODES] __read_mostly; 49struct node_map_data node_data[MAX_NUMNODES] __read_mostly;
38unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly; 50unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly;