Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753912Ab2BSMUe (ORCPT ); Sun, 19 Feb 2012 07:20:34 -0500 Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]:37066 "EHLO mail-lpp01m010-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753188Ab2BSMUd (ORCPT ); Sun, 19 Feb 2012 07:20:33 -0500 Authentication-Results: mr.google.com; spf=pass (google.com: domain of jiangtao.jit@gmail.com designates 10.152.104.143 as permitted sender) smtp.mail=jiangtao.jit@gmail.com; dkim=pass header.i=jiangtao.jit@gmail.com MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 19 Feb 2012 20:20:31 +0800 Message-ID: Subject: A problem with percpu variable cpu_number From: Tao Jiang To: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 989 Lines: 37 Hi: I've asked the question on kernelnewbies, no replies. So forward it here. Thank you. ---------- Forwarded message ---------- From: tao jiang Date: 2012/2/16 Subject: A problem with percpu variable cpu_number To: kernelnewbies Hi : At the beginning of start_kernel() -- init/main.c boot_cpu_init() is called and in boot_cpu_init() will call smp_processor_id() it's a macro and it will be expanded as (percpu_read(cpu_number)) and so on but i noticed that it's before setup_per_cpu_areas() in start_kernel() is that mean the percpu areas hadn't be initialized yet but why smp_processor_id() could be called before setup_per_cpu_areas() Thank you. --------------- jiangtao -- 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/