From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rqDKr3n6YzDqR3 for ; Wed, 13 Jul 2016 19:38:40 +1000 (AEST) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u6D9YHI8015019 for ; Wed, 13 Jul 2016 05:38:38 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0b-001b2d01.pphosted.com with ESMTP id 24567bwspx-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 13 Jul 2016 05:38:38 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 13 Jul 2016 03:38:37 -0600 From: "Aneesh Kumar K.V" To: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au Cc: linuxppc-dev@lists.ozlabs.org, "Aneesh Kumar K.V" Subject: [PATCH for-4.8 05/10] powerpc: Call jump_label_init early Date: Wed, 13 Jul 2016 15:08:05 +0530 In-Reply-To: <1468402690-5373-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1468402690-5373-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Message-Id: <1468402690-5373-6-git-send-email-aneesh.kumar@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Call jump_label_init early so that can use static keys for cpu and mmu feature check. We should have finalzed all the cpu/mmu features when we call setup_system and we also did feature fixup for ASM based code. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kernel/setup_32.c | 6 ++++++ arch/powerpc/kernel/setup_64.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index ecdc42d44951..8831738c3dcb 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c @@ -99,6 +99,12 @@ notrace unsigned long __init early_init(unsigned long dt_ptr) PTRRELOC(&__stop___lwsync_fixup)); do_final_fixups(); + /* + * init jump label so that cpu and mmu feature check can be optimized + * using jump label. We should have all the cpu/mmu features finalized + * by now. + */ + jump_label_init(); return KERNELBASE + offset; } diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 05dde6318b79..c6f6cbcbee91 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -480,6 +480,12 @@ void __init setup_system(void) do_lwsync_fixups(cur_cpu_spec->cpu_features, &__start___lwsync_fixup, &__stop___lwsync_fixup); do_final_fixups(); + /* + * init jump label so that cpu and mmu feature check can be optimized + * using jump label. We should have all the cpu/mmu features finalized + * by now. + */ + jump_label_init(); /* * Unflatten the device-tree passed by prom_init or kexec -- 2.7.4