~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/x86/include/asm/io_apic.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        } __attribute__ ((packed)) bits;
64
64
};
65
65
 
66
 
enum ioapic_irq_destination_types {
67
 
        dest_Fixed = 0,
68
 
        dest_LowestPrio = 1,
69
 
        dest_SMI = 2,
70
 
        dest__reserved_1 = 3,
71
 
        dest_NMI = 4,
72
 
        dest_INIT = 5,
73
 
        dest__reserved_2 = 6,
74
 
        dest_ExtINT = 7
75
 
};
76
 
 
77
66
struct IO_APIC_route_entry {
78
67
        __u32   vector          :  8,
79
68
                delivery_mode   :  3,   /* 000: FIXED
106
95
                index           : 15;
107
96
} __attribute__ ((packed));
108
97
 
 
98
#define IOAPIC_AUTO     -1
 
99
#define IOAPIC_EDGE     0
 
100
#define IOAPIC_LEVEL    1
 
101
 
109
102
#ifdef CONFIG_X86_IO_APIC
110
103
 
111
104
/*
112
105
 * # of IO-APICs and # of IRQ routing registers
113
106
 */
114
107
extern int nr_ioapics;
115
 
extern int nr_ioapic_registers[MAX_IO_APICS];
 
108
 
 
109
extern int mpc_ioapic_id(int ioapic);
 
110
extern unsigned int mpc_ioapic_addr(int ioapic);
 
111
extern struct mp_ioapic_gsi *mp_ioapic_gsi_routing(int ioapic);
116
112
 
117
113
#define MP_MAX_IOAPIC_PIN 127
118
114
 
119
 
/* I/O APIC entries */
120
 
extern struct mpc_ioapic mp_ioapics[MAX_IO_APICS];
121
 
 
122
115
/* # of MP IRQ source entries */
123
116
extern int mp_irq_entries;
124
117
 
150
143
#define io_apic_assign_pci_irqs \
151
144
        (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs)
152
145
 
153
 
extern u8 io_apic_unique_id(u8 id);
154
 
extern int io_apic_get_unique_id(int ioapic, int apic_id);
155
 
extern int io_apic_get_version(int ioapic);
156
 
extern int io_apic_get_redir_entries(int ioapic);
157
 
 
158
146
struct io_apic_irq_attr;
159
147
extern int io_apic_set_pci_routing(struct device *dev, int irq,
160
148
                 struct io_apic_irq_attr *irq_attr);
162
150
extern void ioapic_and_gsi_init(void);
163
151
extern void ioapic_insert_resources(void);
164
152
 
165
 
extern struct IO_APIC_route_entry **alloc_ioapic_entries(void);
166
 
extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries);
167
 
extern int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
168
 
extern void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
169
 
extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
 
153
int io_apic_setup_irq_pin_once(unsigned int irq, int node, struct io_apic_irq_attr *attr);
 
154
 
 
155
extern int save_ioapic_entries(void);
 
156
extern void mask_ioapic_entries(void);
 
157
extern int restore_ioapic_entries(void);
170
158
 
171
159
extern int get_nr_irqs_gsi(void);
172
160
 
186
174
 
187
175
extern void mp_save_irq(struct mpc_intsrc *m);
188
176
 
 
177
extern void disable_ioapic_support(void);
 
178
 
189
179
#else  /* !CONFIG_X86_IO_APIC */
190
180
 
191
181
#define io_apic_assign_pci_irqs 0
199
189
struct io_apic_irq_attr;
200
190
static inline int io_apic_set_pci_routing(struct device *dev, int irq,
201
191
                 struct io_apic_irq_attr *irq_attr) { return 0; }
 
192
 
 
193
static inline int save_ioapic_entries(void)
 
194
{
 
195
        return -ENOMEM;
 
196
}
 
197
 
 
198
static inline void mask_ioapic_entries(void) { }
 
199
static inline int restore_ioapic_entries(void)
 
200
{
 
201
        return -ENOMEM;
 
202
}
 
203
 
 
204
static inline void mp_save_irq(struct mpc_intsrc *m) { };
 
205
static inline void disable_ioapic_support(void) { }
202
206
#endif
203
207
 
204
208
#endif /* _ASM_X86_IO_APIC_H */