Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145312
b: refs/heads/master
c: 2171787
h: refs/heads/master
v: v3
  • Loading branch information
Pallipadi, Venkatesh authored and H. Peter Anvin committed May 26, 2009
1 parent bfdfd7e commit 585447d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 46176b4f6bac19454b7b5c35f68594b85850a600
refs/heads/master: 2171787be2e71ff71159857bfeb21398b61eb615
17 changes: 3 additions & 14 deletions trunk/arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,30 +204,19 @@ static void cpa_flush_range(unsigned long start, int numpages, int cache)
}
}

static void wbinvd_local(void *unused)
{
wbinvd();
}

static void cpa_flush_array(unsigned long *start, int numpages, int cache,
int in_flags, struct page **pages)
{
unsigned int i, level;
unsigned long do_wbinvd = cache && numpages >= 1024; /* 4M threshold */

BUG_ON(irqs_disabled());

on_each_cpu(__cpa_flush_range, NULL, 1);
on_each_cpu(__cpa_flush_all, (void *) do_wbinvd, 1);

if (!cache)
if (!cache || do_wbinvd)
return;

/* 4M threshold */
if (numpages >= 1024) {
if (boot_cpu_data.x86 >= 4)
on_each_cpu(wbinvd_local, NULL, 1);

return;
}
/*
* We only need to flush on one CPU,
* clflush is a MESI-coherent instruction that
Expand Down

0 comments on commit 585447d

Please sign in to comment.