Then I used vim/cscope to search symbols/text for native_wrmsr_safe_regs, but cannot find anything about it. Google it gave the same result. After some time, I used gitk to check the log of a related c file and found out these two functions are defined in an assembly file, by using macros.
Then I happily copied that assembly file (msr-reg.S) to the old kernel source. But this time I got some weird errors as "invalid character '(' in mnemonic". Then I google for this for some time and noticed that there is some definitions in "link/linkage.h". For example, ENTRY used in the msr-reg.S is defined there.
Finally I found out "ENDPROC" used in msr-reg.S is not in my version of linkage.h. After copy that definition, the compiler does not complain about these functions again.
No comments:
Post a Comment