Re: [PATCH] x86: fix unconditional

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Matt Mackall <mpm@...>
Cc: <linux-kernel@...>, <Linux-tiny@...>, Ingo Molnar <mingo@...>
Date: Thursday, January 17, 2008 - 6:15 pm

On Thursday 17 January 2008, Matt Mackall wrote:

Here's a corrected version.

Even if this patch doesn't seem to cause any bug
(tested on a QEMU based PC), I'm wondering if this is "legal" (according
to Linux standards) not to declare a device we don't care about,
but that probably always exists in any PC-compatible machine?
Doesn't this hurt the consistency of the device model?

Another issue would be that we would no longer be able 
to load the speaker driver module from a kernel which
wasn't originally compiled with support for this module.

Perhaps we should only use this trick when CONFIG_EMBEDDED is set.
In this case, we know we're using a limited, non-standard kernel,
and having a partial device tree could be acceptable.

What do you think?

Thanks,

Michael.

Signed-off-by: Michael Opdenacker <michael@free-electrons.com>

diff -Naur linux-2.6.24-rc8-git1/arch/x86/kernel/Makefile_32 linux-2.6.24-rc8-git1-nopcspeaker/arch/x86/kernel/Makefile_32
--- linux-2.6.24-rc8-git1/arch/x86/kernel/Makefile_32	2008-01-17 09:48:58.000000000 +0100
+++ linux-2.6.24-rc8-git1-nopcspeaker/arch/x86/kernel/Makefile_32	2008-01-17 22:43:33.000000000 +0100
@@ -45,10 +45,13 @@
 
 obj-$(CONFIG_VMI)		+= vmi_32.o vmiclock_32.o
 obj-$(CONFIG_PARAVIRT)		+= paravirt_32.o
-obj-y				+= pcspeaker.o
-
 obj-$(CONFIG_SCx200)		+= scx200_32.o
 
+ifdef CONFIG_INPUT_PCSPKR
+	obj-y			+= pcspeaker.o
+endif
+
+
 # vsyscall_32.o contains the vsyscall DSO images as __initdata.
 # We must build both images before we can assemble it.
 # Note: kbuild does not track this dependency due to usage of .incbin
diff -Naur linux-2.6.24-rc8-git1/arch/x86/kernel/Makefile_64 linux-2.6.24-rc8-git1-nopcspeaker/arch/x86/kernel/Makefile_64
--- linux-2.6.24-rc8-git1/arch/x86/kernel/Makefile_64	2008-01-17 09:48:58.000000000 +0100
+++ linux-2.6.24-rc8-git1-nopcspeaker/arch/x86/kernel/Makefile_64	2008-01-17 22:46:07.000000000 +0100
@@ -40,6 +40,9 @@
 obj-$(CONFIG_PCI)		+= early-quirks.o
 
 obj-y				+= topology.o
-obj-y				+= pcspeaker.o
+
+ifdef CONFIG_INPUT_PCSPKR
+        obj-y			+= pcspeaker.o
+endif
 
 CFLAGS_vsyscall_64.o		:= $(PROFILING) -g0

-- 
Michael Opdenacker, Free Electrons
Free Embedded Linux Training Materials
on http://free-electrons.com/training
(More than 1500 pages!)
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86: fix unconditional arch/x86/kernel/pcspeaker.c c..., Michael Opdenacker, (Thu Jan 17, 11:43 am)
Re: [PATCH] x86: fix unconditional arch/x86/kernel/pcspeaker..., Michael Opdenacker, (Thu Jan 17, 1:05 pm)
Re: [PATCH] x86: fix unconditional , Michael Opdenacker, (Thu Jan 17, 6:15 pm)
Re: [PATCH] x86: fix unconditional arch/x86/kernel/pcspeaker..., Michael Opdenacker, (Fri Jan 18, 8:14 am)
Re: [PATCH] x86: fix unconditional arch/x86/kernel/pcspeaker..., Michael Opdenacker, (Fri Jan 18, 9:03 am)
Re: [PATCH] x86: fix unconditional arch/x86/kernel/pcspeaker..., Michael Opdenacker, (Fri Jan 18, 12:29 pm)
Re: [PATCH] x86: , Rob Landley, (Sun Jan 20, 8:25 am)
Re: [PATCH] x86: , Michael Opdenacker, (Wed Jan 23, 6:30 pm)
Re: [PATCH] x86: fix unconditional arch/x86/kernel/pcspeaker..., Michael Opdenacker, (Mon Jan 21, 11:31 am)
Re: [PATCH] x86: , Rob Landley, (Sun Jan 20, 12:59 am)
Re: [PATCH] x86: fix unconditional arch/x86/kernel/pcspeaker..., Michael Opdenacker, (Fri Jan 18, 4:22 am)
Re: [PATCH] x86: fix unconditional arch/x86/kernel/pcspeaker..., Michael Opdenacker, (Thu Jan 17, 2:32 pm)