dummy interrupt handler using timer

2018-06-18 Thread Pintu Kumar
Hi,

I wanted to develop a dummy interrupt handler for an ARM board which
is connected to a remote location. This is required for some debugging
purpose during the interrupt context.
It does not have a keyboard or any GPIO pins.

So, I wonder how to develop a custom interrupt handler, may be using
timer invocation.

If anybody can give some pointers or reference, it will be of great help.

Thanks,
Pintu

___
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 <pintu.p...@gmail.com> wrote:
> On Mon, May 14, 2018 at 7:58 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
>>
>> On Mon, May 14, 2018 at 6:41 PM, Lucas Stach <l.st...@pengutronix.de> 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 <pintu.p...@gmail.com>
>> >> wrote:
>> >> > On Fri, May 11, 2018 at 6:34 PM, Lucas Stach <l.stach@pengutronix.d
>> >> > 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 g

Re: Delivery Status Notification (Failure)

2018-05-17 Thread Pintu Kumar
On Mon, May 14, 2018 at 7:58 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
>
> On Mon, May 14, 2018 at 6:41 PM, Lucas Stach <l.st...@pengutronix.de> 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 <pintu.p...@gmail.com>
> >> wrote:
> >> > On Fri, May 11, 2018 at 6:34 PM, Lucas Stach <l.stach@pengutronix.d
> >> > 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.
> >> > > > >
> >> > > &

Re: Delivery Status Notification (Failure)

2018-05-14 Thread Pintu Kumar
On Mon, May 14, 2018 at 6:41 PM, Lucas Stach <l.st...@pengutronix.de> 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,

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 <pintu.p...@gmail.com>
>> wrote:
>> > On Fri, May 11, 2018 at 6:34 PM, Lucas Stach <l.stach@pengutronix.d
>> > 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
>> > > > > setting
>> > > > > smp_affinity for an IRQ will work ?
>> > > > >
>> > > > > Is there any way by which I can set CPU affinity to a GPIO ->
>> > > > > IRQ ?
>> > > > > Whether, irq_set_affinity_hint() will work in this

Re: Delivery Status Notification (Failure)

2018-05-14 Thread 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 ?


Thanks,
Pintu



On Fri, May 11, 2018 at 8:07 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
> On Fri, May 11, 2018 at 6:34 PM, Lucas Stach <l.st...@pengutronix.de> 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 setting
>>> > smp_affinity for an IRQ will work ?
>>> >
>>> > Is there any way by which I can set CPU affinity to a GPIO -> IRQ ?
>>> > Whether, irq_set_affinity_hint() will work in this case ?
>>>
>>> IRQ affinity is only supported where interrupts are _directly_ wired to
>>> the GIC.  It's the GIC which does the interrupt steering to the CPU
>>> cores.
>>>
>>> Interrupts on downstream interrupt controllers (such as GPCV2) have no
>>> ability to be directed independently to other CPUs - the only possible
>>> way to change the mapping is to move _all_ interrupts on that controller,
>>> and any downstream chained interrupts at GIC level.
>>>
>>> Hence why Interrupt 295 has no irq_set_affinity function: there is no way
>>> for the interrupt controller itself to change the affinity of the input
>>> interrupt.
>>
>> The GPCv2 though is a secondary IRQ controller which has a 1:1 mapping
>> of its input IRQs to the upstream GIC IRQ lines. Affinity can thus be
>> handled by forwarding the request to the GIC by
>> irq_chip_set_affinity_parent().
>>
>> As this is handled correctly in the upstream kernel since the first
>> commit introducing support for the GPCv2, it seems the issue is only
>> present in some downstream kernel.
>>
>
> OK. Thanks so much for your reply.
>
> I saw some of the drivers using irq_set_affinity_hint() to force the
> IRQ affinity to a particular CPU.
> This is the sample:
> {
> cpumask_clear(mask);
> cpumask_set_cpu(cpu, mask);
> irq_set_affinity_hint(irq, mask);
> }
>
> Whether this logic will work for a particular GPIO pin ?
>
>
>> Regards,
>> Lucas

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


Re: Delivery Status Notification (Failure)

2018-05-11 Thread Pintu Kumar
On Fri, May 11, 2018 at 6:34 PM, Lucas Stach <l.st...@pengutronix.de> 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 setting
>> > smp_affinity for an IRQ will work ?
>> >
>> > Is there any way by which I can set CPU affinity to a GPIO -> IRQ ?
>> > Whether, irq_set_affinity_hint() will work in this case ?
>>
>> IRQ affinity is only supported where interrupts are _directly_ wired to
>> the GIC.  It's the GIC which does the interrupt steering to the CPU
>> cores.
>>
>> Interrupts on downstream interrupt controllers (such as GPCV2) have no
>> ability to be directed independently to other CPUs - the only possible
>> way to change the mapping is to move _all_ interrupts on that controller,
>> and any downstream chained interrupts at GIC level.
>>
>> Hence why Interrupt 295 has no irq_set_affinity function: there is no way
>> for the interrupt controller itself to change the affinity of the input
>> interrupt.
>
> The GPCv2 though is a secondary IRQ controller which has a 1:1 mapping
> of its input IRQs to the upstream GIC IRQ lines. Affinity can thus be
> handled by forwarding the request to the GIC by
> irq_chip_set_affinity_parent().
>
> As this is handled correctly in the upstream kernel since the first
> commit introducing support for the GPCv2, it seems the issue is only
> present in some downstream kernel.
>

OK. Thanks so much for your reply.

I saw some of the drivers using irq_set_affinity_hint() to force the
IRQ affinity to a particular CPU.
This is the sample:
{
cpumask_clear(mask);
cpumask_set_cpu(cpu, mask);
irq_set_affinity_hint(irq, mask);
}

Whether this logic will work for a particular GPIO pin ?


> Regards,
> Lucas

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


Re: Delivery Status Notification (Failure)

2018-05-11 Thread Pintu Kumar
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 setting
smp_affinity for an IRQ will work ?

Is there any way by which I can set CPU affinity to a GPIO -> IRQ ?
Whether, irq_set_affinity_hint() will work in this case ?


Thanks,
Pintu

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


Not able to set smp_affinity for an IRQ on i.MX7

2018-05-11 Thread Pintu Kumar
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 setting smp_affinity
for an IRQ will work ?

Is there any way by which I can set CPU affinity to a GPIO -> IRQ ?
Whether, irq_set_affinity_hint() will work in this case ?


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


QEMU environment setup for Linux Kernel

2018-03-07 Thread Pintu Kumar
Hi,

I need some help on QEMU environment setup for ARM so that I am very
my custom Linux Kernel changes for arm.
I know there are lots of references available on internet. Earlier I
spend lots of time and finally I could able to setup basic qemu
working but still I was not completely satisfied. No network access,
could not copy files, no graphics, multiple shells etc.

So, I wanted to hear from other developer how they setup and use qemu
environment.
I want someone to list step by step guide here. I think it is going to
be useful for others as well.

Basically, I am looking for the following:
1) Which kernel to choose for arm: versatile, or vexpress ?
2) Where to get the full pre-built rootfs image to use with about kernel ?
3) How to get even the Graphical interface with Qemu ?
4) How to setup networking with Qemu, so that I can transfer/scp file
from my host Ubuntu PC ?
5) How to launch multiple terminal with the same Qemu setup ?


If anybody have done this before please compile the steps here for
easy reference.


Thank You!

Regards,
Pintu

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


Re: Query on mechanisms to communicate between kernel modules in Linux

2018-02-10 Thread Pintu Kumar
On Fri, Feb 9, 2018 at 12:52 AM, Neil Thomas  wrote:
> Thanks, I will check it out.
>
> On 09-Feb-2018 12:50 AM,  wrote:
>>
>> On Thu, 08 Feb 2018 23:38:01 +0530, Neil Thomas said:
>>
>> > I am just a beginner. I have tried procfs, Netlink socket to communicate
>> > between user space and kernel space and it works fine.
>> >
>> > I am developing a monitoring utility to trace the VFS operation and find
>> > the frequency of VFS function calls. This monitoring utility runs in
>> > kernel
>> > space. We have to record the occurrence of each  VFS function calls
>> > (like
>> > vfs_open(), vfs_read()).  I don't know  which is best mechanism to
>> > report
>> > this VFS event to the monitoring utility.
>> >
>> > Could anyone please suggest the best mechanism to transfer data
>> > frequently
>> > between kernel modules.

You can also use ION (CONFIG_ION) or DMABUF (DMA_SHARED_BUFFER) buffer
sharing mechanism to share data between 2 drivers.
Check this:
https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/staging/android/ion?h=v4.15

>>
>> There's a perfectly good perf-based function trace facility that will
>> provide
>> this info to userspace.
>>
>> http://www.brendangregg.com/perf.html#StaticKernelTracing
>>
>
> ___
> 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: [perf] perf test BPF fails on 4.9.20

2018-02-05 Thread Pintu Kumar
On Mon, Feb 5, 2018 at 7:24 PM, Masami Hiramatsu <mhira...@kernel.org> wrote:
> On Mon, 5 Feb 2018 15:17:41 +0530
> Pintu Kumar <pintu.p...@gmail.com> wrote:
>
>> On Sat, Feb 3, 2018 at 6:49 PM, Masami Hiramatsu <mhira...@kernel.org> wrote:
>> > Hi Pintu,
>> >
>> > On Fri, 2 Feb 2018 19:03:30 +0530
>> > Pintu Kumar <pintu.p...@gmail.com> wrote:
>> >
>> >> Hi All,
>> >>
>> >> I have fixed both the issue with perf test.
>> >>
>> >> 1) 16: Try 'import perf' in python, checking link problems  : FAILED!
>> >> To fix this issue, I have to install:
>> >> pip install --upgrade pip
>> >> pip2.7 install perf
>> >>
>> >> 2) 37.2: Test BPF prologue generation   : FAILED!
>> >> To fix this issue I had to enable full version of CONFIG_DEBUG_INFO in 
>> >> kernel.
>> >>
>> >> Now, my question is:
>> >> Is it possible to pass BPF test without enabling CONFIG_DEBUG_INFO in 
>> >> kernel ?
>> >
>> > It depends on what BPF test does, but it seems to access local vars. This 
>> > means
>> > you need to enable CONFIG_DEBUG_INFO. With debuginfo we can find the 
>> > assignment
>> > of register/stack for each local variable.
>> >
>>
>> OK. Thank you so much for your reply.
>> I think we don't need BPF test at this time.
>> Is it possible to disable/skip it ?
>
> It depends on what you want to do with perf. If you don't use BPF, yes, you 
> can
> skip it :)
>

Yes I want to skip the BPF.
What is the best way to skip it.

I found out that by commenting 'bpf' under :
tools/build/Makefile.feature -> FEATURE_TESTS_BASIC,
I can turn BPF feature OFF during compilation.
However, I still need to execute BPF test and check, if it skips.

Is this good enough ?




> Thank you,
>
> --
> Masami Hiramatsu <mhira...@kernel.org>

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


Re: [perf] perf test BPF fails on 4.9.20

2018-02-05 Thread Pintu Kumar
On Sat, Feb 3, 2018 at 6:49 PM, Masami Hiramatsu <mhira...@kernel.org> wrote:
> Hi Pintu,
>
> On Fri, 2 Feb 2018 19:03:30 +0530
> Pintu Kumar <pintu.p...@gmail.com> wrote:
>
>> Hi All,
>>
>> I have fixed both the issue with perf test.
>>
>> 1) 16: Try 'import perf' in python, checking link problems  : FAILED!
>> To fix this issue, I have to install:
>> pip install --upgrade pip
>> pip2.7 install perf
>>
>> 2) 37.2: Test BPF prologue generation   : FAILED!
>> To fix this issue I had to enable full version of CONFIG_DEBUG_INFO in 
>> kernel.
>>
>> Now, my question is:
>> Is it possible to pass BPF test without enabling CONFIG_DEBUG_INFO in kernel 
>> ?
>
> It depends on what BPF test does, but it seems to access local vars. This 
> means
> you need to enable CONFIG_DEBUG_INFO. With debuginfo we can find the 
> assignment
> of register/stack for each local variable.
>

OK. Thank you so much for your reply.
I think we don't need BPF test at this time.
Is it possible to disable/skip it ?


> Thank you,
>>
>>
>> Thanks,
>> Pintu
>>
>>
>> On Fri, Feb 2, 2018 at 1:25 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
>> > Hi,
>> >
>> > perf test bpf prologue generation is failing.
>> > 37.2: Test BPF prologue generation   : FAILED!
>> >
>> > Try to find probe point from debuginfo.
>> > Matched function: null_lseek [105be32]
>> > Probe point found: null_lseek+0
>> > Searching 'file' variable in context.
>> > Converting variable file into trace event.
>> > converting f_mode in file
>> > file(type:file) has no member f_mode.
>> > An error occurred in debuginfo analysis (-22).
>> > bpf_probe: failed to convert perf probe eventsFailed to add events
>> > selected by BPF
>> > test child finished with -1
>> >  end 
>> > Test BPF filter subtest 1: FAILED!
>> >
>> >
>> > Is there any fix available for this issue?
>> > I searched 4.15, but could not relate any of the patches to this.
>> >
>> >
>> > Thanks,
>> > Pintu
>> >
>> >
>> >
>> > On Thu, Feb 1, 2018 at 7:34 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
>> >> Hi,
>> >>
>> >> After enabling DEBUG_INFO in kernel I still get this error for BPF test.
>> >> Please help.
>> >>
>> >> # perf test BPF -v
>> >> .
>> >> Looking at the vmlinux_path (8 entries long)
>> >> Using 
>> >> /usr/lib/debug/boot/vmlinux-4.9.00--amd-x86-64-00071-gd94c220-dirty
>> >> for symbols
>> >> Open Debuginfo file:
>> >> /usr/lib/debug/boot/vmlinux-4.9.00--amd-x86-64-00071-gd94c220-dirty
>> >> Try to find probe point from debuginfo.
>> >> Matched function: null_lseek [105be32]
>> >> Probe point found: null_lseek+0
>> >> Searching 'file' variable in context.
>> >> Converting variable file into trace event.
>> >> converting f_mode in file
>> >> file(type:file) has no member f_mode.
>> >> An error occurred in debuginfo analysis (-22).
>> >> bpf_probe: failed to convert perf probe eventsFailed to add events
>> >> selected by BPF
>> >> test child finished with -1
>> >>  end 
>> >> Test BPF filter subtest 1: FAILED!
>> >>
>> >>
>> >>
>> >> On Thu, Feb 1, 2018 at 10:50 AM, Pintu Kumar <pintu.p...@gmail.com> wrote:
>> >>> Dear Masami,
>> >>>
>> >>> Now I am stuck again with 'perf test' failure on 4.9
>> >>>
>> >>> # perf --version
>> >>> perf version 4.9.20-
>> >>>
>> >>> # perf test
>> >>> 16: Try 'import perf' in python, checking link problems  : FAILED!
>> >>> 37.2: Test BPF prologue generation   : FAILED!
>> >>>
>> >>> If you have any clue about these failure please hep me.
>> >>>
>> >>> Here are the verbose output:
>> >>> -
>> >>> 1) # perf test python -v
>> >>> 16: Try 'import perf' in python, checking link problems  :
>> >>> --- start ---
>> >>> test child forked, pid 24562
>> >>> Traceback (most rece

Re: [perf] perf test BPF fails on 4.9.20

2018-02-02 Thread Pintu Kumar
Hi All,

I have fixed both the issue with perf test.

1) 16: Try 'import perf' in python, checking link problems  : FAILED!
To fix this issue, I have to install:
pip install --upgrade pip
pip2.7 install perf

2) 37.2: Test BPF prologue generation   : FAILED!
To fix this issue I had to enable full version of CONFIG_DEBUG_INFO in kernel.

Now, my question is:
Is it possible to pass BPF test without enabling CONFIG_DEBUG_INFO in kernel ?


Thanks,
Pintu


On Fri, Feb 2, 2018 at 1:25 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
> Hi,
>
> perf test bpf prologue generation is failing.
> 37.2: Test BPF prologue generation   : FAILED!
>
> Try to find probe point from debuginfo.
> Matched function: null_lseek [105be32]
> Probe point found: null_lseek+0
> Searching 'file' variable in context.
> Converting variable file into trace event.
> converting f_mode in file
> file(type:file) has no member f_mode.
> An error occurred in debuginfo analysis (-22).
> bpf_probe: failed to convert perf probe eventsFailed to add events
> selected by BPF
> test child finished with -1
>  end 
> Test BPF filter subtest 1: FAILED!
>
>
> Is there any fix available for this issue?
> I searched 4.15, but could not relate any of the patches to this.
>
>
> Thanks,
> Pintu
>
>
>
> On Thu, Feb 1, 2018 at 7:34 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
>> Hi,
>>
>> After enabling DEBUG_INFO in kernel I still get this error for BPF test.
>> Please help.
>>
>> # perf test BPF -v
>> .
>> Looking at the vmlinux_path (8 entries long)
>> Using /usr/lib/debug/boot/vmlinux-4.9.00--amd-x86-64-00071-gd94c220-dirty
>> for symbols
>> Open Debuginfo file:
>> /usr/lib/debug/boot/vmlinux-4.9.00--amd-x86-64-00071-gd94c220-dirty
>> Try to find probe point from debuginfo.
>> Matched function: null_lseek [105be32]
>> Probe point found: null_lseek+0
>> Searching 'file' variable in context.
>> Converting variable file into trace event.
>> converting f_mode in file
>> file(type:file) has no member f_mode.
>> An error occurred in debuginfo analysis (-22).
>> bpf_probe: failed to convert perf probe eventsFailed to add events
>> selected by BPF
>> test child finished with -1
>>  end 
>> Test BPF filter subtest 1: FAILED!
>>
>>
>>
>> On Thu, Feb 1, 2018 at 10:50 AM, Pintu Kumar <pintu.p...@gmail.com> wrote:
>>> Dear Masami,
>>>
>>> Now I am stuck again with 'perf test' failure on 4.9
>>>
>>> # perf --version
>>> perf version 4.9.20-
>>>
>>> # perf test
>>> 16: Try 'import perf' in python, checking link problems  : FAILED!
>>> 37.2: Test BPF prologue generation   : FAILED!
>>>
>>> If you have any clue about these failure please hep me.
>>>
>>> Here are the verbose output:
>>> -
>>> 1) # perf test python -v
>>> 16: Try 'import perf' in python, checking link problems  :
>>> --- start ---
>>> test child forked, pid 24562
>>> Traceback (most recent call last):
>>>   File "", line 1, in 
>>> ImportError: No module named perf
>>> test child finished with -1
>>>  end 
>>> Try 'import perf' in python, checking link problems: FAILED!
>>> --
>>>
>>> 2) # perf test BPF -v
>>> ---
>>> .
>>> bpf: config 'func=null_lseek file->f_mode offset orig' is ok
>>> Looking at the vmlinux_path (8 entries long)
>>> symsrc__init: cannot get elf header.
>>> Failed to find the path for kernel: Invalid ELF file
>>> bpf_probe: failed to convert perf probe eventsFailed to add events
>>> selected by BPF
>>> test child finished with -1
>>>  end 
>>> Test BPF filter subtest 1: FAILED!
>>>
>>> ---
>>>
>>>
>>> Thanks,
>>> Pintu
>>>
>>>
>>> On Wed, Jan 31, 2018 at 9:01 AM, Masami Hiramatsu <mhira...@kernel.org> 
>>> wrote:
>>>> On Tue, 30 Jan 2018 19:20:36 +0530
>>>> Pintu Kumar <pintu.p...@gmail.com> wrote:
>>>>
>>>>> On Tue, Jan 30, 2018 at 11:13 AM, Masami Hiramatsu <mhira...@kernel.or

Re: [perf] perf test BPF fails on 4.9.20

2018-02-01 Thread Pintu Kumar
Hi,

perf test bpf prologue generation is failing.
37.2: Test BPF prologue generation   : FAILED!

Try to find probe point from debuginfo.
Matched function: null_lseek [105be32]
Probe point found: null_lseek+0
Searching 'file' variable in context.
Converting variable file into trace event.
converting f_mode in file
file(type:file) has no member f_mode.
An error occurred in debuginfo analysis (-22).
bpf_probe: failed to convert perf probe eventsFailed to add events
selected by BPF
test child finished with -1
 end 
Test BPF filter subtest 1: FAILED!


Is there any fix available for this issue?
I searched 4.15, but could not relate any of the patches to this.


Thanks,
Pintu



On Thu, Feb 1, 2018 at 7:34 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
> Hi,
>
> After enabling DEBUG_INFO in kernel I still get this error for BPF test.
> Please help.
>
> # perf test BPF -v
> .
> Looking at the vmlinux_path (8 entries long)
> Using /usr/lib/debug/boot/vmlinux-4.9.00--amd-x86-64-00071-gd94c220-dirty
> for symbols
> Open Debuginfo file:
> /usr/lib/debug/boot/vmlinux-4.9.00--amd-x86-64-00071-gd94c220-dirty
> Try to find probe point from debuginfo.
> Matched function: null_lseek [105be32]
> Probe point found: null_lseek+0
> Searching 'file' variable in context.
> Converting variable file into trace event.
> converting f_mode in file
> file(type:file) has no member f_mode.
> An error occurred in debuginfo analysis (-22).
> bpf_probe: failed to convert perf probe eventsFailed to add events
> selected by BPF
> test child finished with -1
>  end 
> Test BPF filter subtest 1: FAILED!
>
>
>
> On Thu, Feb 1, 2018 at 10:50 AM, Pintu Kumar <pintu.p...@gmail.com> wrote:
>> Dear Masami,
>>
>> Now I am stuck again with 'perf test' failure on 4.9
>>
>> # perf --version
>> perf version 4.9.20-
>>
>> # perf test
>> 16: Try 'import perf' in python, checking link problems  : FAILED!
>> 37.2: Test BPF prologue generation   : FAILED!
>>
>> If you have any clue about these failure please hep me.
>>
>> Here are the verbose output:
>> -
>> 1) # perf test python -v
>> 16: Try 'import perf' in python, checking link problems  :
>> --- start ---
>> test child forked, pid 24562
>> Traceback (most recent call last):
>>   File "", line 1, in 
>> ImportError: No module named perf
>> test child finished with -1
>>  end 
>> Try 'import perf' in python, checking link problems: FAILED!
>> --
>>
>> 2) # perf test BPF -v
>> ---
>> .
>> bpf: config 'func=null_lseek file->f_mode offset orig' is ok
>> Looking at the vmlinux_path (8 entries long)
>> symsrc__init: cannot get elf header.
>> Failed to find the path for kernel: Invalid ELF file
>> bpf_probe: failed to convert perf probe eventsFailed to add events
>> selected by BPF
>> test child finished with -1
>>  end 
>> Test BPF filter subtest 1: FAILED!
>>
>> ---
>>
>>
>> Thanks,
>> Pintu
>>
>>
>> On Wed, Jan 31, 2018 at 9:01 AM, Masami Hiramatsu <mhira...@kernel.org> 
>> wrote:
>>> On Tue, 30 Jan 2018 19:20:36 +0530
>>> Pintu Kumar <pintu.p...@gmail.com> wrote:
>>>
>>>> On Tue, Jan 30, 2018 at 11:13 AM, Masami Hiramatsu <mhira...@kernel.org> 
>>>> wrote:
>>>> >
>>>> > On Mon, 29 Jan 2018 22:00:52 +0530
>>>> > Pintu Kumar <pintu.p...@gmail.com> wrote:
>>>> >
>>>> > > Dear Masami,
>>>> > >
>>>> > > Thank you so much for your reply.
>>>> > > Please find some of my answers inline.
>>>> > >
>>>> > >
>>>> > > On Mon, Jan 29, 2018 at 7:47 PM, Masami Hiramatsu 
>>>> > > <mhira...@kernel.org> wrote:
>>>> > > > On Mon, 29 Jan 2018 13:40:34 +0530
>>>> > > > Pintu Kumar <pintu.p...@gmail.com> wrote:
>>>> > > >
>>>> > > >> Hi All,
>>>> > > >>
>>>> > > >> 'perf probe' is failing sometimes on 4.9.20 with AMD-64.
>>>> > > >> # perf probe --add schedule
>>>> >

Re: [perf] perf probe fails sometimes on 4.9

2018-02-01 Thread Pintu Kumar
Hi,

After enabling DEBUG_INFO in kernel I still get this error for BPF test.
Please help.

# perf test BPF -v
.
Looking at the vmlinux_path (8 entries long)
Using /usr/lib/debug/boot/vmlinux-4.9.00--amd-x86-64-00071-gd94c220-dirty
for symbols
Open Debuginfo file:
/usr/lib/debug/boot/vmlinux-4.9.00--amd-x86-64-00071-gd94c220-dirty
Try to find probe point from debuginfo.
Matched function: null_lseek [105be32]
Probe point found: null_lseek+0
Searching 'file' variable in context.
Converting variable file into trace event.
converting f_mode in file
file(type:file) has no member f_mode.
An error occurred in debuginfo analysis (-22).
bpf_probe: failed to convert perf probe eventsFailed to add events
selected by BPF
test child finished with -1
 end 
Test BPF filter subtest 1: FAILED!



On Thu, Feb 1, 2018 at 10:50 AM, Pintu Kumar <pintu.p...@gmail.com> wrote:
> Dear Masami,
>
> Now I am stuck again with 'perf test' failure on 4.9
>
> # perf --version
> perf version 4.9.20-
>
> # perf test
> 16: Try 'import perf' in python, checking link problems  : FAILED!
> 37.2: Test BPF prologue generation   : FAILED!
>
> If you have any clue about these failure please hep me.
>
> Here are the verbose output:
> -
> 1) # perf test python -v
> 16: Try 'import perf' in python, checking link problems  :
> --- start ---
> test child forked, pid 24562
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: No module named perf
> test child finished with -1
>  end 
> Try 'import perf' in python, checking link problems: FAILED!
> --
>
> 2) # perf test BPF -v
> ---
> .
> bpf: config 'func=null_lseek file->f_mode offset orig' is ok
> Looking at the vmlinux_path (8 entries long)
> symsrc__init: cannot get elf header.
> Failed to find the path for kernel: Invalid ELF file
> bpf_probe: failed to convert perf probe eventsFailed to add events
> selected by BPF
> test child finished with -1
>  end 
> Test BPF filter subtest 1: FAILED!
>
> ---
>
>
> Thanks,
> Pintu
>
>
> On Wed, Jan 31, 2018 at 9:01 AM, Masami Hiramatsu <mhira...@kernel.org> wrote:
>> On Tue, 30 Jan 2018 19:20:36 +0530
>> Pintu Kumar <pintu.p...@gmail.com> wrote:
>>
>>> On Tue, Jan 30, 2018 at 11:13 AM, Masami Hiramatsu <mhira...@kernel.org> 
>>> wrote:
>>> >
>>> > On Mon, 29 Jan 2018 22:00:52 +0530
>>> > Pintu Kumar <pintu.p...@gmail.com> wrote:
>>> >
>>> > > Dear Masami,
>>> > >
>>> > > Thank you so much for your reply.
>>> > > Please find some of my answers inline.
>>> > >
>>> > >
>>> > > On Mon, Jan 29, 2018 at 7:47 PM, Masami Hiramatsu <mhira...@kernel.org> 
>>> > > wrote:
>>> > > > On Mon, 29 Jan 2018 13:40:34 +0530
>>> > > > Pintu Kumar <pintu.p...@gmail.com> wrote:
>>> > > >
>>> > > >> Hi All,
>>> > > >>
>>> > > >> 'perf probe' is failing sometimes on 4.9.20 with AMD-64.
>>> > > >> # perf probe --add schedule
>>> > > >> schedule is out of .text, skip it.
>>> > > >>   Error: Failed to add events.
>>> > > >>
>>> > > >> If any one have come across this problem please let me know the 
>>> > > >> cause.
>>> > > >
>>> > > > Hi Pintu,
>>> > > >
>>> > > > Could you run it with --vv?
>>> > > >
>>> > > Ok, I will send verbose output by tomorrow.
>>> > >
>>> > > >>
>>> > > >> Note: I don't have CONFIG_DEBUG_INFO enabled in kernel. Is this the 
>>> > > >> problem?
>>> > > >
>>> > > > Without it, you can not probe source-level probe nor trace local 
>>> > > > variable.
>>> > > >
>>> > >
>>> > > Currently I am facing problem in enabling DEBUG_INFO in our kernel 
>>> > > 4.9.20
>>> > > However, I will try to manually include "-g" option during compilation.
>>> > >
>>> > > >> However, I manually copied th

Re: [perf] perf probe fails sometimes on 4.9

2018-01-31 Thread Pintu Kumar
Dear Masami,

Now I am stuck again with 'perf test' failure on 4.9

# perf --version
perf version 4.9.20-

# perf test
16: Try 'import perf' in python, checking link problems  : FAILED!
37.2: Test BPF prologue generation   : FAILED!

If you have any clue about these failure please hep me.

Here are the verbose output:
-
1) # perf test python -v
16: Try 'import perf' in python, checking link problems  :
--- start ---
test child forked, pid 24562
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named perf
test child finished with -1
 end 
Try 'import perf' in python, checking link problems: FAILED!
--

2) # perf test BPF -v
---
.
bpf: config 'func=null_lseek file->f_mode offset orig' is ok
Looking at the vmlinux_path (8 entries long)
symsrc__init: cannot get elf header.
Failed to find the path for kernel: Invalid ELF file
bpf_probe: failed to convert perf probe eventsFailed to add events
selected by BPF
test child finished with -1
 end 
Test BPF filter subtest 1: FAILED!

---


Thanks,
Pintu


On Wed, Jan 31, 2018 at 9:01 AM, Masami Hiramatsu <mhira...@kernel.org> wrote:
> On Tue, 30 Jan 2018 19:20:36 +0530
> Pintu Kumar <pintu.p...@gmail.com> wrote:
>
>> On Tue, Jan 30, 2018 at 11:13 AM, Masami Hiramatsu <mhira...@kernel.org> 
>> wrote:
>> >
>> > On Mon, 29 Jan 2018 22:00:52 +0530
>> > Pintu Kumar <pintu.p...@gmail.com> wrote:
>> >
>> > > Dear Masami,
>> > >
>> > > Thank you so much for your reply.
>> > > Please find some of my answers inline.
>> > >
>> > >
>> > > On Mon, Jan 29, 2018 at 7:47 PM, Masami Hiramatsu <mhira...@kernel.org> 
>> > > wrote:
>> > > > On Mon, 29 Jan 2018 13:40:34 +0530
>> > > > Pintu Kumar <pintu.p...@gmail.com> wrote:
>> > > >
>> > > >> Hi All,
>> > > >>
>> > > >> 'perf probe' is failing sometimes on 4.9.20 with AMD-64.
>> > > >> # perf probe --add schedule
>> > > >> schedule is out of .text, skip it.
>> > > >>   Error: Failed to add events.
>> > > >>
>> > > >> If any one have come across this problem please let me know the cause.
>> > > >
>> > > > Hi Pintu,
>> > > >
>> > > > Could you run it with --vv?
>> > > >
>> > > Ok, I will send verbose output by tomorrow.
>> > >
>> > > >>
>> > > >> Note: I don't have CONFIG_DEBUG_INFO enabled in kernel. Is this the 
>> > > >> problem?
>> > > >
>> > > > Without it, you can not probe source-level probe nor trace local 
>> > > > variable.
>> > > >
>> > >
>> > > Currently I am facing problem in enabling DEBUG_INFO in our kernel 4.9.20
>> > > However, I will try to manually include "-g" option during compilation.
>> > >
>> > > >> However, I manually copied the vmlinux file to /boot/ directory, but
>> > > >> still it does not work.
>> > > >
>> > > > That doesn't work.
>> > > > CONFIG_DEBUG_INFO option enables gcc to compile kernel with extra 
>> > > > debuginfo.
>> > > > Without that option, debuginfo is not generated with vmlinux.
>> > > >
>> > > >>
>> > > >> I checked upstream patches until 4.15 but could not find any clue.
>> > > >> Please let me know if there is any fixes available for this.
>> > > >
>> > > > Could you also ensure that you run perf by root user?
>> > > >
>> > >
>> > > Yes I am running with root user.
>> > >
>> > > My concern is sometimes it works but sometimes it fails.
>> >
>> > What I thought was that your kernel enables kptr_strict(but maybe not.)
>> > Can you also try to find "schedule" and "_etext" functions in
>> > /proc/kallsyms?
>> >
>>
>> Yes these functions are present in kallsyms.
>>
>> # cat /proc/kallsyms | grep -w schedule ; cat /proc/kallsyms | grep -w _etext
>> ffff829328e0 T schedule
>> 8293e751 T _et

Re: [perf] perf probe fails sometimes on 4.9

2018-01-30 Thread Pintu Kumar
On Tue, Jan 30, 2018 at 11:13 AM, Masami Hiramatsu <mhira...@kernel.org> wrote:
>
> On Mon, 29 Jan 2018 22:00:52 +0530
> Pintu Kumar <pintu.p...@gmail.com> wrote:
>
> > Dear Masami,
> >
> > Thank you so much for your reply.
> > Please find some of my answers inline.
> >
> >
> > On Mon, Jan 29, 2018 at 7:47 PM, Masami Hiramatsu <mhira...@kernel.org> 
> > wrote:
> > > On Mon, 29 Jan 2018 13:40:34 +0530
> > > Pintu Kumar <pintu.p...@gmail.com> wrote:
> > >
> > >> Hi All,
> > >>
> > >> 'perf probe' is failing sometimes on 4.9.20 with AMD-64.
> > >> # perf probe --add schedule
> > >> schedule is out of .text, skip it.
> > >>   Error: Failed to add events.
> > >>
> > >> If any one have come across this problem please let me know the cause.
> > >
> > > Hi Pintu,
> > >
> > > Could you run it with --vv?
> > >
> > Ok, I will send verbose output by tomorrow.
> >
> > >>
> > >> Note: I don't have CONFIG_DEBUG_INFO enabled in kernel. Is this the 
> > >> problem?
> > >
> > > Without it, you can not probe source-level probe nor trace local variable.
> > >
> >
> > Currently I am facing problem in enabling DEBUG_INFO in our kernel 4.9.20
> > However, I will try to manually include "-g" option during compilation.
> >
> > >> However, I manually copied the vmlinux file to /boot/ directory, but
> > >> still it does not work.
> > >
> > > That doesn't work.
> > > CONFIG_DEBUG_INFO option enables gcc to compile kernel with extra 
> > > debuginfo.
> > > Without that option, debuginfo is not generated with vmlinux.
> > >
> > >>
> > >> I checked upstream patches until 4.15 but could not find any clue.
> > >> Please let me know if there is any fixes available for this.
> > >
> > > Could you also ensure that you run perf by root user?
> > >
> >
> > Yes I am running with root user.
> >
> > My concern is sometimes it works but sometimes it fails.
>
> What I thought was that your kernel enables kptr_strict(but maybe not.)
> Can you also try to find "schedule" and "_etext" functions in
> /proc/kallsyms?
>

Yes these functions are present in kallsyms.

# cat /proc/kallsyms | grep -w schedule ; cat /proc/kallsyms | grep -w _etext
829328e0 T schedule
8293e751 T _etext


> > I still needs to figure out, in which condition it works and which
> > condition it fails.
>
> Yeah, it is important.
>
> > Usually I noticed that in fresh reboot case it works.
>
> So, after a while, it doesn't work again? If so, it sounds like a daemon
> process changes settings in background.
>

Fortunately or unfortunately, now it is passing every time.
Still not sure about the cause.
If it fails again, I will collect info with -v and report again.
Any specific info that I need to check when it fails ?

Thank You,
Pintu


> Thank you,
>
> >
> >
> > > Thank you,
> > >
> > >
> > >>
> > >>
> > >> Thank You!
> > >> Regards,
> > >> Pintu
> > >>
> > >>
> > >> On Thu, Jan 25, 2018 at 7:09 PM, Pintu Kumar <pintu.p...@gmail.com> 
> > >> wrote:
> > >> > Hi,
> > >> >
> > >> > ** Changed the subject now, since these issues are related to general
> > >> > perf commands.
> > >> >
> > >> > Following are the issues:
> > >> >
> > >> > 1) perf probe --add schedule - FAILED
> > >> > output:
> > >> > schedule is out of .text, skip it.
> > >> >   Error: Failed to add events.
> > >> >
> > >> > what is the issue here?
> > >> > Sometimes it pass and sometimes it fails...
> > >> > Similar is the case of 'perf inject' as well.
> > >> >
> > >> > 2) perf test - 1 FAILURE
> > >> > 37.1: Test basic BPF filtering   : FAILED!
> > >> > 37.2: Test BPF prologue generation   : Skip
> > >> > 37.3: Test BPF relocation checker: Skip
> > >> >
> > >> > bpf: config program 'func=SyS_epoll_wait'
> > >> > symbol:SyS_epoll_wait file:(null) line:0 offset:0 return:0 lazy:(null)
> > >> > bpf: config 'func=SyS_epoll_w

Re: [perf] perf probe fails sometimes on 4.9

2018-01-29 Thread Pintu Kumar
Dear Masami,

Thank you so much for your reply.
Please find some of my answers inline.


On Mon, Jan 29, 2018 at 7:47 PM, Masami Hiramatsu <mhira...@kernel.org> wrote:
> On Mon, 29 Jan 2018 13:40:34 +0530
> Pintu Kumar <pintu.p...@gmail.com> wrote:
>
>> Hi All,
>>
>> 'perf probe' is failing sometimes on 4.9.20 with AMD-64.
>> # perf probe --add schedule
>> schedule is out of .text, skip it.
>>   Error: Failed to add events.
>>
>> If any one have come across this problem please let me know the cause.
>
> Hi Pintu,
>
> Could you run it with --vv?
>
Ok, I will send verbose output by tomorrow.

>>
>> Note: I don't have CONFIG_DEBUG_INFO enabled in kernel. Is this the problem?
>
> Without it, you can not probe source-level probe nor trace local variable.
>

Currently I am facing problem in enabling DEBUG_INFO in our kernel 4.9.20
However, I will try to manually include "-g" option during compilation.

>> However, I manually copied the vmlinux file to /boot/ directory, but
>> still it does not work.
>
> That doesn't work.
> CONFIG_DEBUG_INFO option enables gcc to compile kernel with extra debuginfo.
> Without that option, debuginfo is not generated with vmlinux.
>
>>
>> I checked upstream patches until 4.15 but could not find any clue.
>> Please let me know if there is any fixes available for this.
>
> Could you also ensure that you run perf by root user?
>

Yes I am running with root user.

My concern is sometimes it works but sometimes it fails.
I still needs to figure out, in which condition it works and which
condition it fails.
Usually I noticed that in fresh reboot case it works.


> Thank you,
>
>
>>
>>
>> Thank You!
>> Regards,
>> Pintu
>>
>>
>> On Thu, Jan 25, 2018 at 7:09 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
>> > Hi,
>> >
>> > ** Changed the subject now, since these issues are related to general
>> > perf commands.
>> >
>> > Following are the issues:
>> >
>> > 1) perf probe --add schedule - FAILED
>> > output:
>> > schedule is out of .text, skip it.
>> >   Error: Failed to add events.
>> >
>> > what is the issue here?
>> > Sometimes it pass and sometimes it fails...
>> > Similar is the case of 'perf inject' as well.
>> >
>> > 2) perf test - 1 FAILURE
>> > 37.1: Test basic BPF filtering   : FAILED!
>> > 37.2: Test BPF prologue generation   : Skip
>> > 37.3: Test BPF relocation checker: Skip
>> >
>> > bpf: config program 'func=SyS_epoll_wait'
>> > symbol:SyS_epoll_wait file:(null) line:0 offset:0 return:0 lazy:(null)
>> > bpf: config 'func=SyS_epoll_wait' is ok
>> > Looking at the vmlinux_path (8 entries long)
>> > Using /boot/vmlinux for symbols
>> > Could not open debuginfo. Try to use symbols.
>> > SyS_epoll_wait is out of .text, skip it.
>> > bpf_probe: failed to convert perf probe eventsFailed to add events
>> > selected by BPF
>> > test child finished with -1
>> >  end 
>> > Test BPF filter subtest 0: FAILED!
>> >
>> > Looks like both 1,2 are related.
>> > Since, CONFIG_DEBUG_INFO is not enabled, I manually copied the vmlinux
>> > to /boot/ folder.
>> >
>> > ---
>> > Some more info:
>> >
>> > Kernel build dir is set to /lib/modules/4.9.20-sc-amd-x86-64/build
>> > set env: KBUILD_DIR=/lib/modules/4.9.20-sc-amd-x86-64/build
>> > unset env: KBUILD_OPTS
>> > include option is set to  -nostdinc -isystem
>> > /usr/lib/gcc/x86_64-linux-gnu/5/include -I./arch/x86/include
>> > -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated
>> > -I./include -I./arch/x86/include/uapi -I./include/uapi
>> > -I./include/generated/uapi -include ./include/linux/kconfig.h
>> > set env: NR_CPUS=8
>> > set env: LINUX_VERSION_CODE=0x40914
>> > set env: CLANG_EXEC=/usr/bin/clang
>> > set env: CLANG_OPTIONS=-xc
>> > set env: KERNEL_INC_OPTIONS= -nostdinc -isystem
>> > /usr/lib/gcc/x86_64-linux-gnu/5/include -I./arch/x86/include
>> > -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated
>> > -I./include -I./arch/x86/include/uapi -I./include/uapi
>> > -I./include/generated/uapi -include ./include/linux/kconfig.h
>> > set env: WORKING_DIR=/lib/modules/4.9.20-sc-amd-x86-64/build
>> >
>> >
>> > If you have any clue about these fail

Re: [perf] perf probe fails sometimes on 4.9

2018-01-29 Thread Pintu Kumar
Hi All,

'perf probe' is failing sometimes on 4.9.20 with AMD-64.
# perf probe --add schedule
schedule is out of .text, skip it.
  Error: Failed to add events.

If any one have come across this problem please let me know the cause.

Note: I don't have CONFIG_DEBUG_INFO enabled in kernel. Is this the problem?
However, I manually copied the vmlinux file to /boot/ directory, but
still it does not work.

I checked upstream patches until 4.15 but could not find any clue.
Please let me know if there is any fixes available for this.


Thank You!
Regards,
Pintu


On Thu, Jan 25, 2018 at 7:09 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
> Hi,
>
> ** Changed the subject now, since these issues are related to general
> perf commands.
>
> Following are the issues:
>
> 1) perf probe --add schedule - FAILED
> output:
> schedule is out of .text, skip it.
>   Error: Failed to add events.
>
> what is the issue here?
> Sometimes it pass and sometimes it fails...
> Similar is the case of 'perf inject' as well.
>
> 2) perf test - 1 FAILURE
> 37.1: Test basic BPF filtering   : FAILED!
> 37.2: Test BPF prologue generation   : Skip
> 37.3: Test BPF relocation checker: Skip
>
> bpf: config program 'func=SyS_epoll_wait'
> symbol:SyS_epoll_wait file:(null) line:0 offset:0 return:0 lazy:(null)
> bpf: config 'func=SyS_epoll_wait' is ok
> Looking at the vmlinux_path (8 entries long)
> Using /boot/vmlinux for symbols
> Could not open debuginfo. Try to use symbols.
> SyS_epoll_wait is out of .text, skip it.
> bpf_probe: failed to convert perf probe eventsFailed to add events
> selected by BPF
> test child finished with -1
>  end 
> Test BPF filter subtest 0: FAILED!
>
> Looks like both 1,2 are related.
> Since, CONFIG_DEBUG_INFO is not enabled, I manually copied the vmlinux
> to /boot/ folder.
>
> ---
> Some more info:
>
> Kernel build dir is set to /lib/modules/4.9.20-sc-amd-x86-64/build
> set env: KBUILD_DIR=/lib/modules/4.9.20-sc-amd-x86-64/build
> unset env: KBUILD_OPTS
> include option is set to  -nostdinc -isystem
> /usr/lib/gcc/x86_64-linux-gnu/5/include -I./arch/x86/include
> -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated
> -I./include -I./arch/x86/include/uapi -I./include/uapi
> -I./include/generated/uapi -include ./include/linux/kconfig.h
> set env: NR_CPUS=8
> set env: LINUX_VERSION_CODE=0x40914
> set env: CLANG_EXEC=/usr/bin/clang
> set env: CLANG_OPTIONS=-xc
> set env: KERNEL_INC_OPTIONS= -nostdinc -isystem
> /usr/lib/gcc/x86_64-linux-gnu/5/include -I./arch/x86/include
> -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated
> -I./include -I./arch/x86/include/uapi -I./include/uapi
> -I./include/generated/uapi -include ./include/linux/kconfig.h
> set env: WORKING_DIR=/lib/modules/4.9.20-sc-amd-x86-64/build
>
>
> If you have any clue about these failure please help me.
>
>
> Thanks,
> Pintu
>
>
> On Wed, Jan 24, 2018 at 8:23 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
>> Hi,
>>
>> Thanks for your help.
>> Yes it was a sub version issue.
>>
>> Earlier, while building the kernel I left the SUBLEVEL as blank.
>>
>> make -j8 bindeb-pkg SUBLEVEL=20
>>
>> After passing the correct sublevel now the test is working.
>>
>> But still following are failing:
>>
>> 16: Try 'import perf' in python, checking link problems  : FAILED!
>> 37.2: Test BPF prologue generation   : FAILED!
>>
>>
>> This is the error I get:
>>
>> 16: Try 'import perf' in python, checking link problems  :
>> --- start ---
>> test child forked, pid 7637
>> Traceback (most recent call last):
>>   File "", line 1, in 
>> ImportError: No module named perf
>> test child finished with -1
>>  end 
>> Try 'import perf' in python, checking link problems: FAILED!
>>
>>
>> Looking at the vmlinux_path (8 entries long)
>> symsrc__init: cannot get elf header.
>> Failed to find the path for kernel: Invalid ELF file
>> bpf_probe: failed to convert perf probe eventsFailed to add events
>> selected by BPF
>> test child finished with -1
>>  end 
>> Test BPF filter subtest 1: FAILED!
>>
>>
>>
>> Thanks,
>> Pintu
>>
>>
>> On Wed, Jan 24, 2018 at 6:39 AM, Wangnan (F) <wangn...@huawei.com> wrote:
>>>
>>>
>>> On 2018/1/23 20:37, Pintu Kumar wrote:
>>>>
>>>> Hi All,
>>>>
>>>> I am verifying all perf tests on Ubuntu-16 x86-64 platform usin

Re: [perf] perf test and probe fails sometimes on 4.9

2018-01-25 Thread Pintu Kumar
Hi,

** Changed the subject now, since these issues are related to general
perf commands.

Following are the issues:

1) perf probe --add schedule - FAILED
output:
schedule is out of .text, skip it.
  Error: Failed to add events.

what is the issue here?
Sometimes it pass and sometimes it fails...
Similar is the case of 'perf inject' as well.

2) perf test - 1 FAILURE
37.1: Test basic BPF filtering   : FAILED!
37.2: Test BPF prologue generation   : Skip
37.3: Test BPF relocation checker: Skip

bpf: config program 'func=SyS_epoll_wait'
symbol:SyS_epoll_wait file:(null) line:0 offset:0 return:0 lazy:(null)
bpf: config 'func=SyS_epoll_wait' is ok
Looking at the vmlinux_path (8 entries long)
Using /boot/vmlinux for symbols
Could not open debuginfo. Try to use symbols.
SyS_epoll_wait is out of .text, skip it.
bpf_probe: failed to convert perf probe eventsFailed to add events
selected by BPF
test child finished with -1
 end 
Test BPF filter subtest 0: FAILED!

Looks like both 1,2 are related.
Since, CONFIG_DEBUG_INFO is not enabled, I manually copied the vmlinux
to /boot/ folder.

---
Some more info:

Kernel build dir is set to /lib/modules/4.9.20-sc-amd-x86-64/build
set env: KBUILD_DIR=/lib/modules/4.9.20-sc-amd-x86-64/build
unset env: KBUILD_OPTS
include option is set to  -nostdinc -isystem
/usr/lib/gcc/x86_64-linux-gnu/5/include -I./arch/x86/include
-I./arch/x86/include/generated/uapi -I./arch/x86/include/generated
-I./include -I./arch/x86/include/uapi -I./include/uapi
-I./include/generated/uapi -include ./include/linux/kconfig.h
set env: NR_CPUS=8
set env: LINUX_VERSION_CODE=0x40914
set env: CLANG_EXEC=/usr/bin/clang
set env: CLANG_OPTIONS=-xc
set env: KERNEL_INC_OPTIONS= -nostdinc -isystem
/usr/lib/gcc/x86_64-linux-gnu/5/include -I./arch/x86/include
-I./arch/x86/include/generated/uapi -I./arch/x86/include/generated
-I./include -I./arch/x86/include/uapi -I./include/uapi
-I./include/generated/uapi -include ./include/linux/kconfig.h
set env: WORKING_DIR=/lib/modules/4.9.20-sc-amd-x86-64/build


If you have any clue about these failure please help me.


Thanks,
Pintu


On Wed, Jan 24, 2018 at 8:23 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
> Hi,
>
> Thanks for your help.
> Yes it was a sub version issue.
>
> Earlier, while building the kernel I left the SUBLEVEL as blank.
>
> make -j8 bindeb-pkg SUBLEVEL=20
>
> After passing the correct sublevel now the test is working.
>
> But still following are failing:
>
> 16: Try 'import perf' in python, checking link problems  : FAILED!
> 37.2: Test BPF prologue generation   : FAILED!
>
>
> This is the error I get:
>
> 16: Try 'import perf' in python, checking link problems  :
> --- start ---
> test child forked, pid 7637
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: No module named perf
> test child finished with -1
>  end 
> Try 'import perf' in python, checking link problems: FAILED!
>
>
> Looking at the vmlinux_path (8 entries long)
> symsrc__init: cannot get elf header.
> Failed to find the path for kernel: Invalid ELF file
> bpf_probe: failed to convert perf probe eventsFailed to add events
> selected by BPF
> test child finished with -1
>  end 
> Test BPF filter subtest 1: FAILED!
>
>
>
> Thanks,
> Pintu
>
>
> On Wed, Jan 24, 2018 at 6:39 AM, Wangnan (F) <wangn...@huawei.com> wrote:
>>
>>
>> On 2018/1/23 20:37, Pintu Kumar wrote:
>>>
>>> Hi All,
>>>
>>> I am verifying all perf tests on Ubuntu-16 x86-64 platform using the
>>> kernel version 4.9.20.
>>> I have installed several others packages including: clang, llvm
>>>
>>> But, when I run 'perf test' I get some FAILURE.
>>> Specially, 'perf test LLVM' is failing.
>>>
>>> Please check the below error logs:
>>>
>>> 
>>> # perf test LLVM
>>> 35: Test LLVM searching and compiling:
>>> 35.1: Basic BPF llvm compiling test  : FAILED!
>>> 35.2: Test kbuild searching  : Skip
>>> 35.3: Compile source for BPF prologue generation test: Skip
>>> 35.4: Compile source for BPF relocation test : Skip
>>> 
>>>
>>> When I run with -v I get this:
>>>
>>> -
>>> # perf test -v LLVM
>>> 35: Test LLVM searching and compiling:
>>> 35.1: Basic BPF llvm compiling test   

Re: [tools/perf] perf test LLVM failure on 4.9

2018-01-24 Thread Pintu Kumar
Hi,

Thanks for your help.
Yes it was a sub version issue.

Earlier, while building the kernel I left the SUBLEVEL as blank.

make -j8 bindeb-pkg SUBLEVEL=20

After passing the correct sublevel now the test is working.

But still following are failing:

16: Try 'import perf' in python, checking link problems  : FAILED!
37.2: Test BPF prologue generation   : FAILED!


This is the error I get:

16: Try 'import perf' in python, checking link problems  :
--- start ---
test child forked, pid 7637
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named perf
test child finished with -1
 end 
Try 'import perf' in python, checking link problems: FAILED!


Looking at the vmlinux_path (8 entries long)
symsrc__init: cannot get elf header.
Failed to find the path for kernel: Invalid ELF file
bpf_probe: failed to convert perf probe eventsFailed to add events
selected by BPF
test child finished with -1
 end 
Test BPF filter subtest 1: FAILED!



Thanks,
Pintu


On Wed, Jan 24, 2018 at 6:39 AM, Wangnan (F) <wangn...@huawei.com> wrote:
>
>
> On 2018/1/23 20:37, Pintu Kumar wrote:
>>
>> Hi All,
>>
>> I am verifying all perf tests on Ubuntu-16 x86-64 platform using the
>> kernel version 4.9.20.
>> I have installed several others packages including: clang, llvm
>>
>> But, when I run 'perf test' I get some FAILURE.
>> Specially, 'perf test LLVM' is failing.
>>
>> Please check the below error logs:
>>
>> 
>> # perf test LLVM
>> 35: Test LLVM searching and compiling:
>> 35.1: Basic BPF llvm compiling test  : FAILED!
>> 35.2: Test kbuild searching  : Skip
>> 35.3: Compile source for BPF prologue generation test: Skip
>> 35.4: Compile source for BPF relocation test : Skip
>> 
>>
>> When I run with -v I get this:
>>
>> -
>> # perf test -v LLVM
>> 35: Test LLVM searching and compiling:
>> 35.1: Basic BPF llvm compiling test  :
>> --- start ---
>> test child forked, pid 3304
>> Unablt to get kernel version from uname '4.9--amd-x86-64'
>> WARNING:unable to get correct kernel building directory.
>> Hint:   Set correct kbuild directory using 'kbuild-dir' option in [llvm]
>>  section of ~/.perfconfig or set it to "" to suppress kbuild
>>  detection.
>>
>> Unablt to get kernel version from uname '4.9--amd-x86-64'
>>
>>
>> int _version SEC("version") = LINUX_VERSION_CODE;
>> ' | $CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS
>> -DLINUX_VERSION_CODE=$LINUX_VERSION_CODE $CLANG_OPTIONS
>> $KERNEL_INC_OPTIONS -Wno-unused-value -Wno-pointer-sign
>> -working-directory $WORKING_DIR -c "$CLANG_SOURCE" -target bpf -O2 -o
>> -
>> libbpf: 2129190-4a0 doesn't provide kernel version
>> Failed to parse test case 'Basic BPF llvm compiling test'
>> test child finished with -1
>>  end 
>> Test LLVM searching and compiling subtest 0: FAILED!
>> -
>>
>>
>> Basic BPF LLVM compiling test is failing.
>> It reports that bpf could not able to read the kernel version from uname.
>> Is it because of this that 'perf test LLVM' is failing ?
>>
>> My uname says:
>> 4.9--amd-x86-64
>
>
> 'perf test LLVM' requires a well formed uname string (%d.%d.%d). Please see
> tools/perf/fetch_kernel_version . If your distro uses another method to
> report
> kernel version number (from your uname string, sublevel can't be
> determined),
> please help us improve that function like what we have done for ubuntu
> (checking /proc/version_signature).
>
>
>
>> My kernel version is: 4.9.20 (from Makefile)
>>
>> So, I dont think there is any problem with kernel version.
>>
>> If any body have come across this problem please let me know how to
>> resolve this issue.
>>
>>
>>
>> Thank You!
>>
>> Regards,
>> Pintu
>
>
>

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


[tools/perf] perf test LLVM failure on 4.9

2018-01-23 Thread Pintu Kumar
Hi All,

I am verifying all perf tests on Ubuntu-16 x86-64 platform using the
kernel version 4.9.20.
I have installed several others packages including: clang, llvm

But, when I run 'perf test' I get some FAILURE.
Specially, 'perf test LLVM' is failing.

Please check the below error logs:


# perf test LLVM
35: Test LLVM searching and compiling:
35.1: Basic BPF llvm compiling test  : FAILED!
35.2: Test kbuild searching  : Skip
35.3: Compile source for BPF prologue generation test: Skip
35.4: Compile source for BPF relocation test : Skip


When I run with -v I get this:

-
# perf test -v LLVM
35: Test LLVM searching and compiling:
35.1: Basic BPF llvm compiling test  :
--- start ---
test child forked, pid 3304
Unablt to get kernel version from uname '4.9--amd-x86-64'
WARNING:unable to get correct kernel building directory.
Hint:   Set correct kbuild directory using 'kbuild-dir' option in [llvm]
section of ~/.perfconfig or set it to "" to suppress kbuild
detection.

Unablt to get kernel version from uname '4.9--amd-x86-64'


int _version SEC("version") = LINUX_VERSION_CODE;
' | $CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS
-DLINUX_VERSION_CODE=$LINUX_VERSION_CODE $CLANG_OPTIONS
$KERNEL_INC_OPTIONS -Wno-unused-value -Wno-pointer-sign
-working-directory $WORKING_DIR -c "$CLANG_SOURCE" -target bpf -O2 -o
-
libbpf: 2129190-4a0 doesn't provide kernel version
Failed to parse test case 'Basic BPF llvm compiling test'
test child finished with -1
 end 
Test LLVM searching and compiling subtest 0: FAILED!
-


Basic BPF LLVM compiling test is failing.
It reports that bpf could not able to read the kernel version from uname.
Is it because of this that 'perf test LLVM' is failing ?

My uname says:
4.9--amd-x86-64

My kernel version is: 4.9.20 (from Makefile)

So, I dont think there is any problem with kernel version.

If any body have come across this problem please let me know how to
resolve this issue.



Thank You!

Regards,
Pintu

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


Re: kernel - Regarding tools/testing/ktests or selftests

2017-10-12 Thread Pintu Kumar
On Wed, Oct 11, 2017 at 10:21 PM, Greg KH <g...@kroah.com> wrote:
> On Wed, Oct 11, 2017 at 08:38:52PM +0530, Pintu Kumar wrote:
>> Yes, I have seen many documentation and also the existing repos under 
>> selftests.
>> But my requirement is little different.
>> I think my requirement is some what similar to futex repo.
>> Currently I am trying to under it. But still I am facing some issues
>> in generating my 2 executable using kselftests.
>> Also I found that current document does not explain much about how to
>> include new tests.
>>
>> My requirement is as follows:
>> I have a sub folders for test. Example: tools/testing/selftests/> folders>/
>
> Why do you need ?  Just don't use it, you should not have so
> many files for your test that you need to break it up even more, right?
>
>> I have my own Makefile, and some set of C source files under folder1
>> I also have a test script under folder1, that tests 2 executable
>> generated out of 7 C files.
>> I wanted to know how to make use of selftest framework to generate
>> these 2 executable, and also execute my script to run the test.
>> I have already includes  in top level Makefile under selftests.
>> TARGETS = 
>>
>> Do, I need to create another Makefile under  and invoke
>> folder1/Makefile from there?
>> Or is there another way?
>
> Try it and see!
>
> And post your patch to the kselftest mailing list, if you have problems
> with it.  Specifics are good, and the developers there can help you out.
> Asking vague questions without seeing the code itself lends itself to
> vague answers :)
>
> good luck!

Ok after doing lots of research I could able to make it working now.
Now everything is perfectly working as I expected.
I think the kselftest documentation should be updated with some examples.
I will try to update it with few examples.

Thank you!
Pintu

>
> greg k-h

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


Re: kernel - Regarding tools/testing/ktests or selftests

2017-10-10 Thread Pintu Kumar
Hi,

I am actually interested in kselftests.
My requirement is:
I have a sub folders for test. Example: tools/testing/selftests//
I have my own Makefile, and some set of C source files under folder1
I also have a test script under folder1, that tests 2 executable
generated out of 7 C files.
I wanted to know about to make use of selftest framework to generate
these 2 executable, and also execute by script to run the test.
I have already includes  in top level Makefile under selftests.
TARGETS = 

Do, I need to create another Makefile under  and invoke
folder1/Makefile from there?
Or is there another way?

If anybody have already done a new addition in selftests, please let me know.


Thanks,
Pintu



On Tue, Oct 10, 2017 at 1:15 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
> Hi All,
>
> Is anybody familiar with ktests of selftests framework under: tool/testing/ ?
> I have some queries.
>
> 1) What is the difference between ktests and selftests ? How to choose ?
> 2) How to invoke a test under ktests?
> For example:
> I have some user space C program, that tests some kernel driver IOCTL 
> calls.
> I have a Makefile to build 2 executable for the tests.
> I invoke those executable from a bash shell script and execute all
> the tests.
> How can I do it automatically from ktests ?
> 3) Similarly, how can I do it using selftests?
> Using selftests looks much better option for me.
> But the problem is I have some sub directories to execute the tests.
> Example:
> Under, tools/testing/selftests , I have created 2 sub folders.
> selftests/folders/folder1/
> My test setup is under: folder1
> How to invoke selftests, for folder1 ?
>
> If anybody have added new tests under ktests of selftests, please
> provide some reference.
>
>
> Thanks,
> Pintu

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


kernel - Regarding tools/testing/ktests or selftests

2017-10-10 Thread Pintu Kumar
Hi All,

Is anybody familiar with ktests of selftests framework under: tool/testing/ ?
I have some queries.

1) What is the difference between ktests and selftests ? How to choose ?
2) How to invoke a test under ktests?
For example:
I have some user space C program, that tests some kernel driver IOCTL calls.
I have a Makefile to build 2 executable for the tests.
I invoke those executable from a bash shell script and execute all
the tests.
How can I do it automatically from ktests ?
3) Similarly, how can I do it using selftests?
Using selftests looks much better option for me.
But the problem is I have some sub directories to execute the tests.
Example:
Under, tools/testing/selftests , I have created 2 sub folders.
selftests/folders/folder1/
My test setup is under: folder1
How to invoke selftests, for folder1 ?

If anybody have added new tests under ktests of selftests, please
provide some reference.


Thanks,
Pintu

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


Re: How to verify linux-next

2017-10-02 Thread Pintu Kumar
** Re sending **

Hi,

I have a general question.
How do we normally verify linux-next tree?

I wanted to work on linux-next but I am facing some issues.
I could able to build linux-next for both x86 and arm, but I could not
verify it on any machine.
Currently I don't have a real Linux PC to boot with linux-next kernel.
So I am trying to find alternative ways, like using the virtual box or qemu-arm.
1) For Oracle virtual box 5.1.26 with ubuntu-32 bit, the linux-next
kernel is not booting.
2) For qemu-arm (versatilepb), I am able to build the kernel, but I
could not figure out which rootfs to use with it.
I tried creating minimal rootfs using busybox, but it does not contain
enough interface. I am not able to open multiple terminal and also
could not setup ssh to access it using PUTTY.

So, if you know of any better rootfs to use with qemu-arm please let me know.
Or, if you know of any better option to use linux-next please tell me.
It will be really helpful.


Thank You!
Regards,
Pintu

On Fri, Sep 29, 2017 at 3:12 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
> Hi,
>
> I have a general question.
> How do we normally verify linux-next tree?
>
> I wanted to work on linux-next but I am facing some issues.
> I could able to build linux-next for both x86 and arm, but I could not
> verify it on any machine.
> Currently I don't have a real Linux PC to boot with linux-next kernel.
> So I am trying to find alternative ways, like using the virtual box or 
> qemu-arm.
> 1) For Oracle virtual box 5.1.26 with ubuntu-32 bit, the linux-next
> kernel is not booting.
> 2) For qemu-arm (versatilepb), I am able to build the kernel, but I
> could not figure out which rootfs to use with it.
> I tried creating minimal rootfs using busybox, but it does not contain
> enough interface. I am not able to open multiple terminal and also
> could not setup ssh to access it using PUTTY.
>
> So, if you know of any better rootfs to use with qemu-arm please let me know.
> Or, if you know of any better option to use linux-next please tell me.
> It will be really helpful.
>
>
> Thank You!
> Regards,
> Pintu

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


Re: How to verify linux-next

2017-10-01 Thread Pintu Kumar
On Sun, Oct 1, 2017 at 10:33 PM, Mike Galbraith  wrote:
> On Sun, 2017-10-01 at 09:48 -0700, Randy Dunlap wrote:
>> On 10/01/17 09:44, Damian Tometzki wrote:
>>
>> > i resolved the issue with:
>> > sudo /etc/init.d/apparmor stop
>>
>> or boot with: apparmor=0
>
> or systemctl mask apparmor

Ok, thanks everyone for your quick help.
Stopping apparmor really helped to restore the connection.

Mr. Tso, thanks for your help too for QEMU.
After finishing my patch next I will looking into QEMU issues as per
your suggestions.

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


Re: How to verify linux-next

2017-10-01 Thread Pintu Kumar
On Sat, Sep 30, 2017 at 10:55 AM, Theodore Ts'o <ty...@mit.edu> wrote:
> On Sat, Sep 30, 2017 at 09:28:09AM +0530, Pintu Kumar wrote:
>> I need to submit a patch to mainline which should be verified against
>> linux-next tree with latest API.
>
> If you want to verify a patch that you intend to submit upstream, my
> suggestion is to *not* use linux-next, but rather use the latest
> tagged -rc from Linus's tree.  So for example, you might want to use
> v4.14-rc2 as your base, and then apply your patch on top of v4.14-rc2.
> And then test v4.14-rc2.  That way you don't need to worry about
> debugging problems that might be caused by code in other people's
> development trees.
>
> If you know which subsystem tree your commit is going to be sent to,
> you might use as your base the current development branch of that
> subsystem tree.  But in general, it's fine to use something like
> v4.14-rc2; if the subsystem maintainer you plan to be submitting your
> patch has other preference, he or she will let you know, or take care
> of rebasing your patch onto his subsystme tree.
>
>> My patch is related to some test utility based on client/server model.
>> So, I need 2 terminal, one for server and one for client.
>
> That implies you're running the commands to run the test by hand.  In
> the ideal world, tests should be automated, even those that are using
> client/server so that tests can be run unattended, over and over
> again.
>
> For example, here's an example of test involving a client and a server
> in xfstests:
>
> https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/tests/generic/131
>
> See?  No terminal required, and certainly not two terminals!
>
> Remember, it's important not just to run one test, because the risk is
> that fixing one bug might cause a test regression somewhere else.  So
> when I "validate" a kernel, I'm running thousands of tests, just to
> test the ext4 file system.  For each bug that we fix, we try to add a
> new automated test, so we can be sure that some future change doesn't
> cause a bug to reappear.  And if you're running hundreds or thousands
> of tests, you certainly aren't going to be wanting to manually set up
> each test by using putty to login to the VM using ssh!
>
>> 1) How to resolve linux-next build error with ubuntu virtual box 5.1.28
>
> Virtual box is not relevant.  What is relevant is the kernel config
> file you are using, and what compiler version / distro are you using
> to build the kernel.  And as I said, you're better off using something
> like v4.14-rc2 instead of linux-next.
>

Ok thank you so much for your reply.
Now I am able to boot with v4.14-rc2. But now I am facing another problem.
Now, I am not able to connect to internet from virtual box.
When I switch back to the default 4.10 the internet works normally.
I think the dlclient stopped working.
I am getting continuous logs related to apparmor like this:
apparmor="DENIED" comm=dhclient
apparmor="DENIED" comm=cups-browsed

With 4.10, I tried installing apparmor-utils and then reboot with
4.14-rc2, but it did not help.
Any suggestions on this?



> - Ted

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


Re: How to verify linux-next

2017-09-29 Thread Pintu Kumar
Thanks Mr. Tso for your reply.
Please find my reply inline.

On Sat, Sep 30, 2017 at 3:20 AM, Theodore Ts'o <ty...@mit.edu> wrote:
> On Fri, Sep 29, 2017 at 07:56:41PM +0530, Pintu Kumar wrote:
>> BTW, I am more interested in my another query about QEMU arm.
>> This will be much quicker and easy for me.
>> But the problem is I wanted to use multiple ssh shell on qemu.
>> Also I needed a pre-built rootfs image for qemu-arm, cortex-a9
>> versatilepb machine.
>
> If you want to get more useful help, it might be interesting if you
> were to specify exactly what kind of "verification" you are interested
> in doing.  What sort of kernel testing are you interested in doing?
> What part of the kernel are you interested in testing?  The fact that
> you are trying to test both a Ubuntu x86 box as will as a virtual ARM
> box makes it unclear what part of the kernel you are most intested in
> testing.
>
I need to submit a patch to mainline which should be verified against
linux-next tree with latest API.
My patch is already working with 4.10 LTS version but I need to upgrade.

> In particular, why do you care about accessing the VM via ssh /
> networking?  What sort of testing do you plan to do after manage to
> get the kernel running?   And do you care what distribution you use?
>
My patch is related to some test utility based on client/server model.
So, I need 2 terminal, one for server and one for client.
No, I really don't care about distribution, whichever works this way is
good for me. So I a trying both ways: Ububntu(x86) or qemu (arm).
The point is, I should be able to test my patch with linux-next.

> I have a huge amount of test automation built for testing kernel file
> systems.  This includes building root_fs images for x86 for use with
> kvm[1], and arm chroots for use in testing Android systems[2].  There
> is also a turn-key images for running tests using the Google Cloud
> Platform[3], and even a Dockerfile[4] so people can run kernel tests
> using a private Kubernetes cluster.
>
> [1] 
> https://github.com/tytso/xfstests-bld/blob/master/Documentation/kvm-xfstests.md
> [2] https://thunk.org/android-xfstests
> [3] https://thunk.org/gce-xfstests
> [4] https://github.com/tytso/xfstests-bld/blob/master/kvm-xfstests/Dockerfile
>
> If you don't have a file-system centric view of the world, and want to
> do more generalized kernel testing, the above might not be as
> interesting to you, although some of the utilities in the xfstests-bld
> git tree for setting up and building in build chroots, using
> debootstrap to create root_fs.img files, scripts for manipulating
> xUnit test result files (the XML format used by Jenkins), using 9p to
> communicate between the host system running qemu/kvm and the test VM,
> etc.
>
> The point is that if you really want to get serious about kernel
> testing, you should really think hard about test automation.  And in
> that world, using networking often makes things harder, not easier.
> For kvm-xfstests we just do our communications using the serial port,
> which made it easy for us to adapt things for android-xfstests, where
> we comunicate test runner script via "adb shell".   For gce-xfstests
> things _do_ get a bit more complicated, where the test summary gets
> e-mail'ed back to the developer, while the full set of test artifacts
> are archived on Google Cloud Storage.  But one of the most powerful
> things about my setup is vast majority of the test automation code
> stays the same regardless of whether the kernel being tested is being
> run in KVM, on a physical Android hardware, or in the Cloud using
> GCE.
>
>> 2) Let, please point me to a pre-built qemu-arm busy box image with
>> full features.
>
> Define "full features".  Busy box images are generally _not_ full
> featured.  There is a reason why I use a minimal Debian system; a lot
> of the tests I run require bash, and modern shell utilities, and
> Python so I can have scripts which manipulate xUnit XML files.
> Nevertheless, the complete x86 test VM is still only 87 megs, which is
> still small enough that it doesn't cause me any problems.
>
Qemu Busybox -> full feature for me means: I should be able to connect
Qemu with my PUTTY session, and open 2 terminal.
Moreover, I should be able to do scp to my qemu machine from my
ubuntu pc.

> On the other hand, since I find networking in the test VM to be
> completely superfluous (and in fact, gets in the way, since a VM which
> is on the corporate network can be a security problem, and may run
> afoul of corporate I/T security policies --- and if you don't have
> those kinds of security policies, you really should).  So my
> root_fs's general have no networking support whatsoever.  It keeps
>

Re: How to verify linux-next

2017-09-29 Thread Pintu Kumar
On Fri, Sep 29, 2017 at 7:56 PM, Pintu Kumar <pintu.p...@gmail.com> wrote:
> On Fri, Sep 29, 2017 at 6:44 PM, Damian Tometzki
> <damian.tomet...@icloud.com> wrote:
>> Hello,
>>
>> Ubuntu 16.04 with current linux-next Kernel workson virtualbox 5.1.28
>>
>> Host: Windows 10
>> Guest: Ubuntu 16.04
>>
>> Best regards
>> Damian
>>
>>
>> Am Freitag, den 29.09.2017, 08:41 -0400 schrieb
>> valdis.kletni...@vt.edu:
>>> On Fri, 29 Sep 2017 16:08:07 +0530, Pintu Kumar said:
>>>
>>> >
>>> > I have a general question.
>>> > How do we normally verify linux-next tree?
>>> The same exact way you "verify" any other Linux kernel, for whatever
>>> definition of "verify" you plan to use.
>>>
>>> >
>>> > 1) For Oracle virtual box 5.1.26 with ubuntu-32 bit, the linux-next
>>> > kernel is not booting.
>>> Does an Ubuntu kernel boot correctly under VirtualBox?  If not, fix
>>> that issue first.  Also, "is not booting" isn't detailed enough for
>>> anybody
>>> to make even a guess as to what's wrong.
>>>
>>> Also, note that 5.1.28 is out.
>
> Ok, I just updated to 5.1.28. And my Ubuntu version is already 16.04.
> Let me try again if it works.
> Thanks all for your reply.
>

Now, with vbox 5.1.28, I am getting below build failure with linux-next.
Any quick pointers on this, if anybody faced similar issue.

In file included from ./arch/x86/include/asm/atomic.h:7:0,
 from ./include/linux/atomic.h:4,
 from ./include/linux/mm_types_task.h:12,
 from ./include/linux/mm_types.h:4,
 from arch/x86/kvm/irq.h:25,
 from arch/x86/kvm/vmx.c:19:
arch/x86/kvm/vmx.c: In function ‘__pi_post_block’:
./arch/x86/include/asm/cmpxchg.h:129:2: warning: ‘__ret’ is used
uninitialized in this function [-Wuninitialized]
  __ret;\
  ^
./arch/x86/include/asm/cmpxchg.h:86:21: note: ‘__ret’ was declared here
  __typeof__(*(ptr)) __ret; \
 ^
./arch/x86/include/asm/cmpxchg.h:133:2: note: in expansion of macro
‘__raw_cmpxchg’
  __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)
  ^
./arch/x86/include/asm/cmpxchg.h:148:2: note: in expansion of macro ‘__cmpxchg’
  __cmpxchg(ptr, old, new, sizeof(*(ptr)))
  ^
arch/x86/kvm/vmx.c:11732:11: note: in expansion of macro ‘cmpxchg’
  } while (cmpxchg(_desc->control, old.control,
   ^
  CC  kernel/trace/trace_seq.o
  CC  kernel/trace/trace_stat.o
In function ‘__pi_post_block’,
inlined from ‘pi_post_block’ at arch/x86/kvm/vmx.c:11831:2,
inlined from ‘vmx_post_block’ at arch/x86/kvm/vmx.c:11840:2:
./arch/x86/include/asm/cmpxchg.h:127:3: error: call to
‘__cmpxchg_wrong_size’ declared with attribute error: Bad argument
size for cmpxchg
   __cmpxchg_wrong_size(); \
   ^



> BTW, I am more interested in my another query about QEMU arm.
> This will be much quicker and easy for me.
> But the problem is I wanted to use multiple ssh shell on qemu.
> Also I needed a pre-built rootfs image for qemu-arm, cortex-a9
> versatilepb machine.
> It should have networking and ssh built-in so that I can connect to it
> using PUTTY client.
> Note that I could able to build my own minimal busybox and boot qemu
> using linux-next (non graphical mode).
> But I could able to get only one shell.
> I need to test some client/server problem, so I need multiple shell.
> I am not able to configure net/ssh on this qemu system.
>
> So, I have 2 things to ask:
> 1) If you have pointers on how to setup ssh/net connection on QEMU
> with busybox, do let me know.
> 2) Let, please point me to a pre-built qemu-arm busy box image with
> full features.
>
>
> Thanks,
> Pintu

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


Re: How to verify linux-next

2017-09-29 Thread Pintu Kumar
On Fri, Sep 29, 2017 at 6:44 PM, Damian Tometzki
<damian.tomet...@icloud.com> wrote:
> Hello,
>
> Ubuntu 16.04 with current linux-next Kernel workson virtualbox 5.1.28
>
> Host: Windows 10
> Guest: Ubuntu 16.04
>
> Best regards
> Damian
>
>
> Am Freitag, den 29.09.2017, 08:41 -0400 schrieb
> valdis.kletni...@vt.edu:
>> On Fri, 29 Sep 2017 16:08:07 +0530, Pintu Kumar said:
>>
>> >
>> > I have a general question.
>> > How do we normally verify linux-next tree?
>> The same exact way you "verify" any other Linux kernel, for whatever
>> definition of "verify" you plan to use.
>>
>> >
>> > 1) For Oracle virtual box 5.1.26 with ubuntu-32 bit, the linux-next
>> > kernel is not booting.
>> Does an Ubuntu kernel boot correctly under VirtualBox?  If not, fix
>> that issue first.  Also, "is not booting" isn't detailed enough for
>> anybody
>> to make even a guess as to what's wrong.
>>
>> Also, note that 5.1.28 is out.

Ok, I just updated to 5.1.28. And my Ubuntu version is already 16.04.
Let me try again if it works.
Thanks all for your reply.

BTW, I am more interested in my another query about QEMU arm.
This will be much quicker and easy for me.
But the problem is I wanted to use multiple ssh shell on qemu.
Also I needed a pre-built rootfs image for qemu-arm, cortex-a9
versatilepb machine.
It should have networking and ssh built-in so that I can connect to it
using PUTTY client.
Note that I could able to build my own minimal busybox and boot qemu
using linux-next (non graphical mode).
But I could able to get only one shell.
I need to test some client/server problem, so I need multiple shell.
I am not able to configure net/ssh on this qemu system.

So, I have 2 things to ask:
1) If you have pointers on how to setup ssh/net connection on QEMU
with busybox, do let me know.
2) Let, please point me to a pre-built qemu-arm busy box image with
full features.


Thanks,
Pintu

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


Re: How to verify linux-next

2017-09-29 Thread Pintu Kumar
Hi,

I have a general question.
How do we normally verify linux-next tree?

I wanted to work on linux-next but I am facing some issues.
I could able to build linux-next for both x86 and arm, but I could not
verify it on any machine.
Currently I don't have a real Linux PC to boot with linux-next kernel.
So I am trying to find alternative ways, like using the virtual box or qemu-arm.
1) For Oracle virtual box 5.1.26 with ubuntu-32 bit, the linux-next
kernel is not booting.
2) For qemu-arm (versatilepb), I am able to build the kernel, but I
could not figure out which rootfs to use with it.
I tried creating minimal rootfs using busybox, but it does not contain
enough interface. I am not able to open multiple terminal and also
could not setup ssh to access it using PUTTY.

So, if you know of any better rootfs to use with qemu-arm please let me know.

Or, if you know of any better option to use linux-next please tell me.
It will be really helpful.


Thank You!
Regards,
Pintu

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