You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.4 KiB
64 lines
1.4 KiB
20 years ago
|
#include <linux/sched.h>
|
||
|
#include <asm/thread_info.h>
|
||
|
|
||
|
/*
|
||
|
* Generate definitions needed by assembly language modules.
|
||
|
* This code generates raw asm output which is post-processed to extract
|
||
|
* and format the required data.
|
||
|
*/
|
||
|
|
||
|
#define DEFINE(sym, val) \
|
||
16 years ago
|
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
|
||
20 years ago
|
|
||
|
#define BLANK() asm volatile("\n->" : : )
|
||
|
|
||
16 years ago
|
#if !defined(CONFIG_ETRAX_ARCH_V10) && !defined(CONFIG_ETRAX_ARCH_V32)
|
||
|
#error One of ARCH v10 and ARCH v32 must be true!
|
||
|
#endif
|
||
|
|
||
20 years ago
|
int main(void)
|
||
|
{
|
||
|
#define ENTRY(entry) DEFINE(PT_ ## entry, offsetof(struct pt_regs, entry))
|
||
|
ENTRY(orig_r10);
|
||
|
ENTRY(r13);
|
||
|
ENTRY(r12);
|
||
|
ENTRY(r11);
|
||
16 years ago
|
ENTRY(r10);
|
||
|
ENTRY(r9);
|
||
|
#ifdef CONFIG_ETRAX_ARCH_V32
|
||
20 years ago
|
ENTRY(acr);
|
||
|
ENTRY(srs);
|
||
16 years ago
|
#endif
|
||
|
ENTRY(mof);
|
||
|
#ifdef CONFIG_ETRAX_ARCH_V10
|
||
|
ENTRY(dccr);
|
||
|
#else
|
||
|
ENTRY(ccs);
|
||
|
#endif
|
||
|
ENTRY(srp);
|
||
20 years ago
|
BLANK();
|
||
|
#undef ENTRY
|
||
|
#define ENTRY(entry) DEFINE(TI_ ## entry, offsetof(struct thread_info, entry))
|
||
16 years ago
|
ENTRY(task);
|
||
|
ENTRY(flags);
|
||
|
ENTRY(preempt_count);
|
||
|
BLANK();
|
||
20 years ago
|
#undef ENTRY
|
||
|
#define ENTRY(entry) DEFINE(THREAD_ ## entry, offsetof(struct thread_struct, entry))
|
||
|
ENTRY(ksp);
|
||
16 years ago
|
ENTRY(usp);
|
||
|
#ifdef CONFIG_ETRAX_ARCH_V10
|
||
|
ENTRY(dccr);
|
||
|
#else
|
||
|
ENTRY(ccs);
|
||
|
#endif
|
||
|
BLANK();
|
||
20 years ago
|
#undef ENTRY
|
||
|
#define ENTRY(entry) DEFINE(TASK_ ## entry, offsetof(struct task_struct, entry))
|
||
16 years ago
|
ENTRY(pid);
|
||
|
BLANK();
|
||
|
DEFINE(LCLONE_VM, CLONE_VM);
|
||
|
DEFINE(LCLONE_UNTRACED, CLONE_UNTRACED);
|
||
|
return 0;
|
||
20 years ago
|
}
|