« Previous | Next » 

Revision 477a72a1

ID477a72a1eff40639761e103f5b7652af7746c48e

Added by Heinz Graalfs about 10 years ago

s390x/event-facility: code restructure

Code restructure in order to simplify class hierarchy
- remove S390SCLPDevice abstract base class
and move function pointers into new SCLPEventFacilityClass
- implement SCLPEventFacility as SysBusDevice
- use define constants for instance creation strings

The following ascii-art shows the class structure wrt the SCLP EventFacility
before (CURRENT) and after the restructure (NEW):

----
CURRENT:

"s390-sclp-events-bus" 
----------------------- | SCLPEventsBus | |-------------------------| |BusState qbus |
-----------------------
-----------------------
|   SCLPEventFacility     |  - to be replaced by new SCLPEventFacility,
|-------------------------|    which will be a SysBusDevice
|SCLPEventsBus sbus       |
|DeviceState *qdev        |
|unsigned int receive_mask|
-----------------------
-----------------------
|   S390SCLPDeviceClass   |  - to be replaced by new SCLPEventFacilityClass
|-------------------------|
|DeviceClass qdev         |
|*(init)()                |
-----------------------
"s390-sclp-event-facility" 
          |
instance-of |
V
"s390-sclp-device" - this is an abstract class
----------------------- | S390SCLPDevice (A)| - to be replaced by new SCLPEventFacility |-------------------------| |SysBusDevice busdev | |SCLPEventFacility *ef | | | |*(sclp_command_handler)()| - these 2 go to new SCLPEventFacilityClass |*(event_pending)() |
-----------------------

----
NEW:

"s390-sclp-events-bus" 
----------------------- | SCLPEventsBus | |-------------------------| |BusState qbus |
-----------------------
-----------------------
| SCLPEventFacilityClass  |
|-------------------------|
|DeviceClass parent_class |
|                         |
|*(init)()                |
|*(command_handler)()     |
|*(event_pending)()       |
-----------------------
"s390-sclp-event-facility" 
----------------------- | SCLPEventFacility | |-------------------------| |SysBusDevice parent_class| |SCLPEventsBus sbus | |unsigned int receive_mask|
-----------------------

Signed-off-by: Heinz Graalfs <>
Reviewed-by: Cornelia Huck <>
Signed-off-by: Christian Borntraeger <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences