12 Dec, 2009
2 commits
-
This patch fixes a bug when incrementing/decrementing on a BCD formatted
integer (i.e. 0x09++ should be 0x10 not 0x0A). It just adds a function
for incrementing/decrementing BCD integers by converting to decimal,
doing the increment/decrement and then converting back to BCD.Signed-off-by: Nathaniel McCallum
Signed-off-by: Greg Kroah-Hartman -
The current code to generate usb modaliases from usb_device_id assumes
that the device's bcdDevice descriptor will actually be in BCD format.
While this should be a sane assumption, some devices don't follow spec
and just use plain old hex. This causes drivers for these devices to
generate invalid modalias lines which will never actually match for the
hardware.The following patch adds hex support for bcdDevice in file2alias.c by
detecting when a driver uses a hex formatted bcdDevice_(lo|hi) and
adjusts the output to hex format accordingly.Drivers for devices which have bcdDevice conforming to BCD will have no
change in modalias output. Drivers for devices which don't conform
(i.e. ibmcam) should now generate valid modaliases.EXAMPLE OUTPUT (ibmcam; space added to highlight change)
Old: usb:v0545p800D d030[10-9] dc*dsc*dp*ic*isc*ip*
New: usb:v0545p800D d030a dc*dsc*dp*ic*isc*ip*Signed-off-by: Nathaniel McCallum
Signed-off-by: Greg Kroah-Hartman
23 Sep, 2009
3 commits
-
This makes it consistent with other buses (platform, i2c, vio, ...). I'm
not sure why we use the prefixes, but there must be a reason.This was easy enough to do it, and I did it.
Signed-off-by: Anton Vorontsov
Cc: David Brownell
Cc: David Woodhouse
Cc: Grant Likely
Cc: Jean Delvare
Cc: Ben Dooks
Cc: Benjamin Herrenschmidt
Cc: Dmitry Torokhov
Cc: Samuel Ortiz
Cc: "John W. Linville"
Acked-by: Mike Frysinger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
With this patch spi drivers can use standard spi_driver.id_table and
MODULE_DEVICE_TABLE() mechanisms to bind against the devices. Just like
we do with I2C drivers.This is useful when a single driver supports several variants of devices
but it is not possible to detect them in run-time (like non-JEDEC chips
probing in drivers/mtd/devices/m25p80.c), and when platform_data usage is
overkill.This patch also makes life a lot easier on OpenFirmware platforms, since
with OF we extensively use proper device IDs in modaliases.Signed-off-by: Anton Vorontsov
Cc: David Brownell
Cc: David Woodhouse
Cc: Grant Likely
Cc: Jean Delvare
Cc: Ben Dooks
Cc: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Trevor Keith
Cc: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
21 Sep, 2009
1 commit
-
Ignore drivers/staging/ since it is very likely that new drivers
introduce it again.Signed-off-by: Markus Heidelberg
Signed-off-by: Jiri Kosina
15 Jun, 2009
1 commit
-
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (53 commits)
.gitignore: ignore *.lzma files
kbuild: add generic --set-str option to scripts/config
kbuild: simplify argument loop in scripts/config
kbuild: handle non-existing options in scripts/config
kallsyms: generalize text region handling
kallsyms: support kernel symbols in Blackfin on-chip memory
documentation: make version fix
kbuild: fix a compile warning
gitignore: Add GNU GLOBAL files to top .gitignore
kbuild: fix delay in setlocalversion on readonly source
README: fix misleading pointer to the defconf directory
vmlinux.lds.h update
kernel-doc: cleanup perl script
Improve vmlinux.lds.h support for arch specific linker scripts
kbuild: fix headers_exports with boolean expression
kbuild/headers_check: refine extern check
kbuild: fix "Argument list too long" error for "make headers_check",
ignore *.patch files
Remove bashisms from scripts
menu: fix embedded menu presentation
...
12 Jun, 2009
1 commit
-
This patch allows a virtio driver to use VIRTIO_DEV_ANY_ID for the
device id. This will be used by a test module that can be bound to
any virtio device.Signed-off-by: Christian Borntraeger
Signed-off-by: Rusty Russell
10 Jun, 2009
2 commits
-
As requested by Guennadi Liakhovetski
Cc: Guennadi Liakhovetski
Signed-off-by: Sam Ravnborg -
- add .init.rodata to INIT_DATA, and group all initconst flavors
together
- move strings generated from __setup_param() into .init.rodata
- add .*init.rodata to modpost's sets of init sections
- make modpost warn about references between meminit and cpuinit
as well as memexit and cpuexit sections (as CPU and memory
hotplug are independently selectable features)Signed-off-by: Jan Beulich
Signed-off-by: Sam Ravnborg
04 May, 2009
3 commits
-
mips emit the following debug sections:
.mdebug* and .pdrThey were included in the check for non-allocatable section
and caused modpost to warn.Manuel Lauss suggested to fix this by adding the relevant
sections to the list of sections we do not check.Signed-off-by: Sam Ravnborg
Reported-by: Manuel Lauss -
Jean reported that he saw one warning for each module like the one below:
WARNING: arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.o (.comment.SUSE.OPTs): unexpected non-allocatable section.The warning appeared with the improved version of the
check of the flags in the sections.That check already ignored sections named ".comment" - but SUSE store
additional info in the comment section and has named it in a SUSE
specific way. Therefore modpost failed to ignore the section.The fix is to extend the pattern so we ignore all sections
that start with the name ".comment.".Signed-off-by: Sam Ravnborg
Reported-by: Jean Delvare
Tested-by: Jean Delvare -
The missing TO_NATIVE(sechdrs[i].sh_flags) was causing many
unexpected non-allocatable section warnings when cross-compiling
for an architecture with a different endianness.Fix endianness of all the fields in the ELF header and
section headers, not just some of them so we are not
hit by this anohter time.Signed-off-by: Anders Kaseorg
Reported-by: Sean MacLennan
Tested-by: Sean MacLennan
Signed-off-by: Sam Ravnborg
01 May, 2009
3 commits
-
When you put
.section ".foo"
in an assembly file instead of
.section "foo", "ax"
, one of the possible symptoms is that modpost will see an
ld-generated section name ".foo.1" in section_rel() or section_rela().
But this heuristic has two problems: it will miss a bad section that
has no relocations, and it will incorrectly flag many gcc-generated
sections as bad when compiling with -ffunction-sections
-fdata-sections.On mips it fixes a lot of bogus warnings with gcc 4.4.0 lije this one:
WARNING: crypto/cryptd.o (.text.T.349): unexpected section name.So instead of checking whether the section name matches a particular
pattern, we directly check for a missing SHF_ALLOC in the section
flags.Signed-off-by: Anders Kaseorg
Tested-by: Ralf Baechle
Signed-off-by: Sam Ravnborg -
There is some confusion on naming of the head section.
Correct naming is .head.text.Fix comment so we use correct naming.
Signed-off-by: Sam Ravnborg
-
While building the kernel, we end-up calling modpost with -K and -M
options for the same file (Modules.markers). This is resulting in
modpost's main function calling read_markers() and then write_markers() on
the same file.We then have read_markers() mmap'ing the file, and writer_markers()
opening that same file for writing.The issue is that read_markers() exits without munmap'ing the file and is
as a matter holding a reference on Modules.markers. When write_markers()
is opening that very same file for writing, we still have a reference on
it and cygwin (Windows?) is then making fopen() fail with EPERM.Calling release_file() before exiting read_markers() clears that reference
(and memory leak) and fopen() then succeeds.Tested on both cygwin (1.3.22) and Linux. Also ran modpost within
valgrind on Linux to make sure that the munmap'ed file was not accessed
after read_markers()Signed-off-by: Cedric Hombourger
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Sam Ravnborg
28 Apr, 2009
1 commit
-
The old refok sections
.text.init.refok
.data.init.refok
.exit.text.refokhave been deprecated since commit
312b1485fb509c9bc32eda28ad29537896658cb8. After the other patches in
this patch series nothing is put in these sections, so clean things up
by eliminating all the remaining references to them.Signed-off-by: Tim Abbott
Acked-by: Sam Ravnborg
Signed-off-by: Linus Torvalds
11 Apr, 2009
1 commit
-
new_module() itself already calls strdup() on its modname parameter.
Signed-off-by: Jan Beulich
Signed-off-by: Sam Ravnborg
31 Mar, 2009
1 commit
-
With CONFIG_MODVERSIONS, we version 'struct module' using a dummy
export, but other things matter too:1) 'struct modversion_info' determines the layout of the __versions section,
2) 'struct kernel_param' determines the layout of the __params section,
3) 'struct kernel_symbol' determines __ksymtab*.
4) 'struct marker' determines __markers.
5) 'struct tracepoint' determines __tracepoints.So we rename 'struct_module' to 'module_layout' and include these in
the signature. Now it's general we can add others later on without
confusion.Signed-off-by: Rusty Russell
28 Mar, 2009
1 commit
-
Conflicts:
arch/parisc/kernel/irq.c
arch/x86/include/asm/fixmap_64.h
arch/x86/include/asm/setup.h
kernel/irq/handle.cSemantic merge:
arch/x86/include/asm/fixmap.hSigned-off-by: Ingo Molnar
25 Mar, 2009
1 commit
-
Now platform_device is being widely used on SoC processors where the
peripherals are attached to the system bus, which is simple enough.However, silicon IPs for these SoCs are usually shared heavily across
a family of processors, even products from different companies. This
makes the original simple driver name based matching insufficient, or
simply not straight-forward.Introduce a module id table for platform devices, and makes it clear
that a platform driver is able to support some shared IP and handle
slight differences across different platforms (by 'driver_data').
Module alias is handled automatically when a MODULE_DEVICE_TABLE()
is defined.To not disturb the current platform drivers too much, the matched id
entry is recorded and can be retrieved by platform_get_device_id().Signed-off-by: Eric Miao
Cc: Kay Sievers
Cc: Ben Dooks
Signed-off-by: Greg Kroah-Hartman
23 Feb, 2009
1 commit
-
Conflicts:
arch/x86/mach-default/setup.cSemantic conflict resolution:
arch/x86/kernel/setup.cSigned-off-by: Ingo Molnar
17 Feb, 2009
1 commit
-
Fix endianness of bus member of hid_device_id in modpost.
Signed-off-by: Jiri Slaby
Reported-by: Nye Liu
Cc: Jiri Kosina
Signed-off-by: Jiri Kosina
06 Feb, 2009
1 commit
-
Impact: fix link failure on certain toolchains with specific configs
Recent percpu change made x86_64 split .data.init section into three
separate segments - data.init, percpu and data.init2. data.init2 gets
.data.nosave and .bss.* and is followed by .notes segment. Depending
on configuration both segments might contain no data, in which case
the tool chain makes the section header to contain offset beyond the
end of the file.modpost isn't too happy about it and fails build - as reported by
Pawel Dziekonski:Building modules, stage 2.
MODPOST 416 modules
FATAL: vmlinux is truncated. sechdrs[i].sh_offset=10354688 >
sizeof(*hrd)=64
make[1]: *** [__modpost] Error 1Teach modpost that NOBITS section may point beyond the end of the file
and that .modinfo can't be NOBITS.Reported-by: Pawel Dziekonski
Signed-off-by: Tejun Heo
Signed-off-by: Ingo Molnar
21 Jan, 2009
1 commit
-
Based on a patch from Brian, who identified the issue.
Signed-off-by: Bryan Kadzban
Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
30 Oct, 2008
1 commit
-
This fixes a compile time warning which occurs whenever a static library
is linked into a kernel module. MODPOST tries to look for a
"..cmd" file to look for its dependencies, but that file
doesn't exist or get generated for static libraries.This patch prevents modpost from looking for a .cmd file when a module is
linked with a static library[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Ashutosh Naik
Cc: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Sam Ravnborg
18 Oct, 2008
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (25 commits)
staging: at76_usb wireless driver
Staging: workaround build system bug
Staging: Lindent sxg.c
Staging: SLICOSS: Call pci_release_regions at driver exit
Staging: SLICOSS: Fix remaining type names
Staging: SLICOSS: Fix warnings due to static usage
Staging: SLICOSS: lots of checkpatch fixes
Staging: go7007 v4l fixes
Staging: Fix gcc warnings in sxg
Staging: add echo cancelation module
Staging: add wlan-ng prism2 usb driver
Staging: add w35und wifi driver
Staging: USB/IP: add host driver
Staging: USB/IP: add client driver
Staging: USB/IP: add common functions needed
Staging: add the go7007 video driver
Staging: add me4000 pci data collection driver
Staging: add me4000 firmware files
Staging: add sxg network driver
Staging: add Alacritech slicoss network driver
...Fixed up conflicts due to taint flags changes and MAINTAINERS cleanup in
MAINTAINERS, include/linux/kernel.h and kernel/panic.c.
15 Oct, 2008
1 commit
-
Generate aliases for hid device modules to support autoloading.
Signed-off-by: Jiri Slaby
Signed-off-by: Jiri Kosina
14 Oct, 2008
1 commit
-
Conflicts:
include/asm-x86/statfs.h
13 Oct, 2008
1 commit
-
This makes modpost handle MODULE_DEVICE_TABLE(dmi, xxxx).
I had to change the string pointers in the match table to char arrays,
and picked a size of 79 bytes almost at random -- do we need to make it
bigger than that? I was a bit concerned about the 'bloat' this
introduces into the match tables, but they should all be __initdata so
it shouldn't matter too much.(Actually, modpost does go through the relocations and look at most of
them; it wouldn't be impossible to make it handle string pointers -- but
doesn't seem to be worth the effort, since they're __initdata).Signed-off-by: David Woodhouse
11 Oct, 2008
1 commit
-
We need to add a flag for all code that is in the drivers/staging/
directory to prevent all other kernel developers from worrying about
issues here, and to notify users that the drivers might not be as good
as they are normally used to.Based on code from Andreas Gruenbacher and Jeff Mahoney to provide a
TAINT flag for the support level of a kernel module in the Novell
enterprise kernel release.This is the code that actually modifies the modules, adding the flag to
any files in the drivers/staging directory.Cc: Andreas Gruenbacher
Cc: Jeff Mahoney
Signed-off-by: Greg Kroah-Hartman
07 Oct, 2008
1 commit
-
* Theodore Ts'o (tytso@mit.edu) wrote:
>
> I've been playing with adding some markers into ext4 to see if they
> could be useful in solving some problems along with Systemtap. It
> appears, though, that as of 2.6.27-rc8, markers defined in code which is
> compiled directly into the kernel (i.e., not as modules) don't show up
> in Module.markers:
>
> kvm_trace_entryexit arch/x86/kvm/kvm-intel %u %p %u %u %u %u %u %u
> kvm_trace_handler arch/x86/kvm/kvm-intel %u %p %u %u %u %u %u %u
> kvm_trace_entryexit arch/x86/kvm/kvm-amd %u %p %u %u %u %u %u %u
> kvm_trace_handler arch/x86/kvm/kvm-amd %u %p %u %u %u %u %u %u
>
> (Note the lack of any of the kernel_sched_* markers, and the markers I
> added for ext4_* and jbd2_* are missing as wel.)
>
> Systemtap apparently depends on in-kernel trace_mark being recorded in
> Module.markers, and apparently it's been claimed that it used to be
> there. Is this a bug in systemtap, or in how Module.markers is getting
> built? And is there a file that contains the equivalent information
> for markers located in non-modules code?I think the problem comes from "markers: fix duplicate modpost entry"
(commit d35cb360c29956510b2fe1a953bd4968536f7216)Especially :
- add_marker(mod, marker, fmt);
+ if (!mod->skip)
+ add_marker(mod, marker, fmt);
}
return;
fail:Here is a fix that should take care if this problem.
Thanks for the bug report!
Signed-off-by: Mathieu Desnoyers
Tested-by: "Theodore Ts'o"
CC: Greg KH
CC: David Smith
CC: Roland McGrath
CC: Sam Ravnborg
CC: Wenji Huang
CC: Takashi Nishiie
Signed-off-by: Linus Torvalds
22 Aug, 2008
1 commit
-
With 22454cb99fc39f2629ad06a7eccb3df312f8830e we added only the
first entry of the device table. We need to loop over the whole
device list.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
31 Jul, 2008
1 commit
-
Spelling fixes in scripts/mod/modpost.c
Signed-off-by: Ben Dooks
Cc: Rusty Russell
Cc: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Jul, 2008
1 commit
-
Trying to compile the v850 port brings many compile errors, one of them exists
since at least kernel 2.6.19.There also seems to be noone willing to bring this port back into a usable
state.This patch therefore removes the v850 port.
If anyone ever decides to revive the v850 port the code will still be
available from older kernels, and it wouldn't be impossible for the port to
reenter the kernel if it would become actively maintained again.Signed-off-by: Adrian Bunk
Acked-by: Greg Ungerer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Jul, 2008
2 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (79 commits)
arm: bus_id -> dev_name() and dev_set_name() conversions
sparc64: fix up bus_id changes in sparc core code
3c59x: handle pci_name() being const
MTD: handle pci_name() being const
HP iLO driver
sysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute
sysdev: Add utility functions for simple int/ulong variable sysdev attributes
sysdev: Pass the attribute to the low level sysdev show/store function
driver core: Suppress sysfs warnings for device_rename().
kobject: Transmit return value of call_usermodehelper() to caller
sysfs-rules.txt: reword API stability statement
debugfs: Implement debugfs_remove_recursive()
HOWTO: change email addresses of James in HOWTO
always enable FW_LOADER unless EMBEDDED=y
uio-howto.tmpl: use unique output names
uio-howto.tmpl: use standard copyright/legal markings
sysfs: don't call notify_change
sysdev: fix debugging statements in registration code.
kobject: should use kobject_put() in kset-example
kobject: reorder kobject to save space on 64 bit builds
... -
When a kernel was rebuilt, the previous Module.markers was not cleared.
It caused markers with different format strings to appear as duplicates
when a markers was changed. This problem is present since
scripts/mod/modpost.c started to generate Module.markers, commit
b2e3e658b344c6bcfb8fb694100ab2f2b5b2edb0It therefore applies to 2.6.25, 2.6.26 and linux-next.
I merely merged the patches from Roland, Wenji and Takashi here.
Credits to
Roland McGrath
Wenji Huang
and
Takashi Nishiiefor providing the individual fixes.
- Changelog :
- Integrated Takashi's Makefile modification to clear Module.markers upon
make clean.Signed-off-by: Mathieu Desnoyers
Cc: Roland McGrath
Cc: Wenji Huang
Cc: Takashi Nishiie
Cc: [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Jul, 2008
1 commit
-
Along with the non-modalias conformant "pnp:*" aliases, we add "acpi:*"
entries to PNP drivers, to allow module autoloading by ACPI PNP device
entries, which export proper modalias information, without any specific
userspace modprobe mangling.Cc: Adam Belay
Cc: Thomas Renninger
Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
14 Jul, 2008
1 commit
-
Add modalias and subchannel type attributes for all subchannels.
I/O subchannel specific attributes are now created in
io_subchannel_probe(). modalias and subchannel type are also
added to the uevent for the css bus. Also make the css modalias
known.Signed-off-by: Cornelia Huck
Signed-off-by: Martin Schwidefsky
Signed-off-by: Heiko Carstens
12 Jun, 2008
1 commit
-
Kumar Gala wrote:
We have a case in powerpc in which we want to link some library
routines with all module objects. The routines are intended for
handling out-of-line function call register save/restore so having
them as EXPORT_SYMBOL() is counter productive (we do also need to
link the same "library" code into the kernel).Without this patch a powerpc build would error out and fail
to build modules with the added register save/restore module.There were two obvious solutions:
1) To link the .o file before the modpost stage
2) To ignore the symbols in modpostOption 1) was ruled out because we do not have any separate
linking stage for single file modules.This patch implements option 2 - and do so only for powerpc.
The symbols we ignore are all undefined symbols named:
_restgpr_*, _savegpr_*, _rest32gpr_*, _save32gpr_*Signed-off-by: Sam Ravnborg
Cc: Kumar Gala
Cc: Paul Mackerras