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
b6d79b9a
Commit
b6d79b9a
authored
Sep 15, 2004
by
Dave Jones
Committed by
Dave Jones
Sep 15, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AGPGART] Fix up sparse iomem warnings in NVidia driver.
Signed-off-by:
Dave Jones
<
davej@redhat.com
>
parent
23d4ae4f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
drivers/char/agp/nvidia-agp.c
drivers/char/agp/nvidia-agp.c
+11
-14
No files found.
drivers/char/agp/nvidia-agp.c
View file @
b6d79b9a
...
@@ -28,7 +28,7 @@ static struct _nvidia_private {
...
@@ -28,7 +28,7 @@ static struct _nvidia_private {
struct
pci_dev
*
dev_1
;
struct
pci_dev
*
dev_1
;
struct
pci_dev
*
dev_2
;
struct
pci_dev
*
dev_2
;
struct
pci_dev
*
dev_3
;
struct
pci_dev
*
dev_3
;
volatile
u32
*
aperture
;
volatile
u32
__iomem
*
aperture
;
int
num_active_entries
;
int
num_active_entries
;
off_t
pg_offset
;
off_t
pg_offset
;
u32
wbc_mask
;
u32
wbc_mask
;
...
@@ -154,7 +154,7 @@ static int nvidia_configure(void)
...
@@ -154,7 +154,7 @@ static int nvidia_configure(void)
/* map aperture */
/* map aperture */
nvidia_private
.
aperture
=
nvidia_private
.
aperture
=
(
volatile
u32
*
)
ioremap
(
apbase
,
33
*
PAGE_SIZE
);
(
volatile
u32
__iomem
*
)
ioremap
(
apbase
,
33
*
PAGE_SIZE
);
return
0
;
return
0
;
}
}
...
@@ -173,7 +173,7 @@ static void nvidia_cleanup(void)
...
@@ -173,7 +173,7 @@ static void nvidia_cleanup(void)
pci_write_config_dword
(
nvidia_private
.
dev_2
,
NVIDIA_2_GARTCTRL
,
temp
&
~
(
0x11
));
pci_write_config_dword
(
nvidia_private
.
dev_2
,
NVIDIA_2_GARTCTRL
,
temp
&
~
(
0x11
));
/* unmap aperture */
/* unmap aperture */
iounmap
((
void
*
)
nvidia_private
.
aperture
);
iounmap
((
void
__iomem
*
)
nvidia_private
.
aperture
);
/* restore previous aperture size */
/* restore previous aperture size */
previous_size
=
A_SIZE_8
(
agp_bridge
->
previous_size
);
previous_size
=
A_SIZE_8
(
agp_bridge
->
previous_size
);
...
@@ -206,7 +206,7 @@ static int nvidia_insert_memory(struct agp_memory *mem, off_t pg_start, int type
...
@@ -206,7 +206,7 @@ static int nvidia_insert_memory(struct agp_memory *mem, off_t pg_start, int type
return
-
EINVAL
;
return
-
EINVAL
;
for
(
j
=
pg_start
;
j
<
(
pg_start
+
mem
->
page_count
);
j
++
)
{
for
(
j
=
pg_start
;
j
<
(
pg_start
+
mem
->
page_count
);
j
++
)
{
if
(
!
PGE_EMPTY
(
agp_bridge
,
agp_bridge
->
gatt_table
[
nvidia_private
.
pg_offset
+
j
]
))
if
(
!
PGE_EMPTY
(
agp_bridge
,
readl
(
agp_bridge
->
gatt_table
+
nvidia_private
.
pg_offset
+
j
)
))
return
-
EBUSY
;
return
-
EBUSY
;
}
}
...
@@ -215,9 +215,8 @@ static int nvidia_insert_memory(struct agp_memory *mem, off_t pg_start, int type
...
@@ -215,9 +215,8 @@ static int nvidia_insert_memory(struct agp_memory *mem, off_t pg_start, int type
mem
->
is_flushed
=
TRUE
;
mem
->
is_flushed
=
TRUE
;
}
}
for
(
i
=
0
,
j
=
pg_start
;
i
<
mem
->
page_count
;
i
++
,
j
++
)
for
(
i
=
0
,
j
=
pg_start
;
i
<
mem
->
page_count
;
i
++
,
j
++
)
agp_bridge
->
gatt_table
[
nvidia_private
.
pg_offset
+
j
]
=
writel
(
agp_bridge
->
driver
->
mask_memory
(
mem
->
memory
[
i
],
mem
->
type
),
agp_bridge
->
driver
->
mask_memory
(
mem
->
memory
[
i
],
mem
->
type
);
agp_bridge
->
gatt_table
+
nvidia_private
.
pg_offset
+
j
);
agp_bridge
->
driver
->
tlb_flush
(
mem
);
agp_bridge
->
driver
->
tlb_flush
(
mem
);
return
0
;
return
0
;
}
}
...
@@ -230,10 +229,8 @@ static int nvidia_remove_memory(struct agp_memory *mem, off_t pg_start, int type
...
@@ -230,10 +229,8 @@ static int nvidia_remove_memory(struct agp_memory *mem, off_t pg_start, int type
if
((
type
!=
0
)
||
(
mem
->
type
!=
0
))
if
((
type
!=
0
)
||
(
mem
->
type
!=
0
))
return
-
EINVAL
;
return
-
EINVAL
;
for
(
i
=
pg_start
;
i
<
(
mem
->
page_count
+
pg_start
);
i
++
)
{
for
(
i
=
pg_start
;
i
<
(
mem
->
page_count
+
pg_start
);
i
++
)
agp_bridge
->
gatt_table
[
nvidia_private
.
pg_offset
+
i
]
=
writel
(
agp_bridge
->
scratch_page
,
agp_bridge
->
gatt_table
+
nvidia_private
.
pg_offset
+
i
);
(
unsigned
long
)
agp_bridge
->
scratch_page
;
}
agp_bridge
->
driver
->
tlb_flush
(
mem
);
agp_bridge
->
driver
->
tlb_flush
(
mem
);
return
0
;
return
0
;
...
@@ -265,9 +262,9 @@ static void nvidia_tlbflush(struct agp_memory *mem)
...
@@ -265,9 +262,9 @@ static void nvidia_tlbflush(struct agp_memory *mem)
/* flush TLB entries */
/* flush TLB entries */
for
(
i
=
0
;
i
<
32
+
1
;
i
++
)
for
(
i
=
0
;
i
<
32
+
1
;
i
++
)
temp
=
nvidia_private
.
aperture
[
i
*
PAGE_SIZE
/
sizeof
(
u32
)]
;
temp
=
readl
(
nvidia_private
.
aperture
+
(
i
*
PAGE_SIZE
/
sizeof
(
u32
)))
;
for
(
i
=
0
;
i
<
32
+
1
;
i
++
)
for
(
i
=
0
;
i
<
32
+
1
;
i
++
)
temp
=
nvidia_private
.
aperture
[
i
*
PAGE_SIZE
/
sizeof
(
u32
)]
;
temp
=
readl
(
nvidia_private
.
aperture
+
(
i
*
PAGE_SIZE
/
sizeof
(
u32
)))
;
}
}
...
...
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