Re: [android-kernel] android service/deamon general question

2012-06-27 Thread Robert Beckett
a. I would suggest you look at uevents. They are used in android for various purposes. You can see them being used in vold to know when disks are added. You could also look in to the netlink API, which can give a duplex channel between userland and kernel. There are various other options (e

Re: [android-kernel] Re: rcu_barrier stall

2012-02-06 Thread Robert Beckett
On 04/02/12 04:55, rong wrote: It looks to me that something either needs to wake up the idle cpu when an rcu callback is scheduled on it (I couldnt figure out how to do that), or it should not be scheduled on a completely idle cpu as this cpu is already in a quiescent state. While there are oth

[android-kernel] rcu_barrier stall

2012-02-03 Thread Robert Beckett
Hello, Does anyone reading this list know much about the rcu subsystem? I have been debugging a problem with unmounting disks. Occasionally when unmounting an ext4 filesystem, the whole system would freeze. I traced this to it waiting for completion on an rcu_barrier. After lots of debugging,

Re: [android-kernel] Query about Driver suspend and kthread race condition

2011-08-31 Thread Robert Beckett
, Aug 30, 2011 at 6:28 AM, Robert Beckett mailto:robert.beck...@ziilabs.com>> wrote: You would only get a race condition if the suspend code is contending the same lock as the thread. Unlikely if there is no locking. The kernel does not stop kthreads when suspending.

Re: [android-kernel] Query about Driver suspend and kthread race condition

2011-08-30 Thread Robert Beckett
You would only get a race condition if the suspend code is contending the same lock as the thread. Unlikely if there is no locking. The kernel does not stop kthreads when suspending. Each kthread that runs a main loop should call try_to_freeze() in its main loop. This will let it detect the sus

[android-kernel] Android alarm driver aborting suspend [alarm-dev]

2011-05-31 Thread Robert Beckett
Hi, I have been debugging why our device will often abort a suspend. I tracked it down to the following sequence : 1. Alarm type 3 (ELAPSED_REALTIME) is scheduled 2. The alarm is triggered 3. Shortly after, the system is going down for a suspend 4. The wakelock driver aborts the suspend with -EA

Re: [android-kernel] How to print out the current pid in kernel

2011-02-24 Thread Robert Beckett
int pid_n = pid_nr(task_pid(current)); On 22/02/11 08:37, Footballer wrote: Hi fork, I'm now porting the Android to a processor core. Once the zygote is up, the processor trigger an illegal exception. It means that there is a wrong instruction is executed by the processor. I checked the program

Re: [android-kernel] creating a Linux device driver

2011-01-27 Thread Robert Beckett
if it is static data, that isnt going to change, then I would do that as a firmware binary blob. You can put the data in a file, and use the firmware_class functionality to get it from userland in to the kernel. e.g. struct firmware * fw; request_firmware(&fs, ", ); The data from the file is

Re: [android-kernel] GPL Kernel module vs prprietary driver - export information

2011-01-24 Thread Robert Beckett
Hi, I assume that you are referring to a proprietary licensed module that is not built in to the kernel. If this is the case, you wont be able to use any of the EXPORT_SYMBOL_GPL functions, so that rules out /sys. I would use /proc to export the data to userland. Regards Bob On 21/01/11 11

[android-kernel] Thread Local Storage and GDB server

2010-11-05 Thread Robert Beckett
Hi, In porting android to our A8 cortext based board, we have enabled TLS. This works fine with bionic in general, however, it seems to cause problems with gdbserver. Looking at the gdbserver source, it tries to get an address for td_thr_tls_get_addr, which is not implemented in bionics threa

Re: [android-kernel] Re: Load Kernel Module

2010-03-26 Thread Robert Beckett
If you look at how the wifi drivers get loaded, you can see that they load them via hardware/libhardware_legacy/wifi/wifi.c which is called from a jni that the framework uses. You can follow a similar route. A simpler alternative that I use is to write a script to load the module and set a pr