Message ID | 20210706200558.GT2921206@minyard.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [GIT,PULL] I2C/IPMI bug fixes for QEMU 6.1 | expand |
On Tue, 6 Jul 2021 at 21:06, Corey Minyard <minyard@acm.org> wrote: > > The following changes since commit 38848ce565849e5b867a5e08022b3c755039c11a: > > Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210616' into staging (2021-06-16 17:02:30 +0100) > > are available in the Git repository at: > > https://github.com/cminyard/qemu.git tags/for-qemu-6.1-1 > > for you to fetch changes up to 7051d605e6b03259e0185dd574f760b93d15fa10: > > ipmi/sim: fix watchdog_expired data type error in IPMIBmcSim struct (2021-06-25 08:54:57 -0500) > > ---------------------------------------------------------------- > Some qemu updates for IPMI and I2C > > Move some ADC file to where they belong and move some sensors to a > sensor directory, since with new BMCs coming in lots of different > sensors should be coming in. Keep from cluttering things up. > > Add support for I2C PMBus devices. > > Replace the confusing and error-prone i2c_send_recv and i2c_transfer with > specific send and receive functions. Several errors have already been > made with these, avoid any new errors. > > Fix the watchdog_expired field in the IPMI watchdog, it's not a bool, > it's a u8. After a vmstate transfer, the new value could be wrong. > Hi; this fails to compile on 32-bit hosts: ../../hw/sensor/max34451.c: In function 'max34451_init': /home/peter.maydell/qemu/include/qemu/bitops.h:22:38: error: left shift count >= width of type [-Werror=shift-count-overflow] #define BIT(nr) (1UL << (nr)) ^ /home/peter.maydell/qemu/include/hw/i2c/pmbus_device.h:253:36: note: in expansion of macro 'BIT' #define PB_HAS_TEMPERATURE BIT(40) ^~~ ../../hw/sensor/max34451.c:725:37: note: in expansion of macro 'PB_HAS_TEMPERATURE' pmbus_page_config(pmdev, i, PB_HAS_TEMPERATURE | PB_HAS_VOUT_MODE); ^~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors You probably wanted to define PB_HAS_TEMPERATURE using BIT_ULL(). Sample gitlab CI job failure with this error: https://gitlab.com/qemu-project/qemu/-/jobs/1403927147 thanks -- PMM
Hmm, it compiled for me, I wonder if there are some compiler differences, but I don't see how. Anyway, copying the original patch source so they know. Thanks for checking. -corey On Tue, Jul 06, 2021 at 10:16:36PM +0100, Peter Maydell wrote: > On Tue, 6 Jul 2021 at 21:06, Corey Minyard <minyard@acm.org> wrote: > > > > The following changes since commit 38848ce565849e5b867a5e08022b3c755039c11a: > > > > Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210616' into staging (2021-06-16 17:02:30 +0100) > > > > are available in the Git repository at: > > > > https://github.com/cminyard/qemu.git tags/for-qemu-6.1-1 > > > > for you to fetch changes up to 7051d605e6b03259e0185dd574f760b93d15fa10: > > > > ipmi/sim: fix watchdog_expired data type error in IPMIBmcSim struct (2021-06-25 08:54:57 -0500) > > > > ---------------------------------------------------------------- > > Some qemu updates for IPMI and I2C > > > > Move some ADC file to where they belong and move some sensors to a > > sensor directory, since with new BMCs coming in lots of different > > sensors should be coming in. Keep from cluttering things up. > > > > Add support for I2C PMBus devices. > > > > Replace the confusing and error-prone i2c_send_recv and i2c_transfer with > > specific send and receive functions. Several errors have already been > > made with these, avoid any new errors. > > > > Fix the watchdog_expired field in the IPMI watchdog, it's not a bool, > > it's a u8. After a vmstate transfer, the new value could be wrong. > > > > Hi; this fails to compile on 32-bit hosts: > > ../../hw/sensor/max34451.c: In function 'max34451_init': > /home/peter.maydell/qemu/include/qemu/bitops.h:22:38: error: left > shift count >= width of type [-Werror=shift-count-overflow] > #define BIT(nr) (1UL << (nr)) > ^ > /home/peter.maydell/qemu/include/hw/i2c/pmbus_device.h:253:36: note: > in expansion of macro 'BIT' > #define PB_HAS_TEMPERATURE BIT(40) > ^~~ > ../../hw/sensor/max34451.c:725:37: note: in expansion of macro > 'PB_HAS_TEMPERATURE' > pmbus_page_config(pmdev, i, PB_HAS_TEMPERATURE | PB_HAS_VOUT_MODE); > ^~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > You probably wanted to define PB_HAS_TEMPERATURE using BIT_ULL(). > > Sample gitlab CI job failure with this error: > https://gitlab.com/qemu-project/qemu/-/jobs/1403927147 > > thanks > -- PMM >
On Tue, 6 Jul 2021 at 22:45, Corey Minyard <minyard@acm.org> wrote: > > Hmm, it compiled for me, I wonder if there are some compiler > differences, but I don't see how. I'd expect it to fail when compiling for any target where 'unsigned long' is 32 bits... -- PMM
I've sent out some patches using BIT_ULL(). Hopefully it's fixed. -Titus On Tue, 6 Jul 2021 at 18:00, Peter Maydell <peter.maydell@linaro.org> wrote: > > On Tue, 6 Jul 2021 at 22:45, Corey Minyard <minyard@acm.org> wrote: > > > > Hmm, it compiled for me, I wonder if there are some compiler > > differences, but I don't see how. > > I'd expect it to fail when compiling for any target where > 'unsigned long' is 32 bits... > > -- PMM