aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-um
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-um')
-rw-r--r--include/asm-um/a.out-core.h27
-rw-r--r--include/asm-um/a.out.h11
-rw-r--r--include/asm-um/fixmap.h3
-rw-r--r--include/asm-um/page.h2
-rw-r--r--include/asm-um/pgalloc.h12
-rw-r--r--include/asm-um/processor-generic.h14
-rw-r--r--include/asm-um/processor-x86_64.h3
7 files changed, 54 insertions, 18 deletions
diff --git a/include/asm-um/a.out-core.h b/include/asm-um/a.out-core.h
new file mode 100644
index 000000000000..995643b18309
--- /dev/null
+++ b/include/asm-um/a.out-core.h
@@ -0,0 +1,27 @@
1/* a.out coredump register dumper
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
10 */
11
12#ifndef __UM_A_OUT_CORE_H
13#define __UM_A_OUT_CORE_H
14
15#ifdef __KERNEL__
16
17#include <linux/user.h>
18
19/*
20 * fill in the user structure for an a.out core dump
21 */
22static inline void aout_dump_thread(struct pt_regs *regs, struct user *u)
23{
24}
25
26#endif /* __KERNEL__ */
27#endif /* __UM_A_OUT_CORE_H */
diff --git a/include/asm-um/a.out.h b/include/asm-um/a.out.h
index f42ff14577fa..754181ee8683 100644
--- a/include/asm-um/a.out.h
+++ b/include/asm-um/a.out.h
@@ -8,15 +8,4 @@
8 8
9#include "asm/arch/a.out.h" 9#include "asm/arch/a.out.h"
10 10
11#undef STACK_TOP
12#undef STACK_TOP_MAX
13
14extern unsigned long stacksizelim;
15
16#define STACK_ROOM (stacksizelim)
17
18#define STACK_TOP (TASK_SIZE - 2 * PAGE_SIZE)
19
20#define STACK_TOP_MAX STACK_TOP
21
22#endif 11#endif
diff --git a/include/asm-um/fixmap.h b/include/asm-um/fixmap.h
index 89a87c18b927..9d2be52b8655 100644
--- a/include/asm-um/fixmap.h
+++ b/include/asm-um/fixmap.h
@@ -1,6 +1,7 @@
1#ifndef __UM_FIXMAP_H 1#ifndef __UM_FIXMAP_H
2#define __UM_FIXMAP_H 2#define __UM_FIXMAP_H
3 3
4#include <asm/processor.h>
4#include <asm/system.h> 5#include <asm/system.h>
5#include <asm/kmap_types.h> 6#include <asm/kmap_types.h>
6#include <asm/archparam.h> 7#include <asm/archparam.h>
@@ -57,7 +58,7 @@ extern void __set_fixmap (enum fixed_addresses idx,
57 * at the top of mem.. 58 * at the top of mem..
58 */ 59 */
59 60
60#define FIXADDR_TOP (CONFIG_TOP_ADDR - 2 * PAGE_SIZE) 61#define FIXADDR_TOP (TASK_SIZE - 2 * PAGE_SIZE)
61#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) 62#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
62#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) 63#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
63 64
diff --git a/include/asm-um/page.h b/include/asm-um/page.h
index fe2374d705d1..381f96b1c825 100644
--- a/include/asm-um/page.h
+++ b/include/asm-um/page.h
@@ -79,6 +79,8 @@ typedef unsigned long phys_t;
79 79
80typedef struct { unsigned long pgprot; } pgprot_t; 80typedef struct { unsigned long pgprot; } pgprot_t;
81 81
82typedef struct page *pgtable_t;
83
82#define pgd_val(x) ((x).pgd) 84#define pgd_val(x) ((x).pgd)
83#define pgprot_val(x) ((x).pgprot) 85#define pgprot_val(x) ((x).pgprot)
84 86
diff --git a/include/asm-um/pgalloc.h b/include/asm-um/pgalloc.h
index 4f3e62b02861..9062a6e72241 100644
--- a/include/asm-um/pgalloc.h
+++ b/include/asm-um/pgalloc.h
@@ -18,6 +18,7 @@
18 set_pmd(pmd, __pmd(_PAGE_TABLE + \ 18 set_pmd(pmd, __pmd(_PAGE_TABLE + \
19 ((unsigned long long)page_to_pfn(pte) << \ 19 ((unsigned long long)page_to_pfn(pte) << \
20 (unsigned long long) PAGE_SHIFT))) 20 (unsigned long long) PAGE_SHIFT)))
21#define pmd_pgtable(pmd) pmd_page(pmd)
21 22
22/* 23/*
23 * Allocate and free page tables. 24 * Allocate and free page tables.
@@ -26,19 +27,24 @@ extern pgd_t *pgd_alloc(struct mm_struct *);
26extern void pgd_free(struct mm_struct *mm, pgd_t *pgd); 27extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
27 28
28extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long); 29extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
29extern struct page *pte_alloc_one(struct mm_struct *, unsigned long); 30extern pgtable_t pte_alloc_one(struct mm_struct *, unsigned long);
30 31
31static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) 32static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
32{ 33{
33 free_page((unsigned long) pte); 34 free_page((unsigned long) pte);
34} 35}
35 36
36static inline void pte_free(struct mm_struct *mm, struct page *pte) 37static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
37{ 38{
39 pgtable_page_dtor(pte);
38 __free_page(pte); 40 __free_page(pte);
39} 41}
40 42
41#define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) 43#define __pte_free_tlb(tlb,pte) \
44do { \
45 pgtable_page_dtor(pte); \
46 tlb_remove_page((tlb),(pte)); \
47} while (0)
42 48
43#ifdef CONFIG_3_LEVEL_PGTABLES 49#ifdef CONFIG_3_LEVEL_PGTABLES
44 50
diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h
index b7d9a16a7451..bed668824b5f 100644
--- a/include/asm-um/processor-generic.h
+++ b/include/asm-um/processor-generic.h
@@ -11,7 +11,6 @@ struct pt_regs;
11struct task_struct; 11struct task_struct;
12 12
13#include "asm/ptrace.h" 13#include "asm/ptrace.h"
14#include "asm/pgtable.h"
15#include "registers.h" 14#include "registers.h"
16#include "sysdep/archsetjmp.h" 15#include "sysdep/archsetjmp.h"
17 16
@@ -92,7 +91,18 @@ static inline void mm_copy_segments(struct mm_struct *from_mm,
92/* 91/*
93 * User space process size: 3GB (default). 92 * User space process size: 3GB (default).
94 */ 93 */
95#define TASK_SIZE (CONFIG_TOP_ADDR & PGDIR_MASK) 94extern unsigned long task_size;
95
96#define TASK_SIZE (task_size)
97
98#undef STACK_TOP
99#undef STACK_TOP_MAX
100
101extern unsigned long stacksizelim;
102
103#define STACK_ROOM (stacksizelim)
104#define STACK_TOP (TASK_SIZE - 2 * PAGE_SIZE)
105#define STACK_TOP_MAX STACK_TOP
96 106
97/* This decides where the kernel will search for a free chunk of vm 107/* This decides where the kernel will search for a free chunk of vm
98 * space during mmap's. 108 * space during mmap's.
diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h
index d946bf2d334a..e50933175e91 100644
--- a/include/asm-um/processor-x86_64.h
+++ b/include/asm-um/processor-x86_64.h
@@ -26,7 +26,7 @@ static inline void rep_nop(void)
26#define cpu_relax() rep_nop() 26#define cpu_relax() rep_nop()
27 27
28#define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ 28#define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \
29 .debugregs_seq = 0, \ 29 .debugregs_seq = 0, \
30 .fs = 0, \ 30 .fs = 0, \
31 .faultinfo = { 0, 0, 0 } } 31 .faultinfo = { 0, 0, 0 } }
32 32
@@ -37,6 +37,7 @@ static inline void arch_flush_thread(struct arch_thread *thread)
37static inline void arch_copy_thread(struct arch_thread *from, 37static inline void arch_copy_thread(struct arch_thread *from,
38 struct arch_thread *to) 38 struct arch_thread *to)
39{ 39{
40 to->fs = from->fs;
40} 41}
41 42
42#include "asm/arch/user.h" 43#include "asm/arch/user.h"