Re: [PATCH] Move user_intr handling to mach side

2020-08-05 Thread Samuel Thibault
Junling Ma, le mar. 04 août 2020 18:21:21 -0700, a ecrit: > >> +__disable_irq (irqtab.irq[id]); > > > > I'd say add a struct irqdev * in the user_intr_t, so you don't have to > > hardcode irqtab. Also, no need to keep it inside splhigh. > > Sure we can keep a pointer inside user_intr_t. > Bu

Re: [PATCH] Move user_intr handling to mach side

2020-08-04 Thread Junling Ma
> On Aug 4, 2020, at 5:24 PM, Samuel Thibault wrote: > > Re, > > Junling Ma, le dim. 02 août 2020 21:07:00 -0700, a ecrit: >> +struct pt_regs; >> +extern int request_irq (unsigned int irq, void (*handler) (int, void *, >> struct pt_regs *), >> + unsigned long flags, const char *devic

Re: [PATCH] Move user_intr handling to mach side

2020-08-04 Thread Samuel Thibault
Samuel Thibault, le mer. 05 août 2020 02:24:20 +0200, a ecrit: > > user_intr_t * > > insert_intr_entry (struct irqdev *dev, int id, ipc_port_t dst_port) > > { > [...] > > + /* we do not need to disable irq here, because the irq handler does not > > touch the queue now. */ > ??? How so? Ah, yo

Re: [PATCH] Move user_intr handling to mach side

2020-08-04 Thread Samuel Thibault
Re, Junling Ma, le dim. 02 août 2020 21:07:00 -0700, a ecrit: > +struct pt_regs; > +extern int request_irq (unsigned int irq, void (*handler) (int, void *, > struct pt_regs *), > + unsigned long flags, const char *device, void *dev_id); > +extern void free_irq (unsigned int irq, void *de

[PATCH] Move user_intr handling to mach side

2020-08-02 Thread Junling Ma
1. make deliver_intr a linux irq handler, and do not let it touch the main_intr_queue. the queue handling is solely in intr_thread (removing dead entries) and insert_intr_entry (insertion). 2. remove user_intr from struct linux_action and its handling on linux side. --- device/intr.c