#ifndef __avm_enh_h__ #define __avm_enh_h__ #include #include /* for Piglet - serial_core.c */ #ifdef CONFIG_AVM_TTY_POLLING struct polling_tty_port; struct polling_tty_port *avm_tty_poll_acquire(const char *ttyname); int avm_tty_poll_configure(struct polling_tty_port *pport, int baud, int parity, int bits, int flow); void avm_tty_poll_release(struct polling_tty_port *pport); int avm_tty_poll_get_char(struct polling_tty_port *pport); void avm_tty_poll_put_char(struct polling_tty_port *pport, unsigned char c); #endif static inline void dma_cache_wback(void *vaddr, unsigned int size) { void *vend = vaddr + size - 1; mb(); for (; vaddr < vend; vaddr += boot_cpu_data.x86_clflush_size) { clflush(vaddr); } /* Flush any possible final partial cacheline */ clflush(vend); mb(); } /** * vmalloc.c */ unsigned long get_vmap_area(unsigned long addr, unsigned long *caller, unsigned long *size, unsigned long *vmflags); unsigned long get_used_vmalloc_mem(void); /** * slab.c */ unsigned long get_kmemalloc_area(unsigned long addr, unsigned long *caller, const char **cache_name, unsigned long *size, int *freed); /** * bthelper.c */ char *arch_print_memory_classifier(char *txt, unsigned int txtlen, unsigned long addr, int include_addr_prefix); #define print_memory_classifier arch_print_memory_classifier void arch_show_register_memoryclassifier(struct pt_regs *pregs); #define show_register_memoryclassifier arch_show_register_memoryclassifier void arch_show_stacktrace_memoryclassifier(struct pt_regs *pregs); #define show_stacktrace_memoryclassifier arch_show_stacktrace_memoryclassifier #endif /** * nmi_enh.c */ struct cpu_context { struct task_struct *task; struct pt_regs *regs; }; int register_nmi_notifier(struct notifier_block *nb); void nmi_exception(struct pt_regs *regs); struct cpu_context *nmi_get_context(int cpu); /* vim: set ts=8 sw=8 noet cino=>8\:0l1(0: */