1. 15 2月, 2019 1 次提交
  2. 20 10月, 2016 1 次提交
    • A
      x86/platform/UV: Fix support for EFI_OLD_MEMMAP after BIOS callback updates · caef78b6
      Alex Thorlton 提交于
      Some time ago, we brought our UV BIOS callback code up to speed with the
      new EFI memory mapping scheme, in commit:
      
          d1be84a2 ("x86/uv: Update uv_bios_call() to use efi_call_virt_pointer()")
      
      By leveraging some changes that I made to a few of the EFI runtime
      callback mechanisms, in commit:
      
          80e75596 ("efi: Convert efi_call_virt() to efi_call_virt_pointer()")
      
      This got everything running smoothly on UV, with the new EFI mapping
      code.  However, this left one, small loose end, in that EFI_OLD_MEMMAP
      (a.k.a. efi=old_map) will no longer work on UV, on kernels that include
      the aforementioned changes.
      
      At the time this was not a major issue (in fact, it still really isn't),
      but there's no reason that EFI_OLD_MEMMAP *shouldn't* work on our
      systems.  This commit adds a check into uv_bios_call(), to see if we have
      the EFI_OLD_MEMMAP bit set in efi.flags.  If it is set, we fall back to
      using our old callback method, which uses efi_call() directly on the __va()
      of our function pointer.
      Signed-off-by: NAlex Thorlton <athorlton@sgi.com>
      Acked-by: NMatt Fleming <matt@codeblueprint.co.uk>
      Cc: <stable@vger.kernel.org> # v4.7 and later
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Mike Travis <travis@sgi.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Russ Anderson <rja@sgi.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/1476928131-170101-1-git-send-email-athorlton@sgi.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      caef78b6
  3. 14 9月, 2016 1 次提交
    • M
      x86: Clean up various simple wrapper functions · f148b41e
      Masahiro Yamada 提交于
      Remove unneeded variables and assignments.
      
      While we are here, let's fix the following as well:
      
        - Remove unnecessary parentheses
        - Remove unnecessary unsigned-suffix 'U' from constant values
        - Reword the comment in set_apic_id() (suggested by Thomas Gleixner)
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Alex Thorlton <athorlton@sgi.com>
      Cc: Andrew Banman <abanman@sgi.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Daniel J Blueman <daniel@numascale.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Mike Travis <travis@sgi.com>
      Cc: Nathan Zimmer <nzimmer@sgi.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steffen Persvold <sp@numascale.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Toshi Kani <toshi.kani@hpe.com>
      Cc: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
      Link: http://lkml.kernel.org/r/1473573502-27954-1-git-send-email-yamada.masahiro@socionext.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      f148b41e
  4. 11 8月, 2016 1 次提交
    • A
      x86/platform/uv: Skip UV runtime services mapping in the efi_runtime_disabled case · f72075c9
      Alex Thorlton 提交于
      This problem has actually been in the UV code for a while, but we didn't
      catch it until recently, because we had been relying on EFI_OLD_MEMMAP
      to allow our systems to boot for a period of time.  We noticed the issue
      when trying to kexec a recent community kernel, where we hit this NULL
      pointer dereference in efi_sync_low_kernel_mappings():
      
       [    0.337515] BUG: unable to handle kernel NULL pointer dereference at 0000000000000880
       [    0.346276] IP: [<ffffffff8105df8d>] efi_sync_low_kernel_mappings+0x5d/0x1b0
      
      The problem doesn't show up with EFI_OLD_MEMMAP because we skip the
      chunk of setup_efi_state() that sets the efi_loader_signature for the
      kexec'd kernel.  When the kexec'd kernel boots, it won't set EFI_BOOT in
      setup_arch, so we completely avoid the bug.
      
      We always kexec with noefi on the command line, so this shouldn't be an
      issue, but since we're not actually checking for efi_runtime_disabled in
      uv_bios_init(), we end up trying to do EFI runtime callbacks when we
      shouldn't be. This patch just adds a check for efi_runtime_disabled in
      uv_bios_init() so that we don't map in uv_systab when runtime_disabled ==
      true.
      Signed-off-by: NAlex Thorlton <athorlton@sgi.com>
      Signed-off-by: NMatt Fleming <matt@codeblueprint.co.uk>
      Cc: <stable@vger.kernel.org> # v4.7
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Travis <travis@sgi.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Russ Anderson <rja@sgi.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/1470912120-22831-2-git-send-email-matt@codeblueprint.co.ukSigned-off-by: NIngo Molnar <mingo@kernel.org>
      f72075c9
  5. 10 8月, 2016 1 次提交
  6. 27 6月, 2016 1 次提交
    • A
      x86/uv: Update uv_bios_call() to use efi_call_virt_pointer() · d1be84a2
      Alex Thorlton 提交于
      Now that the efi_call_virt() macro has been generalized to be able to
      use EFI system tables besides efi.systab, we are able to convert our
      uv_bios_call() wrapper to use this standard EFI callback mechanism.
      
      This simple change is part of a much larger effort to recover from some
      issues with the way we were mapping in some of our MMRs, and the way
      that we were doing our BIOS callbacks, which were uncovered by commit
      67a9108e ("x86/efi: Build our own page table structures").
      
      The first issue that this uncovered was that we were relying on the EFI
      memory mapping mechanism to map in our MMR space for us, which, while
      reliable, was technically a bug, as it relied on "undefined" behavior in
      the mapping code.
      
      The reason we were able to piggyback on the EFI memory mapping code to
      map in our MMRs was because, previously, EFI code used the
      trampoline_pgd, which shares a few entries with the main kernel pgd.  It
      just so happened, that the memory range containing our MMRs was inside
      one of those shared regions, which kept our code working without issue
      for quite a while.
      
      Anyways, once we discovered this problem, we brought back our original
      code to map in the MMRs with commit:
      
        08914f43 ("x86/platform/UV: Bring back the call to map_low_mmrs in uv_system_init")
      
      This got our systems a little further along, but we were still running
      into trouble with our EFI callbacks, which prevented us from booting
      all the way up.
      
      Our first step towards fixing the BIOS callbacks was to get our
      uv_bios_call() wrapper updated to use efi_call_virt() instead of the plain
      efi_call().  The previous patch took care of the effort needed to make
      that possible.  Along the way, we hit a major issue with some confusion
      about how to properly pull arguments higher than number 6 off the stack
      in the efi_call() code, which resulted in the following commit from Linus:
      
        683ad809 ("x86/efi: Fix 7-parameter efi_call()s")
      
      Now that all of those issues are out of the way, we're able to make this
      simple change to use the new efi_call_virt_pointer() in uv_bios_call()
      which gets our machines booting, running properly, and able to execute our
      callbacks with 6+ arguments.
      
      Note that, since we are now using the EFI page table when we make our
      function call, we are no longer able to make the call using the __va()
      of our function pointer, since the memory range containing that address
      isn't mapped into the EFI page table.  For now, we will use the physical
      address of the function directly, since that is mapped into the EFI page
      table.  In the near future, we're going to get some code added in to
      properly update our function pointer to its virtual address during
      SetVirtualAddressMap.
      Signed-off-by: NAlex Thorlton <athorlton@sgi.com>
      Signed-off-by: NMatt Fleming <matt@codeblueprint.co.uk>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Roy Franz <roy.franz@linaro.org>
      Cc: Russ Anderson <rja@sgi.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/1466839230-12781-6-git-send-email-matt@codeblueprint.co.ukSigned-off-by: NIngo Molnar <mingo@kernel.org>
      d1be84a2
  7. 04 5月, 2016 1 次提交
  8. 17 4月, 2014 1 次提交
    • M
      x86/efi: Delete most of the efi_call* macros · 62fa6e69
      Matt Fleming 提交于
      We really only need one phys and one virt function call, and then only
      one assembly function to make firmware calls.
      
      Since we are not using the C type system anyway, we're not really losing
      much by deleting the macros apart from no longer having a check that
      we are passing the correct number of parameters. The lack of duplicated
      code seems like a worthwhile trade-off.
      
      Cc: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      62fa6e69
  9. 01 11月, 2011 1 次提交
    • P
      x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULE · 69c60c88
      Paul Gortmaker 提交于
      These files were implicitly getting EXPORT_SYMBOL via device.h
      which was including module.h, but that will be fixed up shortly.
      
      By fixing these now, we can avoid seeing things like:
      
      arch/x86/kernel/rtc.c:29: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
      arch/x86/kernel/pci-dma.c:20: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
      arch/x86/kernel/e820.c:69: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’
      
      [ with input from Randy Dunlap <rdunlap@xenotime.net> and also
        from Stephen Rothwell <sfr@canb.auug.org.au> ]
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      69c60c88
  10. 27 10月, 2010 1 次提交
  11. 06 2月, 2010 1 次提交
  12. 18 12月, 2009 1 次提交
  13. 16 12月, 2009 1 次提交
  14. 04 4月, 2009 1 次提交
  15. 30 12月, 2008 1 次提交
  16. 17 12月, 2008 1 次提交
  17. 06 11月, 2008 3 次提交
  18. 22 10月, 2008 1 次提交
  19. 16 10月, 2008 2 次提交
  20. 15 8月, 2008 1 次提交
  21. 18 7月, 2008 1 次提交
    • R
      x86 BIOS interface for RTC on SGI UV · 7019cc2d
      Russ Anderson 提交于
      Real-time code needs to know the number of cycles per second
      on SGI UV.  The information is provided via a run time BIOS
      call.  This patch provides the linux side of that interface.
      This is the first of several run time BIOS calls to be defined
      in uv/bios.h and bios_uv.c.
      
      Note that BIOS_CALL() is just a stub for now.  The bios
      side is being worked on.
      Signed-off-by: NRuss Anderson <rja@sgi.com>
      Cc: Jack Steiner <steiner@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7019cc2d