From: Randy Dunlap <[email protected]>
Subject: kmap_types: make most arches use generic header file
Convert most arches (*except frv*) to use asm-generic/kmap_types.h.
Each arch still has its own kmap_types.h for customization if
needed (like frv).
KM_FENCE is now controlled by CONFIG_HIGHMEM.
Built on x86_64, i386, mips, sparc32, sparc64,
alpha, powerpc64, ia64, and m68k.
Note: Removed KM_PTE2 from generic kmap_types.h file; it was defined
but not used by avr32.
Signed-off-by: Randy Dunlap <[email protected]>
Cc: <[email protected]>
Acked-by: Mike Frysinger <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Bryan Wu <[email protected]>
Cc: Mikael Starvik <[email protected]>
Cc: Hirokazu Takata <[email protected]>
Cc: "Luck Tony" <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: David Howells <[email protected]>
Cc: Kyle McMartin <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Arnd Bergmann <[email protected]>
---
arch/alpha/include/asm/kmap_types.h | 26 -------------------------
arch/arm/include/asm/kmap_types.h | 21 --------------------
arch/arm/mm/cache-feroceon-l2.c | 2 -
arch/arm/mm/cache-xsc3l2.c | 2 -
arch/avr32/include/asm/kmap_types.h | 26 -------------------------
arch/blackfin/include/asm/kmap_types.h | 17 ----------------
arch/cris/include/asm/kmap_types.h | 17 ----------------
arch/h8300/include/asm/kmap_types.h | 17 ----------------
arch/ia64/include/asm/kmap_types.h | 26 -------------------------
arch/m32r/include/asm/kmap_types.h | 25 ------------------------
arch/m68k/include/asm/kmap_types.h | 17 ----------------
arch/microblaze/include/asm/kmap_types.h | 25 ------------------------
arch/mips/include/asm/kmap_types.h | 26 -------------------------
arch/mn10300/include/asm/kmap_types.h | 27 --------------------------
arch/parisc/include/asm/kmap_types.h | 26 -------------------------
arch/powerpc/include/asm/kmap_types.h | 26 -------------------------
arch/powerpc/mm/dma-noncoherent.c | 4 +--
arch/powerpc/mm/mem.c | 4 +--
arch/s390/include/asm/kmap_types.h | 17 ----------------
arch/sh/include/asm/kmap_types.h | 26 -------------------------
arch/sparc/include/asm/kmap_types.h | 17 ----------------
arch/um/include/asm/kmap_types.h | 25 ------------------------
arch/x86/include/asm/kmap_types.h | 25 ------------------------
arch/xtensa/include/asm/kmap_types.h | 27 --------------------------
include/asm-generic/kmap_types.h | 32 +++++++++++++++++++++++++++++++
25 files changed, 58 insertions(+), 445 deletions(-)
--- lnx-2630-rc8-kmaptypes.orig/arch/alpha/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/alpha/include/asm/kmap_types.h
@@ -3,30 +3,6 @@
/* Dummy header just to define km_type. */
-
-#ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
-#endif
-
-enum km_type {
-D(0) KM_BOUNCE_READ,
-D(1) KM_SKB_SUNRPC_DATA,
-D(2) KM_SKB_DATA_SOFTIRQ,
-D(3) KM_USER0,
-D(4) KM_USER1,
-D(5) KM_BIO_SRC_IRQ,
-D(6) KM_BIO_DST_IRQ,
-D(7) KM_PTE0,
-D(8) KM_PTE1,
-D(9) KM_IRQ0,
-D(10) KM_IRQ1,
-D(11) KM_SOFTIRQ0,
-D(12) KM_SOFTIRQ1,
-D(13) KM_TYPE_NR
-};
-
-#undef D
+#include <asm-generic/kmap_types.h>
#endif
--- lnx-2630-rc8-kmaptypes.orig/arch/arm/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/arm/include/asm/kmap_types.h
@@ -1,25 +1,6 @@
#ifndef __ARM_KMAP_TYPES_H
#define __ARM_KMAP_TYPES_H
-/*
- * This is the "bare minimum". AIO seems to require this.
- */
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_BIO_SRC_IRQ,
- KM_BIO_DST_IRQ,
- KM_PTE0,
- KM_PTE1,
- KM_IRQ0,
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_L2_CACHE,
- KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
#endif
--- lnx-2630-rc8-kmaptypes.orig/arch/arm/mm/cache-feroceon-l2.c
+++ lnx-2630-rc8-kmaptypes/arch/arm/mm/cache-feroceon-l2.c
@@ -50,7 +50,7 @@ static inline unsigned long l2_start_va(
* memory mapping. This is protected with the disabling of
* interrupts by the caller.
*/
- unsigned long idx = KM_L2_CACHE + KM_TYPE_NR * smp_processor_id();
+ unsigned long idx = KM_SYNC_ICACHE + KM_TYPE_NR * smp_processor_id();
unsigned long vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
set_pte_ext(TOP_PTE(vaddr), pfn_pte(paddr >> PAGE_SHIFT, PAGE_KERNEL), 0);
local_flush_tlb_kernel_page(vaddr);
--- lnx-2630-rc8-kmaptypes.orig/arch/arm/mm/cache-xsc3l2.c
+++ lnx-2630-rc8-kmaptypes/arch/arm/mm/cache-xsc3l2.c
@@ -95,7 +95,7 @@ static inline unsigned long l2_map_va(un
*/
unsigned long idx;
raw_local_irq_restore(flags);
- idx = KM_L2_CACHE + KM_TYPE_NR * smp_processor_id();
+ idx = KM_SYNC_ICACHE + KM_TYPE_NR * smp_processor_id();
va = __fix_to_virt(FIX_KMAP_BEGIN + idx);
raw_local_irq_restore(flags | PSR_I_BIT);
set_pte_ext(TOP_PTE(va), pfn_pte(pa >> PAGE_SHIFT, PAGE_KERNEL), 0);
--- lnx-2630-rc8-kmaptypes.orig/arch/avr32/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/avr32/include/asm/kmap_types.h
@@ -1,30 +1,6 @@
#ifndef __ASM_AVR32_KMAP_TYPES_H
#define __ASM_AVR32_KMAP_TYPES_H
-#ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
-#endif
-
-enum km_type {
-D(0) KM_BOUNCE_READ,
-D(1) KM_SKB_SUNRPC_DATA,
-D(2) KM_SKB_DATA_SOFTIRQ,
-D(3) KM_USER0,
-D(4) KM_USER1,
-D(5) KM_BIO_SRC_IRQ,
-D(6) KM_BIO_DST_IRQ,
-D(7) KM_PTE0,
-D(8) KM_PTE1,
-D(9) KM_PTE2,
-D(10) KM_IRQ0,
-D(11) KM_IRQ1,
-D(12) KM_SOFTIRQ0,
-D(13) KM_SOFTIRQ1,
-D(14) KM_TYPE_NR
-};
-
-#undef D
+#include <asm-generic/kmap_types.h>
#endif /* __ASM_AVR32_KMAP_TYPES_H */
--- lnx-2630-rc8-kmaptypes.orig/arch/blackfin/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/blackfin/include/asm/kmap_types.h
@@ -1,21 +1,6 @@
#ifndef _ASM_KMAP_TYPES_H
#define _ASM_KMAP_TYPES_H
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_BIO_SRC_IRQ,
- KM_BIO_DST_IRQ,
- KM_PTE0,
- KM_PTE1,
- KM_IRQ0,
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
#endif
--- lnx-2630-rc8-kmaptypes.orig/arch/cris/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/cris/include/asm/kmap_types.h
@@ -5,21 +5,6 @@
* is actually used on cris.
*/
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_BIO_SRC_IRQ,
- KM_BIO_DST_IRQ,
- KM_PTE0,
- KM_PTE1,
- KM_IRQ0,
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
#endif
--- lnx-2630-rc8-kmaptypes.orig/arch/h8300/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/h8300/include/asm/kmap_types.h
@@ -1,21 +1,6 @@
#ifndef _ASM_H8300_KMAP_TYPES_H
#define _ASM_H8300_KMAP_TYPES_H
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_BIO_SRC_IRQ,
- KM_BIO_DST_IRQ,
- KM_PTE0,
- KM_PTE1,
- KM_IRQ0,
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
#endif
--- lnx-2630-rc8-kmaptypes.orig/arch/ia64/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/ia64/include/asm/kmap_types.h
@@ -1,30 +1,6 @@
#ifndef _ASM_IA64_KMAP_TYPES_H
#define _ASM_IA64_KMAP_TYPES_H
-
-#ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
-#endif
-
-enum km_type {
-D(0) KM_BOUNCE_READ,
-D(1) KM_SKB_SUNRPC_DATA,
-D(2) KM_SKB_DATA_SOFTIRQ,
-D(3) KM_USER0,
-D(4) KM_USER1,
-D(5) KM_BIO_SRC_IRQ,
-D(6) KM_BIO_DST_IRQ,
-D(7) KM_PTE0,
-D(8) KM_PTE1,
-D(9) KM_IRQ0,
-D(10) KM_IRQ1,
-D(11) KM_SOFTIRQ0,
-D(12) KM_SOFTIRQ1,
-D(13) KM_TYPE_NR
-};
-
-#undef D
+#include <asm-generic/kmap_types.h>
#endif /* _ASM_IA64_KMAP_TYPES_H */
--- lnx-2630-rc8-kmaptypes.orig/arch/m32r/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/m32r/include/asm/kmap_types.h
@@ -1,29 +1,6 @@
#ifndef __M32R_KMAP_TYPES_H
#define __M32R_KMAP_TYPES_H
-#ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
-#endif
-
-enum km_type {
-D(0) KM_BOUNCE_READ,
-D(1) KM_SKB_SUNRPC_DATA,
-D(2) KM_SKB_DATA_SOFTIRQ,
-D(3) KM_USER0,
-D(4) KM_USER1,
-D(5) KM_BIO_SRC_IRQ,
-D(6) KM_BIO_DST_IRQ,
-D(7) KM_PTE0,
-D(8) KM_PTE1,
-D(9) KM_IRQ0,
-D(10) KM_IRQ1,
-D(11) KM_SOFTIRQ0,
-D(12) KM_SOFTIRQ1,
-D(13) KM_TYPE_NR
-};
-
-#undef D
+#include <asm-generic/kmap_types.h>
#endif /* __M32R_KMAP_TYPES_H */
--- lnx-2630-rc8-kmaptypes.orig/arch/m68k/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/m68k/include/asm/kmap_types.h
@@ -1,21 +1,6 @@
#ifndef __ASM_M68K_KMAP_TYPES_H
#define __ASM_M68K_KMAP_TYPES_H
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_BIO_SRC_IRQ,
- KM_BIO_DST_IRQ,
- KM_PTE0,
- KM_PTE1,
- KM_IRQ0,
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
#endif /* __ASM_M68K_KMAP_TYPES_H */
--- lnx-2630-rc8-kmaptypes.orig/arch/microblaze/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/microblaze/include/asm/kmap_types.h
@@ -1,29 +1,6 @@
-/*
- * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-
#ifndef _ASM_MICROBLAZE_KMAP_TYPES_H
#define _ASM_MICROBLAZE_KMAP_TYPES_H
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_BIO_SRC_IRQ,
- KM_BIO_DST_IRQ,
- KM_PTE0,
- KM_PTE1,
- KM_IRQ0,
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_TYPE_NR,
-};
+#include <asm-generic/kmap_types.h>
#endif /* _ASM_MICROBLAZE_KMAP_TYPES_H */
--- lnx-2630-rc8-kmaptypes.orig/arch/mips/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/mips/include/asm/kmap_types.h
@@ -1,30 +1,6 @@
#ifndef _ASM_KMAP_TYPES_H
#define _ASM_KMAP_TYPES_H
-
-#ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
-#endif
-
-enum km_type {
-D(0) KM_BOUNCE_READ,
-D(1) KM_SKB_SUNRPC_DATA,
-D(2) KM_SKB_DATA_SOFTIRQ,
-D(3) KM_USER0,
-D(4) KM_USER1,
-D(5) KM_BIO_SRC_IRQ,
-D(6) KM_BIO_DST_IRQ,
-D(7) KM_PTE0,
-D(8) KM_PTE1,
-D(9) KM_IRQ0,
-D(10) KM_IRQ1,
-D(11) KM_SOFTIRQ0,
-D(12) KM_SOFTIRQ1,
-D(13) KM_TYPE_NR
-};
-
-#undef D
+#include <asm-generic/kmap_types.h>
#endif
--- lnx-2630-rc8-kmaptypes.orig/arch/mn10300/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/mn10300/include/asm/kmap_types.h
@@ -1,31 +1,6 @@
-/* MN10300 kmap_atomic() slot IDs
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells ([email protected])
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
#ifndef _ASM_KMAP_TYPES_H
#define _ASM_KMAP_TYPES_H
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_BIO_SRC_IRQ,
- KM_BIO_DST_IRQ,
- KM_PTE0,
- KM_PTE1,
- KM_IRQ0,
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
#endif /* _ASM_KMAP_TYPES_H */
--- lnx-2630-rc8-kmaptypes.orig/arch/parisc/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/parisc/include/asm/kmap_types.h
@@ -1,30 +1,6 @@
#ifndef _ASM_KMAP_TYPES_H
#define _ASM_KMAP_TYPES_H
-
-#ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
-#endif
-
-enum km_type {
-D(0) KM_BOUNCE_READ,
-D(1) KM_SKB_SUNRPC_DATA,
-D(2) KM_SKB_DATA_SOFTIRQ,
-D(3) KM_USER0,
-D(4) KM_USER1,
-D(5) KM_BIO_SRC_IRQ,
-D(6) KM_BIO_DST_IRQ,
-D(7) KM_PTE0,
-D(8) KM_PTE1,
-D(9) KM_IRQ0,
-D(10) KM_IRQ1,
-D(11) KM_SOFTIRQ0,
-D(12) KM_SOFTIRQ1,
-D(13) KM_TYPE_NR
-};
-
-#undef D
+#include <asm-generic/kmap_types.h>
#endif
--- lnx-2630-rc8-kmaptypes.orig/arch/powerpc/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/powerpc/include/asm/kmap_types.h
@@ -3,31 +3,7 @@
#ifdef __KERNEL__
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_BIO_SRC_IRQ,
- KM_BIO_DST_IRQ,
- KM_PTE0,
- KM_PTE1,
- KM_IRQ0,
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_PPC_SYNC_PAGE,
- KM_PPC_SYNC_ICACHE,
- KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_KMAP_TYPES_H */
--- lnx-2630-rc8-kmaptypes.orig/arch/powerpc/mm/dma-noncoherent.c
+++ lnx-2630-rc8-kmaptypes/arch/powerpc/mm/dma-noncoherent.c
@@ -364,11 +364,11 @@ static inline void __dma_sync_page_highm
do {
start = (unsigned long)kmap_atomic(page + seg_nr,
- KM_PPC_SYNC_PAGE) + seg_offset;
+ KM_SYNC_DCACHE) + seg_offset;
/* Sync this buffer segment */
__dma_sync((void *)start, seg_size, direction);
- kunmap_atomic((void *)start, KM_PPC_SYNC_PAGE);
+ kunmap_atomic((void *)start, KM_SYNC_DACHE);
seg_nr++;
/* Calculate next buffer segment size */
--- lnx-2630-rc8-kmaptypes.orig/arch/powerpc/mm/mem.c
+++ lnx-2630-rc8-kmaptypes/arch/powerpc/mm/mem.c
@@ -418,9 +418,9 @@ EXPORT_SYMBOL(flush_dcache_page);
void flush_dcache_icache_page(struct page *page)
{
#ifdef CONFIG_BOOKE
- void *start = kmap_atomic(page, KM_PPC_SYNC_ICACHE);
+ void *start = kmap_atomic(page, KM_SYNC_ICACHE);
__flush_dcache_icache(start);
- kunmap_atomic(start, KM_PPC_SYNC_ICACHE);
+ kunmap_atomic(start, KM_SYNC_ICACHE);
#elif defined(CONFIG_8xx) || defined(CONFIG_PPC64)
/* On 8xx there is no need to kmap since highmem is not supported */
__flush_dcache_icache(page_address(page));
--- lnx-2630-rc8-kmaptypes.orig/arch/s390/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/s390/include/asm/kmap_types.h
@@ -2,22 +2,7 @@
#ifndef _ASM_KMAP_TYPES_H
#define _ASM_KMAP_TYPES_H
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_BIO_SRC_IRQ,
- KM_BIO_DST_IRQ,
- KM_PTE0,
- KM_PTE1,
- KM_IRQ0,
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
#endif
#endif /* __KERNEL__ */
--- lnx-2630-rc8-kmaptypes.orig/arch/sh/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/sh/include/asm/kmap_types.h
@@ -3,30 +3,6 @@
/* Dummy header just to define km_type. */
-
-#ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
-#endif
-
-enum km_type {
-D(0) KM_BOUNCE_READ,
-D(1) KM_SKB_SUNRPC_DATA,
-D(2) KM_SKB_DATA_SOFTIRQ,
-D(3) KM_USER0,
-D(4) KM_USER1,
-D(5) KM_BIO_SRC_IRQ,
-D(6) KM_BIO_DST_IRQ,
-D(7) KM_PTE0,
-D(8) KM_PTE1,
-D(9) KM_IRQ0,
-D(10) KM_IRQ1,
-D(11) KM_SOFTIRQ0,
-D(12) KM_SOFTIRQ1,
-D(13) KM_TYPE_NR
-};
-
-#undef D
+#include <asm-generic/kmap_types.h>
#endif
--- lnx-2630-rc8-kmaptypes.orig/arch/sparc/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/sparc/include/asm/kmap_types.h
@@ -5,21 +5,6 @@
* is actually used on sparc. -DaveM
*/
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_BIO_SRC_IRQ,
- KM_BIO_DST_IRQ,
- KM_PTE0,
- KM_PTE1,
- KM_IRQ0,
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
#endif
--- lnx-2630-rc8-kmaptypes.orig/arch/um/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/um/include/asm/kmap_types.h
@@ -1,29 +1,6 @@
-/*
- * Copyright (C) 2002 Jeff Dike ([email protected])
- * Licensed under the GPL
- */
-
#ifndef __UM_KMAP_TYPES_H
#define __UM_KMAP_TYPES_H
-/* No more #include "asm/arch/kmap_types.h" ! */
-
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */
- KM_BIO_SRC_IRQ,
- KM_BIO_DST_IRQ,
- KM_PTE0,
- KM_PTE1,
- KM_IRQ0,
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
#endif
--- lnx-2630-rc8-kmaptypes.orig/arch/x86/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/x86/include/asm/kmap_types.h
@@ -1,29 +1,6 @@
#ifndef _ASM_X86_KMAP_TYPES_H
#define _ASM_X86_KMAP_TYPES_H
-#if defined(CONFIG_X86_32) && defined(CONFIG_DEBUG_HIGHMEM)
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
-#endif
-
-enum km_type {
-D(0) KM_BOUNCE_READ,
-D(1) KM_SKB_SUNRPC_DATA,
-D(2) KM_SKB_DATA_SOFTIRQ,
-D(3) KM_USER0,
-D(4) KM_USER1,
-D(5) KM_BIO_SRC_IRQ,
-D(6) KM_BIO_DST_IRQ,
-D(7) KM_PTE0,
-D(8) KM_PTE1,
-D(9) KM_IRQ0,
-D(10) KM_IRQ1,
-D(11) KM_SOFTIRQ0,
-D(12) KM_SOFTIRQ1,
-D(13) KM_TYPE_NR
-};
-
-#undef D
+#include <asm-generic/kmap_types.h>
#endif /* _ASM_X86_KMAP_TYPES_H */
--- lnx-2630-rc8-kmaptypes.orig/arch/xtensa/include/asm/kmap_types.h
+++ lnx-2630-rc8-kmaptypes/arch/xtensa/include/asm/kmap_types.h
@@ -1,31 +1,6 @@
-/*
- * include/asm-xtensa/kmap_types.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
#ifndef _XTENSA_KMAP_TYPES_H
#define _XTENSA_KMAP_TYPES_H
-enum km_type {
- KM_BOUNCE_READ,
- KM_SKB_SUNRPC_DATA,
- KM_SKB_DATA_SOFTIRQ,
- KM_USER0,
- KM_USER1,
- KM_BIO_SRC_IRQ,
- KM_BIO_DST_IRQ,
- KM_PTE0,
- KM_PTE1,
- KM_IRQ0,
- KM_IRQ1,
- KM_SOFTIRQ0,
- KM_SOFTIRQ1,
- KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
#endif /* _XTENSA_KMAP_TYPES_H */
--- /dev/null
+++ lnx-2630-rc8-kmaptypes/include/asm-generic/kmap_types.h
@@ -0,0 +1,32 @@
+#ifndef _ASM_GENERIC_KMAP_TYPES_H
+#define _ASM_GENERIC_KMAP_TYPES_H
+
+#ifdef CONFIG_DEBUG_HIGHMEM
+# define D(n) __KM_FENCE_##n ,
+#else
+# define D(n)
+#endif
+
+enum km_type {
+D(0) KM_BOUNCE_READ,
+D(1) KM_SKB_SUNRPC_DATA,
+D(2) KM_SKB_DATA_SOFTIRQ,
+D(3) KM_USER0,
+D(4) KM_USER1,
+D(5) KM_BIO_SRC_IRQ,
+D(6) KM_BIO_DST_IRQ,
+D(7) KM_PTE0,
+D(8) KM_PTE1,
+D(9) KM_IRQ0,
+D(10) KM_IRQ1,
+D(11) KM_SOFTIRQ0,
+D(12) KM_SOFTIRQ1,
+D(13) KM_SYNC_ICACHE,
+D(14) KM_SYNC_DCACHE,
+D(15) KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */
+D(16) KM_TYPE_NR
+};
+
+#undef D
+
+#endif
On Thursday 04 June 2009, Randy Dunlap wrote:
> From: Randy Dunlap <[email protected]>
> Subject: kmap_types: make most arches use generic header file
>
> Convert most arches (*except frv*) to use asm-generic/kmap_types.h.
> Each arch still has its own kmap_types.h for customization if
> needed (like frv).
>
> KM_FENCE is now controlled by CONFIG_HIGHMEM.
>
> Built on x86_64, i386, mips, sparc32, sparc64,
> alpha, powerpc64, ia64, and m68k.
>
> Note: Removed KM_PTE2 from generic kmap_types.h file; it was defined
> but not used by avr32.
Every change in here looks good to me now, so
Acked-by: Arnd Bergmann <[email protected]>
Two questions though:
1. The patch still conflicts with mine from the asm-generic
tree. Yours is better in multiple ways (cleans up all the
archs, adds the necessary types for ppc and arm), so should
I drop mine now? I guess I can also make my file identical
to yours so independent of who gets in first, there should be
a clean merge?
2. should the asm and powerpc bits go through the arch maintainer
trees? I guess since they are slightly more than an obvious
consolidation, at least an Ack from BenH and Russell would be
appropriate.
Arnd <><
Arnd Bergmann wrote:
> On Thursday 04 June 2009, Randy Dunlap wrote:
>> From: Randy Dunlap <[email protected]>
>> Subject: kmap_types: make most arches use generic header file
>>
>> Convert most arches (*except frv*) to use asm-generic/kmap_types.h.
>> Each arch still has its own kmap_types.h for customization if
>> needed (like frv).
>>
>> KM_FENCE is now controlled by CONFIG_HIGHMEM.
>>
>> Built on x86_64, i386, mips, sparc32, sparc64,
>> alpha, powerpc64, ia64, and m68k.
>>
>> Note: Removed KM_PTE2 from generic kmap_types.h file; it was defined
>> but not used by avr32.
>
> Every change in here looks good to me now, so
>
> Acked-by: Arnd Bergmann <[email protected]>
>
> Two questions though:
>
> 1. The patch still conflicts with mine from the asm-generic
> tree. Yours is better in multiple ways (cleans up all the
> archs, adds the necessary types for ppc and arm), so should
> I drop mine now? I guess I can also make my file identical
> to yours so independent of who gets in first, there should be
> a clean merge?
or you can take my patch into your asm-generic patchset. :)
> 2. should the asm and powerpc bits go through the arch maintainer
arm
> trees? I guess since they are slightly more than an obvious
> consolidation, at least an Ack from BenH and Russell would be
> appropriate.
Sure, acks from lots of arch maintainers would be Good,
esp. BenH and Russell.
--
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/
On Thu, Jun 04, 2009 at 11:00:16AM -0700, Randy Dunlap wrote:
>From: Randy Dunlap <[email protected]>
>Subject: kmap_types: make most arches use generic header file
>
>Convert most arches (*except frv*) to use asm-generic/kmap_types.h.
>Each arch still has its own kmap_types.h for customization if
>needed (like frv).
>
>KM_FENCE is now controlled by CONFIG_HIGHMEM.
>
>Built on x86_64, i386, mips, sparc32, sparc64,
>alpha, powerpc64, ia64, and m68k.
>
>Note: Removed KM_PTE2 from generic kmap_types.h file; it was defined
>but not used by avr32.
>
>Signed-off-by: Randy Dunlap <[email protected]>
>Cc: <[email protected]>
>Acked-by: Mike Frysinger <[email protected]>
>Cc: Richard Henderson <[email protected]>
>Cc: Ivan Kokshaysky <[email protected]>
>Cc: Bryan Wu <[email protected]>
>Cc: Mikael Starvik <[email protected]>
>Cc: Hirokazu Takata <[email protected]>
>Cc: "Luck Tony" <[email protected]>
>Cc: Geert Uytterhoeven <[email protected]>
>Cc: Ralf Baechle <[email protected]>
>Cc: David Howells <[email protected]>
>Cc: Kyle McMartin <[email protected]>
>Cc: Martin Schwidefsky <[email protected]>
>Cc: Paul Mundt <[email protected]>
>Cc: "David S. Miller" <[email protected]>
>Cc: Ingo Molnar <[email protected]>
>Cc: Thomas Gleixner <[email protected]>
>Cc: "H. Peter Anvin" <[email protected]>
>Cc: Arnd Bergmann <[email protected]>
UML only uses KM_TYPE_NR and KM_UML_USERCOPY, so
this patch should be fine for UML.
Acked-by: WANG Cong <[email protected]>
On Friday 05 June 2009, Randy Dunlap wrote:
>
> > 1. The patch still conflicts with mine from the asm-generic
> > tree. Yours is better in multiple ways (cleans up all the
> > archs, adds the necessary types for ppc and arm), so should
> > I drop mine now? I guess I can also make my file identical
> > to yours so independent of who gets in first, there should be
> > a clean merge?
>
> or you can take my patch into your asm-generic patchset. :)
I've thought about that, but for 2.6.31, I'd like to only do
the first half of adding ~50 files to include/asm-generic/,
and then work with the arch maintainers on the second half,
removing the code from their directories for 2.6.32, so this
doesn't fit that well.
Arnd <><
On Thu, Jun 04, 2009 at 08:00:16PM +0200, Randy Dunlap wrote:
> From: Randy Dunlap <[email protected]>
> Subject: kmap_types: make most arches use generic header file
>
> Convert most arches (*except frv*) to use asm-generic/kmap_types.h.
> Each arch still has its own kmap_types.h for customization if
> needed (like frv).
>
> KM_FENCE is now controlled by CONFIG_HIGHMEM.
>
> Built on x86_64, i386, mips, sparc32, sparc64,
> alpha, powerpc64, ia64, and m68k.
>
> Note: Removed KM_PTE2 from generic kmap_types.h file; it was defined
> but not used by avr32.
For the CRIS parts:
Acked-by: Jesper Nilsson <[email protected]>
> Signed-off-by: Randy Dunlap <[email protected]>
> Cc: <[email protected]>
> Acked-by: Mike Frysinger <[email protected]>
> Cc: Richard Henderson <[email protected]>
> Cc: Ivan Kokshaysky <[email protected]>
> Cc: Bryan Wu <[email protected]>
> Cc: Mikael Starvik <[email protected]>
> Cc: Hirokazu Takata <[email protected]>
> Cc: "Luck Tony" <[email protected]>
> Cc: Geert Uytterhoeven <[email protected]>
> Cc: Ralf Baechle <[email protected]>
> Cc: David Howells <[email protected]>
> Cc: Kyle McMartin <[email protected]>
> Cc: Martin Schwidefsky <[email protected]>
> Cc: Paul Mundt <[email protected]>
> Cc: "David S. Miller" <[email protected]>
> Cc: Ingo Molnar <[email protected]>
> Cc: Thomas Gleixner <[email protected]>
> Cc: "H. Peter Anvin" <[email protected]>
> Cc: Arnd Bergmann <[email protected]>
> ---
> arch/alpha/include/asm/kmap_types.h | 26 -------------------------
> arch/arm/include/asm/kmap_types.h | 21 --------------------
> arch/arm/mm/cache-feroceon-l2.c | 2 -
> arch/arm/mm/cache-xsc3l2.c | 2 -
> arch/avr32/include/asm/kmap_types.h | 26 -------------------------
> arch/blackfin/include/asm/kmap_types.h | 17 ----------------
> arch/cris/include/asm/kmap_types.h | 17 ----------------
> arch/h8300/include/asm/kmap_types.h | 17 ----------------
> arch/ia64/include/asm/kmap_types.h | 26 -------------------------
> arch/m32r/include/asm/kmap_types.h | 25 ------------------------
> arch/m68k/include/asm/kmap_types.h | 17 ----------------
> arch/microblaze/include/asm/kmap_types.h | 25 ------------------------
> arch/mips/include/asm/kmap_types.h | 26 -------------------------
> arch/mn10300/include/asm/kmap_types.h | 27 --------------------------
> arch/parisc/include/asm/kmap_types.h | 26 -------------------------
> arch/powerpc/include/asm/kmap_types.h | 26 -------------------------
> arch/powerpc/mm/dma-noncoherent.c | 4 +--
> arch/powerpc/mm/mem.c | 4 +--
> arch/s390/include/asm/kmap_types.h | 17 ----------------
> arch/sh/include/asm/kmap_types.h | 26 -------------------------
> arch/sparc/include/asm/kmap_types.h | 17 ----------------
> arch/um/include/asm/kmap_types.h | 25 ------------------------
> arch/x86/include/asm/kmap_types.h | 25 ------------------------
> arch/xtensa/include/asm/kmap_types.h | 27 --------------------------
> include/asm-generic/kmap_types.h | 32 +++++++++++++++++++++++++++++++
> 25 files changed, 58 insertions(+), 445 deletions(-)
>
> --- lnx-2630-rc8-kmaptypes.orig/arch/alpha/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/alpha/include/asm/kmap_types.h
> @@ -3,30 +3,6 @@
>
> /* Dummy header just to define km_type. */
>
> -
> -#ifdef CONFIG_DEBUG_HIGHMEM
> -# define D(n) __KM_FENCE_##n ,
> -#else
> -# define D(n)
> -#endif
> -
> -enum km_type {
> -D(0) KM_BOUNCE_READ,
> -D(1) KM_SKB_SUNRPC_DATA,
> -D(2) KM_SKB_DATA_SOFTIRQ,
> -D(3) KM_USER0,
> -D(4) KM_USER1,
> -D(5) KM_BIO_SRC_IRQ,
> -D(6) KM_BIO_DST_IRQ,
> -D(7) KM_PTE0,
> -D(8) KM_PTE1,
> -D(9) KM_IRQ0,
> -D(10) KM_IRQ1,
> -D(11) KM_SOFTIRQ0,
> -D(12) KM_SOFTIRQ1,
> -D(13) KM_TYPE_NR
> -};
> -
> -#undef D
> +#include <asm-generic/kmap_types.h>
>
> #endif
> --- lnx-2630-rc8-kmaptypes.orig/arch/arm/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/arm/include/asm/kmap_types.h
> @@ -1,25 +1,6 @@
> #ifndef __ARM_KMAP_TYPES_H
> #define __ARM_KMAP_TYPES_H
>
> -/*
> - * This is the "bare minimum". AIO seems to require this.
> - */
> -enum km_type {
> - KM_BOUNCE_READ,
> - KM_SKB_SUNRPC_DATA,
> - KM_SKB_DATA_SOFTIRQ,
> - KM_USER0,
> - KM_USER1,
> - KM_BIO_SRC_IRQ,
> - KM_BIO_DST_IRQ,
> - KM_PTE0,
> - KM_PTE1,
> - KM_IRQ0,
> - KM_IRQ1,
> - KM_SOFTIRQ0,
> - KM_SOFTIRQ1,
> - KM_L2_CACHE,
> - KM_TYPE_NR
> -};
> +#include <asm-generic/kmap_types.h>
>
> #endif
> --- lnx-2630-rc8-kmaptypes.orig/arch/arm/mm/cache-feroceon-l2.c
> +++ lnx-2630-rc8-kmaptypes/arch/arm/mm/cache-feroceon-l2.c
> @@ -50,7 +50,7 @@ static inline unsigned long l2_start_va(
> * memory mapping. This is protected with the disabling of
> * interrupts by the caller.
> */
> - unsigned long idx = KM_L2_CACHE + KM_TYPE_NR * smp_processor_id();
> + unsigned long idx = KM_SYNC_ICACHE + KM_TYPE_NR * smp_processor_id();
> unsigned long vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
> set_pte_ext(TOP_PTE(vaddr), pfn_pte(paddr >> PAGE_SHIFT, PAGE_KERNEL), 0);
> local_flush_tlb_kernel_page(vaddr);
> --- lnx-2630-rc8-kmaptypes.orig/arch/arm/mm/cache-xsc3l2.c
> +++ lnx-2630-rc8-kmaptypes/arch/arm/mm/cache-xsc3l2.c
> @@ -95,7 +95,7 @@ static inline unsigned long l2_map_va(un
> */
> unsigned long idx;
> raw_local_irq_restore(flags);
> - idx = KM_L2_CACHE + KM_TYPE_NR * smp_processor_id();
> + idx = KM_SYNC_ICACHE + KM_TYPE_NR * smp_processor_id();
> va = __fix_to_virt(FIX_KMAP_BEGIN + idx);
> raw_local_irq_restore(flags | PSR_I_BIT);
> set_pte_ext(TOP_PTE(va), pfn_pte(pa >> PAGE_SHIFT, PAGE_KERNEL), 0);
> --- lnx-2630-rc8-kmaptypes.orig/arch/avr32/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/avr32/include/asm/kmap_types.h
> @@ -1,30 +1,6 @@
> #ifndef __ASM_AVR32_KMAP_TYPES_H
> #define __ASM_AVR32_KMAP_TYPES_H
>
> -#ifdef CONFIG_DEBUG_HIGHMEM
> -# define D(n) __KM_FENCE_##n ,
> -#else
> -# define D(n)
> -#endif
> -
> -enum km_type {
> -D(0) KM_BOUNCE_READ,
> -D(1) KM_SKB_SUNRPC_DATA,
> -D(2) KM_SKB_DATA_SOFTIRQ,
> -D(3) KM_USER0,
> -D(4) KM_USER1,
> -D(5) KM_BIO_SRC_IRQ,
> -D(6) KM_BIO_DST_IRQ,
> -D(7) KM_PTE0,
> -D(8) KM_PTE1,
> -D(9) KM_PTE2,
> -D(10) KM_IRQ0,
> -D(11) KM_IRQ1,
> -D(12) KM_SOFTIRQ0,
> -D(13) KM_SOFTIRQ1,
> -D(14) KM_TYPE_NR
> -};
> -
> -#undef D
> +#include <asm-generic/kmap_types.h>
>
> #endif /* __ASM_AVR32_KMAP_TYPES_H */
> --- lnx-2630-rc8-kmaptypes.orig/arch/blackfin/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/blackfin/include/asm/kmap_types.h
> @@ -1,21 +1,6 @@
> #ifndef _ASM_KMAP_TYPES_H
> #define _ASM_KMAP_TYPES_H
>
> -enum km_type {
> - KM_BOUNCE_READ,
> - KM_SKB_SUNRPC_DATA,
> - KM_SKB_DATA_SOFTIRQ,
> - KM_USER0,
> - KM_USER1,
> - KM_BIO_SRC_IRQ,
> - KM_BIO_DST_IRQ,
> - KM_PTE0,
> - KM_PTE1,
> - KM_IRQ0,
> - KM_IRQ1,
> - KM_SOFTIRQ0,
> - KM_SOFTIRQ1,
> - KM_TYPE_NR
> -};
> +#include <asm-generic/kmap_types.h>
>
> #endif
> --- lnx-2630-rc8-kmaptypes.orig/arch/cris/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/cris/include/asm/kmap_types.h
> @@ -5,21 +5,6 @@
> * is actually used on cris.
> */
>
> -enum km_type {
> - KM_BOUNCE_READ,
> - KM_SKB_SUNRPC_DATA,
> - KM_SKB_DATA_SOFTIRQ,
> - KM_USER0,
> - KM_USER1,
> - KM_BIO_SRC_IRQ,
> - KM_BIO_DST_IRQ,
> - KM_PTE0,
> - KM_PTE1,
> - KM_IRQ0,
> - KM_IRQ1,
> - KM_SOFTIRQ0,
> - KM_SOFTIRQ1,
> - KM_TYPE_NR
> -};
> +#include <asm-generic/kmap_types.h>
>
> #endif
> --- lnx-2630-rc8-kmaptypes.orig/arch/h8300/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/h8300/include/asm/kmap_types.h
> @@ -1,21 +1,6 @@
> #ifndef _ASM_H8300_KMAP_TYPES_H
> #define _ASM_H8300_KMAP_TYPES_H
>
> -enum km_type {
> - KM_BOUNCE_READ,
> - KM_SKB_SUNRPC_DATA,
> - KM_SKB_DATA_SOFTIRQ,
> - KM_USER0,
> - KM_USER1,
> - KM_BIO_SRC_IRQ,
> - KM_BIO_DST_IRQ,
> - KM_PTE0,
> - KM_PTE1,
> - KM_IRQ0,
> - KM_IRQ1,
> - KM_SOFTIRQ0,
> - KM_SOFTIRQ1,
> - KM_TYPE_NR
> -};
> +#include <asm-generic/kmap_types.h>
>
> #endif
> --- lnx-2630-rc8-kmaptypes.orig/arch/ia64/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/ia64/include/asm/kmap_types.h
> @@ -1,30 +1,6 @@
> #ifndef _ASM_IA64_KMAP_TYPES_H
> #define _ASM_IA64_KMAP_TYPES_H
>
> -
> -#ifdef CONFIG_DEBUG_HIGHMEM
> -# define D(n) __KM_FENCE_##n ,
> -#else
> -# define D(n)
> -#endif
> -
> -enum km_type {
> -D(0) KM_BOUNCE_READ,
> -D(1) KM_SKB_SUNRPC_DATA,
> -D(2) KM_SKB_DATA_SOFTIRQ,
> -D(3) KM_USER0,
> -D(4) KM_USER1,
> -D(5) KM_BIO_SRC_IRQ,
> -D(6) KM_BIO_DST_IRQ,
> -D(7) KM_PTE0,
> -D(8) KM_PTE1,
> -D(9) KM_IRQ0,
> -D(10) KM_IRQ1,
> -D(11) KM_SOFTIRQ0,
> -D(12) KM_SOFTIRQ1,
> -D(13) KM_TYPE_NR
> -};
> -
> -#undef D
> +#include <asm-generic/kmap_types.h>
>
> #endif /* _ASM_IA64_KMAP_TYPES_H */
> --- lnx-2630-rc8-kmaptypes.orig/arch/m32r/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/m32r/include/asm/kmap_types.h
> @@ -1,29 +1,6 @@
> #ifndef __M32R_KMAP_TYPES_H
> #define __M32R_KMAP_TYPES_H
>
> -#ifdef CONFIG_DEBUG_HIGHMEM
> -# define D(n) __KM_FENCE_##n ,
> -#else
> -# define D(n)
> -#endif
> -
> -enum km_type {
> -D(0) KM_BOUNCE_READ,
> -D(1) KM_SKB_SUNRPC_DATA,
> -D(2) KM_SKB_DATA_SOFTIRQ,
> -D(3) KM_USER0,
> -D(4) KM_USER1,
> -D(5) KM_BIO_SRC_IRQ,
> -D(6) KM_BIO_DST_IRQ,
> -D(7) KM_PTE0,
> -D(8) KM_PTE1,
> -D(9) KM_IRQ0,
> -D(10) KM_IRQ1,
> -D(11) KM_SOFTIRQ0,
> -D(12) KM_SOFTIRQ1,
> -D(13) KM_TYPE_NR
> -};
> -
> -#undef D
> +#include <asm-generic/kmap_types.h>
>
> #endif /* __M32R_KMAP_TYPES_H */
> --- lnx-2630-rc8-kmaptypes.orig/arch/m68k/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/m68k/include/asm/kmap_types.h
> @@ -1,21 +1,6 @@
> #ifndef __ASM_M68K_KMAP_TYPES_H
> #define __ASM_M68K_KMAP_TYPES_H
>
> -enum km_type {
> - KM_BOUNCE_READ,
> - KM_SKB_SUNRPC_DATA,
> - KM_SKB_DATA_SOFTIRQ,
> - KM_USER0,
> - KM_USER1,
> - KM_BIO_SRC_IRQ,
> - KM_BIO_DST_IRQ,
> - KM_PTE0,
> - KM_PTE1,
> - KM_IRQ0,
> - KM_IRQ1,
> - KM_SOFTIRQ0,
> - KM_SOFTIRQ1,
> - KM_TYPE_NR
> -};
> +#include <asm-generic/kmap_types.h>
>
> #endif /* __ASM_M68K_KMAP_TYPES_H */
> --- lnx-2630-rc8-kmaptypes.orig/arch/microblaze/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/microblaze/include/asm/kmap_types.h
> @@ -1,29 +1,6 @@
> -/*
> - * Copyright (C) 2006 Atmark Techno, Inc.
> - *
> - * This file is subject to the terms and conditions of the GNU General Public
> - * License. See the file "COPYING" in the main directory of this archive
> - * for more details.
> - */
> -
> #ifndef _ASM_MICROBLAZE_KMAP_TYPES_H
> #define _ASM_MICROBLAZE_KMAP_TYPES_H
>
> -enum km_type {
> - KM_BOUNCE_READ,
> - KM_SKB_SUNRPC_DATA,
> - KM_SKB_DATA_SOFTIRQ,
> - KM_USER0,
> - KM_USER1,
> - KM_BIO_SRC_IRQ,
> - KM_BIO_DST_IRQ,
> - KM_PTE0,
> - KM_PTE1,
> - KM_IRQ0,
> - KM_IRQ1,
> - KM_SOFTIRQ0,
> - KM_SOFTIRQ1,
> - KM_TYPE_NR,
> -};
> +#include <asm-generic/kmap_types.h>
>
> #endif /* _ASM_MICROBLAZE_KMAP_TYPES_H */
> --- lnx-2630-rc8-kmaptypes.orig/arch/mips/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/mips/include/asm/kmap_types.h
> @@ -1,30 +1,6 @@
> #ifndef _ASM_KMAP_TYPES_H
> #define _ASM_KMAP_TYPES_H
>
> -
> -#ifdef CONFIG_DEBUG_HIGHMEM
> -# define D(n) __KM_FENCE_##n ,
> -#else
> -# define D(n)
> -#endif
> -
> -enum km_type {
> -D(0) KM_BOUNCE_READ,
> -D(1) KM_SKB_SUNRPC_DATA,
> -D(2) KM_SKB_DATA_SOFTIRQ,
> -D(3) KM_USER0,
> -D(4) KM_USER1,
> -D(5) KM_BIO_SRC_IRQ,
> -D(6) KM_BIO_DST_IRQ,
> -D(7) KM_PTE0,
> -D(8) KM_PTE1,
> -D(9) KM_IRQ0,
> -D(10) KM_IRQ1,
> -D(11) KM_SOFTIRQ0,
> -D(12) KM_SOFTIRQ1,
> -D(13) KM_TYPE_NR
> -};
> -
> -#undef D
> +#include <asm-generic/kmap_types.h>
>
> #endif
> --- lnx-2630-rc8-kmaptypes.orig/arch/mn10300/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/mn10300/include/asm/kmap_types.h
> @@ -1,31 +1,6 @@
> -/* MN10300 kmap_atomic() slot IDs
> - *
> - * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
> - * Written by David Howells ([email protected])
> - *
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public Licence
> - * as published by the Free Software Foundation; either version
> - * 2 of the Licence, or (at your option) any later version.
> - */
> #ifndef _ASM_KMAP_TYPES_H
> #define _ASM_KMAP_TYPES_H
>
> -enum km_type {
> - KM_BOUNCE_READ,
> - KM_SKB_SUNRPC_DATA,
> - KM_SKB_DATA_SOFTIRQ,
> - KM_USER0,
> - KM_USER1,
> - KM_BIO_SRC_IRQ,
> - KM_BIO_DST_IRQ,
> - KM_PTE0,
> - KM_PTE1,
> - KM_IRQ0,
> - KM_IRQ1,
> - KM_SOFTIRQ0,
> - KM_SOFTIRQ1,
> - KM_TYPE_NR
> -};
> +#include <asm-generic/kmap_types.h>
>
> #endif /* _ASM_KMAP_TYPES_H */
> --- lnx-2630-rc8-kmaptypes.orig/arch/parisc/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/parisc/include/asm/kmap_types.h
> @@ -1,30 +1,6 @@
> #ifndef _ASM_KMAP_TYPES_H
> #define _ASM_KMAP_TYPES_H
>
> -
> -#ifdef CONFIG_DEBUG_HIGHMEM
> -# define D(n) __KM_FENCE_##n ,
> -#else
> -# define D(n)
> -#endif
> -
> -enum km_type {
> -D(0) KM_BOUNCE_READ,
> -D(1) KM_SKB_SUNRPC_DATA,
> -D(2) KM_SKB_DATA_SOFTIRQ,
> -D(3) KM_USER0,
> -D(4) KM_USER1,
> -D(5) KM_BIO_SRC_IRQ,
> -D(6) KM_BIO_DST_IRQ,
> -D(7) KM_PTE0,
> -D(8) KM_PTE1,
> -D(9) KM_IRQ0,
> -D(10) KM_IRQ1,
> -D(11) KM_SOFTIRQ0,
> -D(12) KM_SOFTIRQ1,
> -D(13) KM_TYPE_NR
> -};
> -
> -#undef D
> +#include <asm-generic/kmap_types.h>
>
> #endif
> --- lnx-2630-rc8-kmaptypes.orig/arch/powerpc/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/powerpc/include/asm/kmap_types.h
> @@ -3,31 +3,7 @@
>
> #ifdef __KERNEL__
>
> -/*
> - * This program is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU General Public License
> - * as published by the Free Software Foundation; either version
> - * 2 of the License, or (at your option) any later version.
> - */
> -
> -enum km_type {
> - KM_BOUNCE_READ,
> - KM_SKB_SUNRPC_DATA,
> - KM_SKB_DATA_SOFTIRQ,
> - KM_USER0,
> - KM_USER1,
> - KM_BIO_SRC_IRQ,
> - KM_BIO_DST_IRQ,
> - KM_PTE0,
> - KM_PTE1,
> - KM_IRQ0,
> - KM_IRQ1,
> - KM_SOFTIRQ0,
> - KM_SOFTIRQ1,
> - KM_PPC_SYNC_PAGE,
> - KM_PPC_SYNC_ICACHE,
> - KM_TYPE_NR
> -};
> +#include <asm-generic/kmap_types.h>
>
> #endif /* __KERNEL__ */
> #endif /* _ASM_POWERPC_KMAP_TYPES_H */
> --- lnx-2630-rc8-kmaptypes.orig/arch/powerpc/mm/dma-noncoherent.c
> +++ lnx-2630-rc8-kmaptypes/arch/powerpc/mm/dma-noncoherent.c
> @@ -364,11 +364,11 @@ static inline void __dma_sync_page_highm
>
> do {
> start = (unsigned long)kmap_atomic(page + seg_nr,
> - KM_PPC_SYNC_PAGE) + seg_offset;
> + KM_SYNC_DCACHE) + seg_offset;
>
> /* Sync this buffer segment */
> __dma_sync((void *)start, seg_size, direction);
> - kunmap_atomic((void *)start, KM_PPC_SYNC_PAGE);
> + kunmap_atomic((void *)start, KM_SYNC_DACHE);
> seg_nr++;
>
> /* Calculate next buffer segment size */
> --- lnx-2630-rc8-kmaptypes.orig/arch/powerpc/mm/mem.c
> +++ lnx-2630-rc8-kmaptypes/arch/powerpc/mm/mem.c
> @@ -418,9 +418,9 @@ EXPORT_SYMBOL(flush_dcache_page);
> void flush_dcache_icache_page(struct page *page)
> {
> #ifdef CONFIG_BOOKE
> - void *start = kmap_atomic(page, KM_PPC_SYNC_ICACHE);
> + void *start = kmap_atomic(page, KM_SYNC_ICACHE);
> __flush_dcache_icache(start);
> - kunmap_atomic(start, KM_PPC_SYNC_ICACHE);
> + kunmap_atomic(start, KM_SYNC_ICACHE);
> #elif defined(CONFIG_8xx) || defined(CONFIG_PPC64)
> /* On 8xx there is no need to kmap since highmem is not supported */
> __flush_dcache_icache(page_address(page));
> --- lnx-2630-rc8-kmaptypes.orig/arch/s390/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/s390/include/asm/kmap_types.h
> @@ -2,22 +2,7 @@
> #ifndef _ASM_KMAP_TYPES_H
> #define _ASM_KMAP_TYPES_H
>
> -enum km_type {
> - KM_BOUNCE_READ,
> - KM_SKB_SUNRPC_DATA,
> - KM_SKB_DATA_SOFTIRQ,
> - KM_USER0,
> - KM_USER1,
> - KM_BIO_SRC_IRQ,
> - KM_BIO_DST_IRQ,
> - KM_PTE0,
> - KM_PTE1,
> - KM_IRQ0,
> - KM_IRQ1,
> - KM_SOFTIRQ0,
> - KM_SOFTIRQ1,
> - KM_TYPE_NR
> -};
> +#include <asm-generic/kmap_types.h>
>
> #endif
> #endif /* __KERNEL__ */
> --- lnx-2630-rc8-kmaptypes.orig/arch/sh/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/sh/include/asm/kmap_types.h
> @@ -3,30 +3,6 @@
>
> /* Dummy header just to define km_type. */
>
> -
> -#ifdef CONFIG_DEBUG_HIGHMEM
> -# define D(n) __KM_FENCE_##n ,
> -#else
> -# define D(n)
> -#endif
> -
> -enum km_type {
> -D(0) KM_BOUNCE_READ,
> -D(1) KM_SKB_SUNRPC_DATA,
> -D(2) KM_SKB_DATA_SOFTIRQ,
> -D(3) KM_USER0,
> -D(4) KM_USER1,
> -D(5) KM_BIO_SRC_IRQ,
> -D(6) KM_BIO_DST_IRQ,
> -D(7) KM_PTE0,
> -D(8) KM_PTE1,
> -D(9) KM_IRQ0,
> -D(10) KM_IRQ1,
> -D(11) KM_SOFTIRQ0,
> -D(12) KM_SOFTIRQ1,
> -D(13) KM_TYPE_NR
> -};
> -
> -#undef D
> +#include <asm-generic/kmap_types.h>
>
> #endif
> --- lnx-2630-rc8-kmaptypes.orig/arch/sparc/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/sparc/include/asm/kmap_types.h
> @@ -5,21 +5,6 @@
> * is actually used on sparc. -DaveM
> */
>
> -enum km_type {
> - KM_BOUNCE_READ,
> - KM_SKB_SUNRPC_DATA,
> - KM_SKB_DATA_SOFTIRQ,
> - KM_USER0,
> - KM_USER1,
> - KM_BIO_SRC_IRQ,
> - KM_BIO_DST_IRQ,
> - KM_PTE0,
> - KM_PTE1,
> - KM_IRQ0,
> - KM_IRQ1,
> - KM_SOFTIRQ0,
> - KM_SOFTIRQ1,
> - KM_TYPE_NR
> -};
> +#include <asm-generic/kmap_types.h>
>
> #endif
> --- lnx-2630-rc8-kmaptypes.orig/arch/um/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/um/include/asm/kmap_types.h
> @@ -1,29 +1,6 @@
> -/*
> - * Copyright (C) 2002 Jeff Dike ([email protected])
> - * Licensed under the GPL
> - */
> -
> #ifndef __UM_KMAP_TYPES_H
> #define __UM_KMAP_TYPES_H
>
> -/* No more #include "asm/arch/kmap_types.h" ! */
> -
> -enum km_type {
> - KM_BOUNCE_READ,
> - KM_SKB_SUNRPC_DATA,
> - KM_SKB_DATA_SOFTIRQ,
> - KM_USER0,
> - KM_USER1,
> - KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */
> - KM_BIO_SRC_IRQ,
> - KM_BIO_DST_IRQ,
> - KM_PTE0,
> - KM_PTE1,
> - KM_IRQ0,
> - KM_IRQ1,
> - KM_SOFTIRQ0,
> - KM_SOFTIRQ1,
> - KM_TYPE_NR
> -};
> +#include <asm-generic/kmap_types.h>
>
> #endif
> --- lnx-2630-rc8-kmaptypes.orig/arch/x86/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/x86/include/asm/kmap_types.h
> @@ -1,29 +1,6 @@
> #ifndef _ASM_X86_KMAP_TYPES_H
> #define _ASM_X86_KMAP_TYPES_H
>
> -#if defined(CONFIG_X86_32) && defined(CONFIG_DEBUG_HIGHMEM)
> -# define D(n) __KM_FENCE_##n ,
> -#else
> -# define D(n)
> -#endif
> -
> -enum km_type {
> -D(0) KM_BOUNCE_READ,
> -D(1) KM_SKB_SUNRPC_DATA,
> -D(2) KM_SKB_DATA_SOFTIRQ,
> -D(3) KM_USER0,
> -D(4) KM_USER1,
> -D(5) KM_BIO_SRC_IRQ,
> -D(6) KM_BIO_DST_IRQ,
> -D(7) KM_PTE0,
> -D(8) KM_PTE1,
> -D(9) KM_IRQ0,
> -D(10) KM_IRQ1,
> -D(11) KM_SOFTIRQ0,
> -D(12) KM_SOFTIRQ1,
> -D(13) KM_TYPE_NR
> -};
> -
> -#undef D
> +#include <asm-generic/kmap_types.h>
>
> #endif /* _ASM_X86_KMAP_TYPES_H */
> --- lnx-2630-rc8-kmaptypes.orig/arch/xtensa/include/asm/kmap_types.h
> +++ lnx-2630-rc8-kmaptypes/arch/xtensa/include/asm/kmap_types.h
> @@ -1,31 +1,6 @@
> -/*
> - * include/asm-xtensa/kmap_types.h
> - *
> - * This file is subject to the terms and conditions of the GNU General Public
> - * License. See the file "COPYING" in the main directory of this archive
> - * for more details.
> - *
> - * Copyright (C) 2001 - 2005 Tensilica Inc.
> - */
> -
> #ifndef _XTENSA_KMAP_TYPES_H
> #define _XTENSA_KMAP_TYPES_H
>
> -enum km_type {
> - KM_BOUNCE_READ,
> - KM_SKB_SUNRPC_DATA,
> - KM_SKB_DATA_SOFTIRQ,
> - KM_USER0,
> - KM_USER1,
> - KM_BIO_SRC_IRQ,
> - KM_BIO_DST_IRQ,
> - KM_PTE0,
> - KM_PTE1,
> - KM_IRQ0,
> - KM_IRQ1,
> - KM_SOFTIRQ0,
> - KM_SOFTIRQ1,
> - KM_TYPE_NR
> -};
> +#include <asm-generic/kmap_types.h>
>
> #endif /* _XTENSA_KMAP_TYPES_H */
> --- /dev/null
> +++ lnx-2630-rc8-kmaptypes/include/asm-generic/kmap_types.h
> @@ -0,0 +1,32 @@
> +#ifndef _ASM_GENERIC_KMAP_TYPES_H
> +#define _ASM_GENERIC_KMAP_TYPES_H
> +
> +#ifdef CONFIG_DEBUG_HIGHMEM
> +# define D(n) __KM_FENCE_##n ,
> +#else
> +# define D(n)
> +#endif
> +
> +enum km_type {
> +D(0) KM_BOUNCE_READ,
> +D(1) KM_SKB_SUNRPC_DATA,
> +D(2) KM_SKB_DATA_SOFTIRQ,
> +D(3) KM_USER0,
> +D(4) KM_USER1,
> +D(5) KM_BIO_SRC_IRQ,
> +D(6) KM_BIO_DST_IRQ,
> +D(7) KM_PTE0,
> +D(8) KM_PTE1,
> +D(9) KM_IRQ0,
> +D(10) KM_IRQ1,
> +D(11) KM_SOFTIRQ0,
> +D(12) KM_SOFTIRQ1,
> +D(13) KM_SYNC_ICACHE,
> +D(14) KM_SYNC_DCACHE,
> +D(15) KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */
> +D(16) KM_TYPE_NR
> +};
> +
> +#undef D
> +
> +#endif
/^JN - Jesper Nilsson
--
Jesper Nilsson -- [email protected]
On Fri, Jun 05, 2009 at 08:43:29AM +0800, Amerigo Wang wrote:
>
> UML only uses KM_TYPE_NR and KM_UML_USERCOPY, so
> this patch should be fine for UML.
>
> Acked-by: WANG Cong <[email protected]>
You probably need a Reviewed-by:...
FYC, Acked-by and Reviewed-by are well documented
in Documentation/SubmittingPatches.
On Thu, Jun 04, 2009 at 11:00:16AM -0700, Randy Dunlap wrote:
> Cc: Kyle McMartin <[email protected]>
Acked-by: Kyle McMartin <[email protected]>