···403403.. note::404404405405 Implementation details for the powerpc platform are discussed in406406- the file Documentation/powerpc/eeh-pci-error-recovery.txt406406+ the file Documentation/powerpc/eeh-pci-error-recovery.rst407407408408 As of this writing, there is a growing list of device drivers with409409 patches implementing error recovery. Not all of these patches are in···422422 - drivers/net/cxgb3423423 - drivers/net/s2io.c424424 - drivers/net/qlge425425+426426+The End427427+-------
+1-1
Documentation/RCU/rculist_nulls.txt
···11Using hlist_nulls to protect read-mostly linked lists and22objects using SLAB_TYPESAFE_BY_RCU allocations.3344-Please read the basics in Documentation/RCU/listRCU.txt44+Please read the basics in Documentation/RCU/listRCU.rst5566Using special makers (called 'nulls') is a convenient way77to solve following problem :
-10
Documentation/admin-guide/conf.py
···11-# -*- coding: utf-8; mode: python -*-22-33-project = 'Linux Kernel User Documentation'44-55-tags.add("subproject")66-77-latex_documents = [88- ('index', 'linux-user.tex', 'Linux Kernel User Documentation',99- 'The kernel development community', 'manual'),1010-]
+29-1
Documentation/conf.py
···1616import os1717import sphinx18181919+from subprocess import check_output2020+1921# Get Sphinx version2022major, minor, patch = sphinx.version_info[:3]2123···278276 \\setsansfont{DejaVu Sans}279277 \\setromanfont{DejaVu Serif}280278 \\setmonofont{DejaVu Sans Mono}281281-282279 '''283280}281281+282282+# At least one book (translations) may have Asian characters283283+# with are only displayed if xeCJK is used284284+285285+cjk_cmd = check_output(['fc-list', '--format="%{family[0]}\n"']).decode('utf-8', 'ignore')286286+if cjk_cmd.find("Noto Sans CJK SC") >= 0:287287+ print ("enabling CJK for LaTeX builder")288288+ latex_elements['preamble'] += '''289289+ % This is needed for translations290290+ \\usepackage{xeCJK}291291+ \\setCJKmainfont{Noto Sans CJK SC}292292+ '''284293285294# Fix reference escape troubles with Sphinx 1.4.x286295if major == 1 and minor > 3:···422409 ('userspace-api/index', 'userspace-api.tex', 'The Linux kernel user-space API guide',423410 'The kernel development community', 'manual'),424411]412412+413413+# Add all other index files from Documentation/ subdirectories414414+for fn in os.listdir('.'):415415+ doc = os.path.join(fn, "index")416416+ if os.path.exists(doc + ".rst"):417417+ has = False418418+ for l in latex_documents:419419+ if l[0] == doc:420420+ has = True421421+ break422422+ if not has:423423+ latex_documents.append((doc, fn + '.tex',424424+ 'Linux %s Documentation' % fn.capitalize(),425425+ 'The kernel development community',426426+ 'manual'))425427426428# The name of an image file (relative to this directory) to place at the top of427429# the title page.
-10
Documentation/core-api/conf.py
···11-# -*- coding: utf-8; mode: python -*-22-33-project = "Core-API Documentation"44-55-tags.add("subproject")66-77-latex_documents = [88- ('index', 'core-api.tex', project,99- 'The kernel development community', 'manual'),1010-]
-10
Documentation/crypto/conf.py
···11-# -*- coding: utf-8; mode: python -*-22-33-project = 'Linux Kernel Crypto API'44-55-tags.add("subproject")66-77-latex_documents = [88- ('index', 'crypto-api.tex', 'Linux Kernel Crypto API manual',99- 'The kernel development community', 'manual'),1010-]
-10
Documentation/dev-tools/conf.py
···11-# -*- coding: utf-8; mode: python -*-22-33-project = "Development tools for the kernel"44-55-tags.add("subproject")66-77-latex_documents = [88- ('index', 'dev-tools.tex', project,99- 'The kernel development community', 'manual'),1010-]
···11-# -*- coding: utf-8; mode: python -*-22-33-project = "The Linux driver implementer's API guide"44-55-tags.add("subproject")66-77-latex_documents = [88- ('index', 'driver-api.tex', project,99- 'The kernel development community', 'manual'),1010-]
-10
Documentation/driver-api/pm/conf.py
···11-# -*- coding: utf-8; mode: python -*-22-33-project = "Device Power Management"44-55-tags.add("subproject")66-77-latex_documents = [88- ('index', 'pm.tex', project,99- 'The kernel development community', 'manual'),1010-]
···8282**changes** the list will have to get the write lock.83838484 NOTE! RCU is better for list traversal, but requires careful8585- attention to design detail (see Documentation/RCU/listRCU.txt).8585+ attention to design detail (see Documentation/RCU/listRCU.rst).86868787Also, you cannot "upgrade" a read-lock to a write-lock, so if you at _any_8888time need to do any changes (even if you don't do it every time), you have···90909191 NOTE! We are working hard to remove reader-writer spinlocks in most9292 cases, so please don't add a new one without consensus. (Instead, see9393- Documentation/RCU/rcu.txt for complete information.)9393+ Documentation/RCU/rcu.rst for complete information.)94949595----9696
-10
Documentation/maintainer/conf.py
···11-# -*- coding: utf-8; mode: python -*-22-33-project = 'Linux Kernel Development Documentation'44-55-tags.add("subproject")66-77-latex_documents = [88- ('index', 'maintainer.tex', 'Linux Kernel Development Documentation',99- 'The kernel development community', 'manual'),1010-]
-12
Documentation/media/conf.py
···11-# -*- coding: utf-8; mode: python -*-22-33-# SPDX-License-Identifier: GPL-2.044-55-project = 'Linux Media Subsystem Documentation'66-77-tags.add("subproject")88-99-latex_documents = [1010- ('index', 'media.tex', 'Linux Media Subsystem Documentation',1111- 'The kernel development community', 'manual'),1212-]
+1-1
Documentation/memory-barriers.txt
···548548549549 [*] For information on bus mastering DMA and coherency please read:550550551551- Documentation/PCI/pci.rst551551+ Documentation/driver-api/pci/pci.rst552552 Documentation/DMA-API-HOWTO.txt553553 Documentation/DMA-API.txt554554
···11+=====================12DAWR issues on POWER922-============================33+=====================3445On POWER9 the Data Address Watchpoint Register (DAWR) can cause a checkstop56if it points to cache inhibited (CI) memory. Currently Linux has no way to67disinguish CI memory when configuring the DAWR, so (for now) the DAWR is77-disabled by this commit:88+disabled by this commit::89910 commit 9654153158d3e0684a1bdb76dbababdb7111d5a01011 Author: Michael Neuling <mikey@neuling.org>···1312 powerpc: Disable DAWR in the base POWER9 CPU features14131514Technical Details:1616-============================1515+==================17161817DAWR has 6 different ways of being set.19181) ptrace···3837For xmon, the 'bd' command will return an error on P9.39384039Consequences for users4141-============================4040+======================42414342For GDB watchpoints (ie 'watch' command) on POWER9 bare metal , GDB4443will accept the command. Unfortunately since there is no hardware···5857migrated back to the POWER8 host, it will start working again.59586059Force enabling the DAWR6161-=============================6262-Kernels (since ~v5.2) have an option to force enable the DAWR via:6060+=======================6161+Kernels (since ~v5.2) have an option to force enable the DAWR via::63626463 echo Y > /sys/kernel/debug/powerpc/dawr_enable_dangerous6564···8786writing the DAWR.88878988To double check the DAWR is working, run this kernel selftest:8989+9090 tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c9191+9192Any errors/failures/skips mean something is wrong.
···11+========================12The PowerPC boot wrapper22-------------------------33+========================44+35Copyright (C) Secret Lab Technologies Ltd.4657PowerPC image targets compresses and wraps the kernel image (vmlinux) with···2321image. The details of the build system is discussed in the next section.2422Currently, the following image format targets exist:25232424+ ==================== ========================================================2625 cuImage.%: Backwards compatible uImage for older version of2726 U-Boot (for versions that don't understand the device2827 tree). This image embeds a device tree blob inside···3229 with boot wrapper code that extracts data from the old3330 bd_info structure and loads the data into the device3431 tree before jumping into the kernel.3535- Because of the series of #ifdefs found in the3232+3333+ Because of the series of #ifdefs found in the3634 bd_info structure used in the old U-Boot interfaces,3735 cuImages are platform specific. Each specific3836 U-Boot platform has a different platform init file3937 which populates the embedded device tree with data4038 from the platform specific bd_info file. The platform4139 specific cuImage platform init code can be found in4242- arch/powerpc/boot/cuboot.*.c. Selection of the correct4040+ `arch/powerpc/boot/cuboot.*.c`. Selection of the correct4341 cuImage init code for a specific board can be found in4442 the wrapper structure.4343+4544 dtbImage.%: Similar to zImage, except device tree blob is embedded4645 inside the image instead of provided by firmware. The4746 output image file can be either an elf file or a flat4847 binary depending on the platform.4949- dtbImages are used on systems which do not have an4848+4949+ dtbImages are used on systems which do not have an5050 interface for passing a device tree directly.5151 dtbImages are similar to simpleImages except that5252 dtbImages have platform specific code for extracting5353 data from the board firmware, but simpleImages do not5454 talk to the firmware at all.5555- PlayStation 3 support uses dtbImage. So do Embedded5555+5656+ PlayStation 3 support uses dtbImage. So do Embedded5657 Planet boards using the PlanetCore firmware. Board5758 specific initialization code is typically found in a5859 file named arch/powerpc/boot/<platform>.c; but this5960 can be overridden by the wrapper script.6161+6062 simpleImage.%: Firmware independent compressed image that does not6163 depend on any particular firmware interface and embeds6264 a device tree blob. This image is a flat binary that···6961 Firmware cannot pass any configuration data to the7062 kernel with this image type and it depends entirely on7163 the embedded device tree for all information.7272- The simpleImage is useful for booting systems with6464+6565+ The simpleImage is useful for booting systems with7366 an unknown firmware interface or for booting from7467 a debugger when no firmware is present (such as on7568 the Xilinx Virtex platform). The only assumption that7669 simpleImage makes is that RAM is correctly initialized7770 and that the MMU is either off or has RAM mapped to7871 base address 0.7979- simpleImage also supports inserting special platform7272+7373+ simpleImage also supports inserting special platform8074 specific initialization code to the start of the bootup8175 sequence. The virtex405 platform uses this feature to8276 ensure that the cache is invalidated before caching···9181 named (virtex405-<board>.dts). Search the wrapper9282 script for 'virtex405' and see the file9383 arch/powerpc/boot/virtex405-head.S for details.8484+9485 treeImage.%; Image format for used with OpenBIOS firmware found9586 on some ppc4xx hardware. This image embeds a device9687 tree blob inside the image.8888+9789 uImage: Native image format used by U-Boot. The uImage target9890 does not add any boot code. It just wraps a compressed9991 vmlinux in the uImage data structure. This image···10391 a device tree to the kernel at boot. If using an older10492 version of U-Boot, then you need to use a cuImage10593 instead.9494+10695 zImage.%: Image format which does not embed a device tree.10796 Used by OpenFirmware and other firmware interfaces10897 which are able to supply a device tree. This image10998 expects firmware to provide the device tree at boot.11099 Typically, if you have general purpose PowerPC111100 hardware then you want this image format.101101+ ==================== ========================================================112102113103Image types which embed a device tree blob (simpleImage, dtbImage, treeImage,114104and cuImage) all generate the device tree blob from a file in the
···11+============22+CPU Features33+============44+15Hollis Blanchard <hollis@austin.ibm.com>265 Jun 200237···3632After detecting the processor type, the kernel patches out sections of code3733that shouldn't be used by writing nop's over it. Using cpufeatures requires3834just 2 macros (found in arch/powerpc/include/asm/cputable.h), as seen in head.S3939-transfer_to_handler:3535+transfer_to_handler::40364137 #ifdef CONFIG_ALTIVEC4238 BEGIN_FTR_SECTION
···11+====================================12Coherent Accelerator Interface (CXL)23====================================34···21202221Hardware overview2322=================2323+2424+ ::24252526 POWER8/9 FPGA2627 +----------+ +---------+···6259 the fault. The context to which this fault is serviced is based on6360 who owns that acceleration function.64616565- POWER8 <-----> PSL Version 8 is compliant to the CAIA Version 1.0.6666- POWER9 <-----> PSL Version 9 is compliant to the CAIA Version 2.0.6262+ - POWER8 and PSL Version 8 are compliant to the CAIA Version 1.0.6363+ - POWER9 and PSL Version 9 are compliant to the CAIA Version 2.0.6464+6765 This PSL Version 9 provides new features such as:6666+6867 * Interaction with the nest MMU on the P9 chip.6968 * Native DMA support.7069 * Supports sending ASB_Notify messages for host thread wakeup.7170 * Supports Atomic operations.7272- * ....7171+ * etc.73727473 Cards with a PSL9 won't work on a POWER8 system and cards with a7574 PSL8 won't work on a POWER9 system.···152147 master devices.153148154149 A userspace library libcxl is available here:150150+155151 https://github.com/ibm-capi/libcxl152152+156153 This provides a C interface to this kernel API.157154158155open···172165 When all available contexts are allocated the open call will fail173166 and return -ENOSPC.174167175175- Note: IRQs need to be allocated for each context, which may limit168168+ Note:169169+ IRQs need to be allocated for each context, which may limit176170 the number of contexts that can be created, and therefore177171 how many times the device can be opened. The POWER8 CAPP178172 supports 2040 IRQs and 3 are used by the kernel, so 2037 are···194186 updated as userspace allocates and frees memory. This ioctl195187 returns once the AFU context is started.196188197197- Takes a pointer to a struct cxl_ioctl_start_work:189189+ Takes a pointer to a struct cxl_ioctl_start_work190190+191191+ ::198192199193 struct cxl_ioctl_start_work {200194 __u64 flags;···279269 The buffer passed to read() must be at least 4K bytes.280270281271 The result of the read will be a buffer of one or more events,282282- each event is of type struct cxl_event, of varying size.272272+ each event is of type struct cxl_event, of varying size::283273284274 struct cxl_event {285275 struct cxl_event_header header;···290280 };291281 };292282293293- The struct cxl_event_header is defined as:283283+ The struct cxl_event_header is defined as284284+285285+ ::294286295287 struct cxl_event_header {296288 __u16 type;···319307 For future extensions and padding.320308321309 If the event type is CXL_EVENT_AFU_INTERRUPT then the event322322- structure is defined as:310310+ structure is defined as311311+312312+ ::323313324314 struct cxl_event_afu_interrupt {325315 __u16 flags;···340326 For future extensions and padding.341327342328 If the event type is CXL_EVENT_DATA_STORAGE then the event343343- structure is defined as:329329+ structure is defined as330330+331331+ ::344332345333 struct cxl_event_data_storage {346334 __u16 flags;···372356 For future extensions373357374358 If the event type is CXL_EVENT_AFU_ERROR then the event structure375375- is defined as:359359+ is defined as360360+361361+ ::376362377363 struct cxl_event_afu_error {378364 __u16 flags;···411393ioctl412394-----413395414414-CXL_IOCTL_DOWNLOAD_IMAGE:415415-CXL_IOCTL_VALIDATE_IMAGE:396396+CXL_IOCTL_DOWNLOAD_IMAGE / CXL_IOCTL_VALIDATE_IMAGE:416397 Starts and controls flashing a new FPGA image. Partial417398 reconfiguration is not supported (yet), so the image must contain418399 a copy of the PSL and AFU(s). Since an image can be quite large,419400 the caller may have to iterate, splitting the image in smaller420401 chunks.421402422422- Takes a pointer to a struct cxl_adapter_image:403403+ Takes a pointer to a struct cxl_adapter_image::404404+423405 struct cxl_adapter_image {424406 __u64 flags;425407 __u64 data;···460442 The following udev rules could be used to create a symlink to the461443 most logical chardev to use in any programming mode (afuX.Yd for462444 dedicated, afuX.Ys for afu directed), since the API is virtually463463- identical for each:445445+ identical for each::464446465447 SUBSYSTEM=="cxl", ATTRS{mode}=="dedicated_process", SYMLINK="cxl/%b"466448 SUBSYSTEM=="cxl", ATTRS{mode}=="afu_directed", \
···11+================================22+Coherent Accelerator (CXL) Flash33+================================44+15Introduction26============37···3228 responsible for the initialization of the adapter, setting up the3329 special path for user space access, and performing error recovery. It3430 communicates directly the Flash Accelerator Functional Unit (AFU)3535- as described in Documentation/powerpc/cxl.txt.3131+ as described in Documentation/powerpc/cxl.rst.36323733 The cxlflash driver supports two, mutually exclusive, modes of3834 operation at the device (LUN) level:···62586359 The CXL Flash Adapter Driver establishes a master context with the6460 AFU. It uses memory mapped I/O (MMIO) for this control and setup. The6565- Adapter Problem Space Memory Map looks like this:6161+ Adapter Problem Space Memory Map looks like this::66626763 +-------------------------------+6864 | 512 * 64 KB User MMIO |···379375 Each host adapter instance that is supported by the cxlflash driver380376 has a special character device associated with it to enable a set of381377 host management function. These character devices are hosted in a382382- class dedicated for cxlflash and can be accessed via /dev/cxlflash/*.378378+ class dedicated for cxlflash and can be accessed via `/dev/cxlflash/*`.383379384380 Applications can be written to perform various functions using the385381 host ioctl APIs below.
···11- DSCR (Data Stream Control Register)22- ================================================11+===================================22+DSCR (Data Stream Control Register)33+===================================3445DSCR register in powerpc allows user to have some control of prefetch of data56stream in the processor. Please refer to the ISA documents or related manual···11101211(A) Data Structures:13121414- (1) thread_struct:1313+ (1) thread_struct::1414+1515 dscr /* Thread DSCR value */1616 dscr_inherit /* Thread has changed default DSCR */17171818- (2) PACA:1818+ (2) PACA::1919+1920 dscr_default /* per-CPU DSCR default value */20212121- (3) sysfs.c:2222+ (3) sysfs.c::2323+2224 dscr_default /* System DSCR default value */23252426(B) Scheduler Changes:···39354036(C) SYSFS Interface:41374242- Global DSCR default: /sys/devices/system/cpu/dscr_default4343- CPU specific DSCR default: /sys/devices/system/cpu/cpuN/dscr3838+ - Global DSCR default: /sys/devices/system/cpu/dscr_default3939+ - CPU specific DSCR default: /sys/devices/system/cpu/cpuN/dscr44404541 Changing the global DSCR default in the sysfs will change all the CPU4642 specific DSCR defaults immediately in their PACA structures. Again if
···11+==========================22+PCI Bus EEH Error Recovery33+==========================1455+Linas Vepstas <linas@austin.ibm.com>2633- PCI Bus EEH Error Recovery44- --------------------------55- Linas Vepstas66- <linas@austin.ibm.com>77- 12 January 200577+12 January 200588991010Overview:···143143all of these occur during boot, when the PCI bus is scanned, where144144a large number of 0xff reads are part of the bus scan procedure.145145146146-If a frozen slot is detected, code in 147147-arch/powerpc/platforms/pseries/eeh.c will print a stack trace to 148148-syslog (/var/log/messages). This stack trace has proven to be very 149149-useful to device-driver authors for finding out at what point the EEH 150150-error was detected, as the error itself usually occurs slightly 146146+If a frozen slot is detected, code in147147+arch/powerpc/platforms/pseries/eeh.c will print a stack trace to148148+syslog (/var/log/messages). This stack trace has proven to be very149149+useful to device-driver authors for finding out at what point the EEH150150+error was detected, as the error itself usually occurs slightly151151beforehand.152152153153Next, it uses the Linux kernel notifier chain/work queue mechanism to154154allow any interested parties to find out about the failure. Device155155drivers, or other parts of the kernel, can use156156-eeh_register_notifier(struct notifier_block *) to find out about EEH156156+`eeh_register_notifier(struct notifier_block *)` to find out about EEH157157events. The event will include a pointer to the pci device, the158158device node and some state info. Receivers of the event can "do as159159they wish"; the default handler will be described further in this···162162To assist in the recovery of the device, eeh.c exports the163163following functions:164164165165-rtas_set_slot_reset() -- assert the PCI #RST line for 1/8th of a second166166-rtas_configure_bridge() -- ask firmware to configure any PCI bridges165165+rtas_set_slot_reset()166166+ assert the PCI #RST line for 1/8th of a second167167+rtas_configure_bridge()168168+ ask firmware to configure any PCI bridges167169 located topologically under the pci slot.168168-eeh_save_bars() and eeh_restore_bars(): save and restore the PCI170170+eeh_save_bars() and eeh_restore_bars():171171+ save and restore the PCI169172 config-space info for a device and any devices under it.170173171174···194191195192Following is an example sequence of events that cause a device driver196193close function to be called during the first phase of an EEH reset.197197-The following sequence is an example of the pcnet32 device driver.194194+The following sequence is an example of the pcnet32 device driver::198195199196 rpa_php_unconfig_pci_adapter (struct slot *) // in rpaphp_pci.c200197 {···244241 }}}}}}245242246243247247- in drivers/pci/pci_driver.c,248248- struct device_driver->remove() is just pci_device_remove()249249- which calls struct pci_driver->remove() which is pcnet32_remove_one()250250- which calls unregister_netdev() (in net/core/dev.c)251251- which calls dev_close() (in net/core/dev.c)252252- which calls dev->stop() which is pcnet32_close()253253- which then does the appropriate shutdown.244244+in drivers/pci/pci_driver.c,245245+struct device_driver->remove() is just pci_device_remove()246246+which calls struct pci_driver->remove() which is pcnet32_remove_one()247247+which calls unregister_netdev() (in net/core/dev.c)248248+which calls dev_close() (in net/core/dev.c)249249+which calls dev->stop() which is pcnet32_close()250250+which then does the appropriate shutdown.254251255252---256256-Following is the analogous stack trace for events sent to user-space257257-when the pci device is unconfigured.258253259259-rpa_php_unconfig_pci_adapter() { // in rpaphp_pci.c260260- calls261261- pci_remove_bus_device (struct pci_dev *) { // in /drivers/pci/remove.c254254+Following is the analogous stack trace for events sent to user-space255255+when the pci device is unconfigured::256256+257257+ rpa_php_unconfig_pci_adapter() { // in rpaphp_pci.c262258 calls263263- pci_destroy_dev (struct pci_dev *) {259259+ pci_remove_bus_device (struct pci_dev *) { // in /drivers/pci/remove.c264260 calls265265- device_unregister (&dev->dev) { // in /drivers/base/core.c261261+ pci_destroy_dev (struct pci_dev *) {266262 calls267267- device_del(struct device * dev) { // in /drivers/base/core.c263263+ device_unregister (&dev->dev) { // in /drivers/base/core.c268264 calls269269- kobject_del() { //in /libs/kobject.c265265+ device_del(struct device * dev) { // in /drivers/base/core.c270266 calls271271- kobject_uevent() { // in /libs/kobject.c267267+ kobject_del() { //in /libs/kobject.c272268 calls273273- kset_uevent() { // in /lib/kobject.c269269+ kobject_uevent() { // in /libs/kobject.c274270 calls275275- kset->uevent_ops->uevent() // which is really just276276- a call to277277- dev_uevent() { // in /drivers/base/core.c271271+ kset_uevent() { // in /lib/kobject.c278272 calls279279- dev->bus->uevent() which is really just a call to280280- pci_uevent () { // in drivers/pci/hotplug.c281281- which prints device name, etc....273273+ kset->uevent_ops->uevent() // which is really just274274+ a call to275275+ dev_uevent() { // in /drivers/base/core.c276276+ calls277277+ dev->bus->uevent() which is really just a call to278278+ pci_uevent () { // in drivers/pci/hotplug.c279279+ which prints device name, etc....280280+ }282281 }283283- }284284- then kobject_uevent() sends a netlink uevent to userspace285285- --> userspace uevent286286- (during early boot, nobody listens to netlink events and287287- kobject_uevent() executes uevent_helper[], which runs the288288- event process /sbin/hotplug)282282+ then kobject_uevent() sends a netlink uevent to userspace283283+ --> userspace uevent284284+ (during early boot, nobody listens to netlink events and285285+ kobject_uevent() executes uevent_helper[], which runs the286286+ event process /sbin/hotplug)287287+ }289288 }290290- }291291- kobject_del() then calls sysfs_remove_dir(), which would292292- trigger any user-space daemon that was watching /sysfs,293293- and notice the delete event.289289+ kobject_del() then calls sysfs_remove_dir(), which would290290+ trigger any user-space daemon that was watching /sysfs,291291+ and notice the delete event.294292295293296294Pro's and Con's of the Current Design···303299The biggest negative of the design is that it potentially disturbs304300network daemons and file systems that didn't need to be disturbed.305301306306--- A minor complaint is that resetting the network card causes302302+- A minor complaint is that resetting the network card causes307303 user-space back-to-back ifdown/ifup burps that potentially disturb308304 network daemons, that didn't need to even know that the pci309305 card was being rebooted.310306311311--- A more serious concern is that the same reset, for SCSI devices,307307+- A more serious concern is that the same reset, for SCSI devices,312308 causes havoc to mounted file systems. Scripts cannot post-facto313309 unmount a file system without flushing pending buffers, but this314310 is impossible, because I/O has already been stopped. Thus,···326322 from the block layer. It would be very natural to add an EEH327323 reset into this chain of events.328324329329--- If a SCSI error occurs for the root device, all is lost unless325325+- If a SCSI error occurs for the root device, all is lost unless330326 the sysadmin had the foresight to run /bin, /sbin, /etc, /var331327 and so on, out of ramdisk/tmpfs.332328···334330Conclusions335331-----------336332There's forward progress ...337337-338338-
···11+======================22+Firmware-Assisted Dump33+======================1422- Firmware-Assisted Dump33- ------------------------44- July 201155+July 20115667The goal of firmware-assisted dump is to enable the dump of78a crashed system, and to do so from a fully-reset system, and···2827Comparing with kdump or other strategies, firmware-assisted2928dump offers several strong, practical advantages:30293131--- Unlike kdump, the system has been reset, and loaded3030+- Unlike kdump, the system has been reset, and loaded3231 with a fresh copy of the kernel. In particular,3332 PCI and I/O devices have been reinitialized and are3433 in a clean, consistent state.3535--- Once the dump is copied out, the memory that held the dump3434+- Once the dump is copied out, the memory that held the dump3635 is immediately available to the running kernel. And therefore,3736 unlike kdump, fadump doesn't need a 2nd reboot to get back3837 the system to the production configuration.···4140and assistance from the Power firmware. The procedure is4241as follows:43424444--- The first kernel registers the sections of memory with the4343+- The first kernel registers the sections of memory with the4544 Power firmware for dump preservation during OS initialization.4645 These registered sections of memory are reserved by the first4746 kernel during early boot.48474949--- When a system crashes, the Power firmware will save4848+- When a system crashes, the Power firmware will save5049 the low memory (boot memory of size larger of 5% of system RAM5150 or 256MB) of RAM to the previous registered region. It will5251 also save system registers, and hardware PTE's.53525454- NOTE: The term 'boot memory' means size of the low memory chunk5353+ NOTE:5454+ The term 'boot memory' means size of the low memory chunk5555 that is required for a kernel to boot successfully when5656 booted with restricted memory. By default, the boot memory5757 size will be the larger of 5% of system RAM or 256MB.···6664 as fadump uses a predefined offset to reserve memory6765 for boot memory dump preservation in case of a crash.68666969--- After the low memory (boot memory) area has been saved, the6767+- After the low memory (boot memory) area has been saved, the7068 firmware will reset PCI and other hardware state. It will7169 *not* clear the RAM. It will then launch the bootloader, as7270 normal.73717474--- The freshly booted kernel will notice that there is a new7272+- The freshly booted kernel will notice that there is a new7573 node (ibm,dump-kernel) in the device tree, indicating that7674 there is crash data available from a previous boot. During7775 the early boot OS will reserve rest of the memory above···7977 size. This will make sure that the second kernel will not8078 touch any of the dump memory area.81798282--- User-space tools will read /proc/vmcore to obtain the contents8080+- User-space tools will read /proc/vmcore to obtain the contents8381 of memory, which holds the previous crashed kernel dump in ELF8482 format. The userspace tools may copy this info to disk, or8583 network, nas, san, iscsi, etc. as desired.86848787--- Once the userspace tool is done saving dump, it will echo8585+- Once the userspace tool is done saving dump, it will echo8886 '1' to /sys/kernel/fadump_release_mem to release the reserved8987 memory back to general use, except the memory required for9088 next firmware-assisted dump registration.91899292- e.g.9090+ e.g.::9191+9392 # echo 1 > /sys/kernel/fadump_release_mem94939594Please note that the firmware-assisted dump feature···9895firmware versions.999610097Implementation details:101101-----------------------9898+-----------------------10299103100During boot, a check is made to see if firmware supports104101this feature on that particular machine. If it does, then···124121With CMA reservation this memory will be available for applications to125122use it, while kernel is prevented from using it. With this fadump will126123still be able to capture all of the kernel memory and most of the user127127-space memory except the user pages that were present in CMA region.124124+space memory except the user pages that were present in CMA region::128125129126 o Memory Reservation during first kernel130127···169166used for kdump.170167171168How to enable firmware-assisted dump (fadump):172172--------------------------------------169169+----------------------------------------------1731701741711. Set config option CONFIG_FA_DUMP=y and build kernel.1751722. Boot into linux kernel with 'fadump=on' kernel cmdline option.···180177 to specify size of the memory to reserve for boot memory dump181178 preservation.182179183183-NOTE: 1. 'fadump_reserve_mem=' parameter has been deprecated. Instead184184- use 'crashkernel=' to specify size of the memory to reserve185185- for boot memory dump preservation.186186- 2. If firmware-assisted dump fails to reserve memory then it187187- will fallback to existing kdump mechanism if 'crashkernel='188188- option is set at kernel cmdline.189189- 3. if user wants to capture all of user space memory and ok with190190- reserved memory not available to production system, then191191- 'fadump=nocma' kernel parameter can be used to fallback to192192- old behaviour.180180+NOTE:181181+ 1. 'fadump_reserve_mem=' parameter has been deprecated. Instead182182+ use 'crashkernel=' to specify size of the memory to reserve183183+ for boot memory dump preservation.184184+ 2. If firmware-assisted dump fails to reserve memory then it185185+ will fallback to existing kdump mechanism if 'crashkernel='186186+ option is set at kernel cmdline.187187+ 3. if user wants to capture all of user space memory and ok with188188+ reserved memory not available to production system, then189189+ 'fadump=nocma' kernel parameter can be used to fallback to190190+ old behaviour.193191194192Sysfs/debugfs files:195195-------------193193+--------------------196194197195Firmware-assisted dump feature uses sysfs file system to hold198196the control files and debugfs file to display memory reserved region.···201197Here is the list of files under kernel sysfs:202198203199 /sys/kernel/fadump_enabled204204-205200 This is used to display the fadump status.206206- 0 = fadump is disabled207207- 1 = fadump is enabled201201+202202+ - 0 = fadump is disabled203203+ - 1 = fadump is enabled208204209205 This interface can be used by kdump init scripts to identify if210206 fadump is enabled in the kernel and act accordingly.211207212208 /sys/kernel/fadump_registered213213-214209 This is used to display the fadump registration status as well215210 as to control (start/stop) the fadump registration.216216- 0 = fadump is not registered.217217- 1 = fadump is registered and ready to handle system crash.211211+212212+ - 0 = fadump is not registered.213213+ - 1 = fadump is registered and ready to handle system crash.218214219215 To register fadump echo 1 > /sys/kernel/fadump_registered and220216 echo 0 > /sys/kernel/fadump_registered for un-register and stop the···223219 easily integrated with kdump service start/stop.224220225221 /sys/kernel/fadump_release_mem226226-227222 This file is available only when fadump is active during228223 second kernel. This is used to release the reserved memory229224 region that are held for saving crash dump. To release the230230- reserved memory echo 1 to it:225225+ reserved memory echo 1 to it::231226232232- echo 1 > /sys/kernel/fadump_release_mem227227+ echo 1 > /sys/kernel/fadump_release_mem233228234229 After echo 1, the content of the /sys/kernel/debug/powerpc/fadump_region235230 file will change to reflect the new memory reservations.···241238(Assuming debugfs is mounted on /sys/kernel/debug directory.)242239243240 /sys/kernel/debug/powerpc/fadump_region244244-245241 This file shows the reserved memory regions if fadump is246242 enabled otherwise this file is empty. The output format247247- is:248248- <region>: [<start>-<end>] <reserved-size> bytes, Dumped: <dump-size>243243+ is::244244+245245+ <region>: [<start>-<end>] <reserved-size> bytes, Dumped: <dump-size>249246250247 e.g.251251- Contents when fadump is registered during first kernel248248+ Contents when fadump is registered during first kernel::252249253253- # cat /sys/kernel/debug/powerpc/fadump_region254254- CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x0255255- HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x0256256- DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x0250250+ # cat /sys/kernel/debug/powerpc/fadump_region251251+ CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x0252252+ HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x0253253+ DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x0257254258258- Contents when fadump is active during second kernel255255+ Contents when fadump is active during second kernel::259256260260- # cat /sys/kernel/debug/powerpc/fadump_region261261- CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x40020262262- HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x1000263263- DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x10000000264264- : [0x00000010000000-0x0000006ffaffff] 0x5ffb0000 bytes, Dumped: 0x5ffb0000257257+ # cat /sys/kernel/debug/powerpc/fadump_region258258+ CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x40020259259+ HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x1000260260+ DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x10000000261261+ : [0x00000010000000-0x0000006ffaffff] 0x5ffb0000 bytes, Dumped: 0x5ffb0000265262266266-NOTE: Please refer to Documentation/filesystems/debugfs.txt on263263+NOTE:264264+ Please refer to Documentation/filesystems/debugfs.txt on267265 how to mount the debugfs filesystem.268266269267270268TODO:271269-----272272- o Need to come up with the better approach to find out more270270+ - Need to come up with the better approach to find out more273271 accurate boot memory size that is required for a kernel to274272 boot successfully when booted with restricted memory.275275- o The fadump implementation introduces a fadump crash info structure273273+ - The fadump implementation introduces a fadump crash info structure276274 in the scratch area before the ELF core header. The idea of introducing277275 this structure is to pass some important crash info data to the second278276 kernel which will help second kernel to populate ELF core header with···281277 design implementation does not address a possibility of introducing282278 additional fields (in future) to this structure without affecting283279 compatibility. Need to come up with the better approach to address this.280280+284281 The possible approaches are:282282+285283 1. Introduce version field for version tracking, bump up the version286284 whenever a new field is added to the structure in future. The version287285 field can be used to find out what fields are valid for the current···291285 2. Reserve the area of predefined size (say PAGE_SIZE) for this292286 structure and have unused area as reserved (initialized to zero)293287 for future field additions.288288+294289 The advantage of approach 1 over 2 is we don't need to reserve extra space.295295----290290+296291Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>292292+297293This document is based on the original documentation written for phyp294294+298295assisted dump by Linas Vepstas and Manish Ahuja.
···11-===========================================================================22- HVCS33- IBM "Hypervisor Virtual Console Server" Installation Guide44- for Linux Kernel 2.6.4+55- Copyright (C) 2004 IBM Corporation11+===============================================================22+HVCS IBM "Hypervisor Virtual Console Server" Installation Guide33+===============================================================6477-===========================================================================88-NOTE:Eight space tabs are the optimum editor setting for reading this file.99-===========================================================================55+for Linux Kernel 2.6.4+1061111- Author(s) : Ryan S. Arnold <rsa@us.ibm.com>1212- Date Created: March, 02, 20041313- Last Changed: August, 24, 200477+Copyright (C) 2004 IBM Corporation1481515----------------------------------------------------------------------------1616-Table of contents:99+.. ===========================================================================1010+.. NOTE:Eight space tabs are the optimum editor setting for reading this file.1111+.. ===========================================================================1212+1313+1414+Author(s): Ryan S. Arnold <rsa@us.ibm.com>1515+1616+Date Created: March, 02, 20041717+Last Changed: August, 24, 20041818+1919+.. Table of contents:17201821 1. Driver Introduction:1922 2. System Requirements···3027 8. Questions & Answers:3128 9. Reporting Bugs:32293333----------------------------------------------------------------------------34301. Driver Introduction:3131+=======================35323633This is the device driver for the IBM Hypervisor Virtual Console Server,3734"hvcs". The IBM hvcs provides a tty driver interface to allow Linux user···4138on this hardware so system consoles are accessed by this driver using4239firmware interfaces to virtual terminal devices.43404444----------------------------------------------------------------------------45412. System Requirements:4242+=======================46434744This device driver was written using 2.6.4 Linux kernel APIs and will only4845build and run on kernels of this version or later.···5552major and minor numbers are associated with each vty-server. Directions5653for sysfs mounting are outside the scope of this document.57545858----------------------------------------------------------------------------59553. Build Options:5656+=================60576158The hvcs driver registers itself as a tty driver. The tty layer6259dynamically allocates a block of major and minor numbers in a quantity···6865built into the kernel. If not, the default can be over-ridden by inserting6966the driver as a module with insmod parameters.70677171----------------------------------------------------------------------------72683.1 Built-in:6969+-------------73707471The following menuconfig example demonstrates selecting to build this7575-driver into the kernel.7272+driver into the kernel::76737774 Device Drivers --->7875 Character devices --->···80778178Begin the kernel make process.82798383----------------------------------------------------------------------------84803.2 Module:8181+-----------85828683The following menuconfig example demonstrates selecting to build this8787-driver as a kernel module.8484+driver as a kernel module::88858986 Device Drivers --->9087 Character devices --->···92899390The make process will build the following kernel modules:94919595- hvcs.ko9696- hvcserver.ko9292+ - hvcs.ko9393+ - hvcserver.ko97949895To insert the module with the default allocation execute the following9999-commands in the order they appear:9696+commands in the order they appear::1009710198 insmod hvcserver.ko10299 insmod hvcs.ko···106103symbols it expects.107104108105To override the default use an insmod parameter as follows (requesting 4109109-tty devices as an example):106106+tty devices as an example)::110107111108 insmod hvcs.ko hvcs_parm_num_devs=4112109···118115NOTE: The length of time it takes to insmod the driver seems to be related119116to the number of tty interfaces the registering driver requests.120117121121-In order to remove the driver module execute the following command:118118+In order to remove the driver module execute the following command::122119123120 rmmod hvcs.ko124121125122The recommended method for installing hvcs as a module is to use depmod to126123build a current modules.dep file in /lib/modules/`uname -r` and then127127-execute:124124+execute::128125129129-modprobe hvcs hvcs_parm_num_devs=4126126+ modprobe hvcs hvcs_parm_num_devs=4130127131128The modules.dep file indicates that hvcserver.ko needs to be inserted132129before hvcs.ko and modprobe uses this file to smartly insert the modules in133130the proper order.134131135132The following modprobe command is used to remove hvcs and hvcserver in the136136-proper order:133133+proper order::137134138138-modprobe -r hvcs135135+ modprobe -r hvcs139136140140----------------------------------------------------------------------------1411374. Installation:138138+================142139143140The tty layer creates sysfs entries which contain the major and minor144141numbers allocated for the hvcs driver. The following snippet of "tree"145145-output of the sysfs directory shows where these numbers are presented:142142+output of the sysfs directory shows where these numbers are presented::146143147144 sys/148145 |-- *other sysfs base dirs*···167164 |-- *other sysfs base dirs*168165169166For the above examples the following output is a result of cat'ing the170170-"dev" entry in the hvcs directory:167167+"dev" entry in the hvcs directory::171168172169 Pow5:/sys/class/tty/hvcs0/ # cat dev173170 254:0···187184will do it automatically.188185189186Given the example output above, to manually create a /dev/hvcs* node entry190190-mknod can be used as follows:187187+mknod can be used as follows::191188192189 mknod /dev/hvcs0 c 254 0193190 mknod /dev/hvcs1 c 254 1···198195persistent. Once created they will exist prior to the driver insmod.199196200197Attempting to connect an application to /dev/hvcs* prior to insertion of201201-the hvcs module will result in an error message similar to the following:198198+the hvcs module will result in an error message similar to the following::202199203200 "/dev/hvcs*: No such device".204201205202NOTE: Just because there is a device node present doesn't mean that there206203is a vty-server device configured for that node.207204208208----------------------------------------------------------------------------2092055. Connection206206+=============210207211208Since this driver controls devices that provide a tty interface a user can212209interact with the device node entries using any standard tty-interactive···252249attribute has been added to each vty-server sysfs entry. This entry is253250called "index" and showing it reveals an integer that refers to the254251/dev/hvcs* entry to use to connect to that device. For instance cating the255255-index attribute of vty-server adapter 30000004 shows the following.252252+index attribute of vty-server adapter 30000004 shows the following::256253257254 Pow5:/sys/bus/vio/drivers/hvcs/30000004 # cat index258255 2···265262adapter is not guaranteed to remain the same across system reboots. Look266263in the Q & A section for more on this issue.267264268268----------------------------------------------------------------------------2692656. Disconnection266266+================270267271268As a security feature to prevent the delivery of stale data to an272269unintended target the Power5 system firmware disables the fetching of data···308305previously read '1'. The write directive is ignored if the vterm_state309306read '0' or if any value other than '0' was written to the vterm_state310307attribute. The following example will show the method used for verifying311311-the vty-server connection status and disconnecting a vty-server connection.308308+the vty-server connection status and disconnecting a vty-server connection::312309313310 Pow5:/sys/bus/vio/drivers/hvcs/30000004 # cat vterm_state314311 1···321318All vty-server connections are automatically terminated when the device is322319hotplug removed and when the module is removed.323320324324----------------------------------------------------------------------------3253217. Configuration322322+================326323327324Each vty-server has a sysfs entry in the /sys/devices/vio directory, which328325is symlinked in several other sysfs tree directories, notably under the329329-hvcs driver entry, which looks like the following example:326326+hvcs driver entry, which looks like the following example::330327331328 Pow5:/sys/bus/vio/drivers/hvcs # ls332329 . .. 30000003 30000004 rescan···347344348345Vty-server entries in this directory are a 32 bit partition unique unit349346address that is created by firmware. An example vty-server sysfs entry350350-looks like the following:347347+looks like the following::351348352349 Pow5:/sys/bus/vio/drivers/hvcs/30000004 # ls353350 . current_vty devspec name partner_vtys···355352356353Each entry is provided, by default with a "name" attribute. Reading the357354"name" attribute will reveal the device type as shown in the following358358-example:355355+example::359356360357 Pow5:/sys/bus/vio/drivers/hvcs/30000003 # cat name361358 vty-server362359363360Each entry is also provided, by default, with a "devspec" attribute which364361reveals the full device specification when read, as shown in the following365365-example:362362+example::366363367364 Pow5:/sys/bus/vio/drivers/hvcs/30000004 # cat devspec368365 /vdevice/vty-server@30000004369366370367Each vty-server sysfs dir is provided with two read-only attributes that371368provide lists of easily parsed partner vty data: "partner_vtys" and372372-"partner_clcs".369369+"partner_clcs"::373370374371 Pow5:/sys/bus/vio/drivers/hvcs/30000004 # cat partner_vtys375372 30000000···399396read.400397401398The current_vty can be changed by writing a valid partner clc to the entry402402-as in the following example:399399+as in the following example::403400404401 Pow5:/sys/bus/vio/drivers/hvcs/30000004 # echo U5112.428.10304405402 8A-V4-C0 > current_vty···411408Information on the "vterm_state" attribute was covered earlier on the412409chapter entitled "disconnection".413410414414----------------------------------------------------------------------------4154118. Questions & Answers:416416-===========================================================================412412+=======================413413+417414Q: What are the security concerns involving hvcs?418415419416A: There are three main security concerns:···432429 partition) will experience the previously logged in session.433430434431---------------------------------------------------------------------------432432+435433Q: How do I multiplex a console that I grab through hvcs so that other436434people can see it:437435···444440not display properly in screen sessions.445441446442---------------------------------------------------------------------------443443+447444Q: Why are the colors all messed up?448445Q: Why are the control characters acting strange or not working?449446Q: Why is the console output all strange and unintelligible?···460455their own TERM type set when they login.461456462457---------------------------------------------------------------------------458458+463459Q: When I try to CONNECT kermit to an hvcs device I get:464460"Sorry, can't open connection: /dev/hvcs*"What is happening?465461···496490/dev/hvcs* entry.497491498492---------------------------------------------------------------------------493493+499494Q: When I try to CONNECT kermit to an hvcs device I get:500495"Sorry, write access to UUCP lockfile directory denied."501496···504497does? Maybe you haven't inserted the module (on systems with udev).505498506499---------------------------------------------------------------------------500500+507501Q: If I already have one Linux partition installed can I use hvcs on said508502partition to provide the console for the install of a second Linux509503partition?···513505kermit or cu or some other program that doesn't provide terminal emulation.514506515507---------------------------------------------------------------------------508508+516509Q: Can I connect to more than one partition's console at a time using this517510driver?518511···521512configured for this partition and each must point to a disconnected vty.522513523514---------------------------------------------------------------------------515515+524516Q: Does the hvcs driver support dynamic (hotplug) addition of devices?525517526518A: Yes, if you have dlpar and hotplug enabled for your system and it has···529519handle additions of new devices and removals of unused devices.530520531521---------------------------------------------------------------------------522522+532523Q: For some reason /dev/hvcs* doesn't map to the same vty-server adapter533524after a reboot. What happened?534525···544533Hint; look at the sysfs "index" attribute for the vty-server.545534546535---------------------------------------------------------------------------536536+547537Q: Can I use /dev/hvcs* as a conduit to another partition and use a tty548538device on that partition as the other end of the pipe?549539···566554partitions.567555568556---------------------------------------------------------------------------557557+5695589. Reporting Bugs:559559+==================570560571561The proper channel for reporting bugs is either through the Linux OS572562distribution company that provided your OS or by posting issues to the
···11-:orphan:22-11+==========================32CPU to ISA Version Mapping43==========================5465Mapping of some CPU versions to relevant ISA versions.7688-========= ====================77+========= ====================================================================98CPU Architecture version1010-========= ====================99+========= ====================================================================1110Power9 Power ISA v3.0B1211Power8 Power ISA v2.071312Power7 Power ISA v2.06···2324 - PowerPC Virtual Environment Architecture Book II v2.012425 - PowerPC Operating Environment Architecture Book III v2.012526 - Plus Altivec/VMX ~= 2.032626-========= ====================2727+========= ====================================================================272828292930Key Features···5960PPC970 No6061========== ====61626262-========== ====================6363+========== ====================================6364CPU Transactional Memory6464-========== ====================6565+========== ====================================6566Power9 Yes (* see transactional_memory.txt)6667Power8 Yes6768Power7 No···7273Power5+ No7374Power5 No7475PPC970 No7575-========== ====================7676+========== ====================================
···11+=============================12Linux 2.6.x on MPC52xx family22------------------------------33+=============================3445For the latest info, go to http://www.246tNt.com/mpc52xx/5667To compile/use :7888- - U-Boot:99+ - U-Boot::1010+911 # <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION1012 if you wish to ).1113 # make lite5200_defconfig···1816 => tftpboot 400000 pRamdisk1917 => bootm 200000 40000020182121- - DBug:1919+ - DBug::2020+2221 # <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION2322 if you wish to ).2423 # make lite5200_defconfig···3128 DBug> dn -i zImage.initrd.lite5200322933303434-Some remarks :3131+Some remarks:3232+3533 - The port is named mpc52xxx, and config options are PPC_MPC52xx. The MGT51003634 is not supported, and I'm not sure anyone is interesting in working on it3735 so. I didn't took 5xxx because there's apparently a lot of 5xxx that have
···11+===================================================22+PCI Express I/O Virtualization Resource on Powerenv33+===================================================44+15Wei Yang <weiyang@linux.vnet.ibm.com>66+27Benjamin Herrenschmidt <benh@au1.ibm.com>88+39Bjorn Helgaas <bhelgaas@google.com>1010+41126 Aug 2014512613This document describes the requirement from hardware for PCI MMIO resource···1710about considerations on enabling SRIOV on IODA2.181119121. Introduction to Partitionable Endpoints1313+==========================================20142115A Partitionable Endpoint (PE) is a way to group the various resources2216associated with a device or a set of devices to provide isolation between···4335its own set of PEs, etc.443645372. Implementation of Partitionable Endpoints on P8 (IODA2)3838+==========================================================46394740P8 supports up to 256 Partitionable Endpoints per PHB.4841···158149 sense, but we haven't done it yet.1591501601513. Considerations for SR-IOV on PowerKVM152152+========================================161153162154 * SR-IOV Background163155···234224 IODA supports 256 PEs, so segmented windows contain 256 segments, so if235225 total_VFs is less than 256, we have the situation in Figure 1.0, where236226 segments [total_VFs, 255] of the M64 window may map to some MMIO range on237237- other devices:227227+ other devices::238228239229 0 1 total_VFs - 1240230 +------+------+- -+------+------+···253243 Figure 1.0 Direct map VF(n) BAR space254244255245 Our current solution is to allocate 256 segments even if the VF(n) BAR256256- space doesn't need that much, as shown in Figure 1.1:246246+ space doesn't need that much, as shown in Figure 1.1::257247258248 0 1 total_VFs - 1 255259249 +------+------+- -+------+------+- -+------+------+···279269 responds to segments [total_VFs, 255].2802702812714. Implications for the Generic PCI Code272272+========================================282273283274The PCIe SR-IOV spec requires that the base of the VF(n) BAR space be284275aligned to the size of an individual VF BAR.
···11+========================12PMU Event Based Branches23========================34
+156
Documentation/powerpc/ptrace.rst
···11+======22+Ptrace33+======44+55+GDB intends to support the following hardware debug features of BookE66+processors:77+88+4 hardware breakpoints (IAC)99+2 hardware watchpoints (read, write and read-write) (DAC)1010+2 value conditions for the hardware watchpoints (DVC)1111+1212+For that, we need to extend ptrace so that GDB can query and set these1313+resources. Since we're extending, we're trying to create an interface1414+that's extendable and that covers both BookE and server processors, so1515+that GDB doesn't need to special-case each of them. We added the1616+following 3 new ptrace requests.1717+1818+1. PTRACE_PPC_GETHWDEBUGINFO1919+============================2020+2121+Query for GDB to discover the hardware debug features. The main info to2222+be returned here is the minimum alignment for the hardware watchpoints.2323+BookE processors don't have restrictions here, but server processors have2424+an 8-byte alignment restriction for hardware watchpoints. We'd like to avoid2525+adding special cases to GDB based on what it sees in AUXV.2626+2727+Since we're at it, we added other useful info that the kernel can return to2828+GDB: this query will return the number of hardware breakpoints, hardware2929+watchpoints and whether it supports a range of addresses and a condition.3030+The query will fill the following structure provided by the requesting process::3131+3232+ struct ppc_debug_info {3333+ unit32_t version;3434+ unit32_t num_instruction_bps;3535+ unit32_t num_data_bps;3636+ unit32_t num_condition_regs;3737+ unit32_t data_bp_alignment;3838+ unit32_t sizeof_condition; /* size of the DVC register */3939+ uint64_t features; /* bitmask of the individual flags */4040+ };4141+4242+features will have bits indicating whether there is support for::4343+4444+ #define PPC_DEBUG_FEATURE_INSN_BP_RANGE 0x14545+ #define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x24646+ #define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x44747+ #define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x84848+ #define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x104949+5050+2. PTRACE_SETHWDEBUG5151+5252+Sets a hardware breakpoint or watchpoint, according to the provided structure::5353+5454+ struct ppc_hw_breakpoint {5555+ uint32_t version;5656+ #define PPC_BREAKPOINT_TRIGGER_EXECUTE 0x15757+ #define PPC_BREAKPOINT_TRIGGER_READ 0x25858+ #define PPC_BREAKPOINT_TRIGGER_WRITE 0x45959+ uint32_t trigger_type; /* only some combinations allowed */6060+ #define PPC_BREAKPOINT_MODE_EXACT 0x06161+ #define PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE 0x16262+ #define PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE 0x26363+ #define PPC_BREAKPOINT_MODE_MASK 0x36464+ uint32_t addr_mode; /* address match mode */6565+6666+ #define PPC_BREAKPOINT_CONDITION_MODE 0x36767+ #define PPC_BREAKPOINT_CONDITION_NONE 0x06868+ #define PPC_BREAKPOINT_CONDITION_AND 0x16969+ #define PPC_BREAKPOINT_CONDITION_EXACT 0x1 /* different name for the same thing as above */7070+ #define PPC_BREAKPOINT_CONDITION_OR 0x27171+ #define PPC_BREAKPOINT_CONDITION_AND_OR 0x37272+ #define PPC_BREAKPOINT_CONDITION_BE_ALL 0x00ff0000 /* byte enable bits */7373+ #define PPC_BREAKPOINT_CONDITION_BE(n) (1<<((n)+16))7474+ uint32_t condition_mode; /* break/watchpoint condition flags */7575+7676+ uint64_t addr;7777+ uint64_t addr2;7878+ uint64_t condition_value;7979+ };8080+8181+A request specifies one event, not necessarily just one register to be set.8282+For instance, if the request is for a watchpoint with a condition, both the8383+DAC and DVC registers will be set in the same request.8484+8585+With this GDB can ask for all kinds of hardware breakpoints and watchpoints8686+that the BookE supports. COMEFROM breakpoints available in server processors8787+are not contemplated, but that is out of the scope of this work.8888+8989+ptrace will return an integer (handle) uniquely identifying the breakpoint or9090+watchpoint just created. This integer will be used in the PTRACE_DELHWDEBUG9191+request to ask for its removal. Return -ENOSPC if the requested breakpoint9292+can't be allocated on the registers.9393+9494+Some examples of using the structure to:9595+9696+- set a breakpoint in the first breakpoint register::9797+9898+ p.version = PPC_DEBUG_CURRENT_VERSION;9999+ p.trigger_type = PPC_BREAKPOINT_TRIGGER_EXECUTE;100100+ p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;101101+ p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;102102+ p.addr = (uint64_t) address;103103+ p.addr2 = 0;104104+ p.condition_value = 0;105105+106106+- set a watchpoint which triggers on reads in the second watchpoint register::107107+108108+ p.version = PPC_DEBUG_CURRENT_VERSION;109109+ p.trigger_type = PPC_BREAKPOINT_TRIGGER_READ;110110+ p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;111111+ p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;112112+ p.addr = (uint64_t) address;113113+ p.addr2 = 0;114114+ p.condition_value = 0;115115+116116+- set a watchpoint which triggers only with a specific value::117117+118118+ p.version = PPC_DEBUG_CURRENT_VERSION;119119+ p.trigger_type = PPC_BREAKPOINT_TRIGGER_READ;120120+ p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;121121+ p.condition_mode = PPC_BREAKPOINT_CONDITION_AND | PPC_BREAKPOINT_CONDITION_BE_ALL;122122+ p.addr = (uint64_t) address;123123+ p.addr2 = 0;124124+ p.condition_value = (uint64_t) condition;125125+126126+- set a ranged hardware breakpoint::127127+128128+ p.version = PPC_DEBUG_CURRENT_VERSION;129129+ p.trigger_type = PPC_BREAKPOINT_TRIGGER_EXECUTE;130130+ p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE;131131+ p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;132132+ p.addr = (uint64_t) begin_range;133133+ p.addr2 = (uint64_t) end_range;134134+ p.condition_value = 0;135135+136136+- set a watchpoint in server processors (BookS)::137137+138138+ p.version = 1;139139+ p.trigger_type = PPC_BREAKPOINT_TRIGGER_RW;140140+ p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE;141141+ or142142+ p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;143143+144144+ p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;145145+ p.addr = (uint64_t) begin_range;146146+ /* For PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE addr2 needs to be specified, where147147+ * addr2 - addr <= 8 Bytes.148148+ */149149+ p.addr2 = (uint64_t) end_range;150150+ p.condition_value = 0;151151+152152+3. PTRACE_DELHWDEBUG153153+154154+Takes an integer which identifies an existing breakpoint or watchpoint155155+(i.e., the value returned from PTRACE_SETHWDEBUG), and deletes the156156+corresponding breakpoint or watchpoint..
-151
Documentation/powerpc/ptrace.txt
···11-GDB intends to support the following hardware debug features of BookE22-processors:33-44-4 hardware breakpoints (IAC)55-2 hardware watchpoints (read, write and read-write) (DAC)66-2 value conditions for the hardware watchpoints (DVC)77-88-For that, we need to extend ptrace so that GDB can query and set these99-resources. Since we're extending, we're trying to create an interface1010-that's extendable and that covers both BookE and server processors, so1111-that GDB doesn't need to special-case each of them. We added the1212-following 3 new ptrace requests.1313-1414-1. PTRACE_PPC_GETHWDEBUGINFO1515-1616-Query for GDB to discover the hardware debug features. The main info to1717-be returned here is the minimum alignment for the hardware watchpoints.1818-BookE processors don't have restrictions here, but server processors have1919-an 8-byte alignment restriction for hardware watchpoints. We'd like to avoid2020-adding special cases to GDB based on what it sees in AUXV.2121-2222-Since we're at it, we added other useful info that the kernel can return to2323-GDB: this query will return the number of hardware breakpoints, hardware2424-watchpoints and whether it supports a range of addresses and a condition.2525-The query will fill the following structure provided by the requesting process:2626-2727-struct ppc_debug_info {2828- unit32_t version;2929- unit32_t num_instruction_bps;3030- unit32_t num_data_bps;3131- unit32_t num_condition_regs;3232- unit32_t data_bp_alignment;3333- unit32_t sizeof_condition; /* size of the DVC register */3434- uint64_t features; /* bitmask of the individual flags */3535-};3636-3737-features will have bits indicating whether there is support for:3838-3939-#define PPC_DEBUG_FEATURE_INSN_BP_RANGE 0x14040-#define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x24141-#define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x44242-#define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x84343-#define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x104444-4545-2. PTRACE_SETHWDEBUG4646-4747-Sets a hardware breakpoint or watchpoint, according to the provided structure:4848-4949-struct ppc_hw_breakpoint {5050- uint32_t version;5151-#define PPC_BREAKPOINT_TRIGGER_EXECUTE 0x15252-#define PPC_BREAKPOINT_TRIGGER_READ 0x25353-#define PPC_BREAKPOINT_TRIGGER_WRITE 0x45454- uint32_t trigger_type; /* only some combinations allowed */5555-#define PPC_BREAKPOINT_MODE_EXACT 0x05656-#define PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE 0x15757-#define PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE 0x25858-#define PPC_BREAKPOINT_MODE_MASK 0x35959- uint32_t addr_mode; /* address match mode */6060-6161-#define PPC_BREAKPOINT_CONDITION_MODE 0x36262-#define PPC_BREAKPOINT_CONDITION_NONE 0x06363-#define PPC_BREAKPOINT_CONDITION_AND 0x16464-#define PPC_BREAKPOINT_CONDITION_EXACT 0x1 /* different name for the same thing as above */6565-#define PPC_BREAKPOINT_CONDITION_OR 0x26666-#define PPC_BREAKPOINT_CONDITION_AND_OR 0x36767-#define PPC_BREAKPOINT_CONDITION_BE_ALL 0x00ff0000 /* byte enable bits */6868-#define PPC_BREAKPOINT_CONDITION_BE(n) (1<<((n)+16))6969- uint32_t condition_mode; /* break/watchpoint condition flags */7070-7171- uint64_t addr;7272- uint64_t addr2;7373- uint64_t condition_value;7474-};7575-7676-A request specifies one event, not necessarily just one register to be set.7777-For instance, if the request is for a watchpoint with a condition, both the7878-DAC and DVC registers will be set in the same request.7979-8080-With this GDB can ask for all kinds of hardware breakpoints and watchpoints8181-that the BookE supports. COMEFROM breakpoints available in server processors8282-are not contemplated, but that is out of the scope of this work.8383-8484-ptrace will return an integer (handle) uniquely identifying the breakpoint or8585-watchpoint just created. This integer will be used in the PTRACE_DELHWDEBUG8686-request to ask for its removal. Return -ENOSPC if the requested breakpoint8787-can't be allocated on the registers.8888-8989-Some examples of using the structure to:9090-9191-- set a breakpoint in the first breakpoint register9292-9393- p.version = PPC_DEBUG_CURRENT_VERSION;9494- p.trigger_type = PPC_BREAKPOINT_TRIGGER_EXECUTE;9595- p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;9696- p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;9797- p.addr = (uint64_t) address;9898- p.addr2 = 0;9999- p.condition_value = 0;100100-101101-- set a watchpoint which triggers on reads in the second watchpoint register102102-103103- p.version = PPC_DEBUG_CURRENT_VERSION;104104- p.trigger_type = PPC_BREAKPOINT_TRIGGER_READ;105105- p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;106106- p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;107107- p.addr = (uint64_t) address;108108- p.addr2 = 0;109109- p.condition_value = 0;110110-111111-- set a watchpoint which triggers only with a specific value112112-113113- p.version = PPC_DEBUG_CURRENT_VERSION;114114- p.trigger_type = PPC_BREAKPOINT_TRIGGER_READ;115115- p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;116116- p.condition_mode = PPC_BREAKPOINT_CONDITION_AND | PPC_BREAKPOINT_CONDITION_BE_ALL;117117- p.addr = (uint64_t) address;118118- p.addr2 = 0;119119- p.condition_value = (uint64_t) condition;120120-121121-- set a ranged hardware breakpoint122122-123123- p.version = PPC_DEBUG_CURRENT_VERSION;124124- p.trigger_type = PPC_BREAKPOINT_TRIGGER_EXECUTE;125125- p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE;126126- p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;127127- p.addr = (uint64_t) begin_range;128128- p.addr2 = (uint64_t) end_range;129129- p.condition_value = 0;130130-131131-- set a watchpoint in server processors (BookS)132132-133133- p.version = 1;134134- p.trigger_type = PPC_BREAKPOINT_TRIGGER_RW;135135- p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE;136136- or137137- p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;138138-139139- p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;140140- p.addr = (uint64_t) begin_range;141141- /* For PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE addr2 needs to be specified, where142142- * addr2 - addr <= 8 Bytes.143143- */144144- p.addr2 = (uint64_t) end_range;145145- p.condition_value = 0;146146-147147-3. PTRACE_DELHWDEBUG148148-149149-Takes an integer which identifies an existing breakpoint or watchpoint150150-(i.e., the value returned from PTRACE_SETHWDEBUG), and deletes the151151-corresponding breakpoint or watchpoint..
···11- Freescale QUICC Engine Firmware Uploading22- -----------------------------------------11+=========================================22+Freescale QUICC Engine Firmware Uploading33+=========================================3445(c) 2007 Timur Tabi <timur at freescale.com>,56 Freescale Semiconductor6777-Table of Contents88-=================88+.. Table of Contents991010- I - Software License for Firmware1010+ I - Software License for Firmware11111212- II - Microcode Availability1212+ II - Microcode Availability13131414- III - Description and Terminology1414+ III - Description and Terminology15151616- IV - Microcode Programming Details1616+ IV - Microcode Programming Details17171818- V - Firmware Structure Layout1818+ V - Firmware Structure Layout19192020- VI - Sample Code for Creating Firmware Files2020+ VI - Sample Code for Creating Firmware Files21212222Revision Information2323====================···3939your Freescale representative or your operating system vendor.40404141III - Description and Terminology4242-================================4242+=================================43434444In this document, the term 'microcode' refers to the sequence of 32-bit4545integers that compose the actual QE microcode.···8989structure signals the microcode which of these virtual traps is active.90909191This structure contains 6 words that the application should copy to some9292-specific been defined. This table describes the structure.9292+specific been defined. This table describes the structure::93939494 ---------------------------------------------------------------9595 | Offset in | | Destination Offset | Size of |···119119This is a double word bit array (64 bits) that defines special functionality120120which has an impact on the software drivers. Each bit has its own impact121121and has special instructions for the s/w associated with it. This structure is122122-described in this table:122122+described in this table::123123124124 -----------------------------------------------------------------------125125 | Bit # | Name | Description |···220220'major' and 'minor' fields are the major and minor revision numbers,221221respectively, of the SOC.222222223223-For example, to match the 8323, revision 1.0:223223+For example, to match the 8323, revision 1.0::224224+224225 soc.model = 8323225226 soc.major = 1226227 soc.minor = 0···274273 'reserved'.275274276275After the last microcode is a 32-bit CRC. It can be calculated using277277-this algorithm:276276+this algorithm::278277279279-u32 crc32(const u8 *p, unsigned int len)280280-{278278+ u32 crc32(const u8 *p, unsigned int len)279279+ {281280 unsigned int i;282281 u32 crc = 0;283282···287286 crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0);288287 }289288 return crc;290290-}289289+ }291290292291VI - Sample Code for Creating Firmware Files293292============================================
···55syscall66=======7788-syscall calling sequence[*] matches the Power Architecture 64-bit ELF ABI88+syscall calling sequence\ [1]_ matches the Power Architecture 64-bit ELF ABI99specification C function calling sequence, including register preservation1010rules, with the following differences.11111212-[*] Some syscalls (typically low-level management functions) may have1313- different calling sequences (e.g., rt_sigreturn).1212+.. [1] Some syscalls (typically low-level management functions) may have1313+ different calling sequences (e.g., rt_sigreturn).14141515Parameters and return value1616---------------------------···3333Register preservation rules match the ELF ABI calling sequence with the3434following differences:35353636-r0: Volatile. (System call number.)3737-r3: Volatile. (Parameter 1, and return value.)3838-r4-r8: Volatile. (Parameters 2-6.)3939-cr0: Volatile (cr0.SO is the return error condition)4040-cr1, cr5-7: Nonvolatile.4141-lr: Nonvolatile.3636+=========== ============= ========================================3737+r0 Volatile (System call number.)3838+r3 Volatile (Parameter 1, and return value.)3939+r4-r8 Volatile (Parameters 2-6.)4040+cr0 Volatile (cr0.SO is the return error condition)4141+cr1, cr5-7 Nonvolatile4242+lr Nonvolatile4343+=========== ============= ========================================42444345All floating point and vector data registers as well as control and status4446registers are nonvolatile.···92909391Register preservation rules9492---------------------------9595-r0: Volatile.9696-cr1, cr5-7: Volatile.9797-lr: Volatile.9393+9494+=========== ========9595+r0 Volatile9696+cr1, cr5-7 Volatile9797+lr Volatile9898+=========== ========989999100Invocation100101----------
···11+============================12Transactional Memory support23============================34···1817guaranteed to either complete atomically or roll back and undo any partial1918changes.20192121-A simple transaction looks like this:2020+A simple transaction looks like this::22212323-begin_move_money:2424- tbegin2525- beq abort_handler2222+ begin_move_money:2323+ tbegin2424+ beq abort_handler26252727- ld r4, SAVINGS_ACCT(r3)2828- ld r5, CURRENT_ACCT(r3)2929- subi r5, r5, 13030- addi r4, r4, 13131- std r4, SAVINGS_ACCT(r3)3232- std r5, CURRENT_ACCT(r3)2626+ ld r4, SAVINGS_ACCT(r3)2727+ ld r5, CURRENT_ACCT(r3)2828+ subi r5, r5, 12929+ addi r4, r4, 13030+ std r4, SAVINGS_ACCT(r3)3131+ std r5, CURRENT_ACCT(r3)33323434- tend3333+ tend35343636- b continue3535+ b continue37363838-abort_handler:3939- ... test for odd failures ...3737+ abort_handler:3838+ ... test for odd failures ...40394141- /* Retry the transaction if it failed because it conflicted with4242- * someone else: */4343- b begin_move_money4040+ /* Retry the transaction if it failed because it conflicted with4141+ * someone else: */4242+ b begin_move_money444345444645The 'tbegin' instruction denotes the start point, and 'tend' the end point.···124123from the second ucontext. This will be necessary for crash handlers to125124determine, for example, the address of the instruction causing the SIGSEGV.126125127127-Example signal handler:126126+Example signal handler::128127129128 void crash_handler(int sig, siginfo_t *si, void *uc)130129 {···134133 if (ucp_link) {135134 u64 msr = ucp->uc_mcontext.regs->msr;136135 /* May have transactional ucontext! */137137-#ifndef __powerpc64__136136+ #ifndef __powerpc64__138137 msr |= ((u64)transactional_ucp->uc_mcontext.regs->msr) << 32;139139-#endif138138+ #endif140139 if (MSR_TM_ACTIVE(msr)) {141140 /* Yes, we crashed during a transaction. Oops. */142141 fprintf(stderr, "Transaction to be restarted at 0x%llx, but "···177176These are defined in <asm/reg.h>, and distinguish different reasons why the178177kernel aborted a transaction:179178179179+ ====================== ================================180180 TM_CAUSE_RESCHED Thread was rescheduled.181181 TM_CAUSE_TLBI Software TLB invalid.182182 TM_CAUSE_FAC_UNAV FP/VEC/VSX unavailable trap.···186184 TM_CAUSE_MISC Currently unused.187185 TM_CAUSE_ALIGNMENT Alignment fault.188186 TM_CAUSE_EMULATE Emulation that touched memory.187187+ ====================== ================================189188190189These can be checked by the user program's abort handler as TEXASR[0:7]. If191190bit 7 is set, it indicates that the error is consider persistent. For example···206203======207204208205TM on POWER9 has issues with storing the complete register state. This209209-is described in this commit:206206+is described in this commit::210207211208 commit 4bb3c7a0208fc13ca70598efd109901a7cd45ae7212209 Author: Paul Mackerras <paulus@ozlabs.org>
-10
Documentation/process/conf.py
···11-# -*- coding: utf-8; mode: python -*-22-33-project = 'Linux Kernel Development Documentation'44-55-tags.add("subproject")66-77-latex_documents = [88- ('index', 'process.tex', 'Linux Kernel Development Documentation',99- 'The kernel development community', 'manual'),1010-]
···569569570570 [*] 버스 마스터링 DMA 와 일관성에 대해서는 다음을 참고하시기 바랍니다:571571572572- Documentation/PCI/pci.rst572572+ Documentation/driver-api/pci/pci.rst573573 Documentation/DMA-API-HOWTO.txt574574 Documentation/DMA-API.txt575575
-10
Documentation/userspace-api/conf.py
···11-# -*- coding: utf-8; mode: python -*-22-33-project = "The Linux kernel user-space API guide"44-55-tags.add("subproject")66-77-latex_documents = [88- ('index', 'userspace-api.tex', project,99- 'The kernel development community', 'manual'),1010-]
···6363 and loop forever. This is generally not what a watchdog user wants.64646565 For those wishing to learn more please see:6666- Documentation/kdump/kdump.rst6666+ Documentation/admin-guide/kdump/kdump.rst6767 Documentation/admin-guide/kernel-parameters.txt (panic=)6868 Your Linux Distribution specific documentation.6969
-10
Documentation/x86/conf.py
···11-# -*- coding: utf-8; mode: python -*-22-33-project = "X86 architecture specific documentation"44-55-tags.add("subproject")66-77-latex_documents = [88- ('index', 'x86.tex', project,99- 'The kernel development community', 'manual'),1010-]
···15311531 *15321532 * Call convention:15331533 *15341534- * syscall register convention is in Documentation/powerpc/syscall64-abi.txt15341534+ * syscall register convention is in Documentation/powerpc/syscall64-abi.rst15351535 *15361536 * For hypercalls, the register convention is as follows:15371537 * r0 volatile
+1-1
drivers/gpu/drm/drm_modes.c
···16861686 *16871687 * Additionals options can be provided following the mode, using a comma to16881688 * separate each option. Valid options can be found in16891689- * Documentation/fb/modedb.txt.16891689+ * Documentation/fb/modedb.rst.16901690 *16911691 * The intermediate drm_cmdline_mode structure is required to store additional16921692 * options from the command line modline like the force-enable/disable flag.
+1-1
drivers/i2c/busses/i2c-nvidia-gpu.c
···364364/*365365 * We need gpu_i2c_suspend() even if it is stub, for runtime pm to work366366 * correctly. Without it, lspci shows runtime pm status as "D0" for the card.367367- * Documentation/power/pci.txt also insists for driver to provide this.367367+ * Documentation/power/pci.rst also insists for driver to provide this.368368 */369369static __maybe_unused int gpu_i2c_suspend(struct device *dev)370370{
···419419/*420420 * Upload a microcode to the I-RAM at a specific address.421421 *422422- * See Documentation/powerpc/qe_firmware.txt for information on QE microcode422422+ * See Documentation/powerpc/qe_firmware.rst for information on QE microcode423423 * uploading.424424 *425425 * Currently, only version 1 is supported, so the 'version' field must be
+1-1
drivers/tty/hvc/hvcs.c
···4747 * using the 2.6 Linux kernel kref construct.4848 *4949 * For direction on installation and usage of this driver please reference5050- * Documentation/powerpc/hvcs.txt.5050+ * Documentation/powerpc/hvcs.rst.5151 */52525353#include <linux/device.h>
+1-1
include/soc/fsl/qe/qe.h
···259259260260/* Structure that defines QE firmware binary files.261261 *262262- * See Documentation/powerpc/qe_firmware.txt for a description of these262262+ * See Documentation/powerpc/qe_firmware.rst for a description of these263263 * fields.264264 */265265struct qe_firmware {
+97-21
scripts/sphinx-pre-install
···8383 foreach my $prog (sort keys %missing) {8484 my $is_optional = $missing{$prog};85858686+ # At least on some LTS distros like CentOS 7, texlive doesn't8787+ # provide all packages we need. When such distros are8888+ # detected, we have to disable PDF output.8989+ #9090+ # So, we need to ignore the packages that distros would9191+ # need for LaTeX to work9292+ if ($is_optional == 2 && !$pdf) {9393+ $optional--;9494+ next;9595+ }9696+8697 if ($is_optional) {8798 print "Warning: better to also install \"$prog\".\n";8899 } else {···344333345334 if ($pdf) {346335 check_missing_file("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf",347347- "fonts-dejavu", 1);336336+ "fonts-dejavu", 2);337337+338338+ check_missing_file("/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc",339339+ "fonts-noto-cjk", 2);348340 }349341350350- check_program("dvipng", 1) if ($pdf);342342+ check_program("dvipng", 2) if ($pdf);351343 check_missing(\%map);352344353345 return if (!$need && !$optional);···377363 my @fedora_tex_pkgs = (378364 "texlive-collection-fontsrecommended",379365 "texlive-collection-latex",366366+ "texlive-xecjk",380367 "dejavu-sans-fonts",381368 "dejavu-serif-fonts",382369 "dejavu-sans-mono-fonts",···386371 #387372 # Checks valid for RHEL/CentOS version 7.x.388373 #389389- if (! $system_release =~ /Fedora/) {374374+ my $old = 0;375375+ my $rel;376376+ $rel = $1 if ($system_release =~ /release\s+(\d+)/);377377+378378+ if (!($system_release =~ /Fedora/)) {390379 $map{"virtualenv"} = "python-virtualenv";380380+381381+ if ($rel && $rel < 8) {382382+ $old = 1;383383+ $pdf = 0;384384+385385+ printf("Note: texlive packages on RHEL/CENTOS <= 7 are incomplete. Can't support PDF output\n");386386+ printf("If you want to build PDF, please read:\n");387387+ printf("\thttps://www.systutorials.com/241660/how-to-install-tex-live-on-centos-7-linux/\n");388388+ }389389+ } else {390390+ if ($rel && $rel < 26) {391391+ $old = 1;392392+ }393393+ }394394+ if (!$rel) {395395+ printf("Couldn't identify release number\n");396396+ $old = 1;397397+ $pdf = 0;391398 }392399393393- my $release;400400+ if ($pdf) {401401+ check_missing_file("/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",402402+ "google-noto-sans-cjk-ttc-fonts", 2);403403+ }394404395395- $release = $1 if ($system_release =~ /Fedora\s+release\s+(\d+)/);396396-397397- check_rpm_missing(\@fedora26_opt_pkgs, 1) if ($pdf && $release >= 26);398398- check_rpm_missing(\@fedora_tex_pkgs, 1) if ($pdf);399399- check_missing_tex(1) if ($pdf);405405+ check_rpm_missing(\@fedora26_opt_pkgs, 2) if ($pdf && !$old);406406+ check_rpm_missing(\@fedora_tex_pkgs, 2) if ($pdf);407407+ check_missing_tex(2) if ($pdf);400408 check_missing(\%map);401409402410 return if (!$need && !$optional);403411404404- if ($release >= 18) {412412+ if (!$old) {405413 # dnf, for Fedora 18+406414 printf("You should run:\n\n\tsudo dnf install -y $install\n");407415 } else {···463425 "texlive-zapfding",464426 );465427466466- check_rpm_missing(\@suse_tex_pkgs, 1) if ($pdf);467467- check_missing_tex(1) if ($pdf);428428+ $map{"latexmk"} = "texlive-latexmk-bin";429429+430430+ # FIXME: add support for installing CJK fonts431431+ #432432+ # I tried hard, but was unable to find a way to install433433+ # "Noto Sans CJK SC" on openSUSE434434+435435+ check_rpm_missing(\@suse_tex_pkgs, 2) if ($pdf);436436+ check_missing_tex(2) if ($pdf);468437 check_missing(\%map);469438470439 return if (!$need && !$optional);···495450 "texlive-fontsextra",496451 );497452498498- check_rpm_missing(\@tex_pkgs, 1) if ($pdf);453453+ $map{"latexmk"} = "texlive-collection-basic";454454+455455+ if ($pdf) {456456+ check_missing_file("/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc",457457+ "google-noto-sans-cjk-ttc-fonts", 2);458458+ }459459+460460+ check_rpm_missing(\@tex_pkgs, 2) if ($pdf);499461 check_missing(\%map);500462501463 return if (!$need && !$optional);···525473 "texlive-latexextra",526474 "ttf-dejavu",527475 );528528- check_pacman_missing(\@archlinux_tex_pkgs, 1) if ($pdf);476476+ check_pacman_missing(\@archlinux_tex_pkgs, 2) if ($pdf);477477+478478+ if ($pdf) {479479+ check_missing_file("/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc",480480+ "noto-fonts-cjk", 2);481481+ }482482+529483 check_missing(\%map);530484531485 return if (!$need && !$optional);···550492 );551493552494 check_missing_file("/usr/share/fonts/dejavu/DejaVuSans.ttf",553553- "media-fonts/dejavu", 1) if ($pdf);495495+ "media-fonts/dejavu", 2) if ($pdf);496496+497497+ if ($pdf) {498498+ check_missing_file("/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf",499499+ "media-fonts/noto-cjk", 2);500500+ }554501555502 check_missing(\%map);556503557504 return if (!$need && !$optional);558505559506 printf("You should run:\n\n");560560- printf("\tsudo su -c 'echo \"media-gfx/imagemagick svg png\" > /etc/portage/package.use/imagemagick'\n");561561- printf("\tsudo su -c 'echo \"media-gfx/graphviz cairo pdf\" > /etc/portage/package.use/graphviz'\n");507507+508508+ my $imagemagick = "media-gfx/imagemagick svg png";509509+ my $cairo = "media-gfx/graphviz cairo pdf";510510+ my $portage_imagemagick = "/etc/portage/package.use/imagemagick";511511+ my $portage_cairo = "/etc/portage/package.use/graphviz";512512+513513+ if (qx(cat $portage_imagemagick) ne "$imagemagick\n") {514514+ printf("\tsudo su -c 'echo \"$imagemagick\" > $portage_imagemagick'\n")515515+ }516516+ if (qx(cat $portage_cairo) ne "$cairo\n") {517517+ printf("\tsudo su -c 'echo \"$cairo\" > $portage_cairo'\n");518518+ }519519+562520 printf("\tsudo emerge --ask $install\n");563521564522}···634560 my %map = (635561 "sphinx-build" => "sphinx"636562 );637637- check_missing_tex(1) if ($pdf);563563+ check_missing_tex(2) if ($pdf);638564 check_missing(\%map);639565 print "I don't know distro $system_release.\n";640566 print "So, I can't provide you a hint with the install procedure.\n";···663589 check_program("make", 0);664590 check_program("gcc", 0);665591 check_python_module("sphinx_rtd_theme", 1) if (!$virtualenv);666666- check_program("xelatex", 1) if ($pdf);667592 check_program("dot", 1);668593 check_program("convert", 1);669669- check_program("rsvg-convert", 1) if ($pdf);670670- check_program("latexmk", 1) if ($pdf);594594+595595+ # Extra PDF files - should use 2 for is_optional596596+ check_program("xelatex", 2) if ($pdf);597597+ check_program("rsvg-convert", 2) if ($pdf);598598+ check_program("latexmk", 2) if ($pdf);671599672600 check_distros();673601