Commit 0a0d6b45 authored by zhangshuowen96's avatar zhangshuowen96
Browse files

drivers: misc: sdma-dae: not compile sdma-dae by default

kunpeng inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IA5EXF


CVE: NA

----------------------------------------------------------------------

Set CONFIG_SDMA_DAE as n by default in case of compile errors.

Signed-off-by: default avatarzhangshuowen96 <zhangshuowen@hisilicon.com>
parent 175c9021
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
config SDMA_DAE
	tristate "DAE SDMA core support"
	depends on ARM64
	default m
	tristate "SDMA-DAE driver for SDMA hardware"
	depends on ARM64 && NUMA
	default n
	help
	  Core support for DAE SDMA.
	  Kernel driver of SDMA hardware.
	  The driver depands on ARM64.
	  To compile SDMA driver as module, choose m here.
	  module will be called sdma_dae.
+10 −2
Original line number Diff line number Diff line
@@ -342,15 +342,23 @@ static int sdma_device_probe(struct platform_device *pdev)
{
	struct hisi_sdma_device *psdma_dev;
	u32 device_num;
	int node_id;
	int ret;

	device_num = hisi_sdma_core_device.sdma_device_num;
	psdma_dev = kzalloc_node(sizeof(*psdma_dev), GFP_KERNEL, pdev->dev.numa_node);
	if (!node_online(pdev->dev.numa_node)) {
		pr_info("numa_node %d not online, register sdma%d failed\n", pdev->dev.numa_node,
			device_num);
		node_id = 0;
	} else
		node_id = pdev->dev.numa_node;

	psdma_dev = kzalloc_node(sizeof(*psdma_dev), GFP_KERNEL, node_id);
	if (!psdma_dev)
		return -ENOMEM;

	psdma_dev->idx = device_num;
	psdma_dev->node_idx = pdev->dev.numa_node;
	psdma_dev->node_idx = node_id;
	ret = parse_sdma(psdma_dev, pdev);
	if (ret < 0)
		goto free_dev;