Commit 174cb82a authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik
Browse files

s390: Remove 2k vs 4k page table leftovers



Since commit d08d4e7c ("s390/mm: use full 4KB page for 2KB PTE") always
4k page tables are allocated, however there is still some (now) obsolete
code left which deals with switching from 2k to 4k page tables for qemu/kvm
processes.

Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
Remove the not needed code.

Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 9291ea09
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ config S390
	imply IMA_SECURE_AND_OR_TRUSTED_BOOT
	select ALTERNATE_USER_ADDRESS_SPACE
	select ARCH_32BIT_USTAT_F_TINODE
	select ARCH_BINFMT_ELF_STATE
	select ARCH_CORRECT_STACKTRACE_ON_KRETPROBE
	select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM
	select ARCH_ENABLE_MEMORY_HOTREMOVE
+0 −32
Original line number Diff line number Diff line
@@ -158,9 +158,6 @@ enum {
#define ELF_DATA	ELFDATA2MSB
#define ELF_ARCH	EM_S390

/* s390 specific phdr types */
#define PT_S390_PGSTE	0x70000000

/*
 * ELF register definitions..
 */
@@ -191,35 +188,6 @@ typedef s390_compat_regs compat_elf_gregset_t;
	 && (x)->e_ident[EI_CLASS] == ELF_CLASS)
#define compat_start_thread	start_thread31

struct arch_elf_state {
	int rc;
};

#define INIT_ARCH_ELF_STATE { .rc = 0 }

#define arch_check_elf(ehdr, interp, interp_ehdr, state) (0)
#ifdef CONFIG_PGSTE
#define arch_elf_pt_proc(ehdr, phdr, elf, interp, state)	\
({								\
	struct arch_elf_state *_state = state;			\
	if ((phdr)->p_type == PT_S390_PGSTE &&			\
	    !page_table_allocate_pgste &&			\
	    !test_thread_flag(TIF_PGSTE) &&			\
	    !current->mm->context.alloc_pgste) {		\
		set_thread_flag(TIF_PGSTE);			\
		set_pt_regs_flag(task_pt_regs(current),		\
				 PIF_EXECVE_PGSTE_RESTART);	\
		_state->rc = -EAGAIN;				\
	}							\
	_state->rc;						\
})
#else
#define arch_elf_pt_proc(ehdr, phdr, elf, interp, state)	\
({								\
	(state)->rc;						\
})
#endif

/* For SVR4/S390 the function pointer to be registered with `atexit` is
   passed in R14. */
#define ELF_PLAT_INIT(_r, load_addr) \
+0 −3
Original line number Diff line number Diff line
@@ -22,10 +22,7 @@ typedef struct {
	 * The following bitfields need a down_write on the mm
	 * semaphore when they are written to. As they are only
	 * written once, they can be read without a lock.
	 *
	 * The mmu context allocates 4K page tables.
	 */
	unsigned int alloc_pgste:1;
	/* The mmu context uses extended page tables. */
	unsigned int has_pgste:1;
	/* The mmu context uses storage keys. */
+0 −3
Original line number Diff line number Diff line
@@ -29,9 +29,6 @@ static inline int init_new_context(struct task_struct *tsk,
	mm->context.gmap_asce = 0;
	mm->context.flush_mm = 0;
#ifdef CONFIG_PGSTE
	mm->context.alloc_pgste = page_table_allocate_pgste ||
		test_thread_flag(TIF_PGSTE) ||
		(current->mm && current->mm->context.alloc_pgste);
	mm->context.has_pgste = 0;
	mm->context.uses_skeys = 0;
	mm->context.uses_cmm = 0;
+0 −9
Original line number Diff line number Diff line
@@ -584,15 +584,6 @@ static inline int mm_is_protected(struct mm_struct *mm)
	return 0;
}

static inline int mm_alloc_pgste(struct mm_struct *mm)
{
#ifdef CONFIG_PGSTE
	if (unlikely(mm->context.alloc_pgste))
		return 1;
#endif
	return 0;
}

static inline pgste_t clear_pgste_bit(pgste_t pgste, unsigned long mask)
{
	return __pgste(pgste_val(pgste) & ~mask);
Loading