This linked list implementation is partially based on kernel code. So it should be quite stable
How about just copying the file?
I've used the linux kernel list implementation elsewhere too and it worked just fine with only minor tweaks (remove some likely()/unlikely() macros IIRC).
Right, in "take-2" Kevin has suggested very similar. It will be done as a separate patch, because the changes are not just about pciinit.c, they also simplify pmm.c and stack.c a bit. In this patch I'm submitting only few necessary functions for list operations.