linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Randy Dunlap <rdunlap@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>
Cc: broonie@kernel.org,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	x86@kernel.org
Subject: Re: linux-next: Tree for Sep 30 (i386 non-SMP non-APIC w/ IRQ_DOMAIN: build errors)
Date: Mon, 03 Oct 2022 19:26:29 +0100	[thread overview]
Message-ID: <8635c4bw6i.wl-maz@kernel.org> (raw)
In-Reply-To: <bb1a7d75-521e-b578-f47f-e5bab652c2c7@infradead.org>

+ Borislav and the x86 mailing list

On Sat, 01 Oct 2022 22:25:37 +0100,
Randy Dunlap <rdunlap@infradead.org> wrote:
> 
> Hi--
> 
> On 9/30/22 08:47, broonie@kernel.org wrote:
> > Hi all,
> > 
> > Stephen should be back on Monday and normal service resumed.
> > 
> > Changes since 20220929:
> > 
> 
> i386 randconfig:
> 
> # CONFIG_SMP is not set
> # CONFIG_X86_UP_APIC is not set
> CONFIG_IRQ_DOMAIN=y
> CONFIG_IRQ_SIM=y
> CONFIG_IRQ_DOMAIN_HIERARCHY=y
> CONFIG_GENERIC_MSI_IRQ=y
> CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
> 
> 
> (a)
>   CC      drivers/phy/phy-can-transceiver.o
> In file included from ../include/asm-generic/gpio.h:11,
>                  from ../include/linux/gpio.h:62,
>                  from ../drivers/phy/phy-can-transceiver.c:11:
> ../include/linux/gpio/driver.h:31:33: error: field ‘msiinfo’ has incomplete type
>    31 |         msi_alloc_info_t        msiinfo;
>       |

There is plenty of similar issues with drivers/gpio.

This looks like x86 without APIC support lacks a proper definition of
'struct irq_alloc_info'. I can make one up to get things to compile,
but I wonder if that makes any sense the first place.

[warning: anything below only shows that I know nothing about x86]

Can x86 practically deal with MSIs without the APIC? If not, we should
instead find a way to forbid MSIs when APIC isn't selected. Or make
APIC support mandatory.

> 
> (b)
>   CC      arch/x86/kernel/hpet.o
> ../arch/x86/kernel/hpet.c: In function ‘hpet_msi_init’:
> ../arch/x86/kernel/hpet.c:520:46: error: invalid use of incomplete typedef ‘msi_alloc_info_t’ {aka ‘struct irq_alloc_info’}
>   520 |         irq_domain_set_info(domain, virq, arg->hwirq, info->chip, NULL,
>       |                                              ^~
> ../arch/x86/kernel/hpet.c:521:49: error: invalid use of incomplete typedef ‘msi_alloc_info_t’ {aka ‘struct irq_alloc_info’}
>   521 |                             handle_edge_irq, arg->data, "edge");
>       |                                                 ^~
>   CC      fs/jfs/jfs_xtree.o
> ../arch/x86/kernel/hpet.c: In function ‘hpet_create_irq_domain’:
> ../arch/x86/kernel/hpet.c:550:13: error: ‘x86_vector_domain’ undeclared (first use in this function)
>   550 |         if (x86_vector_domain == NULL)
>       |             ^~~~~~~~~~~~~~~~~
> ../arch/x86/kernel/hpet.c:550:13: note: each undeclared identifier is reported only once for each function it appears in
> ../arch/x86/kernel/hpet.c: In function ‘hpet_assign_irq’:
> ../arch/x86/kernel/hpet.c:598:31: error: storage size of ‘info’ isn’t known
>   598 |         struct irq_alloc_info info;
>       |                               ^~~~
> ../arch/x86/kernel/hpet.c:600:9: error: implicit declaration of function ‘init_irq_alloc_info’ [-Werror=implicit-function-declaration]
>   600 |         init_irq_alloc_info(&info, NULL);
>       |         ^~~~~~~~~~~~~~~~~~~
> ../arch/x86/kernel/hpet.c:601:21: error: ‘X86_IRQ_ALLOC_TYPE_HPET’ undeclared (first use in this function)
>   601 |         info.type = X86_IRQ_ALLOC_TYPE_HPET;
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~
> ../arch/x86/kernel/hpet.c:598:31: warning: unused variable ‘info’ [-Wunused-variable]
>   598 |         struct irq_alloc_info info;
>       |                               ^~~~
> ../arch/x86/kernel/hpet.c:607:1: error: control reaches end of non-void function [-Werror=return-type]
>   607 | }
>       | ^

Same question: is HPET usable without the APIC? If so, the MSI part
should probably be guarded by something else.

> 
> 
> (c)
>   CC      kernel/irq/msi.o
> ../kernel/irq/msi.c: In function ‘msi_domain_ops_get_hwirq’:
> ../kernel/irq/msi.c:585:19: error: invalid use of incomplete typedef ‘msi_alloc_info_t’ {aka ‘struct irq_alloc_info’}
>   585 |         return arg->hwirq;
>       |                   ^~
> In file included from ../arch/x86/include/asm/string.h:3,
>                  from ../include/linux/string.h:20,
>                  from ../arch/x86/include/asm/page_32.h:22,
>                  from ../arch/x86/include/asm/page.h:14,
>                  from ../arch/x86/include/asm/thread_info.h:12,
>                  from ../include/linux/thread_info.h:60,
>                  from ../arch/x86/include/asm/preempt.h:7,
>                  from ../include/linux/preempt.h:78,
>                  from ../include/linux/rcupdate.h:27,
>                  from ../include/linux/rculist.h:11,
>                  from ../include/linux/pid.h:5,
>                  from ../include/linux/sched.h:14,
>                  from ../include/linux/ratelimit.h:6,
>                  from ../include/linux/dev_printk.h:16,
>                  from ../include/linux/device.h:15,
>                  from ../kernel/irq/msi.c:12:
> ../kernel/irq/msi.c: In function ‘msi_domain_ops_prepare’:
> ../kernel/irq/msi.c:591:30: error: invalid application of ‘sizeof’ to incomplete type ‘msi_alloc_info_t’ {aka ‘struct irq_alloc_info’}
>   591 |         memset(arg, 0, sizeof(*arg));
>       |                              ^
> ../arch/x86/include/asm/string_32.h:195:52: note: in definition of macro ‘memset’
>   195 | #define memset(s, c, count) __builtin_memset(s, c, count)
>       |                                                    ^~~~~
> ../kernel/irq/msi.c: In function ‘msi_domain_ops_set_desc’:
> ../kernel/irq/msi.c:598:12: error: invalid use of incomplete typedef ‘msi_alloc_info_t’ {aka ‘struct irq_alloc_info’}
>   598 |         arg->desc = desc;
>       |            ^~
> ../kernel/irq/msi.c: In function ‘__msi_domain_alloc_irqs’:
> ../kernel/irq/msi.c:858:9: error: variable ‘arg’ has initializer but incomplete type
>   858 |         msi_alloc_info_t arg = { };
>       |         ^~~~~~~~~~~~~~~~
> ../kernel/irq/msi.c:858:26: error: storage size of ‘arg’ isn’t known
>   858 |         msi_alloc_info_t arg = { };
>       |                          ^~~
> ../kernel/irq/msi.c:858:26: warning: unused variable ‘arg’ [-Wunused-variable]
>   CC      lib/clz_tab.o
> ../kernel/irq/msi.c: In function ‘msi_domain_ops_get_hwirq’:
> ../kernel/irq/msi.c:586:1: error: control reaches end of non-void function [-Werror=return-type]
>   586 | }
>       | ^

This is related to (a).

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2022-10-03 18:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 15:47 linux-next: Tree for Sep 30 broonie
2022-10-01 21:25 ` linux-next: Tree for Sep 30 (i386 non-SMP non-APIC w/ IRQ_DOMAIN: build errors) Randy Dunlap
2022-10-03 18:26   ` Marc Zyngier [this message]
2022-10-03 21:19     ` Borislav Petkov
2022-10-03  4:47 ` linux-next: Tree for Sep 30 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8635c4bw6i.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=bp@alien8.de \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).