remove PTATTR_USER from the decision of ihk_mc_ap_flag in __set_pt_page

This commit is contained in:
NAKAMURA Gou
2013-06-19 10:43:15 +09:00
parent 32b8cc4651
commit ff5ee67d06
2 changed files with 6 additions and 3 deletions

View File

@@ -302,7 +302,7 @@ static int __set_pt_page(struct page_table *pt, void *virt, unsigned long phys,
struct page_table *newpt;
enum ihk_mc_ap_flag ap_flag;
ap_flag = (attr & (PTATTR_USER | PTATTR_FOR_USER)) ?
ap_flag = (attr & PTATTR_FOR_USER) ?
IHK_MC_AP_NOWAIT: IHK_MC_AP_CRITICAL;
if (!pt) {

View File

@@ -110,6 +110,9 @@ static int update_process_page_table(struct process *process,
unsigned long p, pa = range->phys;
unsigned long pp;
unsigned long flags = ihk_mc_spinlock_lock(&process->vm->page_table_lock);
const enum ihk_mc_pt_attribute attr
= flag | PTATTR_WRITABLE | PTATTR_USER | PTATTR_FOR_USER;
p = range->start;
while (p < range->end) {
#ifdef USE_LARGE_PAGES
@@ -120,7 +123,7 @@ static int update_process_page_table(struct process *process,
(range->end - p) >= LARGE_PAGE_SIZE) {
if (ihk_mc_pt_set_large_page(process->vm->page_table, (void *)p,
pa, PTATTR_WRITABLE | PTATTR_USER | flag) != 0) {
pa, attr) != 0) {
goto err;
}
@@ -132,7 +135,7 @@ static int update_process_page_table(struct process *process,
else {
#endif
if(ihk_mc_pt_set_page(process->vm->page_table, (void *)p,
pa, PTATTR_WRITABLE | PTATTR_USER | flag) != 0){
pa, attr) != 0){
goto err;
}