Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
009eb3fe
Commit
009eb3fe
authored
Jan 31, 2009
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86, irq: describe NR_IRQ sizing details, clean up
Impact: cleanup Signed-off-by:
Ingo Molnar
<
mingo@elte.hu
>
parent
c379698f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
9 deletions
+23
-9
arch/x86/include/asm/irq_vectors.h
arch/x86/include/asm/irq_vectors.h
+23
-9
No files found.
arch/x86/include/asm/irq_vectors.h
View file @
009eb3fe
...
...
@@ -126,23 +126,37 @@
#define LAST_VM86_IRQ 15
#define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15)
/*
* Size the maximum number of interrupts.
*
* If the irq_desc[] array has a sparse layout, we can size things
* generously - it scales up linearly with the maximum number of CPUs,
* and the maximum number of IO-APICs, whichever is higher.
*
* In other cases we size more conservatively, to not create too large
* static arrays.
*/
#define NR_IRQS_LEGACY 16
#define CPU_VECTOR_LIMIT ( 8 * NR_CPUS )
#define IO_APIC_VECTOR_LIMIT ( 32 * MAX_IO_APICS )
#ifdef CONFIG_X86_IO_APIC
# ifndef CONFIG_SPARSE_IRQ
# ifdef CONFIG_SPARSE_IRQ
# define NR_IRQS \
(CPU_VECTOR_LIMIT > IO_APIC_VECTOR_LIMIT ? \
(NR_VECTORS + CPU_VECTOR_LIMIT) : \
(NR_VECTORS + IO_APIC_VECTOR_LIMIT))
# else
# if NR_CPUS < MAX_IO_APICS
# define NR_IRQS (NR_VECTORS +
(32 * NR_CPUS)
)
# define NR_IRQS (NR_VECTORS +
4*CPU_VECTOR_LIMIT
)
# else
# define NR_IRQS (NR_VECTORS +
(32 * MAX_IO_APICS)
)
# define NR_IRQS (NR_VECTORS +
IO_APIC_VECTOR_LIMIT
)
# endif
# else
# define NR_IRQS \
((8 * NR_CPUS) > (32 * MAX_IO_APICS) ? \
(NR_VECTORS + (8 * NR_CPUS)) : \
(NR_VECTORS + (32 * MAX_IO_APICS)))
# endif
#else
/* !CONFIG_X86_IO_APIC: */
# define NR_IRQS
16
# define NR_IRQS
NR_IRQS_LEGACY
#endif
#endif
/* _ASM_X86_IRQ_VECTORS_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment