From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
	id S1753458AbbH0Pvh (ORCPT <rfc822;w@1wt.eu>);
	Thu, 27 Aug 2015 11:51:37 -0400
Received: from arroyo.ext.ti.com ([192.94.94.40]:47096 "EHLO arroyo.ext.ti.com"
	rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
	id S1752182AbbH0Pvg (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
	Thu, 27 Aug 2015 11:51:36 -0400
From: Murali Karicheri <m-karicheri2@ti.com>
To: <ssantosh@kernel.org>, <linux-kernel@vger.kernel.org>,
        <linux-arm-kernel@lists.infradead.org>
Subject: [PATCH] soc: ti: reset irq affinity before freeing irq
Date: Thu, 27 Aug 2015 11:51:11 -0400
Message-ID: <1440690671-1029-1-git-send-email-m-karicheri2@ti.com>
X-Mailer: git-send-email 1.9.1
MIME-Version: 1.0
Content-Type: text/plain
Sender: linux-kernel-owner@vger.kernel.org
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org

When using accumulator queue for rx side for network driver, following
warning is seen when doing a reboot command from Linux console. This
is because, affinity value is not reset before calling free_irq(). This
patch fixes this.

Deconfiguring network interfaces...
[   55.176589] ------------[ cut here ]-----------
[   55.181232] WARNING: CPU: 0 PID: 2081 at kernel/irq/manage.c:1370
__free_irq+0x208/0x214

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
---
 - Applies to v4.2.0-rc8

 drivers/soc/ti/knav_qmss_acc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/soc/ti/knav_qmss_acc.c b/drivers/soc/ti/knav_qmss_acc.c
index ef6f69d..b98fe56 100644
--- a/drivers/soc/ti/knav_qmss_acc.c
+++ b/drivers/soc/ti/knav_qmss_acc.c
@@ -261,6 +261,10 @@ static int knav_range_setup_acc_irq(struct knav_range_info *range,
 	if (old && !new) {
 		dev_dbg(kdev->dev, "setup-acc-irq: freeing %s for channel %s\n",
 			acc->name, acc->name);
+		ret = irq_set_affinity_hint(irq, NULL);
+		if (ret)
+			dev_warn(range->kdev->dev,
+				 "Failed to set IRQ affinity\n");
 		free_irq(irq, range);
 	}
 
-- 
1.9.1


From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
	id S1753369AbbH0Qkb (ORCPT <rfc822;w@1wt.eu>);
	Thu, 27 Aug 2015 12:40:31 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:49792 "EHLO
	userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
	with ESMTP id S1752771AbbH0QkO (ORCPT
	<rfc822;linux-kernel@vger.kernel.org>);
	Thu, 27 Aug 2015 12:40:14 -0400
Message-ID: <55DF3D55.8020705@oracle.com>
Date: Thu, 27 Aug 2015 09:39:49 -0700
From: "santosh.shilimkar@oracle.com" <santosh.shilimkar@oracle.com>
Organization: Oracle Corporation
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
MIME-Version: 1.0
To: Murali Karicheri <m-karicheri2@ti.com>, ssantosh@kernel.org,
        linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] soc: ti: reset irq affinity before freeing irq
References: <1440690671-1029-1-git-send-email-m-karicheri2@ti.com>
In-Reply-To: <1440690671-1029-1-git-send-email-m-karicheri2@ti.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Source-IP: userv0021.oracle.com [156.151.31.71]
Sender: linux-kernel-owner@vger.kernel.org
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org

On 8/27/15 8:51 AM, Murali Karicheri wrote:
> When using accumulator queue for rx side for network driver, following
> warning is seen when doing a reboot command from Linux console. This
> is because, affinity value is not reset before calling free_irq(). This
> patch fixes this.
>
> Deconfiguring network interfaces...
> [   55.176589] ------------[ cut here ]-----------
> [   55.181232] WARNING: CPU: 0 PID: 2081 at kernel/irq/manage.c:1370
> __free_irq+0x208/0x214
>
> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> ---

Looks good. I will add it my queue. Thanks !!

Regards,
Santosh

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
	id S1752123AbbH0QpF (ORCPT <rfc822;w@1wt.eu>);
	Thu, 27 Aug 2015 12:45:05 -0400
Received: from relay1.mentorg.com ([192.94.38.131]:61180 "EHLO
	relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
	with ESMTP id S1751186AbbH0QpE (ORCPT
	<rfc822;linux-kernel@vger.kernel.org>);
	Thu, 27 Aug 2015 12:45:04 -0400
Subject: Re: [PATCH] soc: ti: reset irq affinity before freeing irq
To: Murali Karicheri <m-karicheri2@ti.com>
References: <1440690671-1029-1-git-send-email-m-karicheri2@ti.com>
CC: <ssantosh@kernel.org>, <linux-kernel@vger.kernel.org>,
        <linux-arm-kernel@lists.infradead.org>
From: Nathan Lynch <Nathan_Lynch@mentor.com>
Message-ID: <55DF3E3F.6030506@mentor.com>
Date: Thu, 27 Aug 2015 11:43:43 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.1.0
MIME-Version: 1.0
In-Reply-To: <1440690671-1029-1-git-send-email-m-karicheri2@ti.com>
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: 7bit
Sender: linux-kernel-owner@vger.kernel.org
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org

On 08/27/2015 10:51 AM, Murali Karicheri wrote:
> When using accumulator queue for rx side for network driver, following
> warning is seen when doing a reboot command from Linux console. This
> is because, affinity value is not reset before calling free_irq(). This
> patch fixes this.
> 
> Deconfiguring network interfaces...
> [   55.176589] ------------[ cut here ]-----------
> [   55.181232] WARNING: CPU: 0 PID: 2081 at kernel/irq/manage.c:1370
> __free_irq+0x208/0x214

The full content of the warning should be included in the commit
message; __free_irq has several potential sources of warning messages,
and line 1370 doesn't correspond to any of them in 4.2-rc8.


> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> ---
>  - Applies to v4.2.0-rc8
> 
>  drivers/soc/ti/knav_qmss_acc.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/soc/ti/knav_qmss_acc.c b/drivers/soc/ti/knav_qmss_acc.c
> index ef6f69d..b98fe56 100644
> --- a/drivers/soc/ti/knav_qmss_acc.c
> +++ b/drivers/soc/ti/knav_qmss_acc.c
> @@ -261,6 +261,10 @@ static int knav_range_setup_acc_irq(struct knav_range_info *range,
>  	if (old && !new) {
>  		dev_dbg(kdev->dev, "setup-acc-irq: freeing %s for channel %s\n",
>  			acc->name, acc->name);
> +		ret = irq_set_affinity_hint(irq, NULL);
> +		if (ret)
> +			dev_warn(range->kdev->dev,
> +				 "Failed to set IRQ affinity\n");

Seems unnecessary to add a warning here.


From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
	id S1752737AbbH0SXe (ORCPT <rfc822;w@1wt.eu>);
	Thu, 27 Aug 2015 14:23:34 -0400
Received: from comal.ext.ti.com ([198.47.26.152]:40992 "EHLO comal.ext.ti.com"
	rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
	id S1751531AbbH0SXd (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
	Thu, 27 Aug 2015 14:23:33 -0400
Message-ID: <55DF5589.6050802@ti.com>
Date: Thu, 27 Aug 2015 14:23:05 -0400
From: Murali Karicheri <m-karicheri2@ti.com>
Organization: Texas Instruments
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version: 1.0
To: Nathan Lynch <Nathan_Lynch@mentor.com>
CC: <ssantosh@kernel.org>, <linux-kernel@vger.kernel.org>,
        <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] soc: ti: reset irq affinity before freeing irq
References: <1440690671-1029-1-git-send-email-m-karicheri2@ti.com> <55DF3E3F.6030506@mentor.com>
In-Reply-To: <55DF3E3F.6030506@mentor.com>
Content-Type: text/plain; charset="windows-1252"; format=flowed
Content-Transfer-Encoding: 7bit
Sender: linux-kernel-owner@vger.kernel.org
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org

On 08/27/2015 12:43 PM, Nathan Lynch wrote:
> On 08/27/2015 10:51 AM, Murali Karicheri wrote:
>> When using accumulator queue for rx side for network driver, following
>> warning is seen when doing a reboot command from Linux console. This
>> is because, affinity value is not reset before calling free_irq(). This
>> patch fixes this.
>>
>> Deconfiguring network interfaces...
>> [   55.176589] ------------[ cut here ]-----------
>> [   55.181232] WARNING: CPU: 0 PID: 2081 at kernel/irq/manage.c:1370
>> __free_irq+0x208/0x214
>
> The full content of the warning should be included in the commit
> message; __free_irq has several potential sources of warning messages,
> and line 1370 doesn't correspond to any of them in 4.2-rc8.

The log corresponds to 4.1.x kernel. Corresponding WARN_ONCE is

#ifdef CONFIG_SMP
         /* make sure affinity_hint is cleaned up */
         if (WARN_ON_ONCE(desc->affinity_hint))
                 desc->affinity_hint = NULL;
#endif

Which is line 1922. I can edit to make it 1922. Does that work?

Murali
>
>
>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>> ---
>>   - Applies to v4.2.0-rc8
>>
>>   drivers/soc/ti/knav_qmss_acc.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/soc/ti/knav_qmss_acc.c b/drivers/soc/ti/knav_qmss_acc.c
>> index ef6f69d..b98fe56 100644
>> --- a/drivers/soc/ti/knav_qmss_acc.c
>> +++ b/drivers/soc/ti/knav_qmss_acc.c
>> @@ -261,6 +261,10 @@ static int knav_range_setup_acc_irq(struct knav_range_info *range,
>>   	if (old && !new) {
>>   		dev_dbg(kdev->dev, "setup-acc-irq: freeing %s for channel %s\n",
>>   			acc->name, acc->name);
>> +		ret = irq_set_affinity_hint(irq, NULL);
>> +		if (ret)
>> +			dev_warn(range->kdev->dev,
>> +				 "Failed to set IRQ affinity\n");
>
> Seems unnecessary to add a warning here.
>
>


-- 
Murali Karicheri
Linux Kernel, Keystone

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
	id S1753593AbbH0SfZ (ORCPT <rfc822;w@1wt.eu>);
	Thu, 27 Aug 2015 14:35:25 -0400
Received: from relay1.mentorg.com ([192.94.38.131]:46551 "EHLO
	relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
	with ESMTP id S1752006AbbH0SfX (ORCPT
	<rfc822;linux-kernel@vger.kernel.org>);
	Thu, 27 Aug 2015 14:35:23 -0400
Subject: Re: [PATCH] soc: ti: reset irq affinity before freeing irq
To: Murali Karicheri <m-karicheri2@ti.com>
References: <1440690671-1029-1-git-send-email-m-karicheri2@ti.com>
 <55DF3E3F.6030506@mentor.com> <55DF5589.6050802@ti.com>
CC: <ssantosh@kernel.org>, <linux-kernel@vger.kernel.org>,
        <linux-arm-kernel@lists.infradead.org>
From: Nathan Lynch <Nathan_Lynch@mentor.com>
Message-ID: <55DF581A.2090300@mentor.com>
Date: Thu, 27 Aug 2015 13:34:02 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.1.0
MIME-Version: 1.0
In-Reply-To: <55DF5589.6050802@ti.com>
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: 7bit
Sender: linux-kernel-owner@vger.kernel.org
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org

On 08/27/2015 01:23 PM, Murali Karicheri wrote:
> On 08/27/2015 12:43 PM, Nathan Lynch wrote:
>> On 08/27/2015 10:51 AM, Murali Karicheri wrote:
>>> When using accumulator queue for rx side for network driver, following
>>> warning is seen when doing a reboot command from Linux console. This
>>> is because, affinity value is not reset before calling free_irq(). This
>>> patch fixes this.
>>>
>>> Deconfiguring network interfaces...
>>> [   55.176589] ------------[ cut here ]-----------
>>> [   55.181232] WARNING: CPU: 0 PID: 2081 at kernel/irq/manage.c:1370
>>> __free_irq+0x208/0x214
>>
>> The full content of the warning should be included in the commit
>> message; __free_irq has several potential sources of warning messages,
>> and line 1370 doesn't correspond to any of them in 4.2-rc8.
> 
> The log corresponds to 4.1.x kernel. Corresponding WARN_ONCE is
> 
> #ifdef CONFIG_SMP
>         /* make sure affinity_hint is cleaned up */
>         if (WARN_ON_ONCE(desc->affinity_hint))
>                 desc->affinity_hint = NULL;
> #endif
> 
> Which is line 1922. I can edit to make it 1922. Does that work?

Eh, I guess I wasn't thinking clearly about this clearly when I wrote
that.  (I somehow had the notion that WARN_ON... maybe printed more than
just the file and line number, but that is clearly mistaken.)  I think
your message is fine as is, sorry for the noise.

I don't think changing the line number will make it any easier on future
readers.


From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
	id S1753578AbbH0Sgm (ORCPT <rfc822;w@1wt.eu>);
	Thu, 27 Aug 2015 14:36:42 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:20313 "EHLO
	userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
	with ESMTP id S1751602AbbH0Sgl (ORCPT
	<rfc822;linux-kernel@vger.kernel.org>);
	Thu, 27 Aug 2015 14:36:41 -0400
Message-ID: <55DF58A0.8090105@oracle.com>
Date: Thu, 27 Aug 2015 11:36:16 -0700
From: "santosh.shilimkar@oracle.com" <santosh.shilimkar@oracle.com>
Organization: Oracle Corporation
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
MIME-Version: 1.0
To: Nathan Lynch <Nathan_Lynch@mentor.com>,
        Murali Karicheri <m-karicheri2@ti.com>
CC: ssantosh@kernel.org, linux-kernel@vger.kernel.org,
        linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] soc: ti: reset irq affinity before freeing irq
References: <1440690671-1029-1-git-send-email-m-karicheri2@ti.com> <55DF3E3F.6030506@mentor.com> <55DF5589.6050802@ti.com> <55DF581A.2090300@mentor.com>
In-Reply-To: <55DF581A.2090300@mentor.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Source-IP: userv0021.oracle.com [156.151.31.71]
Sender: linux-kernel-owner@vger.kernel.org
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org

On 8/27/15 11:34 AM, Nathan Lynch wrote:
> On 08/27/2015 01:23 PM, Murali Karicheri wrote:
>> On 08/27/2015 12:43 PM, Nathan Lynch wrote:
>>> On 08/27/2015 10:51 AM, Murali Karicheri wrote:
>>>> When using accumulator queue for rx side for network driver, following
>>>> warning is seen when doing a reboot command from Linux console. This
>>>> is because, affinity value is not reset before calling free_irq(). This
>>>> patch fixes this.
>>>>
>>>> Deconfiguring network interfaces...
>>>> [   55.176589] ------------[ cut here ]-----------
>>>> [   55.181232] WARNING: CPU: 0 PID: 2081 at kernel/irq/manage.c:1370
>>>> __free_irq+0x208/0x214
>>>
>>> The full content of the warning should be included in the commit
>>> message; __free_irq has several potential sources of warning messages,
>>> and line 1370 doesn't correspond to any of them in 4.2-rc8.
>>
>> The log corresponds to 4.1.x kernel. Corresponding WARN_ONCE is
>>
>> #ifdef CONFIG_SMP
>>          /* make sure affinity_hint is cleaned up */
>>          if (WARN_ON_ONCE(desc->affinity_hint))
>>                  desc->affinity_hint = NULL;
>> #endif
>>
>> Which is line 1922. I can edit to make it 1922. Does that work?
>
> Eh, I guess I wasn't thinking clearly about this clearly when I wrote
> that.  (I somehow had the notion that WARN_ON... maybe printed more than
> just the file and line number, but that is clearly mistaken.)  I think
> your message is fine as is, sorry for the noise.
>
> I don't think changing the line number will make it any easier on future
> readers.
>
Right. Just leave the full call in the commit so that the context
is captured.

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
	id S1752010AbbH0VoO (ORCPT <rfc822;w@1wt.eu>);
	Thu, 27 Aug 2015 17:44:14 -0400
Received: from devils.ext.ti.com ([198.47.26.153]:47242 "EHLO
	devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
	with ESMTP id S1751477AbbH0VoN (ORCPT
	<rfc822;linux-kernel@vger.kernel.org>);
	Thu, 27 Aug 2015 17:44:13 -0400
Message-ID: <55DF8493.7090307@ti.com>
Date: Thu, 27 Aug 2015 17:43:47 -0400
From: Murali Karicheri <m-karicheri2@ti.com>
Organization: Texas Instruments
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version: 1.0
To: "santosh.shilimkar@oracle.com" <santosh.shilimkar@oracle.com>,
        Nathan Lynch <Nathan_Lynch@mentor.com>
CC: <ssantosh@kernel.org>, <linux-kernel@vger.kernel.org>,
        <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] soc: ti: reset irq affinity before freeing irq
References: <1440690671-1029-1-git-send-email-m-karicheri2@ti.com> <55DF3E3F.6030506@mentor.com> <55DF5589.6050802@ti.com> <55DF581A.2090300@mentor.com> <55DF58A0.8090105@oracle.com>
In-Reply-To: <55DF58A0.8090105@oracle.com>
Content-Type: text/plain; charset="windows-1252"; format=flowed
Content-Transfer-Encoding: 7bit
Sender: linux-kernel-owner@vger.kernel.org
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org

On 08/27/2015 02:36 PM, santosh.shilimkar@oracle.com wrote:
> On 8/27/15 11:34 AM, Nathan Lynch wrote:
>> On 08/27/2015 01:23 PM, Murali Karicheri wrote:
>>> On 08/27/2015 12:43 PM, Nathan Lynch wrote:
>>>> On 08/27/2015 10:51 AM, Murali Karicheri wrote:
>>>>> When using accumulator queue for rx side for network driver, following
>>>>> warning is seen when doing a reboot command from Linux console. This
>>>>> is because, affinity value is not reset before calling free_irq().
>>>>> This
>>>>> patch fixes this.
>>>>>
>>>>> Deconfiguring network interfaces...
>>>>> [   55.176589] ------------[ cut here ]-----------
>>>>> [   55.181232] WARNING: CPU: 0 PID: 2081 at kernel/irq/manage.c:1370
>>>>> __free_irq+0x208/0x214
>>>>
>>>> The full content of the warning should be included in the commit
>>>> message; __free_irq has several potential sources of warning messages,
>>>> and line 1370 doesn't correspond to any of them in 4.2-rc8.
>>>
>>> The log corresponds to 4.1.x kernel. Corresponding WARN_ONCE is
>>>
>>> #ifdef CONFIG_SMP
>>>          /* make sure affinity_hint is cleaned up */
>>>          if (WARN_ON_ONCE(desc->affinity_hint))
>>>                  desc->affinity_hint = NULL;
>>> #endif
>>>
>>> Which is line 1922. I can edit to make it 1922. Does that work?
>>
>> Eh, I guess I wasn't thinking clearly about this clearly when I wrote
>> that.  (I somehow had the notion that WARN_ON... maybe printed more than
>> just the file and line number, but that is clearly mistaken.)  I think
>> your message is fine as is, sorry for the noise.
>>
>> I don't think changing the line number will make it any easier on future
>> readers.
>>
> Right. Just leave the full call in the commit so that the context
> is captured.
>
>
Will do that and resend it

-- 
Murali Karicheri
Linux Kernel, Keystone

