€•×'Œ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/arch/sh/register-banks”Œ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/arch/sh/register-banks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/it_IT/arch/sh/register-banks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ja_JP/arch/sh/register-banks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ*/translations/ko_KR/arch/sh/register-banks”Œ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/arch/sh/register-banks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒD/var/lib/git/docbuild/linux/Documentation/arch/sh/register-banks.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ*Notes on register bank usage in the kernel”h]”hŒ*Notes on register bank usage in the kernel”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ Introduction”h]”hŒ Introduction”…””}”(hhÌhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hhÉhžhhŸh³h KubhŒ paragraph”“”)”}”(hŒåThe SH-3 and SH-4 CPU families traditionally include a single partial register bank (selected by SR.RB, only r0 ... r7 are banked), whereas other families may have more full-featured banking or simply no such capabilities at all.”h]”hŒåThe SH-3 and SH-4 CPU families traditionally include a single partial register bank (selected by SR.RB, only r0 ... r7 are banked), whereas other families may have more full-featured banking or simply no such capabilities at all.”…””}”(hhÜhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K hhÉhžhubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ SR.RB banking”h]”hŒ SR.RB banking”…””}”(hhõhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hhòhžhhŸh³h KubhÛ)”}”(hX In the case of this type of banking, banked registers are mapped directly to r0 ... r7 if SR.RB is set to the bank we are interested in, otherwise ldc/stc can still be used to reference the banked registers (as r0_bank ... r7_bank) when in the context of another bank. The developer must keep the SR.RB value in mind when writing code that utilizes these banked registers, for obvious reasons. Userspace is also not able to poke at the bank1 values, so these can be used rather effectively as scratch registers by the kernel.”h]”hX In the case of this type of banking, banked registers are mapped directly to r0 ... r7 if SR.RB is set to the bank we are interested in, otherwise ldc/stc can still be used to reference the banked registers (as r0_bank ... r7_bank) when in the context of another bank. The developer must keep the SR.RB value in mind when writing code that utilizes these banked registers, for obvious reasons. Userspace is also not able to poke at the bank1 values, so these can be used rather effectively as scratch registers by the kernel.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KhhòhžhubhÛ)”}”(hŒ5Presently the kernel uses several of these registers.”h]”hŒ5Presently the kernel uses several of these registers.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KhhòhžhubhŒ block_quote”“”)”}”(hXà- r0_bank, r1_bank (referenced as k0 and k1, used for scratch registers when doing exception handling). - r2_bank (used to track the EXPEVT/INTEVT code) - Used by do_IRQ() and friends for doing irq mapping based off of the interrupt exception vector jump table offset - r6_bank (global interrupt mask) - The SR.IMASK interrupt handler makes use of this to set the interrupt priority level (used by local_irq_enable()) - r7_bank (current)”h]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒfr0_bank, r1_bank (referenced as k0 and k1, used for scratch registers when doing exception handling). ”h]”hÛ)”}”(hŒer0_bank, r1_bank (referenced as k0 and k1, used for scratch registers when doing exception handling).”h]”hŒer0_bank, r1_bank (referenced as k0 and k1, used for scratch registers when doing exception handling).”…””}”(hj0hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h Khj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1j*hj'ubj+)”}”(hŒ±r2_bank (used to track the EXPEVT/INTEVT code) - Used by do_IRQ() and friends for doing irq mapping based off of the interrupt exception vector jump table offset ”h]”(hÛ)”}”(hŒ.r2_bank (used to track the EXPEVT/INTEVT code)”h]”hŒ.r2_bank (used to track the EXPEVT/INTEVT code)”…””}”(hjHhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KhjDubj )”}”(hŒu- Used by do_IRQ() and friends for doing irq mapping based off of the interrupt exception vector jump table offset ”h]”j&)”}”(hhh]”j+)”}”(hŒqUsed by do_IRQ() and friends for doing irq mapping based off of the interrupt exception vector jump table offset ”h]”hÛ)”}”(hŒpUsed by do_IRQ() and friends for doing irq mapping based off of the interrupt exception vector jump table offset”h]”hŒpUsed by do_IRQ() and friends for doing irq mapping based off of the interrupt exception vector jump table offset”…””}”(hjahžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K hj]ubah}”(h]”h ]”h"]”h$]”h&]”uh1j*hjZubah}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j%hŸh³h K hjVubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh³h K hjDubeh}”(h]”h ]”h"]”h$]”h&]”uh1j*hj'ubj+)”}”(hŒ£r6_bank (global interrupt mask) - The SR.IMASK interrupt handler makes use of this to set the interrupt priority level (used by local_irq_enable()) ”h]”(hÛ)”}”(hŒr6_bank (global interrupt mask)”h]”hŒr6_bank (global interrupt mask)”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K#hj‰ubj )”}”(hŒv- The SR.IMASK interrupt handler makes use of this to set the interrupt priority level (used by local_irq_enable()) ”h]”j&)”}”(hhh]”j+)”}”(hŒrThe SR.IMASK interrupt handler makes use of this to set the interrupt priority level (used by local_irq_enable()) ”h]”hÛ)”}”(hŒqThe SR.IMASK interrupt handler makes use of this to set the interrupt priority level (used by local_irq_enable())”h]”hŒqThe SR.IMASK interrupt handler makes use of this to set the interrupt priority level (used by local_irq_enable())”…””}”(hj¦hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K%hj¢ubah}”(h]”h ]”h"]”h$]”h&]”uh1j*hjŸubah}”(h]”h ]”h"]”h$]”h&]”j{j|uh1j%hŸh³h K%hj›ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh³h K%hj‰ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j*hj'ubj+)”}”(hŒr7_bank (current)”h]”hÛ)”}”(hjÎh]”hŒr7_bank (current)”…””}”(hjÐhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K(hjÌubah}”(h]”h ]”h"]”h$]”h&]”uh1j*hj'ubeh}”(h]”h ]”h"]”h$]”h&]”j{j|uh1j%hŸh³h Khj!ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸh³h Khhòhžhubeh}”(h]”Œ sr-rb-banking”ah ]”h"]”Œ sr.rb banking”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubeh}”(h]”Œ*notes-on-register-bank-usage-in-the-kernel”ah ]”h"]”Œ*notes on register bank usage in the kernel”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”}”(jüjùhïhìjôjñuŒ nametypes”}”(jü‰hï‰jô‰uh}”(jùh¶hìhÉjñhò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.