Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1438796

Re: [PATCH V2 01/10] Documentation: dt-bindings: mailbox: tegra: Add binding for HSP mailbox

From Stephen Warren <swarren@wwwdotorg.org>
Newsgroups linux.kernel
Subject Re: [PATCH V2 01/10] Documentation: dt-bindings: mailbox: tegra: Add binding for HSP mailbox
Date 2016-07-07 20:40 +0200
Message-ID <rSmnn-2ax-11@gated-at.bofh.it> (permalink)
References <rRuwF-MJ-15@gated-at.bofh.it> <rRuwF-MJ-13@gated-at.bofh.it> <rSm42-23N-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 07/07/2016 12:13 PM, Sivaram Nair wrote:
> On Tue, Jul 05, 2016 at 05:04:22PM +0800, Joseph Lo wrote:
>> Add DT binding for the Hardware Synchronization Primitives (HSP). The
>> HSP is designed for the processors to share resources and communicate
>> together. It provides a set of hardware synchronization primitives for
>> interprocessor communication. So the interprocessor communication (IPC)
>> protocols can use hardware synchronization primitive, when operating
>> between two processors not in an SMP relationship.

>> diff --git a/include/dt-bindings/mailbox/tegra186-hsp.h b/include/dt-bindings/mailbox/tegra186-hsp.h

>> +#define HSP_MBOX_TYPE_DB 0x0
>> +#define HSP_MBOX_TYPE_SM 0x1
>> +#define HSP_MBOX_TYPE_SS 0x2
>> +#define HSP_MBOX_TYPE_AS 0x3
>> +
>> +#define HSP_DB_MASTER_CCPLEX 17
>> +#define HSP_DB_MASTER_BPMP 19
>> +
>> +#define HSP_MBOX_ID(type, ID) \
>> +		(HSP_MBOX_TYPE_##type << 16 | ID)
>
> It will be nicer if you avoid the macro glue magic '##' for 'type'. I
> would also suggest to use braces around 'type' and 'ID'.

This technique been used without issue in quite a few other places 
without issue, and has the benefit of simplifying the text wherever the 
macro is used. What issue do you foresee?

BTW, if this patch does need reposting, I'd suggest s/ID/id/ since macro 
parameters are usually lower-case.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 01/10] Documentation: dt-bindings: mailbox: tegra: Add binding for HSP mailbox Joseph Lo <josephl@nvidia.com> - 2016-07-05 11:10 +0200
  Re: [PATCH V2 01/10] Documentation: dt-bindings: mailbox: tegra: Add  binding for HSP mailbox Stephen Warren <swarren@wwwdotorg.org> - 2016-07-06 19:10 +0200
    Re: [PATCH V2 01/10] Documentation: dt-bindings: mailbox: tegra: Add  binding for HSP mailbox Joseph Lo <josephl@nvidia.com> - 2016-07-07 08:30 +0200
  Re: [PATCH V2 01/10] Documentation: dt-bindings: mailbox: tegra: Add  binding for HSP mailbox Sivaram Nair <sivaramn@nvidia.com> - 2016-07-07 20:20 +0200
    Re: [PATCH V2 01/10] Documentation: dt-bindings: mailbox: tegra: Add  binding for HSP mailbox Stephen Warren <swarren@wwwdotorg.org> - 2016-07-07 20:40 +0200
      Re: [PATCH V2 01/10] Documentation: dt-bindings: mailbox: tegra: Add  binding for HSP mailbox Sivaram Nair <sivaramn@nvidia.com> - 2016-07-07 20:50 +0200

csiph-web