1. 10 11月, 2011 1 次提交
  2. 13 5月, 2011 1 次提交
    • S
      x86,xen: introduce x86_init.mapping.pagetable_reserve · 279b706b
      Stefano Stabellini 提交于
      Introduce a new x86_init hook called pagetable_reserve that at the end
      of init_memory_mapping is used to reserve a range of memory addresses for
      the kernel pagetable pages we used and free the other ones.
      
      On native it just calls memblock_x86_reserve_range while on xen it also
      takes care of setting the spare memory previously allocated
      for kernel pagetable pages from RO to RW, so that it can be used for
      other purposes.
      
      A detailed explanation of the reason why this hook is needed follows.
      
      As a consequence of the commit:
      
      commit 4b239f45
      Author: Yinghai Lu <yinghai@kernel.org>
      Date:   Fri Dec 17 16:58:28 2010 -0800
      
          x86-64, mm: Put early page table high
      
      at some point init_memory_mapping is going to reach the pagetable pages
      area and map those pages too (mapping them as normal memory that falls
      in the range of addresses passed to init_memory_mapping as argument).
      Some of those pages are already pagetable pages (they are in the range
      pgt_buf_start-pgt_buf_end) therefore they are going to be mapped RO and
      everything is fine.
      Some of these pages are not pagetable pages yet (they fall in the range
      pgt_buf_end-pgt_buf_top; for example the page at pgt_buf_end) so they
      are going to be mapped RW.  When these pages become pagetable pages and
      are hooked into the pagetable, xen will find that the guest has already
      a RW mapping of them somewhere and fail the operation.
      The reason Xen requires pagetables to be RO is that the hypervisor needs
      to verify that the pagetables are valid before using them. The validation
      operations are called "pinning" (more details in arch/x86/xen/mmu.c).
      
      In order to fix the issue we mark all the pages in the entire range
      pgt_buf_start-pgt_buf_top as RO, however when the pagetable allocation
      is completed only the range pgt_buf_start-pgt_buf_end is reserved by
      init_memory_mapping. Hence the kernel is going to crash as soon as one
      of the pages in the range pgt_buf_end-pgt_buf_top is reused (b/c those
      ranges are RO).
      
      For this reason we need a hook to reserve the kernel pagetable pages we
      used and free the other ones so that they can be reused for other
      purposes.
      On native it just means calling memblock_x86_reserve_range, on Xen it
      also means marking RW the pagetable pages that we allocated before but
      that haven't been used before.
      
      Another way to fix this is without using the hook is by adding a 'if
      (xen_pv_domain)' in the 'init_memory_mapping' code and calling the Xen
      counterpart, but that is just nasty.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Acked-by: NYinghai Lu <yinghai@kernel.org>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      279b706b
  3. 16 3月, 2011 1 次提交
    • D
      x86: Introduce pci_map_biosrom() · 5d94e81f
      Dan Williams 提交于
      The isci driver needs to retrieve its preboot OROM image which contains
      necessary runtime parameters like platform specific sas addresses and
      phy configuration.  There is no ROM BAR associated with this area,
      instead we will need to scan legacy expansion ROM space.
      
      1/ Promote the probe_roms_32 implementation to x86-64
      2/ Add a facility to find and map an adapter rom by pci device (according to
         PCI Firmware Specification Revision 3.0)
      Signed-off-by: NDave Jiang <dave.jiang@intel.com>
      LKML-Reference: <20110308183226.6246.90354.stgit@localhost6.localdomain6>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      5d94e81f
  4. 15 2月, 2011 1 次提交
  5. 18 10月, 2010 1 次提交
  6. 08 7月, 2010 2 次提交
  7. 27 2月, 2010 1 次提交
    • R
      x86: Enable NMI on all cpus on UV · 78c06176
      Russ Anderson 提交于
      Enable NMI on all cpus in UV system and add an NMI handler
      to dump_stack on each cpu.
      
      By default on x86 all the cpus except the boot cpu have NMI
      masked off.  This patch enables NMI on all cpus in UV system
      and adds an NMI handler to dump_stack on each cpu.  This
      way if a system hangs we can NMI the machine and get a
      backtrace from all the cpus.
      
      Version 2: Use x86_platform driver mechanism for nmi init, per
                 Ingo's suggestion.
      
      Version 3: Clean up Ingo's nits.
      Signed-off-by: NRuss Anderson <rja@sgi.com>
      LKML-Reference: <20100226164912.GA24439@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      78c06176
  8. 20 2月, 2010 3 次提交
  9. 24 11月, 2009 2 次提交
  10. 16 11月, 2009 1 次提交
  11. 15 11月, 2009 1 次提交
  12. 10 11月, 2009 1 次提交
    • F
      x86: Add iommu_init to x86_init_ops · d07c1be0
      FUJITA Tomonori 提交于
      We call the detections functions of all the IOMMUs then all
      their initialization functions. The latter is pointless since we
      don't detect multiple different IOMMUs. What we need to do is
      calling the initialization function of the detected IOMMU.
      
      This adds iommu_init hook to x86_init_ops so if an IOMMU
      detection function can set its initialization function to the
      hook.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: chrisw@sous-sol.org
      Cc: dwmw2@infradead.org
      Cc: joerg.roedel@amd.com
      Cc: muli@il.ibm.com
      LKML-Reference: <1257849980-22640-2-git-send-email-fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d07c1be0
  13. 08 11月, 2009 1 次提交
    • F
      x86: Use x86_platform for iommu_shutdown · 338bac52
      FUJITA Tomonori 提交于
      This patch cleans up pci_iommu_shutdown() a bit to use
      x86_platform (similar to how IA64 initializes an IOMMU driver).
      
      This adds iommu_shutdown() to x86_platform to avoid calling
      every IOMMUs' shutdown functions in pci_iommu_shutdown() in
      order. The IOMMU shutdown functions are platform specific (we
      don't have multiple different IOMMU hardware) so the current way
      is pointless.
      
      An IOMMU driver sets x86_platform.iommu_shutdown to the shutdown
      function if necessary.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: joerg.roedel@amd.com
      LKML-Reference: <20091027163358F.fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      338bac52
  14. 16 9月, 2009 2 次提交
  15. 31 8月, 2009 11 次提交
  16. 27 8月, 2009 10 次提交
    • T
      x86: Move oem_bus_info to x86_init_ops · 90e1c696
      Thomas Gleixner 提交于
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      90e1c696
    • T
      x86: Move smp_read_mpc_oem to x86_init_ops. · 72302142
      Thomas Gleixner 提交于
      Move smp_read_mpc_oem from quirks to x86_init.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      72302142
    • T
      x86: Move mpc_apic_id to x86_init_ops · fd6c6661
      Thomas Gleixner 提交于
      The mpc_apic_id setup is handled by a x86_quirk. Make it a
      x86_init_ops function with a default implementation.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      fd6c6661
    • T
      x86: Move ioapic_ids_setup to x86_init_ops · de934103
      Thomas Gleixner 提交于
      32bit and also the numaq code have special requirements on the
      ioapic_id setup. Convert it to a x86_init_ops function and get rid
      of the quirks and #ifdefs
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      de934103
    • T
      x86: Sanitize smp_record and move it to x86_init_ops · f4848472
      Thomas Gleixner 提交于
      The x86 quirkification introduced an extra ugly hackery with a
      variable pointer in the mpparse code. If the pointer is initialized
      then it is dereferenced and the variable set to 0 or incremented.
      
      Create a x86_init_ops function and let the affected numaq code
      hold the function. Default init is a setup noop.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      f4848472
    • T
      x86: Move memory_setup to x86_init_ops · 6b18ae3e
      Thomas Gleixner 提交于
      memory_setup is overridden by x86_quirks and by paravirts with weak
      functions and quirks. Unify the whole mess and make it an
      unconditional x86_init_ops function which defaults to the standard
      function and can be overridden by the early platform code.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      6b18ae3e
    • T
      x86: Add reserve_ebda_region to x86_init_ops · 816c25e7
      Thomas Gleixner 提交于
      reserve_ebda_region needs to be called befor start_kernel. Moorestown
      needs to override it. Make it a x86_init_ops function and initialize
      it with the default reserve_ebda_region.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      816c25e7
    • T
      x86: Add request_standard_resources to x86_init · 8fee697d
      Thomas Gleixner 提交于
      The 32bit and the 64bit code are slighty different in the reservation
      of standard resources. Also the upcoming Moorestown support needs its
      own version of that.
      
      Add it to x86_init_ops and initialize it with the 64bit default. 32bit
      overrides it in early boot. Now moorestown can add it's own override
      w/o sprinkling the code with more #ifdefs
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      8fee697d
    • T
      x86: Add probe_roms to x86_init · f7cf5a5b
      Thomas Gleixner 提交于
      probe_roms is only used on 32bit. Add it to the x86_init ops and
      remove the #ifdefs.
      
      Default initializer is x86_init_noop() which is overridden in
      the 32bit boot code.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      f7cf5a5b
    • T
      x86: Add x86_init infrastructure · 57844a8f
      Thomas Gleixner 提交于
      The upcoming Moorestown support brings the embedded world to x86. The
      setup code of x86 has already a couple of hooks which are either
      x86_quirks or paravirt ops. Some of those setup hooks are pretty
      convoluted like the timer setup and the tsc calibration code. But
      there are other places which could do with a cleanup.
      
      Instead of having inline functions/macros which are modified at
      compile time I decided to introduce x86_init ops which are
      unconditional in the code and make it clear that they can be changed
      either during compile time or in the early boot process. The function
      pointers are initialized by default functions which can be noops so
      that the pointer can be called unconditionally in the most cases. This
      also allows us to remove 32bit/64bit, paravirt and other #ifdeffery.
      
      paravirt guests are just a hardware platform in the setup code, so we
      should treat them as such and not hide all behind multiple layers of
      indirection and compile time dependencies.
      
      It's more obvious that x86_init.timers.timer_init() is a function
      pointer than the late_time_init = choose_time_init() obscurity. It's
      also way simpler to grep for x86_init.timers.timer_init and find all
      the places which modify that function pointer instead of analyzing
      weak functions, macros and paravirt indirections.
      
      Note. This is not a general paravirt_ops replacement. It just will
      move setup related hooks which are potentially useful for other
      platform setup purposes as well out of the paravirt domain.
      
      Add the base infrastructure without any functionality.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      57844a8f