1. 09 1月, 2016 1 次提交
  2. 11 9月, 2015 1 次提交
    • D
      kexec: split kexec_load syscall from kexec core code · 2965faa5
      Dave Young 提交于
      There are two kexec load syscalls, kexec_load another and kexec_file_load.
       kexec_file_load has been splited as kernel/kexec_file.c.  In this patch I
      split kexec_load syscall code to kernel/kexec.c.
      
      And add a new kconfig option KEXEC_CORE, so we can disable kexec_load and
      use kexec_file_load only, or vice verse.
      
      The original requirement is from Ted Ts'o, he want kexec kernel signature
      being checked with CONFIG_KEXEC_VERIFY_SIG enabled.  But kexec-tools use
      kexec_load syscall can bypass the checking.
      
      Vivek Goyal proposed to create a common kconfig option so user can compile
      in only one syscall for loading kexec kernel.  KEXEC/KEXEC_FILE selects
      KEXEC_CORE so that old config files still work.
      
      Because there's general code need CONFIG_KEXEC_CORE, so I updated all the
      architecture Kconfig with a new option KEXEC_CORE, and let KEXEC selects
      KEXEC_CORE in arch Kconfig.  Also updated general kernel code with to
      kexec_load syscall.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NDave Young <dyoung@redhat.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Petr Tesarik <ptesarik@suse.cz>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: Josh Boyer <jwboyer@fedoraproject.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2965faa5
  3. 31 7月, 2015 1 次提交
  4. 03 6月, 2015 1 次提交
  5. 28 5月, 2015 1 次提交
    • B
      EDAC: Cleanup atomic_scrub mess · b01aec9b
      Borislav Petkov 提交于
      So first of all, this atomic_scrub() function's naming is bad. It looks
      like an atomic_t helper. Change it to edac_atomic_scrub().
      
      The bigger problem is that this function is arch-specific and every new
      arch which doesn't necessarily need that functionality still needs to
      define it, otherwise EDAC doesn't compile.
      
      So instead of doing that and including arch-specific headers, have each
      arch define an EDAC_ATOMIC_SCRUB symbol which can be used in edac_mc.c
      for ifdeffery. Much cleaner.
      
      And we already are doing this with another symbol - EDAC_SUPPORT. This
      is also much cleaner than having CONFIG_EDAC enumerate all the arches
      which need/have EDAC support and drivers.
      
      This way I can kill the useless edac.h header in tile too.
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NMichael Ellerman <mpe@ellerman.id.au>
      Acked-by: NChris Metcalf <cmetcalf@ezchip.com>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Doug Thompson <dougthompson@xmission.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-edac@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: "Maciej W. Rozycki" <macro@codesourcery.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "Steven J. Hill" <Steven.Hill@imgtec.com>
      Cc: x86@kernel.org
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      b01aec9b
  6. 11 5月, 2015 1 次提交
    • C
      tile: improve stack backtrace · 47ad7b9b
      Chris Metcalf 提交于
      This commit fixes a number of issues with the tile backtrace code.
      
      - Don't try to identify userspace shared object or executable paths
        if we are doing a backtrace from an interrupt; it's not legal,
        and also unlikely to be interesting.  Likewise, don't try to do
        it for other address spaces, since d_path() assumes it is being
        called in "current" context.
      
      - Move "in_backtrace" from thread_struct to thread_info.
        This way we can access it even if our stack thread_info has been
        clobbered, which makes backtracing more robust.
      
      - Avoid using "current" directly when testing for is_sigreturn().
        Since "current" may be corrupt, we're better off using kbt->task
        explicitly to look up the vdso_base for the current task.
        Conveniently, this simplifies the internal APIs (we only need
        one is_sigreturn() function now).
      
      - Avoid bogus "Odd fault" warning when pc/sp/ex1 are all zero,
        as is true for kernel threads above the last frame.
      
      - Hook into Tejun Heo's dump_stack() framework in lib/dump_stack.c.
      
      - Write last entry in save_stack_trace() as ULONG_MAX, not zero,
        since ftrace (at least) relies on finding that marker.
      
      - Implement save_stack_trace_regs() and save_strack_trace_user(),
        and set CONFIG_USER_STACKTRACE_SUPPORT.
      Signed-off-by: NChris Metcalf <cmetcalf@ezchip.com>
      47ad7b9b
  7. 01 5月, 2015 1 次提交
  8. 18 4月, 2015 1 次提交
  9. 15 4月, 2015 1 次提交
  10. 02 10月, 2014 1 次提交
  11. 30 8月, 2014 1 次提交
  12. 09 8月, 2014 1 次提交
    • V
      kexec: load and relocate purgatory at kernel load time · 12db5562
      Vivek Goyal 提交于
      Load purgatory code in RAM and relocate it based on the location.
      Relocation code has been inspired by module relocation code and purgatory
      relocation code in kexec-tools.
      
      Also compute the checksums of loaded kexec segments and store them in
      purgatory.
      
      Arch independent code provides this functionality so that arch dependent
      bootloaders can make use of it.
      
      Helper functions are provided to get/set symbol values in purgatory which
      are used by bootloaders later to set things like stack and entry point of
      second kernel etc.
      Signed-off-by: NVivek Goyal <vgoyal@redhat.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Michael Kerrisk <mtk.manpages@gmail.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Eric Biederman <ebiederm@xmission.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Greg Kroah-Hartman <greg@kroah.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: WANG Chao <chaowang@redhat.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      12db5562
  13. 19 7月, 2014 1 次提交
  14. 16 5月, 2014 1 次提交
  15. 08 4月, 2014 1 次提交
  16. 08 3月, 2014 2 次提交
  17. 15 11月, 2013 1 次提交
  18. 17 9月, 2013 1 次提交
  19. 13 9月, 2013 1 次提交
  20. 04 9月, 2013 3 次提交
    • C
      tile: remove support for TILE64 · d7c96611
      Chris Metcalf 提交于
      This chip is no longer being actively developed for (it was superceded
      by the TILEPro64 in 2008), and in any case the existing compiler and
      toolchain in the community do not support it.  It's unlikely that the
      kernel works with TILE64 at this point as the configuration has not been
      tested in years.  The support is also awkward as it requires maintaining
      a significant number of ifdefs.  So, just remove it altogether.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      d7c96611
    • C
      tile: support FRAME_POINTER · 49cf78ef
      Chris Metcalf 提交于
      Allow enabling frame pointer support; this makes it easier to hook
      into the various kernel features that claim they require it without
      having to add Kconfig conditionals everywhere (a la mips, ppc, s390,
      and microblaze).  When enabled, it basically eliminates leaf functions
      as such, and stops optimizing tail and sibling calls.  It adds around
      3% to the size of the kernel when enabled.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      49cf78ef
    • C
      tilegx: support KGDB · 8157107b
      Chris Metcalf 提交于
      Enter kernel debugger at boot with:
        --hvd UART_1=1 --hvx kgdbwait --hvx kgdboc=ttyS1,115200
      or at runtime with:
        echo ttyS1,115200 > /sys/module/kgdboc/parameters/kgdboc
        echo g > /proc/sysrq-trigger
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      8157107b
  21. 30 8月, 2013 2 次提交
  22. 14 8月, 2013 2 次提交
    • C
      tile: implement gettimeofday() via vDSO · 4a556f4f
      Chris Metcalf 提交于
      This change creates the framework for vDSO calls, makes the existing
      rt_sigreturn() mechanism use it, and adds a fast gettimeofday().
      Now that we need to expose the vDSO address to userspace, we add
      AT_SYSINFO_EHDR to the set of aux entries provided to userspace.
      (You can disable any extra vDSO support by booting with vdso=0,
      but the rt_sigreturn vDSO page will still be provided.)
      
      Note that glibc has supported the tile vDSO since release 2.17.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      4a556f4f
    • C
      tile: support CONFIG_PREEMPT · bc1a298f
      Chris Metcalf 提交于
      This change adds support for CONFIG_PREEMPT (full kernel preemption).
      In addition to the core support, this change includes a number
      of places where we fix up uses of smp_processor_id() and per-cpu
      variables.  I also eliminate the PAGE_HOME_HERE and PAGE_HOME_UNKNOWN
      values for page homing, as it turns out they weren't being used.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      bc1a298f
  23. 13 8月, 2013 1 次提交
    • C
      tile: various console improvements · bda0f5ba
      Chris Metcalf 提交于
      This change improves and cleans up the tile console.
      
      - We enable HVC_IRQ support on tilegx, with the addition of a new
        Tilera hypervisor API for tilegx to allow a console IPI.  If IPI
        support is not available we fall back to the previous polling mode.
      
      - We simplify the earlyprintk code to use CON_BOOT and eliminate some
        of the other supporting earlyprintk code.
      
      - A new tile_console_write() primitive is used to send output to
        the console and is factored out of the hvc_tile driver.
        This lets us support a "sim_console" boot argument to allow using
        simulator hooks to send output to the "console" as a slightly
        faster alternative to emulating the hardware more directly.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bda0f5ba
  24. 12 8月, 2013 1 次提交
    • T
      PCI: remove ARCH_SUPPORTS_MSI kconfig option · ebd97be6
      Thomas Petazzoni 提交于
      Now that we have weak versions for each of the PCI MSI architecture
      functions, we can actually build the MSI support for all platforms,
      regardless of whether they provide or not architecture-specific
      versions of those functions. For this reason, the ARCH_SUPPORTS_MSI
      hidden kconfig boolean becomes useless, and this patch gets rid of it.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Tested-by: NDaniel Price <daniel.price@gmail.com>
      Tested-by: NThierry Reding <thierry.reding@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: linux390@de.ibm.com
      Cc: linux-s390@vger.kernel.org
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: x86@kernel.org
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: linux-ia64@vger.kernel.org
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: David S. Miller <davem@davemloft.net>
      Cc: sparclinux@vger.kernel.org
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Signed-off-by: NJason Cooper <jason@lakedaemon.net>
      ebd97be6
  25. 07 8月, 2013 2 次提交
  26. 05 7月, 2013 1 次提交
  27. 03 5月, 2013 1 次提交
    • C
      tile: support new Tilera hypervisor · c539914d
      Chris Metcalf 提交于
      The Tilera hypervisor shipped in releases up through MDE 4.1 launches
      the client operating system (i.e. Linux) at privilege level 1 (PL1).
      Starting with MDE 4.2, as part of the work to enable KVM, the
      Tilera hypervisor launches Linux at PL2 instead.
      
      This commit makes the KERNEL_PL option default to 2 for tilegx, while
      still saying at 1 for tilepro, which doesn't have an updated hypervisor.
      It also explains how and when you might want to choose another value.
      In addition, we change a small buglet in the on-chip Ethernet driver,
      where we were failing to use the KERNEL_PL constant in an API call.
      
      To make the transition cleaner, this change also provides the updated
      hv_init() API for the new hypervisor that supports announcing Linux's
      compiled-in PL, so the hypervisor can generate a suitable error in the
      case of a mismatched hypervisor and Linux binary.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      Cc: stable@vger.linux.org
      c539914d
  28. 01 5月, 2013 1 次提交
    • S
      Kconfig: consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS · 446f24d1
      Stephen Boyd 提交于
      The help text for this config is duplicated across the x86, parisc, and
      s390 Kconfig.debug files.  Arnd Bergman noted that the help text was
      slightly misleading and should be fixed to state that enabling this
      option isn't a problem when using pre 4.4 gcc.
      
      To simplify the rewording, consolidate the text into lib/Kconfig.debug
      and modify it there to be more explicit about when you should say N to
      this config.
      
      Also, make the text a bit more generic by stating that this option
      enables compile time checks so we can cover architectures which emit
      warnings vs.  ones which emit errors.  The details of how an
      architecture decided to implement the checks isn't as important as the
      concept of compile time checking of copy_from_user() calls.
      
      While we're doing this, remove all the copy_from_user_overflow() code
      that's duplicated many times and place it into lib/ so that any
      architecture supporting this option can get the function for free.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Acked-by: NHelge Deller <deller@gmx.de>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      446f24d1
  29. 17 4月, 2013 1 次提交
  30. 08 4月, 2013 1 次提交
  31. 23 3月, 2013 4 次提交