Re: [RFC PATCH v2 05/13] powerpc/syscall: Rename syscall_64.c into syscall.c
From: Nicholas Piggin
Date: Mon Apr 06 2020 - 20:24:01 EST
Christophe Leroy's on April 7, 2020 4:20 am:
>
>
> Le 06/04/2020 Ã 03:42, Nicholas Piggin a ÃcritÂ:
>> Christophe Leroy's on April 6, 2020 3:44 am:
>>> syscall_64.c will be reused almost as is for PPC32.
>>>
>>> Rename it syscall.c
>>
>> Don't mind this, but I wonder if we can rename it to interrupt.c.
>
> Interrupt for me is irq.
>
> Maybe exception.c ?
>
> Exceptions, that's what interrupts and system calls are.
It's not the same. An interrupt is caused by an exception, but an
exception does not always cause an interrupt.
The code here is handling interrupts, it is not handling the exceptions
(those are handled by handlers that are called). We also handle
exceptions without taking an interrupt, for example if we set
decrementer or msgclr.
And we often (especially in 64-bit with soft masking) take interrupts
without handling the exception (we set EE=0 and return, leaving the
exception existing).
So I'm trying to fix terminology slowly. We are not "returning" from
an exception for example, that doesn't make sense. An exception is a
condition of processor state which is either satisfied or it is not.
What the software returns from is an interrupt.
I'd like irq to be ~= Linux irq, which in general means an asynchronous
interrupt that can be blocked by local_irq_disable or sometimes a device
irq specifically, as distinct from "interrupt" which is powerpc
architecture definition.
Thanks,
Nick