Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cleanups from Ingo Molnar: "Misc cleanups" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apm: Fix spelling mistake: "caculate" -> "calculate" x86/mtrr: Rename main.c to mtrr.c and remove duplicate prefixes x86: Remove pr_fmt duplicate logging prefixes x86/early-quirks: Rename duplicate define of dev_err x86/bpf: Clean up non-standard comments, to make the code more readable
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
obj-y := main.o if.o generic.o cleanup.o
|
||||
obj-y := mtrr.o if.o generic.o cleanup.o
|
||||
obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o
|
||||
|
||||
|
@@ -101,7 +101,7 @@ static int have_wrcomb(void)
|
||||
if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS &&
|
||||
dev->device == PCI_DEVICE_ID_SERVERWORKS_LE &&
|
||||
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);
|
||||
return 0;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ static int have_wrcomb(void)
|
||||
*/
|
||||
if (dev->vendor == PCI_VENDOR_ID_INTEL &&
|
||||
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);
|
||||
return 0;
|
||||
}
|
||||
@@ -313,24 +313,24 @@ int mtrr_add_page(unsigned long base, unsigned long size,
|
||||
return error;
|
||||
|
||||
if (type >= MTRR_NUM_TYPES) {
|
||||
pr_warn("mtrr: type: %u invalid\n", type);
|
||||
pr_warn("type: %u invalid\n", type);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* If the type is WC, check that this processor supports it */
|
||||
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;
|
||||
}
|
||||
|
||||
if (!size) {
|
||||
pr_warn("mtrr: zero sized request\n");
|
||||
pr_warn("zero sized request\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((base | (base + size - 1)) >>
|
||||
(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;
|
||||
}
|
||||
|
||||
@@ -361,8 +361,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
|
||||
} else if (types_compatible(type, ltype))
|
||||
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);
|
||||
goto out;
|
||||
}
|
||||
@@ -370,7 +369,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
|
||||
if (ltype != type) {
|
||||
if (types_compatible(type, ltype))
|
||||
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),
|
||||
mtrr_attrib_to_str(type));
|
||||
goto out;
|
||||
@@ -396,7 +395,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pr_info("mtrr: no more MTRRs available\n");
|
||||
pr_info("no more MTRRs available\n");
|
||||
}
|
||||
error = i;
|
||||
out:
|
||||
@@ -408,8 +407,8 @@ int mtrr_add_page(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))) {
|
||||
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();
|
||||
return -1;
|
||||
}
|
||||
@@ -500,22 +499,22 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size)
|
||||
}
|
||||
}
|
||||
if (reg < 0) {
|
||||
pr_debug("mtrr: no MTRR for %lx000,%lx000 found\n",
|
||||
pr_debug("no MTRR for %lx000,%lx000 found\n",
|
||||
base, size);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
if (reg >= max) {
|
||||
pr_warn("mtrr: register: %d too big\n", reg);
|
||||
pr_warn("register: %d too big\n", reg);
|
||||
goto out;
|
||||
}
|
||||
mtrr_if->get(reg, &lbase, &lsize, <ype);
|
||||
if (lsize < 1) {
|
||||
pr_warn("mtrr: MTRR %d not used\n", reg);
|
||||
pr_warn("MTRR %d not used\n", reg);
|
||||
goto out;
|
||||
}
|
||||
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;
|
||||
}
|
||||
if (--mtrr_usage_table[reg] < 1)
|
||||
@@ -776,7 +775,7 @@ void __init mtrr_bp_init(void)
|
||||
}
|
||||
|
||||
if (!mtrr_enabled()) {
|
||||
pr_info("MTRR: Disabled\n");
|
||||
pr_info("Disabled\n");
|
||||
|
||||
/*
|
||||
* PAT initialization relies on MTRR's rendezvous handler.
|
Reference in New Issue
Block a user