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
Kirill Smelkov
linux
Commits
179cf194
Commit
179cf194
authored
Feb 01, 2017
by
Vineet Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARCv2: intc: Use runtime value of irq count for setting up intc
Signed-off-by:
Vineet Gupta
<
vgupta@synopsys.com
>
parent
f33b8cdd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
11 deletions
+18
-11
arch/arc/include/asm/irq.h
arch/arc/include/asm/irq.h
+1
-0
arch/arc/kernel/intc-arcv2.c
arch/arc/kernel/intc-arcv2.c
+17
-11
No files found.
arch/arc/include/asm/irq.h
View file @
179cf194
...
...
@@ -21,6 +21,7 @@
#ifdef CONFIG_ISA_ARCV2
#define IPI_IRQ 19
#define SOFTIRQ_IRQ 21
#define FIRST_EXT_IRQ 24
#endif
#include <linux/interrupt.h>
...
...
arch/arc/kernel/intc-arcv2.c
View file @
179cf194
...
...
@@ -14,7 +14,15 @@
#include <linux/irqchip.h>
#include <asm/irq.h>
#define NR_CPU_IRQS 32
/* number of irq lines coming in */
#define NR_EXCEPTIONS 16
struct
bcr_irq_arcv2
{
#ifdef CONFIG_CPU_BIG_ENDIAN
unsigned
int
pad
:
3
,
firq
:
1
,
prio
:
4
,
exts
:
8
,
irqs
:
8
,
ver
:
8
;
#else
unsigned
int
ver
:
8
,
irqs
:
8
,
exts
:
8
,
prio
:
4
,
firq
:
1
,
pad
:
3
;
#endif
};
/*
* Early Hardware specific Interrupt setup
...
...
@@ -25,14 +33,7 @@
void
arc_init_IRQ
(
void
)
{
unsigned
int
tmp
,
irq_prio
;
struct
irq_build
{
#ifdef CONFIG_CPU_BIG_ENDIAN
unsigned
int
pad
:
3
,
firq
:
1
,
prio
:
4
,
exts
:
8
,
irqs
:
8
,
ver
:
8
;
#else
unsigned
int
ver
:
8
,
irqs
:
8
,
exts
:
8
,
prio
:
4
,
firq
:
1
,
pad
:
3
;
#endif
}
irq_bcr
;
struct
bcr_irq_arcv2
irq_bcr
;
struct
aux_irq_ctrl
{
#ifdef CONFIG_CPU_BIG_ENDIAN
...
...
@@ -117,7 +118,7 @@ static int arcv2_irq_map(struct irq_domain *d, unsigned int irq,
* core intc IRQs [16, 23]:
* Statically assigned always private-per-core (Timers, WDT, IPI, PCT)
*/
if
(
hw
<
24
)
{
if
(
hw
<
FIRST_EXT_IRQ
)
{
/*
* A subsequent request_percpu_irq() fails if percpu_devid is
* not set. That in turns sets NOAUTOEN, meaning each core needs
...
...
@@ -142,11 +143,16 @@ static int __init
init_onchip_IRQ
(
struct
device_node
*
intc
,
struct
device_node
*
parent
)
{
struct
irq_domain
*
root_domain
;
struct
bcr_irq_arcv2
irq_bcr
;
unsigned
int
nr_cpu_irqs
;
READ_BCR
(
ARC_REG_IRQ_BCR
,
irq_bcr
);
nr_cpu_irqs
=
irq_bcr
.
irqs
+
NR_EXCEPTIONS
;
if
(
parent
)
panic
(
"DeviceTree incore intc not a root irq controller
\n
"
);
root_domain
=
irq_domain_add_linear
(
intc
,
NR_CPU_IRQS
,
&
arcv2_irq_ops
,
NULL
);
root_domain
=
irq_domain_add_linear
(
intc
,
nr_cpu_irqs
,
&
arcv2_irq_ops
,
NULL
);
if
(
!
root_domain
)
panic
(
"root irq domain not avail
\n
"
);
...
...
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