Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp447156ybi; Wed, 19 Jun 2019 02:13:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhNcwMxY80gARh1nd4owt53+murgeyeA3HKU7bjiobS3jXpwwKsrvO9oF/l5rZ8kYSCmeK X-Received: by 2002:a17:902:70cc:: with SMTP id l12mr2676167plt.87.1560935610652; Wed, 19 Jun 2019 02:13:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560935610; cv=none; d=google.com; s=arc-20160816; b=Fm7djKK7EZPqvQnPZJ4wFOiAQL53B4OmBuTc3byb3jVSh22HH07OiXKCSQlBvt0vAu 6PYalQj7v69oQ/Fctv8tW/PIx4d0di5ReLS110ZWDLnttRhe5N9fChIRRl44YnVgf0Qf 5eAmTH5uHFqr4yGKEnaf5PRTuhS95OArTk/7uPjWzSnR4DnASS+cQFxG9WbOsLAm7MME lhzifTjBSnRBmNAcIUY4u71fYVkwwQTpUqVGPMzDJpEkNmNL+ktdncOr8i3K+R3s3HtL PsUjaD5zba/TP4r3CG/O2jMxMXgD8lRxBWjT284mWm75uBGOP3qyuGd8xxsIpUp4Jjgr i/Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=1MZnUrfJlEEuBrlbvGNpd3yRXW8i/Pc9mtPkauUzSxg=; b=Q5ZSJ6d7G8iv9FmNeJlhaD1hTN1cDgCQgBCbTDM6jXMSeYowjgQ7zjaB4zLaF0QMX7 w8AxUSyKrAKAG/X3kj/3YG/+zu1sZ8WT7fmhdweBrVfY3uJqa+zAkXTsxB5JVL9iQULC R5CAg7S9XUME5EkfPqh9Ph7DPiaPjHj0TXxGZcOAjkezBdeCxFKqURFX3Hu2NYrlnaLM B+YbansipNftKtXAbWgg3Ou/PocZITd2tmHG7XqeQ9s7aVCjDp8y6hPNpNsy4p7NV6C0 w4UnR9Tzd1EvoeSlYs1SmD8rYFih2wya5zUXjKEaFBM9uH61ep6gQc7egwT6PiFVTmpX LUQw== 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 g190si2665300pgc.131.2019.06.19.02.13.06; Wed, 19 Jun 2019 02:13:30 -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 S1731442AbfFSJMZ (ORCPT + 99 others); Wed, 19 Jun 2019 05:12:25 -0400 Received: from foss.arm.com ([217.140.110.172]:57250 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730996AbfFSJMY (ORCPT ); Wed, 19 Jun 2019 05:12:24 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C1292344; Wed, 19 Jun 2019 02:12:23 -0700 (PDT) Received: from fuggles.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 523053F738; Wed, 19 Jun 2019 02:12:21 -0700 (PDT) Date: Wed, 19 Jun 2019 10:12:19 +0100 From: Will Deacon To: Julien Grall Cc: Guo Ren , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, aou@eecs.berkeley.edu, gary@garyguo.net, Atish.Patra@wdc.com, hch@infradead.org, paul.walmsley@sifive.com, rppt@linux.ibm.com, linux-riscv@lists.infradead.org, Anup Patel , Palmer Dabbelt , suzuki.poulose@arm.com, Marc Zyngier , catalin.marinas@arm.com, julien.thierry@arm.com, christoffer.dall@arm.com, james.morse@arm.com Subject: Re: [PATCH RFC 11/14] arm64: Move the ASID allocator code in a separate file Message-ID: <20190619091219.GB7767@fuggles.cambridge.arm.com> References: <20190321163623.20219-1-julien.grall@arm.com> <20190321163623.20219-12-julien.grall@arm.com> <0dfe120b-066a-2ac8-13bc-3f5a29e2caa3@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1+86 (6f28e57d73f2) () Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 19, 2019 at 09:54:21AM +0100, Julien Grall wrote: > On 6/19/19 9:07 AM, Guo Ren wrote: > > You forgot CCing C-SKY folks :P > > I wasn't aware you could be interested :). > > > Move arm asid allocator code in a generic one is a agood idea, I've > > made a patchset for C-SKY and test is on processing, See: > > https://lore.kernel.org/linux-csky/1560930553-26502-1-git-send-email-guoren@kernel.org/ > > > > If you plan to seperate it into generic one, I could co-work with you. > > Was the ASID allocator work out of box on C-Sky? If so, I can easily move > the code in a generic place (maybe lib/asid.c). This is one place where I'd actually prefer not to go down the route of making the code generic. Context-switching and low-level TLB management is deeply architecture-specific and I worry that by trying to make this code common, we run the real risk of introducing subtle bugs on some architecture every time it is changed. Furthermore, the algorithm we use on arm64 is designed to scale to large systems using DVM and may well be too complex and/or sub-optimal for architectures with different system topologies or TLB invalidation mechanisms. It's not a lot of code, so I don't see that it's a big deal to keep it under arch/arm64. Will