NetBSD currently contains an older version of this driver, from Linux 5.6. Checking just now it comes to 2.2M loc. Running the same test on the Linux 6.4 source tree, does give me the reported 5M loc.
Maybe the figures you quote exclude things imported from elsewhere like gcc and llvm, I get a figure of 75M loc for base + kernel of NetBSD-10.
https://www.csoonline.com/article/564373/is-the-bsd-os-dying...