{"push_id":2922642765,"size":2,"distinct_size":2,"ref":"refs/heads/_2_2__powerpc_tm_Avoid_SPR_flush_if_TM_is_disabled_mbox_next","head":"ee1dda0514a19e62ad7115bbb1e313768956b1b1","before":"2c7ef41a220f354ea0969a9d1e859d6847c60760","commits":[{"sha":"72f503824e1802d682762de31d9774cb8339a5b7","author":{"name":"Breno Leitao","email":"a10246ea2c3600c1725f8dc718f81b30cd4d07c5@debian.org"},"message":"powerpc/tm: Move tm_enable definition\n\nThe goal of this patch is to move function tm_enabled() to tm.h in order\nto allow this function to be used by other files as an inline function.\n\nThis patch also removes the double inclusion of tm.h in the traps.c\nsource code. One inclusion is inside a CONFIG_PPC64 ifdef block, and\nanother one is in the generic part. This double inclusion causes a\nredefinition of tm_enable(), that is why it is being fixed here.\n\nThere is generic code (non CONFIG_PPC64, thus, non\nCONFIG_PPC_TRANSACTIONAL_MEM also) using some TM definitions, which\nexplains why tm.h is being imported in the generic code. This is\nnot correct, and this code is now surrounded by a\nCONFIG_PPC_TRANSACTIONAL_MEM ifdef block.\n\nThese ifdef inclusion will avoid calling tm_abort_check() completely,\nbut it is not a problem since this function is just returning 'false' if\nCONFIG_PPC_TRANSACTIONAL_MEM is not defined.\n\nSigned-off-by: Breno Leitao <leitao@debian.org>","distinct":true,"url":"https://api.github.com/repos/ruscur/linux/commits/72f503824e1802d682762de31d9774cb8339a5b7"},{"sha":"ee1dda0514a19e62ad7115bbb1e313768956b1b1","author":{"name":"Breno Leitao","email":"a10246ea2c3600c1725f8dc718f81b30cd4d07c5@debian.org"},"message":"powerpc/tm: Avoid SPR flush if TM is disabled\n\nThere is a bug in the flush_tmregs_to_thread() function, where it forces\nTM SPRs to be saved to the thread even if the TM facility is disabled.\n\nThis bug could be reproduced using a simple test case:\n\n  mtspr(SPRN_TEXASR, XX);\n  sleep until load_tm == 0\n  cause a coredump\n  read SPRN_TEXASR in the coredump\n\nIn this case, the coredump may contain an invalid SPR, because the\ncurrent code is flushing live SPRs (Used by the last thread with TM\nactive) into the current thread, overwriting the latest SPRs (which were\nvalid).\n\nThis patch checks if TM is enabled for current task before\nsaving the SPRs, otherwise, the TM is lazily disabled and the thread\nvalue is already up-to-date and could be used directly, and saving is\nnot required.\n\nFixes: cd63f3cf1d5 (\"powerpc/tm: Fix saving of TM SPRs in core dump\")\nSigned-off-by: Breno Leitao <leitao@debian.org>","distinct":true,"url":"https://api.github.com/repos/ruscur/linux/commits/ee1dda0514a19e62ad7115bbb1e313768956b1b1"}]}
{"actor":{"display_login":"ruscur"}}