Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
83
Issues
83
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
dcc274b7
Commit
dcc274b7
authored
Dec 15, 2016
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel/wr_pstats: restore CR register in IRQ handler
parent
7481b2f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
wr_pstats.c
kernel/wr_pstats/wr_pstats.c
+6
-0
No files found.
kernel/wr_pstats/wr_pstats.c
View file @
dcc274b7
...
@@ -263,16 +263,22 @@ static irqreturn_t pstats_irq_handler(int irq, void *devid)
...
@@ -263,16 +263,22 @@ static irqreturn_t pstats_irq_handler(int irq, void *devid)
{
{
struct
cntrs_dev
*
device
=
(
struct
cntrs_dev
*
)
devid
;
struct
cntrs_dev
*
device
=
(
struct
cntrs_dev
*
)
devid
;
uint32_t
irqs
,
i
;
uint32_t
irqs
,
i
;
uint32_t
tmp_cr
;
irqs
=
pstats_irq_status
();
irqs
=
pstats_irq_status
();
pstats_irq_disable
(
PSTATS_ALL_MSK
);
pstats_irq_disable
(
PSTATS_ALL_MSK
);
pstats_irq_clear
(
irqs
);
pstats_irq_clear
(
irqs
);
device
->
port_irqs
[
device
->
irqs_head
]
=
irqs
;
device
->
port_irqs
[
device
->
irqs_head
]
=
irqs
;
/* in case IRQ handler happens in the middle of counters readout, save
* current value of CR register */
tmp_cr
=
pstats_readl
(
pstats_dev
,
CR
);
/* dump all overflow information so that we don't lose any if
/* dump all overflow information so that we don't lose any if
* tasklet is delayed */
* tasklet is delayed */
for
(
i
=
0
;
i
<
pstats_nports
;
++
i
)
for
(
i
=
0
;
i
<
pstats_nports
;
++
i
)
device
->
overflows
[
device
->
irqs_head
][
i
]
=
pstats_irq_cntrs
(
i
);
device
->
overflows
[
device
->
irqs_head
][
i
]
=
pstats_irq_cntrs
(
i
);
/* Restore CR register for whoever was reading before the IRQ */
pstats_writel
(
tmp_cr
|
PSTATS_CR_RD_EN
,
pstats_dev
,
CR
);
device
->
irqs_head
=
(
device
->
irqs_head
+
1
)
%
PSTATS_IRQBUFSZ
;
device
->
irqs_head
=
(
device
->
irqs_head
+
1
)
%
PSTATS_IRQBUFSZ
;
/* device->port_irqs[device->irqs_head++ % PSTATS_IRQBUFSZ] = irqs; */
/* device->port_irqs[device->irqs_head++ % PSTATS_IRQBUFSZ] = irqs; */
...
...
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