[linux-next:master 13957/14602] drivers/iio/common/scmi_sensors/scmi_iio.c:70:4: error: couldn't allocate output register for constraint 'x'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Stephen,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   c457d9676496f5a895509f9c510278beaaffc829
commit: e64512824389f78a7b15766c2500731f4d7a4615 [13957/14602] Merge remote-tracking branch 'mips/mips-next'
config: mips-randconfig-r024-20210422 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f5446b769a7929806f72256fccd4826d66502e59)
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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e64512824389f78a7b15766c2500731f4d7a4615
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout e64512824389f78a7b15766c2500731f4d7a4615
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/iio/common/scmi_sensors/scmi_iio.c:70:4: error: couldn't allocate output register for constraint 'x'
                           do_div(time, int_pow(10, abs(tstamp_scale)));
                           ^
   include/asm-generic/div64.h:245:11: note: expanded from macro 'do_div'
                   __rem = __div64_32(&(n), __base);       \
                           ^
   arch/mips/include/asm/div64.h:76:11: note: expanded from macro '__div64_32'
                   __asm__("divu   $0, %z1, %z2"                           \
                           ^
   drivers/iio/common/scmi_sensors/scmi_iio.c:163:2: error: couldn't allocate output register for constraint 'x'
           do_div(sec, uHz);
           ^
   include/asm-generic/div64.h:245:11: note: expanded from macro 'do_div'
                   __rem = __div64_32(&(n), __base);       \
                           ^
   arch/mips/include/asm/div64.h:76:11: note: expanded from macro '__div64_32'
                   __asm__("divu   $0, %z1, %z2"                           \
                           ^
   drivers/iio/common/scmi_sensors/scmi_iio.c:243:2: error: couldn't allocate output register for constraint 'x'
           do_div(*uhz, interval_ns);
           ^
   include/asm-generic/div64.h:245:11: note: expanded from macro 'do_div'
                   __rem = __div64_32(&(n), __base);       \
                           ^
   arch/mips/include/asm/div64.h:76:11: note: expanded from macro '__div64_32'
                   __asm__("divu   $0, %z1, %z2"                           \
                           ^
   3 errors generated.


vim +70 drivers/iio/common/scmi_sensors/scmi_iio.c

f774117c96f94c Jyoti Bhayana 2021-03-09  34  
f774117c96f94c Jyoti Bhayana 2021-03-09  35  static int scmi_iio_sensor_update_cb(struct notifier_block *nb,
f774117c96f94c Jyoti Bhayana 2021-03-09  36  				     unsigned long event, void *data)
f774117c96f94c Jyoti Bhayana 2021-03-09  37  {
f774117c96f94c Jyoti Bhayana 2021-03-09  38  	struct scmi_sensor_update_report *sensor_update = data;
f774117c96f94c Jyoti Bhayana 2021-03-09  39  	struct iio_dev *scmi_iio_dev;
f774117c96f94c Jyoti Bhayana 2021-03-09  40  	struct scmi_iio_priv *sensor;
f774117c96f94c Jyoti Bhayana 2021-03-09  41  	s8 tstamp_scale;
f774117c96f94c Jyoti Bhayana 2021-03-09  42  	u64 time, time_ns;
f774117c96f94c Jyoti Bhayana 2021-03-09  43  	int i;
f774117c96f94c Jyoti Bhayana 2021-03-09  44  
f774117c96f94c Jyoti Bhayana 2021-03-09  45  	if (sensor_update->readings_count == 0)
f774117c96f94c Jyoti Bhayana 2021-03-09  46  		return NOTIFY_DONE;
f774117c96f94c Jyoti Bhayana 2021-03-09  47  
f774117c96f94c Jyoti Bhayana 2021-03-09  48  	sensor = container_of(nb, struct scmi_iio_priv, sensor_update_nb);
f774117c96f94c Jyoti Bhayana 2021-03-09  49  
f774117c96f94c Jyoti Bhayana 2021-03-09  50  	for (i = 0; i < sensor_update->readings_count; i++)
f774117c96f94c Jyoti Bhayana 2021-03-09  51  		sensor->iio_buf[i] = sensor_update->readings[i].value;
f774117c96f94c Jyoti Bhayana 2021-03-09  52  
f774117c96f94c Jyoti Bhayana 2021-03-09  53  	if (!sensor->sensor_info->timestamped) {
f774117c96f94c Jyoti Bhayana 2021-03-09  54  		time_ns = ktime_to_ns(sensor_update->timestamp);
f774117c96f94c Jyoti Bhayana 2021-03-09  55  	} else {
f774117c96f94c Jyoti Bhayana 2021-03-09  56  		/*
f774117c96f94c Jyoti Bhayana 2021-03-09  57  		 *  All the axes are supposed to have the same value for timestamp.
f774117c96f94c Jyoti Bhayana 2021-03-09  58  		 *  We are just using the values from the Axis 0 here.
f774117c96f94c Jyoti Bhayana 2021-03-09  59  		 */
f774117c96f94c Jyoti Bhayana 2021-03-09  60  		time = sensor_update->readings[0].timestamp;
f774117c96f94c Jyoti Bhayana 2021-03-09  61  
f774117c96f94c Jyoti Bhayana 2021-03-09  62  		/*
f774117c96f94c Jyoti Bhayana 2021-03-09  63  		 *  Timestamp returned by SCMI is in seconds and is equal to
f774117c96f94c Jyoti Bhayana 2021-03-09  64  		 *  time * power-of-10 multiplier(tstamp_scale) seconds.
f774117c96f94c Jyoti Bhayana 2021-03-09  65  		 *  Converting the timestamp to nanoseconds below.
f774117c96f94c Jyoti Bhayana 2021-03-09  66  		 */
f774117c96f94c Jyoti Bhayana 2021-03-09  67  		tstamp_scale = sensor->sensor_info->tstamp_scale +
f774117c96f94c Jyoti Bhayana 2021-03-09  68  			       const_ilog2(NSEC_PER_SEC) / const_ilog2(10);
f774117c96f94c Jyoti Bhayana 2021-03-09  69  		if (tstamp_scale < 0) {
f774117c96f94c Jyoti Bhayana 2021-03-09 @70  			do_div(time, int_pow(10, abs(tstamp_scale)));
f774117c96f94c Jyoti Bhayana 2021-03-09  71  			time_ns = time;
f774117c96f94c Jyoti Bhayana 2021-03-09  72  		} else {
f774117c96f94c Jyoti Bhayana 2021-03-09  73  			time_ns = time * int_pow(10, tstamp_scale);
f774117c96f94c Jyoti Bhayana 2021-03-09  74  		}
f774117c96f94c Jyoti Bhayana 2021-03-09  75  	}
f774117c96f94c Jyoti Bhayana 2021-03-09  76  
f774117c96f94c Jyoti Bhayana 2021-03-09  77  	scmi_iio_dev = sensor->indio_dev;
f774117c96f94c Jyoti Bhayana 2021-03-09  78  	iio_push_to_buffers_with_timestamp(scmi_iio_dev, sensor->iio_buf,
f774117c96f94c Jyoti Bhayana 2021-03-09  79  					   time_ns);
f774117c96f94c Jyoti Bhayana 2021-03-09  80  	return NOTIFY_OK;
f774117c96f94c Jyoti Bhayana 2021-03-09  81  }
f774117c96f94c Jyoti Bhayana 2021-03-09  82  

:::::: The code at line 70 was first introduced by commit
:::::: f774117c96f94c7c4d2f076e4cacc80218b0df48 iio/scmi: Adding support for IIO SCMI Based Sensors

:::::: TO: Jyoti Bhayana <jbhayana@xxxxxxxxxx>
:::::: CC: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux