All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: "Jonathan Corbet" <corbet@lwn.net>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] scripts: get_feat.pl: make complete table more coincise
Date: Fri, 4 Dec 2020 10:52:02 +0100	[thread overview]
Message-ID: <20201204105202.3d5862a7@coco.lan> (raw)
In-Reply-To: <47d1d76bf557716cb90d7382c31fe3d1ade65a2e.1607074458.git.mchehab+huawei@kernel.org>

Em Fri,  4 Dec 2020 10:35:44 +0100
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> escreveu:

> Currently, there are too many white spaces at the tables,
> and the information is very sparsed on it.
> 
> Make the format a lot more compact.
> 
> Suggested-by: Jonathan Corbet <corbet@lwn.net>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

...

> +		my @lines;
> +		my $line = "";
> +		foreach my $arch (sort {
> +					($arch_table{$a} cmp $arch_table{$b}) or
> +					("\L$a" cmp "\L$b")
> +				       } keys %arch_table) {

Actually, I have one doubt myself with the above sort.

Right now, it places things on this order:

	Not Compatible: ...
	TODO: ...
	ok: ...

I'm wondering if it would it be better to place them at the reverse order,
e. g.:

	ok: ...
	TODO: ...
	Not Compatible: ...

In other words, to output it like:

+---------------------+-------------------------------------------------------------------------+------------------------------------------------------------+
|Feature              |Kconfig / Description                                                    |Status per architecture                                     |
+=====================+=========================================================================+============================================================+
|batch-unmap-tlb-flush|``ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH``                                    |- **ok**: x86                                               |
|                     |                                                                         |- **TODO**: alpha, arc, arm, arm64, csky, hexagon, ia64     |
|                     |arch supports deferral of TLB flush until multiple pages are unmapped    |  mips, nds32, parisc, powerpc, riscv, s390, sh, sparc      |
|                     |                                                                         |  xtensa                                                    |
|                     |                                                                         |- **Not compatible**: c6x, h8300, m68k, microblaze, nios2   |
|                     |                                                                         |  openrisc, um                                              |
+---------------------+-------------------------------------------------------------------------+------------------------------------------------------------+
|ELF-ASLR             |``ARCH_HAS_ELF_RANDOMIZE``                                               |- **ok**: arm, arm64, mips, parisc, powerpc, s390, x86      |
|                     |                                                                         |- **TODO**: alpha, arc, c6x, csky, h8300, hexagon, ia64     |
|                     |arch randomizes the stack, heap and binary images of ELF binaries        |  m68k, microblaze, nds32, nios2, openrisc, riscv, sh       |
|                     |                                                                         |  sparc, um, xtensa                                         |
+---------------------+-------------------------------------------------------------------------+------------------------------------------------------------+
|huge-vmap            |``HAVE_ARCH_HUGE_VMAP``                                                  |- **ok**: arm64, powerpc, x86                               |
|                     |                                                                         |- **TODO**: alpha, arc, arm, c6x, csky, h8300, hexagon      |
|                     |arch supports the ioremap_pud_enabled() and ioremap_pmd_enabled() VM APIs|  ia64, m68k, microblaze, mips, nds32, nios2, openrisc      |
|                     |                                                                         |  parisc, riscv, s390, sh, sparc, um, xtensa                |
+---------------------+-------------------------------------------------------------------------+------------------------------------------------------------+
|ioremap_prot         |``HAVE_IOREMAP_PROT``                                                    |- **ok**: arc, mips, powerpc, s390, sh, x86                 |
|                     |                                                                         |- **TODO**: alpha, arm, arm64, c6x, csky, h8300, hexagon    |
|                     |arch has ioremap_prot()                                                  |  ia64, m68k, microblaze, nds32, nios2, openrisc, parisc    |
|                     |                                                                         |  riscv, sparc, um, xtensa                                  |
+---------------------+-------------------------------------------------------------------------+------------------------------------------------------------+
|PG_uncached          |``ARCH_USES_PG_UNCACHED``                                                |- **ok**: ia64, x86                                         |
|                     |                                                                         |- **TODO**: alpha, arc, arm, arm64, c6x, csky, h8300        |
|                     |arch supports the PG_uncached page flag                                  |  hexagon, m68k, microblaze, mips, nds32, nios2, openrisc   |
|                     |                                                                         |  parisc, powerpc, riscv, s390, sh, sparc, um, xtensa       |
+---------------------+-------------------------------------------------------------------------+------------------------------------------------------------+
|pte_special          |``ARCH_HAS_PTE_SPECIAL``                                                 |- **ok**: arc, arm, arm64, mips, powerpc, riscv, s390, sh   |
|                     |                                                                         |  sparc, x86                                                |
|                     |arch supports the pte_special()/pte_mkspecial() VM APIs                  |- **TODO**: alpha, c6x, csky, h8300, hexagon, ia64, m68k    |
|                     |                                                                         |  microblaze, nds32, nios2, openrisc, parisc, um, xtensa    |
+---------------------+-------------------------------------------------------------------------+------------------------------------------------------------+
|THP                  |``HAVE_ARCH_TRANSPARENT_HUGEPAGE``                                       |- **ok**: arc, arm, arm64, mips, powerpc, s390, sparc, x86  |
|                     |                                                                         |- **TODO**: alpha, ia64, nds32, parisc, riscv               |
|                     |arch supports transparent hugepages                                      |- **Not compatible**: c6x, csky, h8300, hexagon, m68k       |
|                     |                                                                         |  microblaze, nios2, openrisc, sh, um, xtensa               |
+---------------------+-------------------------------------------------------------------------+------------------------------------------------------------+

Changing the order is one line patch (see enclosed).

If you think that reverting the order looks better, feel
free to apply the enclosed patch, or fold it with the
previous one.

Thanks,
Mauro

[PATCH] script: get_feat: change the group by order

Right now, arch compatibility is grouped by status at the
alphabetical order from A to Z, and then from a to z, e. g:.

	---
	TODO
	ok

Revert the order, in order to print first the OK results,
then TODO, and, finally, the not compatible ones.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

diff --git a/scripts/get_feat.pl b/scripts/get_feat.pl
index 10bf23fbc9c5..3f73c8534059 100755
--- a/scripts/get_feat.pl
+++ b/scripts/get_feat.pl
@@ -397,7 +397,7 @@ sub output_matrix {
 		my @lines;
 		my $line = "";
 		foreach my $arch (sort {
-					($arch_table{$a} cmp $arch_table{$b}) or
+					($arch_table{$b} cmp $arch_table{$a}) or
 					("\L$a" cmp "\L$b")
 				       } keys %arch_table) {
 


  reply	other threads:[~2020-12-04  9:53 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 15:36 [PATCH 0/6] Add documentation for Documentation/features at the built docs Mauro Carvalho Chehab
2020-11-30 15:36 ` [OpenRISC] " Mauro Carvalho Chehab
2020-11-30 15:36 ` Mauro Carvalho Chehab
2020-11-30 15:36 ` Mauro Carvalho Chehab
2020-11-30 15:36 ` Mauro Carvalho Chehab
2020-11-30 15:36 ` Mauro Carvalho Chehab
2020-11-30 15:36 ` [PATCH 1/6] scripts: get_feat.pl: add a script to handle Documentation/features Mauro Carvalho Chehab
2020-11-30 15:36 ` [PATCH 2/6] scripts: get_feat.pl: improve matrix output Mauro Carvalho Chehab
2020-11-30 15:36 ` [PATCH 3/6] scripts: get_feat.pl: use its implementation for list-arch.sh Mauro Carvalho Chehab
2020-11-30 15:36 ` [PATCH 4/6] sphinx: kernel_feat.py: add a script to parse feature files Mauro Carvalho Chehab
2020-11-30 15:36 ` [PATCH 5/6] docs: admin-guide: add a features list Mauro Carvalho Chehab
2020-11-30 15:36 ` [PATCH 6/6] docs: archis: add a per-architecture " Mauro Carvalho Chehab
2020-11-30 15:36   ` [OpenRISC] " Mauro Carvalho Chehab
2020-11-30 15:36   ` Mauro Carvalho Chehab
2020-11-30 15:36   ` Mauro Carvalho Chehab
2020-11-30 15:36   ` Mauro Carvalho Chehab
2020-11-30 15:36   ` Mauro Carvalho Chehab
2020-12-03 22:36 ` [PATCH 0/6] Add documentation for Documentation/features at the built docs Jonathan Corbet
2020-12-03 22:36   ` [OpenRISC] " Jonathan Corbet
2020-12-03 22:36   ` Jonathan Corbet
2020-12-03 22:36   ` Jonathan Corbet
2020-12-03 22:36   ` Jonathan Corbet
2020-12-03 22:36   ` Jonathan Corbet
2020-12-04  9:17   ` [PATCH] scripts: get_feat.pl: make complete table more coincise Mauro Carvalho Chehab
2020-12-04  9:26     ` [PATCH v2] " Mauro Carvalho Chehab
2020-12-04  9:35       ` [PATCH v3] " Mauro Carvalho Chehab
2020-12-04  9:52         ` Mauro Carvalho Chehab [this message]
2020-12-04 15:32   ` [PATCH v4 0/3] improve get_feat.pl output when all features are displayed Mauro Carvalho Chehab
2020-12-04 15:32     ` [PATCH v4 1/3] scripts: get_feat.pl: make complete table more coincise Mauro Carvalho Chehab
2020-12-04 15:32     ` [PATCH v4 2/3] scripts: get_feat.pl: change the group by order Mauro Carvalho Chehab
2020-12-04 15:32     ` [PATCH v4 3/3] scripts: get_feat.pl: reduce table width for all features output Mauro Carvalho Chehab
2020-12-04 21:48     ` [PATCH v4 0/3] improve get_feat.pl output when all features are displayed Jonathan Corbet
2020-12-05 16:03       ` Mauro Carvalho Chehab
2020-12-07  9:33         ` Mauro Carvalho Chehab
2020-12-07 11:34           ` Mauro Carvalho Chehab

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=20201204105202.3d5862a7@coco.lan \
    --to=mchehab+huawei@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.