public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sysfs for my chips
@ 2013-10-10  4:19 Benjamin Herrenschmidt
  2013-10-10  7:03 ` [PATCH] sysfs/bin: Fix size handling overflow for bin_attribute Benjamin Herrenschmidt
  2013-10-10 17:44 ` sysfs for my chips Greg KH
  0 siblings, 2 replies; 11+ messages in thread
From: Benjamin Herrenschmidt @ 2013-10-10  4:19 UTC (permalink / raw)
  To: Greg KH; +Cc: Tejun Heo, Linus Torvalds, Linux Kernel list

Hi Greg !

(random CC list of clueful people)

On some new powerpc platforms (non-hypervisor or rather linux is the
hypervisor), I want to expose a bunch of stuff per "chip", the chips
being currently the processor chips and the "centaurs" (think of them as
the bottom half of the memory controllers).

Among other, I want a sysfs file in there to access "xscom" on the chip
which is a sideband bus used for low level stuff (think jtag on steroid)
which we can use, among others, for chip health monitoring, general
debugging and diagnostics, etc...

I might add more such as VPD, model information, etc... later or at
least a link to corresponding device-tree node.

How do you suggest I expose that ? So far I've been thinking about
something like

	/sys/chips/{processor,centaur}/chip#/files

or to avoid namespace clashes

	/sys/firmware/chips/{processor,centaur}/chip#/files

Or maybe just

	/sys/firmware/chips/chip#/files

(the chip type can be inferred from the chip#, they use the same space
at least as far my firmware exposes them to Linux)

(the actual access to xscom goes via firmware tho it makes *some* sense)

But I could instead create platform devices corresponding to the
device-tree representation of each of those chips ... and have the
platform devices contain the magic attributes. That's a bit more
convoluted though.

What's the current trend of the day for that sort of thing ? I'd rather
avoid yet-another-chardev-with-ioctl's here ...

Cheers,
Ben.



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-10-11  9:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-10  4:19 sysfs for my chips Benjamin Herrenschmidt
2013-10-10  7:03 ` [PATCH] sysfs/bin: Fix size handling overflow for bin_attribute Benjamin Herrenschmidt
2013-10-10 17:38   ` Greg KH
2013-10-10 17:40     ` Greg KH
2013-10-10 20:02       ` Benjamin Herrenschmidt
2013-10-10 17:44 ` sysfs for my chips Greg KH
2013-10-10 20:01   ` Benjamin Herrenschmidt
2013-10-10 20:26     ` Geert Uytterhoeven
2013-10-10 21:30       ` Benjamin Herrenschmidt
2013-10-11  6:52         ` Geert Uytterhoeven
2013-10-11  9:06           ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox