From owner-svn-src-all@FreeBSD.ORG Sun Jun 7 22:52:49 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D962106564A; Sun, 7 Jun 2009 22:52:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 310D18FC0C; Sun, 7 Jun 2009 22:52:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n57Mqn4R008025; Sun, 7 Jun 2009 22:52:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n57Mqn9d008024; Sun, 7 Jun 2009 22:52:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200906072252.n57Mqn9d008024@svn.freebsd.org> From: Adrian Chadd Date: Sun, 7 Jun 2009 22:52:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193662 - head/sys/i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 22:52:49 -0000 Author: adrian Date: Sun Jun 7 22:52:48 2009 New Revision: 193662 URL: http://svn.freebsd.org/changeset/base/193662 Log: Decouple the i386 native and i386 Xen APIC definitions a little further. I'm experimenting locally with xen APIC emulation a bit and this makes it easier to migrate APIC entries between being bitmapped and not being bitmapped. Modified: head/sys/i386/include/apicvar.h Modified: head/sys/i386/include/apicvar.h ============================================================================== --- head/sys/i386/include/apicvar.h Sun Jun 7 22:52:19 2009 (r193661) +++ head/sys/i386/include/apicvar.h Sun Jun 7 22:52:48 2009 (r193662) @@ -108,12 +108,13 @@ */ /* Interrupts for local APIC LVT entries other than the timer. */ +#ifdef XEN +/* These are the Xen i386 APIC definitions */ #define APIC_LOCAL_INTS 240 #define APIC_ERROR_INT APIC_LOCAL_INTS #define APIC_THERMAL_INT (APIC_LOCAL_INTS + 1) - #define APIC_IPI_INTS (APIC_LOCAL_INTS + 2) -#ifdef XEN + #define IPI_RENDEZVOUS (APIC_IPI_INTS) /* Inter-CPU rendezvous. */ #define IPI_INVLTLB (APIC_IPI_INTS + 1) /* TLB Shootdown IPIs */ #define IPI_INVLPG (APIC_IPI_INTS + 2) @@ -123,7 +124,24 @@ /* Vector to handle bitmap based IPIs */ #define IPI_BITMAP_VECTOR (APIC_IPI_INTS + 6) -#else +/* IPIs handled by IPI_BITMAPED_VECTOR (XXX ups is there a better place?) */ +#define IPI_AST 0 /* Generate software trap. */ +#define IPI_PREEMPT 1 +#define IPI_HARDCLOCK 2 +#define IPI_STATCLOCK 3 +#define IPI_PROFCLOCK 4 +#define IPI_BITMAP_LAST IPI_PROFCLOCK +#define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) + +#define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ + +#else /* XEN */ +/* These are the normal i386 APIC definitions */ +#define APIC_LOCAL_INTS 240 +#define APIC_ERROR_INT APIC_LOCAL_INTS +#define APIC_THERMAL_INT (APIC_LOCAL_INTS + 1) +#define APIC_IPI_INTS (APIC_LOCAL_INTS + 2) + #define IPI_RENDEZVOUS (APIC_IPI_INTS) /* Inter-CPU rendezvous. */ #define IPI_INVLTLB (APIC_IPI_INTS + 1) /* TLB Shootdown IPIs */ #define IPI_INVLPG (APIC_IPI_INTS + 2) @@ -132,7 +150,6 @@ #define IPI_LAZYPMAP (APIC_IPI_INTS + 5) /* Lazy pmap release. */ /* Vector to handle bitmap based IPIs */ #define IPI_BITMAP_VECTOR (APIC_IPI_INTS + 6) -#endif /* IPIs handled by IPI_BITMAPED_VECTOR (XXX ups is there a better place?) */ #define IPI_AST 0 /* Generate software trap. */ @@ -144,6 +161,7 @@ #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ +#endif /* XEN */ /* * The spurious interrupt can share the priority class with the IPIs since