Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox...
[linux-2.6-microblaze.git] / kernel / bpf / helpers.c
index 41ca280..308427f 100644 (file)
@@ -720,14 +720,6 @@ bpf_base_func_proto(enum bpf_func_id func_id)
                return &bpf_spin_lock_proto;
        case BPF_FUNC_spin_unlock:
                return &bpf_spin_unlock_proto;
-       case BPF_FUNC_trace_printk:
-               if (!perfmon_capable())
-                       return NULL;
-               return bpf_get_trace_printk_proto();
-       case BPF_FUNC_snprintf_btf:
-               if (!perfmon_capable())
-                       return NULL;
-               return &bpf_snprintf_btf_proto;
        case BPF_FUNC_jiffies64:
                return &bpf_jiffies64_proto;
        case BPF_FUNC_per_cpu_ptr:
@@ -742,6 +734,8 @@ bpf_base_func_proto(enum bpf_func_id func_id)
                return NULL;
 
        switch (func_id) {
+       case BPF_FUNC_trace_printk:
+               return bpf_get_trace_printk_proto();
        case BPF_FUNC_get_current_task:
                return &bpf_get_current_task_proto;
        case BPF_FUNC_probe_read_user:
@@ -752,6 +746,8 @@ bpf_base_func_proto(enum bpf_func_id func_id)
                return &bpf_probe_read_user_str_proto;
        case BPF_FUNC_probe_read_kernel_str:
                return &bpf_probe_read_kernel_str_proto;
+       case BPF_FUNC_snprintf_btf:
+               return &bpf_snprintf_btf_proto;
        default:
                return NULL;
        }