linux-stable/Documentation
Pratik R. Sampat 3c14b73454 powerpc/pseries: Interface to represent PAPR firmware attributes
Adds a syscall interface to represent the energy and frequency related
PAPR attributes on the system using the new H_CALL
"H_GET_ENERGY_SCALE_INFO".

H_GET_EM_PARMS H_CALL was previously responsible for exporting this
information in the lparcfg, however the H_GET_EM_PARMS H_CALL
will be deprecated P10 onwards.

The H_GET_ENERGY_SCALE_INFO H_CALL is of the following call format:
hcall(
  uint64 H_GET_ENERGY_SCALE_INFO,  // Get energy scale info
  uint64 flags,           // Per the flag request
  uint64 firstAttributeId,// The attribute id
  uint64 bufferAddress,   // Guest physical address of the output buffer
  uint64 bufferSize       // The size in bytes of the output buffer
);
As specified in PAPR+ v2.11, section 14.14.3.

This H_CALL can query either all the attributes at once with
firstAttributeId = 0, flags = 0 as well as query only one attribute
at a time with firstAttributeId = id, flags = 1.

The output buffer consists of the following
1. number of attributes              - 8 bytes
2. array offset to the data location - 8 bytes
3. version info                      - 1 byte
4. A data array of size num attributes, which contains the following:
  a. attribute ID              - 8 bytes
  b. attribute value in number - 8 bytes
  c. attribute name in string  - 64 bytes
  d. attribute value in string - 64 bytes

The new H_CALL exports information in direct string value format, hence
a new interface has been introduced in
/sys/firmware/papr/energy_scale_info to export this information to
userspace so that the firmware can add new values without the need for
the kernel to be changed.

The H_CALL returns the name, numeric value and string value (if exists)

The format of exposing the sysfs information is as follows:
/sys/firmware/papr/energy_scale_info/
   |-- <id>/
     |-- desc
     |-- value
     |-- value_desc (if exists)
   |-- <id>/
     |-- desc
     |-- value
     |-- value_desc (if exists)
...

The energy information that is exported is useful for userspace tools
such as powerpc-utils. Currently these tools infer the
"power_mode_data" value in the lparcfg, which in turn is obtained from
the to be deprecated H_GET_EM_PARMS H_CALL.

On future platforms, such userspace utilities will have to look at the
data returned from the new H_CALL being populated in this new sysfs
interface and report this information directly without the need of
interpretation.

Signed-off-by: Pratik R. Sampat <psampat@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220217105321.52941-2-psampat@linux.ibm.com
2022-03-08 00:05:00 +11:00
..
ABI powerpc/pseries: Interface to represent PAPR firmware attributes 2022-03-08 00:05:00 +11:00
accounting - A bunch of fixes: forced idle time accounting, utilization values 2022-01-23 17:35:27 +02:00
admin-guide gpio: sim: add doc file to index file 2022-01-24 09:21:28 +01:00
arc docs: ARC: Improve readability 2021-12-10 14:28:01 -07:00
arm Documentation: arm: marvell: Extend Avanta list 2022-01-27 11:22:34 -07:00
arm64 arm64: cpufeature: List early Cortex-A510 parts as having broken dbm 2022-01-28 16:15:46 +00:00
block docs: block: remove queue-sysfs.rst 2022-01-09 18:59:10 -07:00
bpf bpf, docs: Fully document the JMP mode modifiers 2022-01-05 13:11:26 -08:00
cdrom
core-api Convert xfs/iomap to use folios 2022-01-12 12:51:41 -08:00
cpu-freq cpufreq: docs: Update core.rst 2021-12-01 20:02:11 +01:00
crypto
dev-tools This isn't a hugely busy cycle for documentation, but a few significant 2022-01-11 10:00:04 -08:00
devicetree - Drop an unused private data field in the AIC driver 2022-01-30 15:12:02 +02:00
doc-guide docs: discourage use of list tables 2022-01-07 09:33:13 -07:00
driver-api Three small documentation fixes. 2022-01-22 09:02:57 +02:00
fault-injection
fb
features ARM: 9158/1: leave it to core code to manage thread_info::cpu 2021-12-17 11:34:31 +00:00
filesystems The highlight is the new mount "device" string syntax implemented 2022-01-20 13:46:20 +02:00
firmware-guide Device properties framework updates for 5.17-rc1 2022-01-10 20:48:19 -08:00
firmware_class
fpga
gpu Merge tag 'amd-drm-next-5.17-2021-12-16' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2021-12-23 11:55:28 +10:00
hid
hwmon hwmon/pmbus: (ir38064) Add support for IR38060, IR38164 IR38263 2021-12-26 15:02:07 -08:00
i2c Docs: Fixes link to I2C specification 2021-12-31 14:39:28 +01:00
ia64
ide
iio
infiniband
input
isdn
kbuild doc: kbuild: fix default in imply table 2022-01-08 18:28:21 +09:00
kernel-hacking docs: fix typo in Documentation/kernel-hacking/locking.rst 2022-01-27 11:22:33 -07:00
leds
litmus-tests
livepatch Documentation: livepatch: Add livepatch API page 2021-12-23 11:35:53 +01:00
locking Documentation/locking/locktypes: Update migrate_disable() bits. 2021-11-30 15:40:31 +01:00
m68k
maintainer
mhi
mips
misc-devices
netlabel
networking This isn't a hugely busy cycle for documentation, but a few significant 2022-01-11 10:00:04 -08:00
nios2
nvdimm
openrisc
parisc
PCI
pcmcia
power Merge branches 'pm-opp', 'pm-devfreq' and 'powercap' 2022-01-10 18:00:31 +01:00
powerpc
process Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
RCU Merge branches 'doc.2021.11.30c', 'exp.2021.12.07a', 'fastnohz.2021.11.30c', 'fixes.2021.11.30c', 'nocb.2021.12.09a', 'nolibc.2021.11.30c', 'tasks.2021.12.09a', 'torture.2021.12.07a' and 'torturescript.2021.11.30c' into HEAD 2021-12-09 11:38:09 -08:00
riscv riscv: Move KASAN mapping next to the kernel mapping 2022-01-19 17:54:04 -08:00
s390
scheduler docs/scheduler: fix typo and warning in sched-bwc 2021-12-06 12:15:49 -07:00
scsi
security docs: update self-protection __ro_after_init status 2021-12-10 14:02:06 -07:00
sh
sound ALSA: hda/realtek: Add new alc285-hp-amp-init model 2021-12-14 10:44:26 +01:00
sparc
sphinx docs: automarkup.py: Fix invalid HTML link output and broken URI fragments 2022-01-07 09:32:58 -07:00
sphinx-static docs: add support for RTD dark mode 2021-12-10 14:05:55 -07:00
spi spi: pxa2xx: Get rid of unused enable_loopback member 2021-11-29 12:20:00 +00:00
staging Three small documentation fixes. 2022-01-22 09:02:57 +02:00
target
timers rcu: Remove the RCU_FAST_NO_HZ Kconfig option 2021-11-30 17:24:47 -08:00
tools docs: Hook the RTLA documents into the kernel docs build 2022-01-27 11:20:39 -07:00
trace Three small documentation fixes. 2022-01-22 09:02:57 +02:00
translations driver core changes for 5.17-rc1 2022-01-12 11:11:34 -08:00
tty Documentation: add TTY chapter 2021-11-26 16:27:43 +01:00
usb docs: ABI: fixed req_number desc in UAC1 2021-12-30 12:10:44 +01:00
userspace-api Merge branch 'acpi-pfrut' 2022-01-17 18:25:57 +01:00
virt Two larger x86 series: 2022-01-28 19:00:26 +02:00
vm docs/vm: Fix typo in *harden* 2022-01-27 11:22:34 -07:00
w1
watchdog
x86 x86/sgx: Fix minor documentation issues 2021-11-17 06:36:09 -08:00
xtensa
.gitignore
arch.rst docs: Add documentation for ARC processors 2021-11-29 14:53:11 -07:00
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py docs: add support for RTD dark mode 2021-12-10 14:05:55 -07:00
COPYING-logo
docutils.conf
dontdiff
index.rst docs: Hook the RTLA documents into the kernel docs build 2022-01-27 11:20:39 -07:00
Kconfig
logo.gif
Makefile docs: address some text issues with css/theme support 2021-12-16 15:54:12 -07:00
memory-barriers.txt asm-generic: introduce io_stop_wc() and add implementation for ARM64 2021-12-22 10:44:53 +00:00
SubmittingPatches
watch_queue.rst