linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Bjorn Helgaas <bhelgaas@google.com>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Michael Hernandez <michael.hernandez@cavium.com>,
	Himanshu Madhani <himanshu.madhani@cavium.com>,
	Christoph Hellwig <hch@lst.de>
Subject: linux-next: manual merge of the tip tree with the pci tree
Date: Wed, 28 Jun 2017 13:15:34 +1000	[thread overview]
Message-ID: <20170628131534.1d549e19@canb.auug.org.au> (raw)

Hi all,

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

  kernel/irq/affinity.c

between commit:

  6f9a22bc5775 ("PCI/MSI: Ignore affinity if pre/post vector count is more than min_vecs")

from the pci tree and commit:

  9a0ef98e186d ("genirq/affinity: Assign vectors to all present CPUs")

from the tip tree.

I fixed it up (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 kernel/irq/affinity.c
index 9b71406d2eec,d2747f9c5707..000000000000
--- a/kernel/irq/affinity.c
+++ b/kernel/irq/affinity.c
@@@ -64,15 -108,8 +108,15 @@@ irq_create_affinity_masks(int nvecs, co
  	int last_affv = affv + affd->pre_vectors;
  	nodemask_t nodemsk = NODE_MASK_NONE;
  	struct cpumask *masks;
- 	cpumask_var_t nmsk;
+ 	cpumask_var_t nmsk, *node_to_present_cpumask;
  
 +	/*
 +	 * If there aren't any vectors left after applying the pre/post
 +	 * vectors don't bother with assigning affinity.
 +	 */
 +	if (!affv)
 +		return NULL;
 +
  	if (!zalloc_cpumask_var(&nmsk, GFP_KERNEL))
  		return NULL;
  
@@@ -155,15 -199,10 +207,13 @@@ int irq_calc_affinity_vectors(int minve
  {
  	int resv = affd->pre_vectors + affd->post_vectors;
  	int vecs = maxvec - resv;
- 	int cpus;
+ 	int ret;
  
 +	if (resv > minvec)
 +		return 0;
 +
- 	/* Stabilize the cpumasks */
  	get_online_cpus();
- 	cpus = cpumask_weight(cpu_online_mask);
+ 	ret = min_t(int, cpumask_weight(cpu_present_mask), vecs) + resv;
  	put_online_cpus();
- 
- 	return min(cpus, vecs) + resv;
+ 	return ret;
  }

             reply	other threads:[~2017-06-28  3:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28  3:15 Stephen Rothwell [this message]
2017-06-29  0:14 ` linux-next: manual merge of the tip tree with the pci tree Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2023-10-09  2:47 Stephen Rothwell
2023-10-31 23:15 ` Stephen Rothwell
2022-11-21  4:11 Stephen Rothwell
2020-11-30  4:03 Stephen Rothwell
2020-11-30 10:21 ` Borislav Petkov
2020-11-30 17:40   ` Bjorn Helgaas
2020-10-01  6:38 Stephen Rothwell
2020-10-01 16:06 ` Bjorn Helgaas
2020-09-25  5:35 Stephen Rothwell
2020-10-13  3:34 ` Stephen Rothwell
2020-09-25  5:21 Stephen Rothwell
2020-10-13  3:31 ` Stephen Rothwell
2016-12-09  2:38 Stephen Rothwell
2016-12-12 16:09 ` Bjorn Helgaas
2014-11-24  5:18 Stephen Rothwell
2014-11-24 10:51 ` Thomas Gleixner
2014-03-12 22:18 Mark Brown
2014-03-03  6:07 Stephen Rothwell
2014-03-03  6:03 Stephen Rothwell
2014-03-03  9:26 ` Liviu Dudau
2013-10-29  6:33 Stephen Rothwell

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=20170628131534.1d549e19@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=bhelgaas@google.com \
    --cc=hch@lst.de \
    --cc=himanshu.madhani@cavium.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=michael.hernandez@cavium.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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).