acrn-kernel/scripts
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
..
basic kconfig: integrate split config into silentoldconfig 2006-06-09 07:31:30 +02:00
genksyms kbuild: replace abort() with exit(1) 2006-06-24 23:46:54 +02:00
kconfig kconfig: correct oldconfig for unset choice options 2006-08-01 11:32:47 +02:00
ksymoops
mod [PATCH] PATCH: 1 line 2.6.18 bugfix: modpost-64bit-fix.patch 2006-08-15 12:53:09 -07:00
package kbuild: fix make rpm for powerpc 2006-06-08 20:18:49 +02:00
rt-tester [PATCH] rtmutex: Modify rtmutex-tester to test the setscheduler propagation 2006-06-27 17:32:47 -07:00
.gitignore
Kbuild.include kbuild: always use $(CC) for $(call cc-version) 2006-08-01 11:32:47 +02:00
Lindent
Makefile
Makefile.build kbuild: fix ia64 breakage after introducing make -rR 2006-07-01 09:58:02 +02:00
Makefile.clean
Makefile.headersinst Basic implementation of 'make headers_check' 2006-06-18 12:02:10 +01:00
Makefile.host kbuild: fix ia64 breakage after introducing make -rR 2006-07-01 09:58:02 +02:00
Makefile.lib kbuild: fix ia64 breakage after introducing make -rR 2006-07-01 09:58:02 +02:00
Makefile.modinst kbuild: add option for stripping modules while installing them 2006-06-24 23:16:45 +02:00
Makefile.modpost kbuild: fix typo in modpost 2006-08-01 11:32:46 +02:00
bin2c.c
binoffset.c
bloat-o-meter [PATCH] bloat-o-meter: gcc-4 fix 2006-06-25 10:01:00 -07:00
checkincludes.pl
checkstack.pl [PATCH] checkstack: print module names 2006-06-25 10:01:15 -07:00
checkversion.pl kbuild: introduce utsrelease.h 2006-07-03 23:30:54 +02:00
conmakehash.c
export_report.pl kbuild: export-symbol usage report generator 2006-06-24 23:14:02 +02:00
extract-ikconfig [PATCH] extract-ikconfig: don't use --long-options 2006-03-24 07:33:21 -08:00
gcc-version.sh
gen_initramfs_list.sh kbuild: fix gen_initramfs_list.sh 2006-04-30 23:56:33 +02:00
hdrcheck.sh Basic implementation of 'make headers_check' 2006-06-18 12:02:10 +01:00
kallsyms.c [PATCH] kallsyms: handle malloc() failure 2006-03-25 08:22:56 -08:00
kernel-doc [PATCH] kernel-doc: ignore __devinit 2006-07-31 13:28:40 -07:00
makelst
mkcompile_h
mkmakefile kbuild: Do not overwrite makefile as anohter user 2006-05-08 06:55:32 +02:00
mksysmap
mkuboot.sh
mkversion
namespace.pl kbuild: fix mode of checkstack.pl and other files. 2006-04-11 13:37:07 +02:00
patch-kernel
pnmtologo.c
profile2linkerlist.pl [PATCH] x86_64: Basic reorder infrastructure 2006-03-25 09:10:56 -08:00
setlocalversion kbuild: append -dirty for updated but uncommited changes 2006-06-17 00:08:17 +02:00
show_delta kbuild: fix mode of checkstack.pl and other files. 2006-04-11 13:37:07 +02:00
ver_linux ver_linux: don't print reiser4progs version if none found 2006-04-05 13:10:19 +02:00