Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e3507f7 authored by Len Brown's avatar Len Brown
Browse files

Merge branches 'release', 'bugzilla-13032', 'bugzilla-13041+',...

Merge branches 'release', 'bugzilla-13032', 'bugzilla-13041+', 'bugzilla-13121', 'bugzilla-13165', 'bugzilla-13243', 'bugzilla-13259', 'resume-sci-en-regression', 'thermal-regression', 'tsc-regression' and 'asus-2.6.30' into release
Loading
+15 −12
Original line number Original line Diff line number Diff line
@@ -5,40 +5,43 @@
ccflags-y			:= -Os
ccflags-y			:= -Os
ccflags-$(CONFIG_ACPI_DEBUG)	+= -DACPI_DEBUG_OUTPUT
ccflags-$(CONFIG_ACPI_DEBUG)	+= -DACPI_DEBUG_OUTPUT


obj-y := dsfield.o   dsmthdat.o  dsopcode.o  dswexec.o  dswscope.o \
# use acpi.o to put all files here into acpi.o modparam namespace
obj-y	+= acpi.o

acpi-y := dsfield.o   dsmthdat.o  dsopcode.o  dswexec.o  dswscope.o \
	 dsmethod.o  dsobject.o  dsutils.o   dswload.o  dswstate.o \
	 dsmethod.o  dsobject.o  dsutils.o   dswload.o  dswstate.o \
	 dsinit.o
	 dsinit.o


obj-y += evevent.o  evregion.o  evsci.o    evxfevnt.o \
acpi-y += evevent.o  evregion.o  evsci.o    evxfevnt.o \
	 evmisc.o   evrgnini.o  evxface.o  evxfregn.o \
	 evmisc.o   evrgnini.o  evxface.o  evxfregn.o \
	 evgpe.o    evgpeblk.o
	 evgpe.o    evgpeblk.o


obj-y += exconfig.o  exfield.o  exnames.o   exoparg6.o  exresolv.o  exstorob.o\
acpi-y += exconfig.o  exfield.o  exnames.o   exoparg6.o  exresolv.o  exstorob.o\
	 exconvrt.o  exfldio.o  exoparg1.o  exprep.o    exresop.o   exsystem.o\
	 exconvrt.o  exfldio.o  exoparg1.o  exprep.o    exresop.o   exsystem.o\
	 excreate.o  exmisc.o   exoparg2.o  exregion.o  exstore.o   exutils.o \
	 excreate.o  exmisc.o   exoparg2.o  exregion.o  exstore.o   exutils.o \
	 exdump.o    exmutex.o  exoparg3.o  exresnte.o  exstoren.o
	 exdump.o    exmutex.o  exoparg3.o  exresnte.o  exstoren.o


obj-y += hwacpi.o  hwgpe.o  hwregs.o  hwsleep.o hwxface.o hwvalid.o
acpi-y += hwacpi.o  hwgpe.o  hwregs.o  hwsleep.o hwxface.o hwvalid.o


obj-$(ACPI_FUTURE_USAGE) += hwtimer.o
acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o


obj-y += nsaccess.o  nsload.o    nssearch.o  nsxfeval.o \
acpi-y += nsaccess.o  nsload.o    nssearch.o  nsxfeval.o \
	 nsalloc.o   nseval.o    nsnames.o   nsutils.o   nsxfname.o \
	 nsalloc.o   nseval.o    nsnames.o   nsutils.o   nsxfname.o \
	 nsdump.o    nsinit.o    nsobject.o  nswalk.o    nsxfobj.o  \
	 nsdump.o    nsinit.o    nsobject.o  nswalk.o    nsxfobj.o  \
	 nsparse.o   nspredef.o
	 nsparse.o   nspredef.o


obj-$(ACPI_FUTURE_USAGE) += nsdumpdv.o
acpi-$(ACPI_FUTURE_USAGE) += nsdumpdv.o


obj-y += psargs.o    psparse.o  psloop.o pstree.o   pswalk.o  \
acpi-y += psargs.o    psparse.o  psloop.o pstree.o   pswalk.o  \
	 psopcode.o  psscope.o  psutils.o  psxface.o
	 psopcode.o  psscope.o  psutils.o  psxface.o


obj-y += rsaddr.o rscreate.o rsinfo.o rsio.o rslist.o rsmisc.o rsxface.o \
acpi-y += rsaddr.o rscreate.o rsinfo.o rsio.o rslist.o rsmisc.o rsxface.o \
	 rscalc.o  rsirq.o  rsmemory.o  rsutils.o
	 rscalc.o  rsirq.o  rsmemory.o  rsutils.o


obj-$(ACPI_FUTURE_USAGE) += rsdump.o
acpi-$(ACPI_FUTURE_USAGE) += rsdump.o


obj-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o
acpi-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o


obj-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \
acpi-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \
		utcopy.o utdelete.o utglobal.o utmath.o utobject.o \
		utcopy.o utdelete.o utglobal.o utmath.o utobject.o \
		utstate.o utmutex.o utobject.o utresrc.o utlock.o
		utstate.o utmutex.o utobject.o utresrc.o utlock.o
+6 −1
Original line number Original line Diff line number Diff line
@@ -787,7 +787,12 @@ struct acpi_bit_register_info {


/* For control registers, both ignored and reserved bits must be preserved */
/* For control registers, both ignored and reserved bits must be preserved */


#define ACPI_PM1_CONTROL_IGNORED_BITS           0x0201	/* Bits 9, 0(SCI_EN) */
/*
 * The ACPI spec says to ignore PM1_CTL.SCI_EN (bit 0)
 * but we need to be able to write ACPI_BITREG_SCI_ENABLE directly
 * as a BIOS workaround on some machines.
 */
#define ACPI_PM1_CONTROL_IGNORED_BITS           0x0200	/* Bits 9 */
#define ACPI_PM1_CONTROL_RESERVED_BITS          0xC1F8	/* Bits 14-15, 3-8 */
#define ACPI_PM1_CONTROL_RESERVED_BITS          0xC1F8	/* Bits 14-15, 3-8 */
#define ACPI_PM1_CONTROL_PRESERVED_BITS \
#define ACPI_PM1_CONTROL_PRESERVED_BITS \
	       (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS)
	       (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS)
+1 −1
Original line number Original line Diff line number Diff line
@@ -312,7 +312,7 @@ int acpi_bus_set_power(acpi_handle handle, int state)
      end:
      end:
	if (result)
	if (result)
		printk(KERN_WARNING PREFIX
		printk(KERN_WARNING PREFIX
			      "Transitioning device [%s] to D%d\n",
			      "Device [%s] failed to transition to D%d\n",
			      device->pnp.bus_id, state);
			      device->pnp.bus_id, state);
	else {
	else {
		device->power.state = state;
		device->power.state = state;
+33 −9
Original line number Original line Diff line number Diff line
@@ -202,21 +202,44 @@ static void acpi_state_timer_broadcast(struct acpi_processor *pr,
 * Suspend / resume control
 * Suspend / resume control
 */
 */
static int acpi_idle_suspend;
static int acpi_idle_suspend;
static u32 saved_bm_rld;

static void acpi_idle_bm_rld_save(void)
{
	acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_RLD, &saved_bm_rld);
}
static void acpi_idle_bm_rld_restore(void)
{
	u32 resumed_bm_rld;

	acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_RLD, &resumed_bm_rld);

	if (resumed_bm_rld != saved_bm_rld)
		acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, saved_bm_rld);
}


int acpi_processor_suspend(struct acpi_device * device, pm_message_t state)
int acpi_processor_suspend(struct acpi_device * device, pm_message_t state)
{
{
	if (acpi_idle_suspend == 1)
		return 0;

	acpi_idle_bm_rld_save();
	acpi_idle_suspend = 1;
	acpi_idle_suspend = 1;
	return 0;
	return 0;
}
}


int acpi_processor_resume(struct acpi_device * device)
int acpi_processor_resume(struct acpi_device * device)
{
{
	if (acpi_idle_suspend == 0)
		return 0;

	acpi_idle_bm_rld_restore();
	acpi_idle_suspend = 0;
	acpi_idle_suspend = 0;
	return 0;
	return 0;
}
}


#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
static int tsc_halts_in_c(int state)
static void tsc_check_state(int state)
{
{
	switch (boot_cpu_data.x86_vendor) {
	switch (boot_cpu_data.x86_vendor) {
	case X86_VENDOR_AMD:
	case X86_VENDOR_AMD:
@@ -226,13 +249,17 @@ static int tsc_halts_in_c(int state)
		 * C/P/S0/S1 states when this bit is set.
		 * C/P/S0/S1 states when this bit is set.
		 */
		 */
		if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC))
		if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC))
			return 0;
			return;


		/*FALL THROUGH*/
		/*FALL THROUGH*/
	default:
	default:
		return state > ACPI_STATE_C1;
		/* TSC could halt in idle, so notify users */
		if (state > ACPI_STATE_C1)
			mark_tsc_unstable("TSC halts in idle");
	}
	}
}
}
#else
static void tsc_check_state(int state) { return; }
#endif
#endif


static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
@@ -578,14 +605,9 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)


	pr->power.timer_broadcast_on_state = INT_MAX;
	pr->power.timer_broadcast_on_state = INT_MAX;


	for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
	for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) {
		struct acpi_processor_cx *cx = &pr->power.states[i];
		struct acpi_processor_cx *cx = &pr->power.states[i];


#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
		/* TSC could halt in idle, so notify users */
		if (tsc_halts_in_c(cx->type))
			mark_tsc_unstable("TSC halts in idle");;
#endif
		switch (cx->type) {
		switch (cx->type) {
		case ACPI_STATE_C1:
		case ACPI_STATE_C1:
			cx->valid = 1;
			cx->valid = 1;
@@ -603,6 +625,8 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
				acpi_timer_check_state(i, pr, cx);
				acpi_timer_check_state(i, pr, cx);
			break;
			break;
		}
		}
		if (cx->valid)
			tsc_check_state(cx->type);


		if (cx->valid)
		if (cx->valid)
			working++;
			working++;
+25 −0
Original line number Original line Diff line number Diff line
@@ -45,6 +45,14 @@
#define _COMPONENT              ACPI_PROCESSOR_COMPONENT
#define _COMPONENT              ACPI_PROCESSOR_COMPONENT
ACPI_MODULE_NAME("processor_throttling");
ACPI_MODULE_NAME("processor_throttling");


/* ignore_tpc:
 *  0 -> acpi processor driver doesn't ignore _TPC values
 *  1 -> acpi processor driver ignores _TPC values
 */
static int ignore_tpc;
module_param(ignore_tpc, int, 0644);
MODULE_PARM_DESC(ignore_tpc, "Disable broken BIOS _TPC throttling support");

struct throttling_tstate {
struct throttling_tstate {
	unsigned int cpu;		/* cpu nr */
	unsigned int cpu;		/* cpu nr */
	int target_state;		/* target T-state */
	int target_state;		/* target T-state */
@@ -283,6 +291,10 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)


	if (!pr)
	if (!pr)
		return -EINVAL;
		return -EINVAL;

	if (ignore_tpc)
		goto end;

	status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc);
	status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc);
	if (ACPI_FAILURE(status)) {
	if (ACPI_FAILURE(status)) {
		if (status != AE_NOT_FOUND) {
		if (status != AE_NOT_FOUND) {
@@ -290,6 +302,8 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
		}
		}
		return -ENODEV;
		return -ENODEV;
	}
	}

end:
	pr->throttling_platform_limit = (int)tpc;
	pr->throttling_platform_limit = (int)tpc;
	return 0;
	return 0;
}
}
@@ -302,6 +316,9 @@ int acpi_processor_tstate_has_changed(struct acpi_processor *pr)
	struct acpi_processor_limit *limit;
	struct acpi_processor_limit *limit;
	int target_state;
	int target_state;


	if (ignore_tpc)
		return 0;

	result = acpi_processor_get_platform_limit(pr);
	result = acpi_processor_get_platform_limit(pr);
	if (result) {
	if (result) {
		/* Throttling Limit is unsupported */
		/* Throttling Limit is unsupported */
@@ -821,6 +838,14 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr)
	ret = acpi_read_throttling_status(pr, &value);
	ret = acpi_read_throttling_status(pr, &value);
	if (ret >= 0) {
	if (ret >= 0) {
		state = acpi_get_throttling_state(pr, value);
		state = acpi_get_throttling_state(pr, value);
		if (state == -1) {
			ACPI_WARNING((AE_INFO,
				"Invalid throttling state, reset\n"));
			state = 0;
			ret = acpi_processor_set_throttling(pr, state);
			if (ret)
				return ret;
		}
		pr->throttling.state = state;
		pr->throttling.state = state;
	}
	}


Loading