diff options
author | Franck Bui-Huu <fbuihuu@gmail.com> | 2007-05-07 12:01:53 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-05-11 09:28:31 -0400 |
commit | 599ca0fb639ba843da46c3ad1a53590763539750 (patch) | |
tree | f521a5ca50d70dda6a7fe42f5d5a9f1ef370c80b | |
parent | bef964e55ac128b1a6894c68171d0b22263449f8 (diff) |
[MIPS] Remove LIMITED_DMA support
This code was needed only by Jaguar ATX.
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/Kconfig | 5 | ||||
-rw-r--r-- | arch/mips/mm/highmem.c | 2 | ||||
-rw-r--r-- | arch/mips/mm/init.c | 3 | ||||
-rw-r--r-- | include/asm-mips/highmem.h | 42 | ||||
-rw-r--r-- | include/asm-mips/page.h | 4 |
5 files changed, 0 insertions, 56 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 515c5a698040..fa2c44388fdb 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -883,11 +883,6 @@ config GENERIC_ISA_DMA | |||
883 | config I8259 | 883 | config I8259 |
884 | bool | 884 | bool |
885 | 885 | ||
886 | config LIMITED_DMA | ||
887 | bool | ||
888 | select HIGHMEM | ||
889 | select SYS_SUPPORTS_HIGHMEM | ||
890 | |||
891 | config MIPS_BONITO64 | 886 | config MIPS_BONITO64 |
892 | bool | 887 | bool |
893 | 888 | ||
diff --git a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c index 675502ada5a2..10dd2af2343b 100644 --- a/arch/mips/mm/highmem.c +++ b/arch/mips/mm/highmem.c | |||
@@ -80,7 +80,6 @@ void __kunmap_atomic(void *kvaddr, enum km_type type) | |||
80 | pagefault_enable(); | 80 | pagefault_enable(); |
81 | } | 81 | } |
82 | 82 | ||
83 | #ifndef CONFIG_LIMITED_DMA | ||
84 | /* | 83 | /* |
85 | * This is the same as kmap_atomic() but can map memory that doesn't | 84 | * This is the same as kmap_atomic() but can map memory that doesn't |
86 | * have a struct page associated with it. | 85 | * have a struct page associated with it. |
@@ -99,7 +98,6 @@ void *kmap_atomic_pfn(unsigned long pfn, enum km_type type) | |||
99 | 98 | ||
100 | return (void*) vaddr; | 99 | return (void*) vaddr; |
101 | } | 100 | } |
102 | #endif /* CONFIG_LIMITED_DMA */ | ||
103 | 101 | ||
104 | struct page *__kmap_atomic_to_page(void *ptr) | 102 | struct page *__kmap_atomic_to_page(void *ptr) |
105 | { | 103 | { |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 2d1c2c024822..4c80528deadd 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -424,9 +424,6 @@ void __init mem_init(void) | |||
424 | continue; | 424 | continue; |
425 | } | 425 | } |
426 | ClearPageReserved(page); | 426 | ClearPageReserved(page); |
427 | #ifdef CONFIG_LIMITED_DMA | ||
428 | set_page_address(page, lowmem_page_address(page)); | ||
429 | #endif | ||
430 | init_page_count(page); | 427 | init_page_count(page); |
431 | __free_page(page); | 428 | __free_page(page); |
432 | totalhigh_pages++; | 429 | totalhigh_pages++; |
diff --git a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h index f8c8182f7f2e..4d6bd5c31c7b 100644 --- a/include/asm-mips/highmem.h +++ b/include/asm-mips/highmem.h | |||
@@ -48,46 +48,6 @@ extern pte_t *pkmap_page_table; | |||
48 | extern void * kmap_high(struct page *page); | 48 | extern void * kmap_high(struct page *page); |
49 | extern void kunmap_high(struct page *page); | 49 | extern void kunmap_high(struct page *page); |
50 | 50 | ||
51 | /* | ||
52 | * CONFIG_LIMITED_DMA is for systems with DMA limitations such as Momentum's | ||
53 | * Jaguar ATX. This option exploits the highmem code in the kernel so is | ||
54 | * always enabled together with CONFIG_HIGHMEM but at this time doesn't | ||
55 | * actually add highmem functionality. | ||
56 | */ | ||
57 | |||
58 | #ifdef CONFIG_LIMITED_DMA | ||
59 | |||
60 | /* | ||
61 | * These are the default functions for the no-highmem case from | ||
62 | * <linux/highmem.h> | ||
63 | */ | ||
64 | static inline void *kmap(struct page *page) | ||
65 | { | ||
66 | might_sleep(); | ||
67 | return page_address(page); | ||
68 | } | ||
69 | |||
70 | #define kunmap(page) do { (void) (page); } while (0) | ||
71 | |||
72 | static inline void *kmap_atomic(struct page *page, enum km_type type) | ||
73 | { | ||
74 | pagefault_disable(); | ||
75 | return page_address(page); | ||
76 | } | ||
77 | |||
78 | static inline void kunmap_atomic(void *kvaddr, enum km_type type) | ||
79 | { | ||
80 | pagefault_enable(); | ||
81 | } | ||
82 | |||
83 | #define kmap_atomic_pfn(pfn, idx) kmap_atomic(pfn_to_page(pfn), (idx)) | ||
84 | |||
85 | #define kmap_atomic_to_page(ptr) virt_to_page(ptr) | ||
86 | |||
87 | #define flush_cache_kmaps() do { } while (0) | ||
88 | |||
89 | #else /* LIMITED_DMA */ | ||
90 | |||
91 | extern void *__kmap(struct page *page); | 51 | extern void *__kmap(struct page *page); |
92 | extern void __kunmap(struct page *page); | 52 | extern void __kunmap(struct page *page); |
93 | extern void *__kmap_atomic(struct page *page, enum km_type type); | 53 | extern void *__kmap_atomic(struct page *page, enum km_type type); |
@@ -103,8 +63,6 @@ extern struct page *__kmap_atomic_to_page(void *ptr); | |||
103 | 63 | ||
104 | #define flush_cache_kmaps() flush_cache_all() | 64 | #define flush_cache_kmaps() flush_cache_all() |
105 | 65 | ||
106 | #endif /* LIMITED_DMA */ | ||
107 | |||
108 | #endif /* __KERNEL__ */ | 66 | #endif /* __KERNEL__ */ |
109 | 67 | ||
110 | #endif /* _ASM_HIGHMEM_H */ | 68 | #endif /* _ASM_HIGHMEM_H */ |
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index d3fbd83ff545..5c3239dad0f2 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h | |||
@@ -190,10 +190,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
190 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE) | 190 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE) |
191 | #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET) | 191 | #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET) |
192 | 192 | ||
193 | #ifdef CONFIG_LIMITED_DMA | ||
194 | #define WANT_PAGE_VIRTUAL | ||
195 | #endif | ||
196 | |||
197 | #include <asm-generic/memory_model.h> | 193 | #include <asm-generic/memory_model.h> |
198 | #include <asm-generic/page.h> | 194 | #include <asm-generic/page.h> |
199 | 195 | ||