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: <202207011105.yOohE2qe-lkp@intel.com>
Date:   Fri, 1 Jul 2022 12:04:10 +0800
From:   kernel test robot <lkp@...el.com>
To:     Oded Gabbay <ogabbay@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [ogabbay:habanalabs-next 52/61]
 drivers/misc/habanalabs/gaudi2/gaudi2.c:1821: undefined reference to
 `__udivdi3'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git habanalabs-next
head:   5e0af3d63d4c6ac96a1190a5c888796a6b599f83
commit: 349d6e1f6e46812a35bf57c9917cccbb31ba5a1a [52/61] habanalabs: add gaudi2 asic-specific code
config: m68k-randconfig-r021-20220629 (https://download.01.org/0day-ci/archive/20220701/202207011105.yOohE2qe-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/?id=349d6e1f6e46812a35bf57c9917cccbb31ba5a1a
        git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
        git fetch --no-tags ogabbay habanalabs-next
        git checkout 349d6e1f6e46812a35bf57c9917cccbb31ba5a1a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=m68k 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 >>):

   m68k-linux-ld: drivers/misc/habanalabs/gaudi2/gaudi2.o: in function `gaudi2_set_dram_properties':
>> drivers/misc/habanalabs/gaudi2/gaudi2.c:1821: undefined reference to `__udivdi3'


vim +1821 drivers/misc/habanalabs/gaudi2/gaudi2.c

  1774	
  1775	static int gaudi2_set_dram_properties(struct hl_device *hdev)
  1776	{
  1777		struct asic_fixed_properties *prop = &hdev->asic_prop;
  1778		u32 basic_hbm_page_size;
  1779		int rc;
  1780	
  1781		rc = set_number_of_functional_hbms(hdev);
  1782		if (rc)
  1783			return -EINVAL;
  1784	
  1785		/*
  1786		 * Due to HW bug in which TLB size is x16 smaller than expected we use a workaround
  1787		 * in which we are using x16 bigger page size to be able to populate the entire
  1788		 * HBM mappings in the TLB
  1789		 */
  1790		basic_hbm_page_size = prop->num_functional_hbms * SZ_8M;
  1791		prop->dram_page_size = GAUDI2_COMPENSATE_TLB_PAGE_SIZE_FACTOR * basic_hbm_page_size;
  1792		prop->device_mem_alloc_default_page_size = prop->dram_page_size;
  1793		prop->dram_size = prop->num_functional_hbms * SZ_16G;
  1794		prop->dram_base_address = DRAM_PHYS_BASE;
  1795		prop->dram_end_address = prop->dram_base_address + prop->dram_size;
  1796		prop->dram_supports_virtual_memory = true;
  1797	
  1798		prop->dram_user_base_address = DRAM_PHYS_BASE + prop->dram_page_size;
  1799		prop->dram_hints_align_mask = ~GAUDI2_HBM_MMU_SCRM_ADDRESS_MASK;
  1800		prop->hints_dram_reserved_va_range.start_addr = RESERVED_VA_RANGE_FOR_ARC_ON_HBM_START;
  1801		prop->hints_dram_reserved_va_range.end_addr = RESERVED_VA_RANGE_FOR_ARC_ON_HBM_END;
  1802	
  1803		/* since DRAM page size differs from dmmu page size we need to allocate
  1804		 * DRAM memory in units of dram_page size and mapping this memory in
  1805		 * units of DMMU page size. we overcome this size mismatch using a
  1806		 * scarmbling routine which takes a DRAM page and converts it to a DMMU
  1807		 * page.
  1808		 * We therefore:
  1809		 * 1. partition the virtual address space to DRAM-page (whole) pages.
  1810		 *    (suppose we get n such pages)
  1811		 * 2. limit the amount of virtual address space we got from 1 above to
  1812		 *    a multiple of 64M as we don't want the scrambled address to cross
  1813		 *    the DRAM virtual address space.
  1814		 *    ( m = (n * DRAM_page_size) / DMMU_page_size).
  1815		 * 3. determine the and address accordingly
  1816		 *    end_addr = start_addr + m * 48M
  1817		 *
  1818		 *    the DRAM address MSBs (63:48) are not part of the roundup calculation
  1819		 */
  1820		prop->dmmu.start_addr = prop->dram_base_address +
> 1821				roundup(prop->dram_size, prop->dram_page_size);
  1822	
  1823		prop->dmmu.end_addr = prop->dmmu.start_addr + prop->dram_page_size *
  1824				div_u64((VA_HBM_SPACE_END - prop->dmmu.start_addr), prop->dmmu.page_size);
  1825	
  1826		return 0;
  1827	}
  1828	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ