1. 25 5月, 2008 7 次提交
    • P
      x86 boot: proper use of ARRAY_SIZE instead of repeated E820MAX constant · c3965bd1
      Paul Jackson 提交于
      This patch is motivated by a subsequent patch which will allow for more
      memory map entries on EFI supported systems than can be passed via the x86
      legacy BIOS E820 interface.  The legacy interface is limited to E820MAX ==
      128 memory entries, and that "E820MAX" manifest constant was used as the
      size for several arrays and loops over those arrays.
      
      The primary change in this patch is to change code loop sizes over those
      arrays from using the constant E820MAX, to using the ARRAY_SIZE() macro
      evaluated for the array being looped.  That way, a subsequent patch can
      change the size of some of these arrays, without breaking this code.
      
      This patch also adds a parameter to the sanitize_e820_map() routine,
      which had an implicit size for the array passed it of E820MAX entries.
      This new parameter explicitly passes the size of said array.  Once again,
      this will allow a subsequent patch to change that array size for some
      calls to sanitize_e820_map() without breaking the code.
      
      As part of enhancing the sanitize_e820_map() interface this way, I further
      combined the unnecessarily distinct x86_32 and x86_64 declarations for
      this routine into a single, commonly used, declaration.
      
      This patch in itself should make no difference to the resulting kernel
      binary.
      
      [ mingo@elte.hu: merged to -tip ]
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c3965bd1
    • P
      x86 boot: simplify pageblock_bits enum declaration · c801ed38
      Paul Jackson 提交于
      The use of #defines with '##' pre-processor concatenation is a useful
      way to form several symbol names with a common pattern.  But when there
      is just a single name obtained from that #define, it's just obfuscation.
      Better to just write the plain symbol name, as is.
      
      The following patch is a result of my wasting ten minutes looking through
      the kernel to figure out what 'PB_migrate_end' meant, and forgetting what
      I came to do, by the time I figured out that the #define PB_range macro
      defined it.
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c801ed38
    • P
      x86 boot: remove some unused extern function declarations · e9197bf0
      Paul Jackson 提交于
      Remove three extern declarations for routines
      that don't exist.  Fix a typo in a comment.
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e9197bf0
    • P
      x86 boot: include missing smp.h header · e3f8ba81
      Paul Jackson 提交于
      The patch:
          x86: convert cpu_to_apicid to be a per cpu variable
      introduced a dependency of ipi.h on smp.h in x86
      builds with an allnoconfig.  Including smp.h in ipi.h
      fixes the build error:
          In file included from arch/x86/kernel/traps_64.c:48:
          include/asm/ipi.h: In function 'send_IPI_mask_sequence':
          include/asm/ipi.h:114: error: 'per_cpu__x86_cpu_to_apicid' undeclared (first use in this function)
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Cc: Mike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e3f8ba81
    • Y
      x86: make e820.c to have common functions · b79cd8f1
      Yinghai Lu 提交于
      remove the duplicated copy of these functions.
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b79cd8f1
    • Y
      x86: fix trimming e820 with MTRR holes. · 42651f15
      Yinghai Lu 提交于
      converting MTRR layout from continous to discrete, some time could run out of
      MTRRs. So add gran_sizek to prevent that by dumpping small RAM piece less than
      gran_sizek.
      
      previous trimming only can handle highest_pfn from mtrr to end_pfn from e820.
      when have more than 4g RAM installed, there will be holes below 4g. so need to
      check ram below 4g is coverred well.
      
      need to be applied after
      	[PATCH] x86: mtrr cleanup for converting continuous to discrete layout v7
      Signed-off-by: NYinghai Lu <yinghai.lu@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      42651f15
    • A
      x86: move i386 memory setup code to e820_32.c · 0dbfafa5
      Alexander van Heukelum 提交于
      The x86_64 code has centralized the memory setup code in
      e820_64.c. This patch copies that approach to i386:
      
      - early_param("mem", ...) parsing is moved from
      setup_32.c to e820_32.c.
      
      - setup_memory_map() and finish_e820_parsing() are
      factored out from setup_arch(), and declarations
      are added to e820_32.h.
      
      - print_memory_map() is made static and removed from
      e820_32.h.
      
      - user_defined_memmap is marked as __initdata.
      Signed-off-by: NAlexander van Heukelum <heukelum@fastmail.fm>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      0dbfafa5
  2. 22 5月, 2008 2 次提交
  3. 21 5月, 2008 4 次提交
  4. 20 5月, 2008 20 次提交
  5. 19 5月, 2008 7 次提交