Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168299
b: refs/heads/master
c: 43758dd
h: refs/heads/master
i:
  168297: d8d18e1
  168295: 8a57fb2
v: v3
  • Loading branch information
Len Brown committed Nov 6, 2009
1 parent 3136745 commit 1047f57
Show file tree
Hide file tree
Showing 25 changed files with 817 additions and 358 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2839d396e3ae0891c1fdd87aa1cea218e6f5c4df
refs/heads/master: 43758dd88fdf1e5b3897c7a04dfae0afb8313dea
389 changes: 201 additions & 188 deletions trunk/Documentation/thermal/sysfs-api.txt

Large diffs are not rendered by default.

19 changes: 16 additions & 3 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ enum cfqq_state_flags {
CFQ_CFQQ_FLAG_slice_new, /* no requests dispatched in slice */
CFQ_CFQQ_FLAG_sync, /* synchronous queue */
CFQ_CFQQ_FLAG_coop, /* has done a coop jump of the queue */
CFQ_CFQQ_FLAG_coop_preempt, /* coop preempt */
};

#define CFQ_CFQQ_FNS(name) \
Expand All @@ -222,6 +223,7 @@ CFQ_CFQQ_FNS(prio_changed);
CFQ_CFQQ_FNS(slice_new);
CFQ_CFQQ_FNS(sync);
CFQ_CFQQ_FNS(coop);
CFQ_CFQQ_FNS(coop_preempt);
#undef CFQ_CFQQ_FNS

#define cfq_log_cfqq(cfqd, cfqq, fmt, args...) \
Expand Down Expand Up @@ -945,10 +947,13 @@ static struct cfq_queue *cfq_set_active_queue(struct cfq_data *cfqd,
{
if (!cfqq) {
cfqq = cfq_get_next_queue(cfqd);
if (cfqq)
if (cfqq && !cfq_cfqq_coop_preempt(cfqq))
cfq_clear_cfqq_coop(cfqq);
}

if (cfqq)
cfq_clear_cfqq_coop_preempt(cfqq);

__cfq_set_active_queue(cfqd, cfqq);
return cfqq;
}
Expand Down Expand Up @@ -2051,7 +2056,7 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq,
* it's a metadata request and the current queue is doing regular IO.
*/
if (rq_is_meta(rq) && !cfqq->meta_pending)
return false;
return true;

/*
* Allow an RT request to pre-empt an ongoing non-RT cfqq timeslice.
Expand All @@ -2066,8 +2071,16 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq,
* if this request is as-good as one we would expect from the
* current cfqq, let it preempt
*/
if (cfq_rq_close(cfqd, rq))
if (cfq_rq_close(cfqd, rq) && (!cfq_cfqq_coop(new_cfqq) ||
cfqd->busy_queues == 1)) {
/*
* Mark new queue coop_preempt, so its coop flag will not be
* cleared when new queue gets scheduled at the very first time
*/
cfq_mark_cfqq_coop_preempt(new_cfqq);
cfq_mark_cfqq_coop(new_cfqq);
return true;
}

return false;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/acpica/acconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@

#define ACPI_MAX_REFERENCE_COUNT 0x1000

/* Size of cached memory mapping for system memory operation region */
/* Default page size for use in mapping memory for operation regions */

#define ACPI_SYSMEM_REGION_WINDOW_SIZE 4096
#define ACPI_DEFAULT_PAGE_SIZE 4096 /* Must be power of 2 */

/* owner_id tracking. 8 entries allows for 255 owner_ids */

Expand Down
35 changes: 25 additions & 10 deletions trunk/drivers/acpi/acpica/exregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ acpi_ex_system_memory_space_handler(u32 function,
void *logical_addr_ptr = NULL;
struct acpi_mem_space_context *mem_info = region_context;
u32 length;
acpi_size window_size;
acpi_size map_length;
acpi_size page_boundary_map_length;
#ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
u32 remainder;
#endif
Expand Down Expand Up @@ -144,33 +145,47 @@ acpi_ex_system_memory_space_handler(u32 function,
}

/*
* Don't attempt to map memory beyond the end of the region, and
* constrain the maximum mapping size to something reasonable.
* Attempt to map from the requested address to the end of the region.
* However, we will never map more than one page, nor will we cross
* a page boundary.
*/
window_size = (acpi_size)
map_length = (acpi_size)
((mem_info->address + mem_info->length) - address);

if (window_size > ACPI_SYSMEM_REGION_WINDOW_SIZE) {
window_size = ACPI_SYSMEM_REGION_WINDOW_SIZE;
/*
* If mapping the entire remaining portion of the region will cross
* a page boundary, just map up to the page boundary, do not cross.
* On some systems, crossing a page boundary while mapping regions
* can cause warnings if the pages have different attributes
* due to resource management
*/
page_boundary_map_length =
ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address;

if (!page_boundary_map_length) {
page_boundary_map_length = ACPI_DEFAULT_PAGE_SIZE;
}

if (map_length > page_boundary_map_length) {
map_length = page_boundary_map_length;
}

/* Create a new mapping starting at the address given */

mem_info->mapped_logical_address =
acpi_os_map_memory((acpi_physical_address) address, window_size);
mem_info->mapped_logical_address = acpi_os_map_memory((acpi_physical_address) address, map_length);
if (!mem_info->mapped_logical_address) {
ACPI_ERROR((AE_INFO,
"Could not map memory at %8.8X%8.8X, size %X",
ACPI_FORMAT_NATIVE_UINT(address),
(u32) window_size));
(u32) map_length));
mem_info->mapped_length = 0;
return_ACPI_STATUS(AE_NO_MEMORY);
}

/* Save the physical address and mapping size */

mem_info->mapped_physical_address = address;
mem_info->mapped_length = window_size;
mem_info->mapped_length = map_length;
}

/*
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/acpi/power_meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,11 @@ static int set_acpi_trip(struct acpi_power_meter_resource *resource)
return -EINVAL;
}

return data;
/* _PTP returns 0 on success, nonzero otherwise */
if (data)
return -EINVAL;

return 0;
}

static ssize_t set_trip(struct device *dev, struct device_attribute *devattr,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ acpi_system_write_wakeup_device(struct file *file,
struct list_head *node, *next;
char strbuf[5];
char str[5] = "";
int len = count;
unsigned int len = count;
struct acpi_device *found_dev = NULL;

if (len > 4)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ static struct notifier_block acpi_cpu_notifier =
.notifier_call = acpi_cpu_soft_notify,
};

static int acpi_processor_add(struct acpi_device *device)
static int __cpuinit acpi_processor_add(struct acpi_device *device)
{
struct acpi_processor *pr = NULL;
int result = 0;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/acpi/processor_throttling.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,15 +1133,15 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
int result = 0;
struct acpi_processor_throttling *pthrottling;

if (!pr)
return -EINVAL;

ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n",
pr->throttling.address,
pr->throttling.duty_offset,
pr->throttling.duty_width));

if (!pr)
return -EINVAL;

/*
* Evaluate _PTC, _TSS and _TPC
* They must all be present or none of them can be used.
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ acpi_video_device_write_state(struct file *file,
u32 state = 0;


if (!dev || count + 1 > sizeof str)
if (!dev || count >= sizeof(str))
return -EINVAL;

if (copy_from_user(str, buffer, count))
Expand Down Expand Up @@ -1280,7 +1280,7 @@ acpi_video_device_write_brightness(struct file *file,
int i;


if (!dev || !dev->brightness || count + 1 > sizeof str)
if (!dev || !dev->brightness || count >= sizeof(str))
return -EINVAL;

if (copy_from_user(str, buffer, count))
Expand Down Expand Up @@ -1562,7 +1562,7 @@ acpi_video_bus_write_POST(struct file *file,
unsigned long long opt, options;


if (!video || count + 1 > sizeof str)
if (!video || count >= sizeof(str))
return -EINVAL;

status = acpi_video_bus_POST_options(video, &options);
Expand Down Expand Up @@ -1602,7 +1602,7 @@ acpi_video_bus_write_DOS(struct file *file,
unsigned long opt;


if (!video || count + 1 > sizeof str)
if (!video || count >= sizeof(str))
return -EINVAL;

if (copy_from_user(str, buffer, count))
Expand Down
40 changes: 35 additions & 5 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2718,6 +2718,30 @@ static bool ahci_sb600_enable_64bit(struct pci_dev *pdev)
},
.driver_data = "20071026", /* yyyymmdd */
},
/*
* All BIOS versions for the MSI K9A2 Platinum (MS-7376)
* support 64bit DMA.
*
* BIOS versions earlier than 1.5 had the Manufacturer DMI
* fields as "MICRO-STAR INTERANTIONAL CO.,LTD".
* This spelling mistake was fixed in BIOS version 1.5, so
* 1.5 and later have the Manufacturer as
* "MICRO-STAR INTERNATIONAL CO.,LTD".
* So try to match on DMI_BOARD_VENDOR of "MICRO-STAR INTER".
*
* BIOS versions earlier than 1.9 had a Board Product Name
* DMI field of "MS-7376". This was changed to be
* "K9A2 Platinum (MS-7376)" in version 1.9, but we can still
* match on DMI_BOARD_NAME of "MS-7376".
*/
{
.ident = "MSI K9A2 Platinum",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR,
"MICRO-STAR INTER"),
DMI_MATCH(DMI_BOARD_NAME, "MS-7376"),
},
},
{ }
};
const struct dmi_system_id *match;
Expand All @@ -2729,18 +2753,24 @@ static bool ahci_sb600_enable_64bit(struct pci_dev *pdev)
!match)
return false;

if (!match->driver_data)
goto enable_64bit;

dmi_get_date(DMI_BIOS_DATE, &year, &month, &date);
snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date);

if (strcmp(buf, match->driver_data) >= 0) {
dev_printk(KERN_WARNING, &pdev->dev, "%s: enabling 64bit DMA\n",
match->ident);
return true;
} else {
if (strcmp(buf, match->driver_data) >= 0)
goto enable_64bit;
else {
dev_printk(KERN_WARNING, &pdev->dev, "%s: BIOS too old, "
"forcing 32bit DMA, update BIOS\n", match->ident);
return false;
}

enable_64bit:
dev_printk(KERN_WARNING, &pdev->dev, "%s: enabling 64bit DMA\n",
match->ident);
return true;
}

static bool ahci_broken_system_poweroff(struct pci_dev *pdev)
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4919,10 +4919,11 @@ struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev)
*/
void ata_qc_free(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
struct ata_port *ap;
unsigned int tag;

WARN_ON_ONCE(qc == NULL); /* ata_qc_from_tag _might_ return NULL */
ap = qc->ap;

qc->flags = 0;
tag = qc->tag;
Expand All @@ -4934,11 +4935,13 @@ void ata_qc_free(struct ata_queued_cmd *qc)

void __ata_qc_complete(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
struct ata_link *link = qc->dev->link;
struct ata_port *ap;
struct ata_link *link;

WARN_ON_ONCE(qc == NULL); /* ata_qc_from_tag _might_ return NULL */
WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE));
ap = qc->ap;
link = qc->dev->link;

if (likely(qc->flags & ATA_QCFLAG_DMAMAP))
ata_sg_clean(qc);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/ata/sata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ static const struct pci_device_id svia_pci_tbl[] = {
{ PCI_VDEVICE(VIA, 0x7372), vt6420 },
{ PCI_VDEVICE(VIA, 0x5287), vt8251 }, /* 2 sata chnls (Master/Slave) */
{ PCI_VDEVICE(VIA, 0x9000), vt8251 },
{ PCI_VDEVICE(VIA, 0x9040), vt8251 },

{ } /* terminate list */
};
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,8 +1227,7 @@ static int i915_load_modeset_init(struct drm_device *dev,
goto out;

/* Try to set up FBC with a reasonable compressed buffer size */
if (IS_MOBILE(dev) && (IS_I9XX(dev) || IS_I965G(dev) || IS_GM45(dev)) &&
i915_powersave) {
if (I915_HAS_FBC(dev) && i915_powersave) {
int cfb_size;

/* Try to get an 8M buffer... */
Expand Down
Loading

0 comments on commit 1047f57

Please sign in to comment.