Commit 929422e9 authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[PATCH] s390: core changes

From: Christian Borntrdger <cborntra@de.ibm.com>
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
From: Thomas Spatzier <tspat@de.ibm.com>

s390 core changes:
 - Add default storage key and introduce page_{set,get}_storage_key.
 - Fix access to siginfo in copy_siginfo_from_user32.
 - Regenerate default configuration.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4e898353
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.9-rc2
# Mon Sep 20 17:16:38 2004
# Linux kernel version: 2.6.9-rc3
# Fri Oct 8 19:17:35 2004
#
CONFIG_MMU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
......@@ -520,7 +520,7 @@ CONFIG_CRYPTO=y
# CONFIG_CRYPTO_SHA1_Z990 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_WHIRLPOOL is not set
# CONFIG_CRYPTO_WP512 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_DES_Z990 is not set
# CONFIG_CRYPTO_BLOWFISH is not set
......
......@@ -118,10 +118,10 @@ int copy_siginfo_from_user32(siginfo_t *to, siginfo_t32 __user *from)
err |= __get_user(to->si_errno, &from->si_errno);
err |= __get_user(to->si_code, &from->si_code);
if (from->si_code < 0)
if (to->si_code < 0)
err |= __copy_from_user(&to->_sifields._pad, &from->_sifields._pad, SI_PAD_SIZE);
else {
switch (from->si_code >> 16) {
switch (to->si_code >> 16) {
case __SI_RT >> 16: /* This is not generated by the kernel as of now. */
case __SI_MESGQ >> 16:
err |= __get_user(to->si_int, &from->si_int);
......
......@@ -34,6 +34,7 @@ EXPORT_SYMBOL(__clear_user_asm);
EXPORT_SYMBOL(__strncpy_from_user_asm);
EXPORT_SYMBOL(__strnlen_user_asm);
EXPORT_SYMBOL(diag10);
EXPORT_SYMBOL(default_storage_key);
/*
* semaphore ops
......
......@@ -53,6 +53,7 @@ unsigned int console_devno = -1;
unsigned int console_irq = -1;
unsigned long memory_size = 0;
unsigned long machine_flags = 0;
unsigned int default_storage_key = 0;
struct {
unsigned long addr, size, type;
} memory_chunk[MEMORY_CHUNKS] = { { 0 } };
......
......@@ -162,6 +162,25 @@ typedef struct { unsigned long pgd; } pgd_t;
#define __pgd(x) ((pgd_t) { (x) } )
#define __pgprot(x) ((pgprot_t) { (x) } )
/* default storage key used for all pages */
extern unsigned int default_storage_key;
static inline void
page_set_storage_key(unsigned long addr, unsigned int skey)
{
asm volatile ( "sske %0,%1" : : "d" (skey), "a" (addr) );
}
static inline unsigned int
page_get_storage_key(unsigned long addr)
{
unsigned int skey;
asm volatile ( "iske %0,%1" : "=d" (skey) : "a" (addr), "0" (0) );
return skey;
}
#endif /* !__ASSEMBLY__ */
/* to align the pointer to the (next) page boundary */
......
......@@ -597,17 +597,13 @@ ptep_establish(struct vm_area_struct *vma,
* should therefore only be called if it is not mapped in any
* address space.
*/
#define page_test_and_clear_dirty(page) \
#define page_test_and_clear_dirty(_page) \
({ \
struct page *__page = (page); \
struct page *__page = (_page); \
unsigned long __physpage = __pa((__page-mem_map) << PAGE_SHIFT); \
int __skey; \
asm volatile ("iske %0,%1" : "=d" (__skey) : "a" (__physpage)); \
if (__skey & _PAGE_CHANGED) { \
asm volatile ("sske %0,%1" \
: : "d" (__skey & ~_PAGE_CHANGED), \
"a" (__physpage)); \
} \
int __skey = page_get_storage_key(__physpage); \
if (__skey & _PAGE_CHANGED) \
page_set_storage_key(__physpage, __skey & ~_PAGE_CHANGED);\
(__skey & _PAGE_CHANGED); \
})
......@@ -655,11 +651,10 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
})
#define SetPageUptodate(_page) \
do { \
struct page *__page = (_page); \
if (!test_and_set_bit(PG_uptodate, &__page->flags)) \
asm volatile ("sske %0,%1" : : "d" (0), \
"a" (__pa((__page-mem_map) << PAGE_SHIFT)));\
do { \
struct page *__page = (_page); \
if (!test_and_set_bit(PG_uptodate, &__page->flags)) \
page_test_and_clear_dirty(_page); \
} while (0)
#ifdef __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