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: <202209120522.AOuxSu1o-lkp@intel.com>
Date:   Mon, 12 Sep 2022 05:20:28 +0800
From:   kernel test robot <lkp@...el.com>
To:     Claudiu Beznea <claudiu.beznea@...rochip.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Sasha Levin <sashal@...nel.org>
Subject: [linux-stable-rc:queue/5.15 62/102] arch/arm/mach-at91/pm.c:370:38:
 error: use of undeclared identifier 'DDR3PHY_ZQ0SR0'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git queue/5.15
head:   58b6ddd0dfd470c48feef1d58e9151373f59e315
commit: 4e1102de88e91852e109ab98731f9cd1f0c7286f [62/102] ARM: at91: pm: fix DDR recalibration when resuming from backup and self-refresh
config: arm-multi_v5_defconfig (https://download.01.org/0day-ci/archive/20220912/202209120522.AOuxSu1o-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 1546df49f5a6d09df78f569e4137ddb365a3e827)
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://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=4e1102de88e91852e109ab98731f9cd1f0c7286f
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc queue/5.15
        git checkout 4e1102de88e91852e109ab98731f9cd1f0c7286f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> arch/arm/mach-at91/pm.c:370:38: error: use of undeclared identifier 'DDR3PHY_ZQ0SR0'
                   tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
                                                      ^
>> arch/arm/mach-at91/pm.c:373:19: error: use of undeclared identifier 'DDR3PHY_ZQ0SR0_PDO_OFF'
                   index = (tmp >> DDR3PHY_ZQ0SR0_PDO_OFF) & 0x1f;
                                   ^
>> arch/arm/mach-at91/pm.c:377:19: error: use of undeclared identifier 'DDR3PHY_ZQ0SR0_PUO_OFF'
                   index = (tmp >> DDR3PHY_ZQ0SR0_PUO_OFF) & 0x1f;
                                   ^
>> arch/arm/mach-at91/pm.c:381:19: error: use of undeclared identifier 'DDR3PHY_ZQ0SR0_PDODT_OFF'
                   index = (tmp >> DDR3PHY_ZQ0SR0_PDODT_OFF) & 0x1f;
                                   ^
>> arch/arm/mach-at91/pm.c:385:19: error: use of undeclared identifier 'DDR3PHY_ZQ0SRO_PUODT_OFF'
                   index = (tmp >> DDR3PHY_ZQ0SRO_PUODT_OFF) & 0x1f;
                                   ^
   5 errors generated.


vim +/DDR3PHY_ZQ0SR0 +370 arch/arm/mach-at91/pm.c

   350	
   351	static int at91_suspend_finish(unsigned long val)
   352	{
   353		unsigned char modified_gray_code[] = {
   354			0x00, 0x01, 0x02, 0x03, 0x06, 0x07, 0x04, 0x05, 0x0c, 0x0d,
   355			0x0e, 0x0f, 0x0a, 0x0b, 0x08, 0x09, 0x18, 0x19, 0x1a, 0x1b,
   356			0x1e, 0x1f, 0x1c, 0x1d, 0x14, 0x15, 0x16, 0x17, 0x12, 0x13,
   357			0x10, 0x11,
   358		};
   359		unsigned int tmp, index;
   360		int i;
   361	
   362		if (soc_pm.data.mode == AT91_PM_BACKUP && soc_pm.data.ramc_phy) {
   363			/*
   364			 * Bootloader will perform DDR recalibration and will try to
   365			 * restore the ZQ0SR0 with the value saved here. But the
   366			 * calibration is buggy and restoring some values from ZQ0SR0
   367			 * is forbidden and risky thus we need to provide processed
   368			 * values for these (modified gray code values).
   369			 */
 > 370			tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
   371	
   372			/* Store pull-down output impedance select. */
 > 373			index = (tmp >> DDR3PHY_ZQ0SR0_PDO_OFF) & 0x1f;
   374			soc_pm.bu->ddr_phy_calibration[0] = modified_gray_code[index];
   375	
   376			/* Store pull-up output impedance select. */
 > 377			index = (tmp >> DDR3PHY_ZQ0SR0_PUO_OFF) & 0x1f;
   378			soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
   379	
   380			/* Store pull-down on-die termination impedance select. */
 > 381			index = (tmp >> DDR3PHY_ZQ0SR0_PDODT_OFF) & 0x1f;
   382			soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
   383	
   384			/* Store pull-up on-die termination impedance select. */
 > 385			index = (tmp >> DDR3PHY_ZQ0SRO_PUODT_OFF) & 0x1f;
   386			soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
   387	
   388			/*
   389			 * The 1st 8 words of memory might get corrupted in the process
   390			 * of DDR PHY recalibration; it is saved here in securam and it
   391			 * will be restored later, after recalibration, by bootloader
   392			 */
   393			for (i = 1; i < BACKUP_DDR_PHY_CALIBRATION; i++)
   394				soc_pm.bu->ddr_phy_calibration[i] =
   395					*((unsigned int *)soc_pm.memcs + (i - 1));
   396		}
   397	
   398		flush_cache_all();
   399		outer_disable();
   400	
   401		at91_suspend_sram_fn(&soc_pm.data);
   402	
   403		return 0;
   404	}
   405	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ