From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Kenneth W" Date: Thu, 09 Oct 2003 15:36:51 +0000 Subject: wrong initial ia64_kr(current_stack) value MIME-Version: 1 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C38E7B.29196AC4" Message-Id: List-Id: To: linux-ia64@vger.kernel.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C38E7B.29196AC4 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable We start seeing random kernel hang at fairly late stage of booting when = lots of processes are spawned by the init script. The kernel used is a = variant of 2.4.21. At the time of the hang, one CPU is stuck in page = fault handler with no apparent valid dtlb mapping for the kernel stack. = Interesting enough, the task that the stuck CPU is executing has its = kernel stack allocated out of 16-32MB physical memory range (we are = using 16MB kernel granule in this exercise). We finally tracked it down = to be a bug in _start() where IA64_KR(CURRENT_STACK) was incorrectly = initialized. This code in head.S is wrong: =20 mov r16=3DKERNEL_TR_PAGE_NUM ;; // load the "current" pointer (r13) and ar.k6 with the current task mov r13=3Dr2 mov IA64_KR(CURRENT)=3Dr3 // Physical address // initialize k4 to a safe value (64-128MB is mapped by TR_KERNEL) mov IA64_KR(CURRENT_STACK)=3Dr16 r16 is loaded with the kernel page number measured in = (1<