Konrad Rzeszutek Wilk
cc456c4e7c
x86, gdt, hibernate: Store/load GDT for hibernate path.
...
The git commite7a5cd063c7b4c58417f674821d63f5eb6747e37
("x86-64, gdt: Store/load GDT for ACPI S3 or hibernate/resume path
is not needed.") assumes that for the hibernate path the booting
kernel and the resuming kernel MUST be the same. That is certainly
the case for a 32-bit kernel (see check_image_kernel and
CONFIG_ARCH_HIBERNATION_HEADER config option).
However for 64-bit kernels it is OK to have a different kernel
version (and size of the image) of the booting and resuming kernels.
Hence the above mentioned git commit introduces an regression.
This patch fixes it by introducing a 'struct desc_ptr gdt_desc'
back in the 'struct saved_context'. However instead of having in the
'save_processor_state' and 'restore_processor_state' the
store/load_gdt calls, we are only saving the GDT in the
save_processor_state.
For the restore path the lgdt operation is done in
hibernate_asm_[32|64].S in the 'restore_registers' path.
The apt reader of this description will recognize that only 64-bit
kernels need this treatment, not 32-bit. This patch adds the logic
in the 32-bit path to be more similar to 64-bit so that in the future
the unification process can take advantage of this.
[ hpa: this also reverts an inadvertent on-disk format change ]
Suggested-by: "H. Peter Anvin" <hpa@zytor.com >
Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl >
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com >
Link: http://lkml.kernel.org/r/1367459610-9656-2-git-send-email-konrad.wilk@oracle.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com >
2013-05-02 11:27:35 -07:00
..
2012-11-09 17:32:31 +08:00
2012-12-07 14:24:32 -07:00
2013-02-11 17:18:25 -08:00
2013-03-22 10:20:55 -04:00
2013-01-10 12:36:17 +01:00
2012-09-21 12:45:26 -07:00
2012-10-01 13:59:17 -07:00
2013-01-10 16:17:58 +01:00
2011-07-23 10:34:47 -07:00
2011-12-05 17:17:07 +01:00
2012-10-06 03:04:40 +09:00
2012-05-18 09:46:07 +02:00
2011-07-31 14:02:19 -07:00
2012-04-20 17:22:34 -07:00
2012-05-09 11:38:20 +02:00
2011-08-29 13:44:12 -07:00
2012-11-29 13:23:02 -08:00
2012-03-28 18:11:12 +01:00
2011-04-29 14:13:15 -07:00
2012-09-19 17:26:08 +02:00
2012-12-14 22:37:13 +00:00
2013-03-06 20:34:43 -08:00
2013-04-30 17:04:02 -07:00
2012-03-28 18:11:12 +01:00
2012-10-02 18:01:25 +01:00
2012-10-02 18:01:25 +01:00
2012-11-27 23:29:09 -02:00
2012-11-29 13:23:01 -08:00
2012-01-04 15:01:54 +01:00
2013-04-25 10:39:04 +02:00
2012-10-06 03:05:16 +09:00
2013-03-07 17:09:25 +01:00
2012-01-26 16:44:41 -08:00
2012-11-14 15:28:11 -08:00
2013-04-30 15:21:02 -07:00
2012-05-14 14:15:31 -07:00
2012-12-14 22:37:13 +00:00
2011-07-22 18:46:24 +02:00
2012-05-14 14:15:31 -07:00
2012-11-15 00:28:00 +01:00
2011-12-05 18:16:11 +01:00
2012-05-21 15:09:38 +02:00
2012-10-24 17:06:43 +02:00
2011-05-02 17:24:48 +02:00
2011-09-28 19:04:52 +02:00
2012-12-14 22:37:13 +00:00
2013-04-15 21:31:09 +01:00
2012-12-11 17:22:25 -08:00
2012-06-17 10:51:01 -07:00
2012-06-27 19:29:13 -07:00
2012-03-28 18:11:12 +01:00
2013-04-30 08:40:35 -07:00
2012-06-06 09:17:22 +02:00
2013-02-14 09:21:17 -05:00
2011-07-21 09:03:31 +02:00
2013-02-12 17:46:28 -05:00
2012-11-29 13:23:02 -08:00
2011-04-18 09:26:48 -07:00
2012-05-11 18:00:14 -06:00
2012-09-27 22:52:34 -07:00
2012-03-20 21:48:30 +08:00
2013-01-28 10:48:30 +01:00
2013-04-29 15:54:33 -07:00
2012-12-14 22:37:13 +00:00
2013-01-28 12:17:27 +01:00
2013-03-04 13:14:25 -08:00
2012-09-21 16:59:04 -07:00
2011-11-17 13:35:37 -08:00
2013-02-03 18:16:27 -05:00
2012-03-26 03:16:07 +02:00
2012-02-11 15:11:35 +01:00
2013-01-29 15:12:25 -08:00
2012-02-11 15:11:35 +01:00
2011-12-05 12:42:11 +01:00
2013-01-28 12:51:52 +01:00
2011-08-03 22:00:38 -10:00
2012-09-05 10:52:26 +02:00
2012-06-25 13:48:30 +02:00
2012-05-14 14:15:31 -07:00
2013-01-28 12:51:52 +01:00
2013-02-12 16:27:15 -08:00
2011-07-07 19:22:32 +02:00
2012-12-14 22:37:13 +00:00
2012-02-24 10:05:59 +01:00
2012-05-08 14:19:41 -07:00
2012-12-14 22:37:13 +00:00
2012-05-09 11:44:42 +02:00
2013-01-29 15:26:23 -08:00
2012-03-22 15:07:15 -05:00
2013-03-18 10:21:23 +01:00
2012-09-06 18:07:38 +03:00
2012-11-27 23:29:10 -02:00
2013-03-19 14:17:35 -03:00
2013-02-24 13:07:18 -08:00
2011-07-22 14:39:50 +09:30
2013-01-24 11:25:59 +01:00
2012-11-29 13:23:02 -08:00
2011-11-21 19:00:57 -08:00
2011-11-10 16:21:01 +01:00
2012-03-28 18:11:12 +01:00
2013-04-02 14:04:01 -07:00
2013-01-31 13:18:50 -08:00
2013-01-31 13:19:12 -08:00
2012-05-14 14:15:31 -07:00
2011-05-25 16:16:41 +02:00
2013-01-31 14:12:30 -08:00
2011-06-27 14:13:09 -07:00
2012-10-02 18:01:25 +01:00
2012-11-29 13:23:01 -08:00
2012-05-17 19:06:13 -04:00
2012-05-17 19:06:13 -04:00
2012-01-26 21:23:53 +01:00
2013-02-12 16:27:15 -08:00
2013-04-02 16:03:32 -07:00
2012-12-14 22:37:13 +00:00
2012-10-02 18:01:25 +01:00
2013-02-08 19:29:16 -05:00
2012-06-20 14:23:17 +02:00
2012-04-19 15:07:42 -07:00
2011-05-02 14:18:53 +02:00
2013-02-23 17:50:13 -08:00
2011-05-02 14:18:53 +02:00
2012-07-31 23:27:30 -04:00
2012-05-08 14:08:44 +02:00
2012-11-16 16:42:09 -08:00
2013-04-02 16:03:29 -07:00
2012-11-16 16:42:09 -08:00
2012-11-17 11:59:24 -08:00
2013-02-01 02:28:36 -08:00
2013-04-30 08:41:21 -07:00
2013-04-30 08:41:21 -07:00
2013-01-03 15:57:04 -08:00
2013-02-25 21:18:18 -08:00
2013-02-25 21:18:18 -08:00
2012-11-29 13:23:01 -08:00
2013-04-26 09:31:41 +02:00
2013-02-16 09:37:27 +01:00
2013-01-24 16:12:13 +01:00
2013-01-29 15:20:06 -08:00
2013-02-21 18:06:55 -08:00
2013-04-10 14:39:08 +02:00
2012-06-06 09:17:22 +02:00
2012-07-22 12:04:44 -07:00
2013-02-21 18:06:55 -08:00
2012-12-14 22:37:13 +00:00
2012-12-14 22:37:13 +00:00
2013-04-02 10:12:55 -07:00
2012-02-23 14:37:47 -07:00
2013-02-22 13:09:51 -08:00
2012-12-20 18:05:28 -08:00
2012-04-08 12:48:57 +03:00
2012-11-27 23:29:09 -02:00
2013-01-29 15:13:24 -08:00
2012-06-17 10:51:01 -07:00
2013-01-28 16:59:55 -08:00
2011-07-21 09:03:36 +02:00
2011-08-29 13:44:12 -07:00
2012-10-02 18:01:25 +01:00
2012-04-19 15:42:45 -07:00
2012-12-14 22:37:13 +00:00
2012-12-14 22:37:13 +00:00
2012-02-20 12:52:05 -08:00
2012-06-01 12:58:51 -04:00
2013-02-03 18:16:27 -05:00
2012-09-21 12:45:27 -07:00
2012-11-14 09:39:48 -08:00
2011-07-21 09:20:59 +02:00
2012-03-28 18:11:12 +01:00
2012-02-07 10:09:54 +01:00
2012-08-22 09:52:47 +02:00
2012-05-09 15:34:28 +02:00
2012-05-14 14:15:31 -07:00
2011-05-12 15:31:28 +02:00
2012-10-02 18:01:25 +01:00
2013-05-02 11:27:35 -07:00
2013-05-02 11:27:35 -07:00
2012-10-02 18:01:25 +01:00
2012-12-14 22:37:13 +00:00
2012-03-28 18:11:12 +01:00
2013-03-03 23:00:34 -05:00
2013-04-02 14:38:09 -07:00
2013-03-03 22:58:33 -05:00
2013-04-08 17:39:22 +02:00
2011-06-09 15:01:40 +02:00
2012-03-13 16:27:51 +01:00
2013-04-12 16:56:47 -07:00
2013-01-31 13:19:16 -08:00
2012-05-09 15:00:55 +02:00
2012-11-13 15:48:40 -05:00
2012-03-09 16:47:54 -08:00
2012-03-20 12:37:45 +02:00
2012-09-21 12:45:26 -07:00
2012-09-21 12:45:26 -07:00
2013-02-12 15:37:02 -08:00
2013-03-03 22:55:19 -05:00
2013-04-13 15:31:55 +02:00
2012-10-02 18:01:25 +01:00
2012-09-05 10:52:23 +02:00
2012-04-24 09:50:18 +01:00
2012-09-24 12:38:09 -04:00
2012-03-28 18:11:12 +01:00
2012-12-14 22:37:13 +00:00
2013-02-24 13:07:18 -08:00
2012-12-14 22:37:13 +00:00
2011-06-05 21:30:32 +02:00
2012-05-26 11:33:40 -07:00
2012-06-06 10:22:17 +02:00
2013-02-21 18:06:55 -08:00
2013-01-25 09:23:50 +01:00
2013-01-25 09:23:50 +01:00
2012-09-18 15:52:08 -07:00
2013-01-25 09:23:50 +01:00
2012-09-21 17:18:44 -07:00