|
@@ -100,7 +100,7 @@ static int have_wrcomb(void)
|
|
if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS &&
|
|
if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS &&
|
|
dev->device == PCI_DEVICE_ID_SERVERWORKS_LE &&
|
|
dev->device == PCI_DEVICE_ID_SERVERWORKS_LE &&
|
|
dev->revision <= 5) {
|
|
dev->revision <= 5) {
|
|
- pr_info("mtrr: Serverworks LE rev < 6 detected. Write-combining disabled.\n");
|
|
|
|
|
|
+ pr_info("Serverworks LE rev < 6 detected. Write-combining disabled.\n");
|
|
pci_dev_put(dev);
|
|
pci_dev_put(dev);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -110,7 +110,7 @@ static int have_wrcomb(void)
|
|
*/
|
|
*/
|
|
if (dev->vendor == PCI_VENDOR_ID_INTEL &&
|
|
if (dev->vendor == PCI_VENDOR_ID_INTEL &&
|
|
dev->device == PCI_DEVICE_ID_INTEL_82451NX) {
|
|
dev->device == PCI_DEVICE_ID_INTEL_82451NX) {
|
|
- pr_info("mtrr: Intel 450NX MMC detected. Write-combining disabled.\n");
|
|
|
|
|
|
+ pr_info("Intel 450NX MMC detected. Write-combining disabled.\n");
|
|
pci_dev_put(dev);
|
|
pci_dev_put(dev);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -312,24 +312,24 @@ int mtrr_add_page(unsigned long base, unsigned long size,
|
|
return error;
|
|
return error;
|
|
|
|
|
|
if (type >= MTRR_NUM_TYPES) {
|
|
if (type >= MTRR_NUM_TYPES) {
|
|
- pr_warn("mtrr: type: %u invalid\n", type);
|
|
|
|
|
|
+ pr_warn("type: %u invalid\n", type);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
/* If the type is WC, check that this processor supports it */
|
|
/* If the type is WC, check that this processor supports it */
|
|
if ((type == MTRR_TYPE_WRCOMB) && !have_wrcomb()) {
|
|
if ((type == MTRR_TYPE_WRCOMB) && !have_wrcomb()) {
|
|
- pr_warn("mtrr: your processor doesn't support write-combining\n");
|
|
|
|
|
|
+ pr_warn("your processor doesn't support write-combining\n");
|
|
return -ENOSYS;
|
|
return -ENOSYS;
|
|
}
|
|
}
|
|
|
|
|
|
if (!size) {
|
|
if (!size) {
|
|
- pr_warn("mtrr: zero sized request\n");
|
|
|
|
|
|
+ pr_warn("zero sized request\n");
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
if ((base | (base + size - 1)) >>
|
|
if ((base | (base + size - 1)) >>
|
|
(boot_cpu_data.x86_phys_bits - PAGE_SHIFT)) {
|
|
(boot_cpu_data.x86_phys_bits - PAGE_SHIFT)) {
|
|
- pr_warn("mtrr: base or size exceeds the MTRR width\n");
|
|
|
|
|
|
+ pr_warn("base or size exceeds the MTRR width\n");
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -360,8 +360,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
|
|
} else if (types_compatible(type, ltype))
|
|
} else if (types_compatible(type, ltype))
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- pr_warn("mtrr: 0x%lx000,0x%lx000 overlaps existing"
|
|
|
|
- " 0x%lx000,0x%lx000\n", base, size, lbase,
|
|
|
|
|
|
+ pr_warn("0x%lx000,0x%lx000 overlaps existing 0x%lx000,0x%lx000\n", base, size, lbase,
|
|
lsize);
|
|
lsize);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
@@ -369,7 +368,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
|
|
if (ltype != type) {
|
|
if (ltype != type) {
|
|
if (types_compatible(type, ltype))
|
|
if (types_compatible(type, ltype))
|
|
continue;
|
|
continue;
|
|
- pr_warn("mtrr: type mismatch for %lx000,%lx000 old: %s new: %s\n",
|
|
|
|
|
|
+ pr_warn("type mismatch for %lx000,%lx000 old: %s new: %s\n",
|
|
base, size, mtrr_attrib_to_str(ltype),
|
|
base, size, mtrr_attrib_to_str(ltype),
|
|
mtrr_attrib_to_str(type));
|
|
mtrr_attrib_to_str(type));
|
|
goto out;
|
|
goto out;
|
|
@@ -395,7 +394,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- pr_info("mtrr: no more MTRRs available\n");
|
|
|
|
|
|
+ pr_info("no more MTRRs available\n");
|
|
}
|
|
}
|
|
error = i;
|
|
error = i;
|
|
out:
|
|
out:
|
|
@@ -407,8 +406,8 @@ int mtrr_add_page(unsigned long base, unsigned long size,
|
|
static int mtrr_check(unsigned long base, unsigned long size)
|
|
static int mtrr_check(unsigned long base, unsigned long size)
|
|
{
|
|
{
|
|
if ((base & (PAGE_SIZE - 1)) || (size & (PAGE_SIZE - 1))) {
|
|
if ((base & (PAGE_SIZE - 1)) || (size & (PAGE_SIZE - 1))) {
|
|
- pr_warn("mtrr: size and base must be multiples of 4 kiB\n");
|
|
|
|
- pr_debug("mtrr: size: 0x%lx base: 0x%lx\n", size, base);
|
|
|
|
|
|
+ pr_warn("size and base must be multiples of 4 kiB\n");
|
|
|
|
+ pr_debug("size: 0x%lx base: 0x%lx\n", size, base);
|
|
dump_stack();
|
|
dump_stack();
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
@@ -499,22 +498,22 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (reg < 0) {
|
|
if (reg < 0) {
|
|
- pr_debug("mtrr: no MTRR for %lx000,%lx000 found\n",
|
|
|
|
|
|
+ pr_debug("no MTRR for %lx000,%lx000 found\n",
|
|
base, size);
|
|
base, size);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (reg >= max) {
|
|
if (reg >= max) {
|
|
- pr_warn("mtrr: register: %d too big\n", reg);
|
|
|
|
|
|
+ pr_warn("register: %d too big\n", reg);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
mtrr_if->get(reg, &lbase, &lsize, <ype);
|
|
mtrr_if->get(reg, &lbase, &lsize, <ype);
|
|
if (lsize < 1) {
|
|
if (lsize < 1) {
|
|
- pr_warn("mtrr: MTRR %d not used\n", reg);
|
|
|
|
|
|
+ pr_warn("MTRR %d not used\n", reg);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
if (mtrr_usage_table[reg] < 1) {
|
|
if (mtrr_usage_table[reg] < 1) {
|
|
- pr_warn("mtrr: reg: %d has count=0\n", reg);
|
|
|
|
|
|
+ pr_warn("reg: %d has count=0\n", reg);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
if (--mtrr_usage_table[reg] < 1)
|
|
if (--mtrr_usage_table[reg] < 1)
|
|
@@ -775,7 +774,7 @@ void __init mtrr_bp_init(void)
|
|
}
|
|
}
|
|
|
|
|
|
if (!mtrr_enabled()) {
|
|
if (!mtrr_enabled()) {
|
|
- pr_info("MTRR: Disabled\n");
|
|
|
|
|
|
+ pr_info("Disabled\n");
|
|
|
|
|
|
/*
|
|
/*
|
|
* PAT initialization relies on MTRR's rendezvous handler.
|
|
* PAT initialization relies on MTRR's rendezvous handler.
|