diff options
author | Kyle McMartin <kyle@mcmartin.ca> | 2007-10-18 03:04:56 -0400 |
---|---|---|
committer | Kyle McMartin <kyle@shortfin.cabal.ca> | 2007-10-18 03:59:31 -0400 |
commit | 6cc4525d29e22ab831387b6fac371e0118693a25 (patch) | |
tree | 7a748cfdcaf540e31682ed6c50dbdfc6f18bc42b | |
parent | 873d50e2e56741406ff9d68c275f0c560e896a80 (diff) |
[PARISC] Kill off broken irqstack code
It's been unfinished and broken long enough, and I have some ideas on how
to do it more cleanly.
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
-rw-r--r-- | arch/parisc/kernel/entry.S | 37 | ||||
-rw-r--r-- | arch/parisc/kernel/head.S | 4 | ||||
-rw-r--r-- | arch/parisc/kernel/init_task.c | 1 | ||||
-rw-r--r-- | arch/parisc/kernel/smp.c | 12 | ||||
-rw-r--r-- | arch/parisc/kernel/vmlinux.lds.S | 8 | ||||
-rw-r--r-- | include/asm-parisc/pgtable.h | 8 |
6 files changed, 3 insertions, 67 deletions
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index f324939bb9af..111d47284eac 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -98,7 +98,6 @@ | |||
98 | * The "get_stack" macros are responsible for determining the | 98 | * The "get_stack" macros are responsible for determining the |
99 | * kernel stack value. | 99 | * kernel stack value. |
100 | * | 100 | * |
101 | * For Faults: | ||
102 | * If sr7 == 0 | 101 | * If sr7 == 0 |
103 | * Already using a kernel stack, so call the | 102 | * Already using a kernel stack, so call the |
104 | * get_stack_use_r30 macro to push a pt_regs structure | 103 | * get_stack_use_r30 macro to push a pt_regs structure |
@@ -110,26 +109,6 @@ | |||
110 | * task pointer pointed to by cr30. Set the stack | 109 | * task pointer pointed to by cr30. Set the stack |
111 | * pointer to point to the end of the task structure. | 110 | * pointer to point to the end of the task structure. |
112 | * | 111 | * |
113 | * For Interrupts: | ||
114 | * If sr7 == 0 | ||
115 | * Already using a kernel stack, check to see if r30 | ||
116 | * is already pointing to the per processor interrupt | ||
117 | * stack. If it is, call the get_stack_use_r30 macro | ||
118 | * to push a pt_regs structure on the stack, and store | ||
119 | * registers there. Otherwise, call get_stack_use_cr31 | ||
120 | * to get a pointer to the base of the interrupt stack | ||
121 | * and push a pt_regs structure on that stack. | ||
122 | * else | ||
123 | * Need to set up a kernel stack, so call the | ||
124 | * get_stack_use_cr30 macro to set up a pointer | ||
125 | * to the pt_regs structure contained within the | ||
126 | * task pointer pointed to by cr30. Set the stack | ||
127 | * pointer to point to the end of the task structure. | ||
128 | * N.B: We don't use the interrupt stack for the | ||
129 | * first interrupt from userland, because signals/ | ||
130 | * resched's are processed when returning to userland, | ||
131 | * and we can sleep in those cases. | ||
132 | * | ||
133 | * Note that we use shadowed registers for temps until | 112 | * Note that we use shadowed registers for temps until |
134 | * we can save %r26 and %r29. %r26 is used to preserve | 113 | * we can save %r26 and %r29. %r26 is used to preserve |
135 | * %r8 (a shadowed register) which temporarily contained | 114 | * %r8 (a shadowed register) which temporarily contained |
@@ -1086,23 +1065,13 @@ intr_do_preempt: | |||
1086 | 1065 | ||
1087 | intr_extint: | 1066 | intr_extint: |
1088 | CMPIB=,n 0,%r16,1f | 1067 | CMPIB=,n 0,%r16,1f |
1068 | |||
1089 | get_stack_use_cr30 | 1069 | get_stack_use_cr30 |
1090 | b,n 3f | 1070 | b,n 2f |
1091 | 1071 | ||
1092 | 1: | 1072 | 1: |
1093 | #if 0 /* Interrupt Stack support not working yet! */ | ||
1094 | mfctl %cr31,%r1 | ||
1095 | copy %r30,%r17 | ||
1096 | /* FIXME! depi below has hardcoded idea of interrupt stack size (32k)*/ | ||
1097 | DEPI 0,31,15,%r17 | ||
1098 | CMPB=,n %r1,%r17,2f | ||
1099 | get_stack_use_cr31 | ||
1100 | b,n 3f | ||
1101 | #endif | ||
1102 | 2: | ||
1103 | get_stack_use_r30 | 1073 | get_stack_use_r30 |
1104 | 1074 | 2: | |
1105 | 3: | ||
1106 | save_specials %r29 | 1075 | save_specials %r29 |
1107 | virt_map | 1076 | virt_map |
1108 | save_general %r29 | 1077 | save_general %r29 |
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index 369919d828fb..a7b8859488bb 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S | |||
@@ -128,10 +128,6 @@ $pgt_fill_loop: | |||
128 | /* And the stack pointer too */ | 128 | /* And the stack pointer too */ |
129 | ldo THREAD_SZ_ALGN(%r6),%sp | 129 | ldo THREAD_SZ_ALGN(%r6),%sp |
130 | 130 | ||
131 | /* And the interrupt stack */ | ||
132 | load32 interrupt_stack,%r6 | ||
133 | mtctl %r6,%cr31 | ||
134 | |||
135 | #ifdef CONFIG_SMP | 131 | #ifdef CONFIG_SMP |
136 | /* Set the smp rendevous address into page zero. | 132 | /* Set the smp rendevous address into page zero. |
137 | ** It would be safer to do this in init_smp_config() but | 133 | ** It would be safer to do this in init_smp_config() but |
diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c index 3b2f7d395bde..26198a074d67 100644 --- a/arch/parisc/kernel/init_task.c +++ b/arch/parisc/kernel/init_task.c | |||
@@ -49,7 +49,6 @@ EXPORT_SYMBOL(init_mm); | |||
49 | * way process stacks are handled. This is done by having a special | 49 | * way process stacks are handled. This is done by having a special |
50 | * "init_task" linker map entry.. | 50 | * "init_task" linker map entry.. |
51 | */ | 51 | */ |
52 | unsigned char interrupt_stack[ISTACK_SIZE] __attribute__ ((section("init_istack"), aligned(PAGE_SIZE))); | ||
53 | union thread_union init_thread_union | 52 | union thread_union init_thread_union |
54 | __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) = | 53 | __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) = |
55 | { INIT_THREAD_INFO(init_task) }; | 54 | { INIT_THREAD_INFO(init_task) }; |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index d7bc7bb42c94..85fc7754ec25 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -432,22 +432,10 @@ smp_cpu_init(int cpunum) | |||
432 | void __init smp_callin(void) | 432 | void __init smp_callin(void) |
433 | { | 433 | { |
434 | int slave_id = cpu_now_booting; | 434 | int slave_id = cpu_now_booting; |
435 | #if 0 | ||
436 | void *istack; | ||
437 | #endif | ||
438 | 435 | ||
439 | smp_cpu_init(slave_id); | 436 | smp_cpu_init(slave_id); |
440 | preempt_disable(); | 437 | preempt_disable(); |
441 | 438 | ||
442 | #if 0 /* NOT WORKING YET - see entry.S */ | ||
443 | istack = (void *)__get_free_pages(GFP_KERNEL,ISTACK_ORDER); | ||
444 | if (istack == NULL) { | ||
445 | printk(KERN_CRIT "Failed to allocate interrupt stack for cpu %d\n",slave_id); | ||
446 | BUG(); | ||
447 | } | ||
448 | mtctl(istack,31); | ||
449 | #endif | ||
450 | |||
451 | flush_cache_all_local(); /* start with known state */ | 439 | flush_cache_all_local(); /* start with known state */ |
452 | flush_tlb_all_local(NULL); | 440 | flush_tlb_all_local(NULL); |
453 | 441 | ||
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index d6dbcbcdcc2e..40d0ff9b81ab 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S | |||
@@ -153,14 +153,6 @@ SECTIONS | |||
153 | *(.data.init_task) | 153 | *(.data.init_task) |
154 | } | 154 | } |
155 | 155 | ||
156 | /* The interrupt stack is currently partially coded, but not yet | ||
157 | * implemented | ||
158 | */ | ||
159 | . = ALIGN(16384); | ||
160 | init_istack : { | ||
161 | *(init_istack) | ||
162 | } | ||
163 | |||
164 | #ifdef CONFIG_64BIT | 156 | #ifdef CONFIG_64BIT |
165 | . = ALIGN(16); | 157 | . = ALIGN(16); |
166 | /* Linkage tables */ | 158 | /* Linkage tables */ |
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index 33ed0e73227b..b5a8797dcc5c 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h | |||
@@ -49,14 +49,6 @@ | |||
49 | #define pgd_ERROR(e) \ | 49 | #define pgd_ERROR(e) \ |
50 | printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e)) | 50 | printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e)) |
51 | 51 | ||
52 | /* Note: If you change ISTACK_SIZE, you need to change the corresponding | ||
53 | * values in vmlinux.lds and vmlinux64.lds (init_istack section). Also, | ||
54 | * the "order" and size need to agree. | ||
55 | */ | ||
56 | |||
57 | #define ISTACK_SIZE 32768 /* Interrupt Stack Size */ | ||
58 | #define ISTACK_ORDER 3 | ||
59 | |||
60 | /* This is the size of the initially mapped kernel memory */ | 52 | /* This is the size of the initially mapped kernel memory */ |
61 | #ifdef CONFIG_64BIT | 53 | #ifdef CONFIG_64BIT |
62 | #define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */ | 54 | #define KERNEL_INITIAL_ORDER 24 /* 0 to 1<<24 = 16MB */ |