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

Commit 70f6c087 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull more ACPI and power management updates from Rafael Wysocki:
 "These are commits that were not quite ready when I sent the original
  pull request for 3.15-rc1 several days ago, but they have spent some
  time in linux-next since then and appear to be good to go.  All of
  them are fixes and cleanups.

  Specifics:

   - Remaining changes from upstream ACPICA release 20140214 that
     introduce code to automatically serialize the execution of methods
     creating any named objects which really cannot be executed in
     parallel with each other anyway (previously ACPICA attempted to
     address that by aborting methods upon conflict detection, but that
     wasn't reliable enough and led to other issues).  From Bob Moore
     and Lv Zheng.

   - intel_pstate fix to use del_timer_sync() instead of del_timer() in
     the exit path before freeing the timer structure from Dirk
     Brandewie (original patch from Thomas Gleixner).

   - cpufreq fix related to system resume from Viresh Kumar.

   - Serialization of frequency transitions in cpufreq that involve
     PRECHANGE and POSTCHANGE notifications to avoid ordering issues
     resulting from race conditions.  From Srivatsa S Bhat and Viresh
     Kumar.

   - Revert of an ACPI processor driver change that was based on a
     specific interpretation of the ACPI spec which may not be correct
     (the relevant part of the spec appears to be incomplete).  From
     Hanjun Guo.

   - Runtime PM core cleanups and documentation updates from Geert
     Uytterhoeven.

   - PNP core cleanup from Michael Opdenacker"

* tag 'pm+acpi-3.15-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: Make cpufreq_notify_transition & cpufreq_notify_post_transition static
  cpufreq: Convert existing drivers to use cpufreq_freq_transition_{begin|end}
  cpufreq: Make sure frequency transitions are serialized
  intel_pstate: Use del_timer_sync in intel_pstate_cpu_stop
  cpufreq: resume drivers before enabling governors
  PM / Runtime: Spelling s/competing/completing/
  PM / Runtime: s/foo_process_requests/foo_process_next_request/
  PM / Runtime: GENERIC_SUBSYS_PM_OPS is gone
  PM / Runtime: Correct documented return values for generic PM callbacks
  PM / Runtime: Split line longer than 80 characters
  PM / Runtime: dev_pm_info.runtime_error is signed
  Revert "ACPI / processor: Make it possible to get APIC ID via GIC"
  ACPICA: Enable auto-serialization as a default kernel behavior.
  ACPICA: Ignore sync_level for methods that have been auto-serialized.
  ACPICA: Add additional named objects for the auto-serialize method scan.
  ACPICA: Add auto-serialization support for ill-behaved control methods.
  ACPICA: Remove global option to serialize all control methods.
  PNP: remove deprecated IRQF_DISABLED
parents e6d9bfc6 7b5c3938
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -229,6 +229,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
			use by PCI
			use by PCI
			Format: <irq>,<irq>...
			Format: <irq>,<irq>...


	acpi_no_auto_serialize	[HW,ACPI]
			Disable auto-serialization of AML methods
			AML control methods that contain the opcodes to create
			named objects will be marked as "Serialized" by the
			auto-serialization feature.
			This feature is enabled by default.
			This option allows to turn off the feature.

	acpi_no_auto_ssdt	[HW,ACPI] Disable automatic loading of SSDT
	acpi_no_auto_ssdt	[HW,ACPI] Disable automatic loading of SSDT


	acpica_no_return_repair [HW, ACPI]
	acpica_no_return_repair [HW, ACPI]
@@ -306,8 +314,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
	acpi_sci=	[HW,ACPI] ACPI System Control Interrupt trigger mode
	acpi_sci=	[HW,ACPI] ACPI System Control Interrupt trigger mode
			Format: { level | edge | high | low }
			Format: { level | edge | high | low }


	acpi_serialize	[HW,ACPI] force serialization of AML methods

	acpi_skip_timer_override [HW,ACPI]
	acpi_skip_timer_override [HW,ACPI]
			Recognize and ignore IRQ0/pin2 Interrupt Override.
			Recognize and ignore IRQ0/pin2 Interrupt Override.
			For broken nForce2 BIOS resulting in XT-PIC timer.
			For broken nForce2 BIOS resulting in XT-PIC timer.
+13 −16
Original line number Original line Diff line number Diff line
@@ -232,7 +232,7 @@ defined in include/linux/pm.h:
      equal to zero); the initial value of it is 1 (i.e. runtime PM is
      equal to zero); the initial value of it is 1 (i.e. runtime PM is
      initially disabled for all devices)
      initially disabled for all devices)


  unsigned int runtime_error;
  int runtime_error;
    - if set, there was a fatal error (one of the callbacks returned error code
    - if set, there was a fatal error (one of the callbacks returned error code
      as described in Section 2), so the helper funtions will not work until
      as described in Section 2), so the helper funtions will not work until
      this flag is cleared; this is the error code returned by the failing
      this flag is cleared; this is the error code returned by the failing
@@ -401,11 +401,11 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
  int pm_runtime_disable(struct device *dev);
  int pm_runtime_disable(struct device *dev);
    - increment the device's 'power.disable_depth' field (if the value of that
    - increment the device's 'power.disable_depth' field (if the value of that
      field was previously zero, this prevents subsystem-level runtime PM
      field was previously zero, this prevents subsystem-level runtime PM
      callbacks from being run for the device), make sure that all of the pending
      callbacks from being run for the device), make sure that all of the
      runtime PM operations on the device are either completed or canceled;
      pending runtime PM operations on the device are either completed or
      returns 1 if there was a resume request pending and it was necessary to
      canceled; returns 1 if there was a resume request pending and it was
      execute the subsystem-level resume callback for the device to satisfy that
      necessary to execute the subsystem-level resume callback for the device
      request, otherwise 0 is returned
      to satisfy that request, otherwise 0 is returned


  int pm_runtime_barrier(struct device *dev);
  int pm_runtime_barrier(struct device *dev);
    - check if there's a resume request pending for the device and resume it
    - check if there's a resume request pending for the device and resume it
@@ -667,11 +667,11 @@ driver/base/power/generic_ops.c:


  int pm_generic_runtime_suspend(struct device *dev);
  int pm_generic_runtime_suspend(struct device *dev);
    - invoke the ->runtime_suspend() callback provided by the driver of this
    - invoke the ->runtime_suspend() callback provided by the driver of this
      device and return its result, or return -EINVAL if not defined
      device and return its result, or return 0 if not defined


  int pm_generic_runtime_resume(struct device *dev);
  int pm_generic_runtime_resume(struct device *dev);
    - invoke the ->runtime_resume() callback provided by the driver of this
    - invoke the ->runtime_resume() callback provided by the driver of this
      device and return its result, or return -EINVAL if not defined
      device and return its result, or return 0 if not defined


  int pm_generic_suspend(struct device *dev);
  int pm_generic_suspend(struct device *dev);
    - if the device has not been suspended at run time, invoke the ->suspend()
    - if the device has not been suspended at run time, invoke the ->suspend()
@@ -727,15 +727,12 @@ driver/base/power/generic_ops.c:
  int pm_generic_restore_noirq(struct device *dev);
  int pm_generic_restore_noirq(struct device *dev);
    - invoke the ->restore_noirq() callback provided by the device's driver
    - invoke the ->restore_noirq() callback provided by the device's driver


These functions can be assigned to the ->runtime_idle(), ->runtime_suspend(),
These functions are the defaults used by the PM core, if a subsystem doesn't
provide its own callbacks for ->runtime_idle(), ->runtime_suspend(),
->runtime_resume(), ->suspend(), ->suspend_noirq(), ->resume(),
->runtime_resume(), ->suspend(), ->suspend_noirq(), ->resume(),
->resume_noirq(), ->freeze(), ->freeze_noirq(), ->thaw(), ->thaw_noirq(),
->resume_noirq(), ->freeze(), ->freeze_noirq(), ->thaw(), ->thaw_noirq(),
->poweroff(), ->poweroff_noirq(), ->restore(), ->restore_noirq() callback
->poweroff(), ->poweroff_noirq(), ->restore(), ->restore_noirq() in the
pointers in the subsystem-level dev_pm_ops structures.
subsystem-level dev_pm_ops structure.

If a subsystem wishes to use all of them at the same time, it can simply assign
the GENERIC_SUBSYS_PM_OPS macro, defined in include/linux/pm.h, to its
dev_pm_ops structure pointer.


Device drivers that wish to use the same function as a system suspend, freeze,
Device drivers that wish to use the same function as a system suspend, freeze,
poweroff and runtime suspend callback, and similarly for system resume, thaw,
poweroff and runtime suspend callback, and similarly for system resume, thaw,
@@ -873,7 +870,7 @@ Here is a schematic pseudo-code example:
		foo->is_suspended = 0;
		foo->is_suspended = 0;
		pm_runtime_mark_last_busy(&foo->dev);
		pm_runtime_mark_last_busy(&foo->dev);
		if (foo->num_pending_requests > 0)
		if (foo->num_pending_requests > 0)
			foo_process_requests(foo);
			foo_process_next_request(foo);
		unlock(&foo->private_lock);
		unlock(&foo->private_lock);
		return 0;
		return 0;
	}
	}
+8 −5
Original line number Original line Diff line number Diff line
@@ -139,20 +139,21 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
			   struct acpi_walk_state *walk_state);
			   struct acpi_walk_state *walk_state);


/*
/*
 * dsload - Parser/Interpreter interface, pass 1 namespace load callbacks
 * dsload - Parser/Interpreter interface
 */
 */
acpi_status
acpi_status
acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number);
acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number);


/* dsload - pass 1 namespace load callbacks */

acpi_status
acpi_status
acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state,
acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state,
		       union acpi_parse_object **out_op);
		       union acpi_parse_object **out_op);


acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state);
acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state);


/*
/* dsload - pass 2 namespace load callbacks */
 * dsload - Parser/Interpreter interface, pass 2 namespace load callbacks

 */
acpi_status
acpi_status
acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
		       union acpi_parse_object **out_op);
		       union acpi_parse_object **out_op);
@@ -200,7 +201,9 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state);
/*
/*
 * dsmethod - Parser/Interpreter interface - control method parsing
 * dsmethod - Parser/Interpreter interface - control method parsing
 */
 */
acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node);
acpi_status
acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,
			      union acpi_operand_object *obj_desc);


acpi_status
acpi_status
acpi_ds_call_control_method(struct acpi_thread_state *thread,
acpi_ds_call_control_method(struct acpi_thread_state *thread,
+6 −5
Original line number Original line Diff line number Diff line
@@ -93,12 +93,13 @@
ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE);


/*
/*
 * Automatically serialize ALL control methods? Default is FALSE, meaning
 * Automatically serialize all methods that create named objects? Default
 * to use the Serialized/not_serialized method flags on a per method basis.
 * is TRUE, meaning that all non_serialized methods are scanned once at
 * Only change this if the ASL code is poorly written and cannot handle
 * table load time to determine those that create named objects. Methods
 * reentrancy even though methods are marked "NotSerialized".
 * that create named objects are marked Serialized in order to prevent
 * possible run-time problems if they are entered by more than one thread.
 */
 */
ACPI_INIT_GLOBAL(u8, acpi_gbl_all_methods_serialized, FALSE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_auto_serialize_methods, TRUE);


/*
/*
 * Create the predefined _OSI method in the namespace? Default is TRUE
 * Create the predefined _OSI method in the namespace? Default is TRUE
+0 −4
Original line number Original line Diff line number Diff line
@@ -458,10 +458,6 @@ void acpi_ex_enter_interpreter(void);


void acpi_ex_exit_interpreter(void);
void acpi_ex_exit_interpreter(void);


void acpi_ex_reacquire_interpreter(void);

void acpi_ex_relinquish_interpreter(void);

u8 acpi_ex_truncate_for32bit_table(union acpi_operand_object *obj_desc);
u8 acpi_ex_truncate_for32bit_table(union acpi_operand_object *obj_desc);


void acpi_ex_acquire_global_lock(u32 rule);
void acpi_ex_acquire_global_lock(u32 rule);
Loading