Re: [PATCH v14 4/6] usb: Specify dependencies on USB_XHCI_PLATFORM with 'depends on'
by kernel test robot
Hi Matthias,
I love your patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on robh/for-next driver-core/driver-core-testing linus/master v5.14-rc2 next-20210720]
[cannot apply to char-misc/char-misc-testing]
[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/Matthias-Kaehlcke/usb-misc-Add-o...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: i386-randconfig-a003-20210720 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/1ac4caccda0f2e6904b0e1462bc9735c6...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Matthias-Kaehlcke/usb-misc-Add-onboard_usb_hub-driver/20210720-144614
git checkout 1ac4caccda0f2e6904b0e1462bc9735c690d719f
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
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/usb/dwc3/core.o: in function `dwc3_resume_common':
>> drivers/usb/dwc3/core.c:1853: undefined reference to `dwc3_gadget_resume'
ld: drivers/usb/dwc3/core.o: in function `dwc3_runtime_resume':
>> drivers/usb/dwc3/core.c:1912: undefined reference to `dwc3_gadget_process_pending_events'
ld: drivers/usb/dwc3/core.o: in function `dwc3_suspend_common':
>> drivers/usb/dwc3/core.c:1750: undefined reference to `dwc3_gadget_suspend'
vim +1853 drivers/usb/dwc3/core.c
fe8abf332b8f66 Masahiro Yamada 2018-05-16 1739
c4a5153e87fdf6 Manu Gautam 2018-01-18 1740 static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg)
7415f17c9560c9 Felipe Balbi 2012-04-30 1741 {
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1742 unsigned long flags;
bcb128777af5e9 Manu Gautam 2018-05-09 1743 u32 reg;
7415f17c9560c9 Felipe Balbi 2012-04-30 1744
689bf72c6e0dc9 Manu Gautam 2017-09-27 1745 switch (dwc->current_dr_role) {
689bf72c6e0dc9 Manu Gautam 2017-09-27 1746 case DWC3_GCTL_PRTCAP_DEVICE:
0227cc84c44417 Li Jun 2020-02-20 1747 if (pm_runtime_suspended(dwc->dev))
0227cc84c44417 Li Jun 2020-02-20 1748 break;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1749 spin_lock_irqsave(&dwc->lock, flags);
7415f17c9560c9 Felipe Balbi 2012-04-30 @1750 dwc3_gadget_suspend(dwc);
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1751 spin_unlock_irqrestore(&dwc->lock, flags);
41a91c606e7d2b Marek Szyprowski 2019-03-27 1752 synchronize_irq(dwc->irq_gadget);
689bf72c6e0dc9 Manu Gautam 2017-09-27 1753 dwc3_core_exit(dwc);
51f5d49ad6f011 Felipe Balbi 2016-05-16 1754 break;
689bf72c6e0dc9 Manu Gautam 2017-09-27 1755 case DWC3_GCTL_PRTCAP_HOST:
bcb128777af5e9 Manu Gautam 2018-05-09 1756 if (!PMSG_IS_AUTO(msg)) {
c4a5153e87fdf6 Manu Gautam 2018-01-18 1757 dwc3_core_exit(dwc);
c4a5153e87fdf6 Manu Gautam 2018-01-18 1758 break;
bcb128777af5e9 Manu Gautam 2018-05-09 1759 }
bcb128777af5e9 Manu Gautam 2018-05-09 1760
bcb128777af5e9 Manu Gautam 2018-05-09 1761 /* Let controller to suspend HSPHY before PHY driver suspends */
bcb128777af5e9 Manu Gautam 2018-05-09 1762 if (dwc->dis_u2_susphy_quirk ||
bcb128777af5e9 Manu Gautam 2018-05-09 1763 dwc->dis_enblslpm_quirk) {
bcb128777af5e9 Manu Gautam 2018-05-09 1764 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
bcb128777af5e9 Manu Gautam 2018-05-09 1765 reg |= DWC3_GUSB2PHYCFG_ENBLSLPM |
bcb128777af5e9 Manu Gautam 2018-05-09 1766 DWC3_GUSB2PHYCFG_SUSPHY;
bcb128777af5e9 Manu Gautam 2018-05-09 1767 dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
bcb128777af5e9 Manu Gautam 2018-05-09 1768
bcb128777af5e9 Manu Gautam 2018-05-09 1769 /* Give some time for USB2 PHY to suspend */
bcb128777af5e9 Manu Gautam 2018-05-09 1770 usleep_range(5000, 6000);
bcb128777af5e9 Manu Gautam 2018-05-09 1771 }
bcb128777af5e9 Manu Gautam 2018-05-09 1772
bcb128777af5e9 Manu Gautam 2018-05-09 1773 phy_pm_runtime_put_sync(dwc->usb2_generic_phy);
bcb128777af5e9 Manu Gautam 2018-05-09 1774 phy_pm_runtime_put_sync(dwc->usb3_generic_phy);
bcb128777af5e9 Manu Gautam 2018-05-09 1775 break;
f09cc79b4b338e Roger Quadros 2018-02-27 1776 case DWC3_GCTL_PRTCAP_OTG:
f09cc79b4b338e Roger Quadros 2018-02-27 1777 /* do nothing during runtime_suspend */
f09cc79b4b338e Roger Quadros 2018-02-27 1778 if (PMSG_IS_AUTO(msg))
f09cc79b4b338e Roger Quadros 2018-02-27 1779 break;
f09cc79b4b338e Roger Quadros 2018-02-27 1780
f09cc79b4b338e Roger Quadros 2018-02-27 1781 if (dwc->current_otg_role == DWC3_OTG_ROLE_DEVICE) {
f09cc79b4b338e Roger Quadros 2018-02-27 1782 spin_lock_irqsave(&dwc->lock, flags);
f09cc79b4b338e Roger Quadros 2018-02-27 1783 dwc3_gadget_suspend(dwc);
f09cc79b4b338e Roger Quadros 2018-02-27 1784 spin_unlock_irqrestore(&dwc->lock, flags);
41a91c606e7d2b Marek Szyprowski 2019-03-27 1785 synchronize_irq(dwc->irq_gadget);
f09cc79b4b338e Roger Quadros 2018-02-27 1786 }
f09cc79b4b338e Roger Quadros 2018-02-27 1787
f09cc79b4b338e Roger Quadros 2018-02-27 1788 dwc3_otg_exit(dwc);
f09cc79b4b338e Roger Quadros 2018-02-27 1789 dwc3_core_exit(dwc);
f09cc79b4b338e Roger Quadros 2018-02-27 1790 break;
7415f17c9560c9 Felipe Balbi 2012-04-30 1791 default:
51f5d49ad6f011 Felipe Balbi 2016-05-16 1792 /* do nothing */
7415f17c9560c9 Felipe Balbi 2012-04-30 1793 break;
7415f17c9560c9 Felipe Balbi 2012-04-30 1794 }
7415f17c9560c9 Felipe Balbi 2012-04-30 1795
7415f17c9560c9 Felipe Balbi 2012-04-30 1796 return 0;
7415f17c9560c9 Felipe Balbi 2012-04-30 1797 }
7415f17c9560c9 Felipe Balbi 2012-04-30 1798
c4a5153e87fdf6 Manu Gautam 2018-01-18 1799 static int dwc3_resume_common(struct dwc3 *dwc, pm_message_t msg)
7415f17c9560c9 Felipe Balbi 2012-04-30 1800 {
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1801 unsigned long flags;
57303488cd37da Kishon Vijay Abraham I 2014-03-03 1802 int ret;
bcb128777af5e9 Manu Gautam 2018-05-09 1803 u32 reg;
7415f17c9560c9 Felipe Balbi 2012-04-30 1804
689bf72c6e0dc9 Manu Gautam 2017-09-27 1805 switch (dwc->current_dr_role) {
689bf72c6e0dc9 Manu Gautam 2017-09-27 1806 case DWC3_GCTL_PRTCAP_DEVICE:
fe8abf332b8f66 Masahiro Yamada 2018-05-16 1807 ret = dwc3_core_init_for_resume(dwc);
51f5d49ad6f011 Felipe Balbi 2016-05-16 1808 if (ret)
5c4ad318de3b8e Felipe Balbi 2016-04-11 1809 return ret;
5c4ad318de3b8e Felipe Balbi 2016-04-11 1810
7d11c3ac666940 Roger Quadros 2018-03-16 1811 dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_DEVICE);
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1812 spin_lock_irqsave(&dwc->lock, flags);
7415f17c9560c9 Felipe Balbi 2012-04-30 1813 dwc3_gadget_resume(dwc);
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1814 spin_unlock_irqrestore(&dwc->lock, flags);
689bf72c6e0dc9 Manu Gautam 2017-09-27 1815 break;
689bf72c6e0dc9 Manu Gautam 2017-09-27 1816 case DWC3_GCTL_PRTCAP_HOST:
c4a5153e87fdf6 Manu Gautam 2018-01-18 1817 if (!PMSG_IS_AUTO(msg)) {
fe8abf332b8f66 Masahiro Yamada 2018-05-16 1818 ret = dwc3_core_init_for_resume(dwc);
c4a5153e87fdf6 Manu Gautam 2018-01-18 1819 if (ret)
c4a5153e87fdf6 Manu Gautam 2018-01-18 1820 return ret;
7d11c3ac666940 Roger Quadros 2018-03-16 1821 dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_HOST);
bcb128777af5e9 Manu Gautam 2018-05-09 1822 break;
c4a5153e87fdf6 Manu Gautam 2018-01-18 1823 }
bcb128777af5e9 Manu Gautam 2018-05-09 1824 /* Restore GUSB2PHYCFG bits that were modified in suspend */
bcb128777af5e9 Manu Gautam 2018-05-09 1825 reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
bcb128777af5e9 Manu Gautam 2018-05-09 1826 if (dwc->dis_u2_susphy_quirk)
bcb128777af5e9 Manu Gautam 2018-05-09 1827 reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
bcb128777af5e9 Manu Gautam 2018-05-09 1828
bcb128777af5e9 Manu Gautam 2018-05-09 1829 if (dwc->dis_enblslpm_quirk)
bcb128777af5e9 Manu Gautam 2018-05-09 1830 reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM;
bcb128777af5e9 Manu Gautam 2018-05-09 1831
bcb128777af5e9 Manu Gautam 2018-05-09 1832 dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
bcb128777af5e9 Manu Gautam 2018-05-09 1833
bcb128777af5e9 Manu Gautam 2018-05-09 1834 phy_pm_runtime_get_sync(dwc->usb2_generic_phy);
bcb128777af5e9 Manu Gautam 2018-05-09 1835 phy_pm_runtime_get_sync(dwc->usb3_generic_phy);
f09cc79b4b338e Roger Quadros 2018-02-27 1836 break;
f09cc79b4b338e Roger Quadros 2018-02-27 1837 case DWC3_GCTL_PRTCAP_OTG:
f09cc79b4b338e Roger Quadros 2018-02-27 1838 /* nothing to do on runtime_resume */
f09cc79b4b338e Roger Quadros 2018-02-27 1839 if (PMSG_IS_AUTO(msg))
f09cc79b4b338e Roger Quadros 2018-02-27 1840 break;
f09cc79b4b338e Roger Quadros 2018-02-27 1841
0e5a3c8284a30f Gary Bisson 2021-01-25 1842 ret = dwc3_core_init_for_resume(dwc);
f09cc79b4b338e Roger Quadros 2018-02-27 1843 if (ret)
f09cc79b4b338e Roger Quadros 2018-02-27 1844 return ret;
f09cc79b4b338e Roger Quadros 2018-02-27 1845
f09cc79b4b338e Roger Quadros 2018-02-27 1846 dwc3_set_prtcap(dwc, dwc->current_dr_role);
f09cc79b4b338e Roger Quadros 2018-02-27 1847
f09cc79b4b338e Roger Quadros 2018-02-27 1848 dwc3_otg_init(dwc);
f09cc79b4b338e Roger Quadros 2018-02-27 1849 if (dwc->current_otg_role == DWC3_OTG_ROLE_HOST) {
f09cc79b4b338e Roger Quadros 2018-02-27 1850 dwc3_otg_host_init(dwc);
f09cc79b4b338e Roger Quadros 2018-02-27 1851 } else if (dwc->current_otg_role == DWC3_OTG_ROLE_DEVICE) {
f09cc79b4b338e Roger Quadros 2018-02-27 1852 spin_lock_irqsave(&dwc->lock, flags);
f09cc79b4b338e Roger Quadros 2018-02-27 @1853 dwc3_gadget_resume(dwc);
f09cc79b4b338e Roger Quadros 2018-02-27 1854 spin_unlock_irqrestore(&dwc->lock, flags);
c4a5153e87fdf6 Manu Gautam 2018-01-18 1855 }
f09cc79b4b338e Roger Quadros 2018-02-27 1856
c4a5153e87fdf6 Manu Gautam 2018-01-18 1857 break;
7415f17c9560c9 Felipe Balbi 2012-04-30 1858 default:
7415f17c9560c9 Felipe Balbi 2012-04-30 1859 /* do nothing */
7415f17c9560c9 Felipe Balbi 2012-04-30 1860 break;
7415f17c9560c9 Felipe Balbi 2012-04-30 1861 }
7415f17c9560c9 Felipe Balbi 2012-04-30 1862
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1863 return 0;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1864 }
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1865
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1866 static int dwc3_runtime_checks(struct dwc3 *dwc)
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1867 {
689bf72c6e0dc9 Manu Gautam 2017-09-27 1868 switch (dwc->current_dr_role) {
c4a5153e87fdf6 Manu Gautam 2018-01-18 1869 case DWC3_GCTL_PRTCAP_DEVICE:
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1870 if (dwc->connected)
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1871 return -EBUSY;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1872 break;
c4a5153e87fdf6 Manu Gautam 2018-01-18 1873 case DWC3_GCTL_PRTCAP_HOST:
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1874 default:
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1875 /* do nothing */
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1876 break;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1877 }
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1878
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1879 return 0;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1880 }
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1881
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1882 static int dwc3_runtime_suspend(struct device *dev)
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1883 {
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1884 struct dwc3 *dwc = dev_get_drvdata(dev);
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1885 int ret;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1886
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1887 if (dwc3_runtime_checks(dwc))
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1888 return -EBUSY;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1889
c4a5153e87fdf6 Manu Gautam 2018-01-18 1890 ret = dwc3_suspend_common(dwc, PMSG_AUTO_SUSPEND);
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1891 if (ret)
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1892 return ret;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1893
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1894 device_init_wakeup(dev, true);
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1895
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1896 return 0;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1897 }
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1898
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1899 static int dwc3_runtime_resume(struct device *dev)
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1900 {
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1901 struct dwc3 *dwc = dev_get_drvdata(dev);
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1902 int ret;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1903
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1904 device_init_wakeup(dev, false);
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1905
c4a5153e87fdf6 Manu Gautam 2018-01-18 1906 ret = dwc3_resume_common(dwc, PMSG_AUTO_RESUME);
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1907 if (ret)
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1908 return ret;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1909
689bf72c6e0dc9 Manu Gautam 2017-09-27 1910 switch (dwc->current_dr_role) {
689bf72c6e0dc9 Manu Gautam 2017-09-27 1911 case DWC3_GCTL_PRTCAP_DEVICE:
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 @1912 dwc3_gadget_process_pending_events(dwc);
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1913 break;
689bf72c6e0dc9 Manu Gautam 2017-09-27 1914 case DWC3_GCTL_PRTCAP_HOST:
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1915 default:
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1916 /* do nothing */
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1917 break;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1918 }
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1919
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1920 pm_runtime_mark_last_busy(dev);
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1921
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1922 return 0;
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1923 }
fc8bb91bc83ef8 Felipe Balbi 2016-05-16 1924
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[hch-block:scsi-ioctl 14/24] include/linux/blkdev.h:541:26: error: field has incomplete type 'struct bsg_class_device'
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git scsi-ioctl
head: 0d6e95412bd07b6406be6d368ea60513807caf83
commit: 075e28806125ae286114e55557067e340f30a93a [14/24] bsg: move bsg_scsi_ops to drivers/scsi/
config: mips-randconfig-r035-20210722 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9625ca5b602616b2f5584e8a49ba93c52c141e40)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block scsi-ioctl
git checkout 075e28806125ae286114e55557067e340f30a93a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=mips olddefconfig
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 >>):
In file included from arch/mips/kernel/asm-offsets.c:17:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
>> include/linux/blkdev.h:541:26: error: field has incomplete type 'struct bsg_class_device'
struct bsg_class_device bsg_dev;
^
include/linux/blkdev.h:541:9: note: forward declaration of 'struct bsg_class_device'
struct bsg_class_device bsg_dev;
^
arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for function 'output_ptreg_defines' [-Wmissing-prototypes]
void output_ptreg_defines(void)
^
arch/mips/kernel/asm-offsets.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_ptreg_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for function 'output_task_defines' [-Wmissing-prototypes]
void output_task_defines(void)
^
arch/mips/kernel/asm-offsets.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_task_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:92:6: warning: no previous prototype for function 'output_thread_info_defines' [-Wmissing-prototypes]
void output_thread_info_defines(void)
^
arch/mips/kernel/asm-offsets.c:92:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_info_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:108:6: warning: no previous prototype for function 'output_thread_defines' [-Wmissing-prototypes]
void output_thread_defines(void)
^
arch/mips/kernel/asm-offsets.c:108:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:136:6: warning: no previous prototype for function 'output_thread_fpu_defines' [-Wmissing-prototypes]
void output_thread_fpu_defines(void)
^
arch/mips/kernel/asm-offsets.c:136:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_fpu_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:179:6: warning: no previous prototype for function 'output_mm_defines' [-Wmissing-prototypes]
void output_mm_defines(void)
^
arch/mips/kernel/asm-offsets.c:179:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_mm_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:218:6: warning: no previous prototype for function 'output_sc_defines' [-Wmissing-prototypes]
void output_sc_defines(void)
^
arch/mips/kernel/asm-offsets.c:218:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_sc_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:253:6: warning: no previous prototype for function 'output_signal_defined' [-Wmissing-prototypes]
void output_signal_defined(void)
^
arch/mips/kernel/asm-offsets.c:253:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_signal_defined(void)
^
static
arch/mips/kernel/asm-offsets.c:332:6: warning: no previous prototype for function 'output_pm_defines' [-Wmissing-prototypes]
void output_pm_defines(void)
^
arch/mips/kernel/asm-offsets.c:332:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_pm_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:346:6: warning: no previous prototype for function 'output_kvm_defines' [-Wmissing-prototypes]
void output_kvm_defines(void)
^
arch/mips/kernel/asm-offsets.c:346:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_kvm_defines(void)
^
static
10 warnings and 1 error generated.
--
In file included from arch/mips/kernel/asm-offsets.c:17:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
>> include/linux/blkdev.h:541:26: error: field has incomplete type 'struct bsg_class_device'
struct bsg_class_device bsg_dev;
^
include/linux/blkdev.h:541:9: note: forward declaration of 'struct bsg_class_device'
struct bsg_class_device bsg_dev;
^
arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for function 'output_ptreg_defines' [-Wmissing-prototypes]
void output_ptreg_defines(void)
^
arch/mips/kernel/asm-offsets.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_ptreg_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for function 'output_task_defines' [-Wmissing-prototypes]
void output_task_defines(void)
^
arch/mips/kernel/asm-offsets.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_task_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:92:6: warning: no previous prototype for function 'output_thread_info_defines' [-Wmissing-prototypes]
void output_thread_info_defines(void)
^
arch/mips/kernel/asm-offsets.c:92:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_info_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:108:6: warning: no previous prototype for function 'output_thread_defines' [-Wmissing-prototypes]
void output_thread_defines(void)
^
arch/mips/kernel/asm-offsets.c:108:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:136:6: warning: no previous prototype for function 'output_thread_fpu_defines' [-Wmissing-prototypes]
void output_thread_fpu_defines(void)
^
arch/mips/kernel/asm-offsets.c:136:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_fpu_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:179:6: warning: no previous prototype for function 'output_mm_defines' [-Wmissing-prototypes]
void output_mm_defines(void)
^
arch/mips/kernel/asm-offsets.c:179:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_mm_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:218:6: warning: no previous prototype for function 'output_sc_defines' [-Wmissing-prototypes]
void output_sc_defines(void)
^
arch/mips/kernel/asm-offsets.c:218:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_sc_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:253:6: warning: no previous prototype for function 'output_signal_defined' [-Wmissing-prototypes]
void output_signal_defined(void)
^
arch/mips/kernel/asm-offsets.c:253:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_signal_defined(void)
^
static
arch/mips/kernel/asm-offsets.c:332:6: warning: no previous prototype for function 'output_pm_defines' [-Wmissing-prototypes]
void output_pm_defines(void)
^
arch/mips/kernel/asm-offsets.c:332:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_pm_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:346:6: warning: no previous prototype for function 'output_kvm_defines' [-Wmissing-prototypes]
void output_kvm_defines(void)
^
arch/mips/kernel/asm-offsets.c:346:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_kvm_defines(void)
^
static
10 warnings and 1 error generated.
make[2]: *** [scripts/Makefile.build:117: arch/mips/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1213: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:220: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from arch/mips/kernel/asm-offsets.c:17:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
>> include/linux/blkdev.h:541:26: error: field has incomplete type 'struct bsg_class_device'
struct bsg_class_device bsg_dev;
^
include/linux/blkdev.h:541:9: note: forward declaration of 'struct bsg_class_device'
struct bsg_class_device bsg_dev;
^
arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for function 'output_ptreg_defines' [-Wmissing-prototypes]
void output_ptreg_defines(void)
^
arch/mips/kernel/asm-offsets.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_ptreg_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for function 'output_task_defines' [-Wmissing-prototypes]
void output_task_defines(void)
^
arch/mips/kernel/asm-offsets.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_task_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:92:6: warning: no previous prototype for function 'output_thread_info_defines' [-Wmissing-prototypes]
void output_thread_info_defines(void)
^
arch/mips/kernel/asm-offsets.c:92:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_info_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:108:6: warning: no previous prototype for function 'output_thread_defines' [-Wmissing-prototypes]
void output_thread_defines(void)
^
arch/mips/kernel/asm-offsets.c:108:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:136:6: warning: no previous prototype for function 'output_thread_fpu_defines' [-Wmissing-prototypes]
void output_thread_fpu_defines(void)
^
arch/mips/kernel/asm-offsets.c:136:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_fpu_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:179:6: warning: no previous prototype for function 'output_mm_defines' [-Wmissing-prototypes]
void output_mm_defines(void)
^
arch/mips/kernel/asm-offsets.c:179:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_mm_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:218:6: warning: no previous prototype for function 'output_sc_defines' [-Wmissing-prototypes]
void output_sc_defines(void)
^
arch/mips/kernel/asm-offsets.c:218:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_sc_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:253:6: warning: no previous prototype for function 'output_signal_defined' [-Wmissing-prototypes]
void output_signal_defined(void)
^
arch/mips/kernel/asm-offsets.c:253:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_signal_defined(void)
^
static
arch/mips/kernel/asm-offsets.c:332:6: warning: no previous prototype for function 'output_pm_defines' [-Wmissing-prototypes]
void output_pm_defines(void)
^
arch/mips/kernel/asm-offsets.c:332:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_pm_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:346:6: warning: no previous prototype for function 'output_kvm_defines' [-Wmissing-prototypes]
void output_kvm_defines(void)
^
arch/mips/kernel/asm-offsets.c:346:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_kvm_defines(void)
^
static
10 warnings and 1 error generated.
make[2]: *** [scripts/Makefile.build:117: arch/mips/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1213: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:220: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +541 include/linux/blkdev.h
6cc77e9cb08041 Christoph Hellwig 2017-12-21 508
^1da177e4c3f41 Linus Torvalds 2005-04-16 509 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 510 * sg stuff
^1da177e4c3f41 Linus Torvalds 2005-04-16 511 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 512 unsigned int sg_timeout;
^1da177e4c3f41 Linus Torvalds 2005-04-16 513 unsigned int sg_reserved_size;
1946089a109251 Christoph Lameter 2005-06-23 514 int node;
85e0cbbb8a7953 Luis Chamberlain 2020-06-19 515 struct mutex debugfs_mutex;
6c5c934153513d Alexey Dobriyan 2006-09-29 516 #ifdef CONFIG_BLK_DEV_IO_TRACE
c780e86dd48ef6 Jan Kara 2020-02-06 517 struct blk_trace __rcu *blk_trace;
6c5c934153513d Alexey Dobriyan 2006-09-29 518 #endif
^1da177e4c3f41 Linus Torvalds 2005-04-16 519 /*
4913efe456c987 Tejun Heo 2010-09-03 520 * for flush operations
^1da177e4c3f41 Linus Torvalds 2005-04-16 521 */
7c94e1c157a227 Ming Lei 2014-09-25 522 struct blk_flush_queue *fq;
483f4afc421435 Al Viro 2006-03-18 523
6fca6a611c27f1 Christoph Hellwig 2014-05-28 524 struct list_head requeue_list;
6fca6a611c27f1 Christoph Hellwig 2014-05-28 525 spinlock_t requeue_lock;
2849450ad39d2e Mike Snitzer 2016-09-14 526 struct delayed_work requeue_work;
6fca6a611c27f1 Christoph Hellwig 2014-05-28 527
483f4afc421435 Al Viro 2006-03-18 528 struct mutex sysfs_lock;
cecf5d87ff2035 Ming Lei 2019-08-27 529 struct mutex sysfs_dir_lock;
d351af01b93075 FUJITA Tomonori 2007-07-09 530
2f8f1336a48bd5 Ming Lei 2019-04-30 531 /*
2f8f1336a48bd5 Ming Lei 2019-04-30 532 * for reusing dead hctx instance in case of updating
2f8f1336a48bd5 Ming Lei 2019-04-30 533 * nr_hw_queues
2f8f1336a48bd5 Ming Lei 2019-04-30 534 */
2f8f1336a48bd5 Ming Lei 2019-04-30 535 struct list_head unused_hctx_list;
2f8f1336a48bd5 Ming Lei 2019-04-30 536 spinlock_t unused_hctx_lock;
2f8f1336a48bd5 Ming Lei 2019-04-30 537
7996a8b5511a72 Bob Liu 2019-05-21 538 int mq_freeze_depth;
d732580b4eb315 Tejun Heo 2012-03-05 539
075e28806125ae Christoph Hellwig 2021-07-10 540 #if IS_ENABLED(CONFIG_BLK_DEV_BSG_COMMON)
d351af01b93075 FUJITA Tomonori 2007-07-09 @541 struct bsg_class_device bsg_dev;
d351af01b93075 FUJITA Tomonori 2007-07-09 542 #endif
e43473b7f223ec Vivek Goyal 2010-09-15 543
:::::: The code at line 541 was first introduced by commit
:::::: d351af01b9307566135cb0f355ca65d0952c10b5 bsg: bind bsg to request_queue instead of gendisk
:::::: TO: FUJITA Tomonori <fujita.tomonori(a)lab.ntt.co.jp>
:::::: CC: Jens Axboe <jens.axboe(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[zen-kernel-zen-kernel:5.13/zen-sauce 1/4] mm/vmscan.c:188:55: error: use of undeclared identifier 'CONFIG_CLEAN_LOW_KBYTES'
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.13/zen-sauce
head: efe513d7401c0d8ee779944de9997da960e257ce
commit: aec8f00a3066a2589dd6ea97d5f86d81c8d40c4a [1/4] mm/vmscan: add sysctl knobs for protecting clean cache
config: arm64-randconfig-r035-20210719 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 5d5b08761f944d5b9822d582378333cc4b36a0a7)
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/zen-kernel/zen-kernel/commit/aec8f00a3066a2589dd6ea97d...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.13/zen-sauce
git checkout aec8f00a3066a2589dd6ea97d5f86d81c8d40c4a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash
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 >>):
mm/vmscan.c:180:5: warning: 'CONFIG_CLEAN_LOW_KBYTES' is not defined, evaluates to 0 [-Wundef]
#if CONFIG_CLEAN_LOW_KBYTES < 0
^
mm/vmscan.c:184:5: warning: 'CONFIG_CLEAN_MIN_KBYTES' is not defined, evaluates to 0 [-Wundef]
#if CONFIG_CLEAN_MIN_KBYTES < 0
^
>> mm/vmscan.c:188:55: error: use of undeclared identifier 'CONFIG_CLEAN_LOW_KBYTES'
unsigned long sysctl_clean_low_kbytes __read_mostly = CONFIG_CLEAN_LOW_KBYTES;
^
>> mm/vmscan.c:189:55: error: use of undeclared identifier 'CONFIG_CLEAN_MIN_KBYTES'
unsigned long sysctl_clean_min_kbytes __read_mostly = CONFIG_CLEAN_MIN_KBYTES;
^
2 warnings and 2 errors generated.
vim +/CONFIG_CLEAN_LOW_KBYTES +188 mm/vmscan.c
187
> 188 unsigned long sysctl_clean_low_kbytes __read_mostly = CONFIG_CLEAN_LOW_KBYTES;
> 189 unsigned long sysctl_clean_min_kbytes __read_mostly = CONFIG_CLEAN_MIN_KBYTES;
190
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[hch-block:scsi-ioctl 14/24] drivers/scsi/scsi_sysfs.c:1369: undefined reference to `bsg_scsi_register_queue'
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git scsi-ioctl
head: 0d6e95412bd07b6406be6d368ea60513807caf83
commit: 075e28806125ae286114e55557067e340f30a93a [14/24] bsg: move bsg_scsi_ops to drivers/scsi/
config: i386-randconfig-s001-20210722 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block scsi-ioctl
git checkout 075e28806125ae286114e55557067e340f30a93a
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash
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/scsi/scsi_sysfs.o: in function `scsi_sysfs_add_sdev':
>> drivers/scsi/scsi_sysfs.c:1369: undefined reference to `bsg_scsi_register_queue'
sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/scsi_bsg.c:92:5: sparse: sparse: symbol 'scsi_bsg_register_queue' was not declared. Should it be static?
vim +1369 drivers/scsi/scsi_sysfs.c
643eb2d932c97a0 James Bottomley 2008-03-22 1319
^1da177e4c3f415 Linus Torvalds 2005-04-16 1320 /**
^1da177e4c3f415 Linus Torvalds 2005-04-16 1321 * scsi_sysfs_add_sdev - add scsi device to sysfs
^1da177e4c3f415 Linus Torvalds 2005-04-16 1322 * @sdev: scsi_device to add
^1da177e4c3f415 Linus Torvalds 2005-04-16 1323 *
^1da177e4c3f415 Linus Torvalds 2005-04-16 1324 * Return value:
^1da177e4c3f415 Linus Torvalds 2005-04-16 1325 * 0 on Success / non-zero on Failure
^1da177e4c3f415 Linus Torvalds 2005-04-16 1326 **/
^1da177e4c3f415 Linus Torvalds 2005-04-16 1327 int scsi_sysfs_add_sdev(struct scsi_device *sdev)
^1da177e4c3f415 Linus Torvalds 2005-04-16 1328 {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1329 int error, i;
80ed71ce1a33695 James Bottomley 2007-07-19 1330 struct request_queue *rq = sdev->request_queue;
643eb2d932c97a0 James Bottomley 2008-03-22 1331 struct scsi_target *starget = sdev->sdev_target;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1332
643eb2d932c97a0 James Bottomley 2008-03-22 1333 error = scsi_target_add(starget);
643eb2d932c97a0 James Bottomley 2008-03-22 1334 if (error)
643eb2d932c97a0 James Bottomley 2008-03-22 1335 return error;
643eb2d932c97a0 James Bottomley 2008-03-22 1336
643eb2d932c97a0 James Bottomley 2008-03-22 1337 transport_configure_device(&starget->dev);
bc4f24014de58f0 Alan Stern 2010-06-17 1338
4cb077d93a57fb8 Rafael J. Wysocki 2010-02-08 1339 device_enable_async_suspend(&sdev->sdev_gendev);
bc4f24014de58f0 Alan Stern 2010-06-17 1340 scsi_autopm_get_target(starget);
bc4f24014de58f0 Alan Stern 2010-06-17 1341 pm_runtime_set_active(&sdev->sdev_gendev);
c74f8056621738f Stanley Chu 2019-09-16 1342 if (!sdev->rpm_autosuspend)
bc4f24014de58f0 Alan Stern 2010-06-17 1343 pm_runtime_forbid(&sdev->sdev_gendev);
bc4f24014de58f0 Alan Stern 2010-06-17 1344 pm_runtime_enable(&sdev->sdev_gendev);
bc4f24014de58f0 Alan Stern 2010-06-17 1345 scsi_autopm_put_target(starget);
bc4f24014de58f0 Alan Stern 2010-06-17 1346
bc4f24014de58f0 Alan Stern 2010-06-17 1347 scsi_autopm_get_device(sdev);
bc4f24014de58f0 Alan Stern 2010-06-17 1348
2930f8171329592 Hannes Reinecke 2017-09-20 1349 scsi_dh_add_device(sdev);
086b91d052ebe4e Christoph Hellwig 2015-08-27 1350
4cd2459c066d297 Hannes Reinecke 2016-03-03 1351 error = device_add(&sdev->sdev_gendev);
4cd2459c066d297 Hannes Reinecke 2016-03-03 1352 if (error) {
4cd2459c066d297 Hannes Reinecke 2016-03-03 1353 sdev_printk(KERN_INFO, sdev,
4cd2459c066d297 Hannes Reinecke 2016-03-03 1354 "failed to add device: %d\n", error);
4cd2459c066d297 Hannes Reinecke 2016-03-03 1355 return error;
4cd2459c066d297 Hannes Reinecke 2016-03-03 1356 }
4cd2459c066d297 Hannes Reinecke 2016-03-03 1357
4cb077d93a57fb8 Rafael J. Wysocki 2010-02-08 1358 device_enable_async_suspend(&sdev->sdev_dev);
ee959b00c335d77 Tony Jones 2008-02-22 1359 error = device_add(&sdev->sdev_dev);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1360 if (error) {
73d8c34f3d78ccf Alan Stern 2010-11-15 1361 sdev_printk(KERN_INFO, sdev,
73d8c34f3d78ccf Alan Stern 2010-11-15 1362 "failed to add class device: %d\n", error);
860dc73608a091e James Bottomley 2009-11-19 1363 device_del(&sdev->sdev_gendev);
ee37e09d81a4acf Alan Stern 2010-02-12 1364 return error;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1365 }
860dc73608a091e James Bottomley 2009-11-19 1366 transport_add_device(&sdev->sdev_gendev);
860dc73608a091e James Bottomley 2009-11-19 1367 sdev->is_visible = 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1368
17cb960f29c29ee Christoph Hellwig 2018-03-13 @1369 error = bsg_scsi_register_queue(rq, &sdev->sdev_gendev);
80ed71ce1a33695 James Bottomley 2007-07-19 1370 if (error)
860dc73608a091e James Bottomley 2009-11-19 1371 /* we're treating error on bsg register as non-fatal,
860dc73608a091e James Bottomley 2009-11-19 1372 * so pretend nothing went wrong */
80ed71ce1a33695 James Bottomley 2007-07-19 1373 sdev_printk(KERN_INFO, sdev,
80ed71ce1a33695 James Bottomley 2007-07-19 1374 "Failed to register bsg queue, errno=%d\n", error);
80ed71ce1a33695 James Bottomley 2007-07-19 1375
bfd129445f23c03 Kay Sievers 2007-09-11 1376 /* add additional host specific attributes */
^1da177e4c3f415 Linus Torvalds 2005-04-16 1377 if (sdev->host->hostt->sdev_attrs) {
^1da177e4c3f415 Linus Torvalds 2005-04-16 1378 for (i = 0; sdev->host->hostt->sdev_attrs[i]; i++) {
bfd129445f23c03 Kay Sievers 2007-09-11 1379 error = device_create_file(&sdev->sdev_gendev,
^1da177e4c3f415 Linus Torvalds 2005-04-16 1380 sdev->host->hostt->sdev_attrs[i]);
860dc73608a091e James Bottomley 2009-11-19 1381 if (error)
ee37e09d81a4acf Alan Stern 2010-02-12 1382 return error;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1383 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1384 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1385
86b87cde0b5581c Stanislav Nijnikov 2018-02-15 1386 if (sdev->host->hostt->sdev_groups) {
86b87cde0b5581c Stanislav Nijnikov 2018-02-15 1387 error = sysfs_create_groups(&sdev->sdev_gendev.kobj,
86b87cde0b5581c Stanislav Nijnikov 2018-02-15 1388 sdev->host->hostt->sdev_groups);
86b87cde0b5581c Stanislav Nijnikov 2018-02-15 1389 if (error)
86b87cde0b5581c Stanislav Nijnikov 2018-02-15 1390 return error;
86b87cde0b5581c Stanislav Nijnikov 2018-02-15 1391 }
86b87cde0b5581c Stanislav Nijnikov 2018-02-15 1392
6fe8c1dbefd63ef Subhash Jadavani 2014-09-10 1393 scsi_autopm_put_device(sdev);
^1da177e4c3f415 Linus Torvalds 2005-04-16 1394 return error;
^1da177e4c3f415 Linus Torvalds 2005-04-16 1395 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 1396
:::::: The code at line 1369 was first introduced by commit
:::::: 17cb960f29c29ee07bf6848ada3265f4be55972e bsg: split handling of SCSI CDBs vs transport requeues
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[hch-block:scsi-ioctl 14/24] drivers/scsi/scsi_bsg.c:92:5: warning: no previous prototype for function 'scsi_bsg_register_queue'
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git scsi-ioctl
head: 0d6e95412bd07b6406be6d368ea60513807caf83
commit: 075e28806125ae286114e55557067e340f30a93a [14/24] bsg: move bsg_scsi_ops to drivers/scsi/
config: powerpc64-randconfig-r011-20210722 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9625ca5b602616b2f5584e8a49ba93c52c141e40)
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
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block scsi-ioctl
git checkout 075e28806125ae286114e55557067e340f30a93a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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/scsi/scsi_bsg.c:92:5: warning: no previous prototype for function 'scsi_bsg_register_queue' [-Wmissing-prototypes]
int scsi_bsg_register_queue(struct request_queue *q, struct device *parent)
^
drivers/scsi/scsi_bsg.c:92:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int scsi_bsg_register_queue(struct request_queue *q, struct device *parent)
^
static
1 warning generated.
vim +/scsi_bsg_register_queue +92 drivers/scsi/scsi_bsg.c
91
> 92 int scsi_bsg_register_queue(struct request_queue *q, struct device *parent)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[xlnx:xlnx_rebase_v5.4 458/1765] drivers/media/platform/xilinx/xilinx-multi-scaler.c:361:18: warning: passing argument 1 of 'ioread32' discards 'const' qualifier from pointer target type
by kernel test robot
Hi Suresh,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: 2f686fa6c0bf7fa168dc45dd7ce1359217212911
commit: 31ff947476b863c4f59eb26baa654631e7b05a7b [458/1765] v4l: xilinx-multi-scaler: Remove volatile
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/Xilinx/linux-xlnx/commit/31ff947476b863c4f59eb26baa654...
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.4
git checkout 31ff947476b863c4f59eb26baa654631e7b05a7b
# save the attached .config to linux build tree
make 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 warnings (new ones prefixed by >>):
drivers/media/platform/xilinx/xilinx-multi-scaler.c: In function 'xm2msc_readreg':
>> drivers/media/platform/xilinx/xilinx-multi-scaler.c:361:18: warning: passing argument 1 of 'ioread32' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
361 | return ioread32(addr);
| ^~~~
In file included from arch/x86/include/asm/io.h:229,
from arch/x86/include/asm/realmode.h:15,
from arch/x86/include/asm/acpi.h:16,
from arch/x86/include/asm/fixmap.h:29,
from arch/x86/include/asm/apic.h:11,
from arch/x86/include/asm/smp.h:13,
from arch/x86/include/asm/mmzone_64.h:11,
from arch/x86/include/asm/mmzone.h:5,
from include/linux/mmzone.h:972,
from include/linux/gfp.h:6,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/fs.h:15,
from drivers/media/platform/xilinx/xilinx-multi-scaler.c:16:
include/asm-generic/iomap.h:32:30: note: expected 'void *' but argument is of type 'const void *'
32 | extern unsigned int ioread32(void __iomem *);
| ^~~~~~~~~~~~~~
vim +361 drivers/media/platform/xilinx/xilinx-multi-scaler.c
f5d1fac4b3ef01 Suresh Gupta 2018-09-17 358
31ff947476b863 Suresh Gupta 2018-10-12 359 static inline u32 xm2msc_readreg(const void __iomem *addr)
f5d1fac4b3ef01 Suresh Gupta 2018-09-17 360 {
f5d1fac4b3ef01 Suresh Gupta 2018-09-17 @361 return ioread32(addr);
f5d1fac4b3ef01 Suresh Gupta 2018-09-17 362 }
f5d1fac4b3ef01 Suresh Gupta 2018-09-17 363
:::::: The code at line 361 was first introduced by commit
:::::: f5d1fac4b3ef01a4f9a489e9be9a65964a5baf57 platform: xilinx: Add mem to mem Multi-Scaler driver (XM2MSC)
:::::: TO: Suresh Gupta <suresh.gupta(a)xilinx.com>
:::::: CC: Michal Simek <michal.simek(a)xilinx.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[zen-kernel-zen-kernel:5.13/zen-sauce 3/23] drivers/i2c/busses/i2c-nct6775.c:93:27: warning: unused variable 'nct6775_device_names'
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.13/zen-sauce
head: 732e5405c0311f1e32e6e4b0cd30fc104209e6bd
commit: 74e3df8f6e24c8c473b326a1d750de7d8b77b177 [3/23] ZEN: Add OpenRGB patches
config: arm64-randconfig-r035-20210719 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 5d5b08761f944d5b9822d582378333cc4b36a0a7)
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/zen-kernel/zen-kernel/commit/74e3df8f6e24c8c473b326a1d...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.13/zen-sauce
git checkout 74e3df8f6e24c8c473b326a1d750de7d8b77b177
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 warnings (new ones prefixed by >>):
>> drivers/i2c/busses/i2c-nct6775.c:93:27: warning: unused variable 'nct6775_device_names' [-Wunused-const-variable]
static const char * const nct6775_device_names[] = {
^
drivers/i2c/busses/i2c-nct6775.c:136:1: warning: unused function 'superio_outb' [-Wunused-function]
superio_outb(int ioreg, int reg, int val)
^
2 warnings generated.
vim +/nct6775_device_names +93 drivers/i2c/busses/i2c-nct6775.c
91
92 /* used to set data->name = nct6775_device_names[data->sio_kind] */
> 93 static const char * const nct6775_device_names[] = {
94 "nct6106",
95 "nct6775",
96 "nct6776",
97 "nct6779",
98 "nct6791",
99 "nct6792",
100 "nct6793",
101 "nct6795",
102 "nct6796",
103 "nct6798",
104 };
105
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[arnd-playground:arm-kill-set_fs-10 5/9] arch/arm/kernel/sys_oabi-compat.c:284:21: sparse: sparse: incorrect type in initializer (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git arm-kill-set_fs-10
head: a6e0b06b967960c7e0a64bf10b8d1b7afaa4008e
commit: 50310ba6abb85af07544c5bb6e6bb07174e4b694 [5/9] ARM: oabi-compat: rework epoll_wait/epoll_pwait emulation
config: arm-randconfig-s031-20210722 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.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-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground arm-kill-set_fs-10
git checkout 50310ba6abb85af07544c5bb6e6bb07174e4b694
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
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 >>)
arch/arm/kernel/sys_oabi-compat.c:264:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __poll_t [usertype] events @@ got unsigned int [addressable] [usertype] events @@
arch/arm/kernel/sys_oabi-compat.c:264:23: sparse: expected restricted __poll_t [usertype] events
arch/arm/kernel/sys_oabi-compat.c:264:23: sparse: got unsigned int [addressable] [usertype] events
>> arch/arm/kernel/sys_oabi-compat.c:284:21: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int __pu_val @@ got restricted __poll_t [usertype] revents @@
arch/arm/kernel/sys_oabi-compat.c:284:21: sparse: expected unsigned int __pu_val
arch/arm/kernel/sys_oabi-compat.c:284:21: sparse: got restricted __poll_t [usertype] revents
arch/arm/kernel/sys_oabi-compat.c:334:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct old_timespec32 const [noderef] __user *timeout @@ got struct old_timespec32 * @@
arch/arm/kernel/sys_oabi-compat.c:334:25: sparse: expected struct old_timespec32 const [noderef] __user *timeout
arch/arm/kernel/sys_oabi-compat.c:334:25: sparse: got struct old_timespec32 *
arch/arm/kernel/sys_oabi-compat.c:341:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct sembuf [noderef] __user *sops @@ got struct sembuf *[assigned] sops @@
arch/arm/kernel/sys_oabi-compat.c:341:52: sparse: expected struct sembuf [noderef] __user *sops
arch/arm/kernel/sys_oabi-compat.c:341:52: sparse: got struct sembuf *[assigned] sops
vim +284 arch/arm/kernel/sys_oabi-compat.c
276
277 struct epoll_event __user *
278 epoll_put_uevent(__poll_t revents, __u64 data,
279 struct epoll_event __user *uevent)
280 {
281 if (in_oabi_syscall()) {
282 struct oabi_epoll_event __user *oevent = (void __user *)uevent;
283
> 284 if (__put_user(revents, &oevent->events) ||
285 __put_user(data, &oevent->data))
286 return NULL;
287
288 return (void __user *)(oevent+1);
289 }
290
291 if (__put_user(revents, &uevent->events) ||
292 __put_user(data, &uevent->data))
293 return NULL;
294
295 return uevent+1;
296 }
297
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[android-common:android12-5.10 1/1] mm/hmm.c:177:6: error: implicit declaration of function 'pmd_protnone'
by kernel test robot
Hi Jihan,
First bad commit (maybe != root cause):
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 2ea27b7efa3f6fd0b4fab6a748ab08322280f29b
commit: 2ea27b7efa3f6fd0b4fab6a748ab08322280f29b [1/1] ANDROID: GKI: Kconfig.gki: enable CONFIG_HMM_MIRROR with HIDDEN GPU
config: arm-randconfig-r032-20210722 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9625ca5b602616b2f5584e8a49ba93c52c141e40)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 2ea27b7efa3f6fd0b4fab6a748ab08322280f29b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
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 >>):
>> mm/hmm.c:177:6: error: implicit declaration of function 'pmd_protnone' [-Werror,-Wimplicit-function-declaration]
if (pmd_protnone(pmd))
^
>> mm/hmm.c:179:10: error: implicit declaration of function 'pmd_write' [-Werror,-Wimplicit-function-declaration]
return (pmd_write(pmd) ? (HMM_PFN_VALID | HMM_PFN_WRITE) :
^
mm/hmm.c:179:10: note: did you mean 'pgd_write'?
include/linux/hugetlb.h:395:19: note: 'pgd_write' declared here
static inline int pgd_write(pgd_t pgd)
^
>> mm/hmm.c:181:29: error: use of undeclared identifier 'PMD_SHIFT'
hmm_pfn_flags_order(PMD_SHIFT - PAGE_SHIFT);
^
>> mm/hmm.c:216:9: error: implicit declaration of function 'is_device_private_entry' [-Werror,-Wimplicit-function-declaration]
return is_device_private_entry(entry) &&
^
mm/hmm.c:216:9: note: did you mean 'hmm_is_device_private_entry'?
mm/hmm.c:213:20: note: 'hmm_is_device_private_entry' declared here
static inline bool hmm_is_device_private_entry(struct hmm_range *range,
^
>> mm/hmm.c:217:3: error: implicit declaration of function 'device_private_entry_to_page' [-Werror,-Wimplicit-function-declaration]
device_private_entry_to_page(entry)->pgmap->owner ==
^
>> mm/hmm.c:217:40: error: member reference type 'int' is not a pointer
device_private_entry_to_page(entry)->pgmap->owner ==
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
>> mm/hmm.c:224:6: error: implicit declaration of function 'pte_none' [-Werror,-Wimplicit-function-declaration]
if (pte_none(pte) || !pte_present(pte) || pte_protnone(pte))
^
>> mm/hmm.c:224:24: error: implicit declaration of function 'pte_present' [-Werror,-Wimplicit-function-declaration]
if (pte_none(pte) || !pte_present(pte) || pte_protnone(pte))
^
>> mm/hmm.c:224:44: error: implicit declaration of function 'pte_protnone' [-Werror,-Wimplicit-function-declaration]
if (pte_none(pte) || !pte_present(pte) || pte_protnone(pte))
^
mm/hmm.c:224:44: note: did you mean 'pte_none'?
mm/hmm.c:224:6: note: 'pte_none' declared here
if (pte_none(pte) || !pte_present(pte) || pte_protnone(pte))
^ ~~~~~~~~~~~~
pte_none
>> mm/hmm.c:226:9: error: implicit declaration of function 'pte_write' [-Werror,-Wimplicit-function-declaration]
return pte_write(pte) ? (HMM_PFN_VALID | HMM_PFN_WRITE) : HMM_PFN_VALID;
^
mm/hmm.c:226:9: note: did you mean 'pgd_write'?
include/linux/hugetlb.h:395:19: note: 'pgd_write' declared here
static inline int pgd_write(pgd_t pgd)
^
mm/hmm.c:240:6: error: implicit declaration of function 'pte_none' [-Werror,-Wimplicit-function-declaration]
if (pte_none(pte)) {
^
mm/hmm.c:249:7: error: implicit declaration of function 'pte_present' [-Werror,-Wimplicit-function-declaration]
if (!pte_present(pte)) {
^
>> mm/hmm.c:250:23: error: implicit declaration of function 'pte_to_swp_entry' [-Werror,-Wimplicit-function-declaration]
swp_entry_t entry = pte_to_swp_entry(pte);
^
>> mm/hmm.c:250:15: error: initializing 'swp_entry_t' with an expression of incompatible type 'int'
swp_entry_t entry = pte_to_swp_entry(pte);
^ ~~~~~~~~~~~~~~~~~~~~~
>> mm/hmm.c:258:8: error: implicit declaration of function 'is_write_device_private_entry' [-Werror,-Wimplicit-function-declaration]
if (is_write_device_private_entry(entry))
^
mm/hmm.c:258:8: note: did you mean 'hmm_is_device_private_entry'?
mm/hmm.c:213:20: note: 'hmm_is_device_private_entry' declared here
static inline bool hmm_is_device_private_entry(struct hmm_range *range,
^
>> mm/hmm.c:260:15: error: implicit declaration of function 'device_private_entry_to_pfn' [-Werror,-Wimplicit-function-declaration]
*hmm_pfn = device_private_entry_to_pfn(entry) |
^
>> mm/hmm.c:272:8: error: implicit declaration of function 'non_swap_entry' [-Werror,-Wimplicit-function-declaration]
if (!non_swap_entry(entry))
^
>> mm/hmm.c:275:7: error: implicit declaration of function 'is_migration_entry' [-Werror,-Wimplicit-function-declaration]
if (is_migration_entry(entry)) {
^
>> mm/hmm.c:276:4: error: implicit declaration of function 'pte_unmap' [-Werror,-Wimplicit-function-declaration]
pte_unmap(ptep);
^
mm/hmm.c:276:4: note: did you mean 'pte_devmap'?
include/linux/mm.h:2138:19: note: 'pte_devmap' declared here
static inline int pte_devmap(pte_t pte)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for DRM_TTM
Depends on HAS_IOMEM && DRM && MMU
Selected by
- GKI_HIDDEN_DRM_CONFIGS && HAS_IOMEM && DRM
WARNING: unmet direct dependencies detected for HMM_MIRROR
Depends on MMU
Selected by
- GKI_HIDDEN_GPU_CONFIGS
WARNING: unmet direct dependencies detected for WEXT_PROC
Depends on NET && WIRELESS && PROC_FS && WEXT_CORE
Selected by
- GKI_LEGACY_WEXT_ALLCONFIG
WARNING: unmet direct dependencies detected for BALLOON_COMPACTION
Depends on COMPACTION && MEMORY_BALLOON
Selected by
- GKI_HIDDEN_MM_CONFIGS
vim +/pmd_protnone +177 mm/hmm.c
3b50a6e536d2d843 Ralph Campbell 2020-07-01 173
2733ea144dcce789 Jason Gunthorpe 2020-05-01 174 static inline unsigned long pmd_to_hmm_pfn_flags(struct hmm_range *range,
2733ea144dcce789 Jason Gunthorpe 2020-05-01 175 pmd_t pmd)
2aee09d8c1164219 Jérôme Glisse 2018-04-10 176 {
2aee09d8c1164219 Jérôme Glisse 2018-04-10 @177 if (pmd_protnone(pmd))
2aee09d8c1164219 Jérôme Glisse 2018-04-10 178 return 0;
3b50a6e536d2d843 Ralph Campbell 2020-07-01 @179 return (pmd_write(pmd) ? (HMM_PFN_VALID | HMM_PFN_WRITE) :
3b50a6e536d2d843 Ralph Campbell 2020-07-01 180 HMM_PFN_VALID) |
3b50a6e536d2d843 Ralph Campbell 2020-07-01 @181 hmm_pfn_flags_order(PMD_SHIFT - PAGE_SHIFT);
da4c3c735ea4dcc2 Jérôme Glisse 2017-09-08 182 }
da4c3c735ea4dcc2 Jérôme Glisse 2017-09-08 183
992de9a8b7511673 Jérôme Glisse 2019-05-13 184 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
9d3973d60f0abd39 Christoph Hellwig 2019-08-06 185 static int hmm_vma_handle_pmd(struct mm_walk *walk, unsigned long addr,
2733ea144dcce789 Jason Gunthorpe 2020-05-01 186 unsigned long end, unsigned long hmm_pfns[],
2733ea144dcce789 Jason Gunthorpe 2020-05-01 187 pmd_t pmd)
9d3973d60f0abd39 Christoph Hellwig 2019-08-06 188 {
74eee180b935fcb9 Jérôme Glisse 2017-09-08 189 struct hmm_vma_walk *hmm_vma_walk = walk->private;
f88a1e90c6654087 Jérôme Glisse 2018-04-10 190 struct hmm_range *range = hmm_vma_walk->range;
2aee09d8c1164219 Jérôme Glisse 2018-04-10 191 unsigned long pfn, npages, i;
a3eb13c1579ba97d Jason Gunthorpe 2020-03-27 192 unsigned int required_fault;
2733ea144dcce789 Jason Gunthorpe 2020-05-01 193 unsigned long cpu_flags;
da4c3c735ea4dcc2 Jérôme Glisse 2017-09-08 194
2aee09d8c1164219 Jérôme Glisse 2018-04-10 195 npages = (end - addr) >> PAGE_SHIFT;
f88a1e90c6654087 Jérôme Glisse 2018-04-10 196 cpu_flags = pmd_to_hmm_pfn_flags(range, pmd);
a3eb13c1579ba97d Jason Gunthorpe 2020-03-27 197 required_fault =
2733ea144dcce789 Jason Gunthorpe 2020-05-01 198 hmm_range_need_fault(hmm_vma_walk, hmm_pfns, npages, cpu_flags);
a3eb13c1579ba97d Jason Gunthorpe 2020-03-27 199 if (required_fault)
a3eb13c1579ba97d Jason Gunthorpe 2020-03-27 200 return hmm_vma_fault(addr, end, required_fault, walk);
74eee180b935fcb9 Jérôme Glisse 2017-09-08 201
309f9a4f5e1a233d Christoph Hellwig 2019-08-06 202 pfn = pmd_pfn(pmd) + ((addr & ~PMD_MASK) >> PAGE_SHIFT);
068354ade5dd9e2b Jason Gunthorpe 2020-03-27 203 for (i = 0; addr < end; addr += PAGE_SIZE, i++, pfn++)
2733ea144dcce789 Jason Gunthorpe 2020-05-01 204 hmm_pfns[i] = pfn | cpu_flags;
da4c3c735ea4dcc2 Jérôme Glisse 2017-09-08 205 return 0;
da4c3c735ea4dcc2 Jérôme Glisse 2017-09-08 206 }
9d3973d60f0abd39 Christoph Hellwig 2019-08-06 207 #else /* CONFIG_TRANSPARENT_HUGEPAGE */
9d3973d60f0abd39 Christoph Hellwig 2019-08-06 208 /* stub to allow the code below to compile */
9d3973d60f0abd39 Christoph Hellwig 2019-08-06 209 int hmm_vma_handle_pmd(struct mm_walk *walk, unsigned long addr,
2733ea144dcce789 Jason Gunthorpe 2020-05-01 210 unsigned long end, unsigned long hmm_pfns[], pmd_t pmd);
9d3973d60f0abd39 Christoph Hellwig 2019-08-06 211 #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
da4c3c735ea4dcc2 Jérôme Glisse 2017-09-08 212
08ddddda667b3b7a Christoph Hellwig 2020-03-16 213 static inline bool hmm_is_device_private_entry(struct hmm_range *range,
08ddddda667b3b7a Christoph Hellwig 2020-03-16 214 swp_entry_t entry)
08ddddda667b3b7a Christoph Hellwig 2020-03-16 215 {
08ddddda667b3b7a Christoph Hellwig 2020-03-16 @216 return is_device_private_entry(entry) &&
08ddddda667b3b7a Christoph Hellwig 2020-03-16 @217 device_private_entry_to_page(entry)->pgmap->owner ==
08ddddda667b3b7a Christoph Hellwig 2020-03-16 218 range->dev_private_owner;
08ddddda667b3b7a Christoph Hellwig 2020-03-16 219 }
08ddddda667b3b7a Christoph Hellwig 2020-03-16 220
2733ea144dcce789 Jason Gunthorpe 2020-05-01 221 static inline unsigned long pte_to_hmm_pfn_flags(struct hmm_range *range,
2733ea144dcce789 Jason Gunthorpe 2020-05-01 222 pte_t pte)
2aee09d8c1164219 Jérôme Glisse 2018-04-10 223 {
789c2af88f24d1db Philip Yang 2019-05-23 @224 if (pte_none(pte) || !pte_present(pte) || pte_protnone(pte))
2aee09d8c1164219 Jérôme Glisse 2018-04-10 225 return 0;
2733ea144dcce789 Jason Gunthorpe 2020-05-01 @226 return pte_write(pte) ? (HMM_PFN_VALID | HMM_PFN_WRITE) : HMM_PFN_VALID;
2aee09d8c1164219 Jérôme Glisse 2018-04-10 227 }
2aee09d8c1164219 Jérôme Glisse 2018-04-10 228
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 229 static int hmm_vma_handle_pte(struct mm_walk *walk, unsigned long addr,
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 230 unsigned long end, pmd_t *pmdp, pte_t *ptep,
2733ea144dcce789 Jason Gunthorpe 2020-05-01 231 unsigned long *hmm_pfn)
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 232 {
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 233 struct hmm_vma_walk *hmm_vma_walk = walk->private;
f88a1e90c6654087 Jérôme Glisse 2018-04-10 234 struct hmm_range *range = hmm_vma_walk->range;
a3eb13c1579ba97d Jason Gunthorpe 2020-03-27 235 unsigned int required_fault;
2733ea144dcce789 Jason Gunthorpe 2020-05-01 236 unsigned long cpu_flags;
da4c3c735ea4dcc2 Jérôme Glisse 2017-09-08 237 pte_t pte = *ptep;
2733ea144dcce789 Jason Gunthorpe 2020-05-01 238 uint64_t pfn_req_flags = *hmm_pfn;
da4c3c735ea4dcc2 Jérôme Glisse 2017-09-08 239
74eee180b935fcb9 Jérôme Glisse 2017-09-08 240 if (pte_none(pte)) {
2733ea144dcce789 Jason Gunthorpe 2020-05-01 241 required_fault =
2733ea144dcce789 Jason Gunthorpe 2020-05-01 242 hmm_pte_need_fault(hmm_vma_walk, pfn_req_flags, 0);
a3eb13c1579ba97d Jason Gunthorpe 2020-03-27 243 if (required_fault)
74eee180b935fcb9 Jérôme Glisse 2017-09-08 244 goto fault;
2733ea144dcce789 Jason Gunthorpe 2020-05-01 245 *hmm_pfn = 0;
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 246 return 0;
74eee180b935fcb9 Jérôme Glisse 2017-09-08 247 }
74eee180b935fcb9 Jérôme Glisse 2017-09-08 248
74eee180b935fcb9 Jérôme Glisse 2017-09-08 249 if (!pte_present(pte)) {
8d63e4cd62b2583c Ralph Campbell 2018-01-31 @250 swp_entry_t entry = pte_to_swp_entry(pte);
74eee180b935fcb9 Jérôme Glisse 2017-09-08 251
74eee180b935fcb9 Jérôme Glisse 2017-09-08 252 /*
0cb80a2fb5bcd10f Randy Dunlap 2020-08-11 253 * Never fault in device private pages, but just report
17ffdc482982af92 Christoph Hellwig 2020-03-16 254 * the PFN even if not present.
74eee180b935fcb9 Jérôme Glisse 2017-09-08 255 */
08ddddda667b3b7a Christoph Hellwig 2020-03-16 256 if (hmm_is_device_private_entry(range, entry)) {
2733ea144dcce789 Jason Gunthorpe 2020-05-01 257 cpu_flags = HMM_PFN_VALID;
17ffdc482982af92 Christoph Hellwig 2020-03-16 @258 if (is_write_device_private_entry(entry))
2733ea144dcce789 Jason Gunthorpe 2020-05-01 259 cpu_flags |= HMM_PFN_WRITE;
2733ea144dcce789 Jason Gunthorpe 2020-05-01 @260 *hmm_pfn = device_private_entry_to_pfn(entry) |
2733ea144dcce789 Jason Gunthorpe 2020-05-01 261 cpu_flags;
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 262 return 0;
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 263 }
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 264
2733ea144dcce789 Jason Gunthorpe 2020-05-01 265 required_fault =
2733ea144dcce789 Jason Gunthorpe 2020-05-01 266 hmm_pte_need_fault(hmm_vma_walk, pfn_req_flags, 0);
846babe85efdda49 Jason Gunthorpe 2020-03-27 267 if (!required_fault) {
2733ea144dcce789 Jason Gunthorpe 2020-05-01 268 *hmm_pfn = 0;
76612d6ce4ccd213 Jason Gunthorpe 2020-02-28 269 return 0;
846babe85efdda49 Jason Gunthorpe 2020-03-27 270 }
76612d6ce4ccd213 Jason Gunthorpe 2020-02-28 271
76612d6ce4ccd213 Jason Gunthorpe 2020-02-28 @272 if (!non_swap_entry(entry))
76612d6ce4ccd213 Jason Gunthorpe 2020-02-28 273 goto fault;
76612d6ce4ccd213 Jason Gunthorpe 2020-02-28 274
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 @275 if (is_migration_entry(entry)) {
74eee180b935fcb9 Jérôme Glisse 2017-09-08 @276 pte_unmap(ptep);
74eee180b935fcb9 Jérôme Glisse 2017-09-08 277 hmm_vma_walk->last = addr;
d2e8d551165ccb66 Ralph Campbell 2019-07-25 278 migration_entry_wait(walk->mm, pmdp, addr);
73231612dc7c907b Jérôme Glisse 2019-05-13 279 return -EBUSY;
74eee180b935fcb9 Jérôme Glisse 2017-09-08 280 }
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 281
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 282 /* Report error for everything else */
dfdc22078f3f064d Jason Gunthorpe 2020-02-28 283 pte_unmap(ptep);
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 284 return -EFAULT;
da4c3c735ea4dcc2 Jérôme Glisse 2017-09-08 285 }
da4c3c735ea4dcc2 Jérôme Glisse 2017-09-08 286
76612d6ce4ccd213 Jason Gunthorpe 2020-02-28 287 cpu_flags = pte_to_hmm_pfn_flags(range, pte);
2733ea144dcce789 Jason Gunthorpe 2020-05-01 288 required_fault =
2733ea144dcce789 Jason Gunthorpe 2020-05-01 289 hmm_pte_need_fault(hmm_vma_walk, pfn_req_flags, cpu_flags);
a3eb13c1579ba97d Jason Gunthorpe 2020-03-27 290 if (required_fault)
74eee180b935fcb9 Jérôme Glisse 2017-09-08 291 goto fault;
74eee180b935fcb9 Jérôme Glisse 2017-09-08 292
ac541f2503722943 Ralph Campbell 2019-10-23 293 /*
4055062749229101 Jason Gunthorpe 2020-03-05 294 * Since each architecture defines a struct page for the zero page, just
4055062749229101 Jason Gunthorpe 2020-03-05 295 * fall through and treat it like a normal page.
ac541f2503722943 Ralph Campbell 2019-10-23 296 */
4055062749229101 Jason Gunthorpe 2020-03-05 297 if (pte_special(pte) && !is_zero_pfn(pte_pfn(pte))) {
2733ea144dcce789 Jason Gunthorpe 2020-05-01 298 if (hmm_pte_need_fault(hmm_vma_walk, pfn_req_flags, 0)) {
4055062749229101 Jason Gunthorpe 2020-03-05 299 pte_unmap(ptep);
4055062749229101 Jason Gunthorpe 2020-03-05 300 return -EFAULT;
4055062749229101 Jason Gunthorpe 2020-03-05 301 }
2733ea144dcce789 Jason Gunthorpe 2020-05-01 302 *hmm_pfn = HMM_PFN_ERROR;
4055062749229101 Jason Gunthorpe 2020-03-05 303 return 0;
ac541f2503722943 Ralph Campbell 2019-10-23 304 }
992de9a8b7511673 Jérôme Glisse 2019-05-13 305
2733ea144dcce789 Jason Gunthorpe 2020-05-01 306 *hmm_pfn = pte_pfn(pte) | cpu_flags;
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 307 return 0;
74eee180b935fcb9 Jérôme Glisse 2017-09-08 308
74eee180b935fcb9 Jérôme Glisse 2017-09-08 309 fault:
74eee180b935fcb9 Jérôme Glisse 2017-09-08 310 pte_unmap(ptep);
5504ed29692faad0 Jérôme Glisse 2018-04-10 311 /* Fault any virtual address we were asked to fault */
a3eb13c1579ba97d Jason Gunthorpe 2020-03-27 312 return hmm_vma_fault(addr, end, required_fault, walk);
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 313 }
53f5c3f489ecddc7 Jérôme Glisse 2018-04-10 314
:::::: The code at line 177 was first introduced by commit
:::::: 2aee09d8c1164219971c7b396f2235bd5334018c mm/hmm: change hmm_vma_fault() to allow write fault on page basis
:::::: TO: Jérôme Glisse <jglisse(a)redhat.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[arnd-playground:arm-kill-set_fs-10 4/9] arch/arm/kernel/ptrace.c:815:29: error: 'struct thread_info' has no member named 'syscall'; did you mean 'abi_syscall'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git arm-kill-set_fs-10
head: a6e0b06b967960c7e0a64bf10b8d1b7afaa4008e
commit: c82f8f787b772d6981925ca52172a8ff3f71096a [4/9] ARM: syscall: always store thread_info->syscall
config: arm-buildonly-randconfig-r004-20210722 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.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/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground arm-kill-set_fs-10
git checkout c82f8f787b772d6981925ca52172a8ff3f71096a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/kernel/
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/arm/kernel/ptrace.c: In function 'arch_ptrace':
>> arch/arm/kernel/ptrace.c:815:29: error: 'struct thread_info' has no member named 'syscall'; did you mean 'abi_syscall'?
815 | task_thread_info(child)->syscall = data;
| ^~~~~~~
| abi_syscall
arch/arm/kernel/ptrace.c: In function 'tracehook_report_syscall':
arch/arm/kernel/ptrace.c:884:26: error: 'struct thread_info' has no member named 'syscall'; did you mean 'abi_syscall'?
884 | current_thread_info()->syscall = -1;
| ^~~~~~~
| abi_syscall
arch/arm/kernel/ptrace.c: At top level:
arch/arm/kernel/ptrace.c:889:16: warning: no previous prototype for 'syscall_trace_enter' [-Wmissing-prototypes]
889 | asmlinkage int syscall_trace_enter(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~
arch/arm/kernel/ptrace.c:917:17: warning: no previous prototype for 'syscall_trace_exit' [-Wmissing-prototypes]
917 | asmlinkage void syscall_trace_exit(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~
vim +815 arch/arm/kernel/ptrace.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 808
^1da177e4c3f41 Linus Torvalds 2005-04-16 809 case PTRACE_GET_THREAD_AREA:
a4780adeefd042 André Hentschel 2013-06-18 810 ret = put_user(task_thread_info(child)->tp_value[0],
b640a0d192265c Namhyung Kim 2010-10-27 811 datap);
^1da177e4c3f41 Linus Torvalds 2005-04-16 812 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 813
3f471126ee53fe Nicolas Pitre 2006-01-14 814 case PTRACE_SET_SYSCALL:
5ba6d3febd4978 Russell King 2007-05-06 @815 task_thread_info(child)->syscall = data;
3f471126ee53fe Nicolas Pitre 2006-01-14 816 ret = 0;
3f471126ee53fe Nicolas Pitre 2006-01-14 817 break;
3f471126ee53fe Nicolas Pitre 2006-01-14 818
:::::: The code at line 815 was first introduced by commit
:::::: 5ba6d3febd4978f31b2c523d64d381603923a709 [ARM] Move syscall saving out of the way of utrace
:::::: TO: Russell King <rmk(a)dyn-67.arm.linux.org.uk>
:::::: CC: Russell King <rmk+kernel(a)arm.linux.org.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month