cpumask_copy(&mask, d->domain_dirty_cpumask);
/* Don't flush if the timestamp is old enough */
- tlbflush_filter(mask, page->tlbflush_timestamp);
+ tlbflush_filter(&mask, page->tlbflush_timestamp);
if ( unlikely(!cpumask_empty(&mask)) &&
/* Shadow mode: track only writable pages. */
/* Before we overwrite the old contents of this page,
* we need to be sure that no TLB holds a pointer to it. */
cpumask_copy(&mask, d->domain_dirty_cpumask);
- tlbflush_filter(mask, sp->tlbflush_timestamp);
+ tlbflush_filter(&mask, sp->tlbflush_timestamp);
if ( unlikely(!cpumask_empty(&mask)) )
{
perfc_incr(shadow_alloc_tlbflush);
* TLB since @page_timestamp.
*/
/* XXX lazy implementation just doesn't clear anything.... */
-#define tlbflush_filter(mask, page_timestamp) \
-do { \
-} while ( 0 )
+static inline void tlbflush_filter(cpumask_t *mask, uint32_t page_timestamp) {}
#define tlbflush_current_time() (0)
* Filter the given set of CPUs, removing those that definitely flushed their
* TLB since @page_timestamp.
*/
-#define tlbflush_filter(mask, page_timestamp) \
-do { \
- unsigned int cpu; \
- for_each_cpu ( cpu, &(mask) ) \
- if ( !NEED_FLUSH(per_cpu(tlbflush_time, cpu), page_timestamp) ) \
- cpumask_clear_cpu(cpu, &(mask)); \
-} while ( 0 )
+static inline void tlbflush_filter(cpumask_t *mask, uint32_t page_timestamp)
+{
+ unsigned int cpu;
+
+ for_each_cpu ( cpu, mask )
+ if ( !NEED_FLUSH(per_cpu(tlbflush_time, cpu), page_timestamp) )
+ cpumask_clear_cpu(cpu, mask);
+}
void new_tlbflush_clock_period(void);
static inline void filtered_flush_tlb_mask(uint32_t tlbflush_timestamp)
{
- cpumask_t mask = cpu_online_map;
+ cpumask_t mask;
- tlbflush_filter(mask, tlbflush_timestamp);
+ cpumask_copy(&mask, &cpu_online_map);
+ tlbflush_filter(&mask, tlbflush_timestamp);
if ( !cpumask_empty(&mask) )
{
perfc_incr(need_flush_tlb_flush);