Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
ring-buffer: Fix typo of time extends per page
perf, MIPS: Support cross compiling of tools/perf for MIPS
perf: Fix incorrect copy_from_user() usage

+14 -4
+1 -3
kernel/perf_event.c
··· 2202 2202 static int perf_event_period(struct perf_event *event, u64 __user *arg) 2203 2203 { 2204 2204 struct perf_event_context *ctx = event->ctx; 2205 - unsigned long size; 2206 2205 int ret = 0; 2207 2206 u64 value; 2208 2207 2209 2208 if (!event->attr.sample_period) 2210 2209 return -EINVAL; 2211 2210 2212 - size = copy_from_user(&value, arg, sizeof(value)); 2213 - if (size != sizeof(value)) 2211 + if (copy_from_user(&value, arg, sizeof(value))) 2214 2212 return -EFAULT; 2215 2213 2216 2214 if (!value)
+1 -1
kernel/trace/ring_buffer.c
··· 405 405 #define BUF_MAX_DATA_SIZE (BUF_PAGE_SIZE - (sizeof(u32) * 2)) 406 406 407 407 /* Max number of timestamps that can fit on a page */ 408 - #define RB_TIMESTAMPS_PER_PAGE (BUF_PAGE_SIZE / RB_LEN_TIME_STAMP) 408 + #define RB_TIMESTAMPS_PER_PAGE (BUF_PAGE_SIZE / RB_LEN_TIME_EXTEND) 409 409 410 410 int ring_buffer_print_page_header(struct trace_seq *s) 411 411 {
+12
tools/perf/perf.h
··· 73 73 #define cpu_relax() asm volatile("":::"memory") 74 74 #endif 75 75 76 + #ifdef __mips__ 77 + #include "../../arch/mips/include/asm/unistd.h" 78 + #define rmb() asm volatile( \ 79 + ".set mips2\n\t" \ 80 + "sync\n\t" \ 81 + ".set mips0" \ 82 + : /* no output */ \ 83 + : /* no input */ \ 84 + : "memory") 85 + #define cpu_relax() asm volatile("" ::: "memory") 86 + #endif 87 + 76 88 #include <time.h> 77 89 #include <unistd.h> 78 90 #include <sys/types.h>