prefetch_mod.h 701 字节
Newer Older
L
liqiang2020 已提交
1 2 3
#ifndef __PREFETCH_TUNING__
#define __PREFETCH_TUNING__

L
liqiang 已提交
4 5 6 7 8
enum {
    DISABLE=0,
    ENABLE
};

L
liqiang2020 已提交
9 10 11 12 13
#define CACHE_READUNIQ_OFFSET 40
#define CACHE_READUNIQ_CTRL (1L << CACHE_READUNIQ_OFFSET)

#ifdef CONFIG_ARCH_HISI
typedef struct {
L
liqiang 已提交
14 15 16 17
    long cpuprefctrl_el1;
    long adps_lld_ddr_el1;
    long adpp_l1v_mop_el1;
    long adps_lld_l3_el1;
L
liqiang2020 已提交
18 19 20 21 22 23 24
} cfg_t;
#else
typedef long cfg_t;
#endif

extern void set_prefetch(void* dummy);
extern void get_prefetch(void* dummy);
L
liqiang 已提交
25 26
extern void read_unique_set(void *dummy);
extern void read_unique_get(void *dummy);
L
liqiang2020 已提交
27 28 29 30 31 32
extern void reset_prefetch(void* dummy);

extern int prefetch_policy_num(void);
extern cfg_t *prefetch_policy(int policy);

#endif