diff options
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/Kconfig | 1 | ||||
-rw-r--r-- | arch/parisc/Makefile | 2 | ||||
-rw-r--r-- | arch/parisc/include/asm/prefetch.h | 7 | ||||
-rw-r--r-- | arch/parisc/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/entry.S | 4 | ||||
-rw-r--r-- | arch/parisc/kernel/init_task.c | 70 | ||||
-rw-r--r-- | arch/parisc/kernel/pacache.S | 38 | ||||
-rw-r--r-- | arch/parisc/kernel/smp.c | 33 | ||||
-rw-r--r-- | arch/parisc/mm/init.c | 12 |
9 files changed, 55 insertions, 114 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 | ||
76 | KBUILD_CFLAGS += $(cflags-y) | 76 | KBUILD_CFLAGS += $(cflags-y) |
77 | 77 | ||
78 | kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o | 78 | kernel-y := mm/ kernel/ math-emu/ |
79 | kernel-$(CONFIG_HPUX) += hpux/ | 79 | kernel-$(CONFIG_HPUX) += hpux/ |
80 | 80 | ||
81 | core-y += $(addprefix arch/parisc/, $(kernel-y)) | 81 | core-y += $(addprefix arch/parisc/, $(kernel-y)) |
diff --git a/arch/parisc/include/asm/prefetch.h b/arch/parisc/include/asm/prefetch.h index c5edc60c059f..1ee7c82672c1 100644 --- a/arch/parisc/include/asm/prefetch.h +++ b/arch/parisc/include/asm/prefetch.h | |||
@@ -21,7 +21,12 @@ | |||
21 | #define ARCH_HAS_PREFETCH | 21 | #define ARCH_HAS_PREFETCH |
22 | static inline void prefetch(const void *addr) | 22 | static inline void prefetch(const void *addr) |
23 | { | 23 | { |
24 | __asm__("ldw 0(%0), %%r0" : : "r" (addr)); | 24 | __asm__( |
25 | #ifndef CONFIG_PA20 | ||
26 | /* Need to avoid prefetch of NULL on PA7300LC */ | ||
27 | " extrw,u,= %0,31,32,%%r0\n" | ||
28 | #endif | ||
29 | " ldw 0(%0), %%r0" : : "r" (addr)); | ||
25 | } | 30 | } |
26 | 31 | ||
27 | /* LDD is a PA2.0 addition. */ | 32 | /* LDD is a PA2.0 addition. */ |
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 | ||
5 | extra-y := init_task.o head.o vmlinux.lds | 5 | extra-y := head.o vmlinux.lds |
6 | 6 | ||
7 | obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \ | 7 | obj-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/entry.S b/arch/parisc/kernel/entry.S index 6f0594439143..535034217021 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -581,7 +581,11 @@ | |||
581 | */ | 581 | */ |
582 | cmpiclr,= 0x01,\tmp,%r0 | 582 | cmpiclr,= 0x01,\tmp,%r0 |
583 | ldi (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot | 583 | ldi (_PAGE_DIRTY|_PAGE_READ|_PAGE_WRITE),\prot |
584 | #ifdef CONFIG_64BIT | ||
584 | depd,z \prot,8,7,\prot | 585 | depd,z \prot,8,7,\prot |
586 | #else | ||
587 | depw,z \prot,8,7,\prot | ||
588 | #endif | ||
585 | /* | 589 | /* |
586 | * OK, it is in the temp alias region, check whether "from" or "to". | 590 | * OK, it is in the temp alias region, check whether "from" or "to". |
587 | * Check "subtle" note in pacache.S re: r23/r26. | 591 | * Check "subtle" note in pacache.S re: r23/r26. |
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 | |||
37 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | ||
38 | static 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 | */ | ||
46 | union 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. */ | ||
56 | pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((__section__ (".data..vm0.pmd"), aligned(PAGE_SIZE))); | ||
57 | #endif | ||
58 | |||
59 | pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((__section__ (".data..vm0.pgd"), aligned(PAGE_SIZE))); | ||
60 | pte_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 | */ | ||
67 | EXPORT_SYMBOL(init_task); | ||
68 | |||
69 | __asm__(".data"); | ||
70 | struct task_struct init_task = INIT_TASK(init_task); | ||
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S index 93ff3d90edd1..5d7218ad885c 100644 --- a/arch/parisc/kernel/pacache.S +++ b/arch/parisc/kernel/pacache.S | |||
@@ -692,7 +692,7 @@ ENTRY(flush_icache_page_asm) | |||
692 | 692 | ||
693 | /* Purge any old translation */ | 693 | /* Purge any old translation */ |
694 | 694 | ||
695 | pitlb (%sr0,%r28) | 695 | pitlb (%sr4,%r28) |
696 | 696 | ||
697 | ldil L%icache_stride, %r1 | 697 | ldil L%icache_stride, %r1 |
698 | ldw R%icache_stride(%r1), %r1 | 698 | ldw R%icache_stride(%r1), %r1 |
@@ -706,27 +706,29 @@ ENTRY(flush_icache_page_asm) | |||
706 | sub %r25, %r1, %r25 | 706 | sub %r25, %r1, %r25 |
707 | 707 | ||
708 | 708 | ||
709 | 1: fic,m %r1(%r28) | 709 | /* fic only has the type 26 form on PA1.1, requiring an |
710 | fic,m %r1(%r28) | 710 | * explicit space specification, so use %sr4 */ |
711 | fic,m %r1(%r28) | 711 | 1: fic,m %r1(%sr4,%r28) |
712 | fic,m %r1(%r28) | 712 | fic,m %r1(%sr4,%r28) |
713 | fic,m %r1(%r28) | 713 | fic,m %r1(%sr4,%r28) |
714 | fic,m %r1(%r28) | 714 | fic,m %r1(%sr4,%r28) |
715 | fic,m %r1(%r28) | 715 | fic,m %r1(%sr4,%r28) |
716 | fic,m %r1(%r28) | 716 | fic,m %r1(%sr4,%r28) |
717 | fic,m %r1(%r28) | 717 | fic,m %r1(%sr4,%r28) |
718 | fic,m %r1(%r28) | 718 | fic,m %r1(%sr4,%r28) |
719 | fic,m %r1(%r28) | 719 | fic,m %r1(%sr4,%r28) |
720 | fic,m %r1(%r28) | 720 | fic,m %r1(%sr4,%r28) |
721 | fic,m %r1(%r28) | 721 | fic,m %r1(%sr4,%r28) |
722 | fic,m %r1(%r28) | 722 | fic,m %r1(%sr4,%r28) |
723 | fic,m %r1(%r28) | 723 | fic,m %r1(%sr4,%r28) |
724 | fic,m %r1(%sr4,%r28) | ||
725 | fic,m %r1(%sr4,%r28) | ||
724 | cmpb,COND(<<) %r28, %r25,1b | 726 | cmpb,COND(<<) %r28, %r25,1b |
725 | fic,m %r1(%r28) | 727 | fic,m %r1(%sr4,%r28) |
726 | 728 | ||
727 | sync | 729 | sync |
728 | bv %r0(%r2) | 730 | bv %r0(%r2) |
729 | pitlb (%sr0,%r25) | 731 | pitlb (%sr4,%r25) |
730 | .exit | 732 | .exit |
731 | 733 | ||
732 | .procend | 734 | .procend |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 0bb1d63907f8..a47828d31fe6 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/bitops.h> | 32 | #include <linux/bitops.h> |
33 | #include <linux/ftrace.h> | 33 | #include <linux/ftrace.h> |
34 | #include <linux/cpu.h> | ||
34 | 35 | ||
35 | #include <linux/atomic.h> | 36 | #include <linux/atomic.h> |
36 | #include <asm/current.h> | 37 | #include <asm/current.h> |
@@ -295,8 +296,13 @@ smp_cpu_init(int cpunum) | |||
295 | 296 | ||
296 | printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum); | 297 | printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum); |
297 | machine_halt(); | 298 | machine_halt(); |
298 | } | 299 | } |
300 | |||
301 | notify_cpu_starting(cpunum); | ||
302 | |||
303 | ipi_call_lock(); | ||
299 | set_cpu_online(cpunum, true); | 304 | set_cpu_online(cpunum, true); |
305 | ipi_call_unlock(); | ||
300 | 306 | ||
301 | /* Initialise the idle task for this CPU */ | 307 | /* Initialise the idle task for this CPU */ |
302 | atomic_inc(&init_mm.mm_count); | 308 | atomic_inc(&init_mm.mm_count); |
@@ -334,26 +340,11 @@ void __init smp_callin(void) | |||
334 | /* | 340 | /* |
335 | * Bring one cpu online. | 341 | * Bring one cpu online. |
336 | */ | 342 | */ |
337 | int __cpuinit smp_boot_one_cpu(int cpuid) | 343 | int __cpuinit smp_boot_one_cpu(int cpuid, struct task_struct *idle) |
338 | { | 344 | { |
339 | const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid); | 345 | const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid); |
340 | struct task_struct *idle; | ||
341 | long timeout; | 346 | long timeout; |
342 | 347 | ||
343 | /* | ||
344 | * Create an idle task for this CPU. Note the address wed* give | ||
345 | * to kernel_thread is irrelevant -- it's going to start | ||
346 | * where OS_BOOT_RENDEVZ vector in SAL says to start. But | ||
347 | * this gets all the other task-y sort of data structures set | ||
348 | * up like we wish. We need to pull the just created idle task | ||
349 | * off the run queue and stuff it into the init_tasks[] array. | ||
350 | * Sheesh . . . | ||
351 | */ | ||
352 | |||
353 | idle = fork_idle(cpuid); | ||
354 | if (IS_ERR(idle)) | ||
355 | panic("SMP: fork failed for CPU:%d", cpuid); | ||
356 | |||
357 | task_thread_info(idle)->cpu = cpuid; | 348 | task_thread_info(idle)->cpu = cpuid; |
358 | 349 | ||
359 | /* Let _start know what logical CPU we're booting | 350 | /* Let _start know what logical CPU we're booting |
@@ -397,10 +388,6 @@ int __cpuinit smp_boot_one_cpu(int cpuid) | |||
397 | udelay(100); | 388 | udelay(100); |
398 | barrier(); | 389 | barrier(); |
399 | } | 390 | } |
400 | |||
401 | put_task_struct(idle); | ||
402 | idle = NULL; | ||
403 | |||
404 | printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid); | 391 | printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid); |
405 | return -1; | 392 | return -1; |
406 | 393 | ||
@@ -449,10 +436,10 @@ void smp_cpus_done(unsigned int cpu_max) | |||
449 | } | 436 | } |
450 | 437 | ||
451 | 438 | ||
452 | int __cpuinit __cpu_up(unsigned int cpu) | 439 | int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) |
453 | { | 440 | { |
454 | if (cpu != 0 && cpu < parisc_max_cpus) | 441 | if (cpu != 0 && cpu < parisc_max_cpus) |
455 | smp_boot_one_cpu(cpu); | 442 | smp_boot_one_cpu(cpu, tidle); |
456 | 443 | ||
457 | return cpu_online(cpu) ? 0 : -ENOSYS; | 444 | return cpu_online(cpu) ? 0 : -ENOSYS; |
458 | } | 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 | ||
34 | extern int data_start; | 34 | extern 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. */ | ||
42 | pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((__section__ (".data..vm0.pmd"), aligned(PAGE_SIZE))); | ||
43 | #endif | ||
44 | |||
45 | pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((__section__ (".data..vm0.pgd"), aligned(PAGE_SIZE))); | ||
46 | pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((__section__ (".data..vm0.pte"), aligned(PAGE_SIZE))); | ||
47 | |||
36 | #ifdef CONFIG_DISCONTIGMEM | 48 | #ifdef CONFIG_DISCONTIGMEM |
37 | struct node_map_data node_data[MAX_NUMNODES] __read_mostly; | 49 | struct node_map_data node_data[MAX_NUMNODES] __read_mostly; |
38 | unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly; | 50 | unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly; |