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

Commit 02c646ef authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI / PM: Do not enable GPEs for system wakeup in advance
  ACPICA: Truncate I/O addresses to 16 bits for Windows compatibility
  ACPICA: Limit maximum time for Sleep() operator
  ACPICA: Fix namestring associated with AE_NO_HANDLER exception
  ACPI / ACPICA: Fix sysfs GPE interface
  ACPI / ACPICA: Fix GPE initialization
  ACPI / ACPICA: Avoid writing full enable masks to GPE registers
  ACPI / ACPICA: Fix low-level GPE manipulation code
  ACPI / ACPICA: Use helper function for computing GPE masks
  ACPI / ACPICA: Do not attempt to disable GPE when installing handler
  ACPI: Disable Vista compatibility for Sony VGN-NS50B_L
  ACPI: fan: fix unbalanced code block
  ACPI: Store NVS state even when entering suspend to RAM
  suspend: Move NVS save/restore code to generic suspend functionality
  ACPI: Do not try to set up acpi processor stuff on cores exceeding maxcpus=
  ACPI: acpi_pad: Don't needlessly mark LAPIC unstable
parents 4303ef19 2cebc5e2
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -729,7 +729,7 @@ static int __init e820_mark_nvs_memory(void)
		struct e820entry *ei = &e820.map[i];
		struct e820entry *ei = &e820.map[i];


		if (ei->type == E820_NVS)
		if (ei->type == E820_NVS)
			hibernate_nvs_register(ei->addr, ei->size);
			suspend_nvs_register(ei->addr, ei->size);
	}
	}


	return 0;
	return 0;
+24 −12
Original line number Original line Diff line number Diff line
@@ -46,6 +46,8 @@ static unsigned long power_saving_mwait_eax;


static unsigned char tsc_detected_unstable;
static unsigned char tsc_detected_unstable;
static unsigned char tsc_marked_unstable;
static unsigned char tsc_marked_unstable;
static unsigned char lapic_detected_unstable;
static unsigned char lapic_marked_unstable;


static void power_saving_mwait_init(void)
static void power_saving_mwait_init(void)
{
{
@@ -75,9 +77,6 @@ static void power_saving_mwait_init(void)
	power_saving_mwait_eax = (highest_cstate << MWAIT_SUBSTATE_SIZE) |
	power_saving_mwait_eax = (highest_cstate << MWAIT_SUBSTATE_SIZE) |
		(highest_subcstate - 1);
		(highest_subcstate - 1);


	for_each_online_cpu(i)
		clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &i);

#if defined(CONFIG_GENERIC_TIME) && defined(CONFIG_X86)
#if defined(CONFIG_GENERIC_TIME) && defined(CONFIG_X86)
	switch (boot_cpu_data.x86_vendor) {
	switch (boot_cpu_data.x86_vendor) {
	case X86_VENDOR_AMD:
	case X86_VENDOR_AMD:
@@ -86,13 +85,15 @@ static void power_saving_mwait_init(void)
		 * AMD Fam10h TSC will tick in all
		 * AMD Fam10h TSC will tick in all
		 * 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;
			tsc_detected_unstable = 1;

		if (!boot_cpu_has(X86_FEATURE_ARAT))
		/*FALL THROUGH*/
			lapic_detected_unstable = 1;
		break;
	default:
	default:
		/* TSC could halt in idle */
		/* TSC & LAPIC could halt in idle */
		tsc_detected_unstable = 1;
		tsc_detected_unstable = 1;
		lapic_detected_unstable = 1;
	}
	}
#endif
#endif
}
}
@@ -180,10 +181,20 @@ static int power_saving_thread(void *data)
				mark_tsc_unstable("TSC halts in idle");
				mark_tsc_unstable("TSC halts in idle");
				tsc_marked_unstable = 1;
				tsc_marked_unstable = 1;
			}
			}
			if (lapic_detected_unstable && !lapic_marked_unstable) {
				int i;
				/* LAPIC could halt in idle, so notify users */
				for_each_online_cpu(i)
					clockevents_notify(
						CLOCK_EVT_NOTIFY_BROADCAST_ON,
						&i);
				lapic_marked_unstable = 1;
			}
			local_irq_disable();
			local_irq_disable();
			cpu = smp_processor_id();
			cpu = smp_processor_id();
			clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER,
			if (lapic_marked_unstable)
				&cpu);
				clockevents_notify(
					CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
			stop_critical_timings();
			stop_critical_timings();


			__monitor((void *)&current_thread_info()->flags, 0, 0);
			__monitor((void *)&current_thread_info()->flags, 0, 0);
@@ -192,8 +203,9 @@ static int power_saving_thread(void *data)
				__mwait(power_saving_mwait_eax, 1);
				__mwait(power_saving_mwait_eax, 1);


			start_critical_timings();
			start_critical_timings();
			clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT,
			if (lapic_marked_unstable)
				&cpu);
				clockevents_notify(
					CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
			local_irq_enable();
			local_irq_enable();


			if (jiffies > expire_time) {
			if (jiffies > expire_time) {
+4 −0
Original line number Original line Diff line number Diff line
@@ -119,6 +119,10 @@


#define ACPI_MAX_LOOP_ITERATIONS        0xFFFF
#define ACPI_MAX_LOOP_ITERATIONS        0xFFFF


/* Maximum sleep allowed via Sleep() operator */

#define ACPI_MAX_SLEEP                  20000	/* Two seconds */

/******************************************************************************
/******************************************************************************
 *
 *
 * ACPI Specification constants (Do not change unless the specification changes)
 * ACPI Specification constants (Do not change unless the specification changes)
+0 −4
Original line number Original line Diff line number Diff line
@@ -80,10 +80,6 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list);
acpi_status
acpi_status
acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info);
acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info);


acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info);

acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info);

struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
						       u32 gpe_number);
						       u32 gpe_number);


+8 −0
Original line number Original line Diff line number Diff line
@@ -125,6 +125,14 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
 */
 */
u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);
u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);


/*
 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
 * with other ACPI implementations. NOTE: During ACPICA initialization,
 * this value is set to TRUE if any Windows OSI strings have been
 * requested by the BIOS.
 */
u8 ACPI_INIT_GLOBAL(acpi_gbl_truncate_io_addresses, FALSE);

/* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */
/* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */


struct acpi_table_fadt acpi_gbl_FADT;
struct acpi_table_fadt acpi_gbl_FADT;
Loading