lkml.org 
[lkml]   [2020]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [patch V6 07/37] x86/entry: Provide helpers for execute on irqstack
    Date
    Andy Lutomirski <luto@kernel.org> writes:
    > Actually, I revoke my ack. Can you make one of two changes:
    >
    > Option A: Add an assertion to run_on_irqstack to verify that irq_count
    > was -1 at the beginning? I suppose this also means you could just
    > explicitly write 0 instead of adding and subtracting.
    >
    > Option B: Make run_on_irqstack() just call the function on the current
    > stack if we're already on the irq stack.
    >
    > Right now, it's too easy to mess up and not verify the right
    > precondition before calling run_on_irqstack().
    >
    > If you choose A, perhaps add a helper to do the if(irq_needs_irqstack)
    > dance so that users can just do:
    >
    > run_on_irqstack_if_needed(...);
    >
    > instead of checking everything themselves.

    I'll have a look tomorrow morning with brain awake.

    \
     
     \ /
      Last update: 2020-05-19 01:54    [W:2.056 / U:0.356 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site