Android: module test fail

Bug #968515 reported by Amit Pundir
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Android
Fix Released
High
Amit Pundir

Bug Description

Software:
Android Images --> https://android-build.linaro.org/builds/~linaro-android/vexpress-rtsm-ics-gcc46-armlt-stable-open/#build=31
big-little-basic-tests --> lp:~pwlars/+junk/big-little-basic-tests

Modify "module" test as per Android shell (mksh) and use busybox references in case of missing commands e.g. grep, seq etc

FastModel:
ubuntu@ip-<snip>:~/RTSM_A15x14-A7x14_VE/bin$ ./RTSM_VE_Cortex-A15x4-A7x4 -a coretile.cluster0.*=android_images/31/boot/img.axf -C motherboard.mmc.p_mmc_file=android_images/31/mmc.bin -C coretile.cache_state_modelled=0 &

Log:

root@android:/ # module
Loading cpufreq driver module...
[ 85.764489] arm-bl-cpufreq: cpufreq initialised successfully
[ 85.770954] arm-bl-cpufreq: Switching to cluster 0
[ 85.776394] arm-bl-cpufreq: Switching to cluster 0
[ 85.782686] arm-bl-cpufreq: cpufreq initialised successfully
[ 85.789178] arm-bl-cpufreq: Switching to cluster 0
[ 85.794067] arm-bl-cpufreq: Switching to cluster 0
[ 85.804650] arm-bl-cpufreq: cpufreq initialised successfully
[ 85.811132] arm-bl-cpufreq: Switching to cluster 0
[ 85.815969] arm-bl-cpufreq: Switching to cluster 0
[ 85.822517] arm-bl-cpufreq: cpufreq initialised successfully
[ 85.829066] arm-bl-cpufreq: Switching to cluster 0
[ 85.833922] arm-bl-cpufreq: Switching to cluster 0
[ 85.839999] arm-bl-cpufreq: cpufreq backend driver registered.
bl-mod-load01 : PASS
Verifying cpufreq driver module loaded...
bl-mod-load02 : PASS
Loading cpufreq driver module when already loaded (should fail)...
insmod: init_module '/system/modules/arm-bl-cpufreq.ko' failed (File exists)
bl-mod-load03 : PASS
Unloading cpufreq driver module...
rmmod: delete_module 'arm-bl-cpufreq' failed (errno 2)
bl-mod-unload01 : FAIL
Verifying cpufreq driver module unloaded...
bl-mod-unload02 : FAIL
Reloading cpufreq driver module...
insmod: init_module '/system/modules/arm-bl-cpufreq.ko' failed (File exists)
bl-mod-reload01 : FAIL
Verifying cpufreq driver module loaded after reload...
bl-mod-reload02 : PASS

Changed in linaro-big-little-reference:
assignee: nobody → Dave Martin (dave-martin-arm)
Revision history for this message
Paul Larson (pwlars) wrote :

Needs triaging to check if this is really a problem with this particular module, or if it's some android rmmod problem, but Dave mentioned he had a patch from ARM that might fix this. Should give that a try first when it's available

Revision history for this message
Dave Martin (dave-martin-arm) wrote : Re: [Bug 968515] Re: Android: module test fail

There are no patches for module load issues that I'm aware of.

I'll see if I can reproduce this. It sounds like there already be some
other cpufreq driver loaded (though I can't imagine what)

Cheers
---Dave

Revision history for this message
Dave Martin (dave-martin-arm) wrote :

If I boot the images from here:

https://android-build.linaro.org/builds/~linaro-android/vexpress-rtsm-ics-gcc46-armlt-stable-open/#build=31

...cpufreq is not enabled (see attached config.gz)

Am I looking at the wrong images?

Revision history for this message
Dave Martin (dave-martin-arm) wrote :

I think this may be caused by the why the Linux module loader squashes '-' characters in module names to underscores.

This may be considered a bug in Android's rmmod. util-linux rmmod will convert i

root@android:/ # insmod /system/modules/arm-bl-cpufreq.ko
[ 57.547151] arm-bl-cpufreq: cpufreq initialised successfully
[ 57.548074] arm-bl-cpufreq: Switching to cluster 0
[ 57.550144] arm-bl-cpufreq: cpufreq initialised successfully
[ 57.551051] arm-bl-cpufreq: Switching to cluster 0
[ 57.552674] arm-bl-cpufreq: cpufreq initialised successfully
[ 57.553582] arm-bl-cpufreq: Switching to cluster 0
[ 57.555072] arm-bl-cpufreq: cpufreq initialised successfully
[ 57.556012] arm-bl-cpufreq: Switching to cluster 0
[ 57.557572] arm-bl-cpufreq: cpufreq backend driver registered.
root@android:/ # rmmod arm-bl-cpufreq
rmmod: delete_module 'arm-bl-cpufreq' failed (errno 2)
255|root@android:/ # cat /proc/modules
arm_bl_cpufreq 2792 0 - Live 0xbf004000
root@android:/ # rmmod arm_bl_cpufreq
[ 58.744249] arm-bl-cpufreq: Switching to cluster 0
[ 58.744326] arm-bl-cpufreq: cpufreq backend driver unloaded.
root@android:/ # cat /proc/modules

Revision history for this message
Dave Martin (dave-martin-arm) wrote :

That should read:

"module-init-tools rmmod will convert its argument to the underscores format for you"

Using the underscores form explicitly makes sense as a workaround, since this should work on both rmmod variants.

Revision history for this message
Paul Larson (pwlars) wrote :

It seems this is a bug in the toolbox version of rmmod.

affects: linaro-big-little-reference → linaro-android
Changed in linaro-android:
assignee: Dave Martin (dave-martin-arm) → nobody
Revision history for this message
Amit Pundir (pundiramit) wrote :

It is not working with "busybox insmod" as well. So it may not be a toolbox issue as well.

However "rmmod arm_bl_cpufreq" works fine. I'll update the script to use this command instead.

Revision history for this message
Amit Pundir (pundiramit) wrote :
Changed in linaro-android:
status: New → Fix Committed
assignee: nobody → Amit Pundir (pundiramit)
Amit Pundir (pundiramit)
Changed in linaro-android:
milestone: none → 12.04
Amit Pundir (pundiramit)
Changed in linaro-android:
status: Fix Committed → Fix Released
Zach Pfeffer (pfefferz)
Changed in linaro-android:
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.