Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2400208imm; Mon, 24 Sep 2018 03:50:25 -0700 (PDT) X-Google-Smtp-Source: ACcGV61IHwTrcgBk9IZes8WJcTTurwqmTRCb6IS8IyjCpAODYpZ1UD+D8QGWjuO8g2Zj28mILyRI X-Received: by 2002:a65:6109:: with SMTP id z9-v6mr9116434pgu.243.1537786225743; Mon, 24 Sep 2018 03:50:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537786225; cv=none; d=google.com; s=arc-20160816; b=t28hh3RFyH/DJt/JqD4ZhBpWQAP6fRZQJCrCPNYLvmxP44CQe2+FFcN+LTIHXHvogM OmORXDT/dFWjPncUPRgL/Zaib81cQaG/JUSKV/iKUAmShgOuXEOw9R4v0jzoCAh0x0+w u3HweTHXdM+DfYyZHykoOxk5x9+7fTHsSsAXdBRBhLXZRG9h18Sf8G0UGn2XePrl0Anb Fkjaj5VtBNANVK0S4D6d0XxgEw/izgmZBva30RvWDA/weVTdSHaL1AAWQ1Zjulf/rw3P xEnvX4uk5IMbQlL/e8nVT6QP0WfsTnkpyCSi7lmN8+J+S9ED5tRToz0JRu97DB4Vk21k zT7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=WdOKsv41tl8vRhysnVWPi1noqjS+jhWpCIXx0hofswE=; b=nBaz/ROweV9ayheTZ3hIhOLIs6gJnC6ganFg0DlKLO0ipR7Ywwlp8fjD+xYZX+s4k3 E9WQWjWcjS1A7A4KttXm4T6szNje8LoUtX2RuKbEgP8Niohl0FvNia10tXuR9cOf1792 9R0LTAA8GRxNxfUz21L6FSoNF2y2mxhy/iRKzyEdOtpPzCfNAulLZPr8HGsxY02dvGcE pe/4ugpY/jOAKVEFKSCsXp5TZy7fIkwlIqvOPYSp60fYwVhio8otLyopME5yY0GHIuT1 X7W60MbXZeZ4iOOHaKqI4E+OGjGXuzAcfgoAhdav6GnsQDksEb+rrW5MGIASuzpEVL8Q N/9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3-v6si34947633pld.501.2018.09.24.03.50.10; Mon, 24 Sep 2018 03:50:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728347AbeIXQui (ORCPT + 99 others); Mon, 24 Sep 2018 12:50:38 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:60300 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbeIXQui (ORCPT ); Mon, 24 Sep 2018 12:50:38 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 96C7880D; Mon, 24 Sep 2018 03:49:10 -0700 (PDT) Received: from [10.4.13.92] (e112298-lin.Emea.Arm.com [10.4.13.92]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2AF063F5B3; Mon, 24 Sep 2018 03:49:09 -0700 (PDT) Subject: Re: [PATCH 01/10] irqchip/gic-v3-its: Change initialization ordering for LPIs To: Marc Zyngier , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Ard Biesheuvel , Jeremy Linton , Jeffrey Hugo , Thomas Gleixner , Jason Cooper References: <20180921195954.21574-1-marc.zyngier@arm.com> <20180921195954.21574-2-marc.zyngier@arm.com> From: Julien Thierry Message-ID: <45883a41-2fce-a6fe-dbe9-37f40eddec95@arm.com> Date: Mon, 24 Sep 2018 11:49:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180921195954.21574-2-marc.zyngier@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/09/18 20:59, Marc Zyngier wrote: > We currently initialize the LPIs (and the ITS) fairly early, even > before the SMP support and the CPU interface. This is a bit odd > (as LPIs are not exactly crutial for the early boot process), > and is going to cause issues when reorganizing the probing code. > > Let's move this initialization later. > Reviewed-by: Julien Thierry > Signed-off-by: Marc Zyngier > --- > drivers/irqchip/irq-gic-v3.c | 20 ++++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) > > diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c > index d5912f1ec884..6232f98ef81b 100644 > --- a/drivers/irqchip/irq-gic-v3.c > +++ b/drivers/irqchip/irq-gic-v3.c > @@ -653,7 +653,9 @@ early_param("irqchip.gicv3_nolpi", gicv3_nolpi_cfg); > > static int gic_dist_supports_lpis(void) > { > - return !!(readl_relaxed(gic_data.dist_base + GICD_TYPER) & GICD_TYPER_LPIS) && !gicv3_nolpi; > + return (IS_ENABLED(CONFIG_ARM_GIC_V3_ITS) && > + !!(readl_relaxed(gic_data.dist_base + GICD_TYPER) & GICD_TYPER_LPIS) && > + !gicv3_nolpi); > } > > static void gic_cpu_init(void) > @@ -673,10 +675,6 @@ static void gic_cpu_init(void) > > gic_cpu_config(rbase, gic_redist_wait_for_rwp); > > - /* Give LPIs a spin */ > - if (IS_ENABLED(CONFIG_ARM_GIC_V3_ITS) && gic_dist_supports_lpis()) > - its_cpu_init(); > - > /* initialise system registers */ > gic_cpu_sys_reg_init(); > } > @@ -689,6 +687,10 @@ static void gic_cpu_init(void) > static int gic_starting_cpu(unsigned int cpu) > { > gic_cpu_init(); > + > + if (gic_dist_supports_lpis()) > + its_cpu_init(); > + > return 0; > } > > @@ -1127,14 +1129,16 @@ static int __init gic_init_bases(void __iomem *dist_base, > > gic_update_vlpi_properties(); > > - if (IS_ENABLED(CONFIG_ARM_GIC_V3_ITS) && gic_dist_supports_lpis()) > - its_init(handle, &gic_data.rdists, gic_data.domain); > - > gic_smp_init(); > gic_dist_init(); > gic_cpu_init(); > gic_cpu_pm_init(); > > + if (gic_dist_supports_lpis()) { > + its_init(handle, &gic_data.rdists, gic_data.domain); > + its_cpu_init(); > + } > + > return 0; > > out_free: > -- Julien Thierry