Re: Use of SCHED_SOFTIRQ

2015-01-28 Thread Vignesh Radhakrishnan
Hey Sreejith,


softirq's are run as bottom half processing (after an interrupt is handled
or when there is no work to be done -
https://www.kernel.org/doc/htmldocs/kernel-hacking/basics-softirqs.html )
and sched_softirq is one such soft irq whose only function is confined to
the routine run_rebalance_domain().


__schedule() is the main scheduling function that tries to pick the next
task and then perform context switch and other associated scheduling
functions. Since run_rebalance_domain() need not be run at that exact time
frame, it is scheduled for later time when the cpu can take it up using
softirq's. Therefore __schedule() need not be called in this softirq
context as such because these are independent operations.

Hope this helps.

Thanks and regards,
Vignesh Radhakrishnan

On Wed, Jan 28, 2015 at 10:25 PM, Sreejith M M 
wrote:

> Hi,
>
> I was reading LKD by Robert Love. I got the following idea from the book.
>
>
> Correct me if I am worng
> I was checking through source code and I found that on every timer
> interrupt, through sched/fair.c we are raising the SCHED_SOFTIRQ().
> I was checking the relation between SCHED_SOFTIRQ and actual
> __schedule() function.
>
> My assumption:
> schedule() function is the function which selects the processes which
> are ready to run  in run queue. schedule() function is called in every
> timer tick.
>
> What I was thinking is that schedule() will be called as part of
> handling SCHED_SOFTIRQ() . But in source code, SCHED_SOFTIRQ is
> handled through run_rebalance_domain() function (sched/fair.c) . I am
> unable to trace __schedule()  from this function.
>
> Am I missing anything or my assumptions are wrong?
> --
> Regards,
> Sreejith
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
http://vigneshradhakrishnan.blogspot.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Help regarding RT kernel on ARM v7

2015-01-13 Thread Vignesh Radhakrishnan
This seems to have hit RCU stalls here which got solved while detecting
this. This happens when a grace period is not completed for more than 21
seconds (modifiable timeout from config).

If you are able to reproduce this, can you try the following things :

1.  Enable lockdep and use debug_show_all_locks() API inside the stall
detection code to see who are holding the read locks and figure out why
they are not releasing it
2.  Enable RCU_DEBUGGING options from config and get data points from those
to see what is happening using ftrace.

Thanks and regards,
Vignesh Radhakrishnan

On Wed, Jan 14, 2015 at 9:00 AM, meenakshi aggarwal 
wrote:

> Hi,
>
>
>
>
> I am receiving following kernel warning while running kernel
>
> “3.12.19-rt30+ #6 SMP PREEMPT RT Tue Jan 13 15:35:39 IST 2015 armv7l
> GNU/Linux” on ARM v7 platform.
>
>
>
> Kindly help.
>
>
>
>
>
> [ 1044.465822] libphy: mdio@2d24000:02 - Link is Up - 1000/Full
>
> [ 1058.805821] libphy: mdio@2d24000:00 - Link is Up - 1000/Full
>
> [ 1662.764689] [ cut here ]
>
> [ 1662.768867] WARNING: CPU: 1 PID: 18 at net/sched/sch_generic.c:279
> dev_watchdog+0x137/0x198()
>
> [ 1662.777581] NETDEV WATCHDOG: eth1 (fsl-gianfar): transmit queue 0 timed
> out
>
> [ 1662.876129] Modules linked in:
>
> [ 1662.885557] CPU: 1 PID: 18 Comm: ksoftirqd/1 Not tainted 3.12.19-rt30+
> #1
>
> [ 1662.885609] [<80010991>] (unwind_backtrace+0x1/0x88) from [<8000e677>]
> (show_stack+0xb/0xc)
>
> [ 1662.885628] [<8000e677>] (show_stack+0xb/0xc) from [<803024d3>]
> (dump_stack+0x4b/0x84)
>
> [ 1662.885646] [<803024d3>] (dump_stack+0x4b/0x84) from [<80018d4d>]
> (warn_slowpath_common+0x45/0x64)
>
> [ 1662.885660] [<80018d4d>] (warn_slowpath_common+0x45/0x64) from
> [<80018d87>] (warn_slowpath_fmt+0x1b/0x24)
>
> [ 1662.885678] [<80018d87>] (warn_slowpath_fmt+0x1b/0x24) from
> [<8029e5b7>] (dev_watchdog+0x137/0x198)
>
> [ 1662.885697] [<8029e5b7>] (dev_watchdog+0x137/0x198) from [<8001fe53>]
> (call_timer_fn.isra.32+0x17/0x54)
>
> [ 1662.885712] [<8001fe53>] (call_timer_fn.isra.32+0x17/0x54) from
> [<8001ff97>] (run_timer_softirq+0x107/0x140)
>
> [ 1662.885725] [<8001ff97>] (run_timer_softirq+0x107/0x140) from
> [<8001b7ad>] (do_current_softirqs+0x105/0x1cc)
>
> [ 1662.885737] [<8001b7ad>] (do_current_softirqs+0x105/0x1cc) from
> [<8001b9cb>] (run_ksoftirqd+0x23/0x38)
>
> [ 1662.885754] [<8001b9cb>] (run_ksoftirqd+0x23/0x38) from [<8002fb15>]
> (smpboot_thread_fn+0x175/0x188)
>
> [ 1662.885769] [<8002fb15>] (smpboot_thread_fn+0x175/0x188) from
> [<8002a945>] (kthread+0x5d/0x6c)
>
> [ 1662.885784] [<8002a945>] (kthread+0x5d/0x6c) from [<8000c339>]
> (ret_from_fork+0x11/0x38)
>
> [ 1662.893114] ---[ end trace 0002 ]---
>
> [ 1682.685516] INFO: rcu_preempt detected stalls on CPUs/tasks: {}
> (detected by 1, t=2102 jiffies, g=489, c=488, q=1155)
>
> [ 1682.685520] INFO: Stall ended before state dump start
>
>
>
>
> Thanks & Regards
> Meenakshi Aggarwal
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
http://vigneshradhakrishnan.blogspot.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: hi about process_backlog()

2014-12-24 Thread Vignesh Radhakrishnan
Hi,

I was tracing the program flow. So basically i figured out that
net_rx_action calls process_backlog and i saw that deletion is happening at
net_rx_action().

So i used git blame on that file and saw that this commit performed the
deletion. Then when i saw what the commit does, i found that it changed the
deletion location from process_backlog to here.

Thanks and regards,
Vignesh Radhakrishnan

On Wed, Dec 24, 2014 at 8:22 AM, lx  wrote:

> hi :
> How to find this commit:
> #
> Earlier we had deletion in process_backlog itself, but
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/
> linux.git/commit/?id=d75b1ade567ffab085e8adbbdacf0092d10cd09c has changed
> it.
> #
>
> There are so many commits, and this commit don't show some messages about
> process_backlog().The messages is:
> #
> commit d75b1ade567ffab085e8adbbdacf0092d10cd09c
> Author: Eric Dumazet 
> Date:   Sun Nov 2 06:19:33 2014 -0800
>
> net: less interrupt masking in NAPI
>
> net_rx_action() can mask irqs a single time to transfert sd->poll_list
> into a private list, for a very short duration.
>
> Then, napi_complete() can avoid masking irqs again,
> and net_rx_action() only needs to mask irq again in slow path.
>
> This patch removes 2 couples of irq mask/unmask per typical NAPI run,
> more if multiple napi were triggered.
>
> Note this also allows to give control back to caller (do_softirq())
> more often, so that other softirq handlers can be called a bit earlier,
> or ksoftirqd can be wakeup earlier under pressure.
>
> This was developed while testing an alternative to RX interrupt
> mitigation to reduce latencies while keeping or improving GRO
> aggregation on fast NIC.
>
> Idea is to test napi->gro_list at the end of a napi->poll() and
> reschedule one NAPI poll, but after servicing a full round of
> softirqs (timers, TX, rcu, ...). This will be allowed only if softirq
> is currently serviced by idle task or ksoftirqd, and resched not
> needed.
>
> Signed-off-by: Eric Dumazet 
> Cc: Willem de Bruijn 
> Signed-off-by: David S. Miller 
> #
>
>
> Thank you.
>



-- 
http://vigneshradhakrishnan.blogspot.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Synchronize_rcu() and synchronize_sched() in _cpu_down path

2014-12-16 Thread Vignesh Radhakrishnan
Hi,

I had a query regarding calling synchronize_rcu and synchronize_sched in
_cpu_down path :
Here is the snippet below :

/*
 * By now we've cleared cpu_active_mask, wait for all
preempt-disabled
 * and RCU users of this state to go away such that all new such
users
 * will observe it.
 *
 * For CONFIG_PREEMPT we have preemptible RCU and its sync_rcu()
might
 * not imply sync_sched(), so explicitly call both.
 *
 * Do sync before park smpboot threads to take care the rcu boost
case.
 */
#ifdef CONFIG_PREEMPT
synchronize_sched();
#endif
synchronize_rcu();

My query is that :
During cpu_down path, we do migrate tasks in this CPU to another CPU

 As per LWN article here - http://lwn.net/Articles/253651/ :

*For example, suppose that a task calls rcu_read_lock() on one CPU, is
preempted, resumes on another CPU, and then calls rcu_read_unlock(). The
first CPU's counter will then be +1 and the second CPU's counter will be
-1, however, they will still sum to zero. Regardless of possible
preemption, when the sum of the old counter elements does go to zero, it is
safe to move to the next grace-period stage, as shown on the right-hand
side of the above figure. *

>From what i understand : Since we migrate the tasks to another CPU, the
read side critical sections should get completed from other CPU on which
this task is going to run.
Therefore why call synchronize_rcu()/synchronize_sched()  and wait in the
cpu_down path while there is no write operations happening here in this
code?

Thanks and regards,
Vignesh Radhakrishnan
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: ktime_get() equivalent from user space

2014-12-01 Thread Vignesh Radhakrishnan
An alternative that you can consider would be to expose the desired time or
value from your driver, using a sysfs entry so that they can be synced to
what you are doing in the driver level and  user space can read it using
'cat'

Thanks and regards,
Vignesh Radhakrishnan

On Monday, December 1, 2014, manty kuma  wrote:
> Hi,
>
> I need to measure some timings in my system. At driver level, i am using
ktime_get() to log the times.
> I need to map this to something of the same unit at user space.
>
> I checked /proc/uptime. This value also includes the suspend time which
ktime_get() doesn't include. Hence this option is ruled out.
>
> Is there any other proc entry or any other source which is of same unit?
>
> Best Regards,
> manty
>

-- 
http://vigneshradhakrishnan.blogspot.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Query on USB related debugging

2014-11-29 Thread Vignesh Radhakrishnan
I am guessing may be the particular interrupt is disabled at the GIC level
? I guess best would to do a GIC registers dump and see if the interrupts
are pending at the GIC level something of that sort. But best would be to
check from GIC perspective.

Also see if there is any low power mode that is attained by the particular
h/w blocks. Generally during these modes some drivers choose to disable
interrupts. Worthwile including dynamic debug on those code pieces as well.

Thanks and regards,
Vignesh Radhakrishnan

On Thu, Nov 27, 2014 at 2:26 PM, Victor Ascroft 
wrote:

> Hello,
>
> I have an embedded device with a Freescale ARM Cortex A5 processor,
> running the 3.18-rc5 kernel. I have a problem where using the Ethernet over
> USB client stops functioning after a while. If I set the IP of the usb0
> interface and try to ping the device from the host or vice versa, it works
> fine up to that point. Running iperf, establishes a connection to the host,
> but, doesn't complete even one cycle.  Checking /proc/interrupts shows that
> after a while, probably a few seconds, it freezes. No more interrupts are
> serviced it seems. I put in a few debug prints in udc_irq to check, if
> things go right superficially at least, udc_irq seems to exit cleanly and
> of course my device doesn't hang.
>
> root:~# cat /proc/interrupts
>CPU0
>  27:  15122   GIC  27  gt
> 107:162   GIC 107  40034000.usb
>
> The above number of interrupts does not increase at some point, showing
> that irq's are not serviced any more.
>
> My main query is how can I go about and start debugging this issue? What
> process, tools or methods I can use to debug and solve this problem. I have
> done some debugging before in the kernel/u-boot, but, the problems have
> always been which lead to crashes. So, the origin of it was at least clear,
> if not the source/cause of it. In this scenario, I am at a loss in which
> direction to start digging.
>
> I enabled prints for the whole USB driver section, with dynamic debug,
> but, this doesn't help much or at least I am not able to make out much from
> it. Below is the relevant dmesg log.
>
> [1.175253] using random self ethernet address
> [1.182722] using random host ethernet address
> [1.205327] using random self ethernet address
> [1.212857] using random host ethernet address
> [1.220419] g_ether gadget: adding config #2 'RNDIS'/808055c8
> [1.220467] g_ether gadget: adding 'rndis'/8ea48300 to config
> 'RNDIS'/808055c8
> [1.220545] g_ether gadget: RNDIS: dual speed IN/ep1in OUT/ep1out
> NOTIFY/ep2in
> [1.220566] g_ether gadget: cfg 2/808055c8 speeds: high full
> [1.220583] g_ether gadget:   interface 0 = rndis/8ea48300
> [1.220599] g_ether gadget:   interface 1 = rndis/8ea48300
> [1.220617] g_ether gadget: adding config #1 'CDC Ethernet
> (ECM)'/8080551c
> [1.220646] g_ether gadget: adding 'cdc_ethernet'/8ea483c0 to config
> 'CDC Ethernet (ECM)'/8080551c
> [1.220701] g_ether gadget: CDC Ethernet: dual speed IN/ep1in
> OUT/ep1out NOTIFY/ep2in
> [1.220721] g_ether gadget: cfg 1/8080551c speeds: high full
> [1.220737] g_ether gadget:   interface 0 = cdc_ethernet/8ea483c0
> [1.220753] g_ether gadget:   interface 1 = cdc_ethernet/8ea483c0
> [1.220778] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
> [1.230557] g_ether gadget: g_ether ready
> [1.682860] g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
> [1.692933] g_ether gadget: init ecm
> [1.692957] g_ether gadget: notify connect false
> [1.702757] g_ether gadget: activate ecm
> [1.702798] g_ether gadget: ecm_close
> [1.710720] g_ether gadget: packet filter 0e
> [1.710734] g_ether gadget: ecm req21.43 v000e i l0
> [1.786925] g_ether gadget: packet filter 0e
> [1.786946] g_ether gadget: ecm req21.43 v000e i l0
> [1.789824] g_ether gadget: packet filter 0e
> [1.789843] g_ether gadget: ecm req21.43 v000e i l0
> [1.790733] g_ether gadget: setup complete --> -108, 0/0
> [1.790750] g_ether gadget: packet filter 0e
> [1.790768] g_ether gadget: ecm req21.43 v000e i l0
> [1.806118] g_ether gadget: notify connect false
> [1.838131] g_ether gadget: notify speed 425984000
> [6.277081] g_ether gadget: packet filter 0e
> [6.277103] g_ether gadget: ecm req21.43 v000e i l0
> [  294.926900] [472] usb_f_ecm:ecm_open:665: g_ether gadget: ecm_open
> [  294.926930] [472] usb_f_ecm:ecm_do_notify:405: g_ether gadget: notify
> connect true
> [  294.945515]  usb_f_ecm:ecm_do_notify:420: g_ether gadget: notify
> speed 425984000
> [  294.948877]  usb_f_ecm:e

Re: Your editor/IDE settings for autocompletion and other easiness

2014-11-29 Thread Vignesh Radhakrishnan
Hi,

I currently use VIM with tons of plugins. I think the plugin youcompleteme
handles auto-complete in vim to a certain extent and i find it useful. I
also use other plugins like Nerdtree for easier navigation, fugitive vim
for git integration . Of course, i also use CTAGS and CSCOPE .

Thanks and regards,
Vignesh Radhakrishnan

On Mon, Nov 24, 2014 at 9:30 PM, Austin S Hemmelgarn 
wrote:

> On 2014-11-21 22:58, Andrey Utkin wrote:
>
>> (I was asked to research this topic to help students. So please ignore
>> this topic if all you want to say is that it is OK to code in editor
>> without autocompletion and any other integration, and that there's LXR
>> website. We all know that.)
>>
>> Dear kernel developers,
>> if you have a minute, please share
>> - what's your configuration for editor integration with sources tree?
>> (the opposite is "just using any editor")
>> - which IDE/editor handiness options except autocompletion are
>> possible to obtain while developing kernel code, and which options do
>> you use?
>>
>> If you don't use any special configuration, feel free not to reply.
>>
>> Thanks!
>>
>>  Personally, I use vi/vim with ctags most of the time, and occasionally
> just use grep and find directly.  I generally don't use any auto-completion
> other than automatic indentation (I have a tendency to spend more time
> fighting with auto-completion than writing code when I actually try to use
> it).  In general, I would highly recommend not using an IDE for working on
> kernel code unless you can setup the auto-formatting to be compliant with
> the coding standards.
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
http://vigneshradhakrishnan.blogspot.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Not getting printk output

2014-11-29 Thread Vignesh Radhakrishnan
Use pr_info() or pr_err() for getting it printed definitely as suggested.
The caveat with pr_debug() is that, messages will only be printed in case
you have dynamic debug control for that file enabled.(same goes with
printk(KERN_DEBUG ).



On Sun, Nov 23, 2014 at 6:49 PM, karthik nayak 
wrote:

> Hello,
> Use the new macros such as pr_info(), pr_debug() and so on.
>
>
> On Sun Nov 23 2014 at 2:04:27 PM Philipp Muhoray <
> philipp.muho...@gmail.com> wrote:
>
>>
>> Am 2014-11-23 um 06:58 schrieb Mayank:
>> > Hi,
>> >   I am trying to print something to the kernel debug log level using
>> > printk, but while using dmesg i am not getting the output on the
>> > console. My /proc/sys/kernel/printk setting is 4 4 1 7.
>> > Please help
>> >
>> > Thanks,
>> > Mayank
>> >
>> >
>> > ___
>> > Kernelnewbies mailing list
>> > Kernelnewbies@kernelnewbies.org
>> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>> Hello,
>>
>> Does your string end with the newline character '\n'? Otherwise your
>> output will not be flushed immediately (it remains in the buffer). So try
>>
>>  printk(KERN_DEBUG "Hello World!\n");
>>
>> Maybe that helps.
>>
>> br,
>> phil
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
http://vigneshradhakrishnan.blogspot.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Sched_clock() usage

2014-11-06 Thread Vignesh Radhakrishnan
Hi,

Is there any place where sched_clock() usage might not be safe.
 Like lets say early in the boot during driver probe ?

Or any things that i need to ensure before calling sched_clokc() ?



Thanks and regards,
Vignesh Radhakrishnan

-- 
http://vigneshradhakrishnan.blogspot.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Diff between various CPU masks

2014-06-26 Thread Vignesh Radhakrishnan
Hi,

I was going through the boot up  code and came across the following masks .


   - CPU online mask : The number of CPU's available for getting scheduled
   on
   - CPU active mask : The number of CPU's on which some task can be
   migrated to (not very clear as to the difference between online and active)
   - CPU present mask : Total number of CPU's limited by max cpu's variable
   - CPU possible mask : Total number of possible CPU's in the system


But i am not sure if my understanding is correct and wanted to validate the
same .

Thanks,

--Vignesh

http://vigneshradhakrishnan.blogspot.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: git merge issues

2014-06-11 Thread Vignesh Radhakrishnan
Hi Raghavendra ,

AFAIK , you need to solve it manually and do git commit after this.
This happens when git tries to resolve it but does know how to solve
the same. Git will record the conflict resolution that you have done
and in case the same kind of conflict occurs, it will resolve the
conflict automatically based on your previous resolution.

Thanks,
--Vignesh

On Thu, Jun 12, 2014 at 10:46 AM, Raghavendra  wrote:
> Hello everyone,
>
> Assume that i have two branches in my repository: master and devel.
>
> -- I've updated the master branch from the remote repository (using git
> pull).
> Assume that the file name 'file.txt' has gone through an update.
>
> -- Now the same file has also gone through a modification in the devel
> branch (manual editing)
>
> -- Now when I do a 'git merge master' from my devel branch, I am facing
> a conflict issue something like this :
>
> Auto-merging file.txt
> CONFLICT (content): Merge conflict in file.txt
> Automatic merge failed; fix conflicts and then commit the result.
>
> Now my question is that do I need to solve the merging issue manually or
> is there any way to solve this using git?
>
> Thank you.
> Raghavendra
>
> ---
> [ C-DAC is on Social-Media too. Kindly follow us at:
> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>
> This e-mail is for the sole use of the intended recipient(s) and may
> contain confidential and privileged information. If you are not the
> intended recipient, please contact the sender by reply e-mail and destroy
> all copies and the original message. Any unauthorized review, use,
> disclosure, dissemination, forwarding, printing or copying of this email
> is strictly prohibited and appropriate legal action will be taken.
> ---
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
http://vigneshradhakrishnan.blogspot.com/

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Adding new board support

2014-06-08 Thread Vignesh Radhakrishnan
Adding to others

If you are working on latest kernel versions, make sure to add Device
tree file as well in arch/arm/boot/dts/



Thanks,
Vignesh Radhakrishnan

On Mon, Jun 9, 2014 at 11:16 AM, Sudip Mukherjee
 wrote:
> On Mon, Jun 9, 2014 at 10:35 AM, Varka Bhadram  wrote:
>>
>> Thank you for the guidence...
>>
>> Is there any tutorial to how to do the development for the board. ?
>
>
> Hi
> I work in Vector Institute and I have done a similar development for our own
> custom designed board based on iMX.
> I have not found any tutorial for creating the BSP , just look at the other
> board configurations and you will have an idea about how to start it.
> But let me assure you that it will be a very frustrating when u spend 2 - 3
> days to make a code and when you test it , you see that its not working and
> you need to start all over again .. but ultimately its fun , and when the
> board boots you will get a kind of satisfaction which can not be compared
> with any other thing ..
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
http://vigneshradhakrishnan.blogspot.com/

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: head.S

2014-06-02 Thread Vignesh Radhakrishnan
Hi Saurabh,

You can take a look at the DOC  mentioned here. Its kind of gives an
overview (not in depth) of every function in Booting process in ARM
linux :
http://www.linux-arm.org/pub/LinuxPlatform/RealViewLink/Booting_ARM_Linux_SMP_on_MPCore.doc

Its a good start to dive into the internals.

Thanks and regards,
Vignesh Radhakrishnan


On Mon, Jun 2, 2014 at 11:32 PM, Augusto Mecking Caringi
 wrote:
> On Mon, Jun 2, 2014 at 12:53 PM, Saurabh Jain 
> wrote:
>>
>> hello every one !
>>
>> I am trying to trace Linux kernel booting process for ARM architecture.
>> Right now i am doing it manually . I am getting problem in reading assembly
>> codes (like in head.s and other files) . Can any body tell me the correct
>> way of tracing the linux kernel booting process ? Is there any guide which
>> perfectly document Linux kernel files function by function ?
>
>
> Hi Saurabh,
>
> I don't know of any guide for Linux ARM boot code.
>
> But there are some guides for Linux x86 boot code for ancient Linux
> Kernels, like this:
>
> http://www.oldlinux.org/Linux.old/study/eclk-03-boot.pdf
>
> Best regards!
>
> --
> Augusto Mecking Caringi
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
http://vigneshradhakrishnan.blogspot.com/

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Reset due to emergency remount r/o

2014-03-03 Thread Vignesh Radhakrishnan
Probably , adb reboot bootlooader command from the host to which the device
is connected.

Thanks and regards,
Vignesh Radhakrishnan


On Sat, Mar 1, 2014 at 9:56 AM, Subramaniam Appadodharana <
c.a.subraman...@gmail.com> wrote:

> Seems like an android system and the reboot reason says boot loader. What
> command causes this to happen?
>  On Feb 26, 2014 10:44 PM,  wrote:
>
>> On Thu, 27 Feb 2014 09:43:35 +0530, Arun KS said:
>>
>> > > [ 425.832395,1] SysRq : Emergency Remount R/O
>> >
>> > This looks like be a sys request from user space.
>> > Application can write echo u > /proc/sysrq-trigger to trigger an
>> > emergency remount.
>> >
>> > You can hack "drivers/tty/sysrq.c" to print current task(to know who is
>> doing).
>>
>> Note that if it came in courtesy of alt-SYSRQ keyboard request, then
>> current-> won't point anywhere meaningful.
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
http://vigneshradhakrishnan.blogspot.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Questions on Call single data (CSD)

2014-01-27 Thread Vignesh Radhakrishnan
Hi,

I have couple of questions on Call single data (CSD) .

I am going through kernel/smp.c


   - From what i understand CSD struct is used to run a particular function
   on a another core (Not sure if i am right ) ? (csd -> func) ( in function
   smp_call_function_many)
   - What do these csd_lock_wait and csd_lock do. As per the code this its
   used to serialize access and it says there is a per CPU CSD resources. I am
   not getting what is meant here.If its per CPU , then why serialize access ?


   - The list inside csd . Is this by any chance circular ?


Thanks and regards,
Vignesh

-- 
http://vigneshradhakrishnan.blogspot.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


GPIO Muxing

2014-01-21 Thread Vignesh Radhakrishnan
Hi ,

I have one driver that calls gpio_request and holds on to it. When another
driver requests for the same gpio, it failes giving EBUSY. Anyway i can
force the gpio request in 2nd driver?

Thanks and regards,
Vignesh

-- 
http://vigneshradhakrishnan.blogspot.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Section Mismatch error

2013-07-30 Thread Vignesh Radhakrishnan
Hi,

I am facing the following error when i am building the kernel.


ERROR: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[3]: *** [__modpost] Error 1
make[2]: *** [modules] Error 2
make[1]: *** [sub-make] Error 2

After i did make the kernel using make CONFIG_DEBUG_SECTION_MISMATCH=y it
said *section mismatch .*

I am trying to write a platform driver (not sure if my code is right )

#include
#include/* Needed by all modules */
#include 
#include  /* Needed for KERN_INFO */
#include 
MODULE_LICENSE ("GPL");


static int __devinit my_module_probe(struct platform_device *pdev){


printk(KERN_INFO "Probe\n");

   return 0;

}
static int  __devexit my_module_remove (struct platform_device *pdev)
{

printk(KERN_INFO "Goodbye world 1.\n");
return 0;

}
static struct of_device_id spinlock_match[] = {
{.compatible = "spinlockcrash"},
{}
};


static struct platform_driver spinlock_platformdev = {
.probe  = my_module_probe,
.remove = __devexit_p(my_module_remove),
.driver = {
.name   = "spinlock_platformdev",
.owner  = THIS_MODULE,
.of_match_table = spinlock_match,
},
};



static int __init mymodule_init(void)
{
printk(KERN_INFO "INIT");

platform_driver_register(&spinlock_platformdev);
return 0;
}
static void __exit mymodule_exit(void)
{
printk(KERN_INFO "GOOD BYE");
platform_driver_unregister(&spinlock_platformdev);
}

module_init(mymodule_init);
module_exit(mymodule_exit);



Can anybody throw some light on what might be happening here ?


Thanks and regards,
Vignesh
-- 
http://vigneshradhakrishnan.blogspot.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies