<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760972#M118248</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pintu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;Current version of GPIO driver does not allow to set the GPIO IRQ affinity, even for GPIO Bank. It was not requested until now.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;Current driver does not implement irq_set_affinity, because the implementation does not take into consideration IRQ hierarchy in GPIO driver, so GPIO Interrupt Controller does not see its parent (GIC) in current GPIO driver.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt; min-height: 8pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;Theoretically, it is possible, because GPIO Interrupt Controller is cascaded to GIC, but it has to be implemented.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;This week, people in the applications team have tried to implement this feature, but it is not working for the moment, so &lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;this feature request&lt;/SPAN&gt; has been forwarded to development team. Depending on their roadmap and priorities, they will decide when to schedule it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;After this, applications team can back port it to Linux Kernel 4.1.15 GA from 4.9.11 GA.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;The internal Jira Feature Request Ticket is MLK-18468. If you want to know about the progress on this ticket you can submit a private Support Request Ticket at &lt;A href="http://www.nxp.com/support"&gt;www.nxp.com/support&lt;/A&gt;&amp;nbsp; and ask about it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;Carlos&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 May 2018 15:54:13 GMT</pubDate>
    <dc:creator>Carlos_Musich</dc:creator>
    <dc:date>2018-05-31T15:54:13Z</dc:date>
    <item>
      <title>[i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760954#M118230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I wanted to set IRQ affinity to some CPU for a particular GPIO interrupt.&lt;/P&gt;&lt;P&gt;Please let me know how can I do it.&lt;/P&gt;&lt;P&gt;I wanted to do it from my own kernel module.&lt;/P&gt;&lt;P&gt;First I tried to do it from sysfs, but it did not work.&lt;/P&gt;&lt;P&gt;I tried to use FUNC2 (GPIO138) for generating an interrupt.&lt;/P&gt;&lt;P&gt;# echo 138 &amp;gt; /sys/class/gpio/export&lt;/P&gt;&lt;P&gt;# echo "rising" &amp;gt; /sys/class/gpio/gpio138/edge&lt;/P&gt;&lt;P&gt;# root# cat /proc/interrupts | grep gpio&lt;BR /&gt;162: 0 0 gpio-mxc 0 Edge 30b40000.usdhc cd&lt;BR /&gt;172: 5 0 gpio-mxc 10 Edge usr_button_irq_handler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus GPIO 138 is mapped to IRQ 172&lt;/P&gt;&lt;P&gt;Now if I try to set affinity for 172, I get the error:&lt;/P&gt;&lt;P&gt;# root# echo 2 &amp;gt; /proc/irq/172/smp_affinity&lt;BR /&gt;-bash: echo: write error: Input/output error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this from both user space and kernel module, but its not working.&lt;/P&gt;&lt;P&gt;I also tried using "irq_set_affinity_hint(irq, cpumask) from kernel driver, but this also failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Recently I discovered that it is not possible to set IRQ affinity to GPIO interrupt because it is not tied to a particular GIC line.&lt;/P&gt;&lt;P&gt;Thus GPIO bank affinity needs to be changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I know that GPIO interrupt affinity cannot be changed for a particular GPIO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, still I am looking for a work around or hack in kernel by which this can be still possible.&lt;/P&gt;&lt;P&gt;This is required only for some debug purpose.&lt;/P&gt;&lt;P&gt;If you have ideas please share.&lt;/P&gt;&lt;P&gt;Also please share some hardware document about how GPIO banks are connected on i.MX7.&lt;/P&gt;&lt;P&gt;And how GPIO interrupts are processed and the relation with GIC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;P&gt;- How to change affinity for one of the GPIO Bank?&lt;/P&gt;&lt;P&gt;- Is it possible to disable CPU0 from my driver (for some time), until interrupt is served on another CPU?&lt;/P&gt;&lt;P&gt;- Is it possible to make CPU0 busy so that CPU1 can handle the GPIO interrupt?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pintu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 14:26:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760954#M118230</guid>
      <dc:creator>pintukumar</dc:creator>
      <dc:date>2018-05-16T14:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760955#M118231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PINTU,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please take a look to following posts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/303144"&gt;Interrupts with GPIO1 INT0-7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/301130"&gt;i.mx6 Linux CPU IRQ affinity&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/379939"&gt;https://community.nxp.com/thread/379939&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 16:26:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760955#M118231</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2018-05-16T16:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760956#M118232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the reference.&lt;/P&gt;&lt;P&gt;I looked into some of the discussions. Specially this thread:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/303144" target="test_blank"&gt;https://community.nxp.com/thread/303144&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From this discussion it seems, it is possible to set CPU affinity for GPIO&lt;/P&gt;&lt;P&gt;interrupt on IMX6 board.&lt;/P&gt;&lt;P&gt;Is this true for IMX7DL boards also ? Because I have only IMX7 board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I don't have lot of time to go through every thread and gather the&lt;/P&gt;&lt;P&gt;important point for my implementation.&lt;/P&gt;&lt;P&gt;I need to provide quick update to our customer, which will help them to&lt;/P&gt;&lt;P&gt;decide about which board to choose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you summarize all the post for me here, about what are the steps&lt;/P&gt;&lt;P&gt;required to set CPU affinity for a particular GPIO IRQ.&lt;/P&gt;&lt;P&gt;I think it will be a good reference for all others as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement on IMX7DL Sabre is as follows:&lt;/P&gt;&lt;P&gt;- I want to set CPU affinity for FUNC2 button, which is mapped to GPIO138,&lt;/P&gt;&lt;P&gt;that is: GPIO5_IO10 on IMX7 board.&lt;/P&gt;&lt;P&gt;  -&amp;gt; This is getting mapped to IRQ;172&lt;/P&gt;&lt;P&gt;  -&amp;gt; Is it possible to set affinity for this IRQ number: 172 ?&lt;/P&gt;&lt;P&gt;- Similarly, I want to set affinity for GPIO2_21 to CPU:2 . Is it possible ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For IRQ: 172, I am doing this from my driver, but it did not work.&lt;/P&gt;&lt;P&gt;#define IOMUXC_SW_MUX_CTL_PAD_SD2_WP 0x303301B0&lt;/P&gt;&lt;P&gt;#define IOMUXC_SW_PAD_CTL_PAD_SD2_WP 0x30330420&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static unsigned int gpiono = 138;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u32 * iomuxc_sdp2_wp_pad_ctrl = ioremap(IOMUXC_SW_PAD_CTL_PAD_SD2_WP,4);&lt;/P&gt;&lt;P&gt;u32 * iomuxc_sdp2_wp_mux_ctrl = ioremap(IOMUXC_SW_MUX_CTL_PAD_SD2_WP,4);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iowrite32(0x05,iomuxc_sdp2_wp_mux_ctrl);&lt;/P&gt;&lt;P&gt;iowrite32(0x7c,iomuxc_sdp2_wp_pad_ctrl);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gpio_request(gpiono, "usr-button-func2");&lt;/P&gt;&lt;P&gt;gpio_direction_input(gpiono);&lt;/P&gt;&lt;P&gt;gpio_set_debounce(gpiono, 200);&lt;/P&gt;&lt;P&gt;gpio_export(gpiono, false);&lt;/P&gt;&lt;P&gt;irqno = gpio_to_irq(gpiono);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ret = request_irq(irqno, (irq_handler_t) usr_button_irq_handler,&lt;/P&gt;&lt;P&gt;                        IRQF_TRIGGER_RISING, "usr_button_irq_handler",&lt;/P&gt;&lt;P&gt;NULL);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cpu=1;&lt;/P&gt;&lt;P&gt;irq_set_affinity_hint(irqno, get_cpu_mask(cpu));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried from user space, but did not work for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the output from dmesg:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2018 07:20:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760956#M118232</guid>
      <dc:creator>pintukumar</dc:creator>
      <dc:date>2018-05-17T07:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760957#M118233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;At first trial I am fine with setting CPU affinity to one of the GPIO Bank.&lt;/P&gt;&lt;P&gt;Can you guide me how to do it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pintu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2018 04:12:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760957#M118233</guid>
      <dc:creator>pintukumar</dc:creator>
      <dc:date>2018-05-18T04:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760958#M118234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you should do this:&lt;/P&gt;&lt;P&gt;echo CPU_NUMBER &amp;gt; /proc/irq/IRQ_NUMBER/smp_affinity&lt;/P&gt;&lt;P&gt;E.g.&lt;/P&gt;&lt;P&gt;echo 4 &amp;gt; /proc/irq/&lt;SPAN style="color: #e23d39;"&gt;99&lt;/SPAN&gt;/smp_affinity&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2018 17:33:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760958#M118234</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2018-05-18T17:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760959#M118235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using GPIO5_IO10 (GPIO number: 138), which is getting mapped to IRQ&lt;/P&gt;&lt;P&gt;number: 172.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, when I do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;echo 2 &amp;gt; /proc/irq/172/smp_affinity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It did not work for me.&lt;/P&gt;&lt;P&gt;Hope you have checked my previous post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;echo 4 &amp;gt; /proc/irq/99/smp_affinity&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;99 GPIO1 Combined interrupt indication for GPIO1 signals 16 - 31.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;By this you means to say, setting affinity to 99 will result into setting&lt;/P&gt;&lt;P&gt;affinity of GPIO1 -&amp;gt; IO(16-31) ?&lt;/P&gt;&lt;P&gt;Sorry I could not understand this. If there is any reference document&lt;/P&gt;&lt;P&gt;please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, can you explain, how GPIO138 could generate IRQ 172 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, now I wanted to change the affinity of entire GPIO bank from&lt;/P&gt;&lt;P&gt;drivers/gpio/gpio-mxc.c driver directly.&lt;/P&gt;&lt;P&gt;Here I found out that we can set affinity using: desc-&amp;gt;irq_data-&amp;gt;affinity&lt;/P&gt;&lt;P&gt;But I still could not figure out how and where to set it from gpio-mxc.c&lt;/P&gt;&lt;P&gt;driver.&lt;/P&gt;&lt;P&gt;Can you guide me on this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pintu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Fri, May 18, 2018 at 11:04 PM, Carlos_Musich &amp;lt;admin@community.nxp.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2018 18:19:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760959#M118235</guid>
      <dc:creator>pintukumar</dc:creator>
      <dc:date>2018-05-18T18:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760960#M118236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That should work, if it doesn't I will need to run some tests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will have time to build a new image on tuesday and run tests on wednesday.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2018 19:31:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760960#M118236</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2018-05-18T19:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760961#M118237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;echo 2 &amp;gt; /proc/irq/172/smp_affinity does not work for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;irq_set_affinity_hint(..) =&amp;gt; did not work for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain me IRQ 172 falls under which GPIO number which GPIO Bank&lt;/P&gt;&lt;P&gt;for i.MX7 with Kernel 4.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And how to find it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drivers/gpio/gpio-mxc.c  =&amp;gt; Is this the correct driver for GPIO anf GPIO&lt;/P&gt;&lt;P&gt;Bank setting ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I am interested in setting affinity to one of the GPIO Bank, may be&lt;/P&gt;&lt;P&gt;GPIO5_IO10 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am ok even for hard coding inside the driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain me how to do it from gpio-mxc.c driver code ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found out that IRQ affinity can be set my setting this variable:&lt;/P&gt;&lt;P&gt;desc-&amp;gt;irq_data.affinity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I could not figure out how to do it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In irq_set_chip_data(..), I tried doing the following, but board did not&lt;/P&gt;&lt;P&gt;boot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;new_affinity = get_cpu_mask(cpu);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cpumask_copy(desc-&amp;gt;irq_data.affinity, new_affinity);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know the right process for setting GPIO bank affinity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reply as this is becoming critical now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pintu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Sat, May 19, 2018 at 1:01 AM, Carlos_Musich &amp;lt;admin@community.nxp.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2018 13:56:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760961#M118237</guid>
      <dc:creator>pintukumar</dc:creator>
      <dc:date>2018-05-21T13:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760962#M118238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you at least reply here and tell me how to change affinity for the GPIO Bank itself ?&lt;/P&gt;&lt;P&gt;Is it possible to do here: kernel/irq/irqdesc.c =&amp;gt; desc_smp_init&lt;/P&gt;&lt;P&gt;{{{&lt;/P&gt;&lt;P&gt;cpumask_set_cpu(1, irq_default_affinity);&lt;BR /&gt; cpumask_copy(desc-&amp;gt;irq_data.affinity, irq_default_affinity);&lt;/P&gt;&lt;P&gt;}}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this but it did not work, since cpu=1 is still not online here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pintu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 10:19:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760962#M118238</guid>
      <dc:creator>pintukumar</dc:creator>
      <dc:date>2018-05-23T10:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760963#M118239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please reply to me query. Please do not close this ticket.&lt;/P&gt;&lt;P&gt;I need your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pintu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 19:21:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760963#M118239</guid>
      <dc:creator>pintukumar</dc:creator>
      <dc:date>2018-05-23T19:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760964#M118240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am very sorry I did not have a chance to run the tests today as I told you. But now I am building the image to run the tests and I will check it tomorrow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If am am not able to change the affinity of a GPIO bank I will need to make deeper investigation and ask the applications team whether this is possible or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2018 00:24:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760964#M118240</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2018-05-24T00:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760965#M118241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK Carlos, I will be eagerly waiting for your reply.&lt;/P&gt;&lt;P&gt;This is becoming worse now.&lt;/P&gt;&lt;P&gt;I have been told by the customer to find some way. It seems they need it badly.&lt;/P&gt;&lt;P&gt;I am even ok if I can hard code the default affinity to CPU 1.&lt;/P&gt;&lt;P&gt;Can you tell me how to change the cpumask value for&amp;nbsp;&lt;/P&gt;&lt;PRE class=""&gt;irq_default_affinity

Thanks,
Pintu&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2018 07:40:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760965#M118241</guid>
      <dc:creator>pintukumar</dc:creator>
      <dc:date>2018-05-24T07:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760966#M118242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pintu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran some tests today without success, I am now in touch with the i.MX applications team. I just wonder what do you mean when you say&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;echo 2 &amp;gt; /proc/irq/172/smp_affinity does not work for me.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;irq_set_affinity_hint(..) =&amp;gt; did not work for me.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is the problem or error you are getting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reagrds,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2018 23:12:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760966#M118242</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2018-05-24T23:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760967#M118243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your support. Please keep updating me about the test progress.&lt;/P&gt;&lt;P&gt;Regarding your query, I hope you are reading my full post from the beginning.&lt;/P&gt;&lt;P&gt;when I give:&lt;/P&gt;&lt;P&gt;echo 2 &amp;gt; /proc/irq/172/smp_affinity&lt;/P&gt;&lt;P&gt;bash: echo: write error: Input/output error&lt;/P&gt;&lt;P&gt;So, it says input/output error.&lt;/P&gt;&lt;P&gt;When I checked more, I found that this error is coming because there is no handler (irq_set_affinity) defined for GPIO interrupts.&lt;/P&gt;&lt;P&gt;So, its not possible to set affinity to individual GPIO.&lt;/P&gt;&lt;P&gt;When I discussed in the mainline linux kernel also they said the same.&lt;/P&gt;&lt;P&gt;But they told me that I can change the affinity for the entire GPIO bank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, please help me, how to set the affinity for the entire GPIO bank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pintu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 03:25:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760967#M118243</guid>
      <dc:creator>pintukumar</dc:creator>
      <dc:date>2018-05-25T03:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760968#M118244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Carlos,&lt;/P&gt;&lt;P&gt;Can you reply to my message. Its a quite long time now.&lt;/P&gt;&lt;P&gt;Could you happen to find the root cause about GPIO Bank affinity setting, for example GPIO5_IO10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pintu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 11:07:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760968#M118244</guid>
      <dc:creator>pintukumar</dc:creator>
      <dc:date>2018-05-29T11:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760969#M118245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pintu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have contacted the one person of the development team about this case and this is what they answered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;I have discussed with development team and current version of GPIO driver does not allow configuring the CPU affinity for GPIO interrupt.&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Could you obtain more details about customer's usecase? Why do they need to set the GPIO IRQs on other core than master core 0? Have they encountered issues having the GPIO IRQs on default core?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In your original post you stated that&lt;EM&gt; t&lt;/EM&gt;his is required only for some debug purpose. and you asked:&lt;/P&gt;&lt;P&gt;- Is it possible to disable CPU0 from my driver (for some time), until interrupt is served on another CPU?&lt;/P&gt;&lt;P&gt;- Is it possible to make CPU0 busy so that CPU1 can handle the GPIO interrupt?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you explain the usecase probably they can help to find a work around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 15:05:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760969#M118245</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2018-05-29T15:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760970#M118246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Carlos,&lt;/P&gt;&lt;P&gt;We are working on some features that requires one of the devices connected to GPIO to be processed only by non-master CPU (CPU 1).&lt;/P&gt;&lt;P&gt;So first we wanted to check if this method works for USR_BUTTON1 (FUNC2 button on i.MX7) which is mapped to GPIO5_IO10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I know that IRQ affinity cannot be set for individual GPIO interrupt.&lt;/P&gt;&lt;P&gt;So, I also know that IRQ affinity can be set to the entire GPIO Bank (in this case bank 5).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, could you ask your development team to find out how IRQ affinity can be set to GPIO Bank for i.MX7 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You!&lt;/P&gt;&lt;P&gt;Pintu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 16:29:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760970#M118246</guid>
      <dc:creator>pintukumar</dc:creator>
      <dc:date>2018-05-29T16:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760971#M118247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pintu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have forwarded your comments to development team.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could provide more detail an why is it required to have interrupts being executed by non-master CPU their comments may be more helpful, useful, and come faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2018 22:05:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760971#M118247</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2018-05-30T22:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760972#M118248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pintu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;Current version of GPIO driver does not allow to set the GPIO IRQ affinity, even for GPIO Bank. It was not requested until now.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;Current driver does not implement irq_set_affinity, because the implementation does not take into consideration IRQ hierarchy in GPIO driver, so GPIO Interrupt Controller does not see its parent (GIC) in current GPIO driver.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt; min-height: 8pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;Theoretically, it is possible, because GPIO Interrupt Controller is cascaded to GIC, but it has to be implemented.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;This week, people in the applications team have tried to implement this feature, but it is not working for the moment, so &lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;this feature request&lt;/SPAN&gt; has been forwarded to development team. Depending on their roadmap and priorities, they will decide when to schedule it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;After this, applications team can back port it to Linux Kernel 4.1.15 GA from 4.9.11 GA.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;The internal Jira Feature Request Ticket is MLK-18468. If you want to know about the progress on this ticket you can submit a private Support Request Ticket at &lt;A href="http://www.nxp.com/support"&gt;www.nxp.com/support&lt;/A&gt;&amp;nbsp; and ask about it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;Carlos&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 15:54:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760972#M118248</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2018-05-31T15:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: [i.MX7] IRQ affinity setting for GPIO interrupts</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760973#M118249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Firstly, imx gpio bank share one irq line, so it doesn't support hierarchy irq domain.&lt;/P&gt;&lt;P&gt;IRQ affinity depends on hierarchy irqchip, so it also doesn't support irq affinity for gpio subirq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, for your requirement,&amp;nbsp; you can bind one gpio band irq to one cpu core. So you can refer below code:&lt;/P&gt;&lt;P&gt;The refer code bind all gpio band to cpu 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;— a/drivers/gpio/gpio-mxc.c&lt;BR /&gt; +++ b/drivers/gpio/gpio-mxc.c&lt;BR /&gt; @@ -513,15 +513,19 @@ static int mxc_gpio_probe(struct platform_device *pdev)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * is more robust and easier.&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; irq_set_chained_handler(port-&amp;gt;irq, mx2_gpio_irq_handler);&lt;BR /&gt; +&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; irq_set_affinity_hint(port-&amp;gt;irq, cpumask_of(2));&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* setup one handler for each entry */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; irq_set_chained_handler_and_data(port-&amp;gt;irq,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mx3_gpio_irq_handler, port);&lt;BR /&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (port&lt;/SPAN&gt;&amp;gt;irq_high &amp;gt; 0)&lt;BR /&gt; +&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; irq_set_affinity_hint(port-&amp;gt;irq, cpumask_of(2));&lt;BR /&gt; +&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (port-&amp;gt;irq_high &amp;gt; 0) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* setup handler for GPIO 16 to 31 */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; irq_set_chained_handler_and_data(port-&amp;gt;irq_high,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mx3_gpio_irq_handler,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; port);&lt;BR /&gt; +&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; irq_set_affinity_hint(port-&amp;gt;irq_high, cpumask_of(2));&lt;BR /&gt; +&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2018 03:05:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX7-IRQ-affinity-setting-for-GPIO-interrupts/m-p/760973#M118249</guid>
      <dc:creator>DuanFugang</dc:creator>
      <dc:date>2018-06-15T03:05:36Z</dc:date>
    </item>
  </channel>
</rss>

