lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 16 Nov 2016 09:38:33 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Dave Gerlach <d-gerlach@...com>
Cc:     kbuild-all@...org, Viresh Kumar <viresh.kumar@...aro.org>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>, sboyd@...eaurora.org,
        linaro-kernel@...ts.linaro.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>,
        robh@...nel.org, Vincent Guittot <vincent.guittot@...aro.org>,
        Nishanth Menon <nm@...com>, Dave Gerlach <d-gerlach@...com>
Subject: Re: [TEST PATCH] WIP: Test OPP multi regulator support with
 ti-opp-domain driver

Hi Dave,

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.9-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Dave-Gerlach/WIP-Test-OPP-multi-regulator-support-with-ti-opp-domain-driver/20161116-084525
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All error/warnings (new ones prefixed by >>):

>> drivers/soc/ti/ti-opp-domain.c:231:49: warning: 'struct dev_pm_set_opp_data' declared inside parameter list will not be visible outside of this definition or declaration
    int ti_oppdm_set_opp(struct device *dev, struct dev_pm_set_opp_data *data)
                                                    ^~~~~~~~~~~~~~~~~~~
   drivers/soc/ti/ti-opp-domain.c: In function 'ti_oppdm_set_opp':
>> drivers/soc/ti/ti-opp-domain.c:233:50: error: dereferencing pointer to incomplete type 'struct dev_pm_set_opp_data'
     struct dev_pm_opp_supply *old_supply_vdd = &data->old_opp.supplies[0];
                                                     ^~
>> drivers/soc/ti/ti-opp-domain.c:244:71: error: dereferencing pointer to incomplete type 'struct dev_pm_opp_supply'
     vdd_uv = oppdm_get_optimal_vdd_voltage(dev, &opp_data, new_supply_vbb->u_volt);
                                                                          ^~
>> drivers/soc/ti/ti-opp-domain.c:330:1: warning: label 'restore_voltage' defined but not used [-Wunused-label]
    restore_voltage:
    ^~~~~~~~~~~~~~~
>> drivers/soc/ti/ti-opp-domain.c:325:1: warning: label 'restore_freq' defined but not used [-Wunused-label]
    restore_freq:
    ^~~~~~~~~~~~
>> drivers/soc/ti/ti-opp-domain.c:234:28: warning: unused variable 'old_supply_vbb' [-Wunused-variable]
     struct dev_pm_opp_supply *old_supply_vbb = &data->old_opp.supplies[1];
                               ^~~~~~~~~~~~~~
   drivers/soc/ti/ti-opp-domain.c: In function 'ti_oppdm_probe':
   drivers/soc/ti/ti-opp-domain.c:383:8: error: implicit declaration of function 'dev_pm_opp_set_regulators' [-Werror=implicit-function-declaration]
     ret = dev_pm_opp_set_regulators(cpu_dev, names,
           ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/soc/ti/ti-opp-domain.c:408:2: error: implicit declaration of function 'dev_pm_opp_register_set_opp_helper' [-Werror=implicit-function-declaration]
     dev_pm_opp_register_set_opp_helper(cpu_dev, ti_oppdm_set_opp);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/soc/ti/ti-opp-domain.c:378:28: warning: unused variable 'oppdm_dev' [-Wunused-variable]
     struct pm_opp_domain_dev *oppdm_dev;
                               ^~~~~~~~~
   At top level:
   drivers/soc/ti/ti-opp-domain.c:181:13: warning: 'oppdm_free_optimized_voltages' defined but not used [-Wunused-function]
    static void oppdm_free_optimized_voltages(struct device *dev,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +233 drivers/soc/ti/ti-opp-domain.c

   225	 * @dev:	opp domain device for which we are doing the transition
   226	 * @data:	information on regulators and new and old opps provided by
   227	 *		opp core to use in transition
   228	 *
   229	 * Return: If successful, 0, else appropriate error value.
   230	 */
 > 231	int ti_oppdm_set_opp(struct device *dev, struct dev_pm_set_opp_data *data)
   232	{
 > 233		struct dev_pm_opp_supply *old_supply_vdd = &data->old_opp.supplies[0];
 > 234		struct dev_pm_opp_supply *old_supply_vbb = &data->old_opp.supplies[1];
   235		struct dev_pm_opp_supply *new_supply_vdd = &data->new_opp.supplies[0];
   236		struct dev_pm_opp_supply *new_supply_vbb = &data->new_opp.supplies[1];
   237		unsigned long old_freq = data->old_opp.rate, freq = data->new_opp.rate;
   238		struct clk *clk = data->clk;
   239		struct regulator *vdd_reg = data->regulators[0];
   240		struct regulator *vbb_reg = data->regulators[1];
   241		int vdd_uv;
   242		int ret;
   243	
 > 244		vdd_uv = oppdm_get_optimal_vdd_voltage(dev, &opp_data, new_supply_vbb->u_volt);
   245	
   246		/* Scaling up? Scale voltage before frequency */
   247		if (freq > old_freq) {
   248			/* Regulator not available for device */
   249	
   250			dev_dbg(dev, "vbb pre %luuV[min %luuV max %luuV]\n",
   251				new_supply_vbb->u_volt, new_supply_vbb->u_volt_min,
   252				new_supply_vbb->u_volt_max);
   253	
   254			ret = regulator_set_voltage_triplet(vbb_reg,
   255							    new_supply_vbb->u_volt_min,
   256							    new_supply_vbb->u_volt,
   257							    new_supply_vbb->u_volt_max);
   258			if (ret) {
   259				dev_err(dev, "vbb failed for %luuV[min %luuV max %luuV]\n",
   260					new_supply_vbb->u_volt, new_supply_vbb->u_volt_min,
   261					new_supply_vbb->u_volt_max);
   262				return ret;
   263			}
   264	
   265			dev_dbg(dev, "%s: voltages (mV): %lu %lu %lu\n", __func__,
   266				new_supply_vdd->u_volt_min, new_supply_vdd->u_volt,
   267				new_supply_vdd->u_volt_max);
   268	
   269			ret = regulator_set_voltage_triplet(vdd_reg,
   270							    new_supply_vdd->u_volt_min,
   271							    new_supply_vdd->u_volt,
   272							    new_supply_vdd->u_volt_max);
   273			if (ret)
   274				dev_err(dev, "%s: failed to set voltage (%lu %lu %lu mV): %d\n",
   275					__func__, new_supply_vdd->u_volt_min,
   276					new_supply_vdd->u_volt,
   277					new_supply_vdd->u_volt_max, ret);
   278		}
   279	
   280		/* Change frequency */
   281		dev_dbg(dev, "%s: switching OPP: %lu Hz --> %lu Hz\n",
   282			__func__, old_freq, freq);
   283	
   284		ret = clk_set_rate(clk, freq);
   285		if (ret) {
   286			dev_err(dev, "%s: failed to set clock rate: %d\n", __func__,
   287				ret);
   288		}
   289	
   290		/* Scaling down? Scale voltage after frequency */
   291		if (freq < old_freq) {
   292			dev_dbg(dev, "vbb post %luuV[min %luuV max %luuV]\n",
   293				 new_supply_vbb->u_volt, new_supply_vbb->u_volt_min,
   294				 new_supply_vbb->u_volt_max);
   295	
   296			ret = regulator_set_voltage_triplet(vbb_reg,
   297							    new_supply_vbb->u_volt_min,
   298							    new_supply_vbb->u_volt,
   299							    new_supply_vbb->u_volt_max);
   300			if (ret) {
   301				dev_err(dev, "vbb failed for %luuV[min %luuV max %luuV]\n",
   302					new_supply_vbb->u_volt,
   303					new_supply_vbb->u_volt_min,
   304					new_supply_vbb->u_volt_max);
   305				return ret;
   306			}
   307	
   308			dev_dbg(dev, "%s: voltages (mV): %lu %lu %lu\n", __func__,
   309				new_supply_vdd->u_volt_min, new_supply_vdd->u_volt,
   310				new_supply_vdd->u_volt_max);
   311	
   312			ret = regulator_set_voltage_triplet(vdd_reg,
   313							    new_supply_vdd->u_volt_min,
   314							    new_supply_vdd->u_volt,
   315							    new_supply_vdd->u_volt_max);
   316			if (ret)
   317				dev_err(dev, "%s: failed to set voltage (%lu %lu %lu mV): %d\n",
   318					__func__, new_supply_vdd->u_volt_min,
   319					new_supply_vdd->u_volt,
   320					new_supply_vdd->u_volt_max, ret);
   321		}
   322	
   323		return 0;
   324	
 > 325	restore_freq:
   326		ret = clk_set_rate(clk, old_freq);
   327		if (ret)
   328			dev_err(dev, "%s: failed to restore old-freq (%lu Hz)\n",
   329				__func__, old_freq);
 > 330	restore_voltage:
   331		/* This shouldn't harm even if the voltages weren't updated earlier */
   332		if (old_supply_vdd->u_volt) {
   333			dev_dbg(dev, "%s: voltages (mV): %lu %lu %lu\n", __func__,
   334				old_supply_vdd->u_volt_min, old_supply_vdd->u_volt,
   335				old_supply_vdd->u_volt_max);
   336	
   337			ret = regulator_set_voltage_triplet(vdd_reg,
   338							    old_supply_vdd->u_volt_min,
   339							    old_supply_vdd->u_volt,
   340							    old_supply_vdd->u_volt_max);
   341			if (ret)
   342				dev_err(dev, "%s: failed to set voltage (%lu %lu %lu mV): %d\n",
   343					__func__, old_supply_vdd->u_volt_min,
   344					old_supply_vdd->u_volt,
   345					old_supply_vdd->u_volt_max, ret);
   346		}
   347	
   348		return ret;
   349	}
   350	
   351	static const struct ti_oppdm_of_data omap_generic_of_data = {
   352	};
   353	
   354	static const struct ti_oppdm_of_data omap_omap5_of_data = {
   355		.flags = OPPDM_EFUSE_CLASS0_OPTIMIZED_VOLTAGE,
   356		.efuse_voltage_mask = 0xFFF,
   357		.efuse_voltage_uv = false,
   358	};
   359	
   360	static const struct ti_oppdm_of_data omap_omap5core_of_data = {
   361		.flags = OPPDM_EFUSE_CLASS0_OPTIMIZED_VOLTAGE | OPPDM_HAS_NO_ABB,
   362		.efuse_voltage_mask = 0xFFF,
   363		.efuse_voltage_uv = false,
   364	};
   365	
   366	static const struct of_device_id ti_oppdm_of_match[] = {
   367		{.compatible = "ti,omap-oppdm", .data = &omap_generic_of_data},
   368		{.compatible = "ti,omap5-oppdm", .data = &omap_omap5_of_data},
   369		{.compatible = "ti,omap5-core-oppdm", .data = &omap_omap5core_of_data},
   370		{},
   371	};
   372	
   373	static int ti_oppdm_probe(struct platform_device *pdev)
   374	{
   375		struct device *dev = &pdev->dev;
   376		struct device *cpu_dev = get_cpu_device(0); /* Gross hack */
   377		const struct of_device_id *match;
 > 378		struct pm_opp_domain_dev *oppdm_dev;
   379		int ret = 0;
   380		const struct ti_oppdm_of_data *of_data;
   381		const char *names[] = {"vdd", "vbb"};
   382	
 > 383		ret = dev_pm_opp_set_regulators(cpu_dev, names,
   384						ARRAY_SIZE(names));
   385	
   386		if (ret)

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (45092 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ