Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
aspm.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/pci.h>
#include <linux/pci_regs.h>
#include <linux/errno.h>
#include <linux/pm.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/delay.h>
#include <linux/pci-aspm.h>
#include "../pci.h"

Go to the source code of this file.

Data Structures

struct  aspm_latency
 
struct  pcie_link_state
 
struct  aspm_register_info
 

Macros

#define MODULE_PARAM_PREFIX   "pcie_aspm."
 
#define ASPM_STATE_L0S_UP   (1) /* Upstream direction L0s state */
 
#define ASPM_STATE_L0S_DW   (2) /* Downstream direction L0s state */
 
#define ASPM_STATE_L1   (4) /* L1 state */
 
#define ASPM_STATE_L0S   (ASPM_STATE_L0S_UP | ASPM_STATE_L0S_DW)
 
#define ASPM_STATE_ALL   (ASPM_STATE_L0S | ASPM_STATE_L1)
 
#define POLICY_DEFAULT   0 /* BIOS default setting */
 
#define POLICY_PERFORMANCE   1 /* high performance */
 
#define POLICY_POWERSAVE   2 /* high power saving */
 
#define LINK_RETRAIN_TIMEOUT   HZ
 

Functions

void pcie_aspm_init_link_state (struct pci_dev *pdev)
 
void pcie_aspm_exit_link_state (struct pci_dev *pdev)
 
void pcie_aspm_pm_state_change (struct pci_dev *pdev)
 
void pcie_aspm_powersave_config_link (struct pci_dev *pdev)
 
void pci_disable_link_state_locked (struct pci_dev *pdev, int state)
 
 EXPORT_SYMBOL (pci_disable_link_state_locked)
 
void pci_disable_link_state (struct pci_dev *pdev, int state)
 
 EXPORT_SYMBOL (pci_disable_link_state)
 
void pcie_clear_aspm (struct pci_bus *bus)
 
 module_param_call (policy, pcie_aspm_set_policy, pcie_aspm_get_policy, NULL, 0644)
 
 __setup ("pcie_aspm=", pcie_aspm_disable)
 
void pcie_no_aspm (void)
 
int pcie_aspm_enabled (void)
 
 EXPORT_SYMBOL (pcie_aspm_enabled)
 
bool pcie_aspm_support_enabled (void)
 
 EXPORT_SYMBOL (pcie_aspm_support_enabled)
 

Macro Definition Documentation

#define ASPM_STATE_ALL   (ASPM_STATE_L0S | ASPM_STATE_L1)

Definition at line 34 of file aspm.c.

#define ASPM_STATE_L0S   (ASPM_STATE_L0S_UP | ASPM_STATE_L0S_DW)

Definition at line 33 of file aspm.c.

#define ASPM_STATE_L0S_DW   (2) /* Downstream direction L0s state */

Definition at line 31 of file aspm.c.

#define ASPM_STATE_L0S_UP   (1) /* Upstream direction L0s state */

Definition at line 30 of file aspm.c.

#define ASPM_STATE_L1   (4) /* L1 state */

Definition at line 32 of file aspm.c.

#define LINK_RETRAIN_TIMEOUT   HZ

Definition at line 94 of file aspm.c.

#define MODULE_PARAM_PREFIX   "pcie_aspm."

Definition at line 27 of file aspm.c.

#define POLICY_DEFAULT   0 /* BIOS default setting */

Definition at line 76 of file aspm.c.

#define POLICY_PERFORMANCE   1 /* high performance */

Definition at line 77 of file aspm.c.

#define POLICY_POWERSAVE   2 /* high power saving */

Definition at line 78 of file aspm.c.

Function Documentation

__setup ( )
EXPORT_SYMBOL ( pci_disable_link_state_locked  )
EXPORT_SYMBOL ( pci_disable_link_state  )
EXPORT_SYMBOL ( pcie_aspm_enabled  )
EXPORT_SYMBOL ( pcie_aspm_support_enabled  )
module_param_call ( policy  ,
pcie_aspm_set_policy  ,
pcie_aspm_get_policy  ,
NULL  ,
0644   
)
void pci_disable_link_state ( struct pci_dev pdev,
int  state 
)

Definition at line 766 of file aspm.c.

void pci_disable_link_state_locked ( struct pci_dev pdev,
int  state 
)

Definition at line 760 of file aspm.c.

int pcie_aspm_enabled ( void  )

pcie_aspm_enabled - is PCIe ASPM enabled?

Returns true if ASPM has not been disabled by the command-line option pcie_aspm=off.

Definition at line 977 of file aspm.c.

void pcie_aspm_exit_link_state ( struct pci_dev pdev)

Definition at line 634 of file aspm.c.

void pcie_aspm_init_link_state ( struct pci_dev pdev)

Definition at line 556 of file aspm.c.

void pcie_aspm_pm_state_change ( struct pci_dev pdev)

Definition at line 676 of file aspm.c.

void pcie_aspm_powersave_config_link ( struct pci_dev pdev)

Definition at line 697 of file aspm.c.

bool pcie_aspm_support_enabled ( void  )

Definition at line 983 of file aspm.c.

void pcie_clear_aspm ( struct pci_bus bus)

Definition at line 772 of file aspm.c.

void pcie_no_aspm ( void  )

Definition at line 957 of file aspm.c.