Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85568
b: refs/heads/master
c: b077fba
h: refs/heads/master
v: v3
  • Loading branch information
Venkatesh Pallipadi authored and Len Brown committed Feb 14, 2008
1 parent 6f863b6 commit af5c0c2
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 199 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: fe8e288a63f2f3c51c288500282d0eb5cd26a534
refs/heads/master: b077fbada161479d9a32a7730d2822d5e737b306
2 changes: 0 additions & 2 deletions trunk/Documentation/00-INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ cpu-hotplug.txt
- document describing CPU hotplug support in the Linux kernel.
cpu-load.txt
- document describing how CPU load statistics are collected.
cpuidle/
- info on CPU_IDLE, CPU idle state management subsystem.
cpusets.txt
- documents the cpusets feature; assign CPUs and Mem to a set of tasks.
cputopology.txt
Expand Down
23 changes: 0 additions & 23 deletions trunk/Documentation/cpuidle/core.txt

This file was deleted.

31 changes: 0 additions & 31 deletions trunk/Documentation/cpuidle/driver.txt

This file was deleted.

29 changes: 0 additions & 29 deletions trunk/Documentation/cpuidle/governor.txt

This file was deleted.

79 changes: 0 additions & 79 deletions trunk/Documentation/cpuidle/sysfs.txt

This file was deleted.

2 changes: 0 additions & 2 deletions trunk/arch/x86/kernel/acpi/cstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
printk(KERN_DEBUG "Monitor-Mwait will be used to enter C-%d "
"state\n", cx->type);
}
snprintf(cx->desc, ACPI_CX_DESC_LEN, "ACPI FFH INTEL MWAIT 0x%x",
cx->address);

out:
set_cpus_allowed(current, saved_mask);
Expand Down
19 changes: 8 additions & 11 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,16 +945,11 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
* Otherwise, ignore this info and continue.
*/
cx.entry_method = ACPI_CSTATE_HALT;
snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI HLT");
} else {
continue;
}
} else {
snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI IOPORT 0x%x",
cx.address);
}


obj = &(element->package.elements[2]);
if (obj->type != ACPI_TYPE_INTEGER)
continue;
Expand Down Expand Up @@ -1425,6 +1420,14 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,
return 0;

local_irq_disable();

/* Do not access any ACPI IO ports in suspend path */
if (acpi_idle_suspend) {
acpi_safe_halt();
local_irq_enable();
return 0;
}

if (pr->flags.bm_check)
acpi_idle_update_bm_rld(pr, cx);

Expand Down Expand Up @@ -1648,11 +1651,6 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
return -EINVAL;
}

for (i = 0; i < CPUIDLE_STATE_MAX; i++) {
dev->states[i].name[0] = '\0';
dev->states[i].desc[0] = '\0';
}

for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) {
cx = &pr->power.states[i];
state = &dev->states[count];
Expand All @@ -1669,7 +1667,6 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
cpuidle_set_statedata(state, cx);

snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i);
strncpy(state->desc, cx->desc, CPUIDLE_DESC_LEN);
state->exit_latency = cx->latency;
state->target_residency = cx->latency * latency_factor;
state->power_usage = cx->power;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/cpuidle/cpuidle.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ static void poll_idle_init(struct cpuidle_device *dev)

cpuidle_set_statedata(state, NULL);

snprintf(state->name, CPUIDLE_NAME_LEN, "C0");
snprintf(state->desc, CPUIDLE_DESC_LEN, "CPUIDLE CORE POLL IDLE");
snprintf(state->name, CPUIDLE_NAME_LEN, "C0 (poll idle)");
state->exit_latency = 0;
state->target_residency = 0;
state->power_usage = -1;
Expand Down
14 changes: 3 additions & 11 deletions trunk/drivers/cpuidle/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,31 +218,23 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
return sprintf(buf, "%u\n", state->_name);\
}

#define define_show_state_str_function(_name) \
static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
{ \
if (state->_name[0] == '\0')\
return sprintf(buf, "<null>\n");\
return sprintf(buf, "%s\n", state->_name);\
static ssize_t show_state_name(struct cpuidle_state *state, char *buf)
{
return sprintf(buf, "%s\n", state->name);
}

define_show_state_function(exit_latency)
define_show_state_function(power_usage)
define_show_state_function(usage)
define_show_state_function(time)
define_show_state_str_function(name)
define_show_state_str_function(desc)

define_one_state_ro(name, show_state_name);
define_one_state_ro(desc, show_state_desc);
define_one_state_ro(latency, show_state_exit_latency);
define_one_state_ro(power, show_state_power_usage);
define_one_state_ro(usage, show_state_usage);
define_one_state_ro(time, show_state_time);

static struct attribute *cpuidle_state_default_attrs[] = {
&attr_name.attr,
&attr_desc.attr,
&attr_latency.attr,
&attr_power.attr,
&attr_usage.attr,
Expand Down
9 changes: 3 additions & 6 deletions trunk/include/acpi/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@
#define DOMAIN_COORD_TYPE_SW_ANY 0xfd
#define DOMAIN_COORD_TYPE_HW_ALL 0xfe

#define ACPI_CSTATE_SYSTEMIO 0
#define ACPI_CSTATE_FFH 1
#define ACPI_CSTATE_HALT 2

#define ACPI_CX_DESC_LEN 32
#define ACPI_CSTATE_SYSTEMIO (0)
#define ACPI_CSTATE_FFH (1)
#define ACPI_CSTATE_HALT (2)

/* Power Management */

Expand Down Expand Up @@ -76,7 +74,6 @@ struct acpi_processor_cx {
u64 time;
struct acpi_processor_cx_policy promotion;
struct acpi_processor_cx_policy demotion;
char desc[ACPI_CX_DESC_LEN];
};

struct acpi_processor_power {
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/cpuidle.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#define CPUIDLE_STATE_MAX 8
#define CPUIDLE_NAME_LEN 16
#define CPUIDLE_DESC_LEN 32

struct cpuidle_device;

Expand All @@ -30,7 +29,6 @@ struct cpuidle_device;

struct cpuidle_state {
char name[CPUIDLE_NAME_LEN];
char desc[CPUIDLE_DESC_LEN];
void *driver_data;

unsigned int flags;
Expand Down

0 comments on commit af5c0c2

Please sign in to comment.