From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98341 invoked by alias); 2 Mar 2017 15:17:09 -0000 Mailing-List: contact gnu-gabi-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: gnu-gabi-owner@sourceware.org Received: (qmail 98323 invoked by uid 89); 2 Mar 2017 15:17:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy= X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mail-it0-f68.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:subject:references:to:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=YC0EvMiEFgh8YWymCtNdUIfu4I6um9/ryRhD7l4TBbQ=; b=ZVz0u/Z6M/YZA67dG4fXq0upK3H5NGQHQW2bqOillRLeQ/0r4o16WKVuNbcXwVYz0B U5l2DSiFcFq6FbmKJFGQmcELiSE2LyAzVEODlZu80+/EvaKzPioj2O8roR1radbf7Fic IPpfRPs99kJwQkEF8UdCMpdXCcC7ne7oEHp5MyqeXDTtmYDYeTmgoDDohewTr/oTUbq2 aTvpQjXZPeIUp4K45voqYv4rXOOdR8eyMGgSqy0qgS4EUCN5eRWBHPaSPr9gpNbfFCn+ PcfTrHFkue0nKIonWy/AEaBJuImHcMZHBAWsx1nmxkvWh3jLVtHU2V6sp2hj+/qpnKBF CUrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:references:to:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=YC0EvMiEFgh8YWymCtNdUIfu4I6um9/ryRhD7l4TBbQ=; b=dik+YmLnAA2n6KhnsPfkp89k3kfpeD9HbQfFfo8WAlrJbXmKmi5PTShXOCqsxI++rh LswBGvhrb5SELvUY9XiymRaO3T6QSvBzssri9TR/oh9Cd2vP67ts6B4FexhbUlMuRiu7 +i98VU7gXOj87+LJvPzDvmPDoEWV5bAJM7V6NIy1ZOQjg0PnJ+qDHQRV7V7ie0fAifRU 8ysBPFm/CwlI3gkgXzS0T94Yr1kluTHmH2eeaZu+TBq01fYUJnpK1MutRzLkueghB4Bu piTEXGwNeRfciMHHASbIytHf0WrVXl1I89hH8o9NevEPcfeJ3igN8pFXxP3rYH4V+Cdk eQtA== X-Gm-Message-State: AMke39k97jGi/hkuD8amPR6KLtGfS2GTiBuCVb10UB+4yxNAipydXh/wmzB+wyzF8vsKcg== X-Received: by 10.36.107.131 with SMTP id v125mr9973793itc.73.1488467825719; Thu, 02 Mar 2017 07:17:05 -0800 (PST) Reply-To: hegdesmailbox@gmail.com Subject: Re: RFC: ABI support for special memory area References: To: "H.J. Lu" , gnu-gabi@sourceware.org From: Suprateeka R Hegde Organization: HEGDESASPECT Message-ID: Date: Sun, 01 Jan 2017 00:00:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 170302-1, 02-03-2017), Outbound message X-Antivirus-Status: Clean X-SW-Source: 2017-q1/txt/msg00007.txt.bz2 On 23-Feb-2017 09:49 PM, H.J. Lu wrote: > The default implementation of __gnu_mbind_setup is > > int > __gnu_mbind_setup (unsigned int type, void *addr, size_t length) > { > return 0; > } > > which can be overridden by a different implementation at link-time. > Since this is a design that allows vendor specific extension and implementation, would it OK if we make it more generic? Instead of a fixed 3 arguments (type, addr, len), how about something like a pointer to a generic MBIND_CONTEXT struct (say of type __gnu_mbind_context defined)? And let the implementation define the actual struct. I would like to handle NVM/NVMe (long back I had mentioned about PT_PERSISTENT) through this MBIND and my implementation of handling NVM/NVMe needs more data to be passed to such "setup" functions. Or is this __gnu_mbind_setup should be considered as a very basic / fundamental function (used just to setup the "memory area") and implementations/vendors are expected to write wrapper/handler functions to handle other aspects of the special memory? In that case the fixed set of basic args looks OK. IMHO this __gnu_mbind_setup is a very good design to be generic enough and not be very specific/basic/fundamental runtime support. -- Supra