Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755455AbbGQVZN (ORCPT ); Fri, 17 Jul 2015 17:25:13 -0400 Received: from cantor2.suse.de ([195.135.220.15]:54712 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753307AbbGQVZL (ORCPT ); Fri, 17 Jul 2015 17:25:11 -0400 Date: Fri, 17 Jul 2015 23:25:07 +0200 From: Jean Delvare To: Guenter Roeck Cc: "Odzioba, Lukasz" , "Yu, Fenghua" , lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hwmon: coretemp: use list instead of fixed size array for temp data Message-ID: <20150717232507.1839182e@endymion.delvare> In-Reply-To: <55A95942.4060605@roeck-us.net> References: <1436976253-4810-1-git-send-email-lukasz.odzioba@intel.com> <20150715230734.76347af2@endymion.delvare> <55A93365.4000702@roeck-us.net> <20150717211103.66000d47@endymion.delvare> <55A95942.4060605@roeck-us.net> Organization: SUSE Linux X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1120 Lines: 31 On Fri, 17 Jul 2015 12:36:34 -0700, Guenter Roeck wrote: > Hi Jean, > > On 07/17/2015 12:11 PM, Jean Delvare wrote: > > > > > We could just drop NUM_REAL_CORES and use CONFIG_NR_CPUS instead, I > > would be fine with that. This lets people worried about memory > > consumption control it. > > Unfortunately this won't work because the CPU ID is non-linear; > an 8-core system may have a CPU ID larger than 7. Oh right, I forgot about that. Brilliant hardware/firmware engineers... Well that does not prevent us from using CONFIG_NR_CPUS, "just" the code would need to be modified to remove the assumption that the array index matches the logical CPU ID. BTW I wonder how the rest of the kernel handles the situation. CONFIG_NR_CPUS is used where relevant so there certainly _is_ a linear numbering which is independent from the CPU ID. -- Jean Delvare SUSE L3 Support -- 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/