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

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

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

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

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

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

#endif