Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2037923imm; Thu, 24 May 2018 04:56:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpkB5NOoJy+H0KjyvunG7Wjm9mFU63SjFAwlALBhtFm4viQeXHBNPJUOcS4YquM+kGjw/LZ X-Received: by 2002:a65:5b8a:: with SMTP id i10-v6mr5717409pgr.352.1527163018956; Thu, 24 May 2018 04:56:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527163018; cv=none; d=google.com; s=arc-20160816; b=H/D+vPn5yDfm+ddbaogpZ7zs7UfZVHTNGSmII7wkZqYluryAcU0G3GXI0VErN5oTiM YAulBRLzYO8fcGth301HP6gHMOmsss8JTxCBW8wkgm6XFsNgdw7PE9B/evzr1s8XKa9r azFiV2HCDKHu7pAmB6/dbnbM+2uMkwN+5wH/hIvLp9yEGUGE7dV1RlfNl0Jgz2ZfYaDX TRs2XwcUCTMPVyNIDJC2Ux226hiNfwx4MelkRajCOPdJQgqkWtOnYB8nr5ChOAtCSIVF PVZqvQbB89cZolxOmRosEfTTKuX1SD0mSgLeTB++dEURB7lbD4iZs14egsLN1gvM3HNl 1X2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=gFsTtcJ5uvbsIQ9XE3L5c1HgVf27F2AVT9hP1JOM4lg=; b=D6O2KXZnZR6tHIK8Ny7KLi88/IeCl1dSMTYFxl6ocXqOvn6VN+ajD0xHisYSGzuqeZ 2wS5HleG9rIbdS0fdrdnMirs4CL3bJf/8HbiUz3yaflpC1CcY56uK4qUxG+fT6O5vPSN mhufqFft0U9ldVJ/boksYyFpQckBojXtSoGp4gW17gVJ5MVpqvjDkdQtEoIROVPbDu6e iOVzUAyn5qPfhSr3JteCFfXxgrhYBkMU8+Weq3tPNy1JuYEdqzVS3gvq45SrFkmQbwzD 4Mqc210teqmtaNt+wFGvdv8hoWZHvLXcxybKkV+AW9xk9hTE5AgLKZlQtMjK6Gp/CTlk SY4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FdObbt/j; 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 s9-v6si21520922pfk.46.2018.05.24.04.56.44; Thu, 24 May 2018 04:56:58 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=FdObbt/j; 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 S969419AbeEXLzE (ORCPT + 99 others); Thu, 24 May 2018 07:55:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:57282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966877AbeEXJqH (ORCPT ); Thu, 24 May 2018 05:46:07 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9D923208D6; Thu, 24 May 2018 09:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155167; bh=JBTtbhbB5aY5HCFsqGZqdG4p68RJ80+0R0ng5dtH4Io=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FdObbt/jM7pI4wpA12dPN+r5FvW+4wrEUksqEbBwui0ipmLYpT8YusyQZyV7zeA28 RqgHd5SjayonRetkBe+A03H3qtr80Zl+AtkQxnwJfeL3nZNJBFL04iDlg+KEatmkAb tIrntIY6DWlbvIeg1S6vIB1ja+3/ZVb7srYuDpL4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Herrenschmidt , Michael Ellerman , Michal Suchanek Subject: [PATCH 4.4 46/92] powerpc: Dont preempt_disable() in show_cpuinfo() Date: Thu, 24 May 2018 11:38:23 +0200 Message-Id: <20180524093203.791914291@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093159.286472249@linuxfoundation.org> References: <20180524093159.286472249@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable 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 Acked-by: Michal Suchanek Signed-off-by: Greg Kroah-Hartman --- 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 @@ -217,14 +217,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 @@ -329,9 +321,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);