From: Akinobu Mita <akinobu.mita@gmail.com>
To: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
tglx@linutronix.de, mingo@elte.hu
Cc: linux-tip-commits@vger.kernel.org
Subject: [PATCH -tip 2/2] mm: use debug_kmap_atomic
Date: Sat, 14 Mar 2009 13:20:56 +0900 [thread overview]
Message-ID: <20090314042054.GB3697@localhost.localdomain> (raw)
In-Reply-To: <20090314041948.GA3697@localhost.localdomain>
Subject: mm: use debug_kmap_atomic
From: Akinobu Mita <akinobu.mita@gmail.com>
Use debug_kmap_atomic in kmap_atomic, kmap_atomic_pfn, kmap_atomic_prot and
iomap_atomic_prot_pfn.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/mips/mm/highmem.c | 2 ++
arch/powerpc/include/asm/highmem.h | 2 ++
arch/sparc/mm/highmem.c | 1 +
arch/x86/mm/iomap_32.c | 3 ++-
include/asm-frv/highmem.h | 2 ++
include/asm-mn10300/highmem.h | 2 ++
6 files changed, 11 insertions(+), 1 deletion(-)
Index: linux-2.6-tip/arch/mips/mm/highmem.c
===================================================================
--- linux-2.6-tip.orig/arch/mips/mm/highmem.c
+++ linux-2.6-tip/arch/mips/mm/highmem.c
@@ -43,6 +43,7 @@ void *__kmap_atomic(struct page *page, e
if (!PageHighMem(page))
return page_address(page);
+ debug_kmap_atomic(type);
idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
#ifdef CONFIG_DEBUG_HIGHMEM
@@ -91,6 +92,7 @@ void *kmap_atomic_pfn(unsigned long pfn,
pagefault_disable();
+ debug_kmap_atomic(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, kmap_prot));
Index: linux-2.6-tip/arch/powerpc/include/asm/highmem.h
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/include/asm/highmem.h
+++ linux-2.6-tip/arch/powerpc/include/asm/highmem.h
@@ -24,6 +24,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
+#include <linux/highmem.h>
#include <asm/kmap_types.h>
#include <asm/tlbflush.h>
#include <asm/page.h>
@@ -94,6 +95,7 @@ static inline void *kmap_atomic_prot(str
if (!PageHighMem(page))
return page_address(page);
+ debug_kmap_atomic(type);
idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
#ifdef CONFIG_DEBUG_HIGHMEM
Index: linux-2.6-tip/arch/sparc/mm/highmem.c
===================================================================
--- linux-2.6-tip.orig/arch/sparc/mm/highmem.c
+++ linux-2.6-tip/arch/sparc/mm/highmem.c
@@ -39,6 +39,7 @@ void *kmap_atomic(struct page *page, enu
if (!PageHighMem(page))
return page_address(page);
+ debug_kmap_atomic(type);
idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
Index: linux-2.6-tip/arch/x86/mm/iomap_32.c
===================================================================
--- linux-2.6-tip.orig/arch/x86/mm/iomap_32.c
+++ linux-2.6-tip/arch/x86/mm/iomap_32.c
@@ -18,8 +18,8 @@
#include <asm/iomap.h>
#include <asm/pat.h>
-#include <asm/highmem.h>
#include <linux/module.h>
+#include <linux/highmem.h>
int is_io_mapping_possible(resource_size_t base, unsigned long size)
{
@@ -39,6 +39,7 @@ void *kmap_atomic_prot_pfn(unsigned long
pagefault_disable();
+ debug_kmap_atomic(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));
Index: linux-2.6-tip/include/asm-frv/highmem.h
===================================================================
--- linux-2.6-tip.orig/include/asm-frv/highmem.h
+++ linux-2.6-tip/include/asm-frv/highmem.h
@@ -18,6 +18,7 @@
#ifdef __KERNEL__
#include <linux/init.h>
+#include <linux/highmem.h>
#include <asm/mem-layout.h>
#include <asm/spr-regs.h>
#include <asm/mb-regs.h>
@@ -116,6 +117,7 @@ static inline void *kmap_atomic(struct p
unsigned long paddr;
pagefault_disable();
+ debug_kmap_atomic(type);
paddr = page_to_phys(page);
switch (type) {
Index: linux-2.6-tip/include/asm-mn10300/highmem.h
===================================================================
--- linux-2.6-tip.orig/include/asm-mn10300/highmem.h
+++ linux-2.6-tip/include/asm-mn10300/highmem.h
@@ -16,6 +16,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
+#include <linux/highmem.h>
#include <asm/kmap_types.h>
#include <asm/pgtable.h>
@@ -77,6 +78,7 @@ static inline unsigned long kmap_atomic(
if (page < highmem_start_page)
return page_address(page);
+ debug_kmap_atomic(type);
idx = type + KM_TYPE_NR * smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
#if HIGHMEM_DEBUG
next prev parent reply other threads:[~2009-03-14 4:21 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 ` [tip:x86/mm] x86: unify kmap_atomic_pfn() and iomap_atomic_prot_pfn(), fix Ingo Molnar
2009-03-14 4:19 ` [PATCH -tip 1/2] mm: introduce debug_kmap_atomic Akinobu Mita
2009-03-14 4:20 ` Akinobu Mita [this message]
2009-03-14 13:15 ` 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=20090314042054.GB3697@localhost.localdomain \
--to=akinobu.mita@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--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