Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp730901ybz; Sat, 25 Apr 2020 03:05:41 -0700 (PDT) X-Google-Smtp-Source: APiQypJUu69OPUzeiQT2xhALxZabfU3/oyCJrEFskF3Xrv2GWzakkxPSQGzy58zfu989yBsPAmNx X-Received: by 2002:a50:a0c7:: with SMTP id 65mr11360613edo.7.1587809141169; Sat, 25 Apr 2020 03:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587809141; cv=none; d=google.com; s=arc-20160816; b=wgafPCahcm6mIMAbwF/Y7k+2S8cMuWVZFIbezaT4/lnDYtNHQQ5ctj2TILX9gWXsW3 i/EftOIxMneZ0qTcYM8wEE0e1H66whMAZjz8AsD0dc3h9dyx73CibaCsj6N//UOqDOxC L46c3sH3yv/qTsSm+2kZypfVpmTEJhJbSO/rVSE4B/iidGuPTSlKJKEE6q9VgNYQb6yx 6BCdW0xioAF63opTHz7Y47stabpl+a3IBcyIYGUqK1xBm19XvksNapRXUUL9h1Opzoy/ T0XCcSdTtZrh2Vui/5WkP8MRrO4+mg9YeVJ0hKR5ahkeM5xnYkGDhNreBdHF8O9NDnTi dHqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=S6Ig2eppmsbO17FXR49uSOjWUJZ37OfJgqKcCxWCa84=; b=xMWJicy+tSd5m+A6rvsZ+spuTV6onzTj8jrAuIgRtZdebu0HgkC5KMDu3TFQExZ+mD TV1FiQIV1C3SOJ85cLo/Vi7+CR8EoSSzGEUdsa92bLTwAWN+xIHYITFSwuwDaS8mrPnF JHmFBG+9fCagOJn23OZIDZT/XTLNsP0Qfuu44CXCW4N3UK+Ah3DL71xOsuS2/i0DA+fq 2LrabB9AuYxX9/rPMkD5ccoPpSrE34wyoXqn2BEh1RZE80k8KrLR/67ykUZao98f6xn5 0ULTsHSK4ZZ5OBkdrtudjFXTFsTiVSgKLq4Uy27XMLAwn9L0TMf9lvKFrBF0fX20MgOX xi3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jEx2UJrZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si4667472edq.510.2020.04.25.03.05.18; Sat, 25 Apr 2020 03:05:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jEx2UJrZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726192AbgDYKDk (ORCPT + 99 others); Sat, 25 Apr 2020 06:03:40 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:26736 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726138AbgDYKDf (ORCPT ); Sat, 25 Apr 2020 06:03:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587809014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S6Ig2eppmsbO17FXR49uSOjWUJZ37OfJgqKcCxWCa84=; b=jEx2UJrZtYF+xhtsH8uDc4xWtcrdz05JtdiSSRijTN9daasCeBUCeHC2rrHjMzKmWjWzJr lwRDXp1yb0UuzKu2UWT7W9EH27P0GgUDObibbQ8yNoRXah+IiJT2f487VKgSO3WbSaCFGa 0kG0pMufaOyud9N06FFmptkFLTDQFTo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-309-0URwTm21MWC7NzV9_DyFRg-1; Sat, 25 Apr 2020 06:03:29 -0400 X-MC-Unique: 0URwTm21MWC7NzV9_DyFRg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1ACB680B70B; Sat, 25 Apr 2020 10:03:28 +0000 (UTC) Received: from treble.redhat.com (ovpn-114-29.rdu2.redhat.com [10.10.114.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id EFAFF60627; Sat, 25 Apr 2020 10:03:26 +0000 (UTC) From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Vince Weaver , Dave Jones , Jann Horn , Miroslav Benes , Andy Lutomirski , Thomas Gleixner Subject: [PATCH v2 06/11] x86/unwind/orc: Convert global variables to static Date: Sat, 25 Apr 2020 05:03:05 -0500 Message-Id: <43ae310bf7822b9862e571f36ae3474cfde8f301.1587808742.git.jpoimboe@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These variables aren't used outside of unwind_orc.c, make them static. Also annotate some of them with '__ro_after_init', as applicable. Signed-off-by: Josh Poimboeuf Reviewed-by: Miroslav Benes --- arch/x86/kernel/unwind_orc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c index e9cc182aa97e..64889da666f4 100644 --- a/arch/x86/kernel/unwind_orc.c +++ b/arch/x86/kernel/unwind_orc.c @@ -15,12 +15,12 @@ extern int __stop_orc_unwind_ip[]; extern struct orc_entry __start_orc_unwind[]; extern struct orc_entry __stop_orc_unwind[]; =20 -static DEFINE_MUTEX(sort_mutex); -int *cur_orc_ip_table =3D __start_orc_unwind_ip; -struct orc_entry *cur_orc_table =3D __start_orc_unwind; +static bool orc_init __ro_after_init; +static unsigned int lookup_num_blocks __ro_after_init; =20 -unsigned int lookup_num_blocks; -bool orc_init; +static DEFINE_MUTEX(sort_mutex); +static int *cur_orc_ip_table =3D __start_orc_unwind_ip; +static struct orc_entry *cur_orc_table =3D __start_orc_unwind; =20 static inline unsigned long orc_ip(const int *ip) { --=20 2.21.1