The complete story of the in-kernel sloppy GPIO logic analyzer

You know the rules, right? You should not implement a logic analyzer in software because equidistant sampling points cannot be guaranteed. You should also not disable interrupts in your kernel code, and if you really need to, it should be as short as possible. And...