public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: manual merge of the tip tree with the acpi tree
@ 2011-02-24  4:52 Stephen Rothwell
  2011-02-24 10:29 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2011-02-24  4:52 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
  Cc: linux-next, linux-kernel, Rafael J. Wysocki, Len Brown

Hi all,

Today's linux-next merge of the tip tree got a conflict in
arch/x86/kernel/acpi/sleep.c between commit
a69fa313606a51cee99d802c14895330948f60c8 ("ACPI / PM: Drop
acpi_restore_state_mem()") from the acpi tree and commit
d1ee433539ea5963a8f946f3428b335d1c5fdb20 ("x86, trampoline: Use the
unified trampoline setup for ACPI wakeup") from the tip tree.

Just context (I think).  I fixed it up (see below) and can carry the fix
as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au

diff --cc arch/x86/kernel/acpi/sleep.c
index 5f1b747,4572c58..0000000
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@@ -33,22 -29,17 +29,17 @@@ static char temp_stack[4096]
   *
   * Create an identity mapped page table and copy the wakeup routine to
   * low memory.
-  *
-  * Note that this is too late to change acpi_wakeup_address.
   */
 -int acpi_save_state_mem(void)
 +int acpi_suspend_lowlevel(void)
  {
  	struct wakeup_header *header;
+ 	/* address in low memory of the wakeup routine. */
+ 	char *acpi_realmode;
  
- 	if (!acpi_realmode) {
- 		printk(KERN_ERR "Could not allocate memory during boot, "
- 		       "S3 disabled\n");
- 		return -ENOMEM;
- 	}
- 	memcpy((void *)acpi_realmode, &wakeup_code_start, WAKEUP_SIZE);
+ 	acpi_realmode = TRAMPOLINE_SYM(acpi_wakeup_code);
  
- 	header = (struct wakeup_header *)(acpi_realmode + HEADER_OFFSET);
- 	if (header->signature != 0x51ee1111) {
+ 	header = (struct wakeup_header *)(acpi_realmode + WAKEUP_HEADER_OFFSET);
+ 	if (header->signature != WAKEUP_HEADER_SIGNATURE) {
  		printk(KERN_ERR "wakeup header does not match\n");
  		return -EINVAL;
  	}
@@@ -111,45 -99,13 +100,6 @@@
  	return 0;
  }
  
- /**
-  * acpi_reserve_wakeup_memory - do _very_ early ACPI initialisation
-  *
-  * We allocate a page from the first 1MB of memory for the wakeup
-  * routine for when we come back from a sleep state. The
-  * runtime allocator allows specification of <16MB pages, but not
-  * <1MB pages.
-  */
- void __init acpi_reserve_wakeup_memory(void)
- {
- 	phys_addr_t mem;
- 
- 	if ((&wakeup_code_end - &wakeup_code_start) > WAKEUP_SIZE) {
- 		printk(KERN_ERR
- 		       "ACPI: Wakeup code way too big, S3 disabled.\n");
- 		return;
- 	}
- 
- 	mem = memblock_find_in_range(0, 1<<20, WAKEUP_SIZE, PAGE_SIZE);
- 
- 	if (mem == MEMBLOCK_ERROR) {
- 		printk(KERN_ERR "ACPI: Cannot allocate lowmem, S3 disabled.\n");
- 		return;
- 	}
- 	acpi_realmode = (unsigned long) phys_to_virt(mem);
- 	acpi_wakeup_address = mem;
- 	memblock_x86_reserve_range(mem, mem + WAKEUP_SIZE, "ACPI WAKEUP");
- }
- 
- int __init acpi_configure_wakeup_memory(void)
- {
- 	if (acpi_realmode)
- 		set_memory_x(acpi_realmode, WAKEUP_SIZE >> PAGE_SHIFT);
- 
- 	return 0;
- }
- arch_initcall(acpi_configure_wakeup_memory);
- 
- 
 -/*
 - * acpi_restore_state - undo effects of acpi_save_state_mem
 - */
 -void acpi_restore_state_mem(void)
 -{
 -}
 -
  static int __init acpi_sleep_setup(char *str)
  {
  	while ((str != NULL) && (*str != '\0')) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: linux-next: manual merge of the tip tree with the acpi tree
  2011-02-24  4:52 linux-next: manual merge of the tip tree with the acpi tree Stephen Rothwell
@ 2011-02-24 10:29 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2011-02-24 10:29 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
	linux-next, linux-kernel, Len Brown

On Thursday, February 24, 2011, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the tip tree got a conflict in
> arch/x86/kernel/acpi/sleep.c between commit
> a69fa313606a51cee99d802c14895330948f60c8 ("ACPI / PM: Drop
> acpi_restore_state_mem()") from the acpi tree and commit
> d1ee433539ea5963a8f946f3428b335d1c5fdb20 ("x86, trampoline: Use the
> unified trampoline setup for ACPI wakeup") from the tip tree.
> 
> Just context (I think).

Yes.  The ACPI tree renames a function that the x86 tree modifies.

> I fixed it up (see below) and can carry the fix as necessary.

Please do, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-24 10:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-24  4:52 linux-next: manual merge of the tip tree with the acpi tree Stephen Rothwell
2011-02-24 10:29 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox