|
@@ -31,7 +31,7 @@ static DEFINE_MUTEX(pci_mmcfg_lock);
|
|
|
|
|
|
LIST_HEAD(pci_mmcfg_list);
|
|
|
|
|
|
-static __init void pci_mmconfig_remove(struct pci_mmcfg_region *cfg)
|
|
|
+static void __init pci_mmconfig_remove(struct pci_mmcfg_region *cfg)
|
|
|
{
|
|
|
if (cfg->res.parent)
|
|
|
release_resource(&cfg->res);
|
|
@@ -39,7 +39,7 @@ static __init void pci_mmconfig_remove(struct pci_mmcfg_region *cfg)
|
|
|
kfree(cfg);
|
|
|
}
|
|
|
|
|
|
-static __init void free_all_mmcfg(void)
|
|
|
+static void __init free_all_mmcfg(void)
|
|
|
{
|
|
|
struct pci_mmcfg_region *cfg, *tmp;
|
|
|
|
|
@@ -93,7 +93,7 @@ static struct pci_mmcfg_region *pci_mmconfig_alloc(int segment, int start,
|
|
|
return new;
|
|
|
}
|
|
|
|
|
|
-static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start,
|
|
|
+static struct pci_mmcfg_region *__init pci_mmconfig_add(int segment, int start,
|
|
|
int end, u64 addr)
|
|
|
{
|
|
|
struct pci_mmcfg_region *new;
|
|
@@ -125,7 +125,7 @@ struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus)
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
-static const char __init *pci_mmcfg_e7520(void)
|
|
|
+static const char *__init pci_mmcfg_e7520(void)
|
|
|
{
|
|
|
u32 win;
|
|
|
raw_pci_ops->read(0, 0, PCI_DEVFN(0, 0), 0xce, 2, &win);
|
|
@@ -140,7 +140,7 @@ static const char __init *pci_mmcfg_e7520(void)
|
|
|
return "Intel Corporation E7520 Memory Controller Hub";
|
|
|
}
|
|
|
|
|
|
-static const char __init *pci_mmcfg_intel_945(void)
|
|
|
+static const char *__init pci_mmcfg_intel_945(void)
|
|
|
{
|
|
|
u32 pciexbar, mask = 0, len = 0;
|
|
|
|
|
@@ -184,7 +184,7 @@ static const char __init *pci_mmcfg_intel_945(void)
|
|
|
return "Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub";
|
|
|
}
|
|
|
|
|
|
-static const char __init *pci_mmcfg_amd_fam10h(void)
|
|
|
+static const char *__init pci_mmcfg_amd_fam10h(void)
|
|
|
{
|
|
|
u32 low, high, address;
|
|
|
u64 base, msr;
|
|
@@ -235,21 +235,25 @@ static const char __init *pci_mmcfg_amd_fam10h(void)
|
|
|
}
|
|
|
|
|
|
static bool __initdata mcp55_checked;
|
|
|
-static const char __init *pci_mmcfg_nvidia_mcp55(void)
|
|
|
+static const char *__init pci_mmcfg_nvidia_mcp55(void)
|
|
|
{
|
|
|
int bus;
|
|
|
int mcp55_mmconf_found = 0;
|
|
|
|
|
|
- static const u32 extcfg_regnum = 0x90;
|
|
|
- static const u32 extcfg_regsize = 4;
|
|
|
- static const u32 extcfg_enable_mask = 1<<31;
|
|
|
- static const u32 extcfg_start_mask = 0xff<<16;
|
|
|
- static const int extcfg_start_shift = 16;
|
|
|
- static const u32 extcfg_size_mask = 0x3<<28;
|
|
|
- static const int extcfg_size_shift = 28;
|
|
|
- static const int extcfg_sizebus[] = {0x100, 0x80, 0x40, 0x20};
|
|
|
- static const u32 extcfg_base_mask[] = {0x7ff8, 0x7ffc, 0x7ffe, 0x7fff};
|
|
|
- static const int extcfg_base_lshift = 25;
|
|
|
+ static const u32 extcfg_regnum __initconst = 0x90;
|
|
|
+ static const u32 extcfg_regsize __initconst = 4;
|
|
|
+ static const u32 extcfg_enable_mask __initconst = 1 << 31;
|
|
|
+ static const u32 extcfg_start_mask __initconst = 0xff << 16;
|
|
|
+ static const int extcfg_start_shift __initconst = 16;
|
|
|
+ static const u32 extcfg_size_mask __initconst = 0x3 << 28;
|
|
|
+ static const int extcfg_size_shift __initconst = 28;
|
|
|
+ static const int extcfg_sizebus[] __initconst = {
|
|
|
+ 0x100, 0x80, 0x40, 0x20
|
|
|
+ };
|
|
|
+ static const u32 extcfg_base_mask[] __initconst = {
|
|
|
+ 0x7ff8, 0x7ffc, 0x7ffe, 0x7fff
|
|
|
+ };
|
|
|
+ static const int extcfg_base_lshift __initconst = 25;
|
|
|
|
|
|
/*
|
|
|
* do check if amd fam10h already took over
|
|
@@ -302,7 +306,7 @@ struct pci_mmcfg_hostbridge_probe {
|
|
|
const char *(*probe)(void);
|
|
|
};
|
|
|
|
|
|
-static struct pci_mmcfg_hostbridge_probe pci_mmcfg_probes[] __initdata = {
|
|
|
+static const struct pci_mmcfg_hostbridge_probe pci_mmcfg_probes[] __initconst = {
|
|
|
{ 0, PCI_DEVFN(0, 0), PCI_VENDOR_ID_INTEL,
|
|
|
PCI_DEVICE_ID_INTEL_E7520_MCH, pci_mmcfg_e7520 },
|
|
|
{ 0, PCI_DEVFN(0, 0), PCI_VENDOR_ID_INTEL,
|