提交 8806c0db 编写于 作者: J Jiri Denemark

cpu: Unify CPUID data structures

So far, CPUID data were stored in two different data structures. First
of them was a structure allowing direct access for CPUID data according
to function number and the second was a plain array of struct
cpuX86cpuid. This was a silly design which resulted in converting data
from one type to the other and back again or implementing similar
functionality for both data structures.

The patch leaves only the direct access structure. This makes the code
both smaller and more maintainable since operations on different objects
can use common low-level operations.

All 57 tests for cpu subsystem still pass after this rewrite.
上级 4262ff45
此差异已折叠。
......@@ -38,9 +38,9 @@ struct cpuX86cpuid {
# define CPUX86_EXTENDED 0x80000000
struct cpuX86Data {
int basic_len;
size_t basic_len;
struct cpuX86cpuid *basic;
int extended_len;
size_t extended_len;
struct cpuX86cpuid *extended;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册