* Re: [PATCH] Documentation/llvm: Add a section about supported architectures
2021-01-14 0:34 [PATCH] Documentation/llvm: Add a section about supported architectures Nathan Chancellor
@ 2021-01-14 1:19 ` Nick Desaulniers
2021-01-14 2:05 ` Nick Desaulniers
2021-01-14 14:36 ` Jonathan Corbet
2021-01-14 7:39 ` Sedat Dilek
2021-01-29 20:31 ` Nathan Chancellor
2 siblings, 2 replies; 10+ messages in thread
From: Nick Desaulniers @ 2021-01-14 1:19 UTC (permalink / raw)
To: Nathan Chancellor, Jonathan Corbet
Cc: Masahiro Yamada, Michal Marek, clang-built-linux,
Linux Kbuild mailing list, Linux Doc Mailing List, LKML,
Miguel Ojeda
Patch looks fine, but `make -j htmldocs` seems to be taking forever
for me so I can't render it. Is this a known issue?
$ make -j htmldocs
SPHINX htmldocs --> file:///android0/linux-next/Documentation/output
make[2]: Nothing to be done for 'html'.
WARNING: The kernel documentation build process
support for Sphinx v3.0 and above is brand new. Be prepared for
possible issues in the generated output.
Warning: The Sphinx 'sphinx_rtd_theme' HTML theme was not
found. Make sure you have the theme installed to produce pretty HTML
output. Falling back to the default theme.
enabling CJK for LaTeX builder
./drivers/usb/dwc3/core.h:1259: warning: Function parameter or member
'gadget_max_speed' not described in 'dwc3'
./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:340: warning:
Incorrect use of kernel-doc format: *
@active_vblank_irq_count
./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:379: warning:
Function parameter or member 'active_vblank_irq_count' not described
in 'amdgpu_display_manager'
./include/linux/rcupdate.h:884: warning: Excess function parameter
'ptr' description in 'kfree_rcu'
./include/linux/rcupdate.h:884: warning: Excess function parameter
'rhf' description in 'kfree_rcu'
<seems like no updates from here>
On Wed, Jan 13, 2021 at 4:35 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> The most common question around building the Linux kernel with clang is
> "does it work?" and the answer has always been "it depends on your
> architecture, configuration, and LLVM version" with no hard answers for
> users wanting to experiment. LLVM support has significantly improved
> over the past couple of years, resulting in more architectures and
> configurations supported, and continuous integration has made it easier
> to see what works and what does not.
>
> Add a section that goes over what architectures are supported in the
> current kernel version, how they should be built (with just clang or the
> LLVM utilities as well), and the level of support they receive. This
> will make it easier for people to try out building their kernel with
> LLVM and reporting issues that come about from it.
>
> Suggested-by: Miguel Ojeda <ojeda@kernel.org>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> Documentation/kbuild/llvm.rst | 44 +++++++++++++++++++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/Documentation/kbuild/llvm.rst b/Documentation/kbuild/llvm.rst
> index 21c847890d03..b18401d2ba82 100644
> --- a/Documentation/kbuild/llvm.rst
> +++ b/Documentation/kbuild/llvm.rst
> @@ -63,6 +63,50 @@ They can be enabled individually. The full list of the parameters: ::
> Currently, the integrated assembler is disabled by default. You can pass
> ``LLVM_IAS=1`` to enable it.
>
> +Supported Architectures
> +-----------------------
> +
> +LLVM does not target all of the architectures that Linux supports and
> +just because a target is supported in LLVM does not mean that the kernel
> +will build or work without any issues. Below is a general summary of
> +architectures that currently work with ``CC=clang`` or ``LLVM=1``. Level
> +of support corresponds to "S" values in the MAINTAINERS files. If an
> +architecture is not present, it either means that LLVM does not target
> +it or there are known issues. Using the latest stable version of LLVM or
> +even the development tree will generally yield the best results.
> +An architecture's ``defconfig`` is generally expected to work well,
> +certain configurations may have problems that have not been uncovered
> +yet. Bug reports are always welcome at the issue tracker below!
> +
> +.. list-table::
> + :widths: 10 10 10
> + :header-rows: 1
> +
> + * - Architecture
> + - Level of support
> + - ``make`` command
> + * - arm
> + - Supported
> + - ``LLVM=1``
> + * - arm64
> + - Supported
> + - ``LLVM=1``
> + * - mips
> + - Maintained
> + - ``CC=clang``
> + * - powerpc
> + - Maintained
> + - ``CC=clang``
> + * - riscv
> + - Maintained
> + - ``CC=clang``
> + * - s390
> + - Maintained
> + - ``CC=clang``
> + * - x86
> + - Supported
> + - ``LLVM=1``
> +
> Getting Help
> ------------
>
>
> base-commit: 7c53f6b671f4aba70ff15e1b05148b10d58c2837
> --
> 2.30.0
>
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Documentation/llvm: Add a section about supported architectures
2021-01-14 1:19 ` Nick Desaulniers
@ 2021-01-14 2:05 ` Nick Desaulniers
2021-01-14 2:23 ` Nathan Chancellor
2021-01-14 14:36 ` Jonathan Corbet
1 sibling, 1 reply; 10+ messages in thread
From: Nick Desaulniers @ 2021-01-14 2:05 UTC (permalink / raw)
To: Nathan Chancellor, Jonathan Corbet
Cc: Masahiro Yamada, Michal Marek, clang-built-linux,
Linux Kbuild mailing list, Linux Doc Mailing List, LKML,
Miguel Ojeda
On Wed, Jan 13, 2021 at 5:19 PM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> Patch looks fine, but `make -j htmldocs` seems to be taking forever
> for me so I can't render it. Is this a known issue?
>
> $ make -j htmldocs
Just took a while, lots of warning spew (but not from this addition AFAICT).
Reviewed-by: Nick Desaulniers <ndesaulnier@google.com>
>
> On Wed, Jan 13, 2021 at 4:35 PM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> >
> > The most common question around building the Linux kernel with clang is
> > "does it work?" and the answer has always been "it depends on your
> > architecture, configuration, and LLVM version" with no hard answers for
> > users wanting to experiment. LLVM support has significantly improved
> > over the past couple of years, resulting in more architectures and
> > configurations supported, and continuous integration has made it easier
> > to see what works and what does not.
> >
> > Add a section that goes over what architectures are supported in the
> > current kernel version, how they should be built (with just clang or the
> > LLVM utilities as well), and the level of support they receive. This
> > will make it easier for people to try out building their kernel with
> > LLVM and reporting issues that come about from it.
> >
> > Suggested-by: Miguel Ojeda <ojeda@kernel.org>
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> > Documentation/kbuild/llvm.rst | 44 +++++++++++++++++++++++++++++++++++
> > 1 file changed, 44 insertions(+)
> >
> > diff --git a/Documentation/kbuild/llvm.rst b/Documentation/kbuild/llvm.rst
> > index 21c847890d03..b18401d2ba82 100644
> > --- a/Documentation/kbuild/llvm.rst
> > +++ b/Documentation/kbuild/llvm.rst
> > @@ -63,6 +63,50 @@ They can be enabled individually. The full list of the parameters: ::
> > Currently, the integrated assembler is disabled by default. You can pass
> > ``LLVM_IAS=1`` to enable it.
> >
> > +Supported Architectures
> > +-----------------------
> > +
> > +LLVM does not target all of the architectures that Linux supports and
> > +just because a target is supported in LLVM does not mean that the kernel
> > +will build or work without any issues. Below is a general summary of
> > +architectures that currently work with ``CC=clang`` or ``LLVM=1``. Level
> > +of support corresponds to "S" values in the MAINTAINERS files. If an
> > +architecture is not present, it either means that LLVM does not target
> > +it or there are known issues. Using the latest stable version of LLVM or
> > +even the development tree will generally yield the best results.
> > +An architecture's ``defconfig`` is generally expected to work well,
> > +certain configurations may have problems that have not been uncovered
> > +yet. Bug reports are always welcome at the issue tracker below!
> > +
> > +.. list-table::
> > + :widths: 10 10 10
> > + :header-rows: 1
> > +
> > + * - Architecture
> > + - Level of support
> > + - ``make`` command
> > + * - arm
> > + - Supported
> > + - ``LLVM=1``
> > + * - arm64
> > + - Supported
> > + - ``LLVM=1``
> > + * - mips
> > + - Maintained
> > + - ``CC=clang``
> > + * - powerpc
> > + - Maintained
> > + - ``CC=clang``
> > + * - riscv
> > + - Maintained
> > + - ``CC=clang``
> > + * - s390
> > + - Maintained
> > + - ``CC=clang``
> > + * - x86
> > + - Supported
> > + - ``LLVM=1``
> > +
> > Getting Help
> > ------------
> >
> >
> > base-commit: 7c53f6b671f4aba70ff15e1b05148b10d58c2837
> > --
> > 2.30.0
> >
>
>
> --
> Thanks,
> ~Nick Desaulniers
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Documentation/llvm: Add a section about supported architectures
2021-01-14 2:05 ` Nick Desaulniers
@ 2021-01-14 2:23 ` Nathan Chancellor
2021-01-14 9:13 ` Miguel Ojeda
0 siblings, 1 reply; 10+ messages in thread
From: Nathan Chancellor @ 2021-01-14 2:23 UTC (permalink / raw)
To: Nick Desaulniers
Cc: Jonathan Corbet, Masahiro Yamada, Michal Marek,
clang-built-linux, Linux Kbuild mailing list,
Linux Doc Mailing List, LKML, Miguel Ojeda
On Wed, Jan 13, 2021 at 06:05:32PM -0800, Nick Desaulniers wrote:
> On Wed, Jan 13, 2021 at 5:19 PM Nick Desaulniers
> <ndesaulniers@google.com> wrote:
> >
> > Patch looks fine, but `make -j htmldocs` seems to be taking forever
> > for me so I can't render it. Is this a known issue?
> >
> > $ make -j htmldocs
A clean "make -skj24 htmldocs" takes me a little over three minutes or
so on my Ryzen 9 3900X. Just to give some perspective.
> Just took a while, lots of warning spew (but not from this addition AFAICT).
> Reviewed-by: Nick Desaulniers <ndesaulnier@google.com>
Thanks for the review!
Cheers,
Nathan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Documentation/llvm: Add a section about supported architectures
2021-01-14 2:23 ` Nathan Chancellor
@ 2021-01-14 9:13 ` Miguel Ojeda
0 siblings, 0 replies; 10+ messages in thread
From: Miguel Ojeda @ 2021-01-14 9:13 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Nick Desaulniers, Jonathan Corbet, Masahiro Yamada, Michal Marek,
clang-built-linux, Linux Kbuild mailing list,
Linux Doc Mailing List, LKML, Miguel Ojeda
On Thu, Jan 14, 2021 at 3:23 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> A clean "make -skj24 htmldocs" takes me a little over three minutes or
> so on my Ryzen 9 3900X. Just to give some perspective.
Oh, wow, that's something...
Thanks a lot for adding this:
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Cheers,
Miguel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Documentation/llvm: Add a section about supported architectures
2021-01-14 1:19 ` Nick Desaulniers
2021-01-14 2:05 ` Nick Desaulniers
@ 2021-01-14 14:36 ` Jonathan Corbet
2021-01-14 17:53 ` Nick Desaulniers
1 sibling, 1 reply; 10+ messages in thread
From: Jonathan Corbet @ 2021-01-14 14:36 UTC (permalink / raw)
To: Nick Desaulniers
Cc: Nathan Chancellor, Masahiro Yamada, Michal Marek,
clang-built-linux, Linux Kbuild mailing list,
Linux Doc Mailing List, LKML, Miguel Ojeda
On Wed, 13 Jan 2021 17:19:59 -0800
Nick Desaulniers <ndesaulniers@google.com> wrote:
> Patch looks fine, but `make -j htmldocs` seems to be taking forever
> for me so I can't render it. Is this a known issue?
>
> $ make -j htmldocs
> SPHINX htmldocs --> file:///android0/linux-next/Documentation/output
> make[2]: Nothing to be done for 'html'.
> WARNING: The kernel documentation build process
> support for Sphinx v3.0 and above is brand new. Be prepared for
> possible issues in the generated output.
Sphinx 3.x is *way* slower to build the docs, alas. One of many
"improvements" we got with that change.
jon
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Documentation/llvm: Add a section about supported architectures
2021-01-14 14:36 ` Jonathan Corbet
@ 2021-01-14 17:53 ` Nick Desaulniers
0 siblings, 0 replies; 10+ messages in thread
From: Nick Desaulniers @ 2021-01-14 17:53 UTC (permalink / raw)
To: Jonathan Corbet
Cc: Nathan Chancellor, Masahiro Yamada, Michal Marek,
clang-built-linux, Linux Kbuild mailing list,
Linux Doc Mailing List, LKML, Miguel Ojeda
On Thu, Jan 14, 2021 at 6:36 AM Jonathan Corbet <corbet@lwn.net> wrote:
>
> On Wed, 13 Jan 2021 17:19:59 -0800
> Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> > Patch looks fine, but `make -j htmldocs` seems to be taking forever
> > for me so I can't render it. Is this a known issue?
> >
> > $ make -j htmldocs
> > SPHINX htmldocs --> file:///android0/linux-next/Documentation/output
> > make[2]: Nothing to be done for 'html'.
> > WARNING: The kernel documentation build process
> > support for Sphinx v3.0 and above is brand new. Be prepared for
> > possible issues in the generated output.
>
> Sphinx 3.x is *way* slower to build the docs, alas. One of many
> "improvements" we got with that change.
Oh, man, yeah. Noticeably. I had sworn I had run `make htmldocs`
before. Have you had a chance to report this regression upstream?
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Documentation/llvm: Add a section about supported architectures
2021-01-14 0:34 [PATCH] Documentation/llvm: Add a section about supported architectures Nathan Chancellor
2021-01-14 1:19 ` Nick Desaulniers
@ 2021-01-14 7:39 ` Sedat Dilek
2021-01-29 20:31 ` Nathan Chancellor
2 siblings, 0 replies; 10+ messages in thread
From: Sedat Dilek @ 2021-01-14 7:39 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Nick Desaulniers, Masahiro Yamada, Michal Marek, Jonathan Corbet,
Clang-Built-Linux ML, linux-kbuild, linux-doc, linux-kernel,
Miguel Ojeda
On Thu, Jan 14, 2021 at 1:35 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> The most common question around building the Linux kernel with clang is
> "does it work?" and the answer has always been "it depends on your
> architecture, configuration, and LLVM version" with no hard answers for
> users wanting to experiment. LLVM support has significantly improved
> over the past couple of years, resulting in more architectures and
> configurations supported, and continuous integration has made it easier
> to see what works and what does not.
>
> Add a section that goes over what architectures are supported in the
> current kernel version, how they should be built (with just clang or the
> LLVM utilities as well), and the level of support they receive. This
> will make it easier for people to try out building their kernel with
> LLVM and reporting issues that come about from it.
>
Thanks, this was overdue and is definitely helpful for users and developers.
For x86 64bit:
Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com>
Together with "[PATCH] kbuild: check the minimum compiler version in
Kconfig" this looks very good to me.
/o\
- Sedat -
[1] https://marc.info/?t=161059811000001&r=1&w=2
> Suggested-by: Miguel Ojeda <ojeda@kernel.org>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> Documentation/kbuild/llvm.rst | 44 +++++++++++++++++++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/Documentation/kbuild/llvm.rst b/Documentation/kbuild/llvm.rst
> index 21c847890d03..b18401d2ba82 100644
> --- a/Documentation/kbuild/llvm.rst
> +++ b/Documentation/kbuild/llvm.rst
> @@ -63,6 +63,50 @@ They can be enabled individually. The full list of the parameters: ::
> Currently, the integrated assembler is disabled by default. You can pass
> ``LLVM_IAS=1`` to enable it.
>
> +Supported Architectures
> +-----------------------
> +
> +LLVM does not target all of the architectures that Linux supports and
> +just because a target is supported in LLVM does not mean that the kernel
> +will build or work without any issues. Below is a general summary of
> +architectures that currently work with ``CC=clang`` or ``LLVM=1``. Level
> +of support corresponds to "S" values in the MAINTAINERS files. If an
> +architecture is not present, it either means that LLVM does not target
> +it or there are known issues. Using the latest stable version of LLVM or
> +even the development tree will generally yield the best results.
> +An architecture's ``defconfig`` is generally expected to work well,
> +certain configurations may have problems that have not been uncovered
> +yet. Bug reports are always welcome at the issue tracker below!
> +
> +.. list-table::
> + :widths: 10 10 10
> + :header-rows: 1
> +
> + * - Architecture
> + - Level of support
> + - ``make`` command
> + * - arm
> + - Supported
> + - ``LLVM=1``
> + * - arm64
> + - Supported
> + - ``LLVM=1``
> + * - mips
> + - Maintained
> + - ``CC=clang``
> + * - powerpc
> + - Maintained
> + - ``CC=clang``
> + * - riscv
> + - Maintained
> + - ``CC=clang``
> + * - s390
> + - Maintained
> + - ``CC=clang``
> + * - x86
> + - Supported
> + - ``LLVM=1``
> +
> Getting Help
> ------------
>
>
> base-commit: 7c53f6b671f4aba70ff15e1b05148b10d58c2837
> --
> 2.30.0
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20210114003447.7363-1-natechancellor%40gmail.com.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Documentation/llvm: Add a section about supported architectures
2021-01-14 0:34 [PATCH] Documentation/llvm: Add a section about supported architectures Nathan Chancellor
2021-01-14 1:19 ` Nick Desaulniers
2021-01-14 7:39 ` Sedat Dilek
@ 2021-01-29 20:31 ` Nathan Chancellor
2021-01-29 21:07 ` Masahiro Yamada
2 siblings, 1 reply; 10+ messages in thread
From: Nathan Chancellor @ 2021-01-29 20:31 UTC (permalink / raw)
To: Jonathan Corbet, Masahiro Yamada
Cc: Nick Desaulniers, Michal Marek, clang-built-linux, linux-kbuild,
linux-doc, linux-kernel, Miguel Ojeda
On Wed, Jan 13, 2021 at 05:34:47PM -0700, Nathan Chancellor wrote:
> The most common question around building the Linux kernel with clang is
> "does it work?" and the answer has always been "it depends on your
> architecture, configuration, and LLVM version" with no hard answers for
> users wanting to experiment. LLVM support has significantly improved
> over the past couple of years, resulting in more architectures and
> configurations supported, and continuous integration has made it easier
> to see what works and what does not.
>
> Add a section that goes over what architectures are supported in the
> current kernel version, how they should be built (with just clang or the
> LLVM utilities as well), and the level of support they receive. This
> will make it easier for people to try out building their kernel with
> LLVM and reporting issues that come about from it.
>
> Suggested-by: Miguel Ojeda <ojeda@kernel.org>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Jonathan, did you need anything else from me on this, or does Masahiro
need to pick this up?
Cheers,
Nathan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Documentation/llvm: Add a section about supported architectures
2021-01-29 20:31 ` Nathan Chancellor
@ 2021-01-29 21:07 ` Masahiro Yamada
0 siblings, 0 replies; 10+ messages in thread
From: Masahiro Yamada @ 2021-01-29 21:07 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Jonathan Corbet, Nick Desaulniers, Michal Marek,
clang-built-linux, Linux Kbuild mailing list,
open list:DOCUMENTATION, Linux Kernel Mailing List, Miguel Ojeda
On Sat, Jan 30, 2021 at 5:31 AM Nathan Chancellor <nathan@kernel.org> wrote:
>
> On Wed, Jan 13, 2021 at 05:34:47PM -0700, Nathan Chancellor wrote:
> > The most common question around building the Linux kernel with clang is
> > "does it work?" and the answer has always been "it depends on your
> > architecture, configuration, and LLVM version" with no hard answers for
> > users wanting to experiment. LLVM support has significantly improved
> > over the past couple of years, resulting in more architectures and
> > configurations supported, and continuous integration has made it easier
> > to see what works and what does not.
> >
> > Add a section that goes over what architectures are supported in the
> > current kernel version, how they should be built (with just clang or the
> > LLVM utilities as well), and the level of support they receive. This
> > will make it easier for people to try out building their kernel with
> > LLVM and reporting issues that come about from it.
> >
> > Suggested-by: Miguel Ojeda <ojeda@kernel.org>
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>
> Jonathan, did you need anything else from me on this, or does Masahiro
> need to pick this up?
>
> Cheers,
> Nathan
Now I applied to linux-kbuild.
Thanks for the reminder.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 10+ messages in thread