aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/pgtable.h4
-rw-r--r--include/asm-sh/thread_info.h16
2 files changed, 14 insertions, 6 deletions
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h
index 036ca2843866..eba14184baf3 100644
--- a/include/asm-sh/pgtable.h
+++ b/include/asm-sh/pgtable.h
@@ -47,13 +47,13 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
47#define PGDIR_MASK (~(PGDIR_SIZE-1)) 47#define PGDIR_MASK (~(PGDIR_SIZE-1))
48 48
49/* Entries per level */ 49/* Entries per level */
50#define PTRS_PER_PTE (PAGE_SIZE / 4) 50#define PTRS_PER_PTE (PAGE_SIZE / (1 << PTE_MAGNITUDE))
51#define PTRS_PER_PGD (PAGE_SIZE / 4) 51#define PTRS_PER_PGD (PAGE_SIZE / 4)
52 52
53#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) 53#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
54#define FIRST_USER_ADDRESS 0 54#define FIRST_USER_ADDRESS 0
55 55
56#define PTE_PHYS_MASK 0x1ffff000 56#define PTE_PHYS_MASK (0x20000000 - PAGE_SIZE)
57 57
58/* 58/*
59 * First 1MB map is used by fixed purpose. 59 * First 1MB map is used by fixed purpose.
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h
index 879f741105db..279e70a77c75 100644
--- a/include/asm-sh/thread_info.h
+++ b/include/asm-sh/thread_info.h
@@ -32,12 +32,20 @@ struct thread_info {
32 32
33#define PREEMPT_ACTIVE 0x10000000 33#define PREEMPT_ACTIVE 0x10000000
34 34
35#ifdef CONFIG_4KSTACKS 35#if defined(CONFIG_4KSTACKS)
36#define THREAD_SIZE (PAGE_SIZE) 36#define THREAD_SIZE_ORDER (0)
37#elif defined(CONFIG_PAGE_SIZE_4KB)
38#define THREAD_SIZE_ORDER (1)
39#elif defined(CONFIG_PAGE_SIZE_8KB)
40#define THREAD_SIZE_ORDER (1)
41#elif defined(CONFIG_PAGE_SIZE_64KB)
42#define THREAD_SIZE_ORDER (0)
37#else 43#else
38#define THREAD_SIZE (PAGE_SIZE * 2) 44#error "Unknown thread size"
39#endif 45#endif
40#define STACK_WARN (THREAD_SIZE / 8) 46
47#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
48#define STACK_WARN (THREAD_SIZE >> 3)
41 49
42/* 50/*
43 * macros/functions for gaining access to the thread information structure 51 * macros/functions for gaining access to the thread information structure