Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spec-sw
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
fmc-projects
spec
spec-sw
Commits
c1db3e8a
Commit
c1db3e8a
authored
10 years ago
by
Federico Vaga
Browse files
Options
Downloads
Patches
Plain Diff
vic: helper to know if a source is managed
Signed-nof -by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
15fa14fb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
kernel/spec-vic.c
+17
-0
17 additions, 0 deletions
kernel/spec-vic.c
kernel/spec.h
+1
-0
1 addition, 0 deletions
kernel/spec.h
with
18 additions
and
0 deletions
kernel/spec-vic.c
+
17
−
0
View file @
c1db3e8a
...
@@ -178,6 +178,23 @@ int spec_vic_irq_request(struct spec_dev *spec, struct fmc_device *fmc,
...
@@ -178,6 +178,23 @@ int spec_vic_irq_request(struct spec_dev *spec, struct fmc_device *fmc,
return
-
EINVAL
;
return
-
EINVAL
;
}
}
int
vic_is_managed
(
struct
vic_irq_controller
*
vic
,
unsigned
long
id
)
{
int
i
,
ret
;
if
(
!
vic
)
return
0
;
for
(
i
=
0
;
i
<
VIC_MAX_VECTORS
;
i
++
)
{
if
(
vic
->
vectors
[
i
].
saved_id
!=
id
)
continue
;
ret
=
vic_readl
(
vic
,
VIC_REG_IMR
)
&
(
1
<<
i
);
return
!!
ret
;
}
return
0
;
}
/*
/*
* vic_handler_count
* vic_handler_count
...
...
This diff is collapsed.
Click to expand it.
kernel/spec.h
+
1
−
0
View file @
c1db3e8a
...
@@ -154,5 +154,6 @@ int spec_vic_irq_request(struct spec_dev *spec, struct fmc_device *fmc,
...
@@ -154,5 +154,6 @@ int spec_vic_irq_request(struct spec_dev *spec, struct fmc_device *fmc,
unsigned
long
id
,
irq_handler_t
handler
);
unsigned
long
id
,
irq_handler_t
handler
);
void
spec_vic_irq_free
(
struct
spec_dev
*
spec
,
unsigned
long
id
);
void
spec_vic_irq_free
(
struct
spec_dev
*
spec
,
unsigned
long
id
);
irqreturn_t
spec_vic_irq_dispatch
(
struct
spec_dev
*
spec
);
irqreturn_t
spec_vic_irq_dispatch
(
struct
spec_dev
*
spec
);
extern
int
vic_is_managed
(
struct
vic_irq_controller
*
vic
,
unsigned
long
id
);
#endif
/* __SPEC_H__ */
#endif
/* __SPEC_H__ */
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment