diff options
| author | Miles Bader <miles@lsi.nec.co.jp> | 2002-11-26 05:19:36 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-11-26 05:19:36 -0800 |
| commit | e523efb36daaa1bdcd4fc8e8cf87433c16e81f2a (patch) | |
| tree | f4117846fe6757e706e8c57276cef4a8659456f2 /include | |
| parent | 69144341d887fcc235efbab9c475483472d2abc2 (diff) | |
[PATCH] Add v850 support for new module loader
Add v850 support for new module loader
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-v850/elf.h | 3 | ||||
| -rw-r--r-- | include/asm-v850/irq.h | 11 | ||||
| -rw-r--r-- | include/asm-v850/module.h | 28 |
3 files changed, 37 insertions, 5 deletions
diff --git a/include/asm-v850/elf.h b/include/asm-v850/elf.h index 5d0ac7fd8ef8..ee518cb6707d 100644 --- a/include/asm-v850/elf.h +++ b/include/asm-v850/elf.h @@ -19,7 +19,8 @@ typedef struct user_fpu_struct elf_fpregset_t; /* * This is used to ensure we don't load something for the wrong architecture. */ -#define elf_check_arch(x) ( (x)->e_machine == EM_CYGNUS_V850 ) +#define elf_check_arch(x) \ + ((x)->e_machine == EM_V850 || (x)->e_machine == EM_CYGNUS_V850) /* * These are used to set parameters in the core dumps. diff --git a/include/asm-v850/irq.h b/include/asm-v850/irq.h index 02a2c7906d70..1deaa2337549 100644 --- a/include/asm-v850/irq.h +++ b/include/asm-v850/irq.h @@ -52,6 +52,17 @@ typedef void (*irq_handler_t)(int irq, void *data, struct pt_regs *regs); interrupt. */ extern unsigned int handle_irq (int irq, struct pt_regs *regs); + +/* Enable interrupt handling on an irq. */ +extern void enable_irq(unsigned int irq); + +/* Disable an irq and wait for completion. */ +extern void disable_irq (unsigned int irq); + +/* Disable an irq without waiting. */ +extern void disable_irq_nosync (unsigned int irq); + + #endif /* !__ASSEMBLY__ */ #endif /* __V850_IRQ_H__ */ diff --git a/include/asm-v850/module.h b/include/asm-v850/module.h index 485c89fddc10..3067eb592f5b 100644 --- a/include/asm-v850/module.h +++ b/include/asm-v850/module.h @@ -3,20 +3,40 @@ * * Copyright (C) 2001,02 NEC Corporation * Copyright (C) 2001,02 Miles Bader <miles@gnu.org> + * Copyright (C) 2001 Rusty Russell * * This file is subject to the terms and conditions of the GNU General * Public License. See the file COPYING in the main directory of this * archive for more details. * * Written by Miles Bader <miles@gnu.org> + * + * Derived in part from include/asm-ppc/module.h */ #ifndef __V850_MODULE_H__ #define __V850_MODULE_H__ -#define arch_init_modules(x) ((void)0) -#define module_arch_init(x) (0) -#define module_map(sz) vmalloc (sz) -#define module_unmap(sz) vfree (sz) +#define MODULE_SYMBOL_PREFIX "_" + +struct v850_plt_entry +{ + /* Indirect jump instruction sequence (6-byte mov + 2-byte jr). */ + unsigned long tramp[2]; +}; + +struct mod_arch_specific +{ + /* How much of the core is actually taken up with core (then + we know the rest is for the PLT). */ + unsigned int core_plt_offset; + + /* Same for init. */ + unsigned int init_plt_offset; +}; + +#define Elf_Shdr Elf32_Shdr +#define Elf_Sym Elf32_Sym +#define Elf_Ehdr Elf32_Ehdr #endif /* __V850_MODULE_H__ */ |
