From: Andrew Jeffery <andrew@aj.id.au>
To: linux-kernel@vger.kernel.org
Cc: Andrew Jeffery <andrew@aj.id.au>,
robh+dt@kernel.org, mark.rutland@arm.com, joel@jms.id.au,
gregkh@linuxfoundation.org, Eugene.Cho@dell.com,
a.amelkin@yadro.com, stewart@linux.ibm.com,
benh@kernel.crashing.org, openbmc@lists.ozlabs.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/4] sysfs interface to miscellaneous BMC controls and fields
Date: Tue, 3 Jul 2018 17:04:09 +1000 [thread overview]
Message-ID: <20180703070413.28756-1-andrew@aj.id.au> (raw)
*Dons firefighting gear*
Hello,
This series introduces a bmc-misc-ctrl driver for exposing hardware interfaces
provided by the BMC (Baseboard Management Controller) for scratch register
communication between the host and the BMC, and other miscellaneous switches
controlling BMC hardware features that can be exposed to the host.
Previously Ben Herrenschmidt sent mail wanting to get some consensus on a good
way forward:
https://lkml.org/lkml/2018/4/10/222
To summarise Ben's points:
We have found that the controls we need to expose do not fit well into existing
driver models for several reasons:
1. Not exposing the fields to userspace would instead mean encoding policy
affecting the host system into the BMC kernel (typically scratch registers)
2. Some controls are so unique as to defy integration into other drivers
3. Exposing specific, well-constrained fields feels less evil than falling back
to devmem.
This series is one implementation of what we had in mind. My motivation is with
respect to ASPEED BMC hardware but Dell have also indicated they would also
make use of something similar for Nuvoton BMCs.
To those ends, the implementation of bmc-misc-ctrl introduced here:
1. Uses devicetree to describe the miscellaneous fields and switches
2. Exposes the fields in sysfs via value/mask/set/clear attributes
3. Adds a 'bmc' class for the fields to aid discovery in userspace
Now, the intent is bmc-misc-ctrl is used as a last resort. If features can
sanely be exposed in more appropriate drivers, then that should (obviously) be
done instead.
I'm sending this out as an RFC as I'm sure people will have feedback. I hope it
will be more constructive than 'NAK'.
Thanks,
Andrew
Andrew Jeffery (4):
dts: misc: Add bindings documentation for bmc-misc-ctrl
Documentation: ABI: Add sysfs-class-bmc documentation to testing
misc: Add bmc-misc-ctrl
dts: aspeed-g5: Add bmc-misc-ctrl nodes to devicetree
Documentation/ABI/testing/sysfs-class-bmc | 62 +++
.../bindings/misc/bmc-misc-ctrl.txt | 252 ++++++++++++
MAINTAINERS | 7 +
arch/arm/boot/dts/aspeed-g5.dtsi | 192 +++++++++
drivers/misc/Kconfig | 8 +
drivers/misc/Makefile | 1 +
drivers/misc/bmc-misc-ctrl.c | 363 ++++++++++++++++++
7 files changed, 885 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-class-bmc
create mode 100644 Documentation/devicetree/bindings/misc/bmc-misc-ctrl.txt
create mode 100644 drivers/misc/bmc-misc-ctrl.c
--
2.17.1
next reply other threads:[~2018-07-03 7:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 7:04 Andrew Jeffery [this message]
2018-07-03 7:04 ` [RFC PATCH 1/4] dts: misc: Add bindings documentation for bmc-misc-ctrl Andrew Jeffery
2018-07-03 7:50 ` Greg KH
2018-07-03 14:16 ` Benjamin Herrenschmidt
2018-07-03 14:31 ` Greg KH
2018-07-03 15:39 ` Benjamin Herrenschmidt
2018-07-04 6:28 ` Andrew Jeffery
2018-07-03 7:04 ` [RFC PATCH 2/4] Documentation: ABI: Add sysfs-class-bmc documentation to testing Andrew Jeffery
2018-07-03 7:50 ` Greg KH
2018-07-04 6:29 ` Andrew Jeffery
2018-07-03 7:04 ` [RFC PATCH 3/4] misc: Add bmc-misc-ctrl Andrew Jeffery
2018-07-03 7:54 ` Greg KH
2018-07-04 7:18 ` Andrew Jeffery
2018-07-03 7:04 ` [RFC PATCH 4/4] dts: aspeed-g5: Add bmc-misc-ctrl nodes to devicetree Andrew Jeffery
2018-07-03 7:54 ` Greg KH
2018-07-04 6:29 ` Andrew Jeffery
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180703070413.28756-1-andrew@aj.id.au \
--to=andrew@aj.id.au \
--cc=Eugene.Cho@dell.com \
--cc=a.amelkin@yadro.com \
--cc=benh@kernel.crashing.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=joel@jms.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=openbmc@lists.ozlabs.org \
--cc=robh+dt@kernel.org \
--cc=stewart@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).