]> 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)
commit67023fe4a31242b0a830d7f7566a9c57becf9cdd
tree411f67ed12f3dae298eec8d086804bad38441277
parenta733a870fb26481859d75d90d285400d236b880f
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