Skip to content

Commit a35a3c6

Browse files
kvaneeshmpe
authored andcommitted
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: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent ef629cc commit a35a3c6

File tree

6 files changed

+12
-4
lines changed

6 files changed

+12
-4
lines changed

arch/powerpc/include/asm/book3s/64/hash.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
#define H_VMALLOC_SIZE (H_KERN_VIRT_SIZE - H_KERN_IO_SIZE)
7070
#define H_VMALLOC_END (H_VMALLOC_START + H_VMALLOC_SIZE)
7171

72-
#define H_KERN_IO_START H_VMALLOC_END
72+
#define H_KERN_IO_START H_VMALLOC_END
73+
#define H_KERN_IO_END (H_KERN_VIRT_START + H_KERN_VIRT_SIZE)
7374

7475
/*
7576
* Region IDs

arch/powerpc/include/asm/book3s/64/pgtable.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,12 @@ extern unsigned long __vmalloc_end;
277277
extern unsigned long __kernel_virt_start;
278278
extern unsigned long __kernel_virt_size;
279279
extern unsigned long __kernel_io_start;
280+
extern unsigned long __kernel_io_end;
280281
#define KERN_VIRT_START __kernel_virt_start
281282
#define KERN_VIRT_SIZE __kernel_virt_size
282283
#define KERN_IO_START __kernel_io_start
284+
#define KERN_IO_END __kernel_io_end
285+
283286
extern struct page *vmemmap;
284287
extern unsigned long ioremap_bot;
285288
extern unsigned long pci_io_base;
@@ -296,8 +299,7 @@ extern unsigned long pci_io_base;
296299

297300
#include <asm/barrier.h>
298301
/*
299-
* The second half of the kernel virtual space is used for IO mappings,
300-
* it's itself carved into the PIO region (ISA and PHB IO space) and
302+
* IO space itself carved into the PIO region (ISA and PHB IO space) and
301303
* the ioremap space
302304
*
303305
* ISA_IO_BASE = KERN_IO_START, 64K reserved area
@@ -310,7 +312,7 @@ extern unsigned long pci_io_base;
310312
#define PHB_IO_BASE (ISA_IO_END)
311313
#define PHB_IO_END (KERN_IO_START + FULL_IO_SIZE)
312314
#define IOREMAP_BASE (PHB_IO_END)
313-
#define IOREMAP_END (KERN_VIRT_START + KERN_VIRT_SIZE)
315+
#define IOREMAP_END (KERN_IO_END)
314316

315317
/* Advertise special mapping type for AGP */
316318
#define HAVE_PAGE_AGP

arch/powerpc/include/asm/book3s/64/radix.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
#define RADIX_VMEMMAP_BASE (RADIX_VMALLOC_END)
112112

113113
#define RADIX_KERN_IO_START (RADIX_KERN_VIRT_START + (RADIX_KERN_VIRT_SIZE >> 1))
114+
#define RADIX_KERN_IO_END (RADIX_KERN_VIRT_START + RADIX_KERN_VIRT_SIZE)
114115

115116
#ifndef __ASSEMBLY__
116117
#define RADIX_PTE_TABLE_SIZE (sizeof(pte_t) << RADIX_PTE_INDEX_SIZE)

arch/powerpc/mm/hash_utils_64.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,6 +1013,7 @@ void __init hash__early_init_mmu(void)
10131013
__vmalloc_start = H_VMALLOC_START;
10141014
__vmalloc_end = H_VMALLOC_END;
10151015
__kernel_io_start = H_KERN_IO_START;
1016+
__kernel_io_end = H_KERN_IO_END;
10161017
vmemmap = (struct page *)H_VMEMMAP_BASE;
10171018
ioremap_bot = IOREMAP_BASE;
10181019

arch/powerpc/mm/pgtable-radix.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ void __init radix__early_init_mmu(void)
605605
__vmalloc_start = RADIX_VMALLOC_START;
606606
__vmalloc_end = RADIX_VMALLOC_END;
607607
__kernel_io_start = RADIX_KERN_IO_START;
608+
__kernel_io_end = RADIX_KERN_IO_END;
608609
vmemmap = (struct page *)RADIX_VMEMMAP_BASE;
609610
ioremap_bot = IOREMAP_BASE;
610611

arch/powerpc/mm/pgtable_64.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ unsigned long __vmalloc_end;
9898
EXPORT_SYMBOL(__vmalloc_end);
9999
unsigned long __kernel_io_start;
100100
EXPORT_SYMBOL(__kernel_io_start);
101+
unsigned long __kernel_io_end;
102+
EXPORT_SYMBOL(__kernel_io_end);
101103
struct page *vmemmap;
102104
EXPORT_SYMBOL(vmemmap);
103105
unsigned long __pte_frag_nr;

0 commit comments

Comments
 (0)