Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759749AbbEEQJq (ORCPT ); Tue, 5 May 2015 12:09:46 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:16610 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2993343AbbEEPQT (ORCPT ); Tue, 5 May 2015 11:16:19 -0400 Message-ID: <5548DDF4.2020404@oracle.com> Date: Tue, 05 May 2015 11:12:52 -0400 From: Boris Ostrovsky User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Hanjun Guo , "Rafael J. Wysocki" CC: Will Deacon , Catalin Marinas , Stefano Stabellini , Lorenzo Pieralisi , Sudeep Holla , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org Subject: Re: [PATCH v2 3/7] ACPI / processor: Introduce invalid_logical_cpuid() References: <1430793998-21631-1-git-send-email-hanjun.guo@linaro.org> <1430793998-21631-4-git-send-email-hanjun.guo@linaro.org> In-Reply-To: <1430793998-21631-4-git-send-email-hanjun.guo@linaro.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 805 Lines: 23 On 05/04/2015 10:46 PM, Hanjun Guo wrote: > In ACPI processor drivers, we use direct comparisons of cpu logical > id with -1 which are error prone in case logical cpuid is accidentally > assinged an error code and prevents us from returning an error-encoding > cpuid directly in some cases. Which is exactly what Xen code does (xen_pcpu_id() and xen_hotadd_cpu()). And patch 4/7 fixes this. -boris > > So introduce invalid_logical_cpuid() to identify cpu with invalid > logical cpu num, then it will be used to replace the direct comparisons > with -1. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/