* [PATCH] use pgd_list_add/pgd_list_del
@ 2007-09-23 1:56 Akinobu Mita
0 siblings, 0 replies; only message in thread
From: Akinobu Mita @ 2007-09-23 1:56 UTC (permalink / raw)
To: linux-kernel; +Cc: Andi Kleen, Thomas Gleixner
Cleanup by using pgd_list_add() and pgd_list_del() in the right place.
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
include/asm-x86_64/pgalloc.h | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
Index: 2.6-git/include/asm-x86_64/pgalloc.h
===================================================================
--- 2.6-git.orig/include/asm-x86_64/pgalloc.h
+++ 2.6-git/include/asm-x86_64/pgalloc.h
@@ -65,7 +65,6 @@ static inline void pgd_ctor(void *x)
{
unsigned boundary;
pgd_t *pgd = x;
- struct page *page = virt_to_page(pgd);
/*
* Copy kernel pointers in from init.
@@ -75,19 +74,14 @@ static inline void pgd_ctor(void *x)
init_level4_pgt + boundary,
(PTRS_PER_PGD - boundary) * sizeof(pgd_t));
- spin_lock(&pgd_lock);
- list_add(&page->lru, &pgd_list);
- spin_unlock(&pgd_lock);
+ pgd_list_add(pgd);
}
static inline void pgd_dtor(void *x)
{
pgd_t *pgd = x;
- struct page *page = virt_to_page(pgd);
- spin_lock(&pgd_lock);
- list_del(&page->lru);
- spin_unlock(&pgd_lock);
+ pgd_list_del(pgd);
}
static inline pgd_t *pgd_alloc(struct mm_struct *mm)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-09-23 1:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-23 1:56 [PATCH] use pgd_list_add/pgd_list_del Akinobu Mita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox