x86, mm: Replace arch_vma_name with vm_ops->name for vsyscalls

This removes the last vestiges of arch_vma_name from x86, replacing it
with vm_ops->name.  Good riddance.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Link: http://lkml.kernel.org/r/e681cb56096eee5b8b8767093a4f6fb82839f0a4.1400538962.git.luto@amacapital.net
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
Andy Lutomirski 2014-05-19 15:58:34 -07:00 committed by H. Peter Anvin
parent a62c34bd2a
commit ac49b9a9f2

View File

@ -1185,11 +1185,19 @@ int kern_addr_valid(unsigned long addr)
* covers the 64bit vsyscall page now. 32bit has a real VMA now and does * covers the 64bit vsyscall page now. 32bit has a real VMA now and does
* not need special handling anymore: * not need special handling anymore:
*/ */
static const char *gate_vma_name(struct vm_area_struct *vma)
{
return "[vsyscall]";
}
static struct vm_operations_struct gate_vma_ops = {
.name = gate_vma_name,
};
static struct vm_area_struct gate_vma = { static struct vm_area_struct gate_vma = {
.vm_start = VSYSCALL_ADDR, .vm_start = VSYSCALL_ADDR,
.vm_end = VSYSCALL_ADDR + PAGE_SIZE, .vm_end = VSYSCALL_ADDR + PAGE_SIZE,
.vm_page_prot = PAGE_READONLY_EXEC, .vm_page_prot = PAGE_READONLY_EXEC,
.vm_flags = VM_READ | VM_EXEC .vm_flags = VM_READ | VM_EXEC,
.vm_ops = &gate_vma_ops,
}; };
struct vm_area_struct *get_gate_vma(struct mm_struct *mm) struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
@ -1221,13 +1229,6 @@ int in_gate_area_no_mm(unsigned long addr)
return (addr & PAGE_MASK) == VSYSCALL_ADDR; return (addr & PAGE_MASK) == VSYSCALL_ADDR;
} }
const char *arch_vma_name(struct vm_area_struct *vma)
{
if (vma == &gate_vma)
return "[vsyscall]";
return NULL;
}
#ifdef CONFIG_X86_UV #ifdef CONFIG_X86_UV
unsigned long memory_block_size_bytes(void) unsigned long memory_block_size_bytes(void)
{ {