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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <837c3675-51d4-2eba-e8c6-3065d6e5d301@starfivetech.com>
Date:   Fri, 1 Sep 2023 11:57:44 +0800
From:   Minda Chen <minda.chen@...rfivetech.com>
To:     Conor Dooley <conor.dooley@...rochip.com>
CC:     Daire McNamara <daire.mcnamara@...rochip.com>,
        Conor Dooley <conor@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Lorenzo Pieralisi <lpieralisi@...nel.org>,
        Krzysztof Wilczyński <kw@...ux.com>,
        Emil Renner Berthing <emil.renner.berthing@...onical.com>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-riscv@...ts.infradead.org>, <linux-pci@...r.kernel.org>,
        Pali Rohár <pali@...nel.org>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Mason Huo <mason.huo@...rfivetech.com>,
        Leyfoon Tan <leyfoon.tan@...rfivetech.com>,
        Kevin Xie <kevin.xie@...rfivetech.com>
Subject: Re: [PATCH v4 08/11] PCI: microchip: Move IRQ init functions to
 pcie-plda-host.c



On 2023/8/25 20:09, Conor Dooley wrote:
> Daire, can you look at this one too please?
> 
> On Fri, Aug 25, 2023 at 05:01:26PM +0800, Minda Chen wrote:
>> Move IRQ init functions to pcie-plda-host.c.
>> mc_handle_event() is merged to plda_handle_event().
>> Set most of the IRQ functions to static in pcie-plda-host.c
>> 
>> Signed-off-by: Minda Chen <minda.chen@...rfivetech.com>
> 
>> -void plda_handle_event(struct irq_desc *desc)
>> +static void plda_handle_event(struct irq_desc *desc)
>>  {
>>  	struct plda_pcie_rp *port = irq_desc_get_handler_data(desc);
>>  	struct irq_chip *chip = irq_desc_get_chip(desc);
>> @@ -264,14 +268,18 @@ void plda_handle_event(struct irq_desc *desc)
>>  
>>  	chained_irq_enter(chip, desc);
>>  
>> -	val = readl_relaxed(port->bridge_addr + ISTATUS_LOCAL);
>> -	origin = val;
>> -	val = val >> A_ATR_EVT_POST_ERR_SHIFT;
>> -	events |= val & 0xff;
>> -	if (origin & PM_MSI_INT_INTX_MASK)
>> -		events |= BIT(EVENT_PM_MSI_INT_INTX);
>> -	val = (origin >> PM_MSI_INT_MSI_SHIFT) & 0xf;
>> -	events |= val << EVENT_PM_MSI_INT_MSI;
>> +	if (port->ops && port->ops->get_events) {
> 
> I still don't love the dancing here. Can you just always register a
> callback?
> 
> Thanks,
> Conor.
> 
OK, Thanks.
>> +		events = port->ops->get_events(port);
>> +	} else {
>> +		val = readl_relaxed(port->bridge_addr + ISTATUS_LOCAL);
>> +		origin = val;
>> +		val = val >> A_ATR_EVT_POST_ERR_SHIFT;
>> +		events |= val & 0xff;
>> +		if (origin & PM_MSI_INT_INTX_MASK)
>> +			events |= BIT(EVENT_PM_MSI_INT_INTX);
>> +		val = (origin >> PM_MSI_INT_MSI_SHIFT) & 0xf;
>> +		events |= val << EVENT_PM_MSI_INT_MSI;
>> +	}
>>  
>>  	for_each_set_bit(bit, &events, port->num_events)
>>  		generic_handle_domain_irq(port->event_domain, bit);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ