Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83711
b: refs/heads/master
c: 58d5d0d
h: refs/heads/master
i:
  83709: 871a152
  83707: ccea871
  83703: 9531333
  83695: ad00025
  83679: 6326ada
  83647: 4f6502c
  83583: 255167b
  83455: f3ddd42
v: v3
  • Loading branch information
Ingo Molnar committed Feb 6, 2008
1 parent e6dfcd0 commit c95b5eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a09771bef9a375091f8ae706d992e20970e5d1e7
refs/heads/master: 58d5d0d8dd52cbca988af24b5692a20b00285543
5 changes: 3 additions & 2 deletions trunk/arch/x86/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,11 +958,12 @@ void vmalloc_sync_all(void)
for (address = start; address <= VMALLOC_END; address += PGDIR_SIZE) {
if (!test_bit(pgd_index(address), insync)) {
const pgd_t *pgd_ref = pgd_offset_k(address);
unsigned long flags;
struct page *page;

if (pgd_none(*pgd_ref))
continue;
spin_lock(&pgd_lock);
spin_lock_irqsave(&pgd_lock, flags);
list_for_each_entry(page, &pgd_list, lru) {
pgd_t *pgd;
pgd = (pgd_t *)page_address(page) + pgd_index(address);
Expand All @@ -971,7 +972,7 @@ void vmalloc_sync_all(void)
else
BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref));
}
spin_unlock(&pgd_lock);
spin_unlock_irqrestore(&pgd_lock, flags);
set_bit(pgd_index(address), insync);
}
if (address == start)
Expand Down
10 changes: 6 additions & 4 deletions trunk/include/asm-x86/pgalloc_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,21 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud)
static inline void pgd_list_add(pgd_t *pgd)
{
struct page *page = virt_to_page(pgd);
unsigned long flags;

spin_lock(&pgd_lock);
spin_lock_irqsave(&pgd_lock, flags);
list_add(&page->lru, &pgd_list);
spin_unlock(&pgd_lock);
spin_unlock_irqrestore(&pgd_lock, flags);
}

static inline void pgd_list_del(pgd_t *pgd)
{
struct page *page = virt_to_page(pgd);
unsigned long flags;

spin_lock(&pgd_lock);
spin_lock_irqsave(&pgd_lock, flags);
list_del(&page->lru);
spin_unlock(&pgd_lock);
spin_unlock_irqrestore(&pgd_lock, flags);
}

static inline pgd_t *pgd_alloc(struct mm_struct *mm)
Expand Down

0 comments on commit c95b5eb

Please sign in to comment.