Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 mm changes from Ingo Molnar: "Misc smaller changes all over the map" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/iommu/dmar: Remove warning for HPET scope type x86/mm/gart: Drop unnecessary check x86/mm/hotplug: Put kernel_physical_mapping_remove() declaration in CONFIG_MEMORY_HOTREMOVE x86/mm/fixmap: Remove unused FIX_CYCLONE_TIMER x86/mm/numa: Simplify some bit mangling x86/mm: Re-enable DEBUG_TLBFLUSH for X86_32 x86/mm/cpa: Cleanup split_large_page() and its callee x86: Drop always empty .text..page_aligned section
This commit is contained in:
@@ -131,7 +131,7 @@ config DOUBLEFAULT
|
|||||||
|
|
||||||
config DEBUG_TLBFLUSH
|
config DEBUG_TLBFLUSH
|
||||||
bool "Set upper limit of TLB entries to flush one-by-one"
|
bool "Set upper limit of TLB entries to flush one-by-one"
|
||||||
depends on DEBUG_KERNEL && (X86_64 || X86_INVLPG)
|
depends on DEBUG_KERNEL
|
||||||
---help---
|
---help---
|
||||||
|
|
||||||
X86-only for now.
|
X86-only for now.
|
||||||
|
@@ -105,9 +105,6 @@ enum fixed_addresses {
|
|||||||
FIX_LI_PCIB, /* Lithium PCI Bridge B */
|
FIX_LI_PCIB, /* Lithium PCI Bridge B */
|
||||||
#endif
|
#endif
|
||||||
FIX_RO_IDT, /* Virtual mapping for read-only IDT */
|
FIX_RO_IDT, /* Virtual mapping for read-only IDT */
|
||||||
#ifdef CONFIG_X86_CYCLONE_TIMER
|
|
||||||
FIX_CYCLONE_TIMER, /*cyclone timer register*/
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
|
FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
|
||||||
FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
|
FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
|
||||||
|
@@ -351,7 +351,6 @@ static inline void update_page_count(int level, unsigned long pages) { }
|
|||||||
* as a pte too.
|
* as a pte too.
|
||||||
*/
|
*/
|
||||||
extern pte_t *lookup_address(unsigned long address, unsigned int *level);
|
extern pte_t *lookup_address(unsigned long address, unsigned int *level);
|
||||||
extern int __split_large_page(pte_t *kpte, unsigned long address, pte_t *pbase);
|
|
||||||
extern phys_addr_t slow_virt_to_phys(void *__address);
|
extern phys_addr_t slow_virt_to_phys(void *__address);
|
||||||
|
|
||||||
#endif /* !__ASSEMBLY__ */
|
#endif /* !__ASSEMBLY__ */
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
.section .text..page_aligned
|
.text
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
#include <asm/segment.h>
|
#include <asm/segment.h>
|
||||||
#include <asm/page_types.h>
|
#include <asm/page_types.h>
|
||||||
|
@@ -87,7 +87,7 @@ static u32 __init allocate_aperture(void)
|
|||||||
*/
|
*/
|
||||||
addr = memblock_find_in_range(GART_MIN_ADDR, GART_MAX_ADDR,
|
addr = memblock_find_in_range(GART_MIN_ADDR, GART_MAX_ADDR,
|
||||||
aper_size, aper_size);
|
aper_size, aper_size);
|
||||||
if (!addr || addr + aper_size > GART_MAX_ADDR) {
|
if (!addr) {
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
"Cannot allocate aperture memory hole (%lx,%uK)\n",
|
"Cannot allocate aperture memory hole (%lx,%uK)\n",
|
||||||
addr, aper_size>>10);
|
addr, aper_size>>10);
|
||||||
|
@@ -94,10 +94,6 @@ SECTIONS
|
|||||||
_text = .;
|
_text = .;
|
||||||
/* bootstrapping code */
|
/* bootstrapping code */
|
||||||
HEAD_TEXT
|
HEAD_TEXT
|
||||||
#ifdef CONFIG_X86_32
|
|
||||||
. = ALIGN(PAGE_SIZE);
|
|
||||||
*(.text..page_aligned)
|
|
||||||
#endif
|
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
_stext = .;
|
_stext = .;
|
||||||
TEXT_TEXT
|
TEXT_TEXT
|
||||||
|
@@ -130,9 +130,8 @@ int __init amd_numa_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
limit >>= 16;
|
limit >>= 16;
|
||||||
limit <<= 24;
|
|
||||||
limit |= (1<<24)-1;
|
|
||||||
limit++;
|
limit++;
|
||||||
|
limit <<= 24;
|
||||||
|
|
||||||
if (limit > end)
|
if (limit > end)
|
||||||
limit = end;
|
limit = end;
|
||||||
|
@@ -1016,6 +1016,7 @@ void __ref vmemmap_free(unsigned long start, unsigned long end)
|
|||||||
remove_pagetable(start, end, false);
|
remove_pagetable(start, end, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_MEMORY_HOTREMOVE
|
||||||
static void __meminit
|
static void __meminit
|
||||||
kernel_physical_mapping_remove(unsigned long start, unsigned long end)
|
kernel_physical_mapping_remove(unsigned long start, unsigned long end)
|
||||||
{
|
{
|
||||||
@@ -1025,7 +1026,6 @@ kernel_physical_mapping_remove(unsigned long start, unsigned long end)
|
|||||||
remove_pagetable(start, end, true);
|
remove_pagetable(start, end, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_MEMORY_HOTREMOVE
|
|
||||||
int __ref arch_remove_memory(u64 start, u64 size)
|
int __ref arch_remove_memory(u64 start, u64 size)
|
||||||
{
|
{
|
||||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||||
|
@@ -542,13 +542,14 @@ out_unlock:
|
|||||||
return do_split;
|
return do_split;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __split_large_page(pte_t *kpte, unsigned long address, pte_t *pbase)
|
static int
|
||||||
|
__split_large_page(pte_t *kpte, unsigned long address, struct page *base)
|
||||||
{
|
{
|
||||||
|
pte_t *pbase = (pte_t *)page_address(base);
|
||||||
unsigned long pfn, pfninc = 1;
|
unsigned long pfn, pfninc = 1;
|
||||||
unsigned int i, level;
|
unsigned int i, level;
|
||||||
pte_t *tmp;
|
pte_t *tmp;
|
||||||
pgprot_t ref_prot;
|
pgprot_t ref_prot;
|
||||||
struct page *base = virt_to_page(pbase);
|
|
||||||
|
|
||||||
spin_lock(&pgd_lock);
|
spin_lock(&pgd_lock);
|
||||||
/*
|
/*
|
||||||
@@ -633,7 +634,6 @@ int __split_large_page(pte_t *kpte, unsigned long address, pte_t *pbase)
|
|||||||
|
|
||||||
static int split_large_page(pte_t *kpte, unsigned long address)
|
static int split_large_page(pte_t *kpte, unsigned long address)
|
||||||
{
|
{
|
||||||
pte_t *pbase;
|
|
||||||
struct page *base;
|
struct page *base;
|
||||||
|
|
||||||
if (!debug_pagealloc)
|
if (!debug_pagealloc)
|
||||||
@@ -644,8 +644,7 @@ static int split_large_page(pte_t *kpte, unsigned long address)
|
|||||||
if (!base)
|
if (!base)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
pbase = (pte_t *)page_address(base);
|
if (__split_large_page(kpte, address, base))
|
||||||
if (__split_large_page(kpte, address, pbase))
|
|
||||||
__free_page(base);
|
__free_page(base);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -129,7 +129,8 @@ int __init dmar_parse_dev_scope(void *start, void *end, int *cnt,
|
|||||||
if (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_ENDPOINT ||
|
if (scope->entry_type == ACPI_DMAR_SCOPE_TYPE_ENDPOINT ||
|
||||||
scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE)
|
scope->entry_type == ACPI_DMAR_SCOPE_TYPE_BRIDGE)
|
||||||
(*cnt)++;
|
(*cnt)++;
|
||||||
else if (scope->entry_type != ACPI_DMAR_SCOPE_TYPE_IOAPIC) {
|
else if (scope->entry_type != ACPI_DMAR_SCOPE_TYPE_IOAPIC &&
|
||||||
|
scope->entry_type != ACPI_DMAR_SCOPE_TYPE_HPET) {
|
||||||
pr_warn("Unsupported device scope\n");
|
pr_warn("Unsupported device scope\n");
|
||||||
}
|
}
|
||||||
start += scope->length;
|
start += scope->length;
|
||||||
|
Reference in New Issue
Block a user