lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201905241215.6LmEiDaJ%lkp@intel.com>
Date:   Fri, 24 May 2019 12:10:24 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>
Subject: drivers/net//ethernet/hisilicon/hns/hns_dsaf_main.c:2597:1: warning:
 the frame size of 10976 bytes is larger than 8192 bytes

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4dde821e4296e156d133b98ddc4c45861935a4fb
commit: 81a56f6dcd20325607d6008f4bb560c96f4c821a gcc-plugins: structleak: Generalize to all variable types
date:   3 months ago
config: s390-allmodconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 81a56f6dcd20325607d6008f4bb560c96f4c821a
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/net//ethernet/hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_get_regs':
>> drivers/net//ethernet/hisilicon/hns/hns_dsaf_main.c:2597:1: warning: the frame size of 10976 bytes is larger than 8192 bytes [-Wframe-larger-than=]
    }
    ^
--
   drivers/net//ethernet/hisilicon/hns/hns_dsaf_xgmac.c: In function 'hns_xgmac_get_regs':
>> drivers/net//ethernet/hisilicon/hns/hns_dsaf_xgmac.c:736:1: warning: the frame size of 9080 bytes is larger than 8192 bytes [-Wframe-larger-than=]
    }
    ^

vim +2597 drivers/net//ethernet/hisilicon/hns/hns_dsaf_main.c

511e6bc0 huangdaode   2015-09-17  2265  
511e6bc0 huangdaode   2015-09-17  2266  /**
511e6bc0 huangdaode   2015-09-17  2267   *hns_dsaf_get_regs - dump dsaf regs
511e6bc0 huangdaode   2015-09-17  2268   *@...f_dev: dsaf device
511e6bc0 huangdaode   2015-09-17  2269   *@...a:data for value of regs
511e6bc0 huangdaode   2015-09-17  2270   */
511e6bc0 huangdaode   2015-09-17  2271  void hns_dsaf_get_regs(struct dsaf_device *ddev, u32 port, void *data)
511e6bc0 huangdaode   2015-09-17  2272  {
511e6bc0 huangdaode   2015-09-17  2273  	u32 i = 0;
511e6bc0 huangdaode   2015-09-17  2274  	u32 j;
511e6bc0 huangdaode   2015-09-17  2275  	u32 *p = data;
5ada37b5 Lisheng      2016-03-31  2276  	u32 reg_tmp;
5ada37b5 Lisheng      2016-03-31  2277  	bool is_ver1 = AE_IS_VER1(ddev->dsaf_ver);
511e6bc0 huangdaode   2015-09-17  2278  
511e6bc0 huangdaode   2015-09-17  2279  	/* dsaf common registers */
511e6bc0 huangdaode   2015-09-17  2280  	p[0] = dsaf_read_dev(ddev, DSAF_SRAM_INIT_OVER_0_REG);
511e6bc0 huangdaode   2015-09-17  2281  	p[1] = dsaf_read_dev(ddev, DSAF_CFG_0_REG);
511e6bc0 huangdaode   2015-09-17  2282  	p[2] = dsaf_read_dev(ddev, DSAF_ECC_ERR_INVERT_0_REG);
511e6bc0 huangdaode   2015-09-17  2283  	p[3] = dsaf_read_dev(ddev, DSAF_ABNORMAL_TIMEOUT_0_REG);
511e6bc0 huangdaode   2015-09-17  2284  	p[4] = dsaf_read_dev(ddev, DSAF_FSM_TIMEOUT_0_REG);
511e6bc0 huangdaode   2015-09-17  2285  	p[5] = dsaf_read_dev(ddev, DSAF_DSA_REG_CNT_CLR_CE_REG);
511e6bc0 huangdaode   2015-09-17  2286  	p[6] = dsaf_read_dev(ddev, DSAF_DSA_SBM_INF_FIFO_THRD_REG);
511e6bc0 huangdaode   2015-09-17  2287  	p[7] = dsaf_read_dev(ddev, DSAF_DSA_SRAM_1BIT_ECC_SEL_REG);
511e6bc0 huangdaode   2015-09-17  2288  	p[8] = dsaf_read_dev(ddev, DSAF_DSA_SRAM_1BIT_ECC_CNT_REG);
511e6bc0 huangdaode   2015-09-17  2289  
511e6bc0 huangdaode   2015-09-17  2290  	p[9] = dsaf_read_dev(ddev, DSAF_PFC_EN_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2291  	p[10] = dsaf_read_dev(ddev, DSAF_PFC_UNIT_CNT_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2292  	p[11] = dsaf_read_dev(ddev, DSAF_XGE_INT_MSK_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2293  	p[12] = dsaf_read_dev(ddev, DSAF_XGE_INT_SRC_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2294  	p[13] = dsaf_read_dev(ddev, DSAF_XGE_INT_STS_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2295  	p[14] = dsaf_read_dev(ddev, DSAF_XGE_INT_MSK_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2296  	p[15] = dsaf_read_dev(ddev, DSAF_PPE_INT_MSK_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2297  	p[16] = dsaf_read_dev(ddev, DSAF_ROCEE_INT_MSK_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2298  	p[17] = dsaf_read_dev(ddev, DSAF_XGE_INT_SRC_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2299  	p[18] = dsaf_read_dev(ddev, DSAF_PPE_INT_SRC_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2300  	p[19] =  dsaf_read_dev(ddev, DSAF_ROCEE_INT_SRC_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2301  	p[20] = dsaf_read_dev(ddev, DSAF_XGE_INT_STS_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2302  	p[21] = dsaf_read_dev(ddev, DSAF_PPE_INT_STS_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2303  	p[22] = dsaf_read_dev(ddev, DSAF_ROCEE_INT_STS_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2304  	p[23] = dsaf_read_dev(ddev, DSAF_PPE_QID_CFG_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2305  
511e6bc0 huangdaode   2015-09-17  2306  	for (i = 0; i < DSAF_SW_PORT_NUM; i++)
511e6bc0 huangdaode   2015-09-17  2307  		p[24 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2308  				DSAF_SW_PORT_TYPE_0_REG + i * 4);
511e6bc0 huangdaode   2015-09-17  2309  
511e6bc0 huangdaode   2015-09-17  2310  	p[32] = dsaf_read_dev(ddev, DSAF_MIX_DEF_QID_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2311  
511e6bc0 huangdaode   2015-09-17  2312  	for (i = 0; i < DSAF_SW_PORT_NUM; i++)
511e6bc0 huangdaode   2015-09-17  2313  		p[33 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2314  				DSAF_PORT_DEF_VLAN_0_REG + i * 4);
511e6bc0 huangdaode   2015-09-17  2315  
511e6bc0 huangdaode   2015-09-17  2316  	for (i = 0; i < DSAF_TOTAL_QUEUE_NUM; i++)
511e6bc0 huangdaode   2015-09-17  2317  		p[41 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2318  				DSAF_VM_DEF_VLAN_0_REG + i * 4);
511e6bc0 huangdaode   2015-09-17  2319  
511e6bc0 huangdaode   2015-09-17  2320  	/* dsaf inode registers */
511e6bc0 huangdaode   2015-09-17  2321  	p[170] = dsaf_read_dev(ddev, DSAF_INODE_CUT_THROUGH_CFG_0_REG);
511e6bc0 huangdaode   2015-09-17  2322  
511e6bc0 huangdaode   2015-09-17  2323  	p[171] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2324  			DSAF_INODE_ECC_ERR_ADDR_0_REG + port * 0x80);
511e6bc0 huangdaode   2015-09-17  2325  
511e6bc0 huangdaode   2015-09-17  2326  	for (i = 0; i < DSAF_INODE_NUM / DSAF_COMM_CHN; i++) {
511e6bc0 huangdaode   2015-09-17  2327  		j = i * DSAF_COMM_CHN + port;
511e6bc0 huangdaode   2015-09-17  2328  		p[172 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2329  				DSAF_INODE_IN_PORT_NUM_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2330  		p[175 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2331  				DSAF_INODE_PRI_TC_CFG_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2332  		p[178 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2333  				DSAF_INODE_BP_STATUS_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2334  		p[181 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2335  				DSAF_INODE_PAD_DISCARD_NUM_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2336  		p[184 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2337  				DSAF_INODE_FINAL_IN_MAN_NUM_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2338  		p[187 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2339  				DSAF_INODE_FINAL_IN_PKT_NUM_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2340  		p[190 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2341  				DSAF_INODE_SBM_PID_NUM_0_REG + j * 0x80);
5ada37b5 Lisheng      2016-03-31  2342  		reg_tmp = is_ver1 ? DSAF_INODE_FINAL_IN_PAUSE_NUM_0_REG :
5ada37b5 Lisheng      2016-03-31  2343  				    DSAFV2_INODE_FINAL_IN_PAUSE_NUM_0_REG;
5ada37b5 Lisheng      2016-03-31  2344  		p[193 + i] = dsaf_read_dev(ddev, reg_tmp + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2345  		p[196 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2346  				DSAF_INODE_SBM_RELS_NUM_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2347  		p[199 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2348  				DSAF_INODE_SBM_DROP_NUM_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2349  		p[202 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2350  				DSAF_INODE_CRC_FALSE_NUM_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2351  		p[205 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2352  				DSAF_INODE_BP_DISCARD_NUM_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2353  		p[208 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2354  				DSAF_INODE_RSLT_DISCARD_NUM_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2355  		p[211 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2356  			DSAF_INODE_LOCAL_ADDR_FALSE_NUM_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2357  		p[214 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2358  				DSAF_INODE_VOQ_OVER_NUM_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2359  		p[217 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2360  				DSAF_INODE_BD_SAVE_STATUS_0_REG + j * 4);
511e6bc0 huangdaode   2015-09-17  2361  		p[220 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2362  				DSAF_INODE_BD_ORDER_STATUS_0_REG + j * 4);
511e6bc0 huangdaode   2015-09-17  2363  		p[223 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2364  				DSAF_INODE_SW_VLAN_TAG_DISC_0_REG + j * 4);
4ad26f11 Yonglong Liu 2018-12-15  2365  		p[226 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2366  				DSAF_INODE_IN_DATA_STP_DISC_0_REG + j * 4);
511e6bc0 huangdaode   2015-09-17  2367  	}
511e6bc0 huangdaode   2015-09-17  2368  
4ad26f11 Yonglong Liu 2018-12-15  2369  	p[229] = dsaf_read_dev(ddev, DSAF_INODE_GE_FC_EN_0_REG + port * 4);
511e6bc0 huangdaode   2015-09-17  2370  
511e6bc0 huangdaode   2015-09-17  2371  	for (i = 0; i < DSAF_INODE_NUM / DSAF_COMM_CHN; i++) {
511e6bc0 huangdaode   2015-09-17  2372  		j = i * DSAF_COMM_CHN + port;
4ad26f11 Yonglong Liu 2018-12-15  2373  		p[230 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2374  				DSAF_INODE_VC0_IN_PKT_NUM_0_REG + j * 4);
511e6bc0 huangdaode   2015-09-17  2375  	}
511e6bc0 huangdaode   2015-09-17  2376  
4ad26f11 Yonglong Liu 2018-12-15  2377  	p[233] = dsaf_read_dev(ddev,
4ad26f11 Yonglong Liu 2018-12-15  2378  		DSAF_INODE_VC1_IN_PKT_NUM_0_REG + port * 0x80);
511e6bc0 huangdaode   2015-09-17  2379  
511e6bc0 huangdaode   2015-09-17  2380  	/* dsaf inode registers */
13ac695e Salil        2015-12-03  2381  	for (i = 0; i < HNS_DSAF_SBM_NUM(ddev) / DSAF_COMM_CHN; i++) {
511e6bc0 huangdaode   2015-09-17  2382  		j = i * DSAF_COMM_CHN + port;
4ad26f11 Yonglong Liu 2018-12-15  2383  		p[234 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2384  				DSAF_SBM_CFG_REG_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2385  		p[237 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2386  				DSAF_SBM_BP_CFG_0_XGE_REG_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2387  		p[240 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2388  				DSAF_SBM_BP_CFG_1_REG_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2389  		p[243 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2390  				DSAF_SBM_BP_CFG_2_XGE_REG_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2391  		p[246 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2392  				DSAF_SBM_FREE_CNT_0_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2393  		p[249 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2394  				DSAF_SBM_FREE_CNT_1_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2395  		p[252 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2396  				DSAF_SBM_BP_CNT_0_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2397  		p[255 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2398  				DSAF_SBM_BP_CNT_1_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2399  		p[258 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2400  				DSAF_SBM_BP_CNT_2_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2401  		p[261 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2402  				DSAF_SBM_BP_CNT_3_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2403  		p[264 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2404  				DSAF_SBM_INER_ST_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2405  		p[267 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2406  				DSAF_SBM_MIB_REQ_FAILED_TC_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2407  		p[270 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2408  				DSAF_SBM_LNK_INPORT_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2409  		p[273 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2410  				DSAF_SBM_LNK_DROP_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2411  		p[276 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2412  				DSAF_SBM_INF_OUTPORT_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2413  		p[279 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2414  				DSAF_SBM_LNK_INPORT_TC0_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2415  		p[282 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2416  				DSAF_SBM_LNK_INPORT_TC1_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2417  		p[285 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2418  				DSAF_SBM_LNK_INPORT_TC2_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2419  		p[288 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2420  				DSAF_SBM_LNK_INPORT_TC3_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2421  		p[291 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2422  				DSAF_SBM_LNK_INPORT_TC4_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2423  		p[294 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2424  				DSAF_SBM_LNK_INPORT_TC5_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2425  		p[297 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2426  				DSAF_SBM_LNK_INPORT_TC6_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2427  		p[300 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2428  				DSAF_SBM_LNK_INPORT_TC7_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2429  		p[303 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2430  				DSAF_SBM_LNK_REQ_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2431  		p[306 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2432  				DSAF_SBM_LNK_RELS_CNT_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2433  		p[309 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2434  				DSAF_SBM_BP_CFG_3_REG_0_REG + j * 0x80);
4ad26f11 Yonglong Liu 2018-12-15  2435  		p[312 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2436  				DSAF_SBM_BP_CFG_4_REG_0_REG + j * 0x80);
511e6bc0 huangdaode   2015-09-17  2437  	}
511e6bc0 huangdaode   2015-09-17  2438  
511e6bc0 huangdaode   2015-09-17  2439  	/* dsaf onode registers */
511e6bc0 huangdaode   2015-09-17  2440  	for (i = 0; i < DSAF_XOD_NUM; i++) {
4ad26f11 Yonglong Liu 2018-12-15  2441  		p[315 + i] = dsaf_read_dev(ddev,
52613126 Qianqian Xie 2016-03-24  2442  				DSAF_XOD_ETS_TSA_TC0_TC3_CFG_0_REG + i * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2443  		p[323 + i] = dsaf_read_dev(ddev,
52613126 Qianqian Xie 2016-03-24  2444  				DSAF_XOD_ETS_TSA_TC4_TC7_CFG_0_REG + i * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2445  		p[331 + i] = dsaf_read_dev(ddev,
52613126 Qianqian Xie 2016-03-24  2446  				DSAF_XOD_ETS_BW_TC0_TC3_CFG_0_REG + i * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2447  		p[339 + i] = dsaf_read_dev(ddev,
52613126 Qianqian Xie 2016-03-24  2448  				DSAF_XOD_ETS_BW_TC4_TC7_CFG_0_REG + i * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2449  		p[347 + i] = dsaf_read_dev(ddev,
52613126 Qianqian Xie 2016-03-24  2450  				DSAF_XOD_ETS_BW_OFFSET_CFG_0_REG + i * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2451  		p[355 + i] = dsaf_read_dev(ddev,
52613126 Qianqian Xie 2016-03-24  2452  				DSAF_XOD_ETS_TOKEN_CFG_0_REG + i * 0x90);
511e6bc0 huangdaode   2015-09-17  2453  	}
511e6bc0 huangdaode   2015-09-17  2454  
4ad26f11 Yonglong Liu 2018-12-15  2455  	p[363] = dsaf_read_dev(ddev, DSAF_XOD_PFS_CFG_0_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2456  	p[364] = dsaf_read_dev(ddev, DSAF_XOD_PFS_CFG_1_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2457  	p[365] = dsaf_read_dev(ddev, DSAF_XOD_PFS_CFG_2_0_REG + port * 0x90);
511e6bc0 huangdaode   2015-09-17  2458  
511e6bc0 huangdaode   2015-09-17  2459  	for (i = 0; i < DSAF_XOD_BIG_NUM / DSAF_COMM_CHN; i++) {
511e6bc0 huangdaode   2015-09-17  2460  		j = i * DSAF_COMM_CHN + port;
4ad26f11 Yonglong Liu 2018-12-15  2461  		p[366 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2462  				DSAF_XOD_GNT_L_0_REG + j * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2463  		p[369 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2464  				DSAF_XOD_GNT_H_0_REG + j * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2465  		p[372 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2466  				DSAF_XOD_CONNECT_STATE_0_REG + j * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2467  		p[375 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2468  				DSAF_XOD_RCVPKT_CNT_0_REG + j * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2469  		p[378 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2470  				DSAF_XOD_RCVTC0_CNT_0_REG + j * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2471  		p[381 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2472  				DSAF_XOD_RCVTC1_CNT_0_REG + j * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2473  		p[384 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2474  				DSAF_XOD_RCVTC2_CNT_0_REG + j * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2475  		p[387 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2476  				DSAF_XOD_RCVTC3_CNT_0_REG + j * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2477  		p[390 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2478  				DSAF_XOD_RCVVC0_CNT_0_REG + j * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2479  		p[393 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2480  				DSAF_XOD_RCVVC1_CNT_0_REG + j * 0x90);
511e6bc0 huangdaode   2015-09-17  2481  	}
511e6bc0 huangdaode   2015-09-17  2482  
4ad26f11 Yonglong Liu 2018-12-15  2483  	p[396] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2484  		DSAF_XOD_XGE_RCVIN0_CNT_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2485  	p[397] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2486  		DSAF_XOD_XGE_RCVIN1_CNT_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2487  	p[398] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2488  		DSAF_XOD_XGE_RCVIN2_CNT_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2489  	p[399] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2490  		DSAF_XOD_XGE_RCVIN3_CNT_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2491  	p[400] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2492  		DSAF_XOD_XGE_RCVIN4_CNT_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2493  	p[401] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2494  		DSAF_XOD_XGE_RCVIN5_CNT_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2495  	p[402] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2496  		DSAF_XOD_XGE_RCVIN6_CNT_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2497  	p[403] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2498  		DSAF_XOD_XGE_RCVIN7_CNT_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2499  	p[404] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2500  		DSAF_XOD_PPE_RCVIN0_CNT_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2501  	p[405] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2502  		DSAF_XOD_PPE_RCVIN1_CNT_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2503  	p[406] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2504  		DSAF_XOD_ROCEE_RCVIN0_CNT_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2505  	p[407] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2506  		DSAF_XOD_ROCEE_RCVIN1_CNT_0_REG + port * 0x90);
4ad26f11 Yonglong Liu 2018-12-15  2507  	p[408] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2508  		DSAF_XOD_FIFO_STATUS_0_REG + port * 0x90);
511e6bc0 huangdaode   2015-09-17  2509  
511e6bc0 huangdaode   2015-09-17  2510  	/* dsaf voq registers */
511e6bc0 huangdaode   2015-09-17  2511  	for (i = 0; i < DSAF_VOQ_NUM / DSAF_COMM_CHN; i++) {
511e6bc0 huangdaode   2015-09-17  2512  		j = (i * DSAF_COMM_CHN + port) * 0x90;
4ad26f11 Yonglong Liu 2018-12-15  2513  		p[409 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2514  			DSAF_VOQ_ECC_INVERT_EN_0_REG + j);
4ad26f11 Yonglong Liu 2018-12-15  2515  		p[412 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2516  			DSAF_VOQ_SRAM_PKT_NUM_0_REG + j);
4ad26f11 Yonglong Liu 2018-12-15  2517  		p[415 + i] = dsaf_read_dev(ddev, DSAF_VOQ_IN_PKT_NUM_0_REG + j);
4ad26f11 Yonglong Liu 2018-12-15  2518  		p[418 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2519  			DSAF_VOQ_OUT_PKT_NUM_0_REG + j);
4ad26f11 Yonglong Liu 2018-12-15  2520  		p[421 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2521  			DSAF_VOQ_ECC_ERR_ADDR_0_REG + j);
4ad26f11 Yonglong Liu 2018-12-15  2522  		p[424 + i] = dsaf_read_dev(ddev, DSAF_VOQ_BP_STATUS_0_REG + j);
4ad26f11 Yonglong Liu 2018-12-15  2523  		p[427 + i] = dsaf_read_dev(ddev, DSAF_VOQ_SPUP_IDLE_0_REG + j);
4ad26f11 Yonglong Liu 2018-12-15  2524  		p[430 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2525  			DSAF_VOQ_XGE_XOD_REQ_0_0_REG + j);
4ad26f11 Yonglong Liu 2018-12-15  2526  		p[433 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2527  			DSAF_VOQ_XGE_XOD_REQ_1_0_REG + j);
4ad26f11 Yonglong Liu 2018-12-15  2528  		p[436 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2529  			DSAF_VOQ_PPE_XOD_REQ_0_REG + j);
4ad26f11 Yonglong Liu 2018-12-15  2530  		p[439 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2531  			DSAF_VOQ_ROCEE_XOD_REQ_0_REG + j);
4ad26f11 Yonglong Liu 2018-12-15  2532  		p[442 + i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2533  			DSAF_VOQ_BP_ALL_THRD_0_REG + j);
511e6bc0 huangdaode   2015-09-17  2534  	}
511e6bc0 huangdaode   2015-09-17  2535  
511e6bc0 huangdaode   2015-09-17  2536  	/* dsaf tbl registers */
4ad26f11 Yonglong Liu 2018-12-15  2537  	p[445] = dsaf_read_dev(ddev, DSAF_TBL_CTRL_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2538  	p[446] = dsaf_read_dev(ddev, DSAF_TBL_INT_MSK_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2539  	p[447] = dsaf_read_dev(ddev, DSAF_TBL_INT_SRC_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2540  	p[448] = dsaf_read_dev(ddev, DSAF_TBL_INT_STS_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2541  	p[449] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_ADDR_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2542  	p[450] = dsaf_read_dev(ddev, DSAF_TBL_LINE_ADDR_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2543  	p[451] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_HIGH_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2544  	p[452] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_LOW_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2545  	p[453] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_4_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2546  	p[454] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_3_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2547  	p[455] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_2_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2548  	p[456] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_1_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2549  	p[457] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_MCAST_CFG_0_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2550  	p[458] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_UCAST_CFG_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2551  	p[459] = dsaf_read_dev(ddev, DSAF_TBL_LIN_CFG_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2552  	p[460] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RDATA_HIGH_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2553  	p[461] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RDATA_LOW_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2554  	p[462] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA4_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2555  	p[463] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA3_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2556  	p[464] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA2_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2557  	p[465] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA1_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2558  	p[466] = dsaf_read_dev(ddev, DSAF_TBL_TCAM_RAM_RDATA0_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2559  	p[467] = dsaf_read_dev(ddev, DSAF_TBL_LIN_RDATA_0_REG);
511e6bc0 huangdaode   2015-09-17  2560  
511e6bc0 huangdaode   2015-09-17  2561  	for (i = 0; i < DSAF_SW_PORT_NUM; i++) {
511e6bc0 huangdaode   2015-09-17  2562  		j = i * 0x8;
4ad26f11 Yonglong Liu 2018-12-15  2563  		p[468 + 2 * i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2564  			DSAF_TBL_DA0_MIS_INFO1_0_REG + j);
4ad26f11 Yonglong Liu 2018-12-15  2565  		p[469 + 2 * i] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2566  			DSAF_TBL_DA0_MIS_INFO0_0_REG + j);
511e6bc0 huangdaode   2015-09-17  2567  	}
511e6bc0 huangdaode   2015-09-17  2568  
4ad26f11 Yonglong Liu 2018-12-15  2569  	p[484] = dsaf_read_dev(ddev, DSAF_TBL_SA_MIS_INFO2_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2570  	p[485] = dsaf_read_dev(ddev, DSAF_TBL_SA_MIS_INFO1_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2571  	p[486] = dsaf_read_dev(ddev, DSAF_TBL_SA_MIS_INFO0_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2572  	p[487] = dsaf_read_dev(ddev, DSAF_TBL_PUL_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2573  	p[488] = dsaf_read_dev(ddev, DSAF_TBL_OLD_RSLT_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2574  	p[489] = dsaf_read_dev(ddev, DSAF_TBL_OLD_SCAN_VAL_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2575  	p[490] = dsaf_read_dev(ddev, DSAF_TBL_DFX_CTRL_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2576  	p[491] = dsaf_read_dev(ddev, DSAF_TBL_DFX_STAT_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2577  	p[492] = dsaf_read_dev(ddev, DSAF_TBL_DFX_STAT_2_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2578  	p[493] = dsaf_read_dev(ddev, DSAF_TBL_LKUP_NUM_I_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2579  	p[494] = dsaf_read_dev(ddev, DSAF_TBL_LKUP_NUM_O_0_REG);
4ad26f11 Yonglong Liu 2018-12-15  2580  	p[495] = dsaf_read_dev(ddev, DSAF_TBL_UCAST_BCAST_MIS_INFO_0_0_REG);
511e6bc0 huangdaode   2015-09-17  2581  
511e6bc0 huangdaode   2015-09-17  2582  	/* dsaf other registers */
4ad26f11 Yonglong Liu 2018-12-15  2583  	p[496] = dsaf_read_dev(ddev, DSAF_INODE_FIFO_WL_0_REG + port * 0x4);
4ad26f11 Yonglong Liu 2018-12-15  2584  	p[497] = dsaf_read_dev(ddev, DSAF_ONODE_FIFO_WL_0_REG + port * 0x4);
4ad26f11 Yonglong Liu 2018-12-15  2585  	p[498] = dsaf_read_dev(ddev, DSAF_XGE_GE_WORK_MODE_0_REG + port * 0x4);
4ad26f11 Yonglong Liu 2018-12-15  2586  	p[499] = dsaf_read_dev(ddev,
511e6bc0 huangdaode   2015-09-17  2587  		DSAF_XGE_APP_RX_LINK_UP_0_REG + port * 0x4);
4ad26f11 Yonglong Liu 2018-12-15  2588  	p[500] = dsaf_read_dev(ddev, DSAF_NETPORT_CTRL_SIG_0_REG + port * 0x4);
4ad26f11 Yonglong Liu 2018-12-15  2589  	p[501] = dsaf_read_dev(ddev, DSAF_XGE_CTRL_SIG_CFG_0_REG + port * 0x4);
511e6bc0 huangdaode   2015-09-17  2590  
5ada37b5 Lisheng      2016-03-31  2591  	if (!is_ver1)
4ad26f11 Yonglong Liu 2018-12-15  2592  		p[502] = dsaf_read_dev(ddev, DSAF_PAUSE_CFG_REG + port * 0x4);
5ada37b5 Lisheng      2016-03-31  2593  
511e6bc0 huangdaode   2015-09-17  2594  	/* mark end of dsaf regs */
4ad26f11 Yonglong Liu 2018-12-15  2595  	for (i = 503; i < 504; i++)
511e6bc0 huangdaode   2015-09-17  2596  		p[i] = 0xdddddddd;
511e6bc0 huangdaode   2015-09-17 @2597  }
511e6bc0 huangdaode   2015-09-17  2598  

:::::: The code at line 2597 was first introduced by commit
:::::: 511e6bc071db1484d1a3d1d0bd4c244cf33910ff net: add Hisilicon Network Subsystem DSAF support

:::::: TO: huangdaode <huangdaode@...ilicon.com>
:::::: CC: David S. Miller <davem@...emloft.net>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ