1. 19 5月, 2014 2 次提交
  2. 16 6月, 2009 1 次提交
  3. 03 11月, 2008 1 次提交
  4. 31 10月, 2008 2 次提交
    • S
      ftrace: nmi safe code clean ups · a26a2a27
      Steven Rostedt 提交于
      Impact: cleanup
      
      This patch cleans up the NMI safe code for dynamic ftrace as suggested
      by Andrew Morton.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a26a2a27
    • S
      ftrace: nmi safe code modification · 17666f02
      Steven Rostedt 提交于
      Impact: fix crashes that can occur in NMI handlers, if their code is modified
      
      Modifying code is something that needs special care. On SMP boxes,
      if code that is being modified is also being executed on another CPU,
      that CPU will have undefined results.
      
      The dynamic ftrace uses kstop_machine to make the system act like a
      uniprocessor system. But this does not address NMIs, that can still
      run on other CPUs.
      
      One approach to handle this is to make all code that are used by NMIs
      not be traced. But NMIs can call notifiers that spread throughout the
      kernel and this will be very hard to maintain, and the chance of missing
      a function is very high.
      
      The approach that this patch takes is to have the NMIs modify the code
      if the modification is taking place. The way this works is that just
      writing to code executing on another CPU is not harmful if what is
      written is the same as what exists.
      
      Two buffers are used: an IP buffer and a "code" buffer.
      
      The steps that the patcher takes are:
      
       1) Put in the instruction pointer into the IP buffer
          and the new code into the "code" buffer.
       2) Set a flag that says we are modifying code
       3) Wait for any running NMIs to finish.
       4) Write the code
       5) clear the flag.
       6) Wait for any running NMIs to finish.
      
      If an NMI is executed, it will also write the pending code.
      Multiple writes are OK, because what is being written is the same.
      Then the patcher must wait for all running NMIs to finish before
      going to the next line that must be patched.
      
      This is basically the RCU approach to code modification.
      
      Thanks to Ingo Molnar for suggesting the idea, and to Arjan van de Ven
      for his guidence on what is safe and what is not.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      17666f02
  5. 28 7月, 2008 1 次提交
    • S
      sparc, sparc64: use arch/sparc/include · a439fe51
      Sam Ravnborg 提交于
      The majority of this patch was created by the following script:
      
      ***
      ASM=arch/sparc/include/asm
      mkdir -p $ASM
      git mv include/asm-sparc64/ftrace.h $ASM
      git rm include/asm-sparc64/*
      git mv include/asm-sparc/* $ASM
      sed -ie 's/asm-sparc64/asm/g' $ASM/*
      sed -ie 's/asm-sparc/asm/g' $ASM/*
      ***
      
      The rest was an update of the top-level Makefile to use sparc
      for header files when sparc64 is being build.
      And a small fixlet to pick up the correct unistd.h from
      sparc64 code.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      a439fe51
  6. 01 7月, 2008 1 次提交
    • I
      fix "ftrace: store mcount address in rec->ip" · 760378e1
      Ingo Molnar 提交于
      Alexander Beregalov reported this build failure:
      
      $ make CROSS_COMPILE=sparc64-unknown-linux-gnu- image modules && sudo
      make modules_install
        CHK     include/linux/version.h
        CHK     include/linux/utsrelease.h
        CALL    scripts/checksyscalls.sh
        CHK     include/linux/compile.h
      dnsdomainname: Unknown host
        CC      arch/sparc64/kernel/sparc64_ksyms.o
      arch/sparc64/kernel/sparc64_ksyms.c:116: error: '_mcount' undeclared
      here (not in a function)
      cc1: warnings being treated as errors
      arch/sparc64/kernel/sparc64_ksyms.c:116: error: type defaults to 'int'
      in declaration of '_mcount'
      
      And bisected it back to:
      
      | commit 395a59d0
      | Author: Abhishek Sagar <sagar.abhishek@gmail.com>
      | Date:   Sat Jun 21 23:47:27 2008 +0530
      |
      |     ftrace: store mcount address in rec->ip
      
      the mcount prototype is only available under CONFIG_FTRACE,
      extend it to CONFIG_MCOUNT as well.
      Reported-and-bisected-by: NAlexander Beregalov <a.beregalov@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      760378e1
  7. 24 6月, 2008 1 次提交