Received: by 10.223.185.116 with SMTP id b49csp6407067wrg; Wed, 28 Feb 2018 08:55:09 -0800 (PST) X-Google-Smtp-Source: AH8x224986dg+V2xhYeEabnEOVM3WnhTmc8XTY25hDPW+c7zUoz2WnFqKdj/d9VbKLywaOVV9c0Z X-Received: by 10.98.31.79 with SMTP id f76mr18424936pff.60.1519836909499; Wed, 28 Feb 2018 08:55:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519836909; cv=none; d=google.com; s=arc-20160816; b=Q0KQo+asBbWEUS1WeD2QdgMDAGcTyrvnZpk9tOYQflBtlV8iFQZslIj/zKNhO6O3iQ kRgkgZaxNxfAD56gXPxBKtMBNCkM2XH8Jm2Uj74Y7G6QKMk3JoHcbWjnaEzix68Ve38g MBYcOHh489DH1PMAbvLt5/5vTVzqWPTR7FyOKc11AsfLsAz5j/uMOiDQ3mKSUaTByLe2 VTn2yZwAcY6y4PBA1p1i05pVJ47EYzirFvyt9qrQ2gueQEzRF847rcAsNarI8Y3+0+DS w3UZx4HmVBTTv0oXDYqFKyJwlh6n/2R9GcKDg/6NBWW/JFZYYnoF2A2FSVmRTFez9+NV r3uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=EKbrfmAzxdEaRTC/8PftuOn+lhCkGn6P/tlnj0P6acw=; b=co/F2+L9njEjvCbVczH+yjnbD0/CRR97XDXtGVm7rblojk+AhY66PjPo3lR7wWto3/ VE5FUfj69kiGFFBNsfto4lw9mEvXnzpLQUtEXD+GKMaCNKLg4nt37bdWCHrIsZcyJAHJ SAGd/GL7NMRXV4Dmt21zhn/EGqfEAuxk1B4aN86kcSM/dPL/n6ueb6j2k+asAl4qQygy Gwp4uKoprTKpCCRWWQ4JXGjT42iGgwvyTjYFwo+hDEZpKs+mOB+r9A22nSu+mQE+ROUq LJVKsmFjprcJxRBF0/d6GaDpuvRxlbFM4QZpQ7rfjGCJdB40igmEqPUUvVxtFUuP14mP m7qw== 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 l4si1147332pgc.586.2018.02.28.08.54.54; Wed, 28 Feb 2018 08:55:09 -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 S934195AbeB1P5q (ORCPT + 99 others); Wed, 28 Feb 2018 10:57:46 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34520 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933979AbeB1P5o (ORCPT ); Wed, 28 Feb 2018 10:57:44 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yp-0006Xb-W1; Wed, 28 Feb 2018 15:22:28 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yj-0000Fk-Mv; Wed, 28 Feb 2018 15:22:21 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Benjamin Herrenschmidt" , "Michael Ellerman" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 199/254] powerpc: Don't preempt_disable() in show_cpuinfo() In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Benjamin Herrenschmidt commit 349524bc0da698ec77f2057cf4a4948eb6349265 upstream. This causes warnings from cpufreq mutex code. This is also rather unnecessary and ineffective. If we really want to prevent concurrent unplug, we could take the unplug read lock but I don't see this being critical. Fixes: cd77b5ce208c ("powerpc/powernv/cpufreq: Fix the frequency read by /proc/cpuinfo") Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman Signed-off-by: Ben Hutchings --- arch/powerpc/kernel/setup-common.c | 11 ----------- 1 file changed, 11 deletions(-) --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -216,14 +216,6 @@ static int show_cpuinfo(struct seq_file unsigned short maj; unsigned short min; - /* We only show online cpus: disable preempt (overzealous, I - * knew) to prevent cpu going down. */ - preempt_disable(); - if (!cpu_online(cpu_id)) { - preempt_enable(); - return 0; - } - #ifdef CONFIG_SMP pvr = per_cpu(cpu_pvr, cpu_id); #else @@ -328,9 +320,6 @@ static int show_cpuinfo(struct seq_file #ifdef CONFIG_SMP seq_printf(m, "\n"); #endif - - preempt_enable(); - /* If this is the last cpu, print the summary */ if (cpumask_next(cpu_id, cpu_online_mask) >= nr_cpu_ids) show_cpuinfo_summary(m);