Commit 9dfdf818 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] s390: core s390

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

s390 core changes:
 - Move setting/clearing of TIF_31BIT thread flag to SET_PERSONALITY.
 - Use TASK_UNMAPPED_BASE in elf_map32 for mmaps with address 0.
 - Define ARCH_KMALLOC_MINALIGN.
 - Define ARCH_MIN_TASKALIGN.
parent 60d53994
......@@ -40,8 +40,7 @@
passed in R14. */
#define ELF_PLAT_INIT(_r, load_addr) \
do { \
_r->gprs[14] = 0; \
set_thread_flag(TIF_31BIT); \
_r->gprs[14] = 0; \
} while(0)
#define USE_ELF_CORE_DUMP
......@@ -82,6 +81,7 @@ do { \
set_personality(PER_SVR4); \
else if (current->personality != PER_LINUX32) \
set_personality(PER_LINUX); \
set_thread_flag(TIF_31BIT); \
} while (0)
#include "compat_linux.h"
......@@ -194,10 +194,7 @@ elf_map32 (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int p
unsigned long map_addr;
if (!addr)
addr = 0x40000000;
if (prot & PROT_READ)
prot |= PROT_EXEC;
addr = TASK_UNMAPPED_BASE;
down_write(&current->mm->mmap_sem);
map_addr = do_mmap(filep, ELF_PAGESTART(addr),
......
......@@ -4,6 +4,7 @@
* S390 version
* Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
* Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
* Thomas Spatzier (tspat@de.ibm.com)
*
* Derived from "arch/i386/kernel/sys_i386.c"
*
......
......@@ -15,4 +15,6 @@
#define L1_CACHE_SHIFT 8
#define L1_CACHE_SHIFT_MAX 8 /* largest L1 which this arch supports */
#define ARCH_KMALLOC_MINALIGN 8
#endif
......@@ -123,16 +123,10 @@ typedef s390_regs elf_gregset_t;
/* For SVR4/S390 the function pointer to be registered with `atexit` is
passed in R14. */
#ifndef __s390x__
#define ELF_PLAT_INIT(_r, load_addr) \
_r->gprs[14] = 0
#else /* __s390x__ */
#define ELF_PLAT_INIT(_r, load_addr) \
do { \
_r->gprs[14] = 0; \
clear_thread_flag(TIF_31BIT); \
} while(0)
#endif /* __s390x__ */
_r->gprs[14] = 0; \
} while (0)
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 4096
......
......@@ -98,6 +98,8 @@ struct thread_struct {
typedef struct thread_struct thread_struct;
#define ARCH_MIN_TASKALIGN 8
#ifndef __s390x__
# define __SWAPPER_PG_DIR __pa(&swapper_pg_dir[0]) + _SEGMENT_TABLE
#else /* __s390x__ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment