Skip to content

Commit d4c603d

Browse files
committed
s390x: move S390_ADAPTER_SUPPRESSIBLE
The definition S390_ADAPTER_SUPPRESSIBLE was moved to "cpu.h", per suggestion of Thomas Huth. From interface design perspective, IMHO, not a good thing as it belongs to the public interface of css_register_io_adapters(). We did this because CONFIG_KVM requeires NEED_CPU_H and Thomas, and other commenters did not like the consequences of that. Moving the interrupt related declarations to s390_flic.h was suggested by Cornelia Huck. Signed-off-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Tested-by: Halil Pasic <pasic@linux.ibm.com> Message-Id: <20210317095622.2839895-2-kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
1 parent 2da6e36 commit d4c603d

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

include/hw/s390x/css.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#ifndef CSS_H
1313
#define CSS_H
1414

15-
#include "cpu.h"
1615
#include "hw/s390x/adapter.h"
1716
#include "hw/s390x/s390_flic.h"
1817
#include "hw/s390x/ioinst.h"
@@ -233,12 +232,6 @@ uint32_t css_get_adapter_id(CssIoAdapterType type, uint8_t isc);
233232
void css_register_io_adapters(CssIoAdapterType type, bool swap, bool maskable,
234233
uint8_t flags, Error **errp);
235234

236-
#ifndef CONFIG_KVM
237-
#define S390_ADAPTER_SUPPRESSIBLE 0x01
238-
#else
239-
#define S390_ADAPTER_SUPPRESSIBLE KVM_S390_ADAPTER_SUPPRESSIBLE
240-
#endif
241-
242235
#ifndef CONFIG_USER_ONLY
243236
SubchDev *css_find_subch(uint8_t m, uint8_t cssid, uint8_t ssid,
244237
uint16_t schid);

include/hw/s390x/s390_flic.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ void s390_flic_init(void);
134134
S390FLICState *s390_get_flic(void);
135135
QEMUS390FLICState *s390_get_qemu_flic(S390FLICState *fs);
136136
S390FLICStateClass *s390_get_flic_class(S390FLICState *fs);
137+
void s390_crw_mchk(void);
138+
void s390_io_interrupt(uint16_t subchannel_id, uint16_t subchannel_nr,
139+
uint32_t io_int_parm, uint32_t io_int_word);
137140
bool ais_needed(void *opaque);
138141

139142
#endif /* HW_S390_FLIC_H */

target/s390x/cpu.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040

4141
#define S390_MAX_CPUS 248
4242

43+
#ifndef CONFIG_KVM
44+
#define S390_ADAPTER_SUPPRESSIBLE 0x01
45+
#else
46+
#define S390_ADAPTER_SUPPRESSIBLE KVM_S390_ADAPTER_SUPPRESSIBLE
47+
#endif
48+
4349
typedef struct PSW {
4450
uint64_t mask;
4551
uint64_t addr;
@@ -811,9 +817,6 @@ int cpu_s390x_signal_handler(int host_signum, void *pinfo, void *puc);
811817

812818

813819
/* interrupt.c */
814-
void s390_crw_mchk(void);
815-
void s390_io_interrupt(uint16_t subchannel_id, uint16_t subchannel_nr,
816-
uint32_t io_int_parm, uint32_t io_int_word);
817820
#define RA_IGNORED 0
818821
void s390_program_interrupt(CPUS390XState *env, uint32_t code, uintptr_t ra);
819822
/* service interrupts are floating therefore we must not pass an cpustate */

0 commit comments

Comments
 (0)