Skip to content

Commit 2c1cfb2

Browse files
sravnborgdavem330
authored andcommitted
sparc32: drop sun4c support
Machines with sun4c support are very rare these days, and noone is using them for any practical purposes. The sun4c support has been know broken for quite some time too. So rather than trying to keep it up-to-date, lets get rid of it. This allows us to do some very welcome cleanup of sparc32 support. Updated the former sun4c specifc nmi (which was also used for sun4m UP) to be a generic UP NMI. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent aa6f079 commit 2c1cfb2

13 files changed

Lines changed: 11 additions & 2514 deletions

File tree

‎arch/sparc/include/asm/head_32.h‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,6 @@
8080
#define TRAP_ENTRY_INTERRUPT(int_level) \
8181
mov int_level, %l7; rd %psr, %l0; b real_irq_entry; rd %wim, %l3;
8282

83-
/* NMI's (Non Maskable Interrupts) are special, you can't keep them
84-
* from coming in, and basically if you get one, the shows over. ;(
85-
* On the sun4c they are usually asynchronous memory errors, on the
86-
* the sun4m they could be either due to mem errors or a software
87-
* initiated interrupt from the prom/kern on an SMP box saying "I
88-
* command you to do CPU tricks, read your mailbox for more info."
89-
*/
90-
#define NMI_TRAP \
91-
rd %wim, %l3; b linux_trap_nmi_sun4c; mov %psr, %l0; nop;
92-
9383
/* Window overflows/underflows are special and we need to try to be as
9484
* efficient as possible here....
9585
*/

‎arch/sparc/include/asm/oplib_32.h‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,6 @@ extern void prom_write(const char *buf, unsigned int len);
105105
extern int prom_startcpu(int cpunode, struct linux_prom_registers *context_table,
106106
int context, char *program_counter);
107107

108-
/* Sun4/sun4c specific memory-management startup hook. */
109-
110-
/* Map the passed segment in the given context at the passed
111-
* virtual address.
112-
*/
113-
extern void prom_putsegment(int context, unsigned long virt_addr,
114-
int physical_segment);
115-
116108
/* Initialize the memory lists based upon the prom version. */
117109
void prom_meminit(void);
118110

‎arch/sparc/kernel/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ obj-y += traps_$(BITS).o
2828

2929
# IRQ
3030
obj-y += irq_$(BITS).o
31-
obj-$(CONFIG_SPARC32) += sun4m_irq.o sun4c_irq.o sun4d_irq.o
31+
obj-$(CONFIG_SPARC32) += sun4m_irq.o sun4d_irq.o
3232

3333
obj-y += process_$(BITS).o
3434
obj-y += signal_$(BITS).o

‎arch/sparc/kernel/entry.S‎

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ maybe_smp4m_msg_out:
317317
RESTORE_ALL
318318

319319
.align 4
320-
.globl linux_trap_ipi15_sun4m
321-
linux_trap_ipi15_sun4m:
320+
.globl linux_trap_ipi15
321+
linux_trap_ipi15:
322322
SAVE_ALL
323323
sethi %hi(0x80000000), %o2
324324
GET_PROCESSOR4M_ID(o0)
@@ -760,20 +760,12 @@ setcc_trap_handler:
760760
jmp %l2 ! advance over trap instruction
761761
rett %l2 + 0x4 ! like this...
762762

763+
#ifndef CONFIG_SMP
763764
.align 4
764-
.globl linux_trap_nmi_sun4c
765-
linux_trap_nmi_sun4c:
765+
.globl linux_trap_ipi15
766+
linux_trap_ipi15:
766767
SAVE_ALL
767768

768-
/* Ugh, we need to clear the IRQ line. This is now
769-
* a very sun4c specific trap handler...
770-
*/
771-
sethi %hi(interrupt_enable), %l5
772-
ld [%l5 + %lo(interrupt_enable)], %l5
773-
ldub [%l5], %l6
774-
andn %l6, INTS_ENAB, %l6
775-
stb %l6, [%l5]
776-
777769
/* Now it is safe to re-enable traps without recursion. */
778770
or %l0, PSR_PIL, %l0
779771
wr %l0, PSR_ET, %psr
@@ -797,6 +789,8 @@ linux_trap_nmi_sun4c:
797789

798790
RESTORE_ALL
799791

792+
#endif /* CONFIG_SMP */
793+
800794
.align 4
801795
.globl invalid_segment_patch1_ff
802796
.globl invalid_segment_patch2_ff

‎arch/sparc/kernel/head_32.S‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,8 @@ t_irq12:TRAP_ENTRY_INTERRUPT(12) /* IRQ Zilog serial chip */
111111
t_irq13:TRAP_ENTRY_INTERRUPT(13) /* IRQ Audio Intr. */
112112
t_irq14:TRAP_ENTRY_INTERRUPT(14) /* IRQ Timer #2 */
113113
.globl t_nmi
114-
#ifndef CONFIG_SMP
115-
t_nmi: NMI_TRAP /* Level 15 (NMI) */
116-
#else
117-
t_nmi: TRAP_ENTRY(0x1f, linux_trap_ipi15_sun4m)
118-
#endif
114+
t_nmi: TRAP_ENTRY(0x1f, linux_trap_ipi15)
115+
119116
t_racc: TRAP_ENTRY(0x20, do_reg_access) /* General Register Access Error */
120117
t_iacce:BAD_TRAP(0x21) /* Instr Access Error */
121118
t_bad22:BAD_TRAP(0x22) BAD_TRAP(0x23)

‎arch/sparc/kernel/irq_32.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,6 @@ void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
346346
void __init init_IRQ(void)
347347
{
348348
switch (sparc_cpu_model) {
349-
case sun4c:
350-
case sun4:
351-
sun4c_init_IRQ();
352-
break;
353-
354349
case sun4m:
355350
pcic_probe();
356351
if (pcic_present())

‎arch/sparc/kernel/kernel.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ extern spinlock_t irq_action_lock;
4343
extern void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs);
4444
extern void init_IRQ(void);
4545

46-
/* sun4c_irq.c */
47-
extern void sun4c_init_IRQ(void);
48-
4946
/* sun4m_irq.c */
5047
extern void sun4m_init_IRQ(void);
5148
extern void sun4m_unmask_profile_irq(void);

‎arch/sparc/kernel/process_32.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void cpu_idle(void)
100100
printk("kernel faults / second = %ld\n", fps);
101101
#endif
102102
if (fps >= SUN4C_FAULT_HIGH) {
103-
sun4c_grow_kernel_ring();
103+
/*sun4c_grow_kernel_ring();*/
104104
}
105105
}
106106
local_irq_enable();

‎arch/sparc/kernel/sun4c_irq.c‎

Lines changed: 0 additions & 269 deletions
This file was deleted.

0 commit comments

Comments
 (0)