Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1017946imu; Fri, 9 Nov 2018 09:36:22 -0800 (PST) X-Google-Smtp-Source: AJdET5eQMbwsgHEGjGOAGqiDUU8H2GxqwbO2Lg9NCPymya+IYwXEE+ec7BZGPkq9PKp99UoG0cOf X-Received: by 2002:aa7:80ce:: with SMTP id a14-v6mr1786745pfn.86.1541784982106; Fri, 09 Nov 2018 09:36:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541784982; cv=none; d=google.com; s=arc-20160816; b=RzYjW5sPN91+jpiLexvFxILvQu0MK7gqiwzzjRGxPDpQNPiXD2r9a27e4p+221fZbN ynvk3w3z9vcvL270I8J0EP7ZW1zTPzn4p/5xlRtUAR73eSDngRYVDUh/2R74Cl9WSNzB vdyLVFTepv15Ce7lS5QwJfnTIHw/9/r69mYCAN+rxMmPqt9wbqNz1J0wVn6GyYufb+64 S23oruIuNI25IojHEgrg3NC7+kyXW+/0Sm14iptNNZEd8Qeexos3SJCbG4x6lZ13KOc1 pP2ctE4naLUhEFiwv2Nv4AIZY/ocMyeSWINbea1SB7rwpQx904ZX75Ls98k/BIhMcJda PT8w== 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=BnAy4BmygoEnj6WZVmo/k3ayalReKkSXn/YPwsbWYEM=; b=s5xNReLZZJRWidY7LrD1qo8b92z6QPATrHcHsygiyGGPNLgO7/cTkQl/wvARDPE0kb tThOpIfyAwiCaYn6TyiUcZVK83Ip1Olqre6yn55uAhiFXKKRpEmYrhDBF/Xzxgf+fOKR UgQiqqxKRhtaAZqXJja3NMEK4vl1UAmZx2lnolqr+maWhMeUgiAul1edU1DjwS2bhSOe bK0q2eCSEs5QwigsSYUoucayaeEYl7pLypaR3ERZFoJxln7ERvxcxj924MF+9sKyS9pU gCRMkNh5EItG+m0mSXTxc8ORlYF0uzqJbnp9y0NzvQCC/qsHutKVieL3NAVInZnm5EO8 FnBA== 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 f35si6958016pgf.449.2018.11.09.09.36.04; Fri, 09 Nov 2018 09:36:22 -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 S1728806AbeKJDPC (ORCPT + 99 others); Fri, 9 Nov 2018 22:15:02 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:46693 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728766AbeKJDPB (ORCPT ); Fri, 9 Nov 2018 22:15:01 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 42s6gh4Ry8z9v0XP; Fri, 9 Nov 2018 18:33:20 +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 q_8hn4eqyXHh; Fri, 9 Nov 2018 18:33:20 +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 42s6gh40nYz9v0XL; Fri, 9 Nov 2018 18:33:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5B92A8B899; Fri, 9 Nov 2018 18:33:26 +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 YtvXAeoZdSv1; Fri, 9 Nov 2018 18:33:26 +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 2F1E38B887; Fri, 9 Nov 2018 18:33:26 +0100 (CET) Received: by po14163vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 1B2DF69A2A; Fri, 9 Nov 2018 17:33:26 +0000 (UTC) Message-Id: <08dc5872b4d890391035c3aa82c89dfca21555e1.1541784640.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH 6/9] powerpc/8xx: use modify_instruction_site() 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:26 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of hardcoding the TLB handlers patching, use the newly created modify_instruction_site() helper. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/8xx_mmu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/powerpc/mm/8xx_mmu.c b/arch/powerpc/mm/8xx_mmu.c index 01b7f5107c3a..a9b287f2f009 100644 --- a/arch/powerpc/mm/8xx_mmu.c +++ b/arch/powerpc/mm/8xx_mmu.c @@ -100,11 +100,7 @@ static void __init mmu_mapin_immr(void) static void __init mmu_patch_cmp_limit(s32 *site, unsigned long mapped) { - unsigned int instr = *(unsigned int *)patch_site_addr(site); - - instr &= 0xffff0000; - instr |= (unsigned long)__va(mapped) >> 16; - patch_instruction_site(site, instr); + modify_instruction_site(site, 0xffff, (unsigned long)__va(mapped) >> 16); } unsigned long __init mmu_mapin_ram(unsigned long top) -- 2.13.3