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
cacf8906
Commit
cacf8906
authored
Aug 21, 2008
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "introduce two APIs for page attribute"
This reverts commit
1ac2f7d5
.
parent
9326d61b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
53 deletions
+8
-53
arch/x86/mm/pageattr.c
arch/x86/mm/pageattr.c
+8
-50
include/asm-x86/cacheflush.h
include/asm-x86/cacheflush.h
+0
-3
No files found.
arch/x86/mm/pageattr.c
View file @
cacf8906
...
...
@@ -752,12 +752,12 @@ static inline int cache_attr(pgprot_t attr)
(
_PAGE_PAT
|
_PAGE_PAT_LARGE
|
_PAGE_PWT
|
_PAGE_PCD
);
}
static
int
do_
change_page_attr_set_clr
(
unsigned
long
addr
,
int
numpages
,
static
int
change_page_attr_set_clr
(
unsigned
long
addr
,
int
numpages
,
pgprot_t
mask_set
,
pgprot_t
mask_clr
,
int
force_split
,
int
*
tlb_flush
)
int
force_split
)
{
struct
cpa_data
cpa
;
int
ret
,
checkalias
;
int
ret
,
c
ache
,
c
heckalias
;
/*
* Check, if we are requested to change a not supported
...
...
@@ -795,22 +795,9 @@ static int do_change_page_attr_set_clr(unsigned long addr, int numpages,
/*
* Check whether we really changed something:
*/
*
tlb_flush
=
cpa
.
flushtlb
;
cpa_fill_pool
(
NULL
);
return
ret
;
}
static
int
change_page_attr_set_clr
(
unsigned
long
addr
,
int
numpages
,
pgprot_t
mask_set
,
pgprot_t
mask_clr
,
int
force_split
)
{
int
cache
,
flush_cache
=
0
,
ret
;
ret
=
do_change_page_attr_set_clr
(
addr
,
numpages
,
mask_set
,
mask_clr
,
force_split
,
&
flush_cache
);
if
(
!
flush_cache
)
if
(
!
cpa
.
flushtlb
)
goto
out
;
/*
* No need to flush, when we did not set any of the caching
* attributes:
...
...
@@ -827,7 +814,10 @@ static int change_page_attr_set_clr(unsigned long addr, int numpages,
cpa_flush_range
(
addr
,
numpages
,
cache
);
else
cpa_flush_all
(
cache
);
out:
cpa_fill_pool
(
NULL
);
return
ret
;
}
...
...
@@ -865,30 +855,6 @@ int set_memory_uc(unsigned long addr, int numpages)
}
EXPORT_SYMBOL
(
set_memory_uc
);
int
set_memory_uc_noflush
(
unsigned
long
addr
,
int
numpages
)
{
int
flush
;
/*
* for now UC MINUS. see comments in ioremap_nocache()
*/
if
(
reserve_memtype
(
addr
,
addr
+
numpages
*
PAGE_SIZE
,
_PAGE_CACHE_UC_MINUS
,
NULL
))
return
-
EINVAL
;
/*
* for now UC MINUS. see comments in ioremap_nocache()
*/
return
do_change_page_attr_set_clr
(
addr
,
numpages
,
__pgprot
(
_PAGE_CACHE_UC_MINUS
),
__pgprot
(
0
),
0
,
&
flush
);
}
EXPORT_SYMBOL
(
set_memory_uc_noflush
);
void
set_memory_flush_all
(
void
)
{
cpa_flush_all
(
1
);
}
EXPORT_SYMBOL
(
set_memory_flush_all
);
int
_set_memory_wc
(
unsigned
long
addr
,
int
numpages
)
{
return
change_page_attr_set
(
addr
,
numpages
,
...
...
@@ -963,14 +929,6 @@ int set_pages_uc(struct page *page, int numpages)
}
EXPORT_SYMBOL
(
set_pages_uc
);
int
set_pages_uc_noflush
(
struct
page
*
page
,
int
numpages
)
{
unsigned
long
addr
=
(
unsigned
long
)
page_address
(
page
);
return
set_memory_uc_noflush
(
addr
,
numpages
);
}
EXPORT_SYMBOL
(
set_pages_uc_noflush
);
int
set_pages_wb
(
struct
page
*
page
,
int
numpages
)
{
unsigned
long
addr
=
(
unsigned
long
)
page_address
(
page
);
...
...
include/asm-x86/cacheflush.h
View file @
cacf8906
...
...
@@ -57,8 +57,6 @@ int _set_memory_uc(unsigned long addr, int numpages);
int
_set_memory_wc
(
unsigned
long
addr
,
int
numpages
);
int
_set_memory_wb
(
unsigned
long
addr
,
int
numpages
);
int
set_memory_uc
(
unsigned
long
addr
,
int
numpages
);
int
set_memory_uc_noflush
(
unsigned
long
addr
,
int
numpages
);
void
set_memory_flush_all
(
void
);
int
set_memory_wc
(
unsigned
long
addr
,
int
numpages
);
int
set_memory_wb
(
unsigned
long
addr
,
int
numpages
);
int
set_memory_x
(
unsigned
long
addr
,
int
numpages
);
...
...
@@ -89,7 +87,6 @@ int set_memory_4k(unsigned long addr, int numpages);
*/
int
set_pages_uc
(
struct
page
*
page
,
int
numpages
);
int
set_pages_uc_noflush
(
struct
page
*
page
,
int
numpages
);
int
set_pages_wb
(
struct
page
*
page
,
int
numpages
);
int
set_pages_x
(
struct
page
*
page
,
int
numpages
);
int
set_pages_nx
(
struct
page
*
page
,
int
numpages
);
...
...
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