Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1c1174f authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky
Browse files

s390/mm: use new mm defines instead of magic values

parent c67da7c7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ struct arch_elf_state {
	} while (0)

#define CORE_DUMP_USE_REGSET
#define ELF_EXEC_PAGESIZE	4096
#define ELF_EXEC_PAGESIZE	PAGE_SIZE

/*
 * This is the base location for PIE (ET_DYN with INTERP) loads. On
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ struct ipl_parameter_block {
		struct ipl_block_fcp fcp;
		struct ipl_block_ccw ccw;
	} ipl_info;
} __attribute__((packed,aligned(4096)));
} __packed __aligned(PAGE_SIZE);

/*
 * IPL validity flags
+3 −3
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ static inline int init_new_context(struct task_struct *tsk,
	mm->context.use_cmma = 0;
#endif
	switch (mm->context.asce_limit) {
	case 1UL << 42:
	case _REGION2_SIZE:
		/*
		 * forked 3-level task, fall through to set new asce with new
		 * mm->pgd
@@ -44,12 +44,12 @@ static inline int init_new_context(struct task_struct *tsk,
		mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH |
				   _ASCE_USER_BITS | _ASCE_TYPE_REGION3;
		break;
	case 1UL << 53:
	case _REGION1_SIZE:
		/* forked 4-level task, set new asce with new mm->pgd */
		mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH |
				   _ASCE_USER_BITS | _ASCE_TYPE_REGION2;
		break;
	case 1UL << 31:
	case _REGION3_SIZE:
		/* forked 2-level compat task, set new asce with new mm->pgd */
		mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH |
				   _ASCE_USER_BITS | _ASCE_TYPE_SEGMENT;
+6 −6
Original line number Diff line number Diff line
@@ -44,16 +44,16 @@ static inline void clear_table(unsigned long *s, unsigned long val, size_t n)

static inline void crst_table_init(unsigned long *crst, unsigned long entry)
{
	clear_table(crst, entry, sizeof(unsigned long)*2048);
	clear_table(crst, entry, _CRST_TABLE_SIZE);
}

static inline unsigned long pgd_entry_type(struct mm_struct *mm)
{
	if (mm->context.asce_limit <= (1UL << 31))
	if (mm->context.asce_limit <= _REGION3_SIZE)
		return _SEGMENT_ENTRY_EMPTY;
	if (mm->context.asce_limit <= (1UL << 42))
	if (mm->context.asce_limit <= _REGION2_SIZE)
		return _REGION3_ENTRY_EMPTY;
	if (mm->context.asce_limit <= (1UL << 53))
	if (mm->context.asce_limit <= _REGION1_SIZE)
		return _REGION2_ENTRY_EMPTY;
	return _REGION1_ENTRY_EMPTY;
}
@@ -121,7 +121,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)

	if (!table)
		return NULL;
	if (mm->context.asce_limit == (1UL << 31)) {
	if (mm->context.asce_limit == _REGION3_SIZE) {
		/* Forking a compat process with 2 page table levels */
		if (!pgtable_pmd_page_ctor(virt_to_page(table))) {
			crst_table_free(mm, table);
@@ -133,7 +133,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)

static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
{
	if (mm->context.asce_limit == (1UL << 31))
	if (mm->context.asce_limit == _REGION3_SIZE)
		pgtable_pmd_page_dtor(virt_to_page(pgd));
	crst_table_free(mm, (unsigned long *) pgd);
}
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ struct qdr {
	u32 qkey   : 4;
	u32	   : 28;
	struct qdesfmt0 qdf0[126];
} __attribute__ ((packed, aligned(4096)));
} __packed __aligned(PAGE_SIZE);

#define QIB_AC_OUTBOUND_PCI_SUPPORTED	0x40
#define QIB_RFLAGS_ENABLE_QEBSM		0x80
Loading