From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752926AbdEOKp6 (ORCPT ); Mon, 15 May 2017 06:45:58 -0400 Received: from foss.arm.com ([217.140.101.70]:50344 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751693AbdEOKpz (ORCPT ); Mon, 15 May 2017 06:45:55 -0400 Subject: Re: [patch 11/18] iommu/of: Adjust system_state check References: <20170514182716.347236777@linutronix.de> <20170514183613.331455858@linutronix.de> To: Thomas Gleixner , LKML Cc: Mark Rutland , Peter Zijlstra , Steven Rostedt , iommu@lists.linux-foundation.org, Ingo Molnar From: Robin Murphy Message-ID: <2f8410f3-fa70-d205-003b-168c0c229053@arm.com> Date: Mon, 15 May 2017 11:45:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170514183613.331455858@linutronix.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/05/17 19:27, Thomas Gleixner wrote: > To enable smp_processor_id() and might_sleep() debug checks earlier, it's > required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. > > Adjust the system_state check in of_iommu_driver_present() to handle the > extra states. FWIW, Acked-by: Robin Murphy > Signed-off-by: Thomas Gleixner > Cc: Joerg Roedel > Cc: iommu@lists.linux-foundation.org > --- > drivers/iommu/of_iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/iommu/of_iommu.c > +++ b/drivers/iommu/of_iommu.c > @@ -103,7 +103,7 @@ static bool of_iommu_driver_present(stru > * it never will be. We don't want to defer indefinitely, nor attempt > * to dereference __iommu_of_table after it's been freed. > */ > - if (system_state > SYSTEM_BOOTING) > + if (system_state >= SYSTEM_RUNNING) > return false; > > return of_match_node(&__iommu_of_table, np); > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Murphy Subject: Re: [patch 11/18] iommu/of: Adjust system_state check Date: Mon, 15 May 2017 11:45:51 +0100 Message-ID: <2f8410f3-fa70-d205-003b-168c0c229053@arm.com> References: <20170514182716.347236777@linutronix.de> <20170514183613.331455858@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170514183613.331455858-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Thomas Gleixner , LKML Cc: Mark Rutland , Peter Zijlstra , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Ingo Molnar , Steven Rostedt List-Id: iommu@lists.linux-foundation.org On 14/05/17 19:27, Thomas Gleixner wrote: > To enable smp_processor_id() and might_sleep() debug checks earlier, it's > required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. > > Adjust the system_state check in of_iommu_driver_present() to handle the > extra states. FWIW, Acked-by: Robin Murphy > Signed-off-by: Thomas Gleixner > Cc: Joerg Roedel > Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org > --- > drivers/iommu/of_iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/iommu/of_iommu.c > +++ b/drivers/iommu/of_iommu.c > @@ -103,7 +103,7 @@ static bool of_iommu_driver_present(stru > * it never will be. We don't want to defer indefinitely, nor attempt > * to dereference __iommu_of_table after it's been freed. > */ > - if (system_state > SYSTEM_BOOTING) > + if (system_state >= SYSTEM_RUNNING) > return false; > > return of_match_node(&__iommu_of_table, np); >