s390 updates for 5.12-rc6

- fix incorrect initialization and update of vdso data pages, which
   results in incorrect tod clock steering, and that
   clock_gettime(CLOCK_MONOTONIC_RAW, ...) returns incorrect values.
 
 - update MAINTAINERS for s390 vfio drivers
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEECMNfWEw3SLnmiLkZIg7DeRspbsIFAmBjXH8ACgkQIg7DeRsp
 bsLSWg//QhUiFdeUvyMoUxUj7Pld5/VPwAdVyuYbWlaiAwzHQwdhSCEXQ0CoIJm2
 TWKpDA768KjYI8RowS+WxjGtGgDFtagtwAUm9UveiCuV4QJ5Zt/n+IRoXlUuwZWG
 9mjx2UcUHxPFGJ7WtAR5VI1MLxZDHeEHVjLh7bOugO/7388CZr4TnCoIJZRXk1sh
 m8WLr5gavBmYTA2PrmayuOkxOPMV56d5rRi/ZGiUYWHJJgskg+LDWcBCr4IER2am
 MgeCMIpVgs2o4z6O2xCRmJeOG4Ha1JgeI0+8OhkkWmmZCo/ZMrjW4rjP8s0nSSif
 PdKot7KaeDAVGCm11jv4V+YVN9HaVPFqGimNV7XuEXBZKnwh7N2yKK4qWvwRy+TJ
 Y1nBMUvzGw7IEl60FYPCPUryk9KEq2qAYc77jRcRi9H7ji0X3BMYVKr/9AT3sdeJ
 O7FkGSdEk7rfYzDiqRyisbT3rJKMwRy7i8sp7ap/m1qcgVbQlUSFoFNXSchF+2wP
 OCQuvLOX7RNsFP9YiXcqUTgFO6JkN0UbVfwyOH/SxTf9Pyj53wEmphURGiHTZkbr
 9TrjDmAU3MA52IGU9gYHLqQ9otCrDhj4H9Uuuo6IDJ3v1pVgdt87fIq3nHjOU8Si
 KxVQ7V86Z3bXpHYglohWG7AfltfqkdO7FFAj7zvKgvq06zqRmtQ=
 =5z4s
 -----END PGP SIGNATURE-----

Merge tag 's390-5.12-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 updates from Heiko Carstens:

 - fix incorrect initialization and update of vdso data pages, which
   results in incorrect tod clock steering, and that
   clock_gettime(CLOCK_MONOTONIC_RAW, ...) returns incorrect values.

 - update MAINTAINERS for s390 vfio drivers

* tag 's390-5.12-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  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
This commit is contained in:
Linus Torvalds 2021-03-30 10:54:22 -07:00
commit 6ac86aae89
3 changed files with 12 additions and 4 deletions

View File

@ -15627,8 +15627,8 @@ F: Documentation/s390/pci.rst
S390 VFIO AP DRIVER
M: Tony Krowiak <akrowiak@linux.ibm.com>
M: Pierre Morel <pmorel@linux.ibm.com>
M: Halil Pasic <pasic@linux.ibm.com>
M: Jason Herne <jjherne@linux.ibm.com>
L: linux-s390@vger.kernel.org
S: Supported
W: http://www.ibm.com/developerworks/linux/linux390/
@ -15640,6 +15640,7 @@ F: drivers/s390/crypto/vfio_ap_private.h
S390 VFIO-CCW DRIVER
M: Cornelia Huck <cohuck@redhat.com>
M: Eric Farman <farman@linux.ibm.com>
M: Matthew Rosato <mjrosato@linux.ibm.com>
R: Halil Pasic <pasic@linux.ibm.com>
L: linux-s390@vger.kernel.org
L: kvm@vger.kernel.org
@ -15650,6 +15651,7 @@ F: include/uapi/linux/vfio_ccw.h
S390 VFIO-PCI DRIVER
M: Matthew Rosato <mjrosato@linux.ibm.com>
M: Eric Farman <farman@linux.ibm.com>
L: linux-s390@vger.kernel.org
L: kvm@vger.kernel.org
S: Supported

View File

@ -6,7 +6,7 @@
#include <vdso/datapage.h>
struct arch_vdso_data {
__u64 tod_steering_delta;
__s64 tod_steering_delta;
__u64 tod_steering_end;
};

View File

@ -80,10 +80,12 @@ void __init time_early_init(void)
{
struct ptff_qto qto;
struct ptff_qui qui;
int cs;
/* Initialize TOD steering parameters */
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))
return;
@ -366,6 +368,7 @@ static void clock_sync_global(unsigned long delta)
{
unsigned long now, adj;
struct ptff_qto qto;
int cs;
/* Fixup the monotonic sched clock. */
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",
tod_steering_delta);
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. */
if (ptff_query(PTFF_QTO) && ptff(&qto, sizeof(qto), PTFF_QTO) == 0)