[PATCH v3 2/3] irqchip: Add the Sophgo SG2042 MSI interrupt controller

Chen Wang unicorn_wang at outlook.com
Wed Jan 22 05:54:16 PST 2025


On 2025/1/20 10:43, Inochi Amaoto wrote:
> On Wed, Jan 15, 2025 at 02:33:45PM +0800, Chen Wang wrote:

[......]

>> +#define SG2042_MSI_FLAGS_REQUIRED (MSI_FLAG_USE_DEF_DOM_OPS |	\
>> +				   MSI_FLAG_USE_DEF_CHIP_OPS)
>> +
>> +#define SG2042_MSI_FLAGS_SUPPORTED MSI_GENERIC_FLAGS_MASK
>> +
> I think it is just OK to set the flag directly in the msi_parent_ops.
This shouldn't be a big problem, maybe it will be convenient for future 
expansion.
>> +static struct msi_parent_ops sg2042_msi_parent_ops = {
>> +	.required_flags		= SG2042_MSI_FLAGS_REQUIRED,
>> +	.supported_flags	= SG2042_MSI_FLAGS_SUPPORTED,
>> +	.bus_select_mask	= MATCH_PCI_MSI,
>> +	.bus_select_token	= DOMAIN_BUS_NEXUS,
>> +	.prefix			= "SG2042-",
>> +	.init_dev_msi_info	= msi_lib_init_dev_msi_info,
>> +};
> This struct should be const.

Yes, will fix this in next version.

Thanks,

Chen

[......]





More information about the linux-riscv mailing list