Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp579947imm; Wed, 26 Sep 2018 03:40:24 -0700 (PDT) X-Google-Smtp-Source: ACcGV63e4a67BKnO340BZHCzzV2d+2G+/1vSKgBlTByAkvADJaZtdNLJA5eEXj1klZCxhJLA531B X-Received: by 2002:a17:902:a618:: with SMTP id u24-v6mr5492232plq.77.1537958423967; Wed, 26 Sep 2018 03:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537958423; cv=none; d=google.com; s=arc-20160816; b=PN5dFQKVCVfqJaDB4YV1Cp72Qi4U2XAlDMEGa6Qhc09434fcmg9mBmEonQVovAx0XL NVTKK2BBf+EN8XK/lnjM9RbAJle2LG4Gl+MQMkU2X6YRUjnxNRKq3FcOGb84Dyzd3v8K QThcQPOLStItsRuOapq3U+kNW5CeBUuoKR1PNrAhdLitIMEk4Bo8+wOsHhsk/tJxApmg u1rl8CGhPBYrccjkAP/0/oeyfCEe58gdXu9SgL6es8SIQvAHOsQmtp0XFH3XdOeV3yio N7SFo1+ImoRp1AepCsZHieLqch+JCrZhZWJozyTO1HUzpPGGkkN0vnHe1ygxjQSJLQM2 Om0A== 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:organization:from:references:cc:to:subject; bh=058dXAPgI+QxoPjzWP6bd3wyWtU54btohhgvdqLGwvA=; b=St9M5Zzz5AvFt2qEZYeV1WMrt8n+kyyDUegyuUUDlMjAhwXb6Nn9Nv+oYXENixgQ36 rd5Qd1yLWs/sttEs50D+q4hCMopGh9eGr6cg8UdSwCWMdC7heqgRCSMb+SN6eTBHqBnj gisRsJkqsK5Vldd05q38SlvqeIUKhsQdxdQUHwvomzECy24ZrE0pViIc4vDNuBdGvl4F rbBluejNTY+ujtfkBcm5RPuhRIFQkLHGj2KBkRiUteTEld8tj3bqqNJ6NHu8XJa5j1uq fj3aRpLuJ0LcmWZJHnX8sDNIm/ws9IcvjoAJ4YHR6LQCPOXOb3wm8TRtnHwoXyMj6pkf GezQ== 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 z2-v6si4946640plo.412.2018.09.26.03.40.08; Wed, 26 Sep 2018 03:40:23 -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 S1727638AbeIZQv0 (ORCPT + 99 others); Wed, 26 Sep 2018 12:51:26 -0400 Received: from foss.arm.com ([217.140.101.70]:42714 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726938AbeIZQv0 (ORCPT ); Wed, 26 Sep 2018 12:51:26 -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 C5DE4ED1; Wed, 26 Sep 2018 03:39:06 -0700 (PDT) Received: from [10.4.13.85] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 67A883F5BD; Wed, 26 Sep 2018 03:39:05 -0700 (PDT) Subject: Re: [PATCH 04/10] irqchip/gic-v3-its: Move pending table allocation to init time To: Julien Thierry , 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-5-marc.zyngier@arm.com> <7cdac0d7-a256-5e75-5a19-8eb0fb1cf6a5@arm.com> From: Marc Zyngier Organization: ARM Ltd Message-ID: <637c7af3-cce7-4e0b-e049-366ea4b17e25@arm.com> Date: Wed, 26 Sep 2018 11:39:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <7cdac0d7-a256-5e75-5a19-8eb0fb1cf6a5@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Julien, On 24/09/18 12:58, Julien Thierry wrote: > Hi Marc, > > On 21/09/18 20:59, Marc Zyngier wrote: >> Pending tables for the redistributors are currently allocated >> one at a time as each CPU boots. This is causing some grief >> for Linux/RT (allocation from within a CPU hotplug notifier is >> frown upon). >> >> Let's more this allocation to take place at init time, when we >> only have a single CPU. It means we're allocating memory for CPUs >> that are not online yet, but most system will boot all of their >> CPUs anyway, so that's not completely wasted. >> >> Signed-off-by: Marc Zyngier >> --- >> drivers/irqchip/irq-gic-v3-its.c | 80 +++++++++++++++++++----------- >> include/linux/irqchip/arm-gic-v3.h | 1 + >> 2 files changed, 53 insertions(+), 28 deletions(-) >> >> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c >> index 7ef6baea2d78..462bba422189 100644 >> --- a/drivers/irqchip/irq-gic-v3-its.c >> +++ b/drivers/irqchip/irq-gic-v3-its.c >> @@ -173,6 +173,7 @@ static DEFINE_RAW_SPINLOCK(vmovp_lock); >> static DEFINE_IDA(its_vpeid_ida); >> >> #define gic_data_rdist() (raw_cpu_ptr(gic_rdists->rdist)) >> +#define gic_data_rdist_cpu(cpu) (per_cpu_ptr(gic_rdists->rdist, cpu)) >> #define gic_data_rdist_rd_base() (gic_data_rdist()->rd_base) >> #define gic_data_rdist_vlpi_base() (gic_data_rdist_rd_base() + SZ_128K) >> >> @@ -1625,7 +1626,7 @@ static void its_free_prop_table(struct page *prop_page) >> get_order(LPI_PROPBASE_SZ)); >> } >> >> -static int __init its_alloc_lpi_tables(void) >> +static int __init its_alloc_lpi_prop_table(void) > > A bit of a nit, but there is already a function called > "its_allocate_prop_table" which I find very easy to confuse with this one. > > And patch 3 factored the initialization out of its_allocate_prop_table. > So I was wondering whether it would not actually be better to open-code > it here and get rid of that function. Otherwise I'd suggest having more > distinct names. its_allocate_prop_table is also used by the VLPI code to allocate guest property tables, so I'd rather not open-code it. How about renaming this function to its_setup_lpi_prop_table? Thanks, M. -- Jazz is not dead. It just smells funny...