Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Move the variable into the section that use...



details:   https://anonhg.NetBSD.org/src/rev/e6fafe2795a5
branches:  trunk
changeset: 1029142:e6fafe2795a5
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Thu Dec 23 02:45:43 2021 +0000

description:
Move the variable into the section that uses it

diffstat:

 sys/arch/x86/x86/intr.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 1a64e4987f32 -r e6fafe2795a5 sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c   Thu Dec 23 02:10:53 2021 +0000
+++ b/sys/arch/x86/x86/intr.c   Thu Dec 23 02:45:43 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.158 2021/12/23 02:10:53 yamaguchi Exp $     */
+/*     $NetBSD: intr.c,v 1.159 2021/12/23 02:45:43 yamaguchi Exp $     */
 
 /*
  * Copyright (c) 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.158 2021/12/23 02:10:53 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.159 2021/12/23 02:45:43 yamaguchi Exp $");
 
 #include "opt_intrdebug.h"
 #include "opt_multiprocessor.h"
@@ -508,7 +508,6 @@
        struct cpu_info *ci, *lci;
        struct intrsource *isp;
        int slot = 0, idtvec, error;
-       struct idt_vec *iv;
 
        KASSERT(mutex_owned(&cpu_lock));
 
@@ -606,6 +605,8 @@
                 * are used by a device using MSI multiple vectors must be
                 * continuous.
                 */
+               struct idt_vec *iv;
+
                iv = idt_vec_ref(&ci->ci_idtvec);
                idtvec = idt_vec_alloc(iv, APIC_LEVEL(level), IDT_INTR_HIGH);
        }



Home | Main Index | Thread Index | Old Index