From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761302AbYBSWkr (ORCPT ); Tue, 19 Feb 2008 17:40:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754440AbYBSWki (ORCPT ); Tue, 19 Feb 2008 17:40:38 -0500 Received: from rv-out-0910.google.com ([209.85.198.190]:64076 "EHLO rv-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753653AbYBSWkh (ORCPT ); Tue, 19 Feb 2008 17:40:37 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=wA/gIqRxo/i2reQukG2PJqsFGwS9vB1jo/dvWCeS3zOlNY5nVsw2t4c3pLPdO7cLS+zcmaQGEYrbfTXMQclBYkbLHGhQ2NyJtPcR4M9PjyqruBLyzRPt5sr7h62bLkcpS9uKGg42YPsZvoKwpwKe+hOqFNlgFBqpeNvJo2peVIE= Message-ID: <12c511ca0802191440q6a2f5604xe6b563c32c3a90b2@mail.gmail.com> Date: Tue, 19 Feb 2008 14:40:35 -0800 From: "Tony Luck" To: "Roland Dreier" Subject: Re: Strange hang on ia64 with CONFIG_PRINTK_TIME=y Cc: "David Miller" , mingo@elte.hu, linux-kernel@vger.kernel.org In-Reply-To: <12c511ca0802141817i3295e83cxd7c05e07f2c54fea@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_11673_8312711.1203460835389" References: <20080213125725.GC6344@elte.hu> <20080213.050340.64342037.davem@davemloft.net> <12c511ca0802131659u6e4407d9w96148fe72d6e11d7@mail.gmail.com> <20080213.170452.68851396.davem@davemloft.net> <12c511ca0802131933g6aaaec9cidbfbfcac6f394c63@mail.gmail.com> <12c511ca0802141327j6e31e8c2tee1d679053b604fc@mail.gmail.com> <1FE6DD409037234FAB833C420AA843EC97C8B0@orsmsx424.amr.corp.intel.com> <12c511ca0802141817i3295e83cxd7c05e07f2c54fea@mail.gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ------=_Part_11673_8312711.1203460835389 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > Perhaps what is happening is that cpu0 comes online ... safely skips > over the early printk calls. Calls cpu_init() which sets up the resources > *it* needs (ar.k3 points to per-cpu space), and then executes > sched_init() which marks it safe for all printk's. Then cpu1 comes > up and does a printk before it gets to cpu_init(). I just tried Ingo's patch[1] on a 2.6.25-rc2 kernel with printk timestamps turned on ... and it booted just fine on my tiger4. The default path for non-boot cpus is from head.S to start_secondary(), and that calls cpu_init() pretty quickly. There shouldn't normally[2] be any printk() calls on the non-boot cpu before it is safe to do so. -Tony [1] Attached [2] If you set #define SMP_DEBUG in arch/ia64/kernel/smpboot.c that enables at least one printk() that will cause problems if you have also configured timestamps. ------=_Part_11673_8312711.1203460835389 Content-Type: text/x-patch; name=ingo.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_fcv1hlqr0 Content-Disposition: attachment; filename=ingo.patch IGtlcm5lbC9zY2hlZC5jIHwgICAxNCArKysrKysrKysrLS0tLQogMSBmaWxlIGNoYW5nZWQsIDEw IGluc2VydGlvbnMoKyksIDQgZGVsZXRpb25zKC0pCgpJbmRleDogbGludXgteDg2LnEva2VybmVs L3NjaGVkLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PQotLS0gbGludXgteDg2LnEub3JpZy9rZXJuZWwvc2NoZWQuYwor KysgbGludXgteDg2LnEva2VybmVsL3NjaGVkLmMKQEAgLTY2Niw2ICs2NjYsOCBAQCBjb25zdF9k ZWJ1ZyB1bnNpZ25lZCBpbnQgc3lzY3RsX3NjaGVkX3J0CiAgKi8KIGNvbnN0X2RlYnVnIHVuc2ln bmVkIGludCBzeXNjdGx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