Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp842551img; Thu, 21 Mar 2019 10:04:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaB9sPCUn0q3ezBNAChSM7PPDCfPbCWR/Ia1lgN7odQTipnV1vjfPqO4J/SR3ZQjMrCBHE X-Received: by 2002:a62:29c6:: with SMTP id p189mr4465770pfp.194.1553187868133; Thu, 21 Mar 2019 10:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553187868; cv=none; d=google.com; s=arc-20160816; b=vwexD/Cbumc82M7TPPVbBMcylyepa/kTuZ9hRxxQ969s8GM5tgse/INROa8sVMuGEC EX8ECtDdkiSZh1JTF5ADqw0Et7Bj2z/j6cZSgvLGkfZ4XqpzqSVNtdPb4JSq+zXjqFC+ AAp1iDz3cwZaTH+DuG8u1gvFYa5Fa5lnSMlcAKC5vnbfyj3K+hssKa5Z4OnOtMQxTYo8 sE6eR0w94OEMOFszzXwmOlfIotoH9jiubBpAqBoTIaksyxf7pxOzs98rIBPt3GafeGSv olTTmgVWTx66Ih5xlmYSzWtt6hmGS4yklo5qGGRMPp8DrWzNSAYrVUlMftmrxyak27x2 xh2A== 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=210uZ5G9yc/Zp/0YXhIrnQhvDjuF2bGY+bwXKOMs/bk=; b=DCXQR/w2jdCxAbPEJk+xecvJSh/4WM2ADWZWPAhKRLx35lQ+XGX2h5qbNpd6k/jUZf r9EENb/ddRtl8+xMdu9Gj+DxHe5lVcrXg0G+8H3zI0tjR/kiBzcG1oyYY1pPGmBh6N9d +TCAMnvDrdtSKGu1jJv+9hla8mgCG8MdxoPvfOVMlBDfatrOhha/LK8WzU46MK9Bf8PB /NFTJQi/sRIzzAtBTsO30MzKQt3xuZjXW7YCwJxpz+vZkCEI7PXxIzxKUwB7jHPh7jLT tdE/Rvl5zN4qgbSo0ukes91/9BVi0F45YSc2lsFDwVlaafHT5ptHwT4wb0U0jVT66zMX jPNA== 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 z18si4550408pgf.66.2019.03.21.10.04.08; Thu, 21 Mar 2019 10:04:28 -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 S1728580AbfCURDM (ORCPT + 99 others); Thu, 21 Mar 2019 13:03:12 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:60146 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbfCURDM (ORCPT ); Thu, 21 Mar 2019 13:03:12 -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 45C10374; Thu, 21 Mar 2019 10:03:12 -0700 (PDT) Received: from [10.1.196.93] (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E8FE13F614; Thu, 21 Mar 2019 10:03:09 -0700 (PDT) Subject: Re: [PATCH RFC 01/14] arm64/mm: Introduce asid_info structure and move asid_generation/asid_map to it To: julien.grall@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: christoffer.dall@arm.com, james.morse@arm.com, marc.zyngier@arm.com, julien.thierry@arm.com, catalin.marinas@arm.com, will.deacon@arm.com References: <20190321163623.20219-1-julien.grall@arm.com> <20190321163623.20219-2-julien.grall@arm.com> From: Suzuki K Poulose Message-ID: Date: Thu, 21 Mar 2019 17:03:08 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190321163623.20219-2-julien.grall@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 Hi Julien, On 21/03/2019 16:36, Julien Grall wrote: > In an attempt to make the ASID allocator generic, create a new structure > asid_info to store all the information necessary for the allocator. > > For now, move the variables asid_generation and asid_map to the new structure > asid_info. Follow-up patches will move more variables. > > Note to avoid more renaming aftwards, a local variable 'info' has been > created and is a pointer to the ASID allocator structure. > > Signed-off-by: Julien Grall > --- > arch/arm64/mm/context.c | 46 ++++++++++++++++++++++++++-------------------- > 1 file changed, 26 insertions(+), 20 deletions(-) > > diff --git a/arch/arm64/mm/context.c b/arch/arm64/mm/context.c > index 1f0ea2facf24..34db54f1a39a 100644 > --- a/arch/arm64/mm/context.c > +++ b/arch/arm64/mm/context.c > @@ -30,8 +30,11 @@ > static u32 asid_bits; > static DEFINE_RAW_SPINLOCK(cpu_asid_lock); > > -static atomic64_t asid_generation; > -static unsigned long *asid_map; > +struct asid_info > +{ > + atomic64_t generation; > + unsigned long *map; > +} asid_info; Shouldn't this be static ? Rest looks fine. Cheers Suzuki