From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FCBFC4360F for ; Thu, 21 Mar 2019 17:03:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D52302190A for ; Thu, 21 Mar 2019 17:03:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aWfz3xCW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D52302190A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8TEfpqJ8qp/sUn+D+B/CXDUQj2oOfO7Mv6oEU3dYV/E=; b=aWfz3xCWBp019C1gVdLBzmZVE p8VLwMH7pM54d60mJfYZR1+b4Ugh5nV3VwwfG/JQqBI+xA/ky1D5GBrb2ZliJGUlAFSTJexUUY/au X5KkFAF4zQudihmE1JnQ+bkn09tTHEcmarhrlRFR4IGAyOzJ8mWgtCZvf+1Ad6u/iQFin1QWIu/Rs j8M8DgCUChS16dtFEh96gBmVXOauLzGapsTL+d2XcSVi9o5qDhdlIF1oT8Lu9NnrTAjmF1HL3JPep XzbxEhhCw1k5rWnZ41S3+j4MUetuNINH4KjtpR+EW5LIfnv7Z5qrgKDskO48jR1sAoo233a8fhTKE Bo2t95B1g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h7165-00051J-Uc; Thu, 21 Mar 2019 17:03:17 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h7162-0004zo-PE for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2019 17:03:16 +0000 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 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-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190321_100314_823815_48D30BFC X-CRM114-Status: GOOD ( 16.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: julien.thierry@arm.com, marc.zyngier@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, christoffer.dall@arm.com, james.morse@arm.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel