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
6ff8c76a
Commit
6ff8c76a
authored
Aug 21, 2013
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/mc: fix race condition between constructor and request_irq()
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
0ff42c5a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
14 deletions
+14
-14
drivers/gpu/drm/nouveau/core/include/subdev/mc.h
drivers/gpu/drm/nouveau/core/include/subdev/mc.h
+4
-3
drivers/gpu/drm/nouveau/core/subdev/mc/base.c
drivers/gpu/drm/nouveau/core/subdev/mc/base.c
+5
-1
drivers/gpu/drm/nouveau/core/subdev/mc/nv04.c
drivers/gpu/drm/nouveau/core/subdev/mc/nv04.c
+1
-2
drivers/gpu/drm/nouveau/core/subdev/mc/nv44.c
drivers/gpu/drm/nouveau/core/subdev/mc/nv44.c
+1
-2
drivers/gpu/drm/nouveau/core/subdev/mc/nv50.c
drivers/gpu/drm/nouveau/core/subdev/mc/nv50.c
+1
-2
drivers/gpu/drm/nouveau/core/subdev/mc/nv98.c
drivers/gpu/drm/nouveau/core/subdev/mc/nv98.c
+1
-2
drivers/gpu/drm/nouveau/core/subdev/mc/nvc0.c
drivers/gpu/drm/nouveau/core/subdev/mc/nvc0.c
+1
-2
No files found.
drivers/gpu/drm/nouveau/core/include/subdev/mc.h
View file @
6ff8c76a
...
...
@@ -20,8 +20,8 @@ nouveau_mc(void *obj)
return
(
void
*
)
nv_device
(
obj
)
->
subdev
[
NVDEV_SUBDEV_MC
];
}
#define nouveau_mc_create(p,e,o,
d)
\
nouveau_mc_create_((p), (e), (o), sizeof(**d), (void **)d)
#define nouveau_mc_create(p,e,o,
m,d)
\
nouveau_mc_create_((p), (e), (o),
(m),
sizeof(**d), (void **)d)
#define nouveau_mc_destroy(p) ({ \
struct nouveau_mc *pmc = (p); _nouveau_mc_dtor(nv_object(pmc)); \
})
...
...
@@ -33,7 +33,8 @@ nouveau_mc(void *obj)
})
int
nouveau_mc_create_
(
struct
nouveau_object
*
,
struct
nouveau_object
*
,
struct
nouveau_oclass
*
,
int
,
void
**
);
struct
nouveau_oclass
*
,
const
struct
nouveau_mc_intr
*
,
int
,
void
**
);
void
_nouveau_mc_dtor
(
struct
nouveau_object
*
);
int
_nouveau_mc_init
(
struct
nouveau_object
*
);
int
_nouveau_mc_fini
(
struct
nouveau_object
*
,
bool
);
...
...
drivers/gpu/drm/nouveau/core/subdev/mc/base.c
View file @
6ff8c76a
...
...
@@ -80,7 +80,9 @@ _nouveau_mc_dtor(struct nouveau_object *object)
int
nouveau_mc_create_
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
int
length
,
void
**
pobject
)
struct
nouveau_oclass
*
oclass
,
const
struct
nouveau_mc_intr
*
intr_map
,
int
length
,
void
**
pobject
)
{
struct
nouveau_device
*
device
=
nv_device
(
parent
);
struct
nouveau_mc
*
pmc
;
...
...
@@ -92,6 +94,8 @@ nouveau_mc_create_(struct nouveau_object *parent, struct nouveau_object *engine,
if
(
ret
)
return
ret
;
pmc
->
intr_map
=
intr_map
;
ret
=
request_irq
(
device
->
pdev
->
irq
,
nouveau_mc_intr
,
IRQF_SHARED
,
"nouveau"
,
pmc
);
if
(
ret
<
0
)
...
...
drivers/gpu/drm/nouveau/core/subdev/mc/nv04.c
View file @
6ff8c76a
...
...
@@ -50,12 +50,11 @@ nv04_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct
nv04_mc_priv
*
priv
;
int
ret
;
ret
=
nouveau_mc_create
(
parent
,
engine
,
oclass
,
&
priv
);
ret
=
nouveau_mc_create
(
parent
,
engine
,
oclass
,
nv04_mc_intr
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
intr_map
=
nv04_mc_intr
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/core/subdev/mc/nv44.c
View file @
6ff8c76a
...
...
@@ -36,12 +36,11 @@ nv44_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct
nv44_mc_priv
*
priv
;
int
ret
;
ret
=
nouveau_mc_create
(
parent
,
engine
,
oclass
,
&
priv
);
ret
=
nouveau_mc_create
(
parent
,
engine
,
oclass
,
nv04_mc_intr
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
intr_map
=
nv04_mc_intr
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/core/subdev/mc/nv50.c
View file @
6ff8c76a
...
...
@@ -53,12 +53,11 @@ nv50_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct
nv50_mc_priv
*
priv
;
int
ret
;
ret
=
nouveau_mc_create
(
parent
,
engine
,
oclass
,
&
priv
);
ret
=
nouveau_mc_create
(
parent
,
engine
,
oclass
,
nv50_mc_intr
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
intr_map
=
nv50_mc_intr
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/core/subdev/mc/nv98.c
View file @
6ff8c76a
...
...
@@ -54,12 +54,11 @@ nv98_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct
nv98_mc_priv
*
priv
;
int
ret
;
ret
=
nouveau_mc_create
(
parent
,
engine
,
oclass
,
&
priv
);
ret
=
nouveau_mc_create
(
parent
,
engine
,
oclass
,
nv98_mc_intr
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
intr_map
=
nv98_mc_intr
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/core/subdev/mc/nvc0.c
View file @
6ff8c76a
...
...
@@ -57,12 +57,11 @@ nvc0_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct
nvc0_mc_priv
*
priv
;
int
ret
;
ret
=
nouveau_mc_create
(
parent
,
engine
,
oclass
,
&
priv
);
ret
=
nouveau_mc_create
(
parent
,
engine
,
oclass
,
nvc0_mc_intr
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
priv
->
base
.
intr_map
=
nvc0_mc_intr
;
return
0
;
}
...
...
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