Skip to content
  1. Feb 01, 2008
  2. Jan 31, 2008
  3. Jan 30, 2008
    • Avi Kivity's avatar
      KVM: Export include/linux/kvm.h only if $ARCH actually supports KVM · fb56dbb3
      Avi Kivity authored
      
      
      Currently, make headers_check barfs due to <asm/kvm.h>, which <linux/kvm.h>
      includes, not existing.  Rather than add a zillion <asm/kvm.h>s, export kvm.h
      only if the arch actually supports it.
      
      Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
      fb56dbb3
    • Yinghai Lu's avatar
      x86: fix nodemap_size according to nodeid bits · afadcd78
      Yinghai Lu authored
      
      
      memnode.map is s16 array because of nodeid is 16 bit now.
      
      so need to increase the nodemap_size according to that bits.
      
      Signed-off-by: default avatarYinghai Lu <yinghai.lu@sun.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      afadcd78
    • Yinghai Lu's avatar
      x86: fix overlap between pagetable with bss section · 91987157
      Yinghai Lu authored
      
      
      one early crash on one 8 node 256g machine:
      
      Command line: console=uart8250,io,0x3f8,115200n8 initrd=kernel.org/mydisk11_x86_64.gz rw root=/dev/ram0 debug initcall_debug apic=debug acpi.debug_level=0x0000000f pci=routeirq ip=dhcp load_ramdisk=1 ramdisk_size=131072 BOOT_IMAGE=kernel.org/bzImage_2.6.25_k8.1
      BIOS-provided physical RAM map:
       BIOS-e820: 0000000000000000 - 000000000009bc00 (usable)
       BIOS-e820: 000000000009bc00 - 00000000000a0000 (reserved)
       BIOS-e820: 00000000000e6000 - 0000000000100000 (reserved)
       BIOS-e820: 0000000000100000 - 00000000dffe0000 (usable)
       BIOS-e820: 00000000dffe0000 - 00000000dffee000 (ACPI data)
       BIOS-e820: 00000000dffee000 - 00000000dffff050 (ACPI NVS)
       BIOS-e820: 00000000dffff050 - 00000000e0000000 (reserved)
       BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
       BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
       BIOS-e820: 00000000ff700000 - 0000000100000000 (reserved)
       BIOS-e820: 0000000100000000 - 0000004020000000 (usable)
      Early serial console at I/O port 0x3f8 (options '115200n8')
      console [uart0] enabled
      end_pfn_map = 67239936
      Kernel panic - not syncing: Duplicated early reservation d40000-e42000
      
      Pid: 0, comm: swapper Not tainted 2.6.24-smp-g5a514e21-dirty #3
      
      Call Trace:
       [<ffffffff80221545>] lapic_get_maxlvt+0x0/0x10
       [<ffffffff80221657>] clear_local_APIC+0x5/0xcf
       [<ffffffff80221726>] disable_local_APIC+0x5/0x17
       [<ffffffff8021fe16>] smp_send_stop+0x46/0x4c
       [<ffffffff80235293>] panic+0x94/0x13e
       [<ffffffff80bc3b03>] sctp_eps_proc_init+0x12/0x34
       [<ffffffff80b9f1c5>] reserve_early+0x30/0x6c
       [<ffffffff80803925>] init_memory_mapping+0x2cd/0x2dc
       [<ffffffff80b9dc01>] setup_arch+0x21f/0x44e
       [<ffffffff80b978be>] start_kernel+0x6f/0x2c7
       [<ffffffff80b971cc>] _sinittext+0x1cc/0x1d3
      
      it turns out there is overlap between pgtable and bss...
      
      in System.map we have
      ffffffff80d40420 b rsi_table
      ffffffff80d40620 B krb5_seq_lock
      ffffffff80d40628 b i.20437
      ffffffff80d40630 b xprt_rdma_inline_write_padding
      ffffffff80d40638 b sunrpc_table_header
      ffffffff80d40640 b zero
      ffffffff80d40644 b min_memreg
      ffffffff80d40648 b rpcrdma_tk_lock_g
      ffffffff80d40650 B sctp_assocs_id_lock
      ffffffff80d40658 B proc_net_sctp
      ffffffff80d40660 B sctp_assocs_id
      ffffffff80d40680 B sysctl_sctp_mem
      ffffffff80d40690 B sysctl_sctp_rmem
      ffffffff80d406a0 B sysctl_sctp_wmem
      ffffffff80d406b0 b sctp_ctl_socket
      ffffffff80d406b8 b sctp_pf_inet6_specific
      ffffffff80d406c0 b sctp_pf_inet_specific
      ffffffff80d406c8 b sctp_af_v4_specific
      ffffffff80d406d0 b sctp_af_v6_specific
      ffffffff80d406d8 b sctp_rand.33270
      ffffffff80d406dc b sctp_memory_pressure
      ffffffff80d406e0 b sctp_sockets_allocated
      ffffffff80d406e4 b sctp_memory_allocated
      ffffffff80d406e8 b sctp_sysctl_header
      ffffffff80d406f0 b zero
      ffffffff80d406f4 A __bss_stop
      ffffffff80d406f4 A _end
      
      need to round up table_start to PAGE_SIZE.
      
      also make the panic more informative.
      
      Signed-off-by: default avatarYinghai Lu <yinghai.lu@sun.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      91987157
    • Joachim Deguara's avatar
      x86: add PCI IDs to k8topology_64.c · bb4a1d64
      Joachim Deguara authored
      
      
      This just adds the PCI IDs of AMD's family 10h and 11h CPU's northbridges to
      k8topology discovery.
      
      Signed-off-by: default avatarJoachim Deguara <joachim.deguara@amd.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Acked-by: default avatarYinghai Lu <yinghai.lu@sun.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      bb4a1d64
    • Jeremy Fitzhardinge's avatar
      x86: fix early_ioremap pagetable ops · f6df72e7
      Jeremy Fitzhardinge authored
      
      
      Put appropriate pagetable update hooks in so that paravirt knows
      what's going on in there.
      
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      f6df72e7
    • Jeremy Fitzhardinge's avatar
      x86: use the same pgd_list for PAE and 64-bit · e3ed910d
      Jeremy Fitzhardinge authored
      
      
      Use a standard list threaded through page->lru for maintaining the pgd
      list on PAE.  This is the same as 64-bit, and seems saner than using a
      non-standard list via page->index.
      
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      e3ed910d
    • Bernhard Kaindl's avatar
      x86: early boot debugging via FireWire (ohci1394_dma=early) · f212ec4b
      Bernhard Kaindl authored
      This patch adds a new configuration option, which adds support for a new
      early_param which gets checked in arch/x86/kernel/setup_{32,64}.c:setup_arch()
      to decide wether OHCI-1394 FireWire controllers should be initialized and
      enabled for physical DMA access to allow remote debugging of early problems
      like issues ACPI or other subsystems which are executed very early.
      
      If the config option is not enabled, no code is changed, and if the boot
      paramenter is not given, no new code is executed, and independent of that,
      all new code is freed after boot, so the config option can be even enabled
      in standard, non-debug kernels.
      
      With specialized tools, it is then possible to get debugging information
      from machines which have no serial ports (notebooks) such as the printk
      buffer contents, or any data which can be referenced from global pointers,
      if it is stored below the 4GB limit and even memory dumps of of the physical
      RAM region below the 4GB limit can be taken without any cooperation from the
      CPU of the host, so the machine can be crashed early, it does not matter.
      
      In the extreme, even kernel debuggers can be accessed in this way. I wrote
      a small kgdb module and an accompanying gdb stub for FireWire which allows
      to gdb to talk to kgdb using remote remory reads and writes over FireWire.
      
      An version of the gdb stub fore FireWire is able to read all global data
      from a system which is running a a normal kernel without any kernel debugger,
      without any interruption or support of the system's CPU. That way, e.g. the
      task struct and so on can be read and even manipulated when the physical DMA
      access is granted.
      
      A HOWTO is included in this patch, in Documentation/debugging-via-ohci1394.txt
      and I've put a copy online at
      ftp://ftp.suse.de/private/bk/firewire/docs/debugging-via-ohci1394.txt
      
      It also has links to all the tools which are available to make use of it
      another copy of it is online at:
      ftp://ftp.suse.de/private/bk/firewire/kernel/ohci1394_dma_early-v2.diff
      
      
      
      Signed-Off-By: default avatarBernhard Kaindl <bk@suse.de>
      Tested-By: default avatarThomas Renninger <trenn@suse.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      f212ec4b
    • Jeremy Fitzhardinge's avatar
      x86: don't special-case pmd allocations as much · 6194ba6f
      Jeremy Fitzhardinge authored
      
      
      In x86 PAE mode, stop treating pmds as a special case.  Previously
      they were always allocated and freed with the pgd.  The modifies the
      code to be the same as 64-bit mode, where they are allocated on
      demand.
      
      This is a step on the way to unifying 32/64-bit pagetable allocation
      as much as possible.
      
      There is a complicating wart, however.  When you install a new
      reference to a pmd in the pgd, the processor isn't guaranteed to see
      it unless you reload cr3.  Since reloading cr3 also has the
      side-effect of flushing the tlb, this is an expense that we want to
      avoid whereever possible.
      
      This patch simply avoids reloading cr3 unless the update is to the
      current pagetable.  Later patches will optimise this further.
      
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: William Irwin <wli@holomorphy.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      6194ba6f
    • Harvey Harrison's avatar
      x86: shrink some ifdefs in fault.c · fd40d6e3
      Harvey Harrison authored
      
      
      The change from current to tsk in do_page_fault is safe as
      this is set at the very beginning of the function.
      
      Removes a likely() annotation from the 64-bit version, this
      could have instead been added to 32-bit.
      
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      fd40d6e3