[BACK]Return to pic.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / x86 / include

File: [cvs.NetBSD.org] / src / sys / arch / x86 / include / pic.h (download)

Revision 1.3, Mon Mar 12 18:34:22 2007 UTC (17 years ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, yamt-idlelwp-base8, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, vmlocking-base, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, reinoud-bufcleanup, ppcoea-renovation-base, ppcoea-renovation, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, mjf-ufs-trans, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, jmcneill-pm-base, jmcneill-pm, jmcneill-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs, matt-armv6, bouyer-xeni386
Changes since 1.2: +2 -2 lines

Include sys/simplelock.h, not lock.h.

/*	$NetBSD: pic.h,v 1.3 2007/03/12 18:34:22 ad Exp $	*/

#ifndef _X86_PIC_H
#define _X86_PIC_H

#include <sys/device.h>
#include <sys/simplelock.h>

struct cpu_info;

/* 
 * Structure common to all PIC softcs
 */
struct pic {
	struct device pic_dev;
        int pic_type;
	int pic_vecbase;
	int pic_apicid;
	__cpu_simple_lock_t pic_lock;
        void (*pic_hwmask)(struct pic *, int);
        void (*pic_hwunmask)(struct pic *, int);
	void (*pic_addroute)(struct pic *, struct cpu_info *, int, int, int);
	void (*pic_delroute)(struct pic *, struct cpu_info *, int, int, int);
	struct intrstub *pic_level_stubs;
	struct intrstub *pic_edge_stubs;
};

#define pic_name pic_dev.dv_xname

/*
 * PIC types.
 */
#define PIC_I8259	0
#define PIC_IOAPIC	1
#define PIC_LAPIC	2
#define PIC_SOFT	3

extern struct pic i8259_pic;
extern struct pic local_pic;
extern struct pic softintr_pic;
#endif