Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230798
b: refs/heads/master
c: 4b7167b
h: refs/heads/master
v: v3
  • Loading branch information
Andrea Arcangeli authored and Linus Torvalds committed Jan 14, 2011
1 parent 43a196b commit e47f35b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94fcc585fb85ad7b059c70872489b50044d401f3
refs/heads/master: 4b7167b9ff9b7f3f528cbc4c7d02ebd275b9b10c
5 changes: 5 additions & 0 deletions trunk/arch/x86/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ static inline int pmd_trans_huge(pmd_t pmd)
{
return pmd_val(pmd) & _PAGE_PSE;
}

static inline int has_transparent_hugepage(void)
{
return cpu_has_pse;
}
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */

static inline pte_t pte_set_flags(pte_t pte, pteval_t set)
Expand Down
8 changes: 8 additions & 0 deletions trunk/mm/huge_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,15 @@ static int __init hugepage_init(void)
int err;
#ifdef CONFIG_SYSFS
static struct kobject *hugepage_kobj;
#endif

err = -EINVAL;
if (!has_transparent_hugepage()) {
transparent_hugepage_flags = 0;
goto out;
}

#ifdef CONFIG_SYSFS
err = -ENOMEM;
hugepage_kobj = kobject_create_and_add("transparent_hugepage", mm_kobj);
if (unlikely(!hugepage_kobj)) {
Expand Down

0 comments on commit e47f35b

Please sign in to comment.