From ce3ad2275bf7856c5f177a5b391cdc0c731be295 Mon Sep 17 00:00:00 2001 From: bjh21 Date: Tue, 13 Mar 2001 23:51:48 +0000 Subject: [PATCH] Update FPU detection to use remove_coproc_handler(). --- sys/arch/arm/mainbus/cpu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/arch/arm/mainbus/cpu.c b/sys/arch/arm/mainbus/cpu.c index 77e0cdeb9ac2..9facebc3c999 100644 --- a/sys/arch/arm/mainbus/cpu.c +++ b/sys/arch/arm/mainbus/cpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.15 2001/03/11 15:05:43 bjh21 Exp $ */ +/* $NetBSD: cpu.c,v 1.16 2001/03/13 23:51:48 bjh21 Exp $ */ /* * Copyright (c) 1995 Mark Brinicombe. @@ -171,6 +171,7 @@ identify_master_cpu(sc, cpu_number) int cpu_number; { u_int fpsr; + void *uh; cpus[cpu_number].cpu_ctrl = cpuctrl; @@ -226,12 +227,14 @@ identify_master_cpu(sc, cpu_number) * FP status register for identification. */ - install_coproc_handler(FP_COPROC, fpa_test); + uh = install_coproc_handler(FP_COPROC, fpa_test); undefined_test = 0; __asm __volatile("stmfd sp!, {r0}; .word 0xee300110; mov %0, r0; ldmfd sp!, {r0}" : "=r" (fpsr)); + remove_coproc_handler(uh); + if (undefined_test == 0) { cpus[cpu_number].fpu_type = (fpsr >> 24); switch (fpsr >> 24) {