LKML Archive on lore.kernel.org help / color / Atom feed

From: Matteo Croce <mcroce@redhat.com> To: x86@kernel.org, LKML <linux-kernel@vger.kernel.org>, linux-sound@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: [PATCH 0/4] Introduce the aural error reporting framework Date: Mon, 1 Apr 2019 12:24:51 +0200 Message-ID: <20190401102456.11162-1-mcroce@redhat.com> (raw) The Linux kernel has had verbal error reporting since the beginning. Different error conditions trigger different error messages, with different severity: from a simple warning to the most feared kernel panic. While this detailed error reporting is much helpful to developers or end users, there are some cases in which it's impossible to notice that an error happened. The most common case is headless devices, such as home servers without an attached display, or routers without an exposed serial port. Needless to say, logging into the machine via SSH is not an option after such a severe error. In other cases the monitor might be attached, but the system is unable to display the error, probably because there is an X server running and the KMS switch fails. Or simply the user is visually impaired. These are all cases when the aural errors framework comes to help. This framework adds to the kernel a generic library to play sounds, which can be used to report errors or generic events. As the sound card driver could, and most probably will, become unusable during a kernel crash, the sounds are played via the system buzzer which has been around since the dawn of time. The buzzer driver is simple, requires just a few register writes to work, the hardware is extremely cheap and is already present on most machines. The first patch introduces the framework functions, the other three make use of it in, respectively, kernel panic, warning and oops. The last patch, not to be merged, creates a procfs handler useful to test the error reporting. Matteo Croce (4): aural error reporting framework panic: use the aural error reporting framework to report panics bug: use the aural error reporting framework to report warnings oops: use the aural error reporting framework to report oopses arch/x86/lib/Makefile | 1 + arch/x86/lib/play.c | 75 +++++++++++++++++++++++++++++++++++++++++++ include/linux/play.h | 34 ++++++++++++++++++++ kernel/panic.c | 61 +++++++++++++++++++++++++++++++++++ lib/Kconfig.debug | 35 ++++++++++++++++++++ 5 files changed, 206 insertions(+) create mode 100644 arch/x86/lib/play.c create mode 100644 include/linux/play.h -- 2.20.1

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=20190401102456.11162-1-mcroce@redhat.com \ --to=mcroce@redhat.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-sound@vger.kernel.org \ --cc=platform-driver-x86@vger.kernel.org \ --cc=x86@kernel.org \ /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

LKML Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \ linux-kernel@vger.kernel.org public-inbox-index lkml Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git