linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: majun258@huawei.com (majun (F))
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/3] IRQ/Gic-V3: Change arm-gic-its to support the Mbigen interrupt
Date: Fri, 26 Jun 2015 14:31:41 +0800	[thread overview]
Message-ID: <558CF1CD.5020200@huawei.com> (raw)
In-Reply-To: <1434077399-32200-3-git-send-email-majun258@huawei.com>

Hi Thomas:

? 2015/6/12 10:49, Ma Jun ??:

> +static int its_mbigen_prepare(struct irq_domain *domain, struct mbi_desc *desc,
> +								int hwirq, struct mbi_alloc_info *arg)
> +{
> +	struct its_node *its = domain->parent->host_data;
> +	struct its_device *its_dev;
> +	u32 dev_id;
> +
> +	dev_id = desc->msg_id;
> +
> +	its_dev = its_find_device(its, dev_id);
> +	if (!its_dev) {
> +		its_dev = its_create_device(its, dev_id, desc->lines);
> +		if (!its_dev)
> +			return -ENOMEM;
> +	}
> +
> +	arg->scratchpad[0].ptr = its_dev;
> +	arg->scratchpad[1].ptr = NULL;
> +
> +	arg->desc = desc;
> +	arg->hwirq = hwirq;
> +	return 0;
> +}
> +
> +static struct mbigen_domain_ops its_mbigen_ops = {
> +	.mbigen_prepare		= its_mbigen_prepare,
> +};
> +
> +static struct mbigen_domain_info its_mbigen_domain_info = {
> +	.ops	= &its_mbigen_ops,
> +};
> +

what's you opinion about the function 'its_mbigen_prepare' ?
put this function in irq-gic-v3-its.c or move to mbigen driver ?

If I move this function to mbigen driver, some its fuctions
(ex. its_find_device, its_create_device) and struct data (ex its_node)
would be used in mbigen driver.

Now, all these functions and data structure are defined as static.
to use them, I have to remove the 'static' definition and put them
in a head file ? create a new head file).

I'm not sure which way is better .

  parent reply	other threads:[~2015-06-26  6:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12  2:49 [PATCH v2 0/3] IRQ/Gic-V3:Support Mbigen interrupt controller Ma Jun
2015-06-12  2:49 ` [PATCH v2 1/3] IRQ/Gic-V3: Add mbigen driver to support mbigen " Ma Jun
2015-06-12  2:49 ` [PATCH v2 2/3] IRQ/Gic-V3: Change arm-gic-its to support the Mbigen interrupt Ma Jun
2015-06-12 10:48   ` Thomas Gleixner
2015-06-15  7:05     ` majun (F)
2015-06-18 23:52       ` Thomas Gleixner
2015-06-23  9:03         ` majun (F)
2015-06-23  9:29           ` Thomas Gleixner
2015-06-26  8:45             ` Marc Zyngier
2015-06-26  6:31   ` majun (F) [this message]
2015-06-26  8:44     ` Marc Zyngier
2015-06-26 10:28       ` majun (F)
2015-06-26 10:40         ` Marc Zyngier
2015-06-26 12:04           ` majun (F)
2015-06-26 13:14             ` Marc Zyngier
2015-06-12  2:49 ` [PATCH v2 3/3] dt-binding:Documents the mbigen bindings Ma Jun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=558CF1CD.5020200@huawei.com \
    --to=majun258@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).