Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3650168iog; Tue, 21 Jun 2022 03:09:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sTobs7uYrTBs7N/BSKU+OMdGRnouFC4IM0Z7lSO7j5u/gpmCgh+gXHtxrvNZ0tC+VXmbe/ X-Received: by 2002:a05:6402:190d:b0:435:9683:bffa with SMTP id e13-20020a056402190d00b004359683bffamr2688461edz.309.1655806182776; Tue, 21 Jun 2022 03:09:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655806182; cv=none; d=google.com; s=arc-20160816; b=xBBZIDf1BDk1GSFLYVFwqhkPx6FssWC7bVFPRgdR4H018/92UKHBBTzNfA6TYi1/+L jXtUmE7wJQRdMQ4fYzhRxajyU7E7OAAyebEpdN2P/an6P8oqyuLmQo95N67THaG6Vqb8 2ICRfA1xDfHQeIpiDwDbIeYZ0o7bCsyM/LfTQiwTP/T/xn/sSrOqZLczAxCmMjbw2e3r +BiNMywd9tW0hjHzfbqWEiJduOjrO+X+c3bJ94OTlvRuKmOtRpay8Zh8kt9GINMzOnoQ C79DIZZAF+6FoMhw+AHFD+DR3VBT2gCw0F6c005HYzrOAoe5hIeTm+cnDGgmfTtJjLT8 lb3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=j1gNB0zgisDLi2+5QaW5zHy3sp1yOZ1+W9rXwzf2yh0=; b=zpGiyii/+PmazELIsNtoeGf1xYyNurJe1LAUunOo8Cd7N+yCFsEWiWV9FSGRRFXup5 3UlDL8uzFyLFYEg+BwqTBexpaQZeDi0smm+oVdZX2hU382s5pZcuC9HQYF4aXvt/lZES mYty2DznuASwMF1vQnsJ5x9FoC+no7u5VD9ExAVzSaF99t24FxvP7Ue243pVlnrIhjUi ROos4ee42ubmAIJN1Yx3wiJZ0tHyJpXEzP24zycsr5BJb+7CXmacJHEurqYnIF7/FRKU ZAj5SMcPMuO2nngFXuCXE4OikypC9TuA/yhzDp7ALoz7EgiJsNBiETJ88rzy9zbqx4Us Fm7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c27-20020a1709063f1b00b006e81dd29c00si11647002ejj.569.2022.06.21.03.09.17; Tue, 21 Jun 2022 03:09:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349361AbiFUKAc (ORCPT + 99 others); Tue, 21 Jun 2022 06:00:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347547AbiFUKAI (ORCPT ); Tue, 21 Jun 2022 06:00:08 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CAA3D27FC3 for ; Tue, 21 Jun 2022 03:00:05 -0700 (PDT) Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxX06hlrFi26RRAA--.25344S3; Tue, 21 Jun 2022 18:00:03 +0800 (CST) From: Tiezhu Yang To: Huacai Chen , WANG Xuerui Cc: Xuefeng Li , Jianmin Lv , Jun Yi , Rui Wang , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] LoongArch: Add TI_SYSCALL in output_thread_info_defines() Date: Tue, 21 Jun 2022 18:00:00 +0800 Message-Id: <1655805601-16677-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1655805601-16677-1-git-send-email-yangtiezhu@loongson.cn> References: <1655805601-16677-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9DxX06hlrFi26RRAA--.25344S3 X-Coremail-Antispam: 1UD129KBjvdXoW7Wr48Ww17Xw43JF4UCw1rJFb_yoWkArg_Wr nrGwn8GFW8JrWIq3Wvyw4fXr4jya4vkFyrXrZ7CrWxtwnrtry5Jr4rZ348Cr1kKrWkGrs8 C3ykW3Wkur1jkjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbSkFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUGwA2048vs2IY02 0Ec7CjxVAFwI0_JFI_Gr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWxJVW8Jr1l84 ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I2 62IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcV AFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG 0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc2xSY4AK67AK6r4DMxAIw28Icx kI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2Iq xVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42 IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY 6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aV CY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUjq-eDUUUUU== X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The initial idea was to store the syscall number in PT_R11, and then we can get the syscall number from PT_R11 to check before RESTORE in handle_syscall, but we know PT_R11 may be overwritten by the signal handler and the syscall number will be lost. Add TI_SYSCALL in output_thread_info_defines(), then we can store the syscall number in TI_SYSCALL. This is preparation for later patch. Signed-off-by: Tiezhu Yang --- arch/loongarch/kernel/asm-offsets.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/loongarch/kernel/asm-offsets.c b/arch/loongarch/kernel/asm-offsets.c index bfb65eb..4757ebe 100644 --- a/arch/loongarch/kernel/asm-offsets.c +++ b/arch/loongarch/kernel/asm-offsets.c @@ -81,6 +81,7 @@ void output_thread_info_defines(void) OFFSET(TI_CPU, thread_info, cpu); OFFSET(TI_PRE_COUNT, thread_info, preempt_count); OFFSET(TI_REGS, thread_info, regs); + OFFSET(TI_SYSCALL, thread_info, syscall); DEFINE(_THREAD_SIZE, THREAD_SIZE); DEFINE(_THREAD_MASK, THREAD_MASK); DEFINE(_IRQ_STACK_SIZE, IRQ_STACK_SIZE); -- 2.1.0