linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Marcelo Tosatti <mtosatti@redhat.com>,
	Gleb Natapov <gleb@kernel.org>,
	kvm@vger.kernel.org
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Julien Grall <julien.grall@arm.com>,
	Christoffer Dall <christoffer.dall@linaro.org>,
	Jon Hunter <jonathanh@nvidia.com>,
	Marc Zyngier <marc.zyngier@arm.com>
Subject: linux-next: manual merge of the kvm tree with the tip tree
Date: Thu, 12 May 2016 12:54:06 +1000	[thread overview]
Message-ID: <20160512125406.076ff089@canb.auug.org.au> (raw)

Hi all,

Today's linux-next merge of the kvm tree got a conflict in:

  drivers/irqchip/irq-gic.c

between commits:

  dc9722cc57eb ("irqchip/gic: Return an error if GIC initialisation fails")
  f673b9b5cb54 ("irqchip/gic: Store GIC configuration parameters")
  d6490461a102 ("irqchip/gic: Add helper functions for GIC setup and teardown")

from the tip tree and commits:

  bafa9193d00c ("irqchip/gic-v2: Gather ACPI specific data in a single structure")
  502d6df11ae3 ("irqchip/gic-v2: Parse and export virtual GIC information")

from the kvm tree.

I fixed it up (hopefully - see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/irqchip/irq-gic.c
index 1de20e14a721,3f1d9fd3a462..000000000000
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@@ -1248,30 -1191,29 +1250,53 @@@ static bool gic_check_eoimode(struct de
  	return true;
  }
  
 +static int gic_of_setup(struct gic_chip_data *gic, struct device_node *node)
 +{
 +	if (!gic || !node)
 +		return -EINVAL;
 +
 +	gic->raw_dist_base = of_iomap(node, 0);
 +	if (WARN(!gic->raw_dist_base, "unable to map gic dist registers\n"))
 +		goto error;
 +
 +	gic->raw_cpu_base = of_iomap(node, 1);
 +	if (WARN(!gic->raw_cpu_base, "unable to map gic cpu registers\n"))
 +		goto error;
 +
 +	if (of_property_read_u32(node, "cpu-offset", &gic->percpu_offset))
 +		gic->percpu_offset = 0;
 +
 +	return 0;
 +
 +error:
 +	gic_teardown(gic);
 +
 +	return -ENOMEM;
 +}
 +
+ static void __init gic_of_setup_kvm_info(struct device_node *node)
+ {
+ 	int ret;
+ 	struct resource *vctrl_res = &gic_v2_kvm_info.vctrl;
+ 	struct resource *vcpu_res = &gic_v2_kvm_info.vcpu;
+ 
+ 	gic_v2_kvm_info.type = GIC_V2;
+ 
+ 	gic_v2_kvm_info.maint_irq = irq_of_parse_and_map(node, 0);
+ 	if (!gic_v2_kvm_info.maint_irq)
+ 		return;
+ 
+ 	ret = of_address_to_resource(node, 2, vctrl_res);
+ 	if (ret)
+ 		return;
+ 
+ 	ret = of_address_to_resource(node, 3, vcpu_res);
+ 	if (ret)
+ 		return;
+ 
+ 	gic_set_kvm_info(&gic_v2_kvm_info);
+ }
+ 
  int __init
  gic_of_init(struct device_node *node, struct device_node *parent)
  {
@@@ -1294,17 -1235,18 +1319,19 @@@
  	 * Disable split EOI/Deactivate if either HYP is not available
  	 * or the CPU interface is too small.
  	 */
 -	if (gic_cnt == 0 && !gic_check_eoimode(node, &cpu_base))
 +	if (gic_cnt == 0 && !gic_check_eoimode(node, &gic->raw_cpu_base))
  		static_key_slow_dec(&supports_deactivate);
  
 -	if (of_property_read_u32(node, "cpu-offset", &percpu_offset))
 -		percpu_offset = 0;
 +	ret = __gic_init_bases(gic, -1, &node->fwnode);
 +	if (ret) {
 +		gic_teardown(gic);
 +		return ret;
 +	}
  
- 	if (!gic_cnt)
 -	__gic_init_bases(gic_cnt, -1, dist_base, cpu_base, percpu_offset,
 -			 &node->fwnode);
+ 	if (!gic_cnt) {
  		gic_init_physaddr(node);
+ 		gic_of_setup_kvm_info(node);
+ 	}
  
  	if (parent) {
  		irq = irq_of_parse_and_map(node, 0);
@@@ -1401,8 -1391,8 +1476,8 @@@ static int __init gic_v2_acpi_init(stru
  		return -EINVAL;
  	}
  
- 	gic->raw_cpu_base = ioremap(cpu_phy_base, ACPI_GIC_CPU_IF_MEM_SIZE);
 -	cpu_base = ioremap(acpi_data.cpu_phys_base, ACPI_GIC_CPU_IF_MEM_SIZE);
 -	if (!cpu_base) {
++	gic->raw_cpu_base = ioremap(acpi_data.cpu_phys_base, ACPI_GIC_CPU_IF_MEM_SIZE);
 +	if (!gic->raw_cpu_base) {
  		pr_err("Unable to map GICC registers\n");
  		return -ENOMEM;
  	}

             reply	other threads:[~2016-05-12  2:54 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12  2:54 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-01-18  0:32 linux-next: manual merge of the kvm tree with the tip tree Stephen Rothwell
2022-12-01  0:18 Stephen Rothwell
2022-12-01  0:14 Stephen Rothwell
2022-12-15 23:26 ` Stephen Rothwell
2022-01-10  2:16 Stephen Rothwell
2022-01-10  2:28 ` Like Xu
2021-12-13 17:46 broonie
2021-12-13 18:14 ` Paolo Bonzini
2021-12-13 18:23 ` Mark Brown
2021-10-25  5:11 Stephen Rothwell
2021-10-21  2:39 Stephen Rothwell
2021-10-21 15:32 ` Borislav Petkov
2021-04-22  4:30 Stephen Rothwell
2021-04-22  4:45 ` Nadav Amit
2021-04-22  4:58   ` Stephen Rothwell
2021-04-22  6:29   ` Paolo Bonzini
2020-07-29  6:47 Stephen Rothwell
2020-07-17  5:25 Stephen Rothwell
2020-06-02  4:53 Stephen Rothwell
2020-06-04  3:09 ` Stephen Rothwell
2020-01-16  2:48 Stephen Rothwell
2018-12-19  4:12 Stephen Rothwell
2018-12-17  5:22 Stephen Rothwell
2018-10-19  3:25 Stephen Rothwell
2018-08-08  3:54 Stephen Rothwell
2018-08-15  4:27 ` Stephen Rothwell
2018-08-06  5:12 Stephen Rothwell
2018-08-06  6:27 ` Tianyu Lan
2018-02-02  0:51 Stephen Rothwell
2018-01-15  2:39 Stephen Rothwell
2017-08-28  4:52 Stephen Rothwell
2017-09-04  6:09 ` Stephen Rothwell
2017-08-25  4:39 Stephen Rothwell
2017-08-25  6:39 ` Paolo Bonzini
2017-08-25 13:57   ` Tom Lendacky
2017-08-25 16:53     ` Brijesh Singh
2017-08-25 20:05       ` Paolo Bonzini
2017-08-25 20:41         ` Brijesh Singh
2017-08-25 20:42           ` Paolo Bonzini
2017-08-26  7:24             ` Ingo Molnar
2016-11-28  3:56 Stephen Rothwell
2016-11-17  3:50 Stephen Rothwell
2016-11-17  7:07 ` Thomas Gleixner
2016-11-17 21:31   ` Stephen Rothwell
2015-06-19  4:59 Michael Ellerman
2015-05-26  4:45 Stephen Rothwell
2012-11-30  4:26 Stephen Rothwell
2012-05-16  7:14 Stephen Rothwell
2012-05-16  7:53 ` Gleb Natapov

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=20160512125406.076ff089@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=christoffer.dall@linaro.org \
    --cc=gleb@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=julien.grall@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mtosatti@redhat.com \
    /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).