Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (27 commits)
  [S390] Fix checkstack for s390
  [S390] fix initialization of stp
  [S390] 3215: Remove tasklet.
  [S390] console flush on panic / reboot
  [S390] introduce dirty bit for kvm live migration
  [S390] Add ioctl support for EMC Symmetrix Subsystem Control I/O
  [S390] xpram: per device block request queues.
  [S390] dasd: fix message flood for unsolicited interrupts
  [S390] Move private simple udelay function to arch/s390/lib/delay.c.
  [S390] dcssblk: add >2G DCSSs support and stacked contiguous DCSSs support.
  [S390] ptrace changes
  [S390] s390: use sys_pause for 31bit pause entry point
  [S390] qdio enhanced SIGA (iqdio) support.
  [S390] cio: fix cio_tpi.
  [S390] cio: Correct use of ! and &
  [S390] cio: inline assembly cleanup
  [S390] bus_id -> dev_set_name() for css and ccw busses
  [S390] bus_id ->dev_name() conversions in qdio
  [S390] Use s390_root_dev_* in kvm_virtio.
  [S390] more bus_id -> dev_name conversions
  ...
  • Loading branch information
torvalds committed Oct 11, 2008
2 parents 098ef21 + 89d4984 commit 37d9869
Show file tree
Hide file tree
Showing 74 changed files with 1,550 additions and 620 deletions.
11 changes: 8 additions & 3 deletions Documentation/s390/CommonIO
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,19 @@ Command line parameters

Note: While already known devices can be added to the list of devices to be
ignored, there will be no effect on then. However, if such a device
disappears and then reappears, it will then be ignored.
disappears and then reappears, it will then be ignored. To make
known devices go away, you need the "purge" command (see below).

For example,
"echo add 0.0.a000-0.0.accc, 0.0.af00-0.0.afff > /proc/cio_ignore"
will add 0.0.a000-0.0.accc and 0.0.af00-0.0.afff to the list of ignored
devices.

You can remove already known but now ignored devices via
"echo purge > /proc/cio_ignore"
All devices ignored but still registered and not online (= not in use)
will be deregistered and thus removed from the system.

The devices can be specified either by bus id (0.x.abcd) or, for 2.4 backward
compatibility, by the device number in hexadecimal (0xabcd or abcd). Device
numbers given as 0xabcd will be interpreted as 0.0.abcd.
Expand All @@ -98,8 +104,7 @@ debugfs entries
handling).

- /sys/kernel/debug/s390dbf/cio_msg/sprintf
Various debug messages from the common I/O-layer, including messages
printed when cio_msg=yes.
Various debug messages from the common I/O-layer.

- /sys/kernel/debug/s390dbf/cio_trace/hex_ascii
Logs the calling of functions in the common I/O-layer and, if applicable,
Expand Down
1 change: 1 addition & 0 deletions arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ config S390
select HAVE_KPROBES
select HAVE_KRETPROBES
select HAVE_KVM if 64BIT
select HAVE_ARCH_TRACEHOOK

source "init/Kconfig"

Expand Down
13 changes: 13 additions & 0 deletions arch/s390/include/asm/dasd.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Author(s)......: Holger Smolinski <[email protected]>
* Bugreports.to..: <[email protected]>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
* EMC Symmetrix ioctl Copyright EMC Corporation, 2008
* Author.........: Nigel Hislop <[email protected]>
*
* This file is the interface of the DASD device driver, which is exported to user space
* any future changes wrt the API will result in a change of the APIVERSION reported
Expand Down Expand Up @@ -202,6 +204,16 @@ typedef struct attrib_data_t {
#define DASD_SEQ_PRESTAGE 0x4
#define DASD_REC_ACCESS 0x5

/*
* Perform EMC Symmetrix I/O
*/
typedef struct dasd_symmio_parms {
unsigned char reserved[8]; /* compat with older releases */
unsigned long long psf_data; /* char * cast to u64 */
unsigned long long rssd_result; /* char * cast to u64 */
int psf_data_len;
int rssd_result_len;
} __attribute__ ((packed)) dasd_symmio_parms_t;

/********************************************************************************
* SECTION: Definition of IOCTLs
Expand Down Expand Up @@ -247,6 +259,7 @@ typedef struct attrib_data_t {
/* Set Attributes (cache operations) */
#define BIODASDSATTR _IOW(DASD_IOCTL_LETTER,2,attrib_data_t)

#define BIODASDSYMMIO _IOWR(DASD_IOCTL_LETTER, 240, dasd_symmio_parms_t)

#endif /* DASD_H */

Expand Down
1 change: 1 addition & 0 deletions arch/s390/include/asm/delay.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define _S390_DELAY_H

extern void __udelay(unsigned long usecs);
extern void udelay_simple(unsigned long usecs);
extern void __delay(unsigned long loops);

#define udelay(n) __udelay(n)
Expand Down
45 changes: 43 additions & 2 deletions arch/s390/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ extern char empty_zero_page[PAGE_SIZE];
#define RCP_GR_BIT 50
#define RCP_GC_BIT 49

/* User dirty bit for KVM's migration feature */
#define KVM_UD_BIT 47

#ifndef __s390x__

/* Bits in the segment table address-space-control-element */
Expand Down Expand Up @@ -575,12 +578,16 @@ static inline void ptep_rcp_copy(pte_t *ptep)
unsigned long *pgste = (unsigned long *) (ptep + PTRS_PER_PTE);

skey = page_get_storage_key(page_to_phys(page));
if (skey & _PAGE_CHANGED)
if (skey & _PAGE_CHANGED) {
set_bit_simple(RCP_GC_BIT, pgste);
set_bit_simple(KVM_UD_BIT, pgste);
}
if (skey & _PAGE_REFERENCED)
set_bit_simple(RCP_GR_BIT, pgste);
if (test_and_clear_bit_simple(RCP_HC_BIT, pgste))
if (test_and_clear_bit_simple(RCP_HC_BIT, pgste)) {
SetPageDirty(page);
set_bit_simple(KVM_UD_BIT, pgste);
}
if (test_and_clear_bit_simple(RCP_HR_BIT, pgste))
SetPageReferenced(page);
#endif
Expand Down Expand Up @@ -744,6 +751,40 @@ static inline pte_t pte_mkspecial(pte_t pte)
return pte;
}

#ifdef CONFIG_PGSTE
/*
* Get (and clear) the user dirty bit for a PTE.
*/
static inline int kvm_s390_test_and_clear_page_dirty(struct mm_struct *mm,
pte_t *ptep)
{
int dirty;
unsigned long *pgste;
struct page *page;
unsigned int skey;

if (!mm->context.pgstes)
return -EINVAL;
rcp_lock(ptep);
pgste = (unsigned long *) (ptep + PTRS_PER_PTE);
page = virt_to_page(pte_val(*ptep));
skey = page_get_storage_key(page_to_phys(page));
if (skey & _PAGE_CHANGED) {
set_bit_simple(RCP_GC_BIT, pgste);
set_bit_simple(KVM_UD_BIT, pgste);
}
if (test_and_clear_bit_simple(RCP_HC_BIT, pgste)) {
SetPageDirty(page);
set_bit_simple(KVM_UD_BIT, pgste);
}
dirty = test_and_clear_bit_simple(KVM_UD_BIT, pgste);
if (skey & _PAGE_CHANGED)
page_clear_dirty(page);
rcp_unlock(ptep);
return dirty;
}
#endif

#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
static inline int ptep_test_and_clear_young(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep)
Expand Down
1 change: 1 addition & 0 deletions arch/s390/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ extern void user_disable_single_step(struct task_struct *);

#define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0)
#define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN)
#define user_stack_pointer(regs)((regs)->gprs[15])
#define regs_return_value(regs)((regs)->gprs[2])
#define profile_pc(regs) instruction_pointer(regs)
extern void show_regs(struct pt_regs * regs);
Expand Down
8 changes: 7 additions & 1 deletion arch/s390/include/asm/qdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,13 @@ struct qdio_ssqd_desc {
u8 mbccnt;
u16 qdioac2;
u64 sch_token;
u64:64;
u8 mro;
u8 mri;
u8:8;
u8 sbalic;
u16:16;
u8:8;
u8 mmwc;
} __attribute__ ((packed));

/* params are: ccw_device, qdio_error, queue_number,
Expand Down
80 changes: 80 additions & 0 deletions arch/s390/include/asm/syscall.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Access to user system call parameters and results
*
* Copyright IBM Corp. 2008
* Author(s): Martin Schwidefsky ([email protected])
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2 only)
* as published by the Free Software Foundation.
*/

#ifndef _ASM_SYSCALL_H
#define _ASM_SYSCALL_H 1

#include <asm/ptrace.h>

static inline long syscall_get_nr(struct task_struct *task,
struct pt_regs *regs)
{
if (regs->trap != __LC_SVC_OLD_PSW)
return -1;
return regs->gprs[2];
}

static inline void syscall_rollback(struct task_struct *task,
struct pt_regs *regs)
{
regs->gprs[2] = regs->orig_gpr2;
}

static inline long syscall_get_error(struct task_struct *task,
struct pt_regs *regs)
{
return (regs->gprs[2] >= -4096UL) ? -regs->gprs[2] : 0;
}

static inline long syscall_get_return_value(struct task_struct *task,
struct pt_regs *regs)
{
return regs->gprs[2];
}

static inline void syscall_set_return_value(struct task_struct *task,
struct pt_regs *regs,
int error, long val)
{
regs->gprs[2] = error ? -error : val;
}

static inline void syscall_get_arguments(struct task_struct *task,
struct pt_regs *regs,
unsigned int i, unsigned int n,
unsigned long *args)
{
BUG_ON(i + n > 6);
#ifdef CONFIG_COMPAT
if (test_tsk_thread_flag(task, TIF_31BIT)) {
if (i + n == 6)
args[--n] = (u32) regs->args[0];
while (n-- > 0)
args[n] = (u32) regs->gprs[2 + i + n];
}
#endif
if (i + n == 6)
args[--n] = regs->args[0];
memcpy(args, &regs->gprs[2 + i], n * sizeof(args[0]));
}

static inline void syscall_set_arguments(struct task_struct *task,
struct pt_regs *regs,
unsigned int i, unsigned int n,
const unsigned long *args)
{
BUG_ON(i + n > 6);
if (i + n == 6)
regs->args[0] = args[--n];
memcpy(&regs->gprs[2 + i], args, n * sizeof(args[0]));
}

#endif /* _ASM_SYSCALL_H */
2 changes: 2 additions & 0 deletions arch/s390/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ static inline struct thread_info *current_thread_info(void)
* thread information flags bit numbers
*/
#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
#define TIF_RESTART_SVC 4 /* restart svc with new svc number */
Expand All @@ -100,6 +101,7 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_RESTORE_SIGMASK 20 /* restore signal mask in do_signal() */

#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
Expand Down
8 changes: 0 additions & 8 deletions arch/s390/kernel/compat_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,14 +608,6 @@ asmlinkage long sys32_settimeofday(struct compat_timeval __user *tv, struct time
return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
}

/* These are here just in case some old sparc32 binary calls it. */
asmlinkage long sys32_pause(void)
{
current->state = TASK_INTERRUPTIBLE;
schedule();
return -ERESTARTNOHAND;
}

asmlinkage long sys32_pread64(unsigned int fd, char __user *ubuf,
size_t count, u32 poshi, u32 poslo)
{
Expand Down
1 change: 0 additions & 1 deletion arch/s390/kernel/compat_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ long sys32_gettimeofday(struct compat_timeval __user *tv,
struct timezone __user *tz);
long sys32_settimeofday(struct compat_timeval __user *tv,
struct timezone __user *tz);
long sys32_pause(void);
long sys32_pread64(unsigned int fd, char __user *ubuf, size_t count,
u32 poshi, u32 poslo);
long sys32_pwrite64(unsigned int fd, const char __user *ubuf,
Expand Down
2 changes: 0 additions & 2 deletions arch/s390/kernel/compat_wrapper.S
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ sys32_alarm_wrapper:
llgfr %r2,%r2 # unsigned int
jg sys_alarm # branch to system call

#sys32_pause_wrapper # void

.globl compat_sys_utime_wrapper
compat_sys_utime_wrapper:
llgtr %r2,%r2 # char *
Expand Down
Loading

0 comments on commit 37d9869

Please sign in to comment.