1
0
Fork 0
Commit Graph

94 Commits (d1ab423502e787e264b4797a5fa200d804c4fd63)

Author SHA1 Message Date
Sylvain Munaut d1ab423502 powerpc: Fix the MODALIAS generation in modpost for of devices
Since the devices may have multiple (or none) compatible properties,
the uevent generated internally by the kernel may have multiple
"C..." entries. So the MODALIAS stored in the module must have
wilcard before and after the compatible entry.
Also, if the 'compatible' field is not used for matching, there
will be no 'C' and that must handled as well.

The previous code handled all those case incorrectly and it
"mostly" worked ... but not always.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-19 09:10:10 +02:00
Roman Zippel e61a1c1c4f Allow arch to initialize arch field of the module structure
This will later allow an arch to add module specific information via linker
generated tables instead of poking directly in the module object structure.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-09 12:30:56 -07:00
Yasunori Goto 72280ede31 Add white list into modpost.c for memory hotplug code and ia64's machvec section
This patch is add white list into modpost.c for some functions and
ia64's section to fix section mismatchs.

  sparse_index_alloc() and zone_wait_table_init() calls bootmem allocator
  at boot time, and kmalloc/vmalloc at hotplug time. If config
  memory hotplug is on, there are references of bootmem allocater(init text)
  from them (normal text). This is cause of section mismatch.

  Bootmem is called by many functions and it must be
  used only at boot time. I think __init of them should keep for
  section mismatch check. So, I would like to register sparse_index_alloc()
  and zone_wait_table_init() into white list.

  In addition, ia64's .machvec section is function table of some platform
  dependent code. It is mixture of .init.text and normal text. These
  reference of __init functions are valid too.

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:14:57 -07:00
Bryan Wu 1394f03221 blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix!  Tinyboards.

The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc.  (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000.  Since then ADI has put this core into its Blackfin
processor family of devices.  The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set.  It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.

The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf

The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc

This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/

We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel

[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07 12:12:58 -07:00
Linus Torvalds 15700770ef Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (38 commits)
  kconfig: fix mconf segmentation fault
  kbuild: enable use of code from a different dir
  kconfig: error out if recursive dependencies are found
  kbuild: scripts/basic/fixdep segfault on pathological string-o-death
  kconfig: correct minor typo in Kconfig warning message.
  kconfig: fix path to modules.txt in Kconfig help
  usr/Kconfig: fix typo
  kernel-doc: alphabetically-sorted entries in index.html of 'htmldocs'
  kbuild: be more explicit on missing .config file
  kbuild: clarify the creation of the LOCALVERSION_AUTO string.
  kbuild: propagate errors from find in scripts/gen_initramfs_list.sh
  kconfig: refer to qt3 if we cannot find qt libraries
  kbuild: handle compressed cpio initramfs-es
  kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text
  kbuild: remove stale comment in modpost.c
  kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE
  kbuild: fix make mrproper for Documentation/DocBook/man
  kbuild: remove kconfig binaries during make mrproper
  kconfig/menuconfig: do not hardcode '.config'
  kbuild: override build timestamp & version
  ...
2007-05-06 13:21:57 -07:00
Sam Ravnborg b4d5171ac7 kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text
Added on request from:  Rusty Russell <rusty@rustcorp.com.au>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc:  Rusty Russell <rusty@rustcorp.com.au>
2007-05-02 20:58:10 +02:00
Sam Ravnborg 66bd32e443 kbuild: remove stale comment in modpost.c
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:10 +02:00
Sam Ravnborg 4be40e2223 kbuild: do not emit src version warning for non-modules
modpost is now called with .o files that are not modules.
So do not warn if there is no corresponding .mod
file listing .o files (in .tmp_versions/).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Matthew Wilcox 2a11665945 kbuild: distinguish between errors and warnings in modpost
Some of modpost's warnings are fatal, and some are not.  Adopt the
compiler distinction between errors and warnings by calling merror()
for fatal diagnostics and warn() for non-fatal ones.
merror() was used as replacemtn for error() to avoid clash with glibc

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Sam Ravnborg dc24f0e708 kbuild: remove dependency on input.h from file2alias
Almost all definitions used by file2alias was already
present in mod_devicetable.h.
Added the last definition and killed the input.h usage.

The errornous include was pointed out
by: Jan Engelhardt <jengelh@linux01.gwdg.de>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Deepak Saxena <dsaxena@plexity.net>
2007-05-02 20:58:08 +02:00
Sam Ravnborg 5a4910fbbe kbuild: whitelist logo references from .text to .init.data
drivers/video/logo has references from .text to .init.data
but function is only used during early init.
So reference is OK and we do not want to warn about them =>
whitelist the reference.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Sam Ravnborg a61b2dfd18 kbuild: fix segmentation fault in modpost
If modpost was called manually with filenames without '/'
then modpost would segfault.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:07 +02:00
Sam Ravnborg 9bf8cb9b79 kbuild: fix warnings from .pci_fixup section
Now where we do not pass vmlinux to modpost we started
to see section mismatch warnings from .pci_fixup.
Refactored code a little to include these in the
whitelist again.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:07 +02:00
Sam Ravnborg aae5f662a3 kbuild: whitelist section mismatch in init/main.c
In init/main.c we have a reference from rest_init() to .init.text
which is intentional.
Rename the function 'init' to 'kernel_init' to make it a
kernel wide unique symbol and whitelist the reference.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:07 +02:00
Sam Ravnborg 85bd2fddd6 kbuild: fix section mismatch check for vmlinux
vmlinux does not contain relocation entries which is
used by the section mismatch checks.
Reported by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

Use the individual objects as inputs to overcome
this limitation.
In modpost check the .o files and skip non-ELF files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:07 +02:00
Vivek Goyal 1833d6bc72 [PATCH] i386: modpost apic related warning fixes
o Modpost generates warnings for i386 if compiled with CONFIG_RELOCATABLE=y

WARNING: vmlinux - Section mismatch: reference to .init.text:find_unisys_acpi_oem_table from .text between 'acpi_madt_oem_check' (at offset 0xc0101eda) and 'enable_apic_mode'
WARNING: vmlinux - Section mismatch: reference to .init.text:acpi_get_table_header_early from .text between 'acpi_madt_oem_check' (at offset 0xc0101ef0) and 'enable_apic_mode'
WARNING: vmlinux - Section mismatch: reference to .init.text:parse_unisys_oem from .text between 'acpi_madt_oem_check' (at offset 0xc0101f2e) and 'enable_apic_mode'
WARNING: vmlinux - Section mismatch: reference to .init.text:setup_unisys from .text between 'acpi_madt_oem_check' (at offset 0xc0101f37) and 'enable_apic_mode'WARNING: vmlinux - Section mismatch: reference to .init.text:parse_unisys_oem from .text between 'mps_oem_check' (at offset 0xc0101ec7) and 'acpi_madt_oem_check'
WARNING: vmlinux - Section mismatch: reference to .init.text:es7000_sw_apic from .text between 'enable_apic_mode' (at offset 0xc0101f48) and 'check_apicid_present'

o Some functions which are inline (acpi_madt_oem_check) are not inlined by
  compiler as these functions are accessed using function pointer. These
  functions are put in .text section and they in-turn access __init type
  functions hence modpost generates warnings.

o Do not iniline acpi_madt_oem_check, instead make it __init.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-05-02 19:27:08 +02:00
Linus Torvalds b0138a6cb7 Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits)
  [PARISC] Use symbolic last syscall in __NR_Linux_syscalls
  [PARISC] Add missing statfs64 and fstatfs64 syscalls
  Revert "[PARISC] Optimize TLB flush on SMP systems"
  [PARISC] Compat signal fixes for 64-bit parisc
  [PARISC] Reorder syscalls to match unistd.h
  Revert "[PATCH] make kernel/signal.c:kill_proc_info() static"
  [PARISC] fix sys_rt_sigqueueinfo
  [PARISC] fix section mismatch warnings in harmony sound driver
  [PARISC] do not export get_register/set_register
  [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code
  [PARISC] convert to use CONFIG_64BIT instead of __LP64__
  [PARISC] use CONFIG_64BIT instead of __LP64__
  [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro
  [PARISC] more ENTRY(), ENDPROC(), END() conversions
  [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc
  [PARISC] Fixes /proc/cpuinfo cache output on B160L
  [PARISC] implement standard ENTRY(), END() and ENDPROC()
  [PARISC] kill ENTRY_SYS_CPUS
  [PARISC] clean up debugging printks in smp.c
  [PARISC] factor syscall_restart code out of do_signal
  ...

Fix conflict in include/linux/sched.h due to kill_proc_info() being made
publicly available to PARISC again.
2007-02-26 12:48:06 -08:00
David Brownell da68d61f89 [PATCH] remove modpost false warnings on ARM
This patch stops "modpost" from issuing erroneous modpost warnings on ARM
builds, which it's been doing since since maybe last summer.  A canonical
example would be driver method table entries:

  WARNING: <path> - Section mismatch: reference to .exit.text:<name>_remove
	from .data after '$d' (at offset 0x4)

That "$d" symbol is generated by tools conformant with ARM ABI specs; in
this case it's a symbol **in the middle of** a "<name>_driver" struct.

The erroneous warnings appear to be issued because "modpost" whitelists
references from "<name>_driver" data into init and exit sections ...  but
doesn't know should also include those "$d" mapping symbols, which are not
otherwise associated with "<name>_driver" symbols.

This patch prevents the modpost symbol lookup code from ever returning
those mapping symbols, so it will return a whitelisted symbol instead.
Then things work as expected.

Now to revert various code-bloating "fixes" that got merged because of this
modpost bug....

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:16 -08:00
Kyle McMartin f354ef8abe [PARISC] rename *_ANY_ID to PA_*_ANY_ID in the exported header
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:09:12 -05:00
Kyle McMartin f3cf267335 [PARISC] generate modalias for parisc_device_id tables
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:08:45 -05:00
Kyle McMartin e7b3ca0854 Merge branch 'parisc' from /home/kyle/repos/parisc-2.6.git
Conflicts:

	arch/parisc/hpux/sys_hpux.c
	arch/parisc/mm/ioremap.c
2007-02-17 00:18:23 -05:00
Vivek Goyal f8657e1b55 [PATCH] i386: move startup_32() in text.head section
o Entry startup_32 was in .text section but it was accessing some init
  data too and it prompts MODPOST to generate compilation warnings.

WARNING: vmlinux - Section mismatch: reference to .init.data:boot_params from
.text between '_text' (at offset 0xc0100029) and 'startup_32_smp'
WARNING: vmlinux - Section mismatch: reference to .init.data:boot_params from
.text between '_text' (at offset 0xc0100037) and 'startup_32_smp'
WARNING: vmlinux - Section mismatch: reference to
.init.data:init_pg_tables_end from .text between '_text' (at offset
0xc0100099) and 'startup_32_smp'

o Can't move startup_32 to .init.text as this entry point has to be at the
  start of bzImage. Hence moved startup_32 to a new section .text.head and
  instructed MODPOST to not to generate warnings if init data is being
  accessed from .text.head section. This code has been audited.

o SMP boot up code (startup_32_smp) can go into .init.text if CPU hotplug
  is not supported. Otherwise it generates more warnings

WARNING: vmlinux - Section mismatch: reference to .init.data:new_cpu_data from
.text between 'checkCPUtype' (at offset 0xc0100126) and 'is486'
WARNING: vmlinux - Section mismatch: reference to .init.data:new_cpu_data from
.text between 'checkCPUtype' (at offset 0xc0100130) and 'is486'

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
2007-02-13 13:26:22 +01:00
Matthew Wilcox 742433b00b [PATCH] PA-RISC: Fix bogus warnings from modpost
parisc and parisc64 seem to name sections a little differently from other
targets.  parisc64 gives spurious warnings like:

WARNING: drivers/net/dummy.o - Section mismatch: reference to .init.text:dummy_setup from .data.rel.ro between '.LC1' (at offset 0x0) and '.LC6'

and parisc gives spurious warnings like:

WARNING: drivers/net/dummy.o - Section mismatch: reference to .init.text:dummy_setup from .rodata.cst4 between '.LC1' (at offset 0x0) and '.LC6'

Given the other comments in modpost.c, it seems that the best solution is
to move rodata down to the 'match at start of name' section and add
.data.rel.ro to the 'match entire name' section.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-02-08 18:56:41 -05:00
Vivek Goyal ee6a8545a4 [PATCH] x86-64: Modpost whitelist reference to more symbols (pattern 3)
o MODPOST generates warning on i386 if kernel is compiled with
  CONFIG_RELOCATABLE=y.

WARNING: vmlinux - Section mismatch: reference to .init.text:__init_begin from .text between 'free_initmem' (at offset 0xc0114fd3) and 'do_test_wp_bit'
WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'core_kernel_text' (at offset 0xc012aeae) and 'kernel_text_address'
WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'core_kernel_text' (at offset 0xc012aeb7) and 'kernel_text_address'
WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'get_symbol_pos' (at offset 0xc0135776) and 'reset_iter'
WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'get_symbol_pos' (at offset 0xc013577d) and 'reset_iter'

o These symbols (__init_begin, _sinittext, _einittext) belong to init
  section and generally represent a section boundary. These are special
  symbols in the sense that their size is zero and no memory is allocated
  for them in init section. Their addr and value are same. So even if
  we free the init section, it is ok to reference them.

o Whitelist access to such select symbols in MODPOST.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2007-01-11 01:52:44 +01:00
Vivek Goyal 118c0ace1b [PATCH] x86-64: modpost add more symbols to whitelist pattern2
o MODPOST generates warning for i386 if compiled with CONFIG_RELOCATABLE=y
  and serial console support is enabled.

o Serial console setup function, serial8250_console_setup(), is a non __init
  function and it calls functions which are of type __init().
  (uart_parse_options() and uart_set_options()). Assuming, setup will
  be called during init time, changing serial8250_console_setup() to __init.

o Adding one more pattern to modpost whitelist. Console drivers might
  have *_console structures containing references to setup functions which
  can be of __init type. Don't generate warnings for those.

WARNING: vmlinux - Section mismatch: reference to .init.text: from .data between 'serial8250_console' (at offset 0xc05a33d8) and 'serial8250_reg'

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2007-01-11 01:52:44 +01:00
Randy Dunlap acd19499e9 [PATCH] Fix section mismatch in parainstructions
Section .parainstructions should not warn about section mismatches.

WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x0)
WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x8)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andi Kleen <ak@suse.de>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13 09:05:47 -08:00
Rusty Russell 139ec7c416 [PATCH] paravirt: Patch inline replacements for paravirt intercepts
It turns out that the most called ops, by several orders of magnitude,
are the interrupt manipulation ops.  These are obvious candidates for
patching, so mark them up and create infrastructure for it.

The method used is that the ops structure has a patch function, which
is called for each place which needs to be patched: this returns a
number of instructions (the rest are NOP-padded).

Usually we can spare a register (%eax) for the binary patched code to
use, but in a couple of critical places in entry.S we can't: we make
the clobbers explicit at the call site, and manually clobber the
allowed registers in debug mode as an extra check.

And:

Don't abuse CONFIG_DEBUG_KERNEL, add CONFIG_DEBUG_PARAVIRT.

And:

AK:  Fix warnings in x86-64 alternative.c build

And:

AK: Fix compilation with defconfig

And:

^From: Andrew Morton <akpm@osdl.org>

Some binutlises still like to emit references to __stop_parainstructions and
__start_parainstructions.

And:

AK: Fix warnings about unused variables when PARAVIRT is disabled.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-12-07 02:14:08 +01:00
Benjamin Herrenschmidt 21c4ff80cb [POWERPC] Support feature fixups in modules
This patch adds support for feature fixups in modules. This involves
adding support for R_PPC64_REL64 relocs to the 64 bits module loader.
It also modifies modpost.c to ignore the powerpc fixup sections (or it
would warn when used in .init.text).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-10-25 11:54:13 +10:00
Michael Tokarev 07563c711f [PATCH] EISA bus MODALIAS attributes support
Add modalias attribute support for the almost forgotten now EISA bus and
(at least some) EISA-aware modules.

The modalias entry looks like (for an 3c509 NIC):

 eisa:sTCM5093

and the in-module alias like:

 eisa:sTCM5093*

The patch moves struct eisa_device_id declaration from include/linux/eisa.h
to include/linux/mod_devicetable.h (so that the former now #includes the
latter), adds proper MODULE_DEVICE_TABLE(eisa, ...) statements for all
drivers with EISA IDs I found (some drivers already have that DEVICE_TABLE
declared), and adds recognision of __mod_eisa_device_table to
scripts/mod/file2alias.c so that proper modules.alias will be generated.

There's no support for /lib/modules/$kver/modules.eisamap, as it's not used
by any existing tools, and because with in-kernel modalias mechanism those
maps are obsolete anyway.

The rationale for this patch is:

 a) to make EISA bus to act as other busses with modalias
    support, to unify driver loading

 b) to foget about EISA finally - with this patch, kernel
    (who still supports EISA) will be the only one who knows
    how to choose the necessary drivers for this bus ;)

[akpm@osdl.org: fix the kbuild bit]
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Acked-the-net-bits-by: Jeff Garzik <jeff@garzik.org>
Acked-the-tulip-bit-by: Valerie Henson <val_henson@linux.intel.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 08:26:19 -07:00
Kirill Korotaev c53ddacdc0 kbuild: fail kernel compilation in case of unresolved module symbols
At stage 2 modpost utility is used to check modules.  In case of unresolved
symbols modpost only prints warning.

IMHO it is a good idea to fail compilation process in case of unresolved
symbols (at least in modules coming with kernel), since usually such errors
are left unnoticed, but kernel modules are broken.

- new option '-w' is added to modpost:
  if option is specified, modpost only warns about unresolved symbols

- modpost is called with '-w' for external modules in Makefile.modpost

Signed-off-by: Andrey Mirkin <amirkin@sw.ru>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:14:30 +02:00
Sam Ravnborg 93659af1ce kbuild: add missing return statement in modpost.c:secref_whitelist()
Noticed by: Magnus Damm <magnus@valinux.co.jp>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:01:49 +02:00
Magnus Damm 9e157a5aa8 kbuild: ignore references from ".pci_fixup" to ".init.text"
The modpost code is extended to ignore references
from ".pci_fixup" to ".init.text".

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
2006-09-25 09:01:49 +02:00
Martin Schwidefsky 1534c3820c [S390] zcrypt adjunct processor bus.
Add a bus for the adjunct processor interface. Up to 64 devices can
be connect to the ap bus interface, each device with 16 domains. That
makes 1024 message queues. The interface is asynchronous, the answer
to a message sent to a queue needs to be received at some later point
in time. Unfortunately the interface does not provide interrupts when
a message reply is pending. So the ap bus needs to implement some
fancy polling, each active queue is polled once per 1/HZ second or
continuously if an idle cpus exsists and the poll thread is activ
(see poll_thread parameter).

The ap bus uses the sysfs path /sys/bus/ap and has two bus attributes,
ap_domain and config_time. The ap_domain selects one of the 16 domains
to be used for this system. This limits the maximum number of ap devices
to 64. The config_time attribute contains the number of seconds between
two ap bus scans to find new devices.

The ap bus uses the modalias entries of the form "ap:tN" to autoload
the ap driver for hardware type N. Currently known types are:
3 - PCICC, 4 - PCICA, 5 - PCIXCC, 6 - CEX2A and 7 - CEX2C.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-09-20 15:58:25 +02:00
Hans de Goede e0e9263271 [PATCH] PATCH: 1 line 2.6.18 bugfix: modpost-64bit-fix.patch
There is a small but annoying bug in scripts/mod/file2alias.c which causes
it to generate invalid aliases for input devices on 64 bit archs. This causes
joydev.ko to not be automaticly loaded when inserting a joystick, resulting in
a non working joystick (for the average user).

In scripts/mod/file2alias.c is the following code for generating the input
aliases:
static void do_input(char *alias,
                     kernel_ulong_t *arr, unsigned int min, unsigned int max)
{
        unsigned int i;

        for (i = min; i < max; i++)
                if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG)))
                        sprintf(alias + strlen(alias), "%X,*", i);
}

On 32 bits systems, this correctly generates "0,*" for the first alias, "8,*"
for the second etc.

However on 64 bits it generates: "0,*20,*" resp "8,*28,*" Notice how it adds 20
+ first entry (hex) ! to the list of hex codes, which is 32 more then the first
entry, thus is because the bit test above wraps at 32 bits instead of 64.

scripts/mod/file2alias.c, line 379 reads:
                if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG)))
That should be:
                if (arr[i / BITS_PER_LONG] & (1L << (i%BITS_PER_LONG)))

Notice the added 'L' after the 1, otherwise that is an 32 bit int instead of a
64 bit long, and when that int gets shifted >= 32 times, appearantly the number
by which to shift is wrapped at 5 bits ( % 32) causing it to test a bit 32 bits
too low.

The patch below makes the nescesarry 1 char change :)

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-15 12:53:09 -07:00
Sam Ravnborg fb33d81613 kbuild: improve error from file2alias
The original errormessage was just plain unreadable.

Sample error message after this update (not for real - I provoked it):

FATAL: drivers/net/s2io: sizeof(struct pci_device_id)=33 is not a modulo of the
size of section __mod_pci_device_table=160.
Fix definition of struct pci_device_id in mod_devicetable.h

Before a warning was generated - this is now a fatal error.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-08-01 11:32:46 +02:00
Sam Ravnborg c96fca2137 kbuild: warn when a moduled uses a symbol marked UNUSED
We now have infrastructure in place to mark an EXPORTed symbol
as unused. So the natural next step is to warn during buildtime when
a module uses a symbol marked UNUSED.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-07-01 11:44:23 +02:00
Sam Ravnborg 534b89a9f6 kbuild: fix segv in modpost
Parsing an old Modules.symvers file casued modpost to SEGV.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-07-01 10:10:19 +02:00
Sam Ravnborg 6803dc0ea8 kbuild: replace abort() with exit(1)
We have had no use of the coredump file for a long time.
So just exit(1) and avoid coredumping.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-24 23:46:54 +02:00
Al Viro 468d949401 kbuild: kill some false positives from modpost
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-24 23:14:05 +02:00
Laurent Riffard 9ac545b0f7 kbuild: fix module.symvers parsing in modpost
read_dump didn't split lines between module name and export type.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-16 23:45:45 +02:00
Andrew Morton 6449bd621b kbuild: modpost build fix
scripts/mod/modpost.c: In function `check_license':
scripts/mod/modpost.c:1094: parse error before `const'
scripts/mod/modpost.c:1095: `basename' undeclared (first use in this function)
scripts/mod/modpost.c:1095: (Each undeclared identifier is reported only once
scripts/mod/modpost.c:1095: for each function it appears in.)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-10 07:58:14 +02:00
Sam Ravnborg b817f6feff kbuild: check license compatibility when building modules
Modules that uses GPL symbols can no longer be build with kbuild,
the build will fail during the modpost step.
When a GPL-incompatible module uses a EXPORT_SYMBOL_GPL_FUTURE symbol
then warn during modpost so author are actually notified.

The actual license compatibility check is shared with the kernel
to make sure it is in sync.

Patch originally from: Andreas Gruenbacher <agruen@suse.de> and
Ram Pai <linuxram@us.ibm.com>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-09 21:53:55 +02:00
Ram Pai bd5cbcedf4 kbuild: export-type enhancement to modpost.c
This patch provides the ability to identify the export-type of each
exported symbols in Module.symvers.

NOTE: It updates the Module.symvers file with the additional
information as shown below.

0x0f8b92af      platform_device_add_resources   vmlinux EXPORT_SYMBOL_GPL
0xcf7efb2a      ethtool_op_set_tx_csum          vmlinux EXPORT_SYMBOL

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Avantika Mathur <mathur@us.ibm.com>
Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-09 20:33:10 +02:00
Sam Ravnborg 909252d279 kbuild: fix false section mismatch with ARCH=um build
Ignoring references to .init.text, .exit.text from the .plt section brought
the false positives down to two warnings for a defconfig build of ARCH=um
on x86_64.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-08 20:37:30 +02:00
Randy Dunlap 35899c5751 kbuild: ignore smp_locks section warnings from init/exit code
Add ".smp_locks" section to whitelist as being safe from
init and exit sections.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-08 20:20:23 +02:00
Atsushi Nemoto eae07ac607 [PATCH] kbuild: fix modpost segfault for 64bit mipsel kernel
Here is an updated r_info layout fix.  Please apply "check SHT_REL
sections" patch before this.

64bit mips has different r_info layout.  This patch fixes modpost
segfault for 64bit little endian mips kernel.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-21 12:59:21 -07:00
Atsushi Nemoto 2c1a51f39d [PATCH] kbuild: check SHT_REL sections
I found that modpost can not detect section mismatch on mips and i386.  On
mips64, the modpost (with r_info layout fix) can detect it.  The current
modpst only checks SHT_RELA section but I suppose SHT_REL section should be
checked also.  This patch does not contain r_info layout fix.  I'll post an
updated r_info layout fix on next mail.

Check SHT_REL sections as like as SHT_RELA sections to detect section
mismatch.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-21 12:59:21 -07:00
Linus Torvalds 601e7f024e Revert "kbuild: fix modpost segfault for 64bit mipsel kernel"
This reverts commit c8d8b837eb, which
caused problems for the x86 build. Quoth Sam:

  "It was discussed on mips list but apparently the fix was bogus.  I
   will not have time to look into it so mips can carry this local fix
   until we get a proper fix in mainline."

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-08 13:38:42 -07:00
Linus Torvalds bed7a56033 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: Do not overwrite makefile as anohter user
  kbuild: drivers/video/logo/ - fix ident glitch
  kbuild: fix gen_initramfs_list.sh
  kbuild modpost - relax driver data name
  kbuild: removing .tmp_versions considered harmful
  kbuild: fix modpost segfault for 64bit mipsel kernel
2006-05-08 09:10:44 -07:00
Randy Dunlap 72ee59b579 kbuild modpost - relax driver data name
Relax driver data name from *_driver to *driver.
This fixes the 26 section mismatch warnings in drivers/ide/pci.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-30 23:52:31 +02:00