Linux: Rewriting the x86 Setup Code luglio 16, 2007Posted by linuxiano in kernel, Linux.
H. Peter Anvin submitted a series of patches rewriting the x86 setup code, “this patch set replaces the x86 setup code, which is currently all in assembly, with a version written in C, using the ‘.code16gcc’ feature of binutils (which has been present since at least 2001.)” He went on to explain why he did this, “the new code is vastly easier to read, and, I hope, debug. It should be noted that I found a fair number of minor bugs while going through this code, and have attempted to correct them.”
Linus Torvalds reacted favorably, “I can’t really argue against this on any sane grounds – not only is it removing more lines than it adds, but moving from mostly unreadable assembly to C seems a good idea.” He went on to note, “so let’s just get this merged. But the question is, do we put it in 2.6.23-rc1, or do we put it in -mm for a few weeks, which would imply waiting for the next merge window? Andrew?” Andrew Morton pointed out that the patches have been in -mm already for a couple of months, “this code has been in -mm since 11 May, as git-newsetup.patch. It has caused (for what it is) astonishingly few problems. Maybe a couple of build glitches and one runtime failure, all quickly fixed. I’d say it’s ready.” Linus agreed, “Ok. That makes it easy. I’ll just merge it.”