Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1651396yba; Thu, 25 Apr 2019 03:31:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXsioL8H2tU68tEHOTNXR1YKgMKocfE6yQG7J0cRUSnKI5N98EBxTms2N+FMliGjGuUY2j X-Received: by 2002:a62:ee09:: with SMTP id e9mr3225511pfi.247.1556188279353; Thu, 25 Apr 2019 03:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556188279; cv=none; d=google.com; s=arc-20160816; b=rVHGWdDgPATisjNQOGY9C+x/Zn2CN7xFvu77xGeXv2g5x95hewlf89R64KgCzBojUq 3f2WmkHL2SiiWWQJTHkqcBoKe99yBx0PHfrg0pN2BwMnKdXKKXCACYCssJwFxI91EpU8 VakEKMugL33bZQtkYMLILCh2lsJXJmrBvDwLp9tkIWxTfJBhX2nGA0ihmGYAJBko9sjd TF2p6WPUHMzC66fr3xvDkr92ubUCgM03Xjhkk4hNuM3hvKsgCaSY/tW1c98weqyb/0Ji YxYwDj2shh0DKQsF7wmcDNYry+VqCE2gZDQCZG9aFdiJQC3uDj505K6oZmW8N2hBN+6Q YJMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=9MoWDfMJQT39/z5/9DTd0lMgKNr2SZhlGu3mMr5QbvQ=; b=h3x8Xj4l/bUAzXblHYH3nhMAWD3dMFA0/9JLUiwcbUCHrQM2OdZ/Dsh/60AuZuEH7o gYrkVf0zsQw8+hrq/AaG0t3FLmlmip8B/krxOxKp69nd6ItQz4pL08RvIS8LZkwKKC20 4BFHTw1gpbWLNjtWXqrHfrqk93np8Tgd9UUZMq/W6//j0FW6clfhzxXQfPwclj4dwYpe pd6TwC6xfAXKCQj6t7pZSbDHmfxtXQ+NwVNZ3tADXEFmfWAm5j0YpqeWCO9/pBxrFX56 eDcu2Pvc4M1e5M9W4OB7QumAUQk1lR90DyyJIqEbEgZr3YSmYPys/DRl8olv1yJHSafl iA4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@garyguo.net header.s=selector1 header.b=BgaKXOWR; 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 h11si19480006pgp.391.2019.04.25.03.31.03; Thu, 25 Apr 2019 03:31:19 -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=@garyguo.net header.s=selector1 header.b=BgaKXOWR; 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 S2388422AbfDYCtR (ORCPT + 99 others); Wed, 24 Apr 2019 22:49:17 -0400 Received: from mail-eopbgr100105.outbound.protection.outlook.com ([40.107.10.105]:17282 "EHLO GBR01-LO2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728668AbfDYCtQ (ORCPT ); Wed, 24 Apr 2019 22:49:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=garyguo.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9MoWDfMJQT39/z5/9DTd0lMgKNr2SZhlGu3mMr5QbvQ=; b=BgaKXOWRqw+3yN6P7mwg7oyt9PLniI8vQzVorFjpg8eku1GIVyXR5VNwrwpxNBfMFBuYgqOeFxVTBglXZVH6fXYEREcbDwa/CAdq3PC4k19ON1l39B5o9vIae6ky2Yjm2uv77rm4CjnrHaNLrr34aDB69D8OJpQBF6zBEfxS/7A= Received: from LO2P265MB0847.GBRP265.PROD.OUTLOOK.COM (20.176.139.20) by LO2P265MB1342.GBRP265.PROD.OUTLOOK.COM (20.176.139.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.14; Thu, 25 Apr 2019 02:49:07 +0000 Received: from LO2P265MB0847.GBRP265.PROD.OUTLOOK.COM ([fe80::d5c0:cf6f:4b60:ae19]) by LO2P265MB0847.GBRP265.PROD.OUTLOOK.COM ([fe80::d5c0:cf6f:4b60:ae19%4]) with mapi id 15.20.1813.017; Thu, 25 Apr 2019 02:49:07 +0000 From: Gary Guo To: Anup Patel , Palmer Dabbelt CC: Anup Patel , Albert Ou , Atish Patra , Christoph Hellwig , Paul Walmsley , Mike Rapoport , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org List" Subject: RE: [PATCH v3] RISC-V: Implement ASID allocator Thread-Topic: [PATCH v3] RISC-V: Implement ASID allocator Thread-Index: AQHU5esYcKUYlrhYQE6qB9Kl4zyh4aZMITKAgAApZoCAAAug8A== Date: Thu, 25 Apr 2019 02:49:07 +0000 Message-ID: References: <20190329045111.14040-1-anup.patel@wdc.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=gary@garyguo.net; x-originating-ip: [2001:470:6972:501:9969:e8d2:6919:7874] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3ed255b2-8023-4eed-4073-08d6c928966c x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600141)(711020)(4605104)(2017052603328)(7193020);SRVR:LO2P265MB1342; x-ms-traffictypediagnostic: LO2P265MB1342: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-forefront-prvs: 0018A2705B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(376002)(396003)(346002)(366004)(39830400003)(55674003)(189003)(199004)(13464003)(97736004)(81166006)(6506007)(316002)(102836004)(53546011)(53936002)(6436002)(5660300002)(53946003)(6306002)(966005)(73956011)(68736007)(76116006)(508600001)(476003)(81156014)(66476007)(7736002)(110136005)(7416002)(99286004)(54906003)(66446008)(64756008)(66556008)(66946007)(9686003)(446003)(55016002)(7696005)(11346002)(86362001)(4326008)(2906002)(33656002)(25786009)(6116002)(71200400001)(305945005)(52536014)(46003)(76176011)(8676002)(14444005)(256004)(229853002)(6246003)(14454004)(8936002)(186003)(30864003)(486006)(74316002)(71190400001)(579004);DIR:OUT;SFP:1102;SCL:1;SRVR:LO2P265MB1342;H:LO2P265MB0847.GBRP265.PROD.OUTLOOK.COM;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: garyguo.net does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: LfhYx+3rKO/MR4soBf4LuMf4bAPSOzJZFPL4y2Sq5lCk/JwYYaJYuSUiPxoQjVDhV7TFu2pqRmbMYp/71P5la6BbcEBmOkdFASzDyo4gCbZmpodD19OOqxPYDjKYeNw4yR+CitFMsUXC1lumPdEC0PkcIjzfZDpDqc1HYKPLSEDom+erkwBTGQp4hJ5rnye66u04oaze8WB1cqGQONARi5lFHqLg4EoeAryheTPvb5NRP28zTiG7EPi5NbBE3kKnfVgSbZjtc+AdlsRiwMFnmBKOSimcr009l0hkJsIFji93qpdZwUmc8ensxKbgrkemEflx3eHsjljNS/3BGk23HoWB3dBu8+WT/YgtGCoYR1A+e93bAnOpGNnfMdb30Aw+4F7+FE/d/Ey9dud3RSOZbzD6lJ+4I3pQj7xCd41dXQk= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: garyguo.net X-MS-Exchange-CrossTenant-Network-Message-Id: 3ed255b2-8023-4eed-4073-08d6c928966c X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2019 02:49:07.8254 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: bbc898ad-b10f-4e10-8552-d9377b823d45 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO2P265MB1342 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VGhpcyBwYXRjaCBhYnNvbHV0ZWx5IGRvZXMgbm90IHdvcmsgd2l0aCBhIGhhcmR3YXJlIHRoYXQg aW1wbGVtZW50cyBBU0lEIGZlYXR1cmUuIEFzaWRlIGZyb20gbWFueSBjb3JuZXIgY2FzZXMsIGl0 IGRvZXMgbm90IGV2ZW4gYm9vdCBvbiBhIGhhcmR3YXJlIHdpdGggQVNJRCBpbXBsZW1lbnRlZC4g SXQgb25seSB3b3JrcyBiZWNhdXNlIFFFTVUgZG9lcyBub3QgdXNlIEFTSUQgYXQgYWxsLiBJIGhh dmUgYWxyZWFkeSBwb2ludGVkIG91dCBtYW55IGlzc3VlcyBtdWx0aXBsZSB0aW1lcyBpbiB0aGUg dGhyZWFkIGJ1dCBtb3N0IG9mIHRoZW0gYXJlIG5vdCBhZGRyZXNzZWQuDQogDQo+IC0tLS0tT3Jp Z2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IEFudXAgUGF0ZWwgPGFudXBAYnJhaW5mYXVsdC5v cmc+DQo+IFNlbnQ6IFRodXJzZGF5LCBBcHJpbCAyNSwgMjAxOSAwMzowNA0KPiBUbzogUGFsbWVy IERhYmJlbHQgPHBhbG1lckBzaWZpdmUuY29tPg0KPiBDYzogQW51cCBQYXRlbCA8QW51cC5QYXRl bEB3ZGMuY29tPjsgQWxiZ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dW5z aWduZWQgbG9uZyBhc2lkLCB2ZXIgPSBhdG9taWNfbG9uZ19yZWFkKCZjdXJyZW50X3ZlcnNpb24p Ow0KPiA+ID4gKw0KPiA+ID4gKyAgICAgaWYgKGNudHggIT0gMCkgew0KPiA+ID4gKyAgICAgICAg ICAgICB1bnNpZ25lZCBsb25nIG5ld2NudHggPSB2ZXIgfCAoY250eCAmIGFzaWRfbWFzayk7DQo+ ID4gPiArDQo+ID4gPiArICAgICAgICAgICAgIC8qDQo+ID4gPiArICAgICAgICAgICAgICAqIElm IG91ciBjdXJyZW50IENPTlRFWFQgd2FzIGFjdGl2ZSBkdXJpbmcgYSByb2xsb3Zlciwgd2UNCj4g PiA+ICsgICAgICAgICAgICAgICogY2FuIGNvbnRpbnVlIHRvIHVzZSBpdCBhbmQgdGhpcyB3YXMg anVzdCBhIGZhbHNlIGFsYXJtLg0KPiA+ID4gKyAgICAgICAgICAgICAgKi8NCj4gPiA+ICsgICAg ICAgICAgICAgaWYgKGNoZWNrX3VwZGF0ZV9yZXNlcnZlZF9jb250ZXh0KGNudHgsIG5ld2NudHgp KQ0KPiA+ID4gKyAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXdjbnR4Ow0KPiA+ID4gKw0K PiA+ID4gKyAgICAgICAgICAgICAvKg0KPiA+ID4gKyAgICAgICAgICAgICAgKiBXZSBoYWQgYSB2 YWxpZCBDT05URVhUIGluIGEgcHJldmlvdXMgbGlmZSwgc28gdHJ5IHRvDQo+ID4gPiArICAgICAg ICAgICAgICAqIHJlLXVzZSBpdCBpZiBwb3NzaWJsZS4NCj4gPiA+ICsgICAgICAgICAgICAgICov DQo+ID4gPiArICAgICAgICAgICAgIGlmICghX190ZXN0X2FuZF9zZXRfYml0KGNudHggJiBhc2lk X21hc2ssIGNvbnRleHRfYXNpZF9tYXApKQ0KPiA+ID4gKyAgICAgICAgICAgICAgICAgICAgIHJl dHVybiBuZXdjbnR4Ow0KPiA+ID4gKyAgICAgfQ0KPiA+ID4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+ID4gPiArICAgICAvKiBTZXR1cCBBU0lEIGFsbG9jYXRvciBpZiBh dmFpbGFibGUgKi8NCj4gPiA+ICsgICAgIGlmICh1c2VfYXNpZF9hbGxvY2F0b3IpIHsNCj4gPiA+ ICsgICAgICAgICAgICAgYXRvbWljX2xvbmdfc2V0KCZjdXJyZW50X3ZlcnNpb24sIG51bV9hc2lk cyk7DQo+ID4gPiArDQo+ID4gPiArICAgICAgICAgICAgIGNvbnRleHRfYXNpZF9tYXAgPSBrY2Fs bG9jKEJJVFNfVE9fTE9OR1MobnVtX2FzaWRzKSwNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHNpemVvZigqY29udGV4dF9hc2lkX21hcCksIEdGUF9LRVJORUwpOw0KPiA+ ID4gKyAgICAgICAgICAgICBpZiAoIWNvbnRleHRfYXNpZF9tYXApDQo+ID4gPiArICAgICAgICAg ICAgICAgICAgICAgcGFuaWMoIkZhaWxlZCB0byBhbGxvY2F0ZSBiaXRtYXAgZm9yICVsdSBBU0lE c1xuIiwNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1fYXNpZHMpOw0KPiA+ ID4gKw0KPiA+ID4gKyAgICAgICAgICAgICBfX3NldF9iaXQoMCwgY29udGV4dF9hc2lkX21hcCk7 DQo+ID4gPg0KPiA+ID4gKyAgICAgICAgICAgICBwcl9pbmZvKCJBU0lEIGFsbG9jYXRvciB1c2lu ZyAlbHUgZW50cmllc1xuIiwgbnVtX2FzaWRzKTsNCj4gPiA+ICsgICAgIH0gZWxzZSB7DQo+ID4g PiArICAgICAgICAgICAgIHByX2luZm8oIkFTSUQgYWxsb2NhdG9yIGRpc2FibGVkXG4iKTsNCj4g PiA+ICsgICAgIH0NCj4gPiA+ICsNCj4gPiA+ICsgICAgIHJldHVybiAwOw0KPiA+ID4gK30NCj4g PiA+ICtlYXJseV9pbml0Y2FsbChhc2lkc19pbml0KTsNCg==