public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Andi Kleen <ak@suse.de>, Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH] use pgd_list_add/pgd_list_del
Date: Sun, 23 Sep 2007 10:56:14 +0900	[thread overview]
Message-ID: <20070923015614.GA4024@APFDCB5C> (raw)

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)

                 reply	other threads:[~2007-09-23  1:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070923015614.GA4024@APFDCB5C \
    --to=akinobu.mita@gmail.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox