Re: [kvm-unit-tests PATCH v2 3/9] s390x: irq: make IRQ handler weak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28.11.19 13:46, Pierre Morel wrote:
> Having a weak function allows the tests programm to declare its own
> IRQ handler.
> This is helpfull for I/O tests to have the I/O IRQ handler having
> its special work to do.
> 
> Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
> Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>
> ---
>  lib/s390x/interrupt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c
> index 3e07867..d70fde3 100644
> --- a/lib/s390x/interrupt.c
> +++ b/lib/s390x/interrupt.c
> @@ -140,7 +140,7 @@ void handle_mcck_int(void)
>  		     lc->mcck_old_psw.addr);
>  }
>  
> -void handle_io_int(void)
> +__attribute__((weak)) void handle_io_int(void)
>  {
>  	report_abort("Unexpected io interrupt: at %#lx",
>  		     lc->io_old_psw.addr);
> 

The clear alternative would be a way to register a callback function.
That way you can modify the callback during the tests. As long as not
registered, wrong I/Os can be caught easily here. @Thomas?

-- 
Thanks,

David / dhildenb




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux