From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x224jhfqhRM8zRUR3r5PMUnoKA7rqaech2IUfpf54gs59p5AgAkSJLZ7TH6jgwK64GS/A7836 ARC-Seal: i=1; a=rsa-sha256; t=1516918565; cv=none; d=google.com; s=arc-20160816; b=u6kI7BiiTJOkT25m8+qaetWN5QVFD2/Seow+sukOLuXBCr0J9MU4audnbuOIAv6OJ4 iStUVv7pGgkn1vfDGMBiWJUMoY7pzC1Ttg0Id7kUmk/loIZJugEf95DrrCWpB5/nCGau pUVeLgcwWQ/gXZkk8/Hfm80+n6mAXkuZZm5pUOplx6IE+njBXHKOo2AQpAOcFqBsyn+I EizmyRj+7yqWLw1wX2L7EZ9sDSfT5+NpwbufH2co4V1gtm/5Xx9yT94D5DN7HK5tCRda MwehrZrQ4cf4A5nFFfPgCgekACAmVUrlJjLvuENs5Rf7LDmq3KRZs5EbN6zBmoRzjBPj go+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=Pg0vrgg4czSgHcbuRrE3UevwJbrqqfQEWt7q8lE6L4M=; b=Lqiv3ddpy5amFzb8YLJuRO2N49aXJLB3h+zo1pcjGMLFNL8jghj6f2Bng0MWVo9cov pnBKnGiY4qCmZZojxS209m1O5S4AEevQzzEfHJMoo0gS/2fpodOt9qgZALatOdx7xAjJ FGUrltJ0bFMtAc2mO8Khri3rTIbYUpKLwVuC2MauSLV74yEjytCbDP7rT39IvevEmFeY gPNZ4KcABd7vpnXHvnlpsb+gc9vryRHN3E2URjUXKpHlKfI9WejfrHpAqCPcgOZMnkPZ P8cmR6Oz53RwBY2jGJCJ6gGVvAHYcn1ZyL1tuchN0oWg34bSjbB0oyqFZ5oTMkSlryyd iCqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=gL+JElzS; spf=pass (google.com: best guess record for domain of dvhart@infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=dvhart@infradead.org Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=gL+JElzS; spf=pass (google.com: best guess record for domain of dvhart@infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=dvhart@infradead.org Date: Thu, 25 Jan 2018 14:16:01 -0800 From: Darren Hart To: Vadim Pasternak Cc: andy.shevchenko@gmail.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, jiri@resnulli.us Subject: Re: [patch v11 10/12] platform/x86: mlx-platform: Extend register map configuration with IO access verification callbacks Message-ID: <20180125221601.GD24122@fury> References: <1516826098-125036-1-git-send-email-vadimp@mellanox.com> <1516826098-125036-2-git-send-email-vadimp@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516826098-125036-2-git-send-email-vadimp@mellanox.com> User-Agent: Mutt/1.8.0 (2017-02-23) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590500118381184352?= X-GMAIL-MSGID: =?utf-8?q?1590604401405678376?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: On Wed, Jan 24, 2018 at 08:34:56PM +0000, Vadim Pasternak wrote: > Add definitions for hotplug device masks and events offsets. > > Extend register map configuration with the sets of writable, readable and > volatile registers to allow verification prior to the access. > > Extend register map configuration with cache type field: use flat type. This says "what" you're doing, but not why. The point of the change log is to help the reviewer or some future debugger to understand not WHAT you did (we have that in the code below) but WHY you did it - keeping in mind that we likely haven't spent the time you have to understand what the right thing is to do here, so share with us the result of your research. "Extend register map configuration with cache type field: use flat type, in order to XXXXXXXXXX". Please keep in mind for future patches. ... > + > static int > mlxplat_mlxcpld_reg_read(void *context, unsigned int reg, unsigned int *val) > { > @@ -317,6 +384,10 @@ static const struct regmap_config mlxplat_mlxcpld_regmap_config = { > .reg_bits = 8, > .val_bits = 8, > .max_register = 255, > + .cache_type = REGCACHE_FLAT, -- Darren Hart VMware Open Source Technology Center