Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366242
b: refs/heads/master
c: 5952886
h: refs/heads/master
v: v3
  • Loading branch information
Borislav Petkov authored and Ingo Molnar committed Apr 10, 2013
1 parent a49ebeb commit 61e0845
Show file tree
Hide file tree
Showing 3 changed files with 5 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: ec7fd34425f6536ed4b3548e7aa712ee2718189c
refs/heads/master: 5952886bfeec065041d04dfcc2693b581e8f2424
1 change: 0 additions & 1 deletion trunk/arch/x86/include/asm/pgtable_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ static inline void update_page_count(int level, unsigned long pages) { }
* as a pte too.
*/
extern pte_t *lookup_address(unsigned long address, unsigned int *level);
extern int __split_large_page(pte_t *kpte, unsigned long address, pte_t *pbase);
extern phys_addr_t slow_virt_to_phys(void *__address);

#endif /* !__ASSEMBLY__ */
Expand Down
9 changes: 4 additions & 5 deletions trunk/arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,13 +542,14 @@ try_preserve_large_page(pte_t *kpte, unsigned long address,
return do_split;
}

int __split_large_page(pte_t *kpte, unsigned long address, pte_t *pbase)
static int
__split_large_page(pte_t *kpte, unsigned long address, struct page *base)
{
pte_t *pbase = (pte_t *)page_address(base);
unsigned long pfn, pfninc = 1;
unsigned int i, level;
pte_t *tmp;
pgprot_t ref_prot;
struct page *base = virt_to_page(pbase);

spin_lock(&pgd_lock);
/*
Expand Down Expand Up @@ -633,7 +634,6 @@ int __split_large_page(pte_t *kpte, unsigned long address, pte_t *pbase)

static int split_large_page(pte_t *kpte, unsigned long address)
{
pte_t *pbase;
struct page *base;

if (!debug_pagealloc)
Expand All @@ -644,8 +644,7 @@ static int split_large_page(pte_t *kpte, unsigned long address)
if (!base)
return -ENOMEM;

pbase = (pte_t *)page_address(base);
if (__split_large_page(kpte, address, pbase))
if (__split_large_page(kpte, address, base))
__free_page(base);

return 0;
Expand Down

0 comments on commit 61e0845

Please sign in to comment.