From: "Christian W. Zuckschwerdt" <zany@triq.net>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@transmeta.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: [PATCH] enabling LKM for custom beeper
Date: Sun, 28 Jan 2001 22:51:12 +0100 (CET) [thread overview]
Message-ID: <0101282035420.4850-300000@localhost> (raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 495 bytes --]
Hi Linus, Alan,
this patch has proven to be stable an useable. It hasn't changed
since 2.2.13.
The patch affects kd_mksound and kd_nosound which are responsible for
generating sound.
The default behaviour won't be changed but it's now possible for a LKM to
hook into these calls and change the way the system bell rings.
Changes in struct timer_list made a separate patch for 2.4.0 necessary.
Please incorporante into next release of 2.{2,4} if appropriate; TIA,
cu.
:
Christian
[-- Attachment #2: Type: TEXT/PLAIN, Size: 1722 bytes --]
--- drivers/char/vt.c.orig Mon Aug 9 21:04:39 1999
+++ drivers/char/vt.c Sun Jan 23 17:10:28 2000
@@ -92,18 +92,20 @@
|| (defined(__mips__) && !defined(CONFIG_SGI))
static void
-kd_nosound(unsigned long ignored)
+_kd_nosound(unsigned long ignored)
{
/* disable counter 2 */
outb(inb_p(0x61)&0xFC, 0x61);
return;
}
-void
+void (*kd_nosound)(unsigned long ignored) = _kd_nosound;
+
+static void
_kd_mksound(unsigned int hz, unsigned int ticks)
{
static struct timer_list sound_timer = { NULL, NULL, 0, 0,
- kd_nosound };
+ _kd_nosound };
unsigned int count = 0;
--- kernel/ksyms.c.orig Wed Oct 20 02:14:02 1999
+++ kernel/ksyms.c Sun Jan 23 17:10:28 2000
@@ -62,6 +62,9 @@
extern void free_dma(unsigned int dmanr);
extern spinlock_t dma_spin_lock;
+extern void (*kd_nosound)(unsigned long ignored);
+extern void (*kd_mksound)(unsigned int count, unsigned int ticks);
+
#ifdef CONFIG_MODVERSIONS
const struct module_symbol __export_Using_Versions
__attribute__((section("__ksymtab"))) = {
@@ -341,6 +344,8 @@
EXPORT_SYMBOL(register_reboot_notifier);
EXPORT_SYMBOL(unregister_reboot_notifier);
EXPORT_SYMBOL(_ctype);
+EXPORT_SYMBOL(kd_nosound);
+EXPORT_SYMBOL(kd_mksound);
EXPORT_SYMBOL(secure_tcp_sequence_number);
EXPORT_SYMBOL(get_random_bytes);
EXPORT_SYMBOL(securebits);
--- include/linux/vt_kern.h.orig Fri Oct 22 01:48:41 1999
+++ include/linux/vt_kern.h Sun Jan 23 17:10:28 2000
@@ -30,7 +30,7 @@
struct wait_queue *paste_wait;
} *vt_cons[MAX_NR_CONSOLES];
-void (*kd_mksound)(unsigned int hz, unsigned int ticks);
+extern void (*kd_mksound)(unsigned int hz, unsigned int ticks);
/* console.c */
[-- Attachment #3: Type: TEXT/PLAIN, Size: 1843 bytes --]
--- linux-2.4.0-pristine/drivers/char/vt.c Thu Jan 4 22:00:55 2001
+++ linux-2.4.0/drivers/char/vt.c Sun Jan 28 21:01:37 2001
@@ -98,17 +98,19 @@
|| (defined(__arm__) && defined(CONFIG_HOST_FOOTBRIDGE))
static void
-kd_nosound(unsigned long ignored)
+_kd_nosound(unsigned long ignored)
{
/* disable counter 2 */
outb(inb_p(0x61)&0xFC, 0x61);
return;
}
-void
+void (*kd_nosound)(unsigned long ignored) = _kd_nosound;
+
+static void
_kd_mksound(unsigned int hz, unsigned int ticks)
{
- static struct timer_list sound_timer = { function: kd_nosound };
+ static struct timer_list sound_timer = { function: _kd_nosound };
unsigned int count = 0;
unsigned long flags;
--- linux-2.4.0-pristine/include/linux/vt_kern.h Thu Jan 4 23:51:24 2001
+++ linux-2.4.0/include/linux/vt_kern.h Sun Jan 28 21:00:32 2001
@@ -30,7 +30,7 @@
wait_queue_head_t paste_wait;
} *vt_cons[MAX_NR_CONSOLES];
-void (*kd_mksound)(unsigned int hz, unsigned int ticks);
+extern void (*kd_mksound)(unsigned int hz, unsigned int ticks);
/* console.c */
--- linux-2.4.0-pristine/kernel/ksyms.c Wed Jan 3 01:45:37 2001
+++ linux-2.4.0/kernel/ksyms.c Sun Jan 28 21:00:32 2001
@@ -62,6 +62,9 @@
extern void free_dma(unsigned int dmanr);
extern spinlock_t dma_spin_lock;
+extern void (*kd_nosound)(unsigned long ignored);
+extern void (*kd_mksound)(unsigned int count, unsigned int ticks);
+
#ifdef CONFIG_MODVERSIONS
const struct module_symbol __export_Using_Versions
__attribute__((section("__ksymtab"))) = {
@@ -455,6 +458,8 @@
EXPORT_SYMBOL(machine_halt);
EXPORT_SYMBOL(machine_power_off);
EXPORT_SYMBOL(_ctype);
+EXPORT_SYMBOL(kd_nosound);
+EXPORT_SYMBOL(kd_mksound);
EXPORT_SYMBOL(secure_tcp_sequence_number);
EXPORT_SYMBOL(get_random_bytes);
EXPORT_SYMBOL(securebits);
reply other threads:[~2001-01-28 21:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=0101282035420.4850-300000@localhost \
--to=zany@triq.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.