1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
3 * Copyright(c) 2015-2017 Intel Corporation.
11 extern uint aspm_mode
;
14 ASPM_MODE_DISABLED
= 0, /* ASPM always disabled, performance mode */
15 ASPM_MODE_ENABLED
= 1, /* ASPM always enabled, power saving mode */
16 ASPM_MODE_DYNAMIC
= 2, /* ASPM enabled/disabled dynamically */
19 void aspm_init(struct hfi1_devdata
*dd
);
20 void aspm_exit(struct hfi1_devdata
*dd
);
21 void aspm_hw_disable_l1(struct hfi1_devdata
*dd
);
22 void __aspm_ctx_disable(struct hfi1_ctxtdata
*rcd
);
23 void aspm_disable_all(struct hfi1_devdata
*dd
);
24 void aspm_enable_all(struct hfi1_devdata
*dd
);
26 static inline void aspm_ctx_disable(struct hfi1_ctxtdata
*rcd
)
28 /* Quickest exit for minimum impact */
29 if (likely(!rcd
->aspm_intr_supported
))
32 __aspm_ctx_disable(rcd
);