Commit a35a3c6f authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman

powerpc/mm/hash64: Add a variable to track the end of IO mapping

This makes it easy to update the region mapping in the later patch
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent ef629cc5
...@@ -69,7 +69,8 @@ ...@@ -69,7 +69,8 @@
#define H_VMALLOC_SIZE (H_KERN_VIRT_SIZE - H_KERN_IO_SIZE) #define H_VMALLOC_SIZE (H_KERN_VIRT_SIZE - H_KERN_IO_SIZE)
#define H_VMALLOC_END (H_VMALLOC_START + H_VMALLOC_SIZE) #define H_VMALLOC_END (H_VMALLOC_START + H_VMALLOC_SIZE)
#define H_KERN_IO_START H_VMALLOC_END #define H_KERN_IO_START H_VMALLOC_END
#define H_KERN_IO_END (H_KERN_VIRT_START + H_KERN_VIRT_SIZE)
/* /*
* Region IDs * Region IDs
......
...@@ -277,9 +277,12 @@ extern unsigned long __vmalloc_end; ...@@ -277,9 +277,12 @@ extern unsigned long __vmalloc_end;
extern unsigned long __kernel_virt_start; extern unsigned long __kernel_virt_start;
extern unsigned long __kernel_virt_size; extern unsigned long __kernel_virt_size;
extern unsigned long __kernel_io_start; extern unsigned long __kernel_io_start;
extern unsigned long __kernel_io_end;
#define KERN_VIRT_START __kernel_virt_start #define KERN_VIRT_START __kernel_virt_start
#define KERN_VIRT_SIZE __kernel_virt_size #define KERN_VIRT_SIZE __kernel_virt_size
#define KERN_IO_START __kernel_io_start #define KERN_IO_START __kernel_io_start
#define KERN_IO_END __kernel_io_end
extern struct page *vmemmap; extern struct page *vmemmap;
extern unsigned long ioremap_bot; extern unsigned long ioremap_bot;
extern unsigned long pci_io_base; extern unsigned long pci_io_base;
...@@ -296,8 +299,7 @@ extern unsigned long pci_io_base; ...@@ -296,8 +299,7 @@ extern unsigned long pci_io_base;
#include <asm/barrier.h> #include <asm/barrier.h>
/* /*
* The second half of the kernel virtual space is used for IO mappings, * IO space itself carved into the PIO region (ISA and PHB IO space) and
* it's itself carved into the PIO region (ISA and PHB IO space) and
* the ioremap space * the ioremap space
* *
* ISA_IO_BASE = KERN_IO_START, 64K reserved area * ISA_IO_BASE = KERN_IO_START, 64K reserved area
...@@ -310,7 +312,7 @@ extern unsigned long pci_io_base; ...@@ -310,7 +312,7 @@ extern unsigned long pci_io_base;
#define PHB_IO_BASE (ISA_IO_END) #define PHB_IO_BASE (ISA_IO_END)
#define PHB_IO_END (KERN_IO_START + FULL_IO_SIZE) #define PHB_IO_END (KERN_IO_START + FULL_IO_SIZE)
#define IOREMAP_BASE (PHB_IO_END) #define IOREMAP_BASE (PHB_IO_END)
#define IOREMAP_END (KERN_VIRT_START + KERN_VIRT_SIZE) #define IOREMAP_END (KERN_IO_END)
/* Advertise special mapping type for AGP */ /* Advertise special mapping type for AGP */
#define HAVE_PAGE_AGP #define HAVE_PAGE_AGP
......
...@@ -111,6 +111,7 @@ ...@@ -111,6 +111,7 @@
#define RADIX_VMEMMAP_BASE (RADIX_VMALLOC_END) #define RADIX_VMEMMAP_BASE (RADIX_VMALLOC_END)
#define RADIX_KERN_IO_START (RADIX_KERN_VIRT_START + (RADIX_KERN_VIRT_SIZE >> 1)) #define RADIX_KERN_IO_START (RADIX_KERN_VIRT_START + (RADIX_KERN_VIRT_SIZE >> 1))
#define RADIX_KERN_IO_END (RADIX_KERN_VIRT_START + RADIX_KERN_VIRT_SIZE)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#define RADIX_PTE_TABLE_SIZE (sizeof(pte_t) << RADIX_PTE_INDEX_SIZE) #define RADIX_PTE_TABLE_SIZE (sizeof(pte_t) << RADIX_PTE_INDEX_SIZE)
......
...@@ -1013,6 +1013,7 @@ void __init hash__early_init_mmu(void) ...@@ -1013,6 +1013,7 @@ void __init hash__early_init_mmu(void)
__vmalloc_start = H_VMALLOC_START; __vmalloc_start = H_VMALLOC_START;
__vmalloc_end = H_VMALLOC_END; __vmalloc_end = H_VMALLOC_END;
__kernel_io_start = H_KERN_IO_START; __kernel_io_start = H_KERN_IO_START;
__kernel_io_end = H_KERN_IO_END;
vmemmap = (struct page *)H_VMEMMAP_BASE; vmemmap = (struct page *)H_VMEMMAP_BASE;
ioremap_bot = IOREMAP_BASE; ioremap_bot = IOREMAP_BASE;
......
...@@ -605,6 +605,7 @@ void __init radix__early_init_mmu(void) ...@@ -605,6 +605,7 @@ void __init radix__early_init_mmu(void)
__vmalloc_start = RADIX_VMALLOC_START; __vmalloc_start = RADIX_VMALLOC_START;
__vmalloc_end = RADIX_VMALLOC_END; __vmalloc_end = RADIX_VMALLOC_END;
__kernel_io_start = RADIX_KERN_IO_START; __kernel_io_start = RADIX_KERN_IO_START;
__kernel_io_end = RADIX_KERN_IO_END;
vmemmap = (struct page *)RADIX_VMEMMAP_BASE; vmemmap = (struct page *)RADIX_VMEMMAP_BASE;
ioremap_bot = IOREMAP_BASE; ioremap_bot = IOREMAP_BASE;
......
...@@ -98,6 +98,8 @@ unsigned long __vmalloc_end; ...@@ -98,6 +98,8 @@ unsigned long __vmalloc_end;
EXPORT_SYMBOL(__vmalloc_end); EXPORT_SYMBOL(__vmalloc_end);
unsigned long __kernel_io_start; unsigned long __kernel_io_start;
EXPORT_SYMBOL(__kernel_io_start); EXPORT_SYMBOL(__kernel_io_start);
unsigned long __kernel_io_end;
EXPORT_SYMBOL(__kernel_io_end);
struct page *vmemmap; struct page *vmemmap;
EXPORT_SYMBOL(vmemmap); EXPORT_SYMBOL(vmemmap);
unsigned long __pte_frag_nr; unsigned long __pte_frag_nr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment