Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Note the presence of io_wait() calls, on older machines its necessary to give the PIC some time to react to commands as they might not be processed quickly
I'm wondering, do I need to perform IO wait when remapping IRQs on x86-64?
Just saying "older machines" is vague. Perhaps we could clarify what it means in this context?
I think I'll do what seems correct to me and wait after setting the masks too.
To me it seems that the wiki example tries to be general in nature - a function to remap IRQs at any time and restore the masks to their previous state, while everyone probably just remaps IRQs once at boot time, and sets the masks to known values once or twice during the run of the kernel. I'll try to simplify the masking in the wiki.