change function names
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef AAL_CPU_H
|
||||
#define AAL_CPU_H
|
||||
#ifndef IHK_CPU_H
|
||||
#define IHK_CPU_H
|
||||
|
||||
#include <list.h>
|
||||
#include <ihk/context.h>
|
||||
@@ -14,68 +14,68 @@ void cpu_pause(void);
|
||||
|
||||
unsigned long cpu_disable_interrupt_save(void);
|
||||
|
||||
struct aal_mc_interrupt_handler {
|
||||
struct ihk_mc_interrupt_handler {
|
||||
struct list_head list;
|
||||
void (*func)(void *);
|
||||
void *priv;
|
||||
};
|
||||
int aal_mc_register_interrupt_handler(int vector,
|
||||
struct aal_mc_interrupt_handler *h);
|
||||
int aal_mc_unregister_interrupt_handler(int vector,
|
||||
struct aal_mc_interrupt_handler *h);
|
||||
int ihk_mc_register_interrupt_handler(int vector,
|
||||
struct ihk_mc_interrupt_handler *h);
|
||||
int ihk_mc_unregister_interrupt_handler(int vector,
|
||||
struct ihk_mc_interrupt_handler *h);
|
||||
|
||||
enum aal_mc_gv_type {
|
||||
AAL_GV_IKC = 1,
|
||||
enum ihk_mc_gv_type {
|
||||
IHK_GV_IKC = 1,
|
||||
};
|
||||
|
||||
int aal_mc_get_vector(enum aal_mc_gv_type type);
|
||||
int aal_mc_interrupt_host(int cpu, int vector);
|
||||
int ihk_mc_get_vector(enum ihk_mc_gv_type type);
|
||||
int ihk_mc_interrupt_host(int cpu, int vector);
|
||||
|
||||
struct aal_mc_cpu_info {
|
||||
struct ihk_mc_cpu_info {
|
||||
int ncpus;
|
||||
int *hw_ids;
|
||||
int *nodes;
|
||||
};
|
||||
|
||||
struct aal_mc_cpu_info *aal_mc_get_cpu_info(void);
|
||||
void aal_mc_boot_cpu(int cpuid, unsigned long pc);
|
||||
int aal_mc_get_processor_id(void);
|
||||
int aal_mc_get_hardware_processor_id(void);
|
||||
struct ihk_mc_cpu_info *ihk_mc_get_cpu_info(void);
|
||||
void ihk_mc_boot_cpu(int cpuid, unsigned long pc);
|
||||
int ihk_mc_get_processor_id(void);
|
||||
int ihk_mc_get_hardware_processor_id(void);
|
||||
|
||||
void aal_mc_delay_us(int us);
|
||||
void aal_mc_set_syscall_handler(long (*handler)(int, aal_mc_user_context_t *));
|
||||
void ihk_mc_delay_us(int us);
|
||||
void ihk_mc_set_syscall_handler(long (*handler)(int, ihk_mc_user_context_t *));
|
||||
|
||||
void aal_mc_init_ap(void);
|
||||
void ihk_mc_init_ap(void);
|
||||
|
||||
void aal_mc_init_context(aal_mc_kernel_context_t *new_ctx,
|
||||
void ihk_mc_init_context(ihk_mc_kernel_context_t *new_ctx,
|
||||
void *stack_pointer,
|
||||
void (*next_function)(void));
|
||||
void aal_mc_switch_context(aal_mc_kernel_context_t *old_ctx,
|
||||
aal_mc_kernel_context_t *new_ctx);
|
||||
int aal_mc_interrupt_cpu(int cpu, int vector);
|
||||
void ihk_mc_switch_context(ihk_mc_kernel_context_t *old_ctx,
|
||||
ihk_mc_kernel_context_t *new_ctx);
|
||||
int ihk_mc_interrupt_cpu(int cpu, int vector);
|
||||
|
||||
void aal_mc_init_user_process(aal_mc_kernel_context_t *ctx,
|
||||
aal_mc_user_context_t **puctx,
|
||||
void ihk_mc_init_user_process(ihk_mc_kernel_context_t *ctx,
|
||||
ihk_mc_user_context_t **puctx,
|
||||
void *stack_pointer, unsigned long user_pc,
|
||||
unsigned long user_sp);
|
||||
|
||||
enum aal_mc_user_context_regtype {
|
||||
AAL_UCR_STACK_POINTER = 1,
|
||||
AAL_UCR_PROGRAM_COUNTER = 2,
|
||||
enum ihk_mc_user_context_regtype {
|
||||
IHK_UCR_STACK_POINTER = 1,
|
||||
IHK_UCR_PROGRAM_COUNTER = 2,
|
||||
};
|
||||
|
||||
void aal_mc_modify_user_context(aal_mc_user_context_t *uctx,
|
||||
enum aal_mc_user_context_regtype reg,
|
||||
void ihk_mc_modify_user_context(ihk_mc_user_context_t *uctx,
|
||||
enum ihk_mc_user_context_regtype reg,
|
||||
unsigned long value);
|
||||
|
||||
void aal_mc_debug_show_interrupt_context(const void *reg);
|
||||
void ihk_mc_debug_show_interrupt_context(const void *reg);
|
||||
|
||||
enum aal_asr_type {
|
||||
AAL_ASR_X86_FS,
|
||||
AAL_ASR_X86_GS,
|
||||
enum ihk_asr_type {
|
||||
IHK_ASR_X86_FS,
|
||||
IHK_ASR_X86_GS,
|
||||
};
|
||||
|
||||
int aal_mc_arch_set_special_register(enum aal_asr_type, unsigned long value);
|
||||
int aal_mc_arch_get_special_register(enum aal_asr_type, unsigned long *value);
|
||||
int ihk_mc_arch_set_special_register(enum ihk_asr_type, unsigned long value);
|
||||
int ihk_mc_arch_get_special_register(enum ihk_asr_type, unsigned long *value);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#ifndef AAL_DEBUG_H
|
||||
#define AAL_DEBUG_H
|
||||
#ifndef IHK_DEBUG_H
|
||||
#define IHK_DEBUG_H
|
||||
|
||||
#include <ihk/memconst.h>
|
||||
|
||||
struct aal_kmsg_buf {
|
||||
struct ihk_kmsg_buf {
|
||||
int tail;
|
||||
int len;
|
||||
char str[AAL_KMSG_SIZE - sizeof(int) * 2];
|
||||
char str[IHK_KMSG_SIZE - sizeof(int) * 2];
|
||||
};
|
||||
|
||||
extern int kprintf(const char *format, ...);
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
|
||||
#include <ihk/ikc.h>
|
||||
|
||||
struct aal_dma_request {
|
||||
aal_os_t src_os;
|
||||
struct ihk_dma_request {
|
||||
ihk_os_t src_os;
|
||||
unsigned long src_phys;
|
||||
aal_os_t dest_os;
|
||||
ihk_os_t dest_os;
|
||||
unsigned long dest_phys;
|
||||
unsigned long size;
|
||||
|
||||
void (*callback)(void *);
|
||||
void *priv;
|
||||
aal_os_t notify_os;
|
||||
ihk_os_t notify_os;
|
||||
unsigned long *notify;
|
||||
};
|
||||
|
||||
int aal_mc_dma_request(int channel, struct aal_dma_request *req);
|
||||
int ihk_mc_dma_request(int channel, struct ihk_dma_request *req);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#ifndef __HEADER_GENERIC_AAL_LOCK
|
||||
#define __HEADER_GENERIC_AAL_LOCK
|
||||
#ifndef __HEADER_GENERIC_IHK_LOCK
|
||||
#define __HEADER_GENERIC_IHK_LOCK
|
||||
|
||||
#include <arch-lock.h>
|
||||
|
||||
#ifndef AAL_STATIC_SPINLOCK_FUNCS
|
||||
void aal_mc_spinlock_init(aal_spinlock_t *);
|
||||
void aal_mc_spinlock_lock(aal_spinlock_t *, unsigned long *);
|
||||
void aal_mc_spinlock_unlock(aal_spinlock_t *, unsigned long *);
|
||||
#ifndef IHK_STATIC_SPINLOCK_FUNCS
|
||||
void ihk_mc_spinlock_init(ihk_spinlock_t *);
|
||||
void ihk_mc_spinlock_lock(ihk_spinlock_t *, unsigned long *);
|
||||
void ihk_mc_spinlock_unlock(ihk_spinlock_t *, unsigned long *);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,99 +1,99 @@
|
||||
#ifndef __HEADER_GENERIC_AAL_MM_H
|
||||
#define __HEADER_GENERIC_AAL_MM_H
|
||||
#ifndef __HEADER_GENERIC_IHK_MM_H
|
||||
#define __HEADER_GENERIC_IHK_MM_H
|
||||
|
||||
#include <memory.h>
|
||||
|
||||
enum aal_mc_gma_type {
|
||||
AAL_MC_GMA_MAP_START,
|
||||
AAL_MC_GMA_MAP_END,
|
||||
AAL_MC_GMA_AVAIL_START,
|
||||
AAL_MC_GMA_AVAIL_END,
|
||||
AAL_MC_GMA_HEAP_START,
|
||||
AAL_MC_NR_RESERVED_AREAS,
|
||||
AAL_MC_RESERVED_AREA_START,
|
||||
AAL_MC_RESERVED_AREA_END,
|
||||
enum ihk_mc_gma_type {
|
||||
IHK_MC_GMA_MAP_START,
|
||||
IHK_MC_GMA_MAP_END,
|
||||
IHK_MC_GMA_AVAIL_START,
|
||||
IHK_MC_GMA_AVAIL_END,
|
||||
IHK_MC_GMA_HEAP_START,
|
||||
IHK_MC_NR_RESERVED_AREAS,
|
||||
IHK_MC_RESERVED_AREA_START,
|
||||
IHK_MC_RESERVED_AREA_END,
|
||||
};
|
||||
|
||||
enum aal_mc_ma_type {
|
||||
AAL_MC_MA_AVAILABLE,
|
||||
AAL_MC_MA_RESERVED,
|
||||
AAL_MC_MA_SPECIAL,
|
||||
enum ihk_mc_ma_type {
|
||||
IHK_MC_MA_AVAILABLE,
|
||||
IHK_MC_MA_RESERVED,
|
||||
IHK_MC_MA_SPECIAL,
|
||||
};
|
||||
|
||||
enum aal_mc_ap_flag {
|
||||
AAL_MC_AP_FLAG,
|
||||
enum ihk_mc_ap_flag {
|
||||
IHK_MC_AP_FLAG,
|
||||
};
|
||||
|
||||
enum aal_mc_pt_prepare_flag {
|
||||
AAL_MC_PT_FIRST_LEVEL,
|
||||
AAL_MC_PT_LAST_LEVEL,
|
||||
enum ihk_mc_pt_prepare_flag {
|
||||
IHK_MC_PT_FIRST_LEVEL,
|
||||
IHK_MC_PT_LAST_LEVEL,
|
||||
};
|
||||
|
||||
struct aal_mc_memory_area {
|
||||
struct ihk_mc_memory_area {
|
||||
unsigned long start;
|
||||
unsigned long size;
|
||||
enum aal_mc_ma_type type;
|
||||
enum ihk_mc_ma_type type;
|
||||
};
|
||||
|
||||
struct aal_mc_memory_node {
|
||||
struct ihk_mc_memory_node {
|
||||
int node;
|
||||
int nareas;
|
||||
struct aal_mc_memory_area *areas;
|
||||
struct ihk_mc_memory_area *areas;
|
||||
};
|
||||
|
||||
unsigned long aal_mc_get_memory_address(enum aal_mc_gma_type, int);
|
||||
unsigned long ihk_mc_get_memory_address(enum ihk_mc_gma_type, int);
|
||||
|
||||
void aal_mc_reserve_arch_pages(unsigned long start, unsigned long end,
|
||||
void ihk_mc_reserve_arch_pages(unsigned long start, unsigned long end,
|
||||
void (*cb)(unsigned long, unsigned long, int));
|
||||
|
||||
struct aal_mc_pa_ops {
|
||||
void *(*alloc_page)(int, enum aal_mc_ap_flag);
|
||||
struct ihk_mc_pa_ops {
|
||||
void *(*alloc_page)(int, enum ihk_mc_ap_flag);
|
||||
void (*free_page)(void *, int);
|
||||
|
||||
void *(*alloc)(int, enum aal_mc_ap_flag);
|
||||
void *(*alloc)(int, enum ihk_mc_ap_flag);
|
||||
void (*free)(void *);
|
||||
};
|
||||
|
||||
void aal_mc_set_page_allocator(struct aal_mc_pa_ops *);
|
||||
void aal_mc_set_page_fault_handler(void (*h)(unsigned long, void *, unsigned long));
|
||||
void ihk_mc_set_page_allocator(struct ihk_mc_pa_ops *);
|
||||
void ihk_mc_set_page_fault_handler(void (*h)(unsigned long, void *, unsigned long));
|
||||
|
||||
unsigned long aal_mc_map_memory(void *os, unsigned long phys,
|
||||
unsigned long ihk_mc_map_memory(void *os, unsigned long phys,
|
||||
unsigned long size);
|
||||
void aal_mc_unmap_memory(void *os, unsigned long phys, unsigned long size);
|
||||
void ihk_mc_unmap_memory(void *os, unsigned long phys, unsigned long size);
|
||||
|
||||
void *aal_mc_map_virtual(unsigned long phys, int npages,
|
||||
enum aal_mc_pt_attribute attr);
|
||||
void aal_mc_unmap_virtual(void *va, int npages, int free_physical);
|
||||
void *ihk_mc_map_virtual(unsigned long phys, int npages,
|
||||
enum ihk_mc_pt_attribute attr);
|
||||
void ihk_mc_unmap_virtual(void *va, int npages, int free_physical);
|
||||
|
||||
extern void *sbox_base;
|
||||
extern unsigned int free_bitmap_micpa;
|
||||
void aal_mc_map_micpa(unsigned long host_pa, unsigned long* mic_pa);
|
||||
int aal_mc_free_micpa(unsigned long mic_pa);
|
||||
void aal_mc_clean_micpa(void);
|
||||
void ihk_mc_map_micpa(unsigned long host_pa, unsigned long* mic_pa);
|
||||
int ihk_mc_free_micpa(unsigned long mic_pa);
|
||||
void ihk_mc_clean_micpa(void);
|
||||
|
||||
void *aal_mc_alloc_pages(int npages, enum aal_mc_ap_flag flag);
|
||||
void aal_mc_free_pages(void *p, int npages);
|
||||
void *aal_mc_allocate(int size, enum aal_mc_ap_flag flag);
|
||||
void aal_mc_free(void *p);
|
||||
void *ihk_mc_alloc_pages(int npages, enum ihk_mc_ap_flag flag);
|
||||
void ihk_mc_free_pages(void *p, int npages);
|
||||
void *ihk_mc_allocate(int size, enum ihk_mc_ap_flag flag);
|
||||
void ihk_mc_free(void *p);
|
||||
|
||||
void *arch_alloc_page(enum aal_mc_ap_flag flag);
|
||||
void *arch_alloc_page(enum ihk_mc_ap_flag flag);
|
||||
void arch_free_page(void *ptr);
|
||||
|
||||
typedef void *page_table_t;
|
||||
|
||||
int aal_mc_pt_set_page(page_table_t pt, void *virt, unsigned long phys,
|
||||
enum aal_mc_pt_attribute attr);
|
||||
int aal_mc_pt_set_large_page(page_table_t pt, void *virt,
|
||||
unsigned long phys, enum aal_mc_pt_attribute attr);
|
||||
int aal_mc_pt_change_page(page_table_t pt, void *virt,
|
||||
enum aal_mc_pt_attribute);
|
||||
int aal_mc_pt_clear_page(page_table_t pt, void *virt);
|
||||
int aal_mc_pt_prepare_map(page_table_t pt, void *virt, unsigned long size,
|
||||
enum aal_mc_pt_prepare_flag);
|
||||
int ihk_mc_pt_set_page(page_table_t pt, void *virt, unsigned long phys,
|
||||
enum ihk_mc_pt_attribute attr);
|
||||
int ihk_mc_pt_set_large_page(page_table_t pt, void *virt,
|
||||
unsigned long phys, enum ihk_mc_pt_attribute attr);
|
||||
int ihk_mc_pt_change_page(page_table_t pt, void *virt,
|
||||
enum ihk_mc_pt_attribute);
|
||||
int ihk_mc_pt_clear_page(page_table_t pt, void *virt);
|
||||
int ihk_mc_pt_prepare_map(page_table_t pt, void *virt, unsigned long size,
|
||||
enum ihk_mc_pt_prepare_flag);
|
||||
|
||||
struct page_table *aal_mc_pt_create(void);
|
||||
void aal_mc_load_page_table(struct page_table *pt);
|
||||
int aal_mc_pt_virt_to_phys(struct page_table *pt,
|
||||
struct page_table *ihk_mc_pt_create(void);
|
||||
void ihk_mc_load_page_table(struct page_table *pt);
|
||||
int ihk_mc_pt_virt_to_phys(struct page_table *pt,
|
||||
void *virt, unsigned long *phys);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
#ifndef __HEADER_GENERIC_AAL_PAGE_ALLOC
|
||||
#define __HEADER_GENERIC_AAL_PAGE_ALLOC
|
||||
#ifndef __HEADER_GENERIC_IHK_PAGE_ALLOC
|
||||
#define __HEADER_GENERIC_IHK_PAGE_ALLOC
|
||||
|
||||
struct aal_page_allocator_desc {
|
||||
struct ihk_page_allocator_desc {
|
||||
unsigned long start;
|
||||
unsigned int last;
|
||||
unsigned int count;
|
||||
unsigned int flag;
|
||||
unsigned int shift;
|
||||
aal_spinlock_t lock;
|
||||
ihk_spinlock_t lock;
|
||||
unsigned int pad;
|
||||
|
||||
unsigned long map[0];
|
||||
};
|
||||
|
||||
unsigned long aal_pagealloc_count(void *__desc);
|
||||
void *__aal_pagealloc_init(unsigned long start, unsigned long size,
|
||||
unsigned long ihk_pagealloc_count(void *__desc);
|
||||
void *__ihk_pagealloc_init(unsigned long start, unsigned long size,
|
||||
unsigned long unit, void *initial,
|
||||
unsigned long *pdescsize);
|
||||
void *aal_pagealloc_init(unsigned long start, unsigned long size,
|
||||
void *ihk_pagealloc_init(unsigned long start, unsigned long size,
|
||||
unsigned long unit);
|
||||
void aal_pagealloc_destroy(void *__desc);
|
||||
unsigned long aal_pagealloc_alloc(void *__desc, int npages);
|
||||
void aal_pagealloc_reserve(void *desc, unsigned long start, unsigned long end);
|
||||
void aal_pagealloc_free(void *__desc, unsigned long address, int npages);
|
||||
unsigned long aal_pagealloc_count(void *__desc);
|
||||
void ihk_pagealloc_destroy(void *__desc);
|
||||
unsigned long ihk_pagealloc_alloc(void *__desc, int npages);
|
||||
void ihk_pagealloc_reserve(void *desc, unsigned long start, unsigned long end);
|
||||
void ihk_pagealloc_free(void *__desc, unsigned long address, int npages);
|
||||
unsigned long ihk_pagealloc_count(void *__desc);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#ifndef HEADER_GENERIC_AAL_PERFCTR_H
|
||||
#define HEADER_GENERIC_AAL_PERFCTR_H
|
||||
#ifndef HEADER_GENERIC_IHK_PERFCTR_H
|
||||
#define HEADER_GENERIC_IHK_PERFCTR_H
|
||||
|
||||
#define PERFCTR_USER_MODE 0x01
|
||||
#define PERFCTR_KERNEL_MODE 0x02
|
||||
|
||||
enum aal_perfctr_type {
|
||||
enum ihk_perfctr_type {
|
||||
APT_TYPE_DATA_PAGE_WALK,
|
||||
APT_TYPE_DATA_READ_MISS,
|
||||
APT_TYPE_DATA_WRITE_MISS,
|
||||
@@ -30,12 +30,12 @@ enum aal_perfctr_type {
|
||||
PERFCTR_MAX_TYPE,
|
||||
};
|
||||
|
||||
int aal_mc_perfctr_init(int counter, enum aal_perfctr_type type, int mode);
|
||||
int aal_mc_perfctr_start(unsigned long counter_mask);
|
||||
int aal_mc_perfctr_stop(unsigned long counter_mask);
|
||||
int aal_mc_perfctr_reset(int counter);
|
||||
int aal_mc_perfctr_read_mask(unsigned long counter_mask, unsigned long *value);
|
||||
unsigned long aal_mc_perfctr_read(int counter);
|
||||
int ihk_mc_perfctr_init(int counter, enum ihk_perfctr_type type, int mode);
|
||||
int ihk_mc_perfctr_start(unsigned long counter_mask);
|
||||
int ihk_mc_perfctr_stop(unsigned long counter_mask);
|
||||
int ihk_mc_perfctr_reset(int counter);
|
||||
int ihk_mc_perfctr_read_mask(unsigned long counter_mask, unsigned long *value);
|
||||
unsigned long ihk_mc_perfctr_read(int counter);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user