25 Jan, 2008
11 commits
-
There is no need for kobject_unregister() anymore, thanks to Kay's
kobject cleanup changes, so replace all instances of it with
kobject_put().Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Stop using kobject_register, as this way we can control the sending of
the uevent properly, after everything is properly initialized.Cc: Matt Domsch
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Stop using kobject_register, as this way we can control the sending of
the uevent properly, after everything is properly initialized.Cc: Matt Domsch
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Using a kset for this simple directory is an overkill.
Cc: Kay Sievers
Cc: Matt Domsch
Cc: Matt Tolentino
Signed-off-by: Greg Kroah-Hartman -
There is no firmware "subsystem" it's just a directory in /sys that
other portions of the kernel want to hook into. So make it a kobject
not a kset to help alivate anyone who tries to do some odd kset-like
things with this.Cc: Kay Sievers
Cc: Cornelia Huck
Signed-off-by: Greg Kroah-Hartman -
Dynamically create the kset instead of declaring it statically.
Cc: Kay Sievers
Cc: Matt Domsch
Signed-off-by: Greg Kroah-Hartman -
Dynamically create the kset instead of declaring it statically.
Cc: Kay Sievers
Cc: Matt Domsch
Cc: Matt Tolentino
Signed-off-by: Greg Kroah-Hartman -
Dynamically create the kset instead of declaring it statically.
Cc: Kay Sievers
Cc: Matt Domsch
Cc: Matt Tolentino
Signed-off-by: Greg Kroah-Hartman -
This cleans up a lot of code and gets rid of a unneeded macro, and gets
us one step closer to deleting the deprecated subsys_attr code.Cc: Kay Sievers
Cc: Matt Domsch
Cc: Matt Tolentino
Signed-off-by: Greg Kroah-Hartman -
These files should not be "normal" sysfs files as they really are binary
ones. This patch makes them binary files and saves code in doing so.Cc: Kay Sievers
Tested-by: Matt Domsch
Cc: Matt Tolentino
Signed-off-by: Greg Kroah-Hartman -
We don't need a "default" ktype for a kset. We should set this
explicitly every time for each kset. This change is needed so that we
can make ksets dynamic, and cleans up one of the odd, undocumented
assumption that the kset/kobject/ktype model has.This patch is based on a lot of help from Kay Sievers.
Nasty bug in the block code was found by Dave Young
Cc: Kay Sievers
Cc: Dave Young
Signed-off-by: Greg Kroah-Hartman
24 Jan, 2008
2 commits
-
This simply allows other sub-systems (such as ACPI)
to access and print out slots in static dmi_ident[].Signed-off-by: Len Brown
-
Signed-off-by: Len Brown
09 Jan, 2008
1 commit
-
gcc 3.2 has a hard time coping with the code in dmi_id_init():
drivers/built-in.o(.init.text+0x789e): In function `dmi_id_init':
: undefined reference to `__you_cannot_kmalloc_that_much'
make: *** [.tmp_vmlinux1] Error 1Moving half of the code to a separate function seems to help. This is a
no-op for gcc 4.1 which will successfully inline the code anyway.Signed-off-by: Jean Delvare
Cc: Dave Airlie
Tested-by: Kamalesh Babulal
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Oct, 2007
2 commits
-
define global BIT macro
move all local BIT defines to the new globally define macro.
Signed-off-by: Jiri Slaby
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: Kumar Gala
Cc: Dmitry Torokhov
Cc: Jeff Garzik
Cc: James Bottomley
Cc: "Antonino A. Daplas"
Cc: Russell King
Acked-by: Ralf Baechle
Cc: "John W. Linville"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
get rid of input BIT* duplicate defines
use newly global defined macros for input layer. Also remove includes of
input.h from non-input sources only for BIT macro definiton. Define the
macro temporarily in local manner, all those local definitons will be
removed further in this patchset (to not break bisecting).
BIT macro will be globally defined (1<
Cc:
Acked-by: Jiri Kosina
Cc:
Acked-by: Marcel Holtmann
Cc:
Acked-by: Mauro Carvalho Chehab
Cc:
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Oct, 2007
4 commits
-
This makes it a bit more sane when trying to figure out how to clean up
the ktype mess.Based on a larger patch from Kay Sievers
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
The DEFINE_DMI_ATTR macro has a single user left so we can expand it
for slightly shorter/simpler code.Signed-off-by: Jean Delvare
Acked-by: Lennart Poettering
Signed-off-by: Greg Kroah-Hartman -
We can use sysfs attributes with an extra parameter for dmi id
attributes. This makes it possible to use the same callback function
for all attributes, reducing the binary size significantly (-18% on
x86_64.)Signed-off-by: Jean Delvare
Acked-by: Lennart Poettering
Signed-off-by: Greg Kroah-Hartman -
This changes the uevent buffer functions to use a struct instead of a
long list of parameters. It does no longer require the caller to do the
proper buffer termination and size accounting, which is currently wrong
in some places. It fixes a known bug where parts of the uevent
environment are overwritten because of wrong index calculations.Many thanks to Mathieu Desnoyers for finding bugs and improving the
error handling.Signed-off-by: Kay Sievers
Cc: Mathieu Desnoyers
Cc: Cornelia Huck
Signed-off-by: Greg Kroah-Hartman
10 Oct, 2007
1 commit
-
Three main sets of changes:
1) dmi_get_system_info() return value should have been marked const,
since callers should not be changing that data.2) const-ify DMI internals, since DMI firmware tables should,
whenever possible, be marked const to ensure we never ever write to
that data area.3) const-ify DMI API, to enable marking tables const where possible
in low-level drivers.And if we're really lucky, this might enable some additional
optimizations on the part of the compiler.The bulk of the changes are #2 and #3, which are interrelated. #1 could
have been a separate patch, but it was so small compared to the others,
it was easier to roll it into this changeset.Signed-off-by: Jeff Garzik
17 Jul, 2007
2 commits
-
Signed-off-by: Alan Cox
Cc: Matt Domsch
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Beacuse SERIAL_PORT_DFNS is removed from include/asm-i386/serial.h and
include/asm-x86_64/serial.h. the serial8250_ports need to be probed late in
serial initializing stage. the console_init=>serial8250_console_init=>
register_console=>serial8250_console_setup will return -ENDEV, and console
ttyS0 can not be enabled at that time. need to wait till uart_add_one_port in
drivers/serial/serial_core.c to call register_console to get console ttyS0.
that is too late.Make early_uart to use early_param, so uart console can be used earlier. Make
it to be bootconsole with CON_BOOT flag, so can use console handover feature.
and it will switch to corresponding normal serial console automatically.new command line will be:
console=uart8250,io,0x3f8,9600n8
console=uart8250,mmio,0xff5e0000,115200n8
or
earlycon=uart8250,io,0x3f8,9600n8
earlycon=uart8250,mmio,0xff5e0000,115200n8it will print in very early stage:
Early serial console at I/O port 0x3f8 (options '9600n8')
console [uart0] enabled
later for console it will print:
console handover: boot [uart0] -> real [ttyS0]Signed-off-by:
Cc: Andi Kleen
Cc: Bjorn Helgaas
Cc: Russell King
Cc: Gerd Hoffmann
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Jul, 2007
3 commits
-
Well, first of all, I don't want to change so many files either.
What I do:
Adding a new parameter "struct bin_attribute *" in the
.read/.write methods for the sysfs binary attributes.In fact, only the four lines change in fs/sysfs/bin.c and
include/linux/sysfs.h do the real work.
But I have to update all the files that use binary attributes
to make them compatible with the new .read and .write methods.
I'm not sure if I missed any. :(Why I do this:
For a sysfs attribute, we can get a pointer pointing to the
struct attribute in the .show/.store method,
while we can't do this for the binary attributes.
I don't know why this is different, but this does make it not
so handy to use the binary attributes as the regular ones.
So I think this patch is reasonable. :)Who benefits from it:
The patch that exposes ACPI tables in sysfs
requires such an improvement.
All the table binary attributes share the same .read method.
Parameter "struct bin_attribute *" is used to get
the table signature and instance number which are used to
distinguish different ACPI table binary attributes.Without this parameter, we need to offer different .read methods
for different ACPI table binary attributes.
This is impossible as there are various ACPI tables on different
platforms, and we don't know what they are until they are loaded.Signed-off-by: Zhang Rui
Signed-off-by: Greg Kroah-Hartman -
sysfs is now completely out of driver/module lifetime game. After
deletion, a sysfs node doesn't access anything outside sysfs proper,
so there's no reason to hold onto the attribute owners. Note that
often the wrong modules were accounted for as owners leading to
accessing removed modules.This patch kills now unnecessary attribute->owner. Note that with
this change, userland holding a sysfs node does not prevent the
backing module from being unloaded.For more info regarding lifetime rule cleanup, please read the
following message.http://article.gmane.org/gmane.linux.kernel/510293
(tweaked by Greg to not delete the field just yet, to make it easier to
merge things properly.)Signed-off-by: Tejun Heo
Cc: Cornelia Huck
Cc: Andrew Morton
Signed-off-by: Greg Kroah-Hartman -
The patch below adds DMI/SMBIOS based module autoloading to the Linux
kernel. The idea is to load laptop drivers automatically (and other
drivers which cannot be autoloaded otherwise), based on the DMI system
identification information of the BIOS.Right now most distros manually try to load all available laptop
drivers on bootup in the hope that at least one of them loads
successfully. This patch does away with all that, and uses udev to
automatically load matching drivers on the right machines.Basically the patch just exports the DMI information that has been
parsed by the kernel anyway to userspace via a sysfs device
/sys/class/dmi/id and makes sure that proper modalias attributes are
available. Besides adding the "modalias" attribute it also adds
attributes for a few other DMI fields which might be useful for
writing udev rules.This patch is not an attempt to export the entire DMI/SMBIOS data to
userspace. We already have "dmidecode" which parses the complete DMI
info from userspace. The purpose of this patch is machine model
identification and good udev integration.To take advantage of DMI based module autoloading, a driver should
export one or more MODULE_ALIAS fields similar to these:MODULE_ALIAS("dmi:*:svnMICRO-STARINT'LCO.,LTD:pnMS-1013:pvr0131*:cvnMICRO-STARINT'LCO.,LTD:ct10:*");
MODULE_ALIAS("dmi:*:svnMicro-StarInternational:pnMS-1058:pvr0581:rvnMSI:rnMS-1058:*:ct10:*");
MODULE_ALIAS("dmi:*:svnMicro-StarInternational:pnMS-1412:*:rvnMSI:rnMS-1412:*:cvnMICRO-STARINT'LCO.,LTD:ct10:*");
MODULE_ALIAS("dmi:*:svnNOTEBOOK:pnSAM2000:pvr0131*:cvnMICRO-STARINT'LCO.,LTD:ct10:*");These lines are specific to my msi-laptop.c driver. They are basically
just a concatenation of a few carefully selected DMI fields with all
potentially bad characters stripped.Besides laptop drivers, modules like "hdaps", the i2c modules
and the hwmon modules are good candidates for "dmi:" MODULE_ALIAS
lines.Besides merely exporting the DMI data via sysfs the patch adds
support for a few more DMI fields. Especially the CHASSIS fields are
very useful to identify different laptop modules. The patch also adds
working MODULE_ALIAS lines to my msi-laptop.c driver.I'd like to thank Kay Sievers for helping me to clean up this patch
for posting it on lkml.Patch is against Linus' current GIT HEAD. Should probably apply to
older kernels as well without modification.Signed-off-by: Lennart Poettering
Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
03 May, 2007
1 commit
-
We need to work on cleaning up the relationship between kobjects, ksets and
ktypes. The removal of 'struct subsystem' is the first step of this,
especially as it is not really needed at all.Thanks to Kay for fixing the bugs in this patch.
Signed-off-by: Greg Kroah-Hartman
12 Feb, 2007
1 commit
-
Cleanup kernel-doc notation in drivers/firmware/edd.c.
Add edd.c to DocBook/kernel-api.tmpl.
Signed-off-by: Randy Dunlap
Acked-by: Matt Domsch
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Feb, 2007
1 commit
-
Signed-off-by: Len Brown
27 Jan, 2007
1 commit
-
Fix race when deleting an EFI variable and issuing another EFI command on
the same variable. The removal of the variable from the efivars_list
should be done in efivar_delete and not delayed until the kobject release.Furthermore, remove the item from the list at module unload time, and use
list_for_each_entry_safe() rather than list_for_each_safe() for
readability.Tested on ia64.
Signed-off-by: Prarit Bhargava
Signed-off-by: Matt Domsch
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Nov, 2006
1 commit
-
platform_device_register_simple() returns error code as pointer when it
fails. The return value should be checked by IS_ERR().Cc: Abhay Salunke
Signed-off-by: Akinobu Mita
Cc: Matt Domsch
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Oct, 2006
1 commit
-
Even newer Thinkpads have bugs in SMM code that causes hangs with
NMI watchdog.Signed-off-by: Andi Kleen
21 Oct, 2006
1 commit
-
Add a size check in smi_data_write to prevent possible wrapping problems
with large pos values when calling smi_data_buf_realloc on 32-bit.Signed-off-by: Doug Warzecha
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Oct, 2006
3 commits
-
Signed-off-by: Jeff Garzik
Acked-by: Matt Domsch
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Jeff Garzik
Cc: Matt Domsch
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
drivers/firmware/dell_rbu.c: In function 'packetize_data':
drivers/firmware/dell_rbu.c:252: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'int'Cc: Matt Domsch
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Oct, 2006
1 commit
-
The error path path mistakenly called sysfs_create_group() rather than
sysfs_remove_group(). They take the same arguments, so it's easy to
cut-n-paste such a bug.Signed-off-by: Jeff Garzik
Signed-off-by: Linus Torvalds
04 Oct, 2006
2 commits
-
Many files include the filename at the beginning, serveral used a wrong one.
Signed-off-by: Uwe Zeisberger
Signed-off-by: Adrian Bunk -
Signed-off-by: Adrian Bunk
03 Oct, 2006
1 commit
-
dell_rbu: fix pr_debug argument warnings
Use size_t length modifier when outputting size_t and use %p instead of %lu for
'u8 *'.Signed-off-by: Zach Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds