[PATCH 6.18 193/312] LoongArch: Correct the calculation logic of thread_count