Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10571373pxu; Wed, 30 Dec 2020 06:08:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyK5S7sWMTfinqsEpWPXyOrLiYOFL8+ZuhyzLoaWSSUhdv2b3ma66xfc4VpRUnuWH3FqzYW X-Received: by 2002:a17:906:2f07:: with SMTP id v7mr43894693eji.343.1609337315100; Wed, 30 Dec 2020 06:08:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609337315; cv=none; d=google.com; s=arc-20160816; b=cpAAPO2N8G9VS6phG+my/65GJxjHQV+/fkdr417KyWucsd8ZaGnm32eVPhDSs7BT/t pwoob1p/cOrJqJkxFMWNbEvGFQAKF3fT3gB9BVKMwz+GwJ86OawrgxjTVmRN1fOTkpa0 tE7wJB/fP87h1evSkV5w0gO34UlFBASSIOVLkwTfwZs1hk0XWcRXP8OpNMyiAhN8KHV0 Vk3PWTTJcm3QGB+4xTg6s1T9iR5BTKh+W4zOvgl7Gv7EFa3rlL2VYPkipbLWfFI1vfAk /4AwbNy/cum11B+Kigorrs/uP6hDPW0XWMi/XamI5hFa/YXym7GNDJQ4yVEiprzoioyV JzfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=Fy/QSiWKrJJepxlTPsMdub2XRfCiCb86Kq4tKrXGspQ=; b=ivZufzk9AGdDJjyg5SyvS27zYjvw8JcpZfuhhTSwmGU43jTkjPU5D3JfERMYXuq5e7 HqcY5Ejm1WK+yw9GxxWC10UmAihMyafk1a11Hvia5Boi0gIx+o54f4xh95B82mufFzg/ kuPhWc1Dgla7mh1CgAvPs4uFpTUV0Z+mwaF/V/gDXg5y74RX+4UfEsx5yXOymx3d3zQc nIaHRpRmGtxi9/R9+86nZHe6GHex1wSoQ+ScSZ+iVnvvhwyL2KIpPQG+/Fq3VPKQ0BbL wYeF0iBqgy/+Tj8j0k5rOr+aR6vSXj4fcYlRCuggmb56Ol27/z+b34YriWJaT6Sz5Prm 3qfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VHXb3Xx7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v26si15848199ejc.336.2020.12.30.06.08.11; Wed, 30 Dec 2020 06:08:35 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=VHXb3Xx7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726924AbgL3OGM (ORCPT + 99 others); Wed, 30 Dec 2020 09:06:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbgL3OGM (ORCPT ); Wed, 30 Dec 2020 09:06:12 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F26F3C06179B for ; Wed, 30 Dec 2020 06:05:31 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id x12so8704603plr.10 for ; Wed, 30 Dec 2020 06:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Fy/QSiWKrJJepxlTPsMdub2XRfCiCb86Kq4tKrXGspQ=; b=VHXb3Xx73aMQvDIgzvtdlOrc8Xfp5B4iTldMd2+8MIhzp7oEmttAbOHK1ZMk9Mt9L7 8h6iFsaiLIoUeF3CEtqCjT9TtlSWpvOr8Y3qJjk38KtzL61cMr4MYjv20XpbW2mL1Ff5 bX2Ws2+qqwGtD67oyq0Qlc2XA+U4uaedS6FEldonHMLhxZ5qBgS+RpalozClhAaJroM4 xzaH5m/u1KmYYy+9QzvaQGRTHEgELW0O/iFYLRpfgmeV0nxCUdhQBPO+HGj/Iq7+9QEg BBehIE3xuQ5ovRV+Dpph8SHcu/y3uiyYtWY5plPIvZy4FA5QgMokj2+ueErDQYxEoU0b cdBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Fy/QSiWKrJJepxlTPsMdub2XRfCiCb86Kq4tKrXGspQ=; b=qAXfNfCx+pC2Oi/5tWJwkSlZmJyGSqLp72S7nbfZ5XX2z98UdFjM6a0hFaSJyeC5Kd JLqMFB/sQ2TgloMyeQwntdeq6FN9+tTq9SVMZbJwRVhRBdnPkg02DjEO4ZaYgifRLiMg rLzapA0irToFyO6aOhGsbNoVe3mwG07sCrZGgGY3WxUvXxaXRcl7LuMVVTF1tmS1KTPa JUQ1K4hWwv6fmSUbNA458NlVcRN33XQSQVSBZ7Qx2P9wbmGadqpOfwxBZeMtRQQWAS09 Y+76HkJWrnNVfQna7wugNEBh6OVk+xIfSNLFzpBMGWMKz8Y4z513FKAEk/DFgY/lzpuh wvYw== X-Gm-Message-State: AOAM532i651FOp5NO0Qw5bvlpT/Cofbnb16NAVD1TO+cUwLERMowcaw8 S7Vrf2RsBme1xzGb1nzyd14= X-Received: by 2002:a17:902:eb53:b029:da:da92:c187 with SMTP id i19-20020a170902eb53b02900dada92c187mr53594914pli.34.1609337130329; Wed, 30 Dec 2020 06:05:30 -0800 (PST) Received: from localhost ([13.94.42.177]) by smtp.gmail.com with ESMTPSA id 84sm44427633pfy.9.2020.12.30.06.05.29 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Dec 2020 06:05:29 -0800 (PST) From: Qiujun Huang To: rostedt@goodmis.org, mingo@redhat.com, linux-kernel@vger.kernel.org Cc: Qiujun Huang Subject: [PATCH v2] trace: Remove get/put_cpu() from function_trace_init Date: Wed, 30 Dec 2020 22:05:21 +0800 Message-Id: <20201230140521.31920-1-hqjagain@gmail.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit b6f11df26fdc ("trace: Call tracing_reset_online_cpus before tracer->init()"), get/put_cpu() are not needed anymore. We can use raw_smp_processor_id() instead. Signed-off-by: Qiujun Huang --- v2: Use raw_smp_processor_id() instead of smp_processor_id() --- kernel/trace/trace_functions.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index c5095dd28e20..f67aec5bb771 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c @@ -106,8 +106,7 @@ static int function_trace_init(struct trace_array *tr) ftrace_init_array_ops(tr, func); - tr->array_buffer.cpu = get_cpu(); - put_cpu(); + tr->array_buffer.cpu = raw_smp_processor_id(); tracing_start_cmdline_record(); tracing_start_function_trace(tr); -- 2.17.1