Am 06.05.2012 20:45, schrieb Blue Swirl:
Check CPU ID if we're running on boot CPU. If so, don't use SMP table information since it may contain uninitialized or garbage values.
Signed-off-by: Blue Swirl blauwirbel@gmail.com
arch/sparc32/entry.S | 11 +++++++++++ 1 file changed, 11 insertions(+)
I've still not got around to testing this on ppc yet, but on x86_64 valgrind was happy.
sparc64 seems to have a similar problem though according to valgrind:
==22736== Thread 3: ==22736== Conditional jump or move depends on uninitialised value(s) ==22736== at 0x2C8050: compute_all_sub (cc_helper.c:37) ==22736== by 0x2C84A8: helper_compute_psr (cc_helper.c:470) ==22736== by 0x9769447: ??? ==22736== Uninitialised value was created by a heap allocation ==22736== at 0x4C27CE8: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x4C27D97: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x256061: qemu_memalign (oslib-posix.c:93) ==22736== by 0x256109: qemu_vmalloc (oslib-posix.c:126) ==22736== by 0x2D1EF6: qemu_ram_alloc_from_ptr (exec.c:2664) ==22736== by 0x2F5FF6: memory_region_init_ram (memory.c:954) ==22736== by 0x303EFD: ram_init1 (sun4u.c:711) ==22736== by 0x268E1E: qdev_init (qdev.c:151) ==22736== by 0x268F5C: qdev_init_nofail (qdev.c:258) ==22736== by 0x304620: sun4uv_init (sun4u.c:729) ==22736== by 0x304F1F: sun4u_init (sun4u.c:932) ==22736== by 0x1846D8: main (vl.c:3519) ==22736== ==22736== Conditional jump or move depends on uninitialised value(s) ==22736== at 0x2C7F92: compute_all_sub_xcc (cc_helper.c:60) ==22736== by 0x2C84C2: helper_compute_psr (cc_helper.c:473) ==22736== by 0x9769447: ??? ==22736== Uninitialised value was created by a heap allocation ==22736== at 0x4C27CE8: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x4C27D97: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x256061: qemu_memalign (oslib-posix.c:93) ==22736== by 0x256109: qemu_vmalloc (oslib-posix.c:126) ==22736== by 0x2D1EF6: qemu_ram_alloc_from_ptr (exec.c:2664) ==22736== by 0x2F5FF6: memory_region_init_ram (memory.c:954) ==22736== by 0x303EFD: ram_init1 (sun4u.c:711) ==22736== by 0x268E1E: qdev_init (qdev.c:151) ==22736== by 0x268F5C: qdev_init_nofail (qdev.c:258) ==22736== by 0x304620: sun4uv_init (sun4u.c:729) ==22736== by 0x304F1F: sun4u_init (sun4u.c:932) ==22736== by 0x1846D8: main (vl.c:3519) ==22736== ==22736== Conditional jump or move depends on uninitialised value(s) ==22736== at 0x2C8050: compute_all_sub (cc_helper.c:37) ==22736== by 0x2C84A8: helper_compute_psr (cc_helper.c:470) ==22736== by 0x97C39BC: ??? ==22736== Uninitialised value was created by a heap allocation ==22736== at 0x4C27CE8: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x4C27D97: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x256061: qemu_memalign (oslib-posix.c:93) ==22736== by 0x256109: qemu_vmalloc (oslib-posix.c:126) ==22736== by 0x2D1EF6: qemu_ram_alloc_from_ptr (exec.c:2664) ==22736== by 0x2F5FF6: memory_region_init_ram (memory.c:954) ==22736== by 0x303EFD: ram_init1 (sun4u.c:711) ==22736== by 0x268E1E: qdev_init (qdev.c:151) ==22736== by 0x268F5C: qdev_init_nofail (qdev.c:258) ==22736== by 0x304620: sun4uv_init (sun4u.c:729) ==22736== by 0x304F1F: sun4u_init (sun4u.c:932) ==22736== by 0x1846D8: main (vl.c:3519) ==22736== ==22736== Conditional jump or move depends on uninitialised value(s) ==22736== at 0x2C7F92: compute_all_sub_xcc (cc_helper.c:60) ==22736== by 0x2C84C2: helper_compute_psr (cc_helper.c:473) ==22736== by 0x97C39BC: ??? ==22736== Uninitialised value was created by a heap allocation ==22736== at 0x4C27CE8: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x4C27D97: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x256061: qemu_memalign (oslib-posix.c:93) ==22736== by 0x256109: qemu_vmalloc (oslib-posix.c:126) ==22736== by 0x2D1EF6: qemu_ram_alloc_from_ptr (exec.c:2664) ==22736== by 0x2F5FF6: memory_region_init_ram (memory.c:954) ==22736== by 0x303EFD: ram_init1 (sun4u.c:711) ==22736== by 0x268E1E: qdev_init (qdev.c:151) ==22736== by 0x268F5C: qdev_init_nofail (qdev.c:258) ==22736== by 0x304620: sun4uv_init (sun4u.c:729) ==22736== by 0x304F1F: sun4u_init (sun4u.c:932) ==22736== by 0x1846D8: main (vl.c:3519) ==22736== ==22736== Conditional jump or move depends on uninitialised value(s) ==22736== at 0x2C83AF: compute_all_logic (cc_helper.c:37) ==22736== by 0x2C84A8: helper_compute_psr (cc_helper.c:470) ==22736== by 0x97C3A67: ??? ==22736== Uninitialised value was created by a heap allocation ==22736== at 0x4C27CE8: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x4C27D97: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x256061: qemu_memalign (oslib-posix.c:93) ==22736== by 0x256109: qemu_vmalloc (oslib-posix.c:126) ==22736== by 0x2D1EF6: qemu_ram_alloc_from_ptr (exec.c:2664) ==22736== by 0x2F5FF6: memory_region_init_ram (memory.c:954) ==22736== by 0x303EFD: ram_init1 (sun4u.c:711) ==22736== by 0x268E1E: qdev_init (qdev.c:151) ==22736== by 0x268F5C: qdev_init_nofail (qdev.c:258) ==22736== by 0x304620: sun4uv_init (sun4u.c:729) ==22736== by 0x304F1F: sun4u_init (sun4u.c:932) ==22736== by 0x1846D8: main (vl.c:3519) ==22736== ==22736== Conditional jump or move depends on uninitialised value(s) ==22736== at 0x2C8441: compute_all_logic_xcc (cc_helper.c:60) ==22736== by 0x2C84C2: helper_compute_psr (cc_helper.c:473) ==22736== by 0x97C3A67: ??? ==22736== Uninitialised value was created by a heap allocation ==22736== at 0x4C27CE8: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x4C27D97: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x256061: qemu_memalign (oslib-posix.c:93) ==22736== by 0x256109: qemu_vmalloc (oslib-posix.c:126) ==22736== by 0x2D1EF6: qemu_ram_alloc_from_ptr (exec.c:2664) ==22736== by 0x2F5FF6: memory_region_init_ram (memory.c:954) ==22736== by 0x303EFD: ram_init1 (sun4u.c:711) ==22736== by 0x268E1E: qdev_init (qdev.c:151) ==22736== by 0x268F5C: qdev_init_nofail (qdev.c:258) ==22736== by 0x304620: sun4uv_init (sun4u.c:729) ==22736== by 0x304F1F: sun4u_init (sun4u.c:932) ==22736== by 0x1846D8: main (vl.c:3519) ==22736== ==22736== Conditional jump or move depends on uninitialised value(s) ==22736== at 0x977207F: ??? ==22736== Uninitialised value was created by a heap allocation ==22736== at 0x4C27CE8: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x4C27D97: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22736== by 0x256061: qemu_memalign (oslib-posix.c:93) ==22736== by 0x256109: qemu_vmalloc (oslib-posix.c:126) ==22736== by 0x2D1EF6: qemu_ram_alloc_from_ptr (exec.c:2664) ==22736== by 0x2F5FF6: memory_region_init_ram (memory.c:954) ==22736== by 0x303EFD: ram_init1 (sun4u.c:711) ==22736== by 0x268E1E: qdev_init (qdev.c:151) ==22736== by 0x268F5C: qdev_init_nofail (qdev.c:258) ==22736== by 0x304620: sun4uv_init (sun4u.c:729) ==22736== by 0x304F1F: sun4u_init (sun4u.c:932) ==22736== by 0x1846D8: main (vl.c:3519) ==22736==
Andreas