9 #include <linux/module.h>
13 #include <linux/slab.h>
14 #include <linux/sched.h>
63 static void default_idle(
void)
66 ipipe_suspend_domain();
86 #ifdef CONFIG_HOTPLUG_CPU
92 tick_nohz_idle_enter();
94 while (!need_resched())
97 tick_nohz_idle_exit();
112 "_kernel_thread_helper:\n\t"
114 "\tr0 = r1;\n\t" "\tcall (p1);\n\t" "\tcall _do_exit;\n" ".previous");
123 memset(®s, 0,
sizeof(regs));
125 regs.
r1 = (
unsigned long)arg;
151 (
void *)
current->mm->context.stack_start;
172 unsigned long clone_flags;
175 #ifdef __ARCH_SYNC_CORE_DCACHE
181 clone_flags = regs->
r0;
192 unsigned long usp,
unsigned long topstk,
212 const char __user *
const __user *argv,
213 const char __user *
const __user *envp)
220 error = PTR_ERR(filename);
221 if (IS_ERR(filename))
230 unsigned long fp,
pc;
231 unsigned long stack_page;
236 stack_page = (
unsigned long)p;
239 if (fp < stack_page +
sizeof(
struct thread_info) ||
240 fp >= 8184 + stack_page)
242 pc = ((
unsigned long *)fp)[1];
245 fp = *(
unsigned long *)fp;
247 while (count++ < 16);
266 if (regs->
r0 == regs->
r1)
272 regs->
r0 = regs->
r1 + regs->
r0;
279 regs->
r0 = regs->
r1 - regs->
r0;
286 regs->
r0 = regs->
r1 | regs->
r0;
293 regs->
r0 = regs->
r1 & regs->
r0;
300 regs->
r0 = regs->
r1 ^ regs->
r0;
316 int in_mem(
unsigned long addr,
unsigned long size,
317 unsigned long start,
unsigned long end)
319 return addr >= start && addr + size <=
end;
322 int in_mem_const_off(
unsigned long addr,
unsigned long size,
unsigned long off,
323 unsigned long const_addr,
unsigned long const_size)
326 in_mem(addr, size, const_addr + off, const_addr + const_size);
329 int in_mem_const(
unsigned long addr,
unsigned long size,
330 unsigned long const_addr,
unsigned long const_size)
332 return in_mem_const_off(addr, size, 0, const_addr, const_size);
335 #define ASYNC_ENABLED(bnum, bctlnum) 1
337 #define ASYNC_ENABLED(bnum, bctlnum) \
339 (bfin_read_EBIU_AMGCTL() & 0xe) < ((bnum + 1) << 1) ? 0 : \
340 bfin_read_EBIU_AMBCTL##bctlnum() & B##bnum##RDYEN ? 0 : \
353 int in_async(
unsigned long addr,
unsigned long size)
410 #ifdef COREB_L1_CODE_START
426 switch (in_async(addr, size)) {
440 #if defined(CONFIG_ACCESS_CHECK)
441 #ifdef CONFIG_ACCESS_OK_L1
456 #ifdef CONFIG_MTD_UCLINUX
466 # ifndef CONFIG_ROMFS_ON_MTD
470 if (in_mem(addr, size, memory_mtd_start, memory_mtd_end))
477 if (in_mem(addr, size, (
unsigned long)__init_begin, (
unsigned long)__init_end))
488 #ifdef COREB_L1_CODE_START
499 #ifndef CONFIG_EXCEPTION_L1_SCRATCH
504 aret = in_async(addr, size);