From fdc132c9222157ec25162ec99d7f0e230b0c44ef Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 29 Apr 2024 00:29:48 +0000 Subject: [PATCH] remove unused global vars ok deraadt@ miod@ --- sys/arch/amd64/amd64/machdep.c | 5 +---- sys/arch/i386/i386/machdep.c | 7 +------ sys/arch/i386/isa/npx.c | 10 +--------- sys/arch/i386/pci/pcibios.c | 5 +---- sys/dev/ic/ac97.c | 13 +------------ sys/netmpls/mpls_raw.c | 4 +--- 6 files changed, 6 insertions(+), 38 deletions(-) diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 7bf57a406cd..343cc0f7e52 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.292 2024/04/03 02:01:21 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.293 2024/04/29 00:29:48 jsg Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -178,10 +178,7 @@ int biosbasemem = 0; /* base memory reported by BIOS */ u_int bootapiver = 0; /* /boot API version */ int physmem; -u_int64_t dumpmem_low; -u_int64_t dumpmem_high; extern int boothowto; -int cpu_class; paddr_t dumpmem_paddr; vaddr_t dumpmem_vaddr; diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 2599def386c..c7edd204796 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.669 2023/08/23 01:55:46 cheloha Exp $ */ +/* $OpenBSD: machdep.c,v 1.670 2024/04/29 00:29:48 jsg Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -191,9 +191,6 @@ int dumpsize = 0; /* pages */ long dumplo = 0; /* blocks */ int cpu_class; -int i386_fpu_present; -int i386_fpu_exception; -int i386_fpu_fdivbug; int i386_use_fxsave; int i386_has_sse; @@ -207,7 +204,6 @@ struct vm_map *exec_map = NULL; struct vm_map *phys_map = NULL; #if !defined(SMALL_KERNEL) -int p4_model; int p3_early; void (*update_cpuspeed)(void) = NULL; void via_update_sensor(void *args); @@ -1547,7 +1543,6 @@ intel686_p4_cpu_setup(struct cpu_info *ci) intel686_common_cpu_setup(ci); #if !defined(SMALL_KERNEL) - p4_model = (ci->ci_signature >> 4) & 15; update_cpuspeed = p4_update_cpuspeed; #endif } diff --git a/sys/arch/i386/isa/npx.c b/sys/arch/i386/isa/npx.c index 5e354d5d625..2259437beec 100644 --- a/sys/arch/i386/isa/npx.c +++ b/sys/arch/i386/isa/npx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npx.c,v 1.74 2023/01/30 10:49:05 jsg Exp $ */ +/* $OpenBSD: npx.c,v 1.75 2024/04/29 00:29:48 jsg Exp $ */ /* $NetBSD: npx.c,v 1.57 1996/05/12 23:12:24 mycroft Exp $ */ #if 0 @@ -132,10 +132,6 @@ static volatile u_int npx_intrs_while_probing static volatile u_int npx_traps_while_probing __attribute__((section(".kudata"))); -extern int i386_fpu_present; -extern int i386_fpu_exception; -extern int i386_fpu_fdivbug; - #define fxsave(addr) __asm("fxsave %0" : "=m" (*addr)) #define fxrstor(addr) __asm("fxrstor %0" : : "m" (*addr)) #define ldmxcsr(addr) __asm("ldmxcsr %0" : : "m" (*addr)) @@ -235,7 +231,6 @@ npxprobe1(struct isa_attach_args *ia) */ npx_type = NPX_EXCEPTION; ia->ia_irq = IRQUNK; /* zap the interrupt */ - i386_fpu_exception = 1; } else if (npx_intrs_while_probing != 0) { /* * Bad, we are stuck with IRQ13. @@ -278,7 +273,6 @@ npxprobe(struct device *parent, void *match, void *aux) if (cpu_feature & CPUID_FPU) { npx_type = NPX_CPUID; - i386_fpu_exception = 1; ia->ia_irq = IRQUNK; /* Don't want the interrupt vector */ ia->ia_iosize = 16; ia->ia_msize = 0; @@ -348,7 +342,6 @@ npxinit(struct cpu_info *ci) lcr0(rcr0() & ~(CR0_EM|CR0_TS)); fninit(); if (npx586bug1(4195835, 3145727) != 0) { - i386_fpu_fdivbug = 1; printf("%s: WARNING: Pentium FDIV bug detected!\n", ci->ci_dev->dv_xname); } @@ -397,7 +390,6 @@ npxattach(struct device *parent, struct device *self, void *aux) } npxinit(&cpu_info_primary); - i386_fpu_present = 1; if (i386_use_fxsave) npxdna_func = npxdna_xmm; diff --git a/sys/arch/i386/pci/pcibios.c b/sys/arch/i386/pci/pcibios.c index 36f19fbfd31..20bf472d420 100644 --- a/sys/arch/i386/pci/pcibios.c +++ b/sys/arch/i386/pci/pcibios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcibios.c,v 1.49 2022/02/21 10:24:28 mpi Exp $ */ +/* $OpenBSD: pcibios.c,v 1.50 2024/04/29 00:29:48 jsg Exp $ */ /* $NetBSD: pcibios.c,v 1.5 2000/08/01 05:23:59 uch Exp $ */ /* @@ -101,7 +101,6 @@ #include int pcibios_flags; -int pcibios_present; struct pcibios_pir_header pcibios_pir_header; struct pcibios_intr_routing *pcibios_pir_table; @@ -187,8 +186,6 @@ pcibiosattach(struct device *parent, struct device *self, void *aux) */ pci_mode = mech1 ? 1 : 2; - pcibios_present = 1; - /* * Find the PCI IRQ Routing table. */ diff --git a/sys/dev/ic/ac97.c b/sys/dev/ic/ac97.c index 89b82a9fee5..c8ab7ea30d1 100644 --- a/sys/dev/ic/ac97.c +++ b/sys/dev/ic/ac97.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ac97.c,v 1.84 2018/04/11 04:48:31 ratchov Exp $ */ +/* $OpenBSD: ac97.c,v 1.85 2024/04/29 00:29:48 jsg Exp $ */ /* * Copyright (c) 1999, 2000 Constantine Sapuntzakis @@ -69,17 +69,6 @@ #include #include - -/* default parameters; supported by all ac97 codecs */ -const struct audio_params ac97_audio_default = { - 48000, /* sample_rate */ - AUDIO_ENCODING_SLINEAR_LE, /* encoding */ - 16, /* precision */ - 2, /* bps */ - 1, /* msb */ - 2 /* channels */ -}; - const struct audio_mixer_enum ac97_on_off = { 2, { { { AudioNoff } , 0 }, diff --git a/sys/netmpls/mpls_raw.c b/sys/netmpls/mpls_raw.c index 8aaaf757cde..a297ead23c6 100644 --- a/sys/netmpls/mpls_raw.c +++ b/sys/netmpls/mpls_raw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpls_raw.c,v 1.19 2022/02/22 01:15:02 guenther Exp $ */ +/* $OpenBSD: mpls_raw.c,v 1.20 2024/04/29 00:29:48 jsg Exp $ */ /* * Copyright (C) 1999, 2000 and 2001 AYAME Project, WIDE Project. @@ -45,8 +45,6 @@ #include int mpls_defttl = 255; -int mpls_push_expnull_ip = 0; -int mpls_push_expnull_ip6 = 0; int mpls_mapttl_ip = 1; int mpls_mapttl_ip6 = 0; -- 2.20.1