<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-op-linux/scripts/kconfig/menu.c, branch v4.17</title>
<subtitle>Talos™ II Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.17</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.17'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/'/>
<updated>2018-03-25T17:03:58+00:00</updated>
<entry>
<title>kconfig: Print reverse dependencies in groups</title>
<updated>2018-03-25T17:03:58+00:00</updated>
<author>
<name>Eugeniu Rosca</name>
<email>erosca@de.adit-jv.com</email>
</author>
<published>2018-02-24T15:24:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=d9119b5925a03b9a3191fa3e93b4091651d8ad25'/>
<id>urn:sha1:d9119b5925a03b9a3191fa3e93b4091651d8ad25</id>
<content type='text'>
Surprisingly or not, disabling a CONFIG option (which is assumed to
be unneeded) may be not so trivial. Especially it is not trivial, when
this CONFIG option is selected by a dozen of other configs. Before the
moment commit 1ccb27143360 ("kconfig: make "Selected by:" and
"Implied by:" readable") popped up in v4.16-rc1, it was an absolute pain
to break down the "Selected by" reverse dependency expression in order
to identify all those configs which select (IOW *do not allow
disabling*) a certain feature (assumed to be not needed).

This patch tries to make one step further by putting at users'
fingertips the revdep top level OR sub-expressions grouped/clustered by
the tristate value they evaluate to. This should allow the users to
directly concentrate on and tackle the _active_ reverse dependencies.

To give some numbers and quantify the complexity of certain reverse
dependencies, assuming commit 617aebe6a97e ("Merge tag
'usercopy-v4.16-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux"), ARCH=arm64
and vanilla arm64 defconfig, here is the top 10 CONFIG options with
the highest amount of top level "||" sub-expressions/tokens that make
up the final "Selected by" reverse dependency expression.

| Config            | All revdep | Active revdep |
|-------------------|------------|---------------|
| REGMAP_I2C        | 212        | 9             |
| CRC32             | 167        | 25            |
| FW_LOADER         | 128        | 5             |
| MFD_CORE          | 124        | 9             |
| FB_CFB_IMAGEBLIT  | 114        | 2             |
| FB_CFB_COPYAREA   | 111        | 2             |
| FB_CFB_FILLRECT   | 110        | 2             |
| SND_PCM           | 103        | 2             |
| CRYPTO_HASH       | 87         | 19            |
| WATCHDOG_CORE     | 86         | 6             |

The story behind the above is that users need to visually
review/evaluate 212 expressions which *potentially* select REGMAP_I2C
in order to identify the expressions which *actually* select REGMAP_I2C,
for a particular ARCH and for a particular defconfig used.

To make this experience smoother, change the way reverse dependencies
are displayed to the user from [1] to [2].

[1] Old representation of DMA_ENGINE_RAID:
  Selected by:
  - AMCC_PPC440SPE_ADMA [=n] &amp;&amp; DMADEVICES [=y] &amp;&amp; (440SPe || 440SP)
  - BCM_SBA_RAID [=m] &amp;&amp; DMADEVICES [=y] &amp;&amp; (ARM64 [=y] || ...
  - FSL_RAID [=n] &amp;&amp; DMADEVICES [=y] &amp;&amp; FSL_SOC &amp;&amp; ...
  - INTEL_IOATDMA [=n] &amp;&amp; DMADEVICES [=y] &amp;&amp; PCI [=y] &amp;&amp; X86_64
  - MV_XOR [=n] &amp;&amp; DMADEVICES [=y] &amp;&amp; (PLAT_ORION || ARCH_MVEBU [=y] ...
  - MV_XOR_V2 [=y] &amp;&amp; DMADEVICES [=y] &amp;&amp; ARM64 [=y]
  - XGENE_DMA [=n] &amp;&amp; DMADEVICES [=y] &amp;&amp; (ARCH_XGENE [=y] || ...
  - DMATEST [=n] &amp;&amp; DMADEVICES [=y] &amp;&amp; DMA_ENGINE [=y]

[2] New representation of DMA_ENGINE_RAID:
  Selected by [y]:
  - MV_XOR_V2 [=y] &amp;&amp; DMADEVICES [=y] &amp;&amp; ARM64 [=y]
  Selected by [m]:
  - BCM_SBA_RAID [=m] &amp;&amp; DMADEVICES [=y] &amp;&amp; (ARM64 [=y] || ...
  Selected by [n]:
  - AMCC_PPC440SPE_ADMA [=n] &amp;&amp; DMADEVICES [=y] &amp;&amp; (440SPe || ...
  - FSL_RAID [=n] &amp;&amp; DMADEVICES [=y] &amp;&amp; FSL_SOC &amp;&amp; ...
  - INTEL_IOATDMA [=n] &amp;&amp; DMADEVICES [=y] &amp;&amp; PCI [=y] &amp;&amp; X86_64
  - MV_XOR [=n] &amp;&amp; DMADEVICES [=y] &amp;&amp; (PLAT_ORION || ARCH_MVEBU [=y] ...
  - XGENE_DMA [=n] &amp;&amp; DMADEVICES [=y] &amp;&amp; (ARCH_XGENE [=y] || ...
  - DMATEST [=n] &amp;&amp; DMADEVICES [=y] &amp;&amp; DMA_ENGINE [=y]

Suggested-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Reviewed-by: Petr Vorel &lt;pvorel@suse.cz&gt;
Reviewed-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kconfig: clean-up reverse dependency help implementation</title>
<updated>2018-03-25T17:03:57+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-02-20T08:18:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=9a47ceec543bfb703fbe2f8d584850b582caf1a6'/>
<id>urn:sha1:9a47ceec543bfb703fbe2f8d584850b582caf1a6</id>
<content type='text'>
This commit splits out the special E_OR handling ('-' instead of '||')
into a dedicated helper expr_print_revdev().

Restore the original expr_print() prior to commit 1ccb27143360
("kconfig: make "Selected by:" and "Implied by:" readable").

This makes sense because:

  - We need to chop those expressions only when printing the reverse
    dependency, and only when E_OR is encountered

  - Otherwise, it should be printed as before, so fall back to
    expr_print()

This also improves the behavior; for a single line, it was previously
displayed in the same line as "Selected by", like this:

  Selected by: A [=n] &amp;&amp; B [=n]

This will be displayed in a new line, consistently:

  Selected by:
  - A [=n] &amp;&amp; B [=n]

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Petr Vorel &lt;pvorel@suse.cz&gt;
</content>
</entry>
<entry>
<title>kconfig: set SYMBOL_AUTO to the symbol marked with defconfig_list</title>
<updated>2018-03-02T00:20:44+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-02-16T18:38:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=f4bc1eefc1608e9a7d40f5fdfc3acd560ba6f477'/>
<id>urn:sha1:f4bc1eefc1608e9a7d40f5fdfc3acd560ba6f477</id>
<content type='text'>
The 'defconfig_list' is a weird attribute.  If the '.config' is
missing, conf_read_simple() iterates over all visible defaults,
then it uses the first one for which fopen() succeeds.

config DEFCONFIG_LIST
	string
	depends on !UML
	option defconfig_list
	default "/lib/modules/$UNAME_RELEASE/.config"
	default "/etc/kernel-config"
	default "/boot/config-$UNAME_RELEASE"
	default "$ARCH_DEFCONFIG"
	default "arch/$ARCH/defconfig"

However, like other symbols, the first visible default is always
written out to the .config file.  This might be different from what
has been actually used.

For example, on my machine, the third one "/boot/config-$UNAME_RELEASE"
is opened, like follows:

  $ rm .config
  $ make oldconfig 2&gt;/dev/null
  scripts/kconfig/conf  --oldconfig Kconfig
  #
  # using defaults found in /boot/config-4.4.0-112-generic
  #
  *
  * Restart config...
  *
  *
  * IRQ subsystem
  *
  Expose irq internals in debugfs (GENERIC_IRQ_DEBUGFS) [N/y/?] (NEW)

However, the resulted .config file contains the first one since it is
visible:

  $ grep CONFIG_DEFCONFIG_LIST .config
  CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

In order to stop confusing people, prevent this CONFIG option from
being written to the .config file.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
</content>
</entry>
<entry>
<title>kconfig: make "Selected by:" and "Implied by:" readable</title>
<updated>2018-01-25T12:53:00+00:00</updated>
<author>
<name>Petr Vorel</name>
<email>petr.vorel@gmail.com</email>
</author>
<published>2018-01-25T09:46:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=1ccb27143360bd2390a9a970e50709f858b53761'/>
<id>urn:sha1:1ccb27143360bd2390a9a970e50709f858b53761</id>
<content type='text'>
Reverse dependency expressions can get rather unwieldy, especially if
a symbol is selected by more than a handful of other symbols. I.e. it's
possible to have near endless expressions like:
   A &amp;&amp; B &amp;&amp; !C || D || F &amp;&amp; (G || H) || [...]

Chop these expressions into actually readable chunks:
   - A &amp;&amp; B &amp;&amp; !C
   - D
   - F &amp;&amp; (G || H)
   - [...]

I.e. transform the top level OR tokens into newlines and prepend each
line with a minus. This makes the "Selected by:" and "Implied by:" blurb
much easier to read. This is done only if there is more than one top
level OR. "Depends on:" and "Range :" were deliberately left as they are.

Based on idea from Paul Bolle.

Suggested-by: Paul Bolle &lt;pebolle@tiscali.nl&gt;
Signed-off-by: Petr Vorel &lt;petr.vorel@gmail.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kconfig: Clarify menu and 'if' dependency propagation</title>
<updated>2018-01-21T18:30:09+00:00</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-01-16T20:39:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=b53688014e33256d4e3c08e89e563974dca98a98'/>
<id>urn:sha1:b53688014e33256d4e3c08e89e563974dca98a98</id>
<content type='text'>
It is not obvious that the last two cases refer to menus and ifs,
respectively, in the conditional that sets 'parentdep'.

Automatic submenu creation is done later, so the parent can't be a
symbol here.

No functional changes. Only comments added.

Signed-off-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kconfig: Document 'if' flattening logic</title>
<updated>2018-01-21T16:49:30+00:00</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-01-14T14:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=9d1a9e8bc18bea94adfa716073df3ed83fc4e895'/>
<id>urn:sha1:9d1a9e8bc18bea94adfa716073df3ed83fc4e895</id>
<content type='text'>
It is not obvious that this might refer to an 'if', making the code
pretty cryptic:

	if (menu-&gt;list &amp;&amp; (!menu-&gt;prompt || !menu-&gt;prompt-&gt;text)) {

Kconfig keeps the 'if' menu nodes even after flattening. Reflect that in
the example to be accurate.

No functional changes. Only comments added.

Signed-off-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kconfig: Clarify choice dependency propagation</title>
<updated>2018-01-21T15:49:32+00:00</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-01-14T14:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=d3465af60f4471b7b6201928e709bc137fdbee3e'/>
<id>urn:sha1:d3465af60f4471b7b6201928e709bc137fdbee3e</id>
<content type='text'>
It's easy to miss that choices are special-cased to pass on their mode
as the parent dependency.

No functional changes. Only comments added.

Signed-off-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kconfig: Document SYMBOL_OPTIONAL logic</title>
<updated>2018-01-21T15:49:32+00:00</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-01-14T09:56:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=3e41ba05b6d60cd54e64639b308be62c12308a04'/>
<id>urn:sha1:3e41ba05b6d60cd54e64639b308be62c12308a04</id>
<content type='text'>
Not obvious, especially if you don't already know how choices are
implemented.

No functional changes. Only comments added.

Signed-off-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kconfig: drop 'boolean' keyword</title>
<updated>2018-01-21T15:49:29+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2017-12-15T15:38:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=b92d804a51796b77c7b2b11881b2700eaac88114'/>
<id>urn:sha1:b92d804a51796b77c7b2b11881b2700eaac88114</id>
<content type='text'>
No more users of this keyword.  Drop it according to the notice by
commit 6341e62b212a ("kconfig: use bool instead of boolean for type
definition attributes").

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Acked-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
</content>
</entry>
<entry>
<title>kconfig: Remove menu_end_entry()</title>
<updated>2018-01-21T15:49:28+00:00</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-10-08T22:14:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=df60f4b92d3d0b0b91267532ea2584e3b6b58b2f'/>
<id>urn:sha1:df60f4b92d3d0b0b91267532ea2584e3b6b58b2f</id>
<content type='text'>
menu_end_entry() is empty and completely unused as far as I can tell:

	$ git log -G menu_end_entry --oneline
	a02f057 [PATCH] kconfig: improve error handling in the parser
	1da177e Linux-2.6.12-rc2

Last one is the initial Git commit, where menu_end_entry() is empty as
well. I couldn't find anything that redefined it on Google either.

It might be a debugging helper for setting a breakpoint after each
config, menuconfig, and comment is parsed. IMO it hurts more than it
helps in that case by making the parsing code look more complicated at a
glance than it really is, and I suspect it doesn't get used much.

Tested by running the Kconfiglib test suite, which indirectly verifies
that the .config files generated by the C implementation for each
defconfig file in the kernel stays the same.

Signed-off-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
</feed>
