]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/scom: Improve debugfs interface
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 4 Nov 2013 02:20:35 +0000 (13:20 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 6 Nov 2013 03:13:50 +0000 (14:13 +1100)
commit8a0656f4899b5f3698b1ac03bc23795215448828
tree411f67ed12f3dae298eec8d086804bad38441277
parentc4beb50cdd508cd4c2a348482d034e1d7e9d6d10
powerpc/scom: Improve debugfs interface

The current debugfs interface to scom is essentially unused
and racy. It uses two different files "address" and "data"
to perform accesses which is at best impractical for anything
but manual use by a developer.

This replaces it with an "access" file which represent the entire
scom address space which can be lseek/read/writen too.

This file only supports accesses that are 8 bytes aligned and
multiple of 8 bytes in size. The offset is logically the SCOM
address multiplied by 8.

Since nothing in userspace exploits that file at the moment, the ABI
change is a no-brainer.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/sysdev/scom.c