From patchwork Thu Aug 20 12:14:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 509029 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5E6651401EF for ; Thu, 20 Aug 2015 22:18:12 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=pxy9d3c8; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 39CBA1A1DE7 for ; Thu, 20 Aug 2015 22:18:12 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=pxy9d3c8; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-yk0-x22d.google.com (mail-yk0-x22d.google.com [IPv6:2607:f8b0:4002:c07::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id E974E1A0226 for ; Thu, 20 Aug 2015 22:14:57 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=pxy9d3c8; dkim-atps=neutral Received: by ykll84 with SMTP id l84so35020910ykl.0 for ; Thu, 20 Aug 2015 05:14:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GObCSKBn8SYoan425o6Mng17mWdMdGSOw95DI3FVEDc=; b=pxy9d3c85zjMOU7wY27X43J6OjYuWbeTK+T3HLAJODV6tDXSHlSIpKiSOGN4Kvq9fJ VqylhcWikvS7souGv+F2b/vVDUP8qZZOd3c8mdQkKmbuhIAXdAtCHb63v7a5iF1GMLc7 4t0noXaWE+SVsR5bVLIFmINQZaMKVUOQYYmELK6jgPjeyBwriKcvvlKr4tKDO4paa9mR 10SryHFI4nt1aV+rGDdZJ5nbroUX0AnKxuSyTcXgqcFRq+RSlDHaFnsSqcAV5HnEECP6 0HmNf44OSi5turS19CZaveK9QKlPbfGCSNhp02sI47e4KoH8lObIvOm264MiN57/3+aZ awvA== X-Received: by 10.170.165.193 with SMTP id h184mr2836419ykd.1.1440072895609; Thu, 20 Aug 2015 05:14:55 -0700 (PDT) Received: from pek-khao-d1.corp.ad.wrs.com (unknown-178-22.windriver.com. [147.11.178.22]) by smtp.gmail.com with ESMTPSA id w62sm3745368ywe.50.2015.08.20.05.14.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2015 05:14:54 -0700 (PDT) From: Kevin Hao To: Michael Ellerman Subject: [PATCH 1/8] jump_label: no need to acquire the jump_label_mutex in jump_lable_init() Date: Thu, 20 Aug 2015 20:14:29 +0800 Message-Id: <1440072876-8321-2-git-send-email-haokexin@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1440072876-8321-1-git-send-email-haokexin@gmail.com> References: <1440072876-8321-1-git-send-email-haokexin@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Zijlstra , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ingo Molnar MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The jump_label_init() run in a very early stage, even before the sched_init(). So there is no chance for concurrent access of the jump label table. Signed-off-by: Kevin Hao --- kernel/jump_label.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/jump_label.c b/kernel/jump_label.c index f7dd15d537f9..df1a7fbe7cd5 100644 --- a/kernel/jump_label.c +++ b/kernel/jump_label.c @@ -205,7 +205,6 @@ void __init jump_label_init(void) struct static_key *key = NULL; struct jump_entry *iter; - jump_label_lock(); jump_label_sort_entries(iter_start, iter_stop); for (iter = iter_start; iter < iter_stop; iter++) { @@ -229,7 +228,6 @@ void __init jump_label_init(void) #endif } static_key_initialized = true; - jump_label_unlock(); } #ifdef CONFIG_MODULES