Merge branch 'fixes' into features
* fixes: s390/entry: save the caller of psw_idle s390/entry: avoid setting up backchain in ext|io handlers s390/setup: use memblock_free_late() to free old stack s390/irq: fix reading of ext_params2 field from lowcore s390/unwind: add machine check handler stack s390/cpcmd: fix inline assembly register clobbering MAINTAINERS: add backups for s390 vfio drivers s390/vdso: fix initializing and updating of vdso_data s390/vdso: fix tod_steering_delta type s390/vdso: copy tod_steering_delta value to vdso_data page Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
commit
0ee3f73914
@ -15634,8 +15634,8 @@ F: Documentation/s390/pci.rst
|
|||||||
|
|
||||||
S390 VFIO AP DRIVER
|
S390 VFIO AP DRIVER
|
||||||
M: Tony Krowiak <akrowiak@linux.ibm.com>
|
M: Tony Krowiak <akrowiak@linux.ibm.com>
|
||||||
M: Pierre Morel <pmorel@linux.ibm.com>
|
|
||||||
M: Halil Pasic <pasic@linux.ibm.com>
|
M: Halil Pasic <pasic@linux.ibm.com>
|
||||||
|
M: Jason Herne <jjherne@linux.ibm.com>
|
||||||
L: linux-s390@vger.kernel.org
|
L: linux-s390@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
W: http://www.ibm.com/developerworks/linux/linux390/
|
W: http://www.ibm.com/developerworks/linux/linux390/
|
||||||
@ -15647,6 +15647,7 @@ F: drivers/s390/crypto/vfio_ap_private.h
|
|||||||
S390 VFIO-CCW DRIVER
|
S390 VFIO-CCW DRIVER
|
||||||
M: Cornelia Huck <cohuck@redhat.com>
|
M: Cornelia Huck <cohuck@redhat.com>
|
||||||
M: Eric Farman <farman@linux.ibm.com>
|
M: Eric Farman <farman@linux.ibm.com>
|
||||||
|
M: Matthew Rosato <mjrosato@linux.ibm.com>
|
||||||
R: Halil Pasic <pasic@linux.ibm.com>
|
R: Halil Pasic <pasic@linux.ibm.com>
|
||||||
L: linux-s390@vger.kernel.org
|
L: linux-s390@vger.kernel.org
|
||||||
L: kvm@vger.kernel.org
|
L: kvm@vger.kernel.org
|
||||||
@ -15657,6 +15658,7 @@ F: include/uapi/linux/vfio_ccw.h
|
|||||||
|
|
||||||
S390 VFIO-PCI DRIVER
|
S390 VFIO-PCI DRIVER
|
||||||
M: Matthew Rosato <mjrosato@linux.ibm.com>
|
M: Matthew Rosato <mjrosato@linux.ibm.com>
|
||||||
|
M: Eric Farman <farman@linux.ibm.com>
|
||||||
L: linux-s390@vger.kernel.org
|
L: linux-s390@vger.kernel.org
|
||||||
L: kvm@vger.kernel.org
|
L: kvm@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
|
@ -12,6 +12,7 @@ enum stack_type {
|
|||||||
STACK_TYPE_IRQ,
|
STACK_TYPE_IRQ,
|
||||||
STACK_TYPE_NODAT,
|
STACK_TYPE_NODAT,
|
||||||
STACK_TYPE_RESTART,
|
STACK_TYPE_RESTART,
|
||||||
|
STACK_TYPE_MCCK,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct stack_info {
|
struct stack_info {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include <vdso/datapage.h>
|
#include <vdso/datapage.h>
|
||||||
|
|
||||||
struct arch_vdso_data {
|
struct arch_vdso_data {
|
||||||
__u64 tod_steering_delta;
|
__s64 tod_steering_delta;
|
||||||
__u64 tod_steering_end;
|
__u64 tod_steering_end;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -37,10 +37,12 @@ static int diag8_noresponse(int cmdlen)
|
|||||||
|
|
||||||
static int diag8_response(int cmdlen, char *response, int *rlen)
|
static int diag8_response(int cmdlen, char *response, int *rlen)
|
||||||
{
|
{
|
||||||
|
unsigned long _cmdlen = cmdlen | 0x40000000L;
|
||||||
|
unsigned long _rlen = *rlen;
|
||||||
register unsigned long reg2 asm ("2") = (addr_t) cpcmd_buf;
|
register unsigned long reg2 asm ("2") = (addr_t) cpcmd_buf;
|
||||||
register unsigned long reg3 asm ("3") = (addr_t) response;
|
register unsigned long reg3 asm ("3") = (addr_t) response;
|
||||||
register unsigned long reg4 asm ("4") = cmdlen | 0x40000000L;
|
register unsigned long reg4 asm ("4") = _cmdlen;
|
||||||
register unsigned long reg5 asm ("5") = *rlen;
|
register unsigned long reg5 asm ("5") = _rlen;
|
||||||
|
|
||||||
asm volatile(
|
asm volatile(
|
||||||
" diag %2,%0,0x8\n"
|
" diag %2,%0,0x8\n"
|
||||||
|
@ -79,6 +79,15 @@ static bool in_nodat_stack(unsigned long sp, struct stack_info *info)
|
|||||||
return in_stack(sp, info, STACK_TYPE_NODAT, top - THREAD_SIZE, top);
|
return in_stack(sp, info, STACK_TYPE_NODAT, top - THREAD_SIZE, top);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool in_mcck_stack(unsigned long sp, struct stack_info *info)
|
||||||
|
{
|
||||||
|
unsigned long frame_size, top;
|
||||||
|
|
||||||
|
frame_size = STACK_FRAME_OVERHEAD + sizeof(struct pt_regs);
|
||||||
|
top = S390_lowcore.mcck_stack + frame_size;
|
||||||
|
return in_stack(sp, info, STACK_TYPE_MCCK, top - THREAD_SIZE, top);
|
||||||
|
}
|
||||||
|
|
||||||
static bool in_restart_stack(unsigned long sp, struct stack_info *info)
|
static bool in_restart_stack(unsigned long sp, struct stack_info *info)
|
||||||
{
|
{
|
||||||
unsigned long frame_size, top;
|
unsigned long frame_size, top;
|
||||||
@ -108,7 +117,8 @@ int get_stack_info(unsigned long sp, struct task_struct *task,
|
|||||||
/* Check per-cpu stacks */
|
/* Check per-cpu stacks */
|
||||||
if (!in_irq_stack(sp, info) &&
|
if (!in_irq_stack(sp, info) &&
|
||||||
!in_nodat_stack(sp, info) &&
|
!in_nodat_stack(sp, info) &&
|
||||||
!in_restart_stack(sp, info))
|
!in_restart_stack(sp, info) &&
|
||||||
|
!in_mcck_stack(sp, info))
|
||||||
goto unknown;
|
goto unknown;
|
||||||
|
|
||||||
recursion_check:
|
recursion_check:
|
||||||
|
@ -401,15 +401,13 @@ ENTRY(\name)
|
|||||||
brasl %r14,.Lcleanup_sie_int
|
brasl %r14,.Lcleanup_sie_int
|
||||||
#endif
|
#endif
|
||||||
0: CHECK_STACK __LC_SAVE_AREA_ASYNC
|
0: CHECK_STACK __LC_SAVE_AREA_ASYNC
|
||||||
lgr %r11,%r15
|
|
||||||
aghi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
|
aghi %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
|
||||||
stg %r11,__SF_BACKCHAIN(%r15)
|
|
||||||
j 2f
|
j 2f
|
||||||
1: BPENTER __TI_flags(%r12),_TIF_ISOLATE_BP
|
1: BPENTER __TI_flags(%r12),_TIF_ISOLATE_BP
|
||||||
lctlg %c1,%c1,__LC_KERNEL_ASCE
|
lctlg %c1,%c1,__LC_KERNEL_ASCE
|
||||||
lg %r15,__LC_KERNEL_STACK
|
lg %r15,__LC_KERNEL_STACK
|
||||||
xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
|
2: xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
|
||||||
2: la %r11,STACK_FRAME_OVERHEAD(%r15)
|
la %r11,STACK_FRAME_OVERHEAD(%r15)
|
||||||
stmg %r0,%r7,__PT_R0(%r11)
|
stmg %r0,%r7,__PT_R0(%r11)
|
||||||
# clear user controlled registers to prevent speculative use
|
# clear user controlled registers to prevent speculative use
|
||||||
xgr %r0,%r0
|
xgr %r0,%r0
|
||||||
@ -445,6 +443,7 @@ INT_HANDLER io_int_handler,__LC_IO_OLD_PSW,do_io_irq
|
|||||||
* Load idle PSW.
|
* Load idle PSW.
|
||||||
*/
|
*/
|
||||||
ENTRY(psw_idle)
|
ENTRY(psw_idle)
|
||||||
|
stg %r14,(__SF_GPRS+8*8)(%r15)
|
||||||
stg %r3,__SF_EMPTY(%r15)
|
stg %r3,__SF_EMPTY(%r15)
|
||||||
larl %r1,psw_idle_exit
|
larl %r1,psw_idle_exit
|
||||||
stg %r1,__SF_EMPTY+8(%r15)
|
stg %r1,__SF_EMPTY+8(%r15)
|
||||||
|
@ -174,7 +174,7 @@ void noinstr do_ext_irq(struct pt_regs *regs)
|
|||||||
|
|
||||||
memcpy(®s->int_code, &S390_lowcore.ext_cpu_addr, 4);
|
memcpy(®s->int_code, &S390_lowcore.ext_cpu_addr, 4);
|
||||||
regs->int_parm = S390_lowcore.ext_params;
|
regs->int_parm = S390_lowcore.ext_params;
|
||||||
regs->int_parm_long = *(unsigned long *)S390_lowcore.ext_params2;
|
regs->int_parm_long = S390_lowcore.ext_params2;
|
||||||
|
|
||||||
from_idle = !user_mode(regs) && regs->psw.addr == (unsigned long)psw_idle_exit;
|
from_idle = !user_mode(regs) && regs->psw.addr == (unsigned long)psw_idle_exit;
|
||||||
if (from_idle)
|
if (from_idle)
|
||||||
|
@ -354,7 +354,7 @@ static int __init stack_realloc(void)
|
|||||||
if (!new)
|
if (!new)
|
||||||
panic("Couldn't allocate machine check stack");
|
panic("Couldn't allocate machine check stack");
|
||||||
WRITE_ONCE(S390_lowcore.mcck_stack, new + STACK_INIT_OFFSET);
|
WRITE_ONCE(S390_lowcore.mcck_stack, new + STACK_INIT_OFFSET);
|
||||||
memblock_free(old, THREAD_SIZE);
|
memblock_free_late(old, THREAD_SIZE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
early_initcall(stack_realloc);
|
early_initcall(stack_realloc);
|
||||||
|
@ -80,10 +80,12 @@ void __init time_early_init(void)
|
|||||||
{
|
{
|
||||||
struct ptff_qto qto;
|
struct ptff_qto qto;
|
||||||
struct ptff_qui qui;
|
struct ptff_qui qui;
|
||||||
|
int cs;
|
||||||
|
|
||||||
/* Initialize TOD steering parameters */
|
/* Initialize TOD steering parameters */
|
||||||
tod_steering_end = tod_clock_base.tod;
|
tod_steering_end = tod_clock_base.tod;
|
||||||
vdso_data->arch_data.tod_steering_end = tod_steering_end;
|
for (cs = 0; cs < CS_BASES; cs++)
|
||||||
|
vdso_data[cs].arch_data.tod_steering_end = tod_steering_end;
|
||||||
|
|
||||||
if (!test_facility(28))
|
if (!test_facility(28))
|
||||||
return;
|
return;
|
||||||
@ -366,6 +368,7 @@ static void clock_sync_global(unsigned long delta)
|
|||||||
{
|
{
|
||||||
unsigned long now, adj;
|
unsigned long now, adj;
|
||||||
struct ptff_qto qto;
|
struct ptff_qto qto;
|
||||||
|
int cs;
|
||||||
|
|
||||||
/* Fixup the monotonic sched clock. */
|
/* Fixup the monotonic sched clock. */
|
||||||
tod_clock_base.eitod += delta;
|
tod_clock_base.eitod += delta;
|
||||||
@ -381,7 +384,10 @@ static void clock_sync_global(unsigned long delta)
|
|||||||
panic("TOD clock sync offset %li is too large to drift\n",
|
panic("TOD clock sync offset %li is too large to drift\n",
|
||||||
tod_steering_delta);
|
tod_steering_delta);
|
||||||
tod_steering_end = now + (abs(tod_steering_delta) << 15);
|
tod_steering_end = now + (abs(tod_steering_delta) << 15);
|
||||||
vdso_data->arch_data.tod_steering_end = tod_steering_end;
|
for (cs = 0; cs < CS_BASES; cs++) {
|
||||||
|
vdso_data[cs].arch_data.tod_steering_end = tod_steering_end;
|
||||||
|
vdso_data[cs].arch_data.tod_steering_delta = tod_steering_delta;
|
||||||
|
}
|
||||||
|
|
||||||
/* Update LPAR offset. */
|
/* Update LPAR offset. */
|
||||||
if (ptff_query(PTFF_QTO) && ptff(&qto, sizeof(qto), PTFF_QTO) == 0)
|
if (ptff_query(PTFF_QTO) && ptff(&qto, sizeof(qto), PTFF_QTO) == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user