From: Jonas Bonn Date: Thu, 14 Feb 2013 06:42:30 +0000 (+0100) Subject: openrisc: update DTLB-miss handler last X-Git-Tag: v3.9-rc1~59^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8668480eb79f0cbd79d6b584a10604d743853062;p=pandora-kernel.git openrisc: update DTLB-miss handler last The self-modifying code that updates the TLB handler at start-up has a subtle ordering requirement: the DTLB handler must be the last thing changed. What I was seeing was the following: i) The DTLB handler was updated ii) The following printk caused a TLB miss and the look-up resulted in the page containing itlb_vector (0xc0000a00) being bounced from the TLB. iii) The subsequent access to itlb_vector caused a TLB miss and reload of the page containing itlb_vector from the page tables. iv) But this reload of the page in iii) was being done by the "new" DTLB-miss handler which resulted (correctly) in the page flags being set to read-only; the subsequent write-access to itlb_vector thus resulted in a page (access) fault. This is easily remedied if we ensure that the boot-time DTLB-miss handler continues running until the very last bit of self-modifying code has been executed. This patch should ensure that the very last thing updated is the DTLB-handler itself. Signed-off-by: Jonas Bonn Acked-by: Julius Baxter Tested-by: Sebastian Macke --- Reading git-diff-tree failed