Subversion Repositories HelenOS

Rev

Rev 2134 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2134 Rev 2141
Line 41... Line 41...
41
#define dcache_flush_page(p) \
41
#define dcache_flush_page(p) \
42
    dcache_flush_color(PAGE_COLOR((p)))
42
    dcache_flush_color(PAGE_COLOR((p)))
43
#define dcache_flush_frame(p, f) \
43
#define dcache_flush_frame(p, f) \
44
    dcache_flush_tag(PAGE_COLOR((p)), ADDR2PFN((f)));
44
    dcache_flush_tag(PAGE_COLOR((p)), ADDR2PFN((f)));
45
 
45
 
46
/**
-
 
47
 * Enumerations to differentiate among different scopes of D-Cache
-
 
48
 * invalidation.
-
 
49
 */
-
 
50
typedef enum {
-
 
51
    DCACHE_INVL_INVALID,
-
 
52
    DCACHE_INVL_ALL,
-
 
53
    DCACHE_INVL_COLOR,
-
 
54
    DCACHE_INVL_FRAME
-
 
55
} dcache_invalidate_type_t;
-
 
56
 
-
 
57
/**
-
 
58
 * Number of messages that can be queued in the cpu_arch_t structure at a time.
-
 
59
 */
-
 
60
#define DCACHE_MSG_QUEUE_LEN    10
-
 
61
 
-
 
62
/** D-cache shootdown message type. */
-
 
63
typedef struct {
-
 
64
    dcache_invalidate_type_t type;
-
 
65
    int color;
-
 
66
    uintptr_t frame;
-
 
67
} dcache_shootdown_msg_t;
-
 
68
 
-
 
69
extern void dcache_flush(void);
46
extern void dcache_flush(void);
70
extern void dcache_flush_color(int c);
47
extern void dcache_flush_color(int c);
71
extern void dcache_flush_tag(int c, pfn_t tag);
48
extern void dcache_flush_tag(int c, pfn_t tag);
72
 
49
 
73
#ifdef CONFIG_SMP
-
 
74
extern void dcache_shootdown_start(dcache_invalidate_type_t type, int color,
-
 
75
    uintptr_t frame);
-
 
76
extern void dcache_shootdown_finalize(void);
-
 
77
extern void dcache_shootdown_ipi_recv(void);
-
 
78
#else
-
 
79
#define dcache_shootdown_start(t, c, f)
-
 
80
#define dcache_shootdown_finalize()
-
 
81
#define dcache_shootdown_ipi_recv()
-
 
82
#endif /* CONFIG_SMP */
-
 
83
 
-
 
84
#endif
50
#endif
85
 
51
 
86
/** @}
52
/** @}
87
 */
53
 */