Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp596832ybi; Wed, 19 Jun 2019 04:52:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJFfVbYPCiwtKr7ZjZSo+icpN8GXQ6zhtCezC7AJOHVgOmQSXtPUgsIp44p4zt8B+pPG3A X-Received: by 2002:a17:902:7249:: with SMTP id c9mr12963681pll.25.1560945123491; Wed, 19 Jun 2019 04:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560945123; cv=none; d=google.com; s=arc-20160816; b=jF+SHNkPvBi6RKSNMON+xiwh50d9vLblIyp/JWgqSFxh9QHYF8YZ0x6L+a/siIkX8b eKxtsChiFOeZ2ZUxiO3aUqW/sWntPdCRu303kcskll+VbTy54cXLnna8xEmmul2zca26 VV/ZeV1CdHmBARxYlT26V+HR5IclqO3YFs7I6xLqnZqh5Ct13SzHnzjHJITxyDQAbJSU 9F8vfDTEXdHKYDgx255YsulaYX5o342v1BZWGLU/iZXFpRqskKlP/jII/WN4tIVi8ma8 HqQyHOmPxgifi6MQonC3++UDnaIsuqO7NRjrkNOs7Yb4Pvqg1MgoT9L1PjCA1MuEUpJ3 WDUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=5Ws838fBjHw3ZMjRO8gVYSelsBfIeBxXlBWhgm6ap0k=; b=xsiuEGVL8ol67aLWjCqcPNOE6EF/hvXd3AWUXSkHSL3h2pWTjwNT2OwbmxPOlUHk26 R236m3kctwos+zX+YkkedypKBRMshMvnQA/cnFIFv5WTlTDpVtcCSz18rcVj40+VxpDC CN13EGMcdiEkMDaQ4e0jZYkCLPVW0gC+OQowSZn32F4VVYiGH+8gn6D9moVFPMqMw11q MB4nUpDYFSMyEoEiPqQnSiGj1E2KwN3Vu21Aaz6nysVV3e+N++mZ1ORbkWEuk0+u3mv6 CYRfhaWIQGf6DxcOSC9xWA4SEZPNNyWK9x/7VHgSJDaMtaVVwwtUMs0MRAqP1FKxsS8t dL/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EmwB9jSn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f32si1216038pje.70.2019.06.19.04.51.47; Wed, 19 Jun 2019 04:52:03 -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; dkim=pass header.i=@kernel.org header.s=default header.b=EmwB9jSn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731587AbfFSLvR (ORCPT + 99 others); Wed, 19 Jun 2019 07:51:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:39910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727244AbfFSLvR (ORCPT ); Wed, 19 Jun 2019 07:51:17 -0400 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 14FB321530 for ; Wed, 19 Jun 2019 11:51:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560945076; bh=I9GUMrpXQQ4kP+XRlQm8nsuNTpCDLDeTZGuUV6StNpU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=EmwB9jSneP5zvx+aO02e5ajh7HUMAmZwr7xBYZDziZHiVUbMqpfSn8oGPrp0ASWB1 sAvfxTB1iTWoia0261g0Sybv0xAczcIdmA2GuWCcWniP/g8jQtbG7aTs0gHCmOwBgQ YLpwwQIAR7bV4++qpk+nQNV5GnVE/J+aFsVTa1nU= Received: by mail-wr1-f51.google.com with SMTP id x4so3045813wrt.6 for ; Wed, 19 Jun 2019 04:51:16 -0700 (PDT) X-Gm-Message-State: APjAAAVJ0hwn89+QR4Mlkk56KObNLgFngH3SDlMI/XxiXNN1Df1c1+qY j+aF9muHcImhfXvIb9fcDthx2wRmuhSOQJjFye4= X-Received: by 2002:adf:f28a:: with SMTP id k10mr4144332wro.343.1560945074589; Wed, 19 Jun 2019 04:51:14 -0700 (PDT) MIME-Version: 1.0 References: <20190321163623.20219-1-julien.grall@arm.com> <20190321163623.20219-12-julien.grall@arm.com> <0dfe120b-066a-2ac8-13bc-3f5a29e2caa3@arm.com> In-Reply-To: From: Guo Ren Date: Wed, 19 Jun 2019 19:51:03 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC 11/14] arm64: Move the ASID allocator code in a separate file To: Julien Grall 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 Content-Type: text/plain; charset="UTF-8" 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 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. In current csky's patches I've also removed the codes the same as arm64, but I'll add it back at next version. > If so, I can easily move the code in a generic place (maybe lib/asid.c). I think it's OK. Best Regards Guo Ren