Skip to content

Commit a210886

Browse files
committed
intrcompat: move pic_base_class declaration to sys/interrupt.h
As all FreeBSD architectures provide a PIC base class, move the declaration to the common header.
1 parent 3ec348f commit a210886

File tree

4 files changed

+15
-18
lines changed

4 files changed

+15
-18
lines changed

sys/powerpc/include/interrupt.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,12 @@
3232

3333
typedef struct powerpc_intr interrupt_t;
3434

35+
#include <sys/interrupt.h>
36+
3537
/* FreeBSD standard interrupt controller interface */
3638

37-
#include <sys/_cpuset.h>
38-
#include <sys/interrupt.h>
39-
#include <sys/kobj.h>
4039
#include <sys/types.h>
4140

42-
DECLARE_CLASS(pic_base_class);
43-
4441
#define INTR_VECTORS 256
4542

4643
#define MAX_PICS 32
@@ -53,9 +50,6 @@ DECLARE_CLASS(pic_base_class);
5350

5451
extern device_t root_pic;
5552

56-
struct trapframe;
57-
struct intr_handler;
58-
5953
/* Main interrupt structure, exported to allow fast read access for PICs */
6054
struct powerpc_intr {
6155
struct intr_event event;

sys/sys/interrupt.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,23 @@
3030
#define _SYS_INTERRUPT_H_
3131
#ifdef _KERNEL
3232

33+
#include <sys/_cpuset.h>
3334
#include <sys/_interrupt.h>
3435
#include <sys/_lock.h>
3536
#include <sys/ck.h>
37+
#include <sys/kobj.h>
3638
#include <sys/mutex.h>
3739
#include <sys/param.h>
3840
#include <sys/queue.h>
3941
#include <sys/types.h>
4042

43+
/*
44+
* Common base class for PICs. All FreeBSD architectures provide this,
45+
* so present in this header.
46+
*/
47+
48+
DECLARE_CLASS(pic_base_class);
49+
4150
struct intr_event;
4251
struct intr_thread;
4352
struct trapframe;

sys/sys/intr.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,12 @@
4141

4242
typedef struct intr_irqsrc interrupt_t;
4343

44+
#include <sys/interrupt.h>
45+
4446
/* FreeBSD standard interrupt controller interface */
4547

46-
#include <sys/_cpuset.h>
47-
#include <sys/interrupt.h>
48-
#include <sys/kobj.h>
4948
#include <sys/types.h>
5049

51-
DECLARE_CLASS(pic_base_class);
52-
5350
#define INTR_IRQ_INVALID 0xFFFFFFFF
5451

5552
#ifndef LOCORE

sys/x86/include/interrupt.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,12 @@
3434

3535
typedef struct intsrc interrupt_t;
3636

37+
#include <sys/interrupt.h>
38+
3739
/* FreeBSD standard interrupt controller interface */
3840

39-
#include <sys/_cpuset.h>
40-
#include <sys/interrupt.h>
41-
#include <sys/kobj.h>
4241
#include <sys/types.h>
4342

44-
DECLARE_CLASS(pic_base_class);
45-
4643
typedef struct { device_t next, prev; } pic_base_softc_t;
4744

4845
/*

0 commit comments

Comments
 (0)