mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	akinobu.mita@gmail.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/mm] x86: unify kmap_atomic_pfn() and iomap_atomic_prot_pfn(), fix
Date: Fri, 13 Mar 2009 01:39:31 GMT	[thread overview]
Message-ID: <tip-dd63fdcc63f0f853b116b52e56200a0e0227cf5f@git.kernel.org> (raw)
In-Reply-To: <20090311143317.GA22244@localhost.localdomain>

Commit-ID:  dd63fdcc63f0f853b116b52e56200a0e0227cf5f
Gitweb:     http://git.kernel.org/tip/dd63fdcc63f0f853b116b52e56200a0e0227cf5f
Author:     Ingo Molnar <mingo@elte.hu>
AuthorDate: Fri, 13 Mar 2009 03:20:49 +0100
Commit:     Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 13 Mar 2009 03:24:53 +0100

x86: unify kmap_atomic_pfn() and iomap_atomic_prot_pfn(), fix

Impact: build fix

Move kmap_atomic_prot_pfn() to iomap_32.c. It is used on all 32-bit
kernels, while highmem_32.c is only built on highmem kernels.

( Note: the debug_kmap_atomic_prot() check is removed for now, that
  problem is handled via another patch. )

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
LKML-Reference: <20090311143317.GA22244@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/mm/highmem_32.c |   20 ++------------------
 arch/x86/mm/iomap_32.c   |   18 +++++++++++++++++-
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
index f256e73..522db5e 100644
--- a/arch/x86/mm/highmem_32.c
+++ b/arch/x86/mm/highmem_32.c
@@ -121,24 +121,8 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
 	pagefault_enable();
 }
 
-void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
-{
-	enum fixed_addresses idx;
-	unsigned long vaddr;
-
-	pagefault_disable();
-
-	debug_kmap_atomic_prot(type);
-
-	idx = type + KM_TYPE_NR * smp_processor_id();
-	vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
-	set_pte(kmap_pte - idx, pfn_pte(pfn, prot));
-	arch_flush_lazy_mmu_mode();
-
-	return (void*) vaddr;
-}
-
-/* This is the same as kmap_atomic() but can map memory that doesn't
+/*
+ * This is the same as kmap_atomic() but can map memory that doesn't
  * have a struct page associated with it.
  */
 void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)
diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
index 592984e..6e60ba6 100644
--- a/arch/x86/mm/iomap_32.c
+++ b/arch/x86/mm/iomap_32.c
@@ -32,7 +32,23 @@ int is_io_mapping_possible(resource_size_t base, unsigned long size)
 }
 EXPORT_SYMBOL_GPL(is_io_mapping_possible);
 
-/* Map 'pfn' using fixed map 'type' and protections 'prot'
+void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
+{
+	enum fixed_addresses idx;
+	unsigned long vaddr;
+
+	pagefault_disable();
+
+	idx = type + KM_TYPE_NR * smp_processor_id();
+	vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
+	set_pte(kmap_pte - idx, pfn_pte(pfn, prot));
+	arch_flush_lazy_mmu_mode();
+
+	return (void *)vaddr;
+}
+
+/*
+ * Map 'pfn' using fixed map 'type' and protections 'prot'
  */
 void *
 iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)

  parent reply	other threads:[~2009-03-13  1:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11 14:33 [PATCH 1/2] x86: unify kmap_atomic_pfn() and iomap_atomic_prot_pfn() Akinobu Mita
2009-03-11 14:34 ` [PATCH 2/2] x86: debug check for kmap_atomic_pfn " Akinobu Mita
2009-03-11 16:54   ` [tip:x86/mm] " Akinobu Mita
2009-03-11 15:08 ` [PATCH 1/2] x86: unify kmap_atomic_pfn() " Thomas Gleixner
2009-03-11 15:25   ` Akinobu Mita
2009-03-11 16:52     ` Ingo Molnar
2009-03-12  0:28       ` Akinobu Mita
2009-03-12 12:24         ` Ingo Molnar
2009-03-12 12:27           ` Ingo Molnar
2009-03-11 16:54 ` [tip:x86/mm] " Akinobu Mita
2009-03-13  1:39 ` Ingo Molnar [this message]
2009-03-14  4:19   ` [PATCH -tip 1/2] mm: introduce debug_kmap_atomic Akinobu Mita
2009-03-14  4:20     ` [PATCH -tip 2/2] mm: use debug_kmap_atomic Akinobu Mita
2009-03-14 13:15     ` [PATCH -tip 1/2] mm: introduce debug_kmap_atomic Ingo Molnar
2009-03-15 15:15       ` Akinobu Mita
2009-03-15 20:45         ` [tip:x86/mm] x86, mm: remove unnecessary include file from iomap_32.c Akinobu Mita
2009-03-23  0:23       ` [PATCH -tip 1/2] mm: introduce debug_kmap_atomic Andrew Morton
2009-03-24  6:21         ` Akinobu Mita

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=tip-dd63fdcc63f0f853b116b52e56200a0e0227cf5f@git.kernel.org \
    --to=mingo@elte.hu \
    --cc=akinobu.mita@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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

Powered by JetHome