mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
Merge branches 'bugzilla-13121+', 'bugzilla-13233', 'redhat-bugzilla-500311', 'pci-bind-oops', 'misc-2.6.30' and 'i7300_idle' into release
This commit is contained in:
commit
6afec830ac
@ -693,8 +693,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
|||||||
if (perf->control_register.space_id == ACPI_ADR_SPACE_FIXED_HARDWARE &&
|
if (perf->control_register.space_id == ACPI_ADR_SPACE_FIXED_HARDWARE &&
|
||||||
policy->cpuinfo.transition_latency > 20 * 1000) {
|
policy->cpuinfo.transition_latency > 20 * 1000) {
|
||||||
policy->cpuinfo.transition_latency = 20 * 1000;
|
policy->cpuinfo.transition_latency = 20 * 1000;
|
||||||
printk_once(KERN_INFO "Capping off P-state tranision"
|
printk_once(KERN_INFO
|
||||||
" latency at 20 uS\n");
|
"P-state transition latency capped at 20 uS\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* table init */
|
/* table init */
|
||||||
|
@ -116,9 +116,6 @@ int acpi_pci_bind(struct acpi_device *device)
|
|||||||
struct acpi_pci_data *pdata;
|
struct acpi_pci_data *pdata;
|
||||||
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
|
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
|
||||||
acpi_handle handle;
|
acpi_handle handle;
|
||||||
struct pci_dev *dev;
|
|
||||||
struct pci_bus *bus;
|
|
||||||
|
|
||||||
|
|
||||||
if (!device || !device->parent)
|
if (!device || !device->parent)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -176,20 +173,9 @@ int acpi_pci_bind(struct acpi_device *device)
|
|||||||
* Locate matching device in PCI namespace. If it doesn't exist
|
* Locate matching device in PCI namespace. If it doesn't exist
|
||||||
* this typically means that the device isn't currently inserted
|
* this typically means that the device isn't currently inserted
|
||||||
* (e.g. docking station, port replicator, etc.).
|
* (e.g. docking station, port replicator, etc.).
|
||||||
* We cannot simply search the global pci device list, since
|
|
||||||
* PCI devices are added to the global pci list when the root
|
|
||||||
* bridge start ops are run, which may not have happened yet.
|
|
||||||
*/
|
*/
|
||||||
bus = pci_find_bus(data->id.segment, data->id.bus);
|
data->dev = pci_get_slot(pdata->bus,
|
||||||
if (bus) {
|
PCI_DEVFN(data->id.device, data->id.function));
|
||||||
list_for_each_entry(dev, &bus->devices, bus_list) {
|
|
||||||
if (dev->devfn == PCI_DEVFN(data->id.device,
|
|
||||||
data->id.function)) {
|
|
||||||
data->dev = dev;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!data->dev) {
|
if (!data->dev) {
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
||||||
"Device %04x:%02x:%02x.%d not present in PCI namespace\n",
|
"Device %04x:%02x:%02x.%d not present in PCI namespace\n",
|
||||||
@ -259,9 +245,10 @@ int acpi_pci_bind(struct acpi_device *device)
|
|||||||
|
|
||||||
end:
|
end:
|
||||||
kfree(buffer.pointer);
|
kfree(buffer.pointer);
|
||||||
if (result)
|
if (result) {
|
||||||
|
pci_dev_put(data->dev);
|
||||||
kfree(data);
|
kfree(data);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,6 +290,7 @@ static int acpi_pci_unbind(struct acpi_device *device)
|
|||||||
if (data->dev->subordinate) {
|
if (data->dev->subordinate) {
|
||||||
acpi_pci_irq_del_prt(data->id.segment, data->bus->number);
|
acpi_pci_irq_del_prt(data->id.segment, data->bus->number);
|
||||||
}
|
}
|
||||||
|
pci_dev_put(data->dev);
|
||||||
kfree(data);
|
kfree(data);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
@ -148,6 +148,9 @@ static void acpi_timer_check_state(int state, struct acpi_processor *pr,
|
|||||||
if (cpu_has(&cpu_data(pr->id), X86_FEATURE_ARAT))
|
if (cpu_has(&cpu_data(pr->id), X86_FEATURE_ARAT))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (boot_cpu_has(X86_FEATURE_AMDC1E))
|
||||||
|
type = ACPI_STATE_C1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check, if one of the previous states already marked the lapic
|
* Check, if one of the previous states already marked the lapic
|
||||||
* unstable
|
* unstable
|
||||||
@ -611,6 +614,7 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
|
|||||||
switch (cx->type) {
|
switch (cx->type) {
|
||||||
case ACPI_STATE_C1:
|
case ACPI_STATE_C1:
|
||||||
cx->valid = 1;
|
cx->valid = 1;
|
||||||
|
acpi_timer_check_state(i, pr, cx);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_STATE_C2:
|
case ACPI_STATE_C2:
|
||||||
@ -830,11 +834,12 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,
|
|||||||
|
|
||||||
/* Do not access any ACPI IO ports in suspend path */
|
/* Do not access any ACPI IO ports in suspend path */
|
||||||
if (acpi_idle_suspend) {
|
if (acpi_idle_suspend) {
|
||||||
acpi_safe_halt();
|
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
|
cpu_relax();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
acpi_state_timer_broadcast(pr, cx, 1);
|
||||||
kt1 = ktime_get_real();
|
kt1 = ktime_get_real();
|
||||||
acpi_idle_do_entry(cx);
|
acpi_idle_do_entry(cx);
|
||||||
kt2 = ktime_get_real();
|
kt2 = ktime_get_real();
|
||||||
@ -842,6 +847,7 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,
|
|||||||
|
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
cx->usage++;
|
cx->usage++;
|
||||||
|
acpi_state_timer_broadcast(pr, cx, 0);
|
||||||
|
|
||||||
return idle_time;
|
return idle_time;
|
||||||
}
|
}
|
||||||
|
@ -309,9 +309,15 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
|
|||||||
(u32) px->bus_master_latency,
|
(u32) px->bus_master_latency,
|
||||||
(u32) px->control, (u32) px->status));
|
(u32) px->control, (u32) px->status));
|
||||||
|
|
||||||
if (!px->core_frequency) {
|
/*
|
||||||
printk(KERN_ERR PREFIX
|
* Check that ACPI's u64 MHz will be valid as u32 KHz in cpufreq
|
||||||
"Invalid _PSS data: freq is zero\n");
|
*/
|
||||||
|
if (!px->core_frequency ||
|
||||||
|
((u32)(px->core_frequency * 1000) !=
|
||||||
|
(px->core_frequency * 1000))) {
|
||||||
|
printk(KERN_ERR FW_BUG PREFIX
|
||||||
|
"Invalid BIOS _PSS frequency: 0x%llx MHz\n",
|
||||||
|
px->core_frequency);
|
||||||
result = -EFAULT;
|
result = -EFAULT;
|
||||||
kfree(pr->performance->states);
|
kfree(pr->performance->states);
|
||||||
goto end;
|
goto end;
|
||||||
|
@ -840,7 +840,7 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr)
|
|||||||
state = acpi_get_throttling_state(pr, value);
|
state = acpi_get_throttling_state(pr, value);
|
||||||
if (state == -1) {
|
if (state == -1) {
|
||||||
ACPI_WARNING((AE_INFO,
|
ACPI_WARNING((AE_INFO,
|
||||||
"Invalid throttling state, reset\n"));
|
"Invalid throttling state, reset"));
|
||||||
state = 0;
|
state = 0;
|
||||||
ret = acpi_processor_set_throttling(pr, state);
|
ret = acpi_processor_set_throttling(pr, state);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -2350,7 +2350,7 @@ static int __init acpi_video_init(void)
|
|||||||
return acpi_video_register();
|
return acpi_video_register();
|
||||||
}
|
}
|
||||||
|
|
||||||
void __exit acpi_video_exit(void)
|
void acpi_video_exit(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
acpi_bus_unregister_driver(&acpi_video_bus);
|
acpi_bus_unregister_driver(&acpi_video_bus);
|
||||||
|
@ -173,7 +173,7 @@ static int ioat_dma_enumerate_channels(struct ioatdma_device *device)
|
|||||||
xfercap = (xfercap_scale == 0 ? -1 : (1UL << xfercap_scale));
|
xfercap = (xfercap_scale == 0 ? -1 : (1UL << xfercap_scale));
|
||||||
|
|
||||||
#ifdef CONFIG_I7300_IDLE_IOAT_CHANNEL
|
#ifdef CONFIG_I7300_IDLE_IOAT_CHANNEL
|
||||||
if (i7300_idle_platform_probe(NULL, NULL) == 0) {
|
if (i7300_idle_platform_probe(NULL, NULL, 1) == 0) {
|
||||||
device->common.chancnt--;
|
device->common.chancnt--;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -67,12 +67,18 @@ config DRM_I830
|
|||||||
will load the correct one.
|
will load the correct one.
|
||||||
|
|
||||||
config DRM_I915
|
config DRM_I915
|
||||||
|
tristate "i915 driver"
|
||||||
select FB_CFB_FILLRECT
|
select FB_CFB_FILLRECT
|
||||||
select FB_CFB_COPYAREA
|
select FB_CFB_COPYAREA
|
||||||
select FB_CFB_IMAGEBLIT
|
select FB_CFB_IMAGEBLIT
|
||||||
select FB
|
select FB
|
||||||
select FRAMEBUFFER_CONSOLE if !EMBEDDED
|
select FRAMEBUFFER_CONSOLE if !EMBEDDED
|
||||||
tristate "i915 driver"
|
# i915 depends on ACPI_VIDEO when ACPI is enabled
|
||||||
|
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
|
||||||
|
select VIDEO_OUTPUT_CONTROL if ACPI
|
||||||
|
select BACKLIGHT_CLASS_DEVICE if ACPI
|
||||||
|
select INPUT if ACPI
|
||||||
|
select ACPI_VIDEO if ACPI
|
||||||
help
|
help
|
||||||
Choose this option if you have a system that has Intel 830M, 845G,
|
Choose this option if you have a system that has Intel 830M, 845G,
|
||||||
852GM, 855GM 865G or 915G integrated graphics. If M is selected, the
|
852GM, 855GM 865G or 915G integrated graphics. If M is selected, the
|
||||||
@ -84,12 +90,6 @@ config DRM_I915
|
|||||||
config DRM_I915_KMS
|
config DRM_I915_KMS
|
||||||
bool "Enable modesetting on intel by default"
|
bool "Enable modesetting on intel by default"
|
||||||
depends on DRM_I915
|
depends on DRM_I915
|
||||||
# i915 KMS depends on ACPI_VIDEO when ACPI is enabled
|
|
||||||
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
|
|
||||||
select VIDEO_OUTPUT_CONTROL if ACPI
|
|
||||||
select BACKLIGHT_CLASS_DEVICE if ACPI
|
|
||||||
select INPUT if ACPI
|
|
||||||
select ACPI_VIDEO if ACPI
|
|
||||||
help
|
help
|
||||||
Choose this option if you want kernel modesetting enabled by default,
|
Choose this option if you want kernel modesetting enabled by default,
|
||||||
and you have a new enough userspace to support this. Running old
|
and you have a new enough userspace to support this. Running old
|
||||||
|
@ -41,6 +41,10 @@ static int debug;
|
|||||||
module_param_named(debug, debug, uint, 0644);
|
module_param_named(debug, debug, uint, 0644);
|
||||||
MODULE_PARM_DESC(debug, "Enable debug printks in this driver");
|
MODULE_PARM_DESC(debug, "Enable debug printks in this driver");
|
||||||
|
|
||||||
|
static int forceload;
|
||||||
|
module_param_named(forceload, forceload, uint, 0644);
|
||||||
|
MODULE_PARM_DESC(debug, "Enable driver testing on unvalidated i5000");
|
||||||
|
|
||||||
#define dprintk(fmt, arg...) \
|
#define dprintk(fmt, arg...) \
|
||||||
do { if (debug) printk(KERN_INFO I7300_PRINT fmt, ##arg); } while (0)
|
do { if (debug) printk(KERN_INFO I7300_PRINT fmt, ##arg); } while (0)
|
||||||
|
|
||||||
@ -552,7 +556,7 @@ static int __init i7300_idle_init(void)
|
|||||||
cpus_clear(idle_cpumask);
|
cpus_clear(idle_cpumask);
|
||||||
total_us = 0;
|
total_us = 0;
|
||||||
|
|
||||||
if (i7300_idle_platform_probe(&fbd_dev, &ioat_dev))
|
if (i7300_idle_platform_probe(&fbd_dev, &ioat_dev, forceload))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if (i7300_idle_thrt_save())
|
if (i7300_idle_thrt_save())
|
||||||
|
@ -16,35 +16,33 @@
|
|||||||
struct fbd_ioat {
|
struct fbd_ioat {
|
||||||
unsigned int vendor;
|
unsigned int vendor;
|
||||||
unsigned int ioat_dev;
|
unsigned int ioat_dev;
|
||||||
|
unsigned int enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The i5000 chip-set has the same hooks as the i7300
|
* The i5000 chip-set has the same hooks as the i7300
|
||||||
* but support is disabled by default because this driver
|
* but it is not enabled by default and must be manually
|
||||||
* has not been validated on that platform.
|
* manually enabled with "forceload=1" because it is
|
||||||
|
* only lightly validated.
|
||||||
*/
|
*/
|
||||||
#define SUPPORT_I5000 0
|
|
||||||
|
|
||||||
static const struct fbd_ioat fbd_ioat_list[] = {
|
static const struct fbd_ioat fbd_ioat_list[] = {
|
||||||
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT_CNB},
|
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT_CNB, 1},
|
||||||
#if SUPPORT_I5000
|
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT, 0},
|
||||||
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT},
|
|
||||||
#endif
|
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* table of devices that work with this driver */
|
/* table of devices that work with this driver */
|
||||||
static const struct pci_device_id pci_tbl[] = {
|
static const struct pci_device_id pci_tbl[] = {
|
||||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_FBD_CNB) },
|
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_FBD_CNB) },
|
||||||
#if SUPPORT_I5000
|
|
||||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
|
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_5000_ERR) },
|
||||||
#endif
|
|
||||||
{ } /* Terminating entry */
|
{ } /* Terminating entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Check for known platforms with I/O-AT */
|
/* Check for known platforms with I/O-AT */
|
||||||
static inline int i7300_idle_platform_probe(struct pci_dev **fbd_dev,
|
static inline int i7300_idle_platform_probe(struct pci_dev **fbd_dev,
|
||||||
struct pci_dev **ioat_dev)
|
struct pci_dev **ioat_dev,
|
||||||
|
int enable_all)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct pci_dev *memdev, *dmadev;
|
struct pci_dev *memdev, *dmadev;
|
||||||
@ -69,6 +67,8 @@ static inline int i7300_idle_platform_probe(struct pci_dev **fbd_dev,
|
|||||||
for (i = 0; fbd_ioat_list[i].vendor != 0; i++) {
|
for (i = 0; fbd_ioat_list[i].vendor != 0; i++) {
|
||||||
if (dmadev->vendor == fbd_ioat_list[i].vendor &&
|
if (dmadev->vendor == fbd_ioat_list[i].vendor &&
|
||||||
dmadev->device == fbd_ioat_list[i].ioat_dev) {
|
dmadev->device == fbd_ioat_list[i].ioat_dev) {
|
||||||
|
if (!(fbd_ioat_list[i].enabled || enable_all))
|
||||||
|
continue;
|
||||||
if (fbd_dev)
|
if (fbd_dev)
|
||||||
*fbd_dev = memdev;
|
*fbd_dev = memdev;
|
||||||
if (ioat_dev)
|
if (ioat_dev)
|
||||||
|
Loading…
Reference in New Issue
Block a user