• Harald Freudenberger's avatar
    s390/ap: introduce low frequency polling possibility · 263c8454
    Harald Freudenberger authored
    For some events the ap bus needs to poll. For example
    when an AP queue is reset until the reset is through.
    Also when no interrupt support is available (e.g. zVM)
    there is a need to poll until all requests have been
    processed and all replies have been delivered.
    
    Polling is done with a high resolution timer by default
    run with a rate of 4kHz (LPAR) or 666Hz (zVM guest).
    
    For some events (wait for reset complete, wait for irq
    enabled complete) this is a much too high poll rate
    which triggers a lot of TAPQ invocations.
    
    This patch introduces the possibility for the state
    machine functions to return a new wait enum
    AP_SM_WAIT_LOW_TIMEOUT which gives a hint to the
    ap_wait() function to eventually set up the timer
    with a more relaxed timeout value of 25Hz.
    
    This patch also includes a slight rework of the sysfs
    functions parsing the timer related stuff: Use of
    kstrtobool and kstrtoul instead of sscanf.
    Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
    Reviewed-by: default avatarHolger Dengler <dengler@linux.ibm.com>
    Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    263c8454
ap_bus.c 57.9 KB