Received: by 10.213.65.68 with SMTP id h4csp371760imn; Tue, 20 Mar 2018 05:40:48 -0700 (PDT) X-Google-Smtp-Source: AG47ELsE7zYcBe/JFSy4gUhDf4RcXKaXgAevO6U2YMSnNGKOkdEi+t3Gw8Tkn8EI8/MDJ8zpXfo5 X-Received: by 10.98.35.202 with SMTP id q71mr10732301pfj.9.1521549648498; Tue, 20 Mar 2018 05:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521549648; cv=none; d=google.com; s=arc-20160816; b=ttLIZMZ2L27AqNHYxzqCON9qR9wY9cdi5q+lLTG5waKTQzM4vkcBTXSuMh5SzKv0KT BC8ze7awDmtfrX3XJzOOHCJgesiF+TcR/oikP4sqVn6lTgTVojQDivUN9nZC9NQyjAHt D4cPaA98i4Q1Rpjze71a0Km/0Lbn9J5Tyqvm3SySxpBo64K0VR75u8JW2bYz/GeNpIaS PRc0PMbez6SEZ3NoH6BLFxdBIbSr8OEjACHD0/MKFVSH40+pV2mqBt5Eu8Gbo8hX4RVj wT4vARrrbGaYNVE3yIuyzJl+gVxwoK8hMBxrDUfYjrBm9iVmcaOnlfO3KhA24e7WxvjN lL9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=CCljIuv3twwVPjj1K0vdQBEWsf6svLwcDmXMcP7fPw0=; b=qNjo2rnTSMi58O8N/uIYVjIYKUeu5RPlyZBfj9xD11saKWPA88D+nAQbVgRmXQrlTF Nz+M5O4v/AJW2cy5dTaFkXvhDagBVbu0T2duCy4mSS67Rvgji1KeryCDPa1n3anJlkPU TTccpHLz5x5Oi2JFzvHxy7BYPV7sUot42NoENL+r9VU3FEdDTRTq7qfCnoryeo+l+25c KPLh7W3fBA15j0DcCqiqbb8+zt7N0z3lXF0wz22ZCVbwXzTCq/KmMUFTZV/LL/S3vC1j kobVEAtv6P36PiPoPlAlyEu42TLCPZ6aLyw9eniCPyXk7h5wH8K7ckMbWLRpptmPdf4D 628w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=G8/8WRJZ; 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 z19si1120374pgn.46.2018.03.20.05.40.33; Tue, 20 Mar 2018 05:40:48 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=G8/8WRJZ; 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 S1753258AbeCTMjb (ORCPT + 99 others); Tue, 20 Mar 2018 08:39:31 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:51356 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753019AbeCTMj2 (ORCPT ); Tue, 20 Mar 2018 08:39:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=CCljIuv3twwVPjj1K0vdQBEWsf6svLwcDmXMcP7fPw0=; b=G8/8WRJZ+Mo6M00DRTg1Wad4G T4tG6ep/jKj6bkHRQkRHBQDTu+OBFYKlhU2ZnMlA5p8Kb+Y17mAn4LvJsdv0NkcnXwnt9Gnh/pFq0 fNf9a4yEs64/9dgBsWfVfEUElZuPaQxydaDewcMnF/xcnec5kC+0cvhDT0uH16iLymvaJgfUUL6aJ NoRDuQkumiD0IsAtZvh9QXVYglp9EzUdjf559Fc2LGxZSBR0BadkLZsdJ8lDzK8MI7UOI79y5XRgt mSiqXRjJqGXvUZ7dYWiujGdSyGcMGY7fBo0WgwJPGE0Kpadb+w83oCHLr7epGP+q6zRlm7pFGN/3L L9rlrOe5w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyGXw-0005NV-K1; Tue, 20 Mar 2018 12:39:20 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 28D69202A2A03; Tue, 20 Mar 2018 13:39:18 +0100 (CET) Date: Tue, 20 Mar 2018 13:39:18 +0100 From: Peter Zijlstra To: Dou Liyang Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-acpi@vger.kernel.org, linux-doc@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, corbet@lwn.net, rjw@rjwysocki.net, lenb@kernel.org, hpa@zytor.com Subject: Re: [PATCH 3/5] x86/smpboot: Make the check code more clear in prefill_possible_map() Message-ID: <20180320123918.GS4043@hirez.programming.kicks-ass.net> References: <20180320110432.28127-1-douly.fnst@cn.fujitsu.com> <20180320110432.28127-4-douly.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180320110432.28127-4-douly.fnst@cn.fujitsu.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 20, 2018 at 07:04:30PM +0800, Dou Liyang wrote: > case 1: no | no | no | --> min (setup_possible_cpus, nr_cpu_ids, setup_max_cpus) > case 2: no | no | yes| --> min (setup_possible_cpus, nr_cpu_ids) > case 3: no | yes | no | --> 1 > case 4: no | yes | yes| --> 1 > case 5: yes | no | no | --> min (num_processors, nr_cpu_ids, setup_max_cpus) > case 6: yes | no | yes| --> min (num_processors + disabled_cpus, nr_cpu_ids) > case 7: yes | yes | no | --> 1 > case 8: yes | yes | yes| --> 1 The case number is off by one ;-)