mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
x86, amd-nb: Cleanup AMD northbridge caching code
Support more than just the "Misc Control" part of the northbridges. Support more flags by turning "gart_supported" into a single bit flag that is stored in a flags member. Clean up related code by using a set of functions (amd_nb_num(), amd_nb_has_feature() and node_to_amd_nb()) instead of accessing the NB data structures directly. Reorder the initialization code and put the GART flush words caching in a separate function. Signed-off-by: Hans Rosenfeld <[email protected]> Signed-off-by: Borislav Petkov <[email protected]>
This commit is contained in:
parent
eec1d4fa00
commit
9653a5c76c
6 changed files with 118 additions and 88 deletions
|
|
@ -2917,7 +2917,7 @@ static int __init amd64_edac_init(void)
|
|||
|
||||
opstate_init();
|
||||
|
||||
if (cache_amd_northbridges() < 0)
|
||||
if (amd_cache_northbridges() < 0)
|
||||
goto err_ret;
|
||||
|
||||
msrs = msrs_alloc();
|
||||
|
|
@ -2934,7 +2934,7 @@ static int __init amd64_edac_init(void)
|
|||
* to finish initialization of the MC instances.
|
||||
*/
|
||||
err = -ENODEV;
|
||||
for (nb = 0; nb < amd_northbridges.num; nb++) {
|
||||
for (nb = 0; nb < amd_nb_num(); nb++) {
|
||||
if (!pvt_lookup[nb])
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue