diff options
| author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-14 11:00:36 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-14 11:00:36 -0400 |
| commit | 277a163c83d7ba93fba1e8980d29a9f8bfcfba6c (patch) | |
| tree | ccfd357d152292958957b6b8a993892e7a8cc95f /kernel/sched/clock.c | |
| parent | a83b93a7480441a47856dc9104bea970e84cda87 (diff) | |
| parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) | |
Merge tag 'v3.15-rc1' into patchwork
Linux 3.15-rc1
* tag 'v3.15-rc1': (12180 commits)
Linux 3.15-rc1
mm: Initialize error in shmem_file_aio_read()
cifs: Use min_t() when comparing "size_t" and "unsigned long"
sym53c8xx_2: Set DID_REQUEUE return code when aborting squeue
powerpc: Don't try to set LPCR unless we're in hypervisor mode
futex: update documentation for ordering guarantees
ceph: fix pr_fmt() redefinition
vti: don't allow to add the same tunnel twice
gre: don't allow to add the same tunnel twice
drivers: net: xen-netfront: fix array initialization bug
missing bits of "splice: fix racy pipe->buffers uses"
cifs: fix the race in cifs_writev()
ceph_sync_{,direct_}write: fix an oops on ceph_osdc_new_request() failure
pktgen: be friendly to LLTX devices
r8152: check RTL8152_UNPLUG
net: sun4i-emac: add promiscuous support
net/apne: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
blackfin: cleanup board files
bf609: clock: drop unused clock bit set/clear functions
Blackfin: bf537: rename "CONFIG_ADT75"
...
Diffstat (limited to 'kernel/sched/clock.c')
| -rw-r--r-- | kernel/sched/clock.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c index 43c2bcc35761..3ef6451e972e 100644 --- a/kernel/sched/clock.c +++ b/kernel/sched/clock.c | |||
| @@ -60,13 +60,14 @@ | |||
| 60 | #include <linux/sched.h> | 60 | #include <linux/sched.h> |
| 61 | #include <linux/static_key.h> | 61 | #include <linux/static_key.h> |
| 62 | #include <linux/workqueue.h> | 62 | #include <linux/workqueue.h> |
| 63 | #include <linux/compiler.h> | ||
| 63 | 64 | ||
| 64 | /* | 65 | /* |
| 65 | * Scheduler clock - returns current time in nanosec units. | 66 | * Scheduler clock - returns current time in nanosec units. |
| 66 | * This is default implementation. | 67 | * This is default implementation. |
| 67 | * Architectures and sub-architectures can override this. | 68 | * Architectures and sub-architectures can override this. |
| 68 | */ | 69 | */ |
| 69 | unsigned long long __attribute__((weak)) sched_clock(void) | 70 | unsigned long long __weak sched_clock(void) |
| 70 | { | 71 | { |
| 71 | return (unsigned long long)(jiffies - INITIAL_JIFFIES) | 72 | return (unsigned long long)(jiffies - INITIAL_JIFFIES) |
| 72 | * (NSEC_PER_SEC / HZ); | 73 | * (NSEC_PER_SEC / HZ); |
| @@ -301,14 +302,14 @@ u64 sched_clock_cpu(int cpu) | |||
| 301 | if (unlikely(!sched_clock_running)) | 302 | if (unlikely(!sched_clock_running)) |
| 302 | return 0ull; | 303 | return 0ull; |
| 303 | 304 | ||
| 304 | preempt_disable(); | 305 | preempt_disable_notrace(); |
| 305 | scd = cpu_sdc(cpu); | 306 | scd = cpu_sdc(cpu); |
| 306 | 307 | ||
| 307 | if (cpu != smp_processor_id()) | 308 | if (cpu != smp_processor_id()) |
| 308 | clock = sched_clock_remote(scd); | 309 | clock = sched_clock_remote(scd); |
| 309 | else | 310 | else |
| 310 | clock = sched_clock_local(scd); | 311 | clock = sched_clock_local(scd); |
| 311 | preempt_enable(); | 312 | preempt_enable_notrace(); |
| 312 | 313 | ||
| 313 | return clock; | 314 | return clock; |
| 314 | } | 315 | } |
