Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3651128iog; Tue, 21 Jun 2022 03:10:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sd2yCwgK0zmADcybfa8mO/8H/LkPvJNTGxTw5VwPpeoxrCQ/xNYFYRXo7Vo/Lmqj8biOLj X-Received: by 2002:a17:907:868f:b0:702:f865:55de with SMTP id qa15-20020a170907868f00b00702f86555demr25557547ejc.24.1655806250451; Tue, 21 Jun 2022 03:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655806250; cv=none; d=google.com; s=arc-20160816; b=LNCH4XXJ1U9Dp20Mn68/MNx4rRk+1kLU+lf3/AHZwnycZ3iYFi3C56+5sdx5HLMHto TqoX8JKngKBfv5xqhCeybAbcPYlp1cFKYvmnUDwaQesBxuuidf0rbBZ+K/AFmo2TmM0C nwBgcPf+k+Kxwrm0SmhOzyXJ23PvmiKeOA1g4PCkj2grZKL2av++4VsdfhmuFXw2h6YL aNxhhMNcoU2NAENbYMxYOo1wZ7twP0poPGBXVdPUIs4nHD1qlULbRdOApTXTZGvpFNr1 Zmg0rGDPZVILOXpPbe6mpg9d1lGvAuW1IyB4WYtWKzsOdUZPNZ/D3z+NdCKBCfCNsqRB ITQA== 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=yChWOL4x6lnrbW5Up0F83jxnar+1cuwkiXm4vFX6aNIvjKaGH67DlzWCcMXtlYY6B3 N6fByNqNWnMwO6BuiNsM3HVhbH19lY/pny7mogKKHIqlt7Z/dakENIUai5dsvhQnzyNU 5v1EOnWM2iUBZCl/uvPCKgRhWice7AMd+tC7QvRG9fl4gql/gZhhkYtKIw1EwbiHcdfR Ck+WbGJhVrR3vPX4djgThWgGuplmeQuHPlRaf0/dlejthEOedSBLVdpeOtJROwLE87cO 9diSOFFK0AW6Yja+RJuVAOnZWczlpM2F3W2YpHDUuUHykX4VfnrwumH8eXGKlNzsMvRc SzmA== 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 j14-20020a05640211ce00b0042dbdc55828si15278783edw.403.2022.06.21.03.10.25; Tue, 21 Jun 2022 03:10:50 -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 S1346619AbiFUKIA (ORCPT + 99 others); Tue, 21 Jun 2022 06:08:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345203AbiFUKH7 (ORCPT ); Tue, 21 Jun 2022 06:07:59 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C7E682609 for ; Tue, 21 Jun 2022 03:07:57 -0700 (PDT) Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxT957mLFifqhRAA--.24852S3; Tue, 21 Jun 2022 18:07:56 +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 v2 1/2] LoongArch: Add TI_SYSCALL in output_thread_info_defines() Date: Tue, 21 Jun 2022 18:07:53 +0800 Message-Id: <1655806074-17454-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1655806074-17454-1-git-send-email-yangtiezhu@loongson.cn> References: <1655806074-17454-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9DxT957mLFifqhRAA--.24852S3 X-Coremail-Antispam: 1UD129KBjvdXoW7Wr48Ww17Xw43JF4UCw1rJFb_yoWkArg_Wr nrGwn8GFW8JrWIq3Wvyw4fXr4jya4vkFyrXrZ7CrWxtwnrtry5Jr4rZ348Cr1kKrWkGrs8 C3ykW3Wkur1jkjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbgxFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUGwA2048vs2IY02 0Ec7CjxVAFwI0_JFI_Gr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM2 8EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AI xVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20x vE14v26r106r15McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xv r2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkF7I0En4kS14v26r126r1DMx kIecxEwVAFwVW8twCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s02 6c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF 0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvE c7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14 v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x 0JUfGYXUUUUU= 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