Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp659747ybi; Wed, 19 Jun 2019 05:53:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIsc/RNQFNb3Wwto8N+ensFdgmLOTAqSL2+PHvPD8gND24m9euGG54dLHql/9ghaGukruf X-Received: by 2002:a17:902:e306:: with SMTP id cg6mr86514425plb.341.1560948780283; Wed, 19 Jun 2019 05:53:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560948780; cv=none; d=google.com; s=arc-20160816; b=nwMPt+9kShqgrJYkQYUTYD9X4MYBFezrWDCI6jBDh3ye+LIFAPdj8wJj05mTkRC9Mo zrjC9SyvwSOeTe1nFxCM5KH8VGNnyeQlz3uKg9RYael44Jr0x5ne/eSmCKA6eRyRnJLO AFQmx/tTAq0UYTm9JgubhXnLvPTtAWHYyIQuSijli+J5inO9KpMscKLNdC6EfNFuHWJu LU1dNXAbchHDgbzcdSMiyCZgv77huj89djBOercLaiFKWDSyDO7XOucBXLO6NbWaUYrr UgKIZwMo+YKgZHFX3Qiz7heZEgE3l7pRqvaaDO+GMzifpTM8nPlKxvlBf63rLj63KPF5 GQEA== 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=DR2DSvqgt/6TftGTwLaU17ifp3mltEJ190Z++8hHAj0=; b=vNf39iE7IcNYtO+lbimWsCbtU/MRll54tfyXlBMKc6dL3kcT2ZLyv4c9Oq4lagBwRw E0Smh+b5j9X7dXxt8ERJZPrQduyHXnXRoPXvay+97qRt53D4y9UJMWZkDMGazCSrKLJp pobZzrdx09lMpyXUZTBWVFEQXvodehbyq6x8L2K/UCM+3KCX5X8G4KBOrFKeVEgt6ciN W4rG8BT1cfa78dlsDJdcWmmlgW/4w65qIEm2veRxdO7sMfrMr2GK6xxAn0GogKuOCA/5 NcEabiIFS8ngQnRuXRV3Tzeu/g0dkbpWWfhqnqDFVlqrhJCY5M2cj/M4qbIrXuYvYief aV9A== 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 a15si3003114pgw.246.2019.06.19.05.52.45; Wed, 19 Jun 2019 05:53:00 -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 S1731872AbfFSMwH (ORCPT + 99 others); Wed, 19 Jun 2019 08:52:07 -0400 Received: from foss.arm.com ([217.140.110.172]:38258 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731328AbfFSMwH (ORCPT ); Wed, 19 Jun 2019 08:52:07 -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 64E27360; Wed, 19 Jun 2019 05:52:06 -0700 (PDT) Received: from [10.1.196.50] (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0EDE23F738; Wed, 19 Jun 2019 05:52:03 -0700 (PDT) Subject: Re: [PATCH RFC 11/14] arm64: Move the ASID allocator code in a separate file To: Guo Ren Cc: 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, will.deacon@arm.com, christoffer.dall@arm.com, james.morse@arm.com References: <20190321163623.20219-1-julien.grall@arm.com> <20190321163623.20219-12-julien.grall@arm.com> <0dfe120b-066a-2ac8-13bc-3f5a29e2caa3@arm.com> From: Julien Grall Message-ID: Date: Wed, 19 Jun 2019 13:52:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: 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 Guo, On 19/06/2019 12:51, Guo Ren wrote: > On Wed, Jun 19, 2019 at 4:54 PM Julien Grall wrote: >> >> >> >> On 6/19/19 9:07 AM, Guo Ren wrote: >>> Hi Julien, >> >> Hi, >> >>> >>> 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? > Almost done, but one question: > arm64 remove the code in switch_mm: > cpumask_clear_cpu(cpu, mm_cpumask(prev)); > cpumask_set_cpu(cpu, mm_cpumask(next)); > > Why? Although arm64 cache operations could affect all harts with CTC > method of interconnect, I think we should > keep these code for primitive integrity in linux. Because cpu_bitmap > is in mm_struct instead of mm->context. I will let Will answer to this. [...] >> If so, I can easily move the code in a generic place (maybe lib/asid.c). > I think it's OK. Will emits concern to move the code in lib. So I will stick with what I currently have. Cheers, -- Julien Grall