pmac64-cpufreq.c (cb54b53adae70701bdd77d848cea4b9b39b61cf9) | pmac64-cpufreq.c (d5b73cd870e2b049ef566aec2791dbf5fd26a7ec) |
---|---|
1/* 2 * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> 3 * and Markus Demleitner <msdemlei@cl.uni-heidelberg.de> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 as 7 * published by the Free Software Foundation. 8 * --- 433 unchanged lines hidden (view full) --- 442 if (use_volts_smu) { 443 const struct smu_sdbp_header *shdr; 444 445 /* Look for the FVT table */ 446 shdr = smu_get_sdb_partition(SMU_SDB_FVT_ID, NULL); 447 if (!shdr) 448 goto bail_noprops; 449 g5_fvt_table = (struct smu_sdbp_fvt *)&shdr[1]; | 1/* 2 * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> 3 * and Markus Demleitner <msdemlei@cl.uni-heidelberg.de> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 as 7 * published by the Free Software Foundation. 8 * --- 433 unchanged lines hidden (view full) --- 442 if (use_volts_smu) { 443 const struct smu_sdbp_header *shdr; 444 445 /* Look for the FVT table */ 446 shdr = smu_get_sdb_partition(SMU_SDB_FVT_ID, NULL); 447 if (!shdr) 448 goto bail_noprops; 449 g5_fvt_table = (struct smu_sdbp_fvt *)&shdr[1]; |
450 ssize = (shdr->len * sizeof(u32)) - 451 sizeof(struct smu_sdbp_header); 452 g5_fvt_count = ssize / sizeof(struct smu_sdbp_fvt); | 450 ssize = (shdr->len * sizeof(u32)) - sizeof(*shdr); 451 g5_fvt_count = ssize / sizeof(*g5_fvt_table); |
453 g5_fvt_cur = 0; 454 455 /* Sanity checking */ 456 if (g5_fvt_count < 1 || g5_pmode_max < 1) 457 goto bail_noprops; 458 459 g5_switch_volt = g5_smu_switch_volt; 460 volt_method = "SMU"; --- 286 unchanged lines hidden --- | 452 g5_fvt_cur = 0; 453 454 /* Sanity checking */ 455 if (g5_fvt_count < 1 || g5_pmode_max < 1) 456 goto bail_noprops; 457 458 g5_switch_volt = g5_smu_switch_volt; 459 volt_method = "SMU"; --- 286 unchanged lines hidden --- |