]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge tag 'pm+acpi-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Feb 2013 19:26:56 +0000 (11:26 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Feb 2013 19:26:56 +0000 (11:26 -0800)
Pull ACPI and power management updates from Rafael Wysocki:

 - Rework of the ACPI namespace scanning code from Rafael J.  Wysocki
   with contributions from Bjorn Helgaas, Jiang Liu, Mika Westerberg,
   Toshi Kani, and Yinghai Lu.

 - ACPI power resources handling and ACPI device PM update from Rafael
   J Wysocki.

 - ACPICA update to version 20130117 from Bob Moore and Lv Zheng with
   contributions from Aaron Lu, Chao Guan, Jesper Juhl, and Tim Gardner.

 - Support for Intel Lynxpoint LPSS from Mika Westerberg.

 - cpuidle update from Len Brown including Intel Haswell support, C1
   state for intel_idle, removal of global pm_idle.

 - cpuidle fixes and cleanups from Daniel Lezcano.

 - cpufreq fixes and cleanups from Viresh Kumar and Fabio Baltieri with
   contributions from Stratos Karafotis and Rickard Andersson.

 - Intel P-states driver for Sandy Bridge processors from Dirk
   Brandewie.

 - cpufreq driver for Marvell Kirkwood SoCs from Andrew Lunn.

 - cpufreq fixes related to ordering issues between acpi-cpufreq and
   powernow-k8 from Borislav Petkov and Matthew Garrett.

 - cpufreq support for Calxeda Highbank processors from Mark Langsdorf
   and Rob Herring.

 - cpufreq driver for the Freescale i.MX6Q SoC and cpufreq-cpu0 update
   from Shawn Guo.

 - cpufreq Exynos fixes and cleanups from Jonghwan Choi, Sachin Kamat,
   and Inderpal Singh.

 - Support for "lightweight suspend" from Zhang Rui.

 - Removal of the deprecated power trace API from Paul Gortmaker.

 - Assorted updates from Andreas Fleig, Colin Ian King, Davidlohr Bueso,
   Joseph Salisbury, Kees Cook, Li Fei, Nishanth Menon, ShuoX Liu,
   Srinivas Pandruvada, Tejun Heo, Thomas Renninger, and Yasuaki
   Ishimatsu.

* tag 'pm+acpi-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (267 commits)
  PM idle: remove global declaration of pm_idle
  unicore32 idle: delete stray pm_idle comment
  openrisc idle: delete pm_idle
  mn10300 idle: delete pm_idle
  microblaze idle: delete pm_idle
  m32r idle: delete pm_idle, and other dead idle code
  ia64 idle: delete pm_idle
  cris idle: delete idle and pm_idle
  ARM64 idle: delete pm_idle
  ARM idle: delete pm_idle
  blackfin idle: delete pm_idle
  sparc idle: rename pm_idle to sparc_idle
  sh idle: rename global pm_idle to static sh_idle
  x86 idle: rename global pm_idle to static x86_idle
  APM idle: register apm_cpu_idle via cpuidle
  cpufreq / intel_pstate: Add kernel command line option disable intel_pstate.
  cpufreq / intel_pstate: Change to disallow module build
  tools/power turbostat: display SMI count by default
  intel_idle: export both C1 and C1E
  ACPI / hotplug: Fix concurrency issues and memory leaks
  ...

1  2 
arch/x86/Kconfig
arch/x86/include/asm/processor.h
arch/x86/include/uapi/asm/msr-index.h
arch/x86/kernel/apm_32.c
drivers/clk/Makefile
drivers/clk/clk-highbank.c
drivers/platform/x86/eeepc-laptop.c
kernel/trace/Kconfig

diff --combined arch/x86/Kconfig
index 260857a53b87f7ffc149a285e1bff6f582493577,c03309f697f17a7a3c5d42d5e3cb3d48dc2aa3c0..f7a27fdb509890096f2c4596ccec1bfe7541673b
@@@ -1,7 -1,7 +1,7 @@@
  # Select 32 or 64 bit
  config 64BIT
        bool "64-bit kernel" if ARCH = "x86"
 -      default ARCH = "x86_64"
 +      default ARCH != "i386"
        ---help---
          Say yes to build a 64-bit kernel - formerly known as x86_64
          Say no to build a 32-bit kernel - formerly known as i386
@@@ -28,6 -28,7 +28,6 @@@ config X8
        select HAVE_OPROFILE
        select HAVE_PCSPKR_PLATFORM
        select HAVE_PERF_EVENTS
 -      select HAVE_IRQ_WORK
        select HAVE_IOREMAP_PROT
        select HAVE_KPROBES
        select HAVE_MEMBLOCK
        select HAVE_DMA_CONTIGUOUS if !SWIOTLB
        select HAVE_KRETPROBES
        select HAVE_OPTPROBES
 +      select HAVE_KPROBES_ON_FTRACE
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_FENTRY if X86_64
        select HAVE_C_RECORDMCOUNT
        select HAVE_DYNAMIC_FTRACE
 +      select HAVE_DYNAMIC_FTRACE_WITH_REGS
        select HAVE_FUNCTION_TRACER
        select HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_FUNCTION_GRAPH_FP_TEST
        select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC)
        select GENERIC_TIME_VSYSCALL if X86_64
        select KTIME_SCALAR if X86_32
 +      select ALWAYS_USE_PERSISTENT_CLOCK
        select GENERIC_STRNCPY_FROM_USER
        select GENERIC_STRNLEN_USER
        select HAVE_CONTEXT_TRACKING if X86_64
        select MODULES_USE_ELF_RELA if X86_64
        select CLONE_BACKWARDS if X86_32
        select GENERIC_SIGALTSTACK
 +      select ARCH_USE_BUILTIN_BSWAP
  
  config INSTRUCTION_DECODER
        def_bool y
@@@ -323,10 -320,6 +323,10 @@@ config X86_BIGSM
        ---help---
          This option is needed for the systems that have more than 8 CPUs
  
 +config GOLDFISH
 +       def_bool y
 +       depends on X86_GOLDFISH
 +
  if X86_32
  config X86_EXTENDED_PLATFORM
        bool "Support for extended (non-PC) x86 platforms"
@@@ -409,14 -402,6 +409,14 @@@ config X86_U
  # Following is an alphabetically sorted list of 32 bit extended platforms
  # Please maintain the alphabetic order if and when there are additions
  
 +config X86_GOLDFISH
 +       bool "Goldfish (Virtual Platform)"
 +       depends on X86_32
 +       ---help---
 +       Enable support for the Goldfish virtual platform used primarily
 +       for Android development. Unless you are building for the Android
 +       Goldfish emulator say N here.
 +
  config X86_INTEL_CE
        bool "CE4100 TV platform"
        depends on PCI
@@@ -469,6 -454,16 +469,16 @@@ config X86_MDFL
  
  endif
  
+ config X86_INTEL_LPSS
+       bool "Intel Low Power Subsystem Support"
+       depends on ACPI
+       select COMMON_CLK
+       ---help---
+         Select to build support for Intel Low Power Subsystem such as
+         found on Intel Lynxpoint PCH. Selecting this option enables
+         things like clock tree (common clock framework) which are needed
+         by the LPSS peripheral drivers.
  config X86_RDC321X
        bool "RDC R-321x SoC"
        depends on X86_32
@@@ -1927,6 -1922,7 +1937,7 @@@ config APM_DO_ENABL
          this feature.
  
  config APM_CPU_IDLE
+       depends on CPU_IDLE
        bool "Make CPU Idle calls when idle"
        ---help---
          Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop.
@@@ -2203,15 -2199,6 +2214,15 @@@ config GEO
        ---help---
          This option enables system support for the Traverse Technologies GEOS.
  
 +config TS5500
 +      bool "Technologic Systems TS-5500 platform support"
 +      depends on MELAN
 +      select CHECK_SIGNATURE
 +      select NEW_LEDS
 +      select LEDS_CLASS
 +      ---help---
 +        This option enables system support for the Technologic Systems TS-5500.
 +
  endif # X86_32
  
  config AMD_NB
index cf500543f6ffd6334d67a8caaf93a80504d65699,b9e7d279f8ef31569fe3b24a5c0c2a64878f4d7e..d172588efae51b7cff0978106414a732e529b4de
@@@ -89,7 -89,6 +89,6 @@@ struct cpuinfo_x86 
        char                    wp_works_ok;    /* It doesn't on 386's */
  
        /* Problems on some 486Dx4's and old 386's: */
-       char                    hlt_works_ok;
        char                    hard_math;
        char                    rfu;
        char                    fdiv_bug;
@@@ -165,15 -164,6 +164,6 @@@ DECLARE_PER_CPU_SHARED_ALIGNED(struct c
  
  extern const struct seq_operations cpuinfo_op;
  
- static inline int hlt_works(int cpu)
- {
- #ifdef CONFIG_X86_32
-       return cpu_data(cpu).hlt_works_ok;
- #else
-       return 1;
- #endif
- }
  #define cache_line_size()     (boot_cpu_data.x86_cache_alignment)
  
  extern void cpu_detect(struct cpuinfo_x86 *c);
@@@ -725,7 -715,7 +715,7 @@@ extern unsigned long               boot_option_idle_
  extern bool                   amd_e400_c1e_detected;
  
  enum idle_boot_override {IDLE_NO_OVERRIDE=0, IDLE_HALT, IDLE_NOMWAIT,
-                        IDLE_POLL, IDLE_FORCE_MWAIT};
+                        IDLE_POLL};
  
  extern void enable_sep_cpu(void);
  extern int sysenter_setup(void);
@@@ -943,7 -933,7 +933,7 @@@ extern void start_thread(struct pt_reg
  extern int get_tsc_mode(unsigned long adr);
  extern int set_tsc_mode(unsigned int val);
  
 -extern int amd_get_nb_id(int cpu);
 +extern u16 amd_get_nb_id(int cpu);
  
  struct aperfmperf {
        u64 aperf, mperf;
@@@ -998,7 -988,11 +988,11 @@@ extern unsigned long arch_align_stack(u
  extern void free_init_pages(char *what, unsigned long begin, unsigned long end);
  
  void default_idle(void);
- bool set_pm_idle_to_default(void);
+ #ifdef        CONFIG_XEN
+ bool xen_set_default_idle(void);
+ #else
+ #define xen_set_default_idle 0
+ #endif
  
  void stop_this_cpu(void *dummy);
  
index 075a402555912541fe0b502c6c6b877812a5b089,8d013f5153bc8eb96bfed10ff8f7b06360440ede..f26d2771846f73d3968cd41c7fea2046864464d7
  #define DEBUGCTLMSR_BTS_OFF_USR               (1UL << 10)
  #define DEBUGCTLMSR_FREEZE_LBRS_ON_PMI        (1UL << 11)
  
+ #define MSR_IA32_POWER_CTL            0x000001fc
  #define MSR_IA32_MC0_CTL              0x00000400
  #define MSR_IA32_MC0_STATUS           0x00000401
  #define MSR_IA32_MC0_ADDR             0x00000402
  /* Fam 15h MSRs */
  #define MSR_F15H_PERF_CTL             0xc0010200
  #define MSR_F15H_PERF_CTR             0xc0010201
 +#define MSR_F15H_NB_PERF_CTL          0xc0010240
 +#define MSR_F15H_NB_PERF_CTR          0xc0010241
  
  /* Fam 10h MSRs */
  #define MSR_FAM10H_MMIO_CONF_BASE     0xc0010058
  #define MSR_IA32_PLATFORM_ID          0x00000017
  #define MSR_IA32_EBL_CR_POWERON               0x0000002a
  #define MSR_EBC_FREQUENCY_ID          0x0000002c
+ #define MSR_SMI_COUNT                 0x00000034
  #define MSR_IA32_FEATURE_CONTROL        0x0000003a
  #define MSR_IA32_TSC_ADJUST             0x0000003b
  
diff --combined arch/x86/kernel/apm_32.c
index 8d7012b7f4020ffe3fc7cb7da0ed15cdfd05e5e7,9f4bc6a1164dda3160169b251e47ee0247654a85..66b5faffe14a983e7c39d201c3c50a4ef1126e32
  #include <linux/acpi.h>
  #include <linux/syscore_ops.h>
  #include <linux/i8253.h>
+ #include <linux/cpuidle.h>
  
  #include <asm/uaccess.h>
  #include <asm/desc.h>
@@@ -360,13 -361,35 +361,35 @@@ struct apm_user 
   * idle percentage above which bios idle calls are done
   */
  #ifdef CONFIG_APM_CPU_IDLE
- #warning deprecated CONFIG_APM_CPU_IDLE will be deleted in 2012
  #define DEFAULT_IDLE_THRESHOLD        95
  #else
  #define DEFAULT_IDLE_THRESHOLD        100
  #endif
  #define DEFAULT_IDLE_PERIOD   (100 / 3)
  
+ static int apm_cpu_idle(struct cpuidle_device *dev,
+                       struct cpuidle_driver *drv, int index);
+ static struct cpuidle_driver apm_idle_driver = {
+       .name = "apm_idle",
+       .owner = THIS_MODULE,
+       .en_core_tk_irqen = 1,
+       .states = {
+               { /* entry 0 is for polling */ },
+               { /* entry 1 is for APM idle */
+                       .name = "APM",
+                       .desc = "APM idle",
+                       .flags = CPUIDLE_FLAG_TIME_VALID,
+                       .exit_latency = 250,    /* WAG */
+                       .target_residency = 500,        /* WAG */
+                       .enter = &apm_cpu_idle
+               },
+       },
+       .state_count = 2,
+ };
+ static struct cpuidle_device apm_cpuidle_device;
  /*
   * Local variables
   */
@@@ -377,7 -400,6 +400,6 @@@ static struct 
  static int clock_slowed;
  static int idle_threshold __read_mostly = DEFAULT_IDLE_THRESHOLD;
  static int idle_period __read_mostly = DEFAULT_IDLE_PERIOD;
- static int set_pm_idle;
  static int suspends_pending;
  static int standbys_pending;
  static int ignore_sys_suspend;
@@@ -884,8 -906,6 +906,6 @@@ static void apm_do_busy(void
  #define IDLE_CALC_LIMIT       (HZ * 100)
  #define IDLE_LEAKY_MAX        16
  
- static void (*original_pm_idle)(void) __read_mostly;
  /**
   * apm_cpu_idle               -       cpu idling for APM capable Linux
   *
   * Furthermore it calls the system default idle routine.
   */
  
- static void apm_cpu_idle(void)
+ static int apm_cpu_idle(struct cpuidle_device *dev,
+       struct cpuidle_driver *drv, int index)
  {
        static int use_apm_idle; /* = 0 */
        static unsigned int last_jiffies; /* = 0 */
        static unsigned int last_stime; /* = 0 */
 +      cputime_t stime;
  
        int apm_idle_done = 0;
        unsigned int jiffies_since_last_check = jiffies - last_jiffies;
        unsigned int bucket;
  
-       WARN_ONCE(1, "deprecated apm_cpu_idle will be deleted in 2012");
  recalc:
 +      task_cputime(current, NULL, &stime);
        if (jiffies_since_last_check > IDLE_CALC_LIMIT) {
                use_apm_idle = 0;
 -              last_jiffies = jiffies;
 -              last_stime = current->stime;
        } else if (jiffies_since_last_check > idle_period) {
                unsigned int idle_percentage;
  
 -              idle_percentage = current->stime - last_stime;
 +              idle_percentage = stime - last_stime;
                idle_percentage *= 100;
                idle_percentage /= jiffies_since_last_check;
                use_apm_idle = (idle_percentage > idle_threshold);
                if (apm_info.forbid_idle)
                        use_apm_idle = 0;
 -              last_jiffies = jiffies;
 -              last_stime = current->stime;
        }
  
 +      last_jiffies = jiffies;
 +      last_stime = stime;
 +
        bucket = IDLE_LEAKY_MAX;
  
        while (!need_resched()) {
                                break;
                        }
                }
-               if (original_pm_idle)
-                       original_pm_idle();
-               else
-                       default_idle();
+               default_idle();
                local_irq_disable();
                jiffies_since_last_check = jiffies - last_jiffies;
                if (jiffies_since_last_check > idle_period)
        if (apm_idle_done)
                apm_do_busy();
  
-       local_irq_enable();
+       return index;
  }
  
  /**
@@@ -2382,9 -2398,9 +2399,9 @@@ static int __init apm_init(void
        if (HZ != 100)
                idle_period = (idle_period * HZ) / 100;
        if (idle_threshold < 100) {
-               original_pm_idle = pm_idle;
-               pm_idle  = apm_cpu_idle;
-               set_pm_idle = 1;
+               if (!cpuidle_register_driver(&apm_idle_driver))
+                       if (cpuidle_register_device(&apm_cpuidle_device))
+                               cpuidle_unregister_driver(&apm_idle_driver);
        }
  
        return 0;
@@@ -2394,15 -2410,9 +2411,9 @@@ static void __exit apm_exit(void
  {
        int error;
  
-       if (set_pm_idle) {
-               pm_idle = original_pm_idle;
-               /*
-                * We are about to unload the current idle thread pm callback
-                * (pm_idle), Wait for all processors to update cached/local
-                * copies of pm_idle before proceeding.
-                */
-               kick_all_cpus_sync();
-       }
+       cpuidle_unregister_device(&apm_cpuidle_device);
+       cpuidle_unregister_driver(&apm_idle_driver);
        if (((apm_info.bios.flags & APM_BIOS_DISENGAGED) == 0)
            && (apm_info.connection_version > 0x0100)) {
                error = apm_engage_power_management(APM_DEVICE_ALL, 0);
diff --combined drivers/clk/Makefile
index 0ad642fbe7946a3e4c96ae8a6694d0d73b97b935,ee11460a970d767c6832e05664f240047d23cdfd..14fde73ea6ff9f662fe11999f6b0d01632c5f7e9
@@@ -1,13 -1,8 +1,13 @@@
  # common clock types
  obj-$(CONFIG_HAVE_CLK)                += clk-devres.o
  obj-$(CONFIG_CLKDEV_LOOKUP)   += clkdev.o
 -obj-$(CONFIG_COMMON_CLK)      += clk.o clk-fixed-rate.o clk-gate.o \
 -                                 clk-mux.o clk-divider.o clk-fixed-factor.o
 +obj-$(CONFIG_COMMON_CLK)      += clk.o
 +obj-$(CONFIG_COMMON_CLK)      += clk-divider.o
 +obj-$(CONFIG_COMMON_CLK)      += clk-fixed-factor.o
 +obj-$(CONFIG_COMMON_CLK)      += clk-fixed-rate.o
 +obj-$(CONFIG_COMMON_CLK)      += clk-gate.o
 +obj-$(CONFIG_COMMON_CLK)      += clk-mux.o
 +
  # SoCs specific
  obj-$(CONFIG_ARCH_BCM2835)    += clk-bcm2835.o
  obj-$(CONFIG_ARCH_NOMADIK)    += clk-nomadik.o
@@@ -25,7 -20,9 +25,8 @@@ endi
  obj-$(CONFIG_MACH_LOONGSON1)  += clk-ls1x.o
  obj-$(CONFIG_ARCH_U8500)      += ux500/
  obj-$(CONFIG_ARCH_VT8500)     += clk-vt8500.o
 -obj-$(CONFIG_ARCH_SUNXI)      += clk-sunxi.o
  obj-$(CONFIG_ARCH_ZYNQ)               += clk-zynq.o
+ obj-$(CONFIG_X86)             += x86/
  
  # Chip specific
  obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o
index 5d1de2e117535820211eac32df13673dea0b81b7,3a0b723da2bc3ff70f735cdb43048c2e3bfc41eb..2e08cb00193685eb80e617c386dcb0b31871c122
@@@ -182,8 -182,10 +182,10 @@@ static int clk_pll_set_rate(struct clk_
                reg |= HB_PLL_EXT_ENA;
                reg &= ~HB_PLL_EXT_BYPASS;
        } else {
+               writel(reg | HB_PLL_EXT_BYPASS, hbclk->reg);
                reg &= ~HB_PLL_DIVQ_MASK;
                reg |= divq << HB_PLL_DIVQ_SHIFT;
+               writel(reg | HB_PLL_EXT_BYPASS, hbclk->reg);
        }
        writel(reg, hbclk->reg);
  
@@@ -314,23 -316,33 +316,23 @@@ static void __init hb_pll_init(struct d
  {
        hb_clk_init(node, &clk_pll_ops);
  }
 +CLK_OF_DECLARE(hb_pll, "calxeda,hb-pll-clock", hb_pll_init);
  
  static void __init hb_a9periph_init(struct device_node *node)
  {
        hb_clk_init(node, &a9periphclk_ops);
  }
 +CLK_OF_DECLARE(hb_a9periph, "calxeda,hb-a9periph-clock", hb_a9periph_init);
  
  static void __init hb_a9bus_init(struct device_node *node)
  {
        struct clk *clk = hb_clk_init(node, &a9bclk_ops);
        clk_prepare_enable(clk);
  }
 +CLK_OF_DECLARE(hb_a9bus, "calxeda,hb-a9bus-clock", hb_a9bus_init);
  
  static void __init hb_emmc_init(struct device_node *node)
  {
        hb_clk_init(node, &periclk_ops);
  }
 -
 -static const __initconst struct of_device_id clk_match[] = {
 -      { .compatible = "fixed-clock", .data = of_fixed_clk_setup, },
 -      { .compatible = "calxeda,hb-pll-clock", .data = hb_pll_init, },
 -      { .compatible = "calxeda,hb-a9periph-clock", .data = hb_a9periph_init, },
 -      { .compatible = "calxeda,hb-a9bus-clock", .data = hb_a9bus_init, },
 -      { .compatible = "calxeda,hb-emmc-clock", .data = hb_emmc_init, },
 -      {}
 -};
 -
 -void __init highbank_clocks_init(void)
 -{
 -      of_clk_init(clk_match);
 -}
 +CLK_OF_DECLARE(hb_emmc, "calxeda,hb-emmc-clock", hb_emmc_init);
index a5da0b594f71bcfcc88e17d07335beb3cd318d00,98935f945f53fad536be68bee242ef5c88029357..5d26e70bed6c532d51c0fb326bc97f91e1a8a020
@@@ -1007,7 -1007,7 +1007,7 @@@ static int eeepc_get_fan_pwm(void
  
  static void eeepc_set_fan_pwm(int value)
  {
 -      value = SENSORS_LIMIT(value, 0, 255);
 +      value = clamp_val(value, 0, 255);
        value = value * 100 / 255;
        ec_write(EEEPC_EC_FAN_PWM, value);
  }
@@@ -1501,7 -1501,7 +1501,7 @@@ fail_platform
        return result;
  }
  
- static int eeepc_acpi_remove(struct acpi_device *device, int type)
+ static int eeepc_acpi_remove(struct acpi_device *device)
  {
        struct eeepc_laptop *eeepc = acpi_driver_data(device);
  
diff --combined kernel/trace/Kconfig
index 36567564e221195d1a8489207fed82f27c36b85e,ad0a067ad4b33e8a76da23a2c0dea7926bf5f265..192473b22799032c5cb013868f778ad4bc30626a
@@@ -39,9 -39,6 +39,9 @@@ config HAVE_DYNAMIC_FTRAC
        help
          See Documentation/trace/ftrace-design.txt
  
 +config HAVE_DYNAMIC_FTRACE_WITH_REGS
 +      bool
 +
  config HAVE_FTRACE_MCOUNT_RECORD
        bool
        help
@@@ -81,21 -78,6 +81,6 @@@ config EVENT_TRACIN
        select CONTEXT_SWITCH_TRACER
        bool
  
- config EVENT_POWER_TRACING_DEPRECATED
-       depends on EVENT_TRACING
-       bool "Deprecated power event trace API, to be removed"
-       default y
-       help
-         Provides old power event types:
-         C-state/idle accounting events:
-         power:power_start
-         power:power_end
-         and old cpufreq accounting event:
-         power:power_frequency
-         This is for userspace compatibility
-         and will vanish after 5 kernel iterations,
-         namely 3.1.
  config CONTEXT_SWITCH_TRACER
        bool
  
@@@ -253,16 -235,6 +238,16 @@@ config FTRACE_SYSCALL
        help
          Basic tracer to catch the syscall entry and exit events.
  
 +config TRACER_SNAPSHOT
 +      bool "Create a snapshot trace buffer"
 +      select TRACER_MAX_TRACE
 +      help
 +        Allow tracing users to take snapshot of the current buffer using the
 +        ftrace interface, e.g.:
 +
 +            echo 1 > /sys/kernel/debug/tracing/snapshot
 +            cat snapshot
 +
  config TRACE_BRANCH_PROFILING
        bool
        select GENERIC_TRACER
@@@ -447,11 -419,6 +432,11 @@@ config DYNAMIC_FTRAC
          were made. If so, it runs stop_machine (stops all CPUS)
          and modifies the code to jump over the call to ftrace.
  
 +config DYNAMIC_FTRACE_WITH_REGS
 +      def_bool y
 +      depends on DYNAMIC_FTRACE
 +      depends on HAVE_DYNAMIC_FTRACE_WITH_REGS
 +
  config FUNCTION_PROFILER
        bool "Kernel function profiler"
        depends on FUNCTION_TRACER