[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 06/25] util: Add CRC16 (CCITT) calculation routines
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 06/25] util: Add CRC16 (CCITT) calculation routines |
Date: |
Sun, 24 Jan 2021 21:24:51 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 1/24/21 9:07 PM, Richard Henderson wrote:
> On 1/24/21 8:59 AM, Philippe Mathieu-Daudé wrote:
>> On 1/23/21 11:39 AM, Bin Meng wrote:
>>> From: Bin Meng <bin.meng@windriver.com>
>>>
>>> Import CRC16 calculation routines from Linux kernel v5.10:
>>>
>>> include/linux/crc-ccitt.h
>>> lib/crc-ccitt.c
>>>
>>> to QEMU:
>>>
>>> include/qemu/crc-ccitt.h
>>> util/crc-ccitt.c
>>>
>>> Signed-off-by: Bin Meng <bin.meng@windriver.com>
>>> Acked-by: Alistair Francis <alistair.francis@wdc.com>
>>> ---
>>>
>>> (no changes since v1)
>>>
>>> include/qemu/crc-ccitt.h | 33 ++++++++++
>>> util/crc-ccitt.c | 127 +++++++++++++++++++++++++++++++++++++++
>>> util/meson.build | 1 +
>>> 3 files changed, 161 insertions(+)
>>> create mode 100644 include/qemu/crc-ccitt.h
>>> create mode 100644 util/crc-ccitt.c
>> ...
>>
>>> diff --git a/util/meson.build b/util/meson.build
>>> index 540a605b78..05a376ae02 100644
>>> --- a/util/meson.build
>>> +++ b/util/meson.build
>>> @@ -29,6 +29,7 @@ util_ss.add(files('qemu-config.c', 'notify.c'))
>>> util_ss.add(files('qemu-option.c', 'qemu-progress.c'))
>>> util_ss.add(files('keyval.c'))
>>> util_ss.add(files('crc32c.c'))
>>> +util_ss.add(files('crc-ccitt.c'))
>>
>> OK but we can restrict this to system-mode emulation, as user-mode
>> and tools don't require it.
>
> Doesn't this get put in libutil, where it is only pulled from the archive when
> needed? Also, libutil is built once, not per-target.
Hmm I just sent a pull request with this change squashed in.
Should I cancel it?
My view is we don't install libqemuutil.a anywhere, so why overload
building unused objects when some configuration don't need it?
Some of the configurations I test:
- build tools only
- build linux-user only
dbus.o and yank.o are also restricted to have_system.
various objects are restricted to have_block (which is
have_system or have_tools).
- Re: [PATCH v2 03/25] hw/sd: ssi-sd: Fix incorrect card response sequence, (continued)
[PATCH v2 12/25] hw/sd: sd: Remove duplicated codes in single/multiple block read/write, Bin Meng, 2021/01/23
[PATCH v2 10/25] hw/sd: ssi-sd: Support multiple block read, Bin Meng, 2021/01/23
[PATCH v2 08/25] hw/sd: ssi-sd: Add a state representing Nac, Bin Meng, 2021/01/23
[PATCH v2 11/25] hw/sd: ssi-sd: Use macros for the dummy value and tokens in the transfer, Bin Meng, 2021/01/23
[PATCH v2 13/25] hw/sd: sd: Allow single/multiple block write for SPI mode, Bin Meng, 2021/01/23