]> git.karo-electronics.de Git - linux-beck.git/commit
selftests/powerpc: Add script to test HMI functionality
authorDaniel Axtens <dja@axtens.net>
Sun, 6 Dec 2015 23:50:51 +0000 (10:50 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Dec 2015 23:46:43 +0000 (10:46 +1100)
commita8da474ec18f4c4c39f83202d64d73a23b755c1d
tree1db0897874f8fe1d0e55724ea57a040bfc5e31c1
parent51c21e72eb99d1136614135d633baae269893778
selftests/powerpc: Add script to test HMI functionality

HMIs (Hypervisor Management|Maintenance Interrupts) are a class of interrupt
on POWER systems.

HMI support has traditionally been exceptionally difficult to test, however
Skiboot ships a tool that, with the correct magic numbers, will inject them.

This, therefore, is a first pass at a script to inject HMIs and monitor
Linux's response. It injects an HMI on each core on every chip in turn
It then watches dmesg to see if it's acknowledged by Linux.

On a Tuletta, I observed that we see 8 (or sometimes 9 or more) events per
injection, regardless of SMT setting, so we wait for 8 before progressing.

It sits in a new scripts/ directory in selftests/powerpc, because it's not
designed to be run as part of the regular make selftests process. In
particular, it is quite possibly going to end up garding lots of your CPUs,
so it should only be run if you know how to undo that.

CC: Mahesh J Salgaonkar <mahesh.salgaonkar@in.ibm.com>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/scripts/hmi.sh [new file with mode: 0755]