linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@linux-foundation.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	PowerPC <linuxppc-dev@lists.ozlabs.org>
Cc: Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Christophe Leroy <christophe.leroy@c-s.fr>
Subject: linux-next: manual merge of the akpm-current tree with the powerpc tree
Date: Mon, 25 Feb 2019 17:42:48 +1100	[thread overview]
Message-ID: <20190225174248.54aceebd@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3268 bytes --]

Hi all,

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

  arch/powerpc/kernel/irq.c

between commit:

  c8e409a33cf8 ("powerpc/irq: use memblock functions returning virtual address")
and other patches in the powerpc tree

from the powerpc tree and patch:

  "powerpc: use memblock functions returning virtual address"

from the akpm-current tree.

This file looks the same after applying either of those patches, so I
just used the powerpc version of the file due to the other changes.

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.

The akpm patch now looks like this:

diff --git a/arch/powerpc/kernel/dt_cpu_ftrs.c b/arch/powerpc/kernel/dt_cpu_ftrs.c
index e49bd5efcfe6..28c076c771de 100644
--- a/arch/powerpc/kernel/dt_cpu_ftrs.c
+++ b/arch/powerpc/kernel/dt_cpu_ftrs.c
@@ -810,7 +810,6 @@ static int __init process_cpufeatures_node(unsigned long node,
 	int len;
 
 	f = &dt_cpu_features[i];
-	memset(f, 0, sizeof(struct dt_cpu_feature));
 
 	f->node = node;
 
@@ -1005,7 +1004,7 @@ static int __init dt_cpu_ftrs_scan_callback(unsigned long node, const char
 	/* Count and allocate space for cpu features */
 	of_scan_flat_dt_subnodes(node, count_cpufeatures_subnodes,
 						&nr_dt_cpu_features);
-	dt_cpu_features = __va(memblock_phys_alloc(sizeof(struct dt_cpu_feature) * nr_dt_cpu_features, PAGE_SIZE));
+	dt_cpu_features = memblock_alloc(sizeof(struct dt_cpu_feature) * nr_dt_cpu_features, PAGE_SIZE);
 
 	cpufeatures_setup_start(isa);
 
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index 8c890c6557ed..e7382abee868 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -196,7 +196,11 @@ void __init allocate_paca_ptrs(void)
 	paca_nr_cpu_ids = nr_cpu_ids;
 
 	paca_ptrs_size = sizeof(struct paca_struct *) * nr_cpu_ids;
-	paca_ptrs = __va(memblock_phys_alloc(paca_ptrs_size, SMP_CACHE_BYTES));
+	paca_ptrs = memblock_alloc_raw(paca_ptrs_size, SMP_CACHE_BYTES);
+	if (!paca_ptrs)
+		panic("Failed to allocate %d bytes for paca pointers\n",
+		      paca_ptrs_size);
+
 	memset(paca_ptrs, 0x88, paca_ptrs_size);
 }
 
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index e97aaf201d67..c0ed4fa0b9d3 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -127,7 +127,10 @@ static void __init move_device_tree(void)
 	if ((memory_limit && (start + size) > PHYSICAL_START + memory_limit) ||
 	    !memblock_is_memory(start + size - 1) ||
 	    overlaps_crashkernel(start, size) || overlaps_initrd(start, size)) {
-		p = __va(memblock_phys_alloc(size, PAGE_SIZE));
+		p = memblock_alloc_raw(size, PAGE_SIZE);
+		if (!p)
+			panic("Failed to allocate %lu bytes to move device tree\n",
+			      size);
 		memcpy(p, initial_boot_params, size);
 		initial_boot_params = p;
 		DBG("Moved device tree to 0x%px\n", p);

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2019-02-25  6:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25  6:42 Stephen Rothwell [this message]
2019-02-25  6:44 ` linux-next: manual merge of the akpm-current tree with the powerpc tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2021-06-18  9:44 Stephen Rothwell
2021-06-19  2:54 ` Nicholas Piggin
2021-05-05  1:39 Stephen Rothwell
2021-05-05  4:57 ` Michael Ellerman
2021-05-05  5:46   ` Stephen Rothwell
2021-05-05 23:43 ` Stephen Rothwell
2021-04-15  9:44 Stephen Rothwell
2021-04-15  9:58 ` Stephen Rothwell
2021-04-15 10:07   ` Christophe Leroy
2021-04-15 10:08     ` Christophe Leroy
2021-04-15 10:15       ` Christophe Leroy
2020-12-08  9:40 Stephen Rothwell
2020-12-17  0:48 ` Stephen Rothwell
2020-09-17  8:57 Stephen Rothwell
2020-06-03  8:50 Stephen Rothwell
2019-07-08 11:43 Stephen Rothwell
2019-04-23  8:57 Stephen Rothwell
2019-02-25  6:16 Stephen Rothwell
2018-12-06  6:44 Stephen Rothwell
2018-12-07  1:40 ` Joel Fernandes
2016-05-02  7:20 Stephen Rothwell
2016-05-02 11:17 ` Aneesh Kumar K.V
2016-03-04  7:49 Stephen Rothwell
2015-12-18  5:33 Stephen Rothwell
2016-01-07  9:15 ` Stephen Rothwell
2016-01-07 17:15   ` Aneesh Kumar K.V
2016-01-07 20:03     ` Stephen Rothwell
2015-12-15  5:53 Stephen Rothwell
2015-12-15  6:44 ` Stephen Rothwell
2015-12-15  9:37 ` Aneesh Kumar K.V

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=20190225174248.54aceebd@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=christophe.leroy@c-s.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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).