Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1795358rwb; Fri, 2 Dec 2022 00:57:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf5OrCkAWjOzPlYlfC3V05XAKAHDP/IRmAuiH0dj/C9tqkt8nqHwCT9cOiI8b92mc+wxnQhh X-Received: by 2002:a17:906:a884:b0:7bd:15a6:27e8 with SMTP id ha4-20020a170906a88400b007bd15a627e8mr28801356ejb.78.1669971435986; Fri, 02 Dec 2022 00:57:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669971435; cv=none; d=google.com; s=arc-20160816; b=eNEUlhE65JcBnXoNYo7qSRmhN6E56w9icLNclJ55IsTp4WaM/WG2gK6tHbGpo+KauT VYxeFxcrE8k29NhTm6/JeCLTzdtQDaZaS+klCFhFOcqDDiECZI6ajao0D2hpuWlVZ9do VryZzZLkHLzGiRygkQQYwxMhKuZho99aM4CjXQvSRsqduau3Ex/U+aussJB28NMI6t5f G2JzH07SroP/vBhaRx+IW9qRyUux+XPUj6aWM9sSoKBuoeVzJV4pofJTVcM/FpBpOpSP 1TgcR1X/0SamwSkZfjzXnINXjMjCz3qv6rWc4C3IgGSHtvyhPFsM5V7czsKPvGr0BD0h W0Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=QUdkKpx61zZYQt9dRYGkGMIxKOnmt3ttgsnd9p54W18=; b=RDgZkRaSu6kOQ2LqOJJyOUMdZWdNjzl6DVgrrct0w0O24GqgjoQ6hBSdmpVhqdiVUI o72NnycAde5IExIx+o9ddZy/uxfy7GKis7L4XBOEuTMSdTJXeR7uvZsHKyW50XekDUIL nixPqrr0qCReB1BVNPlRIAdpNrrcKYw19Rlq0xL3H+b8Wuo7+GZIOF4GeLx0HzettYl2 Zv5ZWuKi3FOfDS9gIPAwdnVozR4fkWjMy0ryDZrqa1INhyrHXjRGjd+kAiwO1zz/SoER O0Lpc8EkYRwgSY1GKgyaY5qweXEy/yjxknRlKa2FquJGZtcLLilHfYL3aBLmnkOnNMR8 OXPg== 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 co1-20020a0564020c0100b00468f45c947fsi5281286edb.568.2022.12.02.00.56.56; Fri, 02 Dec 2022 00:57:15 -0800 (PST) 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 S232562AbiLBH7F (ORCPT + 82 others); Fri, 2 Dec 2022 02:59:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232540AbiLBH7A (ORCPT ); Fri, 2 Dec 2022 02:59:00 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 89A0290770 for ; Thu, 1 Dec 2022 23:58:56 -0800 (PST) Received: from loongson.cn (unknown [10.2.9.158]) by gateway (Coremail) with SMTP id _____8Axjus+sIljOr4CAA--.6589S3; Fri, 02 Dec 2022 15:58:55 +0800 (CST) Received: from localhost.localdomain (unknown [10.2.9.158]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dx9VY+sIljqjckAA--.5784S2; Fri, 02 Dec 2022 15:58:54 +0800 (CST) From: Bibo Mao To: Huacai Chen Cc: WANG Xuerui , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] LoongArch: export symbol with function smp_send_reschedule Date: Fri, 2 Dec 2022 15:58:54 +0800 Message-Id: <20221202075854.2253116-1-maobibo@loongson.cn> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Dx9VY+sIljqjckAA--.5784S2 X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7tr47Zw4xJw15Kr43tr1xGrg_yoW8uFy3pF 9xZrn7Gr45W3s3A3s8A3yrur45Gws5GrnFqa17tFWrAFnFq3W8ZryktwnFqF10q3y0kF1F gFs5W34fKFyUAw7anT9S1TB71UUUUUJqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b3kYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1l n4kS14v26r1Y6r17M2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6x ACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E 87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82 IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAFwI0_Jrv_JF1lx2Iq xVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r 126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY 6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67 AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x 07jjwZcUUUUU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS 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 Function smp_send_reschedule is standard kernel ABI, which is defined header file include/linux/smp.h, however on LoongArch it is defined as inline function, so that kernel module can not use this function. Now define smp_send_reschedule as general function, and add EXPORT_SYMBOL_GPL on this function, so that kernel modules can use it. Signed-off-by: Bibo Mao --- arch/loongarch/include/asm/smp.h | 10 ---------- arch/loongarch/kernel/smp.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/arch/loongarch/include/asm/smp.h b/arch/loongarch/include/asm/smp.h index 3dd172d9ffea..d82687390b4a 100644 --- a/arch/loongarch/include/asm/smp.h +++ b/arch/loongarch/include/asm/smp.h @@ -78,16 +78,6 @@ extern void calculate_cpu_foreign_map(void); */ extern void show_ipi_list(struct seq_file *p, int prec); -/* - * This function sends a 'reschedule' IPI to another CPU. - * it goes straight through and wastes no time serializing - * anything. Worst case is that we lose a reschedule ... - */ -static inline void smp_send_reschedule(int cpu) -{ - loongson_send_ipi_single(cpu, SMP_RESCHEDULE); -} - static inline void arch_send_call_function_single_ipi(int cpu) { loongson_send_ipi_single(cpu, SMP_CALL_FUNCTION); diff --git a/arch/loongarch/kernel/smp.c b/arch/loongarch/kernel/smp.c index 6ed72f7ff278..51dd3c3f06cb 100644 --- a/arch/loongarch/kernel/smp.c +++ b/arch/loongarch/kernel/smp.c @@ -141,6 +141,17 @@ void loongson_send_ipi_single(int cpu, unsigned int action) ipi_write_action(cpu_logical_map(cpu), (u32)action); } +/* + * This function sends a 'reschedule' IPI to another CPU. + * it goes straight through and wastes no time serializing + * anything. Worst case is that we lose a reschedule ... + */ +void smp_send_reschedule(int cpu) +{ + loongson_send_ipi_single(cpu, SMP_RESCHEDULE); +} +EXPORT_SYMBOL_GPL(smp_send_reschedule); + void loongson_send_ipi_mask(const struct cpumask *mask, unsigned int action) { unsigned int i; -- 2.27.0