[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] rmmod bug fixed
Hi folks,
I've tracked down the rmmod bug, turns out it was a suble error in a
rarely-used syscall interface function that is part of uClibc. It just
so happens that busybox's rmmod implementation uses this interface.
To fix, apply the attached patch as follows:
1. download/save patch file into uClinux-dist directory
2. apply the patch (doing a test run first):
[user@host uClinux-dist]$ patch -p0 --dry-run < syscall_interface.patch
patching file uClibc/libc/sysdeps/linux/microblaze/syscall.c
3. Assuming you get clean output ("patching file...") and no errors,
apply it for real:
[user@host uClinux-dist]$ patch -p0 < syscall_interface.patch
patching file uClibc/libc/sysdeps/linux/microblaze/syscall.c
4. Do a complete rebuild:
[user@host uClinux-dist]$ make clean dep all
Here's a transcript from a test session:
# insmod xilinx_gpio
Using /lib/modules/2.4.32-uc0/kernel/drivers/char/xilinx_gpio.o
xgpio #0 at 0x40040000 mapped to 0x40040000
xgpio #1 at 0x40020000 mapped to 0x40020000
xgpio #2 at 0x40000000 mapped to 0x40000000
xgpio #3 at 0x40060000 mapped to 0x40060000
Xilinx GPIO registered
# lsmod
Module Size Used by
xilinx_gpio 2692 0 (unused)
# rmmod xilinx_gpio
# lsmod
Module Size Used by
I'll get this patch into the next source tree update.
Regards,
John
Index: uClibc/libc/sysdeps/linux/microblaze/syscall.c
===================================================================
--- uClibc/libc/sysdeps/linux/microblaze/syscall.c (revision 311)
+++ uClibc/libc/sysdeps/linux/microblaze/syscall.c (revision 312)
@@ -38,7 +38,7 @@
"brki r14, 0x08 \n\t"
"addk %0, r0, r3 \n\t"
: "=r" (ret)
- : "r" (syscall), "r" (a1), "r" (a2), "r" (a3), "r" (a4), "r" (a5),
+ : "r" (num), "r" (a1), "r" (a2), "r" (a3), "r" (a4), "r" (a5),
"r" (a6)
: "r3", "r5", "r6", "r7", "r8", "r9", "r10", "r12", "r14", "cc");