You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 patches from Heiko Carstens: "A couple of s390 patches for the 3.5 merge window. Just a collection of bug fixes and cleanups." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/uaccess: fix access_ok compile warnings s390/cmpxchg: select HAVE_CMPXCHG_LOCAL option s390/cmpxchg: fix sign extension bugs s390/cmpxchg: fix 1 and 2 byte memory accesses s390/cmpxchg: fix compile warnings specific to s390 s390/cmpxchg: add missing memory barrier to cmpxchg64 s390/cpu: remove cpu "capabilities" sysfs attribute s390/kernel: Fix smp_call_ipl_cpu() for offline CPUs s390/kernel: Introduce memcpy_absolute() function s390/headers: replace __s390x__ with CONFIG_64BIT where possible s390/headers: remove #ifdef __KERNEL__ from not exported headers s390/irq: split irq stats for cpu-measurement alert facilities s390/kexec: Move early_pgm_check_handler() to text section s390/kdump: Use real mode for PSW restart and kexec s390/kdump: Account /sys/kernel/kexec_crash_size changes in OS info s390/kernel: Remove OS info init function call and diag 308 for kdump
This commit is contained in:
@@ -87,6 +87,7 @@ config S390
|
||||
select ARCH_SAVE_PAGE_KEYS if HIBERNATION
|
||||
select HAVE_MEMBLOCK
|
||||
select HAVE_MEMBLOCK_NODE_MAP
|
||||
select HAVE_CMPXCHG_LOCAL
|
||||
select ARCH_DISCARD_MEMBLOCK
|
||||
select ARCH_INLINE_SPIN_TRYLOCK
|
||||
select ARCH_INLINE_SPIN_TRYLOCK_BH
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifndef _LINUX_BITOPS_H
|
||||
#error only <linux/bitops.h> can be included directly
|
||||
#endif
|
||||
@@ -63,7 +61,7 @@ extern const char _ni_bitmap[];
|
||||
extern const char _zb_findmap[];
|
||||
extern const char _sb_findmap[];
|
||||
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
|
||||
#define __BITOPS_ALIGN 3
|
||||
#define __BITOPS_WORDSIZE 32
|
||||
@@ -83,7 +81,7 @@ extern const char _sb_findmap[];
|
||||
: "d" (__val), "Q" (*(unsigned long *) __addr) \
|
||||
: "cc");
|
||||
|
||||
#else /* __s390x__ */
|
||||
#else /* CONFIG_64BIT */
|
||||
|
||||
#define __BITOPS_ALIGN 7
|
||||
#define __BITOPS_WORDSIZE 64
|
||||
@@ -103,7 +101,7 @@ extern const char _sb_findmap[];
|
||||
: "d" (__val), "Q" (*(unsigned long *) __addr) \
|
||||
: "cc");
|
||||
|
||||
#endif /* __s390x__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
#define __BITOPS_WORDS(bits) (((bits)+__BITOPS_WORDSIZE-1)/__BITOPS_WORDSIZE)
|
||||
#define __BITOPS_BARRIER() asm volatile("" : : : "memory")
|
||||
@@ -412,7 +410,7 @@ static inline unsigned long __ffz_word_loop(const unsigned long *addr,
|
||||
unsigned long bytes = 0;
|
||||
|
||||
asm volatile(
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
" ahi %1,-1\n"
|
||||
" sra %1,5\n"
|
||||
" jz 1f\n"
|
||||
@@ -449,7 +447,7 @@ static inline unsigned long __ffs_word_loop(const unsigned long *addr,
|
||||
unsigned long bytes = 0;
|
||||
|
||||
asm volatile(
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
" ahi %1,-1\n"
|
||||
" sra %1,5\n"
|
||||
" jz 1f\n"
|
||||
@@ -481,7 +479,7 @@ static inline unsigned long __ffs_word_loop(const unsigned long *addr,
|
||||
*/
|
||||
static inline unsigned long __ffz_word(unsigned long nr, unsigned long word)
|
||||
{
|
||||
#ifdef __s390x__
|
||||
#ifdef CONFIG_64BIT
|
||||
if ((word & 0xffffffff) == 0xffffffff) {
|
||||
word >>= 32;
|
||||
nr += 32;
|
||||
@@ -505,7 +503,7 @@ static inline unsigned long __ffz_word(unsigned long nr, unsigned long word)
|
||||
*/
|
||||
static inline unsigned long __ffs_word(unsigned long nr, unsigned long word)
|
||||
{
|
||||
#ifdef __s390x__
|
||||
#ifdef CONFIG_64BIT
|
||||
if ((word & 0xffffffff) == 0) {
|
||||
word >>= 32;
|
||||
nr += 32;
|
||||
@@ -546,7 +544,7 @@ static inline unsigned long __load_ulong_le(const unsigned long *p,
|
||||
unsigned long word;
|
||||
|
||||
p = (unsigned long *)((unsigned long) p + offset);
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
asm volatile(
|
||||
" ic %0,%O1(%R1)\n"
|
||||
" icm %0,2,%O1+1(%R1)\n"
|
||||
@@ -834,7 +832,4 @@ static inline int find_next_bit_le(void *vaddr, unsigned long size,
|
||||
|
||||
#include <asm-generic/bitops/ext2-atomic-setbit.h>
|
||||
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _S390_BITOPS_H */
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <asm/types.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define LPM_ANYPATH 0xff
|
||||
#define __MAX_CSSID 0
|
||||
|
||||
@@ -291,5 +289,3 @@ int chsc_sstpc(void *page, unsigned int op, u16 ctrl);
|
||||
int chsc_sstpi(void *page, void *result, size_t size);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,7 +29,7 @@ static inline unsigned long __xchg(unsigned long x, void *ptr, int size)
|
||||
" cs %0,0,%4\n"
|
||||
" jl 0b\n"
|
||||
: "=&d" (old), "=Q" (*(int *) addr)
|
||||
: "d" (x << shift), "d" (~(255 << shift)),
|
||||
: "d" ((x & 0xff) << shift), "d" (~(0xff << shift)),
|
||||
"Q" (*(int *) addr) : "memory", "cc", "0");
|
||||
return old >> shift;
|
||||
case 2:
|
||||
@@ -44,7 +44,7 @@ static inline unsigned long __xchg(unsigned long x, void *ptr, int size)
|
||||
" cs %0,0,%4\n"
|
||||
" jl 0b\n"
|
||||
: "=&d" (old), "=Q" (*(int *) addr)
|
||||
: "d" (x << shift), "d" (~(65535 << shift)),
|
||||
: "d" ((x & 0xffff) << shift), "d" (~(0xffff << shift)),
|
||||
"Q" (*(int *) addr) : "memory", "cc", "0");
|
||||
return old >> shift;
|
||||
case 4:
|
||||
@@ -113,9 +113,10 @@ static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
|
||||
" nr %1,%5\n"
|
||||
" jnz 0b\n"
|
||||
"1:"
|
||||
: "=&d" (prev), "=&d" (tmp), "=Q" (*(int *) ptr)
|
||||
: "d" (old << shift), "d" (new << shift),
|
||||
"d" (~(255 << shift)), "Q" (*(int *) ptr)
|
||||
: "=&d" (prev), "=&d" (tmp), "+Q" (*(int *) addr)
|
||||
: "d" ((old & 0xff) << shift),
|
||||
"d" ((new & 0xff) << shift),
|
||||
"d" (~(0xff << shift))
|
||||
: "memory", "cc");
|
||||
return prev >> shift;
|
||||
case 2:
|
||||
@@ -134,9 +135,10 @@ static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
|
||||
" nr %1,%5\n"
|
||||
" jnz 0b\n"
|
||||
"1:"
|
||||
: "=&d" (prev), "=&d" (tmp), "=Q" (*(int *) ptr)
|
||||
: "d" (old << shift), "d" (new << shift),
|
||||
"d" (~(65535 << shift)), "Q" (*(int *) ptr)
|
||||
: "=&d" (prev), "=&d" (tmp), "+Q" (*(int *) addr)
|
||||
: "d" ((old & 0xffff) << shift),
|
||||
"d" ((new & 0xffff) << shift),
|
||||
"d" (~(0xffff << shift))
|
||||
: "memory", "cc");
|
||||
return prev >> shift;
|
||||
case 4:
|
||||
@@ -160,9 +162,14 @@ static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
|
||||
return old;
|
||||
}
|
||||
|
||||
#define cmpxchg(ptr, o, n) \
|
||||
((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o), \
|
||||
(unsigned long)(n), sizeof(*(ptr))))
|
||||
#define cmpxchg(ptr, o, n) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) __ret; \
|
||||
__ret = (__typeof__(*(ptr))) \
|
||||
__cmpxchg((ptr), (unsigned long)(o), (unsigned long)(n), \
|
||||
sizeof(*(ptr))); \
|
||||
__ret; \
|
||||
})
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#define cmpxchg64(ptr, o, n) \
|
||||
@@ -181,13 +188,19 @@ static inline unsigned long long __cmpxchg64(void *ptr,
|
||||
" cds %0,%2,%1"
|
||||
: "+&d" (rp_old), "=Q" (ptr)
|
||||
: "d" (rp_new), "Q" (ptr)
|
||||
: "cc");
|
||||
: "memory", "cc");
|
||||
return rp_old.pair;
|
||||
}
|
||||
#define cmpxchg64(ptr, o, n) \
|
||||
((__typeof__(*(ptr)))__cmpxchg64((ptr), \
|
||||
(unsigned long long)(o), \
|
||||
(unsigned long long)(n)))
|
||||
|
||||
#define cmpxchg64(ptr, o, n) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) __ret; \
|
||||
__ret = (__typeof__(*(ptr))) \
|
||||
__cmpxchg64((ptr), \
|
||||
(unsigned long long)(o), \
|
||||
(unsigned long long)(n)); \
|
||||
__ret; \
|
||||
})
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
#include <asm-generic/cmpxchg-local.h>
|
||||
@@ -216,8 +229,13 @@ static inline unsigned long __cmpxchg_local(void *ptr,
|
||||
* them available.
|
||||
*/
|
||||
#define cmpxchg_local(ptr, o, n) \
|
||||
((__typeof__(*(ptr)))__cmpxchg_local((ptr), (unsigned long)(o), \
|
||||
(unsigned long)(n), sizeof(*(ptr))))
|
||||
({ \
|
||||
__typeof__(*(ptr)) __ret; \
|
||||
__ret = (__typeof__(*(ptr))) \
|
||||
__cmpxchg_local((ptr), (unsigned long)(o), \
|
||||
(unsigned long)(n), sizeof(*(ptr))); \
|
||||
__ret; \
|
||||
})
|
||||
|
||||
#define cmpxchg64_local(ptr, o, n) cmpxchg64((ptr), (o), (n))
|
||||
|
||||
|
||||
@@ -21,15 +21,15 @@ typedef unsigned long long __nocast cputime64_t;
|
||||
|
||||
static inline unsigned long __div(unsigned long long n, unsigned long base)
|
||||
{
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
register_pair rp;
|
||||
|
||||
rp.pair = n >> 1;
|
||||
asm ("dr %0,%1" : "+d" (rp) : "d" (base >> 1));
|
||||
return rp.subreg.odd;
|
||||
#else /* __s390x__ */
|
||||
#else /* CONFIG_64BIT */
|
||||
return n / base;
|
||||
#endif /* __s390x__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
}
|
||||
|
||||
#define cputime_one_jiffy jiffies_to_cputime(1)
|
||||
@@ -100,7 +100,7 @@ static inline void cputime_to_timespec(const cputime_t cputime,
|
||||
struct timespec *value)
|
||||
{
|
||||
unsigned long long __cputime = (__force unsigned long long) cputime;
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
register_pair rp;
|
||||
|
||||
rp.pair = __cputime >> 1;
|
||||
@@ -128,7 +128,7 @@ static inline void cputime_to_timeval(const cputime_t cputime,
|
||||
struct timeval *value)
|
||||
{
|
||||
unsigned long long __cputime = (__force unsigned long long) cputime;
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
register_pair rp;
|
||||
|
||||
rp.pair = __cputime >> 1;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef __ASM_CTL_REG_H
|
||||
#define __ASM_CTL_REG_H
|
||||
|
||||
#ifdef __s390x__
|
||||
#ifdef CONFIG_64BIT
|
||||
|
||||
#define __ctl_load(array, low, high) ({ \
|
||||
typedef struct { char _[sizeof(array)]; } addrtype; \
|
||||
@@ -25,7 +25,7 @@
|
||||
: "i" (low), "i" (high)); \
|
||||
})
|
||||
|
||||
#else /* __s390x__ */
|
||||
#else /* CONFIG_64BIT */
|
||||
|
||||
#define __ctl_load(array, low, high) ({ \
|
||||
typedef struct { char _[sizeof(array)]; } addrtype; \
|
||||
@@ -43,7 +43,7 @@
|
||||
: "i" (low), "i" (high)); \
|
||||
})
|
||||
|
||||
#endif /* __s390x__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
#define __ctl_set_bit(cr, bit) ({ \
|
||||
unsigned long __dummy; \
|
||||
|
||||
@@ -11,13 +11,10 @@
|
||||
#ifndef _S390_CURRENT_H
|
||||
#define _S390_CURRENT_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <asm/lowcore.h>
|
||||
|
||||
struct task_struct;
|
||||
|
||||
#define current ((struct task_struct *const)S390_lowcore.current_task)
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* !(_S390_CURRENT_H) */
|
||||
|
||||
@@ -107,11 +107,11 @@
|
||||
/*
|
||||
* These are used to set parameters in the core dumps.
|
||||
*/
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
#define ELF_CLASS ELFCLASS32
|
||||
#else /* __s390x__ */
|
||||
#else /* CONFIG_64BIT */
|
||||
#define ELF_CLASS ELFCLASS64
|
||||
#endif /* __s390x__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
#define ELF_DATA ELFDATA2MSB
|
||||
#define ELF_ARCH EM_S390
|
||||
|
||||
@@ -181,9 +181,9 @@ extern unsigned long elf_hwcap;
|
||||
extern char elf_platform[];
|
||||
#define ELF_PLATFORM (elf_platform)
|
||||
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
|
||||
#else /* __s390x__ */
|
||||
#else /* CONFIG_64BIT */
|
||||
#define SET_PERSONALITY(ex) \
|
||||
do { \
|
||||
if (personality(current->personality) != PER_LINUX32) \
|
||||
@@ -194,7 +194,7 @@ do { \
|
||||
else \
|
||||
clear_thread_flag(TIF_31BIT); \
|
||||
} while (0)
|
||||
#endif /* __s390x__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
#define STACK_RND_MASK 0x7ffUL
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef _ASM_S390_FUTEX_H
|
||||
#define _ASM_S390_FUTEX_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/futex.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/errno.h>
|
||||
@@ -48,5 +46,4 @@ static inline int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
|
||||
return uaccess.futex_atomic_cmpxchg(uval, uaddr, oldval, newval);
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _ASM_S390_FUTEX_H */
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <asm/cio.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
#ifdef __s390x__
|
||||
#ifdef CONFIG_64BIT
|
||||
#define IDA_SIZE_LOG 12 /* 11 for 2k , 12 for 4k */
|
||||
#else
|
||||
#define IDA_SIZE_LOG 11 /* 11 for 2k , 12 for 4k */
|
||||
@@ -33,7 +33,7 @@
|
||||
static inline int
|
||||
idal_is_needed(void *vaddr, unsigned int length)
|
||||
{
|
||||
#ifdef __s390x__
|
||||
#ifdef CONFIG_64BIT
|
||||
return ((__pa(vaddr) + length - 1) >> 31) != 0;
|
||||
#else
|
||||
return 0;
|
||||
@@ -78,7 +78,7 @@ static inline unsigned long *idal_create_words(unsigned long *idaws,
|
||||
static inline int
|
||||
set_normalized_cda(struct ccw1 * ccw, void *vaddr)
|
||||
{
|
||||
#ifdef __s390x__
|
||||
#ifdef CONFIG_64BIT
|
||||
unsigned int nridaws;
|
||||
unsigned long *idal;
|
||||
|
||||
@@ -105,7 +105,7 @@ set_normalized_cda(struct ccw1 * ccw, void *vaddr)
|
||||
static inline void
|
||||
clear_normalized_cda(struct ccw1 * ccw)
|
||||
{
|
||||
#ifdef __s390x__
|
||||
#ifdef CONFIG_64BIT
|
||||
if (ccw->flags & CCW_FLAG_IDA) {
|
||||
kfree((void *)(unsigned long) ccw->cda);
|
||||
ccw->flags &= ~CCW_FLAG_IDA;
|
||||
@@ -182,7 +182,7 @@ idal_buffer_free(struct idal_buffer *ib)
|
||||
static inline int
|
||||
__idal_buffer_is_needed(struct idal_buffer *ib)
|
||||
{
|
||||
#ifdef __s390x__
|
||||
#ifdef CONFIG_64BIT
|
||||
return ib->size > (4096ul << ib->page_order) ||
|
||||
idal_is_needed(ib->data[0], ib->size);
|
||||
#else
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#ifndef _S390_IO_H
|
||||
#define _S390_IO_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm/page.h>
|
||||
|
||||
#define IO_SPACE_LIMIT 0xffffffff
|
||||
@@ -46,6 +44,4 @@ void unxlate_dev_mem_ptr(unsigned long phys, void *addr);
|
||||
*/
|
||||
#define xlate_dev_kmem_ptr(p) p
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -17,7 +17,8 @@ enum interruption_class {
|
||||
EXTINT_VRT,
|
||||
EXTINT_SCP,
|
||||
EXTINT_IUC,
|
||||
EXTINT_CPM,
|
||||
EXTINT_CMS,
|
||||
EXTINT_CMC,
|
||||
IOINT_CIO,
|
||||
IOINT_QAI,
|
||||
IOINT_DAS,
|
||||
|
||||
@@ -10,10 +10,8 @@
|
||||
#ifndef _S390_KEXEC_H
|
||||
#define _S390_KEXEC_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <asm/page.h>
|
||||
#endif
|
||||
#include <asm/processor.h>
|
||||
#include <asm/page.h>
|
||||
/*
|
||||
* KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return.
|
||||
* I.e. Maximum page that is mapped directly into kernel memory,
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifdef __KERNEL__
|
||||
#ifndef _ASM_KMAP_TYPES_H
|
||||
#define _ASM_KMAP_TYPES_H
|
||||
|
||||
#include <asm-generic/kmap_types.h>
|
||||
|
||||
#endif
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
@@ -49,7 +49,7 @@ static inline int init_new_context(struct task_struct *tsk,
|
||||
|
||||
#define destroy_context(mm) do { } while (0)
|
||||
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
#define LCTL_OPCODE "lctl"
|
||||
#else
|
||||
#define LCTL_OPCODE "lctlg"
|
||||
|
||||
@@ -28,7 +28,7 @@ struct mod_arch_specific
|
||||
struct mod_arch_syminfo *syminfo;
|
||||
};
|
||||
|
||||
#ifdef __s390x__
|
||||
#ifdef CONFIG_64BIT
|
||||
#define ElfW(x) Elf64_ ## x
|
||||
#define ELFW(x) ELF64_ ## x
|
||||
#else
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
#define OS_INFO_VMCOREINFO 0
|
||||
#define OS_INFO_REIPL_BLOCK 1
|
||||
#define OS_INFO_INIT_FN 2
|
||||
|
||||
struct os_info_entry {
|
||||
u64 addr;
|
||||
@@ -28,8 +27,8 @@ struct os_info {
|
||||
u16 version_minor;
|
||||
u64 crashkernel_addr;
|
||||
u64 crashkernel_size;
|
||||
struct os_info_entry entry[3];
|
||||
u8 reserved[4004];
|
||||
struct os_info_entry entry[2];
|
||||
u8 reserved[4024];
|
||||
} __packed;
|
||||
|
||||
void os_info_init(void);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* per cpu area, use weak definitions to force the compiler to
|
||||
* generate external references.
|
||||
*/
|
||||
#if defined(CONFIG_SMP) && defined(__s390x__) && defined(MODULE)
|
||||
#if defined(CONFIG_SMP) && defined(CONFIG_64BIT) && defined(MODULE)
|
||||
#define ARCH_NEEDS_WEAK_PER_CPU
|
||||
#endif
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ static inline void crst_table_init(unsigned long *crst, unsigned long entry)
|
||||
clear_table(crst, entry, sizeof(unsigned long)*2048);
|
||||
}
|
||||
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
|
||||
static inline unsigned long pgd_entry_type(struct mm_struct *mm)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ static inline unsigned long pgd_entry_type(struct mm_struct *mm)
|
||||
#define pgd_populate(mm, pgd, pud) BUG()
|
||||
#define pud_populate(mm, pud, pmd) BUG()
|
||||
|
||||
#else /* __s390x__ */
|
||||
#else /* CONFIG_64BIT */
|
||||
|
||||
static inline unsigned long pgd_entry_type(struct mm_struct *mm)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
|
||||
pud_val(*pud) = _REGION3_ENTRY | __pa(pmd);
|
||||
}
|
||||
|
||||
#endif /* __s390x__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
static inline pgd_t *pgd_alloc(struct mm_struct *mm)
|
||||
{
|
||||
|
||||
@@ -74,15 +74,15 @@ static inline int is_zero_pfn(unsigned long pfn)
|
||||
* table can map
|
||||
* PGDIR_SHIFT determines what a third-level page table entry can map
|
||||
*/
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
# define PMD_SHIFT 20
|
||||
# define PUD_SHIFT 20
|
||||
# define PGDIR_SHIFT 20
|
||||
#else /* __s390x__ */
|
||||
#else /* CONFIG_64BIT */
|
||||
# define PMD_SHIFT 20
|
||||
# define PUD_SHIFT 31
|
||||
# define PGDIR_SHIFT 42
|
||||
#endif /* __s390x__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
#define PMD_SIZE (1UL << PMD_SHIFT)
|
||||
#define PMD_MASK (~(PMD_SIZE-1))
|
||||
@@ -98,13 +98,13 @@ static inline int is_zero_pfn(unsigned long pfn)
|
||||
* that leads to 1024 pte per pgd
|
||||
*/
|
||||
#define PTRS_PER_PTE 256
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
#define PTRS_PER_PMD 1
|
||||
#define PTRS_PER_PUD 1
|
||||
#else /* __s390x__ */
|
||||
#else /* CONFIG_64BIT */
|
||||
#define PTRS_PER_PMD 2048
|
||||
#define PTRS_PER_PUD 2048
|
||||
#endif /* __s390x__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
#define PTRS_PER_PGD 2048
|
||||
|
||||
#define FIRST_USER_ADDRESS 0
|
||||
@@ -276,7 +276,7 @@ extern struct page *vmemmap;
|
||||
* swap pte is 1011 and 0001, 0011, 0101, 0111 are invalid.
|
||||
*/
|
||||
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
|
||||
/* Bits in the segment table address-space-control-element */
|
||||
#define _ASCE_SPACE_SWITCH 0x80000000UL /* space switch event */
|
||||
@@ -308,7 +308,7 @@ extern struct page *vmemmap;
|
||||
#define KVM_UR_BIT 0x00008000UL
|
||||
#define KVM_UC_BIT 0x00004000UL
|
||||
|
||||
#else /* __s390x__ */
|
||||
#else /* CONFIG_64BIT */
|
||||
|
||||
/* Bits in the segment/region table address-space-control-element */
|
||||
#define _ASCE_ORIGIN ~0xfffUL/* segment table origin */
|
||||
@@ -363,7 +363,7 @@ extern struct page *vmemmap;
|
||||
#define KVM_UR_BIT 0x0000800000000000UL
|
||||
#define KVM_UC_BIT 0x0000400000000000UL
|
||||
|
||||
#endif /* __s390x__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
/*
|
||||
* A user page table pointer has the space-switch-event bit, the
|
||||
@@ -424,7 +424,7 @@ static inline int mm_has_pgste(struct mm_struct *mm)
|
||||
/*
|
||||
* pgd/pmd/pte query functions
|
||||
*/
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
|
||||
static inline int pgd_present(pgd_t pgd) { return 1; }
|
||||
static inline int pgd_none(pgd_t pgd) { return 0; }
|
||||
@@ -434,7 +434,7 @@ static inline int pud_present(pud_t pud) { return 1; }
|
||||
static inline int pud_none(pud_t pud) { return 0; }
|
||||
static inline int pud_bad(pud_t pud) { return 0; }
|
||||
|
||||
#else /* __s390x__ */
|
||||
#else /* CONFIG_64BIT */
|
||||
|
||||
static inline int pgd_present(pgd_t pgd)
|
||||
{
|
||||
@@ -490,7 +490,7 @@ static inline int pud_bad(pud_t pud)
|
||||
return (pud_val(pud) & mask) != 0;
|
||||
}
|
||||
|
||||
#endif /* __s390x__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
static inline int pmd_present(pmd_t pmd)
|
||||
{
|
||||
@@ -741,7 +741,7 @@ static inline int pte_young(pte_t pte)
|
||||
|
||||
static inline void pgd_clear(pgd_t *pgd)
|
||||
{
|
||||
#ifdef __s390x__
|
||||
#ifdef CONFIG_64BIT
|
||||
if ((pgd_val(*pgd) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R2)
|
||||
pgd_val(*pgd) = _REGION2_ENTRY_EMPTY;
|
||||
#endif
|
||||
@@ -749,7 +749,7 @@ static inline void pgd_clear(pgd_t *pgd)
|
||||
|
||||
static inline void pud_clear(pud_t *pud)
|
||||
{
|
||||
#ifdef __s390x__
|
||||
#ifdef CONFIG_64BIT
|
||||
if ((pud_val(*pud) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R3)
|
||||
pud_val(*pud) = _REGION3_ENTRY_EMPTY;
|
||||
#endif
|
||||
@@ -921,7 +921,7 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,
|
||||
static inline void __ptep_ipte(unsigned long address, pte_t *ptep)
|
||||
{
|
||||
if (!(pte_val(*ptep) & _PAGE_INVALID)) {
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
/* pto must point to the start of the segment table */
|
||||
pte_t *pto = (pte_t *) (((unsigned long) ptep) & 0x7ffffc00);
|
||||
#else
|
||||
@@ -1116,7 +1116,7 @@ static inline pte_t mk_pte(struct page *page, pgprot_t pgprot)
|
||||
#define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address))
|
||||
#define pgd_offset_k(address) pgd_offset(&init_mm, address)
|
||||
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
|
||||
#define pmd_deref(pmd) (pmd_val(pmd) & _SEGMENT_ENTRY_ORIGIN)
|
||||
#define pud_deref(pmd) ({ BUG(); 0UL; })
|
||||
@@ -1125,7 +1125,7 @@ static inline pte_t mk_pte(struct page *page, pgprot_t pgprot)
|
||||
#define pud_offset(pgd, address) ((pud_t *) pgd)
|
||||
#define pmd_offset(pud, address) ((pmd_t *) pud + pmd_index(address))
|
||||
|
||||
#else /* __s390x__ */
|
||||
#else /* CONFIG_64BIT */
|
||||
|
||||
#define pmd_deref(pmd) (pmd_val(pmd) & _SEGMENT_ENTRY_ORIGIN)
|
||||
#define pud_deref(pud) (pud_val(pud) & _REGION_ENTRY_ORIGIN)
|
||||
@@ -1147,7 +1147,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)
|
||||
return pmd + pmd_index(address);
|
||||
}
|
||||
|
||||
#endif /* __s390x__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
#define pfn_pte(pfn,pgprot) mk_pte_phys(__pa((pfn) << PAGE_SHIFT),(pgprot))
|
||||
#define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT)
|
||||
@@ -1196,7 +1196,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)
|
||||
* 0000000000111111111122222222223333333333444444444455 5555 5 55566 66
|
||||
* 0123456789012345678901234567890123456789012345678901 2345 6 78901 23
|
||||
*/
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
#define __SWP_OFFSET_MASK (~0UL >> 12)
|
||||
#else
|
||||
#define __SWP_OFFSET_MASK (~0UL >> 11)
|
||||
@@ -1217,11 +1217,11 @@ static inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
|
||||
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
|
||||
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
|
||||
|
||||
#ifndef __s390x__
|
||||
#ifndef CONFIG_64BIT
|
||||
# define PTE_FILE_MAX_BITS 26
|
||||
#else /* __s390x__ */
|
||||
#else /* CONFIG_64BIT */
|
||||
# define PTE_FILE_MAX_BITS 59
|
||||
#endif /* __s390x__ */
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
#define pte_to_pgoff(__pte) \
|
||||
((((__pte).pte >> 12) << 7) + (((__pte).pte >> 1) & 0x7f))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user