[intel-lts:5.10/yocto 15959/20393] drivers/gpu/drm/nouveau/dispnv50/disp.c:1665:59: error: 'struct nouveau_connector' has no member named 'backlight'
by kernel test robot
Hi Lyude,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: 2dafc777a64181d42982628c7f5907a03da5f070
commit: ce5ae1651b65e1a62c2fd1c347a4a2473341bec7 [15959/20393] drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau
config: alpha-randconfig-r004-20220210 (https://download.01.org/0day-ci/archive/20220210/202202102200.rAklldgI-lk...)
compiler: alpha-linux-gcc (GCC) 11.2.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/intel/linux-intel-lts/commit/ce5ae1651b65e1a62c2fd1c34...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/yocto
git checkout ce5ae1651b65e1a62c2fd1c347a4a2473341bec7
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/gpu/drm/
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/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_cleanup':
drivers/gpu/drm/nouveau/dispnv50/disp.c:1390:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
1390 | int ret;
| ^~~
drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_prepare':
drivers/gpu/drm/nouveau/dispnv50/disp.c:1414:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
1414 | int ret;
| ^~~
drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_sor_atomic_disable':
>> drivers/gpu/drm/nouveau/dispnv50/disp.c:1665:59: error: 'struct nouveau_connector' has no member named 'backlight'
1665 | struct nouveau_backlight *backlight = nv_connector->backlight;
| ^~
>> drivers/gpu/drm/nouveau/dispnv50/disp.c:1670:35: error: invalid use of undefined type 'struct nouveau_backlight'
1670 | if (backlight && backlight->uses_dpcd) {
| ^~
drivers/gpu/drm/nouveau/dispnv50/disp.c:1671:64: error: invalid use of undefined type 'struct nouveau_backlight'
1671 | ret = drm_edp_backlight_disable(aux, &backlight->edp_info);
| ^~
drivers/gpu/drm/nouveau/dispnv50/disp.c: At top level:
drivers/gpu/drm/nouveau/dispnv50/disp.c:2661:1: warning: no previous prototype for 'nv50_display_create' [-Wmissing-prototypes]
2661 | nv50_display_create(struct drm_device *dev)
| ^~~~~~~~~~~~~~~~~~~
vim +1665 drivers/gpu/drm/nouveau/dispnv50/disp.c
1652
1653 /* TODO: Should we extend this to PWM-only backlights?
1654 * As well, should we add a DRM helper for waiting for the backlight to acknowledge
1655 * the panel backlight has been shut off? Intel doesn't seem to do this, and uses a
1656 * fixed time delay from the vbios…
1657 */
1658 static void
1659 nv50_sor_atomic_disable(struct drm_encoder *encoder, struct drm_atomic_state *state)
1660 {
1661 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
1662 struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev);
1663 struct nouveau_crtc *nv_crtc = nouveau_crtc(nv_encoder->crtc);
1664 struct nouveau_connector *nv_connector = nv50_outp_get_old_connector(state, nv_encoder);
> 1665 struct nouveau_backlight *backlight = nv_connector->backlight;
1666 struct drm_dp_aux *aux = &nv_connector->aux;
1667 int ret;
1668 u8 pwr;
1669
> 1670 if (backlight && backlight->uses_dpcd) {
1671 ret = drm_edp_backlight_disable(aux, &backlight->edp_info);
1672 if (ret < 0)
1673 NV_ERROR(drm, "Failed to disable backlight on [CONNECTOR:%d:%s]: %d\n",
1674 nv_connector->base.base.id, nv_connector->base.name, ret);
1675 }
1676
1677 if (nv_encoder->dcb->type == DCB_OUTPUT_DP) {
1678 int ret = drm_dp_dpcd_readb(aux, DP_SET_POWER, &pwr);
1679
1680 if (ret == 0) {
1681 pwr &= ~DP_SET_POWER_MASK;
1682 pwr |= DP_SET_POWER_D3;
1683 drm_dp_dpcd_writeb(aux, DP_SET_POWER, pwr);
1684 }
1685 }
1686
1687 nv_encoder->update(nv_encoder, nv_crtc->index, NULL, 0, 0);
1688 nv50_audio_disable(encoder, nv_crtc);
1689 nv50_hdmi_disable(&nv_encoder->base.base, nv_crtc);
1690 nv50_outp_release(nv_encoder);
1691 nv_encoder->crtc = NULL;
1692 }
1693
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.15 639/923] drivers/gpu/drm/xlnx/xlnx_pl_disp.c:116:15: error: implicit declaration of function 'xilinx_xdma_get_fid_err_flag'; did you mean 'xilinx_xdma_get_width_align'?
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head: 966124532656bc95d781abf57531e4cd4f962237
commit: 53714559153b6752c75bfc61ddf6680dfd2ae401 [639/923] drm: xlnx: DRM KMS driver for xilinx display pipeline
config: alpha-randconfig-c024-20220208 (https://download.01.org/0day-ci/archive/20220210/202202102255.bMCsK8et-lk...)
compiler: alpha-linux-gcc (GCC) 11.2.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/Xilinx/linux-xlnx/commit/53714559153b6752c75bfc61ddf66...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.15
git checkout 53714559153b6752c75bfc61ddf6680dfd2ae401
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/gpu/drm/xlnx/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the xilinx-xlnx/xlnx_rebase_v5.15 HEAD 966124532656bc95d781abf57531e4cd4f962237 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
drivers/gpu/drm/xlnx/xlnx_pl_disp.c: In function 'xlnx_pl_disp_complete':
>> drivers/gpu/drm/xlnx/xlnx_pl_disp.c:116:15: error: implicit declaration of function 'xilinx_xdma_get_fid_err_flag'; did you mean 'xilinx_xdma_get_width_align'? [-Werror=implicit-function-declaration]
116 | ret = xilinx_xdma_get_fid_err_flag(xlnx_dma_chan->dma_chan,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| xilinx_xdma_get_width_align
>> drivers/gpu/drm/xlnx/xlnx_pl_disp.c:121:15: error: implicit declaration of function 'xilinx_xdma_get_fid_out'; did you mean 'xilinx_xdma_get_fid'? [-Werror=implicit-function-declaration]
121 | ret = xilinx_xdma_get_fid_out(xlnx_dma_chan->dma_chan,
| ^~~~~~~~~~~~~~~~~~~~~~~
| xilinx_xdma_get_fid
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for DRM_PANEL_SIMPLE
Depends on HAS_IOMEM && DRM && DRM_PANEL && OF && BACKLIGHT_CLASS_DEVICE && PM
Selected by
- DRM_XLNX_DSI && HAS_IOMEM && DRM_XLNX
vim +116 drivers/gpu/drm/xlnx/xlnx_pl_disp.c
100
101 /**
102 * xlnx_pl_disp_complete - vblank handler
103 * @param: parameter to vblank handler
104 *
105 * This function handles the vblank interrupt, and sends an event to
106 * CRTC object.
107 */
108 static void xlnx_pl_disp_complete(void *param)
109 {
110 struct xlnx_pl_disp *xlnx_pl_disp = param;
111 struct drm_device *drm = xlnx_pl_disp->drm;
112 struct xlnx_dma_chan *xlnx_dma_chan = xlnx_pl_disp->chan;
113 int ret;
114
115 /* Get fid err flag and fid out val */
> 116 ret = xilinx_xdma_get_fid_err_flag(xlnx_dma_chan->dma_chan,
117 &xlnx_pl_disp->fid_err_val);
118 if (ret)
119 dev_dbg(xlnx_pl_disp->dev, "failed to get fid_err info\n");
120
> 121 ret = xilinx_xdma_get_fid_out(xlnx_dma_chan->dma_chan,
122 &xlnx_pl_disp->fid_out_val);
123 if (ret)
124 dev_dbg(xlnx_pl_disp->dev, "failed to get fid_out info\n");
125
126 drm_handle_vblank(drm, 0);
127 }
128
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[intel-lts:5.10/yocto 10621/20393] drivers/media/v4l2-core/v4l2-subdev.c:1027:1: warning: the frame size of 1400 bytes is larger than 1024 bytes
by kernel test robot
Hi Wanhui,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: 2dafc777a64181d42982628c7f5907a03da5f070
commit: f13978177f8c57c155d53df5f2df60f519e82e4a [10621/20393] v4l: subdev: Add support for sub-streams
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220210/202202102104.kTpVM9F2-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/linux-intel-lts/commit/f13978177f8c57c155d53df5f...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/yocto
git checkout f13978177f8c57c155d53df5f2df60f519e82e4a
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/crypto/ drivers/gpio/ drivers/gpu/drm/i915/ drivers/media/i2c/ drivers/media/v4l2-core/
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/v4l2-core/v4l2-subdev.c: In function 'v4l2_subdev_link_validate':
>> drivers/media/v4l2-core/v4l2-subdev.c:1027:1: warning: the frame size of 1400 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1027 | }
| ^
vim +1027 drivers/media/v4l2-core/v4l2-subdev.c
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 907
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 908 int v4l2_subdev_link_validate(struct media_link *link)
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 909 {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 910 struct v4l2_subdev *sink;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 911 struct v4l2_subdev_route sink_routes[LINK_VALIDATE_ROUTES];
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 912 struct v4l2_subdev_routing sink_routing = {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 913 .routes = sink_routes,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 914 .num_routes = ARRAY_SIZE(sink_routes),
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 915 };
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 916 struct v4l2_subdev_route src_routes[LINK_VALIDATE_ROUTES];
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 917 struct v4l2_subdev_routing src_routing = {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 918 .routes = src_routes,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 919 .num_routes = ARRAY_SIZE(src_routes),
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 920 };
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 921 unsigned int i, j;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 922 int rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 923
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 924 sink = media_entity_to_v4l2_subdev(link->sink->entity);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 925 if (!sink)
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 926 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 927
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 928 if (!(link->sink->flags & MEDIA_PAD_FL_MULTIPLEX &&
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 929 link->source->flags & MEDIA_PAD_FL_MULTIPLEX))
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 930 return v4l2_subdev_link_validate_one(link, link->source, 0,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 931 link->sink, 0);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 932 /*
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 933 * multiplex link cannot proceed without route information.
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 934 */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 935 rval = v4l2_subdev_call(sink, pad, get_routing, &sink_routing);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 936 if (rval) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 937 dev_err(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 938 "error %d in get_routing() on %s, sink pad %u\n", rval,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 939 sink->entity.name, link->sink->index);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 940
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 941 return rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 942 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 943
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 944 rval = v4l2_subdev_call(media_entity_to_v4l2_subdev(
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 945 link->source->entity),
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 946 pad, get_routing, &src_routing);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 947 if (rval) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 948 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 949 "error %d in get_routing() on %s, source pad %u\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 950 rval, sink->entity.name, link->source->index);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 951
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 952 return rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 953 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 954
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 955 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 956 "validating multiplexed link \"%s\":%u -> \"%s\":%u; %u/%u routes\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 957 link->source->entity->name, link->source->index,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 958 sink->entity.name, link->sink->index,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 959 src_routing.num_routes, sink_routing.num_routes);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 960
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 961 for (i = 0; i < sink_routing.num_routes; i++) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 962 /* Get the first active route for the sink pad. */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 963 if (sink_routes[i].sink_pad != link->sink->index ||
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 964 !(sink_routes[i].flags & V4L2_SUBDEV_ROUTE_FL_ACTIVE)) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 965 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 966 "skipping sink route %u/%u -> %u/%u[%u]\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 967 sink_routes[i].sink_pad,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 968 sink_routes[i].sink_stream,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 969 sink_routes[i].source_pad,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 970 sink_routes[i].source_stream,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 971 (bool)(sink_routes[i].flags
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 972 & V4L2_SUBDEV_ROUTE_FL_ACTIVE));
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 973 continue;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 974 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 975
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 976 /*
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 977 * Get the corresponding route for the source pad.
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 978 * It's ok for the source pad to have routes active
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 979 * where the sink pad does not, but the routes that
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 980 * are active on the source pad have to be active on
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 981 * the sink pad as well.
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 982 */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 983
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 984 for (j = 0; j < src_routing.num_routes; j++) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 985 if (src_routes[j].source_pad == link->source->index &&
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 986 src_routes[j].source_stream
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 987 == sink_routes[i].sink_stream)
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 988 break;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 989 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 990
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 991 if (j == src_routing.num_routes) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 992 dev_err(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 993 "no corresponding source found.\n");
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 994 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 995 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 996
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 997 /* The source route must be active. */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 998 if (!(src_routes[j].flags & V4L2_SUBDEV_ROUTE_FL_ACTIVE)) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 999 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1000 "source route not active\n");
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1001 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1002 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1003
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1004 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1005 "validating link \"%s\": %u/%u => \"%s\" %u/%u\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1006 link->source->entity->name, src_routes[j].source_pad,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1007 src_routes[j].source_stream, sink->entity.name,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1008 sink_routes[i].sink_pad, sink_routes[i].sink_stream);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1009
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1010 rval = v4l2_subdev_link_validate_one(
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1011 link, link->source, src_routes[j].source_stream,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1012 link->sink, sink_routes[i].sink_stream);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1013 if (rval) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1014 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1015 "error %d in link validation\n", rval);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1016 return rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1017 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1018 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1019
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1020 if (i < sink_routing.num_routes) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1021 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1022 "not all sink routes verified; out of source routes\n");
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1023 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1024 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1025
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1026 return 0;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 @1027 }
8227c92b696884 drivers/media/video/v4l2-subdev.c Sakari Ailus 2011-10-10 1028 EXPORT_SYMBOL_GPL(v4l2_subdev_link_validate);
9b02cbb3ede89b drivers/media/v4l2-core/v4l2-subdev.c Laurent Pinchart 2015-04-24 1029
:::::: The code at line 1027 was first introduced by commit
:::::: e822d33e27dd00bb200f0e9db1811231554ce03c v4l: Take routing info into account in link validation
:::::: TO: wu xia <xia.wu(a)intel.com>
:::::: CC: Pan, Kris <kris.pan(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[intel-lts:5.10/yocto 17074/20393] drivers/net/ethernet/intel/igc/igc_main.c:2709:17: warning: variable 'timestamp' set but not used
by kernel test robot
Hi Muhammad,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: 2dafc777a64181d42982628c7f5907a03da5f070
commit: 765ce62a0644876bc2eb57fe84ab526f74129d6a [17074/20393] igc: Enable HW TX Timestamp for AF_XDP ZC
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220210/202202102122.OOXYUIIf-lk...)
compiler: alpha-linux-gcc (GCC) 11.2.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/intel/linux-intel-lts/commit/765ce62a0644876bc2eb57fe8...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/yocto
git checkout 765ce62a0644876bc2eb57fe84ab526f74129d6a
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/net/ethernet/intel/igc/
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/net/ethernet/intel/igc/igc_main.c: In function 'igc_clean_tx_irq':
>> drivers/net/ethernet/intel/igc/igc_main.c:2709:17: warning: variable 'timestamp' set but not used [-Wunused-but-set-variable]
2709 | ktime_t timestamp = 0;
| ^~~~~~~~~
vim +/timestamp +2709 drivers/net/ethernet/intel/igc/igc_main.c
2692
2693 /**
2694 * igc_clean_tx_irq - Reclaim resources after transmit completes
2695 * @q_vector: pointer to q_vector containing needed info
2696 * @napi_budget: Used to determine if we are in netpoll
2697 *
2698 * returns true if ring is completely cleaned
2699 */
2700 static bool igc_clean_tx_irq(struct igc_q_vector *q_vector, int napi_budget)
2701 {
2702 struct igc_adapter *adapter = q_vector->adapter;
2703 unsigned int total_bytes = 0, total_packets = 0;
2704 unsigned int budget = q_vector->tx.work_limit;
2705 struct igc_ring *tx_ring = q_vector->tx.ring;
2706 unsigned int i = tx_ring->next_to_clean;
2707 struct igc_tx_buffer *tx_buffer;
2708 union igc_adv_tx_desc *tx_desc;
> 2709 ktime_t timestamp = 0;
2710 u32 xsk_frames = 0;
2711
2712 if (test_bit(__IGC_DOWN, &adapter->state))
2713 return true;
2714
2715 tx_buffer = &tx_ring->tx_buffer_info[i];
2716 tx_desc = IGC_TX_DESC(tx_ring, i);
2717 i -= tx_ring->count;
2718
2719 do {
2720 union igc_adv_tx_desc *eop_desc = tx_buffer->next_to_watch;
2721
2722 /* if next_to_watch is not set then there is no work pending */
2723 if (!eop_desc)
2724 break;
2725
2726 /* prevent any other reads prior to eop_desc */
2727 smp_rmb();
2728
2729 /* if DD is not set pending work has not been completed */
2730 if (!(eop_desc->wb.status & cpu_to_le32(IGC_TXD_STAT_DD)))
2731 break;
2732
2733 if (eop_desc->wb.status & cpu_to_le32(IGC_TXD_STAT_TS_STAT) &&
2734 tx_buffer->tx_flags & IGC_TX_FLAGS_DMA_TSTAMP) {
2735 u64 tstamp = le64_to_cpu(eop_desc->wb.dma_tstamp);
2736
2737 if (tx_ring->xsk_pool && adapter->tstamp_config.tx_type == HWTSTAMP_TX_ON)
2738 timestamp = igc_tx_dma_hw_tstamp(adapter, tstamp);
2739 else
2740 igc_ptp_tx_dma_tstamp(adapter, tx_buffer->skb, tstamp);
2741 }
2742
2743 /* clear next_to_watch to prevent false hangs */
2744 tx_buffer->next_to_watch = NULL;
2745
2746 /* update the statistics for this packet */
2747 total_bytes += tx_buffer->bytecount;
2748 total_packets += tx_buffer->gso_segs;
2749
2750 switch (tx_buffer->type) {
2751 case IGC_TX_BUFFER_TYPE_XSK:
2752 xsk_frames++;
2753 break;
2754 case IGC_TX_BUFFER_TYPE_XDP:
2755 xdp_return_frame(tx_buffer->xdpf);
2756 igc_unmap_tx_buffer(tx_ring->dev, tx_buffer);
2757 break;
2758 case IGC_TX_BUFFER_TYPE_SKB:
2759 napi_consume_skb(tx_buffer->skb, napi_budget);
2760 igc_unmap_tx_buffer(tx_ring->dev, tx_buffer);
2761 break;
2762 default:
2763 netdev_warn_once(tx_ring->netdev,
2764 "Unknown tx buffer type\n");
2765 break;
2766 }
2767
2768 /* clear last DMA location and unmap remaining buffers */
2769 while (tx_desc != eop_desc) {
2770 tx_buffer++;
2771 tx_desc++;
2772 i++;
2773 if (unlikely(!i)) {
2774 i -= tx_ring->count;
2775 tx_buffer = tx_ring->tx_buffer_info;
2776 tx_desc = IGC_TX_DESC(tx_ring, 0);
2777 }
2778
2779 /* unmap any remaining paged data */
2780 if (dma_unmap_len(tx_buffer, len))
2781 igc_unmap_tx_buffer(tx_ring->dev, tx_buffer);
2782 }
2783
2784 /* move us one more past the eop_desc for start of next pkt */
2785 tx_buffer++;
2786 tx_desc++;
2787 i++;
2788 if (unlikely(!i)) {
2789 i -= tx_ring->count;
2790 tx_buffer = tx_ring->tx_buffer_info;
2791 tx_desc = IGC_TX_DESC(tx_ring, 0);
2792 }
2793
2794 /* issue prefetch for next Tx descriptor */
2795 prefetch(tx_desc);
2796
2797 /* update budget accounting */
2798 budget--;
2799 } while (likely(budget));
2800
2801 netdev_tx_completed_queue(txring_txq(tx_ring),
2802 total_packets, total_bytes);
2803
2804 i += tx_ring->count;
2805 tx_ring->next_to_clean = i;
2806
2807 igc_update_tx_stats(q_vector, total_packets, total_bytes);
2808
2809 if (tx_ring->xsk_pool) {
2810 if (xsk_frames)
2811 xsk_tx_completed(tx_ring->xsk_pool, xsk_frames);
2812 if (xsk_uses_need_wakeup(tx_ring->xsk_pool))
2813 xsk_set_tx_need_wakeup(tx_ring->xsk_pool);
2814 igc_xdp_xmit_zc(tx_ring);
2815 }
2816
2817 if (test_bit(IGC_RING_FLAG_TX_DETECT_HANG, &tx_ring->flags)) {
2818 struct igc_hw *hw = &adapter->hw;
2819
2820 /* Detect a transmit hang in hardware, this serializes the
2821 * check with the clearing of time_stamp and movement of i
2822 */
2823 clear_bit(IGC_RING_FLAG_TX_DETECT_HANG, &tx_ring->flags);
2824 if (tx_buffer->next_to_watch &&
2825 time_after(jiffies, tx_buffer->time_stamp +
2826 (adapter->tx_timeout_factor * HZ)) &&
2827 !(rd32(IGC_STATUS) & IGC_STATUS_TXOFF)) {
2828 /* detected Tx unit hang */
2829 netdev_err(tx_ring->netdev,
2830 "Detected Tx Unit Hang\n"
2831 " Tx Queue <%d>\n"
2832 " TDH <%x>\n"
2833 " TDT <%x>\n"
2834 " next_to_use <%x>\n"
2835 " next_to_clean <%x>\n"
2836 "buffer_info[next_to_clean]\n"
2837 " time_stamp <%lx>\n"
2838 " next_to_watch <%p>\n"
2839 " jiffies <%lx>\n"
2840 " desc.status <%x>\n",
2841 tx_ring->queue_index,
2842 rd32(IGC_TDH(tx_ring->reg_idx)),
2843 readl(tx_ring->tail),
2844 tx_ring->next_to_use,
2845 tx_ring->next_to_clean,
2846 tx_buffer->time_stamp,
2847 tx_buffer->next_to_watch,
2848 jiffies,
2849 tx_buffer->next_to_watch->wb.status);
2850 netif_stop_subqueue(tx_ring->netdev,
2851 tx_ring->queue_index);
2852
2853 /* we are about to reset, no point in enabling stuff */
2854 return true;
2855 }
2856 }
2857
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[ceph-client:testing 6/8] fs/ceph/addr.c:788:12: warning: stack frame size (2352) exceeds limit (2048) in 'ceph_writepages_start'
by kernel test robot
tree: https://github.com/ceph/ceph-client.git testing
head: 6dc7235ee916b768b31afa12ab507874bd278573
commit: 85fc162016ac8d19e28877a15f55c0fa4b47713b [6/8] ceph: Make ceph_netfs_issue_op() handle inlined data
config: mips-randconfig-r014-20220209 (https://download.01.org/0day-ci/archive/20220210/202202102053.7C17duIV-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project aa845d7a245d85c441d0bd44fc7b6c3be8f3de8d)
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
# https://github.com/ceph/ceph-client/commit/85fc162016ac8d19e28877a15f55c0...
git remote add ceph-client https://github.com/ceph/ceph-client.git
git fetch --no-tags ceph-client testing
git checkout 85fc162016ac8d19e28877a15f55c0fa4b47713b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash fs/ceph/
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 >>):
>> fs/ceph/addr.c:788:12: warning: stack frame size (2352) exceeds limit (2048) in 'ceph_writepages_start'
static int ceph_writepages_start(struct address_space
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r6
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/bitops.h", .line = 190, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r6; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: lld $0, $2
or $1, $0, $3
scd $1, $2
beqzc $1, 1b
.set pop
'
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -Wp,-MMD,fs/ceph/.addr.o.d -nostdinc -Iarch/mips/include -I./arch/mips/include/generated -Iinclude -I./include -Iarch/mips/include/uapi -I./arch/mips/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -DVMLINUX_LOAD_ADDRESS=0xffffffff84000000 -DLINKER_LOAD_ADDRESS=0xffffffff84000000 -DDATAOFFSET=0 -Qunused-arguments -fmacro-prefix-map== -DKBUILD_EXTRA_WARN1 -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 --target=mips64-linux -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -mabi=64 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -DGAS_HAS_SET_HARDFLOAT -Wa,-msoft-float -ffreestanding -EB -fno-stack-check -march=mips64r6 -Wa,--trap -DTOOLCHAIN_SUPPORTS_VIRT -Iarch/mips/include/asm/mach-generic -Iarch/mips/include/asm/mach-generic -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -O2 -Wframe-larger-than=2048 -fno-stack-protector -Wimplicit-fallthrough -Wno-gnu -mno-global-merge -Wno-unused-but-set-variable -Wno-unused-const-variable -ftrivial-auto-var-init=pattern -fno-stack-clash-protection -pg -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -fno-strict-overflow -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -fsanitize=unreachable -fsanitize=enum -I fs/ceph -I ./fs/ceph -DMODULE -mlong-calls -DKBUILD_BASENAME="addr" -DKBUILD_MODNAME="ceph" -D__KBUILD_MODNAME=kmod_ceph -c -o fs/ceph/addr.o fs/ceph/addr.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'fs/ceph/addr.c'.
4. Running pass 'Mips Assembly Printer' on function '@ceph_writepages_start'
#0 0x000055a535e1f68f Signals.cpp:0:0
#1 0x000055a535e1d56c llvm::sys::CleanupOnSignal(unsigned long) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x347456c)
#2 0x000055a535d5d9e7 llvm::CrashRecoveryContext::HandleExit(int) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x33b49e7)
#3 0x000055a535e15c1e llvm::sys::Process::Exit(int, bool) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x346cc1e)
#4 0x000055a533a508bb (/opt/cross/clang-aa845d7a24/bin/clang-15+0x10a78bb)
#5 0x000055a535d6449c llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x33bb49c)
#6 0x000055a536a56000 llvm::AsmPrinter::emitInlineAsm(llvm::MachineInstr const (/opt/cross/clang-aa845d7a24/bin/clang-15+0x40ad000)
#7 0x000055a536a51f34 llvm::AsmPrinter::emitFunctionBody() (/opt/cross/clang-aa845d7a24/bin/clang-15+0x40a8f34)
#8 0x000055a5344bb1e7 llvm::MipsAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x1b121e7)
#9 0x000055a535170a3d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.53) MachineFunctionPass.cpp:0:0
#10 0x000055a5355b1757 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x2c08757)
#11 0x000055a5355b18d1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x2c088d1)
#12 0x000055a5355b244f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x2c0944f)
#13 0x000055a536137917 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x378e917)
#14 0x000055a536d6f063 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x43c6063)
#15 0x000055a537845629 clang::ParseAST(clang::Sema&, bool, bool) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x4e9c629)
#16 0x000055a536d6de9f clang::CodeGenAction::ExecuteAction() (/opt/cross/clang-aa845d7a24/bin/clang-15+0x43c4e9f)
#17 0x000055a53676ac81 clang::FrontendAction::Execute() (/opt/cross/clang-aa845d7a24/bin/clang-15+0x3dc1c81)
#18 0x000055a536701b0a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x3d58b0a)
#19 0x000055a53682f59b (/opt/cross/clang-aa845d7a24/bin/clang-15+0x3e8659b)
#20 0x000055a533a51e6c cc1_main(llvm::ArrayRef<char char (/opt/cross/clang-aa845d7a24/bin/clang-15+0x10a8e6c)
#21 0x000055a533a4eb3b ExecuteCC1Tool(llvm::SmallVectorImpl<char driver.cpp:0:0
#22 0x000055a536599765 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> const::'lambda'()>(long) Job.cpp:0:0
#23 0x000055a535d5d8a3 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x33b48a3)
#24 0x000055a53659a05e clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> const (.part.216) Job.cpp:0:0
#25 0x000055a53656ec57 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const (/opt/cross/clang-aa845d7a24/bin/clang-15+0x3bc5c57)
#26 0x000055a53656f637 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) const (/opt/cross/clang-aa845d7a24/bin/clang-15+0x3bc6637)
#27 0x000055a536578cc9 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x3bcfcc9)
#28 0x000055a53397738f main (/opt/cross/clang-aa845d7a24/bin/clang-15+0xfce38f)
#29 0x00007fe35f12cd0a __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26d0a)
#30 0x000055a533a4e65a _start (/opt/cross/clang-aa845d7a24/bin/clang-15+0x10a565a)
clang-15: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 15.0.0 (git://gitmirror/llvm_project aa845d7a245d85c441d0bd44fc7b6c3be8f3de8d)
Target: mips64-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-aa845d7a24/bin
clang-15: note: diagnostic msg:
Makefile arch fs include kernel nr_bisected scripts source usr
--
>> fs/ceph/addr.c:788:12: warning: stack frame size (2352) exceeds limit (2048) in 'ceph_writepages_start'
static int ceph_writepages_start(struct address_space
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r6
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/bitops.h", .line = 190, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r6; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: lld $0, $2
or $1, $0, $3
scd $1, $2
beqzc $1, 1b
.set pop
'
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -Wp,-MMD,fs/ceph/.addr.o.d -nostdinc -Iarch/mips/include -I./arch/mips/include/generated -Iinclude -I./include -Iarch/mips/include/uapi -I./arch/mips/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -DVMLINUX_LOAD_ADDRESS=0xffffffff84000000 -DLINKER_LOAD_ADDRESS=0xffffffff84000000 -DDATAOFFSET=0 -Qunused-arguments -fmacro-prefix-map== -DKBUILD_EXTRA_WARN1 -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 --target=mips64-linux -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -mabi=64 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -DGAS_HAS_SET_HARDFLOAT -Wa,-msoft-float -ffreestanding -EB -fno-stack-check -march=mips64r6 -Wa,--trap -DTOOLCHAIN_SUPPORTS_VIRT -Iarch/mips/include/asm/mach-generic -Iarch/mips/include/asm/mach-generic -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -O2 -Wframe-larger-than=2048 -fno-stack-protector -Wimplicit-fallthrough -Wno-gnu -mno-global-merge -Wno-unused-but-set-variable -Wno-unused-const-variable -ftrivial-auto-var-init=pattern -fno-stack-clash-protection -pg -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -fno-strict-overflow -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -fsanitize=unreachable -fsanitize=enum -DMODULE -mlong-calls -DKBUILD_BASENAME="addr" -DKBUILD_MODNAME="ceph" -D__KBUILD_MODNAME=kmod_ceph -c -o fs/ceph/addr.o fs/ceph/addr.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'fs/ceph/addr.c'.
4. Running pass 'Mips Assembly Printer' on function '@ceph_writepages_start'
#0 0x0000562358d5368f Signals.cpp:0:0
#1 0x0000562358d5156c llvm::sys::CleanupOnSignal(unsigned long) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x347456c)
#2 0x0000562358c919e7 llvm::CrashRecoveryContext::HandleExit(int) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x33b49e7)
#3 0x0000562358d49c1e llvm::sys::Process::Exit(int, bool) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x346cc1e)
#4 0x00005623569848bb (/opt/cross/clang-aa845d7a24/bin/clang-15+0x10a78bb)
#5 0x0000562358c9849c llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x33bb49c)
#6 0x000056235998a000 llvm::AsmPrinter::emitInlineAsm(llvm::MachineInstr const (/opt/cross/clang-aa845d7a24/bin/clang-15+0x40ad000)
#7 0x0000562359985f34 llvm::AsmPrinter::emitFunctionBody() (/opt/cross/clang-aa845d7a24/bin/clang-15+0x40a8f34)
#8 0x00005623573ef1e7 llvm::MipsAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x1b121e7)
#9 0x00005623580a4a3d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.53) MachineFunctionPass.cpp:0:0
#10 0x00005623584e5757 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x2c08757)
#11 0x00005623584e58d1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x2c088d1)
#12 0x00005623584e644f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x2c0944f)
#13 0x000056235906b917 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x378e917)
#14 0x0000562359ca3063 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x43c6063)
#15 0x000056235a779629 clang::ParseAST(clang::Sema&, bool, bool) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x4e9c629)
#16 0x0000562359ca1e9f clang::CodeGenAction::ExecuteAction() (/opt/cross/clang-aa845d7a24/bin/clang-15+0x43c4e9f)
#17 0x000056235969ec81 clang::FrontendAction::Execute() (/opt/cross/clang-aa845d7a24/bin/clang-15+0x3dc1c81)
#18 0x0000562359635b0a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x3d58b0a)
#19 0x000056235976359b (/opt/cross/clang-aa845d7a24/bin/clang-15+0x3e8659b)
#20 0x0000562356985e6c cc1_main(llvm::ArrayRef<char char (/opt/cross/clang-aa845d7a24/bin/clang-15+0x10a8e6c)
#21 0x0000562356982b3b ExecuteCC1Tool(llvm::SmallVectorImpl<char driver.cpp:0:0
#22 0x00005623594cd765 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> const::'lambda'()>(long) Job.cpp:0:0
#23 0x0000562358c918a3 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x33b48a3)
#24 0x00005623594ce05e clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> const (.part.216) Job.cpp:0:0
#25 0x00005623594a2c57 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const (/opt/cross/clang-aa845d7a24/bin/clang-15+0x3bc5c57)
#26 0x00005623594a3637 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) const (/opt/cross/clang-aa845d7a24/bin/clang-15+0x3bc6637)
#27 0x00005623594accc9 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) (/opt/cross/clang-aa845d7a24/bin/clang-15+0x3bcfcc9)
#28 0x00005623568ab38f main (/opt/cross/clang-aa845d7a24/bin/clang-15+0xfce38f)
#29 0x00007f845ced9d0a __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26d0a)
#30 0x000056235698265a _start (/opt/cross/clang-aa845d7a24/bin/clang-15+0x10a565a)
clang-15: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 15.0.0 (git://gitmirror/llvm_project aa845d7a245d85c441d0bd44fc7b6c3be8f3de8d)
Target: mips64-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-aa845d7a24/bin
clang-15: note: diagnostic msg:
Makefile arch fs include kernel nr_bisected scripts source usr
vim +/ceph_writepages_start +788 fs/ceph/addr.c
1d3576fd10f0d7 Sage Weil 2009-10-06 784
1d3576fd10f0d7 Sage Weil 2009-10-06 785 /*
1d3576fd10f0d7 Sage Weil 2009-10-06 786 * initiate async writeback
1d3576fd10f0d7 Sage Weil 2009-10-06 787 */
1d3576fd10f0d7 Sage Weil 2009-10-06 @788 static int ceph_writepages_start(struct address_space *mapping,
1d3576fd10f0d7 Sage Weil 2009-10-06 789 struct writeback_control *wbc)
1d3576fd10f0d7 Sage Weil 2009-10-06 790 {
1d3576fd10f0d7 Sage Weil 2009-10-06 791 struct inode *inode = mapping->host;
1d3576fd10f0d7 Sage Weil 2009-10-06 792 struct ceph_inode_info *ci = ceph_inode(inode);
fc2744aa12da71 Yan, Zheng 2013-05-31 793 struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
fc2744aa12da71 Yan, Zheng 2013-05-31 794 struct ceph_vino vino = ceph_vino(inode);
2a2d927e35dd8d Yan, Zheng 2017-09-01 795 pgoff_t index, start_index, end = -1;
80e755fedebc8d Sage Weil 2010-03-31 796 struct ceph_snap_context *snapc = NULL, *last_snapc = NULL, *pgsnapc;
1d3576fd10f0d7 Sage Weil 2009-10-06 797 struct pagevec pvec;
1d3576fd10f0d7 Sage Weil 2009-10-06 798 int rc = 0;
93407472a21b82 Fabian Frederick 2017-02-27 799 unsigned int wsize = i_blocksize(inode);
1d3576fd10f0d7 Sage Weil 2009-10-06 800 struct ceph_osd_request *req = NULL;
1f934b00e90752 Yan, Zheng 2017-08-30 801 struct ceph_writeback_ctl ceph_wbc;
590e9d9861f5f2 Yan, Zheng 2017-09-03 802 bool should_loop, range_whole = false;
af9cc401ce7452 Yan, Zheng 2018-03-04 803 bool done = false;
1702e79734104d Jeff Layton 2021-12-07 804 bool caching = ceph_is_cache_enabled(inode);
1d3576fd10f0d7 Sage Weil 2009-10-06 805
3fb99d483e614b Yanhu Cao 2017-07-21 806 dout("writepages_start %p (mode=%s)\n", inode,
1d3576fd10f0d7 Sage Weil 2009-10-06 807 wbc->sync_mode == WB_SYNC_NONE ? "NONE" :
1d3576fd10f0d7 Sage Weil 2009-10-06 808 (wbc->sync_mode == WB_SYNC_ALL ? "ALL" : "HOLD"));
1d3576fd10f0d7 Sage Weil 2009-10-06 809
5d6451b1489ad1 Jeff Layton 2021-08-31 810 if (ceph_inode_is_shutdown(inode)) {
6c93df5db628e7 Yan, Zheng 2016-04-15 811 if (ci->i_wrbuffer_ref > 0) {
6c93df5db628e7 Yan, Zheng 2016-04-15 812 pr_warn_ratelimited(
6c93df5db628e7 Yan, Zheng 2016-04-15 813 "writepage_start %p %lld forced umount\n",
6c93df5db628e7 Yan, Zheng 2016-04-15 814 inode, ceph_ino(inode));
6c93df5db628e7 Yan, Zheng 2016-04-15 815 }
a341d4df87487a Yan, Zheng 2015-07-01 816 mapping_set_error(mapping, -EIO);
1d3576fd10f0d7 Sage Weil 2009-10-06 817 return -EIO; /* we're in a forced umount, don't write! */
1d3576fd10f0d7 Sage Weil 2009-10-06 818 }
95cca2b44e54b0 Yan, Zheng 2017-07-11 819 if (fsc->mount_options->wsize < wsize)
3d14c5d2b6e15c Yehuda Sadeh 2010-04-06 820 wsize = fsc->mount_options->wsize;
1d3576fd10f0d7 Sage Weil 2009-10-06 821
8667982014d604 Mel Gorman 2017-11-15 822 pagevec_init(&pvec);
1d3576fd10f0d7 Sage Weil 2009-10-06 823
590e9d9861f5f2 Yan, Zheng 2017-09-03 824 start_index = wbc->range_cyclic ? mapping->writeback_index : 0;
590e9d9861f5f2 Yan, Zheng 2017-09-03 825 index = start_index;
1d3576fd10f0d7 Sage Weil 2009-10-06 826
1d3576fd10f0d7 Sage Weil 2009-10-06 827 retry:
1d3576fd10f0d7 Sage Weil 2009-10-06 828 /* find oldest snap context with dirty data */
05455e1177f768 Yan, Zheng 2017-09-02 829 snapc = get_oldest_context(inode, &ceph_wbc, NULL);
1d3576fd10f0d7 Sage Weil 2009-10-06 830 if (!snapc) {
1d3576fd10f0d7 Sage Weil 2009-10-06 831 /* hmm, why does writepages get called when there
1d3576fd10f0d7 Sage Weil 2009-10-06 832 is no dirty data? */
1d3576fd10f0d7 Sage Weil 2009-10-06 833 dout(" no snap context with dirty data?\n");
1d3576fd10f0d7 Sage Weil 2009-10-06 834 goto out;
1d3576fd10f0d7 Sage Weil 2009-10-06 835 }
1d3576fd10f0d7 Sage Weil 2009-10-06 836 dout(" oldest snapc is %p seq %lld (%d snaps)\n",
1d3576fd10f0d7 Sage Weil 2009-10-06 837 snapc, snapc->seq, snapc->num_snaps);
fc2744aa12da71 Yan, Zheng 2013-05-31 838
2a2d927e35dd8d Yan, Zheng 2017-09-01 839 should_loop = false;
2a2d927e35dd8d Yan, Zheng 2017-09-01 840 if (ceph_wbc.head_snapc && snapc != last_snapc) {
2a2d927e35dd8d Yan, Zheng 2017-09-01 841 /* where to start/end? */
2a2d927e35dd8d Yan, Zheng 2017-09-01 842 if (wbc->range_cyclic) {
2a2d927e35dd8d Yan, Zheng 2017-09-01 843 index = start_index;
2a2d927e35dd8d Yan, Zheng 2017-09-01 844 end = -1;
2a2d927e35dd8d Yan, Zheng 2017-09-01 845 if (index > 0)
2a2d927e35dd8d Yan, Zheng 2017-09-01 846 should_loop = true;
2a2d927e35dd8d Yan, Zheng 2017-09-01 847 dout(" cyclic, start at %lu\n", index);
2a2d927e35dd8d Yan, Zheng 2017-09-01 848 } else {
2a2d927e35dd8d Yan, Zheng 2017-09-01 849 index = wbc->range_start >> PAGE_SHIFT;
2a2d927e35dd8d Yan, Zheng 2017-09-01 850 end = wbc->range_end >> PAGE_SHIFT;
2a2d927e35dd8d Yan, Zheng 2017-09-01 851 if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
2a2d927e35dd8d Yan, Zheng 2017-09-01 852 range_whole = true;
2a2d927e35dd8d Yan, Zheng 2017-09-01 853 dout(" not cyclic, %lu to %lu\n", index, end);
2a2d927e35dd8d Yan, Zheng 2017-09-01 854 }
2a2d927e35dd8d Yan, Zheng 2017-09-01 855 } else if (!ceph_wbc.head_snapc) {
2a2d927e35dd8d Yan, Zheng 2017-09-01 856 /* Do not respect wbc->range_{start,end}. Dirty pages
2a2d927e35dd8d Yan, Zheng 2017-09-01 857 * in that range can be associated with newer snapc.
2a2d927e35dd8d Yan, Zheng 2017-09-01 858 * They are not writeable until we write all dirty pages
2a2d927e35dd8d Yan, Zheng 2017-09-01 859 * associated with 'snapc' get written */
1582af2eaaf17c Yan, Zheng 2018-03-06 860 if (index > 0)
2a2d927e35dd8d Yan, Zheng 2017-09-01 861 should_loop = true;
2a2d927e35dd8d Yan, Zheng 2017-09-01 862 dout(" non-head snapc, range whole\n");
1d3576fd10f0d7 Sage Weil 2009-10-06 863 }
2a2d927e35dd8d Yan, Zheng 2017-09-01 864
2a2d927e35dd8d Yan, Zheng 2017-09-01 865 ceph_put_snap_context(last_snapc);
1d3576fd10f0d7 Sage Weil 2009-10-06 866 last_snapc = snapc;
1d3576fd10f0d7 Sage Weil 2009-10-06 867
af9cc401ce7452 Yan, Zheng 2018-03-04 868 while (!done && index <= end) {
5b64640cf65be4 Yan, Zheng 2016-01-07 869 int num_ops = 0, op_idx;
0e5ecac7168366 Yan, Zheng 2017-08-31 870 unsigned i, pvec_pages, max_pages, locked_pages = 0;
5b64640cf65be4 Yan, Zheng 2016-01-07 871 struct page **pages = NULL, **data_pages;
1d3576fd10f0d7 Sage Weil 2009-10-06 872 struct page *page;
0e5ecac7168366 Yan, Zheng 2017-08-31 873 pgoff_t strip_unit_end = 0;
5b64640cf65be4 Yan, Zheng 2016-01-07 874 u64 offset = 0, len = 0;
a0102bda5bc099 Jeff Layton 2020-07-30 875 bool from_pool = false;
1d3576fd10f0d7 Sage Weil 2009-10-06 876
0e5ecac7168366 Yan, Zheng 2017-08-31 877 max_pages = wsize >> PAGE_SHIFT;
1d3576fd10f0d7 Sage Weil 2009-10-06 878
1d3576fd10f0d7 Sage Weil 2009-10-06 879 get_more_pages:
2e169296603470 Jeff Layton 2020-09-14 880 pvec_pages = pagevec_lookup_range_tag(&pvec, mapping, &index,
2e169296603470 Jeff Layton 2020-09-14 881 end, PAGECACHE_TAG_DIRTY);
0ed75fc8d288f4 Jan Kara 2017-11-15 882 dout("pagevec_lookup_range_tag got %d\n", pvec_pages);
1d3576fd10f0d7 Sage Weil 2009-10-06 883 if (!pvec_pages && !locked_pages)
1d3576fd10f0d7 Sage Weil 2009-10-06 884 break;
1d3576fd10f0d7 Sage Weil 2009-10-06 885 for (i = 0; i < pvec_pages && locked_pages < max_pages; i++) {
1d3576fd10f0d7 Sage Weil 2009-10-06 886 page = pvec.pages[i];
1d3576fd10f0d7 Sage Weil 2009-10-06 887 dout("? %p idx %lu\n", page, page->index);
1d3576fd10f0d7 Sage Weil 2009-10-06 888 if (locked_pages == 0)
1d3576fd10f0d7 Sage Weil 2009-10-06 889 lock_page(page); /* first page */
1d3576fd10f0d7 Sage Weil 2009-10-06 890 else if (!trylock_page(page))
1d3576fd10f0d7 Sage Weil 2009-10-06 891 break;
1d3576fd10f0d7 Sage Weil 2009-10-06 892
1d3576fd10f0d7 Sage Weil 2009-10-06 893 /* only dirty pages, or our accounting breaks */
1d3576fd10f0d7 Sage Weil 2009-10-06 894 if (unlikely(!PageDirty(page)) ||
1d3576fd10f0d7 Sage Weil 2009-10-06 895 unlikely(page->mapping != mapping)) {
1d3576fd10f0d7 Sage Weil 2009-10-06 896 dout("!dirty or !mapping %p\n", page);
1d3576fd10f0d7 Sage Weil 2009-10-06 897 unlock_page(page);
0713e5f24b7deb Yan, Zheng 2017-08-31 898 continue;
1d3576fd10f0d7 Sage Weil 2009-10-06 899 }
af9cc401ce7452 Yan, Zheng 2018-03-04 900 /* only if matching snap context */
af9cc401ce7452 Yan, Zheng 2018-03-04 901 pgsnapc = page_snap_context(page);
af9cc401ce7452 Yan, Zheng 2018-03-04 902 if (pgsnapc != snapc) {
af9cc401ce7452 Yan, Zheng 2018-03-04 903 dout("page snapc %p %lld != oldest %p %lld\n",
af9cc401ce7452 Yan, Zheng 2018-03-04 904 pgsnapc, pgsnapc->seq, snapc, snapc->seq);
1582af2eaaf17c Yan, Zheng 2018-03-06 905 if (!should_loop &&
1582af2eaaf17c Yan, Zheng 2018-03-06 906 !ceph_wbc.head_snapc &&
1582af2eaaf17c Yan, Zheng 2018-03-06 907 wbc->sync_mode != WB_SYNC_NONE)
1582af2eaaf17c Yan, Zheng 2018-03-06 908 should_loop = true;
1d3576fd10f0d7 Sage Weil 2009-10-06 909 unlock_page(page);
af9cc401ce7452 Yan, Zheng 2018-03-04 910 continue;
1d3576fd10f0d7 Sage Weil 2009-10-06 911 }
1f934b00e90752 Yan, Zheng 2017-08-30 912 if (page_offset(page) >= ceph_wbc.i_size) {
1f934b00e90752 Yan, Zheng 2017-08-30 913 dout("%p page eof %llu\n",
1f934b00e90752 Yan, Zheng 2017-08-30 914 page, ceph_wbc.i_size);
c95f1c5f436bad Erqi Chen 2019-07-24 915 if ((ceph_wbc.size_stable ||
c95f1c5f436bad Erqi Chen 2019-07-24 916 page_offset(page) >= i_size_read(inode)) &&
c95f1c5f436bad Erqi Chen 2019-07-24 917 clear_page_dirty_for_io(page))
af9cc401ce7452 Yan, Zheng 2018-03-04 918 mapping->a_ops->invalidatepage(page,
8ff2d290c8ce77 Jeff Layton 2021-04-05 919 0, thp_size(page));
af9cc401ce7452 Yan, Zheng 2018-03-04 920 unlock_page(page);
af9cc401ce7452 Yan, Zheng 2018-03-04 921 continue;
af9cc401ce7452 Yan, Zheng 2018-03-04 922 }
af9cc401ce7452 Yan, Zheng 2018-03-04 923 if (strip_unit_end && (page->index > strip_unit_end)) {
af9cc401ce7452 Yan, Zheng 2018-03-04 924 dout("end of strip unit %p\n", page);
1d3576fd10f0d7 Sage Weil 2009-10-06 925 unlock_page(page);
1d3576fd10f0d7 Sage Weil 2009-10-06 926 break;
1d3576fd10f0d7 Sage Weil 2009-10-06 927 }
1702e79734104d Jeff Layton 2021-12-07 928 if (PageWriteback(page) || PageFsCache(page)) {
0713e5f24b7deb Yan, Zheng 2017-08-31 929 if (wbc->sync_mode == WB_SYNC_NONE) {
1d3576fd10f0d7 Sage Weil 2009-10-06 930 dout("%p under writeback\n", page);
1d3576fd10f0d7 Sage Weil 2009-10-06 931 unlock_page(page);
0713e5f24b7deb Yan, Zheng 2017-08-31 932 continue;
0713e5f24b7deb Yan, Zheng 2017-08-31 933 }
0713e5f24b7deb Yan, Zheng 2017-08-31 934 dout("waiting on writeback %p\n", page);
0713e5f24b7deb Yan, Zheng 2017-08-31 935 wait_on_page_writeback(page);
1702e79734104d Jeff Layton 2021-12-07 936 wait_on_page_fscache(page);
1d3576fd10f0d7 Sage Weil 2009-10-06 937 }
1d3576fd10f0d7 Sage Weil 2009-10-06 938
1d3576fd10f0d7 Sage Weil 2009-10-06 939 if (!clear_page_dirty_for_io(page)) {
1d3576fd10f0d7 Sage Weil 2009-10-06 940 dout("%p !clear_page_dirty_for_io\n", page);
1d3576fd10f0d7 Sage Weil 2009-10-06 941 unlock_page(page);
0713e5f24b7deb Yan, Zheng 2017-08-31 942 continue;
1d3576fd10f0d7 Sage Weil 2009-10-06 943 }
1d3576fd10f0d7 Sage Weil 2009-10-06 944
e5975c7c8eb6ae Alex Elder 2013-03-14 945 /*
e5975c7c8eb6ae Alex Elder 2013-03-14 946 * We have something to write. If this is
e5975c7c8eb6ae Alex Elder 2013-03-14 947 * the first locked page this time through,
5b64640cf65be4 Yan, Zheng 2016-01-07 948 * calculate max possinle write size and
5b64640cf65be4 Yan, Zheng 2016-01-07 949 * allocate a page array
e5975c7c8eb6ae Alex Elder 2013-03-14 950 */
1d3576fd10f0d7 Sage Weil 2009-10-06 951 if (locked_pages == 0) {
5b64640cf65be4 Yan, Zheng 2016-01-07 952 u64 objnum;
5b64640cf65be4 Yan, Zheng 2016-01-07 953 u64 objoff;
dccbf08005df80 Ilya Dryomov 2018-02-17 954 u32 xlen;
5b64640cf65be4 Yan, Zheng 2016-01-07 955
1d3576fd10f0d7 Sage Weil 2009-10-06 956 /* prepare async write request */
6285bc23127741 Alex Elder 2012-10-02 957 offset = (u64)page_offset(page);
dccbf08005df80 Ilya Dryomov 2018-02-17 958 ceph_calc_file_object_mapping(&ci->i_layout,
dccbf08005df80 Ilya Dryomov 2018-02-17 959 offset, wsize,
5b64640cf65be4 Yan, Zheng 2016-01-07 960 &objnum, &objoff,
dccbf08005df80 Ilya Dryomov 2018-02-17 961 &xlen);
dccbf08005df80 Ilya Dryomov 2018-02-17 962 len = xlen;
8c71897be2ddfd Henry C Chang 2011-05-03 963
3fb99d483e614b Yanhu Cao 2017-07-21 964 num_ops = 1;
5b64640cf65be4 Yan, Zheng 2016-01-07 965 strip_unit_end = page->index +
09cbfeaf1a5a67 Kirill A. Shutemov 2016-04-01 966 ((len - 1) >> PAGE_SHIFT);
88486957f9fbf5 Alex Elder 2013-03-14 967
5b64640cf65be4 Yan, Zheng 2016-01-07 968 BUG_ON(pages);
88486957f9fbf5 Alex Elder 2013-03-14 969 max_pages = calc_pages_for(0, (u64)len);
6da2ec56059c3c Kees Cook 2018-06-12 970 pages = kmalloc_array(max_pages,
6da2ec56059c3c Kees Cook 2018-06-12 971 sizeof(*pages),
fc2744aa12da71 Yan, Zheng 2013-05-31 972 GFP_NOFS);
88486957f9fbf5 Alex Elder 2013-03-14 973 if (!pages) {
a0102bda5bc099 Jeff Layton 2020-07-30 974 from_pool = true;
a0102bda5bc099 Jeff Layton 2020-07-30 975 pages = mempool_alloc(ceph_wb_pagevec_pool, GFP_NOFS);
e5975c7c8eb6ae Alex Elder 2013-03-14 976 BUG_ON(!pages);
88486957f9fbf5 Alex Elder 2013-03-14 977 }
5b64640cf65be4 Yan, Zheng 2016-01-07 978
5b64640cf65be4 Yan, Zheng 2016-01-07 979 len = 0;
5b64640cf65be4 Yan, Zheng 2016-01-07 980 } else if (page->index !=
09cbfeaf1a5a67 Kirill A. Shutemov 2016-04-01 981 (offset + len) >> PAGE_SHIFT) {
a0102bda5bc099 Jeff Layton 2020-07-30 982 if (num_ops >= (from_pool ? CEPH_OSD_SLAB_OPS :
5b64640cf65be4 Yan, Zheng 2016-01-07 983 CEPH_OSD_MAX_OPS)) {
5b64640cf65be4 Yan, Zheng 2016-01-07 984 redirty_page_for_writepage(wbc, page);
5b64640cf65be4 Yan, Zheng 2016-01-07 985 unlock_page(page);
5b64640cf65be4 Yan, Zheng 2016-01-07 986 break;
5b64640cf65be4 Yan, Zheng 2016-01-07 987 }
5b64640cf65be4 Yan, Zheng 2016-01-07 988
5b64640cf65be4 Yan, Zheng 2016-01-07 989 num_ops++;
5b64640cf65be4 Yan, Zheng 2016-01-07 990 offset = (u64)page_offset(page);
5b64640cf65be4 Yan, Zheng 2016-01-07 991 len = 0;
1d3576fd10f0d7 Sage Weil 2009-10-06 992 }
1d3576fd10f0d7 Sage Weil 2009-10-06 993
1d3576fd10f0d7 Sage Weil 2009-10-06 994 /* note position of first page in pvec */
1d3576fd10f0d7 Sage Weil 2009-10-06 995 dout("%p will write page %p idx %lu\n",
1d3576fd10f0d7 Sage Weil 2009-10-06 996 inode, page, page->index);
2baba25019ec56 Yehuda Sadeh 2009-12-18 997
5b64640cf65be4 Yan, Zheng 2016-01-07 998 if (atomic_long_inc_return(&fsc->writeback_count) >
5b64640cf65be4 Yan, Zheng 2016-01-07 999 CONGESTION_ON_THRESH(
3d14c5d2b6e15c Yehuda Sadeh 2010-04-06 1000 fsc->mount_options->congestion_kb)) {
09dc9fc24ba714 Jan Kara 2017-04-12 1001 set_bdi_congested(inode_to_bdi(inode),
213c99ee0cf17f Sage Weil 2010-08-03 1002 BLK_RW_ASYNC);
2baba25019ec56 Yehuda Sadeh 2009-12-18 1003 }
2baba25019ec56 Yehuda Sadeh 2009-12-18 1004
0713e5f24b7deb Yan, Zheng 2017-08-31 1005
0713e5f24b7deb Yan, Zheng 2017-08-31 1006 pages[locked_pages++] = page;
0713e5f24b7deb Yan, Zheng 2017-08-31 1007 pvec.pages[i] = NULL;
0713e5f24b7deb Yan, Zheng 2017-08-31 1008
8ff2d290c8ce77 Jeff Layton 2021-04-05 1009 len += thp_size(page);
1d3576fd10f0d7 Sage Weil 2009-10-06 1010 }
1d3576fd10f0d7 Sage Weil 2009-10-06 1011
1d3576fd10f0d7 Sage Weil 2009-10-06 1012 /* did we get anything? */
1d3576fd10f0d7 Sage Weil 2009-10-06 1013 if (!locked_pages)
1d3576fd10f0d7 Sage Weil 2009-10-06 1014 goto release_pvec_pages;
1d3576fd10f0d7 Sage Weil 2009-10-06 1015 if (i) {
0713e5f24b7deb Yan, Zheng 2017-08-31 1016 unsigned j, n = 0;
0713e5f24b7deb Yan, Zheng 2017-08-31 1017 /* shift unused page to beginning of pvec */
0713e5f24b7deb Yan, Zheng 2017-08-31 1018 for (j = 0; j < pvec_pages; j++) {
0713e5f24b7deb Yan, Zheng 2017-08-31 1019 if (!pvec.pages[j])
0713e5f24b7deb Yan, Zheng 2017-08-31 1020 continue;
0713e5f24b7deb Yan, Zheng 2017-08-31 1021 if (n < j)
0713e5f24b7deb Yan, Zheng 2017-08-31 1022 pvec.pages[n] = pvec.pages[j];
0713e5f24b7deb Yan, Zheng 2017-08-31 1023 n++;
0713e5f24b7deb Yan, Zheng 2017-08-31 1024 }
0713e5f24b7deb Yan, Zheng 2017-08-31 1025 pvec.nr = n;
1d3576fd10f0d7 Sage Weil 2009-10-06 1026
1d3576fd10f0d7 Sage Weil 2009-10-06 1027 if (pvec_pages && i == pvec_pages &&
1d3576fd10f0d7 Sage Weil 2009-10-06 1028 locked_pages < max_pages) {
1d3576fd10f0d7 Sage Weil 2009-10-06 1029 dout("reached end pvec, trying for more\n");
0713e5f24b7deb Yan, Zheng 2017-08-31 1030 pagevec_release(&pvec);
1d3576fd10f0d7 Sage Weil 2009-10-06 1031 goto get_more_pages;
1d3576fd10f0d7 Sage Weil 2009-10-06 1032 }
1d3576fd10f0d7 Sage Weil 2009-10-06 1033 }
1d3576fd10f0d7 Sage Weil 2009-10-06 1034
5b64640cf65be4 Yan, Zheng 2016-01-07 1035 new_request:
e5975c7c8eb6ae Alex Elder 2013-03-14 1036 offset = page_offset(pages[0]);
5b64640cf65be4 Yan, Zheng 2016-01-07 1037 len = wsize;
5b64640cf65be4 Yan, Zheng 2016-01-07 1038
5b64640cf65be4 Yan, Zheng 2016-01-07 1039 req = ceph_osdc_new_request(&fsc->client->osdc,
5b64640cf65be4 Yan, Zheng 2016-01-07 1040 &ci->i_layout, vino,
5b64640cf65be4 Yan, Zheng 2016-01-07 1041 offset, &len, 0, num_ops,
1f934b00e90752 Yan, Zheng 2017-08-30 1042 CEPH_OSD_OP_WRITE, CEPH_OSD_FLAG_WRITE,
1f934b00e90752 Yan, Zheng 2017-08-30 1043 snapc, ceph_wbc.truncate_seq,
1f934b00e90752 Yan, Zheng 2017-08-30 1044 ceph_wbc.truncate_size, false);
5b64640cf65be4 Yan, Zheng 2016-01-07 1045 if (IS_ERR(req)) {
5b64640cf65be4 Yan, Zheng 2016-01-07 1046 req = ceph_osdc_new_request(&fsc->client->osdc,
5b64640cf65be4 Yan, Zheng 2016-01-07 1047 &ci->i_layout, vino,
5b64640cf65be4 Yan, Zheng 2016-01-07 1048 offset, &len, 0,
5b64640cf65be4 Yan, Zheng 2016-01-07 1049 min(num_ops,
5b64640cf65be4 Yan, Zheng 2016-01-07 1050 CEPH_OSD_SLAB_OPS),
5b64640cf65be4 Yan, Zheng 2016-01-07 1051 CEPH_OSD_OP_WRITE,
54ea0046b6fe36 Ilya Dryomov 2017-02-11 1052 CEPH_OSD_FLAG_WRITE,
1f934b00e90752 Yan, Zheng 2017-08-30 1053 snapc, ceph_wbc.truncate_seq,
1f934b00e90752 Yan, Zheng 2017-08-30 1054 ceph_wbc.truncate_size, true);
5b64640cf65be4 Yan, Zheng 2016-01-07 1055 BUG_ON(IS_ERR(req));
5b64640cf65be4 Yan, Zheng 2016-01-07 1056 }
5b64640cf65be4 Yan, Zheng 2016-01-07 1057 BUG_ON(len < page_offset(pages[locked_pages - 1]) +
8ff2d290c8ce77 Jeff Layton 2021-04-05 1058 thp_size(page) - offset);
5b64640cf65be4 Yan, Zheng 2016-01-07 1059
5b64640cf65be4 Yan, Zheng 2016-01-07 1060 req->r_callback = writepages_finish;
5b64640cf65be4 Yan, Zheng 2016-01-07 1061 req->r_inode = inode;
5b64640cf65be4 Yan, Zheng 2016-01-07 1062
5b64640cf65be4 Yan, Zheng 2016-01-07 1063 /* Format the osd request message and submit the write */
5b64640cf65be4 Yan, Zheng 2016-01-07 1064 len = 0;
5b64640cf65be4 Yan, Zheng 2016-01-07 1065 data_pages = pages;
5b64640cf65be4 Yan, Zheng 2016-01-07 1066 op_idx = 0;
5b64640cf65be4 Yan, Zheng 2016-01-07 1067 for (i = 0; i < locked_pages; i++) {
5b64640cf65be4 Yan, Zheng 2016-01-07 1068 u64 cur_offset = page_offset(pages[i]);
1702e79734104d Jeff Layton 2021-12-07 1069 /*
1702e79734104d Jeff Layton 2021-12-07 1070 * Discontinuity in page range? Ceph can handle that by just passing
1702e79734104d Jeff Layton 2021-12-07 1071 * multiple extents in the write op.
1702e79734104d Jeff Layton 2021-12-07 1072 */
5b64640cf65be4 Yan, Zheng 2016-01-07 1073 if (offset + len != cur_offset) {
1702e79734104d Jeff Layton 2021-12-07 1074 /* If it's full, stop here */
3fb99d483e614b Yanhu Cao 2017-07-21 1075 if (op_idx + 1 == req->r_num_ops)
5b64640cf65be4 Yan, Zheng 2016-01-07 1076 break;
1702e79734104d Jeff Layton 2021-12-07 1077
1702e79734104d Jeff Layton 2021-12-07 1078 /* Kick off an fscache write with what we have so far. */
1702e79734104d Jeff Layton 2021-12-07 1079 ceph_fscache_write_to_cache(inode, offset, len, caching);
1702e79734104d Jeff Layton 2021-12-07 1080
1702e79734104d Jeff Layton 2021-12-07 1081 /* Start a new extent */
5b64640cf65be4 Yan, Zheng 2016-01-07 1082 osd_req_op_extent_dup_last(req, op_idx,
5b64640cf65be4 Yan, Zheng 2016-01-07 1083 cur_offset - offset);
5b64640cf65be4 Yan, Zheng 2016-01-07 1084 dout("writepages got pages at %llu~%llu\n",
5b64640cf65be4 Yan, Zheng 2016-01-07 1085 offset, len);
5b64640cf65be4 Yan, Zheng 2016-01-07 1086 osd_req_op_extent_osd_data_pages(req, op_idx,
5b64640cf65be4 Yan, Zheng 2016-01-07 1087 data_pages, len, 0,
a0102bda5bc099 Jeff Layton 2020-07-30 1088 from_pool, false);
5b64640cf65be4 Yan, Zheng 2016-01-07 1089 osd_req_op_extent_update(req, op_idx, len);
5b64640cf65be4 Yan, Zheng 2016-01-07 1090
5b64640cf65be4 Yan, Zheng 2016-01-07 1091 len = 0;
5b64640cf65be4 Yan, Zheng 2016-01-07 1092 offset = cur_offset;
5b64640cf65be4 Yan, Zheng 2016-01-07 1093 data_pages = pages + i;
5b64640cf65be4 Yan, Zheng 2016-01-07 1094 op_idx++;
5b64640cf65be4 Yan, Zheng 2016-01-07 1095 }
5b64640cf65be4 Yan, Zheng 2016-01-07 1096
5b64640cf65be4 Yan, Zheng 2016-01-07 1097 set_page_writeback(pages[i]);
1702e79734104d Jeff Layton 2021-12-07 1098 if (caching)
1702e79734104d Jeff Layton 2021-12-07 1099 ceph_set_page_fscache(pages[i]);
8ff2d290c8ce77 Jeff Layton 2021-04-05 1100 len += thp_size(page);
5b64640cf65be4 Yan, Zheng 2016-01-07 1101 }
1702e79734104d Jeff Layton 2021-12-07 1102 ceph_fscache_write_to_cache(inode, offset, len, caching);
5b64640cf65be4 Yan, Zheng 2016-01-07 1103
1f934b00e90752 Yan, Zheng 2017-08-30 1104 if (ceph_wbc.size_stable) {
1f934b00e90752 Yan, Zheng 2017-08-30 1105 len = min(len, ceph_wbc.i_size - offset);
5b64640cf65be4 Yan, Zheng 2016-01-07 1106 } else if (i == locked_pages) {
e1966b49446a43 Yan, Zheng 2015-06-18 1107 /* writepages_finish() clears writeback pages
e1966b49446a43 Yan, Zheng 2015-06-18 1108 * according to the data length, so make sure
e1966b49446a43 Yan, Zheng 2015-06-18 1109 * data length covers all locked pages */
8ff2d290c8ce77 Jeff Layton 2021-04-05 1110 u64 min_len = len + 1 - thp_size(page);
1f934b00e90752 Yan, Zheng 2017-08-30 1111 len = get_writepages_data_length(inode, pages[i - 1],
1f934b00e90752 Yan, Zheng 2017-08-30 1112 offset);
5b64640cf65be4 Yan, Zheng 2016-01-07 1113 len = max(len, min_len);
e1966b49446a43 Yan, Zheng 2015-06-18 1114 }
5b64640cf65be4 Yan, Zheng 2016-01-07 1115 dout("writepages got pages at %llu~%llu\n", offset, len);
1d3576fd10f0d7 Sage Weil 2009-10-06 1116
5b64640cf65be4 Yan, Zheng 2016-01-07 1117 osd_req_op_extent_osd_data_pages(req, op_idx, data_pages, len,
a0102bda5bc099 Jeff Layton 2020-07-30 1118 0, from_pool, false);
5b64640cf65be4 Yan, Zheng 2016-01-07 1119 osd_req_op_extent_update(req, op_idx, len);
e5975c7c8eb6ae Alex Elder 2013-03-14 1120
5b64640cf65be4 Yan, Zheng 2016-01-07 1121 BUG_ON(op_idx + 1 != req->r_num_ops);
e5975c7c8eb6ae Alex Elder 2013-03-14 1122
a0102bda5bc099 Jeff Layton 2020-07-30 1123 from_pool = false;
5b64640cf65be4 Yan, Zheng 2016-01-07 1124 if (i < locked_pages) {
5b64640cf65be4 Yan, Zheng 2016-01-07 1125 BUG_ON(num_ops <= req->r_num_ops);
5b64640cf65be4 Yan, Zheng 2016-01-07 1126 num_ops -= req->r_num_ops;
5b64640cf65be4 Yan, Zheng 2016-01-07 1127 locked_pages -= i;
5b64640cf65be4 Yan, Zheng 2016-01-07 1128
5b64640cf65be4 Yan, Zheng 2016-01-07 1129 /* allocate new pages array for next request */
5b64640cf65be4 Yan, Zheng 2016-01-07 1130 data_pages = pages;
6da2ec56059c3c Kees Cook 2018-06-12 1131 pages = kmalloc_array(locked_pages, sizeof(*pages),
5b64640cf65be4 Yan, Zheng 2016-01-07 1132 GFP_NOFS);
5b64640cf65be4 Yan, Zheng 2016-01-07 1133 if (!pages) {
a0102bda5bc099 Jeff Layton 2020-07-30 1134 from_pool = true;
a0102bda5bc099 Jeff Layton 2020-07-30 1135 pages = mempool_alloc(ceph_wb_pagevec_pool, GFP_NOFS);
5b64640cf65be4 Yan, Zheng 2016-01-07 1136 BUG_ON(!pages);
5b64640cf65be4 Yan, Zheng 2016-01-07 1137 }
5b64640cf65be4 Yan, Zheng 2016-01-07 1138 memcpy(pages, data_pages + i,
5b64640cf65be4 Yan, Zheng 2016-01-07 1139 locked_pages * sizeof(*pages));
5b64640cf65be4 Yan, Zheng 2016-01-07 1140 memset(data_pages + i, 0,
5b64640cf65be4 Yan, Zheng 2016-01-07 1141 locked_pages * sizeof(*pages));
5b64640cf65be4 Yan, Zheng 2016-01-07 1142 } else {
5b64640cf65be4 Yan, Zheng 2016-01-07 1143 BUG_ON(num_ops != req->r_num_ops);
5b64640cf65be4 Yan, Zheng 2016-01-07 1144 index = pages[i - 1]->index + 1;
5b64640cf65be4 Yan, Zheng 2016-01-07 1145 /* request message now owns the pages array */
5b64640cf65be4 Yan, Zheng 2016-01-07 1146 pages = NULL;
5b64640cf65be4 Yan, Zheng 2016-01-07 1147 }
e5975c7c8eb6ae Alex Elder 2013-03-14 1148
fac02ddf910814 Arnd Bergmann 2018-07-13 1149 req->r_mtime = inode->i_mtime;
9d6fcb081a4770 Sage Weil 2011-05-12 1150 rc = ceph_osdc_start_request(&fsc->client->osdc, req, true);
9d6fcb081a4770 Sage Weil 2011-05-12 1151 BUG_ON(rc);
1d3576fd10f0d7 Sage Weil 2009-10-06 1152 req = NULL;
1d3576fd10f0d7 Sage Weil 2009-10-06 1153
5b64640cf65be4 Yan, Zheng 2016-01-07 1154 wbc->nr_to_write -= i;
5b64640cf65be4 Yan, Zheng 2016-01-07 1155 if (pages)
5b64640cf65be4 Yan, Zheng 2016-01-07 1156 goto new_request;
5b64640cf65be4 Yan, Zheng 2016-01-07 1157
2a2d927e35dd8d Yan, Zheng 2017-09-01 1158 /*
2a2d927e35dd8d Yan, Zheng 2017-09-01 1159 * We stop writing back only if we are not doing
2a2d927e35dd8d Yan, Zheng 2017-09-01 1160 * integrity sync. In case of integrity sync we have to
2a2d927e35dd8d Yan, Zheng 2017-09-01 1161 * keep going until we have written all the pages
2a2d927e35dd8d Yan, Zheng 2017-09-01 1162 * we tagged for writeback prior to entering this loop.
2a2d927e35dd8d Yan, Zheng 2017-09-01 1163 */
2a2d927e35dd8d Yan, Zheng 2017-09-01 1164 if (wbc->nr_to_write <= 0 && wbc->sync_mode == WB_SYNC_NONE)
af9cc401ce7452 Yan, Zheng 2018-03-04 1165 done = true;
1d3576fd10f0d7 Sage Weil 2009-10-06 1166
1d3576fd10f0d7 Sage Weil 2009-10-06 1167 release_pvec_pages:
1d3576fd10f0d7 Sage Weil 2009-10-06 1168 dout("pagevec_release on %d pages (%p)\n", (int)pvec.nr,
1d3576fd10f0d7 Sage Weil 2009-10-06 1169 pvec.nr ? pvec.pages[0] : NULL);
1d3576fd10f0d7 Sage Weil 2009-10-06 1170 pagevec_release(&pvec);
1d3576fd10f0d7 Sage Weil 2009-10-06 1171 }
1d3576fd10f0d7 Sage Weil 2009-10-06 1172
1d3576fd10f0d7 Sage Weil 2009-10-06 1173 if (should_loop && !done) {
1d3576fd10f0d7 Sage Weil 2009-10-06 1174 /* more to do; loop back to beginning of file */
1d3576fd10f0d7 Sage Weil 2009-10-06 1175 dout("writepages looping back to beginning of file\n");
2a2d927e35dd8d Yan, Zheng 2017-09-01 1176 end = start_index - 1; /* OK even when start_index == 0 */
f275635ee0b664 Yan, Zheng 2017-09-01 1177
f275635ee0b664 Yan, Zheng 2017-09-01 1178 /* to write dirty pages associated with next snapc,
f275635ee0b664 Yan, Zheng 2017-09-01 1179 * we need to wait until current writes complete */
f275635ee0b664 Yan, Zheng 2017-09-01 1180 if (wbc->sync_mode != WB_SYNC_NONE &&
f275635ee0b664 Yan, Zheng 2017-09-01 1181 start_index == 0 && /* all dirty pages were checked */
f275635ee0b664 Yan, Zheng 2017-09-01 1182 !ceph_wbc.head_snapc) {
f275635ee0b664 Yan, Zheng 2017-09-01 1183 struct page *page;
f275635ee0b664 Yan, Zheng 2017-09-01 1184 unsigned i, nr;
f275635ee0b664 Yan, Zheng 2017-09-01 1185 index = 0;
f275635ee0b664 Yan, Zheng 2017-09-01 1186 while ((index <= end) &&
f275635ee0b664 Yan, Zheng 2017-09-01 1187 (nr = pagevec_lookup_tag(&pvec, mapping, &index,
67fd707f468142 Jan Kara 2017-11-15 1188 PAGECACHE_TAG_WRITEBACK))) {
f275635ee0b664 Yan, Zheng 2017-09-01 1189 for (i = 0; i < nr; i++) {
f275635ee0b664 Yan, Zheng 2017-09-01 1190 page = pvec.pages[i];
f275635ee0b664 Yan, Zheng 2017-09-01 1191 if (page_snap_context(page) != snapc)
f275635ee0b664 Yan, Zheng 2017-09-01 1192 continue;
f275635ee0b664 Yan, Zheng 2017-09-01 1193 wait_on_page_writeback(page);
f275635ee0b664 Yan, Zheng 2017-09-01 1194 }
f275635ee0b664 Yan, Zheng 2017-09-01 1195 pagevec_release(&pvec);
f275635ee0b664 Yan, Zheng 2017-09-01 1196 cond_resched();
f275635ee0b664 Yan, Zheng 2017-09-01 1197 }
f275635ee0b664 Yan, Zheng 2017-09-01 1198 }
f275635ee0b664 Yan, Zheng 2017-09-01 1199
2a2d927e35dd8d Yan, Zheng 2017-09-01 1200 start_index = 0;
1d3576fd10f0d7 Sage Weil 2009-10-06 1201 index = 0;
1d3576fd10f0d7 Sage Weil 2009-10-06 1202 goto retry;
1d3576fd10f0d7 Sage Weil 2009-10-06 1203 }
1d3576fd10f0d7 Sage Weil 2009-10-06 1204
1d3576fd10f0d7 Sage Weil 2009-10-06 1205 if (wbc->range_cyclic || (range_whole && wbc->nr_to_write > 0))
1d3576fd10f0d7 Sage Weil 2009-10-06 1206 mapping->writeback_index = index;
1d3576fd10f0d7 Sage Weil 2009-10-06 1207
1d3576fd10f0d7 Sage Weil 2009-10-06 1208 out:
1d3576fd10f0d7 Sage Weil 2009-10-06 1209 ceph_osdc_put_request(req);
2a2d927e35dd8d Yan, Zheng 2017-09-01 1210 ceph_put_snap_context(last_snapc);
2a2d927e35dd8d Yan, Zheng 2017-09-01 1211 dout("writepages dend - startone, rc = %d\n", rc);
1d3576fd10f0d7 Sage Weil 2009-10-06 1212 return rc;
1d3576fd10f0d7 Sage Weil 2009-10-06 1213 }
1d3576fd10f0d7 Sage Weil 2009-10-06 1214
:::::: The code at line 788 was first introduced by commit
:::::: 1d3576fd10f0d7a104204267b81cf84a07028dad ceph: address space operations
:::::: TO: Sage Weil <sage(a)newdream.net>
:::::: CC: Sage Weil <sage(a)newdream.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[intel-lts:5.10/yocto 10621/20393] drivers/media/v4l2-core/v4l2-subdev.c:908:5: warning: stack frame size (1392) exceeds limit (1024) in 'v4l2_subdev_link_validate'
by kernel test robot
Hi Wanhui,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: 2dafc777a64181d42982628c7f5907a03da5f070
commit: f13978177f8c57c155d53df5f2df60f519e82e4a [10621/20393] v4l: subdev: Add support for sub-streams
config: arm-imx_v4_v5_defconfig (https://download.01.org/0day-ci/archive/20220210/202202102146.b4WAHQie-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project aa845d7a245d85c441d0bd44fc7b6c3be8f3de8d)
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
# https://github.com/intel/linux-intel-lts/commit/f13978177f8c57c155d53df5f...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/yocto
git checkout f13978177f8c57c155d53df5f2df60f519e82e4a
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/media/v4l2-core/ drivers/video/fbdev/core/
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 >>):
In file included from drivers/media/v4l2-core/v4l2-subdev.c:16:
In file included from include/linux/videodev2.h:61:
include/uapi/linux/videodev2.h:1757:2: warning: field within 'struct v4l2_ext_control' is less aligned than 'union v4l2_ext_control::(anonymous at include/uapi/linux/videodev2.h:1757:2)' and is usually due to 'struct v4l2_ext_control' being packed, which can lead to unaligned accesses [-Wunaligned-access]
union {
^
>> drivers/media/v4l2-core/v4l2-subdev.c:908:5: warning: stack frame size (1392) exceeds limit (1024) in 'v4l2_subdev_link_validate' [-Wframe-larger-than]
int v4l2_subdev_link_validate(struct media_link *link)
^
2 warnings generated.
vim +/v4l2_subdev_link_validate +908 drivers/media/v4l2-core/v4l2-subdev.c
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 907
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 @908 int v4l2_subdev_link_validate(struct media_link *link)
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 909 {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 910 struct v4l2_subdev *sink;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 911 struct v4l2_subdev_route sink_routes[LINK_VALIDATE_ROUTES];
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 912 struct v4l2_subdev_routing sink_routing = {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 913 .routes = sink_routes,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 914 .num_routes = ARRAY_SIZE(sink_routes),
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 915 };
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 916 struct v4l2_subdev_route src_routes[LINK_VALIDATE_ROUTES];
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 917 struct v4l2_subdev_routing src_routing = {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 918 .routes = src_routes,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 919 .num_routes = ARRAY_SIZE(src_routes),
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 920 };
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 921 unsigned int i, j;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 922 int rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 923
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 924 sink = media_entity_to_v4l2_subdev(link->sink->entity);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 925 if (!sink)
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 926 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 927
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 928 if (!(link->sink->flags & MEDIA_PAD_FL_MULTIPLEX &&
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 929 link->source->flags & MEDIA_PAD_FL_MULTIPLEX))
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 930 return v4l2_subdev_link_validate_one(link, link->source, 0,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 931 link->sink, 0);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 932 /*
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 933 * multiplex link cannot proceed without route information.
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 934 */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 935 rval = v4l2_subdev_call(sink, pad, get_routing, &sink_routing);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 936 if (rval) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 937 dev_err(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 938 "error %d in get_routing() on %s, sink pad %u\n", rval,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 939 sink->entity.name, link->sink->index);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 940
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 941 return rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 942 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 943
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 944 rval = v4l2_subdev_call(media_entity_to_v4l2_subdev(
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 945 link->source->entity),
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 946 pad, get_routing, &src_routing);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 947 if (rval) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 948 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 949 "error %d in get_routing() on %s, source pad %u\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 950 rval, sink->entity.name, link->source->index);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 951
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 952 return rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 953 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 954
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 955 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 956 "validating multiplexed link \"%s\":%u -> \"%s\":%u; %u/%u routes\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 957 link->source->entity->name, link->source->index,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 958 sink->entity.name, link->sink->index,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 959 src_routing.num_routes, sink_routing.num_routes);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 960
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 961 for (i = 0; i < sink_routing.num_routes; i++) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 962 /* Get the first active route for the sink pad. */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 963 if (sink_routes[i].sink_pad != link->sink->index ||
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 964 !(sink_routes[i].flags & V4L2_SUBDEV_ROUTE_FL_ACTIVE)) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 965 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 966 "skipping sink route %u/%u -> %u/%u[%u]\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 967 sink_routes[i].sink_pad,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 968 sink_routes[i].sink_stream,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 969 sink_routes[i].source_pad,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 970 sink_routes[i].source_stream,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 971 (bool)(sink_routes[i].flags
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 972 & V4L2_SUBDEV_ROUTE_FL_ACTIVE));
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 973 continue;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 974 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 975
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 976 /*
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 977 * Get the corresponding route for the source pad.
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 978 * It's ok for the source pad to have routes active
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 979 * where the sink pad does not, but the routes that
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 980 * are active on the source pad have to be active on
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 981 * the sink pad as well.
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 982 */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 983
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 984 for (j = 0; j < src_routing.num_routes; j++) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 985 if (src_routes[j].source_pad == link->source->index &&
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 986 src_routes[j].source_stream
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 987 == sink_routes[i].sink_stream)
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 988 break;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 989 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 990
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 991 if (j == src_routing.num_routes) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 992 dev_err(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 993 "no corresponding source found.\n");
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 994 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 995 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 996
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 997 /* The source route must be active. */
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 998 if (!(src_routes[j].flags & V4L2_SUBDEV_ROUTE_FL_ACTIVE)) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 999 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1000 "source route not active\n");
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1001 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1002 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1003
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1004 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1005 "validating link \"%s\": %u/%u => \"%s\" %u/%u\n",
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1006 link->source->entity->name, src_routes[j].source_pad,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1007 src_routes[j].source_stream, sink->entity.name,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1008 sink_routes[i].sink_pad, sink_routes[i].sink_stream);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1009
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1010 rval = v4l2_subdev_link_validate_one(
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1011 link, link->source, src_routes[j].source_stream,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1012 link->sink, sink_routes[i].sink_stream);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1013 if (rval) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1014 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1015 "error %d in link validation\n", rval);
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1016 return rval;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1017 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1018 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1019
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1020 if (i < sink_routing.num_routes) {
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1021 dev_dbg(sink->entity.graph_obj.mdev->dev,
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1022 "not all sink routes verified; out of source routes\n");
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1023 return -EINVAL;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1024 }
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1025
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1026 return 0;
e822d33e27dd00 drivers/media/v4l2-core/v4l2-subdev.c wu xia 2016-06-13 1027 }
8227c92b696884 drivers/media/video/v4l2-subdev.c Sakari Ailus 2011-10-10 1028 EXPORT_SYMBOL_GPL(v4l2_subdev_link_validate);
9b02cbb3ede89b drivers/media/v4l2-core/v4l2-subdev.c Laurent Pinchart 2015-04-24 1029
:::::: The code at line 908 was first introduced by commit
:::::: e822d33e27dd00bb200f0e9db1811231554ce03c v4l: Take routing info into account in link validation
:::::: TO: wu xia <xia.wu(a)intel.com>
:::::: CC: Pan, Kris <kris.pan(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week