linux/arch/tile
Henrik Austad 39e8202bb3 tile: ns2cycles should use __raw_get_cpu_var
ns2cycles use per_cpu variables, and will, eventually, find its way into
smp_processor_id(). This is not safe in a preemptible kernel;
preemption should ideally be disabled.

BUG: using smp_processor_id() in preemptible [00000000] code:
systemd-modules/367
caller is ns2cycles+0x40/0xb8

Starting stack dump of tid 367, pid 367 (systemd-modules) on cpu 2 at
cycle 20969956421
 frame 0: 0xfffffff70004b860 dump_stack+0x0/0x20 (sp 0xfffffe407993fa90)
 frame 1: 0xfffffff7006abc28 debug_smp_processor_id+0x1a8/0x1e0 (sp
0xfffffe407993fa90)
 frame 2: 0xfffffff7004d7b40 ns2cycles+0x40/0xb8 (sp 0xfffffe407993fab8)
 frame 3: 0xfffffff7004dc578 __ndelay+0x38/0x80 (sp 0xfffffe407993fae0)

However, in this case:

- the frequency is the same accross all cores
- we use the data read-only
- we do not scale the frequency

Which means that we can use the __raw_get_cpu_var instead.

Signed-off-by: Henrik Austad <haustad@cisco.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2013-03-26 13:52:16 -04:00
..
configs netfilter: remove xt_NOTRACK 2012-09-03 13:36:40 +02:00
gxio arch/tile: provide kernel support for the tilegx USB shim 2012-07-18 16:40:24 -04:00
include tile: support atomic64_dec_if_positive() 2013-03-22 15:47:00 -04:00
kernel tile: ns2cycles should use __raw_get_cpu_var 2013-03-26 13:52:16 -04:00
kvm arch/tile/kvm: remove depends on CONFIG_EXPERIMENTAL 2013-01-17 12:11:26 -08:00
lib tile: export a handful of symbols appropriately 2013-02-08 13:20:36 -05:00
mm swap: add per-partition lock for swapfile 2013-02-23 17:50:17 -08:00
Kbuild
Kconfig arch: remove KCORE_ELF again [tile] 2013-03-22 15:47:11 -04:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile arch/tile: avoid generating .eh_frame information in modules 2012-10-23 10:21:43 -04:00