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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 18 Jan 2018 17:39:02 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Niklas Cassel <niklas.cassel@...s.com>
Cc:     Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Kishon Vijay Abraham I <kishon@...com>,
        Jingoo Han <jingoohan1@...il.com>,
        Peter Robinson <pbrobinson@...il.com>,
        linux-pci <linux-pci@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PCI: dwc: dra7xx: add back CONFIG_PCI dependency for endpoint

On Thu, Jan 18, 2018 at 4:03 PM, Niklas Cassel <niklas.cassel@...s.com> wrote:
> On Thu, Jan 18, 2018 at 02:15:54PM +0100, Arnd Bergmann wrote:
>> It was a nice idea to split out the PCI host and endpoint mode configuration
>> into separate options. Unfortunately it doesn't build:
>>
>> drivers/pci/dwc/pci-dra7xx.c:229:11: error: 'pci_irqd_intx_xlate' undeclared here (not in a function)
>>
>> This is certainly a fixable problem, but since it's clear that this
>> configuration was never tested, let's maybe revert back to the
>> dependency for now, until it can be done in a way that works
>> better.
>
> Hello Arnd,
>
> That is not true :( I did test..
>
> git checkout b052835c6385
> disable CONFIG_PCI
> make
> works like a charm :P

Right, I see it now, sorry for the accusation ;-)

> Commit 524d59f6e30a ("PCI: dra7xx: Fix legacy INTD IRQ handling"),
> which was merged after my commit, added a dependency towards
> pci_irqd_intx_xlate.
>
> It might be a bit unfortunately that commit 489f8fe6aa71
> ("PCI: dwc: dra7xx: Help compiler to remove unused code"),
> a commit that you helped me with Arnd, was placed after
> b052835c6385 ("PCI: dwc: dra7xx: Refactor Kconfig and Makefile
> handling for host/ep mode") instead of before, in my patch
> series order.

I have a vague memory of that, yes.

> However, since pci_irqd_intx_xlate is only defined inside
> CONFIG_PCI, even 489f8fe6aa71 will not help.
>
> Not completely sure about this, but perhaps a better fix is:
>
> +++ b/include/linux/pci.h
> @@ -1686,6 +1686,12 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }
>  #define dev_is_pf(d) (false)
>  static inline bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags)
>  { return false; }
> +static inline int pci_irqd_intx_xlate(struct irq_domain *d,
> +                                     struct device_node *node,
> +                                     const u32 *intspec,
> +                                     unsigned int intsize,
> +                                     unsigned long *out_hwirq,
> +                                     unsigned int *out_type) { return 0; }
>  #endif /* CONFIG_PCI */
>
>  /* Include architecture-dependent settings and functions */
>
>
> And a 'Fixes:' tag that references 524d59f6e30a

Looks fine to me, but I'd put the '{ return 0; }' in a new line for consistency
with the other functions here, and maybe return -EINVAL instead of
zero.

Can you submit that as a proper patch and add my

Acked-by: Arnd Bergmann <arnd@...db.de>

?

Thanks!


       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ