All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dmitry Baryshkov <lumag@kernel.org>,
	Amit Kucheria <amitk@kernel.org>,
	Thara Gopinath <thara.gopinath@gmail.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Jackie Liu <liuyun01@kylinos.cn>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] thermal: qcom: make LMH select QCOM_SCM
Date: Sun, 27 Jul 2025 00:28:28 +0800	[thread overview]
Message-ID: <202507270052.BYR6Xdlk-lkp@intel.com> (raw)
In-Reply-To: <20250725-lmh-scm-v1-1-84246981f435@oss.qualcomm.com>

Hi Dmitry,

kernel test robot noticed the following build errors:

[auto build test ERROR on a933d3dc1968fcfb0ab72879ec304b1971ed1b9a]

url:    https://github.com/intel-lab-lkp/linux/commits/Dmitry-Baryshkov/thermal-qcom-make-LMH-select-QCOM_SCM/20250725-215843
base:   a933d3dc1968fcfb0ab72879ec304b1971ed1b9a
patch link:    https://lore.kernel.org/r/20250725-lmh-scm-v1-1-84246981f435%40oss.qualcomm.com
patch subject: [PATCH] thermal: qcom: make LMH select QCOM_SCM
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250727/202507270052.BYR6Xdlk-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250727/202507270052.BYR6Xdlk-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507270052.BYR6Xdlk-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/thermal/qcom/lmh.c:46:3: error: call to undeclared function 'generic_handle_irq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      46 |                 generic_handle_irq(irq);
         |                 ^
>> drivers/thermal/qcom/lmh.c:53:33: error: call to undeclared function 'irq_data_get_irq_chip_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      53 |         struct lmh_hw_data *lmh_data = irq_data_get_irq_chip_data(d);
         |                                        ^
>> drivers/thermal/qcom/lmh.c:53:22: error: incompatible integer to pointer conversion initializing 'struct lmh_hw_data *' with an expression of type 'int' [-Wint-conversion]
      53 |         struct lmh_hw_data *lmh_data = irq_data_get_irq_chip_data(d);
         |                             ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/thermal/qcom/lmh.c:56:2: error: call to undeclared function 'writel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      56 |         writel(0xff, lmh_data->base + LMH_REG_DCVS_INTR_CLR);
         |         ^
   drivers/thermal/qcom/lmh.c:62:33: error: call to undeclared function 'irq_data_get_irq_chip_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      62 |         struct lmh_hw_data *lmh_data = irq_data_get_irq_chip_data(d);
         |                                        ^
   drivers/thermal/qcom/lmh.c:62:22: error: incompatible integer to pointer conversion initializing 'struct lmh_hw_data *' with an expression of type 'int' [-Wint-conversion]
      62 |         struct lmh_hw_data *lmh_data = irq_data_get_irq_chip_data(d);
         |                             ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/thermal/qcom/lmh.c:67:24: error: variable has incomplete type 'struct irq_chip'
      67 | static struct irq_chip lmh_irq_chip = {
         |                        ^
   include/linux/irqdomain.h:21:8: note: forward declaration of 'struct irq_chip'
      21 | struct irq_chip;
         |        ^
>> drivers/thermal/qcom/lmh.c:83:2: error: call to undeclared function 'irq_set_lockdep_class'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      83 |         irq_set_lockdep_class(irq, &lmh_lock_key, &lmh_request_key);
         |         ^
>> drivers/thermal/qcom/lmh.c:84:2: error: call to undeclared function 'irq_set_chip_and_handler'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      84 |         irq_set_chip_and_handler(irq, &lmh_irq_chip, handle_simple_irq);
         |         ^
>> drivers/thermal/qcom/lmh.c:84:47: error: use of undeclared identifier 'handle_simple_irq'
      84 |         irq_set_chip_and_handler(irq, &lmh_irq_chip, handle_simple_irq);
         |                                                      ^
>> drivers/thermal/qcom/lmh.c:85:2: error: call to undeclared function 'irq_set_chip_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      85 |         irq_set_chip_data(irq, lmh_data);
         |         ^
>> drivers/thermal/qcom/lmh.c:219:2: error: call to undeclared function 'irq_set_status_flags'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     219 |         irq_set_status_flags(lmh_data->irq, IRQ_NOAUTOEN);
         |         ^
>> drivers/thermal/qcom/lmh.c:219:38: error: use of undeclared identifier 'IRQ_NOAUTOEN'
     219 |         irq_set_status_flags(lmh_data->irq, IRQ_NOAUTOEN);
         |                                             ^
   13 errors generated.


vim +/generic_handle_irq +46 drivers/thermal/qcom/lmh.c

53bca371cdf7ad Thara Gopinath    2021-08-09   38  
53bca371cdf7ad Thara Gopinath    2021-08-09   39  static irqreturn_t lmh_handle_irq(int hw_irq, void *data)
53bca371cdf7ad Thara Gopinath    2021-08-09   40  {
53bca371cdf7ad Thara Gopinath    2021-08-09   41  	struct lmh_hw_data *lmh_data = data;
53bca371cdf7ad Thara Gopinath    2021-08-09   42  	int irq = irq_find_mapping(lmh_data->domain, 0);
53bca371cdf7ad Thara Gopinath    2021-08-09   43  
53bca371cdf7ad Thara Gopinath    2021-08-09   44  	/* Call the cpufreq driver to handle the interrupt */
53bca371cdf7ad Thara Gopinath    2021-08-09   45  	if (irq)
53bca371cdf7ad Thara Gopinath    2021-08-09  @46  		generic_handle_irq(irq);
53bca371cdf7ad Thara Gopinath    2021-08-09   47  
46a891e45be97c Bjorn Andersson   2022-03-16   48  	return IRQ_HANDLED;
53bca371cdf7ad Thara Gopinath    2021-08-09   49  }
53bca371cdf7ad Thara Gopinath    2021-08-09   50  
53bca371cdf7ad Thara Gopinath    2021-08-09   51  static void lmh_enable_interrupt(struct irq_data *d)
53bca371cdf7ad Thara Gopinath    2021-08-09   52  {
53bca371cdf7ad Thara Gopinath    2021-08-09  @53  	struct lmh_hw_data *lmh_data = irq_data_get_irq_chip_data(d);
53bca371cdf7ad Thara Gopinath    2021-08-09   54  
53bca371cdf7ad Thara Gopinath    2021-08-09   55  	/* Clear the existing interrupt */
53bca371cdf7ad Thara Gopinath    2021-08-09  @56  	writel(0xff, lmh_data->base + LMH_REG_DCVS_INTR_CLR);
53bca371cdf7ad Thara Gopinath    2021-08-09   57  	enable_irq(lmh_data->irq);
53bca371cdf7ad Thara Gopinath    2021-08-09   58  }
53bca371cdf7ad Thara Gopinath    2021-08-09   59  
53bca371cdf7ad Thara Gopinath    2021-08-09   60  static void lmh_disable_interrupt(struct irq_data *d)
53bca371cdf7ad Thara Gopinath    2021-08-09   61  {
53bca371cdf7ad Thara Gopinath    2021-08-09   62  	struct lmh_hw_data *lmh_data = irq_data_get_irq_chip_data(d);
53bca371cdf7ad Thara Gopinath    2021-08-09   63  
53bca371cdf7ad Thara Gopinath    2021-08-09   64  	disable_irq_nosync(lmh_data->irq);
53bca371cdf7ad Thara Gopinath    2021-08-09   65  }
53bca371cdf7ad Thara Gopinath    2021-08-09   66  
53bca371cdf7ad Thara Gopinath    2021-08-09  @67  static struct irq_chip lmh_irq_chip = {
53bca371cdf7ad Thara Gopinath    2021-08-09   68  	.name           = "lmh",
53bca371cdf7ad Thara Gopinath    2021-08-09   69  	.irq_enable	= lmh_enable_interrupt,
53bca371cdf7ad Thara Gopinath    2021-08-09   70  	.irq_disable	= lmh_disable_interrupt
53bca371cdf7ad Thara Gopinath    2021-08-09   71  };
53bca371cdf7ad Thara Gopinath    2021-08-09   72  
53bca371cdf7ad Thara Gopinath    2021-08-09   73  static int lmh_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
53bca371cdf7ad Thara Gopinath    2021-08-09   74  {
53bca371cdf7ad Thara Gopinath    2021-08-09   75  	struct lmh_hw_data *lmh_data = d->host_data;
f16beaaee248ea Dmitry Baryshkov  2024-10-11   76  	static struct lock_class_key lmh_lock_key;
f16beaaee248ea Dmitry Baryshkov  2024-10-11   77  	static struct lock_class_key lmh_request_key;
53bca371cdf7ad Thara Gopinath    2021-08-09   78  
f16beaaee248ea Dmitry Baryshkov  2024-10-11   79  	/*
f16beaaee248ea Dmitry Baryshkov  2024-10-11   80  	 * This lock class tells lockdep that GPIO irqs are in a different
f16beaaee248ea Dmitry Baryshkov  2024-10-11   81  	 * category than their parents, so it won't report false recursion.
f16beaaee248ea Dmitry Baryshkov  2024-10-11   82  	 */
f16beaaee248ea Dmitry Baryshkov  2024-10-11  @83  	irq_set_lockdep_class(irq, &lmh_lock_key, &lmh_request_key);
53bca371cdf7ad Thara Gopinath    2021-08-09  @84  	irq_set_chip_and_handler(irq, &lmh_irq_chip, handle_simple_irq);
53bca371cdf7ad Thara Gopinath    2021-08-09  @85  	irq_set_chip_data(irq, lmh_data);
53bca371cdf7ad Thara Gopinath    2021-08-09   86  
53bca371cdf7ad Thara Gopinath    2021-08-09   87  	return 0;
53bca371cdf7ad Thara Gopinath    2021-08-09   88  }
53bca371cdf7ad Thara Gopinath    2021-08-09   89  
53bca371cdf7ad Thara Gopinath    2021-08-09   90  static const struct irq_domain_ops lmh_irq_ops = {
53bca371cdf7ad Thara Gopinath    2021-08-09   91  	.map = lmh_irq_map,
53bca371cdf7ad Thara Gopinath    2021-08-09   92  	.xlate = irq_domain_xlate_onecell,
53bca371cdf7ad Thara Gopinath    2021-08-09   93  };
53bca371cdf7ad Thara Gopinath    2021-08-09   94  
53bca371cdf7ad Thara Gopinath    2021-08-09   95  static int lmh_probe(struct platform_device *pdev)
53bca371cdf7ad Thara Gopinath    2021-08-09   96  {
53bca371cdf7ad Thara Gopinath    2021-08-09   97  	struct device *dev = &pdev->dev;
53bca371cdf7ad Thara Gopinath    2021-08-09   98  	struct device_node *np = dev->of_node;
53bca371cdf7ad Thara Gopinath    2021-08-09   99  	struct device_node *cpu_node;
53bca371cdf7ad Thara Gopinath    2021-08-09  100  	struct lmh_hw_data *lmh_data;
53bca371cdf7ad Thara Gopinath    2021-08-09  101  	int temp_low, temp_high, temp_arm, cpu_id, ret;
cf0c54db636c91 Thara Gopinath    2022-01-06  102  	unsigned int enable_alg;
53bca371cdf7ad Thara Gopinath    2021-08-09  103  	u32 node_id;
53bca371cdf7ad Thara Gopinath    2021-08-09  104  
d9d3490c48df57 Konrad Dybcio     2024-03-09  105  	if (!qcom_scm_is_available())
d9d3490c48df57 Konrad Dybcio     2024-03-09  106  		return -EPROBE_DEFER;
d9d3490c48df57 Konrad Dybcio     2024-03-09  107  
53bca371cdf7ad Thara Gopinath    2021-08-09  108  	lmh_data = devm_kzalloc(dev, sizeof(*lmh_data), GFP_KERNEL);
53bca371cdf7ad Thara Gopinath    2021-08-09  109  	if (!lmh_data)
53bca371cdf7ad Thara Gopinath    2021-08-09  110  		return -ENOMEM;
53bca371cdf7ad Thara Gopinath    2021-08-09  111  
53bca371cdf7ad Thara Gopinath    2021-08-09  112  	lmh_data->base = devm_platform_ioremap_resource(pdev, 0);
53bca371cdf7ad Thara Gopinath    2021-08-09  113  	if (IS_ERR(lmh_data->base))
53bca371cdf7ad Thara Gopinath    2021-08-09  114  		return PTR_ERR(lmh_data->base);
53bca371cdf7ad Thara Gopinath    2021-08-09  115  
53bca371cdf7ad Thara Gopinath    2021-08-09  116  	cpu_node = of_parse_phandle(np, "cpus", 0);
53bca371cdf7ad Thara Gopinath    2021-08-09  117  	if (!cpu_node)
53bca371cdf7ad Thara Gopinath    2021-08-09  118  		return -EINVAL;
53bca371cdf7ad Thara Gopinath    2021-08-09  119  	cpu_id = of_cpu_node_to_id(cpu_node);
53bca371cdf7ad Thara Gopinath    2021-08-09  120  	of_node_put(cpu_node);
53bca371cdf7ad Thara Gopinath    2021-08-09  121  
53bca371cdf7ad Thara Gopinath    2021-08-09  122  	ret = of_property_read_u32(np, "qcom,lmh-temp-high-millicelsius", &temp_high);
53bca371cdf7ad Thara Gopinath    2021-08-09  123  	if (ret) {
53bca371cdf7ad Thara Gopinath    2021-08-09  124  		dev_err(dev, "missing qcom,lmh-temp-high-millicelsius property\n");
53bca371cdf7ad Thara Gopinath    2021-08-09  125  		return ret;
53bca371cdf7ad Thara Gopinath    2021-08-09  126  	}
53bca371cdf7ad Thara Gopinath    2021-08-09  127  
53bca371cdf7ad Thara Gopinath    2021-08-09  128  	ret = of_property_read_u32(np, "qcom,lmh-temp-low-millicelsius", &temp_low);
53bca371cdf7ad Thara Gopinath    2021-08-09  129  	if (ret) {
53bca371cdf7ad Thara Gopinath    2021-08-09  130  		dev_err(dev, "missing qcom,lmh-temp-low-millicelsius property\n");
53bca371cdf7ad Thara Gopinath    2021-08-09  131  		return ret;
53bca371cdf7ad Thara Gopinath    2021-08-09  132  	}
53bca371cdf7ad Thara Gopinath    2021-08-09  133  
53bca371cdf7ad Thara Gopinath    2021-08-09  134  	ret = of_property_read_u32(np, "qcom,lmh-temp-arm-millicelsius", &temp_arm);
53bca371cdf7ad Thara Gopinath    2021-08-09  135  	if (ret) {
53bca371cdf7ad Thara Gopinath    2021-08-09  136  		dev_err(dev, "missing qcom,lmh-temp-arm-millicelsius property\n");
53bca371cdf7ad Thara Gopinath    2021-08-09  137  		return ret;
53bca371cdf7ad Thara Gopinath    2021-08-09  138  	}
53bca371cdf7ad Thara Gopinath    2021-08-09  139  
53bca371cdf7ad Thara Gopinath    2021-08-09  140  	/*
53bca371cdf7ad Thara Gopinath    2021-08-09  141  	 * Only sdm845 has lmh hardware currently enabled from hlos. If this is needed
53bca371cdf7ad Thara Gopinath    2021-08-09  142  	 * for other platforms, revisit this to check if the <cpu-id, node-id> should be part
53bca371cdf7ad Thara Gopinath    2021-08-09  143  	 * of a dt match table.
53bca371cdf7ad Thara Gopinath    2021-08-09  144  	 */
53bca371cdf7ad Thara Gopinath    2021-08-09  145  	if (cpu_id == 0) {
53bca371cdf7ad Thara Gopinath    2021-08-09  146  		node_id = LMH_CLUSTER0_NODE_ID;
53bca371cdf7ad Thara Gopinath    2021-08-09  147  	} else if (cpu_id == 4) {
53bca371cdf7ad Thara Gopinath    2021-08-09  148  		node_id = LMH_CLUSTER1_NODE_ID;
53bca371cdf7ad Thara Gopinath    2021-08-09  149  	} else {
53bca371cdf7ad Thara Gopinath    2021-08-09  150  		dev_err(dev, "Wrong CPU id associated with LMh node\n");
53bca371cdf7ad Thara Gopinath    2021-08-09  151  		return -EINVAL;
53bca371cdf7ad Thara Gopinath    2021-08-09  152  	}
53bca371cdf7ad Thara Gopinath    2021-08-09  153  
53bca371cdf7ad Thara Gopinath    2021-08-09  154  	if (!qcom_scm_lmh_dcvsh_available())
53bca371cdf7ad Thara Gopinath    2021-08-09  155  		return -EINVAL;
53bca371cdf7ad Thara Gopinath    2021-08-09  156  
cf0c54db636c91 Thara Gopinath    2022-01-06  157  	enable_alg = (uintptr_t)of_device_get_match_data(dev);
cf0c54db636c91 Thara Gopinath    2022-01-06  158  
cf0c54db636c91 Thara Gopinath    2022-01-06  159  	if (enable_alg) {
53bca371cdf7ad Thara Gopinath    2021-08-09  160  		ret = qcom_scm_lmh_dcvsh(LMH_SUB_FN_CRNT, LMH_ALGO_MODE_ENABLE, 1,
53bca371cdf7ad Thara Gopinath    2021-08-09  161  					 LMH_NODE_DCVS, node_id, 0);
53bca371cdf7ad Thara Gopinath    2021-08-09  162  		if (ret)
53bca371cdf7ad Thara Gopinath    2021-08-09  163  			dev_err(dev, "Error %d enabling current subfunction\n", ret);
53bca371cdf7ad Thara Gopinath    2021-08-09  164  
53bca371cdf7ad Thara Gopinath    2021-08-09  165  		ret = qcom_scm_lmh_dcvsh(LMH_SUB_FN_REL, LMH_ALGO_MODE_ENABLE, 1,
53bca371cdf7ad Thara Gopinath    2021-08-09  166  					 LMH_NODE_DCVS, node_id, 0);
53bca371cdf7ad Thara Gopinath    2021-08-09  167  		if (ret)
53bca371cdf7ad Thara Gopinath    2021-08-09  168  			dev_err(dev, "Error %d enabling reliability subfunction\n", ret);
53bca371cdf7ad Thara Gopinath    2021-08-09  169  
53bca371cdf7ad Thara Gopinath    2021-08-09  170  		ret = qcom_scm_lmh_dcvsh(LMH_SUB_FN_BCL, LMH_ALGO_MODE_ENABLE, 1,
53bca371cdf7ad Thara Gopinath    2021-08-09  171  					 LMH_NODE_DCVS, node_id, 0);
53bca371cdf7ad Thara Gopinath    2021-08-09  172  		if (ret)
53bca371cdf7ad Thara Gopinath    2021-08-09  173  			dev_err(dev, "Error %d enabling BCL subfunction\n", ret);
53bca371cdf7ad Thara Gopinath    2021-08-09  174  
53bca371cdf7ad Thara Gopinath    2021-08-09  175  		ret = qcom_scm_lmh_dcvsh(LMH_SUB_FN_THERMAL, LMH_ALGO_MODE_ENABLE, 1,
53bca371cdf7ad Thara Gopinath    2021-08-09  176  					 LMH_NODE_DCVS, node_id, 0);
53bca371cdf7ad Thara Gopinath    2021-08-09  177  		if (ret) {
53bca371cdf7ad Thara Gopinath    2021-08-09  178  			dev_err(dev, "Error %d enabling thermal subfunction\n", ret);
53bca371cdf7ad Thara Gopinath    2021-08-09  179  			return ret;
53bca371cdf7ad Thara Gopinath    2021-08-09  180  		}
53bca371cdf7ad Thara Gopinath    2021-08-09  181  
53bca371cdf7ad Thara Gopinath    2021-08-09  182  		ret = qcom_scm_lmh_profile_change(0x1);
53bca371cdf7ad Thara Gopinath    2021-08-09  183  		if (ret) {
53bca371cdf7ad Thara Gopinath    2021-08-09  184  			dev_err(dev, "Error %d changing profile\n", ret);
53bca371cdf7ad Thara Gopinath    2021-08-09  185  			return ret;
53bca371cdf7ad Thara Gopinath    2021-08-09  186  		}
cf0c54db636c91 Thara Gopinath    2022-01-06  187  	}
53bca371cdf7ad Thara Gopinath    2021-08-09  188  
53bca371cdf7ad Thara Gopinath    2021-08-09  189  	/* Set default thermal trips */
53bca371cdf7ad Thara Gopinath    2021-08-09  190  	ret = qcom_scm_lmh_dcvsh(LMH_SUB_FN_THERMAL, LMH_TH_ARM_THRESHOLD, temp_arm,
53bca371cdf7ad Thara Gopinath    2021-08-09  191  				 LMH_NODE_DCVS, node_id, 0);
53bca371cdf7ad Thara Gopinath    2021-08-09  192  	if (ret) {
53bca371cdf7ad Thara Gopinath    2021-08-09  193  		dev_err(dev, "Error setting thermal ARM threshold%d\n", ret);
53bca371cdf7ad Thara Gopinath    2021-08-09  194  		return ret;
53bca371cdf7ad Thara Gopinath    2021-08-09  195  	}
53bca371cdf7ad Thara Gopinath    2021-08-09  196  
53bca371cdf7ad Thara Gopinath    2021-08-09  197  	ret = qcom_scm_lmh_dcvsh(LMH_SUB_FN_THERMAL, LMH_TH_HI_THRESHOLD, temp_high,
53bca371cdf7ad Thara Gopinath    2021-08-09  198  				 LMH_NODE_DCVS, node_id, 0);
53bca371cdf7ad Thara Gopinath    2021-08-09  199  	if (ret) {
53bca371cdf7ad Thara Gopinath    2021-08-09  200  		dev_err(dev, "Error setting thermal HI threshold%d\n", ret);
53bca371cdf7ad Thara Gopinath    2021-08-09  201  		return ret;
53bca371cdf7ad Thara Gopinath    2021-08-09  202  	}
53bca371cdf7ad Thara Gopinath    2021-08-09  203  
53bca371cdf7ad Thara Gopinath    2021-08-09  204  	ret = qcom_scm_lmh_dcvsh(LMH_SUB_FN_THERMAL, LMH_TH_LOW_THRESHOLD, temp_low,
53bca371cdf7ad Thara Gopinath    2021-08-09  205  				 LMH_NODE_DCVS, node_id, 0);
53bca371cdf7ad Thara Gopinath    2021-08-09  206  	if (ret) {
53bca371cdf7ad Thara Gopinath    2021-08-09  207  		dev_err(dev, "Error setting thermal ARM threshold%d\n", ret);
53bca371cdf7ad Thara Gopinath    2021-08-09  208  		return ret;
53bca371cdf7ad Thara Gopinath    2021-08-09  209  	}
53bca371cdf7ad Thara Gopinath    2021-08-09  210  
53bca371cdf7ad Thara Gopinath    2021-08-09  211  	lmh_data->irq = platform_get_irq(pdev, 0);
7ee2c3c0dac372 Jiri Slaby (SUSE  2025-06-11  212) 	lmh_data->domain = irq_domain_create_linear(dev_fwnode(dev), 1, &lmh_irq_ops, lmh_data);
53bca371cdf7ad Thara Gopinath    2021-08-09  213  	if (!lmh_data->domain) {
53bca371cdf7ad Thara Gopinath    2021-08-09  214  		dev_err(dev, "Error adding irq_domain\n");
53bca371cdf7ad Thara Gopinath    2021-08-09  215  		return -EINVAL;
53bca371cdf7ad Thara Gopinath    2021-08-09  216  	}
53bca371cdf7ad Thara Gopinath    2021-08-09  217  
53bca371cdf7ad Thara Gopinath    2021-08-09  218  	/* Disable the irq and let cpufreq enable it when ready to handle the interrupt */
53bca371cdf7ad Thara Gopinath    2021-08-09 @219  	irq_set_status_flags(lmh_data->irq, IRQ_NOAUTOEN);
53bca371cdf7ad Thara Gopinath    2021-08-09  220  	ret = devm_request_irq(dev, lmh_data->irq, lmh_handle_irq,
53bca371cdf7ad Thara Gopinath    2021-08-09  221  			       IRQF_ONESHOT | IRQF_NO_SUSPEND,
53bca371cdf7ad Thara Gopinath    2021-08-09  222  			       "lmh-irq", lmh_data);
53bca371cdf7ad Thara Gopinath    2021-08-09  223  	if (ret) {
53bca371cdf7ad Thara Gopinath    2021-08-09  224  		dev_err(dev, "Error %d registering irq %x\n", ret, lmh_data->irq);
53bca371cdf7ad Thara Gopinath    2021-08-09  225  		irq_domain_remove(lmh_data->domain);
53bca371cdf7ad Thara Gopinath    2021-08-09  226  		return ret;
53bca371cdf7ad Thara Gopinath    2021-08-09  227  	}
53bca371cdf7ad Thara Gopinath    2021-08-09  228  
53bca371cdf7ad Thara Gopinath    2021-08-09  229  	return 0;
53bca371cdf7ad Thara Gopinath    2021-08-09  230  }
53bca371cdf7ad Thara Gopinath    2021-08-09  231  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2025-07-26 16:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-25 13:55 [PATCH] thermal: qcom: make LMH select QCOM_SCM Dmitry Baryshkov
2025-07-26 16:28 ` kernel test robot [this message]
2025-07-26 16:28 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202507270052.BYR6Xdlk-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=liuyun01@kylinos.cn \
    --cc=llvm@lists.linux.dev \
    --cc=lukasz.luba@arm.com \
    --cc=lumag@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=thara.gopinath@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.