Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5354394img; Wed, 27 Mar 2019 07:03:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqOtnTjMSHpv+gaN12ij71gQg0SsbLv989Mp+QxO2tXCoeka8C+dWGxwzAbvyYlJrmlWRL X-Received: by 2002:a17:902:f08a:: with SMTP id go10mr23995267plb.121.1553695421210; Wed, 27 Mar 2019 07:03:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553695421; cv=none; d=google.com; s=arc-20160816; b=Y+Q+XuGZApnxc+orlWPJ8F+PhsE42m+WSjX21vbkjdQqKTGpq3Jfl68eVn/qhYV0fq lLybTXfEW8cQCspRuDkrZMCTmIsWKf/MaNb3rDgYS78YMc7s8s+WFiQNHIkImL/Y3JNC AStTAWBaQCOcbS1+VeVDWEeN7NYTkLbje4bh6cUE7CdGZOUDx5VtoOtstUScCxs1heLQ 9PJBXMDu2FF6SM1BQOgRZOtj/P/QLmNDUAUTPsWOKORI/GhcLiMNzVH7lSL8RMaYoMBG eao++ynEaL52s/cZolCDrWspwsEekq1MdO9Zu9KHFCuc8hRI5d9bjetqJjpBhnjoxmgX ap8A== 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=JoV6bHeNIWFARGZA9fpZFkp4vt76l1ftGl/d9i602jk=; b=T9JGdETvp4UMIsCWvAeEfU5IE5oLyDIwhT+FS28iWjv2dJtcP27LQwwpTgRJWBqDYS 8wkpDjJw1OxOlO/wJWT96b7/H0W8vpgnfS0EdpiAZkqjBZsjIW7yM2zCZdZ6SOZYAIUz WYanKdtAJmo+lxiJrA0YrZRCMdBpdsliYMntR57QwOLyeTTKx/uLP5pTLEtey/OSRBpT iCc4D5v+qYD0n8aay/TkNaydwH8iPYhXVmadI+zheZFLU5vvxcL/dye4wLZVBTaionff OikH5MH8JqLXmFYUG/kqJAj0BUUj+AyFLb2g/CgWSunrAy+8HRuNraMK/SuDyjoMJHJD U8ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=JR7085O0; 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 q61si20348995plb.245.2019.03.27.07.03.22; Wed, 27 Mar 2019 07:03:41 -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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=JR7085O0; 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 S1728349AbfC0OCo (ORCPT + 99 others); Wed, 27 Mar 2019 10:02:44 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46858 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726319AbfC0OCo (ORCPT ); Wed, 27 Mar 2019 10:02:44 -0400 Received: by mail-wr1-f68.google.com with SMTP id t17so2071231wrw.13 for ; Wed, 27 Mar 2019 07:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JoV6bHeNIWFARGZA9fpZFkp4vt76l1ftGl/d9i602jk=; b=JR7085O087ON4qh3se8Ob4x8KaZ/8TKWkBubB1RIJOnZ73mWzX6ZUO3HH2PFSwUVu2 2Mnuwe8oeQxPGAkuD6qTTt8wIN8Yf0EBGmzb200YlrxzrHAz0mZP0bkL+g4JQqyney4I D6uYV9r5bbdd0N5eSYjDdL4pBUEmS+PEvJcpED1BHrdgMkQ9Kde/6AmyUJHMapwCAUgK p5Sj9yZLqSkD0NLCJf0jzWUCY+YMvuKMHiBi04FpiQ1pnhvvCHQqDVp+i6APkDJf2u2/ QyPmFh2BgCLNnf6kRgD3JqXTqZvIhCdt5JM5CNjZYp2F3vKu1UBkm0UHMqHjx9LUWG6a R5xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JoV6bHeNIWFARGZA9fpZFkp4vt76l1ftGl/d9i602jk=; b=GQKYARJ0KAS7NIaBSIFiRItYtll4wV+dho+ri6HBGeSlaaNBsPqfaoUwkWXQXVdrjy nWMCSyX4diW8k26TTyQohkD1vcM1JSiPG6Nt5vzSvMwVEMdFTT0mS8Hqxlaae1jkgm0J 0DrpRCbPEaQVaTYZEYy8hl95Rs8NTnbpeAFxz9TZl4uA9+kPaNDLRXYVH3HZe2ERVO8v N6KCAzXXTKa9rORak/ZbvL5oAPp1mWa1nk/D8pkIlm1O0QhAdrZFj/2ywE5urIbbnWlP 9WBldz8ijiyHqS8auER44pi5C1t4KVjwzCLE2fb423gi6DTvfu0UEXM8UTfLkL0QeTl8 maTw== X-Gm-Message-State: APjAAAUSmH7/fqMwji1l/HB4UrEVhxNSY8cEWzc825qrTf8jUpiXKMfi /Ja2I6Dlbs80FknQfYHOqMV1yksrapA0t+9XYoNxVQ== X-Received: by 2002:a5d:5108:: with SMTP id s8mr21441512wrt.99.1553695362323; Wed, 27 Mar 2019 07:02:42 -0700 (PDT) MIME-Version: 1.0 References: <20190327100201.32220-1-anup.patel@wdc.com> <7edf91f1-1df5-5513-d372-d84edd12edf3@garyguo.net> <74227a1d-3928-3e92-c7a9-5c3e093b29ab@garyguo.net> In-Reply-To: <74227a1d-3928-3e92-c7a9-5c3e093b29ab@garyguo.net> From: Anup Patel Date: Wed, 27 Mar 2019 19:32:31 +0530 Message-ID: Subject: Re: [PATCH] RISC-V: Implement ASID allocator To: Gary Guo Cc: Anup Patel , Palmer Dabbelt , Albert Ou , Atish Patra , Christoph Hellwig , Paul Walmsley , Mike Rapoport , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" 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, Mar 27, 2019 at 7:12 PM Gary Guo wrote: > > I would also like to mention that your code assumes 64-bit atomics > support which we don't have on 32-bit systems. Using 32-bit to track > ASID generations isn't sufficient and will cause overflows. That's why I > have asid_generation_overflow to handle the case (this is super > error-prone as well). Thanks for catching. I will fix issues with 32bit systems and send v2 soon. Regards, Anup