소스 검색

x86/boot/e820: Remove e820_mark_nosave_regions() definition uglies

The e820_mark_nosave_regions definition has a number of ugly #ifdef
conditions that unnecessarily uglify both the header and the
e820.c file.

Make this function unconditional: most distro kernels have hibernation
enabled. If LTO functionality is added in the future it will be able
to eliminate unused functions without uglifying the source code.

No change in functionality.

Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Huang, Ying <ying.huang@intel.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Jackson <pj@sgi.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Ingo Molnar 8 년 전
부모
커밋
e79d74d085
2개의 변경된 파일0개의 추가작업 그리고 8개의 파일을 삭제
  1. 0 5
      arch/x86/include/asm/e820/api.h
  2. 0 3
      arch/x86/kernel/e820.c

+ 0 - 5
arch/x86/include/asm/e820/api.h

@@ -30,12 +30,7 @@ extern void e820_reserve_resources_late(void);
 extern void setup_memory_map(void);
 extern void setup_memory_map(void);
 extern char *default_machine_specific_memory_setup(void);
 extern char *default_machine_specific_memory_setup(void);
 extern void e820_reallocate_tables(void);
 extern void e820_reallocate_tables(void);
-
-#if defined(CONFIG_X86_64) || defined(CONFIG_X86_32) && defined(CONFIG_HIBERNATION)
 extern void e820_mark_nosave_regions(unsigned long limit_pfn);
 extern void e820_mark_nosave_regions(unsigned long limit_pfn);
-#else
-static inline void e820_mark_nosave_regions(unsigned long limit_pfn) { }
-#endif
 
 
 /*
 /*
  * Returns true iff the specified range [start,end) is completely contained inside
  * Returns true iff the specified range [start,end) is completely contained inside

+ 0 - 3
arch/x86/kernel/e820.c

@@ -696,8 +696,6 @@ void __init parse_e820_ext(u64 phys_addr, u32 data_len)
 	e820_print_map("extended");
 	e820_print_map("extended");
 }
 }
 
 
-#if defined(CONFIG_X86_64) || \
-	(defined(CONFIG_X86_32) && defined(CONFIG_HIBERNATION))
 /**
 /**
  * Find the ranges of physical addresses that do not correspond to
  * Find the ranges of physical addresses that do not correspond to
  * e820 RAM areas and mark the corresponding pages as nosave for
  * e820 RAM areas and mark the corresponding pages as nosave for
@@ -726,7 +724,6 @@ void __init e820_mark_nosave_regions(unsigned long limit_pfn)
 			break;
 			break;
 	}
 	}
 }
 }
-#endif
 
 
 #ifdef CONFIG_ACPI
 #ifdef CONFIG_ACPI
 /**
 /**