[S390] Cleanup struct _lowcore usage and defines.

Use asm offsets to make sure the offset defines to struct _lowcore and
its layout don't get out of sync.
Also add a BUILD_BUG_ON() which checks that the size of the structure
is sane.
And while being at it change those sites which use odd casts to access
the current lowcore. These should use S390_lowcore instead.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Heiko Carstens
2010-02-26 22:37:43 +01:00
committed by Martin Schwidefsky
szülő d96221ab1e
commit cbb870c822
26 fájl változott, egészen pontosan 174 új sor hozzáadva és 234 régi sor törölve

Fájl megtekintése

@@ -340,11 +340,11 @@ static void kvm_extint_handler(u16 code)
return;
/* The LSB might be overloaded, we have to mask it */
vq = (struct virtqueue *) ((*(long *) __LC_PFAULT_INTPARM) & ~1UL);
vq = (struct virtqueue *)(S390_lowcore.ext_params2 & ~1UL);
/* We use the LSB of extparam, to decide, if this interrupt is a config
* change or a "standard" interrupt */
config_changed = (*(int *) __LC_EXT_PARAMS & 1);
config_changed = S390_lowcore.ext_params & 1;
if (config_changed) {
struct virtio_driver *drv;