Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1017362imu; Fri, 9 Nov 2018 09:35:46 -0800 (PST) X-Google-Smtp-Source: AJdET5cHUhr+WKv4uHsrf/rEcsRZNJfsNdRMz2xP7i62N/jc4xt6nIycCPeC3/o1o7fLPwyzx6/C X-Received: by 2002:a17:902:887:: with SMTP id 7-v6mr1756151pll.283.1541784946685; Fri, 09 Nov 2018 09:35:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541784946; cv=none; d=google.com; s=arc-20160816; b=OUKmB8/3F37CG0OnmKvD0N+YqIU7O5V5pi8Q3haT04Fsm+Su8I/rd3ORlHBh+AuDYg YXgx02rWk7pJYebEJslBeMZ9FMMNhLzQeSKZp0/J2ijVIy8TAjL437Wq7Y5xxohlcfHR znsknpgQgCjWhymM8Pw8wZSUdqZGpyksLecb1mJPQL6fF0oJnNMOb+9TmQ85oV5+vE98 luZokBZLuhZkRFnBRkSy/p2b2cjoriZIUA85iwQdy1UaCjEOKwV4vo0qMlouk9YfllMT JBM85W/ZQqokvmgBJb+AlTTSkN1UVr8Kq+eUQVM6x04VOPQ6u61wCzFQROrlNIHo5AP8 VvDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id; bh=tXE+6xArIceAH8+oPIGPyqdlQoMtspXjYqiYPAD1eyc=; b=hjywFS5irtkzIW5ih+tBjtNTZlT7BkbXx3qu/SYNGUVmr06GbGD6NVILvrIxKv46Ty hWaiFTOZB4Aus9iO4N+Er37Y1vuLG+RvCM9sXO+pmBl3D+ui3xFUUCiMUy/2tm6ihJKd Ng5TLHnD5e+MWIq+GkbTZurpvWgT1a5b7OZ9dviABaC9ONmqMyy2CU6PO97dkxczuWiy UNabuRGBTymzSZbzjRmxN4VPL2qwL0SMmWQFOQcSv1rUKzneF4uPtInK2i/uq+d6gnYm q9JU4UauMQW0qRjzan/3Rn3IqKZMZ9J2EyUtx2i1O13HbKq8aAUx2Jsasw4Eguvae5m3 qMDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g18-v6si8530172pfb.278.2018.11.09.09.35.22; Fri, 09 Nov 2018 09:35:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728734AbeKJDOz (ORCPT + 99 others); Fri, 9 Nov 2018 22:14:55 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:30920 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727995AbeKJDOy (ORCPT ); Fri, 9 Nov 2018 22:14:54 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 42s6gZ4hyYz9v0XQ; Fri, 9 Nov 2018 18:33:14 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id neKhFkE_A9m1; Fri, 9 Nov 2018 18:33:14 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 42s6gZ4DQDz9v0XL; Fri, 9 Nov 2018 18:33:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 62FFE8B899; Fri, 9 Nov 2018 18:33:20 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id s4Oe2I4cc1PQ; Fri, 9 Nov 2018 18:33:20 +0100 (CET) Received: from po14163vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 113A88B887; Fri, 9 Nov 2018 18:33:20 +0100 (CET) Received: by po14163vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 071FB69A2A; Fri, 9 Nov 2018 17:33:19 +0000 (UTC) Message-Id: <4e00065193504cad5774227cfa15d3d5e731df41.1541784640.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH 3/9] powerpc/32: use patch_site_addr() in machine_init() To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 9 Nov 2018 17:33:20 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use patch_site_addr() instead of hardcoding the address calculation in machine_init() Signed-off-by: Christophe Leroy --- 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