Re: New to the Kernel Newbie

2018-05-21 Thread Ozgur Kara


21.05.2018, 16:34, "Daniel Baluta" :
> Hi,

Hello,

> You can have a look at our Linux kernel labs:
>
> https://linux-kernel-labs.github.io/master/
>
> For example, start with a short introduction to Linux kernel:
>
> https://linux-kernel-labs.github.io/master/labs/introduction.html
>
> then create a simple kernel module:
>
> https://linux-kernel-labs.github.io/master/labs/kernel_modules.html
>
> Hope this helps.

+1
Great. 

> thanks,
> Daniel.
>

Ozgur


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


Re: Fwd: New to the Kernel Newbie

2018-05-21 Thread valdis . kletnieks
On Mon, 21 May 2018 14:54:20 +0530, Janakiramireddy Tamma said:

> I am completely new to the kernel newbie, can some one help me where can I
> get started.

https://lists.kernelnewbies.org/pipermail/kernelnewbies/2017-April/017765.html

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


Re: Delivery Status Notification (Failure)

2018-05-21 Thread Pintu Kumar
Dear Lucas,

Can you give me some pointers on how to set affinity for entire GPIO Bank.
Currently I am exploring drivers/gpio/gpio-mxc.c to find out how the
GPIO banks are set up.

I also found that affinity can be set using: desc->irq_data.affinity,
may be by using cpumask_copy(...).
But still I am not familiar with this.

So, I need your help.


Thank You!

Regards,
Pintu



On Thu, May 17, 2018 at 6:58 PM, Pintu Kumar  wrote:
> On Mon, May 14, 2018 at 7:58 PM, Pintu Kumar  wrote:
>>
>> On Mon, May 14, 2018 at 6:41 PM, Lucas Stach  wrote:
>> > Am Montag, den 14.05.2018, 17:42 +0530 schrieb Pintu Kumar:
>> >> Hi,
>> >>
>> >> Is there any work around possible to set IRQ affinity for some GPIO
>> >> interrupt ?
>> >> How to avoid CPU0 to receive the current GPIO interrupt ?
>> >> How do we assign GPIO interrupts to any CPU other than CPU0 ?
>> >> Is it possible to isolate CPU0 for a sometime, from my GPIO driver so
>> >> that GPIO interrupt can be served by another CPU ?
>> >>
>> >> Need your inputs to decide whether it is still possible to set
>> >> affinity for GPIO interrupt, or its impossible ?
>> >
>> > This is not possible. The GPIO IRQs are aggregated into one GPC/GIC IRQ
>> > line per GPIO bank, so it is not possible to change affinity of a
>> > single GPIO interrupt to another CPU.
>>
>> OK. Thanks for your confirmation.
>>
>> > Best we could do is change the
>> > affinity of the whole bank,
>>
>
> Hi,
>
> I found that the driver is responsible for setting GPIO bank in i.MX7:
> https://elixir.bootlin.com/linux/v4.2/source/drivers/gpio/gpio-mxc.c
>
> However I still dont know how to set the cpumask for one of the GPIO Bank.
>
> From this link, it seems it is possible to set affinity for a GPIO IRQ.
> https://community.nxp.com/thread/303144
>
> But when I try it form my GPIO138 (GPIO5_IO10) it did not help.
>
> So, as you said, I wanted to change affinity for the whole GPIO bank and try 
> it.
> Please give me some pointers.
>
> Thanks
>
>
>> OK. How can we do this on the fly from my driver code.
>> If you have any reference please let me know.
>> This is required only for experimental purpose to prove the point to be mgmt.
>> My idea is, from the driver, change the affinity of the whole bank.
>> So, the GPIO interrupt can be delivered on to this specific CPU bank.
>> Once I am done, I will revert back to the old bank.
>> Please give me some hint on how to do this from my kernel module
>>
>>
>> > but given the limited usefulness of
>> > something like that, nobody bothered to implement such a thing.
>> >
>> > Regards,
>> > Lucas
>> >
>> >>
>> >>
>> >> On Fri, May 11, 2018 at 8:07 PM, Pintu Kumar 
>> >> wrote:
>> >> > On Fri, May 11, 2018 at 6:34 PM, Lucas Stach > >> > e> wrote:
>> >> > > Am Freitag, den 11.05.2018, 13:39 +0100 schrieb Russell King -
>> >> > > ARM Linux:
>> >> > > > On Fri, May 11, 2018 at 05:07:37PM +0530, Pintu Kumar wrote:
>> >> > > > > Hi,
>> >> > > > >
>> >> > > > > I need one help.
>> >> > > > > I am using i.MX7 Sabre board with kernel version 4.1.15
>> >> > > > >
>> >> > > > > Let's say I am interested in GPIO number: 21
>> >> > > > > I wanted to set CPU affinity for particular GPIO->IRQ number,
>> >> > > > > so I
>> >> > > > > tried the below steps:
>> >> > > > > root@10:~# echo 21 > /sys/class/gpio/export
>> >> > > > > root@10:~# echo "rising" > /sys/class/gpio/gpio21/edge
>> >> > > > > root@10:~# cat /proc/interrupts | grep 21
>> >> > > > >   47: 0 0 gpio-mxc 21 Edge gpiolib
>> >> > > > > root@10:~# cat /sys/class/gpio/gpio21/direction
>> >> > > > > in
>> >> > > > > root@10:~# cat /proc/irq/47/smp_affinity
>> >> > > > > 3
>> >> > > > > root@10:~# echo 2 > /proc/irq/47/smp_affinity
>> >> > > > > -bash: echo: write error: Input/output error
>> >> > > > >
>> >> > > > > But I get input/output error.
>> >> > > > > When I debug further, found that irq_can_set_affinity is
>> >> > > > > returning 0:
>> >> > > > > [0.00] genirq: irq_can_set_affinity (0): balance: 1,
>> >> > > > > irq_data.chip: a81b7e48, irq_set_affinity:   (null)
>> >> > > > > [0.00] write_irq_affinity: FAIL
>> >> > > > >
>> >> > > > > I also tried first setting /proc/irq/default_smp_affinity to
>> >> > > > > 2 (from 3).
>> >> > > > > This change is working, but the smp_affinity setting for the
>> >> > > > > new IRQ
>> >> > > > > is not working.
>> >> > > > >
>> >> > > > > When I try to set smp_affinity for mmc0, then it works.
>> >> > > > > # cat /proc/interrupts | grep mmc
>> >> > > > > 295: 55  0 GPCV2  22 Edge  mmc0
>> >> > > > > 296:  0  0 GPCV2  23 Edge  mmc1
>> >> > > > > 297: 52  0 GPCV2  24 Edge  mmc2
>> >> > > > >
>> >> > > > > root@10:~# echo 2 > /proc/irq/295/smp_affinity
>> >> > > > > root@10:~#
>> >> > > > >
>> >> > > > >
>> >> > > > > So, I wanted to know what are the conditions for which
>> >> > > 

Re: New to the Kernel Newbie

2018-05-21 Thread inventsekar
Hi janaki,
Please provide us more info... What you know and what you don't.
why you want to learn, etc.. as much info as possible.
That will help you get better answers to your query.

Best regards
Sekar

On Mon 21 May, 2018, 2:54 PM Janakiramireddy Tamma, 
wrote:

> Hello,
>
> I am completely new to the kernel newbie, can some one help me where can I
> get started.
>
> Thanks
> Janaki Rami Reddy
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: New to the Kernel Newbie

2018-05-21 Thread Daniel Baluta
Hi,

You can have a look at our Linux kernel labs:

https://linux-kernel-labs.github.io/master/

For example, start with a short introduction to Linux kernel:

https://linux-kernel-labs.github.io/master/labs/introduction.html

then create a simple kernel module:

https://linux-kernel-labs.github.io/master/labs/kernel_modules.html

Hope this helps.

thanks,
Daniel.


On Mon, May 21, 2018 at 12:24 PM, Janakiramireddy Tamma
 wrote:
> Hello,
>
> I am completely new to the kernel newbie, can some one help me where can I
> get started.
>
> Thanks
> Janaki Rami Reddy
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

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


Fwd: New to the Kernel Newbie

2018-05-21 Thread Janakiramireddy Tamma
Hello,

I am completely new to the kernel newbie, can some one help me where can I
get started.

Thanks
Janaki Rami Reddy
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies