diff options
Diffstat (limited to 'arch/frv')
-rw-r--r-- | arch/frv/include/asm/unistd.h | 10 | ||||
-rw-r--r-- | arch/frv/kernel/process.c | 27 | ||||
-rw-r--r-- | arch/frv/kernel/traps.c | 14 | ||||
-rw-r--r-- | arch/frv/mm/init.c | 38 |
4 files changed, 11 insertions, 78 deletions
diff --git a/arch/frv/include/asm/unistd.h b/arch/frv/include/asm/unistd.h index 4cfcc7bba25a..70ec7293dce7 100644 --- a/arch/frv/include/asm/unistd.h +++ b/arch/frv/include/asm/unistd.h | |||
@@ -31,14 +31,4 @@ | |||
31 | #define __ARCH_WANT_SYS_VFORK | 31 | #define __ARCH_WANT_SYS_VFORK |
32 | #define __ARCH_WANT_SYS_CLONE | 32 | #define __ARCH_WANT_SYS_CLONE |
33 | 33 | ||
34 | /* | ||
35 | * "Conditional" syscalls | ||
36 | * | ||
37 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), | ||
38 | * but it doesn't work on all toolchains, so we just do it by hand | ||
39 | */ | ||
40 | #ifndef cond_syscall | ||
41 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | ||
42 | #endif | ||
43 | |||
44 | #endif /* _ASM_UNISTD_H_ */ | 34 | #endif /* _ASM_UNISTD_H_ */ |
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index 23916b2a12a2..5d40aeb7712e 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -59,29 +59,12 @@ static void core_sleep_idle(void) | |||
59 | mb(); | 59 | mb(); |
60 | } | 60 | } |
61 | 61 | ||
62 | void (*idle)(void) = core_sleep_idle; | 62 | void arch_cpu_idle(void) |
63 | |||
64 | /* | ||
65 | * The idle thread. There's no useful work to be | ||
66 | * done, so just try to conserve power and have a | ||
67 | * low exit latency (ie sit in a loop waiting for | ||
68 | * somebody to say that they'd like to reschedule) | ||
69 | */ | ||
70 | void cpu_idle(void) | ||
71 | { | 63 | { |
72 | /* endless idle loop with no priority at all */ | 64 | if (!frv_dma_inprogress) |
73 | while (1) { | 65 | core_sleep_idle(); |
74 | rcu_idle_enter(); | 66 | else |
75 | while (!need_resched()) { | 67 | local_irq_enable(); |
76 | check_pgt_cache(); | ||
77 | |||
78 | if (!frv_dma_inprogress && idle) | ||
79 | idle(); | ||
80 | } | ||
81 | rcu_idle_exit(); | ||
82 | |||
83 | schedule_preempt_disabled(); | ||
84 | } | ||
85 | } | 68 | } |
86 | 69 | ||
87 | void machine_restart(char * __unused) | 70 | void machine_restart(char * __unused) |
diff --git a/arch/frv/kernel/traps.c b/arch/frv/kernel/traps.c index 5cfd1420b091..4bff48c19d29 100644 --- a/arch/frv/kernel/traps.c +++ b/arch/frv/kernel/traps.c | |||
@@ -466,17 +466,6 @@ asmlinkage void compound_exception(unsigned long esfr1, | |||
466 | BUG(); | 466 | BUG(); |
467 | } /* end compound_exception() */ | 467 | } /* end compound_exception() */ |
468 | 468 | ||
469 | /*****************************************************************************/ | ||
470 | /* | ||
471 | * The architecture-independent backtrace generator | ||
472 | */ | ||
473 | void dump_stack(void) | ||
474 | { | ||
475 | show_stack(NULL, NULL); | ||
476 | } | ||
477 | |||
478 | EXPORT_SYMBOL(dump_stack); | ||
479 | |||
480 | void show_stack(struct task_struct *task, unsigned long *sp) | 469 | void show_stack(struct task_struct *task, unsigned long *sp) |
481 | { | 470 | { |
482 | } | 471 | } |
@@ -508,6 +497,7 @@ void show_regs(struct pt_regs *regs) | |||
508 | int loop; | 497 | int loop; |
509 | 498 | ||
510 | printk("\n"); | 499 | printk("\n"); |
500 | show_regs_print_info(KERN_DEFAULT); | ||
511 | 501 | ||
512 | printk("Frame: @%08lx [%s]\n", | 502 | printk("Frame: @%08lx [%s]\n", |
513 | (unsigned long) regs, | 503 | (unsigned long) regs, |
@@ -522,8 +512,6 @@ void show_regs(struct pt_regs *regs) | |||
522 | else | 512 | else |
523 | printk(" | "); | 513 | printk(" | "); |
524 | } | 514 | } |
525 | |||
526 | printk("Process %s (pid: %d)\n", current->comm, current->pid); | ||
527 | } | 515 | } |
528 | 516 | ||
529 | void die_if_kernel(const char *str, ...) | 517 | void die_if_kernel(const char *str, ...) |
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c index 92e97b0894a6..dee354fa6b64 100644 --- a/arch/frv/mm/init.c +++ b/arch/frv/mm/init.c | |||
@@ -122,7 +122,7 @@ void __init mem_init(void) | |||
122 | #endif | 122 | #endif |
123 | int codek = 0, datak = 0; | 123 | int codek = 0, datak = 0; |
124 | 124 | ||
125 | /* this will put all memory onto the freelists */ | 125 | /* this will put all low memory onto the freelists */ |
126 | totalram_pages = free_all_bootmem(); | 126 | totalram_pages = free_all_bootmem(); |
127 | 127 | ||
128 | #ifdef CONFIG_MMU | 128 | #ifdef CONFIG_MMU |
@@ -131,14 +131,8 @@ void __init mem_init(void) | |||
131 | datapages++; | 131 | datapages++; |
132 | 132 | ||
133 | #ifdef CONFIG_HIGHMEM | 133 | #ifdef CONFIG_HIGHMEM |
134 | for (pfn = num_physpages - 1; pfn >= num_mappedpages; pfn--) { | 134 | for (pfn = num_physpages - 1; pfn >= num_mappedpages; pfn--) |
135 | struct page *page = &mem_map[pfn]; | 135 | free_highmem_page(&mem_map[pfn]); |
136 | |||
137 | ClearPageReserved(page); | ||
138 | init_page_count(page); | ||
139 | __free_page(page); | ||
140 | totalram_pages++; | ||
141 | } | ||
142 | #endif | 136 | #endif |
143 | 137 | ||
144 | codek = ((unsigned long) &_etext - (unsigned long) &_stext) >> 10; | 138 | codek = ((unsigned long) &_etext - (unsigned long) &_stext) >> 10; |
@@ -168,21 +162,7 @@ void __init mem_init(void) | |||
168 | void free_initmem(void) | 162 | void free_initmem(void) |
169 | { | 163 | { |
170 | #if defined(CONFIG_RAMKERNEL) && !defined(CONFIG_PROTECT_KERNEL) | 164 | #if defined(CONFIG_RAMKERNEL) && !defined(CONFIG_PROTECT_KERNEL) |
171 | unsigned long start, end, addr; | 165 | free_initmem_default(0); |
172 | |||
173 | start = PAGE_ALIGN((unsigned long) &__init_begin); /* round up */ | ||
174 | end = ((unsigned long) &__init_end) & PAGE_MASK; /* round down */ | ||
175 | |||
176 | /* next to check that the page we free is not a partial page */ | ||
177 | for (addr = start; addr < end; addr += PAGE_SIZE) { | ||
178 | ClearPageReserved(virt_to_page(addr)); | ||
179 | init_page_count(virt_to_page(addr)); | ||
180 | free_page(addr); | ||
181 | totalram_pages++; | ||
182 | } | ||
183 | |||
184 | printk("Freeing unused kernel memory: %ldKiB freed (0x%lx - 0x%lx)\n", | ||
185 | (end - start) >> 10, start, end); | ||
186 | #endif | 166 | #endif |
187 | } /* end free_initmem() */ | 167 | } /* end free_initmem() */ |
188 | 168 | ||
@@ -193,14 +173,6 @@ void free_initmem(void) | |||
193 | #ifdef CONFIG_BLK_DEV_INITRD | 173 | #ifdef CONFIG_BLK_DEV_INITRD |
194 | void __init free_initrd_mem(unsigned long start, unsigned long end) | 174 | void __init free_initrd_mem(unsigned long start, unsigned long end) |
195 | { | 175 | { |
196 | int pages = 0; | 176 | free_reserved_area(start, end, 0, "initrd"); |
197 | for (; start < end; start += PAGE_SIZE) { | ||
198 | ClearPageReserved(virt_to_page(start)); | ||
199 | init_page_count(virt_to_page(start)); | ||
200 | free_page(start); | ||
201 | totalram_pages++; | ||
202 | pages++; | ||
203 | } | ||
204 | printk("Freeing initrd memory: %dKiB freed\n", (pages * PAGE_SIZE) >> 10); | ||
205 | } /* end free_initrd_mem() */ | 177 | } /* end free_initrd_mem() */ |
206 | #endif | 178 | #endif |