Re: [PATCH] net: sched: tapr: remove WARN_ON() in taprio_get_start_time()
by kernel test robot
Hi Du,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.12-rc7 next-20210414]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Du-Cheng/net-sched-tapr-remove-W...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7f75285ca572eaabc028cf78c6ab5473d0d160be
config: powerpc64-randconfig-r014-20210415 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/0day-ci/linux/commit/274f557f95031e6965d9bb0ee67fdc22f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Du-Cheng/net-sched-tapr-remove-WARN_ON-in-taprio_get_start_time/20210415-144126
git checkout 274f557f95031e6965d9bb0ee67fdc22f2eb9b3a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> net/sched/sch_taprio.c:1012:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1031:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1053:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1077:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1106:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1117:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1132:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1145:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1171:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1187:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1208:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1233:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1269:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1310:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1385:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1411:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1432:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1601:1: error: function definition is not allowed here
{
^
net/sched/sch_taprio.c:1617:1: error: function definition is not allowed here
{
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
vim +1012 net/sched/sch_taprio.c
5a781ccbd19e46 Vinicius Costa Gomes 2018-09-28 1009
a3d43c0d56f1b9 Vinicius Costa Gomes 2019-04-29 1010 static void setup_first_close_time(struct taprio_sched *q,
a3d43c0d56f1b9 Vinicius Costa Gomes 2019-04-29 1011 struct sched_gate_list *sched, ktime_t base)
5a781ccbd19e46 Vinicius Costa Gomes 2018-09-28 @1012 {
5a781ccbd19e46 Vinicius Costa Gomes 2018-09-28 1013 struct sched_entry *first;
6ca6a6654225f3 Vinicius Costa Gomes 2019-04-29 1014 ktime_t cycle;
5a781ccbd19e46 Vinicius Costa Gomes 2018-09-28 1015
a3d43c0d56f1b9 Vinicius Costa Gomes 2019-04-29 1016 first = list_first_entry(&sched->entries,
a3d43c0d56f1b9 Vinicius Costa Gomes 2019-04-29 1017 struct sched_entry, list);
5a781ccbd19e46 Vinicius Costa Gomes 2018-09-28 1018
037be0374078e2 Vedang Patel 2019-06-25 1019 cycle = sched->cycle_time;
6ca6a6654225f3 Vinicius Costa Gomes 2019-04-29 1020
6ca6a6654225f3 Vinicius Costa Gomes 2019-04-29 1021 /* FIXME: find a better place to do this */
6ca6a6654225f3 Vinicius Costa Gomes 2019-04-29 1022 sched->cycle_close_time = ktime_add_ns(base, cycle);
6ca6a6654225f3 Vinicius Costa Gomes 2019-04-29 1023
a3d43c0d56f1b9 Vinicius Costa Gomes 2019-04-29 1024 first->close_time = ktime_add_ns(base, first->interval);
23bddf692d369c Jakub Kicinski 2019-04-17 1025 taprio_set_budget(q, first);
5a781ccbd19e46 Vinicius Costa Gomes 2018-09-28 1026 rcu_assign_pointer(q->current_entry, NULL);
a3d43c0d56f1b9 Vinicius Costa Gomes 2019-04-29 1027 }
5a781ccbd19e46 Vinicius Costa Gomes 2018-09-28 1028
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[freescale-fslc:5.4-2.3.x-imx 14383/18176] drivers/pci/controller/dwc/pci-imx6.c:1961: undefined reference to `dw_pcie_link_up'
by kernel test robot
tree: https://github.com/Freescale/linux-fslc 5.4-2.3.x-imx
head: d5bc857aa45e817fd9eb6ba7311be5775a5ce08c
commit: 61b7aecf354c8e55cffc466be937c184b8aaadb0 [14383/18176] MA-17597-5 pci: controller: dwc: support module build
config: x86_64-randconfig-s021-20210415 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://github.com/Freescale/linux-fslc/commit/61b7aecf354c8e55cffc466be9...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc 5.4-2.3.x-imx
git checkout 61b7aecf354c8e55cffc466be937c184b8aaadb0
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: drivers/pci/controller/dwc/pci-imx6.o: in function `imx6_pcie_start_link':
>> drivers/pci/controller/dwc/pci-imx6.c:1961: undefined reference to `dw_pcie_link_up'
ld: drivers/pci/controller/dwc/pci-imx6.o: in function `imx6_pcie_establish_link':
>> drivers/pci/controller/dwc/pci-imx6.c:1816: undefined reference to `dw_pcie_wait_for_link'
>> ld: drivers/pci/controller/dwc/pci-imx6.c:1864: undefined reference to `dw_pcie_wait_for_link'
ld: drivers/pci/controller/dwc/pci-imx6.o: in function `dw_pcie_readw_dbi':
>> drivers/pci/controller/dwc/pcie-designware.h:303: undefined reference to `dw_pcie_read_dbi'
ld: drivers/pci/controller/dwc/pci-imx6.o: in function `dw_pcie_writew_dbi':
>> drivers/pci/controller/dwc/pcie-designware.h:298: undefined reference to `dw_pcie_write_dbi'
ld: drivers/pci/controller/dwc/pci-imx6.o: in function `dw_pcie_readl_dbi':
drivers/pci/controller/dwc/pcie-designware.h:293: undefined reference to `dw_pcie_read_dbi'
ld: drivers/pci/controller/dwc/pci-imx6.o: in function `dw_pcie_writel_dbi':
drivers/pci/controller/dwc/pcie-designware.h:288: undefined reference to `dw_pcie_write_dbi'
vim +1961 drivers/pci/controller/dwc/pci-imx6.c
0ee2c1f2429f74 drivers/pci/controller/dwc/pci-imx6.c Leonard Crestez 2018-08-27 1794
e7d7705ace9494 drivers/pci/host/pci-imx6.c Bjorn Helgaas 2016-10-11 1795 static int imx6_pcie_establish_link(struct imx6_pcie *imx6_pcie)
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1796 {
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1797 struct dw_pcie *pci = imx6_pcie->pci;
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1798 struct device *dev = pci->dev;
1c7fae18a1fb6b drivers/pci/host/pci-imx6.c Bjorn Helgaas 2015-06-12 1799 u32 tmp;
a0427464cf4c4a drivers/pci/host/pci-imx6.c Troy Kisky 2015-06-12 1800 int ret;
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1801
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1802 /*
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1803 * Force Gen1 operation when starting the link. In case the link is
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1804 * started in Gen2 mode, there is a possibility the devices on the
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1805 * bus will not be detected at all. This happens with PCIe switches.
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1806 */
af235be4424b00 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-08 1807 if (!IS_ENABLED(CONFIG_PCI_IMX6_COMPLIANCE_TEST)) {
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1808 tmp = dw_pcie_readl_dbi(pci, PCIE_RC_LCR);
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1809 tmp &= ~PCIE_RC_LCR_MAX_LINK_SPEEDS_MASK;
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1810 tmp |= PCIE_RC_LCR_MAX_LINK_SPEEDS_GEN1;
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1811 dw_pcie_writel_dbi(pci, PCIE_RC_LCR, tmp);
af235be4424b00 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-08 1812 }
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1813
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1814 /* Start LTSSM. */
0ee2c1f2429f74 drivers/pci/controller/dwc/pci-imx6.c Leonard Crestez 2018-08-27 1815 imx6_pcie_ltssm_enable(dev);
ee6f37175b3f7a drivers/pci/controller/dwc/pci-imx6.c Andrey Smirnov 2019-04-14 @1816 ret = dw_pcie_wait_for_link(pci);
caf3f562e1161a drivers/pci/host/pci-imx6.c Fabio Estevam 2016-12-27 1817 if (ret)
54a47a83421a3b drivers/pci/host/pci-imx6.c Lucas Stach 2016-01-25 1818 goto err_reset_phy;
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1819
e76f906f9773bc drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-01-25 1820 if (imx6_pcie->link_gen >= 2) {
12589ba98b1145 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-06-22 1821 /* Fill up target link speed before speed change. */
12589ba98b1145 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-06-22 1822 tmp = dw_pcie_readl_dbi(pci, PCIE_RC_LC2SR);
12589ba98b1145 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-06-22 1823 tmp &= ~PCIE_RC_LCR_MAX_LINK_SPEEDS_MASK;
12589ba98b1145 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-06-22 1824 tmp |= imx6_pcie->link_gen;
12589ba98b1145 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-06-22 1825 dw_pcie_writel_dbi(pci, PCIE_RC_LC2SR, tmp);
12589ba98b1145 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-06-22 1826
12589ba98b1145 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-06-22 1827 tmp = dw_pcie_readl_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL);
12589ba98b1145 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-06-22 1828 tmp &= ~PORT_LOGIC_SPEED_CHANGE;
12589ba98b1145 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-06-22 1829 dw_pcie_writel_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL, tmp);
12589ba98b1145 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-06-22 1830
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1831 /* Allow Gen2 mode after the link is up. */
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1832 tmp = dw_pcie_readl_dbi(pci, PCIE_RC_LCR);
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1833 tmp &= ~PCIE_RC_LCR_MAX_LINK_SPEEDS_MASK;
e76f906f9773bc drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-01-25 1834 tmp |= imx6_pcie->link_gen;
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1835 dw_pcie_writel_dbi(pci, PCIE_RC_LCR, tmp);
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1836
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1837 /*
93b226f9c65a95 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1838 * Start Directed Speed Change so the best possible
93b226f9c65a95 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1839 * speed both link partners support can be negotiated.
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1840 */
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1841 tmp = dw_pcie_readl_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL);
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1842 tmp |= PORT_LOGIC_SPEED_CHANGE;
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1843 dw_pcie_writel_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL, tmp);
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1844
4c458bb347ae01 drivers/pci/controller/dwc/pci-imx6.c Andrey Smirnov 2019-02-01 1845 if (imx6_pcie->drvdata->flags &
4c458bb347ae01 drivers/pci/controller/dwc/pci-imx6.c Andrey Smirnov 2019-02-01 1846 IMX6_PCIE_FLAG_IMX6_SPEED_CHANGE) {
e6dcd87fff69a9 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1847 /*
e6dcd87fff69a9 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1848 * On i.MX7, DIRECT_SPEED_CHANGE behaves differently
e6dcd87fff69a9 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1849 * from i.MX6 family when no link speed transition
e6dcd87fff69a9 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1850 * occurs and we go Gen1 -> yep, Gen1. The difference
e6dcd87fff69a9 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1851 * is that, in such case, it will not be cleared by HW
e6dcd87fff69a9 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1852 * which will cause the following code to report false
e6dcd87fff69a9 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1853 * failure.
e6dcd87fff69a9 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1854 */
e6dcd87fff69a9 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1855
e7d7705ace9494 drivers/pci/host/pci-imx6.c Bjorn Helgaas 2016-10-11 1856 ret = imx6_pcie_wait_for_speed_change(imx6_pcie);
a0427464cf4c4a drivers/pci/host/pci-imx6.c Troy Kisky 2015-06-12 1857 if (ret) {
13957652f7242a drivers/pci/host/pci-imx6.c Bjorn Helgaas 2016-10-06 1858 dev_err(dev, "Failed to bring link up!\n");
54a47a83421a3b drivers/pci/host/pci-imx6.c Lucas Stach 2016-01-25 1859 goto err_reset_phy;
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1860 }
e6dcd87fff69a9 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1861 }
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1862
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1863 /* Make sure link training is finished as well! */
ee6f37175b3f7a drivers/pci/controller/dwc/pci-imx6.c Andrey Smirnov 2019-04-14 @1864 ret = dw_pcie_wait_for_link(pci);
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1865 if (ret) {
13957652f7242a drivers/pci/host/pci-imx6.c Bjorn Helgaas 2016-10-06 1866 dev_err(dev, "Failed to bring link up!\n");
54a47a83421a3b drivers/pci/host/pci-imx6.c Lucas Stach 2016-01-25 1867 goto err_reset_phy;
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1868 }
93b226f9c65a95 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1869 } else {
93b226f9c65a95 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1870 dev_info(dev, "Link: Gen2 disabled\n");
93b226f9c65a95 drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1871 }
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1872
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1873 tmp = dw_pcie_readl_dbi(pci, PCIE_RC_LCSR);
13957652f7242a drivers/pci/host/pci-imx6.c Bjorn Helgaas 2016-10-06 1874 dev_info(dev, "Link up, Gen%i\n", (tmp >> 16) & 0xf);
a0427464cf4c4a drivers/pci/host/pci-imx6.c Troy Kisky 2015-06-12 1875 return 0;
54a47a83421a3b drivers/pci/host/pci-imx6.c Lucas Stach 2016-01-25 1876
54a47a83421a3b drivers/pci/host/pci-imx6.c Lucas Stach 2016-01-25 1877 err_reset_phy:
13957652f7242a drivers/pci/host/pci-imx6.c Bjorn Helgaas 2016-10-06 1878 dev_dbg(dev, "PHY DEBUG_R0=0x%08x DEBUG_R1=0x%08x\n",
60ef4b072ba089 drivers/pci/controller/dwc/pci-imx6.c Andrey Smirnov 2019-04-14 1879 dw_pcie_readl_dbi(pci, PCIE_PORT_DEBUG0),
60ef4b072ba089 drivers/pci/controller/dwc/pci-imx6.c Andrey Smirnov 2019-04-14 1880 dw_pcie_readl_dbi(pci, PCIE_PORT_DEBUG1));
2a6a85d5368e55 drivers/pci/host/pci-imx6.c Bjorn Helgaas 2016-10-11 1881 imx6_pcie_reset_phy(imx6_pcie);
d1fcbc345b82cd drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-28 1882 if (!IS_ENABLED(CONFIG_PCI_IMX6_COMPLIANCE_TEST)) {
d1fcbc345b82cd drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-28 1883 imx6_pcie_clk_disable(imx6_pcie);
d1fcbc345b82cd drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-28 1884 if (imx6_pcie->vpcie != NULL)
d1fcbc345b82cd drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-28 1885 regulator_disable(imx6_pcie->vpcie);
d1fcbc345b82cd drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-28 1886 if (imx6_pcie->epdev_on != NULL)
d1fcbc345b82cd drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-28 1887 regulator_disable(imx6_pcie->epdev_on);
d1fcbc345b82cd drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-28 1888 }
d1fcbc345b82cd drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-28 1889
54a47a83421a3b drivers/pci/host/pci-imx6.c Lucas Stach 2016-01-25 1890 return ret;
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1891 }
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1892
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1893 static void pci_imx_set_msi_en(struct pcie_port *pp)
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1894 {
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1895 u16 val;
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1896 struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1897
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1898 if (pci_msi_enabled()) {
7b842d74f6f105 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-02-20 1899 dw_pcie_dbi_ro_wr_en(pci);
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1900 val = dw_pcie_readw_dbi(pci, PCIE_RC_IMX6_MSI_CAP +
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1901 PCI_MSI_FLAGS);
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1902 val |= PCI_MSI_FLAGS_ENABLE;
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1903 val &= ~PCI_MSI_FLAGS_64BIT;
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1904 dw_pcie_writew_dbi(pci, PCIE_RC_IMX6_MSI_CAP + PCI_MSI_FLAGS,
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1905 val);
7b842d74f6f105 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-02-20 1906 dw_pcie_dbi_ro_wr_dis(pci);
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1907 }
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1908 }
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1909
4a301766f5263d drivers/pci/dwc/pci-imx6.c Bjorn Andersson 2017-07-15 1910 static int imx6_pcie_host_init(struct pcie_port *pp)
fa33a6d87eac1a drivers/pci/host/pci-imx6.c Marek Vasut 2013-12-12 1911 {
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1912 struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1913 struct imx6_pcie *imx6_pcie = to_imx6_pcie(pci);
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1914
d95659f2bbd85d drivers/pci/controller/dwc/pci-imx6.c Fugang Duan 2019-11-02 1915 if (gpio_is_valid(imx6_pcie->dis_gpio))
d95659f2bbd85d drivers/pci/controller/dwc/pci-imx6.c Fugang Duan 2019-11-02 1916 gpio_set_value_cansleep(imx6_pcie->dis_gpio, 1);
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1917 dw_pcie_setup_rc(pp);
f503843f85d287 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-22 1918 pci_imx_set_msi_en(pp);
d1fcbc345b82cd drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-28 1919 if (imx6_pcie_establish_link(imx6_pcie))
d1fcbc345b82cd drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2019-11-28 1920 return -ENODEV;
6e8f69523e69ae drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-10-19 1921 dw_pcie_msi_init(pp);
d1dc9749a5b823 drivers/pci/host/pci-imx6.c Lucas Stach 2014-03-28 1922
4a301766f5263d drivers/pci/dwc/pci-imx6.c Bjorn Andersson 2017-07-15 1923 return 0;
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1924 }
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1925
4ab2e7c0df6b8b drivers/pci/dwc/pci-imx6.c Jisheng Zhang 2017-06-05 1926 static const struct dw_pcie_host_ops imx6_pcie_host_ops = {
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1927 .host_init = imx6_pcie_host_init,
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1928 };
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1929
bde4a5a00e761f drivers/pci/dwc/pci-imx6.c Andrey Smirnov 2017-03-28 1930 static int imx6_add_pcie_port(struct imx6_pcie *imx6_pcie,
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1931 struct platform_device *pdev)
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1932 {
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1933 struct dw_pcie *pci = imx6_pcie->pci;
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1934 struct pcie_port *pp = &pci->pp;
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c Kishon Vijay Abraham I 2017-02-15 1935 struct device *dev = &pdev->dev;
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1936 int ret;
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1937
d1dc9749a5b823 drivers/pci/host/pci-imx6.c Lucas Stach 2014-03-28 1938 if (IS_ENABLED(CONFIG_PCI_MSI)) {
d1dc9749a5b823 drivers/pci/host/pci-imx6.c Lucas Stach 2014-03-28 1939 pp->msi_irq = platform_get_irq_byname(pdev, "msi");
d1dc9749a5b823 drivers/pci/host/pci-imx6.c Lucas Stach 2014-03-28 1940 if (pp->msi_irq <= 0) {
13957652f7242a drivers/pci/host/pci-imx6.c Bjorn Helgaas 2016-10-06 1941 dev_err(dev, "failed to get MSI irq\n");
d1dc9749a5b823 drivers/pci/host/pci-imx6.c Lucas Stach 2014-03-28 1942 return -ENODEV;
d1dc9749a5b823 drivers/pci/host/pci-imx6.c Lucas Stach 2014-03-28 1943 }
d1dc9749a5b823 drivers/pci/host/pci-imx6.c Lucas Stach 2014-03-28 1944 }
d1dc9749a5b823 drivers/pci/host/pci-imx6.c Lucas Stach 2014-03-28 1945
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1946 pp->ops = &imx6_pcie_host_ops;
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1947
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1948 ret = dw_pcie_host_init(pp);
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1949 if (ret) {
13957652f7242a drivers/pci/host/pci-imx6.c Bjorn Helgaas 2016-10-06 1950 dev_err(dev, "failed to initialize host\n");
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1951 return ret;
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1952 }
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1953
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1954 return 0;
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1955 }
bb38919ec56e07 drivers/pci/host/pci-imx6.c Sean Cross 2013-09-26 1956
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1957 static int imx6_pcie_start_link(struct dw_pcie *pci)
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1958 {
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1959 struct device *dev = pci->dev;
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1960
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 @1961 if (dw_pcie_link_up(pci)) {
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1962 dev_dbg(dev, "link is already up\n");
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1963 return 0;
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1964 }
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1965
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1966 /* Start LTSSM. */
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1967 imx6_pcie_ltssm_enable(dev);
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1968
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1969 return 0;
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1970 }
112ade807b909b drivers/pci/controller/dwc/pci-imx6.c Richard Zhu 2020-05-14 1971
:::::: The code at line 1961 was first introduced by commit
:::::: 112ade807b909b5bb44dd16eca0313a2085b4c0c MLK-24012-12 pci: imx: add the imx8qxp ep support
:::::: TO: Richard Zhu <hongxing.zhu(a)nxp.com>
:::::: CC: Richard Zhu <hongxing.zhu(a)nxp.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v2 4/6] phy: phy-can-transceiver: Add support for generic CAN transceiver driver
by kernel test robot
Hi Aswath,
I love your patch! Perhaps something to improve:
[auto build test WARNING on mkl-can-next/testing]
[also build test WARNING on linux/master robh/for-next linus/master v5.12-rc7 next-20210414]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Aswath-Govindraju/CAN-TRANSCEIVE...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
config: m68k-randconfig-r014-20210415 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/f0bb46b67a1f6116c84a7691e05f50593...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Aswath-Govindraju/CAN-TRANSCEIVER-Add-support-for-CAN-transceivers/20210414-220857
git checkout f0bb46b67a1f6116c84a7691e05f5059377e4640
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/phy/phy-can-transceiver.c:79:5: warning: no previous prototype for 'can_transceiver_phy_probe' [-Wmissing-prototypes]
79 | int can_transceiver_phy_probe(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/can_transceiver_phy_probe +79 drivers/phy/phy-can-transceiver.c
78
> 79 int can_transceiver_phy_probe(struct platform_device *pdev)
80 {
81 struct phy_provider *phy_provider;
82 struct device *dev = &pdev->dev;
83 struct can_transceiver_phy *can_transceiver_phy;
84 const struct can_transceiver_data *drvdata;
85 const struct of_device_id *match;
86 struct phy *phy;
87 struct gpio_desc *standby_gpio;
88 struct gpio_desc *enable_gpio;
89 u32 max_bitrate = 0;
90
91 can_transceiver_phy = devm_kzalloc(dev, sizeof(struct can_transceiver_phy), GFP_KERNEL);
92 if (!can_transceiver_phy)
93 return -ENOMEM;
94
95 match = of_match_node(can_transceiver_phy_ids, pdev->dev.of_node);
96 drvdata = match->data;
97
98 phy = devm_phy_create(dev, dev->of_node,
99 &can_transceiver_phy_ops);
100 if (IS_ERR(phy)) {
101 dev_err(dev, "failed to create can transceiver phy\n");
102 return PTR_ERR(phy);
103 }
104
105 device_property_read_u32(dev, "max-bitrate", &max_bitrate);
106 if (!max_bitrate)
107 dev_warn(dev, "Invalid value for transceiver max bitrate. Ignoring bitrate limit\n");
108 phy->attrs.max_link_rate = max_bitrate;
109
110 can_transceiver_phy->generic_phy = phy;
111
112 if (drvdata->flags & CAN_TRANSCEIVER_STB_PRESENT) {
113 standby_gpio = devm_gpiod_get(dev, "standby", GPIOD_OUT_HIGH);
114 if (IS_ERR(standby_gpio))
115 return PTR_ERR(standby_gpio);
116 can_transceiver_phy->standby_gpio = standby_gpio;
117 }
118
119 if (drvdata->flags & CAN_TRANSCEIVER_EN_PRESENT) {
120 enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
121 if (IS_ERR(enable_gpio))
122 return PTR_ERR(enable_gpio);
123 can_transceiver_phy->enable_gpio = enable_gpio;
124 }
125
126 phy_set_drvdata(can_transceiver_phy->generic_phy, can_transceiver_phy);
127
128 phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
129
130 return PTR_ERR_OR_ZERO(phy_provider);
131 }
132
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[peterz-queue:perf/core 18/22] kernel/events/core.c:6418:22: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core
head: 0da503cd07380952599b67ded6efe030d78ea42d
commit: c7d4112e9f0e69edd649665836ce72008b95ab9f [18/22] perf: Add support for SIGTRAP on perf events
config: arc-randconfig-s032-20210414 (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue perf/core
git checkout c7d4112e9f0e69edd649665836ce72008b95ab9f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
kernel/events/core.c:584:26: sparse: sparse: function 'perf_pmu_name' with external linkage has definition
kernel/events/core.c:1467:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:1467:15: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:1467:15: sparse: struct perf_event_context *
kernel/events/core.c:1480:28: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:1480:28: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:1480:28: sparse: struct perf_event_context *
kernel/events/core.c:3430:18: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3430:18: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3430:18: sparse: struct perf_event_context *
kernel/events/core.c:3431:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3431:23: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3431:23: sparse: struct perf_event_context *
kernel/events/core.c:3479:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3479:25: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3479:25: sparse: struct perf_event_context *
kernel/events/core.c:3480:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:3480:25: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:3480:25: sparse: struct perf_event_context *
kernel/events/core.c:4673:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:4673:25: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:4673:25: sparse: struct perf_event_context *
kernel/events/core.c:5935:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5935:9: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:5935:9: sparse: struct perf_buffer *
kernel/events/core.c:5411:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __poll_t [usertype] events @@ got int @@
kernel/events/core.c:5641:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5641:22: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:5641:22: sparse: struct perf_buffer *
kernel/events/core.c:5777:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5777:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:5777:14: sparse: struct perf_buffer *
kernel/events/core.c:5810:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5810:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:5810:14: sparse: struct perf_buffer *
kernel/events/core.c:5867:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5867:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:5867:14: sparse: struct perf_buffer *
kernel/events/core.c:5953:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5953:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:5953:14: sparse: struct perf_buffer *
kernel/events/core.c:5966:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:5966:14: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:5966:14: sparse: struct perf_buffer *
>> kernel/events/core.c:6418:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *[addressable] [assigned] _addr @@ got void * @@
kernel/events/core.c:6418:22: sparse: expected void [noderef] __user *[addressable] [assigned] _addr
kernel/events/core.c:6418:22: sparse: got void *
kernel/events/core.c:6682:6: sparse: sparse: symbol 'perf_pmu_snapshot_aux' was not declared. Should it be static?
kernel/events/core.c:7601:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:7601:23: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:7601:23: sparse: struct perf_event_context *
kernel/events/core.c:7653:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:7653:23: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:7653:23: sparse: struct perf_event_context *
kernel/events/core.c:7692:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:7692:13: sparse: struct perf_buffer [noderef] __rcu *
kernel/events/core.c:7692:13: sparse: struct perf_buffer *
kernel/events/core.c:7797:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/events/core.c:7797:61: sparse: expected struct task_struct *p
kernel/events/core.c:7797:61: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/events/core.c:7799:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/events/core.c:7799:61: sparse: expected struct task_struct *p
kernel/events/core.c:7799:61: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/events/core.c:8504:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:8504:23: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:8504:23: sparse: struct perf_event_context *
kernel/events/core.c:9469:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9469:9: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9469:9: sparse: struct swevent_hlist *
kernel/events/core.c:9508:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9508:17: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9508:17: sparse: struct swevent_hlist *
kernel/events/core.c:9689:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9689:23: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:9689:23: sparse: struct perf_event_context *
kernel/events/core.c:10874:1: sparse: sparse: symbol 'dev_attr_nr_addr_filters' was not declared. Should it be static?
kernel/events/core.c:12630:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:12630:9: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:12630:9: sparse: struct perf_event_context *
kernel/events/core.c:12740:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:12740:17: sparse: struct perf_event_context [noderef] __rcu *
kernel/events/core.c:12740:17: sparse: struct perf_event_context *
kernel/events/core.c:13170:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:13170:17: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:13170:17: sparse: struct swevent_hlist *
kernel/events/core.c:166:9: sparse: sparse: context imbalance in 'perf_ctx_lock' - wrong count at exit
kernel/events/core.c:174:17: sparse: sparse: context imbalance in 'perf_ctx_unlock' - unexpected unlock
kernel/events/core.c: note: in included file (through include/linux/rculist.h, include/linux/dcache.h, include/linux/fs.h):
include/linux/rcupdate.h:706:9: sparse: sparse: context imbalance in 'perf_lock_task_context' - different lock contexts for basic block
kernel/events/core.c:1514:17: sparse: sparse: context imbalance in 'perf_pin_task_context' - unexpected unlock
kernel/events/core.c:2827:9: sparse: sparse: context imbalance in '__perf_install_in_context' - wrong count at exit
kernel/events/core.c:4645:17: sparse: sparse: context imbalance in 'find_get_context' - unexpected unlock
kernel/events/core.c: note: in included file:
kernel/events/internal.h:197:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got void const *src @@
kernel/events/core.c:9318:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9318:17: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9318:17: sparse: struct swevent_hlist *
kernel/events/core.c:9338:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9338:17: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9338:17: sparse: struct swevent_hlist *
kernel/events/core.c:9458:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9458:16: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9458:16: sparse: struct swevent_hlist *
kernel/events/core.c:9458:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9458:16: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9458:16: sparse: struct swevent_hlist *
kernel/events/core.c:9458:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/events/core.c:9458:16: sparse: struct swevent_hlist [noderef] __rcu *
kernel/events/core.c:9458:16: sparse: struct swevent_hlist *
vim +6418 kernel/events/core.c
6394
6395 static void perf_sigtrap(struct perf_event *event)
6396 {
6397 struct kernel_siginfo info;
6398
6399 /*
6400 * We'd expect this to only occur if the irq_work is delayed and either
6401 * ctx->task or current has changed in the meantime. This can be the
6402 * case on architectures that do not implement arch_irq_work_raise().
6403 */
6404 if (WARN_ON_ONCE(event->ctx->task != current))
6405 return;
6406
6407 /*
6408 * perf_pending_event() can race with the task exiting.
6409 */
6410 if (current->flags & PF_EXITING)
6411 return;
6412
6413 clear_siginfo(&info);
6414 info.si_signo = SIGTRAP;
6415 info.si_code = TRAP_PERF;
6416 info.si_errno = event->attr.type;
6417 info.si_perf = event->attr.sig_data;
> 6418 info.si_addr = (void *)event->sig_addr;
6419 force_sig_info(&info);
6420 }
6421
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH] net: sched: tapr: remove WARN_ON() in taprio_get_start_time()
by kernel test robot
Hi Du,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.12-rc7 next-20210414]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Du-Cheng/net-sched-tapr-remove-W...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7f75285ca572eaabc028cf78c6ab5473d0d160be
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/274f557f95031e6965d9bb0ee67fdc22f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Du-Cheng/net-sched-tapr-remove-WARN_ON-in-taprio_get_start_time/20210415-144126
git checkout 274f557f95031e6965d9bb0ee67fdc22f2eb9b3a
# save the attached .config to linux build tree
make W=1 W=1 ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
1646 | static int taprio_init(struct Qdisc *sch, struct nlattr *opt,
| ^~~~~~~~~~~
net/sched/sch_taprio.c:1712:29: error: invalid storage class for function 'taprio_queue_get'
1712 | static struct netdev_queue *taprio_queue_get(struct Qdisc *sch,
| ^~~~~~~~~~~~~~~~
net/sched/sch_taprio.c:1724:12: error: invalid storage class for function 'taprio_graft'
1724 | static int taprio_graft(struct Qdisc *sch, unsigned long cl,
| ^~~~~~~~~~~~
net/sched/sch_taprio.c:1750:12: error: invalid storage class for function 'dump_entry'
1750 | static int dump_entry(struct sk_buff *msg,
| ^~~~~~~~~~
net/sched/sch_taprio.c:1780:12: error: invalid storage class for function 'dump_schedule'
1780 | static int dump_schedule(struct sk_buff *msg,
| ^~~~~~~~~~~~~
net/sched/sch_taprio.c:1816:12: error: invalid storage class for function 'taprio_dump'
1816 | static int taprio_dump(struct Qdisc *sch, struct sk_buff *skb)
| ^~~~~~~~~~~
net/sched/sch_taprio.c:1886:22: error: invalid storage class for function 'taprio_leaf'
1886 | static struct Qdisc *taprio_leaf(struct Qdisc *sch, unsigned long cl)
| ^~~~~~~~~~~
net/sched/sch_taprio.c:1896:22: error: invalid storage class for function 'taprio_find'
1896 | static unsigned long taprio_find(struct Qdisc *sch, u32 classid)
| ^~~~~~~~~~~
net/sched/sch_taprio.c:1905:12: error: invalid storage class for function 'taprio_dump_class'
1905 | static int taprio_dump_class(struct Qdisc *sch, unsigned long cl,
| ^~~~~~~~~~~~~~~~~
net/sched/sch_taprio.c:1917:12: error: invalid storage class for function 'taprio_dump_class_stats'
1917 | static int taprio_dump_class_stats(struct Qdisc *sch, unsigned long cl,
| ^~~~~~~~~~~~~~~~~~~~~~~
net/sched/sch_taprio.c:1931:13: error: invalid storage class for function 'taprio_walk'
1931 | static void taprio_walk(struct Qdisc *sch, struct qdisc_walker *arg)
| ^~~~~~~~~~~
net/sched/sch_taprio.c:1949:29: error: invalid storage class for function 'taprio_select_queue'
1949 | static struct netdev_queue *taprio_select_queue(struct Qdisc *sch,
| ^~~~~~~~~~~~~~~~~~~
net/sched/sch_taprio.c:1956:12: error: initializer element is not constant
1956 | .graft = taprio_graft,
| ^~~~~~~~~~~~
net/sched/sch_taprio.c:1956:12: note: (near initialization for 'taprio_class_ops.graft')
net/sched/sch_taprio.c:1957:11: error: initializer element is not constant
1957 | .leaf = taprio_leaf,
| ^~~~~~~~~~~
net/sched/sch_taprio.c:1957:11: note: (near initialization for 'taprio_class_ops.leaf')
net/sched/sch_taprio.c:1958:11: error: initializer element is not constant
1958 | .find = taprio_find,
| ^~~~~~~~~~~
net/sched/sch_taprio.c:1958:11: note: (near initialization for 'taprio_class_ops.find')
net/sched/sch_taprio.c:1959:11: error: initializer element is not constant
1959 | .walk = taprio_walk,
| ^~~~~~~~~~~
net/sched/sch_taprio.c:1959:11: note: (near initialization for 'taprio_class_ops.walk')
net/sched/sch_taprio.c:1960:11: error: initializer element is not constant
1960 | .dump = taprio_dump_class,
| ^~~~~~~~~~~~~~~~~
net/sched/sch_taprio.c:1960:11: note: (near initialization for 'taprio_class_ops.dump')
net/sched/sch_taprio.c:1961:16: error: initializer element is not constant
1961 | .dump_stats = taprio_dump_class_stats,
| ^~~~~~~~~~~~~~~~~~~~~~~
net/sched/sch_taprio.c:1961:16: note: (near initialization for 'taprio_class_ops.dump_stats')
net/sched/sch_taprio.c:1962:18: error: initializer element is not constant
1962 | .select_queue = taprio_select_queue,
| ^~~~~~~~~~~~~~~~~~~
net/sched/sch_taprio.c:1962:18: note: (near initialization for 'taprio_class_ops.select_queue')
net/sched/sch_taprio.c:1969:11: error: initializer element is not constant
1969 | .init = taprio_init,
| ^~~~~~~~~~~
net/sched/sch_taprio.c:1969:11: note: (near initialization for 'taprio_qdisc_ops.init')
net/sched/sch_taprio.c:1970:13: error: initializer element is not constant
1970 | .change = taprio_change,
| ^~~~~~~~~~~~~
net/sched/sch_taprio.c:1970:13: note: (near initialization for 'taprio_qdisc_ops.change')
net/sched/sch_taprio.c:1971:13: error: initializer element is not constant
1971 | .destroy = taprio_destroy,
| ^~~~~~~~~~~~~~
net/sched/sch_taprio.c:1971:13: note: (near initialization for 'taprio_qdisc_ops.destroy')
net/sched/sch_taprio.c:1972:12: error: initializer element is not constant
1972 | .reset = taprio_reset,
| ^~~~~~~~~~~~
net/sched/sch_taprio.c:1972:12: note: (near initialization for 'taprio_qdisc_ops.reset')
net/sched/sch_taprio.c:1976:11: error: initializer element is not constant
1976 | .dump = taprio_dump,
| ^~~~~~~~~~~
net/sched/sch_taprio.c:1976:11: note: (near initialization for 'taprio_qdisc_ops.dump')
net/sched/sch_taprio.c:1981:19: error: initializer element is not constant
1981 | .notifier_call = taprio_dev_notifier,
| ^~~~~~~~~~~~~~~~~~~
net/sched/sch_taprio.c:1981:19: note: (near initialization for 'taprio_device_notifier.notifier_call')
net/sched/sch_taprio.c:1984:19: error: invalid storage class for function 'taprio_module_init'
1984 | static int __init taprio_module_init(void)
| ^~~~~~~~~~~~~~~~~~
net/sched/sch_taprio.c:1994:20: error: invalid storage class for function 'taprio_module_exit'
1994 | static void __exit taprio_module_exit(void)
| ^~~~~~~~~~~~~~~~~~
In file included from net/sched/sch_taprio.c:18:
include/linux/module.h:129:42: error: invalid storage class for function '__inittest'
129 | static inline initcall_t __maybe_unused __inittest(void) \
| ^~~~~~~~~~
net/sched/sch_taprio.c:2000:1: note: in expansion of macro 'module_init'
2000 | module_init(taprio_module_init);
| ^~~~~~~~~~~
>> net/sched/sch_taprio.c:2000:1: warning: 'alias' attribute ignored [-Wattributes]
In file included from net/sched/sch_taprio.c:18:
include/linux/module.h:135:42: error: invalid storage class for function '__exittest'
135 | static inline exitcall_t __maybe_unused __exittest(void) \
| ^~~~~~~~~~
net/sched/sch_taprio.c:2001:1: note: in expansion of macro 'module_exit'
2001 | module_exit(taprio_module_exit);
| ^~~~~~~~~~~
include/linux/module.h:135:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
135 | static inline exitcall_t __maybe_unused __exittest(void) \
| ^~~~~~
net/sched/sch_taprio.c:2001:1: note: in expansion of macro 'module_exit'
2001 | module_exit(taprio_module_exit);
| ^~~~~~~~~~~
net/sched/sch_taprio.c:2001:1: warning: 'alias' attribute ignored [-Wattributes]
In file included from include/linux/module.h:21,
from net/sched/sch_taprio.c:18:
include/linux/moduleparam.h:24:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
24 | static const char __UNIQUE_ID(name)[] \
| ^~~~~~
include/linux/module.h:160:32: note: in expansion of macro '__MODULE_INFO'
160 | #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
| ^~~~~~~~~~~~~
include/linux/module.h:224:46: note: in expansion of macro 'MODULE_INFO'
224 | #define MODULE_LICENSE(_license) MODULE_FILE MODULE_INFO(license, _license)
| ^~~~~~~~~~~
net/sched/sch_taprio.c:2002:1: note: in expansion of macro 'MODULE_LICENSE'
2002 | MODULE_LICENSE("GPL");
| ^~~~~~~~~~~~~~
net/sched/sch_taprio.c:2002:1: error: expected declaration or statement at end of input
At top level:
net/sched/sch_taprio.c:1130:32: warning: 'taprio_offload_get' defined but not used [-Wunused-function]
1130 | struct tc_taprio_qopt_offload *taprio_offload_get(struct tc_taprio_qopt_offload
| ^~~~~~~~~~~~~~~~~~
vim +/alias +2000 net/sched/sch_taprio.c
5a781ccbd19e46 Vinicius Costa Gomes 2018-09-28 1999
5a781ccbd19e46 Vinicius Costa Gomes 2018-09-28 @2000 module_init(taprio_module_init);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[linux-next:master 7952/12404] arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line'
by kernel test robot
Hi Andrew,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: dcf1b51d6b2ac5da234ae6883ed0e9422c339588
commit: aec0fae62e47050019474936248a311a0ab08705 [7952/12404] KVM: arm64: Log source when panicking from nVHE hyp
config: arm64-randconfig-r004-20210413 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout aec0fae62e47050019474936248a311a0ab08705
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/arm64/kvm/handle_exit.c:177:21: warning: initialized field overwritten [-Woverride-init]
177 | [ESR_ELx_EC_WFx] = kvm_handle_wfx,
| ^~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:177:21: note: (near initialization for 'arm_exit_handlers[1]')
arch/arm64/kvm/handle_exit.c:178:25: warning: initialized field overwritten [-Woverride-init]
178 | [ESR_ELx_EC_CP15_32] = kvm_handle_cp15_32,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:178:25: note: (near initialization for 'arm_exit_handlers[3]')
arch/arm64/kvm/handle_exit.c:179:25: warning: initialized field overwritten [-Woverride-init]
179 | [ESR_ELx_EC_CP15_64] = kvm_handle_cp15_64,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:179:25: note: (near initialization for 'arm_exit_handlers[4]')
arch/arm64/kvm/handle_exit.c:180:25: warning: initialized field overwritten [-Woverride-init]
180 | [ESR_ELx_EC_CP14_MR] = kvm_handle_cp14_32,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:180:25: note: (near initialization for 'arm_exit_handlers[5]')
arch/arm64/kvm/handle_exit.c:181:25: warning: initialized field overwritten [-Woverride-init]
181 | [ESR_ELx_EC_CP14_LS] = kvm_handle_cp14_load_store,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:181:25: note: (near initialization for 'arm_exit_handlers[6]')
arch/arm64/kvm/handle_exit.c:182:25: warning: initialized field overwritten [-Woverride-init]
182 | [ESR_ELx_EC_CP14_64] = kvm_handle_cp14_64,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:182:25: note: (near initialization for 'arm_exit_handlers[12]')
arch/arm64/kvm/handle_exit.c:183:23: warning: initialized field overwritten [-Woverride-init]
183 | [ESR_ELx_EC_HVC32] = handle_hvc,
| ^~~~~~~~~~
arch/arm64/kvm/handle_exit.c:183:23: note: (near initialization for 'arm_exit_handlers[18]')
arch/arm64/kvm/handle_exit.c:184:23: warning: initialized field overwritten [-Woverride-init]
184 | [ESR_ELx_EC_SMC32] = handle_smc,
| ^~~~~~~~~~
arch/arm64/kvm/handle_exit.c:184:23: note: (near initialization for 'arm_exit_handlers[19]')
arch/arm64/kvm/handle_exit.c:185:23: warning: initialized field overwritten [-Woverride-init]
185 | [ESR_ELx_EC_HVC64] = handle_hvc,
| ^~~~~~~~~~
arch/arm64/kvm/handle_exit.c:185:23: note: (near initialization for 'arm_exit_handlers[22]')
arch/arm64/kvm/handle_exit.c:186:23: warning: initialized field overwritten [-Woverride-init]
186 | [ESR_ELx_EC_SMC64] = handle_smc,
| ^~~~~~~~~~
arch/arm64/kvm/handle_exit.c:186:23: note: (near initialization for 'arm_exit_handlers[23]')
arch/arm64/kvm/handle_exit.c:187:23: warning: initialized field overwritten [-Woverride-init]
187 | [ESR_ELx_EC_SYS64] = kvm_handle_sys_reg,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:187:23: note: (near initialization for 'arm_exit_handlers[24]')
arch/arm64/kvm/handle_exit.c:188:21: warning: initialized field overwritten [-Woverride-init]
188 | [ESR_ELx_EC_SVE] = handle_sve,
| ^~~~~~~~~~
arch/arm64/kvm/handle_exit.c:188:21: note: (near initialization for 'arm_exit_handlers[25]')
arch/arm64/kvm/handle_exit.c:189:26: warning: initialized field overwritten [-Woverride-init]
189 | [ESR_ELx_EC_IABT_LOW] = kvm_handle_guest_abort,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:189:26: note: (near initialization for 'arm_exit_handlers[32]')
arch/arm64/kvm/handle_exit.c:190:26: warning: initialized field overwritten [-Woverride-init]
190 | [ESR_ELx_EC_DABT_LOW] = kvm_handle_guest_abort,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:190:26: note: (near initialization for 'arm_exit_handlers[36]')
arch/arm64/kvm/handle_exit.c:191:28: warning: initialized field overwritten [-Woverride-init]
191 | [ESR_ELx_EC_SOFTSTP_LOW]= kvm_handle_guest_debug,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:191:28: note: (near initialization for 'arm_exit_handlers[50]')
arch/arm64/kvm/handle_exit.c:192:28: warning: initialized field overwritten [-Woverride-init]
192 | [ESR_ELx_EC_WATCHPT_LOW]= kvm_handle_guest_debug,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:192:28: note: (near initialization for 'arm_exit_handlers[52]')
arch/arm64/kvm/handle_exit.c:193:28: warning: initialized field overwritten [-Woverride-init]
193 | [ESR_ELx_EC_BREAKPT_LOW]= kvm_handle_guest_debug,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:193:28: note: (near initialization for 'arm_exit_handlers[48]')
arch/arm64/kvm/handle_exit.c:194:24: warning: initialized field overwritten [-Woverride-init]
194 | [ESR_ELx_EC_BKPT32] = kvm_handle_guest_debug,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:194:24: note: (near initialization for 'arm_exit_handlers[56]')
arch/arm64/kvm/handle_exit.c:195:23: warning: initialized field overwritten [-Woverride-init]
195 | [ESR_ELx_EC_BRK64] = kvm_handle_guest_debug,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:195:23: note: (near initialization for 'arm_exit_handlers[60]')
arch/arm64/kvm/handle_exit.c:196:26: warning: initialized field overwritten [-Woverride-init]
196 | [ESR_ELx_EC_FP_ASIMD] = handle_no_fpsimd,
| ^~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:196:26: note: (near initialization for 'arm_exit_handlers[7]')
arch/arm64/kvm/handle_exit.c:197:21: warning: initialized field overwritten [-Woverride-init]
197 | [ESR_ELx_EC_PAC] = kvm_handle_ptrauth,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:197:21: note: (near initialization for 'arm_exit_handlers[9]')
arch/arm64/kvm/handle_exit.c:295:24: warning: no previous prototype for 'nvhe_hyp_panic_handler' [-Wmissing-prototypes]
295 | void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c: In function 'nvhe_hyp_panic_handler':
>> arch/arm64/kvm/handle_exit.c:318:4: error: implicit declaration of function 'bug_get_file_line' [-Werror=implicit-function-declaration]
318 | bug_get_file_line(bug, &file, &line);
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/bug_get_file_line +318 arch/arm64/kvm/handle_exit.c
294
295 void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, u64 elr,
296 u64 par, uintptr_t vcpu,
297 u64 far, u64 hpfar) {
298 u64 elr_in_kimg = __phys_to_kimg(__hyp_pa(elr));
299 u64 hyp_offset = elr_in_kimg - kaslr_offset() - elr;
300 u64 mode = spsr & PSR_MODE_MASK;
301
302 /*
303 * The nVHE hyp symbols are not included by kallsyms to avoid issues
304 * with aliasing. That means that the symbols cannot be printed with the
305 * "%pS" format specifier, so fall back to the vmlinux address if
306 * there's no better option.
307 */
308 if (mode != PSR_MODE_EL2t && mode != PSR_MODE_EL2h) {
309 kvm_err("Invalid host exception to nVHE hyp!\n");
310 } else if (ESR_ELx_EC(esr) == ESR_ELx_EC_BRK64 &&
311 (esr & ESR_ELx_BRK64_ISS_COMMENT_MASK) == BUG_BRK_IMM) {
312 struct bug_entry *bug = find_bug(elr_in_kimg);
313 const char *file = NULL;
314 unsigned int line = 0;
315
316 /* All hyp bugs, including warnings, are treated as fatal. */
317 if (bug)
> 318 bug_get_file_line(bug, &file, &line);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[freescale-fslc:pr/308 14380/18175] drivers/regulator/pca9450-regulator.c:678:16: error: 'pca9450_matches' undeclared
by kernel test robot
Hi Jindong,
First bad commit (maybe != root cause):
tree: https://github.com/Freescale/linux-fslc pr/308
head: 8ad3d2ca53512dbb09a96c97d59595dea182e45a
commit: d29c65632f73063945b8ab29a5634573959e8539 [14380/18175] MA-17597-2 mfd: pca9450: Support module build
config: x86_64-randconfig-a004-20210415 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/Freescale/linux-fslc/commit/d29c65632f73063945b8ab29a5...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/308
git checkout d29c65632f73063945b8ab29a5634573959e8539
# save the attached .config to linux build tree
make W=1 W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/regulator/pca9450-regulator.c: In function 'pca9450_probe':
>> drivers/regulator/pca9450-regulator.c:678:16: error: 'pca9450_matches' undeclared (first use in this function)
678 | desc->name = pca9450_matches[i].name;
| ^~~~~~~~~~~~~~~
drivers/regulator/pca9450-regulator.c:678:16: note: each undeclared identifier is reported only once for each function it appears in
At top level:
drivers/regulator/pca9450-regulator.c:149:44: warning: 'pca9450_ldo2_voltage_ranges' defined but not used [-Wunused-const-variable=]
149 | static const struct regulator_linear_range pca9450_ldo2_voltage_ranges[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/pca9450_matches +678 drivers/regulator/pca9450-regulator.c
c46712e52a8dd0 Robin Gong 2019-10-23 634
c46712e52a8dd0 Robin Gong 2019-10-23 635 /*
c46712e52a8dd0 Robin Gong 2019-10-23 636 * @brief probe pca9450 regulator device
c46712e52a8dd0 Robin Gong 2019-10-23 637 * @param pdev pca9450 regulator platform device
c46712e52a8dd0 Robin Gong 2019-10-23 638 * @retval 0 success
c46712e52a8dd0 Robin Gong 2019-10-23 639 * @retval negative fail
c46712e52a8dd0 Robin Gong 2019-10-23 640 */
c46712e52a8dd0 Robin Gong 2019-10-23 641 static int pca9450_probe(struct platform_device *pdev)
c46712e52a8dd0 Robin Gong 2019-10-23 642 {
c46712e52a8dd0 Robin Gong 2019-10-23 643 struct pca9450_pmic *pmic;
c46712e52a8dd0 Robin Gong 2019-10-23 644 struct pca9450_board *pdata;
c46712e52a8dd0 Robin Gong 2019-10-23 645 struct regulator_config config = {};
c46712e52a8dd0 Robin Gong 2019-10-23 646 struct pca9450 *pca9450 = dev_get_drvdata(pdev->dev.parent);
c46712e52a8dd0 Robin Gong 2019-10-23 647 struct of_regulator_match *matches = NULL;
c46712e52a8dd0 Robin Gong 2019-10-23 648 int i = 0, err, irq = 0, ret = 0;
c46712e52a8dd0 Robin Gong 2019-10-23 649
c46712e52a8dd0 Robin Gong 2019-10-23 650 pmic = kzalloc(sizeof(*pmic), GFP_KERNEL);
c46712e52a8dd0 Robin Gong 2019-10-23 651 if (!pmic)
c46712e52a8dd0 Robin Gong 2019-10-23 652 return -ENOMEM;
c46712e52a8dd0 Robin Gong 2019-10-23 653
c46712e52a8dd0 Robin Gong 2019-10-23 654 memcpy(pmic->descs, pca9450_regulators, sizeof(pmic->descs));
c46712e52a8dd0 Robin Gong 2019-10-23 655
c46712e52a8dd0 Robin Gong 2019-10-23 656 pmic->dev = &pdev->dev;
c46712e52a8dd0 Robin Gong 2019-10-23 657 pmic->mfd = pca9450;
c46712e52a8dd0 Robin Gong 2019-10-23 658 platform_set_drvdata(pdev, pmic);
c46712e52a8dd0 Robin Gong 2019-10-23 659 pdata = dev_get_platdata(pca9450->dev);
c46712e52a8dd0 Robin Gong 2019-10-23 660
c46712e52a8dd0 Robin Gong 2019-10-23 661 if (!pdata && pca9450->dev->of_node) {
c46712e52a8dd0 Robin Gong 2019-10-23 662 pca9450_parse_dt_reg_data(pdev, &matches);
c46712e52a8dd0 Robin Gong 2019-10-23 663 if (matches == NULL) {
c46712e52a8dd0 Robin Gong 2019-10-23 664 dev_err(&pdev->dev, "Platform data not found\n");
c46712e52a8dd0 Robin Gong 2019-10-23 665 return -EINVAL;
c46712e52a8dd0 Robin Gong 2019-10-23 666 }
c46712e52a8dd0 Robin Gong 2019-10-23 667 }
c46712e52a8dd0 Robin Gong 2019-10-23 668
c46712e52a8dd0 Robin Gong 2019-10-23 669 /* Get buck dvs parameters */
c46712e52a8dd0 Robin Gong 2019-10-23 670 of_pca9450_buck_dvs(pdev, &pmic->buck_dvs[0]);
c46712e52a8dd0 Robin Gong 2019-10-23 671
c46712e52a8dd0 Robin Gong 2019-10-23 672 for (i = 0; i < PCA9450_REGULATOR_CNT; i++) {
c46712e52a8dd0 Robin Gong 2019-10-23 673 struct regulator_init_data *init_data;
c46712e52a8dd0 Robin Gong 2019-10-23 674 struct regulator_desc *desc;
c46712e52a8dd0 Robin Gong 2019-10-23 675 struct regulator_dev *rdev;
c46712e52a8dd0 Robin Gong 2019-10-23 676
c46712e52a8dd0 Robin Gong 2019-10-23 677 desc = &pmic->descs[i];
c46712e52a8dd0 Robin Gong 2019-10-23 @678 desc->name = pca9450_matches[i].name;
c46712e52a8dd0 Robin Gong 2019-10-23 679
c46712e52a8dd0 Robin Gong 2019-10-23 680 if (pdata)
c46712e52a8dd0 Robin Gong 2019-10-23 681 init_data = pdata->init_data[i];
c46712e52a8dd0 Robin Gong 2019-10-23 682 else
c46712e52a8dd0 Robin Gong 2019-10-23 683 init_data = pca9450_matches[i].init_data;
c46712e52a8dd0 Robin Gong 2019-10-23 684
c46712e52a8dd0 Robin Gong 2019-10-23 685 config.dev = pmic->dev;
c46712e52a8dd0 Robin Gong 2019-10-23 686 config.init_data = init_data;
c46712e52a8dd0 Robin Gong 2019-10-23 687 config.driver_data = pmic;
c46712e52a8dd0 Robin Gong 2019-10-23 688 config.regmap = pca9450->regmap;
c46712e52a8dd0 Robin Gong 2019-10-23 689 if (matches)
c46712e52a8dd0 Robin Gong 2019-10-23 690 config.of_node = matches[i].of_node;
c46712e52a8dd0 Robin Gong 2019-10-23 691 dev_dbg(config.dev, "regulator register name '%s'\n",
c46712e52a8dd0 Robin Gong 2019-10-23 692 desc->name);
c46712e52a8dd0 Robin Gong 2019-10-23 693
c46712e52a8dd0 Robin Gong 2019-10-23 694 rdev = regulator_register(desc, &config);
c46712e52a8dd0 Robin Gong 2019-10-23 695 if (IS_ERR(rdev)) {
c46712e52a8dd0 Robin Gong 2019-10-23 696 dev_err(pca9450->dev,
c46712e52a8dd0 Robin Gong 2019-10-23 697 "failed to register %s regulator\n",
c46712e52a8dd0 Robin Gong 2019-10-23 698 desc->name);
c46712e52a8dd0 Robin Gong 2019-10-23 699 err = PTR_ERR(rdev);
c46712e52a8dd0 Robin Gong 2019-10-23 700 goto err;
c46712e52a8dd0 Robin Gong 2019-10-23 701 }
c46712e52a8dd0 Robin Gong 2019-10-23 702 pmic->rdev[i] = rdev;
c46712e52a8dd0 Robin Gong 2019-10-23 703 }
c46712e52a8dd0 Robin Gong 2019-10-23 704
c46712e52a8dd0 Robin Gong 2019-10-23 705 /* Init sysfs registers */
c46712e52a8dd0 Robin Gong 2019-10-23 706 pmic->reg_index = -1;
c46712e52a8dd0 Robin Gong 2019-10-23 707
c46712e52a8dd0 Robin Gong 2019-10-23 708 err = sysfs_create_group(&pdev->dev.kobj, &clk_attr_group);
c46712e52a8dd0 Robin Gong 2019-10-23 709 if (err != 0) {
c46712e52a8dd0 Robin Gong 2019-10-23 710 dev_err(&pdev->dev, "Failed to create sysfs: %d\n", err);
c46712e52a8dd0 Robin Gong 2019-10-23 711 goto err;
c46712e52a8dd0 Robin Gong 2019-10-23 712 }
c46712e52a8dd0 Robin Gong 2019-10-23 713
c46712e52a8dd0 Robin Gong 2019-10-23 714 /* Init Buck1/2/3 dvs */
c46712e52a8dd0 Robin Gong 2019-10-23 715 err = pca9450_buck123_dvs_init(pmic);
c46712e52a8dd0 Robin Gong 2019-10-23 716 if (err != 0) {
c46712e52a8dd0 Robin Gong 2019-10-23 717 dev_err(&pdev->dev, "Failed to buck123 dvs: %d\n", err);
c46712e52a8dd0 Robin Gong 2019-10-23 718 goto err;
c46712e52a8dd0 Robin Gong 2019-10-23 719 }
c46712e52a8dd0 Robin Gong 2019-10-23 720
c46712e52a8dd0 Robin Gong 2019-10-23 721 /* Add Interrupt */
c46712e52a8dd0 Robin Gong 2019-10-23 722 irq = platform_get_irq(pdev, 0);
c46712e52a8dd0 Robin Gong 2019-10-23 723 if (irq <= 0) {
c46712e52a8dd0 Robin Gong 2019-10-23 724 dev_warn(&pdev->dev, "platform irq error # %d\n", irq);
c46712e52a8dd0 Robin Gong 2019-10-23 725 return -ENXIO;
c46712e52a8dd0 Robin Gong 2019-10-23 726 }
c46712e52a8dd0 Robin Gong 2019-10-23 727 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
c46712e52a8dd0 Robin Gong 2019-10-23 728 pca9450_pmic_interrupt,
c46712e52a8dd0 Robin Gong 2019-10-23 729 IRQF_TRIGGER_LOW | IRQF_EARLY_RESUME,
c46712e52a8dd0 Robin Gong 2019-10-23 730 dev_name(&pdev->dev), &pdev->dev);
c46712e52a8dd0 Robin Gong 2019-10-23 731 if (ret < 0)
c46712e52a8dd0 Robin Gong 2019-10-23 732 dev_err(&pdev->dev, "IRQ %d is not free.\n", irq);
c46712e52a8dd0 Robin Gong 2019-10-23 733
c46712e52a8dd0 Robin Gong 2019-10-23 734 /* Un-mask IRQ Interrupt */
c46712e52a8dd0 Robin Gong 2019-10-23 735 ret = pca9450_reg_write(pca9450, PCA9450_INT1_MSK, 0);
c46712e52a8dd0 Robin Gong 2019-10-23 736 if (ret < 0) {
c46712e52a8dd0 Robin Gong 2019-10-23 737 dev_err(&pdev->dev, "Write 'PCA9450_REG_MIRQ': failed!\n");
c46712e52a8dd0 Robin Gong 2019-10-23 738 ret = -EIO;
c46712e52a8dd0 Robin Gong 2019-10-23 739 goto err;
c46712e52a8dd0 Robin Gong 2019-10-23 740 }
c46712e52a8dd0 Robin Gong 2019-10-23 741
c46712e52a8dd0 Robin Gong 2019-10-23 742 return 0;
c46712e52a8dd0 Robin Gong 2019-10-23 743
c46712e52a8dd0 Robin Gong 2019-10-23 744 err:
c46712e52a8dd0 Robin Gong 2019-10-23 745 while (--i >= 0)
c46712e52a8dd0 Robin Gong 2019-10-23 746 regulator_unregister(pmic->rdev[i]);
c46712e52a8dd0 Robin Gong 2019-10-23 747
c46712e52a8dd0 Robin Gong 2019-10-23 748 kfree(pmic);
c46712e52a8dd0 Robin Gong 2019-10-23 749 return err;
c46712e52a8dd0 Robin Gong 2019-10-23 750 }
c46712e52a8dd0 Robin Gong 2019-10-23 751
:::::: The code at line 678 was first introduced by commit
:::::: c46712e52a8dd0ecce6efbd2d2d56919352478a9 MLK-22824-2: regulator: pca9450: add pca9450 regulator driver
:::::: TO: Robin Gong <yibin.gong(a)nxp.com>
:::::: CC: Robin Gong <yibin.gong(a)nxp.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v2 4/6] phy: phy-can-transceiver: Add support for generic CAN transceiver driver
by kernel test robot
Hi Aswath,
I love your patch! Perhaps something to improve:
[auto build test WARNING on mkl-can-next/testing]
[also build test WARNING on linux/master robh/for-next linus/master v5.12-rc7 next-20210414]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Aswath-Govindraju/CAN-TRANSCEIVE...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
config: arm64-randconfig-r012-20210415 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/f0bb46b67a1f6116c84a7691e05f50593...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Aswath-Govindraju/CAN-TRANSCEIVER-Add-support-for-CAN-transceivers/20210414-220857
git checkout f0bb46b67a1f6116c84a7691e05f5059377e4640
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/phy/phy-can-transceiver.c:79:5: warning: no previous prototype for function 'can_transceiver_phy_probe' [-Wmissing-prototypes]
int can_transceiver_phy_probe(struct platform_device *pdev)
^
drivers/phy/phy-can-transceiver.c:79:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int can_transceiver_phy_probe(struct platform_device *pdev)
^
static
1 warning generated.
vim +/can_transceiver_phy_probe +79 drivers/phy/phy-can-transceiver.c
78
> 79 int can_transceiver_phy_probe(struct platform_device *pdev)
80 {
81 struct phy_provider *phy_provider;
82 struct device *dev = &pdev->dev;
83 struct can_transceiver_phy *can_transceiver_phy;
84 const struct can_transceiver_data *drvdata;
85 const struct of_device_id *match;
86 struct phy *phy;
87 struct gpio_desc *standby_gpio;
88 struct gpio_desc *enable_gpio;
89 u32 max_bitrate = 0;
90
91 can_transceiver_phy = devm_kzalloc(dev, sizeof(struct can_transceiver_phy), GFP_KERNEL);
92 if (!can_transceiver_phy)
93 return -ENOMEM;
94
95 match = of_match_node(can_transceiver_phy_ids, pdev->dev.of_node);
96 drvdata = match->data;
97
98 phy = devm_phy_create(dev, dev->of_node,
99 &can_transceiver_phy_ops);
100 if (IS_ERR(phy)) {
101 dev_err(dev, "failed to create can transceiver phy\n");
102 return PTR_ERR(phy);
103 }
104
105 device_property_read_u32(dev, "max-bitrate", &max_bitrate);
106 if (!max_bitrate)
107 dev_warn(dev, "Invalid value for transceiver max bitrate. Ignoring bitrate limit\n");
108 phy->attrs.max_link_rate = max_bitrate;
109
110 can_transceiver_phy->generic_phy = phy;
111
112 if (drvdata->flags & CAN_TRANSCEIVER_STB_PRESENT) {
113 standby_gpio = devm_gpiod_get(dev, "standby", GPIOD_OUT_HIGH);
114 if (IS_ERR(standby_gpio))
115 return PTR_ERR(standby_gpio);
116 can_transceiver_phy->standby_gpio = standby_gpio;
117 }
118
119 if (drvdata->flags & CAN_TRANSCEIVER_EN_PRESENT) {
120 enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
121 if (IS_ERR(enable_gpio))
122 return PTR_ERR(enable_gpio);
123 can_transceiver_phy->enable_gpio = enable_gpio;
124 }
125
126 phy_set_drvdata(can_transceiver_phy->generic_phy, can_transceiver_phy);
127
128 phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
129
130 return PTR_ERR_OR_ZERO(phy_provider);
131 }
132
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[chrome-os:chromeos-5.10 6618/7371] drivers/gpu/drm/evdi/evdi_gem.c:252:18: error: implicit declaration of function 'vmap'
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: ba4b9f4fe4e97c4bf1bdd483f8e32a02fbc1b3f0
commit: 5d42c7b3d93d6ce4f7cfbfc0f0d6ea2c2445406a [6618/7371] CHROMIUM: Import latest evdi driver
config: powerpc-randconfig-r023-20210415 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout 5d42c7b3d93d6ce4f7cfbfc0f0d6ea2c2445406a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/gpu/drm/evdi/evdi_gem.c:241:63: error: too few arguments to function call, expected 2, have 1
obj->vmapping = dma_buf_vmap(obj->base.import_attach->dmabuf);
~~~~~~~~~~~~ ^
include/linux/dma-buf.h:507:5: note: 'dma_buf_vmap' declared here
int dma_buf_vmap(struct dma_buf *dmabuf, struct dma_buf_map *map);
^
>> drivers/gpu/drm/evdi/evdi_gem.c:252:18: error: implicit declaration of function 'vmap' [-Werror,-Wimplicit-function-declaration]
obj->vmapping = vmap(obj->pages, page_count, 0, PAGE_KERNEL);
^
>> drivers/gpu/drm/evdi/evdi_gem.c:252:16: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
obj->vmapping = vmap(obj->pages, page_count, 0, PAGE_KERNEL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/evdi/evdi_gem.c:273:3: error: implicit declaration of function 'vunmap' [-Werror,-Wimplicit-function-declaration]
vunmap(obj->vmapping);
^
drivers/gpu/drm/evdi/evdi_gem.c:273:3: note: did you mean 'kunmap'?
include/linux/highmem.h:147:20: note: 'kunmap' declared here
static inline void kunmap(struct page *page)
^
1 warning and 3 errors generated.
vim +/vmap +252 drivers/gpu/drm/evdi/evdi_gem.c
3e21cedd503fab Aleksander Miera 2018-03-15 226
3e21cedd503fab Aleksander Miera 2018-03-15 227 int evdi_gem_vmap(struct evdi_gem_object *obj)
3e21cedd503fab Aleksander Miera 2018-03-15 228 {
3e21cedd503fab Aleksander Miera 2018-03-15 229 int page_count = obj->base.size / PAGE_SIZE;
3e21cedd503fab Aleksander Miera 2018-03-15 230 int ret;
3e21cedd503fab Aleksander Miera 2018-03-15 231
3e21cedd503fab Aleksander Miera 2018-03-15 232 if (obj->base.import_attach) {
5d42c7b3d93d6c Sean Paul 2021-04-09 233 #if KERNEL_VERSION(5, 11, 0) <= LINUX_VERSION_CODE
5d42c7b3d93d6c Sean Paul 2021-04-09 234 struct dma_buf_map map;
5d42c7b3d93d6c Sean Paul 2021-04-09 235
5d42c7b3d93d6c Sean Paul 2021-04-09 236 ret = dma_buf_vmap(obj->base.import_attach->dmabuf, &map);
5d42c7b3d93d6c Sean Paul 2021-04-09 237 if (ret)
5d42c7b3d93d6c Sean Paul 2021-04-09 238 return -ENOMEM;
5d42c7b3d93d6c Sean Paul 2021-04-09 239 obj->vmapping = map.vaddr;
5d42c7b3d93d6c Sean Paul 2021-04-09 240 #else
3e21cedd503fab Aleksander Miera 2018-03-15 @241 obj->vmapping = dma_buf_vmap(obj->base.import_attach->dmabuf);
3e21cedd503fab Aleksander Miera 2018-03-15 242 if (!obj->vmapping)
3e21cedd503fab Aleksander Miera 2018-03-15 243 return -ENOMEM;
5d42c7b3d93d6c Sean Paul 2021-04-09 244 #endif
3e21cedd503fab Aleksander Miera 2018-03-15 245 return 0;
3e21cedd503fab Aleksander Miera 2018-03-15 246 }
3e21cedd503fab Aleksander Miera 2018-03-15 247
67442e0531eb83 Guenter Roeck 2020-11-04 248 ret = evdi_gem_get_pages(obj, GFP_KERNEL);
3e21cedd503fab Aleksander Miera 2018-03-15 249 if (ret)
3e21cedd503fab Aleksander Miera 2018-03-15 250 return ret;
3e21cedd503fab Aleksander Miera 2018-03-15 251
3e21cedd503fab Aleksander Miera 2018-03-15 @252 obj->vmapping = vmap(obj->pages, page_count, 0, PAGE_KERNEL);
3e21cedd503fab Aleksander Miera 2018-03-15 253 if (!obj->vmapping)
3e21cedd503fab Aleksander Miera 2018-03-15 254 return -ENOMEM;
3e21cedd503fab Aleksander Miera 2018-03-15 255 return 0;
3e21cedd503fab Aleksander Miera 2018-03-15 256 }
3e21cedd503fab Aleksander Miera 2018-03-15 257
3e21cedd503fab Aleksander Miera 2018-03-15 258 void evdi_gem_vunmap(struct evdi_gem_object *obj)
3e21cedd503fab Aleksander Miera 2018-03-15 259 {
3e21cedd503fab Aleksander Miera 2018-03-15 260 if (obj->base.import_attach) {
5d42c7b3d93d6c Sean Paul 2021-04-09 261 #if KERNEL_VERSION(5, 11, 0) <= LINUX_VERSION_CODE
5d42c7b3d93d6c Sean Paul 2021-04-09 262 struct dma_buf_map map = DMA_BUF_MAP_INIT_VADDR(obj->vmapping);
5d42c7b3d93d6c Sean Paul 2021-04-09 263
5d42c7b3d93d6c Sean Paul 2021-04-09 264 dma_buf_vunmap(obj->base.import_attach->dmabuf, &map);
5d42c7b3d93d6c Sean Paul 2021-04-09 265 #else
3e21cedd503fab Aleksander Miera 2018-03-15 266 dma_buf_vunmap(obj->base.import_attach->dmabuf, obj->vmapping);
5d42c7b3d93d6c Sean Paul 2021-04-09 267 #endif
3e21cedd503fab Aleksander Miera 2018-03-15 268 obj->vmapping = NULL;
3e21cedd503fab Aleksander Miera 2018-03-15 269 return;
3e21cedd503fab Aleksander Miera 2018-03-15 270 }
3e21cedd503fab Aleksander Miera 2018-03-15 271
3e21cedd503fab Aleksander Miera 2018-03-15 272 if (obj->vmapping) {
3e21cedd503fab Aleksander Miera 2018-03-15 @273 vunmap(obj->vmapping);
3e21cedd503fab Aleksander Miera 2018-03-15 274 obj->vmapping = NULL;
3e21cedd503fab Aleksander Miera 2018-03-15 275 }
3e21cedd503fab Aleksander Miera 2018-03-15 276
3e21cedd503fab Aleksander Miera 2018-03-15 277 evdi_gem_put_pages(obj);
3e21cedd503fab Aleksander Miera 2018-03-15 278 }
3e21cedd503fab Aleksander Miera 2018-03-15 279
:::::: The code at line 252 was first introduced by commit
:::::: 3e21cedd503fabd195cf407652bf87fd83e202ac drm/evdi: Add atomic evdi drm module
:::::: TO: Aleksander Miera <aleksander.miera(a)displaylink.com>
:::::: CC: Guenter Roeck <groeck(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months