tilegx: add optimized sched_getcpu() using TILE_COORD SPR
authorChris Metcalf <cmetcalf@tilera.com>
Thu, 11 Oct 2012 16:15:45 +0000 (12:15 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Fri, 12 Oct 2012 18:26:25 +0000 (14:26 -0400)
commitb8d7c0968c095d25fded0e2dfea1a16b1fd42911
tree23fcb29c3e941adaeece6e4375deedcecd7e305a
parentd394eb742a3565d7fe7a4b02710a60b5f219ee64
tilegx: add optimized sched_getcpu() using TILE_COORD SPR

We can discover our x,y coordinate in the core mesh with an
mfspr instruction, multiply y by the core mesh width, and have
the core number without needing to ask the kernel.
ports/ChangeLog.tile
ports/sysdeps/unix/sysv/linux/tile/tilegx/sched_getcpu.c [new file with mode: 0644]