1. 31 8月, 2009 9 次提交
  2. 27 8月, 2009 2 次提交
  3. 18 7月, 2009 1 次提交
  4. 23 6月, 2009 1 次提交
    • P
      x86: Move init_gbpages() to setup_arch() · 854c879f
      Pekka J Enberg 提交于
      The init_gbpages() function is conditionally called from
      init_memory_mapping() function. There are two call-sites where
      this 'after_bootmem' condition can be true: setup_arch() and
      mem_init() via pci_iommu_alloc().
      
      Therefore, it's safe to move the call to init_gbpages() to
      setup_arch() as it's always called before mem_init().
      
      This removes an after_bootmem use - paving the way to remove
      all uses of that state variable.
      Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Acked-by: NYinghai Lu <yinghai@kernel.org>
      LKML-Reference: <Pine.LNX.4.64.0906221731210.19474@melkki.cs.Helsinki.FI>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      854c879f
  5. 12 6月, 2009 1 次提交
  6. 12 5月, 2009 1 次提交
    • H
      x86: add extension fields for bootloader type and version · 5031296c
      H. Peter Anvin 提交于
      A long ago, in days of yore, it all began with a god named Thor.
      There were vikings and boats and some plans for a Linux kernel
      header.  Unfortunately, a single 8-bit field was used for bootloader
      type and version.  This has generally worked without *too* much pain,
      but we're getting close to flat running out of ID fields.
      
      Add extension fields for both type and version.  The type will be
      extended if it the old field is 0xE; the version is a simple MSB
      extension.
      
      Keep /proc/sys/kernel/bootloader_type containing
      (type << 4) + (ver & 0xf) for backwards compatiblity, but also add
      /proc/sys/kernel/bootloader_version which contains the full version
      number.
      
      [ Impact: new feature to support more bootloaders ]
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      5031296c
  7. 11 5月, 2009 1 次提交
  8. 30 4月, 2009 1 次提交
  9. 10 4月, 2009 1 次提交
  10. 30 3月, 2009 1 次提交
  11. 15 3月, 2009 5 次提交
    • J
      x86: allow extend_brk users to reserve brk space · 796216a5
      Jeremy Fitzhardinge 提交于
      Impact: new interface; remove hard-coded limit
      
      Add RESERVE_BRK(name, size) macro to reserve space in the brk
      area.  This should be a conservative (ie, larger) estimate of
      how much space might possibly be required from the brk area.
      Any unused space will be freed, so there's no real downside
      on making the reservation too large (within limits).
      
      The name should be unique within a given file, and somewhat
      descriptive.
      
      The C definition of RESERVE_BRK() ends up being more complex than
      one would expect to work around a cluster of gcc infelicities:
      
        The first attempt was to simply try putting __section(.brk_reservation)
        on a variable.  This doesn't work because it ends up making it a
        @progbits section, which gets actual space allocated in the vmlinux
        executable.
      
        The second attempt was to emit the space into a section using asm,
        but gcc doesn't allow arguments to be passed to file-level asm()
        statements, making it hard to pass in the size.
      
        The final attempt is to wrap the asm() in a function to allow
        it to have arguments, and put the function itself into the
        .discard section, which vmlinux*.lds drops entirely from the
        emitted vmlinux.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      796216a5
    • J
      x86: use brk allocation for DMI · 6de6cb44
      Jeremy Fitzhardinge 提交于
      Impact: use new interface instead of previous ad hoc implementation
      
      Use extend_brk() to allocate memory for DMI rather than having an
      ad-hoc allocator.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      6de6cb44
    • J
      x86-32: use brk segment for allocating initial kernel pagetable · ccf3fe02
      Jeremy Fitzhardinge 提交于
      Impact: use new interface instead of previous ad hoc implementation
      
      Rather than having special purpose init_pg_table_start/end variables
      to delimit the kernel pagetable built by head_32.S, just use the brk
      mechanism to extend the bss for the new pagetable.
      
      This patch removes init_pg_table_start/end and pg0, defines __brk_base
      (which is page-aligned and immediately follows _end), initializes
      the brk region to start there, and uses it for the 32-bit pagetable.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      ccf3fe02
    • H
      x86: move brk initialization out of #ifdef CONFIG_BLK_DEV_INITRD · 5368a2be
      H. Peter Anvin 提交于
      Impact: build fix
      
      The brk initialization functions were incorrectly located inside
      an #ifdef CONFIG_VLK_DEV_INITRD block, causing the obvious build failure in
      minimal configurations.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      5368a2be
    • J
      x86: add brk allocation for very, very early allocations · 93dbda7c
      Jeremy Fitzhardinge 提交于
      Impact: new interface
      
      Add a brk()-like allocator which effectively extends the bss in order
      to allow very early code to do dynamic allocations.  This is better than
      using statically allocated arrays for data in subsystems which may never
      get used.
      
      The space for brk allocations is in the bss ELF segment, so that the
      space is mapped properly by the code which maps the kernel, and so
      that bootloaders keep the space free rather than putting a ramdisk or
      something into it.
      
      The bss itself, delimited by __bss_stop, ends before the brk area
      (__brk_base to __brk_limit).  The kernel text, data and bss is reserved
      up to __bss_stop.
      
      Any brk-allocated data is reserved separately just before the kernel
      pagetable is built, as that code allocates from unreserved spaces
      in the e820 map, potentially allocating from any unused brk memory.
      Ultimately any unused memory in the brk area is used in the general
      kernel memory pool.
      
      Initially the brk space is set to 1MB, which is probably much larger
      than any user needs (the largest current user is i386 head_32.S's code
      to build the pagetables to map the kernel, which can get fairly large
      with a big kernel image and no PSE support).  So long as the system
      has sufficient memory for the bootloader to reserve the kernel+1MB brk,
      there are no bad effects resulting from an over-large brk.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      93dbda7c
  12. 05 3月, 2009 2 次提交
  13. 26 2月, 2009 2 次提交
  14. 23 2月, 2009 2 次提交
    • I
      x86: refactor x86_quirks support · 8e6dafd6
      Ingo Molnar 提交于
      Impact: cleanup
      
      Make x86_quirks support more transparent. The highlevel
      methods are now named:
      
        extern void x86_quirk_pre_intr_init(void);
        extern void x86_quirk_intr_init(void);
      
        extern void x86_quirk_trap_init(void);
      
        extern void x86_quirk_pre_time_init(void);
        extern void x86_quirk_time_init(void);
      
      This makes it clear that if some platform extension has to
      do something here that it is considered ... weird, and is
      discouraged.
      
      Also remove arch_hooks.h and move it into setup.h (and other
      header files where appropriate).
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8e6dafd6
    • I
      x86: remove various unused subarch hooks · d85a881d
      Ingo Molnar 提交于
      Impact: remove dead code
      
      Remove:
      
       - pre_setup_arch_hook()
       - mca_nmi_hook()
      
      If needed they can be added back via an x86_quirk handler.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d85a881d
  15. 18 2月, 2009 4 次提交
  16. 17 2月, 2009 1 次提交
  17. 11 2月, 2009 2 次提交
    • I
      x86, apic: make generic_apic_probe() generally available · 160d8dac
      Ingo Molnar 提交于
      Impact: build fix
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      160d8dac
    • A
      x86, apic: fix initialization of wakeup_cpu · 0e81cb59
      Alok Kataria 提交于
      With refactoring of wake_cpu macros the 32bit code in tip doesn't
      execute generic_apic_probe if CONFIG_X86_32_NON_STANDARD is not set.
      
      Even on a x86 STANDARD cpu we need to execute the generic_apic_probe
      function, as we rely on this function to execute the update_genapic
      quirk which initilizes apic->wakeup_cpu.
      
      Failing to do so results in we making a call to a null function in do_boot_cpu.
      
      The stack trace without the patch goes like this.
      
      Booting processor 1 APIC 0x1 ip 0x6000
      BUG: unable to handle kernel NULL pointer dereference at (null)
      IP: [<(null)>] (null)
      *pdpt = 0000000000839001 *pde = 0000000000c97067 *pte = 0000000000000163
      Oops: 0000 [#1] SMP
      last sysfs file:
      Modules linked in:
      
      Pid: 1, comm: swapper Not tainted (2.6.29-rc4-tip #18) VMware Virtual Platform
      EIP: 0062:[<00000000>] EFLAGS: 00010293 CPU: 0
      EIP is at 0x0
      EAX: 00000001 EBX: 00006000 ECX: c077ed00 EDX: 00006000
      ESI: 00000001 EDI: 00000001 EBP: ef04cf40 ESP: ef04cf1c
       DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 006a
      Process swapper (pid: 1, ti=ef04c000 task=ef050000 task.ti=ef04c000)
      Stack:
       c0644e52 00000000 ef04cf24 ef04cf24 c064468d c0886dc0 00000000 c0702aea
       ef055480 00000001 00000101 dead4ead ffffffff ffffffff c08af530 00000000
       c0709715 ef04cf60 ef04cf60 00000001 00000000 00000000 dead4ead ffffffff
      Call Trace:
       [<c0644e52>] ? native_cpu_up+0x2de/0x45b
       [<c064468d>] ? do_fork_idle+0x0/0x19
       [<c0645c5e>] ? _cpu_up+0x88/0xe8
       [<c0645d20>] ? cpu_up+0x42/0x4e
       [<c07e7462>] ? kernel_init+0x99/0x14b
       [<c07e73c9>] ? kernel_init+0x0/0x14b
       [<c040375f>] ? kernel_thread_helper+0x7/0x10
      Code:  Bad EIP value.
      EIP: [<00000000>] 0x0 SS:ESP 006a:ef04cf1c
      
      I think we should call generic_apic_probe unconditionally for 32 bit now.
      Signed-off-by: NAlok N Kataria <akataria@vmware.com>
      Acked-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0e81cb59
  18. 05 2月, 2009 1 次提交
  19. 30 1月, 2009 1 次提交
  20. 29 1月, 2009 1 次提交