€•I:Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ!/translations/zh_CN/kbuild/issues”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ!/translations/zh_TW/kbuild/issues”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ!/translations/it_IT/kbuild/issues”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ!/translations/ja_JP/kbuild/issues”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ!/translations/ko_KR/kbuild/issues”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ!/translations/sp_SP/kbuild/issues”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒRecursion issues”h]”hŒRecursion issues”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒ;/var/lib/git/docbuild/linux/Documentation/kbuild/issues.rst”h Kubh¢)”}”(hhh]”(h§)”}”(hŒissue #1”h]”hŒissue #1”…””}”(hhºhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh·hžhhŸh¶h KubhŒ literal_block”“”)”}”(hXË# Simple Kconfig recursive issue # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Test with: # # make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-01 allnoconfig # # This Kconfig file has a simple recursive dependency issue. In order to # understand why this recursive dependency issue occurs lets consider what # Kconfig needs to address. We iterate over what Kconfig needs to address # by stepping through the questions it needs to address sequentially. # # * What values are possible for CORE? # # CORE_BELL_A_ADVANCED selects CORE, which means that it influences the values # that are possible for CORE. So for example if CORE_BELL_A_ADVANCED is 'y', # CORE must be 'y' too. # # * What influences CORE_BELL_A_ADVANCED? # # As the name implies CORE_BELL_A_ADVANCED is an advanced feature of # CORE_BELL_A so naturally it depends on CORE_BELL_A. So if CORE_BELL_A is 'y' # we know CORE_BELL_A_ADVANCED can be 'y' too. # # * What influences CORE_BELL_A? # # CORE_BELL_A depends on CORE, so CORE influences CORE_BELL_A. # # But that is a problem, because this means that in order to determine # what values are possible for CORE we ended up needing to address questions # regarding possible values of CORE itself again. Answering the original # question of what are the possible values of CORE would make the kconfig # tools run in a loop. When this happens Kconfig exits and complains about # the "recursive dependency detected" error. # # Reading the Documentation/kbuild/Kconfig.recursion-issue-01 file it may be # obvious that an easy solution to this problem should just be the removal # of the "select CORE" from CORE_BELL_A_ADVANCED as that is implicit already # since CORE_BELL_A depends on CORE. Recursive dependency issues are not always # so trivial to resolve, we provide another example below of practical # implications of this recursive issue where the solution is perhaps not so # easy to understand. Note that matching semantics on the dependency on # CORE also consist of a solution to this recursive problem. mainmenu "Simple example to demo kconfig recursive dependency issue" config CORE tristate config CORE_BELL_A tristate depends on CORE config CORE_BELL_A_ADVANCED tristate depends on CORE_BELL_A select CORE ”h]”hXË# Simple Kconfig recursive issue # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Test with: # # make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-01 allnoconfig # # This Kconfig file has a simple recursive dependency issue. In order to # understand why this recursive dependency issue occurs lets consider what # Kconfig needs to address. We iterate over what Kconfig needs to address # by stepping through the questions it needs to address sequentially. # # * What values are possible for CORE? # # CORE_BELL_A_ADVANCED selects CORE, which means that it influences the values # that are possible for CORE. So for example if CORE_BELL_A_ADVANCED is 'y', # CORE must be 'y' too. # # * What influences CORE_BELL_A_ADVANCED? # # As the name implies CORE_BELL_A_ADVANCED is an advanced feature of # CORE_BELL_A so naturally it depends on CORE_BELL_A. So if CORE_BELL_A is 'y' # we know CORE_BELL_A_ADVANCED can be 'y' too. # # * What influences CORE_BELL_A? # # CORE_BELL_A depends on CORE, so CORE influences CORE_BELL_A. # # But that is a problem, because this means that in order to determine # what values are possible for CORE we ended up needing to address questions # regarding possible values of CORE itself again. Answering the original # question of what are the possible values of CORE would make the kconfig # tools run in a loop. When this happens Kconfig exits and complains about # the "recursive dependency detected" error. # # Reading the Documentation/kbuild/Kconfig.recursion-issue-01 file it may be # obvious that an easy solution to this problem should just be the removal # of the "select CORE" from CORE_BELL_A_ADVANCED as that is implicit already # since CORE_BELL_A depends on CORE. Recursive dependency issues are not always # so trivial to resolve, we provide another example below of practical # implications of this recursive issue where the solution is perhaps not so # easy to understand. Note that matching semantics on the dependency on # CORE also consist of a solution to this recursive problem. mainmenu "Simple example to demo kconfig recursive dependency issue" config CORE tristate config CORE_BELL_A tristate depends on CORE config CORE_BELL_A_ADVANCED tristate depends on CORE_BELL_A select CORE ”…””}”hhÊsbah}”(h]”h ]”h"]”h$]”h&]”Œsource”ŒK/var/lib/git/docbuild/linux/Documentation/kbuild/Kconfig.recursion-issue-01”Œ xml:space”Œpreserve”Œforce”‰Œlanguage”Œkconfig”Œhighlight_args”}”Œ linenostart”Ksuh1hÈhŸh¶h Khh·hžhubeh}”(h]”Œissue-1”ah ]”h"]”Œissue #1”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒissue #2”h]”hŒissue #2”…””}”(hhíhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hhêhžhhŸh¶h K ubhÉ)”}”(hX- # Cumulative Kconfig recursive issue # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Test with: # # make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-02 allnoconfig # # The recursive limitations with Kconfig has some non intuitive implications on # kconfig semantics which are documented here. One known practical implication # of the recursive limitation is that drivers cannot negate features from other # drivers if they share a common core requirement and use disjoint semantics to # annotate those requirements, ie, some drivers use "depends on" while others # use "select". For instance it means if a driver A and driver B share the same # core requirement, and one uses "select" while the other uses "depends on" to # annotate this, all features that driver A selects cannot now be negated by # driver B. # # A perhaps not so obvious implication of this is that, if semantics on these # core requirements are not carefully synced, as drivers evolve features # they select or depend on end up becoming shared requirements which cannot be # negated by other drivers. # # The example provided in Documentation/kbuild/Kconfig.recursion-issue-02 # describes a simple driver core layout of example features a kernel might # have. Let's assume we have some CORE functionality, then the kernel has a # series of bells and whistles it desires to implement, its not so advanced so # it only supports bells at this time: CORE_BELL_A and CORE_BELL_B. If # CORE_BELL_A has some advanced feature CORE_BELL_A_ADVANCED which selects # CORE_BELL_A then CORE_BELL_A ends up becoming a common BELL feature which # other bells in the system cannot negate. The reason for this issue is # due to the disjoint use of semantics on expressing each bell's relationship # with CORE, one uses "depends on" while the other uses "select". Another # more important reason is that kconfig does not check for dependencies listed # under 'select' for a symbol, when such symbols are selected kconfig them # as mandatory required symbols. For more details on the heavy handed nature # of select refer to Documentation/kbuild/Kconfig.select-break # # To fix this the "depends on CORE" must be changed to "select CORE", or the # "select CORE" must be changed to "depends on CORE". # # For an example real world scenario issue refer to the attempt to remove # "select FW_LOADER" [0], in the end the simple alternative solution to this # problem consisted on matching semantics with newly introduced features. # # [0] https://lore.kernel.org/r/1432241149-8762-1-git-send-email-mcgrof@do-not-panic.com mainmenu "Simple example to demo cumulative kconfig recursive dependency implication" config CORE tristate config CORE_BELL_A tristate depends on CORE config CORE_BELL_A_ADVANCED tristate select CORE_BELL_A config CORE_BELL_B tristate depends on !CORE_BELL_A select CORE ”h]”hX- # Cumulative Kconfig recursive issue # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Test with: # # make KBUILD_KCONFIG=Documentation/kbuild/Kconfig.recursion-issue-02 allnoconfig # # The recursive limitations with Kconfig has some non intuitive implications on # kconfig semantics which are documented here. One known practical implication # of the recursive limitation is that drivers cannot negate features from other # drivers if they share a common core requirement and use disjoint semantics to # annotate those requirements, ie, some drivers use "depends on" while others # use "select". For instance it means if a driver A and driver B share the same # core requirement, and one uses "select" while the other uses "depends on" to # annotate this, all features that driver A selects cannot now be negated by # driver B. # # A perhaps not so obvious implication of this is that, if semantics on these # core requirements are not carefully synced, as drivers evolve features # they select or depend on end up becoming shared requirements which cannot be # negated by other drivers. # # The example provided in Documentation/kbuild/Kconfig.recursion-issue-02 # describes a simple driver core layout of example features a kernel might # have. Let's assume we have some CORE functionality, then the kernel has a # series of bells and whistles it desires to implement, its not so advanced so # it only supports bells at this time: CORE_BELL_A and CORE_BELL_B. If # CORE_BELL_A has some advanced feature CORE_BELL_A_ADVANCED which selects # CORE_BELL_A then CORE_BELL_A ends up becoming a common BELL feature which # other bells in the system cannot negate. The reason for this issue is # due to the disjoint use of semantics on expressing each bell's relationship # with CORE, one uses "depends on" while the other uses "select". Another # more important reason is that kconfig does not check for dependencies listed # under 'select' for a symbol, when such symbols are selected kconfig them # as mandatory required symbols. For more details on the heavy handed nature # of select refer to Documentation/kbuild/Kconfig.select-break # # To fix this the "depends on CORE" must be changed to "select CORE", or the # "select CORE" must be changed to "depends on CORE". # # For an example real world scenario issue refer to the attempt to remove # "select FW_LOADER" [0], in the end the simple alternative solution to this # problem consisted on matching semantics with newly introduced features. # # [0] https://lore.kernel.org/r/1432241149-8762-1-git-send-email-mcgrof@do-not-panic.com mainmenu "Simple example to demo cumulative kconfig recursive dependency implication" config CORE tristate config CORE_BELL_A tristate depends on CORE config CORE_BELL_A_ADVANCED tristate select CORE_BELL_A config CORE_BELL_B tristate depends on !CORE_BELL_A select CORE ”…””}”hhûsbah}”(h]”h ]”h"]”h$]”h&]”Œsource”ŒK/var/lib/git/docbuild/linux/Documentation/kbuild/Kconfig.recursion-issue-02”hÚhÛh܉hÝŒkconfig”hß}”háKsuh1hÈhŸh¶h Khhêhžhubeh}”(h]”Œissue-2”ah ]”h"]”Œissue #2”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K ubeh}”(h]”Œrecursion-issues”ah ]”h"]”Œrecursion issues”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j@Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jjhçhäjjuŒ nametypes”}”(j‰hç‰j‰uh}”(jh£häh·jhêuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.