Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9464883pxu; Mon, 28 Dec 2020 17:31:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7gP2ggJ8VkdLC8ImU8PzO7CP6vwpNsTGrwUehKVODIlhpcn4tZu325q23+hcL9ljUjt52 X-Received: by 2002:a17:906:1719:: with SMTP id c25mr26865463eje.251.1609205460199; Mon, 28 Dec 2020 17:31:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609205460; cv=none; d=google.com; s=arc-20160816; b=RqSsKM4/HBiUp4dT4X+zV396G6sIVuCSAGRpJ1xETuTYWup4qaR5+8DdO9CUJEZ6lS mDMcPC8P5cWeck9idHzkOYLLRGAIPaMXDdin10KdEvvk+j70MAptfdORI7kmAcvgIaCf lQPB5mN0FDhIbAJU1Cu604GxXefGS5yBEYraRdIvfc3rxUnKucmNjMxnba67iTP9pQ4a L8IJmWWQnxbc8YU98PBFjwFVn9sDf15TplBsjdTHoOESlCrxvRbJzpZqdZPIiYQilEDu Jc0YV7RVGkeDEgnxSom+n0gW0Uk2lD1CbZbfFXvEWhPaSOUyY/l9n8lw6GHlCmLfTL5x iw/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=etoaoUa8hzWf5WHAdxzCfvjTO9FjDBuChBEOvWdl9CY=; b=jBmp9P4XZ725lTkbVQPgDnpnpRe1xUsD8u46rBgPRpIBlLjVP8eTHo0b8mQ2CnM7N1 5KKabFKDhjibBvH3EtYqNAJ+Bl2Ww75Z5CG941dcdvt0KfUXlHFlsy7cL1m1NaWFwHbl VmQ79mGAbhbILm5IElQwE+gNP8MP1iY6EiP37kgmnVbesRfrg8XQvxpQiDouxway6Rk+ QUAR2gTX5HKN0YDt7sZf1CQsKmgkrQAaRrGw15L9573Urr7epeIkMMdenHflIO8VMw4i niDJuLtJRuNrKLAbGgylbcCVQFKfNf/FEPG+0I6wLwMhCJRrYkH6OFjx4S0jPQMX1A22 c6ug== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d19si21966064eds.173.2020.12.28.17.30.37; Mon, 28 Dec 2020 17:31:00 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731836AbgL1W4X (ORCPT + 99 others); Mon, 28 Dec 2020 17:56:23 -0500 Received: from elvis.franken.de ([193.175.24.41]:43919 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729595AbgL1V6G (ORCPT ); Mon, 28 Dec 2020 16:58:06 -0500 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1ku0W4-0005wv-03; Mon, 28 Dec 2020 22:57:24 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id CBCC8C05C4; Mon, 28 Dec 2020 22:40:35 +0100 (CET) Date: Mon, 28 Dec 2020 22:40:35 +0100 From: Thomas Bogendoerfer To: Tiezhu Yang Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Wei Li , Xuefeng Li Subject: Re: [PATCH] MIPS: No need to check CPU 0 in cps_cpu_disable() Message-ID: <20201228214035.GD24617@alpha.franken.de> References: <1608008846-27206-1-git-send-email-yangtiezhu@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1608008846-27206-1-git-send-email-yangtiezhu@loongson.cn> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 15, 2020 at 01:07:26PM +0800, Tiezhu Yang wrote: > After commit 9cce844abf07 ("MIPS: CPU#0 is not hotpluggable"), > c->hotpluggable is 0 for CPU 0 and it will not generate a control > file in sysfs for this CPU: > > [root@linux loongson]# cat /sys/devices/system/cpu/cpu0/online > cat: /sys/devices/system/cpu/cpu0/online: No such file or directory > [root@linux loongson]# echo 0 > /sys/devices/system/cpu/cpu0/online > bash: /sys/devices/system/cpu/cpu0/online: Permission denied > > So no need to check CPU 0 in cps_cpu_disable(), just remove it. > > Reported-by: liwei (GF) > Signed-off-by: Tiezhu Yang > --- > > cps_cpu_disable() is not done in the early similar patch, > sorry for that. > > arch/mips/kernel/smp-cps.c | 3 --- > 1 file changed, 3 deletions(-) applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]