if ((smp_processor_id() == 1) && c1_ramping_may_cause_clock_drift(c))
disable_c1_ramping();
- /* Support INVLPG of superpages? */
- __set_bit(2, &c->invlpg_works_ok);
- if ( cpu_has(c, X86_FEATURE_PAGE1GB) )
- __set_bit(3, &c->invlpg_works_ok);
-
start_svm(c);
}
c->x86_vendor_id[0] = '\0'; /* Unset */
c->x86_model_id[0] = '\0'; /* Unset */
c->x86_max_cores = 1;
- c->invlpg_works_ok = 1; /* no superpage INVLPG by default */
c->x86_clflush_size = 0;
memset(&c->x86_capability, 0, sizeof c->x86_capability);
if ((c->x86<<8 | c->x86_model<<4 | c->x86_mask) < 0x633)
clear_bit(X86_FEATURE_SEP, c->x86_capability);
- /* Supports INVLPG of superpages? */
- __set_bit(2, &c->invlpg_works_ok);
- if (/* PentiumPro erratum 30 */
- (c->x86 == 6 && c->x86_model == 1 && c->x86_mask < 9) ||
- /* Dual-Core Intel Xeon 3000/5100 series erratum 89/90 */
- /* Quad-Core Intel Xeon 3200/5300 series erratum 89/88 */
- /* Intel Core2 erratum 89 */
- (c->x86 == 6 && c->x86_model == 15 ) ||
- /* Dual-Core Intel Xeon LV/ULV erratum 75 */
- (c->x86 == 6 && c->x86_model == 14 ))
- __clear_bit(2, &c->invlpg_works_ok);
-
/* Names for the Pentium II/Celeron processors
detectable only by also checking the cache size.
Dixon is NOT a Celeron. */
if ( flags & (FLUSH_TLB|FLUSH_TLB_GLOBAL) )
{
- if ( (level != 0) && test_bit(level, &c->invlpg_works_ok) )
+ if ( level == 1 )
{
+ /*
+ * We don't INVLPG multi-page regions because the 2M/4M/1G
+ * region may not have been mapped with a superpage. Also there
+ * are various errata surrounding INVLPG usage on superpages, and
+ * a full flush is in any case not *that* expensive.
+ */
asm volatile ( "invlpg %0"
: : "m" (*(const char *)(va)) : "memory" );
}
char __attribute__ ((__section__(".bss.stack_aligned"))) cpu0_stack[STACK_SIZE];
-struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, 1, -1 };
+struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1 };
#if CONFIG_PAGING_LEVELS > 2
unsigned long mmu_cr4_features = X86_CR4_PSE | X86_CR4_PGE | X86_CR4_PAE;
* 1 -> 4kB area containing specified virtual address
* 2 -> 4MB/2MB area containing specified virtual address
* 3 -> 1GB area containing specified virtual address (x86/64 only)
+ * NB. Multi-page areas do not need to have been mapped with a superpage.
*/
#define FLUSH_LEVEL_MASK 0x0f
#define FLUSH_LEVEL(x) (x)
__u8 x86_vendor; /* CPU vendor */
__u8 x86_model;
__u8 x86_mask;
- __u8 invlpg_works_ok;
int cpuid_level; /* Maximum supported CPUID level, -1=no CPUID */
unsigned int x86_capability[NCAPINTS];
char x86_vendor_id[16];