Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] powerpc: Remove imalloc.h

asm-ppc64/imalloc.h is only included from files in arch/powerpc/mm.
We already have a header for mm local definitions,
arch/powerpc/mm/mmu_decl.h. Thus, this patch moves the contents of
imalloc.h into mmu_decl.h. The only exception are the definitions of
PHBS_IO_BASE, IMALLOC_BASE and IMALLOC_END. Those are moved into
pgtable.h, next to similar definitions of VMALLOC_START and
VMALLOC_SIZE.

Built for multiplatform 32bit and 64bit (ARCH=powerpc).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

David Gibson and committed by
Paul Mackerras
800fc3ee 0e6850f6

+26 -30
+2 -1
arch/powerpc/mm/imalloc.c
··· 14 14 #include <asm/pgalloc.h> 15 15 #include <asm/pgtable.h> 16 16 #include <asm/semaphore.h> 17 - #include <asm/imalloc.h> 18 17 #include <asm/cacheflush.h> 18 + 19 + #include "mmu_decl.h" 19 20 20 21 static DECLARE_MUTEX(imlist_sem); 21 22 struct vm_struct * imlist = NULL;
+2 -1
arch/powerpc/mm/init_64.c
··· 64 64 #include <asm/iommu.h> 65 65 #include <asm/abs_addr.h> 66 66 #include <asm/vdso.h> 67 - #include <asm/imalloc.h> 67 + 68 + #include "mmu_decl.h" 68 69 69 70 #ifdef DEBUG 70 71 #define DBG(fmt...) printk(fmt)
+13 -1
arch/powerpc/mm/mmu_decl.h
··· 33 33 34 34 extern int __map_without_bats; 35 35 extern unsigned long ioremap_base; 36 - extern unsigned long ioremap_bot; 37 36 extern unsigned int rtas_data, rtas_size; 38 37 39 38 extern PTE *Hash, *Hash_end; ··· 41 42 extern unsigned int num_tlbcam_entries; 42 43 #endif 43 44 45 + extern unsigned long ioremap_bot; 44 46 extern unsigned long __max_low_memory; 45 47 extern unsigned long __initial_memory_limit; 46 48 extern unsigned long total_memory; ··· 84 84 else 85 85 _tlbie(va); 86 86 } 87 + #else /* CONFIG_PPC64 */ 88 + /* imalloc region types */ 89 + #define IM_REGION_UNUSED 0x1 90 + #define IM_REGION_SUBSET 0x2 91 + #define IM_REGION_EXISTS 0x4 92 + #define IM_REGION_OVERLAP 0x8 93 + #define IM_REGION_SUPERSET 0x10 94 + 95 + extern struct vm_struct * im_get_free_area(unsigned long size); 96 + extern struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size, 97 + int region_type); 98 + extern void im_free(void *addr); 87 99 #endif
+2 -1
arch/powerpc/mm/pgtable_64.c
··· 64 64 #include <asm/iommu.h> 65 65 #include <asm/abs_addr.h> 66 66 #include <asm/vdso.h> 67 - #include <asm/imalloc.h> 67 + 68 + #include "mmu_decl.h" 68 69 69 70 unsigned long ioremap_bot = IMALLOC_BASE; 70 71 static unsigned long phbs_io_bot = PHBS_IO_BASE;
-26
include/asm-ppc64/imalloc.h
··· 1 - #ifndef _PPC64_IMALLOC_H 2 - #define _PPC64_IMALLOC_H 3 - 4 - /* 5 - * Define the address range of the imalloc VM area. 6 - */ 7 - #define PHBS_IO_BASE VMALLOC_END 8 - #define IMALLOC_BASE (PHBS_IO_BASE + 0x80000000ul) /* Reserve 2 gigs for PHBs */ 9 - #define IMALLOC_END (VMALLOC_START + PGTABLE_RANGE) 10 - 11 - 12 - /* imalloc region types */ 13 - #define IM_REGION_UNUSED 0x1 14 - #define IM_REGION_SUBSET 0x2 15 - #define IM_REGION_EXISTS 0x4 16 - #define IM_REGION_OVERLAP 0x8 17 - #define IM_REGION_SUPERSET 0x10 18 - 19 - extern struct vm_struct * im_get_free_area(unsigned long size); 20 - extern struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size, 21 - int region_type); 22 - extern void im_free(void *addr); 23 - 24 - extern unsigned long ioremap_bot; 25 - 26 - #endif /* _PPC64_IMALLOC_H */
+7
include/asm-ppc64/pgtable.h
··· 47 47 #define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE) 48 48 49 49 /* 50 + * Define the address range of the imalloc VM area. 51 + */ 52 + #define PHBS_IO_BASE VMALLOC_END 53 + #define IMALLOC_BASE (PHBS_IO_BASE + 0x80000000ul) /* Reserve 2 gigs for PHBs */ 54 + #define IMALLOC_END (VMALLOC_START + PGTABLE_RANGE) 55 + 56 + /* 50 57 * Common bits in a linux-style PTE. These match the bits in the 51 58 * (hardware-defined) PowerPC PTE as closely as possible. Additional 52 59 * bits may be defined in pgtable-*.h