<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/scripts/kconfig/expr.c, branch v4.19-rc1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>kconfig: make unmet dependency warnings readable</title>
<updated>2018-03-25T17:04:06+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-03-13T09:56:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f8f69dc0b4e070d4a4d39889a85424913cc922d5'/>
<id>f8f69dc0b4e070d4a4d39889a85424913cc922d5</id>
<content type='text'>
Currently, the unmet dependency warnings end up with endlessly long
expressions, most of which are false positives.

Here is test code to demonstrate how it currently works.

[Test Case]

  config DEP1
          def_bool y

  config DEP2
          bool "DEP2"

  config A
          bool "A"
          select E

  config B
          bool "B"
          depends on DEP2
          select E

  config C
          bool "C"
          depends on DEP1 &amp;&amp; DEP2
          select E

  config D
          def_bool n
          select E

  config E
          bool
          depends on DEP1 &amp;&amp; DEP2

[Result]

  $ make config
  scripts/kconfig/conf  --oldaskconfig Kconfig
  *
  * Linux Kernel Configuration
  *
  DEP2 (DEP2) [N/y/?] (NEW) n
  A (A) [N/y/?] (NEW) y
  warning: (A &amp;&amp; B &amp;&amp; D) selects E which has unmet direct
  dependencies (DEP1 &amp;&amp; DEP2)

Here, I see some points to be improved.

First, '(A || B || D)' would make more sense than '(A &amp;&amp; B &amp;&amp; D)'.
I am not sure if this is intentional, but expr_simplify_unmet_dep()
turns OR expressions into AND, like follows:

        case E_OR:
                return expr_alloc_and(

Second, we see false positives.  'A' is a real unmet dependency.
'B' is false positive because 'DEP1' is fixed to 'y', and 'B' depends
on 'DEP2'.  'C' was correctly dropped by expr_simplify_unmet_dep().
'D' is also false positive because it has no chance to be enabled.
Current expr_simplify_unmet_dep() cannot avoid those false positives.

After all, I decided to use the same helpers as used for printing
reverse dependencies in the help.

With this commit, unreadable warnings (most of the reported symbols are
false positives) in the real world:

$ make ARCH=score allyesconfig
scripts/kconfig/conf  --allyesconfig Kconfig
warning: (HWSPINLOCK_QCOM &amp;&amp; AHCI_MTK &amp;&amp; STMMAC_PLATFORM &amp;&amp;
 DWMAC_IPQ806X &amp;&amp; DWMAC_LPC18XX &amp;&amp; DWMAC_OXNAS &amp;&amp; DWMAC_ROCKCHIP &amp;&amp;
 DWMAC_SOCFPGA &amp;&amp; DWMAC_STI &amp;&amp; TI_CPSW &amp;&amp; PINCTRL_GEMINI &amp;&amp;
 PINCTRL_OXNAS &amp;&amp; PINCTRL_ROCKCHIP &amp;&amp; PINCTRL_DOVE &amp;&amp;
 PINCTRL_ARMADA_37XX &amp;&amp; PINCTRL_STM32 &amp;&amp; S3C2410_WATCHDOG &amp;&amp;
 VIDEO_OMAP3 &amp;&amp; VIDEO_S5P_FIMC &amp;&amp; USB_XHCI_MTK &amp;&amp; RTC_DRV_AT91SAM9 &amp;&amp;
 LPC18XX_DMAMUX &amp;&amp; VIDEO_OMAP4 &amp;&amp; COMMON_CLK_GEMINI &amp;&amp;
 COMMON_CLK_ASPEED &amp;&amp; COMMON_CLK_NXP &amp;&amp; COMMON_CLK_OXNAS &amp;&amp;
 COMMON_CLK_BOSTON &amp;&amp; QCOM_ADSP_PIL &amp;&amp; QCOM_Q6V5_PIL &amp;&amp; QCOM_GSBI &amp;&amp;
 ATMEL_EBI &amp;&amp; ST_IRQCHIP &amp;&amp; RESET_IMX7 &amp;&amp; PHY_HI6220_USB &amp;&amp;
 PHY_RALINK_USB &amp;&amp; PHY_ROCKCHIP_PCIE &amp;&amp; PHY_DA8XX_USB) selects
 MFD_SYSCON which has unmet direct dependencies (HAS_IOMEM)
warning: (PINCTRL_AT91 &amp;&amp; PINCTRL_AT91PIO4 &amp;&amp; PINCTRL_OXNAS &amp;&amp;
 PINCTRL_PISTACHIO &amp;&amp; PINCTRL_PIC32 &amp;&amp; PINCTRL_MESON &amp;&amp;
 PINCTRL_NOMADIK &amp;&amp; PINCTRL_MTK &amp;&amp; PINCTRL_MT7622 &amp;&amp; GPIO_TB10X)
 selects OF_GPIO which has unmet direct dependencies (GPIOLIB &amp;&amp; OF &amp;&amp;
 HAS_IOMEM)
warning: (FAULT_INJECTION_STACKTRACE_FILTER &amp;&amp; LATENCYTOP &amp;&amp; LOCKDEP)
 selects FRAME_POINTER which has unmet direct dependencies
 (DEBUG_KERNEL &amp;&amp; (CRIS || M68K || FRV || UML || SUPERH || BLACKFIN ||
 MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS)

will be turned into:

$ make ARCH=score allyesconfig
scripts/kconfig/conf  --allyesconfig Kconfig

WARNING: unmet direct dependencies detected for MFD_SYSCON
  Depends on [n]: HAS_IOMEM [=n]
  Selected by [y]:
  - PINCTRL_STM32 [=y] &amp;&amp; PINCTRL [=y] &amp;&amp; (ARCH_STM32 ||
 COMPILE_TEST [=y]) &amp;&amp; OF [=y]
  - RTC_DRV_AT91SAM9 [=y] &amp;&amp; RTC_CLASS [=y] &amp;&amp; (ARCH_AT91 ||
 COMPILE_TEST [=y])
  - RESET_IMX7 [=y] &amp;&amp; RESET_CONTROLLER [=y]
  - PHY_HI6220_USB [=y] &amp;&amp; (ARCH_HISI &amp;&amp; ARM64 ||
 COMPILE_TEST [=y])
  - PHY_RALINK_USB [=y] &amp;&amp; (RALINK || COMPILE_TEST [=y])
  - PHY_ROCKCHIP_PCIE [=y] &amp;&amp; (ARCH_ROCKCHIP &amp;&amp; OF [=y] ||
 COMPILE_TEST [=y])

WARNING: unmet direct dependencies detected for OF_GPIO
  Depends on [n]: GPIOLIB [=y] &amp;&amp; OF [=y] &amp;&amp; HAS_IOMEM [=n]
  Selected by [y]:
  - PINCTRL_MTK [=y] &amp;&amp; PINCTRL [=y] &amp;&amp; (ARCH_MEDIATEK ||
 COMPILE_TEST [=y]) &amp;&amp; OF [=y]
  - PINCTRL_MT7622 [=y] &amp;&amp; PINCTRL [=y] &amp;&amp; (ARCH_MEDIATEK ||
 COMPILE_TEST [=y]) &amp;&amp; OF [=y] &amp;&amp; (ARM64 || COMPILE_TEST [=y])

WARNING: unmet direct dependencies detected for FRAME_POINTER
  Depends on [n]: DEBUG_KERNEL [=y] &amp;&amp; (CRIS || M68K || FRV || UML ||
 SUPERH || BLACKFIN || MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS [=n]
  Selected by [y]:
  - LATENCYTOP [=y] &amp;&amp; DEBUG_KERNEL [=y] &amp;&amp; STACKTRACE_SUPPORT [=y] &amp;&amp;
 PROC_FS [=y] &amp;&amp; !MIPS &amp;&amp; !PPC &amp;&amp; !S390 &amp;&amp; !MICROBLAZE &amp;&amp; !ARM_UNWIND &amp;&amp;
 !ARC &amp;&amp; !X86

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Petr Vorel &lt;petr.vorel@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, the unmet dependency warnings end up with endlessly long
expressions, most of which are false positives.

Here is test code to demonstrate how it currently works.

[Test Case]

  config DEP1
          def_bool y

  config DEP2
          bool "DEP2"

  config A
          bool "A"
          select E

  config B
          bool "B"
          depends on DEP2
          select E

  config C
          bool "C"
          depends on DEP1 &amp;&amp; DEP2
          select E

  config D
          def_bool n
          select E

  config E
          bool
          depends on DEP1 &amp;&amp; DEP2

[Result]

  $ make config
  scripts/kconfig/conf  --oldaskconfig Kconfig
  *
  * Linux Kernel Configuration
  *
  DEP2 (DEP2) [N/y/?] (NEW) n
  A (A) [N/y/?] (NEW) y
  warning: (A &amp;&amp; B &amp;&amp; D) selects E which has unmet direct
  dependencies (DEP1 &amp;&amp; DEP2)

Here, I see some points to be improved.

First, '(A || B || D)' would make more sense than '(A &amp;&amp; B &amp;&amp; D)'.
I am not sure if this is intentional, but expr_simplify_unmet_dep()
turns OR expressions into AND, like follows:

        case E_OR:
                return expr_alloc_and(

Second, we see false positives.  'A' is a real unmet dependency.
'B' is false positive because 'DEP1' is fixed to 'y', and 'B' depends
on 'DEP2'.  'C' was correctly dropped by expr_simplify_unmet_dep().
'D' is also false positive because it has no chance to be enabled.
Current expr_simplify_unmet_dep() cannot avoid those false positives.

After all, I decided to use the same helpers as used for printing
reverse dependencies in the help.

With this commit, unreadable warnings (most of the reported symbols are
false positives) in the real world:

$ make ARCH=score allyesconfig
scripts/kconfig/conf  --allyesconfig Kconfig
warning: (HWSPINLOCK_QCOM &amp;&amp; AHCI_MTK &amp;&amp; STMMAC_PLATFORM &amp;&amp;
 DWMAC_IPQ806X &amp;&amp; DWMAC_LPC18XX &amp;&amp; DWMAC_OXNAS &amp;&amp; DWMAC_ROCKCHIP &amp;&amp;
 DWMAC_SOCFPGA &amp;&amp; DWMAC_STI &amp;&amp; TI_CPSW &amp;&amp; PINCTRL_GEMINI &amp;&amp;
 PINCTRL_OXNAS &amp;&amp; PINCTRL_ROCKCHIP &amp;&amp; PINCTRL_DOVE &amp;&amp;
 PINCTRL_ARMADA_37XX &amp;&amp; PINCTRL_STM32 &amp;&amp; S3C2410_WATCHDOG &amp;&amp;
 VIDEO_OMAP3 &amp;&amp; VIDEO_S5P_FIMC &amp;&amp; USB_XHCI_MTK &amp;&amp; RTC_DRV_AT91SAM9 &amp;&amp;
 LPC18XX_DMAMUX &amp;&amp; VIDEO_OMAP4 &amp;&amp; COMMON_CLK_GEMINI &amp;&amp;
 COMMON_CLK_ASPEED &amp;&amp; COMMON_CLK_NXP &amp;&amp; COMMON_CLK_OXNAS &amp;&amp;
 COMMON_CLK_BOSTON &amp;&amp; QCOM_ADSP_PIL &amp;&amp; QCOM_Q6V5_PIL &amp;&amp; QCOM_GSBI &amp;&amp;
 ATMEL_EBI &amp;&amp; ST_IRQCHIP &amp;&amp; RESET_IMX7 &amp;&amp; PHY_HI6220_USB &amp;&amp;
 PHY_RALINK_USB &amp;&amp; PHY_ROCKCHIP_PCIE &amp;&amp; PHY_DA8XX_USB) selects
 MFD_SYSCON which has unmet direct dependencies (HAS_IOMEM)
warning: (PINCTRL_AT91 &amp;&amp; PINCTRL_AT91PIO4 &amp;&amp; PINCTRL_OXNAS &amp;&amp;
 PINCTRL_PISTACHIO &amp;&amp; PINCTRL_PIC32 &amp;&amp; PINCTRL_MESON &amp;&amp;
 PINCTRL_NOMADIK &amp;&amp; PINCTRL_MTK &amp;&amp; PINCTRL_MT7622 &amp;&amp; GPIO_TB10X)
 selects OF_GPIO which has unmet direct dependencies (GPIOLIB &amp;&amp; OF &amp;&amp;
 HAS_IOMEM)
warning: (FAULT_INJECTION_STACKTRACE_FILTER &amp;&amp; LATENCYTOP &amp;&amp; LOCKDEP)
 selects FRAME_POINTER which has unmet direct dependencies
 (DEBUG_KERNEL &amp;&amp; (CRIS || M68K || FRV || UML || SUPERH || BLACKFIN ||
 MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS)

will be turned into:

$ make ARCH=score allyesconfig
scripts/kconfig/conf  --allyesconfig Kconfig

WARNING: unmet direct dependencies detected for MFD_SYSCON
  Depends on [n]: HAS_IOMEM [=n]
  Selected by [y]:
  - PINCTRL_STM32 [=y] &amp;&amp; PINCTRL [=y] &amp;&amp; (ARCH_STM32 ||
 COMPILE_TEST [=y]) &amp;&amp; OF [=y]
  - RTC_DRV_AT91SAM9 [=y] &amp;&amp; RTC_CLASS [=y] &amp;&amp; (ARCH_AT91 ||
 COMPILE_TEST [=y])
  - RESET_IMX7 [=y] &amp;&amp; RESET_CONTROLLER [=y]
  - PHY_HI6220_USB [=y] &amp;&amp; (ARCH_HISI &amp;&amp; ARM64 ||
 COMPILE_TEST [=y])
  - PHY_RALINK_USB [=y] &amp;&amp; (RALINK || COMPILE_TEST [=y])
  - PHY_ROCKCHIP_PCIE [=y] &amp;&amp; (ARCH_ROCKCHIP &amp;&amp; OF [=y] ||
 COMPILE_TEST [=y])

WARNING: unmet direct dependencies detected for OF_GPIO
  Depends on [n]: GPIOLIB [=y] &amp;&amp; OF [=y] &amp;&amp; HAS_IOMEM [=n]
  Selected by [y]:
  - PINCTRL_MTK [=y] &amp;&amp; PINCTRL [=y] &amp;&amp; (ARCH_MEDIATEK ||
 COMPILE_TEST [=y]) &amp;&amp; OF [=y]
  - PINCTRL_MT7622 [=y] &amp;&amp; PINCTRL [=y] &amp;&amp; (ARCH_MEDIATEK ||
 COMPILE_TEST [=y]) &amp;&amp; OF [=y] &amp;&amp; (ARM64 || COMPILE_TEST [=y])

WARNING: unmet direct dependencies detected for FRAME_POINTER
  Depends on [n]: DEBUG_KERNEL [=y] &amp;&amp; (CRIS || M68K || FRV || UML ||
 SUPERH || BLACKFIN || MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS [=n]
  Selected by [y]:
  - LATENCYTOP [=y] &amp;&amp; DEBUG_KERNEL [=y] &amp;&amp; STACKTRACE_SUPPORT [=y] &amp;&amp;
 PROC_FS [=y] &amp;&amp; !MIPS &amp;&amp; !PPC &amp;&amp; !S390 &amp;&amp; !MICROBLAZE &amp;&amp; !ARM_UNWIND &amp;&amp;
 !ARC &amp;&amp; !X86

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Petr Vorel &lt;petr.vorel@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<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.toradex.cn/cgit/linux-toradex.git/commit/?id=d9119b5925a03b9a3191fa3e93b4091651d8ad25'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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.toradex.cn/cgit/linux-toradex.git/commit/?id=9a47ceec543bfb703fbe2f8d584850b582caf1a6'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>kconfig: send error messages to stderr</title>
<updated>2018-02-08T19:10:10+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-02-06T00:34:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9e3e10c725360b9d07018cfcd5b7b6b7d325fae5'/>
<id>9e3e10c725360b9d07018cfcd5b7b6b7d325fae5</id>
<content type='text'>
These messages should be directed to stderr.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These messages should be directed to stderr.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'kconfig-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild</title>
<updated>2018-02-01T19:45:49+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-02-01T19:45:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=562f36ed28e6faa4245ea2ca1392d90ab98ebbe8'/>
<id>562f36ed28e6faa4245ea2ca1392d90ab98ebbe8</id>
<content type='text'>
Pull Kconfig updates from Masahiro Yamada:
 "A pretty big batch of Kconfig updates.

  I have to mention the lexer and parser of Kconfig are now built from
  real .l and .y sources. So, flex and bison are the requirement for
  building the kernel. Both of them (unlike gperf) have been stable for
  a long time. This change has been tested several weeks in linux-next,
  and I did not receive any problem report about this.

  Summary:

   - add checks for mistakes, like the choice default is not in choice,
     help is doubled

   - document data structure and complex code

   - fix various memory leaks

   - change Makefile to build lexer and parser instead of using
     pre-generated C files

   - drop 'boolean' keyword, which is equivalent to 'bool'

   - use default 'yy' prefix and remove unneeded Make variables

   - fix gettext() check for xconfig

   - announce that oldnoconfig will be finally removed

   - make 'Selected by:' and 'Implied by' readable in help and search
     result

   - hide silentoldconfig from 'make help' to stop confusing people

   - fix misc things and cleanups"

* tag 'kconfig-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (37 commits)
  kconfig: Remove silentoldconfig from help and docs; fix kconfig/conf's help
  kconfig: make "Selected by:" and "Implied by:" readable
  kconfig: announce removal of oldnoconfig if used
  kconfig: fix make xconfig when gettext is missing
  kconfig: Clarify menu and 'if' dependency propagation
  kconfig: Document 'if' flattening logic
  kconfig: Clarify choice dependency propagation
  kconfig: Document SYMBOL_OPTIONAL logic
  kbuild: remove unnecessary LEX_PREFIX and YACC_PREFIX
  kconfig: use default 'yy' prefix for lexer and parser
  kconfig: make conf_unsaved a local variable of conf_read()
  kconfig: make xfgets() really static
  kconfig: make input_mode static
  kconfig: Warn if there is more than one help text
  kconfig: drop 'boolean' keyword
  kconfig: use bool instead of boolean for type definition attributes, again
  kconfig: Remove menu_end_entry()
  kconfig: Document important expression functions
  kconfig: Document automatic submenu creation code
  kconfig: Fix choice symbol expression leak
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull Kconfig updates from Masahiro Yamada:
 "A pretty big batch of Kconfig updates.

  I have to mention the lexer and parser of Kconfig are now built from
  real .l and .y sources. So, flex and bison are the requirement for
  building the kernel. Both of them (unlike gperf) have been stable for
  a long time. This change has been tested several weeks in linux-next,
  and I did not receive any problem report about this.

  Summary:

   - add checks for mistakes, like the choice default is not in choice,
     help is doubled

   - document data structure and complex code

   - fix various memory leaks

   - change Makefile to build lexer and parser instead of using
     pre-generated C files

   - drop 'boolean' keyword, which is equivalent to 'bool'

   - use default 'yy' prefix and remove unneeded Make variables

   - fix gettext() check for xconfig

   - announce that oldnoconfig will be finally removed

   - make 'Selected by:' and 'Implied by' readable in help and search
     result

   - hide silentoldconfig from 'make help' to stop confusing people

   - fix misc things and cleanups"

* tag 'kconfig-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (37 commits)
  kconfig: Remove silentoldconfig from help and docs; fix kconfig/conf's help
  kconfig: make "Selected by:" and "Implied by:" readable
  kconfig: announce removal of oldnoconfig if used
  kconfig: fix make xconfig when gettext is missing
  kconfig: Clarify menu and 'if' dependency propagation
  kconfig: Document 'if' flattening logic
  kconfig: Clarify choice dependency propagation
  kconfig: Document SYMBOL_OPTIONAL logic
  kbuild: remove unnecessary LEX_PREFIX and YACC_PREFIX
  kconfig: use default 'yy' prefix for lexer and parser
  kconfig: make conf_unsaved a local variable of conf_read()
  kconfig: make xfgets() really static
  kconfig: make input_mode static
  kconfig: Warn if there is more than one help text
  kconfig: drop 'boolean' keyword
  kconfig: use bool instead of boolean for type definition attributes, again
  kconfig: Remove menu_end_entry()
  kconfig: Document important expression functions
  kconfig: Document automatic submenu creation code
  kconfig: Fix choice symbol expression leak
  ...
</pre>
</div>
</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.toradex.cn/cgit/linux-toradex.git/commit/?id=1ccb27143360bd2390a9a970e50709f858b53761'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>kconfig: Document important expression functions</title>
<updated>2018-01-21T15:49:28+00:00</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-10-08T17:50:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0735f7e5def2ab4158aac8d35f3661e8819dc232'/>
<id>0735f7e5def2ab4158aac8d35f3661e8819dc232</id>
<content type='text'>
Many of these functions are quite the head scratchers if you don't know
what they're trying to do. Document them.

Also make it clear which functions rewrite expressions in-place and
which return new expressions. This prevents memory errors.

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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many of these functions are quite the head scratchers if you don't know
what they're trying to do. Document them.

Also make it clear which functions rewrite expressions in-place and
which return new expressions. This prevents memory errors.

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;
</pre>
</div>
</content>
</entry>
<entry>
<title>kconfig: Fix expr_free() E_NOT leak</title>
<updated>2018-01-21T15:49:27+00:00</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-10-08T17:35:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5b1374b3b3c2fc4f63a398adfa446fb8eff791a4'/>
<id>5b1374b3b3c2fc4f63a398adfa446fb8eff791a4</id>
<content type='text'>
Only the E_NOT operand and not the E_NOT node itself was freed, due to
accidentally returning too early in expr_free(). Outline of leak:

	switch (e-&gt;type) {
	...
	case E_NOT:
		expr_free(e-&gt;left.expr);
		return;
	...
	}
	*Never reached, 'e' leaked*
	free(e);

Fix by changing the 'return' to a 'break'.

Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix:

	LEAK SUMMARY:
	   definitely lost: 44,448 bytes in 1,852 blocks
	   ...

Summary after the fix:

	LEAK SUMMARY:
	   definitely lost: 1,608 bytes in 67 blocks
	   ...

Signed-off-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only the E_NOT operand and not the E_NOT node itself was freed, due to
accidentally returning too early in expr_free(). Outline of leak:

	switch (e-&gt;type) {
	...
	case E_NOT:
		expr_free(e-&gt;left.expr);
		return;
	...
	}
	*Never reached, 'e' leaked*
	free(e);

Fix by changing the 'return' to a 'break'.

Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix:

	LEAK SUMMARY:
	   definitely lost: 44,448 bytes in 1,852 blocks
	   ...

Summary after the fix:

	LEAK SUMMARY:
	   definitely lost: 1,608 bytes in 67 blocks
	   ...

Signed-off-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kconfig: fix relational operators for bool and tristate symbols</title>
<updated>2018-01-05T17:31:23+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>nicolas.pitre@linaro.org</email>
</author>
<published>2017-11-17T01:06:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9059a3493efea6492451430c7e2fa0af799a2abb'/>
<id>9059a3493efea6492451430c7e2fa0af799a2abb</id>
<content type='text'>
Since commit 31847b67bec0 ("kconfig: allow use of relations other than
(in)equality") it is possible to use relational operators in Kconfig
statements. However, those operators give unexpected results when
applied to bool/tristate values:

	(n &lt; y) = y (correct)
	(m &lt; y) = y (correct)
	(n &lt; m) = n (wrong)

This happens because relational operators process bool and tristate
symbols as strings and m sorts before n. It makes little sense to do a
lexicographical compare on bool and tristate values though.

Documentation/kbuild/kconfig-language.txt states that expression can have
a value of 'n', 'm' or 'y' (or 0, 1, 2 respectively for calculations).
Let's make it so for relational comparisons with bool/tristate
expressions as well and document them. If at least one symbol is an
actual string then the lexicographical compare works just as before.

Signed-off-by: Nicolas Pitre &lt;nico@linaro.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 31847b67bec0 ("kconfig: allow use of relations other than
(in)equality") it is possible to use relational operators in Kconfig
statements. However, those operators give unexpected results when
applied to bool/tristate values:

	(n &lt; y) = y (correct)
	(m &lt; y) = y (correct)
	(n &lt; m) = n (wrong)

This happens because relational operators process bool and tristate
symbols as strings and m sorts before n. It makes little sense to do a
lexicographical compare on bool and tristate values though.

Documentation/kbuild/kconfig-language.txt states that expression can have
a value of 'n', 'm' or 'y' (or 0, 1, 2 respectively for calculations).
Let's make it so for relational comparisons with bool/tristate
expressions as well and document them. If at least one symbol is an
actual string then the lexicographical compare works just as before.

Signed-off-by: Nicolas Pitre &lt;nico@linaro.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kconfig: Fix copy&amp;paste error</title>
<updated>2015-10-20T17:13:14+00:00</updated>
<author>
<name>Michal Sojka</name>
<email>sojkam1@fel.cvut.cz</email>
</author>
<published>2015-10-19T14:51:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f6aad2615c8c4ed806e70693adacb6c93f13564a'/>
<id>f6aad2615c8c4ed806e70693adacb6c93f13564a</id>
<content type='text'>
Fixes: 31847b67bec0 ("kconfig: allow use of relations other than (in)equality")
Signed-off-by: Michal Sojka &lt;sojkam1@fel.cvut.cz&gt;
Reviewed-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: 31847b67bec0 ("kconfig: allow use of relations other than (in)equality")
Signed-off-by: Michal Sojka &lt;sojkam1@fel.cvut.cz&gt;
Reviewed-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</pre>
</div>
</content>
</entry>
</feed>
