From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 3/9] powerpc/32: use patch_site_addr() in machine_init()
Date: Fri, 9 Nov 2018 17:33:20 +0000 (UTC) [thread overview]
Message-ID: <4e00065193504cad5774227cfa15d3d5e731df41.1541784640.git.christophe.leroy@c-s.fr> (raw)
In-Reply-To: <e63d9ac8ef6e83fc243d8910d7c789e111e48580.1541784640.git.christophe.leroy@c-s.fr>
Use patch_site_addr() instead of hardcoding the
address calculation in machine_init()
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/kernel/setup_32.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 81909600013a..c11ef6f01021 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -101,8 +101,7 @@ notrace unsigned long __init early_init(unsigned long dt_ptr)
*/
notrace void __init machine_init(u64 dt_ptr)
{
- unsigned int *addr = (unsigned int *)((unsigned long)&patch__memset_nocache +
- patch__memset_nocache);
+ unsigned int *addr = (unsigned int *)patch_site_addr(&patch__memset_nocache);
unsigned long insn;
/* Configure static keys first, now that we're relocated. */
--
2.13.3
next prev parent reply other threads:[~2018-11-09 17:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 17:33 [PATCH 1/9] powerpc: simplify patch_instruction_site() and patch_branch_site() Christophe Leroy
2018-11-09 17:33 ` [PATCH 2/9] powerpc: add modify_instruction() and modify_instruction_site() Christophe Leroy
2018-11-09 17:33 ` Christophe Leroy [this message]
2018-11-09 17:33 ` [PATCH 4/9] powerpc/book3s/32: Use MMU_FTR_HPTE_TABLE in head_32.S Christophe Leroy
2018-11-09 17:33 ` [PATCH 5/9] powerpc/book3s/32: Use patch_site to patch hash functions Christophe Leroy
2018-11-09 17:33 ` [PATCH 6/9] powerpc/8xx: use modify_instruction_site() Christophe Leroy
2018-11-09 17:33 ` [PATCH 7/9] powerpc/signal: Use code patching instead of hardcoding Christophe Leroy
2018-11-09 17:33 ` [PATCH 8/9] powerpc/44x: use patch_sites for TLB handlers patching Christophe Leroy
2018-11-09 17:33 ` [PATCH 9/9] powerpc/smp: Use code patching to restore reset vector Christophe Leroy
2018-12-22 9:55 ` [1/9] powerpc: simplify patch_instruction_site() and patch_branch_site() Michael Ellerman
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=4e00065193504cad5774227cfa15d3d5e731df41.1541784640.git.christophe.leroy@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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).