Skip to content

Commit

Permalink
[MIPS] Remove LIMITED_DMA support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Franck Bui-Huu authored and Ralf Baechle committed May 11, 2007
1 parent bef964e commit 599ca0f
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 56 deletions.
5 changes: 0 additions & 5 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -883,11 +883,6 @@ config GENERIC_ISA_DMA
config I8259
bool

config LIMITED_DMA
bool
select HIGHMEM
select SYS_SUPPORTS_HIGHMEM

config MIPS_BONITO64
bool

Expand Down
2 changes: 0 additions & 2 deletions arch/mips/mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ void __kunmap_atomic(void *kvaddr, enum km_type type)
pagefault_enable();
}

#ifndef CONFIG_LIMITED_DMA
/*
* This is the same as kmap_atomic() but can map memory that doesn't
* have a struct page associated with it.
Expand All @@ -99,7 +98,6 @@ void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)

return (void*) vaddr;
}
#endif /* CONFIG_LIMITED_DMA */

struct page *__kmap_atomic_to_page(void *ptr)
{
Expand Down
3 changes: 0 additions & 3 deletions arch/mips/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,6 @@ void __init mem_init(void)
continue;
}
ClearPageReserved(page);
#ifdef CONFIG_LIMITED_DMA
set_page_address(page, lowmem_page_address(page));
#endif
init_page_count(page);
__free_page(page);
totalhigh_pages++;
Expand Down
42 changes: 0 additions & 42 deletions include/asm-mips/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,46 +48,6 @@ extern pte_t *pkmap_page_table;
extern void * kmap_high(struct page *page);
extern void kunmap_high(struct page *page);

/*
* CONFIG_LIMITED_DMA is for systems with DMA limitations such as Momentum's
* Jaguar ATX. This option exploits the highmem code in the kernel so is
* always enabled together with CONFIG_HIGHMEM but at this time doesn't
* actually add highmem functionality.
*/

#ifdef CONFIG_LIMITED_DMA

/*
* These are the default functions for the no-highmem case from
* <linux/highmem.h>
*/
static inline void *kmap(struct page *page)
{
might_sleep();
return page_address(page);
}

#define kunmap(page) do { (void) (page); } while (0)

static inline void *kmap_atomic(struct page *page, enum km_type type)
{
pagefault_disable();
return page_address(page);
}

static inline void kunmap_atomic(void *kvaddr, enum km_type type)
{
pagefault_enable();
}

#define kmap_atomic_pfn(pfn, idx) kmap_atomic(pfn_to_page(pfn), (idx))

#define kmap_atomic_to_page(ptr) virt_to_page(ptr)

#define flush_cache_kmaps() do { } while (0)

#else /* LIMITED_DMA */

extern void *__kmap(struct page *page);
extern void __kunmap(struct page *page);
extern void *__kmap_atomic(struct page *page, enum km_type type);
Expand All @@ -103,8 +63,6 @@ extern struct page *__kmap_atomic_to_page(void *ptr);

#define flush_cache_kmaps() flush_cache_all()

#endif /* LIMITED_DMA */

#endif /* __KERNEL__ */

#endif /* _ASM_HIGHMEM_H */
4 changes: 0 additions & 4 deletions include/asm-mips/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE)
#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET)

#ifdef CONFIG_LIMITED_DMA
#define WANT_PAGE_VIRTUAL
#endif

#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>

Expand Down

0 comments on commit 599ca0f

Please sign in to comment.