Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp736501pxf; Wed, 24 Mar 2021 14:52:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbEtdX+pyOsh6vgKOOPkmWspbezmPQA2ZP+sRtNlyxJteIjyt1Mh47ueHhXy1YqA1GEQjn X-Received: by 2002:a17:906:2ac1:: with SMTP id m1mr5957887eje.472.1616622761697; Wed, 24 Mar 2021 14:52:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616622761; cv=none; d=google.com; s=arc-20160816; b=a+Hndwe9Jy1V+4q7cYY73X3aztWi9ZvR1hCbEUQPGA1+g8pruiTAz/9+B7ANWPnjxa IAmUj0+jp+Eh1LRhbts3BxZ2dZC4lwllUMHupCi6igjG+sfHEbBEej4tReyMmEUaZuRW 33sJiHZzYWkFpnZharkQzG407lBkLx3+ctvOBQqdxXMrPFuFS0QyCUVnVWPZCUcRTixw VNkK2oQWTksY5SloNU++CiZQ/QVt6txPFknuNs7YBEV+ZqtM6CwRtsyu0TMRP/xXISEG OQPdc9GYF7Vp5PNyMrnMq5J5DFXf/MD+6AZNFpkbp3Xkz0N3cyciP9F/GvIyGxASSJ0G x7Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=bU0fTJBvg5tE/8as7E2fka4frYUqM3ScY4B/2UFxEsA=; b=pPBO5nnlAtApzx9mcaNhLbSAn9TFKGt2BET6oTSf44/SpIjM9lwD0Jht/O4r4AhN07 4J68dEP5dkSd3WKjuolIVVT0T5Rg89m679DPcPT9n5ROxFgDL8whQxnunU3TrvIORf4W NhqUZwFjJ4OH6yfuw/LZIAhZfVzfQSsmQxVsaFxOVb/Jc1rG24GDjKeQKWDhF8Cxz86L KgcfZanYVP49DK5gTwGDjEK3F6O6fteJLeQhJNSpOhM0RdkWhlluNQdb1JbzCcDrYQhH 7CFG/+woyk8Ms8KxdF+62NR/62ZG44Q25FKS4ryVIokMorprdNvLpjutmSa/7ywGXTef pxRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hisilicon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t19si2799014ejx.42.2021.03.24.14.52.18; Wed, 24 Mar 2021 14:52:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234766AbhCXCR2 (ORCPT + 99 others); Tue, 23 Mar 2021 22:17:28 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:14438 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234752AbhCXCRP (ORCPT ); Tue, 23 Mar 2021 22:17:15 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4F4sK51D6czkf2y; Wed, 24 Mar 2021 10:15:37 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.498.0; Wed, 24 Mar 2021 10:17:03 +0800 From: Tian Tao To: , , , , , , , , CC: , , "Tian Tao" Subject: [PATCH] dma-mapping: make map_benchmark compile into module Date: Wed, 24 Mar 2021 10:17:38 +0800 Message-ID: <1616552258-22282-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org under some scenarios, it is necessary to compile map_benchmark into module to test iommu, so this patch changed Kconfig and export_symbol to implement map_benchmark compiled into module. On the other hand, map_benchmark is a driver, which is supposed to be able to run as a module. Signed-off-by: Tian Tao --- kernel/dma/Kconfig | 2 +- kernel/kthread.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig index 77b4055..0468293 100644 --- a/kernel/dma/Kconfig +++ b/kernel/dma/Kconfig @@ -223,7 +223,7 @@ config DMA_API_DEBUG_SG If unsure, say N. config DMA_MAP_BENCHMARK - bool "Enable benchmarking of streaming DMA mapping" + tristate "Enable benchmarking of streaming DMA mapping" depends on DEBUG_FS help Provides /sys/kernel/debug/dma_map_benchmark that helps with testing diff --git a/kernel/kthread.c b/kernel/kthread.c index 1578973..fa4736f 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -455,6 +455,7 @@ void kthread_bind_mask(struct task_struct *p, const struct cpumask *mask) { __kthread_bind_mask(p, mask, TASK_UNINTERRUPTIBLE); } +EXPORT_SYMBOL(kthread_bind_mask); /** * kthread_bind - bind a just-created kthread to a cpu. -- 2.7.4