Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar: "Misc fixes: - fix an Intel/MID boot crash/hang bug - fix a cache topology mis-parsing bug on certain AMD CPUs - fix a virtualization firmware bug by adding a check+quirk workaround on the kernel side" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Deal with broken firmware (VMWare/XEN) x86/cpu/AMD: Fix cpu_llc_id for AMD Fam17h systems x86/platform/intel-mid: Retrofit pci_platform_pm_ops ->get_state hook
This commit is contained in:
@@ -272,6 +272,25 @@ int intel_mid_pci_set_power_state(struct pci_dev *pdev, pci_power_t state)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(intel_mid_pci_set_power_state);
|
||||
|
||||
pci_power_t intel_mid_pci_get_power_state(struct pci_dev *pdev)
|
||||
{
|
||||
struct mid_pwr *pwr = midpwr;
|
||||
int id, reg, bit;
|
||||
u32 power;
|
||||
|
||||
if (!pwr || !pwr->available)
|
||||
return PCI_UNKNOWN;
|
||||
|
||||
id = intel_mid_pwr_get_lss_id(pdev);
|
||||
if (id < 0)
|
||||
return PCI_UNKNOWN;
|
||||
|
||||
reg = (id * LSS_PWS_BITS) / 32;
|
||||
bit = (id * LSS_PWS_BITS) % 32;
|
||||
power = mid_pwr_get_state(pwr, reg);
|
||||
return (__force pci_power_t)((power >> bit) & 3);
|
||||
}
|
||||
|
||||
void intel_mid_pwr_power_off(void)
|
||||
{
|
||||
struct mid_pwr *pwr = midpwr;
|
||||
|
Reference in New Issue
Block a user