kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Not able to set smp_affinity for an IRQ on i.MX7
@ 2018-05-11 11:34 Pintu Kumar
       [not found] ` <5af57fea.1c69fb81.885f0.2377.GMRIR@mx.google.com>
  0 siblings, 1 reply; 17+ messages in thread
From: Pintu Kumar @ 2018-05-11 11:34 UTC (permalink / raw)
  To: kernelnewbies

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 at 10:~# echo 21 > /sys/class/gpio/export
root at 10:~# echo "rising" > /sys/class/gpio/gpio21/edge
root at 10:~# cat /proc/interrupts | grep 21
  47: 0 0 gpio-mxc 21 Edge gpiolib
root at 10:~# cat /sys/class/gpio/gpio21/direction
in
root at 10:~# cat /proc/irq/47/smp_affinity
3
root at 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.000000] genirq: irq_can_set_affinity (0): balance: 1, irq_data.chip:
a81b7e48, irq_set_affinity:   (null)
[    0.000000] 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 at 10:~# echo 2 > /proc/irq/295/smp_affinity
root at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180511/a55f3961/attachment.html>

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Sysfs requirement for running generic_buffer.c application - IIO sensors
@ 2015-03-23  5:27 s.rawat
       [not found] ` <001a114904d6cd775e0511edee6f@google.com>
  0 siblings, 1 reply; 17+ messages in thread
From: s.rawat @ 2015-03-23  5:27 UTC (permalink / raw)
  To: kernelnewbies

I have two system having different kernel version and drivers(IIO) on which
i can run the generic_buffer.c application .On one system it works fine but
on the other it does not give the input reports data.

I have checked that the system on which it is working has the following
sysfs under /sys/bus/iio/devices/iio:deviceX (where X is 1,2,3...)

buffer
dev
in_accel_hysteresis
in_accel_offset
in_accel_sampling_frequency
in_accel_scale
*in_accel_x_raw*

*in_accel_y_raw*
*in_accel_z_raw*
name
power
scan_elements
subsystem
trigger
uevent

This is for accelerometer similiarly for magnetometer
(in_magn_x_raw,_y_raw,z_raw etc) and for Gyrometer (
in_anglvel_x_raw,in_anglvel_y_raw,in_anglvel_z_raw )



and the one on which it is not working has the below sysfs under
/sys/bus/iio/devices/iio:deviceX (where X is 1,2,3...) :

buffer
dev
in_accel_hysteresis
in_accel_offset
in_accel_sampling_frequency
in_accel_scale
name
power
scan_elements
subsystem
trigger
uevent



Is the missing _x_raw,_y_raw and _z_raw component main reason for not
working of the app,.Where I can enable them in the driver?



Thanks and Rgds,
Saurabh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150323/d3d8beb2/attachment.html 

^ permalink raw reply	[flat|nested] 17+ messages in thread
[parent not found: <CAPDOMVhGTywBdA9W6cfE6bNb3CiM6Ei5rUi0OySO4dM3DbKX-w@mail.gmail.com>]

end of thread, other threads:[~2018-05-21 18:51 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-11 11:34 Not able to set smp_affinity for an IRQ on i.MX7 Pintu Kumar
     [not found] ` <5af57fea.1c69fb81.885f0.2377.GMRIR@mx.google.com>
2018-05-11 11:37   ` Delivery Status Notification (Failure) Pintu Kumar
     [not found]     ` <20180511123915.GC16141@n2100.armlinux.org.uk>
2018-05-11 13:04       ` Lucas Stach
2018-05-11 14:37         ` Pintu Kumar
2018-05-14 12:12           ` Pintu Kumar
2018-05-14 13:11             ` Lucas Stach
2018-05-14 14:28               ` Pintu Kumar
2018-05-17 13:28                 ` Pintu Kumar
2018-05-21 18:51                   ` Pintu Kumar
  -- strict thread matches above, loose matches on Subject: below --
2015-03-23  5:27 Sysfs requirement for running generic_buffer.c application - IIO sensors s.rawat
     [not found] ` <001a114904d6cd775e0511edee6f@google.com>
2015-03-23  5:44   ` Delivery Status Notification (Failure) s.rawat
     [not found] <CAPDOMVhGTywBdA9W6cfE6bNb3CiM6Ei5rUi0OySO4dM3DbKX-w@mail.gmail.com>
     [not found] ` <20cf307f30f822dc1504fffa98ec@google.com>
2014-08-06 19:07   ` Nick Krause
2014-08-06 19:29     ` Valdis.Kletnieks at vt.edu
2014-08-07  6:45       ` priyaranjan
2014-08-07 12:29         ` Pramod Gurav
2014-08-07 17:14           ` Nick Krause
2014-08-07 20:11             ` Valdis.Kletnieks at vt.edu
2014-08-07 20:33               ` Nick Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).