diff options
| -rw-r--r-- | CREDITS | 2 | ||||
| -rw-r--r-- | Documentation/ABI/obsolete/sysfs-gpio | 2 | ||||
| -rw-r--r-- | Documentation/ABI/removed/sysfs-class-rfkill | 2 | ||||
| -rw-r--r-- | Documentation/ABI/stable/sysfs-class-rfkill | 2 | ||||
| -rw-r--r-- | Documentation/ABI/stable/sysfs-devices-node | 2 | ||||
| -rw-r--r-- | Documentation/ABI/testing/procfs-diskstats | 2 | ||||
| -rw-r--r-- | Documentation/ABI/testing/sysfs-block | 2 | ||||
| -rw-r--r-- | Documentation/ABI/testing/sysfs-block-device | 2 | ||||
| -rw-r--r-- | Documentation/ABI/testing/sysfs-class-switchtec | 2 | ||||
| -rw-r--r-- | Documentation/ABI/testing/sysfs-devices-system-cpu | 4 | ||||
| -rw-r--r-- | Documentation/ABI/testing/sysfs-platform-asus-laptop | 2 | ||||
| -rw-r--r-- | Documentation/COPYING-logo (renamed from Documentation/logo.txt) | 0 | ||||
| -rw-r--r-- | Documentation/DMA-API-HOWTO.txt | 2 | ||||
| -rw-r--r-- | Documentation/accounting/cgroupstats.rst (renamed from Documentation/accounting/cgroupstats.txt) | 14 | ||||
| -rw-r--r-- | Documentation/accounting/delay-accounting.rst (renamed from Documentation/accounting/delay-accounting.txt) | 61 | ||||
| -rw-r--r-- | Documentation/accounting/index.rst | 14 | ||||
| -rw-r--r-- | Documentation/accounting/psi.rst (renamed from Documentation/accounting/psi.txt) | 42 | ||||
| -rw-r--r-- | Documentation/accounting/taskstats-struct.rst (renamed from Documentation/accounting/taskstats-struct.txt) | 79 | ||||
| -rw-r--r-- | Documentation/accounting/taskstats.rst (renamed from Documentation/accounting/taskstats.txt) | 15 | ||||
| -rw-r--r-- | Documentation/admin-guide/aoe/aoe.rst (renamed from Documentation/aoe/aoe.rst) | 4 | ||||
| -rw-r--r-- | Documentation/admin-guide/aoe/autoload.sh (renamed from Documentation/aoe/autoload.sh) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/aoe/examples.rst (renamed from Documentation/aoe/examples.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/aoe/index.rst (renamed from Documentation/aoe/index.rst) | 2 | ||||
| -rw-r--r-- | Documentation/admin-guide/aoe/status.sh (renamed from Documentation/aoe/status.sh) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/aoe/todo.rst (renamed from Documentation/aoe/todo.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/aoe/udev-install.sh (renamed from Documentation/aoe/udev-install.sh) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/aoe/udev.txt (renamed from Documentation/aoe/udev.txt) | 2 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/drbd/DRBD-8.3-data-packets.svg (renamed from Documentation/blockdev/drbd/DRBD-8.3-data-packets.svg) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/drbd/DRBD-data-packets.svg (renamed from Documentation/blockdev/drbd/DRBD-data-packets.svg) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/drbd/conn-states-8.dot (renamed from Documentation/blockdev/drbd/conn-states-8.dot) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/drbd/data-structure-v9.rst (renamed from Documentation/blockdev/drbd/data-structure-v9.txt) | 6 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/drbd/disk-states-8.dot (renamed from Documentation/blockdev/drbd/disk-states-8.dot) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/drbd/drbd-connection-state-overview.dot (renamed from Documentation/blockdev/drbd/drbd-connection-state-overview.dot) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/drbd/figures.rst | 30 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/drbd/index.rst (renamed from Documentation/blockdev/drbd/README.txt) | 15 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/drbd/node-states-8.dot (renamed from Documentation/blockdev/drbd/node-states-8.dot) | 1 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/floppy.rst (renamed from Documentation/blockdev/floppy.txt) | 88 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/index.rst | 16 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/nbd.rst (renamed from Documentation/blockdev/nbd.txt) | 2 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/paride.rst (renamed from Documentation/blockdev/paride.txt) | 196 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/ramdisk.rst (renamed from Documentation/blockdev/ramdisk.txt) | 55 | ||||
| -rw-r--r-- | Documentation/admin-guide/blockdev/zram.rst (renamed from Documentation/blockdev/zram.txt) | 197 | ||||
| -rw-r--r-- | Documentation/admin-guide/btmrvl.rst (renamed from Documentation/btmrvl.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/bug-hunting.rst | 4 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/blkio-controller.rst (renamed from Documentation/cgroup-v1/blkio-controller.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/cgroups.rst (renamed from Documentation/cgroup-v1/cgroups.rst) | 4 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/cpuacct.rst (renamed from Documentation/cgroup-v1/cpuacct.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/cpusets.rst (renamed from Documentation/cgroup-v1/cpusets.rst) | 2 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/devices.rst (renamed from Documentation/cgroup-v1/devices.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/freezer-subsystem.rst (renamed from Documentation/cgroup-v1/freezer-subsystem.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/hugetlb.rst (renamed from Documentation/cgroup-v1/hugetlb.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/index.rst (renamed from Documentation/cgroup-v1/index.rst) | 2 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/memcg_test.rst (renamed from Documentation/cgroup-v1/memcg_test.rst) | 4 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/memory.rst (renamed from Documentation/cgroup-v1/memory.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/net_cls.rst (renamed from Documentation/cgroup-v1/net_cls.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/net_prio.rst (renamed from Documentation/cgroup-v1/net_prio.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/pids.rst (renamed from Documentation/cgroup-v1/pids.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v1/rdma.rst (renamed from Documentation/cgroup-v1/rdma.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/cgroup-v2.rst | 8 | ||||
| -rw-r--r-- | Documentation/admin-guide/clearing-warn-once.rst (renamed from Documentation/clearing-warn-once.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/cpu-load.rst (renamed from Documentation/cpu-load.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/cputopology.rst (renamed from Documentation/cputopology.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/cache-policies.rst (renamed from Documentation/device-mapper/cache-policies.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/cache.rst (renamed from Documentation/device-mapper/cache.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/delay.rst (renamed from Documentation/device-mapper/delay.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/dm-crypt.rst (renamed from Documentation/device-mapper/dm-crypt.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/dm-dust.txt (renamed from Documentation/device-mapper/dm-dust.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/dm-flakey.rst (renamed from Documentation/device-mapper/dm-flakey.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/dm-init.rst (renamed from Documentation/device-mapper/dm-init.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/dm-integrity.rst (renamed from Documentation/device-mapper/dm-integrity.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/dm-io.rst (renamed from Documentation/device-mapper/dm-io.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/dm-log.rst (renamed from Documentation/device-mapper/dm-log.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/dm-queue-length.rst (renamed from Documentation/device-mapper/dm-queue-length.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/dm-raid.rst (renamed from Documentation/device-mapper/dm-raid.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/dm-service-time.rst (renamed from Documentation/device-mapper/dm-service-time.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/dm-uevent.rst (renamed from Documentation/device-mapper/dm-uevent.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/dm-zoned.rst (renamed from Documentation/device-mapper/dm-zoned.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/era.rst (renamed from Documentation/device-mapper/era.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/index.rst (renamed from Documentation/device-mapper/index.rst) | 2 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/kcopyd.rst (renamed from Documentation/device-mapper/kcopyd.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/linear.rst (renamed from Documentation/device-mapper/linear.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/log-writes.rst (renamed from Documentation/device-mapper/log-writes.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/persistent-data.rst (renamed from Documentation/device-mapper/persistent-data.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/snapshot.rst (renamed from Documentation/device-mapper/snapshot.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/statistics.rst (renamed from Documentation/device-mapper/statistics.rst) | 4 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/striped.rst (renamed from Documentation/device-mapper/striped.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/switch.rst (renamed from Documentation/device-mapper/switch.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/thin-provisioning.rst (renamed from Documentation/device-mapper/thin-provisioning.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/unstriped.rst (renamed from Documentation/device-mapper/unstriped.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/verity.rst (renamed from Documentation/device-mapper/verity.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/writecache.rst (renamed from Documentation/device-mapper/writecache.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/device-mapper/zero.rst (renamed from Documentation/device-mapper/zero.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/efi-stub.rst (renamed from Documentation/efi-stub.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/gpio/index.rst (renamed from Documentation/gpio/index.rst) | 2 | ||||
| -rw-r--r-- | Documentation/admin-guide/gpio/sysfs.rst (renamed from Documentation/gpio/sysfs.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/highuid.rst (renamed from Documentation/highuid.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/hw-vuln/l1tf.rst | 2 | ||||
| -rw-r--r-- | Documentation/admin-guide/hw_random.rst (renamed from Documentation/hw_random.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/index.rst | 28 | ||||
| -rw-r--r-- | Documentation/admin-guide/iostats.rst (renamed from Documentation/iostats.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/kdump/gdbmacros.txt (renamed from Documentation/kdump/gdbmacros.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/kdump/index.rst (renamed from Documentation/kdump/index.rst) | 1 | ||||
| -rw-r--r-- | Documentation/admin-guide/kdump/kdump.rst (renamed from Documentation/kdump/kdump.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/kdump/vmcoreinfo.rst (renamed from Documentation/kdump/vmcoreinfo.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/kernel-parameters.rst | 2 | ||||
| -rw-r--r-- | Documentation/admin-guide/kernel-parameters.txt | 44 | ||||
| -rw-r--r-- | Documentation/admin-guide/kernel-per-CPU-kthreads.rst (renamed from Documentation/kernel-per-CPU-kthreads.txt) | 2 | ||||
| -rw-r--r-- | Documentation/admin-guide/laptops/asus-laptop.rst (renamed from Documentation/laptops/asus-laptop.txt) | 92 | ||||
| -rw-r--r-- | Documentation/admin-guide/laptops/disk-shock-protection.rst (renamed from Documentation/laptops/disk-shock-protection.txt) | 32 | ||||
| -rw-r--r-- | Documentation/admin-guide/laptops/index.rst | 17 | ||||
| -rw-r--r-- | Documentation/admin-guide/laptops/laptop-mode.rst (renamed from Documentation/laptops/laptop-mode.txt) | 579 | ||||
| -rw-r--r-- | Documentation/admin-guide/laptops/lg-laptop.rst (renamed from Documentation/laptops/lg-laptop.rst) | 1 | ||||
| -rw-r--r-- | Documentation/admin-guide/laptops/sony-laptop.rst (renamed from Documentation/laptops/sony-laptop.txt) | 58 | ||||
| -rw-r--r-- | Documentation/admin-guide/laptops/sonypi.rst (renamed from Documentation/laptops/sonypi.txt) | 50 | ||||
| -rw-r--r-- | Documentation/admin-guide/laptops/thinkpad-acpi.rst (renamed from Documentation/laptops/thinkpad-acpi.txt) | 369 | ||||
| -rw-r--r-- | Documentation/admin-guide/laptops/toshiba_haps.rst (renamed from Documentation/laptops/toshiba_haps.txt) | 49 | ||||
| -rw-r--r-- | Documentation/admin-guide/lcd-panel-cgram.rst (renamed from Documentation/auxdisplay/lcd-panel-cgram.txt) | 7 | ||||
| -rw-r--r-- | Documentation/admin-guide/ldm.rst (renamed from Documentation/ldm.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/lockup-watchdogs.rst (renamed from Documentation/lockup-watchdogs.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/mm/cma_debugfs.rst (renamed from Documentation/cma/debugfs.txt) | 6 | ||||
| -rw-r--r-- | Documentation/admin-guide/mm/index.rst | 3 | ||||
| -rw-r--r-- | Documentation/admin-guide/mm/ksm.rst | 2 | ||||
| -rw-r--r-- | Documentation/admin-guide/mm/numa_memory_policy.rst | 2 | ||||
| -rw-r--r-- | Documentation/admin-guide/namespaces/compatibility-list.rst (renamed from Documentation/namespaces/compatibility-list.txt) | 10 | ||||
| -rw-r--r-- | Documentation/admin-guide/namespaces/index.rst | 11 | ||||
| -rw-r--r-- | Documentation/admin-guide/namespaces/resource-control.rst (renamed from Documentation/namespaces/resource-control.txt) | 4 | ||||
| -rw-r--r-- | Documentation/admin-guide/numastat.rst (renamed from Documentation/numastat.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/perf/arm-ccn.rst (renamed from Documentation/perf/arm-ccn.txt) | 18 | ||||
| -rw-r--r-- | Documentation/admin-guide/perf/arm_dsu_pmu.rst (renamed from Documentation/perf/arm_dsu_pmu.txt) | 5 | ||||
| -rw-r--r-- | Documentation/admin-guide/perf/hisi-pmu.rst (renamed from Documentation/perf/hisi-pmu.txt) | 37 | ||||
| -rw-r--r-- | Documentation/admin-guide/perf/index.rst | 16 | ||||
| -rw-r--r-- | Documentation/admin-guide/perf/qcom_l2_pmu.rst (renamed from Documentation/perf/qcom_l2_pmu.txt) | 3 | ||||
| -rw-r--r-- | Documentation/admin-guide/perf/qcom_l3_pmu.rst (renamed from Documentation/perf/qcom_l3_pmu.txt) | 3 | ||||
| -rw-r--r-- | Documentation/admin-guide/perf/thunderx2-pmu.rst (renamed from Documentation/perf/thunderx2-pmu.txt) | 25 | ||||
| -rw-r--r-- | Documentation/admin-guide/perf/xgene-pmu.rst (renamed from Documentation/perf/xgene-pmu.txt) | 3 | ||||
| -rw-r--r-- | Documentation/admin-guide/pnp.rst (renamed from Documentation/pnp.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/rapidio.rst (renamed from Documentation/driver-api/rapidio.rst) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/rtc.rst (renamed from Documentation/rtc.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/svga.rst (renamed from Documentation/svga.txt) | 0 | ||||
| -rw-r--r-- | Documentation/admin-guide/sysctl/abi.rst | 67 | ||||
| -rw-r--r-- | Documentation/admin-guide/sysctl/fs.rst (renamed from Documentation/sysctl/fs.txt) | 146 | ||||
| -rw-r--r-- | Documentation/admin-guide/sysctl/index.rst (renamed from Documentation/sysctl/README) | 34 | ||||
| -rw-r--r-- | Documentation/admin-guide/sysctl/kernel.rst (renamed from Documentation/sysctl/kernel.txt) | 374 | ||||
| -rw-r--r-- | Documentation/admin-guide/sysctl/net.rst (renamed from Documentation/sysctl/net.txt) | 141 | ||||
| -rw-r--r-- | Documentation/admin-guide/sysctl/sunrpc.rst (renamed from Documentation/sysctl/sunrpc.txt) | 13 | ||||
| -rw-r--r-- | Documentation/admin-guide/sysctl/user.rst (renamed from Documentation/sysctl/user.txt) | 32 | ||||
| -rw-r--r-- | Documentation/admin-guide/sysctl/vm.rst (renamed from Documentation/sysctl/vm.txt) | 264 | ||||
| -rw-r--r-- | Documentation/admin-guide/video-output.rst (renamed from Documentation/video-output.txt) | 0 | ||||
| -rw-r--r-- | Documentation/arm/Marvell/README | 395 | ||||
| -rw-r--r-- | Documentation/arm/Netwinder | 78 | ||||
| -rw-r--r-- | Documentation/arm/SA1100/FreeBird | 21 | ||||
| -rw-r--r-- | Documentation/arm/SA1100/empeg | 2 | ||||
| -rw-r--r-- | Documentation/arm/SA1100/serial_UART | 47 | ||||
| -rw-r--r-- | Documentation/arm/arm.rst (renamed from Documentation/arm/README) | 50 | ||||
| -rw-r--r-- | Documentation/arm/booting.rst (renamed from Documentation/arm/Booting) | 71 | ||||
| -rw-r--r-- | Documentation/arm/cluster-pm-race-avoidance.rst (renamed from Documentation/arm/cluster-pm-race-avoidance.txt) | 177 | ||||
| -rw-r--r-- | Documentation/arm/firmware.rst (renamed from Documentation/arm/firmware.txt) | 14 | ||||
| -rw-r--r-- | Documentation/arm/index.rst | 80 | ||||
| -rw-r--r-- | Documentation/arm/interrupts.rst (renamed from Documentation/arm/Interrupts) | 90 | ||||
| -rw-r--r-- | Documentation/arm/ixp4xx.rst (renamed from Documentation/arm/IXP4xx) | 61 | ||||
| -rw-r--r-- | Documentation/arm/kernel_mode_neon.rst (renamed from Documentation/arm/kernel_mode_neon.txt) | 3 | ||||
| -rw-r--r-- | Documentation/arm/kernel_user_helpers.rst (renamed from Documentation/arm/kernel_user_helpers.txt) | 79 | ||||
| -rw-r--r-- | Documentation/arm/keystone/knav-qmss.rst (renamed from Documentation/arm/keystone/knav-qmss.txt) | 6 | ||||
| -rw-r--r-- | Documentation/arm/keystone/overview.rst (renamed from Documentation/arm/keystone/Overview.txt) | 47 | ||||
| -rw-r--r-- | Documentation/arm/marvel.rst | 488 | ||||
| -rw-r--r-- | Documentation/arm/mem_alignment.rst (renamed from Documentation/arm/mem_alignment) | 11 | ||||
| -rw-r--r-- | Documentation/arm/memory.rst (renamed from Documentation/arm/memory.txt) | 9 | ||||
| -rw-r--r-- | Documentation/arm/microchip.rst (renamed from Documentation/arm/Microchip/README) | 63 | ||||
| -rw-r--r-- | Documentation/arm/netwinder.rst | 85 | ||||
| -rw-r--r-- | Documentation/arm/nwfpe/index.rst | 13 | ||||
| -rw-r--r-- | Documentation/arm/nwfpe/netwinder-fpe.rst (renamed from Documentation/arm/nwfpe/README.FPE) | 24 | ||||
| -rw-r--r-- | Documentation/arm/nwfpe/notes.rst (renamed from Documentation/arm/nwfpe/NOTES) | 3 | ||||
| -rw-r--r-- | Documentation/arm/nwfpe/nwfpe.rst (renamed from Documentation/arm/nwfpe/README) | 10 | ||||
| -rw-r--r-- | Documentation/arm/nwfpe/todo.rst (renamed from Documentation/arm/nwfpe/TODO) | 47 | ||||
| -rw-r--r-- | Documentation/arm/omap/dss.rst (renamed from Documentation/arm/OMAP/DSS) | 102 | ||||
| -rw-r--r-- | Documentation/arm/omap/index.rst | 12 | ||||
| -rw-r--r-- | Documentation/arm/omap/omap.rst (renamed from Documentation/arm/OMAP/README) | 7 | ||||
| -rw-r--r-- | Documentation/arm/omap/omap_pm.rst (renamed from Documentation/arm/OMAP/omap_pm) | 55 | ||||
| -rw-r--r-- | Documentation/arm/porting.rst (renamed from Documentation/arm/Porting) | 14 | ||||
| -rw-r--r-- | Documentation/arm/pxa/mfp.rst (renamed from Documentation/arm/pxa/mfp.txt) | 110 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/adsbitsy.rst (renamed from Documentation/arm/SA1100/ADSBitsy) | 14 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/assabet.rst (renamed from Documentation/arm/SA1100/Assabet) | 193 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/brutus.rst (renamed from Documentation/arm/SA1100/Brutus) | 49 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/cerf.rst (renamed from Documentation/arm/SA1100/CERF) | 10 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/freebird.rst | 25 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/graphicsclient.rst (renamed from Documentation/arm/SA1100/GraphicsClient) | 48 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/graphicsmaster.rst (renamed from Documentation/arm/SA1100/GraphicsMaster) | 13 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/huw_webpanel.rst (renamed from Documentation/arm/SA1100/HUW_WEBPANEL) | 8 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/index.rst | 25 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/itsy.rst (renamed from Documentation/arm/SA1100/Itsy) | 14 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/lart.rst (renamed from Documentation/arm/SA1100/LART) | 3 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/nanoengine.rst (renamed from Documentation/arm/SA1100/nanoEngine) | 6 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/pangolin.rst (renamed from Documentation/arm/SA1100/Pangolin) | 10 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/pleb.rst (renamed from Documentation/arm/SA1100/PLEB) | 6 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/serial_uart.rst | 51 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/tifon.rst (renamed from Documentation/arm/SA1100/Tifon) | 4 | ||||
| -rw-r--r-- | Documentation/arm/sa1100/yopy.rst (renamed from Documentation/arm/SA1100/Yopy) | 5 | ||||
| -rw-r--r-- | Documentation/arm/samsung-s3c24xx/cpufreq.rst (renamed from Documentation/arm/Samsung-S3C24XX/CPUfreq.txt) | 5 | ||||
| -rw-r--r-- | Documentation/arm/samsung-s3c24xx/eb2410itx.rst (renamed from Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt) | 5 | ||||
| -rw-r--r-- | Documentation/arm/samsung-s3c24xx/gpio.rst (renamed from Documentation/arm/Samsung-S3C24XX/GPIO.txt) | 23 | ||||
| -rw-r--r-- | Documentation/arm/samsung-s3c24xx/h1940.rst (renamed from Documentation/arm/Samsung-S3C24XX/H1940.txt) | 5 | ||||
| -rw-r--r-- | Documentation/arm/samsung-s3c24xx/index.rst | 20 | ||||
| -rw-r--r-- | Documentation/arm/samsung-s3c24xx/nand.rst (renamed from Documentation/arm/Samsung-S3C24XX/NAND.txt) | 6 | ||||
| -rw-r--r-- | Documentation/arm/samsung-s3c24xx/overview.rst (renamed from Documentation/arm/Samsung-S3C24XX/Overview.txt) | 21 | ||||
| -rw-r--r-- | Documentation/arm/samsung-s3c24xx/s3c2412.rst (renamed from Documentation/arm/Samsung-S3C24XX/S3C2412.txt) | 5 | ||||
| -rw-r--r-- | Documentation/arm/samsung-s3c24xx/s3c2413.rst (renamed from Documentation/arm/Samsung-S3C24XX/S3C2413.txt) | 7 | ||||
| -rw-r--r-- | Documentation/arm/samsung-s3c24xx/smdk2440.rst (renamed from Documentation/arm/Samsung-S3C24XX/SMDK2440.txt) | 5 | ||||
| -rw-r--r-- | Documentation/arm/samsung-s3c24xx/suspend.rst (renamed from Documentation/arm/Samsung-S3C24XX/Suspend.txt) | 20 | ||||
| -rw-r--r-- | Documentation/arm/samsung-s3c24xx/usb-host.rst (renamed from Documentation/arm/Samsung-S3C24XX/USB-Host.txt) | 16 | ||||
| -rw-r--r-- | Documentation/arm/samsung/bootloader-interface.rst (renamed from Documentation/arm/Samsung/Bootloader-interface.txt) | 27 | ||||
| -rwxr-xr-x | Documentation/arm/samsung/clksrc-change-registers.awk (renamed from Documentation/arm/Samsung/clksrc-change-registers.awk) | 0 | ||||
| -rw-r--r-- | Documentation/arm/samsung/gpio.rst (renamed from Documentation/arm/Samsung/GPIO.txt) | 7 | ||||
| -rw-r--r-- | Documentation/arm/samsung/index.rst | 12 | ||||
| -rw-r--r-- | Documentation/arm/samsung/overview.rst (renamed from Documentation/arm/Samsung/Overview.txt) | 15 | ||||
| -rw-r--r-- | Documentation/arm/setup.rst (renamed from Documentation/arm/Setup) | 49 | ||||
| -rw-r--r-- | Documentation/arm/sh-mobile/.gitignore (renamed from Documentation/arm/SH-Mobile/.gitignore) | 0 | ||||
| -rw-r--r-- | Documentation/arm/spear/overview.rst (renamed from Documentation/arm/SPEAr/overview.txt) | 21 | ||||
| -rw-r--r-- | Documentation/arm/sti/overview.rst (renamed from Documentation/arm/sti/overview.txt) | 21 | ||||
| -rw-r--r-- | Documentation/arm/sti/stih407-overview.rst (renamed from Documentation/arm/sti/stih407-overview.txt) | 9 | ||||
| -rw-r--r-- | Documentation/arm/sti/stih415-overview.rst (renamed from Documentation/arm/sti/stih415-overview.txt) | 8 | ||||
| -rw-r--r-- | Documentation/arm/sti/stih416-overview.rst (renamed from Documentation/arm/sti/stih416-overview.txt) | 5 | ||||
| -rw-r--r-- | Documentation/arm/sti/stih418-overview.rst (renamed from Documentation/arm/sti/stih418-overview.txt) | 9 | ||||
| -rw-r--r-- | Documentation/arm/stm32/overview.rst | 2 | ||||
| -rw-r--r-- | Documentation/arm/stm32/stm32f429-overview.rst | 7 | ||||
| -rw-r--r-- | Documentation/arm/stm32/stm32f746-overview.rst | 7 | ||||
| -rw-r--r-- | Documentation/arm/stm32/stm32f769-overview.rst | 7 | ||||
| -rw-r--r-- | Documentation/arm/stm32/stm32h743-overview.rst | 7 | ||||
| -rw-r--r-- | Documentation/arm/stm32/stm32mp157-overview.rst | 3 | ||||
| -rw-r--r-- | Documentation/arm/sunxi.rst (renamed from Documentation/arm/sunxi/README) | 98 | ||||
| -rw-r--r-- | Documentation/arm/sunxi/clocks.rst (renamed from Documentation/arm/sunxi/clocks.txt) | 7 | ||||
| -rw-r--r-- | Documentation/arm/swp_emulation.rst (renamed from Documentation/arm/swp_emulation) | 24 | ||||
| -rw-r--r-- | Documentation/arm/tcm.rst (renamed from Documentation/arm/tcm.txt) | 54 | ||||
| -rw-r--r-- | Documentation/arm/uefi.rst (renamed from Documentation/arm/uefi.txt) | 39 | ||||
| -rw-r--r-- | Documentation/arm/vfp/release-notes.rst (renamed from Documentation/arm/VFP/release-notes.txt) | 4 | ||||
| -rw-r--r-- | Documentation/arm/vlocks.rst (renamed from Documentation/arm/vlocks.txt) | 9 | ||||
| -rw-r--r-- | Documentation/arm64/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/backlight/lp855x-driver.txt | 66 | ||||
| -rw-r--r-- | Documentation/block/bfq-iosched.rst (renamed from Documentation/block/bfq-iosched.txt) | 68 | ||||
| -rw-r--r-- | Documentation/block/biodoc.rst (renamed from Documentation/block/biodoc.txt) | 335 | ||||
| -rw-r--r-- | Documentation/block/biovecs.rst (renamed from Documentation/block/biovecs.txt) | 20 | ||||
| -rw-r--r-- | Documentation/block/capability.rst | 18 | ||||
| -rw-r--r-- | Documentation/block/capability.txt | 15 | ||||
| -rw-r--r-- | Documentation/block/cmdline-partition.rst (renamed from Documentation/block/cmdline-partition.txt) | 13 | ||||
| -rw-r--r-- | Documentation/block/data-integrity.rst (renamed from Documentation/block/data-integrity.txt) | 60 | ||||
| -rw-r--r-- | Documentation/block/deadline-iosched.rst (renamed from Documentation/block/deadline-iosched.txt) | 21 | ||||
| -rw-r--r-- | Documentation/block/index.rst | 25 | ||||
| -rw-r--r-- | Documentation/block/ioprio.rst (renamed from Documentation/block/ioprio.txt) | 103 | ||||
| -rw-r--r-- | Documentation/block/kyber-iosched.rst (renamed from Documentation/block/kyber-iosched.txt) | 3 | ||||
| -rw-r--r-- | Documentation/block/null_blk.rst (renamed from Documentation/block/null_blk.txt) | 65 | ||||
| -rw-r--r-- | Documentation/block/pr.rst (renamed from Documentation/block/pr.txt) | 18 | ||||
| -rw-r--r-- | Documentation/block/queue-sysfs.rst (renamed from Documentation/block/queue-sysfs.txt) | 7 | ||||
| -rw-r--r-- | Documentation/block/request.rst (renamed from Documentation/block/request.txt) | 47 | ||||
| -rw-r--r-- | Documentation/block/stat.rst (renamed from Documentation/block/stat.txt) | 13 | ||||
| -rw-r--r-- | Documentation/block/switching-sched.rst (renamed from Documentation/block/switching-sched.txt) | 28 | ||||
| -rw-r--r-- | Documentation/block/writeback_cache_control.rst (renamed from Documentation/block/writeback_cache_control.txt) | 12 | ||||
| -rw-r--r-- | Documentation/cdrom/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/core-api/gcc-plugins.rst (renamed from Documentation/gcc-plugins.txt) | 0 | ||||
| -rw-r--r-- | Documentation/core-api/index.rst | 1 | ||||
| -rw-r--r-- | Documentation/core-api/printk-formats.rst | 2 | ||||
| -rw-r--r-- | Documentation/devicetree/bindings/arm/xen.txt | 2 | ||||
| -rw-r--r-- | Documentation/devicetree/bindings/phy/phy-bindings.txt | 2 | ||||
| -rw-r--r-- | Documentation/devicetree/bindings/phy/phy-pxa-usb.txt | 2 | ||||
| -rw-r--r-- | Documentation/devicetree/booting-without-of.txt | 4 | ||||
| -rw-r--r-- | Documentation/driver-api/backlight/lp855x-driver.rst | 81 | ||||
| -rw-r--r-- | Documentation/driver-api/bt8xxgpio.rst (renamed from Documentation/bt8xxgpio.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/connector.rst (renamed from Documentation/connector/connector.txt) | 130 | ||||
| -rw-r--r-- | Documentation/driver-api/console.rst (renamed from Documentation/console/console.txt) | 63 | ||||
| -rw-r--r-- | Documentation/driver-api/dcdbas.rst (renamed from Documentation/dcdbas.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/dell_rbu.rst (renamed from Documentation/dell_rbu.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/driver-model/binding.rst (renamed from Documentation/driver-model/binding.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/driver-model/bus.rst (renamed from Documentation/driver-model/bus.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/driver-model/class.rst (renamed from Documentation/driver-model/class.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/driver-model/design-patterns.rst (renamed from Documentation/driver-model/design-patterns.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/driver-model/device.rst (renamed from Documentation/driver-model/device.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/driver-model/devres.rst (renamed from Documentation/driver-model/devres.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/driver-model/driver.rst (renamed from Documentation/driver-model/driver.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/driver-model/index.rst (renamed from Documentation/driver-model/index.rst) | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/driver-model/overview.rst (renamed from Documentation/driver-model/overview.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/driver-model/platform.rst (renamed from Documentation/driver-model/platform.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/driver-model/porting.rst (renamed from Documentation/driver-model/porting.rst) | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/early-userspace/buffer-format.rst (renamed from Documentation/early-userspace/buffer-format.txt) | 19 | ||||
| -rw-r--r-- | Documentation/driver-api/early-userspace/early_userspace_support.rst (renamed from Documentation/early-userspace/README) | 3 | ||||
| -rw-r--r-- | Documentation/driver-api/early-userspace/index.rst | 18 | ||||
| -rw-r--r-- | Documentation/driver-api/edid.rst (renamed from Documentation/EDID/howto.rst) | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/eisa.rst (renamed from Documentation/eisa.txt) | 4 | ||||
| -rw-r--r-- | Documentation/driver-api/gpio/driver.rst | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/index.rst | 43 | ||||
| -rw-r--r-- | Documentation/driver-api/interconnect.rst (renamed from Documentation/interconnect/interconnect.rst) | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/isa.rst (renamed from Documentation/isa.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/isapnp.rst (renamed from Documentation/isapnp.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/lightnvm-pblk.rst (renamed from Documentation/lightnvm/pblk.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/md/index.rst | 12 | ||||
| -rw-r--r-- | Documentation/driver-api/md/md-cluster.rst (renamed from Documentation/md/md-cluster.txt) | 184 | ||||
| -rw-r--r-- | Documentation/driver-api/md/raid5-cache.rst (renamed from Documentation/md/raid5-cache.txt) | 28 | ||||
| -rw-r--r-- | Documentation/driver-api/md/raid5-ppl.rst (renamed from Documentation/md/raid5-ppl.txt) | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/memory-devices/index.rst | 18 | ||||
| -rw-r--r-- | Documentation/driver-api/memory-devices/ti-emif.rst (renamed from Documentation/memory-devices/ti-emif.txt) | 27 | ||||
| -rw-r--r-- | Documentation/driver-api/memory-devices/ti-gpmc.rst (renamed from Documentation/bus-devices/ti-gpmc.txt) | 163 | ||||
| -rw-r--r-- | Documentation/driver-api/men-chameleon-bus.rst (renamed from Documentation/men-chameleon-bus.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/mmc/index.rst | 13 | ||||
| -rw-r--r-- | Documentation/driver-api/mmc/mmc-async-req.rst (renamed from Documentation/mmc/mmc-async-req.txt) | 59 | ||||
| -rw-r--r-- | Documentation/driver-api/mmc/mmc-dev-attrs.rst (renamed from Documentation/mmc/mmc-dev-attrs.txt) | 32 | ||||
| -rw-r--r-- | Documentation/driver-api/mmc/mmc-dev-parts.rst (renamed from Documentation/mmc/mmc-dev-parts.txt) | 13 | ||||
| -rw-r--r-- | Documentation/driver-api/mmc/mmc-tools.rst (renamed from Documentation/mmc/mmc-tools.txt) | 5 | ||||
| -rw-r--r-- | Documentation/driver-api/mtd/index.rst | 12 | ||||
| -rw-r--r-- | Documentation/driver-api/mtd/intel-spi.rst (renamed from Documentation/mtd/intel-spi.txt) | 46 | ||||
| -rw-r--r-- | Documentation/driver-api/mtd/nand_ecc.rst (renamed from Documentation/mtd/nand_ecc.txt) | 497 | ||||
| -rw-r--r-- | Documentation/driver-api/mtd/spi-nor.rst (renamed from Documentation/mtd/spi-nor.txt) | 7 | ||||
| -rw-r--r-- | Documentation/driver-api/nfc/index.rst | 11 | ||||
| -rw-r--r-- | Documentation/driver-api/nfc/nfc-hci.rst (renamed from Documentation/nfc/nfc-hci.txt) | 167 | ||||
| -rw-r--r-- | Documentation/driver-api/nfc/nfc-pn544.rst (renamed from Documentation/nfc/nfc-pn544.txt) | 6 | ||||
| -rw-r--r-- | Documentation/driver-api/ntb.rst (renamed from Documentation/ntb.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/nvdimm/btt.rst (renamed from Documentation/nvdimm/btt.txt) | 144 | ||||
| -rw-r--r-- | Documentation/driver-api/nvdimm/index.rst | 12 | ||||
| -rw-r--r-- | Documentation/driver-api/nvdimm/nvdimm.rst (renamed from Documentation/nvdimm/nvdimm.txt) | 526 | ||||
| -rw-r--r-- | Documentation/driver-api/nvdimm/security.rst (renamed from Documentation/nvdimm/security.txt) | 4 | ||||
| -rw-r--r-- | Documentation/driver-api/nvmem.rst (renamed from Documentation/nvmem/nvmem.txt) | 112 | ||||
| -rw-r--r-- | Documentation/driver-api/parport-lowlevel.rst (renamed from Documentation/parport-lowlevel.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/phy/index.rst | 18 | ||||
| -rw-r--r-- | Documentation/driver-api/phy/phy.rst (renamed from Documentation/phy.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/phy/samsung-usb2.rst (renamed from Documentation/phy/samsung-usb2.txt) | 60 | ||||
| -rw-r--r-- | Documentation/driver-api/pps.rst | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/pti_intel_mid.rst | 106 | ||||
| -rw-r--r-- | Documentation/driver-api/ptp.rst | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/pwm.rst (renamed from Documentation/pwm.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/rapidio/index.rst | 15 | ||||
| -rw-r--r-- | Documentation/driver-api/rapidio/mport_cdev.rst (renamed from Documentation/rapidio/mport_cdev.txt) | 47 | ||||
| -rw-r--r-- | Documentation/driver-api/rapidio/rapidio.rst (renamed from Documentation/rapidio/rapidio.txt) | 39 | ||||
| -rw-r--r-- | Documentation/driver-api/rapidio/rio_cm.rst (renamed from Documentation/rapidio/rio_cm.txt) | 66 | ||||
| -rw-r--r-- | Documentation/driver-api/rapidio/sysfs.rst (renamed from Documentation/rapidio/sysfs.txt) | 4 | ||||
| -rw-r--r-- | Documentation/driver-api/rapidio/tsi721.rst (renamed from Documentation/rapidio/tsi721.txt) | 45 | ||||
| -rw-r--r-- | Documentation/driver-api/rfkill.rst (renamed from Documentation/rfkill.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/serial/cyclades_z.rst (renamed from Documentation/serial/cyclades_z.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/serial/driver.rst (renamed from Documentation/serial/driver.rst) | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/serial/index.rst (renamed from Documentation/serial/index.rst) | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/serial/moxa-smartio.rst (renamed from Documentation/serial/moxa-smartio.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/serial/n_gsm.rst (renamed from Documentation/serial/n_gsm.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/serial/rocket.rst (renamed from Documentation/serial/rocket.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/serial/serial-iso7816.rst (renamed from Documentation/serial/serial-iso7816.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/serial/serial-rs485.rst (renamed from Documentation/serial/serial-rs485.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/serial/tty.rst (renamed from Documentation/serial/tty.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/sgi-ioc4.rst (renamed from Documentation/sgi-ioc4.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/sm501.rst (renamed from Documentation/SM501.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/smsc_ece1099.rst (renamed from Documentation/smsc_ece1099.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/switchtec.rst (renamed from Documentation/switchtec.txt) | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/sync_file.rst (renamed from Documentation/sync_file.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/vfio-mediated-device.rst (renamed from Documentation/vfio-mediated-device.txt) | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/vfio.rst (renamed from Documentation/vfio.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/xilinx/eemi.rst (renamed from Documentation/xilinx/eemi.rst) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/xilinx/index.rst (renamed from Documentation/xilinx/index.rst) | 1 | ||||
| -rw-r--r-- | Documentation/driver-api/xillybus.rst (renamed from Documentation/xillybus.txt) | 0 | ||||
| -rw-r--r-- | Documentation/driver-api/zorro.rst (renamed from Documentation/zorro.txt) | 0 | ||||
| -rw-r--r-- | Documentation/fault-injection/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/fb/fbcon.rst | 4 | ||||
| -rw-r--r-- | Documentation/fb/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/fb/vesafb.rst | 2 | ||||
| -rw-r--r-- | Documentation/filesystems/nfs/nfsroot.txt | 2 | ||||
| -rw-r--r-- | Documentation/filesystems/proc.txt | 2 | ||||
| -rw-r--r-- | Documentation/filesystems/ramfs-rootfs-initramfs.txt | 4 | ||||
| -rw-r--r-- | Documentation/filesystems/sysfs.txt | 2 | ||||
| -rw-r--r-- | Documentation/filesystems/tmpfs.txt | 2 | ||||
| -rw-r--r-- | Documentation/firmware-guide/acpi/enumeration.rst | 2 | ||||
| -rw-r--r-- | Documentation/fpga/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/hid/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/hwmon/submitting-patches.rst | 2 | ||||
| -rw-r--r-- | Documentation/ia64/aliasing.rst (renamed from Documentation/ia64/aliasing.txt) | 73 | ||||
| -rw-r--r-- | Documentation/ia64/efirtc.rst (renamed from Documentation/ia64/efirtc.txt) | 120 | ||||
| -rw-r--r-- | Documentation/ia64/err_inject.rst (renamed from Documentation/ia64/err_inject.txt) | 359 | ||||
| -rw-r--r-- | Documentation/ia64/fsys.rst (renamed from Documentation/ia64/fsys.txt) | 133 | ||||
| -rw-r--r-- | Documentation/ia64/ia64.rst (renamed from Documentation/ia64/README) | 26 | ||||
| -rw-r--r-- | Documentation/ia64/index.rst | 18 | ||||
| -rw-r--r-- | Documentation/ia64/irq-redir.rst (renamed from Documentation/ia64/IRQ-redir.txt) | 31 | ||||
| -rw-r--r-- | Documentation/ia64/mca.rst (renamed from Documentation/ia64/mca.txt) | 10 | ||||
| -rw-r--r-- | Documentation/ia64/serial.rst (renamed from Documentation/ia64/serial.txt) | 36 | ||||
| -rw-r--r-- | Documentation/ia64/xen.rst | 206 | ||||
| -rw-r--r-- | Documentation/ia64/xen.txt | 183 | ||||
| -rw-r--r-- | Documentation/ide/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/iio/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/index.rst | 32 | ||||
| -rw-r--r-- | Documentation/ioctl/botching-up-ioctls.rst (renamed from Documentation/ioctl/botching-up-ioctls.txt) | 1 | ||||
| -rw-r--r-- | Documentation/ioctl/cdrom.rst | 1233 | ||||
| -rw-r--r-- | Documentation/ioctl/cdrom.txt | 967 | ||||
| -rw-r--r-- | Documentation/ioctl/hdio.rst (renamed from Documentation/ioctl/hdio.txt) | 835 | ||||
| -rw-r--r-- | Documentation/ioctl/index.rst | 16 | ||||
| -rw-r--r-- | Documentation/ioctl/ioctl-decoding.rst (renamed from Documentation/ioctl/ioctl-decoding.txt) | 13 | ||||
| -rw-r--r-- | Documentation/ioctl/ioctl-number.rst | 361 | ||||
| -rw-r--r-- | Documentation/ioctl/ioctl-number.txt | 351 | ||||
| -rw-r--r-- | Documentation/kbuild/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/kbuild/issues.rst | 20 | ||||
| -rw-r--r-- | Documentation/kbuild/kbuild.rst | 3 | ||||
| -rw-r--r-- | Documentation/kbuild/kconfig-language.rst | 12 | ||||
| -rw-r--r-- | Documentation/kbuild/kconfig.rst | 8 | ||||
| -rw-r--r-- | Documentation/kbuild/makefiles.rst | 1 | ||||
| -rw-r--r-- | Documentation/kernel-hacking/locking.rst | 2 | ||||
| -rw-r--r-- | Documentation/leds/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/livepatch/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/locking/index.rst | 24 | ||||
| -rw-r--r-- | Documentation/locking/lockdep-design.rst (renamed from Documentation/locking/lockdep-design.txt) | 51 | ||||
| -rw-r--r-- | Documentation/locking/lockstat.rst | 204 | ||||
| -rw-r--r-- | Documentation/locking/lockstat.txt | 183 | ||||
| -rw-r--r-- | Documentation/locking/locktorture.rst (renamed from Documentation/locking/locktorture.txt) | 105 | ||||
| -rw-r--r-- | Documentation/locking/mutex-design.rst (renamed from Documentation/locking/mutex-design.txt) | 26 | ||||
| -rw-r--r-- | Documentation/locking/rt-mutex-design.rst (renamed from Documentation/locking/rt-mutex-design.txt) | 139 | ||||
| -rw-r--r-- | Documentation/locking/rt-mutex.rst (renamed from Documentation/locking/rt-mutex.txt) | 30 | ||||
| -rw-r--r-- | Documentation/locking/spinlocks.rst (renamed from Documentation/locking/spinlocks.txt) | 32 | ||||
| -rw-r--r-- | Documentation/locking/ww-mutex-design.rst (renamed from Documentation/locking/ww-mutex-design.txt) | 82 | ||||
| -rw-r--r-- | Documentation/m68k/index.rst | 17 | ||||
| -rw-r--r-- | Documentation/m68k/kernel-options.rst (renamed from Documentation/m68k/kernel-options.txt) | 319 | ||||
| -rw-r--r-- | Documentation/mic/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/netlabel/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/networking/ip-sysctl.txt | 2 | ||||
| -rw-r--r-- | Documentation/pcmcia/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/pi-futex.txt | 2 | ||||
| -rw-r--r-- | Documentation/powerpc/firmware-assisted-dump.txt | 2 | ||||
| -rw-r--r-- | Documentation/process/submit-checklist.rst | 2 | ||||
| -rw-r--r-- | Documentation/pti/pti_intel_mid.txt | 99 | ||||
| -rw-r--r-- | Documentation/rbtree.txt | 6 | ||||
| -rw-r--r-- | Documentation/riscv/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/s390/debugging390.rst | 2 | ||||
| -rw-r--r-- | Documentation/s390/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/s390/vfio-ccw.rst | 6 | ||||
| -rw-r--r-- | Documentation/scheduler/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/scheduler/sched-deadline.rst | 2 | ||||
| -rw-r--r-- | Documentation/scheduler/sched-design-CFS.rst | 2 | ||||
| -rw-r--r-- | Documentation/scheduler/sched-rt-group.rst | 2 | ||||
| -rw-r--r-- | Documentation/security/index.rst | 5 | ||||
| -rw-r--r-- | Documentation/security/lsm-development.rst (renamed from Documentation/security/LSM.rst) | 0 | ||||
| -rw-r--r-- | Documentation/security/lsm.rst (renamed from Documentation/lsm.txt) | 0 | ||||
| -rw-r--r-- | Documentation/security/sak.rst (renamed from Documentation/SAK.txt) | 0 | ||||
| -rw-r--r-- | Documentation/security/siphash.rst (renamed from Documentation/siphash.txt) | 0 | ||||
| -rw-r--r-- | Documentation/security/tpm/index.rst | 1 | ||||
| -rw-r--r-- | Documentation/security/tpm/xen-tpmfront.rst (renamed from Documentation/security/tpm/xen-tpmfront.txt) | 105 | ||||
| -rw-r--r-- | Documentation/sparc/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/sysctl/abi.txt | 54 | ||||
| -rw-r--r-- | Documentation/target/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/timers/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/translations/it_IT/kernel-hacking/locking.rst | 2 | ||||
| -rw-r--r-- | Documentation/translations/it_IT/process/submit-checklist.rst | 2 | ||||
| -rw-r--r-- | Documentation/translations/zh_CN/arm/Booting | 4 | ||||
| -rw-r--r-- | Documentation/translations/zh_CN/arm/kernel_user_helpers.txt | 4 | ||||
| -rw-r--r-- | Documentation/translations/zh_CN/filesystems/sysfs.txt | 2 | ||||
| -rw-r--r-- | Documentation/translations/zh_CN/gpio.txt | 4 | ||||
| -rw-r--r-- | Documentation/translations/zh_CN/oops-tracing.txt | 4 | ||||
| -rw-r--r-- | Documentation/translations/zh_CN/process/submit-checklist.rst | 2 | ||||
| -rw-r--r-- | Documentation/userspace-api/accelerators/ocxl.rst (renamed from Documentation/accelerators/ocxl.rst) | 2 | ||||
| -rw-r--r-- | Documentation/userspace-api/index.rst | 1 | ||||
| -rw-r--r-- | Documentation/vm/numa.rst | 4 | ||||
| -rw-r--r-- | Documentation/vm/page_migration.rst | 2 | ||||
| -rw-r--r-- | Documentation/vm/unevictable-lru.rst | 4 | ||||
| -rw-r--r-- | Documentation/w1/w1.netlink | 2 | ||||
| -rw-r--r-- | Documentation/watchdog/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/x86/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/x86/intel-iommu.rst (renamed from Documentation/Intel-IOMMU.txt) | 0 | ||||
| -rw-r--r-- | Documentation/x86/intel_txt.rst (renamed from Documentation/intel_txt.txt) | 0 | ||||
| -rw-r--r-- | Documentation/x86/topology.rst | 2 | ||||
| -rw-r--r-- | Documentation/x86/x86_64/fake-numa-for-cpusets.rst | 4 | ||||
| -rw-r--r-- | Documentation/xtensa/atomctl.rst (renamed from Documentation/xtensa/atomctl.txt) | 13 | ||||
| -rw-r--r-- | Documentation/xtensa/booting.rst (renamed from Documentation/xtensa/booting.txt) | 5 | ||||
| -rw-r--r-- | Documentation/xtensa/index.rst | 12 | ||||
| -rw-r--r-- | Documentation/xtensa/mmu.rst | 195 | ||||
| -rw-r--r-- | Documentation/xtensa/mmu.txt | 189 | ||||
| -rw-r--r-- | MAINTAINERS | 90 | ||||
| -rw-r--r-- | arch/arm/Kconfig | 6 | ||||
| -rw-r--r-- | arch/arm/common/mcpm_entry.c | 2 | ||||
| -rw-r--r-- | arch/arm/common/mcpm_head.S | 2 | ||||
| -rw-r--r-- | arch/arm/common/vlock.S | 2 | ||||
| -rw-r--r-- | arch/arm/include/asm/setup.h | 2 | ||||
| -rw-r--r-- | arch/arm/include/uapi/asm/setup.h | 2 | ||||
| -rw-r--r-- | arch/arm/kernel/entry-armv.S | 2 | ||||
| -rw-r--r-- | arch/arm/mach-exynos/common.h | 2 | ||||
| -rw-r--r-- | arch/arm/mach-ixp4xx/Kconfig | 14 | ||||
| -rw-r--r-- | arch/arm/mach-s3c24xx/pm.c | 2 | ||||
| -rw-r--r-- | arch/arm/mm/Kconfig | 4 | ||||
| -rw-r--r-- | arch/arm/plat-samsung/Kconfig | 6 | ||||
| -rw-r--r-- | arch/arm/tools/mach-types | 2 | ||||
| -rw-r--r-- | arch/arm64/Kconfig | 4 | ||||
| -rw-r--r-- | arch/arm64/kernel/kuser32.S | 2 | ||||
| -rw-r--r-- | arch/ia64/kernel/efi.c | 2 | ||||
| -rw-r--r-- | arch/ia64/kernel/fsys.S | 2 | ||||
| -rw-r--r-- | arch/ia64/mm/ioremap.c | 2 | ||||
| -rw-r--r-- | arch/ia64/pci/pci.c | 2 | ||||
| -rw-r--r-- | arch/mips/bmips/setup.c | 2 | ||||
| -rw-r--r-- | arch/parisc/Kconfig | 2 | ||||
| -rw-r--r-- | arch/sh/Kconfig | 4 | ||||
| -rw-r--r-- | arch/sparc/Kconfig | 2 | ||||
| -rw-r--r-- | arch/x86/Kconfig | 8 | ||||
| -rw-r--r-- | arch/xtensa/include/asm/initialize_mmu.h | 2 | ||||
| -rw-r--r-- | block/Kconfig | 4 | ||||
| -rw-r--r-- | block/Kconfig.iosched | 2 | ||||
| -rw-r--r-- | block/bfq-iosched.c | 2 | ||||
| -rw-r--r-- | block/blk-integrity.c | 2 | ||||
| -rw-r--r-- | block/ioprio.c | 2 | ||||
| -rw-r--r-- | block/mq-deadline.c | 2 | ||||
| -rw-r--r-- | block/partitions/Kconfig | 2 | ||||
| -rw-r--r-- | block/partitions/cmdline.c | 2 | ||||
| -rw-r--r-- | drivers/base/platform.c | 2 | ||||
| -rw-r--r-- | drivers/block/Kconfig | 8 | ||||
| -rw-r--r-- | drivers/block/floppy.c | 2 | ||||
| -rw-r--r-- | drivers/block/zram/Kconfig | 6 | ||||
| -rw-r--r-- | drivers/char/Kconfig | 6 | ||||
| -rw-r--r-- | drivers/char/hw_random/core.c | 2 | ||||
| -rw-r--r-- | drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 2 | ||||
| -rw-r--r-- | drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 | ||||
| -rw-r--r-- | drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 2 | ||||
| -rw-r--r-- | drivers/crypto/sunxi-ss/sun4i-ss.h | 2 | ||||
| -rw-r--r-- | drivers/dma-buf/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/gpio/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/gpio/gpio-cs5535.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_modeset_lock.c | 2 | ||||
| -rw-r--r-- | drivers/input/touchscreen/sun4i-ts.c | 2 | ||||
| -rw-r--r-- | drivers/md/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/md/dm-init.c | 2 | ||||
| -rw-r--r-- | drivers/md/dm-raid.c | 2 | ||||
| -rw-r--r-- | drivers/mtd/nand/raw/nand_ecc.c | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_main.c | 2 | ||||
| -rw-r--r-- | drivers/nvdimm/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/pci/switch/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/perf/qcom_l3_pmu.c | 2 | ||||
| -rw-r--r-- | drivers/platform/x86/Kconfig | 8 | ||||
| -rw-r--r-- | drivers/platform/x86/dcdbas.c | 2 | ||||
| -rw-r--r-- | drivers/platform/x86/dell_rbu.c | 2 | ||||
| -rw-r--r-- | drivers/pnp/isapnp/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/rapidio/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/staging/unisys/Documentation/overview.txt | 4 | ||||
| -rw-r--r-- | drivers/tty/Kconfig | 6 | ||||
| -rw-r--r-- | drivers/tty/serial/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/ucc_uart.c | 2 | ||||
| -rw-r--r-- | drivers/vfio/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/vfio/mdev/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/w1/Kconfig | 2 | ||||
| -rw-r--r-- | fs/proc/Kconfig | 2 | ||||
| -rw-r--r-- | include/linux/cgroup-defs.h | 2 | ||||
| -rw-r--r-- | include/linux/connector.h | 63 | ||||
| -rw-r--r-- | include/linux/device.h | 2 | ||||
| -rw-r--r-- | include/linux/hw_random.h | 2 | ||||
| -rw-r--r-- | include/linux/lockdep.h | 2 | ||||
| -rw-r--r-- | include/linux/mutex.h | 2 | ||||
| -rw-r--r-- | include/linux/platform_device.h | 2 | ||||
| -rw-r--r-- | include/linux/rwsem.h | 2 | ||||
| -rw-r--r-- | include/linux/serial_core.h | 2 | ||||
| -rw-r--r-- | include/uapi/linux/bpf.h | 2 | ||||
| -rw-r--r-- | include/uapi/rdma/rdma_user_ioctl_cmds.h | 2 | ||||
| -rw-r--r-- | init/Kconfig | 6 | ||||
| -rw-r--r-- | kernel/cgroup/cpuset.c | 2 | ||||
| -rw-r--r-- | kernel/locking/mutex.c | 2 | ||||
| -rw-r--r-- | kernel/locking/rtmutex.c | 2 | ||||
| -rw-r--r-- | kernel/panic.c | 2 | ||||
| -rw-r--r-- | lib/Kconfig.debug | 4 | ||||
| -rw-r--r-- | mm/swap.c | 2 | ||||
| -rw-r--r-- | samples/Kconfig | 2 | ||||
| -rw-r--r-- | scripts/coccinelle/free/devm_free.cocci | 2 | ||||
| -rw-r--r-- | scripts/gcc-plugins/Kconfig | 2 | ||||
| -rw-r--r-- | security/Kconfig | 2 | ||||
| -rw-r--r-- | security/device_cgroup.c | 2 | ||||
| -rw-r--r-- | tools/include/uapi/linux/bpf.h | 2 | ||||
| -rw-r--r-- | tools/testing/selftests/zram/README | 2 | ||||
| -rw-r--r-- | usr/Kconfig | 2 |
559 files changed, 10527 insertions, 7593 deletions
| @@ -3120,7 +3120,7 @@ S: France | |||
| 3120 | N: Rik van Riel | 3120 | N: Rik van Riel |
| 3121 | E: riel@redhat.com | 3121 | E: riel@redhat.com |
| 3122 | W: http://www.surriel.com/ | 3122 | W: http://www.surriel.com/ |
| 3123 | D: Linux-MM site, Documentation/sysctl/*, swap/mm readaround | 3123 | D: Linux-MM site, Documentation/admin-guide/sysctl/*, swap/mm readaround |
| 3124 | D: kswapd fixes, random kernel hacker, rmap VM, | 3124 | D: kswapd fixes, random kernel hacker, rmap VM, |
| 3125 | D: nl.linux.org administrator, minor scheduler additions | 3125 | D: nl.linux.org administrator, minor scheduler additions |
| 3126 | S: Red Hat Boston | 3126 | S: Red Hat Boston |
diff --git a/Documentation/ABI/obsolete/sysfs-gpio b/Documentation/ABI/obsolete/sysfs-gpio index 40d41ea1a3f5..e0d4e5e2dd90 100644 --- a/Documentation/ABI/obsolete/sysfs-gpio +++ b/Documentation/ABI/obsolete/sysfs-gpio | |||
| @@ -11,7 +11,7 @@ Description: | |||
| 11 | Kernel code may export it for complete or partial access. | 11 | Kernel code may export it for complete or partial access. |
| 12 | 12 | ||
| 13 | GPIOs are identified as they are inside the kernel, using integers in | 13 | GPIOs are identified as they are inside the kernel, using integers in |
| 14 | the range 0..INT_MAX. See Documentation/gpio for more information. | 14 | the range 0..INT_MAX. See Documentation/admin-guide/gpio for more information. |
| 15 | 15 | ||
| 16 | /sys/class/gpio | 16 | /sys/class/gpio |
| 17 | /export ... asks the kernel to export a GPIO to userspace | 17 | /export ... asks the kernel to export a GPIO to userspace |
diff --git a/Documentation/ABI/removed/sysfs-class-rfkill b/Documentation/ABI/removed/sysfs-class-rfkill index 3ce6231f20b2..9c08c7f98ffb 100644 --- a/Documentation/ABI/removed/sysfs-class-rfkill +++ b/Documentation/ABI/removed/sysfs-class-rfkill | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | rfkill - radio frequency (RF) connector kill switch support | 1 | rfkill - radio frequency (RF) connector kill switch support |
| 2 | 2 | ||
| 3 | For details to this subsystem look at Documentation/rfkill.txt. | 3 | For details to this subsystem look at Documentation/driver-api/rfkill.rst. |
| 4 | 4 | ||
| 5 | What: /sys/class/rfkill/rfkill[0-9]+/claim | 5 | What: /sys/class/rfkill/rfkill[0-9]+/claim |
| 6 | Date: 09-Jul-2007 | 6 | Date: 09-Jul-2007 |
diff --git a/Documentation/ABI/stable/sysfs-class-rfkill b/Documentation/ABI/stable/sysfs-class-rfkill index 80151a409d67..5b154f922643 100644 --- a/Documentation/ABI/stable/sysfs-class-rfkill +++ b/Documentation/ABI/stable/sysfs-class-rfkill | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | rfkill - radio frequency (RF) connector kill switch support | 1 | rfkill - radio frequency (RF) connector kill switch support |
| 2 | 2 | ||
| 3 | For details to this subsystem look at Documentation/rfkill.txt. | 3 | For details to this subsystem look at Documentation/driver-api/rfkill.rst. |
| 4 | 4 | ||
| 5 | For the deprecated /sys/class/rfkill/*/claim knobs of this interface look in | 5 | For the deprecated /sys/class/rfkill/*/claim knobs of this interface look in |
| 6 | Documentation/ABI/removed/sysfs-class-rfkill. | 6 | Documentation/ABI/removed/sysfs-class-rfkill. |
diff --git a/Documentation/ABI/stable/sysfs-devices-node b/Documentation/ABI/stable/sysfs-devices-node index f7ce68fbd4b9..df8413cf1468 100644 --- a/Documentation/ABI/stable/sysfs-devices-node +++ b/Documentation/ABI/stable/sysfs-devices-node | |||
| @@ -61,7 +61,7 @@ Date: October 2002 | |||
| 61 | Contact: Linux Memory Management list <linux-mm@kvack.org> | 61 | Contact: Linux Memory Management list <linux-mm@kvack.org> |
| 62 | Description: | 62 | Description: |
| 63 | The node's hit/miss statistics, in units of pages. | 63 | The node's hit/miss statistics, in units of pages. |
| 64 | See Documentation/numastat.txt | 64 | See Documentation/admin-guide/numastat.rst |
| 65 | 65 | ||
| 66 | What: /sys/devices/system/node/nodeX/distance | 66 | What: /sys/devices/system/node/nodeX/distance |
| 67 | Date: October 2002 | 67 | Date: October 2002 |
diff --git a/Documentation/ABI/testing/procfs-diskstats b/Documentation/ABI/testing/procfs-diskstats index abac31d216de..2c44b4f1b060 100644 --- a/Documentation/ABI/testing/procfs-diskstats +++ b/Documentation/ABI/testing/procfs-diskstats | |||
| @@ -29,4 +29,4 @@ Description: | |||
| 29 | 17 - sectors discarded | 29 | 17 - sectors discarded |
| 30 | 18 - time spent discarding | 30 | 18 - time spent discarding |
| 31 | 31 | ||
| 32 | For more details refer to Documentation/iostats.txt | 32 | For more details refer to Documentation/admin-guide/iostats.rst |
diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block index dfad7427817c..f8c7c7126bb1 100644 --- a/Documentation/ABI/testing/sysfs-block +++ b/Documentation/ABI/testing/sysfs-block | |||
| @@ -15,7 +15,7 @@ Description: | |||
| 15 | 9 - I/Os currently in progress | 15 | 9 - I/Os currently in progress |
| 16 | 10 - time spent doing I/Os (ms) | 16 | 10 - time spent doing I/Os (ms) |
| 17 | 11 - weighted time spent doing I/Os (ms) | 17 | 11 - weighted time spent doing I/Os (ms) |
| 18 | For more details refer Documentation/iostats.txt | 18 | For more details refer Documentation/admin-guide/iostats.rst |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | What: /sys/block/<disk>/<part>/stat | 21 | What: /sys/block/<disk>/<part>/stat |
diff --git a/Documentation/ABI/testing/sysfs-block-device b/Documentation/ABI/testing/sysfs-block-device index 82ef6eab042d..17f2bc7dd261 100644 --- a/Documentation/ABI/testing/sysfs-block-device +++ b/Documentation/ABI/testing/sysfs-block-device | |||
| @@ -45,7 +45,7 @@ Description: | |||
| 45 | - Values below -2 are rejected with -EINVAL | 45 | - Values below -2 are rejected with -EINVAL |
| 46 | 46 | ||
| 47 | For more information, see | 47 | For more information, see |
| 48 | Documentation/laptops/disk-shock-protection.txt | 48 | Documentation/admin-guide/laptops/disk-shock-protection.rst |
| 49 | 49 | ||
| 50 | 50 | ||
| 51 | What: /sys/block/*/device/ncq_prio_enable | 51 | What: /sys/block/*/device/ncq_prio_enable |
diff --git a/Documentation/ABI/testing/sysfs-class-switchtec b/Documentation/ABI/testing/sysfs-class-switchtec index 48cb4c15e430..76c7a661a595 100644 --- a/Documentation/ABI/testing/sysfs-class-switchtec +++ b/Documentation/ABI/testing/sysfs-class-switchtec | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | switchtec - Microsemi Switchtec PCI Switch Management Endpoint | 1 | switchtec - Microsemi Switchtec PCI Switch Management Endpoint |
| 2 | 2 | ||
| 3 | For details on this subsystem look at Documentation/switchtec.txt. | 3 | For details on this subsystem look at Documentation/driver-api/switchtec.rst. |
| 4 | 4 | ||
| 5 | What: /sys/class/switchtec | 5 | What: /sys/class/switchtec |
| 6 | Date: 05-Jan-2017 | 6 | Date: 05-Jan-2017 |
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index d404603c6b52..5f7d7b14fa44 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu | |||
| @@ -34,7 +34,7 @@ Description: CPU topology files that describe kernel limits related to | |||
| 34 | present: cpus that have been identified as being present in | 34 | present: cpus that have been identified as being present in |
| 35 | the system. | 35 | the system. |
| 36 | 36 | ||
| 37 | See Documentation/cputopology.txt for more information. | 37 | See Documentation/admin-guide/cputopology.rst for more information. |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | What: /sys/devices/system/cpu/probe | 40 | What: /sys/devices/system/cpu/probe |
| @@ -103,7 +103,7 @@ Description: CPU topology files that describe a logical CPU's relationship | |||
| 103 | thread_siblings_list: human-readable list of cpu#'s hardware | 103 | thread_siblings_list: human-readable list of cpu#'s hardware |
| 104 | threads within the same core as cpu# | 104 | threads within the same core as cpu# |
| 105 | 105 | ||
| 106 | See Documentation/cputopology.txt for more information. | 106 | See Documentation/admin-guide/cputopology.rst for more information. |
| 107 | 107 | ||
| 108 | 108 | ||
| 109 | What: /sys/devices/system/cpu/cpuidle/current_driver | 109 | What: /sys/devices/system/cpu/cpuidle/current_driver |
diff --git a/Documentation/ABI/testing/sysfs-platform-asus-laptop b/Documentation/ABI/testing/sysfs-platform-asus-laptop index cd9d667c3da2..8b0e8205a6a2 100644 --- a/Documentation/ABI/testing/sysfs-platform-asus-laptop +++ b/Documentation/ABI/testing/sysfs-platform-asus-laptop | |||
| @@ -31,7 +31,7 @@ Description: | |||
| 31 | To control the LED display, use the following : | 31 | To control the LED display, use the following : |
| 32 | echo 0x0T000DDD > /sys/devices/platform/asus_laptop/ | 32 | echo 0x0T000DDD > /sys/devices/platform/asus_laptop/ |
| 33 | where T control the 3 letters display, and DDD the 3 digits display. | 33 | where T control the 3 letters display, and DDD the 3 digits display. |
| 34 | The DDD table can be found in Documentation/laptops/asus-laptop.txt | 34 | The DDD table can be found in Documentation/admin-guide/laptops/asus-laptop.rst |
| 35 | 35 | ||
| 36 | What: /sys/devices/platform/asus_laptop/bluetooth | 36 | What: /sys/devices/platform/asus_laptop/bluetooth |
| 37 | Date: January 2007 | 37 | Date: January 2007 |
diff --git a/Documentation/logo.txt b/Documentation/COPYING-logo index 296f0f7f67eb..296f0f7f67eb 100644 --- a/Documentation/logo.txt +++ b/Documentation/COPYING-logo | |||
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt index cb712a02f59f..358d495456d1 100644 --- a/Documentation/DMA-API-HOWTO.txt +++ b/Documentation/DMA-API-HOWTO.txt | |||
| @@ -212,7 +212,7 @@ The standard 64-bit addressing device would do something like this:: | |||
| 212 | 212 | ||
| 213 | If the device only supports 32-bit addressing for descriptors in the | 213 | If the device only supports 32-bit addressing for descriptors in the |
| 214 | coherent allocations, but supports full 64-bits for streaming mappings | 214 | coherent allocations, but supports full 64-bits for streaming mappings |
| 215 | it would look like this: | 215 | it would look like this:: |
| 216 | 216 | ||
| 217 | if (dma_set_mask(dev, DMA_BIT_MASK(64))) { | 217 | if (dma_set_mask(dev, DMA_BIT_MASK(64))) { |
| 218 | dev_warn(dev, "mydev: No suitable DMA available\n"); | 218 | dev_warn(dev, "mydev: No suitable DMA available\n"); |
diff --git a/Documentation/accounting/cgroupstats.txt b/Documentation/accounting/cgroupstats.rst index d16a9849e60e..b9afc48f4ea2 100644 --- a/Documentation/accounting/cgroupstats.txt +++ b/Documentation/accounting/cgroupstats.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ================== | ||
| 2 | Control Groupstats | ||
| 3 | ================== | ||
| 4 | |||
| 1 | Control Groupstats is inspired by the discussion at | 5 | Control Groupstats is inspired by the discussion at |
| 2 | http://lkml.org/lkml/2007/4/11/187 and implements per cgroup statistics as | 6 | http://lkml.org/lkml/2007/4/11/187 and implements per cgroup statistics as |
| 3 | suggested by Andrew Morton in http://lkml.org/lkml/2007/4/11/263. | 7 | suggested by Andrew Morton in http://lkml.org/lkml/2007/4/11/263. |
| @@ -19,9 +23,9 @@ about tasks blocked on I/O. If CONFIG_TASK_DELAY_ACCT is disabled, this | |||
| 19 | information will not be available. | 23 | information will not be available. |
| 20 | 24 | ||
| 21 | To extract cgroup statistics a utility very similar to getdelays.c | 25 | To extract cgroup statistics a utility very similar to getdelays.c |
| 22 | has been developed, the sample output of the utility is shown below | 26 | has been developed, the sample output of the utility is shown below:: |
| 23 | 27 | ||
| 24 | ~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup/a" | 28 | ~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup/a" |
| 25 | sleeping 1, blocked 0, running 1, stopped 0, uninterruptible 0 | 29 | sleeping 1, blocked 0, running 1, stopped 0, uninterruptible 0 |
| 26 | ~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup" | 30 | ~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup" |
| 27 | sleeping 155, blocked 0, running 1, stopped 0, uninterruptible 2 | 31 | sleeping 155, blocked 0, running 1, stopped 0, uninterruptible 2 |
diff --git a/Documentation/accounting/delay-accounting.txt b/Documentation/accounting/delay-accounting.rst index 042ea59b5853..7cc7f5852da0 100644 --- a/Documentation/accounting/delay-accounting.txt +++ b/Documentation/accounting/delay-accounting.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ================ | ||
| 1 | Delay accounting | 2 | Delay accounting |
| 2 | ---------------- | 3 | ================ |
| 3 | 4 | ||
| 4 | Tasks encounter delays in execution when they wait | 5 | Tasks encounter delays in execution when they wait |
| 5 | for some kernel resource to become available e.g. a | 6 | for some kernel resource to become available e.g. a |
| @@ -39,7 +40,9 @@ in detail in a separate document in this directory. Taskstats returns a | |||
| 39 | generic data structure to userspace corresponding to per-pid and per-tgid | 40 | generic data structure to userspace corresponding to per-pid and per-tgid |
| 40 | statistics. The delay accounting functionality populates specific fields of | 41 | statistics. The delay accounting functionality populates specific fields of |
| 41 | this structure. See | 42 | this structure. See |
| 43 | |||
| 42 | include/linux/taskstats.h | 44 | include/linux/taskstats.h |
| 45 | |||
| 43 | for a description of the fields pertaining to delay accounting. | 46 | for a description of the fields pertaining to delay accounting. |
| 44 | It will generally be in the form of counters returning the cumulative | 47 | It will generally be in the form of counters returning the cumulative |
| 45 | delay seen for cpu, sync block I/O, swapin, memory reclaim etc. | 48 | delay seen for cpu, sync block I/O, swapin, memory reclaim etc. |
| @@ -61,13 +64,16 @@ also serves as an example of using the taskstats interface. | |||
| 61 | Usage | 64 | Usage |
| 62 | ----- | 65 | ----- |
| 63 | 66 | ||
| 64 | Compile the kernel with | 67 | Compile the kernel with:: |
| 68 | |||
| 65 | CONFIG_TASK_DELAY_ACCT=y | 69 | CONFIG_TASK_DELAY_ACCT=y |
| 66 | CONFIG_TASKSTATS=y | 70 | CONFIG_TASKSTATS=y |
| 67 | 71 | ||
| 68 | Delay accounting is enabled by default at boot up. | 72 | Delay accounting is enabled by default at boot up. |
| 69 | To disable, add | 73 | To disable, add:: |
| 74 | |||
| 70 | nodelayacct | 75 | nodelayacct |
| 76 | |||
| 71 | to the kernel boot options. The rest of the instructions | 77 | to the kernel boot options. The rest of the instructions |
| 72 | below assume this has not been done. | 78 | below assume this has not been done. |
| 73 | 79 | ||
| @@ -78,40 +84,43 @@ The utility also allows a given command to be | |||
| 78 | executed and the corresponding delays to be | 84 | executed and the corresponding delays to be |
| 79 | seen. | 85 | seen. |
| 80 | 86 | ||
| 81 | General format of the getdelays command | 87 | General format of the getdelays command:: |
| 82 | 88 | ||
| 83 | getdelays [-t tgid] [-p pid] [-c cmd...] | 89 | getdelays [-t tgid] [-p pid] [-c cmd...] |
| 84 | 90 | ||
| 85 | 91 | ||
| 86 | Get delays, since system boot, for pid 10 | 92 | Get delays, since system boot, for pid 10:: |
| 87 | # ./getdelays -p 10 | ||
| 88 | (output similar to next case) | ||
| 89 | 93 | ||
| 90 | Get sum of delays, since system boot, for all pids with tgid 5 | 94 | # ./getdelays -p 10 |
| 91 | # ./getdelays -t 5 | 95 | (output similar to next case) |
| 92 | 96 | ||
| 97 | Get sum of delays, since system boot, for all pids with tgid 5:: | ||
| 93 | 98 | ||
| 94 | CPU count real total virtual total delay total | 99 | # ./getdelays -t 5 |
| 95 | 7876 92005750 100000000 24001500 | 100 | |
| 96 | IO count delay total | 101 | |
| 97 | 0 0 | 102 | CPU count real total virtual total delay total |
| 98 | SWAP count delay total | 103 | 7876 92005750 100000000 24001500 |
| 99 | 0 0 | 104 | IO count delay total |
| 100 | RECLAIM count delay total | 105 | 0 0 |
| 101 | 0 0 | 106 | SWAP count delay total |
| 107 | 0 0 | ||
| 108 | RECLAIM count delay total | ||
| 109 | 0 0 | ||
| 110 | |||
| 111 | Get delays seen in executing a given simple command:: | ||
| 102 | 112 | ||
| 103 | Get delays seen in executing a given simple command | 113 | # ./getdelays -c ls / |
| 104 | # ./getdelays -c ls / | ||
| 105 | 114 | ||
| 106 | bin data1 data3 data5 dev home media opt root srv sys usr | 115 | bin data1 data3 data5 dev home media opt root srv sys usr |
| 107 | boot data2 data4 data6 etc lib mnt proc sbin subdomain tmp var | 116 | boot data2 data4 data6 etc lib mnt proc sbin subdomain tmp var |
| 108 | 117 | ||
| 109 | 118 | ||
| 110 | CPU count real total virtual total delay total | 119 | CPU count real total virtual total delay total |
| 111 | 6 4000250 4000000 0 | 120 | 6 4000250 4000000 0 |
| 112 | IO count delay total | 121 | IO count delay total |
| 113 | 0 0 | 122 | 0 0 |
| 114 | SWAP count delay total | 123 | SWAP count delay total |
| 115 | 0 0 | 124 | 0 0 |
| 116 | RECLAIM count delay total | 125 | RECLAIM count delay total |
| 117 | 0 0 | 126 | 0 0 |
diff --git a/Documentation/accounting/index.rst b/Documentation/accounting/index.rst new file mode 100644 index 000000000000..9369d8bf32be --- /dev/null +++ b/Documentation/accounting/index.rst | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ========== | ||
| 4 | Accounting | ||
| 5 | ========== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | cgroupstats | ||
| 11 | delay-accounting | ||
| 12 | psi | ||
| 13 | taskstats | ||
| 14 | taskstats-struct | ||
diff --git a/Documentation/accounting/psi.txt b/Documentation/accounting/psi.rst index 5cbe5659e3b7..621111ce5740 100644 --- a/Documentation/accounting/psi.txt +++ b/Documentation/accounting/psi.rst | |||
| @@ -35,14 +35,14 @@ Pressure interface | |||
| 35 | Pressure information for each resource is exported through the | 35 | Pressure information for each resource is exported through the |
| 36 | respective file in /proc/pressure/ -- cpu, memory, and io. | 36 | respective file in /proc/pressure/ -- cpu, memory, and io. |
| 37 | 37 | ||
| 38 | The format for CPU is as such: | 38 | The format for CPU is as such:: |
| 39 | 39 | ||
| 40 | some avg10=0.00 avg60=0.00 avg300=0.00 total=0 | 40 | some avg10=0.00 avg60=0.00 avg300=0.00 total=0 |
| 41 | 41 | ||
| 42 | and for memory and IO: | 42 | and for memory and IO:: |
| 43 | 43 | ||
| 44 | some avg10=0.00 avg60=0.00 avg300=0.00 total=0 | 44 | some avg10=0.00 avg60=0.00 avg300=0.00 total=0 |
| 45 | full avg10=0.00 avg60=0.00 avg300=0.00 total=0 | 45 | full avg10=0.00 avg60=0.00 avg300=0.00 total=0 |
| 46 | 46 | ||
| 47 | The "some" line indicates the share of time in which at least some | 47 | The "some" line indicates the share of time in which at least some |
| 48 | tasks are stalled on a given resource. | 48 | tasks are stalled on a given resource. |
| @@ -77,9 +77,9 @@ To register a trigger user has to open psi interface file under | |||
| 77 | /proc/pressure/ representing the resource to be monitored and write the | 77 | /proc/pressure/ representing the resource to be monitored and write the |
| 78 | desired threshold and time window. The open file descriptor should be | 78 | desired threshold and time window. The open file descriptor should be |
| 79 | used to wait for trigger events using select(), poll() or epoll(). | 79 | used to wait for trigger events using select(), poll() or epoll(). |
| 80 | The following format is used: | 80 | The following format is used:: |
| 81 | 81 | ||
| 82 | <some|full> <stall amount in us> <time window in us> | 82 | <some|full> <stall amount in us> <time window in us> |
| 83 | 83 | ||
| 84 | For example writing "some 150000 1000000" into /proc/pressure/memory | 84 | For example writing "some 150000 1000000" into /proc/pressure/memory |
| 85 | would add 150ms threshold for partial memory stall measured within | 85 | would add 150ms threshold for partial memory stall measured within |
| @@ -115,18 +115,20 @@ trigger is closed. | |||
| 115 | Userspace monitor usage example | 115 | Userspace monitor usage example |
| 116 | =============================== | 116 | =============================== |
| 117 | 117 | ||
| 118 | #include <errno.h> | 118 | :: |
| 119 | #include <fcntl.h> | 119 | |
| 120 | #include <stdio.h> | 120 | #include <errno.h> |
| 121 | #include <poll.h> | 121 | #include <fcntl.h> |
| 122 | #include <string.h> | 122 | #include <stdio.h> |
| 123 | #include <unistd.h> | 123 | #include <poll.h> |
| 124 | 124 | #include <string.h> | |
| 125 | /* | 125 | #include <unistd.h> |
| 126 | * Monitor memory partial stall with 1s tracking window size | 126 | |
| 127 | * and 150ms threshold. | 127 | /* |
| 128 | */ | 128 | * Monitor memory partial stall with 1s tracking window size |
| 129 | int main() { | 129 | * and 150ms threshold. |
| 130 | */ | ||
| 131 | int main() { | ||
| 130 | const char trig[] = "some 150000 1000000"; | 132 | const char trig[] = "some 150000 1000000"; |
| 131 | struct pollfd fds; | 133 | struct pollfd fds; |
| 132 | int n; | 134 | int n; |
| @@ -165,7 +167,7 @@ int main() { | |||
| 165 | } | 167 | } |
| 166 | 168 | ||
| 167 | return 0; | 169 | return 0; |
| 168 | } | 170 | } |
| 169 | 171 | ||
| 170 | Cgroup2 interface | 172 | Cgroup2 interface |
| 171 | ================= | 173 | ================= |
diff --git a/Documentation/accounting/taskstats-struct.txt b/Documentation/accounting/taskstats-struct.rst index e7512c061c15..ca90fd489c9a 100644 --- a/Documentation/accounting/taskstats-struct.txt +++ b/Documentation/accounting/taskstats-struct.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ==================== | ||
| 1 | The struct taskstats | 2 | The struct taskstats |
| 2 | -------------------- | 3 | ==================== |
| 3 | 4 | ||
| 4 | This document contains an explanation of the struct taskstats fields. | 5 | This document contains an explanation of the struct taskstats fields. |
| 5 | 6 | ||
| @@ -10,16 +11,24 @@ There are three different groups of fields in the struct taskstats: | |||
| 10 | the common fields and basic accounting fields are collected for | 11 | the common fields and basic accounting fields are collected for |
| 11 | delivery at do_exit() of a task. | 12 | delivery at do_exit() of a task. |
| 12 | 2) Delay accounting fields | 13 | 2) Delay accounting fields |
| 13 | These fields are placed between | 14 | These fields are placed between:: |
| 14 | /* Delay accounting fields start */ | 15 | |
| 15 | and | 16 | /* Delay accounting fields start */ |
| 16 | /* Delay accounting fields end */ | 17 | |
| 18 | and:: | ||
| 19 | |||
| 20 | /* Delay accounting fields end */ | ||
| 21 | |||
| 17 | Their values are collected if CONFIG_TASK_DELAY_ACCT is set. | 22 | Their values are collected if CONFIG_TASK_DELAY_ACCT is set. |
| 18 | 3) Extended accounting fields | 23 | 3) Extended accounting fields |
| 19 | These fields are placed between | 24 | These fields are placed between:: |
| 20 | /* Extended accounting fields start */ | 25 | |
| 21 | and | 26 | /* Extended accounting fields start */ |
| 22 | /* Extended accounting fields end */ | 27 | |
| 28 | and:: | ||
| 29 | |||
| 30 | /* Extended accounting fields end */ | ||
| 31 | |||
| 23 | Their values are collected if CONFIG_TASK_XACCT is set. | 32 | Their values are collected if CONFIG_TASK_XACCT is set. |
| 24 | 33 | ||
| 25 | 4) Per-task and per-thread context switch count statistics | 34 | 4) Per-task and per-thread context switch count statistics |
| @@ -31,31 +40,33 @@ There are three different groups of fields in the struct taskstats: | |||
| 31 | Future extension should add fields to the end of the taskstats struct, and | 40 | Future extension should add fields to the end of the taskstats struct, and |
| 32 | should not change the relative position of each field within the struct. | 41 | should not change the relative position of each field within the struct. |
| 33 | 42 | ||
| 43 | :: | ||
| 34 | 44 | ||
| 35 | struct taskstats { | 45 | struct taskstats { |
| 46 | |||
| 47 | 1) Common and basic accounting fields:: | ||
| 36 | 48 | ||
| 37 | 1) Common and basic accounting fields: | ||
| 38 | /* The version number of this struct. This field is always set to | 49 | /* The version number of this struct. This field is always set to |
| 39 | * TAKSTATS_VERSION, which is defined in <linux/taskstats.h>. | 50 | * TAKSTATS_VERSION, which is defined in <linux/taskstats.h>. |
| 40 | * Each time the struct is changed, the value should be incremented. | 51 | * Each time the struct is changed, the value should be incremented. |
| 41 | */ | 52 | */ |
| 42 | __u16 version; | 53 | __u16 version; |
| 43 | 54 | ||
| 44 | /* The exit code of a task. */ | 55 | /* The exit code of a task. */ |
| 45 | __u32 ac_exitcode; /* Exit status */ | 56 | __u32 ac_exitcode; /* Exit status */ |
| 46 | 57 | ||
| 47 | /* The accounting flags of a task as defined in <linux/acct.h> | 58 | /* The accounting flags of a task as defined in <linux/acct.h> |
| 48 | * Defined values are AFORK, ASU, ACOMPAT, ACORE, and AXSIG. | 59 | * Defined values are AFORK, ASU, ACOMPAT, ACORE, and AXSIG. |
| 49 | */ | 60 | */ |
| 50 | __u8 ac_flag; /* Record flags */ | 61 | __u8 ac_flag; /* Record flags */ |
| 51 | 62 | ||
| 52 | /* The value of task_nice() of a task. */ | 63 | /* The value of task_nice() of a task. */ |
| 53 | __u8 ac_nice; /* task_nice */ | 64 | __u8 ac_nice; /* task_nice */ |
| 54 | 65 | ||
| 55 | /* The name of the command that started this task. */ | 66 | /* The name of the command that started this task. */ |
| 56 | char ac_comm[TS_COMM_LEN]; /* Command name */ | 67 | char ac_comm[TS_COMM_LEN]; /* Command name */ |
| 57 | 68 | ||
| 58 | /* The scheduling discipline as set in task->policy field. */ | 69 | /* The scheduling discipline as set in task->policy field. */ |
| 59 | __u8 ac_sched; /* Scheduling discipline */ | 70 | __u8 ac_sched; /* Scheduling discipline */ |
| 60 | 71 | ||
| 61 | __u8 ac_pad[3]; | 72 | __u8 ac_pad[3]; |
| @@ -64,26 +75,27 @@ struct taskstats { | |||
| 64 | __u32 ac_pid; /* Process ID */ | 75 | __u32 ac_pid; /* Process ID */ |
| 65 | __u32 ac_ppid; /* Parent process ID */ | 76 | __u32 ac_ppid; /* Parent process ID */ |
| 66 | 77 | ||
| 67 | /* The time when a task begins, in [secs] since 1970. */ | 78 | /* The time when a task begins, in [secs] since 1970. */ |
| 68 | __u32 ac_btime; /* Begin time [sec since 1970] */ | 79 | __u32 ac_btime; /* Begin time [sec since 1970] */ |
| 69 | 80 | ||
| 70 | /* The elapsed time of a task, in [usec]. */ | 81 | /* The elapsed time of a task, in [usec]. */ |
| 71 | __u64 ac_etime; /* Elapsed time [usec] */ | 82 | __u64 ac_etime; /* Elapsed time [usec] */ |
| 72 | 83 | ||
| 73 | /* The user CPU time of a task, in [usec]. */ | 84 | /* The user CPU time of a task, in [usec]. */ |
| 74 | __u64 ac_utime; /* User CPU time [usec] */ | 85 | __u64 ac_utime; /* User CPU time [usec] */ |
| 75 | 86 | ||
| 76 | /* The system CPU time of a task, in [usec]. */ | 87 | /* The system CPU time of a task, in [usec]. */ |
| 77 | __u64 ac_stime; /* System CPU time [usec] */ | 88 | __u64 ac_stime; /* System CPU time [usec] */ |
| 78 | 89 | ||
| 79 | /* The minor page fault count of a task, as set in task->min_flt. */ | 90 | /* The minor page fault count of a task, as set in task->min_flt. */ |
| 80 | __u64 ac_minflt; /* Minor Page Fault Count */ | 91 | __u64 ac_minflt; /* Minor Page Fault Count */ |
| 81 | 92 | ||
| 82 | /* The major page fault count of a task, as set in task->maj_flt. */ | 93 | /* The major page fault count of a task, as set in task->maj_flt. */ |
| 83 | __u64 ac_majflt; /* Major Page Fault Count */ | 94 | __u64 ac_majflt; /* Major Page Fault Count */ |
| 84 | 95 | ||
| 85 | 96 | ||
| 86 | 2) Delay accounting fields: | 97 | 2) Delay accounting fields:: |
| 98 | |||
| 87 | /* Delay accounting fields start | 99 | /* Delay accounting fields start |
| 88 | * | 100 | * |
| 89 | * All values, until the comment "Delay accounting fields end" are | 101 | * All values, until the comment "Delay accounting fields end" are |
| @@ -134,7 +146,8 @@ struct taskstats { | |||
| 134 | /* version 1 ends here */ | 146 | /* version 1 ends here */ |
| 135 | 147 | ||
| 136 | 148 | ||
| 137 | 3) Extended accounting fields | 149 | 3) Extended accounting fields:: |
| 150 | |||
| 138 | /* Extended accounting fields start */ | 151 | /* Extended accounting fields start */ |
| 139 | 152 | ||
| 140 | /* Accumulated RSS usage in duration of a task, in MBytes-usecs. | 153 | /* Accumulated RSS usage in duration of a task, in MBytes-usecs. |
| @@ -145,15 +158,15 @@ struct taskstats { | |||
| 145 | */ | 158 | */ |
| 146 | __u64 coremem; /* accumulated RSS usage in MB-usec */ | 159 | __u64 coremem; /* accumulated RSS usage in MB-usec */ |
| 147 | 160 | ||
| 148 | /* Accumulated virtual memory usage in duration of a task. | 161 | /* Accumulated virtual memory usage in duration of a task. |
| 149 | * Same as acct_rss_mem1 above except that we keep track of VM usage. | 162 | * Same as acct_rss_mem1 above except that we keep track of VM usage. |
| 150 | */ | 163 | */ |
| 151 | __u64 virtmem; /* accumulated VM usage in MB-usec */ | 164 | __u64 virtmem; /* accumulated VM usage in MB-usec */ |
| 152 | 165 | ||
| 153 | /* High watermark of RSS usage in duration of a task, in KBytes. */ | 166 | /* High watermark of RSS usage in duration of a task, in KBytes. */ |
| 154 | __u64 hiwater_rss; /* High-watermark of RSS usage */ | 167 | __u64 hiwater_rss; /* High-watermark of RSS usage */ |
| 155 | 168 | ||
| 156 | /* High watermark of VM usage in duration of a task, in KBytes. */ | 169 | /* High watermark of VM usage in duration of a task, in KBytes. */ |
| 157 | __u64 hiwater_vm; /* High-water virtual memory usage */ | 170 | __u64 hiwater_vm; /* High-water virtual memory usage */ |
| 158 | 171 | ||
| 159 | /* The following four fields are I/O statistics of a task. */ | 172 | /* The following four fields are I/O statistics of a task. */ |
| @@ -164,17 +177,23 @@ struct taskstats { | |||
| 164 | 177 | ||
| 165 | /* Extended accounting fields end */ | 178 | /* Extended accounting fields end */ |
| 166 | 179 | ||
| 167 | 4) Per-task and per-thread statistics | 180 | 4) Per-task and per-thread statistics:: |
| 181 | |||
| 168 | __u64 nvcsw; /* Context voluntary switch counter */ | 182 | __u64 nvcsw; /* Context voluntary switch counter */ |
| 169 | __u64 nivcsw; /* Context involuntary switch counter */ | 183 | __u64 nivcsw; /* Context involuntary switch counter */ |
| 170 | 184 | ||
| 171 | 5) Time accounting for SMT machines | 185 | 5) Time accounting for SMT machines:: |
| 186 | |||
| 172 | __u64 ac_utimescaled; /* utime scaled on frequency etc */ | 187 | __u64 ac_utimescaled; /* utime scaled on frequency etc */ |
| 173 | __u64 ac_stimescaled; /* stime scaled on frequency etc */ | 188 | __u64 ac_stimescaled; /* stime scaled on frequency etc */ |
| 174 | __u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */ | 189 | __u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */ |
| 175 | 190 | ||
| 176 | 6) Extended delay accounting fields for memory reclaim | 191 | 6) Extended delay accounting fields for memory reclaim:: |
| 192 | |||
| 177 | /* Delay waiting for memory reclaim */ | 193 | /* Delay waiting for memory reclaim */ |
| 178 | __u64 freepages_count; | 194 | __u64 freepages_count; |
| 179 | __u64 freepages_delay_total; | 195 | __u64 freepages_delay_total; |
| 180 | } | 196 | |
| 197 | :: | ||
| 198 | |||
| 199 | } | ||
diff --git a/Documentation/accounting/taskstats.txt b/Documentation/accounting/taskstats.rst index ff06b738bb88..2a28b7f55c10 100644 --- a/Documentation/accounting/taskstats.txt +++ b/Documentation/accounting/taskstats.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ============================= | ||
| 1 | Per-task statistics interface | 2 | Per-task statistics interface |
| 2 | ----------------------------- | 3 | ============================= |
| 3 | 4 | ||
| 4 | 5 | ||
| 5 | Taskstats is a netlink-based interface for sending per-task and | 6 | Taskstats is a netlink-based interface for sending per-task and |
| @@ -65,7 +66,7 @@ taskstats.h file. | |||
| 65 | 66 | ||
| 66 | The data exchanged between user and kernel space is a netlink message belonging | 67 | The data exchanged between user and kernel space is a netlink message belonging |
| 67 | to the NETLINK_GENERIC family and using the netlink attributes interface. | 68 | to the NETLINK_GENERIC family and using the netlink attributes interface. |
| 68 | The messages are in the format | 69 | The messages are in the format:: |
| 69 | 70 | ||
| 70 | +----------+- - -+-------------+-------------------+ | 71 | +----------+- - -+-------------+-------------------+ |
| 71 | | nlmsghdr | Pad | genlmsghdr | taskstats payload | | 72 | | nlmsghdr | Pad | genlmsghdr | taskstats payload | |
| @@ -167,15 +168,13 @@ extended and the number of cpus grows large. | |||
| 167 | To avoid losing statistics, userspace should do one or more of the following: | 168 | To avoid losing statistics, userspace should do one or more of the following: |
| 168 | 169 | ||
| 169 | - increase the receive buffer sizes for the netlink sockets opened by | 170 | - increase the receive buffer sizes for the netlink sockets opened by |
| 170 | listeners to receive exit data. | 171 | listeners to receive exit data. |
| 171 | 172 | ||
| 172 | - create more listeners and reduce the number of cpus being listened to by | 173 | - create more listeners and reduce the number of cpus being listened to by |
| 173 | each listener. In the extreme case, there could be one listener for each cpu. | 174 | each listener. In the extreme case, there could be one listener for each cpu. |
| 174 | Users may also consider setting the cpu affinity of the listener to the subset | 175 | Users may also consider setting the cpu affinity of the listener to the subset |
| 175 | of cpus to which it listens, especially if they are listening to just one cpu. | 176 | of cpus to which it listens, especially if they are listening to just one cpu. |
| 176 | 177 | ||
| 177 | Despite these measures, if the userspace receives ENOBUFS error messages | 178 | Despite these measures, if the userspace receives ENOBUFS error messages |
| 178 | indicated overflow of receive buffers, it should take measures to handle the | 179 | indicated overflow of receive buffers, it should take measures to handle the |
| 179 | loss of data. | 180 | loss of data. |
| 180 | |||
| 181 | ---- | ||
diff --git a/Documentation/aoe/aoe.rst b/Documentation/admin-guide/aoe/aoe.rst index 58747ecec71d..a05e751363a0 100644 --- a/Documentation/aoe/aoe.rst +++ b/Documentation/admin-guide/aoe/aoe.rst | |||
| @@ -20,7 +20,7 @@ driver. The aoetools are on sourceforge. | |||
| 20 | 20 | ||
| 21 | http://aoetools.sourceforge.net/ | 21 | http://aoetools.sourceforge.net/ |
| 22 | 22 | ||
| 23 | The scripts in this Documentation/aoe directory are intended to | 23 | The scripts in this Documentation/admin-guide/aoe directory are intended to |
| 24 | document the use of the driver and are not necessary if you install | 24 | document the use of the driver and are not necessary if you install |
| 25 | the aoetools. | 25 | the aoetools. |
| 26 | 26 | ||
| @@ -86,7 +86,7 @@ Using sysfs | |||
| 86 | a convenient way. Users with aoetools should use the aoe-stat | 86 | a convenient way. Users with aoetools should use the aoe-stat |
| 87 | command:: | 87 | command:: |
| 88 | 88 | ||
| 89 | root@makki root# sh Documentation/aoe/status.sh | 89 | root@makki root# sh Documentation/admin-guide/aoe/status.sh |
| 90 | e10.0 eth3 up | 90 | e10.0 eth3 up |
| 91 | e10.1 eth3 up | 91 | e10.1 eth3 up |
| 92 | e10.2 eth3 up | 92 | e10.2 eth3 up |
diff --git a/Documentation/aoe/autoload.sh b/Documentation/admin-guide/aoe/autoload.sh index 815dff4691c9..815dff4691c9 100644 --- a/Documentation/aoe/autoload.sh +++ b/Documentation/admin-guide/aoe/autoload.sh | |||
diff --git a/Documentation/aoe/examples.rst b/Documentation/admin-guide/aoe/examples.rst index 91f3198e52c1..91f3198e52c1 100644 --- a/Documentation/aoe/examples.rst +++ b/Documentation/admin-guide/aoe/examples.rst | |||
diff --git a/Documentation/aoe/index.rst b/Documentation/admin-guide/aoe/index.rst index 4394b9b7913c..d71c5df15922 100644 --- a/Documentation/aoe/index.rst +++ b/Documentation/admin-guide/aoe/index.rst | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | |||
| 3 | ======================= | 1 | ======================= |
| 4 | ATA over Ethernet (AoE) | 2 | ATA over Ethernet (AoE) |
| 5 | ======================= | 3 | ======================= |
diff --git a/Documentation/aoe/status.sh b/Documentation/admin-guide/aoe/status.sh index eeec7baae57a..eeec7baae57a 100644 --- a/Documentation/aoe/status.sh +++ b/Documentation/admin-guide/aoe/status.sh | |||
diff --git a/Documentation/aoe/todo.rst b/Documentation/admin-guide/aoe/todo.rst index dea8db5a33e1..dea8db5a33e1 100644 --- a/Documentation/aoe/todo.rst +++ b/Documentation/admin-guide/aoe/todo.rst | |||
diff --git a/Documentation/aoe/udev-install.sh b/Documentation/admin-guide/aoe/udev-install.sh index 15e86f58c036..15e86f58c036 100644 --- a/Documentation/aoe/udev-install.sh +++ b/Documentation/admin-guide/aoe/udev-install.sh | |||
diff --git a/Documentation/aoe/udev.txt b/Documentation/admin-guide/aoe/udev.txt index 54feda5a0772..5fb756466bc7 100644 --- a/Documentation/aoe/udev.txt +++ b/Documentation/admin-guide/aoe/udev.txt | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | # udev_rules="/etc/udev/rules.d/" | 11 | # udev_rules="/etc/udev/rules.d/" |
| 12 | # bash# ls /etc/udev/rules.d/ | 12 | # bash# ls /etc/udev/rules.d/ |
| 13 | # 10-wacom.rules 50-udev.rules | 13 | # 10-wacom.rules 50-udev.rules |
| 14 | # bash# cp /path/to/linux/Documentation/aoe/udev.txt \ | 14 | # bash# cp /path/to/linux/Documentation/admin-guide/aoe/udev.txt \ |
| 15 | # /etc/udev/rules.d/60-aoe.rules | 15 | # /etc/udev/rules.d/60-aoe.rules |
| 16 | # | 16 | # |
| 17 | 17 | ||
diff --git a/Documentation/blockdev/drbd/DRBD-8.3-data-packets.svg b/Documentation/admin-guide/blockdev/drbd/DRBD-8.3-data-packets.svg index f87cfa0dc2fb..f87cfa0dc2fb 100644 --- a/Documentation/blockdev/drbd/DRBD-8.3-data-packets.svg +++ b/Documentation/admin-guide/blockdev/drbd/DRBD-8.3-data-packets.svg | |||
diff --git a/Documentation/blockdev/drbd/DRBD-data-packets.svg b/Documentation/admin-guide/blockdev/drbd/DRBD-data-packets.svg index 48a1e2165fec..48a1e2165fec 100644 --- a/Documentation/blockdev/drbd/DRBD-data-packets.svg +++ b/Documentation/admin-guide/blockdev/drbd/DRBD-data-packets.svg | |||
diff --git a/Documentation/blockdev/drbd/conn-states-8.dot b/Documentation/admin-guide/blockdev/drbd/conn-states-8.dot index 025e8cf5e64a..025e8cf5e64a 100644 --- a/Documentation/blockdev/drbd/conn-states-8.dot +++ b/Documentation/admin-guide/blockdev/drbd/conn-states-8.dot | |||
diff --git a/Documentation/blockdev/drbd/data-structure-v9.txt b/Documentation/admin-guide/blockdev/drbd/data-structure-v9.rst index 1e52a0e32624..66036b901644 100644 --- a/Documentation/blockdev/drbd/data-structure-v9.txt +++ b/Documentation/admin-guide/blockdev/drbd/data-structure-v9.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ================================ | ||
| 2 | kernel data structure for DRBD-9 | ||
| 3 | ================================ | ||
| 4 | |||
| 1 | This describes the in kernel data structure for DRBD-9. Starting with | 5 | This describes the in kernel data structure for DRBD-9. Starting with |
| 2 | Linux v3.14 we are reorganizing DRBD to use this data structure. | 6 | Linux v3.14 we are reorganizing DRBD to use this data structure. |
| 3 | 7 | ||
| @@ -10,7 +14,7 @@ device is represented by a block device locally. | |||
| 10 | 14 | ||
| 11 | The DRBD objects are interconnected to form a matrix as depicted below; a | 15 | The DRBD objects are interconnected to form a matrix as depicted below; a |
| 12 | drbd_peer_device object sits at each intersection between a drbd_device and a | 16 | drbd_peer_device object sits at each intersection between a drbd_device and a |
| 13 | drbd_connection: | 17 | drbd_connection:: |
| 14 | 18 | ||
| 15 | /--------------+---------------+.....+---------------\ | 19 | /--------------+---------------+.....+---------------\ |
| 16 | | resource | device | | device | | 20 | | resource | device | | device | |
diff --git a/Documentation/blockdev/drbd/disk-states-8.dot b/Documentation/admin-guide/blockdev/drbd/disk-states-8.dot index d06cfb46fb98..d06cfb46fb98 100644 --- a/Documentation/blockdev/drbd/disk-states-8.dot +++ b/Documentation/admin-guide/blockdev/drbd/disk-states-8.dot | |||
diff --git a/Documentation/blockdev/drbd/drbd-connection-state-overview.dot b/Documentation/admin-guide/blockdev/drbd/drbd-connection-state-overview.dot index 6d9cf0a7b11d..6d9cf0a7b11d 100644 --- a/Documentation/blockdev/drbd/drbd-connection-state-overview.dot +++ b/Documentation/admin-guide/blockdev/drbd/drbd-connection-state-overview.dot | |||
diff --git a/Documentation/admin-guide/blockdev/drbd/figures.rst b/Documentation/admin-guide/blockdev/drbd/figures.rst new file mode 100644 index 000000000000..bd9a4901fe46 --- /dev/null +++ b/Documentation/admin-guide/blockdev/drbd/figures.rst | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | .. The here included files are intended to help understand the implementation | ||
| 4 | |||
| 5 | Data flows that Relate some functions, and write packets | ||
| 6 | ======================================================== | ||
| 7 | |||
| 8 | .. kernel-figure:: DRBD-8.3-data-packets.svg | ||
| 9 | :alt: DRBD-8.3-data-packets.svg | ||
| 10 | :align: center | ||
| 11 | |||
| 12 | .. kernel-figure:: DRBD-data-packets.svg | ||
| 13 | :alt: DRBD-data-packets.svg | ||
| 14 | :align: center | ||
| 15 | |||
| 16 | |||
| 17 | Sub graphs of DRBD's state transitions | ||
| 18 | ====================================== | ||
| 19 | |||
| 20 | .. kernel-figure:: conn-states-8.dot | ||
| 21 | :alt: conn-states-8.dot | ||
| 22 | :align: center | ||
| 23 | |||
| 24 | .. kernel-figure:: disk-states-8.dot | ||
| 25 | :alt: disk-states-8.dot | ||
| 26 | :align: center | ||
| 27 | |||
| 28 | .. kernel-figure:: node-states-8.dot | ||
| 29 | :alt: node-states-8.dot | ||
| 30 | :align: center | ||
diff --git a/Documentation/blockdev/drbd/README.txt b/Documentation/admin-guide/blockdev/drbd/index.rst index 627b0a1bf35e..68ecd5c113e9 100644 --- a/Documentation/blockdev/drbd/README.txt +++ b/Documentation/admin-guide/blockdev/drbd/index.rst | |||
| @@ -1,4 +1,9 @@ | |||
| 1 | ========================================== | ||
| 2 | Distributed Replicated Block Device - DRBD | ||
| 3 | ========================================== | ||
| 4 | |||
| 1 | Description | 5 | Description |
| 6 | =========== | ||
| 2 | 7 | ||
| 3 | DRBD is a shared-nothing, synchronously replicated block device. It | 8 | DRBD is a shared-nothing, synchronously replicated block device. It |
| 4 | is designed to serve as a building block for high availability | 9 | is designed to serve as a building block for high availability |
| @@ -7,10 +12,8 @@ Description | |||
| 7 | 12 | ||
| 8 | Please visit http://www.drbd.org to find out more. | 13 | Please visit http://www.drbd.org to find out more. |
| 9 | 14 | ||
| 10 | The here included files are intended to help understand the implementation | 15 | .. toctree:: |
| 11 | 16 | :maxdepth: 1 | |
| 12 | DRBD-8.3-data-packets.svg, DRBD-data-packets.svg | ||
| 13 | relates some functions, and write packets. | ||
| 14 | 17 | ||
| 15 | conn-states-8.dot, disk-states-8.dot, node-states-8.dot | 18 | data-structure-v9 |
| 16 | The sub graphs of DRBD's state transitions | 19 | figures |
diff --git a/Documentation/blockdev/drbd/node-states-8.dot b/Documentation/admin-guide/blockdev/drbd/node-states-8.dot index 4a2b00c23547..bfa54e1f8016 100644 --- a/Documentation/blockdev/drbd/node-states-8.dot +++ b/Documentation/admin-guide/blockdev/drbd/node-states-8.dot | |||
| @@ -11,4 +11,3 @@ digraph peer_states { | |||
| 11 | Unknown -> Primary [ label = "connected" ] | 11 | Unknown -> Primary [ label = "connected" ] |
| 12 | Unknown -> Secondary [ label = "connected" ] | 12 | Unknown -> Secondary [ label = "connected" ] |
| 13 | } | 13 | } |
| 14 | |||
diff --git a/Documentation/blockdev/floppy.txt b/Documentation/admin-guide/blockdev/floppy.rst index e2240f5ab64d..4a8f31cf4139 100644 --- a/Documentation/blockdev/floppy.txt +++ b/Documentation/admin-guide/blockdev/floppy.rst | |||
| @@ -1,35 +1,37 @@ | |||
| 1 | This file describes the floppy driver. | 1 | ============= |
| 2 | Floppy Driver | ||
| 3 | ============= | ||
| 2 | 4 | ||
| 3 | FAQ list: | 5 | FAQ list: |
| 4 | ========= | 6 | ========= |
| 5 | 7 | ||
| 6 | A FAQ list may be found in the fdutils package (see below), and also | 8 | A FAQ list may be found in the fdutils package (see below), and also |
| 7 | at <http://fdutils.linux.lu/faq.html>. | 9 | at <http://fdutils.linux.lu/faq.html>. |
| 8 | 10 | ||
| 9 | 11 | ||
| 10 | LILO configuration options (Thinkpad users, read this) | 12 | LILO configuration options (Thinkpad users, read this) |
| 11 | ====================================================== | 13 | ====================================================== |
| 12 | 14 | ||
| 13 | The floppy driver is configured using the 'floppy=' option in | 15 | The floppy driver is configured using the 'floppy=' option in |
| 14 | lilo. This option can be typed at the boot prompt, or entered in the | 16 | lilo. This option can be typed at the boot prompt, or entered in the |
| 15 | lilo configuration file. | 17 | lilo configuration file. |
| 16 | 18 | ||
| 17 | Example: If your kernel is called linux-2.6.9, type the following line | 19 | Example: If your kernel is called linux-2.6.9, type the following line |
| 18 | at the lilo boot prompt (if you have a thinkpad): | 20 | at the lilo boot prompt (if you have a thinkpad):: |
| 19 | 21 | ||
| 20 | linux-2.6.9 floppy=thinkpad | 22 | linux-2.6.9 floppy=thinkpad |
| 21 | 23 | ||
| 22 | You may also enter the following line in /etc/lilo.conf, in the description | 24 | You may also enter the following line in /etc/lilo.conf, in the description |
| 23 | of linux-2.6.9: | 25 | of linux-2.6.9:: |
| 24 | 26 | ||
| 25 | append = "floppy=thinkpad" | 27 | append = "floppy=thinkpad" |
| 26 | 28 | ||
| 27 | Several floppy related options may be given, example: | 29 | Several floppy related options may be given, example:: |
| 28 | 30 | ||
| 29 | linux-2.6.9 floppy=daring floppy=two_fdc | 31 | linux-2.6.9 floppy=daring floppy=two_fdc |
| 30 | append = "floppy=daring floppy=two_fdc" | 32 | append = "floppy=daring floppy=two_fdc" |
| 31 | 33 | ||
| 32 | If you give options both in the lilo config file and on the boot | 34 | If you give options both in the lilo config file and on the boot |
| 33 | prompt, the option strings of both places are concatenated, the boot | 35 | prompt, the option strings of both places are concatenated, the boot |
| 34 | prompt options coming last. That's why there are also options to | 36 | prompt options coming last. That's why there are also options to |
| 35 | restore the default behavior. | 37 | restore the default behavior. |
| @@ -38,21 +40,23 @@ restore the default behavior. | |||
| 38 | Module configuration options | 40 | Module configuration options |
| 39 | ============================ | 41 | ============================ |
| 40 | 42 | ||
| 41 | If you use the floppy driver as a module, use the following syntax: | 43 | If you use the floppy driver as a module, use the following syntax:: |
| 42 | modprobe floppy floppy="<options>" | ||
| 43 | 44 | ||
| 44 | Example: | 45 | modprobe floppy floppy="<options>" |
| 45 | modprobe floppy floppy="omnibook messages" | ||
| 46 | 46 | ||
| 47 | If you need certain options enabled every time you load the floppy driver, | 47 | Example:: |
| 48 | you can put: | ||
| 49 | 48 | ||
| 50 | options floppy floppy="omnibook messages" | 49 | modprobe floppy floppy="omnibook messages" |
| 50 | |||
| 51 | If you need certain options enabled every time you load the floppy driver, | ||
| 52 | you can put:: | ||
| 53 | |||
| 54 | options floppy floppy="omnibook messages" | ||
| 51 | 55 | ||
| 52 | in a configuration file in /etc/modprobe.d/. | 56 | in a configuration file in /etc/modprobe.d/. |
| 53 | 57 | ||
| 54 | 58 | ||
| 55 | The floppy driver related options are: | 59 | The floppy driver related options are: |
| 56 | 60 | ||
| 57 | floppy=asus_pci | 61 | floppy=asus_pci |
| 58 | Sets the bit mask to allow only units 0 and 1. (default) | 62 | Sets the bit mask to allow only units 0 and 1. (default) |
| @@ -70,8 +74,7 @@ in a configuration file in /etc/modprobe.d/. | |||
| 70 | Tells the floppy driver that you have only one floppy controller. | 74 | Tells the floppy driver that you have only one floppy controller. |
| 71 | (default) | 75 | (default) |
| 72 | 76 | ||
| 73 | floppy=two_fdc | 77 | floppy=two_fdc / floppy=<address>,two_fdc |
| 74 | floppy=<address>,two_fdc | ||
| 75 | Tells the floppy driver that you have two floppy controllers. | 78 | Tells the floppy driver that you have two floppy controllers. |
| 76 | The second floppy controller is assumed to be at <address>. | 79 | The second floppy controller is assumed to be at <address>. |
| 77 | This option is not needed if the second controller is at address | 80 | This option is not needed if the second controller is at address |
| @@ -84,8 +87,7 @@ in a configuration file in /etc/modprobe.d/. | |||
| 84 | floppy=0,thinkpad | 87 | floppy=0,thinkpad |
| 85 | Tells the floppy driver that you don't have a Thinkpad. | 88 | Tells the floppy driver that you don't have a Thinkpad. |
| 86 | 89 | ||
| 87 | floppy=omnibook | 90 | floppy=omnibook / floppy=nodma |
| 88 | floppy=nodma | ||
| 89 | Tells the floppy driver not to use Dma for data transfers. | 91 | Tells the floppy driver not to use Dma for data transfers. |
| 90 | This is needed on HP Omnibooks, which don't have a workable | 92 | This is needed on HP Omnibooks, which don't have a workable |
| 91 | DMA channel for the floppy driver. This option is also useful | 93 | DMA channel for the floppy driver. This option is also useful |
| @@ -144,14 +146,16 @@ in a configuration file in /etc/modprobe.d/. | |||
| 144 | described in the physical CMOS), or if your BIOS uses | 146 | described in the physical CMOS), or if your BIOS uses |
| 145 | non-standard CMOS types. The CMOS types are: | 147 | non-standard CMOS types. The CMOS types are: |
| 146 | 148 | ||
| 147 | 0 - Use the value of the physical CMOS | 149 | == ================================== |
| 148 | 1 - 5 1/4 DD | 150 | 0 Use the value of the physical CMOS |
| 149 | 2 - 5 1/4 HD | 151 | 1 5 1/4 DD |
| 150 | 3 - 3 1/2 DD | 152 | 2 5 1/4 HD |
| 151 | 4 - 3 1/2 HD | 153 | 3 3 1/2 DD |
| 152 | 5 - 3 1/2 ED | 154 | 4 3 1/2 HD |
| 153 | 6 - 3 1/2 ED | 155 | 5 3 1/2 ED |
| 154 | 16 - unknown or not installed | 156 | 6 3 1/2 ED |
| 157 | 16 unknown or not installed | ||
| 158 | == ================================== | ||
| 155 | 159 | ||
| 156 | (Note: there are two valid types for ED drives. This is because 5 was | 160 | (Note: there are two valid types for ED drives. This is because 5 was |
| 157 | initially chosen to represent floppy *tapes*, and 6 for ED drives. | 161 | initially chosen to represent floppy *tapes*, and 6 for ED drives. |
| @@ -162,8 +166,7 @@ in a configuration file in /etc/modprobe.d/. | |||
| 162 | Print a warning message when an unexpected interrupt is received. | 166 | Print a warning message when an unexpected interrupt is received. |
| 163 | (default) | 167 | (default) |
| 164 | 168 | ||
| 165 | floppy=no_unexpected_interrupts | 169 | floppy=no_unexpected_interrupts / floppy=L40SX |
| 166 | floppy=L40SX | ||
| 167 | Don't print a message when an unexpected interrupt is received. This | 170 | Don't print a message when an unexpected interrupt is received. This |
| 168 | is needed on IBM L40SX laptops in certain video modes. (There seems | 171 | is needed on IBM L40SX laptops in certain video modes. (There seems |
| 169 | to be an interaction between video and floppy. The unexpected | 172 | to be an interaction between video and floppy. The unexpected |
| @@ -199,47 +202,54 @@ in a configuration file in /etc/modprobe.d/. | |||
| 199 | Sets the floppy DMA channel to <nr> instead of 2. | 202 | Sets the floppy DMA channel to <nr> instead of 2. |
| 200 | 203 | ||
| 201 | floppy=slow | 204 | floppy=slow |
| 202 | Use PS/2 stepping rate: | 205 | Use PS/2 stepping rate:: |
| 203 | " PS/2 floppies have much slower step rates than regular floppies. | 206 | |
| 207 | PS/2 floppies have much slower step rates than regular floppies. | ||
| 204 | It's been recommended that take about 1/4 of the default speed | 208 | It's been recommended that take about 1/4 of the default speed |
| 205 | in some more extreme cases." | 209 | in some more extreme cases. |
| 206 | 210 | ||
| 207 | 211 | ||
| 208 | Supporting utilities and additional documentation: | 212 | Supporting utilities and additional documentation: |
| 209 | ================================================== | 213 | ================================================== |
| 210 | 214 | ||
| 211 | Additional parameters of the floppy driver can be configured at | 215 | Additional parameters of the floppy driver can be configured at |
| 212 | runtime. Utilities which do this can be found in the fdutils package. | 216 | runtime. Utilities which do this can be found in the fdutils package. |
| 213 | This package also contains a new version of mtools which allows to | 217 | This package also contains a new version of mtools which allows to |
| 214 | access high capacity disks (up to 1992K on a high density 3 1/2 disk!). | 218 | access high capacity disks (up to 1992K on a high density 3 1/2 disk!). |
| 215 | It also contains additional documentation about the floppy driver. | 219 | It also contains additional documentation about the floppy driver. |
| 216 | 220 | ||
| 217 | The latest version can be found at fdutils homepage: | 221 | The latest version can be found at fdutils homepage: |
| 222 | |||
| 218 | http://fdutils.linux.lu | 223 | http://fdutils.linux.lu |
| 219 | 224 | ||
| 220 | The fdutils releases can be found at: | 225 | The fdutils releases can be found at: |
| 226 | |||
| 221 | http://fdutils.linux.lu/download.html | 227 | http://fdutils.linux.lu/download.html |
| 228 | |||
| 222 | http://www.tux.org/pub/knaff/fdutils/ | 229 | http://www.tux.org/pub/knaff/fdutils/ |
| 230 | |||
| 223 | ftp://metalab.unc.edu/pub/Linux/utils/disk-management/ | 231 | ftp://metalab.unc.edu/pub/Linux/utils/disk-management/ |
| 224 | 232 | ||
| 225 | Reporting problems about the floppy driver | 233 | Reporting problems about the floppy driver |
| 226 | ========================================== | 234 | ========================================== |
| 227 | 235 | ||
| 228 | If you have a question or a bug report about the floppy driver, mail | 236 | If you have a question or a bug report about the floppy driver, mail |
| 229 | me at Alain.Knaff@poboxes.com . If you post to Usenet, preferably use | 237 | me at Alain.Knaff@poboxes.com . If you post to Usenet, preferably use |
| 230 | comp.os.linux.hardware. As the volume in these groups is rather high, | 238 | comp.os.linux.hardware. As the volume in these groups is rather high, |
| 231 | be sure to include the word "floppy" (or "FLOPPY") in the subject | 239 | be sure to include the word "floppy" (or "FLOPPY") in the subject |
| 232 | line. If the reported problem happens when mounting floppy disks, be | 240 | line. If the reported problem happens when mounting floppy disks, be |
| 233 | sure to mention also the type of the filesystem in the subject line. | 241 | sure to mention also the type of the filesystem in the subject line. |
| 234 | 242 | ||
| 235 | Be sure to read the FAQ before mailing/posting any bug reports! | 243 | Be sure to read the FAQ before mailing/posting any bug reports! |
| 236 | 244 | ||
| 237 | Alain | 245 | Alain |
| 238 | 246 | ||
| 239 | Changelog | 247 | Changelog |
| 240 | ========= | 248 | ========= |
| 241 | 249 | ||
| 242 | 10-30-2004 : Cleanup, updating, add reference to module configuration. | 250 | 10-30-2004 : |
| 251 | Cleanup, updating, add reference to module configuration. | ||
| 243 | James Nelson <james4765@gmail.com> | 252 | James Nelson <james4765@gmail.com> |
| 244 | 253 | ||
| 245 | 6-3-2000 : Original Document | 254 | 6-3-2000 : |
| 255 | Original Document | ||
diff --git a/Documentation/admin-guide/blockdev/index.rst b/Documentation/admin-guide/blockdev/index.rst new file mode 100644 index 000000000000..b903cf152091 --- /dev/null +++ b/Documentation/admin-guide/blockdev/index.rst | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | =========================== | ||
| 4 | The Linux RapidIO Subsystem | ||
| 5 | =========================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | floppy | ||
| 11 | nbd | ||
| 12 | paride | ||
| 13 | ramdisk | ||
| 14 | zram | ||
| 15 | |||
| 16 | drbd/index | ||
diff --git a/Documentation/blockdev/nbd.txt b/Documentation/admin-guide/blockdev/nbd.rst index db242ea2bce8..d78dfe559dcf 100644 --- a/Documentation/blockdev/nbd.txt +++ b/Documentation/admin-guide/blockdev/nbd.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ================================== | ||
| 1 | Network Block Device (TCP version) | 2 | Network Block Device (TCP version) |
| 2 | ================================== | 3 | ================================== |
| 3 | 4 | ||
| @@ -28,4 +29,3 @@ max_part | |||
| 28 | 29 | ||
| 29 | nbds_max | 30 | nbds_max |
| 30 | Number of block devices that should be initialized (default: 16). | 31 | Number of block devices that should be initialized (default: 16). |
| 31 | |||
diff --git a/Documentation/blockdev/paride.txt b/Documentation/admin-guide/blockdev/paride.rst index ee6717e3771d..87b4278bf314 100644 --- a/Documentation/blockdev/paride.txt +++ b/Documentation/admin-guide/blockdev/paride.rst | |||
| @@ -1,15 +1,17 @@ | |||
| 1 | 1 | =================================== | |
| 2 | Linux and parallel port IDE devices | 2 | Linux and parallel port IDE devices |
| 3 | =================================== | ||
| 3 | 4 | ||
| 4 | PARIDE v1.03 (c) 1997-8 Grant Guenther <grant@torque.net> | 5 | PARIDE v1.03 (c) 1997-8 Grant Guenther <grant@torque.net> |
| 5 | 6 | ||
| 6 | 1. Introduction | 7 | 1. Introduction |
| 8 | =============== | ||
| 7 | 9 | ||
| 8 | Owing to the simplicity and near universality of the parallel port interface | 10 | Owing to the simplicity and near universality of the parallel port interface |
| 9 | to personal computers, many external devices such as portable hard-disk, | 11 | to personal computers, many external devices such as portable hard-disk, |
| 10 | CD-ROM, LS-120 and tape drives use the parallel port to connect to their | 12 | CD-ROM, LS-120 and tape drives use the parallel port to connect to their |
| 11 | host computer. While some devices (notably scanners) use ad-hoc methods | 13 | host computer. While some devices (notably scanners) use ad-hoc methods |
| 12 | to pass commands and data through the parallel port interface, most | 14 | to pass commands and data through the parallel port interface, most |
| 13 | external devices are actually identical to an internal model, but with | 15 | external devices are actually identical to an internal model, but with |
| 14 | a parallel-port adapter chip added in. Some of the original parallel port | 16 | a parallel-port adapter chip added in. Some of the original parallel port |
| 15 | adapters were little more than mechanisms for multiplexing a SCSI bus. | 17 | adapters were little more than mechanisms for multiplexing a SCSI bus. |
| @@ -28,47 +30,50 @@ were to open up a parallel port CD-ROM drive, for instance, one would | |||
| 28 | find a standard ATAPI CD-ROM drive, a power supply, and a single adapter | 30 | find a standard ATAPI CD-ROM drive, a power supply, and a single adapter |
| 29 | that interconnected a standard PC parallel port cable and a standard | 31 | that interconnected a standard PC parallel port cable and a standard |
| 30 | IDE cable. It is usually possible to exchange the CD-ROM device with | 32 | IDE cable. It is usually possible to exchange the CD-ROM device with |
| 31 | any other device using the IDE interface. | 33 | any other device using the IDE interface. |
| 32 | 34 | ||
| 33 | The document describes the support in Linux for parallel port IDE | 35 | The document describes the support in Linux for parallel port IDE |
| 34 | devices. It does not cover parallel port SCSI devices, "ditto" tape | 36 | devices. It does not cover parallel port SCSI devices, "ditto" tape |
| 35 | drives or scanners. Many different devices are supported by the | 37 | drives or scanners. Many different devices are supported by the |
| 36 | parallel port IDE subsystem, including: | 38 | parallel port IDE subsystem, including: |
| 37 | 39 | ||
| 38 | MicroSolutions backpack CD-ROM | 40 | - MicroSolutions backpack CD-ROM |
| 39 | MicroSolutions backpack PD/CD | 41 | - MicroSolutions backpack PD/CD |
| 40 | MicroSolutions backpack hard-drives | 42 | - MicroSolutions backpack hard-drives |
| 41 | MicroSolutions backpack 8000t tape drive | 43 | - MicroSolutions backpack 8000t tape drive |
| 42 | SyQuest EZ-135, EZ-230 & SparQ drives | 44 | - SyQuest EZ-135, EZ-230 & SparQ drives |
| 43 | Avatar Shark | 45 | - Avatar Shark |
| 44 | Imation Superdisk LS-120 | 46 | - Imation Superdisk LS-120 |
| 45 | Maxell Superdisk LS-120 | 47 | - Maxell Superdisk LS-120 |
| 46 | FreeCom Power CD | 48 | - FreeCom Power CD |
| 47 | Hewlett-Packard 5GB and 8GB tape drives | 49 | - Hewlett-Packard 5GB and 8GB tape drives |
| 48 | Hewlett-Packard 7100 and 7200 CD-RW drives | 50 | - Hewlett-Packard 7100 and 7200 CD-RW drives |
| 49 | 51 | ||
| 50 | as well as most of the clone and no-name products on the market. | 52 | as well as most of the clone and no-name products on the market. |
| 51 | 53 | ||
| 52 | To support such a wide range of devices, PARIDE, the parallel port IDE | 54 | To support such a wide range of devices, PARIDE, the parallel port IDE |
| 53 | subsystem, is actually structured in three parts. There is a base | 55 | subsystem, is actually structured in three parts. There is a base |
| 54 | paride module which provides a registry and some common methods for | 56 | paride module which provides a registry and some common methods for |
| 55 | accessing the parallel ports. The second component is a set of | 57 | accessing the parallel ports. The second component is a set of |
| 56 | high-level drivers for each of the different types of supported devices: | 58 | high-level drivers for each of the different types of supported devices: |
| 57 | 59 | ||
| 60 | === ============= | ||
| 58 | pd IDE disk | 61 | pd IDE disk |
| 59 | pcd ATAPI CD-ROM | 62 | pcd ATAPI CD-ROM |
| 60 | pf ATAPI disk | 63 | pf ATAPI disk |
| 61 | pt ATAPI tape | 64 | pt ATAPI tape |
| 62 | pg ATAPI generic | 65 | pg ATAPI generic |
| 66 | === ============= | ||
| 63 | 67 | ||
| 64 | (Currently, the pg driver is only used with CD-R drives). | 68 | (Currently, the pg driver is only used with CD-R drives). |
| 65 | 69 | ||
| 66 | The high-level drivers function according to the relevant standards. | 70 | The high-level drivers function according to the relevant standards. |
| 67 | The third component of PARIDE is a set of low-level protocol drivers | 71 | The third component of PARIDE is a set of low-level protocol drivers |
| 68 | for each of the parallel port IDE adapter chips. Thanks to the interest | 72 | for each of the parallel port IDE adapter chips. Thanks to the interest |
| 69 | and encouragement of Linux users from many parts of the world, | 73 | and encouragement of Linux users from many parts of the world, |
| 70 | support is available for almost all known adapter protocols: | 74 | support is available for almost all known adapter protocols: |
| 71 | 75 | ||
| 76 | ==== ====================================== ==== | ||
| 72 | aten ATEN EH-100 (HK) | 77 | aten ATEN EH-100 (HK) |
| 73 | bpck Microsolutions backpack (US) | 78 | bpck Microsolutions backpack (US) |
| 74 | comm DataStor (old-type) "commuter" adapter (TW) | 79 | comm DataStor (old-type) "commuter" adapter (TW) |
| @@ -83,9 +88,11 @@ support is available for almost all known adapter protocols: | |||
| 83 | ktti KT Technology PHd adapter (SG) | 88 | ktti KT Technology PHd adapter (SG) |
| 84 | on20 OnSpec 90c20 (US) | 89 | on20 OnSpec 90c20 (US) |
| 85 | on26 OnSpec 90c26 (US) | 90 | on26 OnSpec 90c26 (US) |
| 91 | ==== ====================================== ==== | ||
| 86 | 92 | ||
| 87 | 93 | ||
| 88 | 2. Using the PARIDE subsystem | 94 | 2. Using the PARIDE subsystem |
| 95 | ============================= | ||
| 89 | 96 | ||
| 90 | While configuring the Linux kernel, you may choose either to build | 97 | While configuring the Linux kernel, you may choose either to build |
| 91 | the PARIDE drivers into your kernel, or to build them as modules. | 98 | the PARIDE drivers into your kernel, or to build them as modules. |
| @@ -94,10 +101,10 @@ In either case, you will need to select "Parallel port IDE device support" | |||
| 94 | as well as at least one of the high-level drivers and at least one | 101 | as well as at least one of the high-level drivers and at least one |
| 95 | of the parallel port communication protocols. If you do not know | 102 | of the parallel port communication protocols. If you do not know |
| 96 | what kind of parallel port adapter is used in your drive, you could | 103 | what kind of parallel port adapter is used in your drive, you could |
| 97 | begin by checking the file names and any text files on your DOS | 104 | begin by checking the file names and any text files on your DOS |
| 98 | installation floppy. Alternatively, you can look at the markings on | 105 | installation floppy. Alternatively, you can look at the markings on |
| 99 | the adapter chip itself. That's usually sufficient to identify the | 106 | the adapter chip itself. That's usually sufficient to identify the |
| 100 | correct device. | 107 | correct device. |
| 101 | 108 | ||
| 102 | You can actually select all the protocol modules, and allow the PARIDE | 109 | You can actually select all the protocol modules, and allow the PARIDE |
| 103 | subsystem to try them all for you. | 110 | subsystem to try them all for you. |
| @@ -105,8 +112,9 @@ subsystem to try them all for you. | |||
| 105 | For the "brand-name" products listed above, here are the protocol | 112 | For the "brand-name" products listed above, here are the protocol |
| 106 | and high-level drivers that you would use: | 113 | and high-level drivers that you would use: |
| 107 | 114 | ||
| 115 | ================ ============ ====== ======== | ||
| 108 | Manufacturer Model Driver Protocol | 116 | Manufacturer Model Driver Protocol |
| 109 | 117 | ================ ============ ====== ======== | |
| 110 | MicroSolutions CD-ROM pcd bpck | 118 | MicroSolutions CD-ROM pcd bpck |
| 111 | MicroSolutions PD drive pf bpck | 119 | MicroSolutions PD drive pf bpck |
| 112 | MicroSolutions hard-drive pd bpck | 120 | MicroSolutions hard-drive pd bpck |
| @@ -119,8 +127,10 @@ and high-level drivers that you would use: | |||
| 119 | Hewlett-Packard 5GB Tape pt epat | 127 | Hewlett-Packard 5GB Tape pt epat |
| 120 | Hewlett-Packard 7200e (CD) pcd epat | 128 | Hewlett-Packard 7200e (CD) pcd epat |
| 121 | Hewlett-Packard 7200e (CD-R) pg epat | 129 | Hewlett-Packard 7200e (CD-R) pg epat |
| 130 | ================ ============ ====== ======== | ||
| 122 | 131 | ||
| 123 | 2.1 Configuring built-in drivers | 132 | 2.1 Configuring built-in drivers |
| 133 | --------------------------------- | ||
| 124 | 134 | ||
| 125 | We recommend that you get to know how the drivers work and how to | 135 | We recommend that you get to know how the drivers work and how to |
| 126 | configure them as loadable modules, before attempting to compile a | 136 | configure them as loadable modules, before attempting to compile a |
| @@ -143,7 +153,7 @@ protocol identification number and, for some devices, the drive's | |||
| 143 | chain ID. While your system is booting, a number of messages are | 153 | chain ID. While your system is booting, a number of messages are |
| 144 | displayed on the console. Like all such messages, they can be | 154 | displayed on the console. Like all such messages, they can be |
| 145 | reviewed with the 'dmesg' command. Among those messages will be | 155 | reviewed with the 'dmesg' command. Among those messages will be |
| 146 | some lines like: | 156 | some lines like:: |
| 147 | 157 | ||
| 148 | paride: bpck registered as protocol 0 | 158 | paride: bpck registered as protocol 0 |
| 149 | paride: epat registered as protocol 1 | 159 | paride: epat registered as protocol 1 |
| @@ -158,10 +168,10 @@ the last two digits of the drive's serial number (but read MicroSolutions' | |||
| 158 | documentation about this). | 168 | documentation about this). |
| 159 | 169 | ||
| 160 | As an example, let's assume that you have a MicroSolutions PD/CD drive | 170 | As an example, let's assume that you have a MicroSolutions PD/CD drive |
| 161 | with unit ID number 36 connected to the parallel port at 0x378, a SyQuest | 171 | with unit ID number 36 connected to the parallel port at 0x378, a SyQuest |
| 162 | EZ-135 connected to the chained port on the PD/CD drive and also an | 172 | EZ-135 connected to the chained port on the PD/CD drive and also an |
| 163 | Imation Superdisk connected to port 0x278. You could give the following | 173 | Imation Superdisk connected to port 0x278. You could give the following |
| 164 | options on your boot command: | 174 | options on your boot command:: |
| 165 | 175 | ||
| 166 | pd.drive0=0x378,1 pf.drive0=0x278,1 pf.drive1=0x378,0,36 | 176 | pd.drive0=0x378,1 pf.drive0=0x278,1 pf.drive1=0x378,0,36 |
| 167 | 177 | ||
| @@ -169,24 +179,27 @@ In the last option, pf.drive1 configures device /dev/pf1, the 0x378 | |||
| 169 | is the parallel port base address, the 0 is the protocol registration | 179 | is the parallel port base address, the 0 is the protocol registration |
| 170 | number and 36 is the chain ID. | 180 | number and 36 is the chain ID. |
| 171 | 181 | ||
| 172 | Please note: while PARIDE will work both with and without the | 182 | Please note: while PARIDE will work both with and without the |
| 173 | PARPORT parallel port sharing system that is included by the | 183 | PARPORT parallel port sharing system that is included by the |
| 174 | "Parallel port support" option, PARPORT must be included and enabled | 184 | "Parallel port support" option, PARPORT must be included and enabled |
| 175 | if you want to use chains of devices on the same parallel port. | 185 | if you want to use chains of devices on the same parallel port. |
| 176 | 186 | ||
| 177 | 2.2 Loading and configuring PARIDE as modules | 187 | 2.2 Loading and configuring PARIDE as modules |
| 188 | ---------------------------------------------- | ||
| 178 | 189 | ||
| 179 | It is much faster and simpler to get to understand the PARIDE drivers | 190 | It is much faster and simpler to get to understand the PARIDE drivers |
| 180 | if you use them as loadable kernel modules. | 191 | if you use them as loadable kernel modules. |
| 181 | 192 | ||
| 182 | Note 1: using these drivers with the "kerneld" automatic module loading | 193 | Note 1: |
| 183 | system is not recommended for beginners, and is not documented here. | 194 | using these drivers with the "kerneld" automatic module loading |
| 195 | system is not recommended for beginners, and is not documented here. | ||
| 184 | 196 | ||
| 185 | Note 2: if you build PARPORT support as a loadable module, PARIDE must | 197 | Note 2: |
| 186 | also be built as loadable modules, and PARPORT must be loaded before the | 198 | if you build PARPORT support as a loadable module, PARIDE must |
| 187 | PARIDE modules. | 199 | also be built as loadable modules, and PARPORT must be loaded before |
| 200 | the PARIDE modules. | ||
| 188 | 201 | ||
| 189 | To use PARIDE, you must begin by | 202 | To use PARIDE, you must begin by:: |
| 190 | 203 | ||
| 191 | insmod paride | 204 | insmod paride |
| 192 | 205 | ||
| @@ -195,8 +208,8 @@ among other tasks. | |||
| 195 | 208 | ||
| 196 | Then, load as many of the protocol modules as you think you might need. | 209 | Then, load as many of the protocol modules as you think you might need. |
| 197 | As you load each module, it will register the protocols that it supports, | 210 | As you load each module, it will register the protocols that it supports, |
| 198 | and print a log message to your kernel log file and your console. For | 211 | and print a log message to your kernel log file and your console. For |
| 199 | example: | 212 | example:: |
| 200 | 213 | ||
| 201 | # insmod epat | 214 | # insmod epat |
| 202 | paride: epat registered as protocol 0 | 215 | paride: epat registered as protocol 0 |
| @@ -205,22 +218,22 @@ example: | |||
| 205 | paride: k971 registered as protocol 2 | 218 | paride: k971 registered as protocol 2 |
| 206 | 219 | ||
| 207 | Finally, you can load high-level drivers for each kind of device that | 220 | Finally, you can load high-level drivers for each kind of device that |
| 208 | you have connected. By default, each driver will autoprobe for a single | 221 | you have connected. By default, each driver will autoprobe for a single |
| 209 | device, but you can support up to four similar devices by giving their | 222 | device, but you can support up to four similar devices by giving their |
| 210 | individual co-ordinates when you load the driver. | 223 | individual co-ordinates when you load the driver. |
| 211 | 224 | ||
| 212 | For example, if you had two no-name CD-ROM drives both using the | 225 | For example, if you had two no-name CD-ROM drives both using the |
| 213 | KingByte KBIC-951A adapter, one on port 0x378 and the other on 0x3bc | 226 | KingByte KBIC-951A adapter, one on port 0x378 and the other on 0x3bc |
| 214 | you could give the following command: | 227 | you could give the following command:: |
| 215 | 228 | ||
| 216 | # insmod pcd drive0=0x378,1 drive1=0x3bc,1 | 229 | # insmod pcd drive0=0x378,1 drive1=0x3bc,1 |
| 217 | 230 | ||
| 218 | For most adapters, giving a port address and protocol number is sufficient, | 231 | For most adapters, giving a port address and protocol number is sufficient, |
| 219 | but check the source files in linux/drivers/block/paride for more | 232 | but check the source files in linux/drivers/block/paride for more |
| 220 | information. (Hopefully someone will write some man pages one day !). | 233 | information. (Hopefully someone will write some man pages one day !). |
| 221 | 234 | ||
| 222 | As another example, here's what happens when PARPORT is installed, and | 235 | As another example, here's what happens when PARPORT is installed, and |
| 223 | a SyQuest EZ-135 is attached to port 0x378: | 236 | a SyQuest EZ-135 is attached to port 0x378:: |
| 224 | 237 | ||
| 225 | # insmod paride | 238 | # insmod paride |
| 226 | paride: version 1.0 installed | 239 | paride: version 1.0 installed |
| @@ -237,46 +250,47 @@ Note that the last line is the output from the generic partition table | |||
| 237 | scanner - in this case it reports that it has found a disk with one partition. | 250 | scanner - in this case it reports that it has found a disk with one partition. |
| 238 | 251 | ||
| 239 | 2.3 Using a PARIDE device | 252 | 2.3 Using a PARIDE device |
| 253 | -------------------------- | ||
| 240 | 254 | ||
| 241 | Once the drivers have been loaded, you can access PARIDE devices in the | 255 | Once the drivers have been loaded, you can access PARIDE devices in the |
| 242 | same way as their traditional counterparts. You will probably need to | 256 | same way as their traditional counterparts. You will probably need to |
| 243 | create the device "special files". Here is a simple script that you can | 257 | create the device "special files". Here is a simple script that you can |
| 244 | cut to a file and execute: | 258 | cut to a file and execute:: |
| 245 | 259 | ||
| 246 | #!/bin/bash | 260 | #!/bin/bash |
| 247 | # | 261 | # |
| 248 | # mkd -- a script to create the device special files for the PARIDE subsystem | 262 | # mkd -- a script to create the device special files for the PARIDE subsystem |
| 249 | # | 263 | # |
| 250 | function mkdev { | 264 | function mkdev { |
| 251 | mknod $1 $2 $3 $4 ; chmod 0660 $1 ; chown root:disk $1 | 265 | mknod $1 $2 $3 $4 ; chmod 0660 $1 ; chown root:disk $1 |
| 252 | } | 266 | } |
| 253 | # | 267 | # |
| 254 | function pd { | 268 | function pd { |
| 255 | D=$( printf \\$( printf "x%03x" $[ $1 + 97 ] ) ) | 269 | D=$( printf \\$( printf "x%03x" $[ $1 + 97 ] ) ) |
| 256 | mkdev pd$D b 45 $[ $1 * 16 ] | 270 | mkdev pd$D b 45 $[ $1 * 16 ] |
| 257 | for P in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 271 | for P in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
| 258 | do mkdev pd$D$P b 45 $[ $1 * 16 + $P ] | 272 | do mkdev pd$D$P b 45 $[ $1 * 16 + $P ] |
| 259 | done | 273 | done |
| 260 | } | 274 | } |
| 261 | # | 275 | # |
| 262 | cd /dev | 276 | cd /dev |
| 263 | # | 277 | # |
| 264 | for u in 0 1 2 3 ; do pd $u ; done | 278 | for u in 0 1 2 3 ; do pd $u ; done |
| 265 | for u in 0 1 2 3 ; do mkdev pcd$u b 46 $u ; done | 279 | for u in 0 1 2 3 ; do mkdev pcd$u b 46 $u ; done |
| 266 | for u in 0 1 2 3 ; do mkdev pf$u b 47 $u ; done | 280 | for u in 0 1 2 3 ; do mkdev pf$u b 47 $u ; done |
| 267 | for u in 0 1 2 3 ; do mkdev pt$u c 96 $u ; done | 281 | for u in 0 1 2 3 ; do mkdev pt$u c 96 $u ; done |
| 268 | for u in 0 1 2 3 ; do mkdev npt$u c 96 $[ $u + 128 ] ; done | 282 | for u in 0 1 2 3 ; do mkdev npt$u c 96 $[ $u + 128 ] ; done |
| 269 | for u in 0 1 2 3 ; do mkdev pg$u c 97 $u ; done | 283 | for u in 0 1 2 3 ; do mkdev pg$u c 97 $u ; done |
| 270 | # | 284 | # |
| 271 | # end of mkd | 285 | # end of mkd |
| 272 | 286 | ||
| 273 | With the device files and drivers in place, you can access PARIDE devices | 287 | With the device files and drivers in place, you can access PARIDE devices |
| 274 | like any other Linux device. For example, to mount a CD-ROM in pcd0, use: | 288 | like any other Linux device. For example, to mount a CD-ROM in pcd0, use:: |
| 275 | 289 | ||
| 276 | mount /dev/pcd0 /cdrom | 290 | mount /dev/pcd0 /cdrom |
| 277 | 291 | ||
| 278 | If you have a fresh Avatar Shark cartridge, and the drive is pda, you | 292 | If you have a fresh Avatar Shark cartridge, and the drive is pda, you |
| 279 | might do something like: | 293 | might do something like:: |
| 280 | 294 | ||
| 281 | fdisk /dev/pda -- make a new partition table with | 295 | fdisk /dev/pda -- make a new partition table with |
| 282 | partition 1 of type 83 | 296 | partition 1 of type 83 |
| @@ -289,41 +303,46 @@ might do something like: | |||
| 289 | 303 | ||
| 290 | Devices like the Imation superdisk work in the same way, except that | 304 | Devices like the Imation superdisk work in the same way, except that |
| 291 | they do not have a partition table. For example to make a 120MB | 305 | they do not have a partition table. For example to make a 120MB |
| 292 | floppy that you could share with a DOS system: | 306 | floppy that you could share with a DOS system:: |
| 293 | 307 | ||
| 294 | mkdosfs /dev/pf0 | 308 | mkdosfs /dev/pf0 |
| 295 | mount /dev/pf0 /mnt | 309 | mount /dev/pf0 /mnt |
| 296 | 310 | ||
| 297 | 311 | ||
| 298 | 2.4 The pf driver | 312 | 2.4 The pf driver |
| 313 | ------------------ | ||
| 299 | 314 | ||
| 300 | The pf driver is intended for use with parallel port ATAPI disk | 315 | The pf driver is intended for use with parallel port ATAPI disk |
| 301 | devices. The most common devices in this category are PD drives | 316 | devices. The most common devices in this category are PD drives |
| 302 | and LS-120 drives. Traditionally, media for these devices are not | 317 | and LS-120 drives. Traditionally, media for these devices are not |
| 303 | partitioned. Consequently, the pf driver does not support partitioned | 318 | partitioned. Consequently, the pf driver does not support partitioned |
| 304 | media. This may be changed in a future version of the driver. | 319 | media. This may be changed in a future version of the driver. |
| 305 | 320 | ||
| 306 | 2.5 Using the pt driver | 321 | 2.5 Using the pt driver |
| 322 | ------------------------ | ||
| 307 | 323 | ||
| 308 | The pt driver for parallel port ATAPI tape drives is a minimal driver. | 324 | The pt driver for parallel port ATAPI tape drives is a minimal driver. |
| 309 | It does not yet support many of the standard tape ioctl operations. | 325 | It does not yet support many of the standard tape ioctl operations. |
| 310 | For best performance, a block size of 32KB should be used. You will | 326 | For best performance, a block size of 32KB should be used. You will |
| 311 | probably want to set the parallel port delay to 0, if you can. | 327 | probably want to set the parallel port delay to 0, if you can. |
| 312 | 328 | ||
| 313 | 2.6 Using the pg driver | 329 | 2.6 Using the pg driver |
| 330 | ------------------------ | ||
| 314 | 331 | ||
| 315 | The pg driver can be used in conjunction with the cdrecord program | 332 | The pg driver can be used in conjunction with the cdrecord program |
| 316 | to create CD-ROMs. Please get cdrecord version 1.6.1 or later | 333 | to create CD-ROMs. Please get cdrecord version 1.6.1 or later |
| 317 | from ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ . To record CD-R media | 334 | from ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ . To record CD-R media |
| 318 | your parallel port should ideally be set to EPP mode, and the "port delay" | 335 | your parallel port should ideally be set to EPP mode, and the "port delay" |
| 319 | should be set to 0. With those settings it is possible to record at 2x | 336 | should be set to 0. With those settings it is possible to record at 2x |
| 320 | speed without any buffer underruns. If you cannot get the driver to work | 337 | speed without any buffer underruns. If you cannot get the driver to work |
| 321 | in EPP mode, try to use "bidirectional" or "PS/2" mode and 1x speeds only. | 338 | in EPP mode, try to use "bidirectional" or "PS/2" mode and 1x speeds only. |
| 322 | 339 | ||
| 323 | 340 | ||
| 324 | 3. Troubleshooting | 341 | 3. Troubleshooting |
| 342 | ================== | ||
| 325 | 343 | ||
| 326 | 3.1 Use EPP mode if you can | 344 | 3.1 Use EPP mode if you can |
| 345 | ---------------------------- | ||
| 327 | 346 | ||
| 328 | The most common problems that people report with the PARIDE drivers | 347 | The most common problems that people report with the PARIDE drivers |
| 329 | concern the parallel port CMOS settings. At this time, none of the | 348 | concern the parallel port CMOS settings. At this time, none of the |
| @@ -332,6 +351,7 @@ If you are able to do so, please set your parallel port into EPP mode | |||
| 332 | using your CMOS setup procedure. | 351 | using your CMOS setup procedure. |
| 333 | 352 | ||
| 334 | 3.2 Check the port delay | 353 | 3.2 Check the port delay |
| 354 | ------------------------- | ||
| 335 | 355 | ||
| 336 | Some parallel ports cannot reliably transfer data at full speed. To | 356 | Some parallel ports cannot reliably transfer data at full speed. To |
| 337 | offset the errors, the PARIDE protocol modules introduce a "port | 357 | offset the errors, the PARIDE protocol modules introduce a "port |
| @@ -347,23 +367,25 @@ read the comments at the beginning of the driver source files in | |||
| 347 | linux/drivers/block/paride. | 367 | linux/drivers/block/paride. |
| 348 | 368 | ||
| 349 | 3.3 Some drives need a printer reset | 369 | 3.3 Some drives need a printer reset |
| 370 | ------------------------------------- | ||
| 350 | 371 | ||
| 351 | There appear to be a number of "noname" external drives on the market | 372 | There appear to be a number of "noname" external drives on the market |
| 352 | that do not always power up correctly. We have noticed this with some | 373 | that do not always power up correctly. We have noticed this with some |
| 353 | drives based on OnSpec and older Freecom adapters. In these rare cases, | 374 | drives based on OnSpec and older Freecom adapters. In these rare cases, |
| 354 | the adapter can often be reinitialised by issuing a "printer reset" on | 375 | the adapter can often be reinitialised by issuing a "printer reset" on |
| 355 | the parallel port. As the reset operation is potentially disruptive in | 376 | the parallel port. As the reset operation is potentially disruptive in |
| 356 | multiple device environments, the PARIDE drivers will not do it | 377 | multiple device environments, the PARIDE drivers will not do it |
| 357 | automatically. You can however, force a printer reset by doing: | 378 | automatically. You can however, force a printer reset by doing:: |
| 358 | 379 | ||
| 359 | insmod lp reset=1 | 380 | insmod lp reset=1 |
| 360 | rmmod lp | 381 | rmmod lp |
| 361 | 382 | ||
| 362 | If you have one of these marginal cases, you should probably build | 383 | If you have one of these marginal cases, you should probably build |
| 363 | your paride drivers as modules, and arrange to do the printer reset | 384 | your paride drivers as modules, and arrange to do the printer reset |
| 364 | before loading the PARIDE drivers. | 385 | before loading the PARIDE drivers. |
| 365 | 386 | ||
| 366 | 3.4 Use the verbose option and dmesg if you need help | 387 | 3.4 Use the verbose option and dmesg if you need help |
| 388 | ------------------------------------------------------ | ||
| 367 | 389 | ||
| 368 | While a lot of testing has gone into these drivers to make them work | 390 | While a lot of testing has gone into these drivers to make them work |
| 369 | as smoothly as possible, problems will arise. If you do have problems, | 391 | as smoothly as possible, problems will arise. If you do have problems, |
| @@ -373,7 +395,7 @@ clues, then please make sure that only one drive is hooked to your system, | |||
| 373 | and that either (a) PARPORT is enabled or (b) no other device driver | 395 | and that either (a) PARPORT is enabled or (b) no other device driver |
| 374 | is using your parallel port (check in /proc/ioports). Then, load the | 396 | is using your parallel port (check in /proc/ioports). Then, load the |
| 375 | appropriate drivers (you can load several protocol modules if you want) | 397 | appropriate drivers (you can load several protocol modules if you want) |
| 376 | as in: | 398 | as in:: |
| 377 | 399 | ||
| 378 | # insmod paride | 400 | # insmod paride |
| 379 | # insmod epat | 401 | # insmod epat |
| @@ -394,12 +416,14 @@ by e-mail to grant@torque.net, or join the linux-parport mailing list | |||
| 394 | and post your report there. | 416 | and post your report there. |
| 395 | 417 | ||
| 396 | 3.5 For more information or help | 418 | 3.5 For more information or help |
| 419 | --------------------------------- | ||
| 397 | 420 | ||
| 398 | You can join the linux-parport mailing list by sending a mail message | 421 | You can join the linux-parport mailing list by sending a mail message |
| 399 | to | 422 | to: |
| 423 | |||
| 400 | linux-parport-request@torque.net | 424 | linux-parport-request@torque.net |
| 401 | 425 | ||
| 402 | with the single word | 426 | with the single word:: |
| 403 | 427 | ||
| 404 | subscribe | 428 | subscribe |
| 405 | 429 | ||
| @@ -412,6 +436,4 @@ have in your mail headers, when sending mail to the list server. | |||
| 412 | You might also find some useful information on the linux-parport | 436 | You might also find some useful information on the linux-parport |
| 413 | web pages (although they are not always up to date) at | 437 | web pages (although they are not always up to date) at |
| 414 | 438 | ||
| 415 | http://web.archive.org/web/*/http://www.torque.net/parport/ | 439 | http://web.archive.org/web/%2E/http://www.torque.net/parport/ |
| 416 | |||
| 417 | |||
diff --git a/Documentation/blockdev/ramdisk.txt b/Documentation/admin-guide/blockdev/ramdisk.rst index 501e12e0323e..b7c2268f8dec 100644 --- a/Documentation/blockdev/ramdisk.txt +++ b/Documentation/admin-guide/blockdev/ramdisk.rst | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | ========================================== | ||
| 1 | Using the RAM disk block device with Linux | 2 | Using the RAM disk block device with Linux |
| 2 | ------------------------------------------ | 3 | ========================================== |
| 3 | 4 | ||
| 4 | Contents: | 5 | .. Contents: |
| 5 | 6 | ||
| 6 | 1) Overview | 7 | 1) Overview |
| 7 | 2) Kernel Command Line Parameters | 8 | 2) Kernel Command Line Parameters |
| @@ -42,7 +43,7 @@ rescue floppy disk. | |||
| 42 | 2a) Kernel Command Line Parameters | 43 | 2a) Kernel Command Line Parameters |
| 43 | 44 | ||
| 44 | ramdisk_size=N | 45 | ramdisk_size=N |
| 45 | ============== | 46 | Size of the ramdisk. |
| 46 | 47 | ||
| 47 | This parameter tells the RAM disk driver to set up RAM disks of N k size. The | 48 | This parameter tells the RAM disk driver to set up RAM disks of N k size. The |
| 48 | default is 4096 (4 MB). | 49 | default is 4096 (4 MB). |
| @@ -50,16 +51,13 @@ default is 4096 (4 MB). | |||
| 50 | 2b) Module parameters | 51 | 2b) Module parameters |
| 51 | 52 | ||
| 52 | rd_nr | 53 | rd_nr |
| 53 | ===== | 54 | /dev/ramX devices created. |
| 54 | /dev/ramX devices created. | ||
| 55 | 55 | ||
| 56 | max_part | 56 | max_part |
| 57 | ======== | 57 | Maximum partition number. |
| 58 | Maximum partition number. | ||
| 59 | 58 | ||
| 60 | rd_size | 59 | rd_size |
| 61 | ======= | 60 | See ramdisk_size. |
| 62 | See ramdisk_size. | ||
| 63 | 61 | ||
| 64 | 3) Using "rdev -r" | 62 | 3) Using "rdev -r" |
| 65 | ------------------ | 63 | ------------------ |
| @@ -71,11 +69,11 @@ to 2 MB (2^11) of where to find the RAM disk (this used to be the size). Bit | |||
| 71 | prompt/wait sequence is to be given before trying to read the RAM disk. Since | 69 | prompt/wait sequence is to be given before trying to read the RAM disk. Since |
| 72 | the RAM disk dynamically grows as data is being written into it, a size field | 70 | the RAM disk dynamically grows as data is being written into it, a size field |
| 73 | is not required. Bits 11 to 13 are not currently used and may as well be zero. | 71 | is not required. Bits 11 to 13 are not currently used and may as well be zero. |
| 74 | These numbers are no magical secrets, as seen below: | 72 | These numbers are no magical secrets, as seen below:: |
| 75 | 73 | ||
| 76 | ./arch/x86/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK 0x07FF | 74 | ./arch/x86/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK 0x07FF |
| 77 | ./arch/x86/kernel/setup.c:#define RAMDISK_PROMPT_FLAG 0x8000 | 75 | ./arch/x86/kernel/setup.c:#define RAMDISK_PROMPT_FLAG 0x8000 |
| 78 | ./arch/x86/kernel/setup.c:#define RAMDISK_LOAD_FLAG 0x4000 | 76 | ./arch/x86/kernel/setup.c:#define RAMDISK_LOAD_FLAG 0x4000 |
| 79 | 77 | ||
| 80 | Consider a typical two floppy disk setup, where you will have the | 78 | Consider a typical two floppy disk setup, where you will have the |
| 81 | kernel on disk one, and have already put a RAM disk image onto disk #2. | 79 | kernel on disk one, and have already put a RAM disk image onto disk #2. |
| @@ -92,20 +90,23 @@ sequence so that you have a chance to switch floppy disks. | |||
| 92 | The command line equivalent is: "prompt_ramdisk=1" | 90 | The command line equivalent is: "prompt_ramdisk=1" |
| 93 | 91 | ||
| 94 | Putting that together gives 2^15 + 2^14 + 0 = 49152 for an rdev word. | 92 | Putting that together gives 2^15 + 2^14 + 0 = 49152 for an rdev word. |
| 95 | So to create disk one of the set, you would do: | 93 | So to create disk one of the set, you would do:: |
| 96 | 94 | ||
| 97 | /usr/src/linux# cat arch/x86/boot/zImage > /dev/fd0 | 95 | /usr/src/linux# cat arch/x86/boot/zImage > /dev/fd0 |
| 98 | /usr/src/linux# rdev /dev/fd0 /dev/fd0 | 96 | /usr/src/linux# rdev /dev/fd0 /dev/fd0 |
| 99 | /usr/src/linux# rdev -r /dev/fd0 49152 | 97 | /usr/src/linux# rdev -r /dev/fd0 49152 |
| 100 | 98 | ||
| 101 | If you make a boot disk that has LILO, then for the above, you would use: | 99 | If you make a boot disk that has LILO, then for the above, you would use:: |
| 100 | |||
| 102 | append = "ramdisk_start=0 load_ramdisk=1 prompt_ramdisk=1" | 101 | append = "ramdisk_start=0 load_ramdisk=1 prompt_ramdisk=1" |
| 103 | Since the default start = 0 and the default prompt = 1, you could use: | 102 | |
| 103 | Since the default start = 0 and the default prompt = 1, you could use:: | ||
| 104 | |||
| 104 | append = "load_ramdisk=1" | 105 | append = "load_ramdisk=1" |
| 105 | 106 | ||
| 106 | 107 | ||
| 107 | 4) An Example of Creating a Compressed RAM Disk | 108 | 4) An Example of Creating a Compressed RAM Disk |
| 108 | ---------------------------------------------- | 109 | ----------------------------------------------- |
| 109 | 110 | ||
| 110 | To create a RAM disk image, you will need a spare block device to | 111 | To create a RAM disk image, you will need a spare block device to |
| 111 | construct it on. This can be the RAM disk device itself, or an | 112 | construct it on. This can be the RAM disk device itself, or an |
| @@ -120,11 +121,11 @@ a) Decide on the RAM disk size that you want. Say 2 MB for this example. | |||
| 120 | Create it by writing to the RAM disk device. (This step is not currently | 121 | Create it by writing to the RAM disk device. (This step is not currently |
| 121 | required, but may be in the future.) It is wise to zero out the | 122 | required, but may be in the future.) It is wise to zero out the |
| 122 | area (esp. for disks) so that maximal compression is achieved for | 123 | area (esp. for disks) so that maximal compression is achieved for |
| 123 | the unused blocks of the image that you are about to create. | 124 | the unused blocks of the image that you are about to create:: |
| 124 | 125 | ||
| 125 | dd if=/dev/zero of=/dev/ram0 bs=1k count=2048 | 126 | dd if=/dev/zero of=/dev/ram0 bs=1k count=2048 |
| 126 | 127 | ||
| 127 | b) Make a filesystem on it. Say ext2fs for this example. | 128 | b) Make a filesystem on it. Say ext2fs for this example:: |
| 128 | 129 | ||
| 129 | mke2fs -vm0 /dev/ram0 2048 | 130 | mke2fs -vm0 /dev/ram0 2048 |
| 130 | 131 | ||
| @@ -133,11 +134,11 @@ c) Mount it, copy the files you want to it (eg: /etc/* /dev/* ...) | |||
| 133 | 134 | ||
| 134 | d) Compress the contents of the RAM disk. The level of compression | 135 | d) Compress the contents of the RAM disk. The level of compression |
| 135 | will be approximately 50% of the space used by the files. Unused | 136 | will be approximately 50% of the space used by the files. Unused |
| 136 | space on the RAM disk will compress to almost nothing. | 137 | space on the RAM disk will compress to almost nothing:: |
| 137 | 138 | ||
| 138 | dd if=/dev/ram0 bs=1k count=2048 | gzip -v9 > /tmp/ram_image.gz | 139 | dd if=/dev/ram0 bs=1k count=2048 | gzip -v9 > /tmp/ram_image.gz |
| 139 | 140 | ||
| 140 | e) Put the kernel onto the floppy | 141 | e) Put the kernel onto the floppy:: |
| 141 | 142 | ||
| 142 | dd if=zImage of=/dev/fd0 bs=1k | 143 | dd if=zImage of=/dev/fd0 bs=1k |
| 143 | 144 | ||
| @@ -146,13 +147,13 @@ f) Put the RAM disk image onto the floppy, after the kernel. Use an offset | |||
| 146 | (possibly larger) kernel onto the same floppy later without overlapping | 147 | (possibly larger) kernel onto the same floppy later without overlapping |
| 147 | the RAM disk image. An offset of 400 kB for kernels about 350 kB in | 148 | the RAM disk image. An offset of 400 kB for kernels about 350 kB in |
| 148 | size would be reasonable. Make sure offset+size of ram_image.gz is | 149 | size would be reasonable. Make sure offset+size of ram_image.gz is |
| 149 | not larger than the total space on your floppy (usually 1440 kB). | 150 | not larger than the total space on your floppy (usually 1440 kB):: |
| 150 | 151 | ||
| 151 | dd if=/tmp/ram_image.gz of=/dev/fd0 bs=1k seek=400 | 152 | dd if=/tmp/ram_image.gz of=/dev/fd0 bs=1k seek=400 |
| 152 | 153 | ||
| 153 | g) Use "rdev" to set the boot device, RAM disk offset, prompt flag, etc. | 154 | g) Use "rdev" to set the boot device, RAM disk offset, prompt flag, etc. |
| 154 | For prompt_ramdisk=1, load_ramdisk=1, ramdisk_start=400, one would | 155 | For prompt_ramdisk=1, load_ramdisk=1, ramdisk_start=400, one would |
| 155 | have 2^15 + 2^14 + 400 = 49552. | 156 | have 2^15 + 2^14 + 400 = 49552:: |
| 156 | 157 | ||
| 157 | rdev /dev/fd0 /dev/fd0 | 158 | rdev /dev/fd0 /dev/fd0 |
| 158 | rdev -r /dev/fd0 49552 | 159 | rdev -r /dev/fd0 49552 |
| @@ -160,15 +161,17 @@ g) Use "rdev" to set the boot device, RAM disk offset, prompt flag, etc. | |||
| 160 | That is it. You now have your boot/root compressed RAM disk floppy. Some | 161 | That is it. You now have your boot/root compressed RAM disk floppy. Some |
| 161 | users may wish to combine steps (d) and (f) by using a pipe. | 162 | users may wish to combine steps (d) and (f) by using a pipe. |
| 162 | 163 | ||
| 163 | -------------------------------------------------------------------------- | 164 | |
| 164 | Paul Gortmaker 12/95 | 165 | Paul Gortmaker 12/95 |
| 165 | 166 | ||
| 166 | Changelog: | 167 | Changelog: |
| 167 | ---------- | 168 | ---------- |
| 168 | 169 | ||
| 169 | 10-22-04 : Updated to reflect changes in command line options, remove | 170 | 10-22-04 : |
| 171 | Updated to reflect changes in command line options, remove | ||
| 170 | obsolete references, general cleanup. | 172 | obsolete references, general cleanup. |
| 171 | James Nelson (james4765@gmail.com) | 173 | James Nelson (james4765@gmail.com) |
| 172 | 174 | ||
| 173 | 175 | ||
| 174 | 12-95 : Original Document | 176 | 12-95 : |
| 177 | Original Document | ||
diff --git a/Documentation/blockdev/zram.txt b/Documentation/admin-guide/blockdev/zram.rst index 4df0ce271085..6eccf13219ff 100644 --- a/Documentation/blockdev/zram.txt +++ b/Documentation/admin-guide/blockdev/zram.rst | |||
| @@ -1,7 +1,9 @@ | |||
| 1 | ======================================== | ||
| 1 | zram: Compressed RAM based block devices | 2 | zram: Compressed RAM based block devices |
| 2 | ---------------------------------------- | 3 | ======================================== |
| 3 | 4 | ||
| 4 | * Introduction | 5 | Introduction |
| 6 | ============ | ||
| 5 | 7 | ||
| 6 | The zram module creates RAM based block devices named /dev/zram<id> | 8 | The zram module creates RAM based block devices named /dev/zram<id> |
| 7 | (<id> = 0, 1, ...). Pages written to these disks are compressed and stored | 9 | (<id> = 0, 1, ...). Pages written to these disks are compressed and stored |
| @@ -12,9 +14,11 @@ use as swap disks, various caches under /var and maybe many more :) | |||
| 12 | Statistics for individual zram devices are exported through sysfs nodes at | 14 | Statistics for individual zram devices are exported through sysfs nodes at |
| 13 | /sys/block/zram<id>/ | 15 | /sys/block/zram<id>/ |
| 14 | 16 | ||
| 15 | * Usage | 17 | Usage |
| 18 | ===== | ||
| 16 | 19 | ||
| 17 | There are several ways to configure and manage zram device(-s): | 20 | There are several ways to configure and manage zram device(-s): |
| 21 | |||
| 18 | a) using zram and zram_control sysfs attributes | 22 | a) using zram and zram_control sysfs attributes |
| 19 | b) using zramctl utility, provided by util-linux (util-linux@vger.kernel.org). | 23 | b) using zramctl utility, provided by util-linux (util-linux@vger.kernel.org). |
| 20 | 24 | ||
| @@ -22,7 +26,7 @@ In this document we will describe only 'manual' zram configuration steps, | |||
| 22 | IOW, zram and zram_control sysfs attributes. | 26 | IOW, zram and zram_control sysfs attributes. |
| 23 | 27 | ||
| 24 | In order to get a better idea about zramctl please consult util-linux | 28 | In order to get a better idea about zramctl please consult util-linux |
| 25 | documentation, zramctl man-page or `zramctl --help'. Please be informed | 29 | documentation, zramctl man-page or `zramctl --help`. Please be informed |
| 26 | that zram maintainers do not develop/maintain util-linux or zramctl, should | 30 | that zram maintainers do not develop/maintain util-linux or zramctl, should |
| 27 | you have any questions please contact util-linux@vger.kernel.org | 31 | you have any questions please contact util-linux@vger.kernel.org |
| 28 | 32 | ||
| @@ -30,19 +34,23 @@ Following shows a typical sequence of steps for using zram. | |||
| 30 | 34 | ||
| 31 | WARNING | 35 | WARNING |
| 32 | ======= | 36 | ======= |
| 37 | |||
| 33 | For the sake of simplicity we skip error checking parts in most of the | 38 | For the sake of simplicity we skip error checking parts in most of the |
| 34 | examples below. However, it is your sole responsibility to handle errors. | 39 | examples below. However, it is your sole responsibility to handle errors. |
| 35 | 40 | ||
| 36 | zram sysfs attributes always return negative values in case of errors. | 41 | zram sysfs attributes always return negative values in case of errors. |
| 37 | The list of possible return codes: | 42 | The list of possible return codes: |
| 38 | -EBUSY -- an attempt to modify an attribute that cannot be changed once | 43 | |
| 39 | the device has been initialised. Please reset device first; | 44 | ======== ============================================================= |
| 40 | -ENOMEM -- zram was not able to allocate enough memory to fulfil your | 45 | -EBUSY an attempt to modify an attribute that cannot be changed once |
| 41 | needs; | 46 | the device has been initialised. Please reset device first; |
| 42 | -EINVAL -- invalid input has been provided. | 47 | -ENOMEM zram was not able to allocate enough memory to fulfil your |
| 48 | needs; | ||
| 49 | -EINVAL invalid input has been provided. | ||
| 50 | ======== ============================================================= | ||
| 43 | 51 | ||
| 44 | If you use 'echo', the returned value that is changed by 'echo' utility, | 52 | If you use 'echo', the returned value that is changed by 'echo' utility, |
| 45 | and, in general case, something like: | 53 | and, in general case, something like:: |
| 46 | 54 | ||
| 47 | echo 3 > /sys/block/zram0/max_comp_streams | 55 | echo 3 > /sys/block/zram0/max_comp_streams |
| 48 | if [ $? -ne 0 ]; | 56 | if [ $? -ne 0 ]; |
| @@ -51,7 +59,11 @@ and, in general case, something like: | |||
| 51 | 59 | ||
| 52 | should suffice. | 60 | should suffice. |
| 53 | 61 | ||
| 54 | 1) Load Module: | 62 | 1) Load Module |
| 63 | ============== | ||
| 64 | |||
| 65 | :: | ||
| 66 | |||
| 55 | modprobe zram num_devices=4 | 67 | modprobe zram num_devices=4 |
| 56 | This creates 4 devices: /dev/zram{0,1,2,3} | 68 | This creates 4 devices: /dev/zram{0,1,2,3} |
| 57 | 69 | ||
| @@ -59,6 +71,8 @@ num_devices parameter is optional and tells zram how many devices should be | |||
| 59 | pre-created. Default: 1. | 71 | pre-created. Default: 1. |
| 60 | 72 | ||
| 61 | 2) Set max number of compression streams | 73 | 2) Set max number of compression streams |
| 74 | ======================================== | ||
| 75 | |||
| 62 | Regardless the value passed to this attribute, ZRAM will always | 76 | Regardless the value passed to this attribute, ZRAM will always |
| 63 | allocate multiple compression streams - one per online CPUs - thus | 77 | allocate multiple compression streams - one per online CPUs - thus |
| 64 | allowing several concurrent compression operations. The number of | 78 | allowing several concurrent compression operations. The number of |
| @@ -66,16 +80,20 @@ allocated compression streams goes down when some of the CPUs | |||
| 66 | become offline. There is no single-compression-stream mode anymore, | 80 | become offline. There is no single-compression-stream mode anymore, |
| 67 | unless you are running a UP system or has only 1 CPU online. | 81 | unless you are running a UP system or has only 1 CPU online. |
| 68 | 82 | ||
| 69 | To find out how many streams are currently available: | 83 | To find out how many streams are currently available:: |
| 84 | |||
| 70 | cat /sys/block/zram0/max_comp_streams | 85 | cat /sys/block/zram0/max_comp_streams |
| 71 | 86 | ||
| 72 | 3) Select compression algorithm | 87 | 3) Select compression algorithm |
| 88 | =============================== | ||
| 89 | |||
| 73 | Using comp_algorithm device attribute one can see available and | 90 | Using comp_algorithm device attribute one can see available and |
| 74 | currently selected (shown in square brackets) compression algorithms, | 91 | currently selected (shown in square brackets) compression algorithms, |
| 75 | change selected compression algorithm (once the device is initialised | 92 | change selected compression algorithm (once the device is initialised |
| 76 | there is no way to change compression algorithm). | 93 | there is no way to change compression algorithm). |
| 77 | 94 | ||
| 78 | Examples: | 95 | Examples:: |
| 96 | |||
| 79 | #show supported compression algorithms | 97 | #show supported compression algorithms |
| 80 | cat /sys/block/zram0/comp_algorithm | 98 | cat /sys/block/zram0/comp_algorithm |
| 81 | lzo [lz4] | 99 | lzo [lz4] |
| @@ -83,20 +101,23 @@ Examples: | |||
| 83 | #select lzo compression algorithm | 101 | #select lzo compression algorithm |
| 84 | echo lzo > /sys/block/zram0/comp_algorithm | 102 | echo lzo > /sys/block/zram0/comp_algorithm |
| 85 | 103 | ||
| 86 | For the time being, the `comp_algorithm' content does not necessarily | 104 | For the time being, the `comp_algorithm` content does not necessarily |
| 87 | show every compression algorithm supported by the kernel. We keep this | 105 | show every compression algorithm supported by the kernel. We keep this |
| 88 | list primarily to simplify device configuration and one can configure | 106 | list primarily to simplify device configuration and one can configure |
| 89 | a new device with a compression algorithm that is not listed in | 107 | a new device with a compression algorithm that is not listed in |
| 90 | `comp_algorithm'. The thing is that, internally, ZRAM uses Crypto API | 108 | `comp_algorithm`. The thing is that, internally, ZRAM uses Crypto API |
| 91 | and, if some of the algorithms were built as modules, it's impossible | 109 | and, if some of the algorithms were built as modules, it's impossible |
| 92 | to list all of them using, for instance, /proc/crypto or any other | 110 | to list all of them using, for instance, /proc/crypto or any other |
| 93 | method. This, however, has an advantage of permitting the usage of | 111 | method. This, however, has an advantage of permitting the usage of |
| 94 | custom crypto compression modules (implementing S/W or H/W compression). | 112 | custom crypto compression modules (implementing S/W or H/W compression). |
| 95 | 113 | ||
| 96 | 4) Set Disksize | 114 | 4) Set Disksize |
| 115 | =============== | ||
| 116 | |||
| 97 | Set disk size by writing the value to sysfs node 'disksize'. | 117 | Set disk size by writing the value to sysfs node 'disksize'. |
| 98 | The value can be either in bytes or you can use mem suffixes. | 118 | The value can be either in bytes or you can use mem suffixes. |
| 99 | Examples: | 119 | Examples:: |
| 120 | |||
| 100 | # Initialize /dev/zram0 with 50MB disksize | 121 | # Initialize /dev/zram0 with 50MB disksize |
| 101 | echo $((50*1024*1024)) > /sys/block/zram0/disksize | 122 | echo $((50*1024*1024)) > /sys/block/zram0/disksize |
| 102 | 123 | ||
| @@ -111,10 +132,13 @@ since we expect a 2:1 compression ratio. Note that zram uses about 0.1% of the | |||
| 111 | size of the disk when not in use so a huge zram is wasteful. | 132 | size of the disk when not in use so a huge zram is wasteful. |
| 112 | 133 | ||
| 113 | 5) Set memory limit: Optional | 134 | 5) Set memory limit: Optional |
| 135 | ============================= | ||
| 136 | |||
| 114 | Set memory limit by writing the value to sysfs node 'mem_limit'. | 137 | Set memory limit by writing the value to sysfs node 'mem_limit'. |
| 115 | The value can be either in bytes or you can use mem suffixes. | 138 | The value can be either in bytes or you can use mem suffixes. |
| 116 | In addition, you could change the value in runtime. | 139 | In addition, you could change the value in runtime. |
| 117 | Examples: | 140 | Examples:: |
| 141 | |||
| 118 | # limit /dev/zram0 with 50MB memory | 142 | # limit /dev/zram0 with 50MB memory |
| 119 | echo $((50*1024*1024)) > /sys/block/zram0/mem_limit | 143 | echo $((50*1024*1024)) > /sys/block/zram0/mem_limit |
| 120 | 144 | ||
| @@ -126,7 +150,11 @@ Examples: | |||
| 126 | # To disable memory limit | 150 | # To disable memory limit |
| 127 | echo 0 > /sys/block/zram0/mem_limit | 151 | echo 0 > /sys/block/zram0/mem_limit |
| 128 | 152 | ||
| 129 | 6) Activate: | 153 | 6) Activate |
| 154 | =========== | ||
| 155 | |||
| 156 | :: | ||
| 157 | |||
| 130 | mkswap /dev/zram0 | 158 | mkswap /dev/zram0 |
| 131 | swapon /dev/zram0 | 159 | swapon /dev/zram0 |
| 132 | 160 | ||
| @@ -134,6 +162,7 @@ Examples: | |||
| 134 | mount /dev/zram1 /tmp | 162 | mount /dev/zram1 /tmp |
| 135 | 163 | ||
| 136 | 7) Add/remove zram devices | 164 | 7) Add/remove zram devices |
| 165 | ========================== | ||
| 137 | 166 | ||
| 138 | zram provides a control interface, which enables dynamic (on-demand) device | 167 | zram provides a control interface, which enables dynamic (on-demand) device |
| 139 | addition and removal. | 168 | addition and removal. |
| @@ -142,44 +171,51 @@ In order to add a new /dev/zramX device, perform read operation on hot_add | |||
| 142 | attribute. This will return either new device's device id (meaning that you | 171 | attribute. This will return either new device's device id (meaning that you |
| 143 | can use /dev/zram<id>) or error code. | 172 | can use /dev/zram<id>) or error code. |
| 144 | 173 | ||
| 145 | Example: | 174 | Example:: |
| 175 | |||
| 146 | cat /sys/class/zram-control/hot_add | 176 | cat /sys/class/zram-control/hot_add |
| 147 | 1 | 177 | 1 |
| 148 | 178 | ||
| 149 | To remove the existing /dev/zramX device (where X is a device id) | 179 | To remove the existing /dev/zramX device (where X is a device id) |
| 150 | execute | 180 | execute:: |
| 181 | |||
| 151 | echo X > /sys/class/zram-control/hot_remove | 182 | echo X > /sys/class/zram-control/hot_remove |
| 152 | 183 | ||
| 153 | 8) Stats: | 184 | 8) Stats |
| 185 | ======== | ||
| 186 | |||
| 154 | Per-device statistics are exported as various nodes under /sys/block/zram<id>/ | 187 | Per-device statistics are exported as various nodes under /sys/block/zram<id>/ |
| 155 | 188 | ||
| 156 | A brief description of exported device attributes. For more details please | 189 | A brief description of exported device attributes. For more details please |
| 157 | read Documentation/ABI/testing/sysfs-block-zram. | 190 | read Documentation/ABI/testing/sysfs-block-zram. |
| 158 | 191 | ||
| 192 | ====================== ====== =============================================== | ||
| 159 | Name access description | 193 | Name access description |
| 160 | ---- ------ ----------- | 194 | ====================== ====== =============================================== |
| 161 | disksize RW show and set the device's disk size | 195 | disksize RW show and set the device's disk size |
| 162 | initstate RO shows the initialization state of the device | 196 | initstate RO shows the initialization state of the device |
| 163 | reset WO trigger device reset | 197 | reset WO trigger device reset |
| 164 | mem_used_max WO reset the `mem_used_max' counter (see later) | 198 | mem_used_max WO reset the `mem_used_max` counter (see later) |
| 165 | mem_limit WO specifies the maximum amount of memory ZRAM can use | 199 | mem_limit WO specifies the maximum amount of memory ZRAM can |
| 166 | to store the compressed data | 200 | use to store the compressed data |
| 167 | writeback_limit WO specifies the maximum amount of write IO zram can | 201 | writeback_limit WO specifies the maximum amount of write IO zram |
| 168 | write out to backing device as 4KB unit | 202 | can write out to backing device as 4KB unit |
| 169 | writeback_limit_enable RW show and set writeback_limit feature | 203 | writeback_limit_enable RW show and set writeback_limit feature |
| 170 | max_comp_streams RW the number of possible concurrent compress operations | 204 | max_comp_streams RW the number of possible concurrent compress |
| 205 | operations | ||
| 171 | comp_algorithm RW show and change the compression algorithm | 206 | comp_algorithm RW show and change the compression algorithm |
| 172 | compact WO trigger memory compaction | 207 | compact WO trigger memory compaction |
| 173 | debug_stat RO this file is used for zram debugging purposes | 208 | debug_stat RO this file is used for zram debugging purposes |
| 174 | backing_dev RW set up backend storage for zram to write out | 209 | backing_dev RW set up backend storage for zram to write out |
| 175 | idle WO mark allocated slot as idle | 210 | idle WO mark allocated slot as idle |
| 211 | ====================== ====== =============================================== | ||
| 176 | 212 | ||
| 177 | 213 | ||
| 178 | User space is advised to use the following files to read the device statistics. | 214 | User space is advised to use the following files to read the device statistics. |
| 179 | 215 | ||
| 180 | File /sys/block/zram<id>/stat | 216 | File /sys/block/zram<id>/stat |
| 181 | 217 | ||
| 182 | Represents block layer statistics. Read Documentation/block/stat.txt for | 218 | Represents block layer statistics. Read Documentation/block/stat.rst for |
| 183 | details. | 219 | details. |
| 184 | 220 | ||
| 185 | File /sys/block/zram<id>/io_stat | 221 | File /sys/block/zram<id>/io_stat |
| @@ -188,23 +224,31 @@ The stat file represents device's I/O statistics not accounted by block | |||
| 188 | layer and, thus, not available in zram<id>/stat file. It consists of a | 224 | layer and, thus, not available in zram<id>/stat file. It consists of a |
| 189 | single line of text and contains the following stats separated by | 225 | single line of text and contains the following stats separated by |
| 190 | whitespace: | 226 | whitespace: |
| 191 | failed_reads the number of failed reads | 227 | |
| 192 | failed_writes the number of failed writes | 228 | ============= ============================================================= |
| 193 | invalid_io the number of non-page-size-aligned I/O requests | 229 | failed_reads The number of failed reads |
| 230 | failed_writes The number of failed writes | ||
| 231 | invalid_io The number of non-page-size-aligned I/O requests | ||
| 194 | notify_free Depending on device usage scenario it may account | 232 | notify_free Depending on device usage scenario it may account |
| 233 | |||
| 195 | a) the number of pages freed because of swap slot free | 234 | a) the number of pages freed because of swap slot free |
| 196 | notifications or b) the number of pages freed because of | 235 | notifications |
| 197 | REQ_OP_DISCARD requests sent by bio. The former ones are | 236 | b) the number of pages freed because of |
| 198 | sent to a swap block device when a swap slot is freed, | 237 | REQ_OP_DISCARD requests sent by bio. The former ones are |
| 199 | which implies that this disk is being used as a swap disk. | 238 | sent to a swap block device when a swap slot is freed, |
| 239 | which implies that this disk is being used as a swap disk. | ||
| 240 | |||
| 200 | The latter ones are sent by filesystem mounted with | 241 | The latter ones are sent by filesystem mounted with |
| 201 | discard option, whenever some data blocks are getting | 242 | discard option, whenever some data blocks are getting |
| 202 | discarded. | 243 | discarded. |
| 244 | ============= ============================================================= | ||
| 203 | 245 | ||
| 204 | File /sys/block/zram<id>/mm_stat | 246 | File /sys/block/zram<id>/mm_stat |
| 205 | 247 | ||
| 206 | The stat file represents device's mm statistics. It consists of a single | 248 | The stat file represents device's mm statistics. It consists of a single |
| 207 | line of text and contains the following stats separated by whitespace: | 249 | line of text and contains the following stats separated by whitespace: |
| 250 | |||
| 251 | ================ ============================================================= | ||
| 208 | orig_data_size uncompressed size of data stored in this disk. | 252 | orig_data_size uncompressed size of data stored in this disk. |
| 209 | This excludes same-element-filled pages (same_pages) since | 253 | This excludes same-element-filled pages (same_pages) since |
| 210 | no memory is allocated for them. | 254 | no memory is allocated for them. |
| @@ -223,58 +267,71 @@ line of text and contains the following stats separated by whitespace: | |||
| 223 | No memory is allocated for such pages. | 267 | No memory is allocated for such pages. |
| 224 | pages_compacted the number of pages freed during compaction | 268 | pages_compacted the number of pages freed during compaction |
| 225 | huge_pages the number of incompressible pages | 269 | huge_pages the number of incompressible pages |
| 270 | ================ ============================================================= | ||
| 226 | 271 | ||
| 227 | File /sys/block/zram<id>/bd_stat | 272 | File /sys/block/zram<id>/bd_stat |
| 228 | 273 | ||
| 229 | The stat file represents device's backing device statistics. It consists of | 274 | The stat file represents device's backing device statistics. It consists of |
| 230 | a single line of text and contains the following stats separated by whitespace: | 275 | a single line of text and contains the following stats separated by whitespace: |
| 276 | |||
| 277 | ============== ============================================================= | ||
| 231 | bd_count size of data written in backing device. | 278 | bd_count size of data written in backing device. |
| 232 | Unit: 4K bytes | 279 | Unit: 4K bytes |
| 233 | bd_reads the number of reads from backing device | 280 | bd_reads the number of reads from backing device |
| 234 | Unit: 4K bytes | 281 | Unit: 4K bytes |
| 235 | bd_writes the number of writes to backing device | 282 | bd_writes the number of writes to backing device |
| 236 | Unit: 4K bytes | 283 | Unit: 4K bytes |
| 284 | ============== ============================================================= | ||
| 285 | |||
| 286 | 9) Deactivate | ||
| 287 | ============= | ||
| 288 | |||
| 289 | :: | ||
| 237 | 290 | ||
| 238 | 9) Deactivate: | ||
| 239 | swapoff /dev/zram0 | 291 | swapoff /dev/zram0 |
| 240 | umount /dev/zram1 | 292 | umount /dev/zram1 |
| 241 | 293 | ||
| 242 | 10) Reset: | 294 | 10) Reset |
| 243 | Write any positive value to 'reset' sysfs node | 295 | ========= |
| 244 | echo 1 > /sys/block/zram0/reset | 296 | |
| 245 | echo 1 > /sys/block/zram1/reset | 297 | Write any positive value to 'reset' sysfs node:: |
| 298 | |||
| 299 | echo 1 > /sys/block/zram0/reset | ||
| 300 | echo 1 > /sys/block/zram1/reset | ||
| 246 | 301 | ||
| 247 | This frees all the memory allocated for the given device and | 302 | This frees all the memory allocated for the given device and |
| 248 | resets the disksize to zero. You must set the disksize again | 303 | resets the disksize to zero. You must set the disksize again |
| 249 | before reusing the device. | 304 | before reusing the device. |
| 250 | 305 | ||
| 251 | * Optional Feature | 306 | Optional Feature |
| 307 | ================ | ||
| 252 | 308 | ||
| 253 | = writeback | 309 | writeback |
| 310 | --------- | ||
| 254 | 311 | ||
| 255 | With CONFIG_ZRAM_WRITEBACK, zram can write idle/incompressible page | 312 | With CONFIG_ZRAM_WRITEBACK, zram can write idle/incompressible page |
| 256 | to backing storage rather than keeping it in memory. | 313 | to backing storage rather than keeping it in memory. |
| 257 | To use the feature, admin should set up backing device via | 314 | To use the feature, admin should set up backing device via:: |
| 258 | 315 | ||
| 259 | "echo /dev/sda5 > /sys/block/zramX/backing_dev" | 316 | echo /dev/sda5 > /sys/block/zramX/backing_dev |
| 260 | 317 | ||
| 261 | before disksize setting. It supports only partition at this moment. | 318 | before disksize setting. It supports only partition at this moment. |
| 262 | If admin want to use incompressible page writeback, they could do via | 319 | If admin want to use incompressible page writeback, they could do via:: |
| 263 | 320 | ||
| 264 | "echo huge > /sys/block/zramX/write" | 321 | echo huge > /sys/block/zramX/write |
| 265 | 322 | ||
| 266 | To use idle page writeback, first, user need to declare zram pages | 323 | To use idle page writeback, first, user need to declare zram pages |
| 267 | as idle. | 324 | as idle:: |
| 268 | 325 | ||
| 269 | "echo all > /sys/block/zramX/idle" | 326 | echo all > /sys/block/zramX/idle |
| 270 | 327 | ||
| 271 | From now on, any pages on zram are idle pages. The idle mark | 328 | From now on, any pages on zram are idle pages. The idle mark |
| 272 | will be removed until someone request access of the block. | 329 | will be removed until someone request access of the block. |
| 273 | IOW, unless there is access request, those pages are still idle pages. | 330 | IOW, unless there is access request, those pages are still idle pages. |
| 274 | 331 | ||
| 275 | Admin can request writeback of those idle pages at right timing via | 332 | Admin can request writeback of those idle pages at right timing via:: |
| 276 | 333 | ||
| 277 | "echo idle > /sys/block/zramX/writeback" | 334 | echo idle > /sys/block/zramX/writeback |
| 278 | 335 | ||
| 279 | With the command, zram writeback idle pages from memory to the storage. | 336 | With the command, zram writeback idle pages from memory to the storage. |
| 280 | 337 | ||
| @@ -285,7 +342,7 @@ to guarantee storage health for entire product life. | |||
| 285 | To overcome the concern, zram supports "writeback_limit" feature. | 342 | To overcome the concern, zram supports "writeback_limit" feature. |
| 286 | The "writeback_limit_enable"'s default value is 0 so that it doesn't limit | 343 | The "writeback_limit_enable"'s default value is 0 so that it doesn't limit |
| 287 | any writeback. IOW, if admin want to apply writeback budget, he should | 344 | any writeback. IOW, if admin want to apply writeback budget, he should |
| 288 | enable writeback_limit_enable via | 345 | enable writeback_limit_enable via:: |
| 289 | 346 | ||
| 290 | $ echo 1 > /sys/block/zramX/writeback_limit_enable | 347 | $ echo 1 > /sys/block/zramX/writeback_limit_enable |
| 291 | 348 | ||
| @@ -296,7 +353,7 @@ until admin set the budget via /sys/block/zramX/writeback_limit. | |||
| 296 | assigned via /sys/block/zramX/writeback_limit is meaninless.) | 353 | assigned via /sys/block/zramX/writeback_limit is meaninless.) |
| 297 | 354 | ||
| 298 | If admin want to limit writeback as per-day 400M, he could do it | 355 | If admin want to limit writeback as per-day 400M, he could do it |
| 299 | like below. | 356 | like below:: |
| 300 | 357 | ||
| 301 | $ MB_SHIFT=20 | 358 | $ MB_SHIFT=20 |
| 302 | $ 4K_SHIFT=12 | 359 | $ 4K_SHIFT=12 |
| @@ -305,16 +362,16 @@ like below. | |||
| 305 | $ echo 1 > /sys/block/zram0/writeback_limit_enable | 362 | $ echo 1 > /sys/block/zram0/writeback_limit_enable |
| 306 | 363 | ||
| 307 | If admin want to allow further write again once the bugdet is exausted, | 364 | If admin want to allow further write again once the bugdet is exausted, |
| 308 | he could do it like below | 365 | he could do it like below:: |
| 309 | 366 | ||
| 310 | $ echo $((400<<MB_SHIFT>>4K_SHIFT)) > \ | 367 | $ echo $((400<<MB_SHIFT>>4K_SHIFT)) > \ |
| 311 | /sys/block/zram0/writeback_limit | 368 | /sys/block/zram0/writeback_limit |
| 312 | 369 | ||
| 313 | If admin want to see remaining writeback budget since he set, | 370 | If admin want to see remaining writeback budget since he set:: |
| 314 | 371 | ||
| 315 | $ cat /sys/block/zramX/writeback_limit | 372 | $ cat /sys/block/zramX/writeback_limit |
| 316 | 373 | ||
| 317 | If admin want to disable writeback limit, he could do | 374 | If admin want to disable writeback limit, he could do:: |
| 318 | 375 | ||
| 319 | $ echo 0 > /sys/block/zramX/writeback_limit_enable | 376 | $ echo 0 > /sys/block/zramX/writeback_limit_enable |
| 320 | 377 | ||
| @@ -326,25 +383,35 @@ budget in next setting is user's job. | |||
| 326 | If admin want to measure writeback count in a certain period, he could | 383 | If admin want to measure writeback count in a certain period, he could |
| 327 | know it via /sys/block/zram0/bd_stat's 3rd column. | 384 | know it via /sys/block/zram0/bd_stat's 3rd column. |
| 328 | 385 | ||
| 329 | = memory tracking | 386 | memory tracking |
| 387 | =============== | ||
| 330 | 388 | ||
| 331 | With CONFIG_ZRAM_MEMORY_TRACKING, user can know information of the | 389 | With CONFIG_ZRAM_MEMORY_TRACKING, user can know information of the |
| 332 | zram block. It could be useful to catch cold or incompressible | 390 | zram block. It could be useful to catch cold or incompressible |
| 333 | pages of the process with*pagemap. | 391 | pages of the process with*pagemap. |
| 392 | |||
| 334 | If you enable the feature, you could see block state via | 393 | If you enable the feature, you could see block state via |
| 335 | /sys/kernel/debug/zram/zram0/block_state". The output is as follows, | 394 | /sys/kernel/debug/zram/zram0/block_state". The output is as follows:: |
| 336 | 395 | ||
| 337 | 300 75.033841 .wh. | 396 | 300 75.033841 .wh. |
| 338 | 301 63.806904 s... | 397 | 301 63.806904 s... |
| 339 | 302 63.806919 ..hi | 398 | 302 63.806919 ..hi |
| 340 | 399 | ||
| 341 | First column is zram's block index. | 400 | First column |
| 342 | Second column is access time since the system was booted | 401 | zram's block index. |
| 343 | Third column is state of the block. | 402 | Second column |
| 344 | (s: same page | 403 | access time since the system was booted |
| 345 | w: written page to backing store | 404 | Third column |
| 346 | h: huge page | 405 | state of the block: |
| 347 | i: idle page) | 406 | |
| 407 | s: | ||
| 408 | same page | ||
| 409 | w: | ||
| 410 | written page to backing store | ||
| 411 | h: | ||
| 412 | huge page | ||
| 413 | i: | ||
| 414 | idle page | ||
| 348 | 415 | ||
| 349 | First line of above example says 300th block is accessed at 75.033841sec | 416 | First line of above example says 300th block is accessed at 75.033841sec |
| 350 | and the block's state is huge so it is written back to the backing | 417 | and the block's state is huge so it is written back to the backing |
diff --git a/Documentation/btmrvl.txt b/Documentation/admin-guide/btmrvl.rst index ec57740ead0c..ec57740ead0c 100644 --- a/Documentation/btmrvl.txt +++ b/Documentation/admin-guide/btmrvl.rst | |||
diff --git a/Documentation/admin-guide/bug-hunting.rst b/Documentation/admin-guide/bug-hunting.rst index b761aa2a51d2..44b8a4edd348 100644 --- a/Documentation/admin-guide/bug-hunting.rst +++ b/Documentation/admin-guide/bug-hunting.rst | |||
| @@ -90,9 +90,9 @@ the disk is not available then you have three options: | |||
| 90 | run a null modem to a second machine and capture the output there | 90 | run a null modem to a second machine and capture the output there |
| 91 | using your favourite communication program. Minicom works well. | 91 | using your favourite communication program. Minicom works well. |
| 92 | 92 | ||
| 93 | (3) Use Kdump (see Documentation/kdump/kdump.rst), | 93 | (3) Use Kdump (see Documentation/admin-guide/kdump/kdump.rst), |
| 94 | extract the kernel ring buffer from old memory with using dmesg | 94 | extract the kernel ring buffer from old memory with using dmesg |
| 95 | gdbmacro in Documentation/kdump/gdbmacros.txt. | 95 | gdbmacro in Documentation/admin-guide/kdump/gdbmacros.txt. |
| 96 | 96 | ||
| 97 | Finding the bug's location | 97 | Finding the bug's location |
| 98 | -------------------------- | 98 | -------------------------- |
diff --git a/Documentation/cgroup-v1/blkio-controller.rst b/Documentation/admin-guide/cgroup-v1/blkio-controller.rst index 1d7d962933be..1d7d962933be 100644 --- a/Documentation/cgroup-v1/blkio-controller.rst +++ b/Documentation/admin-guide/cgroup-v1/blkio-controller.rst | |||
diff --git a/Documentation/cgroup-v1/cgroups.rst b/Documentation/admin-guide/cgroup-v1/cgroups.rst index 46bbe7e022d4..b0688011ed06 100644 --- a/Documentation/cgroup-v1/cgroups.rst +++ b/Documentation/admin-guide/cgroup-v1/cgroups.rst | |||
| @@ -3,7 +3,7 @@ Control Groups | |||
| 3 | ============== | 3 | ============== |
| 4 | 4 | ||
| 5 | Written by Paul Menage <menage@google.com> based on | 5 | Written by Paul Menage <menage@google.com> based on |
| 6 | Documentation/cgroup-v1/cpusets.rst | 6 | Documentation/admin-guide/cgroup-v1/cpusets.rst |
| 7 | 7 | ||
| 8 | Original copyright statements from cpusets.txt: | 8 | Original copyright statements from cpusets.txt: |
| 9 | 9 | ||
| @@ -76,7 +76,7 @@ On their own, the only use for cgroups is for simple job | |||
| 76 | tracking. The intention is that other subsystems hook into the generic | 76 | tracking. The intention is that other subsystems hook into the generic |
| 77 | cgroup support to provide new attributes for cgroups, such as | 77 | cgroup support to provide new attributes for cgroups, such as |
| 78 | accounting/limiting the resources which processes in a cgroup can | 78 | accounting/limiting the resources which processes in a cgroup can |
| 79 | access. For example, cpusets (see Documentation/cgroup-v1/cpusets.rst) allow | 79 | access. For example, cpusets (see Documentation/admin-guide/cgroup-v1/cpusets.rst) allow |
| 80 | you to associate a set of CPUs and a set of memory nodes with the | 80 | you to associate a set of CPUs and a set of memory nodes with the |
| 81 | tasks in each cgroup. | 81 | tasks in each cgroup. |
| 82 | 82 | ||
diff --git a/Documentation/cgroup-v1/cpuacct.rst b/Documentation/admin-guide/cgroup-v1/cpuacct.rst index d30ed81d2ad7..d30ed81d2ad7 100644 --- a/Documentation/cgroup-v1/cpuacct.rst +++ b/Documentation/admin-guide/cgroup-v1/cpuacct.rst | |||
diff --git a/Documentation/cgroup-v1/cpusets.rst b/Documentation/admin-guide/cgroup-v1/cpusets.rst index b6a42cdea72b..86a6ae995d54 100644 --- a/Documentation/cgroup-v1/cpusets.rst +++ b/Documentation/admin-guide/cgroup-v1/cpusets.rst | |||
| @@ -49,7 +49,7 @@ hooks, beyond what is already present, required to manage dynamic | |||
| 49 | job placement on large systems. | 49 | job placement on large systems. |
| 50 | 50 | ||
| 51 | Cpusets use the generic cgroup subsystem described in | 51 | Cpusets use the generic cgroup subsystem described in |
| 52 | Documentation/cgroup-v1/cgroups.rst. | 52 | Documentation/admin-guide/cgroup-v1/cgroups.rst. |
| 53 | 53 | ||
| 54 | Requests by a task, using the sched_setaffinity(2) system call to | 54 | Requests by a task, using the sched_setaffinity(2) system call to |
| 55 | include CPUs in its CPU affinity mask, and using the mbind(2) and | 55 | include CPUs in its CPU affinity mask, and using the mbind(2) and |
diff --git a/Documentation/cgroup-v1/devices.rst b/Documentation/admin-guide/cgroup-v1/devices.rst index e1886783961e..e1886783961e 100644 --- a/Documentation/cgroup-v1/devices.rst +++ b/Documentation/admin-guide/cgroup-v1/devices.rst | |||
diff --git a/Documentation/cgroup-v1/freezer-subsystem.rst b/Documentation/admin-guide/cgroup-v1/freezer-subsystem.rst index 582d3427de3f..582d3427de3f 100644 --- a/Documentation/cgroup-v1/freezer-subsystem.rst +++ b/Documentation/admin-guide/cgroup-v1/freezer-subsystem.rst | |||
diff --git a/Documentation/cgroup-v1/hugetlb.rst b/Documentation/admin-guide/cgroup-v1/hugetlb.rst index a3902aa253a9..a3902aa253a9 100644 --- a/Documentation/cgroup-v1/hugetlb.rst +++ b/Documentation/admin-guide/cgroup-v1/hugetlb.rst | |||
diff --git a/Documentation/cgroup-v1/index.rst b/Documentation/admin-guide/cgroup-v1/index.rst index fe76d42edc11..10bf48bae0b0 100644 --- a/Documentation/cgroup-v1/index.rst +++ b/Documentation/admin-guide/cgroup-v1/index.rst | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | |||
| 3 | ======================== | 1 | ======================== |
| 4 | Control Groups version 1 | 2 | Control Groups version 1 |
| 5 | ======================== | 3 | ======================== |
diff --git a/Documentation/cgroup-v1/memcg_test.rst b/Documentation/admin-guide/cgroup-v1/memcg_test.rst index 91bd18c6a514..3f7115e07b5d 100644 --- a/Documentation/cgroup-v1/memcg_test.rst +++ b/Documentation/admin-guide/cgroup-v1/memcg_test.rst | |||
| @@ -10,7 +10,7 @@ Because VM is getting complex (one of reasons is memcg...), memcg's behavior | |||
| 10 | is complex. This is a document for memcg's internal behavior. | 10 | is complex. This is a document for memcg's internal behavior. |
| 11 | Please note that implementation details can be changed. | 11 | Please note that implementation details can be changed. |
| 12 | 12 | ||
| 13 | (*) Topics on API should be in Documentation/cgroup-v1/memory.rst) | 13 | (*) Topics on API should be in Documentation/admin-guide/cgroup-v1/memory.rst) |
| 14 | 14 | ||
| 15 | 0. How to record usage ? | 15 | 0. How to record usage ? |
| 16 | ======================== | 16 | ======================== |
| @@ -327,7 +327,7 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y. | |||
| 327 | You can see charges have been moved by reading ``*.usage_in_bytes`` or | 327 | You can see charges have been moved by reading ``*.usage_in_bytes`` or |
| 328 | memory.stat of both A and B. | 328 | memory.stat of both A and B. |
| 329 | 329 | ||
| 330 | See 8.2 of Documentation/cgroup-v1/memory.rst to see what value should | 330 | See 8.2 of Documentation/admin-guide/cgroup-v1/memory.rst to see what value should |
| 331 | be written to move_charge_at_immigrate. | 331 | be written to move_charge_at_immigrate. |
| 332 | 332 | ||
| 333 | 9.10 Memory thresholds | 333 | 9.10 Memory thresholds |
diff --git a/Documentation/cgroup-v1/memory.rst b/Documentation/admin-guide/cgroup-v1/memory.rst index 41bdc038dad9..41bdc038dad9 100644 --- a/Documentation/cgroup-v1/memory.rst +++ b/Documentation/admin-guide/cgroup-v1/memory.rst | |||
diff --git a/Documentation/cgroup-v1/net_cls.rst b/Documentation/admin-guide/cgroup-v1/net_cls.rst index a2cf272af7a0..a2cf272af7a0 100644 --- a/Documentation/cgroup-v1/net_cls.rst +++ b/Documentation/admin-guide/cgroup-v1/net_cls.rst | |||
diff --git a/Documentation/cgroup-v1/net_prio.rst b/Documentation/admin-guide/cgroup-v1/net_prio.rst index b40905871c64..b40905871c64 100644 --- a/Documentation/cgroup-v1/net_prio.rst +++ b/Documentation/admin-guide/cgroup-v1/net_prio.rst | |||
diff --git a/Documentation/cgroup-v1/pids.rst b/Documentation/admin-guide/cgroup-v1/pids.rst index 6acebd9e72c8..6acebd9e72c8 100644 --- a/Documentation/cgroup-v1/pids.rst +++ b/Documentation/admin-guide/cgroup-v1/pids.rst | |||
diff --git a/Documentation/cgroup-v1/rdma.rst b/Documentation/admin-guide/cgroup-v1/rdma.rst index 2fcb0a9bf790..2fcb0a9bf790 100644 --- a/Documentation/cgroup-v1/rdma.rst +++ b/Documentation/admin-guide/cgroup-v1/rdma.rst | |||
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 8269e869cb1e..3b29005aa981 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst | |||
| @@ -9,7 +9,7 @@ This is the authoritative documentation on the design, interface and | |||
| 9 | conventions of cgroup v2. It describes all userland-visible aspects | 9 | conventions of cgroup v2. It describes all userland-visible aspects |
| 10 | of cgroup including core and specific controller behaviors. All | 10 | of cgroup including core and specific controller behaviors. All |
| 11 | future changes must be reflected in this document. Documentation for | 11 | future changes must be reflected in this document. Documentation for |
| 12 | v1 is available under Documentation/cgroup-v1/. | 12 | v1 is available under Documentation/admin-guide/cgroup-v1/. |
| 13 | 13 | ||
| 14 | .. CONTENTS | 14 | .. CONTENTS |
| 15 | 15 | ||
| @@ -1014,7 +1014,7 @@ All time durations are in microseconds. | |||
| 1014 | A read-only nested-key file which exists on non-root cgroups. | 1014 | A read-only nested-key file which exists on non-root cgroups. |
| 1015 | 1015 | ||
| 1016 | Shows pressure stall information for CPU. See | 1016 | Shows pressure stall information for CPU. See |
| 1017 | Documentation/accounting/psi.txt for details. | 1017 | Documentation/accounting/psi.rst for details. |
| 1018 | 1018 | ||
| 1019 | 1019 | ||
| 1020 | Memory | 1020 | Memory |
| @@ -1355,7 +1355,7 @@ PAGE_SIZE multiple when read back. | |||
| 1355 | A read-only nested-key file which exists on non-root cgroups. | 1355 | A read-only nested-key file which exists on non-root cgroups. |
| 1356 | 1356 | ||
| 1357 | Shows pressure stall information for memory. See | 1357 | Shows pressure stall information for memory. See |
| 1358 | Documentation/accounting/psi.txt for details. | 1358 | Documentation/accounting/psi.rst for details. |
| 1359 | 1359 | ||
| 1360 | 1360 | ||
| 1361 | Usage Guidelines | 1361 | Usage Guidelines |
| @@ -1498,7 +1498,7 @@ IO Interface Files | |||
| 1498 | A read-only nested-key file which exists on non-root cgroups. | 1498 | A read-only nested-key file which exists on non-root cgroups. |
| 1499 | 1499 | ||
| 1500 | Shows pressure stall information for IO. See | 1500 | Shows pressure stall information for IO. See |
| 1501 | Documentation/accounting/psi.txt for details. | 1501 | Documentation/accounting/psi.rst for details. |
| 1502 | 1502 | ||
| 1503 | 1503 | ||
| 1504 | Writeback | 1504 | Writeback |
diff --git a/Documentation/clearing-warn-once.txt b/Documentation/admin-guide/clearing-warn-once.rst index 211fd926cf00..211fd926cf00 100644 --- a/Documentation/clearing-warn-once.txt +++ b/Documentation/admin-guide/clearing-warn-once.rst | |||
diff --git a/Documentation/cpu-load.txt b/Documentation/admin-guide/cpu-load.rst index 2d01ce43d2a2..2d01ce43d2a2 100644 --- a/Documentation/cpu-load.txt +++ b/Documentation/admin-guide/cpu-load.rst | |||
diff --git a/Documentation/cputopology.txt b/Documentation/admin-guide/cputopology.rst index b90dafcc8237..b90dafcc8237 100644 --- a/Documentation/cputopology.txt +++ b/Documentation/admin-guide/cputopology.rst | |||
diff --git a/Documentation/device-mapper/cache-policies.rst b/Documentation/admin-guide/device-mapper/cache-policies.rst index b17fe352fc41..b17fe352fc41 100644 --- a/Documentation/device-mapper/cache-policies.rst +++ b/Documentation/admin-guide/device-mapper/cache-policies.rst | |||
diff --git a/Documentation/device-mapper/cache.rst b/Documentation/admin-guide/device-mapper/cache.rst index f15e5254d05b..f15e5254d05b 100644 --- a/Documentation/device-mapper/cache.rst +++ b/Documentation/admin-guide/device-mapper/cache.rst | |||
diff --git a/Documentation/device-mapper/delay.rst b/Documentation/admin-guide/device-mapper/delay.rst index 917ba8c33359..917ba8c33359 100644 --- a/Documentation/device-mapper/delay.rst +++ b/Documentation/admin-guide/device-mapper/delay.rst | |||
diff --git a/Documentation/device-mapper/dm-crypt.rst b/Documentation/admin-guide/device-mapper/dm-crypt.rst index 8f4a3f889d43..8f4a3f889d43 100644 --- a/Documentation/device-mapper/dm-crypt.rst +++ b/Documentation/admin-guide/device-mapper/dm-crypt.rst | |||
diff --git a/Documentation/device-mapper/dm-dust.txt b/Documentation/admin-guide/device-mapper/dm-dust.txt index 954d402a1f6a..954d402a1f6a 100644 --- a/Documentation/device-mapper/dm-dust.txt +++ b/Documentation/admin-guide/device-mapper/dm-dust.txt | |||
diff --git a/Documentation/device-mapper/dm-flakey.rst b/Documentation/admin-guide/device-mapper/dm-flakey.rst index 86138735879d..86138735879d 100644 --- a/Documentation/device-mapper/dm-flakey.rst +++ b/Documentation/admin-guide/device-mapper/dm-flakey.rst | |||
diff --git a/Documentation/device-mapper/dm-init.rst b/Documentation/admin-guide/device-mapper/dm-init.rst index e5242ff17e9b..e5242ff17e9b 100644 --- a/Documentation/device-mapper/dm-init.rst +++ b/Documentation/admin-guide/device-mapper/dm-init.rst | |||
diff --git a/Documentation/device-mapper/dm-integrity.rst b/Documentation/admin-guide/device-mapper/dm-integrity.rst index a30aa91b5fbe..a30aa91b5fbe 100644 --- a/Documentation/device-mapper/dm-integrity.rst +++ b/Documentation/admin-guide/device-mapper/dm-integrity.rst | |||
diff --git a/Documentation/device-mapper/dm-io.rst b/Documentation/admin-guide/device-mapper/dm-io.rst index d2492917a1f5..d2492917a1f5 100644 --- a/Documentation/device-mapper/dm-io.rst +++ b/Documentation/admin-guide/device-mapper/dm-io.rst | |||
diff --git a/Documentation/device-mapper/dm-log.rst b/Documentation/admin-guide/device-mapper/dm-log.rst index ba4fce39bc27..ba4fce39bc27 100644 --- a/Documentation/device-mapper/dm-log.rst +++ b/Documentation/admin-guide/device-mapper/dm-log.rst | |||
diff --git a/Documentation/device-mapper/dm-queue-length.rst b/Documentation/admin-guide/device-mapper/dm-queue-length.rst index d8e381c1cb02..d8e381c1cb02 100644 --- a/Documentation/device-mapper/dm-queue-length.rst +++ b/Documentation/admin-guide/device-mapper/dm-queue-length.rst | |||
diff --git a/Documentation/device-mapper/dm-raid.rst b/Documentation/admin-guide/device-mapper/dm-raid.rst index 2fe255b130fb..2fe255b130fb 100644 --- a/Documentation/device-mapper/dm-raid.rst +++ b/Documentation/admin-guide/device-mapper/dm-raid.rst | |||
diff --git a/Documentation/device-mapper/dm-service-time.rst b/Documentation/admin-guide/device-mapper/dm-service-time.rst index facf277fc13c..facf277fc13c 100644 --- a/Documentation/device-mapper/dm-service-time.rst +++ b/Documentation/admin-guide/device-mapper/dm-service-time.rst | |||
diff --git a/Documentation/device-mapper/dm-uevent.rst b/Documentation/admin-guide/device-mapper/dm-uevent.rst index 4a8ee8d069c9..4a8ee8d069c9 100644 --- a/Documentation/device-mapper/dm-uevent.rst +++ b/Documentation/admin-guide/device-mapper/dm-uevent.rst | |||
diff --git a/Documentation/device-mapper/dm-zoned.rst b/Documentation/admin-guide/device-mapper/dm-zoned.rst index 07f56ebc1730..07f56ebc1730 100644 --- a/Documentation/device-mapper/dm-zoned.rst +++ b/Documentation/admin-guide/device-mapper/dm-zoned.rst | |||
diff --git a/Documentation/device-mapper/era.rst b/Documentation/admin-guide/device-mapper/era.rst index 90dd5c670b9f..90dd5c670b9f 100644 --- a/Documentation/device-mapper/era.rst +++ b/Documentation/admin-guide/device-mapper/era.rst | |||
diff --git a/Documentation/device-mapper/index.rst b/Documentation/admin-guide/device-mapper/index.rst index 105e253bc231..c77c58b8f67b 100644 --- a/Documentation/device-mapper/index.rst +++ b/Documentation/admin-guide/device-mapper/index.rst | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | |||
| 3 | ============= | 1 | ============= |
| 4 | Device Mapper | 2 | Device Mapper |
| 5 | ============= | 3 | ============= |
diff --git a/Documentation/device-mapper/kcopyd.rst b/Documentation/admin-guide/device-mapper/kcopyd.rst index 7651d395127f..7651d395127f 100644 --- a/Documentation/device-mapper/kcopyd.rst +++ b/Documentation/admin-guide/device-mapper/kcopyd.rst | |||
diff --git a/Documentation/device-mapper/linear.rst b/Documentation/admin-guide/device-mapper/linear.rst index 9d17fc6e64a9..9d17fc6e64a9 100644 --- a/Documentation/device-mapper/linear.rst +++ b/Documentation/admin-guide/device-mapper/linear.rst | |||
diff --git a/Documentation/device-mapper/log-writes.rst b/Documentation/admin-guide/device-mapper/log-writes.rst index 23141f2ffb7c..23141f2ffb7c 100644 --- a/Documentation/device-mapper/log-writes.rst +++ b/Documentation/admin-guide/device-mapper/log-writes.rst | |||
diff --git a/Documentation/device-mapper/persistent-data.rst b/Documentation/admin-guide/device-mapper/persistent-data.rst index 2065c3c5a091..2065c3c5a091 100644 --- a/Documentation/device-mapper/persistent-data.rst +++ b/Documentation/admin-guide/device-mapper/persistent-data.rst | |||
diff --git a/Documentation/device-mapper/snapshot.rst b/Documentation/admin-guide/device-mapper/snapshot.rst index ccdd8b587a74..ccdd8b587a74 100644 --- a/Documentation/device-mapper/snapshot.rst +++ b/Documentation/admin-guide/device-mapper/snapshot.rst | |||
diff --git a/Documentation/device-mapper/statistics.rst b/Documentation/admin-guide/device-mapper/statistics.rst index 3d80a9f850cc..41ded0bc5933 100644 --- a/Documentation/device-mapper/statistics.rst +++ b/Documentation/admin-guide/device-mapper/statistics.rst | |||
| @@ -13,7 +13,7 @@ the range specified. | |||
| 13 | 13 | ||
| 14 | The I/O statistics counters for each step-sized area of a region are | 14 | The I/O statistics counters for each step-sized area of a region are |
| 15 | in the same format as `/sys/block/*/stat` or `/proc/diskstats` (see: | 15 | in the same format as `/sys/block/*/stat` or `/proc/diskstats` (see: |
| 16 | Documentation/iostats.txt). But two extra counters (12 and 13) are | 16 | Documentation/admin-guide/iostats.rst). But two extra counters (12 and 13) are |
| 17 | provided: total time spent reading and writing. When the histogram | 17 | provided: total time spent reading and writing. When the histogram |
| 18 | argument is used, the 14th parameter is reported that represents the | 18 | argument is used, the 14th parameter is reported that represents the |
| 19 | histogram of latencies. All these counters may be accessed by sending | 19 | histogram of latencies. All these counters may be accessed by sending |
| @@ -151,7 +151,7 @@ Messages | |||
| 151 | The first 11 counters have the same meaning as | 151 | The first 11 counters have the same meaning as |
| 152 | `/sys/block/*/stat or /proc/diskstats`. | 152 | `/sys/block/*/stat or /proc/diskstats`. |
| 153 | 153 | ||
| 154 | Please refer to Documentation/iostats.txt for details. | 154 | Please refer to Documentation/admin-guide/iostats.rst for details. |
| 155 | 155 | ||
| 156 | 1. the number of reads completed | 156 | 1. the number of reads completed |
| 157 | 2. the number of reads merged | 157 | 2. the number of reads merged |
diff --git a/Documentation/device-mapper/striped.rst b/Documentation/admin-guide/device-mapper/striped.rst index e9a8da192ae1..e9a8da192ae1 100644 --- a/Documentation/device-mapper/striped.rst +++ b/Documentation/admin-guide/device-mapper/striped.rst | |||
diff --git a/Documentation/device-mapper/switch.rst b/Documentation/admin-guide/device-mapper/switch.rst index 7dde06be1a4f..7dde06be1a4f 100644 --- a/Documentation/device-mapper/switch.rst +++ b/Documentation/admin-guide/device-mapper/switch.rst | |||
diff --git a/Documentation/device-mapper/thin-provisioning.rst b/Documentation/admin-guide/device-mapper/thin-provisioning.rst index bafebf79da4b..bafebf79da4b 100644 --- a/Documentation/device-mapper/thin-provisioning.rst +++ b/Documentation/admin-guide/device-mapper/thin-provisioning.rst | |||
diff --git a/Documentation/device-mapper/unstriped.rst b/Documentation/admin-guide/device-mapper/unstriped.rst index 0a8d3eb3f072..0a8d3eb3f072 100644 --- a/Documentation/device-mapper/unstriped.rst +++ b/Documentation/admin-guide/device-mapper/unstriped.rst | |||
diff --git a/Documentation/device-mapper/verity.rst b/Documentation/admin-guide/device-mapper/verity.rst index a4d1c1476d72..a4d1c1476d72 100644 --- a/Documentation/device-mapper/verity.rst +++ b/Documentation/admin-guide/device-mapper/verity.rst | |||
diff --git a/Documentation/device-mapper/writecache.rst b/Documentation/admin-guide/device-mapper/writecache.rst index d3d7690f5e8d..d3d7690f5e8d 100644 --- a/Documentation/device-mapper/writecache.rst +++ b/Documentation/admin-guide/device-mapper/writecache.rst | |||
diff --git a/Documentation/device-mapper/zero.rst b/Documentation/admin-guide/device-mapper/zero.rst index 11fb5cf4597c..11fb5cf4597c 100644 --- a/Documentation/device-mapper/zero.rst +++ b/Documentation/admin-guide/device-mapper/zero.rst | |||
diff --git a/Documentation/efi-stub.txt b/Documentation/admin-guide/efi-stub.rst index 833edb0d0bc4..833edb0d0bc4 100644 --- a/Documentation/efi-stub.txt +++ b/Documentation/admin-guide/efi-stub.rst | |||
diff --git a/Documentation/gpio/index.rst b/Documentation/admin-guide/gpio/index.rst index 09a4a553f434..a244ba4e87d5 100644 --- a/Documentation/gpio/index.rst +++ b/Documentation/admin-guide/gpio/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ==== | 3 | ==== |
| 4 | gpio | 4 | gpio |
diff --git a/Documentation/gpio/sysfs.rst b/Documentation/admin-guide/gpio/sysfs.rst index ec09ffd983e7..ec09ffd983e7 100644 --- a/Documentation/gpio/sysfs.rst +++ b/Documentation/admin-guide/gpio/sysfs.rst | |||
diff --git a/Documentation/highuid.txt b/Documentation/admin-guide/highuid.rst index 6ee70465c0ea..6ee70465c0ea 100644 --- a/Documentation/highuid.txt +++ b/Documentation/admin-guide/highuid.rst | |||
diff --git a/Documentation/admin-guide/hw-vuln/l1tf.rst b/Documentation/admin-guide/hw-vuln/l1tf.rst index 656aee262e23..f83212fae4d5 100644 --- a/Documentation/admin-guide/hw-vuln/l1tf.rst +++ b/Documentation/admin-guide/hw-vuln/l1tf.rst | |||
| @@ -241,7 +241,7 @@ Guest mitigation mechanisms | |||
| 241 | For further information about confining guests to a single or to a group | 241 | For further information about confining guests to a single or to a group |
| 242 | of cores consult the cpusets documentation: | 242 | of cores consult the cpusets documentation: |
| 243 | 243 | ||
| 244 | https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.rst | 244 | https://www.kernel.org/doc/Documentation/admin-guide/cgroup-v1/cpusets.rst |
| 245 | 245 | ||
| 246 | .. _interrupt_isolation: | 246 | .. _interrupt_isolation: |
| 247 | 247 | ||
diff --git a/Documentation/hw_random.txt b/Documentation/admin-guide/hw_random.rst index 121de96e395e..121de96e395e 100644 --- a/Documentation/hw_random.txt +++ b/Documentation/admin-guide/hw_random.rst | |||
diff --git a/Documentation/admin-guide/index.rst b/Documentation/admin-guide/index.rst index 24fbe0568eff..280355d08af5 100644 --- a/Documentation/admin-guide/index.rst +++ b/Documentation/admin-guide/index.rst | |||
| @@ -16,6 +16,7 @@ etc. | |||
| 16 | README | 16 | README |
| 17 | kernel-parameters | 17 | kernel-parameters |
| 18 | devices | 18 | devices |
| 19 | sysctl/index | ||
| 19 | 20 | ||
| 20 | This section describes CPU vulnerabilities and their mitigations. | 21 | This section describes CPU vulnerabilities and their mitigations. |
| 21 | 22 | ||
| @@ -38,6 +39,8 @@ problems and bugs in particular. | |||
| 38 | ramoops | 39 | ramoops |
| 39 | dynamic-debug-howto | 40 | dynamic-debug-howto |
| 40 | init | 41 | init |
| 42 | kdump/index | ||
| 43 | perf/index | ||
| 41 | 44 | ||
| 42 | This is the beginning of a section with information of interest to | 45 | This is the beginning of a section with information of interest to |
| 43 | application developers. Documents covering various aspects of the kernel | 46 | application developers. Documents covering various aspects of the kernel |
| @@ -56,11 +59,13 @@ configure specific aspects of kernel behavior to your liking. | |||
| 56 | 59 | ||
| 57 | initrd | 60 | initrd |
| 58 | cgroup-v2 | 61 | cgroup-v2 |
| 62 | cgroup-v1/index | ||
| 59 | serial-console | 63 | serial-console |
| 60 | braille-console | 64 | braille-console |
| 61 | parport | 65 | parport |
| 62 | md | 66 | md |
| 63 | module-signing | 67 | module-signing |
| 68 | rapidio | ||
| 64 | sysrq | 69 | sysrq |
| 65 | unicode | 70 | unicode |
| 66 | vga-softcursor | 71 | vga-softcursor |
| @@ -69,14 +74,37 @@ configure specific aspects of kernel behavior to your liking. | |||
| 69 | java | 74 | java |
| 70 | ras | 75 | ras |
| 71 | bcache | 76 | bcache |
| 77 | blockdev/index | ||
| 72 | ext4 | 78 | ext4 |
| 73 | binderfs | 79 | binderfs |
| 74 | pm/index | 80 | pm/index |
| 75 | thunderbolt | 81 | thunderbolt |
| 76 | LSM/index | 82 | LSM/index |
| 77 | mm/index | 83 | mm/index |
| 84 | namespaces/index | ||
| 78 | perf-security | 85 | perf-security |
| 79 | acpi/index | 86 | acpi/index |
| 87 | aoe/index | ||
| 88 | btmrvl | ||
| 89 | clearing-warn-once | ||
| 90 | cpu-load | ||
| 91 | cputopology | ||
| 92 | device-mapper/index | ||
| 93 | efi-stub | ||
| 94 | gpio/index | ||
| 95 | highuid | ||
| 96 | hw_random | ||
| 97 | iostats | ||
| 98 | kernel-per-CPU-kthreads | ||
| 99 | laptops/index | ||
| 100 | lcd-panel-cgram | ||
| 101 | ldm | ||
| 102 | lockup-watchdogs | ||
| 103 | numastat | ||
| 104 | pnp | ||
| 105 | rtc | ||
| 106 | svga | ||
| 107 | video-output | ||
| 80 | 108 | ||
| 81 | .. only:: subproject and html | 109 | .. only:: subproject and html |
| 82 | 110 | ||
diff --git a/Documentation/iostats.txt b/Documentation/admin-guide/iostats.rst index 5d63b18bd6d1..5d63b18bd6d1 100644 --- a/Documentation/iostats.txt +++ b/Documentation/admin-guide/iostats.rst | |||
diff --git a/Documentation/kdump/gdbmacros.txt b/Documentation/admin-guide/kdump/gdbmacros.txt index 220d0a80ca2c..220d0a80ca2c 100644 --- a/Documentation/kdump/gdbmacros.txt +++ b/Documentation/admin-guide/kdump/gdbmacros.txt | |||
diff --git a/Documentation/kdump/index.rst b/Documentation/admin-guide/kdump/index.rst index 2b17fcf6867a..8e2ebd0383cd 100644 --- a/Documentation/kdump/index.rst +++ b/Documentation/admin-guide/kdump/index.rst | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | 1 | ||
| 3 | ================================================================ | 2 | ================================================================ |
| 4 | Documentation for Kdump - The kexec-based Crash Dumping Solution | 3 | Documentation for Kdump - The kexec-based Crash Dumping Solution |
diff --git a/Documentation/kdump/kdump.rst b/Documentation/admin-guide/kdump/kdump.rst index ac7e131d2935..ac7e131d2935 100644 --- a/Documentation/kdump/kdump.rst +++ b/Documentation/admin-guide/kdump/kdump.rst | |||
diff --git a/Documentation/kdump/vmcoreinfo.rst b/Documentation/admin-guide/kdump/vmcoreinfo.rst index 007a6b86e0ee..007a6b86e0ee 100644 --- a/Documentation/kdump/vmcoreinfo.rst +++ b/Documentation/admin-guide/kdump/vmcoreinfo.rst | |||
diff --git a/Documentation/admin-guide/kernel-parameters.rst b/Documentation/admin-guide/kernel-parameters.rst index 5d29ba5ad88c..d05d531b4ec9 100644 --- a/Documentation/admin-guide/kernel-parameters.rst +++ b/Documentation/admin-guide/kernel-parameters.rst | |||
| @@ -118,7 +118,7 @@ parameter is applicable:: | |||
| 118 | LOOP Loopback device support is enabled. | 118 | LOOP Loopback device support is enabled. |
| 119 | M68k M68k architecture is enabled. | 119 | M68k M68k architecture is enabled. |
| 120 | These options have more detailed description inside of | 120 | These options have more detailed description inside of |
| 121 | Documentation/m68k/kernel-options.txt. | 121 | Documentation/m68k/kernel-options.rst. |
| 122 | MDA MDA console support is enabled. | 122 | MDA MDA console support is enabled. |
| 123 | MIPS MIPS architecture is enabled. | 123 | MIPS MIPS architecture is enabled. |
| 124 | MOUSE Appropriate mouse support is enabled. | 124 | MOUSE Appropriate mouse support is enabled. |
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index f8b62360b18c..34a363f91b46 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt | |||
| @@ -430,7 +430,7 @@ | |||
| 430 | 430 | ||
| 431 | blkdevparts= Manual partition parsing of block device(s) for | 431 | blkdevparts= Manual partition parsing of block device(s) for |
| 432 | embedded devices based on command line input. | 432 | embedded devices based on command line input. |
| 433 | See Documentation/block/cmdline-partition.txt | 433 | See Documentation/block/cmdline-partition.rst |
| 434 | 434 | ||
| 435 | boot_delay= Milliseconds to delay each printk during boot. | 435 | boot_delay= Milliseconds to delay each printk during boot. |
| 436 | Values larger than 10 seconds (10000) are changed to | 436 | Values larger than 10 seconds (10000) are changed to |
| @@ -708,14 +708,14 @@ | |||
| 708 | [KNL, x86_64] select a region under 4G first, and | 708 | [KNL, x86_64] select a region under 4G first, and |
| 709 | fall back to reserve region above 4G when '@offset' | 709 | fall back to reserve region above 4G when '@offset' |
| 710 | hasn't been specified. | 710 | hasn't been specified. |
| 711 | See Documentation/kdump/kdump.rst for further details. | 711 | See Documentation/admin-guide/kdump/kdump.rst for further details. |
| 712 | 712 | ||
| 713 | crashkernel=range1:size1[,range2:size2,...][@offset] | 713 | crashkernel=range1:size1[,range2:size2,...][@offset] |
| 714 | [KNL] Same as above, but depends on the memory | 714 | [KNL] Same as above, but depends on the memory |
| 715 | in the running system. The syntax of range is | 715 | in the running system. The syntax of range is |
| 716 | start-[end] where start and end are both | 716 | start-[end] where start and end are both |
| 717 | a memory unit (amount[KMG]). See also | 717 | a memory unit (amount[KMG]). See also |
| 718 | Documentation/kdump/kdump.rst for an example. | 718 | Documentation/admin-guide/kdump/kdump.rst for an example. |
| 719 | 719 | ||
| 720 | crashkernel=size[KMG],high | 720 | crashkernel=size[KMG],high |
| 721 | [KNL, x86_64] range could be above 4G. Allow kernel | 721 | [KNL, x86_64] range could be above 4G. Allow kernel |
| @@ -930,7 +930,7 @@ | |||
| 930 | edid/1680x1050.bin, or edid/1920x1080.bin is given | 930 | edid/1680x1050.bin, or edid/1920x1080.bin is given |
| 931 | and no file with the same name exists. Details and | 931 | and no file with the same name exists. Details and |
| 932 | instructions how to build your own EDID data are | 932 | instructions how to build your own EDID data are |
| 933 | available in Documentation/EDID/howto.rst. An EDID | 933 | available in Documentation/driver-api/edid.rst. An EDID |
| 934 | data set will only be used for a particular connector, | 934 | data set will only be used for a particular connector, |
| 935 | if its name and a colon are prepended to the EDID | 935 | if its name and a colon are prepended to the EDID |
| 936 | name. Each connector may use a unique EDID data | 936 | name. Each connector may use a unique EDID data |
| @@ -1199,15 +1199,15 @@ | |||
| 1199 | 1199 | ||
| 1200 | elevator= [IOSCHED] | 1200 | elevator= [IOSCHED] |
| 1201 | Format: { "mq-deadline" | "kyber" | "bfq" } | 1201 | Format: { "mq-deadline" | "kyber" | "bfq" } |
| 1202 | See Documentation/block/deadline-iosched.txt, | 1202 | See Documentation/block/deadline-iosched.rst, |
| 1203 | Documentation/block/kyber-iosched.txt and | 1203 | Documentation/block/kyber-iosched.rst and |
| 1204 | Documentation/block/bfq-iosched.txt for details. | 1204 | Documentation/block/bfq-iosched.rst for details. |
| 1205 | 1205 | ||
| 1206 | elfcorehdr=[size[KMG]@]offset[KMG] [IA64,PPC,SH,X86,S390] | 1206 | elfcorehdr=[size[KMG]@]offset[KMG] [IA64,PPC,SH,X86,S390] |
| 1207 | Specifies physical address of start of kernel core | 1207 | Specifies physical address of start of kernel core |
| 1208 | image elf header and optionally the size. Generally | 1208 | image elf header and optionally the size. Generally |
| 1209 | kexec loader will pass this option to capture kernel. | 1209 | kexec loader will pass this option to capture kernel. |
| 1210 | See Documentation/kdump/kdump.rst for details. | 1210 | See Documentation/admin-guide/kdump/kdump.rst for details. |
| 1211 | 1211 | ||
| 1212 | enable_mtrr_cleanup [X86] | 1212 | enable_mtrr_cleanup [X86] |
| 1213 | The kernel tries to adjust MTRR layout from continuous | 1213 | The kernel tries to adjust MTRR layout from continuous |
| @@ -1249,7 +1249,7 @@ | |||
| 1249 | See also Documentation/fault-injection/. | 1249 | See also Documentation/fault-injection/. |
| 1250 | 1250 | ||
| 1251 | floppy= [HW] | 1251 | floppy= [HW] |
| 1252 | See Documentation/blockdev/floppy.txt. | 1252 | See Documentation/admin-guide/blockdev/floppy.rst. |
| 1253 | 1253 | ||
| 1254 | force_pal_cache_flush | 1254 | force_pal_cache_flush |
| 1255 | [IA-64] Avoid check_sal_cache_flush which may hang on | 1255 | [IA-64] Avoid check_sal_cache_flush which may hang on |
| @@ -2234,7 +2234,7 @@ | |||
| 2234 | memblock=debug [KNL] Enable memblock debug messages. | 2234 | memblock=debug [KNL] Enable memblock debug messages. |
| 2235 | 2235 | ||
| 2236 | load_ramdisk= [RAM] List of ramdisks to load from floppy | 2236 | load_ramdisk= [RAM] List of ramdisks to load from floppy |
| 2237 | See Documentation/blockdev/ramdisk.txt. | 2237 | See Documentation/admin-guide/blockdev/ramdisk.rst. |
| 2238 | 2238 | ||
| 2239 | lockd.nlm_grace_period=P [NFS] Assign grace period. | 2239 | lockd.nlm_grace_period=P [NFS] Assign grace period. |
| 2240 | Format: <integer> | 2240 | Format: <integer> |
| @@ -3144,7 +3144,7 @@ | |||
| 3144 | numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA. | 3144 | numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA. |
| 3145 | 'node', 'default' can be specified | 3145 | 'node', 'default' can be specified |
| 3146 | This can be set from sysctl after boot. | 3146 | This can be set from sysctl after boot. |
| 3147 | See Documentation/sysctl/vm.txt for details. | 3147 | See Documentation/admin-guide/sysctl/vm.rst for details. |
| 3148 | 3148 | ||
| 3149 | ohci1394_dma=early [HW] enable debugging via the ohci1394 driver. | 3149 | ohci1394_dma=early [HW] enable debugging via the ohci1394 driver. |
| 3150 | See Documentation/debugging-via-ohci1394.txt for more | 3150 | See Documentation/debugging-via-ohci1394.txt for more |
| @@ -3268,7 +3268,7 @@ | |||
| 3268 | 3268 | ||
| 3269 | pcd. [PARIDE] | 3269 | pcd. [PARIDE] |
| 3270 | See header of drivers/block/paride/pcd.c. | 3270 | See header of drivers/block/paride/pcd.c. |
| 3271 | See also Documentation/blockdev/paride.txt. | 3271 | See also Documentation/admin-guide/blockdev/paride.rst. |
| 3272 | 3272 | ||
| 3273 | pci=option[,option...] [PCI] various PCI subsystem options. | 3273 | pci=option[,option...] [PCI] various PCI subsystem options. |
| 3274 | 3274 | ||
| @@ -3512,7 +3512,7 @@ | |||
| 3512 | needed on a platform with proper driver support. | 3512 | needed on a platform with proper driver support. |
| 3513 | 3513 | ||
| 3514 | pd. [PARIDE] | 3514 | pd. [PARIDE] |
| 3515 | See Documentation/blockdev/paride.txt. | 3515 | See Documentation/admin-guide/blockdev/paride.rst. |
| 3516 | 3516 | ||
| 3517 | pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at | 3517 | pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at |
| 3518 | boot time. | 3518 | boot time. |
| @@ -3527,10 +3527,10 @@ | |||
| 3527 | and performance comparison. | 3527 | and performance comparison. |
| 3528 | 3528 | ||
| 3529 | pf. [PARIDE] | 3529 | pf. [PARIDE] |
| 3530 | See Documentation/blockdev/paride.txt. | 3530 | See Documentation/admin-guide/blockdev/paride.rst. |
| 3531 | 3531 | ||
| 3532 | pg. [PARIDE] | 3532 | pg. [PARIDE] |
| 3533 | See Documentation/blockdev/paride.txt. | 3533 | See Documentation/admin-guide/blockdev/paride.rst. |
| 3534 | 3534 | ||
| 3535 | pirq= [SMP,APIC] Manual mp-table setup | 3535 | pirq= [SMP,APIC] Manual mp-table setup |
| 3536 | See Documentation/x86/i386/IO-APIC.rst. | 3536 | See Documentation/x86/i386/IO-APIC.rst. |
| @@ -3642,7 +3642,7 @@ | |||
| 3642 | 3642 | ||
| 3643 | prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk | 3643 | prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk |
| 3644 | before loading. | 3644 | before loading. |
| 3645 | See Documentation/blockdev/ramdisk.txt. | 3645 | See Documentation/admin-guide/blockdev/ramdisk.rst. |
| 3646 | 3646 | ||
| 3647 | psi= [KNL] Enable or disable pressure stall information | 3647 | psi= [KNL] Enable or disable pressure stall information |
| 3648 | tracking. | 3648 | tracking. |
| @@ -3664,7 +3664,7 @@ | |||
| 3664 | pstore.backend= Specify the name of the pstore backend to use | 3664 | pstore.backend= Specify the name of the pstore backend to use |
| 3665 | 3665 | ||
| 3666 | pt. [PARIDE] | 3666 | pt. [PARIDE] |
| 3667 | See Documentation/blockdev/paride.txt. | 3667 | See Documentation/admin-guide/blockdev/paride.rst. |
| 3668 | 3668 | ||
| 3669 | pti= [X86_64] Control Page Table Isolation of user and | 3669 | pti= [X86_64] Control Page Table Isolation of user and |
| 3670 | kernel address spaces. Disabling this feature | 3670 | kernel address spaces. Disabling this feature |
| @@ -3693,7 +3693,7 @@ | |||
| 3693 | See Documentation/admin-guide/md.rst. | 3693 | See Documentation/admin-guide/md.rst. |
| 3694 | 3694 | ||
| 3695 | ramdisk_size= [RAM] Sizes of RAM disks in kilobytes | 3695 | ramdisk_size= [RAM] Sizes of RAM disks in kilobytes |
| 3696 | See Documentation/blockdev/ramdisk.txt. | 3696 | See Documentation/admin-guide/blockdev/ramdisk.rst. |
| 3697 | 3697 | ||
| 3698 | random.trust_cpu={on,off} | 3698 | random.trust_cpu={on,off} |
| 3699 | [KNL] Enable or disable trusting the use of the | 3699 | [KNL] Enable or disable trusting the use of the |
| @@ -4089,7 +4089,7 @@ | |||
| 4089 | 4089 | ||
| 4090 | relax_domain_level= | 4090 | relax_domain_level= |
| 4091 | [KNL, SMP] Set scheduler's default relax_domain_level. | 4091 | [KNL, SMP] Set scheduler's default relax_domain_level. |
| 4092 | See Documentation/cgroup-v1/cpusets.rst. | 4092 | See Documentation/admin-guide/cgroup-v1/cpusets.rst. |
| 4093 | 4093 | ||
| 4094 | reserve= [KNL,BUGS] Force kernel to ignore I/O ports or memory | 4094 | reserve= [KNL,BUGS] Force kernel to ignore I/O ports or memory |
| 4095 | Format: <base1>,<size1>[,<base2>,<size2>,...] | 4095 | Format: <base1>,<size1>[,<base2>,<size2>,...] |
| @@ -4347,7 +4347,7 @@ | |||
| 4347 | Format: <integer> | 4347 | Format: <integer> |
| 4348 | 4348 | ||
| 4349 | sonypi.*= [HW] Sony Programmable I/O Control Device driver | 4349 | sonypi.*= [HW] Sony Programmable I/O Control Device driver |
| 4350 | See Documentation/laptops/sonypi.txt | 4350 | See Documentation/admin-guide/laptops/sonypi.rst |
| 4351 | 4351 | ||
| 4352 | spectre_v2= [X86] Control mitigation of Spectre variant 2 | 4352 | spectre_v2= [X86] Control mitigation of Spectre variant 2 |
| 4353 | (indirect branch speculation) vulnerability. | 4353 | (indirect branch speculation) vulnerability. |
| @@ -4599,7 +4599,7 @@ | |||
| 4599 | swapaccount=[0|1] | 4599 | swapaccount=[0|1] |
| 4600 | [KNL] Enable accounting of swap in memory resource | 4600 | [KNL] Enable accounting of swap in memory resource |
| 4601 | controller if no parameter or 1 is given or disable | 4601 | controller if no parameter or 1 is given or disable |
| 4602 | it if 0 is given (See Documentation/cgroup-v1/memory.rst) | 4602 | it if 0 is given (See Documentation/admin-guide/cgroup-v1/memory.rst) |
| 4603 | 4603 | ||
| 4604 | swiotlb= [ARM,IA-64,PPC,MIPS,X86] | 4604 | swiotlb= [ARM,IA-64,PPC,MIPS,X86] |
| 4605 | Format: { <int> | force | noforce } | 4605 | Format: { <int> | force | noforce } |
| @@ -5066,7 +5066,7 @@ | |||
| 5066 | 5066 | ||
| 5067 | vga= [BOOT,X86-32] Select a particular video mode | 5067 | vga= [BOOT,X86-32] Select a particular video mode |
| 5068 | See Documentation/x86/boot.rst and | 5068 | See Documentation/x86/boot.rst and |
| 5069 | Documentation/svga.txt. | 5069 | Documentation/admin-guide/svga.rst. |
| 5070 | Use vga=ask for menu. | 5070 | Use vga=ask for menu. |
| 5071 | This is actually a boot loader parameter; the value is | 5071 | This is actually a boot loader parameter; the value is |
| 5072 | passed to the kernel using a special protocol. | 5072 | passed to the kernel using a special protocol. |
diff --git a/Documentation/kernel-per-CPU-kthreads.txt b/Documentation/admin-guide/kernel-per-CPU-kthreads.rst index 5623b9916411..4f18456dd3b1 100644 --- a/Documentation/kernel-per-CPU-kthreads.txt +++ b/Documentation/admin-guide/kernel-per-CPU-kthreads.rst | |||
| @@ -12,7 +12,7 @@ References | |||
| 12 | 12 | ||
| 13 | - Documentation/IRQ-affinity.txt: Binding interrupts to sets of CPUs. | 13 | - Documentation/IRQ-affinity.txt: Binding interrupts to sets of CPUs. |
| 14 | 14 | ||
| 15 | - Documentation/cgroup-v1: Using cgroups to bind tasks to sets of CPUs. | 15 | - Documentation/admin-guide/cgroup-v1: Using cgroups to bind tasks to sets of CPUs. |
| 16 | 16 | ||
| 17 | - man taskset: Using the taskset command to bind tasks to sets | 17 | - man taskset: Using the taskset command to bind tasks to sets |
| 18 | of CPUs. | 18 | of CPUs. |
diff --git a/Documentation/laptops/asus-laptop.txt b/Documentation/admin-guide/laptops/asus-laptop.rst index 5f2858712aa0..95176321a25a 100644 --- a/Documentation/laptops/asus-laptop.txt +++ b/Documentation/admin-guide/laptops/asus-laptop.rst | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | ================== | ||
| 1 | Asus Laptop Extras | 2 | Asus Laptop Extras |
| 3 | ================== | ||
| 2 | 4 | ||
| 3 | Version 0.1 | 5 | Version 0.1 |
| 6 | |||
| 4 | August 6, 2009 | 7 | August 6, 2009 |
| 5 | 8 | ||
| 6 | Corentin Chary <corentincj@iksaif.net> | 9 | Corentin Chary <corentincj@iksaif.net> |
| @@ -10,11 +13,12 @@ http://acpi4asus.sf.net/ | |||
| 10 | It may also support some MEDION, JVC or VICTOR laptops (such as MEDION 9675 or | 13 | It may also support some MEDION, JVC or VICTOR laptops (such as MEDION 9675 or |
| 11 | VICTOR XP7210 for example). It makes all the extra buttons generate input | 14 | VICTOR XP7210 for example). It makes all the extra buttons generate input |
| 12 | events (like keyboards). | 15 | events (like keyboards). |
| 16 | |||
| 13 | On some models adds support for changing the display brightness and output, | 17 | On some models adds support for changing the display brightness and output, |
| 14 | switching the LCD backlight on and off, and most importantly, allows you to | 18 | switching the LCD backlight on and off, and most importantly, allows you to |
| 15 | blink those fancy LEDs intended for reporting mail and wireless status. | 19 | blink those fancy LEDs intended for reporting mail and wireless status. |
| 16 | 20 | ||
| 17 | This driver supercedes the old asus_acpi driver. | 21 | This driver supersedes the old asus_acpi driver. |
| 18 | 22 | ||
| 19 | Requirements | 23 | Requirements |
| 20 | ------------ | 24 | ------------ |
| @@ -49,7 +53,7 @@ Usage | |||
| 49 | see some lines like this : | 53 | see some lines like this : |
| 50 | 54 | ||
| 51 | Asus Laptop Extras version 0.42 | 55 | Asus Laptop Extras version 0.42 |
| 52 | L2D model detected. | 56 | - L2D model detected. |
| 53 | 57 | ||
| 54 | If it is not the output you have on your laptop, send it (and the laptop's | 58 | If it is not the output you have on your laptop, send it (and the laptop's |
| 55 | DSDT) to me. | 59 | DSDT) to me. |
| @@ -68,9 +72,12 @@ Usage | |||
| 68 | LEDs | 72 | LEDs |
| 69 | ---- | 73 | ---- |
| 70 | 74 | ||
| 71 | You can modify LEDs be echoing values to /sys/class/leds/asus::*/brightness : | 75 | You can modify LEDs be echoing values to `/sys/class/leds/asus/*/brightness`:: |
| 76 | |||
| 72 | echo 1 > /sys/class/leds/asus::mail/brightness | 77 | echo 1 > /sys/class/leds/asus::mail/brightness |
| 78 | |||
| 73 | will switch the mail LED on. | 79 | will switch the mail LED on. |
| 80 | |||
| 74 | You can also know if they are on/off by reading their content and use | 81 | You can also know if they are on/off by reading their content and use |
| 75 | kernel triggers like disk-activity or heartbeat. | 82 | kernel triggers like disk-activity or heartbeat. |
| 76 | 83 | ||
| @@ -81,7 +88,7 @@ Backlight | |||
| 81 | /sys/class/backlight/asus-laptop/. Brightness Values are between 0 and 15. | 88 | /sys/class/backlight/asus-laptop/. Brightness Values are between 0 and 15. |
| 82 | 89 | ||
| 83 | Wireless devices | 90 | Wireless devices |
| 84 | --------------- | 91 | ---------------- |
| 85 | 92 | ||
| 86 | You can turn the internal Bluetooth adapter on/off with the bluetooth entry | 93 | You can turn the internal Bluetooth adapter on/off with the bluetooth entry |
| 87 | (only on models with Bluetooth). This usually controls the associated LED. | 94 | (only on models with Bluetooth). This usually controls the associated LED. |
| @@ -93,18 +100,20 @@ Display switching | |||
| 93 | Note: the display switching code is currently considered EXPERIMENTAL. | 100 | Note: the display switching code is currently considered EXPERIMENTAL. |
| 94 | 101 | ||
| 95 | Switching works for the following models: | 102 | Switching works for the following models: |
| 96 | L3800C | 103 | |
| 97 | A2500H | 104 | - L3800C |
| 98 | L5800C | 105 | - A2500H |
| 99 | M5200N | 106 | - L5800C |
| 100 | W1000N (albeit with some glitches) | 107 | - M5200N |
| 101 | M6700R | 108 | - W1000N (albeit with some glitches) |
| 102 | A6JC | 109 | - M6700R |
| 103 | F3J | 110 | - A6JC |
| 111 | - F3J | ||
| 104 | 112 | ||
| 105 | Switching doesn't work for the following: | 113 | Switching doesn't work for the following: |
| 106 | M3700N | 114 | |
| 107 | L2X00D (locks the laptop under certain conditions) | 115 | - M3700N |
| 116 | - L2X00D (locks the laptop under certain conditions) | ||
| 108 | 117 | ||
| 109 | To switch the displays, echo values from 0 to 15 to | 118 | To switch the displays, echo values from 0 to 15 to |
| 110 | /sys/devices/platform/asus-laptop/display. The significance of those values | 119 | /sys/devices/platform/asus-laptop/display. The significance of those values |
| @@ -113,48 +122,51 @@ Display switching | |||
| 113 | +-------+-----+-----+-----+-----+-----+ | 122 | +-------+-----+-----+-----+-----+-----+ |
| 114 | | Bin | Val | DVI | TV | CRT | LCD | | 123 | | Bin | Val | DVI | TV | CRT | LCD | |
| 115 | +-------+-----+-----+-----+-----+-----+ | 124 | +-------+-----+-----+-----+-----+-----+ |
| 116 | + 0000 + 0 + + + + + | 125 | | 0000 | 0 | | | | | |
| 117 | +-------+-----+-----+-----+-----+-----+ | 126 | +-------+-----+-----+-----+-----+-----+ |
| 118 | + 0001 + 1 + + + + X + | 127 | | 0001 | 1 | | | | X | |
| 119 | +-------+-----+-----+-----+-----+-----+ | 128 | +-------+-----+-----+-----+-----+-----+ |
| 120 | + 0010 + 2 + + + X + + | 129 | | 0010 | 2 | | | X | | |
| 121 | +-------+-----+-----+-----+-----+-----+ | 130 | +-------+-----+-----+-----+-----+-----+ |
| 122 | + 0011 + 3 + + + X + X + | 131 | | 0011 | 3 | | | X | X | |
| 123 | +-------+-----+-----+-----+-----+-----+ | 132 | +-------+-----+-----+-----+-----+-----+ |
| 124 | + 0100 + 4 + + X + + + | 133 | | 0100 | 4 | | X | | | |
| 125 | +-------+-----+-----+-----+-----+-----+ | 134 | +-------+-----+-----+-----+-----+-----+ |
| 126 | + 0101 + 5 + + X + + X + | 135 | | 0101 | 5 | | X | | X | |
| 127 | +-------+-----+-----+-----+-----+-----+ | 136 | +-------+-----+-----+-----+-----+-----+ |
| 128 | + 0110 + 6 + + X + X + + | 137 | | 0110 | 6 | | X | X | | |
| 129 | +-------+-----+-----+-----+-----+-----+ | 138 | +-------+-----+-----+-----+-----+-----+ |
| 130 | + 0111 + 7 + + X + X + X + | 139 | | 0111 | 7 | | X | X | X | |
| 131 | +-------+-----+-----+-----+-----+-----+ | 140 | +-------+-----+-----+-----+-----+-----+ |
| 132 | + 1000 + 8 + X + + + + | 141 | | 1000 | 8 | X | | | | |
| 133 | +-------+-----+-----+-----+-----+-----+ | 142 | +-------+-----+-----+-----+-----+-----+ |
| 134 | + 1001 + 9 + X + + + X + | 143 | | 1001 | 9 | X | | | X | |
| 135 | +-------+-----+-----+-----+-----+-----+ | 144 | +-------+-----+-----+-----+-----+-----+ |
| 136 | + 1010 + 10 + X + + X + + | 145 | | 1010 | 10 | X | | X | | |
| 137 | +-------+-----+-----+-----+-----+-----+ | 146 | +-------+-----+-----+-----+-----+-----+ |
| 138 | + 1011 + 11 + X + + X + X + | 147 | | 1011 | 11 | X | | X | X | |
| 139 | +-------+-----+-----+-----+-----+-----+ | 148 | +-------+-----+-----+-----+-----+-----+ |
| 140 | + 1100 + 12 + X + X + + + | 149 | | 1100 | 12 | X | X | | | |
| 141 | +-------+-----+-----+-----+-----+-----+ | 150 | +-------+-----+-----+-----+-----+-----+ |
| 142 | + 1101 + 13 + X + X + + X + | 151 | | 1101 | 13 | X | X | | X | |
| 143 | +-------+-----+-----+-----+-----+-----+ | 152 | +-------+-----+-----+-----+-----+-----+ |
| 144 | + 1110 + 14 + X + X + X + + | 153 | | 1110 | 14 | X | X | X | | |
| 145 | +-------+-----+-----+-----+-----+-----+ | 154 | +-------+-----+-----+-----+-----+-----+ |
| 146 | + 1111 + 15 + X + X + X + X + | 155 | | 1111 | 15 | X | X | X | X | |
| 147 | +-------+-----+-----+-----+-----+-----+ | 156 | +-------+-----+-----+-----+-----+-----+ |
| 148 | 157 | ||
| 149 | In most cases, the appropriate displays must be plugged in for the above | 158 | In most cases, the appropriate displays must be plugged in for the above |
| 150 | combinations to work. TV-Out may need to be initialized at boot time. | 159 | combinations to work. TV-Out may need to be initialized at boot time. |
| 151 | 160 | ||
| 152 | Debugging: | 161 | Debugging: |
| 162 | |||
| 153 | 1) Check whether the Fn+F8 key: | 163 | 1) Check whether the Fn+F8 key: |
| 164 | |||
| 154 | a) does not lock the laptop (try a boot with noapic / nolapic if it does) | 165 | a) does not lock the laptop (try a boot with noapic / nolapic if it does) |
| 155 | b) generates events (0x6n, where n is the value corresponding to the | 166 | b) generates events (0x6n, where n is the value corresponding to the |
| 156 | configuration above) | 167 | configuration above) |
| 157 | c) actually works | 168 | c) actually works |
| 169 | |||
| 158 | Record the disp value at every configuration. | 170 | Record the disp value at every configuration. |
| 159 | 2) Echo values from 0 to 15 to /sys/devices/platform/asus-laptop/display. | 171 | 2) Echo values from 0 to 15 to /sys/devices/platform/asus-laptop/display. |
| 160 | Record its value, note any change. If nothing changes, try a broader range, | 172 | Record its value, note any change. If nothing changes, try a broader range, |
| @@ -164,7 +176,7 @@ Display switching | |||
| 164 | 176 | ||
| 165 | Note: on some machines (e.g. L3C), after the module has been loaded, only 0x6n | 177 | Note: on some machines (e.g. L3C), after the module has been loaded, only 0x6n |
| 166 | events are generated and no actual switching occurs. In such a case, a line | 178 | events are generated and no actual switching occurs. In such a case, a line |
| 167 | like: | 179 | like:: |
| 168 | 180 | ||
| 169 | echo $((10#$arg-60)) > /sys/devices/platform/asus-laptop/display | 181 | echo $((10#$arg-60)) > /sys/devices/platform/asus-laptop/display |
| 170 | 182 | ||
| @@ -180,15 +192,16 @@ LED display | |||
| 180 | several items of information. | 192 | several items of information. |
| 181 | 193 | ||
| 182 | LED display works for the following models: | 194 | LED display works for the following models: |
| 183 | W1000N | ||
| 184 | W1J | ||
| 185 | 195 | ||
| 186 | To control the LED display, use the following : | 196 | - W1000N |
| 197 | - W1J | ||
| 198 | |||
| 199 | To control the LED display, use the following:: | ||
| 187 | 200 | ||
| 188 | echo 0x0T000DDD > /sys/devices/platform/asus-laptop/ | 201 | echo 0x0T000DDD > /sys/devices/platform/asus-laptop/ |
| 189 | 202 | ||
| 190 | where T control the 3 letters display, and DDD the 3 digits display, | 203 | where T control the 3 letters display, and DDD the 3 digits display, |
| 191 | according to the tables below. | 204 | according to the tables below:: |
| 192 | 205 | ||
| 193 | DDD (digits) | 206 | DDD (digits) |
| 194 | 000 to 999 = display digits | 207 | 000 to 999 = display digits |
| @@ -208,8 +221,8 @@ LED display | |||
| 208 | For example "echo 0x01000001 >/sys/devices/platform/asus-laptop/ledd" | 221 | For example "echo 0x01000001 >/sys/devices/platform/asus-laptop/ledd" |
| 209 | would display "DVD001". | 222 | would display "DVD001". |
| 210 | 223 | ||
| 211 | Driver options: | 224 | Driver options |
| 212 | --------------- | 225 | -------------- |
| 213 | 226 | ||
| 214 | Options can be passed to the asus-laptop driver using the standard | 227 | Options can be passed to the asus-laptop driver using the standard |
| 215 | module argument syntax (<param>=<value> when passing the option to the | 228 | module argument syntax (<param>=<value> when passing the option to the |
| @@ -219,6 +232,7 @@ Driver options: | |||
| 219 | wapf: WAPF defines the behavior of the Fn+Fx wlan key | 232 | wapf: WAPF defines the behavior of the Fn+Fx wlan key |
| 220 | The significance of values is yet to be found, but | 233 | The significance of values is yet to be found, but |
| 221 | most of the time: | 234 | most of the time: |
| 235 | |||
| 222 | - 0x0 should do nothing | 236 | - 0x0 should do nothing |
| 223 | - 0x1 should allow to control the device with Fn+Fx key. | 237 | - 0x1 should allow to control the device with Fn+Fx key. |
| 224 | - 0x4 should send an ACPI event (0x88) while pressing the Fn+Fx key | 238 | - 0x4 should send an ACPI event (0x88) while pressing the Fn+Fx key |
| @@ -237,7 +251,7 @@ Unsupported models | |||
| 237 | - ASUS L7300G | 251 | - ASUS L7300G |
| 238 | - ASUS L8400 | 252 | - ASUS L8400 |
| 239 | 253 | ||
| 240 | Patches, Errors, Questions: | 254 | Patches, Errors, Questions |
| 241 | -------------------------- | 255 | -------------------------- |
| 242 | 256 | ||
| 243 | I appreciate any success or failure | 257 | I appreciate any success or failure |
| @@ -253,5 +267,5 @@ Patches, Errors, Questions: | |||
| 253 | Any other comments or patches are also more than welcome. | 267 | Any other comments or patches are also more than welcome. |
| 254 | 268 | ||
| 255 | acpi4asus-user@lists.sourceforge.net | 269 | acpi4asus-user@lists.sourceforge.net |
| 256 | http://sourceforge.net/projects/acpi4asus | ||
| 257 | 270 | ||
| 271 | http://sourceforge.net/projects/acpi4asus | ||
diff --git a/Documentation/laptops/disk-shock-protection.txt b/Documentation/admin-guide/laptops/disk-shock-protection.rst index 0e6ba2663834..e97c5f78d8c3 100644 --- a/Documentation/laptops/disk-shock-protection.txt +++ b/Documentation/admin-guide/laptops/disk-shock-protection.rst | |||
| @@ -1,17 +1,18 @@ | |||
| 1 | ========================== | ||
| 1 | Hard disk shock protection | 2 | Hard disk shock protection |
| 2 | ========================== | 3 | ========================== |
| 3 | 4 | ||
| 4 | Author: Elias Oltmanns <eo@nebensachen.de> | 5 | Author: Elias Oltmanns <eo@nebensachen.de> |
| 6 | |||
| 5 | Last modified: 2008-10-03 | 7 | Last modified: 2008-10-03 |
| 6 | 8 | ||
| 7 | 9 | ||
| 8 | 0. Contents | 10 | .. 0. Contents |
| 9 | ----------- | ||
| 10 | 11 | ||
| 11 | 1. Intro | 12 | 1. Intro |
| 12 | 2. The interface | 13 | 2. The interface |
| 13 | 3. References | 14 | 3. References |
| 14 | 4. CREDITS | 15 | 4. CREDITS |
| 15 | 16 | ||
| 16 | 17 | ||
| 17 | 1. Intro | 18 | 1. Intro |
| @@ -36,8 +37,8 @@ that). | |||
| 36 | ---------------- | 37 | ---------------- |
| 37 | 38 | ||
| 38 | For each ATA device, the kernel exports the file | 39 | For each ATA device, the kernel exports the file |
| 39 | block/*/device/unload_heads in sysfs (here assumed to be mounted under | 40 | `block/*/device/unload_heads` in sysfs (here assumed to be mounted under |
| 40 | /sys). Access to /sys/block/*/device/unload_heads is denied with | 41 | /sys). Access to `/sys/block/*/device/unload_heads` is denied with |
| 41 | -EOPNOTSUPP if the device does not support the unload feature. | 42 | -EOPNOTSUPP if the device does not support the unload feature. |
| 42 | Otherwise, writing an integer value to this file will take the heads | 43 | Otherwise, writing an integer value to this file will take the heads |
| 43 | of the respective drive off the platter and block all I/O operations | 44 | of the respective drive off the platter and block all I/O operations |
| @@ -54,18 +55,18 @@ cancel a previously set timeout and resume normal operation | |||
| 54 | immediately by specifying a timeout of 0. Values below -2 are rejected | 55 | immediately by specifying a timeout of 0. Values below -2 are rejected |
| 55 | with -EINVAL (see below for the special meaning of -1 and -2). If the | 56 | with -EINVAL (see below for the special meaning of -1 and -2). If the |
| 56 | timeout specified for a recent head park request has not yet expired, | 57 | timeout specified for a recent head park request has not yet expired, |
| 57 | reading from /sys/block/*/device/unload_heads will report the number | 58 | reading from `/sys/block/*/device/unload_heads` will report the number |
| 58 | of milliseconds remaining until normal operation will be resumed; | 59 | of milliseconds remaining until normal operation will be resumed; |
| 59 | otherwise, reading the unload_heads attribute will return 0. | 60 | otherwise, reading the unload_heads attribute will return 0. |
| 60 | 61 | ||
| 61 | For example, do the following in order to park the heads of drive | 62 | For example, do the following in order to park the heads of drive |
| 62 | /dev/sda and stop all I/O operations for five seconds: | 63 | /dev/sda and stop all I/O operations for five seconds:: |
| 63 | 64 | ||
| 64 | # echo 5000 > /sys/block/sda/device/unload_heads | 65 | # echo 5000 > /sys/block/sda/device/unload_heads |
| 65 | 66 | ||
| 66 | A simple | 67 | A simple:: |
| 67 | 68 | ||
| 68 | # cat /sys/block/sda/device/unload_heads | 69 | # cat /sys/block/sda/device/unload_heads |
| 69 | 70 | ||
| 70 | will show you how many milliseconds are left before normal operation | 71 | will show you how many milliseconds are left before normal operation |
| 71 | will be resumed. | 72 | will be resumed. |
| @@ -112,9 +113,9 @@ unload_heads attribute. If you know that your device really does | |||
| 112 | support the unload feature (for instance, because the vendor of your | 113 | support the unload feature (for instance, because the vendor of your |
| 113 | laptop or the hard drive itself told you so), then you can tell the | 114 | laptop or the hard drive itself told you so), then you can tell the |
| 114 | kernel to enable the usage of this feature for that drive by writing | 115 | kernel to enable the usage of this feature for that drive by writing |
| 115 | the special value -1 to the unload_heads attribute: | 116 | the special value -1 to the unload_heads attribute:: |
| 116 | 117 | ||
| 117 | # echo -1 > /sys/block/sda/device/unload_heads | 118 | # echo -1 > /sys/block/sda/device/unload_heads |
| 118 | 119 | ||
| 119 | will enable the feature for /dev/sda, and giving -2 instead of -1 will | 120 | will enable the feature for /dev/sda, and giving -2 instead of -1 will |
| 120 | disable it again. | 121 | disable it again. |
| @@ -135,6 +136,7 @@ for use. Please feel free to add projects that have been the victims | |||
| 135 | of my ignorance. | 136 | of my ignorance. |
| 136 | 137 | ||
| 137 | - http://www.thinkwiki.org/wiki/HDAPS | 138 | - http://www.thinkwiki.org/wiki/HDAPS |
| 139 | |||
| 138 | See this page for information about Linux support of the hard disk | 140 | See this page for information about Linux support of the hard disk |
| 139 | active protection system as implemented in IBM/Lenovo Thinkpads. | 141 | active protection system as implemented in IBM/Lenovo Thinkpads. |
| 140 | 142 | ||
diff --git a/Documentation/admin-guide/laptops/index.rst b/Documentation/admin-guide/laptops/index.rst new file mode 100644 index 000000000000..cd9a1c2695fd --- /dev/null +++ b/Documentation/admin-guide/laptops/index.rst | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ============== | ||
| 4 | Laptop Drivers | ||
| 5 | ============== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | asus-laptop | ||
| 11 | disk-shock-protection | ||
| 12 | laptop-mode | ||
| 13 | lg-laptop | ||
| 14 | sony-laptop | ||
| 15 | sonypi | ||
| 16 | thinkpad-acpi | ||
| 17 | toshiba_haps | ||
diff --git a/Documentation/laptops/laptop-mode.txt b/Documentation/admin-guide/laptops/laptop-mode.rst index 1c707fc9b141..c984c4262f2e 100644 --- a/Documentation/laptops/laptop-mode.txt +++ b/Documentation/admin-guide/laptops/laptop-mode.rst | |||
| @@ -1,8 +1,11 @@ | |||
| 1 | =============================================== | ||
| 1 | How to conserve battery power using laptop-mode | 2 | How to conserve battery power using laptop-mode |
| 2 | ----------------------------------------------- | 3 | =============================================== |
| 3 | 4 | ||
| 4 | Document Author: Bart Samwel (bart@samwel.tk) | 5 | Document Author: Bart Samwel (bart@samwel.tk) |
| 6 | |||
| 5 | Date created: January 2, 2004 | 7 | Date created: January 2, 2004 |
| 8 | |||
| 6 | Last modified: December 06, 2004 | 9 | Last modified: December 06, 2004 |
| 7 | 10 | ||
| 8 | Introduction | 11 | Introduction |
| @@ -12,17 +15,16 @@ Laptop mode is used to minimize the time that the hard disk needs to be spun up, | |||
| 12 | to conserve battery power on laptops. It has been reported to cause significant | 15 | to conserve battery power on laptops. It has been reported to cause significant |
| 13 | power savings. | 16 | power savings. |
| 14 | 17 | ||
| 15 | Contents | 18 | .. Contents |
| 16 | -------- | ||
| 17 | 19 | ||
| 18 | * Introduction | 20 | * Introduction |
| 19 | * Installation | 21 | * Installation |
| 20 | * Caveats | 22 | * Caveats |
| 21 | * The Details | 23 | * The Details |
| 22 | * Tips & Tricks | 24 | * Tips & Tricks |
| 23 | * Control script | 25 | * Control script |
| 24 | * ACPI integration | 26 | * ACPI integration |
| 25 | * Monitoring tool | 27 | * Monitoring tool |
| 26 | 28 | ||
| 27 | 29 | ||
| 28 | Installation | 30 | Installation |
| @@ -33,7 +35,7 @@ or anything. Simply install all the files included in this document, and | |||
| 33 | laptop mode will automatically be started when you're on battery. For | 35 | laptop mode will automatically be started when you're on battery. For |
| 34 | your convenience, a tarball containing an installer can be downloaded at: | 36 | your convenience, a tarball containing an installer can be downloaded at: |
| 35 | 37 | ||
| 36 | http://www.samwel.tk/laptop_mode/laptop_mode/ | 38 | http://www.samwel.tk/laptop_mode/laptop_mode/ |
| 37 | 39 | ||
| 38 | To configure laptop mode, you need to edit the configuration file, which is | 40 | To configure laptop mode, you need to edit the configuration file, which is |
| 39 | located in /etc/default/laptop-mode on Debian-based systems, or in | 41 | located in /etc/default/laptop-mode on Debian-based systems, or in |
| @@ -209,7 +211,7 @@ Tips & Tricks | |||
| 209 | this on powerbooks too. I hope that this is a piece of information that | 211 | this on powerbooks too. I hope that this is a piece of information that |
| 210 | might be useful to the Laptop Mode patch or its users." | 212 | might be useful to the Laptop Mode patch or its users." |
| 211 | 213 | ||
| 212 | * In syslog.conf, you can prefix entries with a dash ``-'' to omit syncing the | 214 | * In syslog.conf, you can prefix entries with a dash `-` to omit syncing the |
| 213 | file after every logging. When you're using laptop-mode and your disk doesn't | 215 | file after every logging. When you're using laptop-mode and your disk doesn't |
| 214 | spin down, this is a likely culprit. | 216 | spin down, this is a likely culprit. |
| 215 | 217 | ||
| @@ -233,83 +235,82 @@ configuration file | |||
| 233 | It should be installed as /etc/default/laptop-mode on Debian, and as | 235 | It should be installed as /etc/default/laptop-mode on Debian, and as |
| 234 | /etc/sysconfig/laptop-mode on Red Hat, SUSE, Mandrake, and other work-alikes. | 236 | /etc/sysconfig/laptop-mode on Red Hat, SUSE, Mandrake, and other work-alikes. |
| 235 | 237 | ||
| 236 | --------------------CONFIG FILE BEGIN------------------------------------------- | 238 | Config file:: |
| 237 | # Maximum time, in seconds, of hard drive spindown time that you are | 239 | |
| 238 | # comfortable with. Worst case, it's possible that you could lose this | 240 | # Maximum time, in seconds, of hard drive spindown time that you are |
| 239 | # amount of work if your battery fails you while in laptop mode. | 241 | # comfortable with. Worst case, it's possible that you could lose this |
| 240 | #MAX_AGE=600 | 242 | # amount of work if your battery fails you while in laptop mode. |
| 241 | 243 | #MAX_AGE=600 | |
| 242 | # Automatically disable laptop mode when the number of minutes of battery | 244 | |
| 243 | # that you have left goes below this threshold. | 245 | # Automatically disable laptop mode when the number of minutes of battery |
| 244 | MINIMUM_BATTERY_MINUTES=10 | 246 | # that you have left goes below this threshold. |
| 245 | 247 | MINIMUM_BATTERY_MINUTES=10 | |
| 246 | # Read-ahead, in 512-byte sectors. You can spin down the disk while playing MP3/OGG | 248 | |
| 247 | # by setting the disk readahead to 8MB (READAHEAD=16384). Effectively, the disk | 249 | # Read-ahead, in 512-byte sectors. You can spin down the disk while playing MP3/OGG |
| 248 | # will read a complete MP3 at once, and will then spin down while the MP3/OGG is | 250 | # by setting the disk readahead to 8MB (READAHEAD=16384). Effectively, the disk |
| 249 | # playing. | 251 | # will read a complete MP3 at once, and will then spin down while the MP3/OGG is |
| 250 | #READAHEAD=4096 | 252 | # playing. |
| 251 | 253 | #READAHEAD=4096 | |
| 252 | # Shall we remount journaled fs. with appropriate commit interval? (1=yes) | 254 | |
| 253 | #DO_REMOUNTS=1 | 255 | # Shall we remount journaled fs. with appropriate commit interval? (1=yes) |
| 254 | 256 | #DO_REMOUNTS=1 | |
| 255 | # And shall we add the "noatime" option to that as well? (1=yes) | 257 | |
| 256 | #DO_REMOUNT_NOATIME=1 | 258 | # And shall we add the "noatime" option to that as well? (1=yes) |
| 257 | 259 | #DO_REMOUNT_NOATIME=1 | |
| 258 | # Dirty synchronous ratio. At this percentage of dirty pages the process | 260 | |
| 259 | # which | 261 | # Dirty synchronous ratio. At this percentage of dirty pages the process |
| 260 | # calls write() does its own writeback | 262 | # which |
| 261 | #DIRTY_RATIO=40 | 263 | # calls write() does its own writeback |
| 262 | 264 | #DIRTY_RATIO=40 | |
| 263 | # | 265 | |
| 264 | # Allowed dirty background ratio, in percent. Once DIRTY_RATIO has been | 266 | # |
| 265 | # exceeded, the kernel will wake flusher threads which will then reduce the | 267 | # Allowed dirty background ratio, in percent. Once DIRTY_RATIO has been |
| 266 | # amount of dirty memory to dirty_background_ratio. Set this nice and low, | 268 | # exceeded, the kernel will wake flusher threads which will then reduce the |
| 267 | # so once some writeout has commenced, we do a lot of it. | 269 | # amount of dirty memory to dirty_background_ratio. Set this nice and low, |
| 268 | # | 270 | # so once some writeout has commenced, we do a lot of it. |
| 269 | #DIRTY_BACKGROUND_RATIO=5 | 271 | # |
| 270 | 272 | #DIRTY_BACKGROUND_RATIO=5 | |
| 271 | # kernel default dirty buffer age | 273 | |
| 272 | #DEF_AGE=30 | 274 | # kernel default dirty buffer age |
| 273 | #DEF_UPDATE=5 | 275 | #DEF_AGE=30 |
| 274 | #DEF_DIRTY_BACKGROUND_RATIO=10 | 276 | #DEF_UPDATE=5 |
| 275 | #DEF_DIRTY_RATIO=40 | 277 | #DEF_DIRTY_BACKGROUND_RATIO=10 |
| 276 | #DEF_XFS_AGE_BUFFER=15 | 278 | #DEF_DIRTY_RATIO=40 |
| 277 | #DEF_XFS_SYNC_INTERVAL=30 | 279 | #DEF_XFS_AGE_BUFFER=15 |
| 278 | #DEF_XFS_BUFD_INTERVAL=1 | 280 | #DEF_XFS_SYNC_INTERVAL=30 |
| 279 | 281 | #DEF_XFS_BUFD_INTERVAL=1 | |
| 280 | # This must be adjusted manually to the value of HZ in the running kernel | 282 | |
| 281 | # on 2.4, until the XFS people change their 2.4 external interfaces to work in | 283 | # This must be adjusted manually to the value of HZ in the running kernel |
| 282 | # centisecs. This can be automated, but it's a work in progress that still | 284 | # on 2.4, until the XFS people change their 2.4 external interfaces to work in |
| 283 | # needs# some fixes. On 2.6 kernels, XFS uses USER_HZ instead of HZ for | 285 | # centisecs. This can be automated, but it's a work in progress that still |
| 284 | # external interfaces, and that is currently always set to 100. So you don't | 286 | # needs# some fixes. On 2.6 kernels, XFS uses USER_HZ instead of HZ for |
| 285 | # need to change this on 2.6. | 287 | # external interfaces, and that is currently always set to 100. So you don't |
| 286 | #XFS_HZ=100 | 288 | # need to change this on 2.6. |
| 287 | 289 | #XFS_HZ=100 | |
| 288 | # Should the maximum CPU frequency be adjusted down while on battery? | 290 | |
| 289 | # Requires CPUFreq to be setup. | 291 | # Should the maximum CPU frequency be adjusted down while on battery? |
| 290 | # See Documentation/admin-guide/pm/cpufreq.rst for more info | 292 | # Requires CPUFreq to be setup. |
| 291 | #DO_CPU=0 | 293 | # See Documentation/admin-guide/pm/cpufreq.rst for more info |
| 292 | 294 | #DO_CPU=0 | |
| 293 | # When on battery what is the maximum CPU speed that the system should | 295 | |
| 294 | # use? Legal values are "slowest" for the slowest speed that your | 296 | # When on battery what is the maximum CPU speed that the system should |
| 295 | # CPU is able to operate at, or a value listed in: | 297 | # use? Legal values are "slowest" for the slowest speed that your |
| 296 | # /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies | 298 | # CPU is able to operate at, or a value listed in: |
| 297 | # Only applicable if DO_CPU=1. | 299 | # /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies |
| 298 | #CPU_MAXFREQ=slowest | 300 | # Only applicable if DO_CPU=1. |
| 299 | 301 | #CPU_MAXFREQ=slowest | |
| 300 | # Idle timeout for your hard drive (man hdparm for valid values, -S option) | 302 | |
| 301 | # Default is 2 hours on AC (AC_HD=244) and 20 seconds for battery (BATT_HD=4). | 303 | # Idle timeout for your hard drive (man hdparm for valid values, -S option) |
| 302 | #AC_HD=244 | 304 | # Default is 2 hours on AC (AC_HD=244) and 20 seconds for battery (BATT_HD=4). |
| 303 | #BATT_HD=4 | 305 | #AC_HD=244 |
| 304 | 306 | #BATT_HD=4 | |
| 305 | # The drives for which to adjust the idle timeout. Separate them by a space, | 307 | |
| 306 | # e.g. HD="/dev/hda /dev/hdb". | 308 | # The drives for which to adjust the idle timeout. Separate them by a space, |
| 307 | #HD="/dev/hda" | 309 | # e.g. HD="/dev/hda /dev/hdb". |
| 308 | 310 | #HD="/dev/hda" | |
| 309 | # Set the spindown timeout on a hard drive? | 311 | |
| 310 | #DO_HD=1 | 312 | # Set the spindown timeout on a hard drive? |
| 311 | 313 | #DO_HD=1 | |
| 312 | --------------------CONFIG FILE END--------------------------------------------- | ||
| 313 | 314 | ||
| 314 | 315 | ||
| 315 | Control script | 316 | Control script |
| @@ -318,125 +319,126 @@ Control script | |||
| 318 | Please note that this control script works for the Linux 2.4 and 2.6 series (thanks | 319 | Please note that this control script works for the Linux 2.4 and 2.6 series (thanks |
| 319 | to Kiko Piris). | 320 | to Kiko Piris). |
| 320 | 321 | ||
| 321 | --------------------CONTROL SCRIPT BEGIN---------------------------------------- | 322 | Control script:: |
| 322 | #!/bin/bash | 323 | |
| 323 | 324 | #!/bin/bash | |
| 324 | # start or stop laptop_mode, best run by a power management daemon when | 325 | |
| 325 | # ac gets connected/disconnected from a laptop | 326 | # start or stop laptop_mode, best run by a power management daemon when |
| 326 | # | 327 | # ac gets connected/disconnected from a laptop |
| 327 | # install as /sbin/laptop_mode | 328 | # |
| 328 | # | 329 | # install as /sbin/laptop_mode |
| 329 | # Contributors to this script: Kiko Piris | 330 | # |
| 330 | # Bart Samwel | 331 | # Contributors to this script: Kiko Piris |
| 331 | # Micha Feigin | 332 | # Bart Samwel |
| 332 | # Andrew Morton | 333 | # Micha Feigin |
| 333 | # Herve Eychenne | 334 | # Andrew Morton |
| 334 | # Dax Kelson | 335 | # Herve Eychenne |
| 335 | # | 336 | # Dax Kelson |
| 336 | # Original Linux 2.4 version by: Jens Axboe | 337 | # |
| 337 | 338 | # Original Linux 2.4 version by: Jens Axboe | |
| 338 | ############################################################################# | 339 | |
| 339 | 340 | ############################################################################# | |
| 340 | # Source config | 341 | |
| 341 | if [ -f /etc/default/laptop-mode ] ; then | 342 | # Source config |
| 343 | if [ -f /etc/default/laptop-mode ] ; then | ||
| 342 | # Debian | 344 | # Debian |
| 343 | . /etc/default/laptop-mode | 345 | . /etc/default/laptop-mode |
| 344 | elif [ -f /etc/sysconfig/laptop-mode ] ; then | 346 | elif [ -f /etc/sysconfig/laptop-mode ] ; then |
| 345 | # Others | 347 | # Others |
| 346 | . /etc/sysconfig/laptop-mode | 348 | . /etc/sysconfig/laptop-mode |
| 347 | fi | 349 | fi |
| 348 | 350 | ||
| 349 | # Don't raise an error if the config file is incomplete | 351 | # Don't raise an error if the config file is incomplete |
| 350 | # set defaults instead: | 352 | # set defaults instead: |
| 351 | 353 | ||
| 352 | # Maximum time, in seconds, of hard drive spindown time that you are | 354 | # Maximum time, in seconds, of hard drive spindown time that you are |
| 353 | # comfortable with. Worst case, it's possible that you could lose this | 355 | # comfortable with. Worst case, it's possible that you could lose this |
| 354 | # amount of work if your battery fails you while in laptop mode. | 356 | # amount of work if your battery fails you while in laptop mode. |
| 355 | MAX_AGE=${MAX_AGE:-'600'} | 357 | MAX_AGE=${MAX_AGE:-'600'} |
| 356 | 358 | ||
| 357 | # Read-ahead, in kilobytes | 359 | # Read-ahead, in kilobytes |
| 358 | READAHEAD=${READAHEAD:-'4096'} | 360 | READAHEAD=${READAHEAD:-'4096'} |
| 359 | 361 | ||
| 360 | # Shall we remount journaled fs. with appropriate commit interval? (1=yes) | 362 | # Shall we remount journaled fs. with appropriate commit interval? (1=yes) |
| 361 | DO_REMOUNTS=${DO_REMOUNTS:-'1'} | 363 | DO_REMOUNTS=${DO_REMOUNTS:-'1'} |
| 362 | 364 | ||
| 363 | # And shall we add the "noatime" option to that as well? (1=yes) | 365 | # And shall we add the "noatime" option to that as well? (1=yes) |
| 364 | DO_REMOUNT_NOATIME=${DO_REMOUNT_NOATIME:-'1'} | 366 | DO_REMOUNT_NOATIME=${DO_REMOUNT_NOATIME:-'1'} |
| 365 | 367 | ||
| 366 | # Shall we adjust the idle timeout on a hard drive? | 368 | # Shall we adjust the idle timeout on a hard drive? |
| 367 | DO_HD=${DO_HD:-'1'} | 369 | DO_HD=${DO_HD:-'1'} |
| 368 | 370 | ||
| 369 | # Adjust idle timeout on which hard drive? | 371 | # Adjust idle timeout on which hard drive? |
| 370 | HD="${HD:-'/dev/hda'}" | 372 | HD="${HD:-'/dev/hda'}" |
| 371 | 373 | ||
| 372 | # spindown time for HD (hdparm -S values) | 374 | # spindown time for HD (hdparm -S values) |
| 373 | AC_HD=${AC_HD:-'244'} | 375 | AC_HD=${AC_HD:-'244'} |
| 374 | BATT_HD=${BATT_HD:-'4'} | 376 | BATT_HD=${BATT_HD:-'4'} |
| 375 | 377 | ||
| 376 | # Dirty synchronous ratio. At this percentage of dirty pages the process which | 378 | # Dirty synchronous ratio. At this percentage of dirty pages the process which |
| 377 | # calls write() does its own writeback | 379 | # calls write() does its own writeback |
| 378 | DIRTY_RATIO=${DIRTY_RATIO:-'40'} | 380 | DIRTY_RATIO=${DIRTY_RATIO:-'40'} |
| 379 | 381 | ||
| 380 | # cpu frequency scaling | 382 | # cpu frequency scaling |
| 381 | # See Documentation/admin-guide/pm/cpufreq.rst for more info | 383 | # See Documentation/admin-guide/pm/cpufreq.rst for more info |
| 382 | DO_CPU=${CPU_MANAGE:-'0'} | 384 | DO_CPU=${CPU_MANAGE:-'0'} |
| 383 | CPU_MAXFREQ=${CPU_MAXFREQ:-'slowest'} | 385 | CPU_MAXFREQ=${CPU_MAXFREQ:-'slowest'} |
| 384 | 386 | ||
| 385 | # | 387 | # |
| 386 | # Allowed dirty background ratio, in percent. Once DIRTY_RATIO has been | 388 | # Allowed dirty background ratio, in percent. Once DIRTY_RATIO has been |
| 387 | # exceeded, the kernel will wake flusher threads which will then reduce the | 389 | # exceeded, the kernel will wake flusher threads which will then reduce the |
| 388 | # amount of dirty memory to dirty_background_ratio. Set this nice and low, | 390 | # amount of dirty memory to dirty_background_ratio. Set this nice and low, |
| 389 | # so once some writeout has commenced, we do a lot of it. | 391 | # so once some writeout has commenced, we do a lot of it. |
| 390 | # | 392 | # |
| 391 | DIRTY_BACKGROUND_RATIO=${DIRTY_BACKGROUND_RATIO:-'5'} | 393 | DIRTY_BACKGROUND_RATIO=${DIRTY_BACKGROUND_RATIO:-'5'} |
| 392 | 394 | ||
| 393 | # kernel default dirty buffer age | 395 | # kernel default dirty buffer age |
| 394 | DEF_AGE=${DEF_AGE:-'30'} | 396 | DEF_AGE=${DEF_AGE:-'30'} |
| 395 | DEF_UPDATE=${DEF_UPDATE:-'5'} | 397 | DEF_UPDATE=${DEF_UPDATE:-'5'} |
| 396 | DEF_DIRTY_BACKGROUND_RATIO=${DEF_DIRTY_BACKGROUND_RATIO:-'10'} | 398 | DEF_DIRTY_BACKGROUND_RATIO=${DEF_DIRTY_BACKGROUND_RATIO:-'10'} |
| 397 | DEF_DIRTY_RATIO=${DEF_DIRTY_RATIO:-'40'} | 399 | DEF_DIRTY_RATIO=${DEF_DIRTY_RATIO:-'40'} |
| 398 | DEF_XFS_AGE_BUFFER=${DEF_XFS_AGE_BUFFER:-'15'} | 400 | DEF_XFS_AGE_BUFFER=${DEF_XFS_AGE_BUFFER:-'15'} |
| 399 | DEF_XFS_SYNC_INTERVAL=${DEF_XFS_SYNC_INTERVAL:-'30'} | 401 | DEF_XFS_SYNC_INTERVAL=${DEF_XFS_SYNC_INTERVAL:-'30'} |
| 400 | DEF_XFS_BUFD_INTERVAL=${DEF_XFS_BUFD_INTERVAL:-'1'} | 402 | DEF_XFS_BUFD_INTERVAL=${DEF_XFS_BUFD_INTERVAL:-'1'} |
| 401 | 403 | ||
| 402 | # This must be adjusted manually to the value of HZ in the running kernel | 404 | # This must be adjusted manually to the value of HZ in the running kernel |
| 403 | # on 2.4, until the XFS people change their 2.4 external interfaces to work in | 405 | # on 2.4, until the XFS people change their 2.4 external interfaces to work in |
| 404 | # centisecs. This can be automated, but it's a work in progress that still needs | 406 | # centisecs. This can be automated, but it's a work in progress that still needs |
| 405 | # some fixes. On 2.6 kernels, XFS uses USER_HZ instead of HZ for external | 407 | # some fixes. On 2.6 kernels, XFS uses USER_HZ instead of HZ for external |
| 406 | # interfaces, and that is currently always set to 100. So you don't need to | 408 | # interfaces, and that is currently always set to 100. So you don't need to |
| 407 | # change this on 2.6. | 409 | # change this on 2.6. |
| 408 | XFS_HZ=${XFS_HZ:-'100'} | 410 | XFS_HZ=${XFS_HZ:-'100'} |
| 409 | 411 | ||
| 410 | ############################################################################# | 412 | ############################################################################# |
| 411 | 413 | ||
| 412 | KLEVEL="$(uname -r | | 414 | KLEVEL="$(uname -r | |
| 413 | { | 415 | { |
| 414 | IFS='.' read a b c | 416 | IFS='.' read a b c |
| 415 | echo $a.$b | 417 | echo $a.$b |
| 416 | } | 418 | } |
| 417 | )" | 419 | )" |
| 418 | case "$KLEVEL" in | 420 | case "$KLEVEL" in |
| 419 | "2.4"|"2.6") | 421 | "2.4"|"2.6") |
| 420 | ;; | 422 | ;; |
| 421 | *) | 423 | *) |
| 422 | echo "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2 | 424 | echo "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2 |
| 423 | exit 1 | 425 | exit 1 |
| 424 | ;; | 426 | ;; |
| 425 | esac | 427 | esac |
| 426 | 428 | ||
| 427 | if [ ! -e /proc/sys/vm/laptop_mode ] ; then | 429 | if [ ! -e /proc/sys/vm/laptop_mode ] ; then |
| 428 | echo "Kernel is not patched with laptop_mode patch." >&2 | 430 | echo "Kernel is not patched with laptop_mode patch." >&2 |
| 429 | exit 1 | 431 | exit 1 |
| 430 | fi | 432 | fi |
| 431 | 433 | ||
| 432 | if [ ! -w /proc/sys/vm/laptop_mode ] ; then | 434 | if [ ! -w /proc/sys/vm/laptop_mode ] ; then |
| 433 | echo "You do not have enough privileges to enable laptop_mode." >&2 | 435 | echo "You do not have enough privileges to enable laptop_mode." >&2 |
| 434 | exit 1 | 436 | exit 1 |
| 435 | fi | 437 | fi |
| 436 | 438 | ||
| 437 | # Remove an option (the first parameter) of the form option=<number> from | 439 | # Remove an option (the first parameter) of the form option=<number> from |
| 438 | # a mount options string (the rest of the parameters). | 440 | # a mount options string (the rest of the parameters). |
| 439 | parse_mount_opts () { | 441 | parse_mount_opts () { |
| 440 | OPT="$1" | 442 | OPT="$1" |
| 441 | shift | 443 | shift |
| 442 | echo ",$*," | sed \ | 444 | echo ",$*," | sed \ |
| @@ -444,11 +446,11 @@ parse_mount_opts () { | |||
| 444 | -e 's/,,*/,/g' \ | 446 | -e 's/,,*/,/g' \ |
| 445 | -e 's/^,//' \ | 447 | -e 's/^,//' \ |
| 446 | -e 's/,$//' | 448 | -e 's/,$//' |
| 447 | } | 449 | } |
| 448 | 450 | ||
| 449 | # Remove an option (the first parameter) without any arguments from | 451 | # Remove an option (the first parameter) without any arguments from |
| 450 | # a mount option string (the rest of the parameters). | 452 | # a mount option string (the rest of the parameters). |
| 451 | parse_nonumber_mount_opts () { | 453 | parse_nonumber_mount_opts () { |
| 452 | OPT="$1" | 454 | OPT="$1" |
| 453 | shift | 455 | shift |
| 454 | echo ",$*," | sed \ | 456 | echo ",$*," | sed \ |
| @@ -456,20 +458,20 @@ parse_nonumber_mount_opts () { | |||
| 456 | -e 's/,,*/,/g' \ | 458 | -e 's/,,*/,/g' \ |
| 457 | -e 's/^,//' \ | 459 | -e 's/^,//' \ |
| 458 | -e 's/,$//' | 460 | -e 's/,$//' |
| 459 | } | 461 | } |
| 460 | 462 | ||
| 461 | # Find out the state of a yes/no option (e.g. "atime"/"noatime") in | 463 | # Find out the state of a yes/no option (e.g. "atime"/"noatime") in |
| 462 | # fstab for a given filesystem, and use this state to replace the | 464 | # fstab for a given filesystem, and use this state to replace the |
| 463 | # value of the option in another mount options string. The device | 465 | # value of the option in another mount options string. The device |
| 464 | # is the first argument, the option name the second, and the default | 466 | # is the first argument, the option name the second, and the default |
| 465 | # value the third. The remainder is the mount options string. | 467 | # value the third. The remainder is the mount options string. |
| 466 | # | 468 | # |
| 467 | # Example: | 469 | # Example: |
| 468 | # parse_yesno_opts_wfstab /dev/hda1 atime atime defaults,noatime | 470 | # parse_yesno_opts_wfstab /dev/hda1 atime atime defaults,noatime |
| 469 | # | 471 | # |
| 470 | # If fstab contains, say, "rw" for this filesystem, then the result | 472 | # If fstab contains, say, "rw" for this filesystem, then the result |
| 471 | # will be "defaults,atime". | 473 | # will be "defaults,atime". |
| 472 | parse_yesno_opts_wfstab () { | 474 | parse_yesno_opts_wfstab () { |
| 473 | L_DEV="$1" | 475 | L_DEV="$1" |
| 474 | OPT="$2" | 476 | OPT="$2" |
| 475 | DEF_OPT="$3" | 477 | DEF_OPT="$3" |
| @@ -491,21 +493,21 @@ parse_yesno_opts_wfstab () { | |||
| 491 | # option not specified in fstab -- choose the default. | 493 | # option not specified in fstab -- choose the default. |
| 492 | echo "$PARSEDOPTS1,$DEF_OPT" | 494 | echo "$PARSEDOPTS1,$DEF_OPT" |
| 493 | fi | 495 | fi |
| 494 | } | 496 | } |
| 495 | 497 | ||
| 496 | # Find out the state of a numbered option (e.g. "commit=NNN") in | 498 | # Find out the state of a numbered option (e.g. "commit=NNN") in |
| 497 | # fstab for a given filesystem, and use this state to replace the | 499 | # fstab for a given filesystem, and use this state to replace the |
| 498 | # value of the option in another mount options string. The device | 500 | # value of the option in another mount options string. The device |
| 499 | # is the first argument, and the option name the second. The | 501 | # is the first argument, and the option name the second. The |
| 500 | # remainder is the mount options string in which the replacement | 502 | # remainder is the mount options string in which the replacement |
| 501 | # must be done. | 503 | # must be done. |
| 502 | # | 504 | # |
| 503 | # Example: | 505 | # Example: |
| 504 | # parse_mount_opts_wfstab /dev/hda1 commit defaults,commit=7 | 506 | # parse_mount_opts_wfstab /dev/hda1 commit defaults,commit=7 |
| 505 | # | 507 | # |
| 506 | # If fstab contains, say, "commit=3,rw" for this filesystem, then the | 508 | # If fstab contains, say, "commit=3,rw" for this filesystem, then the |
| 507 | # result will be "rw,commit=3". | 509 | # result will be "rw,commit=3". |
| 508 | parse_mount_opts_wfstab () { | 510 | parse_mount_opts_wfstab () { |
| 509 | L_DEV="$1" | 511 | L_DEV="$1" |
| 510 | OPT="$2" | 512 | OPT="$2" |
| 511 | shift 2 | 513 | shift 2 |
| @@ -523,9 +525,9 @@ parse_mount_opts_wfstab () { | |||
| 523 | # option not specified in fstab: set it to 0 | 525 | # option not specified in fstab: set it to 0 |
| 524 | echo "$PARSEDOPTS1,$OPT=0" | 526 | echo "$PARSEDOPTS1,$OPT=0" |
| 525 | fi | 527 | fi |
| 526 | } | 528 | } |
| 527 | 529 | ||
| 528 | deduce_fstype () { | 530 | deduce_fstype () { |
| 529 | MP="$1" | 531 | MP="$1" |
| 530 | # My root filesystem unfortunately has | 532 | # My root filesystem unfortunately has |
| 531 | # type "unknown" in /etc/mtab. If we encounter | 533 | # type "unknown" in /etc/mtab. If we encounter |
| @@ -538,13 +540,13 @@ deduce_fstype () { | |||
| 538 | exit 0 | 540 | exit 0 |
| 539 | fi | 541 | fi |
| 540 | done | 542 | done |
| 541 | } | 543 | } |
| 542 | 544 | ||
| 543 | if [ $DO_REMOUNT_NOATIME -eq 1 ] ; then | 545 | if [ $DO_REMOUNT_NOATIME -eq 1 ] ; then |
| 544 | NOATIME_OPT=",noatime" | 546 | NOATIME_OPT=",noatime" |
| 545 | fi | 547 | fi |
| 546 | 548 | ||
| 547 | case "$1" in | 549 | case "$1" in |
| 548 | start) | 550 | start) |
| 549 | AGE=$((100*$MAX_AGE)) | 551 | AGE=$((100*$MAX_AGE)) |
| 550 | XFS_AGE=$(($XFS_HZ*$MAX_AGE)) | 552 | XFS_AGE=$(($XFS_HZ*$MAX_AGE)) |
| @@ -687,10 +689,9 @@ case "$1" in | |||
| 687 | exit 1 | 689 | exit 1 |
| 688 | ;; | 690 | ;; |
| 689 | 691 | ||
| 690 | esac | 692 | esac |
| 691 | 693 | ||
| 692 | exit 0 | 694 | exit 0 |
| 693 | --------------------CONTROL SCRIPT END------------------------------------------ | ||
| 694 | 695 | ||
| 695 | 696 | ||
| 696 | ACPI integration | 697 | ACPI integration |
| @@ -701,78 +702,76 @@ kick off the laptop_mode script and run hdparm. The part that | |||
| 701 | automatically disables laptop mode when the battery is low was | 702 | automatically disables laptop mode when the battery is low was |
| 702 | written by Jan Topinski. | 703 | written by Jan Topinski. |
| 703 | 704 | ||
| 704 | -----------------/etc/acpi/events/ac_adapter BEGIN------------------------------ | 705 | /etc/acpi/events/ac_adapter:: |
| 705 | event=ac_adapter | 706 | |
| 706 | action=/etc/acpi/actions/ac.sh %e | 707 | event=ac_adapter |
| 707 | ----------------/etc/acpi/events/ac_adapter END--------------------------------- | 708 | action=/etc/acpi/actions/ac.sh %e |
| 709 | |||
| 710 | /etc/acpi/events/battery:: | ||
| 708 | 711 | ||
| 712 | event=battery.* | ||
| 713 | action=/etc/acpi/actions/battery.sh %e | ||
| 709 | 714 | ||
| 710 | -----------------/etc/acpi/events/battery BEGIN--------------------------------- | 715 | /etc/acpi/actions/ac.sh:: |
| 711 | event=battery.* | ||
| 712 | action=/etc/acpi/actions/battery.sh %e | ||
| 713 | ----------------/etc/acpi/events/battery END------------------------------------ | ||
| 714 | 716 | ||
| 717 | #!/bin/bash | ||
| 715 | 718 | ||
| 716 | ----------------/etc/acpi/actions/ac.sh BEGIN----------------------------------- | 719 | # ac on/offline event handler |
| 717 | #!/bin/bash | ||
| 718 | 720 | ||
| 719 | # ac on/offline event handler | 721 | status=`awk '/^state: / { print $2 }' /proc/acpi/ac_adapter/$2/state` |
| 720 | 722 | ||
| 721 | status=`awk '/^state: / { print $2 }' /proc/acpi/ac_adapter/$2/state` | 723 | case $status in |
| 724 | "on-line") | ||
| 725 | /sbin/laptop_mode stop | ||
| 726 | exit 0 | ||
| 727 | ;; | ||
| 728 | "off-line") | ||
| 729 | /sbin/laptop_mode start | ||
| 730 | exit 0 | ||
| 731 | ;; | ||
| 732 | esac | ||
| 722 | 733 | ||
| 723 | case $status in | ||
| 724 | "on-line") | ||
| 725 | /sbin/laptop_mode stop | ||
| 726 | exit 0 | ||
| 727 | ;; | ||
| 728 | "off-line") | ||
| 729 | /sbin/laptop_mode start | ||
| 730 | exit 0 | ||
| 731 | ;; | ||
| 732 | esac | ||
| 733 | ---------------------------/etc/acpi/actions/ac.sh END-------------------------- | ||
| 734 | 734 | ||
| 735 | /etc/acpi/actions/battery.sh:: | ||
| 735 | 736 | ||
| 736 | ---------------------------/etc/acpi/actions/battery.sh BEGIN------------------- | 737 | #! /bin/bash |
| 737 | #! /bin/bash | ||
| 738 | 738 | ||
| 739 | # Automatically disable laptop mode when the battery almost runs out. | 739 | # Automatically disable laptop mode when the battery almost runs out. |
| 740 | 740 | ||
| 741 | BATT_INFO=/proc/acpi/battery/$2/state | 741 | BATT_INFO=/proc/acpi/battery/$2/state |
| 742 | 742 | ||
| 743 | if [[ -f /proc/sys/vm/laptop_mode ]] | 743 | if [[ -f /proc/sys/vm/laptop_mode ]] |
| 744 | then | 744 | then |
| 745 | LM=`cat /proc/sys/vm/laptop_mode` | 745 | LM=`cat /proc/sys/vm/laptop_mode` |
| 746 | if [[ $LM -gt 0 ]] | 746 | if [[ $LM -gt 0 ]] |
| 747 | then | ||
| 748 | if [[ -f $BATT_INFO ]] | ||
| 749 | then | 747 | then |
| 750 | # Source the config file only now that we know we need | 748 | if [[ -f $BATT_INFO ]] |
| 751 | if [ -f /etc/default/laptop-mode ] ; then | 749 | then |
| 752 | # Debian | 750 | # Source the config file only now that we know we need |
| 753 | . /etc/default/laptop-mode | 751 | if [ -f /etc/default/laptop-mode ] ; then |
| 754 | elif [ -f /etc/sysconfig/laptop-mode ] ; then | 752 | # Debian |
| 755 | # Others | 753 | . /etc/default/laptop-mode |
| 756 | . /etc/sysconfig/laptop-mode | 754 | elif [ -f /etc/sysconfig/laptop-mode ] ; then |
| 757 | fi | 755 | # Others |
| 758 | MINIMUM_BATTERY_MINUTES=${MINIMUM_BATTERY_MINUTES:-'10'} | 756 | . /etc/sysconfig/laptop-mode |
| 759 | 757 | fi | |
| 760 | ACTION="`cat $BATT_INFO | grep charging | cut -c 26-`" | 758 | MINIMUM_BATTERY_MINUTES=${MINIMUM_BATTERY_MINUTES:-'10'} |
| 761 | if [[ ACTION -eq "discharging" ]] | 759 | |
| 762 | then | 760 | ACTION="`cat $BATT_INFO | grep charging | cut -c 26-`" |
| 763 | PRESENT_RATE=`cat $BATT_INFO | grep "present rate:" | sed "s/.* \([0-9][0-9]* \).*/\1/" ` | 761 | if [[ ACTION -eq "discharging" ]] |
| 764 | REMAINING=`cat $BATT_INFO | grep "remaining capacity:" | sed "s/.* \([0-9][0-9]* \).*/\1/" ` | 762 | then |
| 765 | fi | 763 | PRESENT_RATE=`cat $BATT_INFO | grep "present rate:" | sed "s/.* \([0-9][0-9]* \).*/\1/" ` |
| 766 | if (($REMAINING * 60 / $PRESENT_RATE < $MINIMUM_BATTERY_MINUTES)) | 764 | REMAINING=`cat $BATT_INFO | grep "remaining capacity:" | sed "s/.* \([0-9][0-9]* \).*/\1/" ` |
| 767 | then | 765 | fi |
| 768 | /sbin/laptop_mode stop | 766 | if (($REMAINING * 60 / $PRESENT_RATE < $MINIMUM_BATTERY_MINUTES)) |
| 769 | fi | 767 | then |
| 770 | else | 768 | /sbin/laptop_mode stop |
| 771 | logger -p daemon.warning "You are using laptop mode and your battery interface $BATT_INFO is missing. This may lead to loss of data when the battery runs out. Check kernel ACPI support and /proc/acpi/battery folder, and edit /etc/acpi/battery.sh to set BATT_INFO to the correct path." | 769 | fi |
| 770 | else | ||
| 771 | logger -p daemon.warning "You are using laptop mode and your battery interface $BATT_INFO is missing. This may lead to loss of data when the battery runs out. Check kernel ACPI support and /proc/acpi/battery folder, and edit /etc/acpi/battery.sh to set BATT_INFO to the correct path." | ||
| 772 | fi | ||
| 772 | fi | 773 | fi |
| 773 | fi | 774 | fi |
| 774 | fi | ||
| 775 | ---------------------------/etc/acpi/actions/battery.sh END-------------------- | ||
| 776 | 775 | ||
| 777 | 776 | ||
| 778 | Monitoring tool | 777 | Monitoring tool |
diff --git a/Documentation/laptops/lg-laptop.rst b/Documentation/admin-guide/laptops/lg-laptop.rst index f2c2ffe31101..ce9b14671cb9 100644 --- a/Documentation/laptops/lg-laptop.rst +++ b/Documentation/admin-guide/laptops/lg-laptop.rst | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0+ | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | 2 | ||
| 3 | :orphan: | ||
| 4 | 3 | ||
| 5 | LG Gram laptop extra features | 4 | LG Gram laptop extra features |
| 6 | ============================= | 5 | ============================= |
diff --git a/Documentation/laptops/sony-laptop.txt b/Documentation/admin-guide/laptops/sony-laptop.rst index 978b1e615155..9edcc7f6612f 100644 --- a/Documentation/laptops/sony-laptop.txt +++ b/Documentation/admin-guide/laptops/sony-laptop.rst | |||
| @@ -1,7 +1,9 @@ | |||
| 1 | ========================================= | ||
| 1 | Sony Notebook Control Driver (SNC) Readme | 2 | Sony Notebook Control Driver (SNC) Readme |
| 2 | ----------------------------------------- | 3 | ========================================= |
| 3 | Copyright (C) 2004- 2005 Stelian Pop <stelian@popies.net> | 4 | |
| 4 | Copyright (C) 2007 Mattia Dongili <malattia@linux.it> | 5 | - Copyright (C) 2004- 2005 Stelian Pop <stelian@popies.net> |
| 6 | - Copyright (C) 2007 Mattia Dongili <malattia@linux.it> | ||
| 5 | 7 | ||
| 6 | This mini-driver drives the SNC and SPIC device present in the ACPI BIOS of the | 8 | This mini-driver drives the SNC and SPIC device present in the ACPI BIOS of the |
| 7 | Sony Vaio laptops. This driver mixes both devices functions under the same | 9 | Sony Vaio laptops. This driver mixes both devices functions under the same |
| @@ -10,6 +12,7 @@ obsoleted by sony-laptop now. | |||
| 10 | 12 | ||
| 11 | Fn keys (hotkeys): | 13 | Fn keys (hotkeys): |
| 12 | ------------------ | 14 | ------------------ |
| 15 | |||
| 13 | Some models report hotkeys through the SNC or SPIC devices, such events are | 16 | Some models report hotkeys through the SNC or SPIC devices, such events are |
| 14 | reported both through the ACPI subsystem as acpi events and through the INPUT | 17 | reported both through the ACPI subsystem as acpi events and through the INPUT |
| 15 | subsystem. See the logs of /proc/bus/input/devices to find out what those | 18 | subsystem. See the logs of /proc/bus/input/devices to find out what those |
| @@ -28,11 +31,14 @@ If your laptop model supports it, you will find sysfs files in the | |||
| 28 | /sys/class/backlight/sony/ | 31 | /sys/class/backlight/sony/ |
| 29 | directory. You will be able to query and set the current screen | 32 | directory. You will be able to query and set the current screen |
| 30 | brightness: | 33 | brightness: |
| 34 | |||
| 35 | ====================== ========================================= | ||
| 31 | brightness get/set screen brightness (an integer | 36 | brightness get/set screen brightness (an integer |
| 32 | between 0 and 7) | 37 | between 0 and 7) |
| 33 | actual_brightness reading from this file will query the HW | 38 | actual_brightness reading from this file will query the HW |
| 34 | to get real brightness value | 39 | to get real brightness value |
| 35 | max_brightness the maximum brightness value | 40 | max_brightness the maximum brightness value |
| 41 | ====================== ========================================= | ||
| 36 | 42 | ||
| 37 | 43 | ||
| 38 | Platform specific: | 44 | Platform specific: |
| @@ -45,6 +51,8 @@ You then read/write integer values from/to those files by using | |||
| 45 | standard UNIX tools. | 51 | standard UNIX tools. |
| 46 | 52 | ||
| 47 | The files are: | 53 | The files are: |
| 54 | |||
| 55 | ====================== ========================================== | ||
| 48 | brightness_default screen brightness which will be set | 56 | brightness_default screen brightness which will be set |
| 49 | when the laptop will be rebooted | 57 | when the laptop will be rebooted |
| 50 | cdpower power on/off the internal CD drive | 58 | cdpower power on/off the internal CD drive |
| @@ -53,21 +61,39 @@ The files are: | |||
| 53 | (only in debug mode) | 61 | (only in debug mode) |
| 54 | bluetoothpower power on/off the internal bluetooth device | 62 | bluetoothpower power on/off the internal bluetooth device |
| 55 | fanspeed get/set the fan speed | 63 | fanspeed get/set the fan speed |
| 64 | ====================== ========================================== | ||
| 56 | 65 | ||
| 57 | Note that some files may be missing if they are not supported | 66 | Note that some files may be missing if they are not supported |
| 58 | by your particular laptop model. | 67 | by your particular laptop model. |
| 59 | 68 | ||
| 60 | Example usage: | 69 | Example usage:: |
| 70 | |||
| 61 | # echo "1" > /sys/devices/platform/sony-laptop/brightness_default | 71 | # echo "1" > /sys/devices/platform/sony-laptop/brightness_default |
| 62 | sets the lowest screen brightness for the next and later reboots, | 72 | |
| 73 | sets the lowest screen brightness for the next and later reboots | ||
| 74 | |||
| 75 | :: | ||
| 76 | |||
| 63 | # echo "8" > /sys/devices/platform/sony-laptop/brightness_default | 77 | # echo "8" > /sys/devices/platform/sony-laptop/brightness_default |
| 64 | sets the highest screen brightness for the next and later reboots, | 78 | |
| 79 | sets the highest screen brightness for the next and later reboots | ||
| 80 | |||
| 81 | :: | ||
| 82 | |||
| 65 | # cat /sys/devices/platform/sony-laptop/brightness_default | 83 | # cat /sys/devices/platform/sony-laptop/brightness_default |
| 66 | retrieves the value. | 84 | |
| 85 | retrieves the value | ||
| 86 | |||
| 87 | :: | ||
| 67 | 88 | ||
| 68 | # echo "0" > /sys/devices/platform/sony-laptop/audiopower | 89 | # echo "0" > /sys/devices/platform/sony-laptop/audiopower |
| 69 | powers off the sound card, | 90 | |
| 91 | powers off the sound card | ||
| 92 | |||
| 93 | :: | ||
| 94 | |||
| 70 | # echo "1" > /sys/devices/platform/sony-laptop/audiopower | 95 | # echo "1" > /sys/devices/platform/sony-laptop/audiopower |
| 96 | |||
| 71 | powers on the sound card. | 97 | powers on the sound card. |
| 72 | 98 | ||
| 73 | 99 | ||
| @@ -76,7 +102,8 @@ RFkill control: | |||
| 76 | More recent Vaio models expose a consistent set of ACPI methods to | 102 | More recent Vaio models expose a consistent set of ACPI methods to |
| 77 | control radio frequency emitting devices. If you are a lucky owner of | 103 | control radio frequency emitting devices. If you are a lucky owner of |
| 78 | such a laptop you will find the necessary rfkill devices under | 104 | such a laptop you will find the necessary rfkill devices under |
| 79 | /sys/class/rfkill. Check those starting with sony-* in | 105 | /sys/class/rfkill. Check those starting with sony-* in:: |
| 106 | |||
| 80 | # grep . /sys/class/rfkill/*/{state,name} | 107 | # grep . /sys/class/rfkill/*/{state,name} |
| 81 | 108 | ||
| 82 | 109 | ||
| @@ -88,26 +115,29 @@ you are not afraid of any side effects doing strange things with | |||
| 88 | your ACPI BIOS could have on your laptop), load the driver and | 115 | your ACPI BIOS could have on your laptop), load the driver and |
| 89 | pass the option 'debug=1'. | 116 | pass the option 'debug=1'. |
| 90 | 117 | ||
| 91 | REPEAT: DON'T DO THIS IF YOU DON'T LIKE RISKY BUSINESS. | 118 | REPEAT: |
| 119 | **DON'T DO THIS IF YOU DON'T LIKE RISKY BUSINESS.** | ||
| 92 | 120 | ||
| 93 | In your kernel logs you will find the list of all ACPI methods | 121 | In your kernel logs you will find the list of all ACPI methods |
| 94 | the SNC device has on your laptop. | 122 | the SNC device has on your laptop. |
| 95 | 123 | ||
| 96 | * For new models you will see a long list of meaningless method names, | 124 | * For new models you will see a long list of meaningless method names, |
| 97 | reading the DSDT table source should reveal that: | 125 | reading the DSDT table source should reveal that: |
| 126 | |||
| 98 | (1) the SNC device uses an internal capability lookup table | 127 | (1) the SNC device uses an internal capability lookup table |
| 99 | (2) SN00 is used to find values in the lookup table | 128 | (2) SN00 is used to find values in the lookup table |
| 100 | (3) SN06 and SN07 are used to call into the real methods based on | 129 | (3) SN06 and SN07 are used to call into the real methods based on |
| 101 | offsets you can obtain iterating the table using SN00 | 130 | offsets you can obtain iterating the table using SN00 |
| 102 | (4) SN02 used to enable events. | 131 | (4) SN02 used to enable events. |
| 132 | |||
| 103 | Some values in the capability lookup table are more or less known, see | 133 | Some values in the capability lookup table are more or less known, see |
| 104 | the code for all sony_call_snc_handle calls, others are more obscure. | 134 | the code for all sony_call_snc_handle calls, others are more obscure. |
| 105 | 135 | ||
| 106 | * For old models you can see the GCDP/GCDP methods used to pwer on/off | 136 | * For old models you can see the GCDP/GCDP methods used to pwer on/off |
| 107 | the CD drive, but there are others and they are usually different from | 137 | the CD drive, but there are others and they are usually different from |
| 108 | model to model. | 138 | model to model. |
| 109 | 139 | ||
| 110 | I HAVE NO IDEA WHAT THOSE METHODS DO. | 140 | **I HAVE NO IDEA WHAT THOSE METHODS DO.** |
| 111 | 141 | ||
| 112 | The sony-laptop driver creates, for some of those methods (the most | 142 | The sony-laptop driver creates, for some of those methods (the most |
| 113 | current ones found on several Vaio models), an entry under | 143 | current ones found on several Vaio models), an entry under |
diff --git a/Documentation/laptops/sonypi.txt b/Documentation/admin-guide/laptops/sonypi.rst index 606bdb9ce036..c6eaaf48f7c1 100644 --- a/Documentation/laptops/sonypi.txt +++ b/Documentation/admin-guide/laptops/sonypi.rst | |||
| @@ -1,11 +1,13 @@ | |||
| 1 | ================================================== | ||
| 1 | Sony Programmable I/O Control Device Driver Readme | 2 | Sony Programmable I/O Control Device Driver Readme |
| 2 | -------------------------------------------------- | 3 | ================================================== |
| 3 | Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net> | 4 | |
| 4 | Copyright (C) 2001-2002 Alcôve <www.alcove.com> | 5 | - Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net> |
| 5 | Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au> | 6 | - Copyright (C) 2001-2002 Alcôve <www.alcove.com> |
| 6 | Copyright (C) 2001 Junichi Morita <jun1m@mars.dti.ne.jp> | 7 | - Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au> |
| 7 | Copyright (C) 2000 Takaya Kinjo <t-kinjo@tc4.so-net.ne.jp> | 8 | - Copyright (C) 2001 Junichi Morita <jun1m@mars.dti.ne.jp> |
| 8 | Copyright (C) 2000 Andrew Tridgell <tridge@samba.org> | 9 | - Copyright (C) 2000 Takaya Kinjo <t-kinjo@tc4.so-net.ne.jp> |
| 10 | - Copyright (C) 2000 Andrew Tridgell <tridge@samba.org> | ||
| 9 | 11 | ||
| 10 | This driver enables access to the Sony Programmable I/O Control Device which | 12 | This driver enables access to the Sony Programmable I/O Control Device which |
| 11 | can be found in many Sony Vaio laptops. Some newer Sony laptops (seems to be | 13 | can be found in many Sony Vaio laptops. Some newer Sony laptops (seems to be |
| @@ -14,6 +16,7 @@ sonypi device and are not supported at all by this driver. | |||
| 14 | 16 | ||
| 15 | It will give access (through a user space utility) to some events those laptops | 17 | It will give access (through a user space utility) to some events those laptops |
| 16 | generate, like: | 18 | generate, like: |
| 19 | |||
| 17 | - jogdial events (the small wheel on the side of Vaios) | 20 | - jogdial events (the small wheel on the side of Vaios) |
| 18 | - capture button events (only on Vaio Picturebook series) | 21 | - capture button events (only on Vaio Picturebook series) |
| 19 | - Fn keys | 22 | - Fn keys |
| @@ -49,7 +52,8 @@ module argument syntax (<param>=<value> when passing the option to the | |||
| 49 | module or sonypi.<param>=<value> on the kernel boot line when sonypi is | 52 | module or sonypi.<param>=<value> on the kernel boot line when sonypi is |
| 50 | statically linked into the kernel). Those options are: | 53 | statically linked into the kernel). Those options are: |
| 51 | 54 | ||
| 52 | minor: minor number of the misc device /dev/sonypi, | 55 | =============== ======================================================= |
| 56 | minor: minor number of the misc device /dev/sonypi, | ||
| 53 | default is -1 (automatic allocation, see /proc/misc | 57 | default is -1 (automatic allocation, see /proc/misc |
| 54 | or kernel logs) | 58 | or kernel logs) |
| 55 | 59 | ||
| @@ -85,17 +89,18 @@ statically linked into the kernel). Those options are: | |||
| 85 | set to 0xffffffff, meaning that all possible events | 89 | set to 0xffffffff, meaning that all possible events |
| 86 | will be tried. You can use the following bits to | 90 | will be tried. You can use the following bits to |
| 87 | construct your own event mask (from | 91 | construct your own event mask (from |
| 88 | drivers/char/sonypi.h): | 92 | drivers/char/sonypi.h):: |
| 89 | SONYPI_JOGGER_MASK 0x0001 | 93 | |
| 90 | SONYPI_CAPTURE_MASK 0x0002 | 94 | SONYPI_JOGGER_MASK 0x0001 |
| 91 | SONYPI_FNKEY_MASK 0x0004 | 95 | SONYPI_CAPTURE_MASK 0x0002 |
| 92 | SONYPI_BLUETOOTH_MASK 0x0008 | 96 | SONYPI_FNKEY_MASK 0x0004 |
| 93 | SONYPI_PKEY_MASK 0x0010 | 97 | SONYPI_BLUETOOTH_MASK 0x0008 |
| 94 | SONYPI_BACK_MASK 0x0020 | 98 | SONYPI_PKEY_MASK 0x0010 |
| 95 | SONYPI_HELP_MASK 0x0040 | 99 | SONYPI_BACK_MASK 0x0020 |
| 96 | SONYPI_LID_MASK 0x0080 | 100 | SONYPI_HELP_MASK 0x0040 |
| 97 | SONYPI_ZOOM_MASK 0x0100 | 101 | SONYPI_LID_MASK 0x0080 |
| 98 | SONYPI_THUMBPHRASE_MASK 0x0200 | 102 | SONYPI_ZOOM_MASK 0x0100 |
| 103 | SONYPI_THUMBPHRASE_MASK 0x0200 | ||
| 99 | SONYPI_MEYE_MASK 0x0400 | 104 | SONYPI_MEYE_MASK 0x0400 |
| 100 | SONYPI_MEMORYSTICK_MASK 0x0800 | 105 | SONYPI_MEMORYSTICK_MASK 0x0800 |
| 101 | SONYPI_BATTERY_MASK 0x1000 | 106 | SONYPI_BATTERY_MASK 0x1000 |
| @@ -105,17 +110,18 @@ statically linked into the kernel). Those options are: | |||
| 105 | created, one which interprets the jogdial events as | 110 | created, one which interprets the jogdial events as |
| 106 | mouse events, the other one which acts like a | 111 | mouse events, the other one which acts like a |
| 107 | keyboard reporting the pressing of the special keys. | 112 | keyboard reporting the pressing of the special keys. |
| 113 | =============== ======================================================= | ||
| 108 | 114 | ||
| 109 | Module use: | 115 | Module use: |
| 110 | ----------- | 116 | ----------- |
| 111 | 117 | ||
| 112 | In order to automatically load the sonypi module on use, you can put those | 118 | In order to automatically load the sonypi module on use, you can put those |
| 113 | lines a configuration file in /etc/modprobe.d/: | 119 | lines a configuration file in /etc/modprobe.d/:: |
| 114 | 120 | ||
| 115 | alias char-major-10-250 sonypi | 121 | alias char-major-10-250 sonypi |
| 116 | options sonypi minor=250 | 122 | options sonypi minor=250 |
| 117 | 123 | ||
| 118 | This supposes the use of minor 250 for the sonypi device: | 124 | This supposes the use of minor 250 for the sonypi device:: |
| 119 | 125 | ||
| 120 | # mknod /dev/sonypi c 10 250 | 126 | # mknod /dev/sonypi c 10 250 |
| 121 | 127 | ||
| @@ -148,5 +154,5 @@ Bugs: | |||
| 148 | http://www.acc.umu.se/~erikw/program/smartdimmer-0.1.tar.bz2 | 154 | http://www.acc.umu.se/~erikw/program/smartdimmer-0.1.tar.bz2 |
| 149 | 155 | ||
| 150 | - since all development was done by reverse engineering, there is | 156 | - since all development was done by reverse engineering, there is |
| 151 | _absolutely no guarantee_ that this driver will not crash your | 157 | *absolutely no guarantee* that this driver will not crash your |
| 152 | laptop. Permanently. | 158 | laptop. Permanently. |
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/admin-guide/laptops/thinkpad-acpi.rst index 75ef063622d2..adea0bf2acc5 100644 --- a/Documentation/laptops/thinkpad-acpi.txt +++ b/Documentation/admin-guide/laptops/thinkpad-acpi.rst | |||
| @@ -1,12 +1,15 @@ | |||
| 1 | ThinkPad ACPI Extras Driver | 1 | =========================== |
| 2 | ThinkPad ACPI Extras Driver | ||
| 3 | =========================== | ||
| 2 | 4 | ||
| 3 | Version 0.25 | 5 | Version 0.25 |
| 4 | October 16th, 2013 | ||
| 5 | 6 | ||
| 6 | Borislav Deianov <borislav@users.sf.net> | 7 | October 16th, 2013 |
| 7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | ||
| 8 | http://ibm-acpi.sf.net/ | ||
| 9 | 8 | ||
| 9 | - Borislav Deianov <borislav@users.sf.net> | ||
| 10 | - Henrique de Moraes Holschuh <hmh@hmh.eng.br> | ||
| 11 | |||
| 12 | http://ibm-acpi.sf.net/ | ||
| 10 | 13 | ||
| 11 | This is a Linux driver for the IBM and Lenovo ThinkPad laptops. It | 14 | This is a Linux driver for the IBM and Lenovo ThinkPad laptops. It |
| 12 | supports various features of these laptops which are accessible | 15 | supports various features of these laptops which are accessible |
| @@ -91,7 +94,8 @@ yet ready or stabilized, it is expected that this interface will change, | |||
| 91 | and any and all userspace programs must deal with it. | 94 | and any and all userspace programs must deal with it. |
| 92 | 95 | ||
| 93 | 96 | ||
| 94 | Notes about the sysfs interface: | 97 | Notes about the sysfs interface |
| 98 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 95 | 99 | ||
| 96 | Unlike what was done with the procfs interface, correctness when talking | 100 | Unlike what was done with the procfs interface, correctness when talking |
| 97 | to the sysfs interfaces will be enforced, as will correctness in the | 101 | to the sysfs interfaces will be enforced, as will correctness in the |
| @@ -129,6 +133,7 @@ Driver version | |||
| 129 | -------------- | 133 | -------------- |
| 130 | 134 | ||
| 131 | procfs: /proc/acpi/ibm/driver | 135 | procfs: /proc/acpi/ibm/driver |
| 136 | |||
| 132 | sysfs driver attribute: version | 137 | sysfs driver attribute: version |
| 133 | 138 | ||
| 134 | The driver name and version. No commands can be written to this file. | 139 | The driver name and version. No commands can be written to this file. |
| @@ -141,9 +146,13 @@ sysfs driver attribute: interface_version | |||
| 141 | 146 | ||
| 142 | Version of the thinkpad-acpi sysfs interface, as an unsigned long | 147 | Version of the thinkpad-acpi sysfs interface, as an unsigned long |
| 143 | (output in hex format: 0xAAAABBCC), where: | 148 | (output in hex format: 0xAAAABBCC), where: |
| 144 | AAAA - major revision | 149 | |
| 145 | BB - minor revision | 150 | AAAA |
| 146 | CC - bugfix revision | 151 | - major revision |
| 152 | BB | ||
| 153 | - minor revision | ||
| 154 | CC | ||
| 155 | - bugfix revision | ||
| 147 | 156 | ||
| 148 | The sysfs interface version changelog for the driver can be found at the | 157 | The sysfs interface version changelog for the driver can be found at the |
| 149 | end of this document. Changes to the sysfs interface done by the kernel | 158 | end of this document. Changes to the sysfs interface done by the kernel |
| @@ -170,6 +179,7 @@ Hot keys | |||
| 170 | -------- | 179 | -------- |
| 171 | 180 | ||
| 172 | procfs: /proc/acpi/ibm/hotkey | 181 | procfs: /proc/acpi/ibm/hotkey |
| 182 | |||
| 173 | sysfs device attribute: hotkey_* | 183 | sysfs device attribute: hotkey_* |
| 174 | 184 | ||
| 175 | In a ThinkPad, the ACPI HKEY handler is responsible for communicating | 185 | In a ThinkPad, the ACPI HKEY handler is responsible for communicating |
| @@ -181,7 +191,7 @@ firmware will behave in many situations. | |||
| 181 | The driver enables the HKEY ("hot key") event reporting automatically | 191 | The driver enables the HKEY ("hot key") event reporting automatically |
| 182 | when loaded, and disables it when it is removed. | 192 | when loaded, and disables it when it is removed. |
| 183 | 193 | ||
| 184 | The driver will report HKEY events in the following format: | 194 | The driver will report HKEY events in the following format:: |
| 185 | 195 | ||
| 186 | ibm/hotkey HKEY 00000080 0000xxxx | 196 | ibm/hotkey HKEY 00000080 0000xxxx |
| 187 | 197 | ||
| @@ -217,9 +227,10 @@ ThinkPads, it is still possible to support some extra hotkeys by | |||
| 217 | polling the "CMOS NVRAM" at least 10 times per second. The driver | 227 | polling the "CMOS NVRAM" at least 10 times per second. The driver |
| 218 | attempts to enables this functionality automatically when required. | 228 | attempts to enables this functionality automatically when required. |
| 219 | 229 | ||
| 220 | procfs notes: | 230 | procfs notes |
| 231 | ^^^^^^^^^^^^ | ||
| 221 | 232 | ||
| 222 | The following commands can be written to the /proc/acpi/ibm/hotkey file: | 233 | The following commands can be written to the /proc/acpi/ibm/hotkey file:: |
| 223 | 234 | ||
| 224 | echo 0xffffffff > /proc/acpi/ibm/hotkey -- enable all hot keys | 235 | echo 0xffffffff > /proc/acpi/ibm/hotkey -- enable all hot keys |
| 225 | echo 0 > /proc/acpi/ibm/hotkey -- disable all possible hot keys | 236 | echo 0 > /proc/acpi/ibm/hotkey -- disable all possible hot keys |
| @@ -227,7 +238,7 @@ The following commands can be written to the /proc/acpi/ibm/hotkey file: | |||
| 227 | echo reset > /proc/acpi/ibm/hotkey -- restore the recommended mask | 238 | echo reset > /proc/acpi/ibm/hotkey -- restore the recommended mask |
| 228 | 239 | ||
| 229 | The following commands have been deprecated and will cause the kernel | 240 | The following commands have been deprecated and will cause the kernel |
| 230 | to log a warning: | 241 | to log a warning:: |
| 231 | 242 | ||
| 232 | echo enable > /proc/acpi/ibm/hotkey -- does nothing | 243 | echo enable > /proc/acpi/ibm/hotkey -- does nothing |
| 233 | echo disable > /proc/acpi/ibm/hotkey -- returns an error | 244 | echo disable > /proc/acpi/ibm/hotkey -- returns an error |
| @@ -237,7 +248,8 @@ maintain maximum bug-to-bug compatibility, it does not report any masks, | |||
| 237 | nor does it allow one to manipulate the hot key mask when the firmware | 248 | nor does it allow one to manipulate the hot key mask when the firmware |
| 238 | does not support masks at all, even if NVRAM polling is in use. | 249 | does not support masks at all, even if NVRAM polling is in use. |
| 239 | 250 | ||
| 240 | sysfs notes: | 251 | sysfs notes |
| 252 | ^^^^^^^^^^^ | ||
| 241 | 253 | ||
| 242 | hotkey_bios_enabled: | 254 | hotkey_bios_enabled: |
| 243 | DEPRECATED, WILL BE REMOVED SOON. | 255 | DEPRECATED, WILL BE REMOVED SOON. |
| @@ -349,7 +361,8 @@ sysfs notes: | |||
| 349 | 361 | ||
| 350 | This attribute has poll()/select() support. | 362 | This attribute has poll()/select() support. |
| 351 | 363 | ||
| 352 | input layer notes: | 364 | input layer notes |
| 365 | ^^^^^^^^^^^^^^^^^ | ||
| 353 | 366 | ||
| 354 | A Hot key is mapped to a single input layer EV_KEY event, possibly | 367 | A Hot key is mapped to a single input layer EV_KEY event, possibly |
| 355 | followed by an EV_MSC MSC_SCAN event that shall contain that key's scan | 368 | followed by an EV_MSC MSC_SCAN event that shall contain that key's scan |
| @@ -362,11 +375,13 @@ remapping KEY_UNKNOWN keys. | |||
| 362 | 375 | ||
| 363 | The events are available in an input device, with the following id: | 376 | The events are available in an input device, with the following id: |
| 364 | 377 | ||
| 365 | Bus: BUS_HOST | 378 | ============== ============================== |
| 366 | vendor: 0x1014 (PCI_VENDOR_ID_IBM) or | 379 | Bus BUS_HOST |
| 380 | vendor 0x1014 (PCI_VENDOR_ID_IBM) or | ||
| 367 | 0x17aa (PCI_VENDOR_ID_LENOVO) | 381 | 0x17aa (PCI_VENDOR_ID_LENOVO) |
| 368 | product: 0x5054 ("TP") | 382 | product 0x5054 ("TP") |
| 369 | version: 0x4101 | 383 | version 0x4101 |
| 384 | ============== ============================== | ||
| 370 | 385 | ||
| 371 | The version will have its LSB incremented if the keymap changes in a | 386 | The version will have its LSB incremented if the keymap changes in a |
| 372 | backwards-compatible way. The MSB shall always be 0x41 for this input | 387 | backwards-compatible way. The MSB shall always be 0x41 for this input |
| @@ -380,9 +395,10 @@ backwards-compatible change for this input device. | |||
| 380 | 395 | ||
| 381 | Thinkpad-acpi Hot Key event map (version 0x4101): | 396 | Thinkpad-acpi Hot Key event map (version 0x4101): |
| 382 | 397 | ||
| 398 | ======= ======= ============== ============================================== | ||
| 383 | ACPI Scan | 399 | ACPI Scan |
| 384 | event code Key Notes | 400 | event code Key Notes |
| 385 | 401 | ======= ======= ============== ============================================== | |
| 386 | 0x1001 0x00 FN+F1 - | 402 | 0x1001 0x00 FN+F1 - |
| 387 | 403 | ||
| 388 | 0x1002 0x01 FN+F2 IBM: battery (rare) | 404 | 0x1002 0x01 FN+F2 IBM: battery (rare) |
| @@ -426,7 +442,9 @@ event code Key Notes | |||
| 426 | or toggle screen expand | 442 | or toggle screen expand |
| 427 | 443 | ||
| 428 | 0x1009 0x08 FN+F9 - | 444 | 0x1009 0x08 FN+F9 - |
| 429 | .. .. .. | 445 | |
| 446 | ... ... ... ... | ||
| 447 | |||
| 430 | 0x100B 0x0A FN+F11 - | 448 | 0x100B 0x0A FN+F11 - |
| 431 | 449 | ||
| 432 | 0x100C 0x0B FN+F12 Sleep to disk. You are always | 450 | 0x100C 0x0B FN+F12 Sleep to disk. You are always |
| @@ -480,8 +498,11 @@ event code Key Notes | |||
| 480 | 0x1018 0x17 THINKPAD ThinkPad/Access IBM/Lenovo key | 498 | 0x1018 0x17 THINKPAD ThinkPad/Access IBM/Lenovo key |
| 481 | 499 | ||
| 482 | 0x1019 0x18 unknown | 500 | 0x1019 0x18 unknown |
| 483 | .. .. .. | 501 | |
| 502 | ... ... ... | ||
| 503 | |||
| 484 | 0x1020 0x1F unknown | 504 | 0x1020 0x1F unknown |
| 505 | ======= ======= ============== ============================================== | ||
| 485 | 506 | ||
| 486 | The ThinkPad firmware does not allow one to differentiate when most hot | 507 | The ThinkPad firmware does not allow one to differentiate when most hot |
| 487 | keys are pressed or released (either that, or we don't know how to, yet). | 508 | keys are pressed or released (either that, or we don't know how to, yet). |
| @@ -499,14 +520,17 @@ generate input device EV_KEY events. | |||
| 499 | In addition to the EV_KEY events, thinkpad-acpi may also issue EV_SW | 520 | In addition to the EV_KEY events, thinkpad-acpi may also issue EV_SW |
| 500 | events for switches: | 521 | events for switches: |
| 501 | 522 | ||
| 523 | ============== ============================================== | ||
| 502 | SW_RFKILL_ALL T60 and later hardware rfkill rocker switch | 524 | SW_RFKILL_ALL T60 and later hardware rfkill rocker switch |
| 503 | SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A | 525 | SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A |
| 526 | ============== ============================================== | ||
| 504 | 527 | ||
| 505 | Non hotkey ACPI HKEY event map: | 528 | Non hotkey ACPI HKEY event map |
| 506 | ------------------------------- | 529 | ------------------------------ |
| 507 | 530 | ||
| 508 | Events that are never propagated by the driver: | 531 | Events that are never propagated by the driver: |
| 509 | 532 | ||
| 533 | ====== ================================================== | ||
| 510 | 0x2304 System is waking up from suspend to undock | 534 | 0x2304 System is waking up from suspend to undock |
| 511 | 0x2305 System is waking up from suspend to eject bay | 535 | 0x2305 System is waking up from suspend to eject bay |
| 512 | 0x2404 System is waking up from hibernation to undock | 536 | 0x2404 System is waking up from hibernation to undock |
| @@ -519,10 +543,12 @@ Events that are never propagated by the driver: | |||
| 519 | 0x6000 KEYBOARD: Numlock key pressed | 543 | 0x6000 KEYBOARD: Numlock key pressed |
| 520 | 0x6005 KEYBOARD: Fn key pressed (TO BE VERIFIED) | 544 | 0x6005 KEYBOARD: Fn key pressed (TO BE VERIFIED) |
| 521 | 0x7000 Radio Switch may have changed state | 545 | 0x7000 Radio Switch may have changed state |
| 546 | ====== ================================================== | ||
| 522 | 547 | ||
| 523 | 548 | ||
| 524 | Events that are propagated by the driver to userspace: | 549 | Events that are propagated by the driver to userspace: |
| 525 | 550 | ||
| 551 | ====== ===================================================== | ||
| 526 | 0x2313 ALARM: System is waking up from suspend because | 552 | 0x2313 ALARM: System is waking up from suspend because |
| 527 | the battery is nearly empty | 553 | the battery is nearly empty |
| 528 | 0x2413 ALARM: System is waking up from hibernation because | 554 | 0x2413 ALARM: System is waking up from hibernation because |
| @@ -544,6 +570,7 @@ Events that are propagated by the driver to userspace: | |||
| 544 | 0x6040 Nvidia Optimus/AC adapter related (TO BE VERIFIED) | 570 | 0x6040 Nvidia Optimus/AC adapter related (TO BE VERIFIED) |
| 545 | 0x60C0 X1 Yoga 2016, Tablet mode status changed | 571 | 0x60C0 X1 Yoga 2016, Tablet mode status changed |
| 546 | 0x60F0 Thermal Transformation changed (GMTS, Windows) | 572 | 0x60F0 Thermal Transformation changed (GMTS, Windows) |
| 573 | ====== ===================================================== | ||
| 547 | 574 | ||
| 548 | Battery nearly empty alarms are a last resort attempt to get the | 575 | Battery nearly empty alarms are a last resort attempt to get the |
| 549 | operating system to hibernate or shutdown cleanly (0x2313), or shutdown | 576 | operating system to hibernate or shutdown cleanly (0x2313), or shutdown |
| @@ -562,7 +589,8 @@ cycle, or a system shutdown. Obviously, something is very wrong if this | |||
| 562 | happens. | 589 | happens. |
| 563 | 590 | ||
| 564 | 591 | ||
| 565 | Brightness hotkey notes: | 592 | Brightness hotkey notes |
| 593 | ^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 566 | 594 | ||
| 567 | Don't mess with the brightness hotkeys in a Thinkpad. If you want | 595 | Don't mess with the brightness hotkeys in a Thinkpad. If you want |
| 568 | notifications for OSD, use the sysfs backlight class event support. | 596 | notifications for OSD, use the sysfs backlight class event support. |
| @@ -579,7 +607,9 @@ Bluetooth | |||
| 579 | --------- | 607 | --------- |
| 580 | 608 | ||
| 581 | procfs: /proc/acpi/ibm/bluetooth | 609 | procfs: /proc/acpi/ibm/bluetooth |
| 610 | |||
| 582 | sysfs device attribute: bluetooth_enable (deprecated) | 611 | sysfs device attribute: bluetooth_enable (deprecated) |
| 612 | |||
| 583 | sysfs rfkill class: switch "tpacpi_bluetooth_sw" | 613 | sysfs rfkill class: switch "tpacpi_bluetooth_sw" |
| 584 | 614 | ||
| 585 | This feature shows the presence and current state of a ThinkPad | 615 | This feature shows the presence and current state of a ThinkPad |
| @@ -588,36 +618,39 @@ Bluetooth device in the internal ThinkPad CDC slot. | |||
| 588 | If the ThinkPad supports it, the Bluetooth state is stored in NVRAM, | 618 | If the ThinkPad supports it, the Bluetooth state is stored in NVRAM, |
| 589 | so it is kept across reboots and power-off. | 619 | so it is kept across reboots and power-off. |
| 590 | 620 | ||
| 591 | Procfs notes: | 621 | Procfs notes |
| 622 | ^^^^^^^^^^^^ | ||
| 592 | 623 | ||
| 593 | If Bluetooth is installed, the following commands can be used: | 624 | If Bluetooth is installed, the following commands can be used:: |
| 594 | 625 | ||
| 595 | echo enable > /proc/acpi/ibm/bluetooth | 626 | echo enable > /proc/acpi/ibm/bluetooth |
| 596 | echo disable > /proc/acpi/ibm/bluetooth | 627 | echo disable > /proc/acpi/ibm/bluetooth |
| 597 | 628 | ||
| 598 | Sysfs notes: | 629 | Sysfs notes |
| 630 | ^^^^^^^^^^^ | ||
| 599 | 631 | ||
| 600 | If the Bluetooth CDC card is installed, it can be enabled / | 632 | If the Bluetooth CDC card is installed, it can be enabled / |
| 601 | disabled through the "bluetooth_enable" thinkpad-acpi device | 633 | disabled through the "bluetooth_enable" thinkpad-acpi device |
| 602 | attribute, and its current status can also be queried. | 634 | attribute, and its current status can also be queried. |
| 603 | 635 | ||
| 604 | enable: | 636 | enable: |
| 605 | 0: disables Bluetooth / Bluetooth is disabled | 637 | |
| 606 | 1: enables Bluetooth / Bluetooth is enabled. | 638 | - 0: disables Bluetooth / Bluetooth is disabled |
| 639 | - 1: enables Bluetooth / Bluetooth is enabled. | ||
| 607 | 640 | ||
| 608 | Note: this interface has been superseded by the generic rfkill | 641 | Note: this interface has been superseded by the generic rfkill |
| 609 | class. It has been deprecated, and it will be removed in year | 642 | class. It has been deprecated, and it will be removed in year |
| 610 | 2010. | 643 | 2010. |
| 611 | 644 | ||
| 612 | rfkill controller switch "tpacpi_bluetooth_sw": refer to | 645 | rfkill controller switch "tpacpi_bluetooth_sw": refer to |
| 613 | Documentation/rfkill.txt for details. | 646 | Documentation/driver-api/rfkill.rst for details. |
| 614 | 647 | ||
| 615 | 648 | ||
| 616 | Video output control -- /proc/acpi/ibm/video | 649 | Video output control -- /proc/acpi/ibm/video |
| 617 | -------------------------------------------- | 650 | -------------------------------------------- |
| 618 | 651 | ||
| 619 | This feature allows control over the devices used for video output - | 652 | This feature allows control over the devices used for video output - |
| 620 | LCD, CRT or DVI (if available). The following commands are available: | 653 | LCD, CRT or DVI (if available). The following commands are available:: |
| 621 | 654 | ||
| 622 | echo lcd_enable > /proc/acpi/ibm/video | 655 | echo lcd_enable > /proc/acpi/ibm/video |
| 623 | echo lcd_disable > /proc/acpi/ibm/video | 656 | echo lcd_disable > /proc/acpi/ibm/video |
| @@ -630,9 +663,10 @@ LCD, CRT or DVI (if available). The following commands are available: | |||
| 630 | echo expand_toggle > /proc/acpi/ibm/video | 663 | echo expand_toggle > /proc/acpi/ibm/video |
| 631 | echo video_switch > /proc/acpi/ibm/video | 664 | echo video_switch > /proc/acpi/ibm/video |
| 632 | 665 | ||
| 633 | NOTE: Access to this feature is restricted to processes owning the | 666 | NOTE: |
| 634 | CAP_SYS_ADMIN capability for safety reasons, as it can interact badly | 667 | Access to this feature is restricted to processes owning the |
| 635 | enough with some versions of X.org to crash it. | 668 | CAP_SYS_ADMIN capability for safety reasons, as it can interact badly |
| 669 | enough with some versions of X.org to crash it. | ||
| 636 | 670 | ||
| 637 | Each video output device can be enabled or disabled individually. | 671 | Each video output device can be enabled or disabled individually. |
| 638 | Reading /proc/acpi/ibm/video shows the status of each device. | 672 | Reading /proc/acpi/ibm/video shows the status of each device. |
| @@ -665,18 +699,21 @@ ThinkLight control | |||
| 665 | ------------------ | 699 | ------------------ |
| 666 | 700 | ||
| 667 | procfs: /proc/acpi/ibm/light | 701 | procfs: /proc/acpi/ibm/light |
| 702 | |||
| 668 | sysfs attributes: as per LED class, for the "tpacpi::thinklight" LED | 703 | sysfs attributes: as per LED class, for the "tpacpi::thinklight" LED |
| 669 | 704 | ||
| 670 | procfs notes: | 705 | procfs notes |
| 706 | ^^^^^^^^^^^^ | ||
| 671 | 707 | ||
| 672 | The ThinkLight status can be read and set through the procfs interface. A | 708 | The ThinkLight status can be read and set through the procfs interface. A |
| 673 | few models which do not make the status available will show the ThinkLight | 709 | few models which do not make the status available will show the ThinkLight |
| 674 | status as "unknown". The available commands are: | 710 | status as "unknown". The available commands are:: |
| 675 | 711 | ||
| 676 | echo on > /proc/acpi/ibm/light | 712 | echo on > /proc/acpi/ibm/light |
| 677 | echo off > /proc/acpi/ibm/light | 713 | echo off > /proc/acpi/ibm/light |
| 678 | 714 | ||
| 679 | sysfs notes: | 715 | sysfs notes |
| 716 | ^^^^^^^^^^^ | ||
| 680 | 717 | ||
| 681 | The ThinkLight sysfs interface is documented by the LED class | 718 | The ThinkLight sysfs interface is documented by the LED class |
| 682 | documentation, in Documentation/leds/leds-class.rst. The ThinkLight LED name | 719 | documentation, in Documentation/leds/leds-class.rst. The ThinkLight LED name |
| @@ -691,6 +728,7 @@ CMOS/UCMS control | |||
| 691 | ----------------- | 728 | ----------------- |
| 692 | 729 | ||
| 693 | procfs: /proc/acpi/ibm/cmos | 730 | procfs: /proc/acpi/ibm/cmos |
| 731 | |||
| 694 | sysfs device attribute: cmos_command | 732 | sysfs device attribute: cmos_command |
| 695 | 733 | ||
| 696 | This feature is mostly used internally by the ACPI firmware to keep the legacy | 734 | This feature is mostly used internally by the ACPI firmware to keep the legacy |
| @@ -707,16 +745,16 @@ The range of valid cmos command numbers is 0 to 21, but not all have an | |||
| 707 | effect and the behavior varies from model to model. Here is the behavior | 745 | effect and the behavior varies from model to model. Here is the behavior |
| 708 | on the X40 (tpb is the ThinkPad Buttons utility): | 746 | on the X40 (tpb is the ThinkPad Buttons utility): |
| 709 | 747 | ||
| 710 | 0 - Related to "Volume down" key press | 748 | - 0 - Related to "Volume down" key press |
| 711 | 1 - Related to "Volume up" key press | 749 | - 1 - Related to "Volume up" key press |
| 712 | 2 - Related to "Mute on" key press | 750 | - 2 - Related to "Mute on" key press |
| 713 | 3 - Related to "Access IBM" key press | 751 | - 3 - Related to "Access IBM" key press |
| 714 | 4 - Related to "LCD brightness up" key press | 752 | - 4 - Related to "LCD brightness up" key press |
| 715 | 5 - Related to "LCD brightness down" key press | 753 | - 5 - Related to "LCD brightness down" key press |
| 716 | 11 - Related to "toggle screen expansion" key press/function | 754 | - 11 - Related to "toggle screen expansion" key press/function |
| 717 | 12 - Related to "ThinkLight on" | 755 | - 12 - Related to "ThinkLight on" |
| 718 | 13 - Related to "ThinkLight off" | 756 | - 13 - Related to "ThinkLight off" |
| 719 | 14 - Related to "ThinkLight" key press (toggle ThinkLight) | 757 | - 14 - Related to "ThinkLight" key press (toggle ThinkLight) |
| 720 | 758 | ||
| 721 | The cmos command interface is prone to firmware split-brain problems, as | 759 | The cmos command interface is prone to firmware split-brain problems, as |
| 722 | in newer ThinkPads it is just a compatibility layer. Do not use it, it is | 760 | in newer ThinkPads it is just a compatibility layer. Do not use it, it is |
| @@ -748,9 +786,10 @@ are aware of the consequences are welcome to enabling it. | |||
| 748 | Audio mute and microphone mute LEDs are supported, but currently not | 786 | Audio mute and microphone mute LEDs are supported, but currently not |
| 749 | visible to userspace. They are used by the snd-hda-intel audio driver. | 787 | visible to userspace. They are used by the snd-hda-intel audio driver. |
| 750 | 788 | ||
| 751 | procfs notes: | 789 | procfs notes |
| 790 | ^^^^^^^^^^^^ | ||
| 752 | 791 | ||
| 753 | The available commands are: | 792 | The available commands are:: |
| 754 | 793 | ||
| 755 | echo '<LED number> on' >/proc/acpi/ibm/led | 794 | echo '<LED number> on' >/proc/acpi/ibm/led |
| 756 | echo '<LED number> off' >/proc/acpi/ibm/led | 795 | echo '<LED number> off' >/proc/acpi/ibm/led |
| @@ -760,23 +799,24 @@ The <LED number> range is 0 to 15. The set of LEDs that can be | |||
| 760 | controlled varies from model to model. Here is the common ThinkPad | 799 | controlled varies from model to model. Here is the common ThinkPad |
| 761 | mapping: | 800 | mapping: |
| 762 | 801 | ||
| 763 | 0 - power | 802 | - 0 - power |
| 764 | 1 - battery (orange) | 803 | - 1 - battery (orange) |
| 765 | 2 - battery (green) | 804 | - 2 - battery (green) |
| 766 | 3 - UltraBase/dock | 805 | - 3 - UltraBase/dock |
| 767 | 4 - UltraBay | 806 | - 4 - UltraBay |
| 768 | 5 - UltraBase battery slot | 807 | - 5 - UltraBase battery slot |
| 769 | 6 - (unknown) | 808 | - 6 - (unknown) |
| 770 | 7 - standby | 809 | - 7 - standby |
| 771 | 8 - dock status 1 | 810 | - 8 - dock status 1 |
| 772 | 9 - dock status 2 | 811 | - 9 - dock status 2 |
| 773 | 10, 11 - (unknown) | 812 | - 10, 11 - (unknown) |
| 774 | 12 - thinkvantage | 813 | - 12 - thinkvantage |
| 775 | 13, 14, 15 - (unknown) | 814 | - 13, 14, 15 - (unknown) |
| 776 | 815 | ||
| 777 | All of the above can be turned on and off and can be made to blink. | 816 | All of the above can be turned on and off and can be made to blink. |
| 778 | 817 | ||
| 779 | sysfs notes: | 818 | sysfs notes |
| 819 | ^^^^^^^^^^^ | ||
| 780 | 820 | ||
| 781 | The ThinkPad LED sysfs interface is described in detail by the LED class | 821 | The ThinkPad LED sysfs interface is described in detail by the LED class |
| 782 | documentation, in Documentation/leds/leds-class.rst. | 822 | documentation, in Documentation/leds/leds-class.rst. |
| @@ -815,7 +855,7 @@ The BEEP method is used internally by the ACPI firmware to provide | |||
| 815 | audible alerts in various situations. This feature allows the same | 855 | audible alerts in various situations. This feature allows the same |
| 816 | sounds to be triggered manually. | 856 | sounds to be triggered manually. |
| 817 | 857 | ||
| 818 | The commands are non-negative integer numbers: | 858 | The commands are non-negative integer numbers:: |
| 819 | 859 | ||
| 820 | echo <number> >/proc/acpi/ibm/beep | 860 | echo <number> >/proc/acpi/ibm/beep |
| 821 | 861 | ||
| @@ -823,25 +863,26 @@ The valid <number> range is 0 to 17. Not all numbers trigger sounds | |||
| 823 | and the sounds vary from model to model. Here is the behavior on the | 863 | and the sounds vary from model to model. Here is the behavior on the |
| 824 | X40: | 864 | X40: |
| 825 | 865 | ||
| 826 | 0 - stop a sound in progress (but use 17 to stop 16) | 866 | - 0 - stop a sound in progress (but use 17 to stop 16) |
| 827 | 2 - two beeps, pause, third beep ("low battery") | 867 | - 2 - two beeps, pause, third beep ("low battery") |
| 828 | 3 - single beep | 868 | - 3 - single beep |
| 829 | 4 - high, followed by low-pitched beep ("unable") | 869 | - 4 - high, followed by low-pitched beep ("unable") |
| 830 | 5 - single beep | 870 | - 5 - single beep |
| 831 | 6 - very high, followed by high-pitched beep ("AC/DC") | 871 | - 6 - very high, followed by high-pitched beep ("AC/DC") |
| 832 | 7 - high-pitched beep | 872 | - 7 - high-pitched beep |
| 833 | 9 - three short beeps | 873 | - 9 - three short beeps |
| 834 | 10 - very long beep | 874 | - 10 - very long beep |
| 835 | 12 - low-pitched beep | 875 | - 12 - low-pitched beep |
| 836 | 15 - three high-pitched beeps repeating constantly, stop with 0 | 876 | - 15 - three high-pitched beeps repeating constantly, stop with 0 |
| 837 | 16 - one medium-pitched beep repeating constantly, stop with 17 | 877 | - 16 - one medium-pitched beep repeating constantly, stop with 17 |
| 838 | 17 - stop 16 | 878 | - 17 - stop 16 |
| 839 | 879 | ||
| 840 | 880 | ||
| 841 | Temperature sensors | 881 | Temperature sensors |
| 842 | ------------------- | 882 | ------------------- |
| 843 | 883 | ||
| 844 | procfs: /proc/acpi/ibm/thermal | 884 | procfs: /proc/acpi/ibm/thermal |
| 885 | |||
| 845 | sysfs device attributes: (hwmon "thinkpad") temp*_input | 886 | sysfs device attributes: (hwmon "thinkpad") temp*_input |
| 846 | 887 | ||
| 847 | Most ThinkPads include six or more separate temperature sensors but only | 888 | Most ThinkPads include six or more separate temperature sensors but only |
| @@ -850,10 +891,14 @@ feature shows readings from up to eight different sensors on older | |||
| 850 | ThinkPads, and up to sixteen different sensors on newer ThinkPads. | 891 | ThinkPads, and up to sixteen different sensors on newer ThinkPads. |
| 851 | 892 | ||
| 852 | For example, on the X40, a typical output may be: | 893 | For example, on the X40, a typical output may be: |
| 853 | temperatures: 42 42 45 41 36 -128 33 -128 | 894 | |
| 895 | temperatures: | ||
| 896 | 42 42 45 41 36 -128 33 -128 | ||
| 854 | 897 | ||
| 855 | On the T43/p, a typical output may be: | 898 | On the T43/p, a typical output may be: |
| 856 | temperatures: 48 48 36 52 38 -128 31 -128 48 52 48 -128 -128 -128 -128 -128 | 899 | |
| 900 | temperatures: | ||
| 901 | 48 48 36 52 38 -128 31 -128 48 52 48 -128 -128 -128 -128 -128 | ||
| 857 | 902 | ||
| 858 | The mapping of thermal sensors to physical locations varies depending on | 903 | The mapping of thermal sensors to physical locations varies depending on |
| 859 | system-board model (and thus, on ThinkPad model). | 904 | system-board model (and thus, on ThinkPad model). |
| @@ -863,46 +908,53 @@ tries to track down these locations for various models. | |||
| 863 | 908 | ||
| 864 | Most (newer?) models seem to follow this pattern: | 909 | Most (newer?) models seem to follow this pattern: |
| 865 | 910 | ||
| 866 | 1: CPU | 911 | - 1: CPU |
| 867 | 2: (depends on model) | 912 | - 2: (depends on model) |
| 868 | 3: (depends on model) | 913 | - 3: (depends on model) |
| 869 | 4: GPU | 914 | - 4: GPU |
| 870 | 5: Main battery: main sensor | 915 | - 5: Main battery: main sensor |
| 871 | 6: Bay battery: main sensor | 916 | - 6: Bay battery: main sensor |
| 872 | 7: Main battery: secondary sensor | 917 | - 7: Main battery: secondary sensor |
| 873 | 8: Bay battery: secondary sensor | 918 | - 8: Bay battery: secondary sensor |
| 874 | 9-15: (depends on model) | 919 | - 9-15: (depends on model) |
| 875 | 920 | ||
| 876 | For the R51 (source: Thomas Gruber): | 921 | For the R51 (source: Thomas Gruber): |
| 877 | 2: Mini-PCI | 922 | |
| 878 | 3: Internal HDD | 923 | - 2: Mini-PCI |
| 924 | - 3: Internal HDD | ||
| 879 | 925 | ||
| 880 | For the T43, T43/p (source: Shmidoax/Thinkwiki.org) | 926 | For the T43, T43/p (source: Shmidoax/Thinkwiki.org) |
| 881 | http://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_T43.2C_T43p | 927 | http://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_T43.2C_T43p |
| 882 | 2: System board, left side (near PCMCIA slot), reported as HDAPS temp | 928 | |
| 883 | 3: PCMCIA slot | 929 | - 2: System board, left side (near PCMCIA slot), reported as HDAPS temp |
| 884 | 9: MCH (northbridge) to DRAM Bus | 930 | - 3: PCMCIA slot |
| 885 | 10: Clock-generator, mini-pci card and ICH (southbridge), under Mini-PCI | 931 | - 9: MCH (northbridge) to DRAM Bus |
| 886 | card, under touchpad | 932 | - 10: Clock-generator, mini-pci card and ICH (southbridge), under Mini-PCI |
| 887 | 11: Power regulator, underside of system board, below F2 key | 933 | card, under touchpad |
| 934 | - 11: Power regulator, underside of system board, below F2 key | ||
| 888 | 935 | ||
| 889 | The A31 has a very atypical layout for the thermal sensors | 936 | The A31 has a very atypical layout for the thermal sensors |
| 890 | (source: Milos Popovic, http://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_A31) | 937 | (source: Milos Popovic, http://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_A31) |
| 891 | 1: CPU | ||
| 892 | 2: Main Battery: main sensor | ||
| 893 | 3: Power Converter | ||
| 894 | 4: Bay Battery: main sensor | ||
| 895 | 5: MCH (northbridge) | ||
| 896 | 6: PCMCIA/ambient | ||
| 897 | 7: Main Battery: secondary sensor | ||
| 898 | 8: Bay Battery: secondary sensor | ||
| 899 | 938 | ||
| 939 | - 1: CPU | ||
| 940 | - 2: Main Battery: main sensor | ||
| 941 | - 3: Power Converter | ||
| 942 | - 4: Bay Battery: main sensor | ||
| 943 | - 5: MCH (northbridge) | ||
| 944 | - 6: PCMCIA/ambient | ||
| 945 | - 7: Main Battery: secondary sensor | ||
| 946 | - 8: Bay Battery: secondary sensor | ||
| 947 | |||
| 948 | |||
| 949 | Procfs notes | ||
| 950 | ^^^^^^^^^^^^ | ||
| 900 | 951 | ||
| 901 | Procfs notes: | ||
| 902 | Readings from sensors that are not available return -128. | 952 | Readings from sensors that are not available return -128. |
| 903 | No commands can be written to this file. | 953 | No commands can be written to this file. |
| 904 | 954 | ||
| 905 | Sysfs notes: | 955 | Sysfs notes |
| 956 | ^^^^^^^^^^^ | ||
| 957 | |||
| 906 | Sensors that are not available return the ENXIO error. This | 958 | Sensors that are not available return the ENXIO error. This |
| 907 | status may change at runtime, as there are hotplug thermal | 959 | status may change at runtime, as there are hotplug thermal |
| 908 | sensors, like those inside the batteries and docks. | 960 | sensors, like those inside the batteries and docks. |
| @@ -921,6 +973,7 @@ ftp://ftp.suse.com/pub/people/trenn/sources/ec | |||
| 921 | 973 | ||
| 922 | Use it to determine the register holding the fan | 974 | Use it to determine the register holding the fan |
| 923 | speed on some models. To do that, do the following: | 975 | speed on some models. To do that, do the following: |
| 976 | |||
| 924 | - make sure the battery is fully charged | 977 | - make sure the battery is fully charged |
| 925 | - make sure the fan is running | 978 | - make sure the fan is running |
| 926 | - use above mentioned tool to read out the EC | 979 | - use above mentioned tool to read out the EC |
| @@ -941,6 +994,7 @@ LCD brightness control | |||
| 941 | ---------------------- | 994 | ---------------------- |
| 942 | 995 | ||
| 943 | procfs: /proc/acpi/ibm/brightness | 996 | procfs: /proc/acpi/ibm/brightness |
| 997 | |||
| 944 | sysfs backlight device "thinkpad_screen" | 998 | sysfs backlight device "thinkpad_screen" |
| 945 | 999 | ||
| 946 | This feature allows software control of the LCD brightness on ThinkPad | 1000 | This feature allows software control of the LCD brightness on ThinkPad |
| @@ -985,15 +1039,17 @@ brightness_enable=0 forces it to be disabled. brightness_enable=1 | |||
| 985 | forces it to be enabled when available, even if the standard ACPI | 1039 | forces it to be enabled when available, even if the standard ACPI |
| 986 | interface is also available. | 1040 | interface is also available. |
| 987 | 1041 | ||
| 988 | Procfs notes: | 1042 | Procfs notes |
| 1043 | ^^^^^^^^^^^^ | ||
| 989 | 1044 | ||
| 990 | The available commands are: | 1045 | The available commands are:: |
| 991 | 1046 | ||
| 992 | echo up >/proc/acpi/ibm/brightness | 1047 | echo up >/proc/acpi/ibm/brightness |
| 993 | echo down >/proc/acpi/ibm/brightness | 1048 | echo down >/proc/acpi/ibm/brightness |
| 994 | echo 'level <level>' >/proc/acpi/ibm/brightness | 1049 | echo 'level <level>' >/proc/acpi/ibm/brightness |
| 995 | 1050 | ||
| 996 | Sysfs notes: | 1051 | Sysfs notes |
| 1052 | ^^^^^^^^^^^ | ||
| 997 | 1053 | ||
| 998 | The interface is implemented through the backlight sysfs class, which is | 1054 | The interface is implemented through the backlight sysfs class, which is |
| 999 | poorly documented at this time. | 1055 | poorly documented at this time. |
| @@ -1038,6 +1094,7 @@ Volume control (Console Audio control) | |||
| 1038 | -------------------------------------- | 1094 | -------------------------------------- |
| 1039 | 1095 | ||
| 1040 | procfs: /proc/acpi/ibm/volume | 1096 | procfs: /proc/acpi/ibm/volume |
| 1097 | |||
| 1041 | ALSA: "ThinkPad Console Audio Control", default ID: "ThinkPadEC" | 1098 | ALSA: "ThinkPad Console Audio Control", default ID: "ThinkPadEC" |
| 1042 | 1099 | ||
| 1043 | NOTE: by default, the volume control interface operates in read-only | 1100 | NOTE: by default, the volume control interface operates in read-only |
| @@ -1053,7 +1110,8 @@ Software volume control should be done only in the main AC97/HDA | |||
| 1053 | mixer. | 1110 | mixer. |
| 1054 | 1111 | ||
| 1055 | 1112 | ||
| 1056 | About the ThinkPad Console Audio control: | 1113 | About the ThinkPad Console Audio control |
| 1114 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 1057 | 1115 | ||
| 1058 | ThinkPads have a built-in amplifier and muting circuit that drives the | 1116 | ThinkPads have a built-in amplifier and muting circuit that drives the |
| 1059 | console headphone and speakers. This circuit is after the main AC97 | 1117 | console headphone and speakers. This circuit is after the main AC97 |
| @@ -1092,13 +1150,14 @@ normal key presses to the operating system (thinkpad-acpi is not | |||
| 1092 | involved). | 1150 | involved). |
| 1093 | 1151 | ||
| 1094 | 1152 | ||
| 1095 | The ThinkPad-ACPI volume control: | 1153 | The ThinkPad-ACPI volume control |
| 1154 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 1096 | 1155 | ||
| 1097 | The preferred way to interact with the Console Audio control is the | 1156 | The preferred way to interact with the Console Audio control is the |
| 1098 | ALSA interface. | 1157 | ALSA interface. |
| 1099 | 1158 | ||
| 1100 | The legacy procfs interface allows one to read the current state, | 1159 | The legacy procfs interface allows one to read the current state, |
| 1101 | and if volume control is enabled, accepts the following commands: | 1160 | and if volume control is enabled, accepts the following commands:: |
| 1102 | 1161 | ||
| 1103 | echo up >/proc/acpi/ibm/volume | 1162 | echo up >/proc/acpi/ibm/volume |
| 1104 | echo down >/proc/acpi/ibm/volume | 1163 | echo down >/proc/acpi/ibm/volume |
| @@ -1137,13 +1196,15 @@ Fan control and monitoring: fan speed, fan enable/disable | |||
| 1137 | --------------------------------------------------------- | 1196 | --------------------------------------------------------- |
| 1138 | 1197 | ||
| 1139 | procfs: /proc/acpi/ibm/fan | 1198 | procfs: /proc/acpi/ibm/fan |
| 1140 | sysfs device attributes: (hwmon "thinkpad") fan1_input, pwm1, | 1199 | |
| 1141 | pwm1_enable, fan2_input | 1200 | sysfs device attributes: (hwmon "thinkpad") fan1_input, pwm1, pwm1_enable, fan2_input |
| 1201 | |||
| 1142 | sysfs hwmon driver attributes: fan_watchdog | 1202 | sysfs hwmon driver attributes: fan_watchdog |
| 1143 | 1203 | ||
| 1144 | NOTE NOTE NOTE: fan control operations are disabled by default for | 1204 | NOTE NOTE NOTE: |
| 1145 | safety reasons. To enable them, the module parameter "fan_control=1" | 1205 | fan control operations are disabled by default for |
| 1146 | must be given to thinkpad-acpi. | 1206 | safety reasons. To enable them, the module parameter "fan_control=1" |
| 1207 | must be given to thinkpad-acpi. | ||
| 1147 | 1208 | ||
| 1148 | This feature attempts to show the current fan speed, control mode and | 1209 | This feature attempts to show the current fan speed, control mode and |
| 1149 | other fan data that might be available. The speed is read directly | 1210 | other fan data that might be available. The speed is read directly |
| @@ -1154,7 +1215,8 @@ value on other models. | |||
| 1154 | Some Lenovo ThinkPads support a secondary fan. This fan cannot be | 1215 | Some Lenovo ThinkPads support a secondary fan. This fan cannot be |
| 1155 | controlled separately, it shares the main fan control. | 1216 | controlled separately, it shares the main fan control. |
| 1156 | 1217 | ||
| 1157 | Fan levels: | 1218 | Fan levels |
| 1219 | ^^^^^^^^^^ | ||
| 1158 | 1220 | ||
| 1159 | Most ThinkPad fans work in "levels" at the firmware interface. Level 0 | 1221 | Most ThinkPad fans work in "levels" at the firmware interface. Level 0 |
| 1160 | stops the fan. The higher the level, the higher the fan speed, although | 1222 | stops the fan. The higher the level, the higher the fan speed, although |
| @@ -1209,9 +1271,10 @@ therefore, not suitable to protect against fan mode changes made through | |||
| 1209 | means other than the "enable", "disable", and "level" procfs fan | 1271 | means other than the "enable", "disable", and "level" procfs fan |
| 1210 | commands, or the hwmon fan control sysfs interface. | 1272 | commands, or the hwmon fan control sysfs interface. |
| 1211 | 1273 | ||
| 1212 | Procfs notes: | 1274 | Procfs notes |
| 1275 | ^^^^^^^^^^^^ | ||
| 1213 | 1276 | ||
| 1214 | The fan may be enabled or disabled with the following commands: | 1277 | The fan may be enabled or disabled with the following commands:: |
| 1215 | 1278 | ||
| 1216 | echo enable >/proc/acpi/ibm/fan | 1279 | echo enable >/proc/acpi/ibm/fan |
| 1217 | echo disable >/proc/acpi/ibm/fan | 1280 | echo disable >/proc/acpi/ibm/fan |
| @@ -1219,7 +1282,7 @@ The fan may be enabled or disabled with the following commands: | |||
| 1219 | Placing a fan on level 0 is the same as disabling it. Enabling a fan | 1282 | Placing a fan on level 0 is the same as disabling it. Enabling a fan |
| 1220 | will try to place it in a safe level if it is too slow or disabled. | 1283 | will try to place it in a safe level if it is too slow or disabled. |
| 1221 | 1284 | ||
| 1222 | The fan level can be controlled with the command: | 1285 | The fan level can be controlled with the command:: |
| 1223 | 1286 | ||
| 1224 | echo 'level <level>' > /proc/acpi/ibm/fan | 1287 | echo 'level <level>' > /proc/acpi/ibm/fan |
| 1225 | 1288 | ||
| @@ -1231,7 +1294,7 @@ compatibility. | |||
| 1231 | 1294 | ||
| 1232 | On the X31 and X40 (and ONLY on those models), the fan speed can be | 1295 | On the X31 and X40 (and ONLY on those models), the fan speed can be |
| 1233 | controlled to a certain degree. Once the fan is running, it can be | 1296 | controlled to a certain degree. Once the fan is running, it can be |
| 1234 | forced to run faster or slower with the following command: | 1297 | forced to run faster or slower with the following command:: |
| 1235 | 1298 | ||
| 1236 | echo 'speed <speed>' > /proc/acpi/ibm/fan | 1299 | echo 'speed <speed>' > /proc/acpi/ibm/fan |
| 1237 | 1300 | ||
| @@ -1241,13 +1304,14 @@ effect or the fan speed eventually settles somewhere in that range. The | |||
| 1241 | fan cannot be stopped or started with this command. This functionality | 1304 | fan cannot be stopped or started with this command. This functionality |
| 1242 | is incomplete, and not available through the sysfs interface. | 1305 | is incomplete, and not available through the sysfs interface. |
| 1243 | 1306 | ||
| 1244 | To program the safety watchdog, use the "watchdog" command. | 1307 | To program the safety watchdog, use the "watchdog" command:: |
| 1245 | 1308 | ||
| 1246 | echo 'watchdog <interval in seconds>' > /proc/acpi/ibm/fan | 1309 | echo 'watchdog <interval in seconds>' > /proc/acpi/ibm/fan |
| 1247 | 1310 | ||
| 1248 | If you want to disable the watchdog, use 0 as the interval. | 1311 | If you want to disable the watchdog, use 0 as the interval. |
| 1249 | 1312 | ||
| 1250 | Sysfs notes: | 1313 | Sysfs notes |
| 1314 | ^^^^^^^^^^^ | ||
| 1251 | 1315 | ||
| 1252 | The sysfs interface follows the hwmon subsystem guidelines for the most | 1316 | The sysfs interface follows the hwmon subsystem guidelines for the most |
| 1253 | part, and the exception is the fan safety watchdog. | 1317 | part, and the exception is the fan safety watchdog. |
| @@ -1261,10 +1325,10 @@ to the firmware). | |||
| 1261 | Features not yet implemented by the driver return ENOSYS. | 1325 | Features not yet implemented by the driver return ENOSYS. |
| 1262 | 1326 | ||
| 1263 | hwmon device attribute pwm1_enable: | 1327 | hwmon device attribute pwm1_enable: |
| 1264 | 0: PWM offline (fan is set to full-speed mode) | 1328 | - 0: PWM offline (fan is set to full-speed mode) |
| 1265 | 1: Manual PWM control (use pwm1 to set fan level) | 1329 | - 1: Manual PWM control (use pwm1 to set fan level) |
| 1266 | 2: Hardware PWM control (EC "auto" mode) | 1330 | - 2: Hardware PWM control (EC "auto" mode) |
| 1267 | 3: reserved (Software PWM control, not implemented yet) | 1331 | - 3: reserved (Software PWM control, not implemented yet) |
| 1268 | 1332 | ||
| 1269 | Modes 0 and 2 are not supported by all ThinkPads, and the | 1333 | Modes 0 and 2 are not supported by all ThinkPads, and the |
| 1270 | driver is not always able to detect this. If it does know a | 1334 | driver is not always able to detect this. If it does know a |
| @@ -1304,7 +1368,9 @@ WAN | |||
| 1304 | --- | 1368 | --- |
| 1305 | 1369 | ||
| 1306 | procfs: /proc/acpi/ibm/wan | 1370 | procfs: /proc/acpi/ibm/wan |
| 1371 | |||
| 1307 | sysfs device attribute: wwan_enable (deprecated) | 1372 | sysfs device attribute: wwan_enable (deprecated) |
| 1373 | |||
| 1308 | sysfs rfkill class: switch "tpacpi_wwan_sw" | 1374 | sysfs rfkill class: switch "tpacpi_wwan_sw" |
| 1309 | 1375 | ||
| 1310 | This feature shows the presence and current state of the built-in | 1376 | This feature shows the presence and current state of the built-in |
| @@ -1316,29 +1382,31 @@ so it is kept across reboots and power-off. | |||
| 1316 | It was tested on a Lenovo ThinkPad X60. It should probably work on other | 1382 | It was tested on a Lenovo ThinkPad X60. It should probably work on other |
| 1317 | ThinkPad models which come with this module installed. | 1383 | ThinkPad models which come with this module installed. |
| 1318 | 1384 | ||
| 1319 | Procfs notes: | 1385 | Procfs notes |
| 1386 | ^^^^^^^^^^^^ | ||
| 1320 | 1387 | ||
| 1321 | If the W-WAN card is installed, the following commands can be used: | 1388 | If the W-WAN card is installed, the following commands can be used:: |
| 1322 | 1389 | ||
| 1323 | echo enable > /proc/acpi/ibm/wan | 1390 | echo enable > /proc/acpi/ibm/wan |
| 1324 | echo disable > /proc/acpi/ibm/wan | 1391 | echo disable > /proc/acpi/ibm/wan |
| 1325 | 1392 | ||
| 1326 | Sysfs notes: | 1393 | Sysfs notes |
| 1394 | ^^^^^^^^^^^ | ||
| 1327 | 1395 | ||
| 1328 | If the W-WAN card is installed, it can be enabled / | 1396 | If the W-WAN card is installed, it can be enabled / |
| 1329 | disabled through the "wwan_enable" thinkpad-acpi device | 1397 | disabled through the "wwan_enable" thinkpad-acpi device |
| 1330 | attribute, and its current status can also be queried. | 1398 | attribute, and its current status can also be queried. |
| 1331 | 1399 | ||
| 1332 | enable: | 1400 | enable: |
| 1333 | 0: disables WWAN card / WWAN card is disabled | 1401 | - 0: disables WWAN card / WWAN card is disabled |
| 1334 | 1: enables WWAN card / WWAN card is enabled. | 1402 | - 1: enables WWAN card / WWAN card is enabled. |
| 1335 | 1403 | ||
| 1336 | Note: this interface has been superseded by the generic rfkill | 1404 | Note: this interface has been superseded by the generic rfkill |
| 1337 | class. It has been deprecated, and it will be removed in year | 1405 | class. It has been deprecated, and it will be removed in year |
| 1338 | 2010. | 1406 | 2010. |
| 1339 | 1407 | ||
| 1340 | rfkill controller switch "tpacpi_wwan_sw": refer to | 1408 | rfkill controller switch "tpacpi_wwan_sw": refer to |
| 1341 | Documentation/rfkill.txt for details. | 1409 | Documentation/driver-api/rfkill.rst for details. |
| 1342 | 1410 | ||
| 1343 | 1411 | ||
| 1344 | EXPERIMENTAL: UWB | 1412 | EXPERIMENTAL: UWB |
| @@ -1354,10 +1422,11 @@ sysfs rfkill class: switch "tpacpi_uwb_sw" | |||
| 1354 | This feature exports an rfkill controller for the UWB device, if one is | 1422 | This feature exports an rfkill controller for the UWB device, if one is |
| 1355 | present and enabled in the BIOS. | 1423 | present and enabled in the BIOS. |
| 1356 | 1424 | ||
| 1357 | Sysfs notes: | 1425 | Sysfs notes |
| 1426 | ^^^^^^^^^^^ | ||
| 1358 | 1427 | ||
| 1359 | rfkill controller switch "tpacpi_uwb_sw": refer to | 1428 | rfkill controller switch "tpacpi_uwb_sw": refer to |
| 1360 | Documentation/rfkill.txt for details. | 1429 | Documentation/driver-api/rfkill.rst for details. |
| 1361 | 1430 | ||
| 1362 | Adaptive keyboard | 1431 | Adaptive keyboard |
| 1363 | ----------------- | 1432 | ----------------- |
| @@ -1368,11 +1437,11 @@ This sysfs attribute controls the keyboard "face" that will be shown on the | |||
| 1368 | Lenovo X1 Carbon 2nd gen (2014)'s adaptive keyboard. The value can be read | 1437 | Lenovo X1 Carbon 2nd gen (2014)'s adaptive keyboard. The value can be read |
| 1369 | and set. | 1438 | and set. |
| 1370 | 1439 | ||
| 1371 | 1 = Home mode | 1440 | - 1 = Home mode |
| 1372 | 2 = Web-browser mode | 1441 | - 2 = Web-browser mode |
| 1373 | 3 = Web-conference mode | 1442 | - 3 = Web-conference mode |
| 1374 | 4 = Function mode | 1443 | - 4 = Function mode |
| 1375 | 5 = Layflat mode | 1444 | - 5 = Layflat mode |
| 1376 | 1445 | ||
| 1377 | For more details about which buttons will appear depending on the mode, please | 1446 | For more details about which buttons will appear depending on the mode, please |
| 1378 | review the laptop's user guide: | 1447 | review the laptop's user guide: |
| @@ -1382,13 +1451,13 @@ Multiple Commands, Module Parameters | |||
| 1382 | ------------------------------------ | 1451 | ------------------------------------ |
| 1383 | 1452 | ||
| 1384 | Multiple commands can be written to the proc files in one shot by | 1453 | Multiple commands can be written to the proc files in one shot by |
| 1385 | separating them with commas, for example: | 1454 | separating them with commas, for example:: |
| 1386 | 1455 | ||
| 1387 | echo enable,0xffff > /proc/acpi/ibm/hotkey | 1456 | echo enable,0xffff > /proc/acpi/ibm/hotkey |
| 1388 | echo lcd_disable,crt_enable > /proc/acpi/ibm/video | 1457 | echo lcd_disable,crt_enable > /proc/acpi/ibm/video |
| 1389 | 1458 | ||
| 1390 | Commands can also be specified when loading the thinkpad-acpi module, | 1459 | Commands can also be specified when loading the thinkpad-acpi module, |
| 1391 | for example: | 1460 | for example:: |
| 1392 | 1461 | ||
| 1393 | modprobe thinkpad_acpi hotkey=enable,0xffff video=auto_disable | 1462 | modprobe thinkpad_acpi hotkey=enable,0xffff video=auto_disable |
| 1394 | 1463 | ||
| @@ -1397,14 +1466,16 @@ Enabling debugging output | |||
| 1397 | ------------------------- | 1466 | ------------------------- |
| 1398 | 1467 | ||
| 1399 | The module takes a debug parameter which can be used to selectively | 1468 | The module takes a debug parameter which can be used to selectively |
| 1400 | enable various classes of debugging output, for example: | 1469 | enable various classes of debugging output, for example:: |
| 1401 | 1470 | ||
| 1402 | modprobe thinkpad_acpi debug=0xffff | 1471 | modprobe thinkpad_acpi debug=0xffff |
| 1403 | 1472 | ||
| 1404 | will enable all debugging output classes. It takes a bitmask, so | 1473 | will enable all debugging output classes. It takes a bitmask, so |
| 1405 | to enable more than one output class, just add their values. | 1474 | to enable more than one output class, just add their values. |
| 1406 | 1475 | ||
| 1476 | ============= ====================================== | ||
| 1407 | Debug bitmask Description | 1477 | Debug bitmask Description |
| 1478 | ============= ====================================== | ||
| 1408 | 0x8000 Disclose PID of userspace programs | 1479 | 0x8000 Disclose PID of userspace programs |
| 1409 | accessing some functions of the driver | 1480 | accessing some functions of the driver |
| 1410 | 0x0001 Initialization and probing | 1481 | 0x0001 Initialization and probing |
| @@ -1415,6 +1486,7 @@ to enable more than one output class, just add their values. | |||
| 1415 | 0x0010 Fan control | 1486 | 0x0010 Fan control |
| 1416 | 0x0020 Backlight brightness | 1487 | 0x0020 Backlight brightness |
| 1417 | 0x0040 Audio mixer/volume control | 1488 | 0x0040 Audio mixer/volume control |
| 1489 | ============= ====================================== | ||
| 1418 | 1490 | ||
| 1419 | There is also a kernel build option to enable more debugging | 1491 | There is also a kernel build option to enable more debugging |
| 1420 | information, which may be necessary to debug driver problems. | 1492 | information, which may be necessary to debug driver problems. |
| @@ -1432,8 +1504,10 @@ the module parameter force_load=1. Regardless of whether this works or | |||
| 1432 | not, please contact ibm-acpi-devel@lists.sourceforge.net with a report. | 1504 | not, please contact ibm-acpi-devel@lists.sourceforge.net with a report. |
| 1433 | 1505 | ||
| 1434 | 1506 | ||
| 1435 | Sysfs interface changelog: | 1507 | Sysfs interface changelog |
| 1508 | ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 1436 | 1509 | ||
| 1510 | ========= =============================================================== | ||
| 1437 | 0x000100: Initial sysfs support, as a single platform driver and | 1511 | 0x000100: Initial sysfs support, as a single platform driver and |
| 1438 | device. | 1512 | device. |
| 1439 | 0x000200: Hot key support for 32 hot keys, and radio slider switch | 1513 | 0x000200: Hot key support for 32 hot keys, and radio slider switch |
| @@ -1485,3 +1559,4 @@ Sysfs interface changelog: | |||
| 1485 | 0x030000: Thermal and fan sysfs attributes were moved to the hwmon | 1559 | 0x030000: Thermal and fan sysfs attributes were moved to the hwmon |
| 1486 | device instead of being attached to the backing platform | 1560 | device instead of being attached to the backing platform |
| 1487 | device. | 1561 | device. |
| 1562 | ========= =============================================================== | ||
diff --git a/Documentation/laptops/toshiba_haps.txt b/Documentation/admin-guide/laptops/toshiba_haps.rst index 0c1d88dedbde..d28b6c3f2849 100644 --- a/Documentation/laptops/toshiba_haps.txt +++ b/Documentation/admin-guide/laptops/toshiba_haps.rst | |||
| @@ -1,18 +1,19 @@ | |||
| 1 | Kernel driver toshiba_haps | 1 | ==================================== |
| 2 | Toshiba HDD Active Protection Sensor | 2 | Toshiba HDD Active Protection Sensor |
| 3 | ==================================== | 3 | ==================================== |
| 4 | 4 | ||
| 5 | Kernel driver: toshiba_haps | ||
| 6 | |||
| 5 | Author: Azael Avalos <coproscefalo@gmail.com> | 7 | Author: Azael Avalos <coproscefalo@gmail.com> |
| 6 | 8 | ||
| 7 | 9 | ||
| 8 | 0. Contents | 10 | .. 0. Contents |
| 9 | ----------- | ||
| 10 | 11 | ||
| 11 | 1. Description | 12 | 1. Description |
| 12 | 2. Interface | 13 | 2. Interface |
| 13 | 3. Accelerometer axes | 14 | 3. Accelerometer axes |
| 14 | 4. Supported devices | 15 | 4. Supported devices |
| 15 | 5. Usage | 16 | 5. Usage |
| 16 | 17 | ||
| 17 | 18 | ||
| 18 | 1. Description | 19 | 1. Description |
| @@ -32,17 +33,20 @@ file to set the desired protection level or sensor sensibility. | |||
| 32 | ------------ | 33 | ------------ |
| 33 | 34 | ||
| 34 | This device comes with 3 methods: | 35 | This device comes with 3 methods: |
| 35 | _STA - Checks existence of the device, returning Zero if the device does not | 36 | |
| 37 | ==== ===================================================================== | ||
| 38 | _STA Checks existence of the device, returning Zero if the device does not | ||
| 36 | exists or is not supported. | 39 | exists or is not supported. |
| 37 | PTLV - Sets the desired protection level. | 40 | PTLV Sets the desired protection level. |
| 38 | RSSS - Shuts down the HDD protection interface for a few seconds, | 41 | RSSS Shuts down the HDD protection interface for a few seconds, |
| 39 | then restores normal operation. | 42 | then restores normal operation. |
| 43 | ==== ===================================================================== | ||
| 40 | 44 | ||
| 41 | Note: | 45 | Note: |
| 42 | The presence of Solid State Drives (SSD) can make this driver to fail loading, | 46 | The presence of Solid State Drives (SSD) can make this driver to fail loading, |
| 43 | given the fact that such drives have no movable parts, and thus, not requiring | 47 | given the fact that such drives have no movable parts, and thus, not requiring |
| 44 | any "protection" as well as failing during the evaluation of the _STA method | 48 | any "protection" as well as failing during the evaluation of the _STA method |
| 45 | found under this device. | 49 | found under this device. |
| 46 | 50 | ||
| 47 | 51 | ||
| 48 | 3. Accelerometer axes | 52 | 3. Accelerometer axes |
| @@ -66,11 +70,18 @@ conventional HDD and not only SSD, or a combination of both HDD and SSD. | |||
| 66 | -------- | 70 | -------- |
| 67 | 71 | ||
| 68 | The sysfs files under /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS620A:00/ are: | 72 | The sysfs files under /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS620A:00/ are: |
| 69 | protection_level - The protection_level is readable and writeable, and | 73 | |
| 74 | ================ ============================================================ | ||
| 75 | protection_level The protection_level is readable and writeable, and | ||
| 70 | provides a way to let userspace query the current protection | 76 | provides a way to let userspace query the current protection |
| 71 | level, as well as set the desired protection level, the | 77 | level, as well as set the desired protection level, the |
| 72 | available protection levels are: | 78 | available protection levels are:: |
| 73 | 0 - Disabled | 1 - Low | 2 - Medium | 3 - High | 79 | |
| 74 | reset_protection - The reset_protection entry is writeable only, being "1" | 80 | ============ ======= ========== ======== |
| 81 | 0 - Disabled 1 - Low 2 - Medium 3 - High | ||
| 82 | ============ ======= ========== ======== | ||
| 83 | |||
| 84 | reset_protection The reset_protection entry is writeable only, being "1" | ||
| 75 | the only parameter it accepts, it is used to trigger | 85 | the only parameter it accepts, it is used to trigger |
| 76 | a reset of the protection interface. | 86 | a reset of the protection interface. |
| 87 | ================ ============================================================ | ||
diff --git a/Documentation/auxdisplay/lcd-panel-cgram.txt b/Documentation/admin-guide/lcd-panel-cgram.rst index 7f82c905763d..a3eb00c62f53 100644 --- a/Documentation/auxdisplay/lcd-panel-cgram.txt +++ b/Documentation/admin-guide/lcd-panel-cgram.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ====================================== | ||
| 2 | Parallel port LCD/Keypad Panel support | ||
| 3 | ====================================== | ||
| 4 | |||
| 1 | Some LCDs allow you to define up to 8 characters, mapped to ASCII | 5 | Some LCDs allow you to define up to 8 characters, mapped to ASCII |
| 2 | characters 0 to 7. The escape code to define a new character is | 6 | characters 0 to 7. The escape code to define a new character is |
| 3 | '\e[LG' followed by one digit from 0 to 7, representing the character | 7 | '\e[LG' followed by one digit from 0 to 7, representing the character |
| @@ -7,7 +11,7 @@ illuminated pixel with LSB on the right. Lines are numbered from the | |||
| 7 | top of the character to the bottom. On a 5x7 matrix, only the 5 lower | 11 | top of the character to the bottom. On a 5x7 matrix, only the 5 lower |
| 8 | bits of the 7 first bytes are used for each character. If the string | 12 | bits of the 7 first bytes are used for each character. If the string |
| 9 | is incomplete, only complete lines will be redefined. Here are some | 13 | is incomplete, only complete lines will be redefined. Here are some |
| 10 | examples : | 14 | examples:: |
| 11 | 15 | ||
| 12 | printf "\e[LG0010101050D1F0C04;" => 0 = [enter] | 16 | printf "\e[LG0010101050D1F0C04;" => 0 = [enter] |
| 13 | printf "\e[LG1040E1F0000000000;" => 1 = [up] | 17 | printf "\e[LG1040E1F0000000000;" => 1 = [up] |
| @@ -21,4 +25,3 @@ examples : | |||
| 21 | printf "\e[LG00002061E1E060200;" => small speaker | 25 | printf "\e[LG00002061E1E060200;" => small speaker |
| 22 | 26 | ||
| 23 | Willy | 27 | Willy |
| 24 | |||
diff --git a/Documentation/ldm.txt b/Documentation/admin-guide/ldm.rst index 12c571368e73..12c571368e73 100644 --- a/Documentation/ldm.txt +++ b/Documentation/admin-guide/ldm.rst | |||
diff --git a/Documentation/lockup-watchdogs.txt b/Documentation/admin-guide/lockup-watchdogs.rst index 290840c160af..290840c160af 100644 --- a/Documentation/lockup-watchdogs.txt +++ b/Documentation/admin-guide/lockup-watchdogs.rst | |||
diff --git a/Documentation/cma/debugfs.txt b/Documentation/admin-guide/mm/cma_debugfs.rst index 6cef20a8cedc..4e06ffabd78a 100644 --- a/Documentation/cma/debugfs.txt +++ b/Documentation/admin-guide/mm/cma_debugfs.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ===================== | ||
| 2 | CMA Debugfs Interface | ||
| 3 | ===================== | ||
| 4 | |||
| 1 | The CMA debugfs interface is useful to retrieve basic information out of the | 5 | The CMA debugfs interface is useful to retrieve basic information out of the |
| 2 | different CMA areas and to test allocation/release in each of the areas. | 6 | different CMA areas and to test allocation/release in each of the areas. |
| 3 | 7 | ||
| @@ -12,7 +16,7 @@ The structure of the files created under that directory is as follows: | |||
| 12 | - [RO] count: Amount of memory in the CMA area. | 16 | - [RO] count: Amount of memory in the CMA area. |
| 13 | - [RO] order_per_bit: Order of pages represented by one bit. | 17 | - [RO] order_per_bit: Order of pages represented by one bit. |
| 14 | - [RO] bitmap: The bitmap of page states in the zone. | 18 | - [RO] bitmap: The bitmap of page states in the zone. |
| 15 | - [WO] alloc: Allocate N pages from that CMA area. For example: | 19 | - [WO] alloc: Allocate N pages from that CMA area. For example:: |
| 16 | 20 | ||
| 17 | echo 5 > <debugfs>/cma/cma-2/alloc | 21 | echo 5 > <debugfs>/cma/cma-2/alloc |
| 18 | 22 | ||
diff --git a/Documentation/admin-guide/mm/index.rst b/Documentation/admin-guide/mm/index.rst index ddf8d8d33377..11db46448354 100644 --- a/Documentation/admin-guide/mm/index.rst +++ b/Documentation/admin-guide/mm/index.rst | |||
| @@ -11,7 +11,7 @@ processes address space and many other cool things. | |||
| 11 | Linux memory management is a complex system with many configurable | 11 | Linux memory management is a complex system with many configurable |
| 12 | settings. Most of these settings are available via ``/proc`` | 12 | settings. Most of these settings are available via ``/proc`` |
| 13 | filesystem and can be quired and adjusted using ``sysctl``. These APIs | 13 | filesystem and can be quired and adjusted using ``sysctl``. These APIs |
| 14 | are described in Documentation/sysctl/vm.txt and in `man 5 proc`_. | 14 | are described in Documentation/admin-guide/sysctl/vm.rst and in `man 5 proc`_. |
| 15 | 15 | ||
| 16 | .. _man 5 proc: http://man7.org/linux/man-pages/man5/proc.5.html | 16 | .. _man 5 proc: http://man7.org/linux/man-pages/man5/proc.5.html |
| 17 | 17 | ||
| @@ -26,6 +26,7 @@ the Linux memory management. | |||
| 26 | :maxdepth: 1 | 26 | :maxdepth: 1 |
| 27 | 27 | ||
| 28 | concepts | 28 | concepts |
| 29 | cma_debugfs | ||
| 29 | hugetlbpage | 30 | hugetlbpage |
| 30 | idle_page_tracking | 31 | idle_page_tracking |
| 31 | ksm | 32 | ksm |
diff --git a/Documentation/admin-guide/mm/ksm.rst b/Documentation/admin-guide/mm/ksm.rst index 9303786632d1..874eb0c77d34 100644 --- a/Documentation/admin-guide/mm/ksm.rst +++ b/Documentation/admin-guide/mm/ksm.rst | |||
| @@ -59,7 +59,7 @@ MADV_UNMERGEABLE is applied to a range which was never MADV_MERGEABLE. | |||
| 59 | 59 | ||
| 60 | If a region of memory must be split into at least one new MADV_MERGEABLE | 60 | If a region of memory must be split into at least one new MADV_MERGEABLE |
| 61 | or MADV_UNMERGEABLE region, the madvise may return ENOMEM if the process | 61 | or MADV_UNMERGEABLE region, the madvise may return ENOMEM if the process |
| 62 | will exceed ``vm.max_map_count`` (see Documentation/sysctl/vm.txt). | 62 | will exceed ``vm.max_map_count`` (see Documentation/admin-guide/sysctl/vm.rst). |
| 63 | 63 | ||
| 64 | Like other madvise calls, they are intended for use on mapped areas of | 64 | Like other madvise calls, they are intended for use on mapped areas of |
| 65 | the user address space: they will report ENOMEM if the specified range | 65 | the user address space: they will report ENOMEM if the specified range |
diff --git a/Documentation/admin-guide/mm/numa_memory_policy.rst b/Documentation/admin-guide/mm/numa_memory_policy.rst index 546f174e5d6a..8463f5538fda 100644 --- a/Documentation/admin-guide/mm/numa_memory_policy.rst +++ b/Documentation/admin-guide/mm/numa_memory_policy.rst | |||
| @@ -15,7 +15,7 @@ document attempts to describe the concepts and APIs of the 2.6 memory policy | |||
| 15 | support. | 15 | support. |
| 16 | 16 | ||
| 17 | Memory policies should not be confused with cpusets | 17 | Memory policies should not be confused with cpusets |
| 18 | (``Documentation/cgroup-v1/cpusets.rst``) | 18 | (``Documentation/admin-guide/cgroup-v1/cpusets.rst``) |
| 19 | which is an administrative mechanism for restricting the nodes from which | 19 | which is an administrative mechanism for restricting the nodes from which |
| 20 | memory may be allocated by a set of processes. Memory policies are a | 20 | memory may be allocated by a set of processes. Memory policies are a |
| 21 | programming interface that a NUMA-aware application can take advantage of. When | 21 | programming interface that a NUMA-aware application can take advantage of. When |
diff --git a/Documentation/namespaces/compatibility-list.txt b/Documentation/admin-guide/namespaces/compatibility-list.rst index defc5589bfcd..318800b2a943 100644 --- a/Documentation/namespaces/compatibility-list.txt +++ b/Documentation/admin-guide/namespaces/compatibility-list.rst | |||
| @@ -1,4 +1,6 @@ | |||
| 1 | Namespaces compatibility list | 1 | ============================= |
| 2 | Namespaces compatibility list | ||
| 3 | ============================= | ||
| 2 | 4 | ||
| 3 | This document contains the information about the problems user | 5 | This document contains the information about the problems user |
| 4 | may have when creating tasks living in different namespaces. | 6 | may have when creating tasks living in different namespaces. |
| @@ -7,13 +9,16 @@ Here's the summary. This matrix shows the known problems, that | |||
| 7 | occur when tasks share some namespace (the columns) while living | 9 | occur when tasks share some namespace (the columns) while living |
| 8 | in different other namespaces (the rows): | 10 | in different other namespaces (the rows): |
| 9 | 11 | ||
| 10 | UTS IPC VFS PID User Net | 12 | ==== === === === === ==== === |
| 13 | - UTS IPC VFS PID User Net | ||
| 14 | ==== === === === === ==== === | ||
| 11 | UTS X | 15 | UTS X |
| 12 | IPC X 1 | 16 | IPC X 1 |
| 13 | VFS X | 17 | VFS X |
| 14 | PID 1 1 X | 18 | PID 1 1 X |
| 15 | User 2 2 X | 19 | User 2 2 X |
| 16 | Net X | 20 | Net X |
| 21 | ==== === === === === ==== === | ||
| 17 | 22 | ||
| 18 | 1. Both the IPC and the PID namespaces provide IDs to address | 23 | 1. Both the IPC and the PID namespaces provide IDs to address |
| 19 | object inside the kernel. E.g. semaphore with IPCID or | 24 | object inside the kernel. E.g. semaphore with IPCID or |
| @@ -36,4 +41,3 @@ Net X | |||
| 36 | even having equal UIDs. | 41 | even having equal UIDs. |
| 37 | 42 | ||
| 38 | But currently this is not so. | 43 | But currently this is not so. |
| 39 | |||
diff --git a/Documentation/admin-guide/namespaces/index.rst b/Documentation/admin-guide/namespaces/index.rst new file mode 100644 index 000000000000..384f2e0f33d2 --- /dev/null +++ b/Documentation/admin-guide/namespaces/index.rst | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ========== | ||
| 4 | Namespaces | ||
| 5 | ========== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | compatibility-list | ||
| 11 | resource-control | ||
diff --git a/Documentation/namespaces/resource-control.txt b/Documentation/admin-guide/namespaces/resource-control.rst index abc13c394738..369556e00f0c 100644 --- a/Documentation/namespaces/resource-control.txt +++ b/Documentation/admin-guide/namespaces/resource-control.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | =========================== | ||
| 2 | Namespaces research control | ||
| 3 | =========================== | ||
| 4 | |||
| 1 | There are a lot of kinds of objects in the kernel that don't have | 5 | There are a lot of kinds of objects in the kernel that don't have |
| 2 | individual limits or that have limits that are ineffective when a set | 6 | individual limits or that have limits that are ineffective when a set |
| 3 | of processes is allowed to switch user ids. With user namespaces | 7 | of processes is allowed to switch user ids. With user namespaces |
diff --git a/Documentation/numastat.txt b/Documentation/admin-guide/numastat.rst index aaf1667489f8..aaf1667489f8 100644 --- a/Documentation/numastat.txt +++ b/Documentation/admin-guide/numastat.rst | |||
diff --git a/Documentation/perf/arm-ccn.txt b/Documentation/admin-guide/perf/arm-ccn.rst index 15cdb7bc57c3..832b0c64023a 100644 --- a/Documentation/perf/arm-ccn.txt +++ b/Documentation/admin-guide/perf/arm-ccn.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ========================== | ||
| 1 | ARM Cache Coherent Network | 2 | ARM Cache Coherent Network |
| 2 | ========================== | 3 | ========================== |
| 3 | 4 | ||
| @@ -29,6 +30,7 @@ Crosspoint watchpoint-based events (special "event" value 0xfe) | |||
| 29 | require "xp" and "vc" as as above plus "port" (device port index), | 30 | require "xp" and "vc" as as above plus "port" (device port index), |
| 30 | "dir" (transmit/receive direction), comparator values ("cmp_l" | 31 | "dir" (transmit/receive direction), comparator values ("cmp_l" |
| 31 | and "cmp_h") and "mask", being index of the comparator mask. | 32 | and "cmp_h") and "mask", being index of the comparator mask. |
| 33 | |||
| 32 | Masks are defined separately from the event description | 34 | Masks are defined separately from the event description |
| 33 | (due to limited number of the config values) in the "cmp_mask" | 35 | (due to limited number of the config values) in the "cmp_mask" |
| 34 | directory, with first 8 configurable by user and additional | 36 | directory, with first 8 configurable by user and additional |
| @@ -44,16 +46,16 @@ request the events on this processor (if not, the perf_event->cpu value | |||
| 44 | will be overwritten anyway). In case of this processor being offlined, | 46 | will be overwritten anyway). In case of this processor being offlined, |
| 45 | the events are migrated to another one and the attribute is updated. | 47 | the events are migrated to another one and the attribute is updated. |
| 46 | 48 | ||
| 47 | Example of perf tool use: | 49 | Example of perf tool use:: |
| 48 | 50 | ||
| 49 | / # perf list | grep ccn | 51 | / # perf list | grep ccn |
| 50 | ccn/cycles/ [Kernel PMU event] | 52 | ccn/cycles/ [Kernel PMU event] |
| 51 | <...> | 53 | <...> |
| 52 | ccn/xp_valid_flit,xp=?,port=?,vc=?,dir=?/ [Kernel PMU event] | 54 | ccn/xp_valid_flit,xp=?,port=?,vc=?,dir=?/ [Kernel PMU event] |
| 53 | <...> | 55 | <...> |
| 54 | 56 | ||
| 55 | / # perf stat -a -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \ | 57 | / # perf stat -a -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \ |
| 56 | sleep 1 | 58 | sleep 1 |
| 57 | 59 | ||
| 58 | The driver does not support sampling, therefore "perf record" will | 60 | The driver does not support sampling, therefore "perf record" will |
| 59 | not work. Per-task (without "-a") perf sessions are not supported. | 61 | not work. Per-task (without "-a") perf sessions are not supported. |
diff --git a/Documentation/perf/arm_dsu_pmu.txt b/Documentation/admin-guide/perf/arm_dsu_pmu.rst index d611e15f5add..7fd34db75d13 100644 --- a/Documentation/perf/arm_dsu_pmu.txt +++ b/Documentation/admin-guide/perf/arm_dsu_pmu.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ================================== | ||
| 1 | ARM DynamIQ Shared Unit (DSU) PMU | 2 | ARM DynamIQ Shared Unit (DSU) PMU |
| 2 | ================================== | 3 | ================================== |
| 3 | 4 | ||
| @@ -13,7 +14,7 @@ PMU doesn't support process specific events and cannot be used in sampling mode. | |||
| 13 | The DSU provides a bitmap for a subset of implemented events via hardware | 14 | The DSU provides a bitmap for a subset of implemented events via hardware |
| 14 | registers. There is no way for the driver to determine if the other events | 15 | registers. There is no way for the driver to determine if the other events |
| 15 | are available or not. Hence the driver exposes only those events advertised | 16 | are available or not. Hence the driver exposes only those events advertised |
| 16 | by the DSU, in "events" directory under : | 17 | by the DSU, in "events" directory under:: |
| 17 | 18 | ||
| 18 | /sys/bus/event_sources/devices/arm_dsu_<N>/ | 19 | /sys/bus/event_sources/devices/arm_dsu_<N>/ |
| 19 | 20 | ||
| @@ -23,6 +24,6 @@ and use the raw event code for the unlisted events. | |||
| 23 | The driver also exposes the CPUs connected to the DSU instance in "associated_cpus". | 24 | The driver also exposes the CPUs connected to the DSU instance in "associated_cpus". |
| 24 | 25 | ||
| 25 | 26 | ||
| 26 | e.g usage : | 27 | e.g usage:: |
| 27 | 28 | ||
| 28 | perf stat -a -e arm_dsu_0/cycles/ | 29 | perf stat -a -e arm_dsu_0/cycles/ |
diff --git a/Documentation/perf/hisi-pmu.txt b/Documentation/admin-guide/perf/hisi-pmu.rst index 267a028b2741..404a5c3d9d00 100644 --- a/Documentation/perf/hisi-pmu.txt +++ b/Documentation/admin-guide/perf/hisi-pmu.rst | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | ====================================================== | ||
| 1 | HiSilicon SoC uncore Performance Monitoring Unit (PMU) | 2 | HiSilicon SoC uncore Performance Monitoring Unit (PMU) |
| 2 | ====================================================== | 3 | ====================================================== |
| 4 | |||
| 3 | The HiSilicon SoC chip includes various independent system device PMUs | 5 | The HiSilicon SoC chip includes various independent system device PMUs |
| 4 | such as L3 cache (L3C), Hydra Home Agent (HHA) and DDRC. These PMUs are | 6 | such as L3 cache (L3C), Hydra Home Agent (HHA) and DDRC. These PMUs are |
| 5 | independent and have hardware logic to gather statistics and performance | 7 | independent and have hardware logic to gather statistics and performance |
| @@ -11,11 +13,13 @@ called Super CPU cluster (SCCL) and is made up of 6 CCLs. Each SCCL has | |||
| 11 | two HHAs (0 - 1) and four DDRCs (0 - 3), respectively. | 13 | two HHAs (0 - 1) and four DDRCs (0 - 3), respectively. |
| 12 | 14 | ||
| 13 | HiSilicon SoC uncore PMU driver | 15 | HiSilicon SoC uncore PMU driver |
| 14 | --------------------------------------- | 16 | ------------------------------- |
| 17 | |||
| 15 | Each device PMU has separate registers for event counting, control and | 18 | Each device PMU has separate registers for event counting, control and |
| 16 | interrupt, and the PMU driver shall register perf PMU drivers like L3C, | 19 | interrupt, and the PMU driver shall register perf PMU drivers like L3C, |
| 17 | HHA and DDRC etc. The available events and configuration options shall | 20 | HHA and DDRC etc. The available events and configuration options shall |
| 18 | be described in the sysfs, see : | 21 | be described in the sysfs, see: |
| 22 | |||
| 19 | /sys/devices/hisi_sccl{X}_<l3c{Y}/hha{Y}/ddrc{Y}>/, or | 23 | /sys/devices/hisi_sccl{X}_<l3c{Y}/hha{Y}/ddrc{Y}>/, or |
| 20 | /sys/bus/event_source/devices/hisi_sccl{X}_<l3c{Y}/hha{Y}/ddrc{Y}>. | 24 | /sys/bus/event_source/devices/hisi_sccl{X}_<l3c{Y}/hha{Y}/ddrc{Y}>. |
| 21 | The "perf list" command shall list the available events from sysfs. | 25 | The "perf list" command shall list the available events from sysfs. |
| @@ -24,27 +28,30 @@ Each L3C, HHA and DDRC is registered as a separate PMU with perf. The PMU | |||
| 24 | name will appear in event listing as hisi_sccl<sccl-id>_module<index-id>. | 28 | name will appear in event listing as hisi_sccl<sccl-id>_module<index-id>. |
| 25 | where "sccl-id" is the identifier of the SCCL and "index-id" is the index of | 29 | where "sccl-id" is the identifier of the SCCL and "index-id" is the index of |
| 26 | module. | 30 | module. |
| 31 | |||
| 27 | e.g. hisi_sccl3_l3c0/rd_hit_cpipe is READ_HIT_CPIPE event of L3C index #0 in | 32 | e.g. hisi_sccl3_l3c0/rd_hit_cpipe is READ_HIT_CPIPE event of L3C index #0 in |
| 28 | SCCL ID #3. | 33 | SCCL ID #3. |
| 34 | |||
| 29 | e.g. hisi_sccl1_hha0/rx_operations is RX_OPERATIONS event of HHA index #0 in | 35 | e.g. hisi_sccl1_hha0/rx_operations is RX_OPERATIONS event of HHA index #0 in |
| 30 | SCCL ID #1. | 36 | SCCL ID #1. |
| 31 | 37 | ||
| 32 | The driver also provides a "cpumask" sysfs attribute, which shows the CPU core | 38 | The driver also provides a "cpumask" sysfs attribute, which shows the CPU core |
| 33 | ID used to count the uncore PMU event. | 39 | ID used to count the uncore PMU event. |
| 34 | 40 | ||
| 35 | Example usage of perf: | 41 | Example usage of perf:: |
| 36 | $# perf list | 42 | |
| 37 | hisi_sccl3_l3c0/rd_hit_cpipe/ [kernel PMU event] | 43 | $# perf list |
| 38 | ------------------------------------------ | 44 | hisi_sccl3_l3c0/rd_hit_cpipe/ [kernel PMU event] |
| 39 | hisi_sccl3_l3c0/wr_hit_cpipe/ [kernel PMU event] | 45 | ------------------------------------------ |
| 40 | ------------------------------------------ | 46 | hisi_sccl3_l3c0/wr_hit_cpipe/ [kernel PMU event] |
| 41 | hisi_sccl1_l3c0/rd_hit_cpipe/ [kernel PMU event] | 47 | ------------------------------------------ |
| 42 | ------------------------------------------ | 48 | hisi_sccl1_l3c0/rd_hit_cpipe/ [kernel PMU event] |
| 43 | hisi_sccl1_l3c0/wr_hit_cpipe/ [kernel PMU event] | 49 | ------------------------------------------ |
| 44 | ------------------------------------------ | 50 | hisi_sccl1_l3c0/wr_hit_cpipe/ [kernel PMU event] |
| 45 | 51 | ------------------------------------------ | |
| 46 | $# perf stat -a -e hisi_sccl3_l3c0/rd_hit_cpipe/ sleep 5 | 52 | |
| 47 | $# perf stat -a -e hisi_sccl3_l3c0/config=0x02/ sleep 5 | 53 | $# perf stat -a -e hisi_sccl3_l3c0/rd_hit_cpipe/ sleep 5 |
| 54 | $# perf stat -a -e hisi_sccl3_l3c0/config=0x02/ sleep 5 | ||
| 48 | 55 | ||
| 49 | The current driver does not support sampling. So "perf record" is unsupported. | 56 | The current driver does not support sampling. So "perf record" is unsupported. |
| 50 | Also attach to a task is unsupported as the events are all uncore. | 57 | Also attach to a task is unsupported as the events are all uncore. |
diff --git a/Documentation/admin-guide/perf/index.rst b/Documentation/admin-guide/perf/index.rst new file mode 100644 index 000000000000..ee4bfd2a740f --- /dev/null +++ b/Documentation/admin-guide/perf/index.rst | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | =========================== | ||
| 4 | Performance monitor support | ||
| 5 | =========================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | hisi-pmu | ||
| 11 | qcom_l2_pmu | ||
| 12 | qcom_l3_pmu | ||
| 13 | arm-ccn | ||
| 14 | xgene-pmu | ||
| 15 | arm_dsu_pmu | ||
| 16 | thunderx2-pmu | ||
diff --git a/Documentation/perf/qcom_l2_pmu.txt b/Documentation/admin-guide/perf/qcom_l2_pmu.rst index b25b97659ab9..c130178a4a55 100644 --- a/Documentation/perf/qcom_l2_pmu.txt +++ b/Documentation/admin-guide/perf/qcom_l2_pmu.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ===================================================================== | ||
| 1 | Qualcomm Technologies Level-2 Cache Performance Monitoring Unit (PMU) | 2 | Qualcomm Technologies Level-2 Cache Performance Monitoring Unit (PMU) |
| 2 | ===================================================================== | 3 | ===================================================================== |
| 3 | 4 | ||
| @@ -28,7 +29,7 @@ The driver provides a "cpumask" sysfs attribute which contains a mask | |||
| 28 | consisting of one CPU per cluster which will be used to handle all the PMU | 29 | consisting of one CPU per cluster which will be used to handle all the PMU |
| 29 | events on that cluster. | 30 | events on that cluster. |
| 30 | 31 | ||
| 31 | Examples for use with perf: | 32 | Examples for use with perf:: |
| 32 | 33 | ||
| 33 | perf stat -e l2cache_0/config=0x001/,l2cache_0/config=0x042/ -a sleep 1 | 34 | perf stat -e l2cache_0/config=0x001/,l2cache_0/config=0x042/ -a sleep 1 |
| 34 | 35 | ||
diff --git a/Documentation/perf/qcom_l3_pmu.txt b/Documentation/admin-guide/perf/qcom_l3_pmu.rst index 96b3a9444a0d..a3d014a46bfd 100644 --- a/Documentation/perf/qcom_l3_pmu.txt +++ b/Documentation/admin-guide/perf/qcom_l3_pmu.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | =========================================================================== | ||
| 1 | Qualcomm Datacenter Technologies L3 Cache Performance Monitoring Unit (PMU) | 2 | Qualcomm Datacenter Technologies L3 Cache Performance Monitoring Unit (PMU) |
| 2 | =========================================================================== | 3 | =========================================================================== |
| 3 | 4 | ||
| @@ -17,7 +18,7 @@ The hardware implements 32bit event counters and has a flat 8bit event space | |||
| 17 | exposed via the "event" format attribute. In addition to the 32bit physical | 18 | exposed via the "event" format attribute. In addition to the 32bit physical |
| 18 | counters the driver supports virtual 64bit hardware counters by using hardware | 19 | counters the driver supports virtual 64bit hardware counters by using hardware |
| 19 | counter chaining. This feature is exposed via the "lc" (long counter) format | 20 | counter chaining. This feature is exposed via the "lc" (long counter) format |
| 20 | flag. E.g.: | 21 | flag. E.g.:: |
| 21 | 22 | ||
| 22 | perf stat -e l3cache_0_0/read-miss,lc/ | 23 | perf stat -e l3cache_0_0/read-miss,lc/ |
| 23 | 24 | ||
diff --git a/Documentation/perf/thunderx2-pmu.txt b/Documentation/admin-guide/perf/thunderx2-pmu.rst index dffc57143736..08e33675853a 100644 --- a/Documentation/perf/thunderx2-pmu.txt +++ b/Documentation/admin-guide/perf/thunderx2-pmu.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ============================================================= | ||
| 1 | Cavium ThunderX2 SoC Performance Monitoring Unit (PMU UNCORE) | 2 | Cavium ThunderX2 SoC Performance Monitoring Unit (PMU UNCORE) |
| 2 | ============================================================= | 3 | ============================================================= |
| 3 | 4 | ||
| @@ -24,18 +25,18 @@ and configuration options under sysfs, see | |||
| 24 | The driver does not support sampling, therefore "perf record" will not | 25 | The driver does not support sampling, therefore "perf record" will not |
| 25 | work. Per-task perf sessions are also not supported. | 26 | work. Per-task perf sessions are also not supported. |
| 26 | 27 | ||
| 27 | Examples: | 28 | Examples:: |
| 28 | 29 | ||
| 29 | # perf stat -a -e uncore_dmc_0/cnt_cycles/ sleep 1 | 30 | # perf stat -a -e uncore_dmc_0/cnt_cycles/ sleep 1 |
| 30 | 31 | ||
| 31 | # perf stat -a -e \ | 32 | # perf stat -a -e \ |
| 32 | uncore_dmc_0/cnt_cycles/,\ | 33 | uncore_dmc_0/cnt_cycles/,\ |
| 33 | uncore_dmc_0/data_transfers/,\ | 34 | uncore_dmc_0/data_transfers/,\ |
| 34 | uncore_dmc_0/read_txns/,\ | 35 | uncore_dmc_0/read_txns/,\ |
| 35 | uncore_dmc_0/write_txns/ sleep 1 | 36 | uncore_dmc_0/write_txns/ sleep 1 |
| 36 | 37 | ||
| 37 | # perf stat -a -e \ | 38 | # perf stat -a -e \ |
| 38 | uncore_l3c_0/read_request/,\ | 39 | uncore_l3c_0/read_request/,\ |
| 39 | uncore_l3c_0/read_hit/,\ | 40 | uncore_l3c_0/read_hit/,\ |
| 40 | uncore_l3c_0/inv_request/,\ | 41 | uncore_l3c_0/inv_request/,\ |
| 41 | uncore_l3c_0/inv_hit/ sleep 1 | 42 | uncore_l3c_0/inv_hit/ sleep 1 |
diff --git a/Documentation/perf/xgene-pmu.txt b/Documentation/admin-guide/perf/xgene-pmu.rst index d7cff4454e5b..644f8ed89152 100644 --- a/Documentation/perf/xgene-pmu.txt +++ b/Documentation/admin-guide/perf/xgene-pmu.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ================================================ | ||
| 1 | APM X-Gene SoC Performance Monitoring Unit (PMU) | 2 | APM X-Gene SoC Performance Monitoring Unit (PMU) |
| 2 | ================================================ | 3 | ================================================ |
| 3 | 4 | ||
| @@ -33,7 +34,7 @@ each PMU, please refer to APM X-Gene User Manual. | |||
| 33 | Each perf driver also provides a "cpumask" sysfs attribute, which contains a | 34 | Each perf driver also provides a "cpumask" sysfs attribute, which contains a |
| 34 | single CPU ID of the processor which will be used to handle all the PMU events. | 35 | single CPU ID of the processor which will be used to handle all the PMU events. |
| 35 | 36 | ||
| 36 | Example for perf tool use: | 37 | Example for perf tool use:: |
| 37 | 38 | ||
| 38 | / # perf list | grep -e l3c -e iob -e mcb -e mc | 39 | / # perf list | grep -e l3c -e iob -e mcb -e mc |
| 39 | l3c0/ackq-full/ [Kernel PMU event] | 40 | l3c0/ackq-full/ [Kernel PMU event] |
diff --git a/Documentation/pnp.txt b/Documentation/admin-guide/pnp.rst index bab2d10631f0..bab2d10631f0 100644 --- a/Documentation/pnp.txt +++ b/Documentation/admin-guide/pnp.rst | |||
diff --git a/Documentation/driver-api/rapidio.rst b/Documentation/admin-guide/rapidio.rst index 71ff658ab78e..71ff658ab78e 100644 --- a/Documentation/driver-api/rapidio.rst +++ b/Documentation/admin-guide/rapidio.rst | |||
diff --git a/Documentation/rtc.txt b/Documentation/admin-guide/rtc.rst index 688c95b11919..688c95b11919 100644 --- a/Documentation/rtc.txt +++ b/Documentation/admin-guide/rtc.rst | |||
diff --git a/Documentation/svga.txt b/Documentation/admin-guide/svga.rst index b6c2f9acca92..b6c2f9acca92 100644 --- a/Documentation/svga.txt +++ b/Documentation/admin-guide/svga.rst | |||
diff --git a/Documentation/admin-guide/sysctl/abi.rst b/Documentation/admin-guide/sysctl/abi.rst new file mode 100644 index 000000000000..599bcde7f0b7 --- /dev/null +++ b/Documentation/admin-guide/sysctl/abi.rst | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | ================================ | ||
| 2 | Documentation for /proc/sys/abi/ | ||
| 3 | ================================ | ||
| 4 | |||
| 5 | kernel version 2.6.0.test2 | ||
| 6 | |||
| 7 | Copyright (c) 2003, Fabian Frederick <ffrederick@users.sourceforge.net> | ||
| 8 | |||
| 9 | For general info: index.rst. | ||
| 10 | |||
| 11 | ------------------------------------------------------------------------------ | ||
| 12 | |||
| 13 | This path is binary emulation relevant aka personality types aka abi. | ||
| 14 | When a process is executed, it's linked to an exec_domain whose | ||
| 15 | personality is defined using values available from /proc/sys/abi. | ||
| 16 | You can find further details about abi in include/linux/personality.h. | ||
| 17 | |||
| 18 | Here are the files featuring in 2.6 kernel: | ||
| 19 | |||
| 20 | - defhandler_coff | ||
| 21 | - defhandler_elf | ||
| 22 | - defhandler_lcall7 | ||
| 23 | - defhandler_libcso | ||
| 24 | - fake_utsname | ||
| 25 | - trace | ||
| 26 | |||
| 27 | defhandler_coff | ||
| 28 | --------------- | ||
| 29 | |||
| 30 | defined value: | ||
| 31 | PER_SCOSVR3:: | ||
| 32 | |||
| 33 | 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS | SHORT_INODE | ||
| 34 | |||
| 35 | defhandler_elf | ||
| 36 | -------------- | ||
| 37 | |||
| 38 | defined value: | ||
| 39 | PER_LINUX:: | ||
| 40 | |||
| 41 | 0 | ||
| 42 | |||
| 43 | defhandler_lcall7 | ||
| 44 | ----------------- | ||
| 45 | |||
| 46 | defined value : | ||
| 47 | PER_SVR4:: | ||
| 48 | |||
| 49 | 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, | ||
| 50 | |||
| 51 | defhandler_libsco | ||
| 52 | ----------------- | ||
| 53 | |||
| 54 | defined value: | ||
| 55 | PER_SVR4:: | ||
| 56 | |||
| 57 | 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, | ||
| 58 | |||
| 59 | fake_utsname | ||
| 60 | ------------ | ||
| 61 | |||
| 62 | Unused | ||
| 63 | |||
| 64 | trace | ||
| 65 | ----- | ||
| 66 | |||
| 67 | Unused | ||
diff --git a/Documentation/sysctl/fs.txt b/Documentation/admin-guide/sysctl/fs.rst index ebc679bcb2dc..2a45119e3331 100644 --- a/Documentation/sysctl/fs.txt +++ b/Documentation/admin-guide/sysctl/fs.rst | |||
| @@ -1,10 +1,16 @@ | |||
| 1 | Documentation for /proc/sys/fs/* kernel version 2.2.10 | 1 | =============================== |
| 2 | (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> | 2 | Documentation for /proc/sys/fs/ |
| 3 | (c) 2009, Shen Feng<shen@cn.fujitsu.com> | 3 | =============================== |
| 4 | 4 | ||
| 5 | For general info and legal blurb, please look in README. | 5 | kernel version 2.2.10 |
| 6 | 6 | ||
| 7 | ============================================================== | 7 | Copyright (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> |
| 8 | |||
| 9 | Copyright (c) 2009, Shen Feng<shen@cn.fujitsu.com> | ||
| 10 | |||
| 11 | For general info and legal blurb, please look in intro.rst. | ||
| 12 | |||
| 13 | ------------------------------------------------------------------------------ | ||
| 8 | 14 | ||
| 9 | This file contains documentation for the sysctl files in | 15 | This file contains documentation for the sysctl files in |
| 10 | /proc/sys/fs/ and is valid for Linux kernel version 2.2. | 16 | /proc/sys/fs/ and is valid for Linux kernel version 2.2. |
| @@ -16,9 +22,10 @@ system, it is advisable to read both documentation and source | |||
| 16 | before actually making adjustments. | 22 | before actually making adjustments. |
| 17 | 23 | ||
| 18 | 1. /proc/sys/fs | 24 | 1. /proc/sys/fs |
| 19 | ---------------------------------------------------------- | 25 | =============== |
| 20 | 26 | ||
| 21 | Currently, these files are in /proc/sys/fs: | 27 | Currently, these files are in /proc/sys/fs: |
| 28 | |||
| 22 | - aio-max-nr | 29 | - aio-max-nr |
| 23 | - aio-nr | 30 | - aio-nr |
| 24 | - dentry-state | 31 | - dentry-state |
| @@ -42,9 +49,9 @@ Currently, these files are in /proc/sys/fs: | |||
| 42 | - super-max | 49 | - super-max |
| 43 | - super-nr | 50 | - super-nr |
| 44 | 51 | ||
| 45 | ============================================================== | ||
| 46 | 52 | ||
| 47 | aio-nr & aio-max-nr: | 53 | aio-nr & aio-max-nr |
| 54 | ------------------- | ||
| 48 | 55 | ||
| 49 | aio-nr is the running total of the number of events specified on the | 56 | aio-nr is the running total of the number of events specified on the |
| 50 | io_setup system call for all currently active aio contexts. If aio-nr | 57 | io_setup system call for all currently active aio contexts. If aio-nr |
| @@ -52,21 +59,20 @@ reaches aio-max-nr then io_setup will fail with EAGAIN. Note that | |||
| 52 | raising aio-max-nr does not result in the pre-allocation or re-sizing | 59 | raising aio-max-nr does not result in the pre-allocation or re-sizing |
| 53 | of any kernel data structures. | 60 | of any kernel data structures. |
| 54 | 61 | ||
| 55 | ============================================================== | ||
| 56 | 62 | ||
| 57 | dentry-state: | 63 | dentry-state |
| 64 | ------------ | ||
| 58 | 65 | ||
| 59 | From linux/include/linux/dcache.h: | 66 | From linux/include/linux/dcache.h:: |
| 60 | -------------------------------------------------------------- | 67 | |
| 61 | struct dentry_stat_t dentry_stat { | 68 | struct dentry_stat_t dentry_stat { |
| 62 | int nr_dentry; | 69 | int nr_dentry; |
| 63 | int nr_unused; | 70 | int nr_unused; |
| 64 | int age_limit; /* age in seconds */ | 71 | int age_limit; /* age in seconds */ |
| 65 | int want_pages; /* pages requested by system */ | 72 | int want_pages; /* pages requested by system */ |
| 66 | int nr_negative; /* # of unused negative dentries */ | 73 | int nr_negative; /* # of unused negative dentries */ |
| 67 | int dummy; /* Reserved for future use */ | 74 | int dummy; /* Reserved for future use */ |
| 68 | }; | 75 | }; |
| 69 | -------------------------------------------------------------- | ||
| 70 | 76 | ||
| 71 | Dentries are dynamically allocated and deallocated. | 77 | Dentries are dynamically allocated and deallocated. |
| 72 | 78 | ||
| @@ -84,9 +90,9 @@ negative dentries which do not map to any files. Instead, | |||
| 84 | they help speeding up rejection of non-existing files provided | 90 | they help speeding up rejection of non-existing files provided |
| 85 | by the users. | 91 | by the users. |
| 86 | 92 | ||
| 87 | ============================================================== | ||
| 88 | 93 | ||
| 89 | dquot-max & dquot-nr: | 94 | dquot-max & dquot-nr |
| 95 | -------------------- | ||
| 90 | 96 | ||
| 91 | The file dquot-max shows the maximum number of cached disk | 97 | The file dquot-max shows the maximum number of cached disk |
| 92 | quota entries. | 98 | quota entries. |
| @@ -98,9 +104,9 @@ If the number of free cached disk quotas is very low and | |||
| 98 | you have some awesome number of simultaneous system users, | 104 | you have some awesome number of simultaneous system users, |
| 99 | you might want to raise the limit. | 105 | you might want to raise the limit. |
| 100 | 106 | ||
| 101 | ============================================================== | ||
| 102 | 107 | ||
| 103 | file-max & file-nr: | 108 | file-max & file-nr |
| 109 | ------------------ | ||
| 104 | 110 | ||
| 105 | The value in file-max denotes the maximum number of file- | 111 | The value in file-max denotes the maximum number of file- |
| 106 | handles that the Linux kernel will allocate. When you get lots | 112 | handles that the Linux kernel will allocate. When you get lots |
| @@ -119,18 +125,19 @@ used file handles. | |||
| 119 | Attempts to allocate more file descriptors than file-max are | 125 | Attempts to allocate more file descriptors than file-max are |
| 120 | reported with printk, look for "VFS: file-max limit <number> | 126 | reported with printk, look for "VFS: file-max limit <number> |
| 121 | reached". | 127 | reached". |
| 122 | ============================================================== | ||
| 123 | 128 | ||
| 124 | nr_open: | 129 | |
| 130 | nr_open | ||
| 131 | ------- | ||
| 125 | 132 | ||
| 126 | This denotes the maximum number of file-handles a process can | 133 | This denotes the maximum number of file-handles a process can |
| 127 | allocate. Default value is 1024*1024 (1048576) which should be | 134 | allocate. Default value is 1024*1024 (1048576) which should be |
| 128 | enough for most machines. Actual limit depends on RLIMIT_NOFILE | 135 | enough for most machines. Actual limit depends on RLIMIT_NOFILE |
| 129 | resource limit. | 136 | resource limit. |
| 130 | 137 | ||
| 131 | ============================================================== | ||
| 132 | 138 | ||
| 133 | inode-max, inode-nr & inode-state: | 139 | inode-max, inode-nr & inode-state |
| 140 | --------------------------------- | ||
| 134 | 141 | ||
| 135 | As with file handles, the kernel allocates the inode structures | 142 | As with file handles, the kernel allocates the inode structures |
| 136 | dynamically, but can't free them yet. | 143 | dynamically, but can't free them yet. |
| @@ -157,9 +164,9 @@ preshrink is nonzero when the nr_inodes > inode-max and the | |||
| 157 | system needs to prune the inode list instead of allocating | 164 | system needs to prune the inode list instead of allocating |
| 158 | more. | 165 | more. |
| 159 | 166 | ||
| 160 | ============================================================== | ||
| 161 | 167 | ||
| 162 | overflowgid & overflowuid: | 168 | overflowgid & overflowuid |
| 169 | ------------------------- | ||
| 163 | 170 | ||
| 164 | Some filesystems only support 16-bit UIDs and GIDs, although in Linux | 171 | Some filesystems only support 16-bit UIDs and GIDs, although in Linux |
| 165 | UIDs and GIDs are 32 bits. When one of these filesystems is mounted | 172 | UIDs and GIDs are 32 bits. When one of these filesystems is mounted |
| @@ -169,18 +176,18 @@ to a fixed value before being written to disk. | |||
| 169 | These sysctls allow you to change the value of the fixed UID and GID. | 176 | These sysctls allow you to change the value of the fixed UID and GID. |
| 170 | The default is 65534. | 177 | The default is 65534. |
| 171 | 178 | ||
| 172 | ============================================================== | ||
| 173 | 179 | ||
| 174 | pipe-user-pages-hard: | 180 | pipe-user-pages-hard |
| 181 | -------------------- | ||
| 175 | 182 | ||
| 176 | Maximum total number of pages a non-privileged user may allocate for pipes. | 183 | Maximum total number of pages a non-privileged user may allocate for pipes. |
| 177 | Once this limit is reached, no new pipes may be allocated until usage goes | 184 | Once this limit is reached, no new pipes may be allocated until usage goes |
| 178 | below the limit again. When set to 0, no limit is applied, which is the default | 185 | below the limit again. When set to 0, no limit is applied, which is the default |
| 179 | setting. | 186 | setting. |
| 180 | 187 | ||
| 181 | ============================================================== | ||
| 182 | 188 | ||
| 183 | pipe-user-pages-soft: | 189 | pipe-user-pages-soft |
| 190 | -------------------- | ||
| 184 | 191 | ||
| 185 | Maximum total number of pages a non-privileged user may allocate for pipes | 192 | Maximum total number of pages a non-privileged user may allocate for pipes |
| 186 | before the pipe size gets limited to a single page. Once this limit is reached, | 193 | before the pipe size gets limited to a single page. Once this limit is reached, |
| @@ -190,9 +197,9 @@ denied until usage goes below the limit again. The default value allows to | |||
| 190 | allocate up to 1024 pipes at their default size. When set to 0, no limit is | 197 | allocate up to 1024 pipes at their default size. When set to 0, no limit is |
| 191 | applied. | 198 | applied. |
| 192 | 199 | ||
| 193 | ============================================================== | ||
| 194 | 200 | ||
| 195 | protected_fifos: | 201 | protected_fifos |
| 202 | --------------- | ||
| 196 | 203 | ||
| 197 | The intent of this protection is to avoid unintentional writes to | 204 | The intent of this protection is to avoid unintentional writes to |
| 198 | an attacker-controlled FIFO, where a program expected to create a regular | 205 | an attacker-controlled FIFO, where a program expected to create a regular |
| @@ -208,9 +215,9 @@ When set to "2" it also applies to group writable sticky directories. | |||
| 208 | 215 | ||
| 209 | This protection is based on the restrictions in Openwall. | 216 | This protection is based on the restrictions in Openwall. |
| 210 | 217 | ||
| 211 | ============================================================== | ||
| 212 | 218 | ||
| 213 | protected_hardlinks: | 219 | protected_hardlinks |
| 220 | -------------------- | ||
| 214 | 221 | ||
| 215 | A long-standing class of security issues is the hardlink-based | 222 | A long-standing class of security issues is the hardlink-based |
| 216 | time-of-check-time-of-use race, most commonly seen in world-writable | 223 | time-of-check-time-of-use race, most commonly seen in world-writable |
| @@ -228,9 +235,9 @@ already own the source file, or do not have read/write access to it. | |||
| 228 | 235 | ||
| 229 | This protection is based on the restrictions in Openwall and grsecurity. | 236 | This protection is based on the restrictions in Openwall and grsecurity. |
| 230 | 237 | ||
| 231 | ============================================================== | ||
| 232 | 238 | ||
| 233 | protected_regular: | 239 | protected_regular |
| 240 | ----------------- | ||
| 234 | 241 | ||
| 235 | This protection is similar to protected_fifos, but it | 242 | This protection is similar to protected_fifos, but it |
| 236 | avoids writes to an attacker-controlled regular file, where a program | 243 | avoids writes to an attacker-controlled regular file, where a program |
| @@ -244,9 +251,9 @@ owned by the owner of the directory. | |||
| 244 | 251 | ||
| 245 | When set to "2" it also applies to group writable sticky directories. | 252 | When set to "2" it also applies to group writable sticky directories. |
| 246 | 253 | ||
| 247 | ============================================================== | ||
| 248 | 254 | ||
| 249 | protected_symlinks: | 255 | protected_symlinks |
| 256 | ------------------ | ||
| 250 | 257 | ||
| 251 | A long-standing class of security issues is the symlink-based | 258 | A long-standing class of security issues is the symlink-based |
| 252 | time-of-check-time-of-use race, most commonly seen in world-writable | 259 | time-of-check-time-of-use race, most commonly seen in world-writable |
| @@ -264,34 +271,38 @@ follower match, or when the directory owner matches the symlink's owner. | |||
| 264 | 271 | ||
| 265 | This protection is based on the restrictions in Openwall and grsecurity. | 272 | This protection is based on the restrictions in Openwall and grsecurity. |
| 266 | 273 | ||
| 267 | ============================================================== | ||
| 268 | 274 | ||
| 269 | suid_dumpable: | 275 | suid_dumpable: |
| 276 | -------------- | ||
| 270 | 277 | ||
| 271 | This value can be used to query and set the core dump mode for setuid | 278 | This value can be used to query and set the core dump mode for setuid |
| 272 | or otherwise protected/tainted binaries. The modes are | 279 | or otherwise protected/tainted binaries. The modes are |
| 273 | 280 | ||
| 274 | 0 - (default) - traditional behaviour. Any process which has changed | 281 | = ========== =============================================================== |
| 275 | privilege levels or is execute only will not be dumped. | 282 | 0 (default) traditional behaviour. Any process which has changed |
| 276 | 1 - (debug) - all processes dump core when possible. The core dump is | 283 | privilege levels or is execute only will not be dumped. |
| 277 | owned by the current user and no security is applied. This is | 284 | 1 (debug) all processes dump core when possible. The core dump is |
| 278 | intended for system debugging situations only. Ptrace is unchecked. | 285 | owned by the current user and no security is applied. This is |
| 279 | This is insecure as it allows regular users to examine the memory | 286 | intended for system debugging situations only. |
| 280 | contents of privileged processes. | 287 | Ptrace is unchecked. |
| 281 | 2 - (suidsafe) - any binary which normally would not be dumped is dumped | 288 | This is insecure as it allows regular users to examine the |
| 282 | anyway, but only if the "core_pattern" kernel sysctl is set to | 289 | memory contents of privileged processes. |
| 283 | either a pipe handler or a fully qualified path. (For more details | 290 | 2 (suidsafe) any binary which normally would not be dumped is dumped |
| 284 | on this limitation, see CVE-2006-2451.) This mode is appropriate | 291 | anyway, but only if the "core_pattern" kernel sysctl is set to |
| 285 | when administrators are attempting to debug problems in a normal | 292 | either a pipe handler or a fully qualified path. (For more |
| 286 | environment, and either have a core dump pipe handler that knows | 293 | details on this limitation, see CVE-2006-2451.) This mode is |
| 287 | to treat privileged core dumps with care, or specific directory | 294 | appropriate when administrators are attempting to debug |
| 288 | defined for catching core dumps. If a core dump happens without | 295 | problems in a normal environment, and either have a core dump |
| 289 | a pipe handler or fully qualifid path, a message will be emitted | 296 | pipe handler that knows to treat privileged core dumps with |
| 290 | to syslog warning about the lack of a correct setting. | 297 | care, or specific directory defined for catching core dumps. |
| 291 | 298 | If a core dump happens without a pipe handler or fully | |
| 292 | ============================================================== | 299 | qualified path, a message will be emitted to syslog warning |
| 293 | 300 | about the lack of a correct setting. | |
| 294 | super-max & super-nr: | 301 | = ========== =============================================================== |
| 302 | |||
| 303 | |||
| 304 | super-max & super-nr | ||
| 305 | -------------------- | ||
| 295 | 306 | ||
| 296 | These numbers control the maximum number of superblocks, and | 307 | These numbers control the maximum number of superblocks, and |
| 297 | thus the maximum number of mounted filesystems the kernel | 308 | thus the maximum number of mounted filesystems the kernel |
| @@ -299,33 +310,33 @@ can have. You only need to increase super-max if you need to | |||
| 299 | mount more filesystems than the current value in super-max | 310 | mount more filesystems than the current value in super-max |
| 300 | allows you to. | 311 | allows you to. |
| 301 | 312 | ||
| 302 | ============================================================== | ||
| 303 | 313 | ||
| 304 | aio-nr & aio-max-nr: | 314 | aio-nr & aio-max-nr |
| 315 | ------------------- | ||
| 305 | 316 | ||
| 306 | aio-nr shows the current system-wide number of asynchronous io | 317 | aio-nr shows the current system-wide number of asynchronous io |
| 307 | requests. aio-max-nr allows you to change the maximum value | 318 | requests. aio-max-nr allows you to change the maximum value |
| 308 | aio-nr can grow to. | 319 | aio-nr can grow to. |
| 309 | 320 | ||
| 310 | ============================================================== | ||
| 311 | 321 | ||
| 312 | mount-max: | 322 | mount-max |
| 323 | --------- | ||
| 313 | 324 | ||
| 314 | This denotes the maximum number of mounts that may exist | 325 | This denotes the maximum number of mounts that may exist |
| 315 | in a mount namespace. | 326 | in a mount namespace. |
| 316 | 327 | ||
| 317 | ============================================================== | ||
| 318 | 328 | ||
| 319 | 329 | ||
| 320 | 2. /proc/sys/fs/binfmt_misc | 330 | 2. /proc/sys/fs/binfmt_misc |
| 321 | ---------------------------------------------------------- | 331 | =========================== |
| 322 | 332 | ||
| 323 | Documentation for the files in /proc/sys/fs/binfmt_misc is | 333 | Documentation for the files in /proc/sys/fs/binfmt_misc is |
| 324 | in Documentation/admin-guide/binfmt-misc.rst. | 334 | in Documentation/admin-guide/binfmt-misc.rst. |
| 325 | 335 | ||
| 326 | 336 | ||
| 327 | 3. /proc/sys/fs/mqueue - POSIX message queues filesystem | 337 | 3. /proc/sys/fs/mqueue - POSIX message queues filesystem |
| 328 | ---------------------------------------------------------- | 338 | ======================================================== |
| 339 | |||
| 329 | 340 | ||
| 330 | The "mqueue" filesystem provides the necessary kernel features to enable the | 341 | The "mqueue" filesystem provides the necessary kernel features to enable the |
| 331 | creation of a user space library that implements the POSIX message queues | 342 | creation of a user space library that implements the POSIX message queues |
| @@ -356,7 +367,7 @@ the default message size value if attr parameter of mq_open(2) is NULL. If it | |||
| 356 | exceed msgsize_max, the default value is initialized msgsize_max. | 367 | exceed msgsize_max, the default value is initialized msgsize_max. |
| 357 | 368 | ||
| 358 | 4. /proc/sys/fs/epoll - Configuration options for the epoll interface | 369 | 4. /proc/sys/fs/epoll - Configuration options for the epoll interface |
| 359 | -------------------------------------------------------- | 370 | ===================================================================== |
| 360 | 371 | ||
| 361 | This directory contains configuration options for the epoll(7) interface. | 372 | This directory contains configuration options for the epoll(7) interface. |
| 362 | 373 | ||
| @@ -371,4 +382,3 @@ Each "watch" costs roughly 90 bytes on a 32bit kernel, and roughly 160 bytes | |||
| 371 | on a 64bit one. | 382 | on a 64bit one. |
| 372 | The current default value for max_user_watches is the 1/32 of the available | 383 | The current default value for max_user_watches is the 1/32 of the available |
| 373 | low memory, divided for the "watch" cost in bytes. | 384 | low memory, divided for the "watch" cost in bytes. |
| 374 | |||
diff --git a/Documentation/sysctl/README b/Documentation/admin-guide/sysctl/index.rst index d5f24ab0ecc3..03346f98c7b9 100644 --- a/Documentation/sysctl/README +++ b/Documentation/admin-guide/sysctl/index.rst | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | Documentation for /proc/sys/ kernel version 2.2.10 | 1 | =========================== |
| 2 | (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> | 2 | Documentation for /proc/sys |
| 3 | =========================== | ||
| 4 | |||
| 5 | Copyright (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> | ||
| 6 | |||
| 7 | ------------------------------------------------------------------------------ | ||
| 3 | 8 | ||
| 4 | 'Why', I hear you ask, 'would anyone even _want_ documentation | 9 | 'Why', I hear you ask, 'would anyone even _want_ documentation |
| 5 | for them sysctl files? If anybody really needs it, it's all in | 10 | for them sysctl files? If anybody really needs it, it's all in |
| @@ -12,11 +17,12 @@ have the time or knowledge to read the source code. | |||
| 12 | Furthermore, the programmers who built sysctl have built it to | 17 | Furthermore, the programmers who built sysctl have built it to |
| 13 | be actually used, not just for the fun of programming it :-) | 18 | be actually used, not just for the fun of programming it :-) |
| 14 | 19 | ||
| 15 | ============================================================== | 20 | ------------------------------------------------------------------------------ |
| 16 | 21 | ||
| 17 | Legal blurb: | 22 | Legal blurb: |
| 18 | 23 | ||
| 19 | As usual, there are two main things to consider: | 24 | As usual, there are two main things to consider: |
| 25 | |||
| 20 | 1. you get what you pay for | 26 | 1. you get what you pay for |
| 21 | 2. it's free | 27 | 2. it's free |
| 22 | 28 | ||
| @@ -35,15 +41,17 @@ stories to: <riel@nl.linux.org> | |||
| 35 | 41 | ||
| 36 | Rik van Riel. | 42 | Rik van Riel. |
| 37 | 43 | ||
| 38 | ============================================================== | 44 | -------------------------------------------------------------- |
| 39 | 45 | ||
| 40 | Introduction: | 46 | Introduction |
| 47 | ============ | ||
| 41 | 48 | ||
| 42 | Sysctl is a means of configuring certain aspects of the kernel | 49 | Sysctl is a means of configuring certain aspects of the kernel |
| 43 | at run-time, and the /proc/sys/ directory is there so that you | 50 | at run-time, and the /proc/sys/ directory is there so that you |
| 44 | don't even need special tools to do it! | 51 | don't even need special tools to do it! |
| 45 | In fact, there are only four things needed to use these config | 52 | In fact, there are only four things needed to use these config |
| 46 | facilities: | 53 | facilities: |
| 54 | |||
| 47 | - a running Linux system | 55 | - a running Linux system |
| 48 | - root access | 56 | - root access |
| 49 | - common sense (this is especially hard to come by these days) | 57 | - common sense (this is especially hard to come by these days) |
| @@ -54,7 +62,9 @@ several (arch-dependent?) subdirs. Each subdir is mainly about | |||
| 54 | one part of the kernel, so you can do configuration on a piece | 62 | one part of the kernel, so you can do configuration on a piece |
| 55 | by piece basis, or just some 'thematic frobbing'. | 63 | by piece basis, or just some 'thematic frobbing'. |
| 56 | 64 | ||
| 57 | The subdirs are about: | 65 | This documentation is about: |
| 66 | |||
| 67 | =============== =============================================================== | ||
| 58 | abi/ execution domains & personalities | 68 | abi/ execution domains & personalities |
| 59 | debug/ <empty> | 69 | debug/ <empty> |
| 60 | dev/ device specific information (eg dev/cdrom/info) | 70 | dev/ device specific information (eg dev/cdrom/info) |
| @@ -70,7 +80,19 @@ sunrpc/ SUN Remote Procedure Call (NFS) | |||
| 70 | vm/ memory management tuning | 80 | vm/ memory management tuning |
| 71 | buffer and cache management | 81 | buffer and cache management |
| 72 | user/ Per user per user namespace limits | 82 | user/ Per user per user namespace limits |
| 83 | =============== =============================================================== | ||
| 73 | 84 | ||
| 74 | These are the subdirs I have on my system. There might be more | 85 | These are the subdirs I have on my system. There might be more |
| 75 | or other subdirs in another setup. If you see another dir, I'd | 86 | or other subdirs in another setup. If you see another dir, I'd |
| 76 | really like to hear about it :-) | 87 | really like to hear about it :-) |
| 88 | |||
| 89 | .. toctree:: | ||
| 90 | :maxdepth: 1 | ||
| 91 | |||
| 92 | abi | ||
| 93 | fs | ||
| 94 | kernel | ||
| 95 | net | ||
| 96 | sunrpc | ||
| 97 | user | ||
| 98 | vm | ||
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/admin-guide/sysctl/kernel.rst index 1b2fe17cd2fa..032c7cd3cede 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/admin-guide/sysctl/kernel.rst | |||
| @@ -1,10 +1,16 @@ | |||
| 1 | Documentation for /proc/sys/kernel/* kernel version 2.2.10 | 1 | =================================== |
| 2 | (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> | 2 | Documentation for /proc/sys/kernel/ |
| 3 | (c) 2009, Shen Feng<shen@cn.fujitsu.com> | 3 | =================================== |
| 4 | 4 | ||
| 5 | For general info and legal blurb, please look in README. | 5 | kernel version 2.2.10 |
| 6 | 6 | ||
| 7 | ============================================================== | 7 | Copyright (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> |
| 8 | |||
| 9 | Copyright (c) 2009, Shen Feng<shen@cn.fujitsu.com> | ||
| 10 | |||
| 11 | For general info and legal blurb, please look in index.rst. | ||
| 12 | |||
| 13 | ------------------------------------------------------------------------------ | ||
| 8 | 14 | ||
| 9 | This file contains documentation for the sysctl files in | 15 | This file contains documentation for the sysctl files in |
| 10 | /proc/sys/kernel/ and is valid for Linux kernel version 2.2. | 16 | /proc/sys/kernel/ and is valid for Linux kernel version 2.2. |
| @@ -101,9 +107,9 @@ show up in /proc/sys/kernel: | |||
| 101 | - watchdog_thresh | 107 | - watchdog_thresh |
| 102 | - version | 108 | - version |
| 103 | 109 | ||
| 104 | ============================================================== | ||
| 105 | 110 | ||
| 106 | acct: | 111 | acct: |
| 112 | ===== | ||
| 107 | 113 | ||
| 108 | highwater lowwater frequency | 114 | highwater lowwater frequency |
| 109 | 115 | ||
| @@ -118,18 +124,18 @@ That is, suspend accounting if there left <= 2% free; resume it | |||
| 118 | if we got >=4%; consider information about amount of free space | 124 | if we got >=4%; consider information about amount of free space |
| 119 | valid for 30 seconds. | 125 | valid for 30 seconds. |
| 120 | 126 | ||
| 121 | ============================================================== | ||
| 122 | 127 | ||
| 123 | acpi_video_flags: | 128 | acpi_video_flags: |
| 129 | ================= | ||
| 124 | 130 | ||
| 125 | flags | 131 | flags |
| 126 | 132 | ||
| 127 | See Doc*/kernel/power/video.txt, it allows mode of video boot to be | 133 | See Doc*/kernel/power/video.txt, it allows mode of video boot to be |
| 128 | set during run time. | 134 | set during run time. |
| 129 | 135 | ||
| 130 | ============================================================== | ||
| 131 | 136 | ||
| 132 | auto_msgmni: | 137 | auto_msgmni: |
| 138 | ============ | ||
| 133 | 139 | ||
| 134 | This variable has no effect and may be removed in future kernel | 140 | This variable has no effect and may be removed in future kernel |
| 135 | releases. Reading it always returns 0. | 141 | releases. Reading it always returns 0. |
| @@ -139,9 +145,8 @@ Echoing "1" into this file enabled msgmni automatic recomputing. | |||
| 139 | Echoing "0" turned it off. auto_msgmni default value was 1. | 145 | Echoing "0" turned it off. auto_msgmni default value was 1. |
| 140 | 146 | ||
| 141 | 147 | ||
| 142 | ============================================================== | ||
| 143 | |||
| 144 | bootloader_type: | 148 | bootloader_type: |
| 149 | ================ | ||
| 145 | 150 | ||
| 146 | x86 bootloader identification | 151 | x86 bootloader identification |
| 147 | 152 | ||
| @@ -156,9 +161,9 @@ the value 340 = 0x154. | |||
| 156 | See the type_of_loader and ext_loader_type fields in | 161 | See the type_of_loader and ext_loader_type fields in |
| 157 | Documentation/x86/boot.rst for additional information. | 162 | Documentation/x86/boot.rst for additional information. |
| 158 | 163 | ||
| 159 | ============================================================== | ||
| 160 | 164 | ||
| 161 | bootloader_version: | 165 | bootloader_version: |
| 166 | =================== | ||
| 162 | 167 | ||
| 163 | x86 bootloader version | 168 | x86 bootloader version |
| 164 | 169 | ||
| @@ -168,27 +173,31 @@ file will contain the value 564 = 0x234. | |||
| 168 | See the type_of_loader and ext_loader_ver fields in | 173 | See the type_of_loader and ext_loader_ver fields in |
| 169 | Documentation/x86/boot.rst for additional information. | 174 | Documentation/x86/boot.rst for additional information. |
| 170 | 175 | ||
| 171 | ============================================================== | ||
| 172 | 176 | ||
| 173 | cap_last_cap | 177 | cap_last_cap: |
| 178 | ============= | ||
| 174 | 179 | ||
| 175 | Highest valid capability of the running kernel. Exports | 180 | Highest valid capability of the running kernel. Exports |
| 176 | CAP_LAST_CAP from the kernel. | 181 | CAP_LAST_CAP from the kernel. |
| 177 | 182 | ||
| 178 | ============================================================== | ||
| 179 | 183 | ||
| 180 | core_pattern: | 184 | core_pattern: |
| 185 | ============= | ||
| 181 | 186 | ||
| 182 | core_pattern is used to specify a core dumpfile pattern name. | 187 | core_pattern is used to specify a core dumpfile pattern name. |
| 183 | . max length 127 characters; default value is "core" | 188 | |
| 184 | . core_pattern is used as a pattern template for the output filename; | 189 | * max length 127 characters; default value is "core" |
| 190 | * core_pattern is used as a pattern template for the output filename; | ||
| 185 | certain string patterns (beginning with '%') are substituted with | 191 | certain string patterns (beginning with '%') are substituted with |
| 186 | their actual values. | 192 | their actual values. |
| 187 | . backward compatibility with core_uses_pid: | 193 | * backward compatibility with core_uses_pid: |
| 194 | |||
| 188 | If core_pattern does not include "%p" (default does not) | 195 | If core_pattern does not include "%p" (default does not) |
| 189 | and core_uses_pid is set, then .PID will be appended to | 196 | and core_uses_pid is set, then .PID will be appended to |
| 190 | the filename. | 197 | the filename. |
| 191 | . corename format specifiers: | 198 | |
| 199 | * corename format specifiers:: | ||
| 200 | |||
| 192 | %<NUL> '%' is dropped | 201 | %<NUL> '%' is dropped |
| 193 | %% output one '%' | 202 | %% output one '%' |
| 194 | %p pid | 203 | %p pid |
| @@ -205,13 +214,14 @@ core_pattern is used to specify a core dumpfile pattern name. | |||
| 205 | %e executable filename (may be shortened) | 214 | %e executable filename (may be shortened) |
| 206 | %E executable path | 215 | %E executable path |
| 207 | %<OTHER> both are dropped | 216 | %<OTHER> both are dropped |
| 208 | . If the first character of the pattern is a '|', the kernel will treat | 217 | |
| 218 | * If the first character of the pattern is a '|', the kernel will treat | ||
| 209 | the rest of the pattern as a command to run. The core dump will be | 219 | the rest of the pattern as a command to run. The core dump will be |
| 210 | written to the standard input of that program instead of to a file. | 220 | written to the standard input of that program instead of to a file. |
| 211 | 221 | ||
| 212 | ============================================================== | ||
| 213 | 222 | ||
| 214 | core_pipe_limit: | 223 | core_pipe_limit: |
| 224 | ================ | ||
| 215 | 225 | ||
| 216 | This sysctl is only applicable when core_pattern is configured to pipe | 226 | This sysctl is only applicable when core_pattern is configured to pipe |
| 217 | core files to a user space helper (when the first character of | 227 | core files to a user space helper (when the first character of |
| @@ -232,9 +242,9 @@ parallel, but that no waiting will take place (i.e. the collecting | |||
| 232 | process is not guaranteed access to /proc/<crashing pid>/). This | 242 | process is not guaranteed access to /proc/<crashing pid>/). This |
| 233 | value defaults to 0. | 243 | value defaults to 0. |
| 234 | 244 | ||
| 235 | ============================================================== | ||
| 236 | 245 | ||
| 237 | core_uses_pid: | 246 | core_uses_pid: |
| 247 | ============== | ||
| 238 | 248 | ||
| 239 | The default coredump filename is "core". By setting | 249 | The default coredump filename is "core". By setting |
| 240 | core_uses_pid to 1, the coredump filename becomes core.PID. | 250 | core_uses_pid to 1, the coredump filename becomes core.PID. |
| @@ -242,9 +252,9 @@ If core_pattern does not include "%p" (default does not) | |||
| 242 | and core_uses_pid is set, then .PID will be appended to | 252 | and core_uses_pid is set, then .PID will be appended to |
| 243 | the filename. | 253 | the filename. |
| 244 | 254 | ||
| 245 | ============================================================== | ||
| 246 | 255 | ||
| 247 | ctrl-alt-del: | 256 | ctrl-alt-del: |
| 257 | ============= | ||
| 248 | 258 | ||
| 249 | When the value in this file is 0, ctrl-alt-del is trapped and | 259 | When the value in this file is 0, ctrl-alt-del is trapped and |
| 250 | sent to the init(1) program to handle a graceful restart. | 260 | sent to the init(1) program to handle a graceful restart. |
| @@ -252,14 +262,15 @@ When, however, the value is > 0, Linux's reaction to a Vulcan | |||
| 252 | Nerve Pinch (tm) will be an immediate reboot, without even | 262 | Nerve Pinch (tm) will be an immediate reboot, without even |
| 253 | syncing its dirty buffers. | 263 | syncing its dirty buffers. |
| 254 | 264 | ||
| 255 | Note: when a program (like dosemu) has the keyboard in 'raw' | 265 | Note: |
| 256 | mode, the ctrl-alt-del is intercepted by the program before it | 266 | when a program (like dosemu) has the keyboard in 'raw' |
| 257 | ever reaches the kernel tty layer, and it's up to the program | 267 | mode, the ctrl-alt-del is intercepted by the program before it |
| 258 | to decide what to do with it. | 268 | ever reaches the kernel tty layer, and it's up to the program |
| 269 | to decide what to do with it. | ||
| 259 | 270 | ||
| 260 | ============================================================== | ||
| 261 | 271 | ||
| 262 | dmesg_restrict: | 272 | dmesg_restrict: |
| 273 | =============== | ||
| 263 | 274 | ||
| 264 | This toggle indicates whether unprivileged users are prevented | 275 | This toggle indicates whether unprivileged users are prevented |
| 265 | from using dmesg(8) to view messages from the kernel's log buffer. | 276 | from using dmesg(8) to view messages from the kernel's log buffer. |
| @@ -270,18 +281,21 @@ dmesg(8). | |||
| 270 | The kernel config option CONFIG_SECURITY_DMESG_RESTRICT sets the | 281 | The kernel config option CONFIG_SECURITY_DMESG_RESTRICT sets the |
| 271 | default value of dmesg_restrict. | 282 | default value of dmesg_restrict. |
| 272 | 283 | ||
| 273 | ============================================================== | ||
| 274 | 284 | ||
| 275 | domainname & hostname: | 285 | domainname & hostname: |
| 286 | ====================== | ||
| 276 | 287 | ||
| 277 | These files can be used to set the NIS/YP domainname and the | 288 | These files can be used to set the NIS/YP domainname and the |
| 278 | hostname of your box in exactly the same way as the commands | 289 | hostname of your box in exactly the same way as the commands |
| 279 | domainname and hostname, i.e.: | 290 | domainname and hostname, i.e.:: |
| 280 | # echo "darkstar" > /proc/sys/kernel/hostname | 291 | |
| 281 | # echo "mydomain" > /proc/sys/kernel/domainname | 292 | # echo "darkstar" > /proc/sys/kernel/hostname |
| 282 | has the same effect as | 293 | # echo "mydomain" > /proc/sys/kernel/domainname |
| 283 | # hostname "darkstar" | 294 | |
| 284 | # domainname "mydomain" | 295 | has the same effect as:: |
| 296 | |||
| 297 | # hostname "darkstar" | ||
| 298 | # domainname "mydomain" | ||
| 285 | 299 | ||
| 286 | Note, however, that the classic darkstar.frop.org has the | 300 | Note, however, that the classic darkstar.frop.org has the |
| 287 | hostname "darkstar" and DNS (Internet Domain Name Server) | 301 | hostname "darkstar" and DNS (Internet Domain Name Server) |
| @@ -290,8 +304,9 @@ Information Service) or YP (Yellow Pages) domainname. These two | |||
| 290 | domain names are in general different. For a detailed discussion | 304 | domain names are in general different. For a detailed discussion |
| 291 | see the hostname(1) man page. | 305 | see the hostname(1) man page. |
| 292 | 306 | ||
| 293 | ============================================================== | 307 | |
| 294 | hardlockup_all_cpu_backtrace: | 308 | hardlockup_all_cpu_backtrace: |
| 309 | ============================= | ||
| 295 | 310 | ||
| 296 | This value controls the hard lockup detector behavior when a hard | 311 | This value controls the hard lockup detector behavior when a hard |
| 297 | lockup condition is detected as to whether or not to gather further | 312 | lockup condition is detected as to whether or not to gather further |
| @@ -301,9 +316,10 @@ will be initiated. | |||
| 301 | 0: do nothing. This is the default behavior. | 316 | 0: do nothing. This is the default behavior. |
| 302 | 317 | ||
| 303 | 1: on detection capture more debug information. | 318 | 1: on detection capture more debug information. |
| 304 | ============================================================== | 319 | |
| 305 | 320 | ||
| 306 | hardlockup_panic: | 321 | hardlockup_panic: |
| 322 | ================= | ||
| 307 | 323 | ||
| 308 | This parameter can be used to control whether the kernel panics | 324 | This parameter can be used to control whether the kernel panics |
| 309 | when a hard lockup is detected. | 325 | when a hard lockup is detected. |
| @@ -311,19 +327,19 @@ when a hard lockup is detected. | |||
| 311 | 0 - don't panic on hard lockup | 327 | 0 - don't panic on hard lockup |
| 312 | 1 - panic on hard lockup | 328 | 1 - panic on hard lockup |
| 313 | 329 | ||
| 314 | See Documentation/lockup-watchdogs.txt for more information. This can | 330 | See Documentation/admin-guide/lockup-watchdogs.rst for more information. This can |
| 315 | also be set using the nmi_watchdog kernel parameter. | 331 | also be set using the nmi_watchdog kernel parameter. |
| 316 | 332 | ||
| 317 | ============================================================== | ||
| 318 | 333 | ||
| 319 | hotplug: | 334 | hotplug: |
| 335 | ======== | ||
| 320 | 336 | ||
| 321 | Path for the hotplug policy agent. | 337 | Path for the hotplug policy agent. |
| 322 | Default value is "/sbin/hotplug". | 338 | Default value is "/sbin/hotplug". |
| 323 | 339 | ||
| 324 | ============================================================== | ||
| 325 | 340 | ||
| 326 | hung_task_panic: | 341 | hung_task_panic: |
| 342 | ================ | ||
| 327 | 343 | ||
| 328 | Controls the kernel's behavior when a hung task is detected. | 344 | Controls the kernel's behavior when a hung task is detected. |
| 329 | This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. | 345 | This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. |
| @@ -332,27 +348,28 @@ This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. | |||
| 332 | 348 | ||
| 333 | 1: panic immediately. | 349 | 1: panic immediately. |
| 334 | 350 | ||
| 335 | ============================================================== | ||
| 336 | 351 | ||
| 337 | hung_task_check_count: | 352 | hung_task_check_count: |
| 353 | ====================== | ||
| 338 | 354 | ||
| 339 | The upper bound on the number of tasks that are checked. | 355 | The upper bound on the number of tasks that are checked. |
| 340 | This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. | 356 | This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. |
| 341 | 357 | ||
| 342 | ============================================================== | ||
| 343 | 358 | ||
| 344 | hung_task_timeout_secs: | 359 | hung_task_timeout_secs: |
| 360 | ======================= | ||
| 345 | 361 | ||
| 346 | When a task in D state did not get scheduled | 362 | When a task in D state did not get scheduled |
| 347 | for more than this value report a warning. | 363 | for more than this value report a warning. |
| 348 | This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. | 364 | This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. |
| 349 | 365 | ||
| 350 | 0: means infinite timeout - no checking done. | 366 | 0: means infinite timeout - no checking done. |
| 367 | |||
| 351 | Possible values to set are in range {0..LONG_MAX/HZ}. | 368 | Possible values to set are in range {0..LONG_MAX/HZ}. |
| 352 | 369 | ||
| 353 | ============================================================== | ||
| 354 | 370 | ||
| 355 | hung_task_check_interval_secs: | 371 | hung_task_check_interval_secs: |
| 372 | ============================== | ||
| 356 | 373 | ||
| 357 | Hung task check interval. If hung task checking is enabled | 374 | Hung task check interval. If hung task checking is enabled |
| 358 | (see hung_task_timeout_secs), the check is done every | 375 | (see hung_task_timeout_secs), the check is done every |
| @@ -362,9 +379,9 @@ This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. | |||
| 362 | 0 (default): means use hung_task_timeout_secs as checking interval. | 379 | 0 (default): means use hung_task_timeout_secs as checking interval. |
| 363 | Possible values to set are in range {0..LONG_MAX/HZ}. | 380 | Possible values to set are in range {0..LONG_MAX/HZ}. |
| 364 | 381 | ||
| 365 | ============================================================== | ||
| 366 | 382 | ||
| 367 | hung_task_warnings: | 383 | hung_task_warnings: |
| 384 | =================== | ||
| 368 | 385 | ||
| 369 | The maximum number of warnings to report. During a check interval | 386 | The maximum number of warnings to report. During a check interval |
| 370 | if a hung task is detected, this value is decreased by 1. | 387 | if a hung task is detected, this value is decreased by 1. |
| @@ -373,9 +390,9 @@ This file shows up if CONFIG_DETECT_HUNG_TASK is enabled. | |||
| 373 | 390 | ||
| 374 | -1: report an infinite number of warnings. | 391 | -1: report an infinite number of warnings. |
| 375 | 392 | ||
| 376 | ============================================================== | ||
| 377 | 393 | ||
| 378 | hyperv_record_panic_msg: | 394 | hyperv_record_panic_msg: |
| 395 | ======================== | ||
| 379 | 396 | ||
| 380 | Controls whether the panic kmsg data should be reported to Hyper-V. | 397 | Controls whether the panic kmsg data should be reported to Hyper-V. |
| 381 | 398 | ||
| @@ -383,9 +400,9 @@ Controls whether the panic kmsg data should be reported to Hyper-V. | |||
| 383 | 400 | ||
| 384 | 1: report the panic kmsg data. This is the default behavior. | 401 | 1: report the panic kmsg data. This is the default behavior. |
| 385 | 402 | ||
| 386 | ============================================================== | ||
| 387 | 403 | ||
| 388 | kexec_load_disabled: | 404 | kexec_load_disabled: |
| 405 | ==================== | ||
| 389 | 406 | ||
| 390 | A toggle indicating if the kexec_load syscall has been disabled. This | 407 | A toggle indicating if the kexec_load syscall has been disabled. This |
| 391 | value defaults to 0 (false: kexec_load enabled), but can be set to 1 | 408 | value defaults to 0 (false: kexec_load enabled), but can be set to 1 |
| @@ -395,9 +412,9 @@ loaded before disabling the syscall, allowing a system to set up (and | |||
| 395 | later use) an image without it being altered. Generally used together | 412 | later use) an image without it being altered. Generally used together |
| 396 | with the "modules_disabled" sysctl. | 413 | with the "modules_disabled" sysctl. |
| 397 | 414 | ||
| 398 | ============================================================== | ||
| 399 | 415 | ||
| 400 | kptr_restrict: | 416 | kptr_restrict: |
| 417 | ============== | ||
| 401 | 418 | ||
| 402 | This toggle indicates whether restrictions are placed on | 419 | This toggle indicates whether restrictions are placed on |
| 403 | exposing kernel addresses via /proc and other interfaces. | 420 | exposing kernel addresses via /proc and other interfaces. |
| @@ -420,16 +437,16 @@ values to unprivileged users is a concern. | |||
| 420 | When kptr_restrict is set to (2), kernel pointers printed using | 437 | When kptr_restrict is set to (2), kernel pointers printed using |
| 421 | %pK will be replaced with 0's regardless of privileges. | 438 | %pK will be replaced with 0's regardless of privileges. |
| 422 | 439 | ||
| 423 | ============================================================== | ||
| 424 | 440 | ||
| 425 | l2cr: (PPC only) | 441 | l2cr: (PPC only) |
| 442 | ================ | ||
| 426 | 443 | ||
| 427 | This flag controls the L2 cache of G3 processor boards. If | 444 | This flag controls the L2 cache of G3 processor boards. If |
| 428 | 0, the cache is disabled. Enabled if nonzero. | 445 | 0, the cache is disabled. Enabled if nonzero. |
| 429 | 446 | ||
| 430 | ============================================================== | ||
| 431 | 447 | ||
| 432 | modules_disabled: | 448 | modules_disabled: |
| 449 | ================= | ||
| 433 | 450 | ||
| 434 | A toggle value indicating if modules are allowed to be loaded | 451 | A toggle value indicating if modules are allowed to be loaded |
| 435 | in an otherwise modular kernel. This toggle defaults to off | 452 | in an otherwise modular kernel. This toggle defaults to off |
| @@ -437,9 +454,9 @@ in an otherwise modular kernel. This toggle defaults to off | |||
| 437 | neither loaded nor unloaded, and the toggle cannot be set back | 454 | neither loaded nor unloaded, and the toggle cannot be set back |
| 438 | to false. Generally used with the "kexec_load_disabled" toggle. | 455 | to false. Generally used with the "kexec_load_disabled" toggle. |
| 439 | 456 | ||
| 440 | ============================================================== | ||
| 441 | 457 | ||
| 442 | msg_next_id, sem_next_id, and shm_next_id: | 458 | msg_next_id, sem_next_id, and shm_next_id: |
| 459 | ========================================== | ||
| 443 | 460 | ||
| 444 | These three toggles allows to specify desired id for next allocated IPC | 461 | These three toggles allows to specify desired id for next allocated IPC |
| 445 | object: message, semaphore or shared memory respectively. | 462 | object: message, semaphore or shared memory respectively. |
| @@ -448,21 +465,22 @@ By default they are equal to -1, which means generic allocation logic. | |||
| 448 | Possible values to set are in range {0..INT_MAX}. | 465 | Possible values to set are in range {0..INT_MAX}. |
| 449 | 466 | ||
| 450 | Notes: | 467 | Notes: |
| 451 | 1) kernel doesn't guarantee, that new object will have desired id. So, | 468 | 1) kernel doesn't guarantee, that new object will have desired id. So, |
| 452 | it's up to userspace, how to handle an object with "wrong" id. | 469 | it's up to userspace, how to handle an object with "wrong" id. |
| 453 | 2) Toggle with non-default value will be set back to -1 by kernel after | 470 | 2) Toggle with non-default value will be set back to -1 by kernel after |
| 454 | successful IPC object allocation. If an IPC object allocation syscall | 471 | successful IPC object allocation. If an IPC object allocation syscall |
| 455 | fails, it is undefined if the value remains unmodified or is reset to -1. | 472 | fails, it is undefined if the value remains unmodified or is reset to -1. |
| 456 | 473 | ||
| 457 | ============================================================== | ||
| 458 | 474 | ||
| 459 | nmi_watchdog: | 475 | nmi_watchdog: |
| 476 | ============= | ||
| 460 | 477 | ||
| 461 | This parameter can be used to control the NMI watchdog | 478 | This parameter can be used to control the NMI watchdog |
| 462 | (i.e. the hard lockup detector) on x86 systems. | 479 | (i.e. the hard lockup detector) on x86 systems. |
| 463 | 480 | ||
| 464 | 0 - disable the hard lockup detector | 481 | 0 - disable the hard lockup detector |
| 465 | 1 - enable the hard lockup detector | 482 | |
| 483 | 1 - enable the hard lockup detector | ||
| 466 | 484 | ||
| 467 | The hard lockup detector monitors each CPU for its ability to respond to | 485 | The hard lockup detector monitors each CPU for its ability to respond to |
| 468 | timer interrupts. The mechanism utilizes CPU performance counter registers | 486 | timer interrupts. The mechanism utilizes CPU performance counter registers |
| @@ -470,15 +488,15 @@ that are programmed to generate Non-Maskable Interrupts (NMIs) periodically | |||
| 470 | while a CPU is busy. Hence, the alternative name 'NMI watchdog'. | 488 | while a CPU is busy. Hence, the alternative name 'NMI watchdog'. |
| 471 | 489 | ||
| 472 | The NMI watchdog is disabled by default if the kernel is running as a guest | 490 | The NMI watchdog is disabled by default if the kernel is running as a guest |
| 473 | in a KVM virtual machine. This default can be overridden by adding | 491 | in a KVM virtual machine. This default can be overridden by adding:: |
| 474 | 492 | ||
| 475 | nmi_watchdog=1 | 493 | nmi_watchdog=1 |
| 476 | 494 | ||
| 477 | to the guest kernel command line (see Documentation/admin-guide/kernel-parameters.rst). | 495 | to the guest kernel command line (see Documentation/admin-guide/kernel-parameters.rst). |
| 478 | 496 | ||
| 479 | ============================================================== | ||
| 480 | 497 | ||
| 481 | numa_balancing | 498 | numa_balancing: |
| 499 | =============== | ||
| 482 | 500 | ||
| 483 | Enables/disables automatic page fault based NUMA memory | 501 | Enables/disables automatic page fault based NUMA memory |
| 484 | balancing. Memory is moved automatically to nodes | 502 | balancing. Memory is moved automatically to nodes |
| @@ -500,10 +518,9 @@ faults may be controlled by the numa_balancing_scan_period_min_ms, | |||
| 500 | numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms, | 518 | numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms, |
| 501 | numa_balancing_scan_size_mb, and numa_balancing_settle_count sysctls. | 519 | numa_balancing_scan_size_mb, and numa_balancing_settle_count sysctls. |
| 502 | 520 | ||
| 503 | ============================================================== | 521 | numa_balancing_scan_period_min_ms, numa_balancing_scan_delay_ms, numa_balancing_scan_period_max_ms, numa_balancing_scan_size_mb |
| 522 | =============================================================================================================================== | ||
| 504 | 523 | ||
| 505 | numa_balancing_scan_period_min_ms, numa_balancing_scan_delay_ms, | ||
| 506 | numa_balancing_scan_period_max_ms, numa_balancing_scan_size_mb | ||
| 507 | 524 | ||
| 508 | Automatic NUMA balancing scans tasks address space and unmaps pages to | 525 | Automatic NUMA balancing scans tasks address space and unmaps pages to |
| 509 | detect if pages are properly placed or if the data should be migrated to a | 526 | detect if pages are properly placed or if the data should be migrated to a |
| @@ -539,16 +556,18 @@ rate for each task. | |||
| 539 | numa_balancing_scan_size_mb is how many megabytes worth of pages are | 556 | numa_balancing_scan_size_mb is how many megabytes worth of pages are |
| 540 | scanned for a given scan. | 557 | scanned for a given scan. |
| 541 | 558 | ||
| 542 | ============================================================== | ||
| 543 | 559 | ||
| 544 | osrelease, ostype & version: | 560 | osrelease, ostype & version: |
| 561 | ============================ | ||
| 562 | |||
| 563 | :: | ||
| 545 | 564 | ||
| 546 | # cat osrelease | 565 | # cat osrelease |
| 547 | 2.1.88 | 566 | 2.1.88 |
| 548 | # cat ostype | 567 | # cat ostype |
| 549 | Linux | 568 | Linux |
| 550 | # cat version | 569 | # cat version |
| 551 | #5 Wed Feb 25 21:49:24 MET 1998 | 570 | #5 Wed Feb 25 21:49:24 MET 1998 |
| 552 | 571 | ||
| 553 | The files osrelease and ostype should be clear enough. Version | 572 | The files osrelease and ostype should be clear enough. Version |
| 554 | needs a little more clarification however. The '#5' means that | 573 | needs a little more clarification however. The '#5' means that |
| @@ -556,9 +575,9 @@ this is the fifth kernel built from this source base and the | |||
| 556 | date behind it indicates the time the kernel was built. | 575 | date behind it indicates the time the kernel was built. |
| 557 | The only way to tune these values is to rebuild the kernel :-) | 576 | The only way to tune these values is to rebuild the kernel :-) |
| 558 | 577 | ||
| 559 | ============================================================== | ||
| 560 | 578 | ||
| 561 | overflowgid & overflowuid: | 579 | overflowgid & overflowuid: |
| 580 | ========================== | ||
| 562 | 581 | ||
| 563 | if your architecture did not always support 32-bit UIDs (i.e. arm, | 582 | if your architecture did not always support 32-bit UIDs (i.e. arm, |
| 564 | i386, m68k, sh, and sparc32), a fixed UID and GID will be returned to | 583 | i386, m68k, sh, and sparc32), a fixed UID and GID will be returned to |
| @@ -568,17 +587,17 @@ actual UID or GID would exceed 65535. | |||
| 568 | These sysctls allow you to change the value of the fixed UID and GID. | 587 | These sysctls allow you to change the value of the fixed UID and GID. |
| 569 | The default is 65534. | 588 | The default is 65534. |
| 570 | 589 | ||
| 571 | ============================================================== | ||
| 572 | 590 | ||
| 573 | panic: | 591 | panic: |
| 592 | ====== | ||
| 574 | 593 | ||
| 575 | The value in this file represents the number of seconds the kernel | 594 | The value in this file represents the number of seconds the kernel |
| 576 | waits before rebooting on a panic. When you use the software watchdog, | 595 | waits before rebooting on a panic. When you use the software watchdog, |
| 577 | the recommended setting is 60. | 596 | the recommended setting is 60. |
| 578 | 597 | ||
| 579 | ============================================================== | ||
| 580 | 598 | ||
| 581 | panic_on_io_nmi: | 599 | panic_on_io_nmi: |
| 600 | ================ | ||
| 582 | 601 | ||
| 583 | Controls the kernel's behavior when a CPU receives an NMI caused by | 602 | Controls the kernel's behavior when a CPU receives an NMI caused by |
| 584 | an IO error. | 603 | an IO error. |
| @@ -591,20 +610,20 @@ an IO error. | |||
| 591 | servers issue this sort of NMI when the dump button is pushed, | 610 | servers issue this sort of NMI when the dump button is pushed, |
| 592 | and you can use this option to take a crash dump. | 611 | and you can use this option to take a crash dump. |
| 593 | 612 | ||
| 594 | ============================================================== | ||
| 595 | 613 | ||
| 596 | panic_on_oops: | 614 | panic_on_oops: |
| 615 | ============== | ||
| 597 | 616 | ||
| 598 | Controls the kernel's behaviour when an oops or BUG is encountered. | 617 | Controls the kernel's behaviour when an oops or BUG is encountered. |
| 599 | 618 | ||
| 600 | 0: try to continue operation | 619 | 0: try to continue operation |
| 601 | 620 | ||
| 602 | 1: panic immediately. If the `panic' sysctl is also non-zero then the | 621 | 1: panic immediately. If the `panic` sysctl is also non-zero then the |
| 603 | machine will be rebooted. | 622 | machine will be rebooted. |
| 604 | 623 | ||
| 605 | ============================================================== | ||
| 606 | 624 | ||
| 607 | panic_on_stackoverflow: | 625 | panic_on_stackoverflow: |
| 626 | ======================= | ||
| 608 | 627 | ||
| 609 | Controls the kernel's behavior when detecting the overflows of | 628 | Controls the kernel's behavior when detecting the overflows of |
| 610 | kernel, IRQ and exception stacks except a user stack. | 629 | kernel, IRQ and exception stacks except a user stack. |
| @@ -614,9 +633,9 @@ This file shows up if CONFIG_DEBUG_STACKOVERFLOW is enabled. | |||
| 614 | 633 | ||
| 615 | 1: panic immediately. | 634 | 1: panic immediately. |
| 616 | 635 | ||
| 617 | ============================================================== | ||
| 618 | 636 | ||
| 619 | panic_on_unrecovered_nmi: | 637 | panic_on_unrecovered_nmi: |
| 638 | ========================= | ||
| 620 | 639 | ||
| 621 | The default Linux behaviour on an NMI of either memory or unknown is | 640 | The default Linux behaviour on an NMI of either memory or unknown is |
| 622 | to continue operation. For many environments such as scientific | 641 | to continue operation. For many environments such as scientific |
| @@ -627,9 +646,9 @@ A small number of systems do generate NMI's for bizarre random reasons | |||
| 627 | such as power management so the default is off. That sysctl works like | 646 | such as power management so the default is off. That sysctl works like |
| 628 | the existing panic controls already in that directory. | 647 | the existing panic controls already in that directory. |
| 629 | 648 | ||
| 630 | ============================================================== | ||
| 631 | 649 | ||
| 632 | panic_on_warn: | 650 | panic_on_warn: |
| 651 | ============== | ||
| 633 | 652 | ||
| 634 | Calls panic() in the WARN() path when set to 1. This is useful to avoid | 653 | Calls panic() in the WARN() path when set to 1. This is useful to avoid |
| 635 | a kernel rebuild when attempting to kdump at the location of a WARN(). | 654 | a kernel rebuild when attempting to kdump at the location of a WARN(). |
| @@ -638,25 +657,28 @@ a kernel rebuild when attempting to kdump at the location of a WARN(). | |||
| 638 | 657 | ||
| 639 | 1: call panic() after printing out WARN() location. | 658 | 1: call panic() after printing out WARN() location. |
| 640 | 659 | ||
| 641 | ============================================================== | ||
| 642 | 660 | ||
| 643 | panic_print: | 661 | panic_print: |
| 662 | ============ | ||
| 644 | 663 | ||
| 645 | Bitmask for printing system info when panic happens. User can chose | 664 | Bitmask for printing system info when panic happens. User can chose |
| 646 | combination of the following bits: | 665 | combination of the following bits: |
| 647 | 666 | ||
| 648 | bit 0: print all tasks info | 667 | ===== ======================================== |
| 649 | bit 1: print system memory info | 668 | bit 0 print all tasks info |
| 650 | bit 2: print timer info | 669 | bit 1 print system memory info |
| 651 | bit 3: print locks info if CONFIG_LOCKDEP is on | 670 | bit 2 print timer info |
| 652 | bit 4: print ftrace buffer | 671 | bit 3 print locks info if CONFIG_LOCKDEP is on |
| 672 | bit 4 print ftrace buffer | ||
| 673 | ===== ======================================== | ||
| 674 | |||
| 675 | So for example to print tasks and memory info on panic, user can:: | ||
| 653 | 676 | ||
| 654 | So for example to print tasks and memory info on panic, user can: | ||
| 655 | echo 3 > /proc/sys/kernel/panic_print | 677 | echo 3 > /proc/sys/kernel/panic_print |
| 656 | 678 | ||
| 657 | ============================================================== | ||
| 658 | 679 | ||
| 659 | panic_on_rcu_stall: | 680 | panic_on_rcu_stall: |
| 681 | =================== | ||
| 660 | 682 | ||
| 661 | When set to 1, calls panic() after RCU stall detection messages. This | 683 | When set to 1, calls panic() after RCU stall detection messages. This |
| 662 | is useful to define the root cause of RCU stalls using a vmcore. | 684 | is useful to define the root cause of RCU stalls using a vmcore. |
| @@ -665,9 +687,9 @@ is useful to define the root cause of RCU stalls using a vmcore. | |||
| 665 | 687 | ||
| 666 | 1: panic() after printing RCU stall messages. | 688 | 1: panic() after printing RCU stall messages. |
| 667 | 689 | ||
| 668 | ============================================================== | ||
| 669 | 690 | ||
| 670 | perf_cpu_time_max_percent: | 691 | perf_cpu_time_max_percent: |
| 692 | ========================== | ||
| 671 | 693 | ||
| 672 | Hints to the kernel how much CPU time it should be allowed to | 694 | Hints to the kernel how much CPU time it should be allowed to |
| 673 | use to handle perf sampling events. If the perf subsystem | 695 | use to handle perf sampling events. If the perf subsystem |
| @@ -680,10 +702,12 @@ unexpectedly take too long to execute, the NMIs can become | |||
| 680 | stacked up next to each other so much that nothing else is | 702 | stacked up next to each other so much that nothing else is |
| 681 | allowed to execute. | 703 | allowed to execute. |
| 682 | 704 | ||
| 683 | 0: disable the mechanism. Do not monitor or correct perf's | 705 | 0: |
| 706 | disable the mechanism. Do not monitor or correct perf's | ||
| 684 | sampling rate no matter how CPU time it takes. | 707 | sampling rate no matter how CPU time it takes. |
| 685 | 708 | ||
| 686 | 1-100: attempt to throttle perf's sample rate to this | 709 | 1-100: |
| 710 | attempt to throttle perf's sample rate to this | ||
| 687 | percentage of CPU. Note: the kernel calculates an | 711 | percentage of CPU. Note: the kernel calculates an |
| 688 | "expected" length of each sample event. 100 here means | 712 | "expected" length of each sample event. 100 here means |
| 689 | 100% of that expected length. Even if this is set to | 713 | 100% of that expected length. Even if this is set to |
| @@ -691,23 +715,30 @@ allowed to execute. | |||
| 691 | length is exceeded. Set to 0 if you truly do not care | 715 | length is exceeded. Set to 0 if you truly do not care |
| 692 | how much CPU is consumed. | 716 | how much CPU is consumed. |
| 693 | 717 | ||
| 694 | ============================================================== | ||
| 695 | 718 | ||
| 696 | perf_event_paranoid: | 719 | perf_event_paranoid: |
| 720 | ==================== | ||
| 697 | 721 | ||
| 698 | Controls use of the performance events system by unprivileged | 722 | Controls use of the performance events system by unprivileged |
| 699 | users (without CAP_SYS_ADMIN). The default value is 2. | 723 | users (without CAP_SYS_ADMIN). The default value is 2. |
| 700 | 724 | ||
| 701 | -1: Allow use of (almost) all events by all users | 725 | === ================================================================== |
| 726 | -1 Allow use of (almost) all events by all users | ||
| 727 | |||
| 702 | Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK | 728 | Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK |
| 703 | >=0: Disallow ftrace function tracepoint by users without CAP_SYS_ADMIN | 729 | |
| 730 | >=0 Disallow ftrace function tracepoint by users without CAP_SYS_ADMIN | ||
| 731 | |||
| 704 | Disallow raw tracepoint access by users without CAP_SYS_ADMIN | 732 | Disallow raw tracepoint access by users without CAP_SYS_ADMIN |
| 705 | >=1: Disallow CPU event access by users without CAP_SYS_ADMIN | ||
| 706 | >=2: Disallow kernel profiling by users without CAP_SYS_ADMIN | ||
| 707 | 733 | ||
| 708 | ============================================================== | 734 | >=1 Disallow CPU event access by users without CAP_SYS_ADMIN |
| 735 | |||
| 736 | >=2 Disallow kernel profiling by users without CAP_SYS_ADMIN | ||
| 737 | === ================================================================== | ||
| 738 | |||
| 709 | 739 | ||
| 710 | perf_event_max_stack: | 740 | perf_event_max_stack: |
| 741 | ===================== | ||
| 711 | 742 | ||
| 712 | Controls maximum number of stack frames to copy for (attr.sample_type & | 743 | Controls maximum number of stack frames to copy for (attr.sample_type & |
| 713 | PERF_SAMPLE_CALLCHAIN) configured events, for instance, when using | 744 | PERF_SAMPLE_CALLCHAIN) configured events, for instance, when using |
| @@ -718,17 +749,17 @@ enabled, otherwise writing to this file will return -EBUSY. | |||
| 718 | 749 | ||
| 719 | The default value is 127. | 750 | The default value is 127. |
| 720 | 751 | ||
| 721 | ============================================================== | ||
| 722 | 752 | ||
| 723 | perf_event_mlock_kb: | 753 | perf_event_mlock_kb: |
| 754 | ==================== | ||
| 724 | 755 | ||
| 725 | Control size of per-cpu ring buffer not counted agains mlock limit. | 756 | Control size of per-cpu ring buffer not counted agains mlock limit. |
| 726 | 757 | ||
| 727 | The default value is 512 + 1 page | 758 | The default value is 512 + 1 page |
| 728 | 759 | ||
| 729 | ============================================================== | ||
| 730 | 760 | ||
| 731 | perf_event_max_contexts_per_stack: | 761 | perf_event_max_contexts_per_stack: |
| 762 | ================================== | ||
| 732 | 763 | ||
| 733 | Controls maximum number of stack frame context entries for | 764 | Controls maximum number of stack frame context entries for |
| 734 | (attr.sample_type & PERF_SAMPLE_CALLCHAIN) configured events, for | 765 | (attr.sample_type & PERF_SAMPLE_CALLCHAIN) configured events, for |
| @@ -739,25 +770,25 @@ enabled, otherwise writing to this file will return -EBUSY. | |||
| 739 | 770 | ||
| 740 | The default value is 8. | 771 | The default value is 8. |
| 741 | 772 | ||
| 742 | ============================================================== | ||
| 743 | 773 | ||
| 744 | pid_max: | 774 | pid_max: |
| 775 | ======== | ||
| 745 | 776 | ||
| 746 | PID allocation wrap value. When the kernel's next PID value | 777 | PID allocation wrap value. When the kernel's next PID value |
| 747 | reaches this value, it wraps back to a minimum PID value. | 778 | reaches this value, it wraps back to a minimum PID value. |
| 748 | PIDs of value pid_max or larger are not allocated. | 779 | PIDs of value pid_max or larger are not allocated. |
| 749 | 780 | ||
| 750 | ============================================================== | ||
| 751 | 781 | ||
| 752 | ns_last_pid: | 782 | ns_last_pid: |
| 783 | ============ | ||
| 753 | 784 | ||
| 754 | The last pid allocated in the current (the one task using this sysctl | 785 | The last pid allocated in the current (the one task using this sysctl |
| 755 | lives in) pid namespace. When selecting a pid for a next task on fork | 786 | lives in) pid namespace. When selecting a pid for a next task on fork |
| 756 | kernel tries to allocate a number starting from this one. | 787 | kernel tries to allocate a number starting from this one. |
| 757 | 788 | ||
| 758 | ============================================================== | ||
| 759 | 789 | ||
| 760 | powersave-nap: (PPC only) | 790 | powersave-nap: (PPC only) |
| 791 | ========================= | ||
| 761 | 792 | ||
| 762 | If set, Linux-PPC will use the 'nap' mode of powersaving, | 793 | If set, Linux-PPC will use the 'nap' mode of powersaving, |
| 763 | otherwise the 'doze' mode will be used. | 794 | otherwise the 'doze' mode will be used. |
| @@ -765,6 +796,7 @@ otherwise the 'doze' mode will be used. | |||
| 765 | ============================================================== | 796 | ============================================================== |
| 766 | 797 | ||
| 767 | printk: | 798 | printk: |
| 799 | ======= | ||
| 768 | 800 | ||
| 769 | The four values in printk denote: console_loglevel, | 801 | The four values in printk denote: console_loglevel, |
| 770 | default_message_loglevel, minimum_console_loglevel and | 802 | default_message_loglevel, minimum_console_loglevel and |
| @@ -774,25 +806,29 @@ These values influence printk() behavior when printing or | |||
| 774 | logging error messages. See 'man 2 syslog' for more info on | 806 | logging error messages. See 'man 2 syslog' for more info on |
| 775 | the different loglevels. | 807 | the different loglevels. |
| 776 | 808 | ||
| 777 | - console_loglevel: messages with a higher priority than | 809 | - console_loglevel: |
| 778 | this will be printed to the console | 810 | messages with a higher priority than |
| 779 | - default_message_loglevel: messages without an explicit priority | 811 | this will be printed to the console |
| 780 | will be printed with this priority | 812 | - default_message_loglevel: |
| 781 | - minimum_console_loglevel: minimum (highest) value to which | 813 | messages without an explicit priority |
| 782 | console_loglevel can be set | 814 | will be printed with this priority |
| 783 | - default_console_loglevel: default value for console_loglevel | 815 | - minimum_console_loglevel: |
| 816 | minimum (highest) value to which | ||
| 817 | console_loglevel can be set | ||
| 818 | - default_console_loglevel: | ||
| 819 | default value for console_loglevel | ||
| 784 | 820 | ||
| 785 | ============================================================== | ||
| 786 | 821 | ||
| 787 | printk_delay: | 822 | printk_delay: |
| 823 | ============= | ||
| 788 | 824 | ||
| 789 | Delay each printk message in printk_delay milliseconds | 825 | Delay each printk message in printk_delay milliseconds |
| 790 | 826 | ||
| 791 | Value from 0 - 10000 is allowed. | 827 | Value from 0 - 10000 is allowed. |
| 792 | 828 | ||
| 793 | ============================================================== | ||
| 794 | 829 | ||
| 795 | printk_ratelimit: | 830 | printk_ratelimit: |
| 831 | ================= | ||
| 796 | 832 | ||
| 797 | Some warning messages are rate limited. printk_ratelimit specifies | 833 | Some warning messages are rate limited. printk_ratelimit specifies |
| 798 | the minimum length of time between these messages (in jiffies), by | 834 | the minimum length of time between these messages (in jiffies), by |
| @@ -800,48 +836,52 @@ default we allow one every 5 seconds. | |||
| 800 | 836 | ||
| 801 | A value of 0 will disable rate limiting. | 837 | A value of 0 will disable rate limiting. |
| 802 | 838 | ||
| 803 | ============================================================== | ||
| 804 | 839 | ||
| 805 | printk_ratelimit_burst: | 840 | printk_ratelimit_burst: |
| 841 | ======================= | ||
| 806 | 842 | ||
| 807 | While long term we enforce one message per printk_ratelimit | 843 | While long term we enforce one message per printk_ratelimit |
| 808 | seconds, we do allow a burst of messages to pass through. | 844 | seconds, we do allow a burst of messages to pass through. |
| 809 | printk_ratelimit_burst specifies the number of messages we can | 845 | printk_ratelimit_burst specifies the number of messages we can |
| 810 | send before ratelimiting kicks in. | 846 | send before ratelimiting kicks in. |
| 811 | 847 | ||
| 812 | ============================================================== | ||
| 813 | 848 | ||
| 814 | printk_devkmsg: | 849 | printk_devkmsg: |
| 850 | =============== | ||
| 815 | 851 | ||
| 816 | Control the logging to /dev/kmsg from userspace: | 852 | Control the logging to /dev/kmsg from userspace: |
| 817 | 853 | ||
| 818 | ratelimit: default, ratelimited | 854 | ratelimit: |
| 855 | default, ratelimited | ||
| 856 | |||
| 819 | on: unlimited logging to /dev/kmsg from userspace | 857 | on: unlimited logging to /dev/kmsg from userspace |
| 858 | |||
| 820 | off: logging to /dev/kmsg disabled | 859 | off: logging to /dev/kmsg disabled |
| 821 | 860 | ||
| 822 | The kernel command line parameter printk.devkmsg= overrides this and is | 861 | The kernel command line parameter printk.devkmsg= overrides this and is |
| 823 | a one-time setting until next reboot: once set, it cannot be changed by | 862 | a one-time setting until next reboot: once set, it cannot be changed by |
| 824 | this sysctl interface anymore. | 863 | this sysctl interface anymore. |
| 825 | 864 | ||
| 826 | ============================================================== | ||
| 827 | 865 | ||
| 828 | randomize_va_space: | 866 | randomize_va_space: |
| 867 | =================== | ||
| 829 | 868 | ||
| 830 | This option can be used to select the type of process address | 869 | This option can be used to select the type of process address |
| 831 | space randomization that is used in the system, for architectures | 870 | space randomization that is used in the system, for architectures |
| 832 | that support this feature. | 871 | that support this feature. |
| 833 | 872 | ||
| 834 | 0 - Turn the process address space randomization off. This is the | 873 | == =========================================================================== |
| 874 | 0 Turn the process address space randomization off. This is the | ||
| 835 | default for architectures that do not support this feature anyways, | 875 | default for architectures that do not support this feature anyways, |
| 836 | and kernels that are booted with the "norandmaps" parameter. | 876 | and kernels that are booted with the "norandmaps" parameter. |
| 837 | 877 | ||
| 838 | 1 - Make the addresses of mmap base, stack and VDSO page randomized. | 878 | 1 Make the addresses of mmap base, stack and VDSO page randomized. |
| 839 | This, among other things, implies that shared libraries will be | 879 | This, among other things, implies that shared libraries will be |
| 840 | loaded to random addresses. Also for PIE-linked binaries, the | 880 | loaded to random addresses. Also for PIE-linked binaries, the |
| 841 | location of code start is randomized. This is the default if the | 881 | location of code start is randomized. This is the default if the |
| 842 | CONFIG_COMPAT_BRK option is enabled. | 882 | CONFIG_COMPAT_BRK option is enabled. |
| 843 | 883 | ||
| 844 | 2 - Additionally enable heap randomization. This is the default if | 884 | 2 Additionally enable heap randomization. This is the default if |
| 845 | CONFIG_COMPAT_BRK is disabled. | 885 | CONFIG_COMPAT_BRK is disabled. |
| 846 | 886 | ||
| 847 | There are a few legacy applications out there (such as some ancient | 887 | There are a few legacy applications out there (such as some ancient |
| @@ -854,18 +894,19 @@ that support this feature. | |||
| 854 | Systems with ancient and/or broken binaries should be configured | 894 | Systems with ancient and/or broken binaries should be configured |
| 855 | with CONFIG_COMPAT_BRK enabled, which excludes the heap from process | 895 | with CONFIG_COMPAT_BRK enabled, which excludes the heap from process |
| 856 | address space randomization. | 896 | address space randomization. |
| 897 | == =========================================================================== | ||
| 857 | 898 | ||
| 858 | ============================================================== | ||
| 859 | 899 | ||
| 860 | reboot-cmd: (Sparc only) | 900 | reboot-cmd: (Sparc only) |
| 901 | ======================== | ||
| 861 | 902 | ||
| 862 | ??? This seems to be a way to give an argument to the Sparc | 903 | ??? This seems to be a way to give an argument to the Sparc |
| 863 | ROM/Flash boot loader. Maybe to tell it what to do after | 904 | ROM/Flash boot loader. Maybe to tell it what to do after |
| 864 | rebooting. ??? | 905 | rebooting. ??? |
| 865 | 906 | ||
| 866 | ============================================================== | ||
| 867 | 907 | ||
| 868 | rtsig-max & rtsig-nr: | 908 | rtsig-max & rtsig-nr: |
| 909 | ===================== | ||
| 869 | 910 | ||
| 870 | The file rtsig-max can be used to tune the maximum number | 911 | The file rtsig-max can be used to tune the maximum number |
| 871 | of POSIX realtime (queued) signals that can be outstanding | 912 | of POSIX realtime (queued) signals that can be outstanding |
| @@ -873,9 +914,9 @@ in the system. | |||
| 873 | 914 | ||
| 874 | rtsig-nr shows the number of RT signals currently queued. | 915 | rtsig-nr shows the number of RT signals currently queued. |
| 875 | 916 | ||
| 876 | ============================================================== | ||
| 877 | 917 | ||
| 878 | sched_energy_aware: | 918 | sched_energy_aware: |
| 919 | =================== | ||
| 879 | 920 | ||
| 880 | Enables/disables Energy Aware Scheduling (EAS). EAS starts | 921 | Enables/disables Energy Aware Scheduling (EAS). EAS starts |
| 881 | automatically on platforms where it can run (that is, | 922 | automatically on platforms where it can run (that is, |
| @@ -884,17 +925,17 @@ Model available). If your platform happens to meet the | |||
| 884 | requirements for EAS but you do not want to use it, change | 925 | requirements for EAS but you do not want to use it, change |
| 885 | this value to 0. | 926 | this value to 0. |
| 886 | 927 | ||
| 887 | ============================================================== | ||
| 888 | 928 | ||
| 889 | sched_schedstats: | 929 | sched_schedstats: |
| 930 | ================= | ||
| 890 | 931 | ||
| 891 | Enables/disables scheduler statistics. Enabling this feature | 932 | Enables/disables scheduler statistics. Enabling this feature |
| 892 | incurs a small amount of overhead in the scheduler but is | 933 | incurs a small amount of overhead in the scheduler but is |
| 893 | useful for debugging and performance tuning. | 934 | useful for debugging and performance tuning. |
| 894 | 935 | ||
| 895 | ============================================================== | ||
| 896 | 936 | ||
| 897 | sg-big-buff: | 937 | sg-big-buff: |
| 938 | ============ | ||
| 898 | 939 | ||
| 899 | This file shows the size of the generic SCSI (sg) buffer. | 940 | This file shows the size of the generic SCSI (sg) buffer. |
| 900 | You can't tune it just yet, but you could change it on | 941 | You can't tune it just yet, but you could change it on |
| @@ -905,9 +946,9 @@ There shouldn't be any reason to change this value. If | |||
| 905 | you can come up with one, you probably know what you | 946 | you can come up with one, you probably know what you |
| 906 | are doing anyway :) | 947 | are doing anyway :) |
| 907 | 948 | ||
| 908 | ============================================================== | ||
| 909 | 949 | ||
| 910 | shmall: | 950 | shmall: |
| 951 | ======= | ||
| 911 | 952 | ||
| 912 | This parameter sets the total amount of shared memory pages that | 953 | This parameter sets the total amount of shared memory pages that |
| 913 | can be used system wide. Hence, SHMALL should always be at least | 954 | can be used system wide. Hence, SHMALL should always be at least |
| @@ -916,20 +957,20 @@ ceil(shmmax/PAGE_SIZE). | |||
| 916 | If you are not sure what the default PAGE_SIZE is on your Linux | 957 | If you are not sure what the default PAGE_SIZE is on your Linux |
| 917 | system, you can run the following command: | 958 | system, you can run the following command: |
| 918 | 959 | ||
| 919 | # getconf PAGE_SIZE | 960 | # getconf PAGE_SIZE |
| 920 | 961 | ||
| 921 | ============================================================== | ||
| 922 | 962 | ||
| 923 | shmmax: | 963 | shmmax: |
| 964 | ======= | ||
| 924 | 965 | ||
| 925 | This value can be used to query and set the run time limit | 966 | This value can be used to query and set the run time limit |
| 926 | on the maximum shared memory segment size that can be created. | 967 | on the maximum shared memory segment size that can be created. |
| 927 | Shared memory segments up to 1Gb are now supported in the | 968 | Shared memory segments up to 1Gb are now supported in the |
| 928 | kernel. This value defaults to SHMMAX. | 969 | kernel. This value defaults to SHMMAX. |
| 929 | 970 | ||
| 930 | ============================================================== | ||
| 931 | 971 | ||
| 932 | shm_rmid_forced: | 972 | shm_rmid_forced: |
| 973 | ================ | ||
| 933 | 974 | ||
| 934 | Linux lets you set resource limits, including how much memory one | 975 | Linux lets you set resource limits, including how much memory one |
| 935 | process can consume, via setrlimit(2). Unfortunately, shared memory | 976 | process can consume, via setrlimit(2). Unfortunately, shared memory |
| @@ -948,28 +989,30 @@ need this. | |||
| 948 | Note that if you change this from 0 to 1, already created segments | 989 | Note that if you change this from 0 to 1, already created segments |
| 949 | without users and with a dead originative process will be destroyed. | 990 | without users and with a dead originative process will be destroyed. |
| 950 | 991 | ||
| 951 | ============================================================== | ||
| 952 | 992 | ||
| 953 | sysctl_writes_strict: | 993 | sysctl_writes_strict: |
| 994 | ===================== | ||
| 954 | 995 | ||
| 955 | Control how file position affects the behavior of updating sysctl values | 996 | Control how file position affects the behavior of updating sysctl values |
| 956 | via the /proc/sys interface: | 997 | via the /proc/sys interface: |
| 957 | 998 | ||
| 958 | -1 - Legacy per-write sysctl value handling, with no printk warnings. | 999 | == ====================================================================== |
| 1000 | -1 Legacy per-write sysctl value handling, with no printk warnings. | ||
| 959 | Each write syscall must fully contain the sysctl value to be | 1001 | Each write syscall must fully contain the sysctl value to be |
| 960 | written, and multiple writes on the same sysctl file descriptor | 1002 | written, and multiple writes on the same sysctl file descriptor |
| 961 | will rewrite the sysctl value, regardless of file position. | 1003 | will rewrite the sysctl value, regardless of file position. |
| 962 | 0 - Same behavior as above, but warn about processes that perform writes | 1004 | 0 Same behavior as above, but warn about processes that perform writes |
| 963 | to a sysctl file descriptor when the file position is not 0. | 1005 | to a sysctl file descriptor when the file position is not 0. |
| 964 | 1 - (default) Respect file position when writing sysctl strings. Multiple | 1006 | 1 (default) Respect file position when writing sysctl strings. Multiple |
| 965 | writes will append to the sysctl value buffer. Anything past the max | 1007 | writes will append to the sysctl value buffer. Anything past the max |
| 966 | length of the sysctl value buffer will be ignored. Writes to numeric | 1008 | length of the sysctl value buffer will be ignored. Writes to numeric |
| 967 | sysctl entries must always be at file position 0 and the value must | 1009 | sysctl entries must always be at file position 0 and the value must |
| 968 | be fully contained in the buffer sent in the write syscall. | 1010 | be fully contained in the buffer sent in the write syscall. |
| 1011 | == ====================================================================== | ||
| 969 | 1012 | ||
| 970 | ============================================================== | ||
| 971 | 1013 | ||
| 972 | softlockup_all_cpu_backtrace: | 1014 | softlockup_all_cpu_backtrace: |
| 1015 | ============================= | ||
| 973 | 1016 | ||
| 974 | This value controls the soft lockup detector thread's behavior | 1017 | This value controls the soft lockup detector thread's behavior |
| 975 | when a soft lockup condition is detected as to whether or not | 1018 | when a soft lockup condition is detected as to whether or not |
| @@ -983,13 +1026,14 @@ NMI. | |||
| 983 | 1026 | ||
| 984 | 1: on detection capture more debug information. | 1027 | 1: on detection capture more debug information. |
| 985 | 1028 | ||
| 986 | ============================================================== | ||
| 987 | 1029 | ||
| 988 | soft_watchdog | 1030 | soft_watchdog: |
| 1031 | ============== | ||
| 989 | 1032 | ||
| 990 | This parameter can be used to control the soft lockup detector. | 1033 | This parameter can be used to control the soft lockup detector. |
| 991 | 1034 | ||
| 992 | 0 - disable the soft lockup detector | 1035 | 0 - disable the soft lockup detector |
| 1036 | |||
| 993 | 1 - enable the soft lockup detector | 1037 | 1 - enable the soft lockup detector |
| 994 | 1038 | ||
| 995 | The soft lockup detector monitors CPUs for threads that are hogging the CPUs | 1039 | The soft lockup detector monitors CPUs for threads that are hogging the CPUs |
| @@ -999,9 +1043,9 @@ interrupts which are needed for the 'watchdog/N' threads to be woken up by | |||
| 999 | the watchdog timer function, otherwise the NMI watchdog - if enabled - can | 1043 | the watchdog timer function, otherwise the NMI watchdog - if enabled - can |
| 1000 | detect a hard lockup condition. | 1044 | detect a hard lockup condition. |
| 1001 | 1045 | ||
| 1002 | ============================================================== | ||
| 1003 | 1046 | ||
| 1004 | stack_erasing | 1047 | stack_erasing: |
| 1048 | ============== | ||
| 1005 | 1049 | ||
| 1006 | This parameter can be used to control kernel stack erasing at the end | 1050 | This parameter can be used to control kernel stack erasing at the end |
| 1007 | of syscalls for kernels built with CONFIG_GCC_PLUGIN_STACKLEAK. | 1051 | of syscalls for kernels built with CONFIG_GCC_PLUGIN_STACKLEAK. |
| @@ -1015,37 +1059,40 @@ compilation sees a 1% slowdown, other systems and workloads may vary. | |||
| 1015 | 1059 | ||
| 1016 | 1: kernel stack erasing is enabled (default), it is performed before | 1060 | 1: kernel stack erasing is enabled (default), it is performed before |
| 1017 | returning to the userspace at the end of syscalls. | 1061 | returning to the userspace at the end of syscalls. |
| 1018 | ============================================================== | 1062 | |
| 1019 | 1063 | ||
| 1020 | tainted | 1064 | tainted |
| 1065 | ======= | ||
| 1021 | 1066 | ||
| 1022 | Non-zero if the kernel has been tainted. Numeric values, which can be | 1067 | Non-zero if the kernel has been tainted. Numeric values, which can be |
| 1023 | ORed together. The letters are seen in "Tainted" line of Oops reports. | 1068 | ORed together. The letters are seen in "Tainted" line of Oops reports. |
| 1024 | 1069 | ||
| 1025 | 1 (P): proprietary module was loaded | 1070 | ====== ===== ============================================================== |
| 1026 | 2 (F): module was force loaded | 1071 | 1 `(P)` proprietary module was loaded |
| 1027 | 4 (S): SMP kernel oops on an officially SMP incapable processor | 1072 | 2 `(F)` module was force loaded |
| 1028 | 8 (R): module was force unloaded | 1073 | 4 `(S)` SMP kernel oops on an officially SMP incapable processor |
| 1029 | 16 (M): processor reported a Machine Check Exception (MCE) | 1074 | 8 `(R)` module was force unloaded |
| 1030 | 32 (B): bad page referenced or some unexpected page flags | 1075 | 16 `(M)` processor reported a Machine Check Exception (MCE) |
| 1031 | 64 (U): taint requested by userspace application | 1076 | 32 `(B)` bad page referenced or some unexpected page flags |
| 1032 | 128 (D): kernel died recently, i.e. there was an OOPS or BUG | 1077 | 64 `(U)` taint requested by userspace application |
| 1033 | 256 (A): an ACPI table was overridden by user | 1078 | 128 `(D)` kernel died recently, i.e. there was an OOPS or BUG |
| 1034 | 512 (W): kernel issued warning | 1079 | 256 `(A)` an ACPI table was overridden by user |
| 1035 | 1024 (C): staging driver was loaded | 1080 | 512 `(W)` kernel issued warning |
| 1036 | 2048 (I): workaround for bug in platform firmware applied | 1081 | 1024 `(C)` staging driver was loaded |
| 1037 | 4096 (O): externally-built ("out-of-tree") module was loaded | 1082 | 2048 `(I)` workaround for bug in platform firmware applied |
| 1038 | 8192 (E): unsigned module was loaded | 1083 | 4096 `(O)` externally-built ("out-of-tree") module was loaded |
| 1039 | 16384 (L): soft lockup occurred | 1084 | 8192 `(E)` unsigned module was loaded |
| 1040 | 32768 (K): kernel has been live patched | 1085 | 16384 `(L)` soft lockup occurred |
| 1041 | 65536 (X): Auxiliary taint, defined and used by for distros | 1086 | 32768 `(K)` kernel has been live patched |
| 1042 | 131072 (T): The kernel was built with the struct randomization plugin | 1087 | 65536 `(X)` Auxiliary taint, defined and used by for distros |
| 1088 | 131072 `(T)` The kernel was built with the struct randomization plugin | ||
| 1089 | ====== ===== ============================================================== | ||
| 1043 | 1090 | ||
| 1044 | See Documentation/admin-guide/tainted-kernels.rst for more information. | 1091 | See Documentation/admin-guide/tainted-kernels.rst for more information. |
| 1045 | 1092 | ||
| 1046 | ============================================================== | ||
| 1047 | 1093 | ||
| 1048 | threads-max | 1094 | threads-max: |
| 1095 | ============ | ||
| 1049 | 1096 | ||
| 1050 | This value controls the maximum number of threads that can be created | 1097 | This value controls the maximum number of threads that can be created |
| 1051 | using fork(). | 1098 | using fork(). |
| @@ -1055,8 +1102,10 @@ maximum number of threads is created, the thread structures occupy only | |||
| 1055 | a part (1/8th) of the available RAM pages. | 1102 | a part (1/8th) of the available RAM pages. |
| 1056 | 1103 | ||
| 1057 | The minimum value that can be written to threads-max is 20. | 1104 | The minimum value that can be written to threads-max is 20. |
| 1105 | |||
| 1058 | The maximum value that can be written to threads-max is given by the | 1106 | The maximum value that can be written to threads-max is given by the |
| 1059 | constant FUTEX_TID_MASK (0x3fffffff). | 1107 | constant FUTEX_TID_MASK (0x3fffffff). |
| 1108 | |||
| 1060 | If a value outside of this range is written to threads-max an error | 1109 | If a value outside of this range is written to threads-max an error |
| 1061 | EINVAL occurs. | 1110 | EINVAL occurs. |
| 1062 | 1111 | ||
| @@ -1064,9 +1113,9 @@ The value written is checked against the available RAM pages. If the | |||
| 1064 | thread structures would occupy too much (more than 1/8th) of the | 1113 | thread structures would occupy too much (more than 1/8th) of the |
| 1065 | available RAM pages threads-max is reduced accordingly. | 1114 | available RAM pages threads-max is reduced accordingly. |
| 1066 | 1115 | ||
| 1067 | ============================================================== | ||
| 1068 | 1116 | ||
| 1069 | unknown_nmi_panic: | 1117 | unknown_nmi_panic: |
| 1118 | ================== | ||
| 1070 | 1119 | ||
| 1071 | The value in this file affects behavior of handling NMI. When the | 1120 | The value in this file affects behavior of handling NMI. When the |
| 1072 | value is non-zero, unknown NMI is trapped and then panic occurs. At | 1121 | value is non-zero, unknown NMI is trapped and then panic occurs. At |
| @@ -1075,28 +1124,29 @@ that time, kernel debugging information is displayed on console. | |||
| 1075 | NMI switch that most IA32 servers have fires unknown NMI up, for | 1124 | NMI switch that most IA32 servers have fires unknown NMI up, for |
| 1076 | example. If a system hangs up, try pressing the NMI switch. | 1125 | example. If a system hangs up, try pressing the NMI switch. |
| 1077 | 1126 | ||
| 1078 | ============================================================== | ||
| 1079 | 1127 | ||
| 1080 | watchdog: | 1128 | watchdog: |
| 1129 | ========= | ||
| 1081 | 1130 | ||
| 1082 | This parameter can be used to disable or enable the soft lockup detector | 1131 | This parameter can be used to disable or enable the soft lockup detector |
| 1083 | _and_ the NMI watchdog (i.e. the hard lockup detector) at the same time. | 1132 | _and_ the NMI watchdog (i.e. the hard lockup detector) at the same time. |
| 1084 | 1133 | ||
| 1085 | 0 - disable both lockup detectors | 1134 | 0 - disable both lockup detectors |
| 1135 | |||
| 1086 | 1 - enable both lockup detectors | 1136 | 1 - enable both lockup detectors |
| 1087 | 1137 | ||
| 1088 | The soft lockup detector and the NMI watchdog can also be disabled or | 1138 | The soft lockup detector and the NMI watchdog can also be disabled or |
| 1089 | enabled individually, using the soft_watchdog and nmi_watchdog parameters. | 1139 | enabled individually, using the soft_watchdog and nmi_watchdog parameters. |
| 1090 | If the watchdog parameter is read, for example by executing | 1140 | If the watchdog parameter is read, for example by executing:: |
| 1091 | 1141 | ||
| 1092 | cat /proc/sys/kernel/watchdog | 1142 | cat /proc/sys/kernel/watchdog |
| 1093 | 1143 | ||
| 1094 | the output of this command (0 or 1) shows the logical OR of soft_watchdog | 1144 | the output of this command (0 or 1) shows the logical OR of soft_watchdog |
| 1095 | and nmi_watchdog. | 1145 | and nmi_watchdog. |
| 1096 | 1146 | ||
| 1097 | ============================================================== | ||
| 1098 | 1147 | ||
| 1099 | watchdog_cpumask: | 1148 | watchdog_cpumask: |
| 1149 | ================= | ||
| 1100 | 1150 | ||
| 1101 | This value can be used to control on which cpus the watchdog may run. | 1151 | This value can be used to control on which cpus the watchdog may run. |
| 1102 | The default cpumask is all possible cores, but if NO_HZ_FULL is | 1152 | The default cpumask is all possible cores, but if NO_HZ_FULL is |
| @@ -1111,13 +1161,13 @@ if a kernel lockup was suspected on those cores. | |||
| 1111 | 1161 | ||
| 1112 | The argument value is the standard cpulist format for cpumasks, | 1162 | The argument value is the standard cpulist format for cpumasks, |
| 1113 | so for example to enable the watchdog on cores 0, 2, 3, and 4 you | 1163 | so for example to enable the watchdog on cores 0, 2, 3, and 4 you |
| 1114 | might say: | 1164 | might say:: |
| 1115 | 1165 | ||
| 1116 | echo 0,2-4 > /proc/sys/kernel/watchdog_cpumask | 1166 | echo 0,2-4 > /proc/sys/kernel/watchdog_cpumask |
| 1117 | 1167 | ||
| 1118 | ============================================================== | ||
| 1119 | 1168 | ||
| 1120 | watchdog_thresh: | 1169 | watchdog_thresh: |
| 1170 | ================ | ||
| 1121 | 1171 | ||
| 1122 | This value can be used to control the frequency of hrtimer and NMI | 1172 | This value can be used to control the frequency of hrtimer and NMI |
| 1123 | events and the soft and hard lockup thresholds. The default threshold | 1173 | events and the soft and hard lockup thresholds. The default threshold |
| @@ -1125,5 +1175,3 @@ is 10 seconds. | |||
| 1125 | 1175 | ||
| 1126 | The softlockup threshold is (2 * watchdog_thresh). Setting this | 1176 | The softlockup threshold is (2 * watchdog_thresh). Setting this |
| 1127 | tunable to zero will disable lockup detection altogether. | 1177 | tunable to zero will disable lockup detection altogether. |
| 1128 | |||
| 1129 | ============================================================== | ||
diff --git a/Documentation/sysctl/net.txt b/Documentation/admin-guide/sysctl/net.rst index 2ae91d3873bb..a7d44e71019d 100644 --- a/Documentation/sysctl/net.txt +++ b/Documentation/admin-guide/sysctl/net.rst | |||
| @@ -1,12 +1,25 @@ | |||
| 1 | Documentation for /proc/sys/net/* | 1 | ================================ |
| 2 | (c) 1999 Terrehon Bowden <terrehon@pacbell.net> | 2 | Documentation for /proc/sys/net/ |
| 3 | Bodo Bauer <bb@ricochet.net> | 3 | ================================ |
| 4 | (c) 2000 Jorge Nerin <comandante@zaralinux.com> | ||
| 5 | (c) 2009 Shen Feng <shen@cn.fujitsu.com> | ||
| 6 | 4 | ||
| 7 | For general info and legal blurb, please look in README. | 5 | Copyright |
| 8 | 6 | ||
| 9 | ============================================================== | 7 | Copyright (c) 1999 |
| 8 | |||
| 9 | - Terrehon Bowden <terrehon@pacbell.net> | ||
| 10 | - Bodo Bauer <bb@ricochet.net> | ||
| 11 | |||
| 12 | Copyright (c) 2000 | ||
| 13 | |||
| 14 | - Jorge Nerin <comandante@zaralinux.com> | ||
| 15 | |||
| 16 | Copyright (c) 2009 | ||
| 17 | |||
| 18 | - Shen Feng <shen@cn.fujitsu.com> | ||
| 19 | |||
| 20 | For general info and legal blurb, please look in index.rst. | ||
| 21 | |||
| 22 | ------------------------------------------------------------------------------ | ||
| 10 | 23 | ||
| 11 | This file contains the documentation for the sysctl files in | 24 | This file contains the documentation for the sysctl files in |
| 12 | /proc/sys/net | 25 | /proc/sys/net |
| @@ -17,20 +30,22 @@ see only some of them, depending on your kernel's configuration. | |||
| 17 | 30 | ||
| 18 | 31 | ||
| 19 | Table : Subdirectories in /proc/sys/net | 32 | Table : Subdirectories in /proc/sys/net |
| 20 | .............................................................................. | 33 | |
| 21 | Directory Content Directory Content | 34 | ========= =================== = ========== ================== |
| 22 | core General parameter appletalk Appletalk protocol | 35 | Directory Content Directory Content |
| 23 | unix Unix domain sockets netrom NET/ROM | 36 | ========= =================== = ========== ================== |
| 24 | 802 E802 protocol ax25 AX25 | 37 | core General parameter appletalk Appletalk protocol |
| 25 | ethernet Ethernet protocol rose X.25 PLP layer | 38 | unix Unix domain sockets netrom NET/ROM |
| 26 | ipv4 IP version 4 x25 X.25 protocol | 39 | 802 E802 protocol ax25 AX25 |
| 27 | ipx IPX token-ring IBM token ring | 40 | ethernet Ethernet protocol rose X.25 PLP layer |
| 28 | bridge Bridging decnet DEC net | 41 | ipv4 IP version 4 x25 X.25 protocol |
| 29 | ipv6 IP version 6 tipc TIPC | 42 | ipx IPX token-ring IBM token ring |
| 30 | .............................................................................. | 43 | bridge Bridging decnet DEC net |
| 44 | ipv6 IP version 6 tipc TIPC | ||
| 45 | ========= =================== = ========== ================== | ||
| 31 | 46 | ||
| 32 | 1. /proc/sys/net/core - Network core options | 47 | 1. /proc/sys/net/core - Network core options |
| 33 | ------------------------------------------------------- | 48 | ============================================ |
| 34 | 49 | ||
| 35 | bpf_jit_enable | 50 | bpf_jit_enable |
| 36 | -------------- | 51 | -------------- |
| @@ -44,6 +59,7 @@ restricted C into a sequence of BPF instructions. After program load | |||
| 44 | through bpf(2) and passing a verifier in the kernel, a JIT will then | 59 | through bpf(2) and passing a verifier in the kernel, a JIT will then |
| 45 | translate these BPF proglets into native CPU instructions. There are | 60 | translate these BPF proglets into native CPU instructions. There are |
| 46 | two flavors of JITs, the newer eBPF JIT currently supported on: | 61 | two flavors of JITs, the newer eBPF JIT currently supported on: |
| 62 | |||
| 47 | - x86_64 | 63 | - x86_64 |
| 48 | - x86_32 | 64 | - x86_32 |
| 49 | - arm64 | 65 | - arm64 |
| @@ -55,6 +71,7 @@ two flavors of JITs, the newer eBPF JIT currently supported on: | |||
| 55 | - riscv | 71 | - riscv |
| 56 | 72 | ||
| 57 | And the older cBPF JIT supported on the following archs: | 73 | And the older cBPF JIT supported on the following archs: |
| 74 | |||
| 58 | - mips | 75 | - mips |
| 59 | - ppc | 76 | - ppc |
| 60 | - sparc | 77 | - sparc |
| @@ -65,10 +82,11 @@ compile them transparently. Older cBPF JITs can only translate | |||
| 65 | tcpdump filters, seccomp rules, etc, but not mentioned eBPF | 82 | tcpdump filters, seccomp rules, etc, but not mentioned eBPF |
| 66 | programs loaded through bpf(2). | 83 | programs loaded through bpf(2). |
| 67 | 84 | ||
| 68 | Values : | 85 | Values: |
| 69 | 0 - disable the JIT (default value) | 86 | |
| 70 | 1 - enable the JIT | 87 | - 0 - disable the JIT (default value) |
| 71 | 2 - enable the JIT and ask the compiler to emit traces on kernel log. | 88 | - 1 - enable the JIT |
| 89 | - 2 - enable the JIT and ask the compiler to emit traces on kernel log. | ||
| 72 | 90 | ||
| 73 | bpf_jit_harden | 91 | bpf_jit_harden |
| 74 | -------------- | 92 | -------------- |
| @@ -76,10 +94,12 @@ bpf_jit_harden | |||
| 76 | This enables hardening for the BPF JIT compiler. Supported are eBPF | 94 | This enables hardening for the BPF JIT compiler. Supported are eBPF |
| 77 | JIT backends. Enabling hardening trades off performance, but can | 95 | JIT backends. Enabling hardening trades off performance, but can |
| 78 | mitigate JIT spraying. | 96 | mitigate JIT spraying. |
| 79 | Values : | 97 | |
| 80 | 0 - disable JIT hardening (default value) | 98 | Values: |
| 81 | 1 - enable JIT hardening for unprivileged users only | 99 | |
| 82 | 2 - enable JIT hardening for all users | 100 | - 0 - disable JIT hardening (default value) |
| 101 | - 1 - enable JIT hardening for unprivileged users only | ||
| 102 | - 2 - enable JIT hardening for all users | ||
| 83 | 103 | ||
| 84 | bpf_jit_kallsyms | 104 | bpf_jit_kallsyms |
| 85 | ---------------- | 105 | ---------------- |
| @@ -89,9 +109,11 @@ addresses to the kernel, meaning they neither show up in traces nor | |||
| 89 | in /proc/kallsyms. This enables export of these addresses, which can | 109 | in /proc/kallsyms. This enables export of these addresses, which can |
| 90 | be used for debugging/tracing. If bpf_jit_harden is enabled, this | 110 | be used for debugging/tracing. If bpf_jit_harden is enabled, this |
| 91 | feature is disabled. | 111 | feature is disabled. |
| 112 | |||
| 92 | Values : | 113 | Values : |
| 93 | 0 - disable JIT kallsyms export (default value) | 114 | |
| 94 | 1 - enable JIT kallsyms export for privileged users only | 115 | - 0 - disable JIT kallsyms export (default value) |
| 116 | - 1 - enable JIT kallsyms export for privileged users only | ||
| 95 | 117 | ||
| 96 | bpf_jit_limit | 118 | bpf_jit_limit |
| 97 | ------------- | 119 | ------------- |
| @@ -102,7 +124,7 @@ been surpassed. bpf_jit_limit contains the value of the global limit | |||
| 102 | in bytes. | 124 | in bytes. |
| 103 | 125 | ||
| 104 | dev_weight | 126 | dev_weight |
| 105 | -------------- | 127 | ---------- |
| 106 | 128 | ||
| 107 | The maximum number of packets that kernel can handle on a NAPI interrupt, | 129 | The maximum number of packets that kernel can handle on a NAPI interrupt, |
| 108 | it's a Per-CPU variable. For drivers that support LRO or GRO_HW, a hardware | 130 | it's a Per-CPU variable. For drivers that support LRO or GRO_HW, a hardware |
| @@ -111,7 +133,7 @@ aggregated packet is counted as one packet in this context. | |||
| 111 | Default: 64 | 133 | Default: 64 |
| 112 | 134 | ||
| 113 | dev_weight_rx_bias | 135 | dev_weight_rx_bias |
| 114 | -------------- | 136 | ------------------ |
| 115 | 137 | ||
| 116 | RPS (e.g. RFS, aRFS) processing is competing with the registered NAPI poll function | 138 | RPS (e.g. RFS, aRFS) processing is competing with the registered NAPI poll function |
| 117 | of the driver for the per softirq cycle netdev_budget. This parameter influences | 139 | of the driver for the per softirq cycle netdev_budget. This parameter influences |
| @@ -120,19 +142,22 @@ processing during RX softirq cycles. It is further meant for making current | |||
| 120 | dev_weight adaptable for asymmetric CPU needs on RX/TX side of the network stack. | 142 | dev_weight adaptable for asymmetric CPU needs on RX/TX side of the network stack. |
| 121 | (see dev_weight_tx_bias) It is effective on a per CPU basis. Determination is based | 143 | (see dev_weight_tx_bias) It is effective on a per CPU basis. Determination is based |
| 122 | on dev_weight and is calculated multiplicative (dev_weight * dev_weight_rx_bias). | 144 | on dev_weight and is calculated multiplicative (dev_weight * dev_weight_rx_bias). |
| 145 | |||
| 123 | Default: 1 | 146 | Default: 1 |
| 124 | 147 | ||
| 125 | dev_weight_tx_bias | 148 | dev_weight_tx_bias |
| 126 | -------------- | 149 | ------------------ |
| 127 | 150 | ||
| 128 | Scales the maximum number of packets that can be processed during a TX softirq cycle. | 151 | Scales the maximum number of packets that can be processed during a TX softirq cycle. |
| 129 | Effective on a per CPU basis. Allows scaling of current dev_weight for asymmetric | 152 | Effective on a per CPU basis. Allows scaling of current dev_weight for asymmetric |
| 130 | net stack processing needs. Be careful to avoid making TX softirq processing a CPU hog. | 153 | net stack processing needs. Be careful to avoid making TX softirq processing a CPU hog. |
| 154 | |||
| 131 | Calculation is based on dev_weight (dev_weight * dev_weight_tx_bias). | 155 | Calculation is based on dev_weight (dev_weight * dev_weight_tx_bias). |
| 156 | |||
| 132 | Default: 1 | 157 | Default: 1 |
| 133 | 158 | ||
| 134 | default_qdisc | 159 | default_qdisc |
| 135 | -------------- | 160 | ------------- |
| 136 | 161 | ||
| 137 | The default queuing discipline to use for network devices. This allows | 162 | The default queuing discipline to use for network devices. This allows |
| 138 | overriding the default of pfifo_fast with an alternative. Since the default | 163 | overriding the default of pfifo_fast with an alternative. Since the default |
| @@ -144,17 +169,21 @@ which require setting up classes and bandwidths. Note that physical multiqueue | |||
| 144 | interfaces still use mq as root qdisc, which in turn uses this default for its | 169 | interfaces still use mq as root qdisc, which in turn uses this default for its |
| 145 | leaves. Virtual devices (like e.g. lo or veth) ignore this setting and instead | 170 | leaves. Virtual devices (like e.g. lo or veth) ignore this setting and instead |
| 146 | default to noqueue. | 171 | default to noqueue. |
| 172 | |||
| 147 | Default: pfifo_fast | 173 | Default: pfifo_fast |
| 148 | 174 | ||
| 149 | busy_read | 175 | busy_read |
| 150 | ---------------- | 176 | --------- |
| 177 | |||
| 151 | Low latency busy poll timeout for socket reads. (needs CONFIG_NET_RX_BUSY_POLL) | 178 | Low latency busy poll timeout for socket reads. (needs CONFIG_NET_RX_BUSY_POLL) |
| 152 | Approximate time in us to busy loop waiting for packets on the device queue. | 179 | Approximate time in us to busy loop waiting for packets on the device queue. |
| 153 | This sets the default value of the SO_BUSY_POLL socket option. | 180 | This sets the default value of the SO_BUSY_POLL socket option. |
| 154 | Can be set or overridden per socket by setting socket option SO_BUSY_POLL, | 181 | Can be set or overridden per socket by setting socket option SO_BUSY_POLL, |
| 155 | which is the preferred method of enabling. If you need to enable the feature | 182 | which is the preferred method of enabling. If you need to enable the feature |
| 156 | globally via sysctl, a value of 50 is recommended. | 183 | globally via sysctl, a value of 50 is recommended. |
| 184 | |||
| 157 | Will increase power usage. | 185 | Will increase power usage. |
| 186 | |||
| 158 | Default: 0 (off) | 187 | Default: 0 (off) |
| 159 | 188 | ||
| 160 | busy_poll | 189 | busy_poll |
| @@ -167,7 +196,9 @@ For more than that you probably want to use epoll. | |||
| 167 | Note that only sockets with SO_BUSY_POLL set will be busy polled, | 196 | Note that only sockets with SO_BUSY_POLL set will be busy polled, |
| 168 | so you want to either selectively set SO_BUSY_POLL on those sockets or set | 197 | so you want to either selectively set SO_BUSY_POLL on those sockets or set |
| 169 | sysctl.net.busy_read globally. | 198 | sysctl.net.busy_read globally. |
| 199 | |||
| 170 | Will increase power usage. | 200 | Will increase power usage. |
| 201 | |||
| 171 | Default: 0 (off) | 202 | Default: 0 (off) |
| 172 | 203 | ||
| 173 | rmem_default | 204 | rmem_default |
| @@ -185,6 +216,7 @@ tstamp_allow_data | |||
| 185 | Allow processes to receive tx timestamps looped together with the original | 216 | Allow processes to receive tx timestamps looped together with the original |
| 186 | packet contents. If disabled, transmit timestamp requests from unprivileged | 217 | packet contents. If disabled, transmit timestamp requests from unprivileged |
| 187 | processes are dropped unless socket option SOF_TIMESTAMPING_OPT_TSONLY is set. | 218 | processes are dropped unless socket option SOF_TIMESTAMPING_OPT_TSONLY is set. |
| 219 | |||
| 188 | Default: 1 (on) | 220 | Default: 1 (on) |
| 189 | 221 | ||
| 190 | 222 | ||
| @@ -250,19 +282,24 @@ randomly generated. | |||
| 250 | Some user space might need to gather its content even if drivers do not | 282 | Some user space might need to gather its content even if drivers do not |
| 251 | provide ethtool -x support yet. | 283 | provide ethtool -x support yet. |
| 252 | 284 | ||
| 253 | myhost:~# cat /proc/sys/net/core/netdev_rss_key | 285 | :: |
| 254 | 84:50:f4:00:a8:15:d1:a7:e9:7f:1d:60:35:c7:47:25:42:97:74:ca:56:bb:b6:a1:d8: ... (52 bytes total) | 286 | |
| 287 | myhost:~# cat /proc/sys/net/core/netdev_rss_key | ||
| 288 | 84:50:f4:00:a8:15:d1:a7:e9:7f:1d:60:35:c7:47:25:42:97:74:ca:56:bb:b6:a1:d8: ... (52 bytes total) | ||
| 255 | 289 | ||
| 256 | File contains nul bytes if no driver ever called netdev_rss_key_fill() function. | 290 | File contains nul bytes if no driver ever called netdev_rss_key_fill() function. |
| 291 | |||
| 257 | Note: | 292 | Note: |
| 258 | /proc/sys/net/core/netdev_rss_key contains 52 bytes of key, | 293 | /proc/sys/net/core/netdev_rss_key contains 52 bytes of key, |
| 259 | but most drivers only use 40 bytes of it. | 294 | but most drivers only use 40 bytes of it. |
| 295 | |||
| 296 | :: | ||
| 260 | 297 | ||
| 261 | myhost:~# ethtool -x eth0 | 298 | myhost:~# ethtool -x eth0 |
| 262 | RX flow hash indirection table for eth0 with 8 RX ring(s): | 299 | RX flow hash indirection table for eth0 with 8 RX ring(s): |
| 263 | 0: 0 1 2 3 4 5 6 7 | 300 | 0: 0 1 2 3 4 5 6 7 |
| 264 | RSS hash key: | 301 | RSS hash key: |
| 265 | 84:50:f4:00:a8:15:d1:a7:e9:7f:1d:60:35:c7:47:25:42:97:74:ca:56:bb:b6:a1:d8:43:e3:c9:0c:fd:17:55:c2:3a:4d:69:ed:f1:42:89 | 302 | 84:50:f4:00:a8:15:d1:a7:e9:7f:1d:60:35:c7:47:25:42:97:74:ca:56:bb:b6:a1:d8:43:e3:c9:0c:fd:17:55:c2:3a:4d:69:ed:f1:42:89 |
| 266 | 303 | ||
| 267 | netdev_tstamp_prequeue | 304 | netdev_tstamp_prequeue |
| 268 | ---------------------- | 305 | ---------------------- |
| @@ -293,7 +330,7 @@ user space is responsible for creating them if needed. | |||
| 293 | Default : 0 (for compatibility reasons) | 330 | Default : 0 (for compatibility reasons) |
| 294 | 331 | ||
| 295 | devconf_inherit_init_net | 332 | devconf_inherit_init_net |
| 296 | ---------------------------- | 333 | ------------------------ |
| 297 | 334 | ||
| 298 | Controls if a new network namespace should inherit all current | 335 | Controls if a new network namespace should inherit all current |
| 299 | settings under /proc/sys/net/{ipv4,ipv6}/conf/{all,default}/. By | 336 | settings under /proc/sys/net/{ipv4,ipv6}/conf/{all,default}/. By |
| @@ -307,7 +344,7 @@ forced to reset to their default values. | |||
| 307 | Default : 0 (for compatibility reasons) | 344 | Default : 0 (for compatibility reasons) |
| 308 | 345 | ||
| 309 | 2. /proc/sys/net/unix - Parameters for Unix domain sockets | 346 | 2. /proc/sys/net/unix - Parameters for Unix domain sockets |
| 310 | ------------------------------------------------------- | 347 | ---------------------------------------------------------- |
| 311 | 348 | ||
| 312 | There is only one file in this directory. | 349 | There is only one file in this directory. |
| 313 | unix_dgram_qlen limits the max number of datagrams queued in Unix domain | 350 | unix_dgram_qlen limits the max number of datagrams queued in Unix domain |
| @@ -315,13 +352,13 @@ socket's buffer. It will not take effect unless PF_UNIX flag is specified. | |||
| 315 | 352 | ||
| 316 | 353 | ||
| 317 | 3. /proc/sys/net/ipv4 - IPV4 settings | 354 | 3. /proc/sys/net/ipv4 - IPV4 settings |
| 318 | ------------------------------------------------------- | 355 | ------------------------------------- |
| 319 | Please see: Documentation/networking/ip-sysctl.txt and ipvs-sysctl.txt for | 356 | Please see: Documentation/networking/ip-sysctl.txt and ipvs-sysctl.txt for |
| 320 | descriptions of these entries. | 357 | descriptions of these entries. |
| 321 | 358 | ||
| 322 | 359 | ||
| 323 | 4. Appletalk | 360 | 4. Appletalk |
| 324 | ------------------------------------------------------- | 361 | ------------ |
| 325 | 362 | ||
| 326 | The /proc/sys/net/appletalk directory holds the Appletalk configuration data | 363 | The /proc/sys/net/appletalk directory holds the Appletalk configuration data |
| 327 | when Appletalk is loaded. The configurable parameters are: | 364 | when Appletalk is loaded. The configurable parameters are: |
| @@ -366,7 +403,7 @@ route flags, and the device the route is using. | |||
| 366 | 403 | ||
| 367 | 404 | ||
| 368 | 5. IPX | 405 | 5. IPX |
| 369 | ------------------------------------------------------- | 406 | ------ |
| 370 | 407 | ||
| 371 | The IPX protocol has no tunable values in proc/sys/net. | 408 | The IPX protocol has no tunable values in proc/sys/net. |
| 372 | 409 | ||
| @@ -391,14 +428,16 @@ gives the destination network, the router node (or Directly) and the network | |||
| 391 | address of the router (or Connected) for internal networks. | 428 | address of the router (or Connected) for internal networks. |
| 392 | 429 | ||
| 393 | 6. TIPC | 430 | 6. TIPC |
| 394 | ------------------------------------------------------- | 431 | ------- |
| 395 | 432 | ||
| 396 | tipc_rmem | 433 | tipc_rmem |
| 397 | ---------- | 434 | --------- |
| 398 | 435 | ||
| 399 | The TIPC protocol now has a tunable for the receive memory, similar to the | 436 | The TIPC protocol now has a tunable for the receive memory, similar to the |
| 400 | tcp_rmem - i.e. a vector of 3 INTEGERs: (min, default, max) | 437 | tcp_rmem - i.e. a vector of 3 INTEGERs: (min, default, max) |
| 401 | 438 | ||
| 439 | :: | ||
| 440 | |||
| 402 | # cat /proc/sys/net/tipc/tipc_rmem | 441 | # cat /proc/sys/net/tipc/tipc_rmem |
| 403 | 4252725 34021800 68043600 | 442 | 4252725 34021800 68043600 |
| 404 | # | 443 | # |
| @@ -409,7 +448,7 @@ is not at this point in time used in any meaningful way, but the triplet is | |||
| 409 | preserved in order to be consistent with things like tcp_rmem. | 448 | preserved in order to be consistent with things like tcp_rmem. |
| 410 | 449 | ||
| 411 | named_timeout | 450 | named_timeout |
| 412 | -------------- | 451 | ------------- |
| 413 | 452 | ||
| 414 | TIPC name table updates are distributed asynchronously in a cluster, without | 453 | TIPC name table updates are distributed asynchronously in a cluster, without |
| 415 | any form of transaction handling. This means that different race scenarios are | 454 | any form of transaction handling. This means that different race scenarios are |
diff --git a/Documentation/sysctl/sunrpc.txt b/Documentation/admin-guide/sysctl/sunrpc.rst index ae1ecac6f85a..09780a682afd 100644 --- a/Documentation/sysctl/sunrpc.txt +++ b/Documentation/admin-guide/sysctl/sunrpc.rst | |||
| @@ -1,9 +1,14 @@ | |||
| 1 | Documentation for /proc/sys/sunrpc/* kernel version 2.2.10 | 1 | =================================== |
| 2 | (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> | 2 | Documentation for /proc/sys/sunrpc/ |
| 3 | =================================== | ||
| 3 | 4 | ||
| 4 | For general info and legal blurb, please look in README. | 5 | kernel version 2.2.10 |
| 5 | 6 | ||
| 6 | ============================================================== | 7 | Copyright (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> |
| 8 | |||
| 9 | For general info and legal blurb, please look in index.rst. | ||
| 10 | |||
| 11 | ------------------------------------------------------------------------------ | ||
| 7 | 12 | ||
| 8 | This file contains the documentation for the sysctl files in | 13 | This file contains the documentation for the sysctl files in |
| 9 | /proc/sys/sunrpc and is valid for Linux kernel version 2.2. | 14 | /proc/sys/sunrpc and is valid for Linux kernel version 2.2. |
diff --git a/Documentation/sysctl/user.txt b/Documentation/admin-guide/sysctl/user.rst index a5882865836e..650eaa03f15e 100644 --- a/Documentation/sysctl/user.txt +++ b/Documentation/admin-guide/sysctl/user.rst | |||
| @@ -1,7 +1,12 @@ | |||
| 1 | Documentation for /proc/sys/user/* kernel version 4.9.0 | 1 | ================================= |
| 2 | (c) 2016 Eric Biederman <ebiederm@xmission.com> | 2 | Documentation for /proc/sys/user/ |
| 3 | ================================= | ||
| 3 | 4 | ||
| 4 | ============================================================== | 5 | kernel version 4.9.0 |
| 6 | |||
| 7 | Copyright (c) 2016 Eric Biederman <ebiederm@xmission.com> | ||
| 8 | |||
| 9 | ------------------------------------------------------------------------------ | ||
| 5 | 10 | ||
| 6 | This file contains the documentation for the sysctl files in | 11 | This file contains the documentation for the sysctl files in |
| 7 | /proc/sys/user. | 12 | /proc/sys/user. |
| @@ -30,37 +35,44 @@ user namespace does not allow a user to escape their current limits. | |||
| 30 | 35 | ||
| 31 | Currently, these files are in /proc/sys/user: | 36 | Currently, these files are in /proc/sys/user: |
| 32 | 37 | ||
| 33 | - max_cgroup_namespaces | 38 | max_cgroup_namespaces |
| 39 | ===================== | ||
| 34 | 40 | ||
| 35 | The maximum number of cgroup namespaces that any user in the current | 41 | The maximum number of cgroup namespaces that any user in the current |
| 36 | user namespace may create. | 42 | user namespace may create. |
| 37 | 43 | ||
| 38 | - max_ipc_namespaces | 44 | max_ipc_namespaces |
| 45 | ================== | ||
| 39 | 46 | ||
| 40 | The maximum number of ipc namespaces that any user in the current | 47 | The maximum number of ipc namespaces that any user in the current |
| 41 | user namespace may create. | 48 | user namespace may create. |
| 42 | 49 | ||
| 43 | - max_mnt_namespaces | 50 | max_mnt_namespaces |
| 51 | ================== | ||
| 44 | 52 | ||
| 45 | The maximum number of mount namespaces that any user in the current | 53 | The maximum number of mount namespaces that any user in the current |
| 46 | user namespace may create. | 54 | user namespace may create. |
| 47 | 55 | ||
| 48 | - max_net_namespaces | 56 | max_net_namespaces |
| 57 | ================== | ||
| 49 | 58 | ||
| 50 | The maximum number of network namespaces that any user in the | 59 | The maximum number of network namespaces that any user in the |
| 51 | current user namespace may create. | 60 | current user namespace may create. |
| 52 | 61 | ||
| 53 | - max_pid_namespaces | 62 | max_pid_namespaces |
| 63 | ================== | ||
| 54 | 64 | ||
| 55 | The maximum number of pid namespaces that any user in the current | 65 | The maximum number of pid namespaces that any user in the current |
| 56 | user namespace may create. | 66 | user namespace may create. |
| 57 | 67 | ||
| 58 | - max_user_namespaces | 68 | max_user_namespaces |
| 69 | =================== | ||
| 59 | 70 | ||
| 60 | The maximum number of user namespaces that any user in the current | 71 | The maximum number of user namespaces that any user in the current |
| 61 | user namespace may create. | 72 | user namespace may create. |
| 62 | 73 | ||
| 63 | - max_uts_namespaces | 74 | max_uts_namespaces |
| 75 | ================== | ||
| 64 | 76 | ||
| 65 | The maximum number of user namespaces that any user in the current | 77 | The maximum number of user namespaces that any user in the current |
| 66 | user namespace may create. | 78 | user namespace may create. |
diff --git a/Documentation/sysctl/vm.txt b/Documentation/admin-guide/sysctl/vm.rst index 749322060f10..64aeee1009ca 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/admin-guide/sysctl/vm.rst | |||
| @@ -1,10 +1,16 @@ | |||
| 1 | Documentation for /proc/sys/vm/* kernel version 2.6.29 | 1 | =============================== |
| 2 | (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> | 2 | Documentation for /proc/sys/vm/ |
| 3 | (c) 2008 Peter W. Morreale <pmorreale@novell.com> | 3 | =============================== |
| 4 | 4 | ||
| 5 | For general info and legal blurb, please look in README. | 5 | kernel version 2.6.29 |
| 6 | 6 | ||
| 7 | ============================================================== | 7 | Copyright (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> |
| 8 | |||
| 9 | Copyright (c) 2008 Peter W. Morreale <pmorreale@novell.com> | ||
| 10 | |||
| 11 | For general info and legal blurb, please look in index.rst. | ||
| 12 | |||
| 13 | ------------------------------------------------------------------------------ | ||
| 8 | 14 | ||
| 9 | This file contains the documentation for the sysctl files in | 15 | This file contains the documentation for the sysctl files in |
| 10 | /proc/sys/vm and is valid for Linux kernel version 2.6.29. | 16 | /proc/sys/vm and is valid for Linux kernel version 2.6.29. |
| @@ -68,9 +74,9 @@ Currently, these files are in /proc/sys/vm: | |||
| 68 | - watermark_scale_factor | 74 | - watermark_scale_factor |
| 69 | - zone_reclaim_mode | 75 | - zone_reclaim_mode |
| 70 | 76 | ||
| 71 | ============================================================== | ||
| 72 | 77 | ||
| 73 | admin_reserve_kbytes | 78 | admin_reserve_kbytes |
| 79 | ==================== | ||
| 74 | 80 | ||
| 75 | The amount of free memory in the system that should be reserved for users | 81 | The amount of free memory in the system that should be reserved for users |
| 76 | with the capability cap_sys_admin. | 82 | with the capability cap_sys_admin. |
| @@ -97,25 +103,25 @@ On x86_64 this is about 128MB. | |||
| 97 | 103 | ||
| 98 | Changing this takes effect whenever an application requests memory. | 104 | Changing this takes effect whenever an application requests memory. |
| 99 | 105 | ||
| 100 | ============================================================== | ||
| 101 | 106 | ||
| 102 | block_dump | 107 | block_dump |
| 108 | ========== | ||
| 103 | 109 | ||
| 104 | block_dump enables block I/O debugging when set to a nonzero value. More | 110 | block_dump enables block I/O debugging when set to a nonzero value. More |
| 105 | information on block I/O debugging is in Documentation/laptops/laptop-mode.txt. | 111 | information on block I/O debugging is in Documentation/admin-guide/laptops/laptop-mode.rst. |
| 106 | 112 | ||
| 107 | ============================================================== | ||
| 108 | 113 | ||
| 109 | compact_memory | 114 | compact_memory |
| 115 | ============== | ||
| 110 | 116 | ||
| 111 | Available only when CONFIG_COMPACTION is set. When 1 is written to the file, | 117 | Available only when CONFIG_COMPACTION is set. When 1 is written to the file, |
| 112 | all zones are compacted such that free memory is available in contiguous | 118 | all zones are compacted such that free memory is available in contiguous |
| 113 | blocks where possible. This can be important for example in the allocation of | 119 | blocks where possible. This can be important for example in the allocation of |
| 114 | huge pages although processes will also directly compact memory as required. | 120 | huge pages although processes will also directly compact memory as required. |
| 115 | 121 | ||
| 116 | ============================================================== | ||
| 117 | 122 | ||
| 118 | compact_unevictable_allowed | 123 | compact_unevictable_allowed |
| 124 | =========================== | ||
| 119 | 125 | ||
| 120 | Available only when CONFIG_COMPACTION is set. When set to 1, compaction is | 126 | Available only when CONFIG_COMPACTION is set. When set to 1, compaction is |
| 121 | allowed to examine the unevictable lru (mlocked pages) for pages to compact. | 127 | allowed to examine the unevictable lru (mlocked pages) for pages to compact. |
| @@ -123,21 +129,22 @@ This should be used on systems where stalls for minor page faults are an | |||
| 123 | acceptable trade for large contiguous free memory. Set to 0 to prevent | 129 | acceptable trade for large contiguous free memory. Set to 0 to prevent |
| 124 | compaction from moving pages that are unevictable. Default value is 1. | 130 | compaction from moving pages that are unevictable. Default value is 1. |
| 125 | 131 | ||
| 126 | ============================================================== | ||
| 127 | 132 | ||
| 128 | dirty_background_bytes | 133 | dirty_background_bytes |
| 134 | ====================== | ||
| 129 | 135 | ||
| 130 | Contains the amount of dirty memory at which the background kernel | 136 | Contains the amount of dirty memory at which the background kernel |
| 131 | flusher threads will start writeback. | 137 | flusher threads will start writeback. |
| 132 | 138 | ||
| 133 | Note: dirty_background_bytes is the counterpart of dirty_background_ratio. Only | 139 | Note: |
| 134 | one of them may be specified at a time. When one sysctl is written it is | 140 | dirty_background_bytes is the counterpart of dirty_background_ratio. Only |
| 135 | immediately taken into account to evaluate the dirty memory limits and the | 141 | one of them may be specified at a time. When one sysctl is written it is |
| 136 | other appears as 0 when read. | 142 | immediately taken into account to evaluate the dirty memory limits and the |
| 143 | other appears as 0 when read. | ||
| 137 | 144 | ||
| 138 | ============================================================== | ||
| 139 | 145 | ||
| 140 | dirty_background_ratio | 146 | dirty_background_ratio |
| 147 | ====================== | ||
| 141 | 148 | ||
| 142 | Contains, as a percentage of total available memory that contains free pages | 149 | Contains, as a percentage of total available memory that contains free pages |
| 143 | and reclaimable pages, the number of pages at which the background kernel | 150 | and reclaimable pages, the number of pages at which the background kernel |
| @@ -145,9 +152,9 @@ flusher threads will start writing out dirty data. | |||
| 145 | 152 | ||
| 146 | The total available memory is not equal to total system memory. | 153 | The total available memory is not equal to total system memory. |
| 147 | 154 | ||
| 148 | ============================================================== | ||
| 149 | 155 | ||
| 150 | dirty_bytes | 156 | dirty_bytes |
| 157 | =========== | ||
| 151 | 158 | ||
| 152 | Contains the amount of dirty memory at which a process generating disk writes | 159 | Contains the amount of dirty memory at which a process generating disk writes |
| 153 | will itself start writeback. | 160 | will itself start writeback. |
| @@ -161,18 +168,18 @@ Note: the minimum value allowed for dirty_bytes is two pages (in bytes); any | |||
| 161 | value lower than this limit will be ignored and the old configuration will be | 168 | value lower than this limit will be ignored and the old configuration will be |
| 162 | retained. | 169 | retained. |
| 163 | 170 | ||
| 164 | ============================================================== | ||
| 165 | 171 | ||
| 166 | dirty_expire_centisecs | 172 | dirty_expire_centisecs |
| 173 | ====================== | ||
| 167 | 174 | ||
| 168 | This tunable is used to define when dirty data is old enough to be eligible | 175 | This tunable is used to define when dirty data is old enough to be eligible |
| 169 | for writeout by the kernel flusher threads. It is expressed in 100'ths | 176 | for writeout by the kernel flusher threads. It is expressed in 100'ths |
| 170 | of a second. Data which has been dirty in-memory for longer than this | 177 | of a second. Data which has been dirty in-memory for longer than this |
| 171 | interval will be written out next time a flusher thread wakes up. | 178 | interval will be written out next time a flusher thread wakes up. |
| 172 | 179 | ||
| 173 | ============================================================== | ||
| 174 | 180 | ||
| 175 | dirty_ratio | 181 | dirty_ratio |
| 182 | =========== | ||
| 176 | 183 | ||
| 177 | Contains, as a percentage of total available memory that contains free pages | 184 | Contains, as a percentage of total available memory that contains free pages |
| 178 | and reclaimable pages, the number of pages at which a process which is | 185 | and reclaimable pages, the number of pages at which a process which is |
| @@ -180,9 +187,9 @@ generating disk writes will itself start writing out dirty data. | |||
| 180 | 187 | ||
| 181 | The total available memory is not equal to total system memory. | 188 | The total available memory is not equal to total system memory. |
| 182 | 189 | ||
| 183 | ============================================================== | ||
| 184 | 190 | ||
| 185 | dirtytime_expire_seconds | 191 | dirtytime_expire_seconds |
| 192 | ======================== | ||
| 186 | 193 | ||
| 187 | When a lazytime inode is constantly having its pages dirtied, the inode with | 194 | When a lazytime inode is constantly having its pages dirtied, the inode with |
| 188 | an updated timestamp will never get chance to be written out. And, if the | 195 | an updated timestamp will never get chance to be written out. And, if the |
| @@ -192,34 +199,39 @@ eventually gets pushed out to disk. This tunable is used to define when dirty | |||
| 192 | inode is old enough to be eligible for writeback by the kernel flusher threads. | 199 | inode is old enough to be eligible for writeback by the kernel flusher threads. |
| 193 | And, it is also used as the interval to wakeup dirtytime_writeback thread. | 200 | And, it is also used as the interval to wakeup dirtytime_writeback thread. |
| 194 | 201 | ||
| 195 | ============================================================== | ||
| 196 | 202 | ||
| 197 | dirty_writeback_centisecs | 203 | dirty_writeback_centisecs |
| 204 | ========================= | ||
| 198 | 205 | ||
| 199 | The kernel flusher threads will periodically wake up and write `old' data | 206 | The kernel flusher threads will periodically wake up and write `old` data |
| 200 | out to disk. This tunable expresses the interval between those wakeups, in | 207 | out to disk. This tunable expresses the interval between those wakeups, in |
| 201 | 100'ths of a second. | 208 | 100'ths of a second. |
| 202 | 209 | ||
| 203 | Setting this to zero disables periodic writeback altogether. | 210 | Setting this to zero disables periodic writeback altogether. |
| 204 | 211 | ||
| 205 | ============================================================== | ||
| 206 | 212 | ||
| 207 | drop_caches | 213 | drop_caches |
| 214 | =========== | ||
| 208 | 215 | ||
| 209 | Writing to this will cause the kernel to drop clean caches, as well as | 216 | Writing to this will cause the kernel to drop clean caches, as well as |
| 210 | reclaimable slab objects like dentries and inodes. Once dropped, their | 217 | reclaimable slab objects like dentries and inodes. Once dropped, their |
| 211 | memory becomes free. | 218 | memory becomes free. |
| 212 | 219 | ||
| 213 | To free pagecache: | 220 | To free pagecache:: |
| 221 | |||
| 214 | echo 1 > /proc/sys/vm/drop_caches | 222 | echo 1 > /proc/sys/vm/drop_caches |
| 215 | To free reclaimable slab objects (includes dentries and inodes): | 223 | |
| 224 | To free reclaimable slab objects (includes dentries and inodes):: | ||
| 225 | |||
| 216 | echo 2 > /proc/sys/vm/drop_caches | 226 | echo 2 > /proc/sys/vm/drop_caches |
| 217 | To free slab objects and pagecache: | 227 | |
| 228 | To free slab objects and pagecache:: | ||
| 229 | |||
| 218 | echo 3 > /proc/sys/vm/drop_caches | 230 | echo 3 > /proc/sys/vm/drop_caches |
| 219 | 231 | ||
| 220 | This is a non-destructive operation and will not free any dirty objects. | 232 | This is a non-destructive operation and will not free any dirty objects. |
| 221 | To increase the number of objects freed by this operation, the user may run | 233 | To increase the number of objects freed by this operation, the user may run |
| 222 | `sync' prior to writing to /proc/sys/vm/drop_caches. This will minimize the | 234 | `sync` prior to writing to /proc/sys/vm/drop_caches. This will minimize the |
| 223 | number of dirty objects on the system and create more candidates to be | 235 | number of dirty objects on the system and create more candidates to be |
| 224 | dropped. | 236 | dropped. |
| 225 | 237 | ||
| @@ -233,16 +245,16 @@ dropped objects, especially if they were under heavy use. Because of this, | |||
| 233 | use outside of a testing or debugging environment is not recommended. | 245 | use outside of a testing or debugging environment is not recommended. |
| 234 | 246 | ||
| 235 | You may see informational messages in your kernel log when this file is | 247 | You may see informational messages in your kernel log when this file is |
| 236 | used: | 248 | used:: |
| 237 | 249 | ||
| 238 | cat (1234): drop_caches: 3 | 250 | cat (1234): drop_caches: 3 |
| 239 | 251 | ||
| 240 | These are informational only. They do not mean that anything is wrong | 252 | These are informational only. They do not mean that anything is wrong |
| 241 | with your system. To disable them, echo 4 (bit 2) into drop_caches. | 253 | with your system. To disable them, echo 4 (bit 2) into drop_caches. |
| 242 | 254 | ||
| 243 | ============================================================== | ||
| 244 | 255 | ||
| 245 | extfrag_threshold | 256 | extfrag_threshold |
| 257 | ================= | ||
| 246 | 258 | ||
| 247 | This parameter affects whether the kernel will compact memory or direct | 259 | This parameter affects whether the kernel will compact memory or direct |
| 248 | reclaim to satisfy a high-order allocation. The extfrag/extfrag_index file in | 260 | reclaim to satisfy a high-order allocation. The extfrag/extfrag_index file in |
| @@ -254,9 +266,9 @@ implies that the allocation will succeed as long as watermarks are met. | |||
| 254 | The kernel will not compact memory in a zone if the | 266 | The kernel will not compact memory in a zone if the |
| 255 | fragmentation index is <= extfrag_threshold. The default value is 500. | 267 | fragmentation index is <= extfrag_threshold. The default value is 500. |
| 256 | 268 | ||
| 257 | ============================================================== | ||
| 258 | 269 | ||
| 259 | highmem_is_dirtyable | 270 | highmem_is_dirtyable |
| 271 | ==================== | ||
| 260 | 272 | ||
| 261 | Available only for systems with CONFIG_HIGHMEM enabled (32b systems). | 273 | Available only for systems with CONFIG_HIGHMEM enabled (32b systems). |
| 262 | 274 | ||
| @@ -274,30 +286,30 @@ OOM killer because some writers (e.g. direct block device writes) can | |||
| 274 | only use the low memory and they can fill it up with dirty data without | 286 | only use the low memory and they can fill it up with dirty data without |
| 275 | any throttling. | 287 | any throttling. |
| 276 | 288 | ||
| 277 | ============================================================== | ||
| 278 | 289 | ||
| 279 | hugetlb_shm_group | 290 | hugetlb_shm_group |
| 291 | ================= | ||
| 280 | 292 | ||
| 281 | hugetlb_shm_group contains group id that is allowed to create SysV | 293 | hugetlb_shm_group contains group id that is allowed to create SysV |
| 282 | shared memory segment using hugetlb page. | 294 | shared memory segment using hugetlb page. |
| 283 | 295 | ||
| 284 | ============================================================== | ||
| 285 | 296 | ||
| 286 | laptop_mode | 297 | laptop_mode |
| 298 | =========== | ||
| 287 | 299 | ||
| 288 | laptop_mode is a knob that controls "laptop mode". All the things that are | 300 | laptop_mode is a knob that controls "laptop mode". All the things that are |
| 289 | controlled by this knob are discussed in Documentation/laptops/laptop-mode.txt. | 301 | controlled by this knob are discussed in Documentation/admin-guide/laptops/laptop-mode.rst. |
| 290 | 302 | ||
| 291 | ============================================================== | ||
| 292 | 303 | ||
| 293 | legacy_va_layout | 304 | legacy_va_layout |
| 305 | ================ | ||
| 294 | 306 | ||
| 295 | If non-zero, this sysctl disables the new 32-bit mmap layout - the kernel | 307 | If non-zero, this sysctl disables the new 32-bit mmap layout - the kernel |
| 296 | will use the legacy (2.4) layout for all processes. | 308 | will use the legacy (2.4) layout for all processes. |
| 297 | 309 | ||
| 298 | ============================================================== | ||
| 299 | 310 | ||
| 300 | lowmem_reserve_ratio | 311 | lowmem_reserve_ratio |
| 312 | ==================== | ||
| 301 | 313 | ||
| 302 | For some specialised workloads on highmem machines it is dangerous for | 314 | For some specialised workloads on highmem machines it is dangerous for |
| 303 | the kernel to allow process memory to be allocated from the "lowmem" | 315 | the kernel to allow process memory to be allocated from the "lowmem" |
| @@ -308,7 +320,7 @@ And on large highmem machines this lack of reclaimable lowmem memory | |||
| 308 | can be fatal. | 320 | can be fatal. |
| 309 | 321 | ||
| 310 | So the Linux page allocator has a mechanism which prevents allocations | 322 | So the Linux page allocator has a mechanism which prevents allocations |
| 311 | which _could_ use highmem from using too much lowmem. This means that | 323 | which *could* use highmem from using too much lowmem. This means that |
| 312 | a certain amount of lowmem is defended from the possibility of being | 324 | a certain amount of lowmem is defended from the possibility of being |
| 313 | captured into pinned user memory. | 325 | captured into pinned user memory. |
| 314 | 326 | ||
| @@ -316,39 +328,37 @@ captured into pinned user memory. | |||
| 316 | mechanism will also defend that region from allocations which could use | 328 | mechanism will also defend that region from allocations which could use |
| 317 | highmem or lowmem). | 329 | highmem or lowmem). |
| 318 | 330 | ||
| 319 | The `lowmem_reserve_ratio' tunable determines how aggressive the kernel is | 331 | The `lowmem_reserve_ratio` tunable determines how aggressive the kernel is |
| 320 | in defending these lower zones. | 332 | in defending these lower zones. |
| 321 | 333 | ||
| 322 | If you have a machine which uses highmem or ISA DMA and your | 334 | If you have a machine which uses highmem or ISA DMA and your |
| 323 | applications are using mlock(), or if you are running with no swap then | 335 | applications are using mlock(), or if you are running with no swap then |
| 324 | you probably should change the lowmem_reserve_ratio setting. | 336 | you probably should change the lowmem_reserve_ratio setting. |
| 325 | 337 | ||
| 326 | The lowmem_reserve_ratio is an array. You can see them by reading this file. | 338 | The lowmem_reserve_ratio is an array. You can see them by reading this file:: |
| 327 | - | 339 | |
| 328 | % cat /proc/sys/vm/lowmem_reserve_ratio | 340 | % cat /proc/sys/vm/lowmem_reserve_ratio |
| 329 | 256 256 32 | 341 | 256 256 32 |
| 330 | - | ||
| 331 | 342 | ||
| 332 | But, these values are not used directly. The kernel calculates # of protection | 343 | But, these values are not used directly. The kernel calculates # of protection |
| 333 | pages for each zones from them. These are shown as array of protection pages | 344 | pages for each zones from them. These are shown as array of protection pages |
| 334 | in /proc/zoneinfo like followings. (This is an example of x86-64 box). | 345 | in /proc/zoneinfo like followings. (This is an example of x86-64 box). |
| 335 | Each zone has an array of protection pages like this. | 346 | Each zone has an array of protection pages like this:: |
| 336 | 347 | ||
| 337 | - | 348 | Node 0, zone DMA |
| 338 | Node 0, zone DMA | 349 | pages free 1355 |
| 339 | pages free 1355 | 350 | min 3 |
| 340 | min 3 | 351 | low 3 |
| 341 | low 3 | 352 | high 4 |
| 342 | high 4 | ||
| 343 | : | 353 | : |
| 344 | : | 354 | : |
| 345 | numa_other 0 | 355 | numa_other 0 |
| 346 | protection: (0, 2004, 2004, 2004) | 356 | protection: (0, 2004, 2004, 2004) |
| 347 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 357 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 348 | pagesets | 358 | pagesets |
| 349 | cpu: 0 pcp: 0 | 359 | cpu: 0 pcp: 0 |
| 350 | : | 360 | : |
| 351 | - | 361 | |
| 352 | These protections are added to score to judge whether this zone should be used | 362 | These protections are added to score to judge whether this zone should be used |
| 353 | for page allocation or should be reclaimed. | 363 | for page allocation or should be reclaimed. |
| 354 | 364 | ||
| @@ -359,20 +369,24 @@ not be used because pages_free(1355) is smaller than watermark + protection[2] | |||
| 359 | normal page requirement. If requirement is DMA zone(index=0), protection[0] | 369 | normal page requirement. If requirement is DMA zone(index=0), protection[0] |
| 360 | (=0) is used. | 370 | (=0) is used. |
| 361 | 371 | ||
| 362 | zone[i]'s protection[j] is calculated by following expression. | 372 | zone[i]'s protection[j] is calculated by following expression:: |
| 363 | 373 | ||
| 364 | (i < j): | 374 | (i < j): |
| 365 | zone[i]->protection[j] | 375 | zone[i]->protection[j] |
| 366 | = (total sums of managed_pages from zone[i+1] to zone[j] on the node) | 376 | = (total sums of managed_pages from zone[i+1] to zone[j] on the node) |
| 367 | / lowmem_reserve_ratio[i]; | 377 | / lowmem_reserve_ratio[i]; |
| 368 | (i = j): | 378 | (i = j): |
| 369 | (should not be protected. = 0; | 379 | (should not be protected. = 0; |
| 370 | (i > j): | 380 | (i > j): |
| 371 | (not necessary, but looks 0) | 381 | (not necessary, but looks 0) |
| 372 | 382 | ||
| 373 | The default values of lowmem_reserve_ratio[i] are | 383 | The default values of lowmem_reserve_ratio[i] are |
| 384 | |||
| 385 | === ==================================== | ||
| 374 | 256 (if zone[i] means DMA or DMA32 zone) | 386 | 256 (if zone[i] means DMA or DMA32 zone) |
| 375 | 32 (others). | 387 | 32 (others) |
| 388 | === ==================================== | ||
| 389 | |||
| 376 | As above expression, they are reciprocal number of ratio. | 390 | As above expression, they are reciprocal number of ratio. |
| 377 | 256 means 1/256. # of protection pages becomes about "0.39%" of total managed | 391 | 256 means 1/256. # of protection pages becomes about "0.39%" of total managed |
| 378 | pages of higher zones on the node. | 392 | pages of higher zones on the node. |
| @@ -381,9 +395,9 @@ If you would like to protect more pages, smaller values are effective. | |||
| 381 | The minimum value is 1 (1/1 -> 100%). The value less than 1 completely | 395 | The minimum value is 1 (1/1 -> 100%). The value less than 1 completely |
| 382 | disables protection of the pages. | 396 | disables protection of the pages. |
| 383 | 397 | ||
| 384 | ============================================================== | ||
| 385 | 398 | ||
| 386 | max_map_count: | 399 | max_map_count: |
| 400 | ============== | ||
| 387 | 401 | ||
| 388 | This file contains the maximum number of memory map areas a process | 402 | This file contains the maximum number of memory map areas a process |
| 389 | may have. Memory map areas are used as a side-effect of calling | 403 | may have. Memory map areas are used as a side-effect of calling |
| @@ -396,9 +410,9 @@ e.g., up to one or two maps per allocation. | |||
| 396 | 410 | ||
| 397 | The default value is 65536. | 411 | The default value is 65536. |
| 398 | 412 | ||
| 399 | ============================================================= | ||
| 400 | 413 | ||
| 401 | memory_failure_early_kill: | 414 | memory_failure_early_kill: |
| 415 | ========================== | ||
| 402 | 416 | ||
| 403 | Control how to kill processes when uncorrected memory error (typically | 417 | Control how to kill processes when uncorrected memory error (typically |
| 404 | a 2bit error in a memory module) is detected in the background by hardware | 418 | a 2bit error in a memory module) is detected in the background by hardware |
| @@ -424,9 +438,9 @@ check handling and depends on the hardware capabilities. | |||
| 424 | 438 | ||
| 425 | Applications can override this setting individually with the PR_MCE_KILL prctl | 439 | Applications can override this setting individually with the PR_MCE_KILL prctl |
| 426 | 440 | ||
| 427 | ============================================================== | ||
| 428 | 441 | ||
| 429 | memory_failure_recovery | 442 | memory_failure_recovery |
| 443 | ======================= | ||
| 430 | 444 | ||
| 431 | Enable memory failure recovery (when supported by the platform) | 445 | Enable memory failure recovery (when supported by the platform) |
| 432 | 446 | ||
| @@ -434,9 +448,9 @@ Enable memory failure recovery (when supported by the platform) | |||
| 434 | 448 | ||
| 435 | 0: Always panic on a memory failure. | 449 | 0: Always panic on a memory failure. |
| 436 | 450 | ||
| 437 | ============================================================== | ||
| 438 | 451 | ||
| 439 | min_free_kbytes: | 452 | min_free_kbytes |
| 453 | =============== | ||
| 440 | 454 | ||
| 441 | This is used to force the Linux VM to keep a minimum number | 455 | This is used to force the Linux VM to keep a minimum number |
| 442 | of kilobytes free. The VM uses this number to compute a | 456 | of kilobytes free. The VM uses this number to compute a |
| @@ -450,9 +464,9 @@ become subtly broken, and prone to deadlock under high loads. | |||
| 450 | 464 | ||
| 451 | Setting this too high will OOM your machine instantly. | 465 | Setting this too high will OOM your machine instantly. |
| 452 | 466 | ||
| 453 | ============================================================= | ||
| 454 | 467 | ||
| 455 | min_slab_ratio: | 468 | min_slab_ratio |
| 469 | ============== | ||
| 456 | 470 | ||
| 457 | This is available only on NUMA kernels. | 471 | This is available only on NUMA kernels. |
| 458 | 472 | ||
| @@ -468,9 +482,9 @@ Note that slab reclaim is triggered in a per zone / node fashion. | |||
| 468 | The process of reclaiming slab memory is currently not node specific | 482 | The process of reclaiming slab memory is currently not node specific |
| 469 | and may not be fast. | 483 | and may not be fast. |
| 470 | 484 | ||
| 471 | ============================================================= | ||
| 472 | 485 | ||
| 473 | min_unmapped_ratio: | 486 | min_unmapped_ratio |
| 487 | ================== | ||
| 474 | 488 | ||
| 475 | This is available only on NUMA kernels. | 489 | This is available only on NUMA kernels. |
| 476 | 490 | ||
| @@ -485,9 +499,9 @@ files and similar are considered. | |||
| 485 | 499 | ||
| 486 | The default is 1 percent. | 500 | The default is 1 percent. |
| 487 | 501 | ||
| 488 | ============================================================== | ||
| 489 | 502 | ||
| 490 | mmap_min_addr | 503 | mmap_min_addr |
| 504 | ============= | ||
| 491 | 505 | ||
| 492 | This file indicates the amount of address space which a user process will | 506 | This file indicates the amount of address space which a user process will |
| 493 | be restricted from mmapping. Since kernel null dereference bugs could | 507 | be restricted from mmapping. Since kernel null dereference bugs could |
| @@ -498,9 +512,9 @@ security module. Setting this value to something like 64k will allow the | |||
| 498 | vast majority of applications to work correctly and provide defense in depth | 512 | vast majority of applications to work correctly and provide defense in depth |
| 499 | against future potential kernel bugs. | 513 | against future potential kernel bugs. |
| 500 | 514 | ||
| 501 | ============================================================== | ||
| 502 | 515 | ||
| 503 | mmap_rnd_bits: | 516 | mmap_rnd_bits |
| 517 | ============= | ||
| 504 | 518 | ||
| 505 | This value can be used to select the number of bits to use to | 519 | This value can be used to select the number of bits to use to |
| 506 | determine the random offset to the base address of vma regions | 520 | determine the random offset to the base address of vma regions |
| @@ -511,9 +525,9 @@ by the architecture's minimum and maximum supported values. | |||
| 511 | This value can be changed after boot using the | 525 | This value can be changed after boot using the |
| 512 | /proc/sys/vm/mmap_rnd_bits tunable | 526 | /proc/sys/vm/mmap_rnd_bits tunable |
| 513 | 527 | ||
| 514 | ============================================================== | ||
| 515 | 528 | ||
| 516 | mmap_rnd_compat_bits: | 529 | mmap_rnd_compat_bits |
| 530 | ==================== | ||
| 517 | 531 | ||
| 518 | This value can be used to select the number of bits to use to | 532 | This value can be used to select the number of bits to use to |
| 519 | determine the random offset to the base address of vma regions | 533 | determine the random offset to the base address of vma regions |
| @@ -525,35 +539,35 @@ architecture's minimum and maximum supported values. | |||
| 525 | This value can be changed after boot using the | 539 | This value can be changed after boot using the |
| 526 | /proc/sys/vm/mmap_rnd_compat_bits tunable | 540 | /proc/sys/vm/mmap_rnd_compat_bits tunable |
| 527 | 541 | ||
| 528 | ============================================================== | ||
| 529 | 542 | ||
| 530 | nr_hugepages | 543 | nr_hugepages |
| 544 | ============ | ||
| 531 | 545 | ||
| 532 | Change the minimum size of the hugepage pool. | 546 | Change the minimum size of the hugepage pool. |
| 533 | 547 | ||
| 534 | See Documentation/admin-guide/mm/hugetlbpage.rst | 548 | See Documentation/admin-guide/mm/hugetlbpage.rst |
| 535 | 549 | ||
| 536 | ============================================================== | ||
| 537 | 550 | ||
| 538 | nr_hugepages_mempolicy | 551 | nr_hugepages_mempolicy |
| 552 | ====================== | ||
| 539 | 553 | ||
| 540 | Change the size of the hugepage pool at run-time on a specific | 554 | Change the size of the hugepage pool at run-time on a specific |
| 541 | set of NUMA nodes. | 555 | set of NUMA nodes. |
| 542 | 556 | ||
| 543 | See Documentation/admin-guide/mm/hugetlbpage.rst | 557 | See Documentation/admin-guide/mm/hugetlbpage.rst |
| 544 | 558 | ||
| 545 | ============================================================== | ||
| 546 | 559 | ||
| 547 | nr_overcommit_hugepages | 560 | nr_overcommit_hugepages |
| 561 | ======================= | ||
| 548 | 562 | ||
| 549 | Change the maximum size of the hugepage pool. The maximum is | 563 | Change the maximum size of the hugepage pool. The maximum is |
| 550 | nr_hugepages + nr_overcommit_hugepages. | 564 | nr_hugepages + nr_overcommit_hugepages. |
| 551 | 565 | ||
| 552 | See Documentation/admin-guide/mm/hugetlbpage.rst | 566 | See Documentation/admin-guide/mm/hugetlbpage.rst |
| 553 | 567 | ||
| 554 | ============================================================== | ||
| 555 | 568 | ||
| 556 | nr_trim_pages | 569 | nr_trim_pages |
| 570 | ============= | ||
| 557 | 571 | ||
| 558 | This is available only on NOMMU kernels. | 572 | This is available only on NOMMU kernels. |
| 559 | 573 | ||
| @@ -568,16 +582,17 @@ The default value is 1. | |||
| 568 | 582 | ||
| 569 | See Documentation/nommu-mmap.txt for more information. | 583 | See Documentation/nommu-mmap.txt for more information. |
| 570 | 584 | ||
| 571 | ============================================================== | ||
| 572 | 585 | ||
| 573 | numa_zonelist_order | 586 | numa_zonelist_order |
| 587 | =================== | ||
| 574 | 588 | ||
| 575 | This sysctl is only for NUMA and it is deprecated. Anything but | 589 | This sysctl is only for NUMA and it is deprecated. Anything but |
| 576 | Node order will fail! | 590 | Node order will fail! |
| 577 | 591 | ||
| 578 | 'where the memory is allocated from' is controlled by zonelists. | 592 | 'where the memory is allocated from' is controlled by zonelists. |
| 593 | |||
| 579 | (This documentation ignores ZONE_HIGHMEM/ZONE_DMA32 for simple explanation. | 594 | (This documentation ignores ZONE_HIGHMEM/ZONE_DMA32 for simple explanation. |
| 580 | you may be able to read ZONE_DMA as ZONE_DMA32...) | 595 | you may be able to read ZONE_DMA as ZONE_DMA32...) |
| 581 | 596 | ||
| 582 | In non-NUMA case, a zonelist for GFP_KERNEL is ordered as following. | 597 | In non-NUMA case, a zonelist for GFP_KERNEL is ordered as following. |
| 583 | ZONE_NORMAL -> ZONE_DMA | 598 | ZONE_NORMAL -> ZONE_DMA |
| @@ -585,10 +600,10 @@ This means that a memory allocation request for GFP_KERNEL will | |||
| 585 | get memory from ZONE_DMA only when ZONE_NORMAL is not available. | 600 | get memory from ZONE_DMA only when ZONE_NORMAL is not available. |
| 586 | 601 | ||
| 587 | In NUMA case, you can think of following 2 types of order. | 602 | In NUMA case, you can think of following 2 types of order. |
| 588 | Assume 2 node NUMA and below is zonelist of Node(0)'s GFP_KERNEL | 603 | Assume 2 node NUMA and below is zonelist of Node(0)'s GFP_KERNEL:: |
| 589 | 604 | ||
| 590 | (A) Node(0) ZONE_NORMAL -> Node(0) ZONE_DMA -> Node(1) ZONE_NORMAL | 605 | (A) Node(0) ZONE_NORMAL -> Node(0) ZONE_DMA -> Node(1) ZONE_NORMAL |
| 591 | (B) Node(0) ZONE_NORMAL -> Node(1) ZONE_NORMAL -> Node(0) ZONE_DMA. | 606 | (B) Node(0) ZONE_NORMAL -> Node(1) ZONE_NORMAL -> Node(0) ZONE_DMA. |
| 592 | 607 | ||
| 593 | Type(A) offers the best locality for processes on Node(0), but ZONE_DMA | 608 | Type(A) offers the best locality for processes on Node(0), but ZONE_DMA |
| 594 | will be used before ZONE_NORMAL exhaustion. This increases possibility of | 609 | will be used before ZONE_NORMAL exhaustion. This increases possibility of |
| @@ -616,9 +631,9 @@ order will be selected. | |||
| 616 | Default order is recommended unless this is causing problems for your | 631 | Default order is recommended unless this is causing problems for your |
| 617 | system/application. | 632 | system/application. |
| 618 | 633 | ||
| 619 | ============================================================== | ||
| 620 | 634 | ||
| 621 | oom_dump_tasks | 635 | oom_dump_tasks |
| 636 | ============== | ||
| 622 | 637 | ||
| 623 | Enables a system-wide task dump (excluding kernel threads) to be produced | 638 | Enables a system-wide task dump (excluding kernel threads) to be produced |
| 624 | when the kernel performs an OOM-killing and includes such information as | 639 | when the kernel performs an OOM-killing and includes such information as |
| @@ -638,9 +653,9 @@ OOM killer actually kills a memory-hogging task. | |||
| 638 | 653 | ||
| 639 | The default value is 1 (enabled). | 654 | The default value is 1 (enabled). |
| 640 | 655 | ||
| 641 | ============================================================== | ||
| 642 | 656 | ||
| 643 | oom_kill_allocating_task | 657 | oom_kill_allocating_task |
| 658 | ======================== | ||
| 644 | 659 | ||
| 645 | This enables or disables killing the OOM-triggering task in | 660 | This enables or disables killing the OOM-triggering task in |
| 646 | out-of-memory situations. | 661 | out-of-memory situations. |
| @@ -659,9 +674,9 @@ is used in oom_kill_allocating_task. | |||
| 659 | 674 | ||
| 660 | The default value is 0. | 675 | The default value is 0. |
| 661 | 676 | ||
| 662 | ============================================================== | ||
| 663 | 677 | ||
| 664 | overcommit_kbytes: | 678 | overcommit_kbytes |
| 679 | ================= | ||
| 665 | 680 | ||
| 666 | When overcommit_memory is set to 2, the committed address space is not | 681 | When overcommit_memory is set to 2, the committed address space is not |
| 667 | permitted to exceed swap plus this amount of physical RAM. See below. | 682 | permitted to exceed swap plus this amount of physical RAM. See below. |
| @@ -670,9 +685,9 @@ Note: overcommit_kbytes is the counterpart of overcommit_ratio. Only one | |||
| 670 | of them may be specified at a time. Setting one disables the other (which | 685 | of them may be specified at a time. Setting one disables the other (which |
| 671 | then appears as 0 when read). | 686 | then appears as 0 when read). |
| 672 | 687 | ||
| 673 | ============================================================== | ||
| 674 | 688 | ||
| 675 | overcommit_memory: | 689 | overcommit_memory |
| 690 | ================= | ||
| 676 | 691 | ||
| 677 | This value contains a flag that enables memory overcommitment. | 692 | This value contains a flag that enables memory overcommitment. |
| 678 | 693 | ||
| @@ -695,17 +710,17 @@ The default value is 0. | |||
| 695 | See Documentation/vm/overcommit-accounting.rst and | 710 | See Documentation/vm/overcommit-accounting.rst and |
| 696 | mm/util.c::__vm_enough_memory() for more information. | 711 | mm/util.c::__vm_enough_memory() for more information. |
| 697 | 712 | ||
| 698 | ============================================================== | ||
| 699 | 713 | ||
| 700 | overcommit_ratio: | 714 | overcommit_ratio |
| 715 | ================ | ||
| 701 | 716 | ||
| 702 | When overcommit_memory is set to 2, the committed address | 717 | When overcommit_memory is set to 2, the committed address |
| 703 | space is not permitted to exceed swap plus this percentage | 718 | space is not permitted to exceed swap plus this percentage |
| 704 | of physical RAM. See above. | 719 | of physical RAM. See above. |
| 705 | 720 | ||
| 706 | ============================================================== | ||
| 707 | 721 | ||
| 708 | page-cluster | 722 | page-cluster |
| 723 | ============ | ||
| 709 | 724 | ||
| 710 | page-cluster controls the number of pages up to which consecutive pages | 725 | page-cluster controls the number of pages up to which consecutive pages |
| 711 | are read in from swap in a single attempt. This is the swap counterpart | 726 | are read in from swap in a single attempt. This is the swap counterpart |
| @@ -725,9 +740,9 @@ Lower values mean lower latencies for initial faults, but at the same time | |||
| 725 | extra faults and I/O delays for following faults if they would have been part of | 740 | extra faults and I/O delays for following faults if they would have been part of |
| 726 | that consecutive pages readahead would have brought in. | 741 | that consecutive pages readahead would have brought in. |
| 727 | 742 | ||
| 728 | ============================================================= | ||
| 729 | 743 | ||
| 730 | panic_on_oom | 744 | panic_on_oom |
| 745 | ============ | ||
| 731 | 746 | ||
| 732 | This enables or disables panic on out-of-memory feature. | 747 | This enables or disables panic on out-of-memory feature. |
| 733 | 748 | ||
| @@ -747,14 +762,16 @@ above-mentioned. Even oom happens under memory cgroup, the whole | |||
| 747 | system panics. | 762 | system panics. |
| 748 | 763 | ||
| 749 | The default value is 0. | 764 | The default value is 0. |
| 765 | |||
| 750 | 1 and 2 are for failover of clustering. Please select either | 766 | 1 and 2 are for failover of clustering. Please select either |
| 751 | according to your policy of failover. | 767 | according to your policy of failover. |
| 768 | |||
| 752 | panic_on_oom=2+kdump gives you very strong tool to investigate | 769 | panic_on_oom=2+kdump gives you very strong tool to investigate |
| 753 | why oom happens. You can get snapshot. | 770 | why oom happens. You can get snapshot. |
| 754 | 771 | ||
| 755 | ============================================================= | ||
| 756 | 772 | ||
| 757 | percpu_pagelist_fraction | 773 | percpu_pagelist_fraction |
| 774 | ======================== | ||
| 758 | 775 | ||
| 759 | This is the fraction of pages at most (high mark pcp->high) in each zone that | 776 | This is the fraction of pages at most (high mark pcp->high) in each zone that |
| 760 | are allocated for each per cpu page list. The min value for this is 8. It | 777 | are allocated for each per cpu page list. The min value for this is 8. It |
| @@ -770,16 +787,16 @@ The initial value is zero. Kernel does not use this value at boot time to set | |||
| 770 | the high water marks for each per cpu page list. If the user writes '0' to this | 787 | the high water marks for each per cpu page list. If the user writes '0' to this |
| 771 | sysctl, it will revert to this default behavior. | 788 | sysctl, it will revert to this default behavior. |
| 772 | 789 | ||
| 773 | ============================================================== | ||
| 774 | 790 | ||
| 775 | stat_interval | 791 | stat_interval |
| 792 | ============= | ||
| 776 | 793 | ||
| 777 | The time interval between which vm statistics are updated. The default | 794 | The time interval between which vm statistics are updated. The default |
| 778 | is 1 second. | 795 | is 1 second. |
| 779 | 796 | ||
| 780 | ============================================================== | ||
| 781 | 797 | ||
| 782 | stat_refresh | 798 | stat_refresh |
| 799 | ============ | ||
| 783 | 800 | ||
| 784 | Any read or write (by root only) flushes all the per-cpu vm statistics | 801 | Any read or write (by root only) flushes all the per-cpu vm statistics |
| 785 | into their global totals, for more accurate reports when testing | 802 | into their global totals, for more accurate reports when testing |
| @@ -790,24 +807,26 @@ as 0) and "fails" with EINVAL if any are found, with a warning in dmesg. | |||
| 790 | (At time of writing, a few stats are known sometimes to be found negative, | 807 | (At time of writing, a few stats are known sometimes to be found negative, |
| 791 | with no ill effects: errors and warnings on these stats are suppressed.) | 808 | with no ill effects: errors and warnings on these stats are suppressed.) |
| 792 | 809 | ||
| 793 | ============================================================== | ||
| 794 | 810 | ||
| 795 | numa_stat | 811 | numa_stat |
| 812 | ========= | ||
| 796 | 813 | ||
| 797 | This interface allows runtime configuration of numa statistics. | 814 | This interface allows runtime configuration of numa statistics. |
| 798 | 815 | ||
| 799 | When page allocation performance becomes a bottleneck and you can tolerate | 816 | When page allocation performance becomes a bottleneck and you can tolerate |
| 800 | some possible tool breakage and decreased numa counter precision, you can | 817 | some possible tool breakage and decreased numa counter precision, you can |
| 801 | do: | 818 | do:: |
| 819 | |||
| 802 | echo 0 > /proc/sys/vm/numa_stat | 820 | echo 0 > /proc/sys/vm/numa_stat |
| 803 | 821 | ||
| 804 | When page allocation performance is not a bottleneck and you want all | 822 | When page allocation performance is not a bottleneck and you want all |
| 805 | tooling to work, you can do: | 823 | tooling to work, you can do:: |
| 824 | |||
| 806 | echo 1 > /proc/sys/vm/numa_stat | 825 | echo 1 > /proc/sys/vm/numa_stat |
| 807 | 826 | ||
| 808 | ============================================================== | ||
| 809 | 827 | ||
| 810 | swappiness | 828 | swappiness |
| 829 | ========== | ||
| 811 | 830 | ||
| 812 | This control is used to define how aggressive the kernel will swap | 831 | This control is used to define how aggressive the kernel will swap |
| 813 | memory pages. Higher values will increase aggressiveness, lower values | 832 | memory pages. Higher values will increase aggressiveness, lower values |
| @@ -817,9 +836,9 @@ than the high water mark in a zone. | |||
| 817 | 836 | ||
| 818 | The default value is 60. | 837 | The default value is 60. |
| 819 | 838 | ||
| 820 | ============================================================== | ||
| 821 | 839 | ||
| 822 | unprivileged_userfaultfd | 840 | unprivileged_userfaultfd |
| 841 | ======================== | ||
| 823 | 842 | ||
| 824 | This flag controls whether unprivileged users can use the userfaultfd | 843 | This flag controls whether unprivileged users can use the userfaultfd |
| 825 | system calls. Set this to 1 to allow unprivileged users to use the | 844 | system calls. Set this to 1 to allow unprivileged users to use the |
| @@ -828,9 +847,9 @@ privileged users (with SYS_CAP_PTRACE capability). | |||
| 828 | 847 | ||
| 829 | The default value is 1. | 848 | The default value is 1. |
| 830 | 849 | ||
| 831 | ============================================================== | ||
| 832 | 850 | ||
| 833 | - user_reserve_kbytes | 851 | user_reserve_kbytes |
| 852 | =================== | ||
| 834 | 853 | ||
| 835 | When overcommit_memory is set to 2, "never overcommit" mode, reserve | 854 | When overcommit_memory is set to 2, "never overcommit" mode, reserve |
| 836 | min(3% of current process size, user_reserve_kbytes) of free memory. | 855 | min(3% of current process size, user_reserve_kbytes) of free memory. |
| @@ -846,10 +865,9 @@ Any subsequent attempts to execute a command will result in | |||
| 846 | 865 | ||
| 847 | Changing this takes effect whenever an application requests memory. | 866 | Changing this takes effect whenever an application requests memory. |
| 848 | 867 | ||
| 849 | ============================================================== | ||
| 850 | 868 | ||
| 851 | vfs_cache_pressure | 869 | vfs_cache_pressure |
| 852 | ------------------ | 870 | ================== |
| 853 | 871 | ||
| 854 | This percentage value controls the tendency of the kernel to reclaim | 872 | This percentage value controls the tendency of the kernel to reclaim |
| 855 | the memory which is used for caching of directory and inode objects. | 873 | the memory which is used for caching of directory and inode objects. |
| @@ -867,9 +885,9 @@ performance impact. Reclaim code needs to take various locks to find freeable | |||
| 867 | directory and inode objects. With vfs_cache_pressure=1000, it will look for | 885 | directory and inode objects. With vfs_cache_pressure=1000, it will look for |
| 868 | ten times more freeable objects than there are. | 886 | ten times more freeable objects than there are. |
| 869 | 887 | ||
| 870 | ============================================================= | ||
| 871 | 888 | ||
| 872 | watermark_boost_factor: | 889 | watermark_boost_factor |
| 890 | ====================== | ||
| 873 | 891 | ||
| 874 | This factor controls the level of reclaim when memory is being fragmented. | 892 | This factor controls the level of reclaim when memory is being fragmented. |
| 875 | It defines the percentage of the high watermark of a zone that will be | 893 | It defines the percentage of the high watermark of a zone that will be |
| @@ -887,9 +905,9 @@ fragmentation events that occurred in the recent past. If this value is | |||
| 887 | smaller than a pageblock then a pageblocks worth of pages will be reclaimed | 905 | smaller than a pageblock then a pageblocks worth of pages will be reclaimed |
| 888 | (e.g. 2MB on 64-bit x86). A boost factor of 0 will disable the feature. | 906 | (e.g. 2MB on 64-bit x86). A boost factor of 0 will disable the feature. |
| 889 | 907 | ||
| 890 | ============================================================= | ||
| 891 | 908 | ||
| 892 | watermark_scale_factor: | 909 | watermark_scale_factor |
| 910 | ====================== | ||
| 893 | 911 | ||
| 894 | This factor controls the aggressiveness of kswapd. It defines the | 912 | This factor controls the aggressiveness of kswapd. It defines the |
| 895 | amount of memory left in a node/system before kswapd is woken up and | 913 | amount of memory left in a node/system before kswapd is woken up and |
| @@ -905,20 +923,22 @@ that the number of free pages kswapd maintains for latency reasons is | |||
| 905 | too small for the allocation bursts occurring in the system. This knob | 923 | too small for the allocation bursts occurring in the system. This knob |
| 906 | can then be used to tune kswapd aggressiveness accordingly. | 924 | can then be used to tune kswapd aggressiveness accordingly. |
| 907 | 925 | ||
| 908 | ============================================================== | ||
| 909 | 926 | ||
| 910 | zone_reclaim_mode: | 927 | zone_reclaim_mode |
| 928 | ================= | ||
| 911 | 929 | ||
| 912 | Zone_reclaim_mode allows someone to set more or less aggressive approaches to | 930 | Zone_reclaim_mode allows someone to set more or less aggressive approaches to |
| 913 | reclaim memory when a zone runs out of memory. If it is set to zero then no | 931 | reclaim memory when a zone runs out of memory. If it is set to zero then no |
| 914 | zone reclaim occurs. Allocations will be satisfied from other zones / nodes | 932 | zone reclaim occurs. Allocations will be satisfied from other zones / nodes |
| 915 | in the system. | 933 | in the system. |
| 916 | 934 | ||
| 917 | This is value ORed together of | 935 | This is value OR'ed together of |
| 918 | 936 | ||
| 919 | 1 = Zone reclaim on | 937 | = =================================== |
| 920 | 2 = Zone reclaim writes dirty pages out | 938 | 1 Zone reclaim on |
| 921 | 4 = Zone reclaim swaps pages | 939 | 2 Zone reclaim writes dirty pages out |
| 940 | 4 Zone reclaim swaps pages | ||
| 941 | = =================================== | ||
| 922 | 942 | ||
| 923 | zone_reclaim_mode is disabled by default. For file servers or workloads | 943 | zone_reclaim_mode is disabled by default. For file servers or workloads |
| 924 | that benefit from having their data cached, zone_reclaim_mode should be | 944 | that benefit from having their data cached, zone_reclaim_mode should be |
| @@ -942,5 +962,3 @@ of other processes running on other nodes will not be affected. | |||
| 942 | Allowing regular swap effectively restricts allocations to the local | 962 | Allowing regular swap effectively restricts allocations to the local |
| 943 | node unless explicitly overridden by memory policies or cpuset | 963 | node unless explicitly overridden by memory policies or cpuset |
| 944 | configurations. | 964 | configurations. |
| 945 | |||
| 946 | ============ End of Document ================================= | ||
diff --git a/Documentation/video-output.txt b/Documentation/admin-guide/video-output.rst index 56d6fa2e2368..56d6fa2e2368 100644 --- a/Documentation/video-output.txt +++ b/Documentation/admin-guide/video-output.rst | |||
diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README deleted file mode 100644 index 56ada27c53be..000000000000 --- a/Documentation/arm/Marvell/README +++ /dev/null | |||
| @@ -1,395 +0,0 @@ | |||
| 1 | ARM Marvell SoCs | ||
| 2 | ================ | ||
| 3 | |||
| 4 | This document lists all the ARM Marvell SoCs that are currently | ||
| 5 | supported in mainline by the Linux kernel. As the Marvell families of | ||
| 6 | SoCs are large and complex, it is hard to understand where the support | ||
| 7 | for a particular SoC is available in the Linux kernel. This document | ||
| 8 | tries to help in understanding where those SoCs are supported, and to | ||
| 9 | match them with their corresponding public datasheet, when available. | ||
| 10 | |||
| 11 | Orion family | ||
| 12 | ------------ | ||
| 13 | |||
| 14 | Flavors: | ||
| 15 | 88F5082 | ||
| 16 | 88F5181 | ||
| 17 | 88F5181L | ||
| 18 | 88F5182 | ||
| 19 | Datasheet : http://www.embeddedarm.com/documentation/third-party/MV88F5182-datasheet.pdf | ||
| 20 | Programmer's User Guide : http://www.embeddedarm.com/documentation/third-party/MV88F5182-opensource-manual.pdf | ||
| 21 | User Manual : http://www.embeddedarm.com/documentation/third-party/MV88F5182-usermanual.pdf | ||
| 22 | 88F5281 | ||
| 23 | Datasheet : http://www.ocmodshop.com/images/reviews/networking/qnap_ts409u/marvel_88f5281_data_sheet.pdf | ||
| 24 | 88F6183 | ||
| 25 | Core: Feroceon 88fr331 (88f51xx) or 88fr531-vd (88f52xx) ARMv5 compatible | ||
| 26 | Linux kernel mach directory: arch/arm/mach-orion5x | ||
| 27 | Linux kernel plat directory: arch/arm/plat-orion | ||
| 28 | |||
| 29 | Kirkwood family | ||
| 30 | --------------- | ||
| 31 | |||
| 32 | Flavors: | ||
| 33 | 88F6282 a.k.a Armada 300 | ||
| 34 | Product Brief : http://www.marvell.com/embedded-processors/armada-300/assets/armada_310.pdf | ||
| 35 | 88F6283 a.k.a Armada 310 | ||
| 36 | Product Brief : http://www.marvell.com/embedded-processors/armada-300/assets/armada_310.pdf | ||
| 37 | 88F6190 | ||
| 38 | Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6190-003_WEB.pdf | ||
| 39 | Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F619x_OpenSource.pdf | ||
| 40 | Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf | ||
| 41 | 88F6192 | ||
| 42 | Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6192-003_ver1.pdf | ||
| 43 | Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F619x_OpenSource.pdf | ||
| 44 | Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf | ||
| 45 | 88F6182 | ||
| 46 | 88F6180 | ||
| 47 | Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6180-003_ver1.pdf | ||
| 48 | Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6180_OpenSource.pdf | ||
| 49 | Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf | ||
| 50 | 88F6281 | ||
| 51 | Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6281-004_ver1.pdf | ||
| 52 | Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf | ||
| 53 | Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf | ||
| 54 | Homepage: http://www.marvell.com/embedded-processors/kirkwood/ | ||
| 55 | Core: Feroceon 88fr131 ARMv5 compatible | ||
| 56 | Linux kernel mach directory: arch/arm/mach-mvebu | ||
| 57 | Linux kernel plat directory: none | ||
| 58 | |||
| 59 | Discovery family | ||
| 60 | ---------------- | ||
| 61 | |||
| 62 | Flavors: | ||
| 63 | MV78100 | ||
| 64 | Product Brief : http://www.marvell.com/embedded-processors/discovery-innovation/assets/MV78100-003_WEB.pdf | ||
| 65 | Hardware Spec : http://www.marvell.com/embedded-processors/discovery-innovation/assets/HW_MV78100_OpenSource.pdf | ||
| 66 | Functional Spec: http://www.marvell.com/embedded-processors/discovery-innovation/assets/FS_MV76100_78100_78200_OpenSource.pdf | ||
| 67 | MV78200 | ||
| 68 | Product Brief : http://www.marvell.com/embedded-processors/discovery-innovation/assets/MV78200-002_WEB.pdf | ||
| 69 | Hardware Spec : http://www.marvell.com/embedded-processors/discovery-innovation/assets/HW_MV78200_OpenSource.pdf | ||
| 70 | Functional Spec: http://www.marvell.com/embedded-processors/discovery-innovation/assets/FS_MV76100_78100_78200_OpenSource.pdf | ||
| 71 | MV76100 | ||
| 72 | Not supported by the Linux kernel. | ||
| 73 | |||
| 74 | Core: Feroceon 88fr571-vd ARMv5 compatible | ||
| 75 | |||
| 76 | Linux kernel mach directory: arch/arm/mach-mv78xx0 | ||
| 77 | Linux kernel plat directory: arch/arm/plat-orion | ||
| 78 | |||
| 79 | EBU Armada family | ||
| 80 | ----------------- | ||
| 81 | |||
| 82 | Armada 370 Flavors: | ||
| 83 | 88F6710 | ||
| 84 | 88F6707 | ||
| 85 | 88F6W11 | ||
| 86 | Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf | ||
| 87 | Hardware Spec: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-datasheet.pdf | ||
| 88 | Functional Spec: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-FunctionalSpec-datasheet.pdf | ||
| 89 | Core: Sheeva ARMv7 compatible PJ4B | ||
| 90 | |||
| 91 | Armada 375 Flavors: | ||
| 92 | 88F6720 | ||
| 93 | Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA_375_SoC-01_product_brief.pdf | ||
| 94 | Core: ARM Cortex-A9 | ||
| 95 | |||
| 96 | Armada 38x Flavors: | ||
| 97 | 88F6810 Armada 380 | ||
| 98 | 88F6820 Armada 385 | ||
| 99 | 88F6828 Armada 388 | ||
| 100 | Product infos: http://www.marvell.com/embedded-processors/armada-38x/ | ||
| 101 | Functional Spec: https://marvellcorp.wufoo.com/forms/marvell-armada-38x-functional-specifications/ | ||
| 102 | Core: ARM Cortex-A9 | ||
| 103 | |||
| 104 | Armada 39x Flavors: | ||
| 105 | 88F6920 Armada 390 | ||
| 106 | 88F6928 Armada 398 | ||
| 107 | Product infos: http://www.marvell.com/embedded-processors/armada-39x/ | ||
| 108 | Core: ARM Cortex-A9 | ||
| 109 | |||
| 110 | Armada XP Flavors: | ||
| 111 | MV78230 | ||
| 112 | MV78260 | ||
| 113 | MV78460 | ||
| 114 | NOTE: not to be confused with the non-SMP 78xx0 SoCs | ||
| 115 | Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf | ||
| 116 | Functional Spec: http://www.marvell.com/embedded-processors/armada-xp/assets/ARMADA-XP-Functional-SpecDatasheet.pdf | ||
| 117 | Hardware Specs: | ||
| 118 | http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78230_OS.PDF | ||
| 119 | http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78260_OS.PDF | ||
| 120 | http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78460_OS.PDF | ||
| 121 | Core: Sheeva ARMv7 compatible Dual-core or Quad-core PJ4B-MP | ||
| 122 | |||
| 123 | Linux kernel mach directory: arch/arm/mach-mvebu | ||
| 124 | Linux kernel plat directory: none | ||
| 125 | |||
| 126 | EBU Armada family ARMv8 | ||
| 127 | ----------------------- | ||
| 128 | |||
| 129 | Armada 3710/3720 Flavors: | ||
| 130 | 88F3710 | ||
| 131 | 88F3720 | ||
| 132 | Core: ARM Cortex A53 (ARMv8) | ||
| 133 | |||
| 134 | Homepage: http://www.marvell.com/embedded-processors/armada-3700/ | ||
| 135 | Product Brief: http://www.marvell.com/embedded-processors/assets/PB-88F3700-FNL.pdf | ||
| 136 | Device tree files: arch/arm64/boot/dts/marvell/armada-37* | ||
| 137 | |||
| 138 | Armada 7K Flavors: | ||
| 139 | 88F7020 (AP806 Dual + one CP110) | ||
| 140 | 88F7040 (AP806 Quad + one CP110) | ||
| 141 | Core: ARM Cortex A72 | ||
| 142 | |||
| 143 | Homepage: http://www.marvell.com/embedded-processors/armada-70xx/ | ||
| 144 | Product Brief: http://www.marvell.com/embedded-processors/assets/Armada7020PB-Jan2016.pdf | ||
| 145 | http://www.marvell.com/embedded-processors/assets/Armada7040PB-Jan2016.pdf | ||
| 146 | Device tree files: arch/arm64/boot/dts/marvell/armada-70* | ||
| 147 | |||
| 148 | Armada 8K Flavors: | ||
| 149 | 88F8020 (AP806 Dual + two CP110) | ||
| 150 | 88F8040 (AP806 Quad + two CP110) | ||
| 151 | Core: ARM Cortex A72 | ||
| 152 | |||
| 153 | Homepage: http://www.marvell.com/embedded-processors/armada-80xx/ | ||
| 154 | Product Brief: http://www.marvell.com/embedded-processors/assets/Armada8020PB-Jan2016.pdf | ||
| 155 | http://www.marvell.com/embedded-processors/assets/Armada8040PB-Jan2016.pdf | ||
| 156 | Device tree files: arch/arm64/boot/dts/marvell/armada-80* | ||
| 157 | |||
| 158 | Avanta family | ||
| 159 | ------------- | ||
| 160 | |||
| 161 | Flavors: | ||
| 162 | 88F6510 | ||
| 163 | 88F6530P | ||
| 164 | 88F6550 | ||
| 165 | 88F6560 | ||
| 166 | Homepage : http://www.marvell.com/broadband/ | ||
| 167 | Product Brief: http://www.marvell.com/broadband/assets/Marvell_Avanta_88F6510_305_060-001_product_brief.pdf | ||
| 168 | No public datasheet available. | ||
| 169 | |||
| 170 | Core: ARMv5 compatible | ||
| 171 | |||
| 172 | Linux kernel mach directory: no code in mainline yet, planned for the future | ||
| 173 | Linux kernel plat directory: no code in mainline yet, planned for the future | ||
| 174 | |||
| 175 | Storage family | ||
| 176 | -------------- | ||
| 177 | |||
| 178 | Armada SP: | ||
| 179 | 88RC1580 | ||
| 180 | Product infos: http://www.marvell.com/storage/armada-sp/ | ||
| 181 | Core: Sheeva ARMv7 comatible Quad-core PJ4C | ||
| 182 | (not supported in upstream Linux kernel) | ||
| 183 | |||
| 184 | Dove family (application processor) | ||
| 185 | ----------------------------------- | ||
| 186 | |||
| 187 | Flavors: | ||
| 188 | 88AP510 a.k.a Armada 510 | ||
| 189 | Product Brief : http://www.marvell.com/application-processors/armada-500/assets/Marvell_Armada510_SoC.pdf | ||
| 190 | Hardware Spec : http://www.marvell.com/application-processors/armada-500/assets/Armada-510-Hardware-Spec.pdf | ||
| 191 | Functional Spec : http://www.marvell.com/application-processors/armada-500/assets/Armada-510-Functional-Spec.pdf | ||
| 192 | Homepage: http://www.marvell.com/application-processors/armada-500/ | ||
| 193 | Core: ARMv7 compatible | ||
| 194 | |||
| 195 | Directory: arch/arm/mach-mvebu (DT enabled platforms) | ||
| 196 | arch/arm/mach-dove (non-DT enabled platforms) | ||
| 197 | |||
| 198 | PXA 2xx/3xx/93x/95x family | ||
| 199 | -------------------------- | ||
| 200 | |||
| 201 | Flavors: | ||
| 202 | PXA21x, PXA25x, PXA26x | ||
| 203 | Application processor only | ||
| 204 | Core: ARMv5 XScale1 core | ||
| 205 | PXA270, PXA271, PXA272 | ||
| 206 | Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_pb.pdf | ||
| 207 | Design guide : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_design_guide.pdf | ||
| 208 | Developers manual : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_dev_man.pdf | ||
| 209 | Specification : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_emts.pdf | ||
| 210 | Specification update : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_spec_update.pdf | ||
| 211 | Application processor only | ||
| 212 | Core: ARMv5 XScale2 core | ||
| 213 | PXA300, PXA310, PXA320 | ||
| 214 | PXA 300 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA300_PB_R4.pdf | ||
| 215 | PXA 310 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA310_PB_R4.pdf | ||
| 216 | PXA 320 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA320_PB_R4.pdf | ||
| 217 | Design guide : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Design_Guide.pdf | ||
| 218 | Developers manual : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Developers_Manual.zip | ||
| 219 | Specifications : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_EMTS.pdf | ||
| 220 | Specification Update : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Spec_Update.zip | ||
| 221 | Reference Manual : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_TavorP_BootROM_Ref_Manual.pdf | ||
| 222 | Application processor only | ||
| 223 | Core: ARMv5 XScale3 core | ||
| 224 | PXA930, PXA935 | ||
| 225 | Application processor with Communication processor | ||
| 226 | Core: ARMv5 XScale3 core | ||
| 227 | PXA955 | ||
| 228 | Application processor with Communication processor | ||
| 229 | Core: ARMv7 compatible Sheeva PJ4 core | ||
| 230 | |||
| 231 | Comments: | ||
| 232 | |||
| 233 | * This line of SoCs originates from the XScale family developed by | ||
| 234 | Intel and acquired by Marvell in ~2006. The PXA21x, PXA25x, | ||
| 235 | PXA26x, PXA27x, PXA3xx and PXA93x were developed by Intel, while | ||
| 236 | the later PXA95x were developed by Marvell. | ||
| 237 | |||
| 238 | * Due to their XScale origin, these SoCs have virtually nothing in | ||
| 239 | common with the other (Kirkwood, Dove, etc.) families of Marvell | ||
| 240 | SoCs, except with the MMP/MMP2 family of SoCs. | ||
| 241 | |||
| 242 | Linux kernel mach directory: arch/arm/mach-pxa | ||
| 243 | Linux kernel plat directory: arch/arm/plat-pxa | ||
| 244 | |||
| 245 | MMP/MMP2/MMP3 family (communication processor) | ||
| 246 | ----------------------------------------- | ||
| 247 | |||
| 248 | Flavors: | ||
| 249 | PXA168, a.k.a Armada 168 | ||
| 250 | Homepage : http://www.marvell.com/application-processors/armada-100/armada-168.jsp | ||
| 251 | Product brief : http://www.marvell.com/application-processors/armada-100/assets/pxa_168_pb.pdf | ||
| 252 | Hardware manual : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_datasheet.pdf | ||
| 253 | Software manual : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_software_manual.pdf | ||
| 254 | Specification update : http://www.marvell.com/application-processors/armada-100/assets/ARMADA16x_Spec_update.pdf | ||
| 255 | Boot ROM manual : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_ref_manual.pdf | ||
| 256 | App node package : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_app_note_package.pdf | ||
| 257 | Application processor only | ||
| 258 | Core: ARMv5 compatible Marvell PJ1 88sv331 (Mohawk) | ||
| 259 | PXA910/PXA920 | ||
| 260 | Homepage : http://www.marvell.com/communication-processors/pxa910/ | ||
| 261 | Product Brief : http://www.marvell.com/communication-processors/pxa910/assets/Marvell_PXA910_Platform-001_PB_final.pdf | ||
| 262 | Application processor with Communication processor | ||
| 263 | Core: ARMv5 compatible Marvell PJ1 88sv331 (Mohawk) | ||
| 264 | PXA688, a.k.a. MMP2, a.k.a Armada 610 | ||
| 265 | Product Brief : http://www.marvell.com/application-processors/armada-600/assets/armada610_pb.pdf | ||
| 266 | Application processor only | ||
| 267 | Core: ARMv7 compatible Sheeva PJ4 88sv581x core | ||
| 268 | PXA2128, a.k.a. MMP3 (OLPC XO4, Linux support not upstream) | ||
| 269 | Product Brief : http://www.marvell.com/application-processors/armada/pxa2128/assets/Marvell-ARMADA-PXA2128-SoC-PB.pdf | ||
| 270 | Application processor only | ||
| 271 | Core: Dual-core ARMv7 compatible Sheeva PJ4C core | ||
| 272 | PXA960/PXA968/PXA978 (Linux support not upstream) | ||
| 273 | Application processor with Communication Processor | ||
| 274 | Core: ARMv7 compatible Sheeva PJ4 core | ||
| 275 | PXA986/PXA988 (Linux support not upstream) | ||
| 276 | Application processor with Communication Processor | ||
| 277 | Core: Dual-core ARMv7 compatible Sheeva PJ4B-MP core | ||
| 278 | PXA1088/PXA1920 (Linux support not upstream) | ||
| 279 | Application processor with Communication Processor | ||
| 280 | Core: quad-core ARMv7 Cortex-A7 | ||
| 281 | PXA1908/PXA1928/PXA1936 | ||
| 282 | Application processor with Communication Processor | ||
| 283 | Core: multi-core ARMv8 Cortex-A53 | ||
| 284 | |||
| 285 | Comments: | ||
| 286 | |||
| 287 | * This line of SoCs originates from the XScale family developed by | ||
| 288 | Intel and acquired by Marvell in ~2006. All the processors of | ||
| 289 | this MMP/MMP2 family were developed by Marvell. | ||
| 290 | |||
| 291 | * Due to their XScale origin, these SoCs have virtually nothing in | ||
| 292 | common with the other (Kirkwood, Dove, etc.) families of Marvell | ||
| 293 | SoCs, except with the PXA family of SoCs listed above. | ||
| 294 | |||
| 295 | Linux kernel mach directory: arch/arm/mach-mmp | ||
| 296 | Linux kernel plat directory: arch/arm/plat-pxa | ||
| 297 | |||
| 298 | Berlin family (Multimedia Solutions) | ||
| 299 | ------------------------------------- | ||
| 300 | |||
| 301 | Flavors: | ||
| 302 | 88DE3010, Armada 1000 (no Linux support) | ||
| 303 | Core: Marvell PJ1 (ARMv5TE), Dual-core | ||
| 304 | Product Brief: http://www.marvell.com.cn/digital-entertainment/assets/armada_1000_pb.pdf | ||
| 305 | 88DE3005, Armada 1500 Mini | ||
| 306 | Design name: BG2CD | ||
| 307 | Core: ARM Cortex-A9, PL310 L2CC | ||
| 308 | 88DE3006, Armada 1500 Mini Plus | ||
| 309 | Design name: BG2CDP | ||
| 310 | Core: Dual Core ARM Cortex-A7 | ||
| 311 | 88DE3100, Armada 1500 | ||
| 312 | Design name: BG2 | ||
| 313 | Core: Marvell PJ4B-MP (ARMv7), Tauros3 L2CC | ||
| 314 | 88DE3114, Armada 1500 Pro | ||
| 315 | Design name: BG2Q | ||
| 316 | Core: Quad Core ARM Cortex-A9, PL310 L2CC | ||
| 317 | 88DE3214, Armada 1500 Pro 4K | ||
| 318 | Design name: BG3 | ||
| 319 | Core: ARM Cortex-A15, CA15 integrated L2CC | ||
| 320 | 88DE3218, ARMADA 1500 Ultra | ||
| 321 | Core: ARM Cortex-A53 | ||
| 322 | |||
| 323 | Homepage: https://www.synaptics.com/products/multimedia-solutions | ||
| 324 | Directory: arch/arm/mach-berlin | ||
| 325 | |||
| 326 | Comments: | ||
| 327 | |||
| 328 | * This line of SoCs is based on Marvell Sheeva or ARM Cortex CPUs | ||
| 329 | with Synopsys DesignWare (IRQ, GPIO, Timers, ...) and PXA IP (SDHCI, USB, ETH, ...). | ||
| 330 | |||
| 331 | * The Berlin family was acquired by Synaptics from Marvell in 2017. | ||
| 332 | |||
| 333 | CPU Cores | ||
| 334 | --------- | ||
| 335 | |||
| 336 | The XScale cores were designed by Intel, and shipped by Marvell in the older | ||
| 337 | PXA processors. Feroceon is a Marvell designed core that developed in-house, | ||
| 338 | and that evolved into Sheeva. The XScale and Feroceon cores were phased out | ||
| 339 | over time and replaced with Sheeva cores in later products, which subsequently | ||
| 340 | got replaced with licensed ARM Cortex-A cores. | ||
| 341 | |||
| 342 | XScale 1 | ||
| 343 | CPUID 0x69052xxx | ||
| 344 | ARMv5, iWMMXt | ||
| 345 | XScale 2 | ||
| 346 | CPUID 0x69054xxx | ||
| 347 | ARMv5, iWMMXt | ||
| 348 | XScale 3 | ||
| 349 | CPUID 0x69056xxx or 0x69056xxx | ||
| 350 | ARMv5, iWMMXt | ||
| 351 | Feroceon-1850 88fr331 "Mohawk" | ||
| 352 | CPUID 0x5615331x or 0x41xx926x | ||
| 353 | ARMv5TE, single issue | ||
| 354 | Feroceon-2850 88fr531-vd "Jolteon" | ||
| 355 | CPUID 0x5605531x or 0x41xx926x | ||
| 356 | ARMv5TE, VFP, dual-issue | ||
| 357 | Feroceon 88fr571-vd "Jolteon" | ||
| 358 | CPUID 0x5615571x | ||
| 359 | ARMv5TE, VFP, dual-issue | ||
| 360 | Feroceon 88fr131 "Mohawk-D" | ||
| 361 | CPUID 0x5625131x | ||
| 362 | ARMv5TE, single-issue in-order | ||
| 363 | Sheeva PJ1 88sv331 "Mohawk" | ||
| 364 | CPUID 0x561584xx | ||
| 365 | ARMv5, single-issue iWMMXt v2 | ||
| 366 | Sheeva PJ4 88sv581x "Flareon" | ||
| 367 | CPUID 0x560f581x | ||
| 368 | ARMv7, idivt, optional iWMMXt v2 | ||
| 369 | Sheeva PJ4B 88sv581x | ||
| 370 | CPUID 0x561f581x | ||
| 371 | ARMv7, idivt, optional iWMMXt v2 | ||
| 372 | Sheeva PJ4B-MP / PJ4C | ||
| 373 | CPUID 0x562f584x | ||
| 374 | ARMv7, idivt/idiva, LPAE, optional iWMMXt v2 and/or NEON | ||
| 375 | |||
| 376 | Long-term plans | ||
| 377 | --------------- | ||
| 378 | |||
| 379 | * Unify the mach-dove/, mach-mv78xx0/, mach-orion5x/ into the | ||
| 380 | mach-mvebu/ to support all SoCs from the Marvell EBU (Engineering | ||
| 381 | Business Unit) in a single mach-<foo> directory. The plat-orion/ | ||
| 382 | would therefore disappear. | ||
| 383 | |||
| 384 | * Unify the mach-mmp/ and mach-pxa/ into the same mach-pxa | ||
| 385 | directory. The plat-pxa/ would therefore disappear. | ||
| 386 | |||
| 387 | Credits | ||
| 388 | ------- | ||
| 389 | |||
| 390 | Maen Suleiman <maen@marvell.com> | ||
| 391 | Lior Amsalem <alior@marvell.com> | ||
| 392 | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
| 393 | Andrew Lunn <andrew@lunn.ch> | ||
| 394 | Nicolas Pitre <nico@fluxnic.net> | ||
| 395 | Eric Miao <eric.y.miao@gmail.com> | ||
diff --git a/Documentation/arm/Netwinder b/Documentation/arm/Netwinder deleted file mode 100644 index f1b457fbd3de..000000000000 --- a/Documentation/arm/Netwinder +++ /dev/null | |||
| @@ -1,78 +0,0 @@ | |||
| 1 | NetWinder specific documentation | ||
| 2 | ================================ | ||
| 3 | |||
| 4 | The NetWinder is a small low-power computer, primarily designed | ||
| 5 | to run Linux. It is based around the StrongARM RISC processor, | ||
| 6 | DC21285 PCI bridge, with PC-type hardware glued around it. | ||
| 7 | |||
| 8 | Port usage | ||
| 9 | ========== | ||
| 10 | |||
| 11 | Min - Max Description | ||
| 12 | --------------------------- | ||
| 13 | 0x0000 - 0x000f DMA1 | ||
| 14 | 0x0020 - 0x0021 PIC1 | ||
| 15 | 0x0060 - 0x006f Keyboard | ||
| 16 | 0x0070 - 0x007f RTC | ||
| 17 | 0x0080 - 0x0087 DMA1 | ||
| 18 | 0x0088 - 0x008f DMA2 | ||
| 19 | 0x00a0 - 0x00a3 PIC2 | ||
| 20 | 0x00c0 - 0x00df DMA2 | ||
| 21 | 0x0180 - 0x0187 IRDA | ||
| 22 | 0x01f0 - 0x01f6 ide0 | ||
| 23 | 0x0201 Game port | ||
| 24 | 0x0203 RWA010 configuration read | ||
| 25 | 0x0220 - ? SoundBlaster | ||
| 26 | 0x0250 - ? WaveArtist | ||
| 27 | 0x0279 RWA010 configuration index | ||
| 28 | 0x02f8 - 0x02ff Serial ttyS1 | ||
| 29 | 0x0300 - 0x031f Ether10 | ||
| 30 | 0x0338 GPIO1 | ||
| 31 | 0x033a GPIO2 | ||
| 32 | 0x0370 - 0x0371 W83977F configuration registers | ||
| 33 | 0x0388 - ? AdLib | ||
| 34 | 0x03c0 - 0x03df VGA | ||
| 35 | 0x03f6 ide0 | ||
| 36 | 0x03f8 - 0x03ff Serial ttyS0 | ||
| 37 | 0x0400 - 0x0408 DC21143 | ||
| 38 | 0x0480 - 0x0487 DMA1 | ||
| 39 | 0x0488 - 0x048f DMA2 | ||
| 40 | 0x0a79 RWA010 configuration write | ||
| 41 | 0xe800 - 0xe80f ide0/ide1 BM DMA | ||
| 42 | |||
| 43 | |||
| 44 | Interrupt usage | ||
| 45 | =============== | ||
| 46 | |||
| 47 | IRQ type Description | ||
| 48 | --------------------------- | ||
| 49 | 0 ISA 100Hz timer | ||
| 50 | 1 ISA Keyboard | ||
| 51 | 2 ISA cascade | ||
| 52 | 3 ISA Serial ttyS1 | ||
| 53 | 4 ISA Serial ttyS0 | ||
| 54 | 5 ISA PS/2 mouse | ||
| 55 | 6 ISA IRDA | ||
| 56 | 7 ISA Printer | ||
| 57 | 8 ISA RTC alarm | ||
| 58 | 9 ISA | ||
| 59 | 10 ISA GP10 (Orange reset button) | ||
| 60 | 11 ISA | ||
| 61 | 12 ISA WaveArtist | ||
| 62 | 13 ISA | ||
| 63 | 14 ISA hda1 | ||
| 64 | 15 ISA | ||
| 65 | |||
| 66 | DMA usage | ||
| 67 | ========= | ||
| 68 | |||
| 69 | DMA type Description | ||
| 70 | --------------------------- | ||
| 71 | 0 ISA IRDA | ||
| 72 | 1 ISA | ||
| 73 | 2 ISA cascade | ||
| 74 | 3 ISA WaveArtist | ||
| 75 | 4 ISA | ||
| 76 | 5 ISA | ||
| 77 | 6 ISA | ||
| 78 | 7 ISA WaveArtist | ||
diff --git a/Documentation/arm/SA1100/FreeBird b/Documentation/arm/SA1100/FreeBird deleted file mode 100644 index ab9193663b2b..000000000000 --- a/Documentation/arm/SA1100/FreeBird +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | Freebird-1.1 is produced by Legend(C), Inc. | ||
| 2 | http://web.archive.org/web/*/http://www.legend.com.cn | ||
| 3 | and software/linux maintained by Coventive(C), Inc. | ||
| 4 | (http://www.coventive.com) | ||
| 5 | |||
| 6 | Based on the Nicolas's strongarm kernel tree. | ||
| 7 | |||
| 8 | =============================================================== | ||
| 9 | Maintainer: | ||
| 10 | |||
| 11 | Chester Kuo <chester@coventive.com> | ||
| 12 | <chester@linux.org.tw> | ||
| 13 | |||
| 14 | Author : | ||
| 15 | Tim wu <timwu@coventive.com> | ||
| 16 | CIH <cih@coventive.com> | ||
| 17 | Eric Peng <ericpeng@coventive.com> | ||
| 18 | Jeff Lee <jeff_lee@coventive.com> | ||
| 19 | Allen Cheng | ||
| 20 | Tony Liu <tonyliu@coventive.com> | ||
| 21 | |||
diff --git a/Documentation/arm/SA1100/empeg b/Documentation/arm/SA1100/empeg deleted file mode 100644 index 4ece4849a42c..000000000000 --- a/Documentation/arm/SA1100/empeg +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | See ../empeg/README | ||
| 2 | |||
diff --git a/Documentation/arm/SA1100/serial_UART b/Documentation/arm/SA1100/serial_UART deleted file mode 100644 index a63966f1d083..000000000000 --- a/Documentation/arm/SA1100/serial_UART +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | The SA1100 serial port had its major/minor numbers officially assigned: | ||
| 2 | |||
| 3 | > Date: Sun, 24 Sep 2000 21:40:27 -0700 | ||
| 4 | > From: H. Peter Anvin <hpa@transmeta.com> | ||
| 5 | > To: Nicolas Pitre <nico@CAM.ORG> | ||
| 6 | > Cc: Device List Maintainer <device@lanana.org> | ||
| 7 | > Subject: Re: device | ||
| 8 | > | ||
| 9 | > Okay. Note that device numbers 204 and 205 are used for "low density | ||
| 10 | > serial devices", so you will have a range of minors on those majors (the | ||
| 11 | > tty device layer handles this just fine, so you don't have to worry about | ||
| 12 | > doing anything special.) | ||
| 13 | > | ||
| 14 | > So your assignments are: | ||
| 15 | > | ||
| 16 | > 204 char Low-density serial ports | ||
| 17 | > 5 = /dev/ttySA0 SA1100 builtin serial port 0 | ||
| 18 | > 6 = /dev/ttySA1 SA1100 builtin serial port 1 | ||
| 19 | > 7 = /dev/ttySA2 SA1100 builtin serial port 2 | ||
| 20 | > | ||
| 21 | > 205 char Low-density serial ports (alternate device) | ||
| 22 | > 5 = /dev/cusa0 Callout device for ttySA0 | ||
| 23 | > 6 = /dev/cusa1 Callout device for ttySA1 | ||
| 24 | > 7 = /dev/cusa2 Callout device for ttySA2 | ||
| 25 | > | ||
| 26 | |||
| 27 | You must create those inodes in /dev on the root filesystem used | ||
| 28 | by your SA1100-based device: | ||
| 29 | |||
| 30 | mknod ttySA0 c 204 5 | ||
| 31 | mknod ttySA1 c 204 6 | ||
| 32 | mknod ttySA2 c 204 7 | ||
| 33 | mknod cusa0 c 205 5 | ||
| 34 | mknod cusa1 c 205 6 | ||
| 35 | mknod cusa2 c 205 7 | ||
| 36 | |||
| 37 | In addition to the creation of the appropriate device nodes above, you | ||
| 38 | must ensure your user space applications make use of the correct device | ||
| 39 | name. The classic example is the content of the /etc/inittab file where | ||
| 40 | you might have a getty process started on ttyS0. In this case: | ||
| 41 | |||
| 42 | - replace occurrences of ttyS0 with ttySA0, ttyS1 with ttySA1, etc. | ||
| 43 | |||
| 44 | - don't forget to add 'ttySA0', 'console', or the appropriate tty name | ||
| 45 | in /etc/securetty for root to be allowed to login as well. | ||
| 46 | |||
| 47 | |||
diff --git a/Documentation/arm/README b/Documentation/arm/arm.rst index 9d1e5b2c92e6..2edc509df92a 100644 --- a/Documentation/arm/README +++ b/Documentation/arm/arm.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ARM Linux 2.6 | 1 | ======================= |
| 2 | ============= | 2 | ARM Linux 2.6 and upper |
| 3 | ======================= | ||
| 3 | 4 | ||
| 4 | Please check <ftp://ftp.arm.linux.org.uk/pub/armlinux> for | 5 | Please check <ftp://ftp.arm.linux.org.uk/pub/armlinux> for |
| 5 | updates. | 6 | updates. |
| @@ -18,22 +19,28 @@ Compilation of kernel | |||
| 18 | line as detailed below. | 19 | line as detailed below. |
| 19 | 20 | ||
| 20 | If you wish to cross-compile, then alter the following lines in the top | 21 | If you wish to cross-compile, then alter the following lines in the top |
| 21 | level make file: | 22 | level make file:: |
| 22 | 23 | ||
| 23 | ARCH = <whatever> | 24 | ARCH = <whatever> |
| 24 | with | 25 | |
| 26 | with:: | ||
| 27 | |||
| 25 | ARCH = arm | 28 | ARCH = arm |
| 26 | 29 | ||
| 27 | and | 30 | and:: |
| 28 | 31 | ||
| 29 | CROSS_COMPILE= | 32 | CROSS_COMPILE= |
| 30 | to | 33 | |
| 34 | to:: | ||
| 35 | |||
| 31 | CROSS_COMPILE=<your-path-to-your-compiler-without-gcc> | 36 | CROSS_COMPILE=<your-path-to-your-compiler-without-gcc> |
| 32 | eg. | 37 | |
| 38 | eg.:: | ||
| 39 | |||
| 33 | CROSS_COMPILE=arm-linux- | 40 | CROSS_COMPILE=arm-linux- |
| 34 | 41 | ||
| 35 | Do a 'make config', followed by 'make Image' to build the kernel | 42 | Do a 'make config', followed by 'make Image' to build the kernel |
| 36 | (arch/arm/boot/Image). A compressed image can be built by doing a | 43 | (arch/arm/boot/Image). A compressed image can be built by doing a |
| 37 | 'make zImage' instead of 'make Image'. | 44 | 'make zImage' instead of 'make Image'. |
| 38 | 45 | ||
| 39 | 46 | ||
| @@ -46,7 +53,7 @@ Bug reports etc | |||
| 46 | 53 | ||
| 47 | Bug reports should be sent to linux-arm-kernel@lists.arm.linux.org.uk, | 54 | Bug reports should be sent to linux-arm-kernel@lists.arm.linux.org.uk, |
| 48 | or submitted through the web form at | 55 | or submitted through the web form at |
| 49 | http://www.arm.linux.org.uk/developer/ | 56 | http://www.arm.linux.org.uk/developer/ |
| 50 | 57 | ||
| 51 | When sending bug reports, please ensure that they contain all relevant | 58 | When sending bug reports, please ensure that they contain all relevant |
| 52 | information, eg. the kernel messages that were printed before/during | 59 | information, eg. the kernel messages that were printed before/during |
| @@ -60,11 +67,13 @@ Include files | |||
| 60 | which are there to reduce the clutter in the top-level directory. These | 67 | which are there to reduce the clutter in the top-level directory. These |
| 61 | directories, and their purpose is listed below: | 68 | directories, and their purpose is listed below: |
| 62 | 69 | ||
| 63 | arch-* machine/platform specific header files | 70 | ============= ========================================================== |
| 64 | hardware driver-internal ARM specific data structures/definitions | 71 | `arch-*` machine/platform specific header files |
| 65 | mach descriptions of generic ARM to specific machine interfaces | 72 | `hardware` driver-internal ARM specific data structures/definitions |
| 66 | proc-* processor dependent header files (currently only two | 73 | `mach` descriptions of generic ARM to specific machine interfaces |
| 74 | `proc-*` processor dependent header files (currently only two | ||
| 67 | categories) | 75 | categories) |
| 76 | ============= ========================================================== | ||
| 68 | 77 | ||
| 69 | 78 | ||
| 70 | Machine/Platform support | 79 | Machine/Platform support |
| @@ -129,7 +138,7 @@ ST506 hard drives | |||
| 129 | HDC base to the source. | 138 | HDC base to the source. |
| 130 | 139 | ||
| 131 | As of 31/3/96 it works with two drives (you should get the ADFS | 140 | As of 31/3/96 it works with two drives (you should get the ADFS |
| 132 | *configure harddrive set to 2). I've got an internal 20MB and a great | 141 | `*configure` harddrive set to 2). I've got an internal 20MB and a great |
| 133 | big external 5.25" FH 64MB drive (who could ever want more :-) ). | 142 | big external 5.25" FH 64MB drive (who could ever want more :-) ). |
| 134 | 143 | ||
| 135 | I've just got 240K/s off it (a dd with bs=128k); thats about half of what | 144 | I've just got 240K/s off it (a dd with bs=128k); thats about half of what |
| @@ -149,13 +158,13 @@ ST506 hard drives | |||
| 149 | are welcome. | 158 | are welcome. |
| 150 | 159 | ||
| 151 | 160 | ||
| 152 | CONFIG_MACH_ and CONFIG_ARCH_ | 161 | `CONFIG_MACH_` and `CONFIG_ARCH_` |
| 153 | ----------------------------- | 162 | --------------------------------- |
| 154 | A change was made in 2003 to the macro names for new machines. | 163 | A change was made in 2003 to the macro names for new machines. |
| 155 | Historically, CONFIG_ARCH_ was used for the bonafide architecture, | 164 | Historically, `CONFIG_ARCH_` was used for the bonafide architecture, |
| 156 | e.g. SA1100, as well as implementations of the architecture, | 165 | e.g. SA1100, as well as implementations of the architecture, |
| 157 | e.g. Assabet. It was decided to change the implementation macros | 166 | e.g. Assabet. It was decided to change the implementation macros |
| 158 | to read CONFIG_MACH_ for clarity. Moreover, a retroactive fixup has | 167 | to read `CONFIG_MACH_` for clarity. Moreover, a retroactive fixup has |
| 159 | not been made because it would complicate patching. | 168 | not been made because it would complicate patching. |
| 160 | 169 | ||
| 161 | Previous registrations may be found online. | 170 | Previous registrations may be found online. |
| @@ -163,7 +172,7 @@ CONFIG_MACH_ and CONFIG_ARCH_ | |||
| 163 | <http://www.arm.linux.org.uk/developer/machines/> | 172 | <http://www.arm.linux.org.uk/developer/machines/> |
| 164 | 173 | ||
| 165 | Kernel entry (head.S) | 174 | Kernel entry (head.S) |
| 166 | -------------------------- | 175 | --------------------- |
| 167 | The initial entry into the kernel is via head.S, which uses machine | 176 | The initial entry into the kernel is via head.S, which uses machine |
| 168 | independent code. The machine is selected by the value of 'r1' on | 177 | independent code. The machine is selected by the value of 'r1' on |
| 169 | entry, which must be kept unique. | 178 | entry, which must be kept unique. |
| @@ -201,4 +210,5 @@ Kernel entry (head.S) | |||
| 201 | platform is DT-only, you do not need a registered machine type. | 210 | platform is DT-only, you do not need a registered machine type. |
| 202 | 211 | ||
| 203 | --- | 212 | --- |
| 213 | |||
| 204 | Russell King (15/03/2004) | 214 | Russell King (15/03/2004) |
diff --git a/Documentation/arm/Booting b/Documentation/arm/booting.rst index f1f965ce93d6..4babb6c6ae1e 100644 --- a/Documentation/arm/Booting +++ b/Documentation/arm/booting.rst | |||
| @@ -1,7 +1,9 @@ | |||
| 1 | Booting ARM Linux | 1 | ================= |
| 2 | ================= | 2 | Booting ARM Linux |
| 3 | ================= | ||
| 3 | 4 | ||
| 4 | Author: Russell King | 5 | Author: Russell King |
| 6 | |||
| 5 | Date : 18 May 2002 | 7 | Date : 18 May 2002 |
| 6 | 8 | ||
| 7 | The following documentation is relevant to 2.4.18-rmk6 and beyond. | 9 | The following documentation is relevant to 2.4.18-rmk6 and beyond. |
| @@ -25,8 +27,10 @@ following: | |||
| 25 | 1. Setup and initialise RAM | 27 | 1. Setup and initialise RAM |
| 26 | --------------------------- | 28 | --------------------------- |
| 27 | 29 | ||
| 28 | Existing boot loaders: MANDATORY | 30 | Existing boot loaders: |
| 29 | New boot loaders: MANDATORY | 31 | MANDATORY |
| 32 | New boot loaders: | ||
| 33 | MANDATORY | ||
| 30 | 34 | ||
| 31 | The boot loader is expected to find and initialise all RAM that the | 35 | The boot loader is expected to find and initialise all RAM that the |
| 32 | kernel will use for volatile data storage in the system. It performs | 36 | kernel will use for volatile data storage in the system. It performs |
| @@ -39,8 +43,10 @@ sees fit.) | |||
| 39 | 2. Initialise one serial port | 43 | 2. Initialise one serial port |
| 40 | ----------------------------- | 44 | ----------------------------- |
| 41 | 45 | ||
| 42 | Existing boot loaders: OPTIONAL, RECOMMENDED | 46 | Existing boot loaders: |
| 43 | New boot loaders: OPTIONAL, RECOMMENDED | 47 | OPTIONAL, RECOMMENDED |
| 48 | New boot loaders: | ||
| 49 | OPTIONAL, RECOMMENDED | ||
| 44 | 50 | ||
| 45 | The boot loader should initialise and enable one serial port on the | 51 | The boot loader should initialise and enable one serial port on the |
| 46 | target. This allows the kernel serial driver to automatically detect | 52 | target. This allows the kernel serial driver to automatically detect |
| @@ -57,8 +63,10 @@ serial format options as described in | |||
| 57 | 3. Detect the machine type | 63 | 3. Detect the machine type |
| 58 | -------------------------- | 64 | -------------------------- |
| 59 | 65 | ||
| 60 | Existing boot loaders: OPTIONAL | 66 | Existing boot loaders: |
| 61 | New boot loaders: MANDATORY except for DT-only platforms | 67 | OPTIONAL |
| 68 | New boot loaders: | ||
| 69 | MANDATORY except for DT-only platforms | ||
| 62 | 70 | ||
| 63 | The boot loader should detect the machine type its running on by some | 71 | The boot loader should detect the machine type its running on by some |
| 64 | method. Whether this is a hard coded value or some algorithm that | 72 | method. Whether this is a hard coded value or some algorithm that |
| @@ -74,8 +82,10 @@ necessary, but assures that it will not match any existing types. | |||
| 74 | 4. Setup boot data | 82 | 4. Setup boot data |
| 75 | ------------------ | 83 | ------------------ |
| 76 | 84 | ||
| 77 | Existing boot loaders: OPTIONAL, HIGHLY RECOMMENDED | 85 | Existing boot loaders: |
| 78 | New boot loaders: MANDATORY | 86 | OPTIONAL, HIGHLY RECOMMENDED |
| 87 | New boot loaders: | ||
| 88 | MANDATORY | ||
| 79 | 89 | ||
| 80 | The boot loader must provide either a tagged list or a dtb image for | 90 | The boot loader must provide either a tagged list or a dtb image for |
| 81 | passing configuration data to the kernel. The physical address of the | 91 | passing configuration data to the kernel. The physical address of the |
| @@ -97,15 +107,15 @@ entirety; some tags behave as the former, others the latter. | |||
| 97 | 107 | ||
| 98 | The boot loader must pass at a minimum the size and location of | 108 | The boot loader must pass at a minimum the size and location of |
| 99 | the system memory, and root filesystem location. Therefore, the | 109 | the system memory, and root filesystem location. Therefore, the |
| 100 | minimum tagged list should look: | 110 | minimum tagged list should look:: |
| 101 | 111 | ||
| 102 | +-----------+ | 112 | +-----------+ |
| 103 | base -> | ATAG_CORE | | | 113 | base -> | ATAG_CORE | | |
| 104 | +-----------+ | | 114 | +-----------+ | |
| 105 | | ATAG_MEM | | increasing address | 115 | | ATAG_MEM | | increasing address |
| 106 | +-----------+ | | 116 | +-----------+ | |
| 107 | | ATAG_NONE | | | 117 | | ATAG_NONE | | |
| 108 | +-----------+ v | 118 | +-----------+ v |
| 109 | 119 | ||
| 110 | The tagged list should be stored in system RAM. | 120 | The tagged list should be stored in system RAM. |
| 111 | 121 | ||
| @@ -134,8 +144,10 @@ A safe location is just above the 128MiB boundary from start of RAM. | |||
| 134 | 5. Load initramfs. | 144 | 5. Load initramfs. |
| 135 | ------------------ | 145 | ------------------ |
| 136 | 146 | ||
| 137 | Existing boot loaders: OPTIONAL | 147 | Existing boot loaders: |
| 138 | New boot loaders: OPTIONAL | 148 | OPTIONAL |
| 149 | New boot loaders: | ||
| 150 | OPTIONAL | ||
| 139 | 151 | ||
| 140 | If an initramfs is in use then, as with the dtb, it must be placed in | 152 | If an initramfs is in use then, as with the dtb, it must be placed in |
| 141 | a region of memory where the kernel decompressor will not overwrite it | 153 | a region of memory where the kernel decompressor will not overwrite it |
| @@ -149,8 +161,10 @@ recommended above. | |||
| 149 | 6. Calling the kernel image | 161 | 6. Calling the kernel image |
| 150 | --------------------------- | 162 | --------------------------- |
| 151 | 163 | ||
| 152 | Existing boot loaders: MANDATORY | 164 | Existing boot loaders: |
| 153 | New boot loaders: MANDATORY | 165 | MANDATORY |
| 166 | New boot loaders: | ||
| 167 | MANDATORY | ||
| 154 | 168 | ||
| 155 | There are two options for calling the kernel zImage. If the zImage | 169 | There are two options for calling the kernel zImage. If the zImage |
| 156 | is stored in flash, and is linked correctly to be run from flash, | 170 | is stored in flash, and is linked correctly to be run from flash, |
| @@ -174,12 +188,14 @@ In any case, the following conditions must be met: | |||
| 174 | you many hours of debug. | 188 | you many hours of debug. |
| 175 | 189 | ||
| 176 | - CPU register settings | 190 | - CPU register settings |
| 177 | r0 = 0, | 191 | |
| 178 | r1 = machine type number discovered in (3) above. | 192 | - r0 = 0, |
| 179 | r2 = physical address of tagged list in system RAM, or | 193 | - r1 = machine type number discovered in (3) above. |
| 180 | physical address of device tree block (dtb) in system RAM | 194 | - r2 = physical address of tagged list in system RAM, or |
| 195 | physical address of device tree block (dtb) in system RAM | ||
| 181 | 196 | ||
| 182 | - CPU mode | 197 | - CPU mode |
| 198 | |||
| 183 | All forms of interrupts must be disabled (IRQs and FIQs) | 199 | All forms of interrupts must be disabled (IRQs and FIQs) |
| 184 | 200 | ||
| 185 | For CPUs which do not include the ARM virtualization extensions, the | 201 | For CPUs which do not include the ARM virtualization extensions, the |
| @@ -195,8 +211,11 @@ In any case, the following conditions must be met: | |||
| 195 | entered in SVC mode. | 211 | entered in SVC mode. |
| 196 | 212 | ||
| 197 | - Caches, MMUs | 213 | - Caches, MMUs |
| 214 | |||
| 198 | The MMU must be off. | 215 | The MMU must be off. |
| 216 | |||
| 199 | Instruction cache may be on or off. | 217 | Instruction cache may be on or off. |
| 218 | |||
| 200 | Data cache must be off. | 219 | Data cache must be off. |
| 201 | 220 | ||
| 202 | If the kernel is entered in HYP mode, the above requirements apply to | 221 | If the kernel is entered in HYP mode, the above requirements apply to |
diff --git a/Documentation/arm/cluster-pm-race-avoidance.txt b/Documentation/arm/cluster-pm-race-avoidance.rst index 750b6fc24af9..aa58603d3f28 100644 --- a/Documentation/arm/cluster-pm-race-avoidance.txt +++ b/Documentation/arm/cluster-pm-race-avoidance.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ========================================================= | ||
| 1 | Cluster-wide Power-up/power-down race avoidance algorithm | 2 | Cluster-wide Power-up/power-down race avoidance algorithm |
| 2 | ========================================================= | 3 | ========================================================= |
| 3 | 4 | ||
| @@ -46,10 +47,12 @@ Basic model | |||
| 46 | 47 | ||
| 47 | Each cluster and CPU is assigned a state, as follows: | 48 | Each cluster and CPU is assigned a state, as follows: |
| 48 | 49 | ||
| 49 | DOWN | 50 | - DOWN |
| 50 | COMING_UP | 51 | - COMING_UP |
| 51 | UP | 52 | - UP |
| 52 | GOING_DOWN | 53 | - GOING_DOWN |
| 54 | |||
| 55 | :: | ||
| 53 | 56 | ||
| 54 | +---------> UP ----------+ | 57 | +---------> UP ----------+ |
| 55 | | v | 58 | | v |
| @@ -60,18 +63,22 @@ Each cluster and CPU is assigned a state, as follows: | |||
| 60 | +--------- DOWN <--------+ | 63 | +--------- DOWN <--------+ |
| 61 | 64 | ||
| 62 | 65 | ||
| 63 | DOWN: The CPU or cluster is not coherent, and is either powered off or | 66 | DOWN: |
| 67 | The CPU or cluster is not coherent, and is either powered off or | ||
| 64 | suspended, or is ready to be powered off or suspended. | 68 | suspended, or is ready to be powered off or suspended. |
| 65 | 69 | ||
| 66 | COMING_UP: The CPU or cluster has committed to moving to the UP state. | 70 | COMING_UP: |
| 71 | The CPU or cluster has committed to moving to the UP state. | ||
| 67 | It may be part way through the process of initialisation and | 72 | It may be part way through the process of initialisation and |
| 68 | enabling coherency. | 73 | enabling coherency. |
| 69 | 74 | ||
| 70 | UP: The CPU or cluster is active and coherent at the hardware | 75 | UP: |
| 76 | The CPU or cluster is active and coherent at the hardware | ||
| 71 | level. A CPU in this state is not necessarily being used | 77 | level. A CPU in this state is not necessarily being used |
| 72 | actively by the kernel. | 78 | actively by the kernel. |
| 73 | 79 | ||
| 74 | GOING_DOWN: The CPU or cluster has committed to moving to the DOWN | 80 | GOING_DOWN: |
| 81 | The CPU or cluster has committed to moving to the DOWN | ||
| 75 | state. It may be part way through the process of teardown and | 82 | state. It may be part way through the process of teardown and |
| 76 | coherency exit. | 83 | coherency exit. |
| 77 | 84 | ||
| @@ -86,8 +93,8 @@ CPUs in the cluster simultaneously modifying the state. The cluster- | |||
| 86 | level states are described in the "Cluster state" section. | 93 | level states are described in the "Cluster state" section. |
| 87 | 94 | ||
| 88 | To help distinguish the CPU states from cluster states in this | 95 | To help distinguish the CPU states from cluster states in this |
| 89 | discussion, the state names are given a CPU_ prefix for the CPU states, | 96 | discussion, the state names are given a `CPU_` prefix for the CPU states, |
| 90 | and a CLUSTER_ or INBOUND_ prefix for the cluster states. | 97 | and a `CLUSTER_` or `INBOUND_` prefix for the cluster states. |
| 91 | 98 | ||
| 92 | 99 | ||
| 93 | CPU state | 100 | CPU state |
| @@ -101,10 +108,12 @@ This means that CPUs fit the basic model closely. | |||
| 101 | 108 | ||
| 102 | The algorithm defines the following states for each CPU in the system: | 109 | The algorithm defines the following states for each CPU in the system: |
| 103 | 110 | ||
| 104 | CPU_DOWN | 111 | - CPU_DOWN |
| 105 | CPU_COMING_UP | 112 | - CPU_COMING_UP |
| 106 | CPU_UP | 113 | - CPU_UP |
| 107 | CPU_GOING_DOWN | 114 | - CPU_GOING_DOWN |
| 115 | |||
| 116 | :: | ||
| 108 | 117 | ||
| 109 | cluster setup and | 118 | cluster setup and |
| 110 | CPU setup complete policy decision | 119 | CPU setup complete policy decision |
| @@ -130,17 +139,17 @@ requirement for any external event to happen. | |||
| 130 | 139 | ||
| 131 | 140 | ||
| 132 | CPU_DOWN: | 141 | CPU_DOWN: |
| 133 | |||
| 134 | A CPU reaches the CPU_DOWN state when it is ready for | 142 | A CPU reaches the CPU_DOWN state when it is ready for |
| 135 | power-down. On reaching this state, the CPU will typically | 143 | power-down. On reaching this state, the CPU will typically |
| 136 | power itself down or suspend itself, via a WFI instruction or a | 144 | power itself down or suspend itself, via a WFI instruction or a |
| 137 | firmware call. | 145 | firmware call. |
| 138 | 146 | ||
| 139 | Next state: CPU_COMING_UP | 147 | Next state: |
| 140 | Conditions: none | 148 | CPU_COMING_UP |
| 149 | Conditions: | ||
| 150 | none | ||
| 141 | 151 | ||
| 142 | Trigger events: | 152 | Trigger events: |
| 143 | |||
| 144 | a) an explicit hardware power-up operation, resulting | 153 | a) an explicit hardware power-up operation, resulting |
| 145 | from a policy decision on another CPU; | 154 | from a policy decision on another CPU; |
| 146 | 155 | ||
| @@ -148,15 +157,17 @@ CPU_DOWN: | |||
| 148 | 157 | ||
| 149 | 158 | ||
| 150 | CPU_COMING_UP: | 159 | CPU_COMING_UP: |
| 151 | |||
| 152 | A CPU cannot start participating in hardware coherency until the | 160 | A CPU cannot start participating in hardware coherency until the |
| 153 | cluster is set up and coherent. If the cluster is not ready, | 161 | cluster is set up and coherent. If the cluster is not ready, |
| 154 | then the CPU will wait in the CPU_COMING_UP state until the | 162 | then the CPU will wait in the CPU_COMING_UP state until the |
| 155 | cluster has been set up. | 163 | cluster has been set up. |
| 156 | 164 | ||
| 157 | Next state: CPU_UP | 165 | Next state: |
| 158 | Conditions: The CPU's parent cluster must be in CLUSTER_UP. | 166 | CPU_UP |
| 159 | Trigger events: Transition of the parent cluster to CLUSTER_UP. | 167 | Conditions: |
| 168 | The CPU's parent cluster must be in CLUSTER_UP. | ||
| 169 | Trigger events: | ||
| 170 | Transition of the parent cluster to CLUSTER_UP. | ||
| 160 | 171 | ||
| 161 | Refer to the "Cluster state" section for a description of the | 172 | Refer to the "Cluster state" section for a description of the |
| 162 | CLUSTER_UP state. | 173 | CLUSTER_UP state. |
| @@ -178,20 +189,25 @@ CPU_UP: | |||
| 178 | The CPU remains in this state until an explicit policy decision | 189 | The CPU remains in this state until an explicit policy decision |
| 179 | is made to shut down or suspend the CPU. | 190 | is made to shut down or suspend the CPU. |
| 180 | 191 | ||
| 181 | Next state: CPU_GOING_DOWN | 192 | Next state: |
| 182 | Conditions: none | 193 | CPU_GOING_DOWN |
| 183 | Trigger events: explicit policy decision | 194 | Conditions: |
| 195 | none | ||
| 196 | Trigger events: | ||
| 197 | explicit policy decision | ||
| 184 | 198 | ||
| 185 | 199 | ||
| 186 | CPU_GOING_DOWN: | 200 | CPU_GOING_DOWN: |
| 187 | |||
| 188 | While in this state, the CPU exits coherency, including any | 201 | While in this state, the CPU exits coherency, including any |
| 189 | operations required to achieve this (such as cleaning data | 202 | operations required to achieve this (such as cleaning data |
| 190 | caches). | 203 | caches). |
| 191 | 204 | ||
| 192 | Next state: CPU_DOWN | 205 | Next state: |
| 193 | Conditions: local CPU teardown complete | 206 | CPU_DOWN |
| 194 | Trigger events: (spontaneous) | 207 | Conditions: |
| 208 | local CPU teardown complete | ||
| 209 | Trigger events: | ||
| 210 | (spontaneous) | ||
| 195 | 211 | ||
| 196 | 212 | ||
| 197 | Cluster state | 213 | Cluster state |
| @@ -212,20 +228,20 @@ independently of the CPU which is tearing down the cluster. For this | |||
| 212 | reason, the cluster state is split into two parts: | 228 | reason, the cluster state is split into two parts: |
| 213 | 229 | ||
| 214 | "cluster" state: The global state of the cluster; or the state | 230 | "cluster" state: The global state of the cluster; or the state |
| 215 | on the outbound side: | 231 | on the outbound side: |
| 216 | 232 | ||
| 217 | CLUSTER_DOWN | 233 | - CLUSTER_DOWN |
| 218 | CLUSTER_UP | 234 | - CLUSTER_UP |
| 219 | CLUSTER_GOING_DOWN | 235 | - CLUSTER_GOING_DOWN |
| 220 | 236 | ||
| 221 | "inbound" state: The state of the cluster on the inbound side. | 237 | "inbound" state: The state of the cluster on the inbound side. |
| 222 | 238 | ||
| 223 | INBOUND_NOT_COMING_UP | 239 | - INBOUND_NOT_COMING_UP |
| 224 | INBOUND_COMING_UP | 240 | - INBOUND_COMING_UP |
| 225 | 241 | ||
| 226 | 242 | ||
| 227 | The different pairings of these states results in six possible | 243 | The different pairings of these states results in six possible |
| 228 | states for the cluster as a whole: | 244 | states for the cluster as a whole:: |
| 229 | 245 | ||
| 230 | CLUSTER_UP | 246 | CLUSTER_UP |
| 231 | +==========> INBOUND_NOT_COMING_UP -------------+ | 247 | +==========> INBOUND_NOT_COMING_UP -------------+ |
| @@ -284,11 +300,12 @@ reason, the cluster state is split into two parts: | |||
| 284 | 300 | ||
| 285 | 301 | ||
| 286 | CLUSTER_DOWN/INBOUND_NOT_COMING_UP: | 302 | CLUSTER_DOWN/INBOUND_NOT_COMING_UP: |
| 303 | Next state: | ||
| 304 | CLUSTER_DOWN/INBOUND_COMING_UP (inbound) | ||
| 305 | Conditions: | ||
| 306 | none | ||
| 287 | 307 | ||
| 288 | Next state: CLUSTER_DOWN/INBOUND_COMING_UP (inbound) | ||
| 289 | Conditions: none | ||
| 290 | Trigger events: | 308 | Trigger events: |
| 291 | |||
| 292 | a) an explicit hardware power-up operation, resulting | 309 | a) an explicit hardware power-up operation, resulting |
| 293 | from a policy decision on another CPU; | 310 | from a policy decision on another CPU; |
| 294 | 311 | ||
| @@ -306,9 +323,12 @@ CLUSTER_DOWN/INBOUND_COMING_UP: | |||
| 306 | setup to enable other CPUs in the cluster to enter coherency | 323 | setup to enable other CPUs in the cluster to enter coherency |
| 307 | safely. | 324 | safely. |
| 308 | 325 | ||
| 309 | Next state: CLUSTER_UP/INBOUND_COMING_UP (inbound) | 326 | Next state: |
| 310 | Conditions: cluster-level setup and hardware coherency complete | 327 | CLUSTER_UP/INBOUND_COMING_UP (inbound) |
| 311 | Trigger events: (spontaneous) | 328 | Conditions: |
| 329 | cluster-level setup and hardware coherency complete | ||
| 330 | Trigger events: | ||
| 331 | (spontaneous) | ||
| 312 | 332 | ||
| 313 | 333 | ||
| 314 | CLUSTER_UP/INBOUND_COMING_UP: | 334 | CLUSTER_UP/INBOUND_COMING_UP: |
| @@ -321,9 +341,12 @@ CLUSTER_UP/INBOUND_COMING_UP: | |||
| 321 | CLUSTER_UP/INBOUND_NOT_COMING_UP. All other CPUs on the cluster | 341 | CLUSTER_UP/INBOUND_NOT_COMING_UP. All other CPUs on the cluster |
| 322 | should consider treat these two states as equivalent. | 342 | should consider treat these two states as equivalent. |
| 323 | 343 | ||
| 324 | Next state: CLUSTER_UP/INBOUND_NOT_COMING_UP (inbound) | 344 | Next state: |
| 325 | Conditions: none | 345 | CLUSTER_UP/INBOUND_NOT_COMING_UP (inbound) |
| 326 | Trigger events: (spontaneous) | 346 | Conditions: |
| 347 | none | ||
| 348 | Trigger events: | ||
| 349 | (spontaneous) | ||
| 327 | 350 | ||
| 328 | 351 | ||
| 329 | CLUSTER_UP/INBOUND_NOT_COMING_UP: | 352 | CLUSTER_UP/INBOUND_NOT_COMING_UP: |
| @@ -335,9 +358,12 @@ CLUSTER_UP/INBOUND_NOT_COMING_UP: | |||
| 335 | The cluster will remain in this state until a policy decision is | 358 | The cluster will remain in this state until a policy decision is |
| 336 | made to power the cluster down. | 359 | made to power the cluster down. |
| 337 | 360 | ||
| 338 | Next state: CLUSTER_GOING_DOWN/INBOUND_NOT_COMING_UP (outbound) | 361 | Next state: |
| 339 | Conditions: none | 362 | CLUSTER_GOING_DOWN/INBOUND_NOT_COMING_UP (outbound) |
| 340 | Trigger events: policy decision to power down the cluster | 363 | Conditions: |
| 364 | none | ||
| 365 | Trigger events: | ||
| 366 | policy decision to power down the cluster | ||
| 341 | 367 | ||
| 342 | 368 | ||
| 343 | CLUSTER_GOING_DOWN/INBOUND_NOT_COMING_UP: | 369 | CLUSTER_GOING_DOWN/INBOUND_NOT_COMING_UP: |
| @@ -359,13 +385,16 @@ CLUSTER_GOING_DOWN/INBOUND_NOT_COMING_UP: | |||
| 359 | Next states: | 385 | Next states: |
| 360 | 386 | ||
| 361 | CLUSTER_DOWN/INBOUND_NOT_COMING_UP (outbound) | 387 | CLUSTER_DOWN/INBOUND_NOT_COMING_UP (outbound) |
| 362 | Conditions: cluster torn down and ready to power off | 388 | Conditions: |
| 363 | Trigger events: (spontaneous) | 389 | cluster torn down and ready to power off |
| 390 | Trigger events: | ||
| 391 | (spontaneous) | ||
| 364 | 392 | ||
| 365 | CLUSTER_GOING_DOWN/INBOUND_COMING_UP (inbound) | 393 | CLUSTER_GOING_DOWN/INBOUND_COMING_UP (inbound) |
| 366 | Conditions: none | 394 | Conditions: |
| 367 | Trigger events: | 395 | none |
| 368 | 396 | ||
| 397 | Trigger events: | ||
| 369 | a) an explicit hardware power-up operation, | 398 | a) an explicit hardware power-up operation, |
| 370 | resulting from a policy decision on another | 399 | resulting from a policy decision on another |
| 371 | CPU; | 400 | CPU; |
| @@ -396,13 +425,19 @@ CLUSTER_GOING_DOWN/INBOUND_COMING_UP: | |||
| 396 | Next states: | 425 | Next states: |
| 397 | 426 | ||
| 398 | CLUSTER_UP/INBOUND_COMING_UP (outbound) | 427 | CLUSTER_UP/INBOUND_COMING_UP (outbound) |
| 399 | Conditions: cluster-level setup and hardware | 428 | Conditions: |
| 429 | cluster-level setup and hardware | ||
| 400 | coherency complete | 430 | coherency complete |
| 401 | Trigger events: (spontaneous) | 431 | |
| 432 | Trigger events: | ||
| 433 | (spontaneous) | ||
| 402 | 434 | ||
| 403 | CLUSTER_DOWN/INBOUND_COMING_UP (outbound) | 435 | CLUSTER_DOWN/INBOUND_COMING_UP (outbound) |
| 404 | Conditions: cluster torn down and ready to power off | 436 | Conditions: |
| 405 | Trigger events: (spontaneous) | 437 | cluster torn down and ready to power off |
| 438 | |||
| 439 | Trigger events: | ||
| 440 | (spontaneous) | ||
| 406 | 441 | ||
| 407 | 442 | ||
| 408 | Last man and First man selection | 443 | Last man and First man selection |
| @@ -452,30 +487,30 @@ Implementation: | |||
| 452 | arch/arm/common/mcpm_entry.c (everything else): | 487 | arch/arm/common/mcpm_entry.c (everything else): |
| 453 | 488 | ||
| 454 | __mcpm_cpu_going_down() signals the transition of a CPU to the | 489 | __mcpm_cpu_going_down() signals the transition of a CPU to the |
| 455 | CPU_GOING_DOWN state. | 490 | CPU_GOING_DOWN state. |
| 456 | 491 | ||
| 457 | __mcpm_cpu_down() signals the transition of a CPU to the CPU_DOWN | 492 | __mcpm_cpu_down() signals the transition of a CPU to the CPU_DOWN |
| 458 | state. | 493 | state. |
| 459 | 494 | ||
| 460 | A CPU transitions to CPU_COMING_UP and then to CPU_UP via the | 495 | A CPU transitions to CPU_COMING_UP and then to CPU_UP via the |
| 461 | low-level power-up code in mcpm_head.S. This could | 496 | low-level power-up code in mcpm_head.S. This could |
| 462 | involve CPU-specific setup code, but in the current | 497 | involve CPU-specific setup code, but in the current |
| 463 | implementation it does not. | 498 | implementation it does not. |
| 464 | 499 | ||
| 465 | __mcpm_outbound_enter_critical() and __mcpm_outbound_leave_critical() | 500 | __mcpm_outbound_enter_critical() and __mcpm_outbound_leave_critical() |
| 466 | handle transitions from CLUSTER_UP to CLUSTER_GOING_DOWN | 501 | handle transitions from CLUSTER_UP to CLUSTER_GOING_DOWN |
| 467 | and from there to CLUSTER_DOWN or back to CLUSTER_UP (in | 502 | and from there to CLUSTER_DOWN or back to CLUSTER_UP (in |
| 468 | the case of an aborted cluster power-down). | 503 | the case of an aborted cluster power-down). |
| 469 | 504 | ||
| 470 | These functions are more complex than the __mcpm_cpu_*() | 505 | These functions are more complex than the __mcpm_cpu_*() |
| 471 | functions due to the extra inter-CPU coordination which | 506 | functions due to the extra inter-CPU coordination which |
| 472 | is needed for safe transitions at the cluster level. | 507 | is needed for safe transitions at the cluster level. |
| 473 | 508 | ||
| 474 | A cluster transitions from CLUSTER_DOWN back to CLUSTER_UP via | 509 | A cluster transitions from CLUSTER_DOWN back to CLUSTER_UP via |
| 475 | the low-level power-up code in mcpm_head.S. This | 510 | the low-level power-up code in mcpm_head.S. This |
| 476 | typically involves platform-specific setup code, | 511 | typically involves platform-specific setup code, |
| 477 | provided by the platform-specific power_up_setup | 512 | provided by the platform-specific power_up_setup |
| 478 | function registered via mcpm_sync_init. | 513 | function registered via mcpm_sync_init. |
| 479 | 514 | ||
| 480 | Deep topologies: | 515 | Deep topologies: |
| 481 | 516 | ||
diff --git a/Documentation/arm/firmware.txt b/Documentation/arm/firmware.rst index 7f175dbb427e..efd844baec1d 100644 --- a/Documentation/arm/firmware.txt +++ b/Documentation/arm/firmware.rst | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | Interface for registering and calling firmware-specific operations for ARM. | 1 | ========================================================================== |
| 2 | ---- | 2 | Interface for registering and calling firmware-specific operations for ARM |
| 3 | ========================================================================== | ||
| 4 | |||
| 3 | Written by Tomasz Figa <t.figa@samsung.com> | 5 | Written by Tomasz Figa <t.figa@samsung.com> |
| 4 | 6 | ||
| 5 | Some boards are running with secure firmware running in TrustZone secure | 7 | Some boards are running with secure firmware running in TrustZone secure |
| @@ -9,7 +11,7 @@ operations and call them when needed. | |||
| 9 | 11 | ||
| 10 | Firmware operations can be specified by filling in a struct firmware_ops | 12 | Firmware operations can be specified by filling in a struct firmware_ops |
| 11 | with appropriate callbacks and then registering it with register_firmware_ops() | 13 | with appropriate callbacks and then registering it with register_firmware_ops() |
| 12 | function. | 14 | function:: |
| 13 | 15 | ||
| 14 | void register_firmware_ops(const struct firmware_ops *ops) | 16 | void register_firmware_ops(const struct firmware_ops *ops) |
| 15 | 17 | ||
| @@ -19,7 +21,7 @@ and its members can be found in arch/arm/include/asm/firmware.h header. | |||
| 19 | There is a default, empty set of operations provided, so there is no need to | 21 | There is a default, empty set of operations provided, so there is no need to |
| 20 | set anything if platform does not require firmware operations. | 22 | set anything if platform does not require firmware operations. |
| 21 | 23 | ||
| 22 | To call a firmware operation, a helper macro is provided | 24 | To call a firmware operation, a helper macro is provided:: |
| 23 | 25 | ||
| 24 | #define call_firmware_op(op, ...) \ | 26 | #define call_firmware_op(op, ...) \ |
| 25 | ((firmware_ops->op) ? firmware_ops->op(__VA_ARGS__) : (-ENOSYS)) | 27 | ((firmware_ops->op) ? firmware_ops->op(__VA_ARGS__) : (-ENOSYS)) |
| @@ -28,7 +30,7 @@ the macro checks if the operation is provided and calls it or otherwise returns | |||
| 28 | -ENOSYS to signal that given operation is not available (for example, to allow | 30 | -ENOSYS to signal that given operation is not available (for example, to allow |
| 29 | fallback to legacy operation). | 31 | fallback to legacy operation). |
| 30 | 32 | ||
| 31 | Example of registering firmware operations: | 33 | Example of registering firmware operations:: |
| 32 | 34 | ||
| 33 | /* board file */ | 35 | /* board file */ |
| 34 | 36 | ||
| @@ -56,7 +58,7 @@ Example of registering firmware operations: | |||
| 56 | register_firmware_ops(&platformX_firmware_ops); | 58 | register_firmware_ops(&platformX_firmware_ops); |
| 57 | } | 59 | } |
| 58 | 60 | ||
| 59 | Example of using a firmware operation: | 61 | Example of using a firmware operation:: |
| 60 | 62 | ||
| 61 | /* some platform code, e.g. SMP initialization */ | 63 | /* some platform code, e.g. SMP initialization */ |
| 62 | 64 | ||
diff --git a/Documentation/arm/index.rst b/Documentation/arm/index.rst new file mode 100644 index 000000000000..5fc072dd0c5e --- /dev/null +++ b/Documentation/arm/index.rst | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ================ | ||
| 4 | ARM Architecture | ||
| 5 | ================ | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | arm | ||
| 11 | booting | ||
| 12 | cluster-pm-race-avoidance | ||
| 13 | firmware | ||
| 14 | interrupts | ||
| 15 | kernel_mode_neon | ||
| 16 | kernel_user_helpers | ||
| 17 | memory | ||
| 18 | mem_alignment | ||
| 19 | tcm | ||
| 20 | setup | ||
| 21 | swp_emulation | ||
| 22 | uefi | ||
| 23 | vlocks | ||
| 24 | porting | ||
| 25 | |||
| 26 | SoC-specific documents | ||
| 27 | ====================== | ||
| 28 | |||
| 29 | .. toctree:: | ||
| 30 | :maxdepth: 1 | ||
| 31 | |||
| 32 | ixp4xx | ||
| 33 | |||
| 34 | marvel | ||
| 35 | microchip | ||
| 36 | |||
| 37 | netwinder | ||
| 38 | nwfpe/index | ||
| 39 | |||
| 40 | keystone/overview | ||
| 41 | keystone/knav-qmss | ||
| 42 | |||
| 43 | omap/index | ||
| 44 | |||
| 45 | pxa/mfp | ||
| 46 | |||
| 47 | |||
| 48 | sa1100/index | ||
| 49 | |||
| 50 | stm32/stm32f746-overview | ||
| 51 | stm32/overview | ||
| 52 | stm32/stm32h743-overview | ||
| 53 | stm32/stm32f769-overview | ||
| 54 | stm32/stm32f429-overview | ||
| 55 | stm32/stm32mp157-overview | ||
| 56 | |||
| 57 | sunxi | ||
| 58 | |||
| 59 | samsung/index | ||
| 60 | samsung-s3c24xx/index | ||
| 61 | |||
| 62 | sunxi/clocks | ||
| 63 | |||
| 64 | spear/overview | ||
| 65 | |||
| 66 | sti/stih416-overview | ||
| 67 | sti/stih407-overview | ||
| 68 | sti/stih418-overview | ||
| 69 | sti/overview | ||
| 70 | sti/stih415-overview | ||
| 71 | |||
| 72 | vfp/release-notes | ||
| 73 | |||
| 74 | |||
| 75 | .. only:: subproject and html | ||
| 76 | |||
| 77 | Indices | ||
| 78 | ======= | ||
| 79 | |||
| 80 | * :ref:`genindex` | ||
diff --git a/Documentation/arm/Interrupts b/Documentation/arm/interrupts.rst index f09ab1b90ef1..2ae70e0e9732 100644 --- a/Documentation/arm/Interrupts +++ b/Documentation/arm/interrupts.rst | |||
| @@ -1,8 +1,10 @@ | |||
| 1 | 2.5.2-rmk5 | 1 | ========== |
| 2 | ---------- | 2 | Interrupts |
| 3 | ========== | ||
| 3 | 4 | ||
| 4 | This is the first kernel that contains a major shake up of some of the | 5 | 2.5.2-rmk5: |
| 5 | major architecture-specific subsystems. | 6 | This is the first kernel that contains a major shake up of some of the |
| 7 | major architecture-specific subsystems. | ||
| 6 | 8 | ||
| 7 | Firstly, it contains some pretty major changes to the way we handle the | 9 | Firstly, it contains some pretty major changes to the way we handle the |
| 8 | MMU TLB. Each MMU TLB variant is now handled completely separately - | 10 | MMU TLB. Each MMU TLB variant is now handled completely separately - |
| @@ -18,7 +20,7 @@ Unfortunately, this means that machine types that touch the irq_desc[] | |||
| 18 | array (basically all machine types) will break, and this means every | 20 | array (basically all machine types) will break, and this means every |
| 19 | machine type that we currently have. | 21 | machine type that we currently have. |
| 20 | 22 | ||
| 21 | Lets take an example. On the Assabet with Neponset, we have: | 23 | Lets take an example. On the Assabet with Neponset, we have:: |
| 22 | 24 | ||
| 23 | GPIO25 IRR:2 | 25 | GPIO25 IRR:2 |
| 24 | SA1100 ------------> Neponset -----------> SA1111 | 26 | SA1100 ------------> Neponset -----------> SA1111 |
| @@ -48,42 +50,47 @@ the irqdesc array). This doesn't have to be a real "IC"; indeed the | |||
| 48 | SA11x0 IRQs are handled by two separate "chip" structures, one for | 50 | SA11x0 IRQs are handled by two separate "chip" structures, one for |
| 49 | GPIO0-10, and another for all the rest. It is just a container for | 51 | GPIO0-10, and another for all the rest. It is just a container for |
| 50 | the various operations (maybe this'll change to a better name). | 52 | the various operations (maybe this'll change to a better name). |
| 51 | This structure has the following operations: | 53 | This structure has the following operations:: |
| 52 | 54 | ||
| 53 | struct irqchip { | 55 | struct irqchip { |
| 54 | /* | 56 | /* |
| 55 | * Acknowledge the IRQ. | 57 | * Acknowledge the IRQ. |
| 56 | * If this is a level-based IRQ, then it is expected to mask the IRQ | 58 | * If this is a level-based IRQ, then it is expected to mask the IRQ |
| 57 | * as well. | 59 | * as well. |
| 58 | */ | 60 | */ |
| 59 | void (*ack)(unsigned int irq); | 61 | void (*ack)(unsigned int irq); |
| 60 | /* | 62 | /* |
| 61 | * Mask the IRQ in hardware. | 63 | * Mask the IRQ in hardware. |
| 62 | */ | 64 | */ |
| 63 | void (*mask)(unsigned int irq); | 65 | void (*mask)(unsigned int irq); |
| 64 | /* | 66 | /* |
| 65 | * Unmask the IRQ in hardware. | 67 | * Unmask the IRQ in hardware. |
| 66 | */ | 68 | */ |
| 67 | void (*unmask)(unsigned int irq); | 69 | void (*unmask)(unsigned int irq); |
| 68 | /* | 70 | /* |
| 69 | * Re-run the IRQ | 71 | * Re-run the IRQ |
| 70 | */ | 72 | */ |
| 71 | void (*rerun)(unsigned int irq); | 73 | void (*rerun)(unsigned int irq); |
| 72 | /* | 74 | /* |
| 73 | * Set the type of the IRQ. | 75 | * Set the type of the IRQ. |
| 74 | */ | 76 | */ |
| 75 | int (*type)(unsigned int irq, unsigned int, type); | 77 | int (*type)(unsigned int irq, unsigned int, type); |
| 76 | }; | 78 | }; |
| 77 | 79 | ||
| 78 | ack - required. May be the same function as mask for IRQs | 80 | ack |
| 81 | - required. May be the same function as mask for IRQs | ||
| 79 | handled by do_level_IRQ. | 82 | handled by do_level_IRQ. |
| 80 | mask - required. | 83 | mask |
| 81 | unmask - required. | 84 | - required. |
| 82 | rerun - optional. Not required if you're using do_level_IRQ for all | 85 | unmask |
| 86 | - required. | ||
| 87 | rerun | ||
| 88 | - optional. Not required if you're using do_level_IRQ for all | ||
| 83 | IRQs that use this 'irqchip'. Generally expected to re-trigger | 89 | IRQs that use this 'irqchip'. Generally expected to re-trigger |
| 84 | the hardware IRQ if possible. If not, may call the handler | 90 | the hardware IRQ if possible. If not, may call the handler |
| 85 | directly. | 91 | directly. |
| 86 | type - optional. If you don't support changing the type of an IRQ, | 92 | type |
| 93 | - optional. If you don't support changing the type of an IRQ, | ||
| 87 | it should be null so people can detect if they are unable to | 94 | it should be null so people can detect if they are unable to |
| 88 | set the IRQ type. | 95 | set the IRQ type. |
| 89 | 96 | ||
| @@ -109,6 +116,7 @@ manipulation, nor state tracking. This is useful for things like the | |||
| 109 | SMC9196 and USAR above. | 116 | SMC9196 and USAR above. |
| 110 | 117 | ||
| 111 | So, what's changed? | 118 | So, what's changed? |
| 119 | =================== | ||
| 112 | 120 | ||
| 113 | 1. Machine implementations must not write to the irqdesc array. | 121 | 1. Machine implementations must not write to the irqdesc array. |
| 114 | 122 | ||
| @@ -118,24 +126,19 @@ So, what's changed? | |||
| 118 | absolutely necessary. | 126 | absolutely necessary. |
| 119 | 127 | ||
| 120 | set_irq_chip(irq,chip) | 128 | set_irq_chip(irq,chip) |
| 121 | |||
| 122 | Set the mask/unmask methods for handling this IRQ | 129 | Set the mask/unmask methods for handling this IRQ |
| 123 | 130 | ||
| 124 | set_irq_handler(irq,handler) | 131 | set_irq_handler(irq,handler) |
| 125 | |||
| 126 | Set the handler for this IRQ (level, edge, simple) | 132 | Set the handler for this IRQ (level, edge, simple) |
| 127 | 133 | ||
| 128 | set_irq_chained_handler(irq,handler) | 134 | set_irq_chained_handler(irq,handler) |
| 129 | |||
| 130 | Set a "chained" handler for this IRQ - automatically | 135 | Set a "chained" handler for this IRQ - automatically |
| 131 | enables this IRQ (eg, Neponset and SA1111 handlers). | 136 | enables this IRQ (eg, Neponset and SA1111 handlers). |
| 132 | 137 | ||
| 133 | set_irq_flags(irq,flags) | 138 | set_irq_flags(irq,flags) |
| 134 | |||
| 135 | Set the valid/probe/noautoenable flags. | 139 | Set the valid/probe/noautoenable flags. |
| 136 | 140 | ||
| 137 | set_irq_type(irq,type) | 141 | set_irq_type(irq,type) |
| 138 | |||
| 139 | Set active the IRQ edge(s)/level. This replaces the | 142 | Set active the IRQ edge(s)/level. This replaces the |
| 140 | SA1111 INTPOL manipulation, and the set_GPIO_IRQ_edge() | 143 | SA1111 INTPOL manipulation, and the set_GPIO_IRQ_edge() |
| 141 | function. Type should be one of IRQ_TYPE_xxx defined in | 144 | function. Type should be one of IRQ_TYPE_xxx defined in |
| @@ -158,10 +161,9 @@ So, what's changed? | |||
| 158 | be re-checked for pending events. (see the Neponset IRQ handler for | 161 | be re-checked for pending events. (see the Neponset IRQ handler for |
| 159 | details). | 162 | details). |
| 160 | 163 | ||
| 161 | 7. fixup_irq() is gone, as is arch/arm/mach-*/include/mach/irq.h | 164 | 7. fixup_irq() is gone, as is `arch/arm/mach-*/include/mach/irq.h` |
| 162 | 165 | ||
| 163 | Please note that this will not solve all problems - some of them are | 166 | Please note that this will not solve all problems - some of them are |
| 164 | hardware based. Mixing level-based and edge-based IRQs on the same | 167 | hardware based. Mixing level-based and edge-based IRQs on the same |
| 165 | parent signal (eg neponset) is one such area where a software based | 168 | parent signal (eg neponset) is one such area where a software based |
| 166 | solution can't provide the full answer to low IRQ latency. | 169 | solution can't provide the full answer to low IRQ latency. |
| 167 | |||
diff --git a/Documentation/arm/IXP4xx b/Documentation/arm/ixp4xx.rst index e48b74de6ac0..a57235616294 100644 --- a/Documentation/arm/IXP4xx +++ b/Documentation/arm/ixp4xx.rst | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | 1 | =========================================================== | |
| 2 | ------------------------------------------------------------------------- | ||
| 3 | Release Notes for Linux on Intel's IXP4xx Network Processor | 2 | Release Notes for Linux on Intel's IXP4xx Network Processor |
| 3 | =========================================================== | ||
| 4 | 4 | ||
| 5 | Maintained by Deepak Saxena <dsaxena@plexity.net> | 5 | Maintained by Deepak Saxena <dsaxena@plexity.net> |
| 6 | ------------------------------------------------------------------------- | 6 | ------------------------------------------------------------------------- |
| @@ -8,7 +8,7 @@ Maintained by Deepak Saxena <dsaxena@plexity.net> | |||
| 8 | 1. Overview | 8 | 1. Overview |
| 9 | 9 | ||
| 10 | Intel's IXP4xx network processor is a highly integrated SOC that | 10 | Intel's IXP4xx network processor is a highly integrated SOC that |
| 11 | is targeted for network applications, though it has become popular | 11 | is targeted for network applications, though it has become popular |
| 12 | in industrial control and other areas due to low cost and power | 12 | in industrial control and other areas due to low cost and power |
| 13 | consumption. The IXP4xx family currently consists of several processors | 13 | consumption. The IXP4xx family currently consists of several processors |
| 14 | that support different network offload functions such as encryption, | 14 | that support different network offload functions such as encryption, |
| @@ -20,7 +20,7 @@ For more information on the various versions of the CPU, see: | |||
| 20 | 20 | ||
| 21 | http://developer.intel.com/design/network/products/npfamily/ixp4xx.htm | 21 | http://developer.intel.com/design/network/products/npfamily/ixp4xx.htm |
| 22 | 22 | ||
| 23 | Intel also made the IXCP1100 CPU for sometime which is an IXP4xx | 23 | Intel also made the IXCP1100 CPU for sometime which is an IXP4xx |
| 24 | stripped of much of the network intelligence. | 24 | stripped of much of the network intelligence. |
| 25 | 25 | ||
| 26 | 2. Linux Support | 26 | 2. Linux Support |
| @@ -31,7 +31,7 @@ Linux currently supports the following features on the IXP4xx chips: | |||
| 31 | - PCI interface | 31 | - PCI interface |
| 32 | - Flash access (MTD/JFFS) | 32 | - Flash access (MTD/JFFS) |
| 33 | - I2C through GPIO on IXP42x | 33 | - I2C through GPIO on IXP42x |
| 34 | - GPIO for input/output/interrupts | 34 | - GPIO for input/output/interrupts |
| 35 | See arch/arm/mach-ixp4xx/include/mach/platform.h for access functions. | 35 | See arch/arm/mach-ixp4xx/include/mach/platform.h for access functions. |
| 36 | - Timers (watchdog, OS) | 36 | - Timers (watchdog, OS) |
| 37 | 37 | ||
| @@ -45,7 +45,7 @@ require the use of Intel's proprietary CSR software: | |||
| 45 | If you need to use any of the above, you need to download Intel's | 45 | If you need to use any of the above, you need to download Intel's |
| 46 | software from: | 46 | software from: |
| 47 | 47 | ||
| 48 | http://developer.intel.com/design/network/products/npfamily/ixp425.htm | 48 | http://developer.intel.com/design/network/products/npfamily/ixp425.htm |
| 49 | 49 | ||
| 50 | DO NOT POST QUESTIONS TO THE LINUX MAILING LISTS REGARDING THE PROPRIETARY | 50 | DO NOT POST QUESTIONS TO THE LINUX MAILING LISTS REGARDING THE PROPRIETARY |
| 51 | SOFTWARE. | 51 | SOFTWARE. |
| @@ -53,14 +53,14 @@ SOFTWARE. | |||
| 53 | There are several websites that provide directions/pointers on using | 53 | There are several websites that provide directions/pointers on using |
| 54 | Intel's software: | 54 | Intel's software: |
| 55 | 55 | ||
| 56 | http://sourceforge.net/projects/ixp4xx-osdg/ | 56 | - http://sourceforge.net/projects/ixp4xx-osdg/ |
| 57 | Open Source Developer's Guide for using uClinux and the Intel libraries | 57 | Open Source Developer's Guide for using uClinux and the Intel libraries |
| 58 | 58 | ||
| 59 | http://gatewaymaker.sourceforge.net/ | 59 | - http://gatewaymaker.sourceforge.net/ |
| 60 | Simple one page summary of building a gateway using an IXP425 and Linux | 60 | Simple one page summary of building a gateway using an IXP425 and Linux |
| 61 | 61 | ||
| 62 | http://ixp425.sourceforge.net/ | 62 | - http://ixp425.sourceforge.net/ |
| 63 | ATM device driver for IXP425 that relies on Intel's libraries | 63 | ATM device driver for IXP425 that relies on Intel's libraries |
| 64 | 64 | ||
| 65 | 3. Known Issues/Limitations | 65 | 3. Known Issues/Limitations |
| 66 | 66 | ||
| @@ -70,7 +70,7 @@ The IXP4xx family allows for up to 256MB of memory but the PCI interface | |||
| 70 | can only expose 64MB of that memory to the PCI bus. This means that if | 70 | can only expose 64MB of that memory to the PCI bus. This means that if |
| 71 | you are running with > 64MB, all PCI buffers outside of the accessible | 71 | you are running with > 64MB, all PCI buffers outside of the accessible |
| 72 | range will be bounced using the routines in arch/arm/common/dmabounce.c. | 72 | range will be bounced using the routines in arch/arm/common/dmabounce.c. |
| 73 | 73 | ||
| 74 | 3b. Limited outbound PCI window | 74 | 3b. Limited outbound PCI window |
| 75 | 75 | ||
| 76 | IXP4xx provides two methods of accessing PCI memory space: | 76 | IXP4xx provides two methods of accessing PCI memory space: |
| @@ -79,15 +79,15 @@ IXP4xx provides two methods of accessing PCI memory space: | |||
| 79 | To access PCI via this space, we simply ioremap() the BAR | 79 | To access PCI via this space, we simply ioremap() the BAR |
| 80 | into the kernel and we can use the standard read[bwl]/write[bwl] | 80 | into the kernel and we can use the standard read[bwl]/write[bwl] |
| 81 | macros. This is the preffered method due to speed but it | 81 | macros. This is the preffered method due to speed but it |
| 82 | limits the system to just 64MB of PCI memory. This can be | 82 | limits the system to just 64MB of PCI memory. This can be |
| 83 | problamatic if using video cards and other memory-heavy devices. | 83 | problamatic if using video cards and other memory-heavy devices. |
| 84 | 84 | ||
| 85 | 2) If > 64MB of memory space is required, the IXP4xx can be | 85 | 2) If > 64MB of memory space is required, the IXP4xx can be |
| 86 | configured to use indirect registers to access PCI This allows | 86 | configured to use indirect registers to access PCI This allows |
| 87 | for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus. | 87 | for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus. |
| 88 | The disadvantage of this is that every PCI access requires | 88 | The disadvantage of this is that every PCI access requires |
| 89 | three local register accesses plus a spinlock, but in some | 89 | three local register accesses plus a spinlock, but in some |
| 90 | cases the performance hit is acceptable. In addition, you cannot | 90 | cases the performance hit is acceptable. In addition, you cannot |
| 91 | mmap() PCI devices in this case due to the indirect nature | 91 | mmap() PCI devices in this case due to the indirect nature |
| 92 | of the PCI window. | 92 | of the PCI window. |
| 93 | 93 | ||
| @@ -96,14 +96,14 @@ you need more PCI memory, enable the IXP4XX_INDIRECT_PCI config option. | |||
| 96 | 96 | ||
| 97 | 3c. GPIO as Interrupts | 97 | 3c. GPIO as Interrupts |
| 98 | 98 | ||
| 99 | Currently the code only handles level-sensitive GPIO interrupts | 99 | Currently the code only handles level-sensitive GPIO interrupts |
| 100 | 100 | ||
| 101 | 4. Supported platforms | 101 | 4. Supported platforms |
| 102 | 102 | ||
| 103 | ADI Engineering Coyote Gateway Reference Platform | 103 | ADI Engineering Coyote Gateway Reference Platform |
| 104 | http://www.adiengineering.com/productsCoyote.html | 104 | http://www.adiengineering.com/productsCoyote.html |
| 105 | 105 | ||
| 106 | The ADI Coyote platform is reference design for those building | 106 | The ADI Coyote platform is reference design for those building |
| 107 | small residential/office gateways. One NPE is connected to a 10/100 | 107 | small residential/office gateways. One NPE is connected to a 10/100 |
| 108 | interface, one to 4-port 10/100 switch, and the third to and ADSL | 108 | interface, one to 4-port 10/100 switch, and the third to and ADSL |
| 109 | interface. In addition, it also supports to POTs interfaces connected | 109 | interface. In addition, it also supports to POTs interfaces connected |
| @@ -119,9 +119,9 @@ http://www.gateworks.com/support/overview.php | |||
| 119 | the expansion bus. | 119 | the expansion bus. |
| 120 | 120 | ||
| 121 | Intel IXDP425 Development Platform | 121 | Intel IXDP425 Development Platform |
| 122 | http://www.intel.com/design/network/products/npfamily/ixdpg425.htm | 122 | http://www.intel.com/design/network/products/npfamily/ixdpg425.htm |
| 123 | 123 | ||
| 124 | This is Intel's standard reference platform for the IXDP425 and is | 124 | This is Intel's standard reference platform for the IXDP425 and is |
| 125 | also known as the Richfield board. It contains 4 PCI slots, 16MB | 125 | also known as the Richfield board. It contains 4 PCI slots, 16MB |
| 126 | of flash, two 10/100 ports and one ADSL port. | 126 | of flash, two 10/100 ports and one ADSL port. |
| 127 | 127 | ||
| @@ -161,11 +161,12 @@ The IXP4xx work has been funded by Intel Corp. and MontaVista Software, Inc. | |||
| 161 | 161 | ||
| 162 | The following people have contributed patches/comments/etc: | 162 | The following people have contributed patches/comments/etc: |
| 163 | 163 | ||
| 164 | Lennerty Buytenhek | 164 | - Lennerty Buytenhek |
| 165 | Lutz Jaenicke | 165 | - Lutz Jaenicke |
| 166 | Justin Mayfield | 166 | - Justin Mayfield |
| 167 | Robert E. Ranslam | 167 | - Robert E. Ranslam |
| 168 | [I know I've forgotten others, please email me to be added] | 168 | |
| 169 | [I know I've forgotten others, please email me to be added] | ||
| 169 | 170 | ||
| 170 | ------------------------------------------------------------------------- | 171 | ------------------------------------------------------------------------- |
| 171 | 172 | ||
diff --git a/Documentation/arm/kernel_mode_neon.txt b/Documentation/arm/kernel_mode_neon.rst index b9e060c5b61e..9bfb71a2a9b9 100644 --- a/Documentation/arm/kernel_mode_neon.txt +++ b/Documentation/arm/kernel_mode_neon.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ================ | ||
| 1 | Kernel mode NEON | 2 | Kernel mode NEON |
| 2 | ================ | 3 | ================ |
| 3 | 4 | ||
| @@ -86,6 +87,7 @@ instructions appearing in unexpected places if no special care is taken. | |||
| 86 | 87 | ||
| 87 | Therefore, the recommended and only supported way of using NEON/VFP in the | 88 | Therefore, the recommended and only supported way of using NEON/VFP in the |
| 88 | kernel is by adhering to the following rules: | 89 | kernel is by adhering to the following rules: |
| 90 | |||
| 89 | * isolate the NEON code in a separate compilation unit and compile it with | 91 | * isolate the NEON code in a separate compilation unit and compile it with |
| 90 | '-march=armv7-a -mfpu=neon -mfloat-abi=softfp'; | 92 | '-march=armv7-a -mfpu=neon -mfloat-abi=softfp'; |
| 91 | * issue the calls to kernel_neon_begin(), kernel_neon_end() as well as the calls | 93 | * issue the calls to kernel_neon_begin(), kernel_neon_end() as well as the calls |
| @@ -115,6 +117,7 @@ NEON intrinsics | |||
| 115 | NEON intrinsics are also supported. However, as code using NEON intrinsics | 117 | NEON intrinsics are also supported. However, as code using NEON intrinsics |
| 116 | relies on the GCC header <arm_neon.h>, (which #includes <stdint.h>), you should | 118 | relies on the GCC header <arm_neon.h>, (which #includes <stdint.h>), you should |
| 117 | observe the following in addition to the rules above: | 119 | observe the following in addition to the rules above: |
| 120 | |||
| 118 | * Compile the unit containing the NEON intrinsics with '-ffreestanding' so GCC | 121 | * Compile the unit containing the NEON intrinsics with '-ffreestanding' so GCC |
| 119 | uses its builtin version of <stdint.h> (this is a C99 header which the kernel | 122 | uses its builtin version of <stdint.h> (this is a C99 header which the kernel |
| 120 | does not supply); | 123 | does not supply); |
diff --git a/Documentation/arm/kernel_user_helpers.txt b/Documentation/arm/kernel_user_helpers.rst index 5673594717cf..eb6f3d916622 100644 --- a/Documentation/arm/kernel_user_helpers.txt +++ b/Documentation/arm/kernel_user_helpers.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ============================ | ||
| 1 | Kernel-provided User Helpers | 2 | Kernel-provided User Helpers |
| 2 | ============================ | 3 | ============================ |
| 3 | 4 | ||
| @@ -43,7 +44,7 @@ kuser_helper_version | |||
| 43 | 44 | ||
| 44 | Location: 0xffff0ffc | 45 | Location: 0xffff0ffc |
| 45 | 46 | ||
| 46 | Reference declaration: | 47 | Reference declaration:: |
| 47 | 48 | ||
| 48 | extern int32_t __kuser_helper_version; | 49 | extern int32_t __kuser_helper_version; |
| 49 | 50 | ||
| @@ -53,17 +54,17 @@ Definition: | |||
| 53 | running kernel. User space may read this to determine the availability | 54 | running kernel. User space may read this to determine the availability |
| 54 | of a particular helper. | 55 | of a particular helper. |
| 55 | 56 | ||
| 56 | Usage example: | 57 | Usage example:: |
| 57 | 58 | ||
| 58 | #define __kuser_helper_version (*(int32_t *)0xffff0ffc) | 59 | #define __kuser_helper_version (*(int32_t *)0xffff0ffc) |
| 59 | 60 | ||
| 60 | void check_kuser_version(void) | 61 | void check_kuser_version(void) |
| 61 | { | 62 | { |
| 62 | if (__kuser_helper_version < 2) { | 63 | if (__kuser_helper_version < 2) { |
| 63 | fprintf(stderr, "can't do atomic operations, kernel too old\n"); | 64 | fprintf(stderr, "can't do atomic operations, kernel too old\n"); |
| 64 | abort(); | 65 | abort(); |
| 65 | } | 66 | } |
| 66 | } | 67 | } |
| 67 | 68 | ||
| 68 | Notes: | 69 | Notes: |
| 69 | 70 | ||
| @@ -77,7 +78,7 @@ kuser_get_tls | |||
| 77 | 78 | ||
| 78 | Location: 0xffff0fe0 | 79 | Location: 0xffff0fe0 |
| 79 | 80 | ||
| 80 | Reference prototype: | 81 | Reference prototype:: |
| 81 | 82 | ||
| 82 | void * __kuser_get_tls(void); | 83 | void * __kuser_get_tls(void); |
| 83 | 84 | ||
| @@ -97,16 +98,16 @@ Definition: | |||
| 97 | 98 | ||
| 98 | Get the TLS value as previously set via the __ARM_NR_set_tls syscall. | 99 | Get the TLS value as previously set via the __ARM_NR_set_tls syscall. |
| 99 | 100 | ||
| 100 | Usage example: | 101 | Usage example:: |
| 101 | 102 | ||
| 102 | typedef void * (__kuser_get_tls_t)(void); | 103 | typedef void * (__kuser_get_tls_t)(void); |
| 103 | #define __kuser_get_tls (*(__kuser_get_tls_t *)0xffff0fe0) | 104 | #define __kuser_get_tls (*(__kuser_get_tls_t *)0xffff0fe0) |
| 104 | 105 | ||
| 105 | void foo() | 106 | void foo() |
| 106 | { | 107 | { |
| 107 | void *tls = __kuser_get_tls(); | 108 | void *tls = __kuser_get_tls(); |
| 108 | printf("TLS = %p\n", tls); | 109 | printf("TLS = %p\n", tls); |
| 109 | } | 110 | } |
| 110 | 111 | ||
| 111 | Notes: | 112 | Notes: |
| 112 | 113 | ||
| @@ -117,7 +118,7 @@ kuser_cmpxchg | |||
| 117 | 118 | ||
| 118 | Location: 0xffff0fc0 | 119 | Location: 0xffff0fc0 |
| 119 | 120 | ||
| 120 | Reference prototype: | 121 | Reference prototype:: |
| 121 | 122 | ||
| 122 | int __kuser_cmpxchg(int32_t oldval, int32_t newval, volatile int32_t *ptr); | 123 | int __kuser_cmpxchg(int32_t oldval, int32_t newval, volatile int32_t *ptr); |
| 123 | 124 | ||
| @@ -139,18 +140,18 @@ Clobbered registers: | |||
| 139 | 140 | ||
| 140 | Definition: | 141 | Definition: |
| 141 | 142 | ||
| 142 | Atomically store newval in *ptr only if *ptr is equal to oldval. | 143 | Atomically store newval in `*ptr` only if `*ptr` is equal to oldval. |
| 143 | Return zero if *ptr was changed or non-zero if no exchange happened. | 144 | Return zero if `*ptr` was changed or non-zero if no exchange happened. |
| 144 | The C flag is also set if *ptr was changed to allow for assembly | 145 | The C flag is also set if `*ptr` was changed to allow for assembly |
| 145 | optimization in the calling code. | 146 | optimization in the calling code. |
| 146 | 147 | ||
| 147 | Usage example: | 148 | Usage example:: |
| 148 | 149 | ||
| 149 | typedef int (__kuser_cmpxchg_t)(int oldval, int newval, volatile int *ptr); | 150 | typedef int (__kuser_cmpxchg_t)(int oldval, int newval, volatile int *ptr); |
| 150 | #define __kuser_cmpxchg (*(__kuser_cmpxchg_t *)0xffff0fc0) | 151 | #define __kuser_cmpxchg (*(__kuser_cmpxchg_t *)0xffff0fc0) |
| 151 | 152 | ||
| 152 | int atomic_add(volatile int *ptr, int val) | 153 | int atomic_add(volatile int *ptr, int val) |
| 153 | { | 154 | { |
| 154 | int old, new; | 155 | int old, new; |
| 155 | 156 | ||
| 156 | do { | 157 | do { |
| @@ -159,7 +160,7 @@ int atomic_add(volatile int *ptr, int val) | |||
| 159 | } while(__kuser_cmpxchg(old, new, ptr)); | 160 | } while(__kuser_cmpxchg(old, new, ptr)); |
| 160 | 161 | ||
| 161 | return new; | 162 | return new; |
| 162 | } | 163 | } |
| 163 | 164 | ||
| 164 | Notes: | 165 | Notes: |
| 165 | 166 | ||
| @@ -172,7 +173,7 @@ kuser_memory_barrier | |||
| 172 | 173 | ||
| 173 | Location: 0xffff0fa0 | 174 | Location: 0xffff0fa0 |
| 174 | 175 | ||
| 175 | Reference prototype: | 176 | Reference prototype:: |
| 176 | 177 | ||
| 177 | void __kuser_memory_barrier(void); | 178 | void __kuser_memory_barrier(void); |
| 178 | 179 | ||
| @@ -193,10 +194,10 @@ Definition: | |||
| 193 | Apply any needed memory barrier to preserve consistency with data modified | 194 | Apply any needed memory barrier to preserve consistency with data modified |
| 194 | manually and __kuser_cmpxchg usage. | 195 | manually and __kuser_cmpxchg usage. |
| 195 | 196 | ||
| 196 | Usage example: | 197 | Usage example:: |
| 197 | 198 | ||
| 198 | typedef void (__kuser_dmb_t)(void); | 199 | typedef void (__kuser_dmb_t)(void); |
| 199 | #define __kuser_dmb (*(__kuser_dmb_t *)0xffff0fa0) | 200 | #define __kuser_dmb (*(__kuser_dmb_t *)0xffff0fa0) |
| 200 | 201 | ||
| 201 | Notes: | 202 | Notes: |
| 202 | 203 | ||
| @@ -207,7 +208,7 @@ kuser_cmpxchg64 | |||
| 207 | 208 | ||
| 208 | Location: 0xffff0f60 | 209 | Location: 0xffff0f60 |
| 209 | 210 | ||
| 210 | Reference prototype: | 211 | Reference prototype:: |
| 211 | 212 | ||
| 212 | int __kuser_cmpxchg64(const int64_t *oldval, | 213 | int __kuser_cmpxchg64(const int64_t *oldval, |
| 213 | const int64_t *newval, | 214 | const int64_t *newval, |
| @@ -231,22 +232,22 @@ Clobbered registers: | |||
| 231 | 232 | ||
| 232 | Definition: | 233 | Definition: |
| 233 | 234 | ||
| 234 | Atomically store the 64-bit value pointed by *newval in *ptr only if *ptr | 235 | Atomically store the 64-bit value pointed by `*newval` in `*ptr` only if `*ptr` |
| 235 | is equal to the 64-bit value pointed by *oldval. Return zero if *ptr was | 236 | is equal to the 64-bit value pointed by `*oldval`. Return zero if `*ptr` was |
| 236 | changed or non-zero if no exchange happened. | 237 | changed or non-zero if no exchange happened. |
| 237 | 238 | ||
| 238 | The C flag is also set if *ptr was changed to allow for assembly | 239 | The C flag is also set if `*ptr` was changed to allow for assembly |
| 239 | optimization in the calling code. | 240 | optimization in the calling code. |
| 240 | 241 | ||
| 241 | Usage example: | 242 | Usage example:: |
| 242 | 243 | ||
| 243 | typedef int (__kuser_cmpxchg64_t)(const int64_t *oldval, | 244 | typedef int (__kuser_cmpxchg64_t)(const int64_t *oldval, |
| 244 | const int64_t *newval, | 245 | const int64_t *newval, |
| 245 | volatile int64_t *ptr); | 246 | volatile int64_t *ptr); |
| 246 | #define __kuser_cmpxchg64 (*(__kuser_cmpxchg64_t *)0xffff0f60) | 247 | #define __kuser_cmpxchg64 (*(__kuser_cmpxchg64_t *)0xffff0f60) |
| 247 | 248 | ||
| 248 | int64_t atomic_add64(volatile int64_t *ptr, int64_t val) | 249 | int64_t atomic_add64(volatile int64_t *ptr, int64_t val) |
| 249 | { | 250 | { |
| 250 | int64_t old, new; | 251 | int64_t old, new; |
| 251 | 252 | ||
| 252 | do { | 253 | do { |
| @@ -255,7 +256,7 @@ int64_t atomic_add64(volatile int64_t *ptr, int64_t val) | |||
| 255 | } while(__kuser_cmpxchg64(&old, &new, ptr)); | 256 | } while(__kuser_cmpxchg64(&old, &new, ptr)); |
| 256 | 257 | ||
| 257 | return new; | 258 | return new; |
| 258 | } | 259 | } |
| 259 | 260 | ||
| 260 | Notes: | 261 | Notes: |
| 261 | 262 | ||
diff --git a/Documentation/arm/keystone/knav-qmss.txt b/Documentation/arm/keystone/knav-qmss.rst index fcdb9fd5f53a..7f7638d80b42 100644 --- a/Documentation/arm/keystone/knav-qmss.txt +++ b/Documentation/arm/keystone/knav-qmss.rst | |||
| @@ -1,4 +1,6 @@ | |||
| 1 | * Texas Instruments Keystone Navigator Queue Management SubSystem driver | 1 | ====================================================================== |
| 2 | Texas Instruments Keystone Navigator Queue Management SubSystem driver | ||
| 3 | ====================================================================== | ||
| 2 | 4 | ||
| 3 | Driver source code path | 5 | Driver source code path |
| 4 | drivers/soc/ti/knav_qmss.c | 6 | drivers/soc/ti/knav_qmss.c |
| @@ -34,11 +36,13 @@ driver that interface with the accumulator PDSP. This configures | |||
| 34 | accumulator channels defined in DTS (example in DT documentation) to monitor | 36 | accumulator channels defined in DTS (example in DT documentation) to monitor |
| 35 | 1 or 32 queues per channel. More description on the firmware is available in | 37 | 1 or 32 queues per channel. More description on the firmware is available in |
| 36 | CPPI/QMSS Low Level Driver document (docs/CPPI_QMSS_LLD_SDS.pdf) at | 38 | CPPI/QMSS Low Level Driver document (docs/CPPI_QMSS_LLD_SDS.pdf) at |
| 39 | |||
| 37 | git://git.ti.com/keystone-rtos/qmss-lld.git | 40 | git://git.ti.com/keystone-rtos/qmss-lld.git |
| 38 | 41 | ||
| 39 | k2_qmss_pdsp_acc48_k2_le_1_0_0_9.bin firmware supports upto 48 accumulator | 42 | k2_qmss_pdsp_acc48_k2_le_1_0_0_9.bin firmware supports upto 48 accumulator |
| 40 | channels. This firmware is available under ti-keystone folder of | 43 | channels. This firmware is available under ti-keystone folder of |
| 41 | firmware.git at | 44 | firmware.git at |
| 45 | |||
| 42 | git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git | 46 | git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git |
| 43 | 47 | ||
| 44 | To use copy the firmware image to lib/firmware folder of the initramfs or | 48 | To use copy the firmware image to lib/firmware folder of the initramfs or |
diff --git a/Documentation/arm/keystone/Overview.txt b/Documentation/arm/keystone/overview.rst index 400c0c270d2e..cd90298c493c 100644 --- a/Documentation/arm/keystone/Overview.txt +++ b/Documentation/arm/keystone/overview.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | TI Keystone Linux Overview | 1 | ========================== |
| 2 | -------------------------- | 2 | TI Keystone Linux Overview |
| 3 | ========================== | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
| @@ -9,47 +10,65 @@ for users to run Linux on Keystone based EVMs from Texas Instruments. | |||
| 9 | 10 | ||
| 10 | Following SoCs & EVMs are currently supported:- | 11 | Following SoCs & EVMs are currently supported:- |
| 11 | 12 | ||
| 12 | ------------ K2HK SoC and EVM -------------------------------------------------- | 13 | K2HK SoC and EVM |
| 14 | ================= | ||
| 13 | 15 | ||
| 14 | a.k.a Keystone 2 Hawking/Kepler SoC | 16 | a.k.a Keystone 2 Hawking/Kepler SoC |
| 15 | TCI6636K2H & TCI6636K2K: See documentation at | 17 | TCI6636K2H & TCI6636K2K: See documentation at |
| 18 | |||
| 16 | http://www.ti.com/product/tci6638k2k | 19 | http://www.ti.com/product/tci6638k2k |
| 17 | http://www.ti.com/product/tci6638k2h | 20 | http://www.ti.com/product/tci6638k2h |
| 18 | 21 | ||
| 19 | EVM: | 22 | EVM: |
| 20 | http://www.advantech.com/Support/TI-EVM/EVMK2HX_sd.aspx | 23 | http://www.advantech.com/Support/TI-EVM/EVMK2HX_sd.aspx |
| 21 | 24 | ||
| 22 | ------------ K2E SoC and EVM --------------------------------------------------- | 25 | K2E SoC and EVM |
| 26 | =============== | ||
| 23 | 27 | ||
| 24 | a.k.a Keystone 2 Edison SoC | 28 | a.k.a Keystone 2 Edison SoC |
| 25 | K2E - 66AK2E05: See documentation at | 29 | |
| 30 | K2E - 66AK2E05: | ||
| 31 | |||
| 32 | See documentation at | ||
| 33 | |||
| 26 | http://www.ti.com/product/66AK2E05/technicaldocuments | 34 | http://www.ti.com/product/66AK2E05/technicaldocuments |
| 27 | 35 | ||
| 28 | EVM: | 36 | EVM: |
| 29 | https://www.einfochips.com/index.php/partnerships/texas-instruments/k2e-evm.html | 37 | https://www.einfochips.com/index.php/partnerships/texas-instruments/k2e-evm.html |
| 30 | 38 | ||
| 31 | ------------ K2L SoC and EVM --------------------------------------------------- | 39 | K2L SoC and EVM |
| 40 | =============== | ||
| 32 | 41 | ||
| 33 | a.k.a Keystone 2 Lamarr SoC | 42 | a.k.a Keystone 2 Lamarr SoC |
| 34 | K2L - TCI6630K2L: See documentation at | 43 | |
| 44 | K2L - TCI6630K2L: | ||
| 45 | |||
| 46 | See documentation at | ||
| 35 | http://www.ti.com/product/TCI6630K2L/technicaldocuments | 47 | http://www.ti.com/product/TCI6630K2L/technicaldocuments |
| 48 | |||
| 36 | EVM: | 49 | EVM: |
| 37 | https://www.einfochips.com/index.php/partnerships/texas-instruments/k2l-evm.html | 50 | https://www.einfochips.com/index.php/partnerships/texas-instruments/k2l-evm.html |
| 38 | 51 | ||
| 39 | Configuration | 52 | Configuration |
| 40 | ------------- | 53 | ------------- |
| 41 | 54 | ||
| 42 | All of the K2 SoCs/EVMs share a common defconfig, keystone_defconfig and same | 55 | All of the K2 SoCs/EVMs share a common defconfig, keystone_defconfig and same |
| 43 | image is used to boot on individual EVMs. The platform configuration is | 56 | image is used to boot on individual EVMs. The platform configuration is |
| 44 | specified through DTS. Following are the DTS used:- | 57 | specified through DTS. Following are the DTS used: |
| 45 | K2HK EVM : k2hk-evm.dts | 58 | |
| 46 | K2E EVM : k2e-evm.dts | 59 | K2HK EVM: |
| 47 | K2L EVM : k2l-evm.dts | 60 | k2hk-evm.dts |
| 61 | K2E EVM: | ||
| 62 | k2e-evm.dts | ||
| 63 | K2L EVM: | ||
| 64 | k2l-evm.dts | ||
| 48 | 65 | ||
| 49 | The device tree documentation for the keystone machines are located at | 66 | The device tree documentation for the keystone machines are located at |
| 67 | |||
| 50 | Documentation/devicetree/bindings/arm/keystone/keystone.txt | 68 | Documentation/devicetree/bindings/arm/keystone/keystone.txt |
| 51 | 69 | ||
| 52 | Document Author | 70 | Document Author |
| 53 | --------------- | 71 | --------------- |
| 54 | Murali Karicheri <m-karicheri2@ti.com> | 72 | Murali Karicheri <m-karicheri2@ti.com> |
| 73 | |||
| 55 | Copyright 2015 Texas Instruments | 74 | Copyright 2015 Texas Instruments |
diff --git a/Documentation/arm/marvel.rst b/Documentation/arm/marvel.rst new file mode 100644 index 000000000000..16ab2eb085b8 --- /dev/null +++ b/Documentation/arm/marvel.rst | |||
| @@ -0,0 +1,488 @@ | |||
| 1 | ================ | ||
| 2 | ARM Marvell SoCs | ||
| 3 | ================ | ||
| 4 | |||
| 5 | This document lists all the ARM Marvell SoCs that are currently | ||
| 6 | supported in mainline by the Linux kernel. As the Marvell families of | ||
| 7 | SoCs are large and complex, it is hard to understand where the support | ||
| 8 | for a particular SoC is available in the Linux kernel. This document | ||
| 9 | tries to help in understanding where those SoCs are supported, and to | ||
| 10 | match them with their corresponding public datasheet, when available. | ||
| 11 | |||
| 12 | Orion family | ||
| 13 | ------------ | ||
| 14 | |||
| 15 | Flavors: | ||
| 16 | - 88F5082 | ||
| 17 | - 88F5181 | ||
| 18 | - 88F5181L | ||
| 19 | - 88F5182 | ||
| 20 | |||
| 21 | - Datasheet: http://www.embeddedarm.com/documentation/third-party/MV88F5182-datasheet.pdf | ||
| 22 | - Programmer's User Guide: http://www.embeddedarm.com/documentation/third-party/MV88F5182-opensource-manual.pdf | ||
| 23 | - User Manual: http://www.embeddedarm.com/documentation/third-party/MV88F5182-usermanual.pdf | ||
| 24 | - 88F5281 | ||
| 25 | |||
| 26 | - Datasheet: http://www.ocmodshop.com/images/reviews/networking/qnap_ts409u/marvel_88f5281_data_sheet.pdf | ||
| 27 | - 88F6183 | ||
| 28 | Core: | ||
| 29 | Feroceon 88fr331 (88f51xx) or 88fr531-vd (88f52xx) ARMv5 compatible | ||
| 30 | Linux kernel mach directory: | ||
| 31 | arch/arm/mach-orion5x | ||
| 32 | Linux kernel plat directory: | ||
| 33 | arch/arm/plat-orion | ||
| 34 | |||
| 35 | Kirkwood family | ||
| 36 | --------------- | ||
| 37 | |||
| 38 | Flavors: | ||
| 39 | - 88F6282 a.k.a Armada 300 | ||
| 40 | |||
| 41 | - Product Brief : http://www.marvell.com/embedded-processors/armada-300/assets/armada_310.pdf | ||
| 42 | - 88F6283 a.k.a Armada 310 | ||
| 43 | |||
| 44 | - Product Brief : http://www.marvell.com/embedded-processors/armada-300/assets/armada_310.pdf | ||
| 45 | - 88F6190 | ||
| 46 | |||
| 47 | - Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6190-003_WEB.pdf | ||
| 48 | - Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F619x_OpenSource.pdf | ||
| 49 | - Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf | ||
| 50 | - 88F6192 | ||
| 51 | |||
| 52 | - Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6192-003_ver1.pdf | ||
| 53 | - Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F619x_OpenSource.pdf | ||
| 54 | - Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf | ||
| 55 | - 88F6182 | ||
| 56 | - 88F6180 | ||
| 57 | |||
| 58 | - Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6180-003_ver1.pdf | ||
| 59 | - Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6180_OpenSource.pdf | ||
| 60 | - Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf | ||
| 61 | - 88F6281 | ||
| 62 | |||
| 63 | - Product Brief : http://www.marvell.com/embedded-processors/kirkwood/assets/88F6281-004_ver1.pdf | ||
| 64 | - Hardware Spec : http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf | ||
| 65 | - Functional Spec: http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf | ||
| 66 | Homepage: | ||
| 67 | http://www.marvell.com/embedded-processors/kirkwood/ | ||
| 68 | Core: | ||
| 69 | Feroceon 88fr131 ARMv5 compatible | ||
| 70 | Linux kernel mach directory: | ||
| 71 | arch/arm/mach-mvebu | ||
| 72 | Linux kernel plat directory: | ||
| 73 | none | ||
| 74 | |||
| 75 | Discovery family | ||
| 76 | ---------------- | ||
| 77 | |||
| 78 | Flavors: | ||
| 79 | - MV78100 | ||
| 80 | |||
| 81 | - Product Brief : http://www.marvell.com/embedded-processors/discovery-innovation/assets/MV78100-003_WEB.pdf | ||
| 82 | - Hardware Spec : http://www.marvell.com/embedded-processors/discovery-innovation/assets/HW_MV78100_OpenSource.pdf | ||
| 83 | - Functional Spec: http://www.marvell.com/embedded-processors/discovery-innovation/assets/FS_MV76100_78100_78200_OpenSource.pdf | ||
| 84 | - MV78200 | ||
| 85 | |||
| 86 | - Product Brief : http://www.marvell.com/embedded-processors/discovery-innovation/assets/MV78200-002_WEB.pdf | ||
| 87 | - Hardware Spec : http://www.marvell.com/embedded-processors/discovery-innovation/assets/HW_MV78200_OpenSource.pdf | ||
| 88 | - Functional Spec: http://www.marvell.com/embedded-processors/discovery-innovation/assets/FS_MV76100_78100_78200_OpenSource.pdf | ||
| 89 | - MV76100 | ||
| 90 | |||
| 91 | Not supported by the Linux kernel. | ||
| 92 | |||
| 93 | Core: | ||
| 94 | Feroceon 88fr571-vd ARMv5 compatible | ||
| 95 | |||
| 96 | Linux kernel mach directory: | ||
| 97 | arch/arm/mach-mv78xx0 | ||
| 98 | Linux kernel plat directory: | ||
| 99 | arch/arm/plat-orion | ||
| 100 | |||
| 101 | EBU Armada family | ||
| 102 | ----------------- | ||
| 103 | |||
| 104 | Armada 370 Flavors: | ||
| 105 | - 88F6710 | ||
| 106 | - 88F6707 | ||
| 107 | - 88F6W11 | ||
| 108 | |||
| 109 | - Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf | ||
| 110 | - Hardware Spec: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-datasheet.pdf | ||
| 111 | - Functional Spec: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-FunctionalSpec-datasheet.pdf | ||
| 112 | |||
| 113 | Core: | ||
| 114 | Sheeva ARMv7 compatible PJ4B | ||
| 115 | |||
| 116 | Armada 375 Flavors: | ||
| 117 | - 88F6720 | ||
| 118 | |||
| 119 | - Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA_375_SoC-01_product_brief.pdf | ||
| 120 | |||
| 121 | Core: | ||
| 122 | ARM Cortex-A9 | ||
| 123 | |||
| 124 | Armada 38x Flavors: | ||
| 125 | - 88F6810 Armada 380 | ||
| 126 | - 88F6820 Armada 385 | ||
| 127 | - 88F6828 Armada 388 | ||
| 128 | |||
| 129 | - Product infos: http://www.marvell.com/embedded-processors/armada-38x/ | ||
| 130 | - Functional Spec: https://marvellcorp.wufoo.com/forms/marvell-armada-38x-functional-specifications/ | ||
| 131 | |||
| 132 | Core: | ||
| 133 | ARM Cortex-A9 | ||
| 134 | |||
| 135 | Armada 39x Flavors: | ||
| 136 | - 88F6920 Armada 390 | ||
| 137 | - 88F6928 Armada 398 | ||
| 138 | |||
| 139 | - Product infos: http://www.marvell.com/embedded-processors/armada-39x/ | ||
| 140 | |||
| 141 | Core: | ||
| 142 | ARM Cortex-A9 | ||
| 143 | |||
| 144 | Armada XP Flavors: | ||
| 145 | - MV78230 | ||
| 146 | - MV78260 | ||
| 147 | - MV78460 | ||
| 148 | |||
| 149 | NOTE: | ||
| 150 | not to be confused with the non-SMP 78xx0 SoCs | ||
| 151 | |||
| 152 | Product Brief: | ||
| 153 | http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf | ||
| 154 | |||
| 155 | Functional Spec: | ||
| 156 | http://www.marvell.com/embedded-processors/armada-xp/assets/ARMADA-XP-Functional-SpecDatasheet.pdf | ||
| 157 | |||
| 158 | - Hardware Specs: | ||
| 159 | |||
| 160 | - http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78230_OS.PDF | ||
| 161 | - http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78260_OS.PDF | ||
| 162 | - http://www.marvell.com/embedded-processors/armada-xp/assets/HW_MV78460_OS.PDF | ||
| 163 | |||
| 164 | Core: | ||
| 165 | Sheeva ARMv7 compatible Dual-core or Quad-core PJ4B-MP | ||
| 166 | |||
| 167 | Linux kernel mach directory: | ||
| 168 | arch/arm/mach-mvebu | ||
| 169 | Linux kernel plat directory: | ||
| 170 | none | ||
| 171 | |||
| 172 | EBU Armada family ARMv8 | ||
| 173 | ----------------------- | ||
| 174 | |||
| 175 | Armada 3710/3720 Flavors: | ||
| 176 | - 88F3710 | ||
| 177 | - 88F3720 | ||
| 178 | |||
| 179 | Core: | ||
| 180 | ARM Cortex A53 (ARMv8) | ||
| 181 | |||
| 182 | Homepage: | ||
| 183 | http://www.marvell.com/embedded-processors/armada-3700/ | ||
| 184 | |||
| 185 | Product Brief: | ||
| 186 | http://www.marvell.com/embedded-processors/assets/PB-88F3700-FNL.pdf | ||
| 187 | |||
| 188 | Device tree files: | ||
| 189 | arch/arm64/boot/dts/marvell/armada-37* | ||
| 190 | |||
| 191 | Armada 7K Flavors: | ||
| 192 | - 88F7020 (AP806 Dual + one CP110) | ||
| 193 | - 88F7040 (AP806 Quad + one CP110) | ||
| 194 | |||
| 195 | Core: ARM Cortex A72 | ||
| 196 | |||
| 197 | Homepage: | ||
| 198 | http://www.marvell.com/embedded-processors/armada-70xx/ | ||
| 199 | |||
| 200 | Product Brief: | ||
| 201 | - http://www.marvell.com/embedded-processors/assets/Armada7020PB-Jan2016.pdf | ||
| 202 | - http://www.marvell.com/embedded-processors/assets/Armada7040PB-Jan2016.pdf | ||
| 203 | |||
| 204 | Device tree files: | ||
| 205 | arch/arm64/boot/dts/marvell/armada-70* | ||
| 206 | |||
| 207 | Armada 8K Flavors: | ||
| 208 | - 88F8020 (AP806 Dual + two CP110) | ||
| 209 | - 88F8040 (AP806 Quad + two CP110) | ||
| 210 | Core: | ||
| 211 | ARM Cortex A72 | ||
| 212 | |||
| 213 | Homepage: | ||
| 214 | http://www.marvell.com/embedded-processors/armada-80xx/ | ||
| 215 | |||
| 216 | Product Brief: | ||
| 217 | - http://www.marvell.com/embedded-processors/assets/Armada8020PB-Jan2016.pdf | ||
| 218 | - http://www.marvell.com/embedded-processors/assets/Armada8040PB-Jan2016.pdf | ||
| 219 | |||
| 220 | Device tree files: | ||
| 221 | arch/arm64/boot/dts/marvell/armada-80* | ||
| 222 | |||
| 223 | Avanta family | ||
| 224 | ------------- | ||
| 225 | |||
| 226 | Flavors: | ||
| 227 | - 88F6510 | ||
| 228 | - 88F6530P | ||
| 229 | - 88F6550 | ||
| 230 | - 88F6560 | ||
| 231 | |||
| 232 | Homepage: | ||
| 233 | http://www.marvell.com/broadband/ | ||
| 234 | |||
| 235 | Product Brief: | ||
| 236 | http://www.marvell.com/broadband/assets/Marvell_Avanta_88F6510_305_060-001_product_brief.pdf | ||
| 237 | |||
| 238 | No public datasheet available. | ||
| 239 | |||
| 240 | Core: | ||
| 241 | ARMv5 compatible | ||
| 242 | |||
| 243 | Linux kernel mach directory: | ||
| 244 | no code in mainline yet, planned for the future | ||
| 245 | Linux kernel plat directory: | ||
| 246 | no code in mainline yet, planned for the future | ||
| 247 | |||
| 248 | Storage family | ||
| 249 | -------------- | ||
| 250 | |||
| 251 | Armada SP: | ||
| 252 | - 88RC1580 | ||
| 253 | |||
| 254 | Product infos: | ||
| 255 | http://www.marvell.com/storage/armada-sp/ | ||
| 256 | |||
| 257 | Core: | ||
| 258 | Sheeva ARMv7 comatible Quad-core PJ4C | ||
| 259 | |||
| 260 | (not supported in upstream Linux kernel) | ||
| 261 | |||
| 262 | Dove family (application processor) | ||
| 263 | ----------------------------------- | ||
| 264 | |||
| 265 | Flavors: | ||
| 266 | - 88AP510 a.k.a Armada 510 | ||
| 267 | |||
| 268 | Product Brief: | ||
| 269 | http://www.marvell.com/application-processors/armada-500/assets/Marvell_Armada510_SoC.pdf | ||
| 270 | |||
| 271 | Hardware Spec: | ||
| 272 | http://www.marvell.com/application-processors/armada-500/assets/Armada-510-Hardware-Spec.pdf | ||
| 273 | |||
| 274 | Functional Spec: | ||
| 275 | http://www.marvell.com/application-processors/armada-500/assets/Armada-510-Functional-Spec.pdf | ||
| 276 | |||
| 277 | Homepage: | ||
| 278 | http://www.marvell.com/application-processors/armada-500/ | ||
| 279 | |||
| 280 | Core: | ||
| 281 | ARMv7 compatible | ||
| 282 | |||
| 283 | Directory: | ||
| 284 | - arch/arm/mach-mvebu (DT enabled platforms) | ||
| 285 | - arch/arm/mach-dove (non-DT enabled platforms) | ||
| 286 | |||
| 287 | PXA 2xx/3xx/93x/95x family | ||
| 288 | -------------------------- | ||
| 289 | |||
| 290 | Flavors: | ||
| 291 | - PXA21x, PXA25x, PXA26x | ||
| 292 | - Application processor only | ||
| 293 | - Core: ARMv5 XScale1 core | ||
| 294 | - PXA270, PXA271, PXA272 | ||
| 295 | - Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_pb.pdf | ||
| 296 | - Design guide : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_design_guide.pdf | ||
| 297 | - Developers manual : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_dev_man.pdf | ||
| 298 | - Specification : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_emts.pdf | ||
| 299 | - Specification update : http://www.marvell.com/application-processors/pxa-family/assets/pxa_27x_spec_update.pdf | ||
| 300 | - Application processor only | ||
| 301 | - Core: ARMv5 XScale2 core | ||
| 302 | - PXA300, PXA310, PXA320 | ||
| 303 | - PXA 300 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA300_PB_R4.pdf | ||
| 304 | - PXA 310 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA310_PB_R4.pdf | ||
| 305 | - PXA 320 Product Brief : http://www.marvell.com/application-processors/pxa-family/assets/PXA320_PB_R4.pdf | ||
| 306 | - Design guide : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Design_Guide.pdf | ||
| 307 | - Developers manual : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Developers_Manual.zip | ||
| 308 | - Specifications : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_EMTS.pdf | ||
| 309 | - Specification Update : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_Spec_Update.zip | ||
| 310 | - Reference Manual : http://www.marvell.com/application-processors/pxa-family/assets/PXA3xx_TavorP_BootROM_Ref_Manual.pdf | ||
| 311 | - Application processor only | ||
| 312 | - Core: ARMv5 XScale3 core | ||
| 313 | - PXA930, PXA935 | ||
| 314 | - Application processor with Communication processor | ||
| 315 | - Core: ARMv5 XScale3 core | ||
| 316 | - PXA955 | ||
| 317 | - Application processor with Communication processor | ||
| 318 | - Core: ARMv7 compatible Sheeva PJ4 core | ||
| 319 | |||
| 320 | Comments: | ||
| 321 | |||
| 322 | * This line of SoCs originates from the XScale family developed by | ||
| 323 | Intel and acquired by Marvell in ~2006. The PXA21x, PXA25x, | ||
| 324 | PXA26x, PXA27x, PXA3xx and PXA93x were developed by Intel, while | ||
| 325 | the later PXA95x were developed by Marvell. | ||
| 326 | |||
| 327 | * Due to their XScale origin, these SoCs have virtually nothing in | ||
| 328 | common with the other (Kirkwood, Dove, etc.) families of Marvell | ||
| 329 | SoCs, except with the MMP/MMP2 family of SoCs. | ||
| 330 | |||
| 331 | Linux kernel mach directory: | ||
| 332 | arch/arm/mach-pxa | ||
| 333 | Linux kernel plat directory: | ||
| 334 | arch/arm/plat-pxa | ||
| 335 | |||
| 336 | MMP/MMP2/MMP3 family (communication processor) | ||
| 337 | ---------------------------------------------- | ||
| 338 | |||
| 339 | Flavors: | ||
| 340 | - PXA168, a.k.a Armada 168 | ||
| 341 | - Homepage : http://www.marvell.com/application-processors/armada-100/armada-168.jsp | ||
| 342 | - Product brief : http://www.marvell.com/application-processors/armada-100/assets/pxa_168_pb.pdf | ||
| 343 | - Hardware manual : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_datasheet.pdf | ||
| 344 | - Software manual : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_software_manual.pdf | ||
| 345 | - Specification update : http://www.marvell.com/application-processors/armada-100/assets/ARMADA16x_Spec_update.pdf | ||
| 346 | - Boot ROM manual : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_ref_manual.pdf | ||
| 347 | - App node package : http://www.marvell.com/application-processors/armada-100/assets/armada_16x_app_note_package.pdf | ||
| 348 | - Application processor only | ||
| 349 | - Core: ARMv5 compatible Marvell PJ1 88sv331 (Mohawk) | ||
| 350 | - PXA910/PXA920 | ||
| 351 | - Homepage : http://www.marvell.com/communication-processors/pxa910/ | ||
| 352 | - Product Brief : http://www.marvell.com/communication-processors/pxa910/assets/Marvell_PXA910_Platform-001_PB_final.pdf | ||
| 353 | - Application processor with Communication processor | ||
| 354 | - Core: ARMv5 compatible Marvell PJ1 88sv331 (Mohawk) | ||
| 355 | - PXA688, a.k.a. MMP2, a.k.a Armada 610 | ||
| 356 | - Product Brief : http://www.marvell.com/application-processors/armada-600/assets/armada610_pb.pdf | ||
| 357 | - Application processor only | ||
| 358 | - Core: ARMv7 compatible Sheeva PJ4 88sv581x core | ||
| 359 | - PXA2128, a.k.a. MMP3 (OLPC XO4, Linux support not upstream) | ||
| 360 | - Product Brief : http://www.marvell.com/application-processors/armada/pxa2128/assets/Marvell-ARMADA-PXA2128-SoC-PB.pdf | ||
| 361 | - Application processor only | ||
| 362 | - Core: Dual-core ARMv7 compatible Sheeva PJ4C core | ||
| 363 | - PXA960/PXA968/PXA978 (Linux support not upstream) | ||
| 364 | - Application processor with Communication Processor | ||
| 365 | - Core: ARMv7 compatible Sheeva PJ4 core | ||
| 366 | - PXA986/PXA988 (Linux support not upstream) | ||
| 367 | - Application processor with Communication Processor | ||
| 368 | - Core: Dual-core ARMv7 compatible Sheeva PJ4B-MP core | ||
| 369 | - PXA1088/PXA1920 (Linux support not upstream) | ||
| 370 | - Application processor with Communication Processor | ||
| 371 | - Core: quad-core ARMv7 Cortex-A7 | ||
| 372 | - PXA1908/PXA1928/PXA1936 | ||
| 373 | - Application processor with Communication Processor | ||
| 374 | - Core: multi-core ARMv8 Cortex-A53 | ||
| 375 | |||
| 376 | Comments: | ||
| 377 | |||
| 378 | * This line of SoCs originates from the XScale family developed by | ||
| 379 | Intel and acquired by Marvell in ~2006. All the processors of | ||
| 380 | this MMP/MMP2 family were developed by Marvell. | ||
| 381 | |||
| 382 | * Due to their XScale origin, these SoCs have virtually nothing in | ||
| 383 | common with the other (Kirkwood, Dove, etc.) families of Marvell | ||
| 384 | SoCs, except with the PXA family of SoCs listed above. | ||
| 385 | |||
| 386 | Linux kernel mach directory: | ||
| 387 | arch/arm/mach-mmp | ||
| 388 | Linux kernel plat directory: | ||
| 389 | arch/arm/plat-pxa | ||
| 390 | |||
| 391 | Berlin family (Multimedia Solutions) | ||
| 392 | ------------------------------------- | ||
| 393 | |||
| 394 | - Flavors: | ||
| 395 | - 88DE3010, Armada 1000 (no Linux support) | ||
| 396 | - Core: Marvell PJ1 (ARMv5TE), Dual-core | ||
| 397 | - Product Brief: http://www.marvell.com.cn/digital-entertainment/assets/armada_1000_pb.pdf | ||
| 398 | - 88DE3005, Armada 1500 Mini | ||
| 399 | - Design name: BG2CD | ||
| 400 | - Core: ARM Cortex-A9, PL310 L2CC | ||
| 401 | - 88DE3006, Armada 1500 Mini Plus | ||
| 402 | - Design name: BG2CDP | ||
| 403 | - Core: Dual Core ARM Cortex-A7 | ||
| 404 | - 88DE3100, Armada 1500 | ||
| 405 | - Design name: BG2 | ||
| 406 | - Core: Marvell PJ4B-MP (ARMv7), Tauros3 L2CC | ||
| 407 | - 88DE3114, Armada 1500 Pro | ||
| 408 | - Design name: BG2Q | ||
| 409 | - Core: Quad Core ARM Cortex-A9, PL310 L2CC | ||
| 410 | - 88DE3214, Armada 1500 Pro 4K | ||
| 411 | - Design name: BG3 | ||
| 412 | - Core: ARM Cortex-A15, CA15 integrated L2CC | ||
| 413 | - 88DE3218, ARMADA 1500 Ultra | ||
| 414 | - Core: ARM Cortex-A53 | ||
| 415 | |||
| 416 | Homepage: https://www.synaptics.com/products/multimedia-solutions | ||
| 417 | Directory: arch/arm/mach-berlin | ||
| 418 | |||
| 419 | Comments: | ||
| 420 | |||
| 421 | * This line of SoCs is based on Marvell Sheeva or ARM Cortex CPUs | ||
| 422 | with Synopsys DesignWare (IRQ, GPIO, Timers, ...) and PXA IP (SDHCI, USB, ETH, ...). | ||
| 423 | |||
| 424 | * The Berlin family was acquired by Synaptics from Marvell in 2017. | ||
| 425 | |||
| 426 | CPU Cores | ||
| 427 | --------- | ||
| 428 | |||
| 429 | The XScale cores were designed by Intel, and shipped by Marvell in the older | ||
| 430 | PXA processors. Feroceon is a Marvell designed core that developed in-house, | ||
| 431 | and that evolved into Sheeva. The XScale and Feroceon cores were phased out | ||
| 432 | over time and replaced with Sheeva cores in later products, which subsequently | ||
| 433 | got replaced with licensed ARM Cortex-A cores. | ||
| 434 | |||
| 435 | XScale 1 | ||
| 436 | CPUID 0x69052xxx | ||
| 437 | ARMv5, iWMMXt | ||
| 438 | XScale 2 | ||
| 439 | CPUID 0x69054xxx | ||
| 440 | ARMv5, iWMMXt | ||
| 441 | XScale 3 | ||
| 442 | CPUID 0x69056xxx or 0x69056xxx | ||
| 443 | ARMv5, iWMMXt | ||
| 444 | Feroceon-1850 88fr331 "Mohawk" | ||
| 445 | CPUID 0x5615331x or 0x41xx926x | ||
| 446 | ARMv5TE, single issue | ||
| 447 | Feroceon-2850 88fr531-vd "Jolteon" | ||
| 448 | CPUID 0x5605531x or 0x41xx926x | ||
| 449 | ARMv5TE, VFP, dual-issue | ||
| 450 | Feroceon 88fr571-vd "Jolteon" | ||
| 451 | CPUID 0x5615571x | ||
| 452 | ARMv5TE, VFP, dual-issue | ||
| 453 | Feroceon 88fr131 "Mohawk-D" | ||
| 454 | CPUID 0x5625131x | ||
| 455 | ARMv5TE, single-issue in-order | ||
| 456 | Sheeva PJ1 88sv331 "Mohawk" | ||
| 457 | CPUID 0x561584xx | ||
| 458 | ARMv5, single-issue iWMMXt v2 | ||
| 459 | Sheeva PJ4 88sv581x "Flareon" | ||
| 460 | CPUID 0x560f581x | ||
| 461 | ARMv7, idivt, optional iWMMXt v2 | ||
| 462 | Sheeva PJ4B 88sv581x | ||
| 463 | CPUID 0x561f581x | ||
| 464 | ARMv7, idivt, optional iWMMXt v2 | ||
| 465 | Sheeva PJ4B-MP / PJ4C | ||
| 466 | CPUID 0x562f584x | ||
| 467 | ARMv7, idivt/idiva, LPAE, optional iWMMXt v2 and/or NEON | ||
| 468 | |||
| 469 | Long-term plans | ||
| 470 | --------------- | ||
| 471 | |||
| 472 | * Unify the mach-dove/, mach-mv78xx0/, mach-orion5x/ into the | ||
| 473 | mach-mvebu/ to support all SoCs from the Marvell EBU (Engineering | ||
| 474 | Business Unit) in a single mach-<foo> directory. The plat-orion/ | ||
| 475 | would therefore disappear. | ||
| 476 | |||
| 477 | * Unify the mach-mmp/ and mach-pxa/ into the same mach-pxa | ||
| 478 | directory. The plat-pxa/ would therefore disappear. | ||
| 479 | |||
| 480 | Credits | ||
| 481 | ------- | ||
| 482 | |||
| 483 | - Maen Suleiman <maen@marvell.com> | ||
| 484 | - Lior Amsalem <alior@marvell.com> | ||
| 485 | - Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
| 486 | - Andrew Lunn <andrew@lunn.ch> | ||
| 487 | - Nicolas Pitre <nico@fluxnic.net> | ||
| 488 | - Eric Miao <eric.y.miao@gmail.com> | ||
diff --git a/Documentation/arm/mem_alignment b/Documentation/arm/mem_alignment.rst index e110e2781039..aa22893b62bc 100644 --- a/Documentation/arm/mem_alignment +++ b/Documentation/arm/mem_alignment.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ================ | ||
| 2 | Memory alignment | ||
| 3 | ================ | ||
| 4 | |||
| 1 | Too many problems popped up because of unnoticed misaligned memory access in | 5 | Too many problems popped up because of unnoticed misaligned memory access in |
| 2 | kernel code lately. Therefore the alignment fixup is now unconditionally | 6 | kernel code lately. Therefore the alignment fixup is now unconditionally |
| 3 | configured in for SA11x0 based targets. According to Alan Cox, this is a | 7 | configured in for SA11x0 based targets. According to Alan Cox, this is a |
| @@ -26,9 +30,9 @@ space, and might cause programs to fail unexpectedly. | |||
| 26 | To change the alignment trap behavior, simply echo a number into | 30 | To change the alignment trap behavior, simply echo a number into |
| 27 | /proc/cpu/alignment. The number is made up from various bits: | 31 | /proc/cpu/alignment. The number is made up from various bits: |
| 28 | 32 | ||
| 33 | === ======================================================== | ||
| 29 | bit behavior when set | 34 | bit behavior when set |
| 30 | --- ----------------- | 35 | === ======================================================== |
| 31 | |||
| 32 | 0 A user process performing an unaligned memory access | 36 | 0 A user process performing an unaligned memory access |
| 33 | will cause the kernel to print a message indicating | 37 | will cause the kernel to print a message indicating |
| 34 | process name, pid, pc, instruction, address, and the | 38 | process name, pid, pc, instruction, address, and the |
| @@ -41,12 +45,13 @@ bit behavior when set | |||
| 41 | 45 | ||
| 42 | 2 The kernel will send a SIGBUS signal to the user process | 46 | 2 The kernel will send a SIGBUS signal to the user process |
| 43 | performing the unaligned access. | 47 | performing the unaligned access. |
| 48 | === ======================================================== | ||
| 44 | 49 | ||
| 45 | Note that not all combinations are supported - only values 0 through 5. | 50 | Note that not all combinations are supported - only values 0 through 5. |
| 46 | (6 and 7 don't make sense). | 51 | (6 and 7 don't make sense). |
| 47 | 52 | ||
| 48 | For example, the following will turn on the warnings, but without | 53 | For example, the following will turn on the warnings, but without |
| 49 | fixing up or sending SIGBUS signals: | 54 | fixing up or sending SIGBUS signals:: |
| 50 | 55 | ||
| 51 | echo 1 > /proc/cpu/alignment | 56 | echo 1 > /proc/cpu/alignment |
| 52 | 57 | ||
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.rst index 546a39048eb0..0521b4ce5c96 100644 --- a/Documentation/arm/memory.txt +++ b/Documentation/arm/memory.rst | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | Kernel Memory Layout on ARM Linux | 1 | ================================= |
| 2 | Kernel Memory Layout on ARM Linux | ||
| 3 | ================================= | ||
| 2 | 4 | ||
| 3 | Russell King <rmk@arm.linux.org.uk> | 5 | Russell King <rmk@arm.linux.org.uk> |
| 6 | |||
| 4 | November 17, 2005 (2.6.15) | 7 | November 17, 2005 (2.6.15) |
| 5 | 8 | ||
| 6 | This document describes the virtual memory layout which the Linux | 9 | This document describes the virtual memory layout which the Linux |
| @@ -15,8 +18,9 @@ As the ARM architecture matures, it becomes necessary to reserve | |||
| 15 | certain regions of VM space for use for new facilities; therefore | 18 | certain regions of VM space for use for new facilities; therefore |
| 16 | this document may reserve more VM space over time. | 19 | this document may reserve more VM space over time. |
| 17 | 20 | ||
| 21 | =============== =============== =============================================== | ||
| 18 | Start End Use | 22 | Start End Use |
| 19 | -------------------------------------------------------------------------- | 23 | =============== =============== =============================================== |
| 20 | ffff8000 ffffffff copy_user_page / clear_user_page use. | 24 | ffff8000 ffffffff copy_user_page / clear_user_page use. |
| 21 | For SA11xx and Xscale, this is used to | 25 | For SA11xx and Xscale, this is used to |
| 22 | setup a minicache mapping. | 26 | setup a minicache mapping. |
| @@ -77,6 +81,7 @@ MODULES_VADDR MODULES_END-1 Kernel module space | |||
| 77 | place their vector page here. NULL pointer | 81 | place their vector page here. NULL pointer |
| 78 | dereferences by both the kernel and user | 82 | dereferences by both the kernel and user |
| 79 | space are also caught via this mapping. | 83 | space are also caught via this mapping. |
| 84 | =============== =============== =============================================== | ||
| 80 | 85 | ||
| 81 | Please note that mappings which collide with the above areas may result | 86 | Please note that mappings which collide with the above areas may result |
| 82 | in a non-bootable kernel, or may cause the kernel to (eventually) panic | 87 | in a non-bootable kernel, or may cause the kernel to (eventually) panic |
diff --git a/Documentation/arm/Microchip/README b/Documentation/arm/microchip.rst index a366f37d38f1..c9a44c98e868 100644 --- a/Documentation/arm/Microchip/README +++ b/Documentation/arm/microchip.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ============================= | ||
| 1 | ARM Microchip SoCs (aka AT91) | 2 | ARM Microchip SoCs (aka AT91) |
| 2 | ============================= | 3 | ============================= |
| 3 | 4 | ||
| @@ -22,32 +23,46 @@ the Microchip website: http://www.microchip.com. | |||
| 22 | Flavors: | 23 | Flavors: |
| 23 | * ARM 920 based SoC | 24 | * ARM 920 based SoC |
| 24 | - at91rm9200 | 25 | - at91rm9200 |
| 25 | + Datasheet | 26 | |
| 27 | * Datasheet | ||
| 28 | |||
| 26 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-1768-32-bit-ARM920T-Embedded-Microprocessor-AT91RM9200_Datasheet.pdf | 29 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-1768-32-bit-ARM920T-Embedded-Microprocessor-AT91RM9200_Datasheet.pdf |
| 27 | 30 | ||
| 28 | * ARM 926 based SoCs | 31 | * ARM 926 based SoCs |
| 29 | - at91sam9260 | 32 | - at91sam9260 |
| 30 | + Datasheet | 33 | |
| 34 | * Datasheet | ||
| 35 | |||
| 31 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-6221-32-bit-ARM926EJ-S-Embedded-Microprocessor-SAM9260_Datasheet.pdf | 36 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-6221-32-bit-ARM926EJ-S-Embedded-Microprocessor-SAM9260_Datasheet.pdf |
| 32 | 37 | ||
| 33 | - at91sam9xe | 38 | - at91sam9xe |
| 34 | + Datasheet | 39 | |
| 40 | * Datasheet | ||
| 41 | |||
| 35 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-6254-32-bit-ARM926EJ-S-Embedded-Microprocessor-SAM9XE_Datasheet.pdf | 42 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-6254-32-bit-ARM926EJ-S-Embedded-Microprocessor-SAM9XE_Datasheet.pdf |
| 36 | 43 | ||
| 37 | - at91sam9261 | 44 | - at91sam9261 |
| 38 | + Datasheet | 45 | |
| 46 | * Datasheet | ||
| 47 | |||
| 39 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-6062-ARM926EJ-S-Microprocessor-SAM9261_Datasheet.pdf | 48 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-6062-ARM926EJ-S-Microprocessor-SAM9261_Datasheet.pdf |
| 40 | 49 | ||
| 41 | - at91sam9263 | 50 | - at91sam9263 |
| 42 | + Datasheet | 51 | |
| 52 | * Datasheet | ||
| 53 | |||
| 43 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-6249-32-bit-ARM926EJ-S-Embedded-Microprocessor-SAM9263_Datasheet.pdf | 54 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-6249-32-bit-ARM926EJ-S-Embedded-Microprocessor-SAM9263_Datasheet.pdf |
| 44 | 55 | ||
| 45 | - at91sam9rl | 56 | - at91sam9rl |
| 46 | + Datasheet | 57 | |
| 58 | * Datasheet | ||
| 59 | |||
| 47 | http://ww1.microchip.com/downloads/en/DeviceDoc/doc6289.pdf | 60 | http://ww1.microchip.com/downloads/en/DeviceDoc/doc6289.pdf |
| 48 | 61 | ||
| 49 | - at91sam9g20 | 62 | - at91sam9g20 |
| 50 | + Datasheet | 63 | |
| 64 | * Datasheet | ||
| 65 | |||
| 51 | http://ww1.microchip.com/downloads/en/DeviceDoc/DS60001516A.pdf | 66 | http://ww1.microchip.com/downloads/en/DeviceDoc/DS60001516A.pdf |
| 52 | 67 | ||
| 53 | - at91sam9g45 family | 68 | - at91sam9g45 family |
| @@ -55,7 +70,9 @@ the Microchip website: http://www.microchip.com. | |||
| 55 | - at91sam9g46 | 70 | - at91sam9g46 |
| 56 | - at91sam9m10 | 71 | - at91sam9m10 |
| 57 | - at91sam9m11 (device superset) | 72 | - at91sam9m11 (device superset) |
| 58 | + Datasheet | 73 | |
| 74 | * Datasheet | ||
| 75 | |||
| 59 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-6437-32-bit-ARM926-Embedded-Microprocessor-SAM9M11_Datasheet.pdf | 76 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-6437-32-bit-ARM926-Embedded-Microprocessor-SAM9M11_Datasheet.pdf |
| 60 | 77 | ||
| 61 | - at91sam9x5 family (aka "The 5 series") | 78 | - at91sam9x5 family (aka "The 5 series") |
| @@ -64,33 +81,44 @@ the Microchip website: http://www.microchip.com. | |||
| 64 | - at91sam9g35 | 81 | - at91sam9g35 |
| 65 | - at91sam9x25 | 82 | - at91sam9x25 |
| 66 | - at91sam9x35 | 83 | - at91sam9x35 |
| 67 | + Datasheet (can be considered as covering the whole family) | 84 | |
| 85 | * Datasheet (can be considered as covering the whole family) | ||
| 86 | |||
| 68 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-11055-32-bit-ARM926EJ-S-Microcontroller-SAM9X35_Datasheet.pdf | 87 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-11055-32-bit-ARM926EJ-S-Microcontroller-SAM9X35_Datasheet.pdf |
| 69 | 88 | ||
| 70 | - at91sam9n12 | 89 | - at91sam9n12 |
| 71 | + Datasheet | 90 | |
| 91 | * Datasheet | ||
| 92 | |||
| 72 | http://ww1.microchip.com/downloads/en/DeviceDoc/DS60001517A.pdf | 93 | http://ww1.microchip.com/downloads/en/DeviceDoc/DS60001517A.pdf |
| 73 | 94 | ||
| 74 | * ARM Cortex-A5 based SoCs | 95 | * ARM Cortex-A5 based SoCs |
| 75 | - sama5d3 family | 96 | - sama5d3 family |
| 97 | |||
| 76 | - sama5d31 | 98 | - sama5d31 |
| 77 | - sama5d33 | 99 | - sama5d33 |
| 78 | - sama5d34 | 100 | - sama5d34 |
| 79 | - sama5d35 | 101 | - sama5d35 |
| 80 | - sama5d36 (device superset) | 102 | - sama5d36 (device superset) |
| 81 | + Datasheet | 103 | |
| 104 | * Datasheet | ||
| 105 | |||
| 82 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-11121-32-bit-Cortex-A5-Microcontroller-SAMA5D3_Datasheet.pdf | 106 | http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-11121-32-bit-Cortex-A5-Microcontroller-SAMA5D3_Datasheet.pdf |
| 83 | 107 | ||
| 84 | * ARM Cortex-A5 + NEON based SoCs | 108 | * ARM Cortex-A5 + NEON based SoCs |
| 85 | - sama5d4 family | 109 | - sama5d4 family |
| 110 | |||
| 86 | - sama5d41 | 111 | - sama5d41 |
| 87 | - sama5d42 | 112 | - sama5d42 |
| 88 | - sama5d43 | 113 | - sama5d43 |
| 89 | - sama5d44 (device superset) | 114 | - sama5d44 (device superset) |
| 90 | + Datasheet | 115 | |
| 116 | * Datasheet | ||
| 117 | |||
| 91 | http://ww1.microchip.com/downloads/en/DeviceDoc/60001525A.pdf | 118 | http://ww1.microchip.com/downloads/en/DeviceDoc/60001525A.pdf |
| 92 | 119 | ||
| 93 | - sama5d2 family | 120 | - sama5d2 family |
| 121 | |||
| 94 | - sama5d21 | 122 | - sama5d21 |
| 95 | - sama5d22 | 123 | - sama5d22 |
| 96 | - sama5d23 | 124 | - sama5d23 |
| @@ -98,11 +126,14 @@ the Microchip website: http://www.microchip.com. | |||
| 98 | - sama5d26 | 126 | - sama5d26 |
| 99 | - sama5d27 (device superset) | 127 | - sama5d27 (device superset) |
| 100 | - sama5d28 (device superset + environmental monitors) | 128 | - sama5d28 (device superset + environmental monitors) |
| 101 | + Datasheet | 129 | |
| 130 | * Datasheet | ||
| 131 | |||
| 102 | http://ww1.microchip.com/downloads/en/DeviceDoc/DS60001476B.pdf | 132 | http://ww1.microchip.com/downloads/en/DeviceDoc/DS60001476B.pdf |
| 103 | 133 | ||
| 104 | * ARM Cortex-M7 MCUs | 134 | * ARM Cortex-M7 MCUs |
| 105 | - sams70 family | 135 | - sams70 family |
| 136 | |||
| 106 | - sams70j19 | 137 | - sams70j19 |
| 107 | - sams70j20 | 138 | - sams70j20 |
| 108 | - sams70j21 | 139 | - sams70j21 |
| @@ -114,6 +145,7 @@ the Microchip website: http://www.microchip.com. | |||
| 114 | - sams70q21 | 145 | - sams70q21 |
| 115 | 146 | ||
| 116 | - samv70 family | 147 | - samv70 family |
| 148 | |||
| 117 | - samv70j19 | 149 | - samv70j19 |
| 118 | - samv70j20 | 150 | - samv70j20 |
| 119 | - samv70n19 | 151 | - samv70n19 |
| @@ -122,6 +154,7 @@ the Microchip website: http://www.microchip.com. | |||
| 122 | - samv70q20 | 154 | - samv70q20 |
| 123 | 155 | ||
| 124 | - samv71 family | 156 | - samv71 family |
| 157 | |||
| 125 | - samv71j19 | 158 | - samv71j19 |
| 126 | - samv71j20 | 159 | - samv71j20 |
| 127 | - samv71j21 | 160 | - samv71j21 |
| @@ -132,7 +165,8 @@ the Microchip website: http://www.microchip.com. | |||
| 132 | - samv71q20 | 165 | - samv71q20 |
| 133 | - samv71q21 | 166 | - samv71q21 |
| 134 | 167 | ||
| 135 | + Datasheet | 168 | * Datasheet |
| 169 | |||
| 136 | http://ww1.microchip.com/downloads/en/DeviceDoc/60001527A.pdf | 170 | http://ww1.microchip.com/downloads/en/DeviceDoc/60001527A.pdf |
| 137 | 171 | ||
| 138 | 172 | ||
| @@ -157,6 +191,7 @@ definition of a "Stable" binding/ABI. | |||
| 157 | This statement will be removed by AT91 MAINTAINERS when appropriate. | 191 | This statement will be removed by AT91 MAINTAINERS when appropriate. |
| 158 | 192 | ||
| 159 | Naming conventions and best practice: | 193 | Naming conventions and best practice: |
| 194 | |||
| 160 | - SoCs Device Tree Source Include files are named after the official name of | 195 | - SoCs Device Tree Source Include files are named after the official name of |
| 161 | the product (at91sam9g20.dtsi or sama5d33.dtsi for instance). | 196 | the product (at91sam9g20.dtsi or sama5d33.dtsi for instance). |
| 162 | - Device Tree Source Include files (.dtsi) are used to collect common nodes that can be | 197 | - Device Tree Source Include files (.dtsi) are used to collect common nodes that can be |
diff --git a/Documentation/arm/netwinder.rst b/Documentation/arm/netwinder.rst new file mode 100644 index 000000000000..8eab66caa2ac --- /dev/null +++ b/Documentation/arm/netwinder.rst | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | ================================ | ||
| 2 | NetWinder specific documentation | ||
| 3 | ================================ | ||
| 4 | |||
| 5 | The NetWinder is a small low-power computer, primarily designed | ||
| 6 | to run Linux. It is based around the StrongARM RISC processor, | ||
| 7 | DC21285 PCI bridge, with PC-type hardware glued around it. | ||
| 8 | |||
| 9 | Port usage | ||
| 10 | ========== | ||
| 11 | |||
| 12 | ======= ====== =============================== | ||
| 13 | Min Max Description | ||
| 14 | ======= ====== =============================== | ||
| 15 | 0x0000 0x000f DMA1 | ||
| 16 | 0x0020 0x0021 PIC1 | ||
| 17 | 0x0060 0x006f Keyboard | ||
| 18 | 0x0070 0x007f RTC | ||
| 19 | 0x0080 0x0087 DMA1 | ||
| 20 | 0x0088 0x008f DMA2 | ||
| 21 | 0x00a0 0x00a3 PIC2 | ||
| 22 | 0x00c0 0x00df DMA2 | ||
| 23 | 0x0180 0x0187 IRDA | ||
| 24 | 0x01f0 0x01f6 ide0 | ||
| 25 | 0x0201 Game port | ||
| 26 | 0x0203 RWA010 configuration read | ||
| 27 | 0x0220 ? SoundBlaster | ||
| 28 | 0x0250 ? WaveArtist | ||
| 29 | 0x0279 RWA010 configuration index | ||
| 30 | 0x02f8 0x02ff Serial ttyS1 | ||
| 31 | 0x0300 0x031f Ether10 | ||
| 32 | 0x0338 GPIO1 | ||
| 33 | 0x033a GPIO2 | ||
| 34 | 0x0370 0x0371 W83977F configuration registers | ||
| 35 | 0x0388 ? AdLib | ||
| 36 | 0x03c0 0x03df VGA | ||
| 37 | 0x03f6 ide0 | ||
| 38 | 0x03f8 0x03ff Serial ttyS0 | ||
| 39 | 0x0400 0x0408 DC21143 | ||
| 40 | 0x0480 0x0487 DMA1 | ||
| 41 | 0x0488 0x048f DMA2 | ||
| 42 | 0x0a79 RWA010 configuration write | ||
| 43 | 0xe800 0xe80f ide0/ide1 BM DMA | ||
| 44 | ======= ====== =============================== | ||
| 45 | |||
| 46 | |||
| 47 | Interrupt usage | ||
| 48 | =============== | ||
| 49 | |||
| 50 | ======= ======= ======================== | ||
| 51 | IRQ type Description | ||
| 52 | ======= ======= ======================== | ||
| 53 | 0 ISA 100Hz timer | ||
| 54 | 1 ISA Keyboard | ||
| 55 | 2 ISA cascade | ||
| 56 | 3 ISA Serial ttyS1 | ||
| 57 | 4 ISA Serial ttyS0 | ||
| 58 | 5 ISA PS/2 mouse | ||
| 59 | 6 ISA IRDA | ||
| 60 | 7 ISA Printer | ||
| 61 | 8 ISA RTC alarm | ||
| 62 | 9 ISA | ||
| 63 | 10 ISA GP10 (Orange reset button) | ||
| 64 | 11 ISA | ||
| 65 | 12 ISA WaveArtist | ||
| 66 | 13 ISA | ||
| 67 | 14 ISA hda1 | ||
| 68 | 15 ISA | ||
| 69 | ======= ======= ======================== | ||
| 70 | |||
| 71 | DMA usage | ||
| 72 | ========= | ||
| 73 | |||
| 74 | ======= ======= =========== | ||
| 75 | DMA type Description | ||
| 76 | ======= ======= =========== | ||
| 77 | 0 ISA IRDA | ||
| 78 | 1 ISA | ||
| 79 | 2 ISA cascade | ||
| 80 | 3 ISA WaveArtist | ||
| 81 | 4 ISA | ||
| 82 | 5 ISA | ||
| 83 | 6 ISA | ||
| 84 | 7 ISA WaveArtist | ||
| 85 | ======= ======= =========== | ||
diff --git a/Documentation/arm/nwfpe/index.rst b/Documentation/arm/nwfpe/index.rst new file mode 100644 index 000000000000..3c4d2f9aa10e --- /dev/null +++ b/Documentation/arm/nwfpe/index.rst | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | =================================== | ||
| 4 | NetWinder's floating point emulator | ||
| 5 | =================================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | nwfpe | ||
| 11 | netwinder-fpe | ||
| 12 | notes | ||
| 13 | todo | ||
diff --git a/Documentation/arm/nwfpe/README.FPE b/Documentation/arm/nwfpe/netwinder-fpe.rst index 26f5d7bb9a41..cbb320960fc4 100644 --- a/Documentation/arm/nwfpe/README.FPE +++ b/Documentation/arm/nwfpe/netwinder-fpe.rst | |||
| @@ -1,12 +1,18 @@ | |||
| 1 | ============= | ||
| 2 | Current State | ||
| 3 | ============= | ||
| 4 | |||
| 1 | The following describes the current state of the NetWinder's floating point | 5 | The following describes the current state of the NetWinder's floating point |
| 2 | emulator. | 6 | emulator. |
| 3 | 7 | ||
| 4 | In the following nomenclature is used to describe the floating point | 8 | In the following nomenclature is used to describe the floating point |
| 5 | instructions. It follows the conventions in the ARM manual. | 9 | instructions. It follows the conventions in the ARM manual. |
| 6 | 10 | ||
| 7 | <S|D|E> = <single|double|extended>, no default | 11 | :: |
| 8 | {P|M|Z} = {round to +infinity,round to -infinity,round to zero}, | 12 | |
| 9 | default = round to nearest | 13 | <S|D|E> = <single|double|extended>, no default |
| 14 | {P|M|Z} = {round to +infinity,round to -infinity,round to zero}, | ||
| 15 | default = round to nearest | ||
| 10 | 16 | ||
| 11 | Note: items enclosed in {} are optional. | 17 | Note: items enclosed in {} are optional. |
| 12 | 18 | ||
| @@ -32,10 +38,10 @@ Form 2 syntax: | |||
| 32 | <LFM|SFM>{cond}<FD,EA> Fd, <count>, [Rn]{!} | 38 | <LFM|SFM>{cond}<FD,EA> Fd, <count>, [Rn]{!} |
| 33 | 39 | ||
| 34 | These instructions are fully implemented. They store/load three words | 40 | These instructions are fully implemented. They store/load three words |
| 35 | for each floating point register into the memory location given in the | 41 | for each floating point register into the memory location given in the |
| 36 | instruction. The format in memory is unlikely to be compatible with | 42 | instruction. The format in memory is unlikely to be compatible with |
| 37 | other implementations, in particular the actual hardware. Specific | 43 | other implementations, in particular the actual hardware. Specific |
| 38 | mention of this is made in the ARM manuals. | 44 | mention of this is made in the ARM manuals. |
| 39 | 45 | ||
| 40 | Floating Point Coprocessor Register Transfer Instructions (CPRT) | 46 | Floating Point Coprocessor Register Transfer Instructions (CPRT) |
| 41 | ---------------------------------------------------------------- | 47 | ---------------------------------------------------------------- |
| @@ -123,7 +129,7 @@ RPW{cond}<S|D|E>{P,M,Z} Fd, Fn, <Fm,#value> - reverse power | |||
| 123 | POL{cond}<S|D|E>{P,M,Z} Fd, Fn, <Fm,#value> - polar angle (arctan2) | 129 | POL{cond}<S|D|E>{P,M,Z} Fd, Fn, <Fm,#value> - polar angle (arctan2) |
| 124 | 130 | ||
| 125 | LOG{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - logarithm to base 10 | 131 | LOG{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - logarithm to base 10 |
| 126 | LGN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - logarithm to base e | 132 | LGN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - logarithm to base e |
| 127 | EXP{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - exponent | 133 | EXP{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - exponent |
| 128 | SIN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - sine | 134 | SIN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - sine |
| 129 | COS{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - cosine | 135 | COS{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - cosine |
| @@ -134,7 +140,7 @@ ATN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - arctangent | |||
| 134 | 140 | ||
| 135 | These are not implemented. They are not currently issued by the compiler, | 141 | These are not implemented. They are not currently issued by the compiler, |
| 136 | and are handled by routines in libc. These are not implemented by the FPA11 | 142 | and are handled by routines in libc. These are not implemented by the FPA11 |
| 137 | hardware, but are handled by the floating point support code. They should | 143 | hardware, but are handled by the floating point support code. They should |
| 138 | be implemented in future versions. | 144 | be implemented in future versions. |
| 139 | 145 | ||
| 140 | Signalling: | 146 | Signalling: |
| @@ -147,10 +153,10 @@ current_set[0] correctly. | |||
| 147 | The kernel provided with this distribution (vmlinux-nwfpe-0.93) contains | 153 | The kernel provided with this distribution (vmlinux-nwfpe-0.93) contains |
| 148 | a fix for this problem and also incorporates the current version of the | 154 | a fix for this problem and also incorporates the current version of the |
| 149 | emulator directly. It is possible to run with no floating point module | 155 | emulator directly. It is possible to run with no floating point module |
| 150 | loaded with this kernel. It is provided as a demonstration of the | 156 | loaded with this kernel. It is provided as a demonstration of the |
| 151 | technology and for those who want to do floating point work that depends | 157 | technology and for those who want to do floating point work that depends |
| 152 | on signals. It is not strictly necessary to use the module. | 158 | on signals. It is not strictly necessary to use the module. |
| 153 | 159 | ||
| 154 | A module (either the one provided by Russell King, or the one in this | 160 | A module (either the one provided by Russell King, or the one in this |
| 155 | distribution) can be loaded to replace the functionality of the emulator | 161 | distribution) can be loaded to replace the functionality of the emulator |
| 156 | built into the kernel. | 162 | built into the kernel. |
diff --git a/Documentation/arm/nwfpe/NOTES b/Documentation/arm/nwfpe/notes.rst index 40577b5a49d3..102e55af8439 100644 --- a/Documentation/arm/nwfpe/NOTES +++ b/Documentation/arm/nwfpe/notes.rst | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | Notes | ||
| 2 | ===== | ||
| 3 | |||
| 1 | There seems to be a problem with exp(double) and our emulator. I haven't | 4 | There seems to be a problem with exp(double) and our emulator. I haven't |
| 2 | been able to track it down yet. This does not occur with the emulator | 5 | been able to track it down yet. This does not occur with the emulator |
| 3 | supplied by Russell King. | 6 | supplied by Russell King. |
diff --git a/Documentation/arm/nwfpe/README b/Documentation/arm/nwfpe/nwfpe.rst index 771871de0c8b..35cd90dacbff 100644 --- a/Documentation/arm/nwfpe/README +++ b/Documentation/arm/nwfpe/nwfpe.rst | |||
| @@ -1,4 +1,7 @@ | |||
| 1 | This directory contains the version 0.92 test release of the NetWinder | 1 | Introduction |
| 2 | ============ | ||
| 3 | |||
| 4 | This directory contains the version 0.92 test release of the NetWinder | ||
| 2 | Floating Point Emulator. | 5 | Floating Point Emulator. |
| 3 | 6 | ||
| 4 | The majority of the code was written by me, Scott Bambrough It is | 7 | The majority of the code was written by me, Scott Bambrough It is |
| @@ -31,7 +34,7 @@ SoftFloat to the ARM was done by Phil Blundell, based on an earlier | |||
| 31 | port of SoftFloat version 1 by Neil Carson for NetBSD/arm32. | 34 | port of SoftFloat version 1 by Neil Carson for NetBSD/arm32. |
| 32 | 35 | ||
| 33 | The file README.FPE contains a description of what has been implemented | 36 | The file README.FPE contains a description of what has been implemented |
| 34 | so far in the emulator. The file TODO contains a information on what | 37 | so far in the emulator. The file TODO contains a information on what |
| 35 | remains to be done, and other ideas for the emulator. | 38 | remains to be done, and other ideas for the emulator. |
| 36 | 39 | ||
| 37 | Bug reports, comments, suggestions should be directed to me at | 40 | Bug reports, comments, suggestions should be directed to me at |
| @@ -48,10 +51,11 @@ Legal Notices | |||
| 48 | 51 | ||
| 49 | The NetWinder Floating Point Emulator is free software. Everything Rebel.com | 52 | The NetWinder Floating Point Emulator is free software. Everything Rebel.com |
| 50 | has written is provided under the GNU GPL. See the file COPYING for copying | 53 | has written is provided under the GNU GPL. See the file COPYING for copying |
| 51 | conditions. Excluded from the above is the SoftFloat code. John Hauser's | 54 | conditions. Excluded from the above is the SoftFloat code. John Hauser's |
| 52 | legal notice for SoftFloat is included below. | 55 | legal notice for SoftFloat is included below. |
| 53 | 56 | ||
| 54 | ------------------------------------------------------------------------------- | 57 | ------------------------------------------------------------------------------- |
| 58 | |||
| 55 | SoftFloat Legal Notice | 59 | SoftFloat Legal Notice |
| 56 | 60 | ||
| 57 | SoftFloat was written by John R. Hauser. This work was made possible in | 61 | SoftFloat was written by John R. Hauser. This work was made possible in |
diff --git a/Documentation/arm/nwfpe/TODO b/Documentation/arm/nwfpe/todo.rst index 8027061b60eb..393f11b14540 100644 --- a/Documentation/arm/nwfpe/TODO +++ b/Documentation/arm/nwfpe/todo.rst | |||
| @@ -1,39 +1,42 @@ | |||
| 1 | TODO LIST | 1 | TODO LIST |
| 2 | --------- | 2 | ========= |
| 3 | 3 | ||
| 4 | POW{cond}<S|D|E>{P,M,Z} Fd, Fn, <Fm,#value> - power | 4 | :: |
| 5 | RPW{cond}<S|D|E>{P,M,Z} Fd, Fn, <Fm,#value> - reverse power | ||
| 6 | POL{cond}<S|D|E>{P,M,Z} Fd, Fn, <Fm,#value> - polar angle (arctan2) | ||
| 7 | 5 | ||
| 8 | LOG{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - logarithm to base 10 | 6 | POW{cond}<S|D|E>{P,M,Z} Fd, Fn, <Fm,#value> - power |
| 9 | LGN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - logarithm to base e | 7 | RPW{cond}<S|D|E>{P,M,Z} Fd, Fn, <Fm,#value> - reverse power |
| 10 | EXP{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - exponent | 8 | POL{cond}<S|D|E>{P,M,Z} Fd, Fn, <Fm,#value> - polar angle (arctan2) |
| 11 | SIN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - sine | 9 | |
| 12 | COS{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - cosine | 10 | LOG{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - logarithm to base 10 |
| 13 | TAN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - tangent | 11 | LGN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - logarithm to base e |
| 14 | ASN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - arcsine | 12 | EXP{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - exponent |
| 15 | ACS{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - arccosine | 13 | SIN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - sine |
| 16 | ATN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - arctangent | 14 | COS{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - cosine |
| 15 | TAN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - tangent | ||
| 16 | ASN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - arcsine | ||
| 17 | ACS{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - arccosine | ||
| 18 | ATN{cond}<S|D|E>{P,M,Z} Fd, <Fm,#value> - arctangent | ||
| 17 | 19 | ||
| 18 | These are not implemented. They are not currently issued by the compiler, | 20 | These are not implemented. They are not currently issued by the compiler, |
| 19 | and are handled by routines in libc. These are not implemented by the FPA11 | 21 | and are handled by routines in libc. These are not implemented by the FPA11 |
| 20 | hardware, but are handled by the floating point support code. They should | 22 | hardware, but are handled by the floating point support code. They should |
| 21 | be implemented in future versions. | 23 | be implemented in future versions. |
| 22 | 24 | ||
| 23 | There are a couple of ways to approach the implementation of these. One | 25 | There are a couple of ways to approach the implementation of these. One |
| 24 | method would be to use accurate table methods for these routines. I have | 26 | method would be to use accurate table methods for these routines. I have |
| 25 | a couple of papers by S. Gal from IBM's research labs in Haifa, Israel that | 27 | a couple of papers by S. Gal from IBM's research labs in Haifa, Israel that |
| 26 | seem to promise extreme accuracy (in the order of 99.8%) and reasonable speed. | 28 | seem to promise extreme accuracy (in the order of 99.8%) and reasonable speed. |
| 27 | These methods are used in GLIBC for some of the transcendental functions. | 29 | These methods are used in GLIBC for some of the transcendental functions. |
| 28 | 30 | ||
| 29 | Another approach, which I know little about is CORDIC. This stands for | 31 | Another approach, which I know little about is CORDIC. This stands for |
| 30 | Coordinate Rotation Digital Computer, and is a method of computing | 32 | Coordinate Rotation Digital Computer, and is a method of computing |
| 31 | transcendental functions using mostly shifts and adds and a few | 33 | transcendental functions using mostly shifts and adds and a few |
| 32 | multiplications and divisions. The ARM excels at shifts and adds, | 34 | multiplications and divisions. The ARM excels at shifts and adds, |
| 33 | so such a method could be promising, but requires more research to | 35 | so such a method could be promising, but requires more research to |
| 34 | determine if it is feasible. | 36 | determine if it is feasible. |
| 35 | 37 | ||
| 36 | Rounding Methods | 38 | Rounding Methods |
| 39 | ---------------- | ||
| 37 | 40 | ||
| 38 | The IEEE standard defines 4 rounding modes. Round to nearest is the | 41 | The IEEE standard defines 4 rounding modes. Round to nearest is the |
| 39 | default, but rounding to + or - infinity or round to zero are also allowed. | 42 | default, but rounding to + or - infinity or round to zero are also allowed. |
| @@ -42,8 +45,8 @@ in a control register. Not so with the ARM FPA11 architecture. To change | |||
| 42 | the rounding mode one must specify it with each instruction. | 45 | the rounding mode one must specify it with each instruction. |
| 43 | 46 | ||
| 44 | This has made porting some benchmarks difficult. It is possible to | 47 | This has made porting some benchmarks difficult. It is possible to |
| 45 | introduce such a capability into the emulator. The FPCR contains | 48 | introduce such a capability into the emulator. The FPCR contains |
| 46 | bits describing the rounding mode. The emulator could be altered to | 49 | bits describing the rounding mode. The emulator could be altered to |
| 47 | examine a flag, which if set forced it to ignore the rounding mode in | 50 | examine a flag, which if set forced it to ignore the rounding mode in |
| 48 | the instruction, and use the mode specified in the bits in the FPCR. | 51 | the instruction, and use the mode specified in the bits in the FPCR. |
| 49 | 52 | ||
| @@ -52,7 +55,8 @@ in the FPCR. This requires a kernel call in ArmLinux, as WFC/RFC are | |||
| 52 | supervisor only instructions. If anyone has any ideas or comments I | 55 | supervisor only instructions. If anyone has any ideas or comments I |
| 53 | would like to hear them. | 56 | would like to hear them. |
| 54 | 57 | ||
| 55 | [NOTE: pulled out from some docs on ARM floating point, specifically | 58 | NOTE: |
| 59 | pulled out from some docs on ARM floating point, specifically | ||
| 56 | for the Acorn FPE, but not limited to it: | 60 | for the Acorn FPE, but not limited to it: |
| 57 | 61 | ||
| 58 | The floating point control register (FPCR) may only be present in some | 62 | The floating point control register (FPCR) may only be present in some |
| @@ -64,4 +68,5 @@ would like to hear them. | |||
| 64 | 68 | ||
| 65 | Hence, the answer is yes, you could do this, but then you will run a high | 69 | Hence, the answer is yes, you could do this, but then you will run a high |
| 66 | risk of becoming isolated if and when hardware FP emulation comes out | 70 | risk of becoming isolated if and when hardware FP emulation comes out |
| 67 | -- Russell]. | 71 | |
| 72 | -- Russell. | ||
diff --git a/Documentation/arm/OMAP/DSS b/Documentation/arm/omap/dss.rst index 4484e021290e..a40c4d9c717a 100644 --- a/Documentation/arm/OMAP/DSS +++ b/Documentation/arm/omap/dss.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ========================= | ||
| 1 | OMAP2/3 Display Subsystem | 2 | OMAP2/3 Display Subsystem |
| 2 | ------------------------- | 3 | ========================= |
| 3 | 4 | ||
| 4 | This is an almost total rewrite of the OMAP FB driver in drivers/video/omap | 5 | This is an almost total rewrite of the OMAP FB driver in drivers/video/omap |
| 5 | (let's call it DSS1). The main differences between DSS1 and DSS2 are DSI, | 6 | (let's call it DSS1). The main differences between DSS1 and DSS2 are DSI, |
| @@ -190,6 +191,8 @@ trans_key_value transparency color key (RGB24) | |||
| 190 | default_color default background color (RGB24) | 191 | default_color default background color (RGB24) |
| 191 | 192 | ||
| 192 | /sys/devices/platform/omapdss/display? directory: | 193 | /sys/devices/platform/omapdss/display? directory: |
| 194 | |||
| 195 | =============== ============================================================= | ||
| 193 | ctrl_name Controller name | 196 | ctrl_name Controller name |
| 194 | mirror 0=off, 1=on | 197 | mirror 0=off, 1=on |
| 195 | update_mode 0=off, 1=auto, 2=manual | 198 | update_mode 0=off, 1=auto, 2=manual |
| @@ -202,6 +205,7 @@ timings Display timings (pixclock,xres/hfp/hbp/hsw,yres/vfp/vbp/vsw) | |||
| 202 | panel_name | 205 | panel_name |
| 203 | tear_elim Tearing elimination 0=off, 1=on | 206 | tear_elim Tearing elimination 0=off, 1=on |
| 204 | output_type Output type (video encoder only): "composite" or "svideo" | 207 | output_type Output type (video encoder only): "composite" or "svideo" |
| 208 | =============== ============================================================= | ||
| 205 | 209 | ||
| 206 | There are also some debugfs files at <debugfs>/omapdss/ which show information | 210 | There are also some debugfs files at <debugfs>/omapdss/ which show information |
| 207 | about clocks and registers. | 211 | about clocks and registers. |
| @@ -209,22 +213,22 @@ about clocks and registers. | |||
| 209 | Examples | 213 | Examples |
| 210 | -------- | 214 | -------- |
| 211 | 215 | ||
| 212 | The following definitions have been made for the examples below: | 216 | The following definitions have been made for the examples below:: |
| 213 | 217 | ||
| 214 | ovl0=/sys/devices/platform/omapdss/overlay0 | 218 | ovl0=/sys/devices/platform/omapdss/overlay0 |
| 215 | ovl1=/sys/devices/platform/omapdss/overlay1 | 219 | ovl1=/sys/devices/platform/omapdss/overlay1 |
| 216 | ovl2=/sys/devices/platform/omapdss/overlay2 | 220 | ovl2=/sys/devices/platform/omapdss/overlay2 |
| 217 | 221 | ||
| 218 | mgr0=/sys/devices/platform/omapdss/manager0 | 222 | mgr0=/sys/devices/platform/omapdss/manager0 |
| 219 | mgr1=/sys/devices/platform/omapdss/manager1 | 223 | mgr1=/sys/devices/platform/omapdss/manager1 |
| 220 | 224 | ||
| 221 | lcd=/sys/devices/platform/omapdss/display0 | 225 | lcd=/sys/devices/platform/omapdss/display0 |
| 222 | dvi=/sys/devices/platform/omapdss/display1 | 226 | dvi=/sys/devices/platform/omapdss/display1 |
| 223 | tv=/sys/devices/platform/omapdss/display2 | 227 | tv=/sys/devices/platform/omapdss/display2 |
| 224 | 228 | ||
| 225 | fb0=/sys/class/graphics/fb0 | 229 | fb0=/sys/class/graphics/fb0 |
| 226 | fb1=/sys/class/graphics/fb1 | 230 | fb1=/sys/class/graphics/fb1 |
| 227 | fb2=/sys/class/graphics/fb2 | 231 | fb2=/sys/class/graphics/fb2 |
| 228 | 232 | ||
| 229 | Default setup on OMAP3 SDP | 233 | Default setup on OMAP3 SDP |
| 230 | -------------------------- | 234 | -------------------------- |
| @@ -232,55 +236,59 @@ Default setup on OMAP3 SDP | |||
| 232 | Here's the default setup on OMAP3 SDP board. All planes go to LCD. DVI | 236 | Here's the default setup on OMAP3 SDP board. All planes go to LCD. DVI |
| 233 | and TV-out are not in use. The columns from left to right are: | 237 | and TV-out are not in use. The columns from left to right are: |
| 234 | framebuffers, overlays, overlay managers, displays. Framebuffers are | 238 | framebuffers, overlays, overlay managers, displays. Framebuffers are |
| 235 | handled by omapfb, and the rest by the DSS. | 239 | handled by omapfb, and the rest by the DSS:: |
| 236 | 240 | ||
| 237 | FB0 --- GFX -\ DVI | 241 | FB0 --- GFX -\ DVI |
| 238 | FB1 --- VID1 --+- LCD ---- LCD | 242 | FB1 --- VID1 --+- LCD ---- LCD |
| 239 | FB2 --- VID2 -/ TV ----- TV | 243 | FB2 --- VID2 -/ TV ----- TV |
| 240 | 244 | ||
| 241 | Example: Switch from LCD to DVI | 245 | Example: Switch from LCD to DVI |
| 242 | ---------------------- | 246 | ------------------------------- |
| 247 | |||
| 248 | :: | ||
| 243 | 249 | ||
| 244 | w=`cat $dvi/timings | cut -d "," -f 2 | cut -d "/" -f 1` | 250 | w=`cat $dvi/timings | cut -d "," -f 2 | cut -d "/" -f 1` |
| 245 | h=`cat $dvi/timings | cut -d "," -f 3 | cut -d "/" -f 1` | 251 | h=`cat $dvi/timings | cut -d "," -f 3 | cut -d "/" -f 1` |
| 246 | 252 | ||
| 247 | echo "0" > $lcd/enabled | 253 | echo "0" > $lcd/enabled |
| 248 | echo "" > $mgr0/display | 254 | echo "" > $mgr0/display |
| 249 | fbset -fb /dev/fb0 -xres $w -yres $h -vxres $w -vyres $h | 255 | fbset -fb /dev/fb0 -xres $w -yres $h -vxres $w -vyres $h |
| 250 | # at this point you have to switch the dvi/lcd dip-switch from the omap board | 256 | # at this point you have to switch the dvi/lcd dip-switch from the omap board |
| 251 | echo "dvi" > $mgr0/display | 257 | echo "dvi" > $mgr0/display |
| 252 | echo "1" > $dvi/enabled | 258 | echo "1" > $dvi/enabled |
| 253 | 259 | ||
| 254 | After this the configuration looks like: | 260 | After this the configuration looks like::: |
| 255 | 261 | ||
| 256 | FB0 --- GFX -\ -- DVI | 262 | FB0 --- GFX -\ -- DVI |
| 257 | FB1 --- VID1 --+- LCD -/ LCD | 263 | FB1 --- VID1 --+- LCD -/ LCD |
| 258 | FB2 --- VID2 -/ TV ----- TV | 264 | FB2 --- VID2 -/ TV ----- TV |
| 259 | 265 | ||
| 260 | Example: Clone GFX overlay to LCD and TV | 266 | Example: Clone GFX overlay to LCD and TV |
| 261 | ------------------------------- | 267 | ---------------------------------------- |
| 268 | |||
| 269 | :: | ||
| 262 | 270 | ||
| 263 | w=`cat $tv/timings | cut -d "," -f 2 | cut -d "/" -f 1` | 271 | w=`cat $tv/timings | cut -d "," -f 2 | cut -d "/" -f 1` |
| 264 | h=`cat $tv/timings | cut -d "," -f 3 | cut -d "/" -f 1` | 272 | h=`cat $tv/timings | cut -d "," -f 3 | cut -d "/" -f 1` |
| 265 | 273 | ||
| 266 | echo "0" > $ovl0/enabled | 274 | echo "0" > $ovl0/enabled |
| 267 | echo "0" > $ovl1/enabled | 275 | echo "0" > $ovl1/enabled |
| 268 | 276 | ||
| 269 | echo "" > $fb1/overlays | 277 | echo "" > $fb1/overlays |
| 270 | echo "0,1" > $fb0/overlays | 278 | echo "0,1" > $fb0/overlays |
| 271 | 279 | ||
| 272 | echo "$w,$h" > $ovl1/output_size | 280 | echo "$w,$h" > $ovl1/output_size |
| 273 | echo "tv" > $ovl1/manager | 281 | echo "tv" > $ovl1/manager |
| 274 | 282 | ||
| 275 | echo "1" > $ovl0/enabled | 283 | echo "1" > $ovl0/enabled |
| 276 | echo "1" > $ovl1/enabled | 284 | echo "1" > $ovl1/enabled |
| 277 | 285 | ||
| 278 | echo "1" > $tv/enabled | 286 | echo "1" > $tv/enabled |
| 279 | 287 | ||
| 280 | After this the configuration looks like (only relevant parts shown): | 288 | After this the configuration looks like (only relevant parts shown):: |
| 281 | 289 | ||
| 282 | FB0 +-- GFX ---- LCD ---- LCD | 290 | FB0 +-- GFX ---- LCD ---- LCD |
| 283 | \- VID1 ---- TV ---- TV | 291 | \- VID1 ---- TV ---- TV |
| 284 | 292 | ||
| 285 | Misc notes | 293 | Misc notes |
| 286 | ---------- | 294 | ---------- |
| @@ -351,12 +359,14 @@ TODO | |||
| 351 | DSS locking | 359 | DSS locking |
| 352 | 360 | ||
| 353 | Error checking | 361 | Error checking |
| 362 | |||
| 354 | - Lots of checks are missing or implemented just as BUG() | 363 | - Lots of checks are missing or implemented just as BUG() |
| 355 | 364 | ||
| 356 | System DMA update for DSI | 365 | System DMA update for DSI |
| 366 | |||
| 357 | - Can be used for RGB16 and RGB24P modes. Probably not for RGB24U (how | 367 | - Can be used for RGB16 and RGB24P modes. Probably not for RGB24U (how |
| 358 | to skip the empty byte?) | 368 | to skip the empty byte?) |
| 359 | 369 | ||
| 360 | OMAP1 support | 370 | OMAP1 support |
| 361 | - Not sure if needed | ||
| 362 | 371 | ||
| 372 | - Not sure if needed | ||
diff --git a/Documentation/arm/omap/index.rst b/Documentation/arm/omap/index.rst new file mode 100644 index 000000000000..8b365b212e49 --- /dev/null +++ b/Documentation/arm/omap/index.rst | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ======= | ||
| 4 | TI OMAP | ||
| 5 | ======= | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | omap | ||
| 11 | omap_pm | ||
| 12 | dss | ||
diff --git a/Documentation/arm/OMAP/README b/Documentation/arm/omap/omap.rst index 90c6c57d61e8..f440c0f4613f 100644 --- a/Documentation/arm/OMAP/README +++ b/Documentation/arm/omap/omap.rst | |||
| @@ -1,7 +1,13 @@ | |||
| 1 | ============ | ||
| 2 | OMAP history | ||
| 3 | ============ | ||
| 4 | |||
| 1 | This file contains documentation for running mainline | 5 | This file contains documentation for running mainline |
| 2 | kernel on omaps. | 6 | kernel on omaps. |
| 3 | 7 | ||
| 8 | ====== ====================================================== | ||
| 4 | KERNEL NEW DEPENDENCIES | 9 | KERNEL NEW DEPENDENCIES |
| 10 | ====== ====================================================== | ||
| 5 | v4.3+ Update is needed for custom .config files to make sure | 11 | v4.3+ Update is needed for custom .config files to make sure |
| 6 | CONFIG_REGULATOR_PBIAS is enabled for MMC1 to work | 12 | CONFIG_REGULATOR_PBIAS is enabled for MMC1 to work |
| 7 | properly. | 13 | properly. |
| @@ -9,3 +15,4 @@ v4.3+ Update is needed for custom .config files to make sure | |||
| 9 | v4.18+ Update is needed for custom .config files to make sure | 15 | v4.18+ Update is needed for custom .config files to make sure |
| 10 | CONFIG_MMC_SDHCI_OMAP is enabled for all MMC instances | 16 | CONFIG_MMC_SDHCI_OMAP is enabled for all MMC instances |
| 11 | to work in DRA7 and K2G based boards. | 17 | to work in DRA7 and K2G based boards. |
| 18 | ====== ====================================================== | ||
diff --git a/Documentation/arm/OMAP/omap_pm b/Documentation/arm/omap/omap_pm.rst index 4ae915a9f899..a335e4c8ce2c 100644 --- a/Documentation/arm/OMAP/omap_pm +++ b/Documentation/arm/omap/omap_pm.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | 1 | ===================== | |
| 2 | The OMAP PM interface | 2 | The OMAP PM interface |
| 3 | ===================== | 3 | ===================== |
| 4 | 4 | ||
| @@ -31,19 +31,24 @@ Drivers need to express PM parameters which: | |||
| 31 | This document proposes the OMAP PM interface, including the following | 31 | This document proposes the OMAP PM interface, including the following |
| 32 | five power management functions for driver code: | 32 | five power management functions for driver code: |
| 33 | 33 | ||
| 34 | 1. Set the maximum MPU wakeup latency: | 34 | 1. Set the maximum MPU wakeup latency:: |
| 35 | |||
| 35 | (*pdata->set_max_mpu_wakeup_lat)(struct device *dev, unsigned long t) | 36 | (*pdata->set_max_mpu_wakeup_lat)(struct device *dev, unsigned long t) |
| 36 | 37 | ||
| 37 | 2. Set the maximum device wakeup latency: | 38 | 2. Set the maximum device wakeup latency:: |
| 39 | |||
| 38 | (*pdata->set_max_dev_wakeup_lat)(struct device *dev, unsigned long t) | 40 | (*pdata->set_max_dev_wakeup_lat)(struct device *dev, unsigned long t) |
| 39 | 41 | ||
| 40 | 3. Set the maximum system DMA transfer start latency (CORE pwrdm): | 42 | 3. Set the maximum system DMA transfer start latency (CORE pwrdm):: |
| 43 | |||
| 41 | (*pdata->set_max_sdma_lat)(struct device *dev, long t) | 44 | (*pdata->set_max_sdma_lat)(struct device *dev, long t) |
| 42 | 45 | ||
| 43 | 4. Set the minimum bus throughput needed by a device: | 46 | 4. Set the minimum bus throughput needed by a device:: |
| 47 | |||
| 44 | (*pdata->set_min_bus_tput)(struct device *dev, u8 agent_id, unsigned long r) | 48 | (*pdata->set_min_bus_tput)(struct device *dev, u8 agent_id, unsigned long r) |
| 45 | 49 | ||
| 46 | 5. Return the number of times the device has lost context | 50 | 5. Return the number of times the device has lost context:: |
| 51 | |||
| 47 | (*pdata->get_dev_context_loss_count)(struct device *dev) | 52 | (*pdata->get_dev_context_loss_count)(struct device *dev) |
| 48 | 53 | ||
| 49 | 54 | ||
| @@ -65,12 +70,13 @@ Driver usage of the OMAP PM functions | |||
| 65 | 70 | ||
| 66 | As the 'pdata' in the above examples indicates, these functions are | 71 | As the 'pdata' in the above examples indicates, these functions are |
| 67 | exposed to drivers through function pointers in driver .platform_data | 72 | exposed to drivers through function pointers in driver .platform_data |
| 68 | structures. The function pointers are initialized by the board-*.c | 73 | structures. The function pointers are initialized by the `board-*.c` |
| 69 | files to point to the corresponding OMAP PM functions: | 74 | files to point to the corresponding OMAP PM functions: |
| 70 | .set_max_dev_wakeup_lat will point to | 75 | |
| 71 | omap_pm_set_max_dev_wakeup_lat(), etc. Other architectures which do | 76 | - set_max_dev_wakeup_lat will point to |
| 72 | not support these functions should leave these function pointers set | 77 | omap_pm_set_max_dev_wakeup_lat(), etc. Other architectures which do |
| 73 | to NULL. Drivers should use the following idiom: | 78 | not support these functions should leave these function pointers set |
| 79 | to NULL. Drivers should use the following idiom:: | ||
| 74 | 80 | ||
| 75 | if (pdata->set_max_dev_wakeup_lat) | 81 | if (pdata->set_max_dev_wakeup_lat) |
| 76 | (*pdata->set_max_dev_wakeup_lat)(dev, t); | 82 | (*pdata->set_max_dev_wakeup_lat)(dev, t); |
| @@ -81,7 +87,7 @@ becomes accessible. To accomplish this, driver writers should use the | |||
| 81 | set_max_mpu_wakeup_lat() function to constrain the MPU wakeup | 87 | set_max_mpu_wakeup_lat() function to constrain the MPU wakeup |
| 82 | latency, and the set_max_dev_wakeup_lat() function to constrain the | 88 | latency, and the set_max_dev_wakeup_lat() function to constrain the |
| 83 | device wakeup latency (from clk_enable() to accessibility). For | 89 | device wakeup latency (from clk_enable() to accessibility). For |
| 84 | example, | 90 | example:: |
| 85 | 91 | ||
| 86 | /* Limit MPU wakeup latency */ | 92 | /* Limit MPU wakeup latency */ |
| 87 | if (pdata->set_max_mpu_wakeup_lat) | 93 | if (pdata->set_max_mpu_wakeup_lat) |
| @@ -116,17 +122,17 @@ specialized cases to convert that input information (OPPs/MPU | |||
| 116 | frequency) into the form that the underlying power management | 122 | frequency) into the form that the underlying power management |
| 117 | implementation needs: | 123 | implementation needs: |
| 118 | 124 | ||
| 119 | 6. (*pdata->dsp_get_opp_table)(void) | 125 | 6. `(*pdata->dsp_get_opp_table)(void)` |
| 120 | 126 | ||
| 121 | 7. (*pdata->dsp_set_min_opp)(u8 opp_id) | 127 | 7. `(*pdata->dsp_set_min_opp)(u8 opp_id)` |
| 122 | 128 | ||
| 123 | 8. (*pdata->dsp_get_opp)(void) | 129 | 8. `(*pdata->dsp_get_opp)(void)` |
| 124 | 130 | ||
| 125 | 9. (*pdata->cpu_get_freq_table)(void) | 131 | 9. `(*pdata->cpu_get_freq_table)(void)` |
| 126 | 132 | ||
| 127 | 10. (*pdata->cpu_set_freq)(unsigned long f) | 133 | 10. `(*pdata->cpu_set_freq)(unsigned long f)` |
| 128 | 134 | ||
| 129 | 11. (*pdata->cpu_get_freq)(void) | 135 | 11. `(*pdata->cpu_get_freq)(void)` |
| 130 | 136 | ||
| 131 | Customizing OPP for platform | 137 | Customizing OPP for platform |
| 132 | ============================ | 138 | ============================ |
| @@ -134,12 +140,15 @@ Defining CONFIG_PM should enable OPP layer for the silicon | |||
| 134 | and the registration of OPP table should take place automatically. | 140 | and the registration of OPP table should take place automatically. |
| 135 | However, in special cases, the default OPP table may need to be | 141 | However, in special cases, the default OPP table may need to be |
| 136 | tweaked, for e.g.: | 142 | tweaked, for e.g.: |
| 143 | |||
| 137 | * enable default OPPs which are disabled by default, but which | 144 | * enable default OPPs which are disabled by default, but which |
| 138 | could be enabled on a platform | 145 | could be enabled on a platform |
| 139 | * Disable an unsupported OPP on the platform | 146 | * Disable an unsupported OPP on the platform |
| 140 | * Define and add a custom opp table entry | 147 | * Define and add a custom opp table entry |
| 141 | in these cases, the board file needs to do additional steps as follows: | 148 | in these cases, the board file needs to do additional steps as follows: |
| 142 | arch/arm/mach-omapx/board-xyz.c | 149 | |
| 150 | arch/arm/mach-omapx/board-xyz.c:: | ||
| 151 | |||
| 143 | #include "pm.h" | 152 | #include "pm.h" |
| 144 | .... | 153 | .... |
| 145 | static void __init omap_xyz_init_irq(void) | 154 | static void __init omap_xyz_init_irq(void) |
| @@ -150,5 +159,7 @@ arch/arm/mach-omapx/board-xyz.c | |||
| 150 | /* Do customization to the defaults */ | 159 | /* Do customization to the defaults */ |
| 151 | .... | 160 | .... |
| 152 | } | 161 | } |
| 153 | NOTE: omapx_opp_init will be omap3_opp_init or as required | 162 | |
| 154 | based on the omap family. | 163 | NOTE: |
| 164 | omapx_opp_init will be omap3_opp_init or as required | ||
| 165 | based on the omap family. | ||
diff --git a/Documentation/arm/Porting b/Documentation/arm/porting.rst index a492233931b9..bd21958bdb2d 100644 --- a/Documentation/arm/Porting +++ b/Documentation/arm/porting.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ======= | ||
| 2 | Porting | ||
| 3 | ======= | ||
| 4 | |||
| 1 | Taken from list archive at http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2001-July/004064.html | 5 | Taken from list archive at http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2001-July/004064.html |
| 2 | 6 | ||
| 3 | Initial definitions | 7 | Initial definitions |
| @@ -89,8 +93,7 @@ DATAADDR | |||
| 89 | Virtual address for the kernel data segment. Must not be defined | 93 | Virtual address for the kernel data segment. Must not be defined |
| 90 | when using the decompressor. | 94 | when using the decompressor. |
| 91 | 95 | ||
| 92 | VMALLOC_START | 96 | VMALLOC_START / VMALLOC_END |
| 93 | VMALLOC_END | ||
| 94 | Virtual addresses bounding the vmalloc() area. There must not be | 97 | Virtual addresses bounding the vmalloc() area. There must not be |
| 95 | any static mappings in this area; vmalloc will overwrite them. | 98 | any static mappings in this area; vmalloc will overwrite them. |
| 96 | The addresses must also be in the kernel segment (see above). | 99 | The addresses must also be in the kernel segment (see above). |
| @@ -107,13 +110,13 @@ Architecture Specific Macros | |||
| 107 | ---------------------------- | 110 | ---------------------------- |
| 108 | 111 | ||
| 109 | BOOT_MEM(pram,pio,vio) | 112 | BOOT_MEM(pram,pio,vio) |
| 110 | `pram' specifies the physical start address of RAM. Must always | 113 | `pram` specifies the physical start address of RAM. Must always |
| 111 | be present, and should be the same as PHYS_OFFSET. | 114 | be present, and should be the same as PHYS_OFFSET. |
| 112 | 115 | ||
| 113 | `pio' is the physical address of an 8MB region containing IO for | 116 | `pio` is the physical address of an 8MB region containing IO for |
| 114 | use with the debugging macros in arch/arm/kernel/debug-armv.S. | 117 | use with the debugging macros in arch/arm/kernel/debug-armv.S. |
| 115 | 118 | ||
| 116 | `vio' is the virtual address of the 8MB debugging region. | 119 | `vio` is the virtual address of the 8MB debugging region. |
| 117 | 120 | ||
| 118 | It is expected that the debugging region will be re-initialised | 121 | It is expected that the debugging region will be re-initialised |
| 119 | by the architecture specific code later in the code (via the | 122 | by the architecture specific code later in the code (via the |
| @@ -132,4 +135,3 @@ MAPIO(func) | |||
| 132 | 135 | ||
| 133 | INITIRQ(func) | 136 | INITIRQ(func) |
| 134 | Machine specific function to initialise interrupts. | 137 | Machine specific function to initialise interrupts. |
| 135 | |||
diff --git a/Documentation/arm/pxa/mfp.txt b/Documentation/arm/pxa/mfp.rst index 0b7cab978c02..ac34e5d7ee44 100644 --- a/Documentation/arm/pxa/mfp.txt +++ b/Documentation/arm/pxa/mfp.rst | |||
| @@ -1,4 +1,6 @@ | |||
| 1 | MFP Configuration for PXA2xx/PXA3xx Processors | 1 | ============================================== |
| 2 | MFP Configuration for PXA2xx/PXA3xx Processors | ||
| 3 | ============================================== | ||
| 2 | 4 | ||
| 3 | Eric Miao <eric.miao@marvell.com> | 5 | Eric Miao <eric.miao@marvell.com> |
| 4 | 6 | ||
| @@ -6,15 +8,15 @@ MFP stands for Multi-Function Pin, which is the pin-mux logic on PXA3xx and | |||
| 6 | later PXA series processors. This document describes the existing MFP API, | 8 | later PXA series processors. This document describes the existing MFP API, |
| 7 | and how board/platform driver authors could make use of it. | 9 | and how board/platform driver authors could make use of it. |
| 8 | 10 | ||
| 9 | Basic Concept | 11 | Basic Concept |
| 10 | =============== | 12 | ============= |
| 11 | 13 | ||
| 12 | Unlike the GPIO alternate function settings on PXA25x and PXA27x, a new MFP | 14 | Unlike the GPIO alternate function settings on PXA25x and PXA27x, a new MFP |
| 13 | mechanism is introduced from PXA3xx to completely move the pin-mux functions | 15 | mechanism is introduced from PXA3xx to completely move the pin-mux functions |
| 14 | out of the GPIO controller. In addition to pin-mux configurations, the MFP | 16 | out of the GPIO controller. In addition to pin-mux configurations, the MFP |
| 15 | also controls the low power state, driving strength, pull-up/down and event | 17 | also controls the low power state, driving strength, pull-up/down and event |
| 16 | detection of each pin. Below is a diagram of internal connections between | 18 | detection of each pin. Below is a diagram of internal connections between |
| 17 | the MFP logic and the remaining SoC peripherals: | 19 | the MFP logic and the remaining SoC peripherals:: |
| 18 | 20 | ||
| 19 | +--------+ | 21 | +--------+ |
| 20 | | |--(GPIO19)--+ | 22 | | |--(GPIO19)--+ |
| @@ -69,8 +71,8 @@ NOTE: with such a clear separation of MFP and GPIO, by GPIO<xx> we normally | |||
| 69 | mean it is a GPIO signal, and by MFP<xxx> or pin xxx, we mean a physical | 71 | mean it is a GPIO signal, and by MFP<xxx> or pin xxx, we mean a physical |
| 70 | pad (or ball). | 72 | pad (or ball). |
| 71 | 73 | ||
| 72 | MFP API Usage | 74 | MFP API Usage |
| 73 | =============== | 75 | ============= |
| 74 | 76 | ||
| 75 | For board code writers, here are some guidelines: | 77 | For board code writers, here are some guidelines: |
| 76 | 78 | ||
| @@ -94,9 +96,9 @@ For board code writers, here are some guidelines: | |||
| 94 | PXA310 supporting some additional ones), thus the difference is actually | 96 | PXA310 supporting some additional ones), thus the difference is actually |
| 95 | covered in a single mfp-pxa300.h. | 97 | covered in a single mfp-pxa300.h. |
| 96 | 98 | ||
| 97 | 2. prepare an array for the initial pin configurations, e.g.: | 99 | 2. prepare an array for the initial pin configurations, e.g.:: |
| 98 | 100 | ||
| 99 | static unsigned long mainstone_pin_config[] __initdata = { | 101 | static unsigned long mainstone_pin_config[] __initdata = { |
| 100 | /* Chip Select */ | 102 | /* Chip Select */ |
| 101 | GPIO15_nCS_1, | 103 | GPIO15_nCS_1, |
| 102 | 104 | ||
| @@ -116,7 +118,7 @@ For board code writers, here are some guidelines: | |||
| 116 | 118 | ||
| 117 | /* GPIO */ | 119 | /* GPIO */ |
| 118 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, | 120 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, |
| 119 | }; | 121 | }; |
| 120 | 122 | ||
| 121 | a) once the pin configurations are passed to pxa{2xx,3xx}_mfp_config(), | 123 | a) once the pin configurations are passed to pxa{2xx,3xx}_mfp_config(), |
| 122 | and written to the actual registers, they are useless and may discard, | 124 | and written to the actual registers, they are useless and may discard, |
| @@ -143,17 +145,17 @@ For board code writers, here are some guidelines: | |||
| 143 | d) although PXA3xx MFP supports edge detection on each pin, the | 145 | d) although PXA3xx MFP supports edge detection on each pin, the |
| 144 | internal logic will only wakeup the system when those specific bits | 146 | internal logic will only wakeup the system when those specific bits |
| 145 | in ADxER registers are set, which can be well mapped to the | 147 | in ADxER registers are set, which can be well mapped to the |
| 146 | corresponding peripheral, thus set_irq_wake() can be called with | 148 | corresponding peripheral, thus set_irq_wake() can be called with |
| 147 | the peripheral IRQ to enable the wakeup. | 149 | the peripheral IRQ to enable the wakeup. |
| 148 | 150 | ||
| 149 | 151 | ||
| 150 | MFP on PXA3xx | 152 | MFP on PXA3xx |
| 151 | =============== | 153 | ============= |
| 152 | 154 | ||
| 153 | Every external I/O pad on PXA3xx (excluding those for special purpose) has | 155 | Every external I/O pad on PXA3xx (excluding those for special purpose) has |
| 154 | one MFP logic associated, and is controlled by one MFP register (MFPR). | 156 | one MFP logic associated, and is controlled by one MFP register (MFPR). |
| 155 | 157 | ||
| 156 | The MFPR has the following bit definitions (for PXA300/PXA310/PXA320): | 158 | The MFPR has the following bit definitions (for PXA300/PXA310/PXA320):: |
| 157 | 159 | ||
| 158 | 31 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 | 160 | 31 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 |
| 159 | +-------------------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 161 | +-------------------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
| @@ -183,8 +185,8 @@ The MFPR has the following bit definitions (for PXA300/PXA310/PXA320): | |||
| 183 | 0b006 - slow 10mA | 185 | 0b006 - slow 10mA |
| 184 | 0b007 - fast 10mA | 186 | 0b007 - fast 10mA |
| 185 | 187 | ||
| 186 | MFP Design for PXA2xx/PXA3xx | 188 | MFP Design for PXA2xx/PXA3xx |
| 187 | ============================== | 189 | ============================ |
| 188 | 190 | ||
| 189 | Due to the difference of pin-mux handling between PXA2xx and PXA3xx, a unified | 191 | Due to the difference of pin-mux handling between PXA2xx and PXA3xx, a unified |
| 190 | MFP API is introduced to cover both series of processors. | 192 | MFP API is introduced to cover both series of processors. |
| @@ -194,11 +196,11 @@ configurations, these definitions are processor and platform independent, and | |||
| 194 | the actual API invoked to convert these definitions into register settings and | 196 | the actual API invoked to convert these definitions into register settings and |
| 195 | make them effective there-after. | 197 | make them effective there-after. |
| 196 | 198 | ||
| 197 | Files Involved | 199 | Files Involved |
| 198 | -------------- | 200 | -------------- |
| 199 | 201 | ||
| 200 | - arch/arm/mach-pxa/include/mach/mfp.h | 202 | - arch/arm/mach-pxa/include/mach/mfp.h |
| 201 | 203 | ||
| 202 | for | 204 | for |
| 203 | 1. Unified pin definitions - enum constants for all configurable pins | 205 | 1. Unified pin definitions - enum constants for all configurable pins |
| 204 | 2. processor-neutral bit definitions for a possible MFP configuration | 206 | 2. processor-neutral bit definitions for a possible MFP configuration |
| @@ -226,42 +228,42 @@ make them effective there-after. | |||
| 226 | for implementation of the pin configuration to take effect for the actual | 228 | for implementation of the pin configuration to take effect for the actual |
| 227 | processor. | 229 | processor. |
| 228 | 230 | ||
| 229 | Pin Configuration | 231 | Pin Configuration |
| 230 | ----------------- | 232 | ----------------- |
| 231 | 233 | ||
| 232 | The following comments are copied from mfp.h (see the actual source code | 234 | The following comments are copied from mfp.h (see the actual source code |
| 233 | for most updated info) | 235 | for most updated info):: |
| 234 | 236 | ||
| 235 | /* | 237 | /* |
| 236 | * a possible MFP configuration is represented by a 32-bit integer | 238 | * a possible MFP configuration is represented by a 32-bit integer |
| 237 | * | 239 | * |
| 238 | * bit 0.. 9 - MFP Pin Number (1024 Pins Maximum) | 240 | * bit 0.. 9 - MFP Pin Number (1024 Pins Maximum) |
| 239 | * bit 10..12 - Alternate Function Selection | 241 | * bit 10..12 - Alternate Function Selection |
| 240 | * bit 13..15 - Drive Strength | 242 | * bit 13..15 - Drive Strength |
| 241 | * bit 16..18 - Low Power Mode State | 243 | * bit 16..18 - Low Power Mode State |
| 242 | * bit 19..20 - Low Power Mode Edge Detection | 244 | * bit 19..20 - Low Power Mode Edge Detection |
| 243 | * bit 21..22 - Run Mode Pull State | 245 | * bit 21..22 - Run Mode Pull State |
| 244 | * | 246 | * |
| 245 | * to facilitate the definition, the following macros are provided | 247 | * to facilitate the definition, the following macros are provided |
| 246 | * | 248 | * |
| 247 | * MFP_CFG_DEFAULT - default MFP configuration value, with | 249 | * MFP_CFG_DEFAULT - default MFP configuration value, with |
| 248 | * alternate function = 0, | 250 | * alternate function = 0, |
| 249 | * drive strength = fast 3mA (MFP_DS03X) | 251 | * drive strength = fast 3mA (MFP_DS03X) |
| 250 | * low power mode = default | 252 | * low power mode = default |
| 251 | * edge detection = none | 253 | * edge detection = none |
| 252 | * | 254 | * |
| 253 | * MFP_CFG - default MFPR value with alternate function | 255 | * MFP_CFG - default MFPR value with alternate function |
| 254 | * MFP_CFG_DRV - default MFPR value with alternate function and | 256 | * MFP_CFG_DRV - default MFPR value with alternate function and |
| 255 | * pin drive strength | 257 | * pin drive strength |
| 256 | * MFP_CFG_LPM - default MFPR value with alternate function and | 258 | * MFP_CFG_LPM - default MFPR value with alternate function and |
| 257 | * low power mode | 259 | * low power mode |
| 258 | * MFP_CFG_X - default MFPR value with alternate function, | 260 | * MFP_CFG_X - default MFPR value with alternate function, |
| 259 | * pin drive strength and low power mode | 261 | * pin drive strength and low power mode |
| 260 | */ | 262 | */ |
| 261 | 263 | ||
| 262 | Examples of pin configurations are: | 264 | Examples of pin configurations are:: |
| 263 | 265 | ||
| 264 | #define GPIO94_SSP3_RXD MFP_CFG_X(GPIO94, AF1, DS08X, FLOAT) | 266 | #define GPIO94_SSP3_RXD MFP_CFG_X(GPIO94, AF1, DS08X, FLOAT) |
| 265 | 267 | ||
| 266 | which reads GPIO94 can be configured as SSP3_RXD, with alternate function | 268 | which reads GPIO94 can be configured as SSP3_RXD, with alternate function |
| 267 | selection of 1, driving strength of 0b101, and a float state in low power | 269 | selection of 1, driving strength of 0b101, and a float state in low power |
| @@ -272,8 +274,8 @@ make them effective there-after. | |||
| 272 | do so, simply because this default setting is usually carefully encoded, | 274 | do so, simply because this default setting is usually carefully encoded, |
| 273 | and is supposed to work in most cases. | 275 | and is supposed to work in most cases. |
| 274 | 276 | ||
| 275 | Register Settings | 277 | Register Settings |
| 276 | ----------------- | 278 | ----------------- |
| 277 | 279 | ||
| 278 | Register settings on PXA3xx for a pin configuration is actually very | 280 | Register settings on PXA3xx for a pin configuration is actually very |
| 279 | straight-forward, most bits can be converted directly into MFPR value | 281 | straight-forward, most bits can be converted directly into MFPR value |
diff --git a/Documentation/arm/SA1100/ADSBitsy b/Documentation/arm/sa1100/adsbitsy.rst index f9f62e8c0719..c179cb26b682 100644 --- a/Documentation/arm/SA1100/ADSBitsy +++ b/Documentation/arm/sa1100/adsbitsy.rst | |||
| @@ -1,4 +1,7 @@ | |||
| 1 | =============================== | ||
| 1 | ADS Bitsy Single Board Computer | 2 | ADS Bitsy Single Board Computer |
| 3 | =============================== | ||
| 4 | |||
| 2 | (It is different from Bitsy(iPAQ) of Compaq) | 5 | (It is different from Bitsy(iPAQ) of Compaq) |
| 3 | 6 | ||
| 4 | For more details, contact Applied Data Systems or see | 7 | For more details, contact Applied Data Systems or see |
| @@ -15,7 +18,9 @@ The kernel zImage is linked to be loaded and executed at 0xc0400000. | |||
| 15 | Linux can be used with the ADS BootLoader that ships with the | 18 | Linux can be used with the ADS BootLoader that ships with the |
| 16 | newer rev boards. See their documentation on how to load Linux. | 19 | newer rev boards. See their documentation on how to load Linux. |
| 17 | 20 | ||
| 18 | Supported peripherals: | 21 | Supported peripherals |
| 22 | ===================== | ||
| 23 | |||
| 19 | - SA1100 LCD frame buffer (8/16bpp...sort of) | 24 | - SA1100 LCD frame buffer (8/16bpp...sort of) |
| 20 | - SA1111 USB Master | 25 | - SA1111 USB Master |
| 21 | - SA1100 serial port | 26 | - SA1100 serial port |
| @@ -25,10 +30,13 @@ Supported peripherals: | |||
| 25 | - serial ports (ttyS[0-2]) | 30 | - serial ports (ttyS[0-2]) |
| 26 | - ttyS0 is default for serial console | 31 | - ttyS0 is default for serial console |
| 27 | 32 | ||
| 28 | To do: | 33 | To do |
| 34 | ===== | ||
| 35 | |||
| 29 | - everything else! :-) | 36 | - everything else! :-) |
| 30 | 37 | ||
| 31 | Notes: | 38 | Notes |
| 39 | ===== | ||
| 32 | 40 | ||
| 33 | - The flash on board is divided into 3 partitions. | 41 | - The flash on board is divided into 3 partitions. |
| 34 | You should be careful to use flash on board. | 42 | You should be careful to use flash on board. |
diff --git a/Documentation/arm/SA1100/Assabet b/Documentation/arm/sa1100/assabet.rst index e08a6739e72c..3e704831c311 100644 --- a/Documentation/arm/SA1100/Assabet +++ b/Documentation/arm/sa1100/assabet.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ============================================ | ||
| 1 | The Intel Assabet (SA-1110 evaluation) board | 2 | The Intel Assabet (SA-1110 evaluation) board |
| 2 | ============================================ | 3 | ============================================ |
| 3 | 4 | ||
| @@ -11,7 +12,7 @@ http://www.cs.cmu.edu/~wearable/software/assabet.html | |||
| 11 | Building the kernel | 12 | Building the kernel |
| 12 | ------------------- | 13 | ------------------- |
| 13 | 14 | ||
| 14 | To build the kernel with current defaults: | 15 | To build the kernel with current defaults:: |
| 15 | 16 | ||
| 16 | make assabet_config | 17 | make assabet_config |
| 17 | make oldconfig | 18 | make oldconfig |
| @@ -51,9 +52,9 @@ Brief examples on how to boot Linux with RedBoot are shown below. But first | |||
| 51 | you need to have RedBoot installed in your flash memory. A known to work | 52 | you need to have RedBoot installed in your flash memory. A known to work |
| 52 | precompiled RedBoot binary is available from the following location: | 53 | precompiled RedBoot binary is available from the following location: |
| 53 | 54 | ||
| 54 | ftp://ftp.netwinder.org/users/n/nico/ | 55 | - ftp://ftp.netwinder.org/users/n/nico/ |
| 55 | ftp://ftp.arm.linux.org.uk/pub/linux/arm/people/nico/ | 56 | - ftp://ftp.arm.linux.org.uk/pub/linux/arm/people/nico/ |
| 56 | ftp://ftp.handhelds.org/pub/linux/arm/sa-1100-patches/ | 57 | - ftp://ftp.handhelds.org/pub/linux/arm/sa-1100-patches/ |
| 57 | 58 | ||
| 58 | Look for redboot-assabet*.tgz. Some installation infos are provided in | 59 | Look for redboot-assabet*.tgz. Some installation infos are provided in |
| 59 | redboot-assabet*.txt. | 60 | redboot-assabet*.txt. |
| @@ -71,12 +72,12 @@ Socket Communications Inc.), you should strongly consider using it for TFTP | |||
| 71 | file transfers. You must insert it before RedBoot runs since it can't detect | 72 | file transfers. You must insert it before RedBoot runs since it can't detect |
| 72 | it dynamically. | 73 | it dynamically. |
| 73 | 74 | ||
| 74 | To initialize the flash directory: | 75 | To initialize the flash directory:: |
| 75 | 76 | ||
| 76 | fis init -f | 77 | fis init -f |
| 77 | 78 | ||
| 78 | To initialize the non-volatile settings, like whether you want to use BOOTP or | 79 | To initialize the non-volatile settings, like whether you want to use BOOTP or |
| 79 | a static IP address, etc, use this command: | 80 | a static IP address, etc, use this command:: |
| 80 | 81 | ||
| 81 | fconfig -i | 82 | fconfig -i |
| 82 | 83 | ||
| @@ -85,15 +86,15 @@ Writing a kernel image into flash | |||
| 85 | --------------------------------- | 86 | --------------------------------- |
| 86 | 87 | ||
| 87 | First, the kernel image must be loaded into RAM. If you have the zImage file | 88 | First, the kernel image must be loaded into RAM. If you have the zImage file |
| 88 | available on a TFTP server: | 89 | available on a TFTP server:: |
| 89 | 90 | ||
| 90 | load zImage -r -b 0x100000 | 91 | load zImage -r -b 0x100000 |
| 91 | 92 | ||
| 92 | If you rather want to use Y-Modem upload over the serial port: | 93 | If you rather want to use Y-Modem upload over the serial port:: |
| 93 | 94 | ||
| 94 | load -m ymodem -r -b 0x100000 | 95 | load -m ymodem -r -b 0x100000 |
| 95 | 96 | ||
| 96 | To write it to flash: | 97 | To write it to flash:: |
| 97 | 98 | ||
| 98 | fis create "Linux kernel" -b 0x100000 -l 0xc0000 | 99 | fis create "Linux kernel" -b 0x100000 -l 0xc0000 |
| 99 | 100 | ||
| @@ -102,18 +103,18 @@ Booting the kernel | |||
| 102 | ------------------ | 103 | ------------------ |
| 103 | 104 | ||
| 104 | The kernel still requires a filesystem to boot. A ramdisk image can be loaded | 105 | The kernel still requires a filesystem to boot. A ramdisk image can be loaded |
| 105 | as follows: | 106 | as follows:: |
| 106 | 107 | ||
| 107 | load ramdisk_image.gz -r -b 0x800000 | 108 | load ramdisk_image.gz -r -b 0x800000 |
| 108 | 109 | ||
| 109 | Again, Y-Modem upload can be used instead of TFTP by replacing the file name | 110 | Again, Y-Modem upload can be used instead of TFTP by replacing the file name |
| 110 | by '-y ymodem'. | 111 | by '-y ymodem'. |
| 111 | 112 | ||
| 112 | Now the kernel can be retrieved from flash like this: | 113 | Now the kernel can be retrieved from flash like this:: |
| 113 | 114 | ||
| 114 | fis load "Linux kernel" | 115 | fis load "Linux kernel" |
| 115 | 116 | ||
| 116 | or loaded as described previously. To boot the kernel: | 117 | or loaded as described previously. To boot the kernel:: |
| 117 | 118 | ||
| 118 | exec -b 0x100000 -l 0xc0000 | 119 | exec -b 0x100000 -l 0xc0000 |
| 119 | 120 | ||
| @@ -134,35 +135,35 @@ creating JFFS/JFFS2 images is available from the same site. | |||
| 134 | For instance, a sample JFFS2 image can be retrieved from the same FTP sites | 135 | For instance, a sample JFFS2 image can be retrieved from the same FTP sites |
| 135 | mentioned below for the precompiled RedBoot image. | 136 | mentioned below for the precompiled RedBoot image. |
| 136 | 137 | ||
| 137 | To load this file: | 138 | To load this file:: |
| 138 | 139 | ||
| 139 | load sample_img.jffs2 -r -b 0x100000 | 140 | load sample_img.jffs2 -r -b 0x100000 |
| 140 | 141 | ||
| 141 | The result should look like: | 142 | The result should look like:: |
| 142 | 143 | ||
| 143 | RedBoot> load sample_img.jffs2 -r -b 0x100000 | 144 | RedBoot> load sample_img.jffs2 -r -b 0x100000 |
| 144 | Raw file loaded 0x00100000-0x00377424 | 145 | Raw file loaded 0x00100000-0x00377424 |
| 145 | 146 | ||
| 146 | Now we must know the size of the unallocated flash: | 147 | Now we must know the size of the unallocated flash:: |
| 147 | 148 | ||
| 148 | fis free | 149 | fis free |
| 149 | 150 | ||
| 150 | Result: | 151 | Result:: |
| 151 | 152 | ||
| 152 | RedBoot> fis free | 153 | RedBoot> fis free |
| 153 | 0x500E0000 .. 0x503C0000 | 154 | 0x500E0000 .. 0x503C0000 |
| 154 | 155 | ||
| 155 | The values above may be different depending on the size of the filesystem and | 156 | The values above may be different depending on the size of the filesystem and |
| 156 | the type of flash. See their usage below as an example and take care of | 157 | the type of flash. See their usage below as an example and take care of |
| 157 | substituting yours appropriately. | 158 | substituting yours appropriately. |
| 158 | 159 | ||
| 159 | We must determine some values: | 160 | We must determine some values:: |
| 160 | 161 | ||
| 161 | size of unallocated flash: 0x503c0000 - 0x500e0000 = 0x2e0000 | 162 | size of unallocated flash: 0x503c0000 - 0x500e0000 = 0x2e0000 |
| 162 | size of the filesystem image: 0x00377424 - 0x00100000 = 0x277424 | 163 | size of the filesystem image: 0x00377424 - 0x00100000 = 0x277424 |
| 163 | 164 | ||
| 164 | We want to fit the filesystem image of course, but we also want to give it all | 165 | We want to fit the filesystem image of course, but we also want to give it all |
| 165 | the remaining flash space as well. To write it: | 166 | the remaining flash space as well. To write it:: |
| 166 | 167 | ||
| 167 | fis unlock -f 0x500E0000 -l 0x2e0000 | 168 | fis unlock -f 0x500E0000 -l 0x2e0000 |
| 168 | fis erase -f 0x500E0000 -l 0x2e0000 | 169 | fis erase -f 0x500E0000 -l 0x2e0000 |
| @@ -171,32 +172,32 @@ the remaining flash space as well. To write it: | |||
| 171 | 172 | ||
| 172 | Now the filesystem is associated to a MTD "partition" once Linux has discovered | 173 | Now the filesystem is associated to a MTD "partition" once Linux has discovered |
| 173 | what they are in the boot process. From Redboot, the 'fis list' command | 174 | what they are in the boot process. From Redboot, the 'fis list' command |
| 174 | displays them: | 175 | displays them:: |
| 175 | 176 | ||
| 176 | RedBoot> fis list | 177 | RedBoot> fis list |
| 177 | Name FLASH addr Mem addr Length Entry point | 178 | Name FLASH addr Mem addr Length Entry point |
| 178 | RedBoot 0x50000000 0x50000000 0x00020000 0x00000000 | 179 | RedBoot 0x50000000 0x50000000 0x00020000 0x00000000 |
| 179 | RedBoot config 0x503C0000 0x503C0000 0x00020000 0x00000000 | 180 | RedBoot config 0x503C0000 0x503C0000 0x00020000 0x00000000 |
| 180 | FIS directory 0x503E0000 0x503E0000 0x00020000 0x00000000 | 181 | FIS directory 0x503E0000 0x503E0000 0x00020000 0x00000000 |
| 181 | Linux kernel 0x50020000 0x00100000 0x000C0000 0x00000000 | 182 | Linux kernel 0x50020000 0x00100000 0x000C0000 0x00000000 |
| 182 | JFFS2 0x500E0000 0x500E0000 0x002E0000 0x00000000 | 183 | JFFS2 0x500E0000 0x500E0000 0x002E0000 0x00000000 |
| 183 | 184 | ||
| 184 | However Linux should display something like: | 185 | However Linux should display something like:: |
| 185 | 186 | ||
| 186 | SA1100 flash: probing 32-bit flash bus | 187 | SA1100 flash: probing 32-bit flash bus |
| 187 | SA1100 flash: Found 2 x16 devices at 0x0 in 32-bit mode | 188 | SA1100 flash: Found 2 x16 devices at 0x0 in 32-bit mode |
| 188 | Using RedBoot partition definition | 189 | Using RedBoot partition definition |
| 189 | Creating 5 MTD partitions on "SA1100 flash": | 190 | Creating 5 MTD partitions on "SA1100 flash": |
| 190 | 0x00000000-0x00020000 : "RedBoot" | 191 | 0x00000000-0x00020000 : "RedBoot" |
| 191 | 0x00020000-0x000e0000 : "Linux kernel" | 192 | 0x00020000-0x000e0000 : "Linux kernel" |
| 192 | 0x000e0000-0x003c0000 : "JFFS2" | 193 | 0x000e0000-0x003c0000 : "JFFS2" |
| 193 | 0x003c0000-0x003e0000 : "RedBoot config" | 194 | 0x003c0000-0x003e0000 : "RedBoot config" |
| 194 | 0x003e0000-0x00400000 : "FIS directory" | 195 | 0x003e0000-0x00400000 : "FIS directory" |
| 195 | 196 | ||
| 196 | What's important here is the position of the partition we are interested in, | 197 | What's important here is the position of the partition we are interested in, |
| 197 | which is the third one. Within Linux, this correspond to /dev/mtdblock2. | 198 | which is the third one. Within Linux, this correspond to /dev/mtdblock2. |
| 198 | Therefore to boot Linux with the kernel and its root filesystem in flash, we | 199 | Therefore to boot Linux with the kernel and its root filesystem in flash, we |
| 199 | need this RedBoot command: | 200 | need this RedBoot command:: |
| 200 | 201 | ||
| 201 | fis load "Linux kernel" | 202 | fis load "Linux kernel" |
| 202 | exec -b 0x100000 -l 0xc0000 -c "root=/dev/mtdblock2" | 203 | exec -b 0x100000 -l 0xc0000 -c "root=/dev/mtdblock2" |
| @@ -218,21 +219,21 @@ time the Assabet is rebooted. Therefore it's possible to automate the boot | |||
| 218 | process using RedBoot's scripting capability. | 219 | process using RedBoot's scripting capability. |
| 219 | 220 | ||
| 220 | For example, I use this to boot Linux with both the kernel and the ramdisk | 221 | For example, I use this to boot Linux with both the kernel and the ramdisk |
| 221 | images retrieved from a TFTP server on the network: | 222 | images retrieved from a TFTP server on the network:: |
| 222 | 223 | ||
| 223 | RedBoot> fconfig | 224 | RedBoot> fconfig |
| 224 | Run script at boot: false true | 225 | Run script at boot: false true |
| 225 | Boot script: | 226 | Boot script: |
| 226 | Enter script, terminate with empty line | 227 | Enter script, terminate with empty line |
| 227 | >> load zImage -r -b 0x100000 | 228 | >> load zImage -r -b 0x100000 |
| 228 | >> load ramdisk_ks.gz -r -b 0x800000 | 229 | >> load ramdisk_ks.gz -r -b 0x800000 |
| 229 | >> exec -b 0x100000 -l 0xc0000 | 230 | >> exec -b 0x100000 -l 0xc0000 |
| 230 | >> | 231 | >> |
| 231 | Boot script timeout (1000ms resolution): 3 | 232 | Boot script timeout (1000ms resolution): 3 |
| 232 | Use BOOTP for network configuration: true | 233 | Use BOOTP for network configuration: true |
| 233 | GDB connection port: 9000 | 234 | GDB connection port: 9000 |
| 234 | Network debug at boot time: false | 235 | Network debug at boot time: false |
| 235 | Update RedBoot non-volatile configuration - are you sure (y/n)? y | 236 | Update RedBoot non-volatile configuration - are you sure (y/n)? y |
| 236 | 237 | ||
| 237 | Then, rebooting the Assabet is just a matter of waiting for the login prompt. | 238 | Then, rebooting the Assabet is just a matter of waiting for the login prompt. |
| 238 | 239 | ||
| @@ -240,6 +241,7 @@ Then, rebooting the Assabet is just a matter of waiting for the login prompt. | |||
| 240 | 241 | ||
| 241 | Nicolas Pitre | 242 | Nicolas Pitre |
| 242 | nico@fluxnic.net | 243 | nico@fluxnic.net |
| 244 | |||
| 243 | June 12, 2001 | 245 | June 12, 2001 |
| 244 | 246 | ||
| 245 | 247 | ||
| @@ -249,52 +251,51 @@ Status of peripherals in -rmk tree (updated 14/10/2001) | |||
| 249 | Assabet: | 251 | Assabet: |
| 250 | Serial ports: | 252 | Serial ports: |
| 251 | Radio: TX, RX, CTS, DSR, DCD, RI | 253 | Radio: TX, RX, CTS, DSR, DCD, RI |
| 252 | PM: Not tested. | 254 | - PM: Not tested. |
| 253 | COM: TX, RX, CTS, DSR, DCD, RTS, DTR, PM | 255 | - COM: TX, RX, CTS, DSR, DCD, RTS, DTR, PM |
| 254 | PM: Not tested. | 256 | - PM: Not tested. |
| 255 | I2C: Implemented, not fully tested. | 257 | - I2C: Implemented, not fully tested. |
| 256 | L3: Fully tested, pass. | 258 | - L3: Fully tested, pass. |
| 257 | PM: Not tested. | 259 | - PM: Not tested. |
| 258 | 260 | ||
| 259 | Video: | 261 | Video: |
| 260 | LCD: Fully tested. PM | 262 | - LCD: Fully tested. PM |
| 261 | (LCD doesn't like being blanked with | 263 | |
| 262 | neponset connected) | 264 | (LCD doesn't like being blanked with neponset connected) |
| 263 | Video out: Not fully | 265 | |
| 266 | - Video out: Not fully | ||
| 264 | 267 | ||
| 265 | Audio: | 268 | Audio: |
| 266 | UDA1341: | 269 | UDA1341: |
| 267 | Playback: Fully tested, pass. | 270 | - Playback: Fully tested, pass. |
| 268 | Record: Implemented, not tested. | 271 | - Record: Implemented, not tested. |
| 269 | PM: Not tested. | 272 | - PM: Not tested. |
| 270 | 273 | ||
| 271 | UCB1200: | 274 | UCB1200: |
| 272 | Audio play: Implemented, not heavily tested. | 275 | - Audio play: Implemented, not heavily tested. |
| 273 | Audio rec: Implemented, not heavily tested. | 276 | - Audio rec: Implemented, not heavily tested. |
| 274 | Telco audio play: Implemented, not heavily tested. | 277 | - Telco audio play: Implemented, not heavily tested. |
| 275 | Telco audio rec: Implemented, not heavily tested. | 278 | - Telco audio rec: Implemented, not heavily tested. |
| 276 | POTS control: No | 279 | - POTS control: No |
| 277 | Touchscreen: Yes | 280 | - Touchscreen: Yes |
| 278 | PM: Not tested. | 281 | - PM: Not tested. |
| 279 | 282 | ||
| 280 | Other: | 283 | Other: |
| 281 | PCMCIA: | 284 | - PCMCIA: |
| 282 | LPE: Fully tested, pass. | 285 | - LPE: Fully tested, pass. |
| 283 | USB: No | 286 | - USB: No |
| 284 | IRDA: | 287 | - IRDA: |
| 285 | SIR: Fully tested, pass. | 288 | - SIR: Fully tested, pass. |
| 286 | FIR: Fully tested, pass. | 289 | - FIR: Fully tested, pass. |
| 287 | PM: Not tested. | 290 | - PM: Not tested. |
| 288 | 291 | ||
| 289 | Neponset: | 292 | Neponset: |
| 290 | Serial ports: | 293 | Serial ports: |
| 291 | COM1,2: TX, RX, CTS, DSR, DCD, RTS, DTR | 294 | - COM1,2: TX, RX, CTS, DSR, DCD, RTS, DTR |
| 292 | PM: Not tested. | 295 | - PM: Not tested. |
| 293 | USB: Implemented, not heavily tested. | 296 | - USB: Implemented, not heavily tested. |
| 294 | PCMCIA: Implemented, not heavily tested. | 297 | - PCMCIA: Implemented, not heavily tested. |
| 295 | PM: Not tested. | 298 | - CF: Implemented, not heavily tested. |
| 296 | CF: Implemented, not heavily tested. | 299 | - PM: Not tested. |
| 297 | PM: Not tested. | ||
| 298 | 300 | ||
| 299 | More stuff can be found in the -np (Nicolas Pitre's) tree. | 301 | More stuff can be found in the -np (Nicolas Pitre's) tree. |
| 300 | |||
diff --git a/Documentation/arm/SA1100/Brutus b/Documentation/arm/sa1100/brutus.rst index 6a3aa95e9bfd..e1a23bee6d44 100644 --- a/Documentation/arm/SA1100/Brutus +++ b/Documentation/arm/sa1100/brutus.rst | |||
| @@ -1,9 +1,13 @@ | |||
| 1 | Brutus is an evaluation platform for the SA1100 manufactured by Intel. | 1 | ====== |
| 2 | Brutus | ||
| 3 | ====== | ||
| 4 | |||
| 5 | Brutus is an evaluation platform for the SA1100 manufactured by Intel. | ||
| 2 | For more details, see: | 6 | For more details, see: |
| 3 | 7 | ||
| 4 | http://developer.intel.com | 8 | http://developer.intel.com |
| 5 | 9 | ||
| 6 | To compile for Brutus, you must issue the following commands: | 10 | To compile for Brutus, you must issue the following commands:: |
| 7 | 11 | ||
| 8 | make brutus_config | 12 | make brutus_config |
| 9 | make config | 13 | make config |
| @@ -16,25 +20,23 @@ must be loaded at 0xc0008000 in Brutus's memory and execution started at | |||
| 16 | entry. | 20 | entry. |
| 17 | 21 | ||
| 18 | But prior to execute the kernel, a ramdisk image must also be loaded in | 22 | But prior to execute the kernel, a ramdisk image must also be loaded in |
| 19 | memory. Use memory address 0xd8000000 for this. Note that the file | 23 | memory. Use memory address 0xd8000000 for this. Note that the file |
| 20 | containing the (compressed) ramdisk image must not exceed 4 MB. | 24 | containing the (compressed) ramdisk image must not exceed 4 MB. |
| 21 | 25 | ||
| 22 | Typically, you'll need angelboot to load the kernel. | 26 | Typically, you'll need angelboot to load the kernel. |
| 23 | The following angelboot.opt file should be used: | 27 | The following angelboot.opt file should be used:: |
| 24 | 28 | ||
| 25 | ----- begin angelboot.opt ----- | 29 | base 0xc0008000 |
| 26 | base 0xc0008000 | 30 | entry 0xc0008000 |
| 27 | entry 0xc0008000 | 31 | r0 0x00000000 |
| 28 | r0 0x00000000 | 32 | r1 0x00000010 |
| 29 | r1 0x00000010 | 33 | device /dev/ttyS0 |
| 30 | device /dev/ttyS0 | 34 | options "9600 8N1" |
| 31 | options "9600 8N1" | 35 | baud 115200 |
| 32 | baud 115200 | 36 | otherfile ramdisk_img.gz |
| 33 | otherfile ramdisk_img.gz | 37 | otherbase 0xd8000000 |
| 34 | otherbase 0xd8000000 | 38 | |
| 35 | ----- end angelboot.opt ----- | 39 | Then load the kernel and ramdisk with:: |
| 36 | |||
| 37 | Then load the kernel and ramdisk with: | ||
| 38 | 40 | ||
| 39 | angelboot -f angelboot.opt zImage | 41 | angelboot -f angelboot.opt zImage |
| 40 | 42 | ||
| @@ -44,14 +46,16 @@ console is provided through the second Brutus serial port. To access it, | |||
| 44 | you may use minicom configured with /dev/ttyS1, 9600 baud, 8N1, no flow | 46 | you may use minicom configured with /dev/ttyS1, 9600 baud, 8N1, no flow |
| 45 | control. | 47 | control. |
| 46 | 48 | ||
| 47 | Currently supported: | 49 | Currently supported |
| 50 | =================== | ||
| 51 | |||
| 48 | - RS232 serial ports | 52 | - RS232 serial ports |
| 49 | - audio output | 53 | - audio output |
| 50 | - LCD screen | 54 | - LCD screen |
| 51 | - keyboard | 55 | - keyboard |
| 52 | 56 | ||
| 53 | The actual Brutus support may not be complete without extra patches. | 57 | The actual Brutus support may not be complete without extra patches. |
| 54 | If such patches exist, they should be found from | 58 | If such patches exist, they should be found from |
| 55 | ftp.netwinder.org/users/n/nico. | 59 | ftp.netwinder.org/users/n/nico. |
| 56 | 60 | ||
| 57 | A full PCMCIA support is still missing, although it's possible to hack | 61 | A full PCMCIA support is still missing, although it's possible to hack |
| @@ -63,4 +67,3 @@ Any contribution is welcome. | |||
| 63 | Please send patches to nico@fluxnic.net | 67 | Please send patches to nico@fluxnic.net |
| 64 | 68 | ||
| 65 | Have Fun ! | 69 | Have Fun ! |
| 66 | |||
diff --git a/Documentation/arm/SA1100/CERF b/Documentation/arm/sa1100/cerf.rst index b3d845301ef1..7fa71b609bf9 100644 --- a/Documentation/arm/SA1100/CERF +++ b/Documentation/arm/sa1100/cerf.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ============== | ||
| 2 | CerfBoard/Cube | ||
| 3 | ============== | ||
| 4 | |||
| 1 | *** The StrongARM version of the CerfBoard/Cube has been discontinued *** | 5 | *** The StrongARM version of the CerfBoard/Cube has been discontinued *** |
| 2 | 6 | ||
| 3 | The Intrinsyc CerfBoard is a StrongARM 1110-based computer on a board | 7 | The Intrinsyc CerfBoard is a StrongARM 1110-based computer on a board |
| @@ -9,7 +13,9 @@ Intrinsyc website, http://www.intrinsyc.com. | |||
| 9 | This document describes the support in the Linux kernel for the | 13 | This document describes the support in the Linux kernel for the |
| 10 | Intrinsyc CerfBoard. | 14 | Intrinsyc CerfBoard. |
| 11 | 15 | ||
| 12 | Supported in this version: | 16 | Supported in this version |
| 17 | ========================= | ||
| 18 | |||
| 13 | - CompactFlash+ slot (select PCMCIA in General Setup and any options | 19 | - CompactFlash+ slot (select PCMCIA in General Setup and any options |
| 14 | that may be required) | 20 | that may be required) |
| 15 | - Onboard Crystal CS8900 Ethernet controller (Cerf CS8900A support in | 21 | - Onboard Crystal CS8900 Ethernet controller (Cerf CS8900A support in |
| @@ -19,7 +25,7 @@ Supported in this version: | |||
| 19 | In order to get this kernel onto your Cerf, you need a server that runs | 25 | In order to get this kernel onto your Cerf, you need a server that runs |
| 20 | both BOOTP and TFTP. Detailed instructions should have come with your | 26 | both BOOTP and TFTP. Detailed instructions should have come with your |
| 21 | evaluation kit on how to use the bootloader. This series of commands | 27 | evaluation kit on how to use the bootloader. This series of commands |
| 22 | will suffice: | 28 | will suffice:: |
| 23 | 29 | ||
| 24 | make ARCH=arm CROSS_COMPILE=arm-linux- cerfcube_defconfig | 30 | make ARCH=arm CROSS_COMPILE=arm-linux- cerfcube_defconfig |
| 25 | make ARCH=arm CROSS_COMPILE=arm-linux- zImage | 31 | make ARCH=arm CROSS_COMPILE=arm-linux- zImage |
diff --git a/Documentation/arm/sa1100/freebird.rst b/Documentation/arm/sa1100/freebird.rst new file mode 100644 index 000000000000..81043d0c6d64 --- /dev/null +++ b/Documentation/arm/sa1100/freebird.rst | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | ======== | ||
| 2 | Freebird | ||
| 3 | ======== | ||
| 4 | |||
| 5 | Freebird-1.1 is produced by Legend(C), Inc. | ||
| 6 | `http://web.archive.org/web/*/http://www.legend.com.cn` | ||
| 7 | and software/linux maintained by Coventive(C), Inc. | ||
| 8 | (http://www.coventive.com) | ||
| 9 | |||
| 10 | Based on the Nicolas's strongarm kernel tree. | ||
| 11 | |||
| 12 | Maintainer: | ||
| 13 | |||
| 14 | Chester Kuo | ||
| 15 | - <chester@coventive.com> | ||
| 16 | - <chester@linux.org.tw> | ||
| 17 | |||
| 18 | Author: | ||
| 19 | |||
| 20 | - Tim wu <timwu@coventive.com> | ||
| 21 | - CIH <cih@coventive.com> | ||
| 22 | - Eric Peng <ericpeng@coventive.com> | ||
| 23 | - Jeff Lee <jeff_lee@coventive.com> | ||
| 24 | - Allen Cheng | ||
| 25 | - Tony Liu <tonyliu@coventive.com> | ||
diff --git a/Documentation/arm/SA1100/GraphicsClient b/Documentation/arm/sa1100/graphicsclient.rst index 867bb35943af..a73d61c3ce91 100644 --- a/Documentation/arm/SA1100/GraphicsClient +++ b/Documentation/arm/sa1100/graphicsclient.rst | |||
| @@ -1,9 +1,11 @@ | |||
| 1 | ============================================= | ||
| 1 | ADS GraphicsClient Plus Single Board Computer | 2 | ADS GraphicsClient Plus Single Board Computer |
| 3 | ============================================= | ||
| 2 | 4 | ||
| 3 | For more details, contact Applied Data Systems or see | 5 | For more details, contact Applied Data Systems or see |
| 4 | http://www.applieddata.net/products.html | 6 | http://www.applieddata.net/products.html |
| 5 | 7 | ||
| 6 | The original Linux support for this product has been provided by | 8 | The original Linux support for this product has been provided by |
| 7 | Nicolas Pitre <nico@fluxnic.net>. Continued development work by | 9 | Nicolas Pitre <nico@fluxnic.net>. Continued development work by |
| 8 | Woojung Huh <whuh@applieddata.net> | 10 | Woojung Huh <whuh@applieddata.net> |
| 9 | 11 | ||
| @@ -14,8 +16,8 @@ board supports MTD/JFFS, so you could also mount something on there. | |||
| 14 | Use 'make graphicsclient_config' before any 'make config'. This will set up | 16 | Use 'make graphicsclient_config' before any 'make config'. This will set up |
| 15 | defaults for GraphicsClient Plus support. | 17 | defaults for GraphicsClient Plus support. |
| 16 | 18 | ||
| 17 | The kernel zImage is linked to be loaded and executed at 0xc0200000. | 19 | The kernel zImage is linked to be loaded and executed at 0xc0200000. |
| 18 | Also the following registers should have the specified values upon entry: | 20 | Also the following registers should have the specified values upon entry:: |
| 19 | 21 | ||
| 20 | r0 = 0 | 22 | r0 = 0 |
| 21 | r1 = 29 (this is the GraphicsClient architecture number) | 23 | r1 = 29 (this is the GraphicsClient architecture number) |
| @@ -31,23 +33,21 @@ as outlined below. In any case, if you're planning on deploying | |||
| 31 | something en masse, you should probably get the newer board. | 33 | something en masse, you should probably get the newer board. |
| 32 | 34 | ||
| 33 | If using Angel on the older boards, here is a typical angel.opt option file | 35 | If using Angel on the older boards, here is a typical angel.opt option file |
| 34 | if the kernel is loaded through the Angel Debug Monitor: | 36 | if the kernel is loaded through the Angel Debug Monitor:: |
| 35 | 37 | ||
| 36 | ----- begin angelboot.opt ----- | 38 | base 0xc0200000 |
| 37 | base 0xc0200000 | 39 | entry 0xc0200000 |
| 38 | entry 0xc0200000 | 40 | r0 0x00000000 |
| 39 | r0 0x00000000 | 41 | r1 0x0000001d |
| 40 | r1 0x0000001d | 42 | device /dev/ttyS1 |
| 41 | device /dev/ttyS1 | 43 | options "38400 8N1" |
| 42 | options "38400 8N1" | 44 | baud 115200 |
| 43 | baud 115200 | 45 | #otherfile ramdisk.gz |
| 44 | #otherfile ramdisk.gz | 46 | #otherbase 0xc0800000 |
| 45 | #otherbase 0xc0800000 | 47 | exec minicom |
| 46 | exec minicom | ||
| 47 | ----- end angelboot.opt ----- | ||
| 48 | 48 | ||
| 49 | Then the kernel (and ramdisk if otherfile/otherbase lines above are | 49 | Then the kernel (and ramdisk if otherfile/otherbase lines above are |
| 50 | uncommented) would be loaded with: | 50 | uncommented) would be loaded with:: |
| 51 | 51 | ||
| 52 | angelboot -f angelboot.opt zImage | 52 | angelboot -f angelboot.opt zImage |
| 53 | 53 | ||
| @@ -59,7 +59,9 @@ If any other bootloader is used, ensure it accomplish the same, especially | |||
| 59 | for r0/r1 register values before jumping into the kernel. | 59 | for r0/r1 register values before jumping into the kernel. |
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | Supported peripherals: | 62 | Supported peripherals |
| 63 | ===================== | ||
| 64 | |||
| 63 | - SA1100 LCD frame buffer (8/16bpp...sort of) | 65 | - SA1100 LCD frame buffer (8/16bpp...sort of) |
| 64 | - on-board SMC 92C96 ethernet NIC | 66 | - on-board SMC 92C96 ethernet NIC |
| 65 | - SA1100 serial port | 67 | - SA1100 serial port |
| @@ -74,11 +76,14 @@ Supported peripherals: | |||
| 74 | See http://www.eurotech-inc.com/linux-sbc.asp for IOCTL documentation | 76 | See http://www.eurotech-inc.com/linux-sbc.asp for IOCTL documentation |
| 75 | and example user space code. ps/2 keybd is multiplexed through this driver | 77 | and example user space code. ps/2 keybd is multiplexed through this driver |
| 76 | 78 | ||
| 77 | To do: | 79 | To do |
| 80 | ===== | ||
| 81 | |||
| 78 | - UCB1200 audio with new ucb_generic layer | 82 | - UCB1200 audio with new ucb_generic layer |
| 79 | - everything else! :-) | 83 | - everything else! :-) |
| 80 | 84 | ||
| 81 | Notes: | 85 | Notes |
| 86 | ===== | ||
| 82 | 87 | ||
| 83 | - The flash on board is divided into 3 partitions. mtd0 is where | 88 | - The flash on board is divided into 3 partitions. mtd0 is where |
| 84 | the ADS boot ROM and zImage is stored. It's been marked as | 89 | the ADS boot ROM and zImage is stored. It's been marked as |
| @@ -95,4 +100,3 @@ Notes: | |||
| 95 | fixed soon. | 100 | fixed soon. |
| 96 | 101 | ||
| 97 | Any contribution can be sent to nico@fluxnic.net and will be greatly welcome! | 102 | Any contribution can be sent to nico@fluxnic.net and will be greatly welcome! |
| 98 | |||
diff --git a/Documentation/arm/SA1100/GraphicsMaster b/Documentation/arm/sa1100/graphicsmaster.rst index 9145088a0ba2..e39892514f0c 100644 --- a/Documentation/arm/SA1100/GraphicsMaster +++ b/Documentation/arm/sa1100/graphicsmaster.rst | |||
| @@ -1,4 +1,6 @@ | |||
| 1 | ======================================== | ||
| 1 | ADS GraphicsMaster Single Board Computer | 2 | ADS GraphicsMaster Single Board Computer |
| 3 | ======================================== | ||
| 2 | 4 | ||
| 3 | For more details, contact Applied Data Systems or see | 5 | For more details, contact Applied Data Systems or see |
| 4 | http://www.applieddata.net/products.html | 6 | http://www.applieddata.net/products.html |
| @@ -15,7 +17,9 @@ The kernel zImage is linked to be loaded and executed at 0xc0400000. | |||
| 15 | Linux can be used with the ADS BootLoader that ships with the | 17 | Linux can be used with the ADS BootLoader that ships with the |
| 16 | newer rev boards. See their documentation on how to load Linux. | 18 | newer rev boards. See their documentation on how to load Linux. |
| 17 | 19 | ||
| 18 | Supported peripherals: | 20 | Supported peripherals |
| 21 | ===================== | ||
| 22 | |||
| 19 | - SA1100 LCD frame buffer (8/16bpp...sort of) | 23 | - SA1100 LCD frame buffer (8/16bpp...sort of) |
| 20 | - SA1111 USB Master | 24 | - SA1111 USB Master |
| 21 | - on-board SMC 92C96 ethernet NIC | 25 | - on-board SMC 92C96 ethernet NIC |
| @@ -31,10 +35,13 @@ Supported peripherals: | |||
| 31 | See http://www.eurotech-inc.com/linux-sbc.asp for IOCTL documentation | 35 | See http://www.eurotech-inc.com/linux-sbc.asp for IOCTL documentation |
| 32 | and example user space code. ps/2 keybd is multiplexed through this driver | 36 | and example user space code. ps/2 keybd is multiplexed through this driver |
| 33 | 37 | ||
| 34 | To do: | 38 | To do |
| 39 | ===== | ||
| 40 | |||
| 35 | - everything else! :-) | 41 | - everything else! :-) |
| 36 | 42 | ||
| 37 | Notes: | 43 | Notes |
| 44 | ===== | ||
| 38 | 45 | ||
| 39 | - The flash on board is divided into 3 partitions. mtd0 is where | 46 | - The flash on board is divided into 3 partitions. mtd0 is where |
| 40 | the zImage is stored. It's been marked as read-only to keep you | 47 | the zImage is stored. It's been marked as read-only to keep you |
diff --git a/Documentation/arm/SA1100/HUW_WEBPANEL b/Documentation/arm/sa1100/huw_webpanel.rst index fd56b48d4833..1dc7ccb165f0 100644 --- a/Documentation/arm/SA1100/HUW_WEBPANEL +++ b/Documentation/arm/sa1100/huw_webpanel.rst | |||
| @@ -1,9 +1,14 @@ | |||
| 1 | ======================= | ||
| 2 | Hoeft & Wessel Webpanel | ||
| 3 | ======================= | ||
| 4 | |||
| 1 | The HUW_WEBPANEL is a product of the german company Hoeft & Wessel AG | 5 | The HUW_WEBPANEL is a product of the german company Hoeft & Wessel AG |
| 2 | 6 | ||
| 3 | If you want more information, please visit | 7 | If you want more information, please visit |
| 4 | http://www.hoeft-wessel.de | 8 | http://www.hoeft-wessel.de |
| 5 | 9 | ||
| 6 | To build the kernel: | 10 | To build the kernel:: |
| 11 | |||
| 7 | make huw_webpanel_config | 12 | make huw_webpanel_config |
| 8 | make oldconfig | 13 | make oldconfig |
| 9 | [accept all defaults] | 14 | [accept all defaults] |
| @@ -14,4 +19,3 @@ Roman Jordan jor@hoeft-wessel.de | |||
| 14 | Christoph Schulz schu@hoeft-wessel.de | 19 | Christoph Schulz schu@hoeft-wessel.de |
| 15 | 20 | ||
| 16 | 2000/12/18/ | 21 | 2000/12/18/ |
| 17 | |||
diff --git a/Documentation/arm/sa1100/index.rst b/Documentation/arm/sa1100/index.rst new file mode 100644 index 000000000000..68c2a280a745 --- /dev/null +++ b/Documentation/arm/sa1100/index.rst | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ==================== | ||
| 4 | Intel StrongARM 1100 | ||
| 5 | ==================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | adsbitsy | ||
| 11 | assabet | ||
| 12 | brutus | ||
| 13 | cerf | ||
| 14 | freebird | ||
| 15 | graphicsclient | ||
| 16 | graphicsmaster | ||
| 17 | huw_webpanel | ||
| 18 | itsy | ||
| 19 | lart | ||
| 20 | nanoengine | ||
| 21 | pangolin | ||
| 22 | pleb | ||
| 23 | serial_uart | ||
| 24 | tifon | ||
| 25 | yopy | ||
diff --git a/Documentation/arm/SA1100/Itsy b/Documentation/arm/sa1100/itsy.rst index 44b94997fa0d..f49896ba3ef1 100644 --- a/Documentation/arm/SA1100/Itsy +++ b/Documentation/arm/sa1100/itsy.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ==== | ||
| 2 | Itsy | ||
| 3 | ==== | ||
| 4 | |||
| 1 | Itsy is a research project done by the Western Research Lab, and Systems | 5 | Itsy is a research project done by the Western Research Lab, and Systems |
| 2 | Research Center in Palo Alto, CA. The Itsy project is one of several | 6 | Research Center in Palo Alto, CA. The Itsy project is one of several |
| 3 | research projects at Compaq that are related to pocket computing. | 7 | research projects at Compaq that are related to pocket computing. |
| @@ -7,6 +11,7 @@ For more information, see: | |||
| 7 | http://www.hpl.hp.com/downloads/crl/itsy/ | 11 | http://www.hpl.hp.com/downloads/crl/itsy/ |
| 8 | 12 | ||
| 9 | Notes on initial 2.4 Itsy support (8/27/2000) : | 13 | Notes on initial 2.4 Itsy support (8/27/2000) : |
| 14 | |||
| 10 | The port was done on an Itsy version 1.5 machine with a daughtercard with | 15 | The port was done on an Itsy version 1.5 machine with a daughtercard with |
| 11 | 64 Meg of DRAM and 32 Meg of Flash. The initial work includes support for | 16 | 64 Meg of DRAM and 32 Meg of Flash. The initial work includes support for |
| 12 | serial console (to see what you're doing). No other devices have been | 17 | serial console (to see what you're doing). No other devices have been |
| @@ -18,8 +23,10 @@ Finally, you will need to cd to arch/arm/boot/tools and execute a make there | |||
| 18 | to build the params-itsy program used to boot the kernel. | 23 | to build the params-itsy program used to boot the kernel. |
| 19 | 24 | ||
| 20 | In order to install the port of 2.4 to the itsy, You will need to set the | 25 | In order to install the port of 2.4 to the itsy, You will need to set the |
| 21 | configuration parameters in the monitor as follows: | 26 | configuration parameters in the monitor as follows:: |
| 22 | Arg 1:0x08340000, Arg2: 0xC0000000, Arg3:18 (0x12), Arg4:0 | 27 | |
| 28 | Arg 1:0x08340000, Arg2: 0xC0000000, Arg3:18 (0x12), Arg4:0 | ||
| 29 | |||
| 23 | Make sure the start-routine address is set to 0x00060000. | 30 | Make sure the start-routine address is set to 0x00060000. |
| 24 | 31 | ||
| 25 | Next, flash the params-itsy program to 0x00060000 ("p 1 0x00060000" in the | 32 | Next, flash the params-itsy program to 0x00060000 ("p 1 0x00060000" in the |
| @@ -29,7 +36,8 @@ flash menu) Flash the kernel in arch/arm/boot/zImage into 0x08340000 | |||
| 29 | handhelds.org. | 36 | handhelds.org. |
| 30 | 37 | ||
| 31 | The serial connection we established was at: | 38 | The serial connection we established was at: |
| 32 | 8-bit data, no parity, 1 stop bit(s), 115200.00 b/s. in the monitor, in the | 39 | |
| 40 | 8-bit data, no parity, 1 stop bit(s), 115200.00 b/s. in the monitor, in the | ||
| 33 | params-itsy program, and in the kernel itself. This can be changed, but | 41 | params-itsy program, and in the kernel itself. This can be changed, but |
| 34 | not easily. The monitor parameters are easily changed, the params program | 42 | not easily. The monitor parameters are easily changed, the params program |
| 35 | setup is assembly outl's, and the kernel is a configuration item specific to | 43 | setup is assembly outl's, and the kernel is a configuration item specific to |
diff --git a/Documentation/arm/SA1100/LART b/Documentation/arm/sa1100/lart.rst index 6d412b685598..94c0568d1095 100644 --- a/Documentation/arm/SA1100/LART +++ b/Documentation/arm/sa1100/lart.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ==================================== | ||
| 1 | Linux Advanced Radio Terminal (LART) | 2 | Linux Advanced Radio Terminal (LART) |
| 2 | ------------------------------------ | 3 | ==================================== |
| 3 | 4 | ||
| 4 | The LART is a small (7.5 x 10cm) SA-1100 board, designed for embedded | 5 | The LART is a small (7.5 x 10cm) SA-1100 board, designed for embedded |
| 5 | applications. It has 32 MB DRAM, 4MB Flash ROM, double RS232 and all | 6 | applications. It has 32 MB DRAM, 4MB Flash ROM, double RS232 and all |
diff --git a/Documentation/arm/SA1100/nanoEngine b/Documentation/arm/sa1100/nanoengine.rst index 48a7934f95f6..47f1a14cf98a 100644 --- a/Documentation/arm/SA1100/nanoEngine +++ b/Documentation/arm/sa1100/nanoengine.rst | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | ========== | ||
| 1 | nanoEngine | 2 | nanoEngine |
| 2 | ---------- | 3 | ========== |
| 3 | 4 | ||
| 4 | "nanoEngine" is a SA1110 based single board computer from | 5 | "nanoEngine" is a SA1110 based single board computer from |
| 5 | Bright Star Engineering Inc. See www.brightstareng.com/arm | 6 | Bright Star Engineering Inc. See www.brightstareng.com/arm |
| 6 | for more info. | 7 | for more info. |
| 7 | (Ref: Stuart Adams <sja@brightstareng.com>) | 8 | (Ref: Stuart Adams <sja@brightstareng.com>) |
| 8 | 9 | ||
| 9 | Also visit Larry Doolittle's "Linux for the nanoEngine" site: | 10 | Also visit Larry Doolittle's "Linux for the nanoEngine" site: |
| 10 | http://www.brightstareng.com/arm/nanoeng.htm | 11 | http://www.brightstareng.com/arm/nanoeng.htm |
| 11 | |||
diff --git a/Documentation/arm/SA1100/Pangolin b/Documentation/arm/sa1100/pangolin.rst index 077a6120e129..f0c5c1618553 100644 --- a/Documentation/arm/SA1100/Pangolin +++ b/Documentation/arm/sa1100/pangolin.rst | |||
| @@ -1,16 +1,22 @@ | |||
| 1 | ======== | ||
| 2 | Pangolin | ||
| 3 | ======== | ||
| 4 | |||
| 1 | Pangolin is a StrongARM 1110-based evaluation platform produced | 5 | Pangolin is a StrongARM 1110-based evaluation platform produced |
| 2 | by Dialogue Technology (http://www.dialogue.com.tw/). | 6 | by Dialogue Technology (http://www.dialogue.com.tw/). |
| 3 | It has EISA slots for ease of configuration with SDRAM/Flash | 7 | It has EISA slots for ease of configuration with SDRAM/Flash |
| 4 | memory card, USB/Serial/Audio card, Compact Flash card, | 8 | memory card, USB/Serial/Audio card, Compact Flash card, |
| 5 | PCMCIA/IDE card and TFT-LCD card. | 9 | PCMCIA/IDE card and TFT-LCD card. |
| 6 | 10 | ||
| 7 | To compile for Pangolin, you must issue the following commands: | 11 | To compile for Pangolin, you must issue the following commands:: |
| 8 | 12 | ||
| 9 | make pangolin_config | 13 | make pangolin_config |
| 10 | make oldconfig | 14 | make oldconfig |
| 11 | make zImage | 15 | make zImage |
| 12 | 16 | ||
| 13 | Supported peripherals: | 17 | Supported peripherals |
| 18 | ===================== | ||
| 19 | |||
| 14 | - SA1110 serial port (UART1/UART2/UART3) | 20 | - SA1110 serial port (UART1/UART2/UART3) |
| 15 | - flash memory access | 21 | - flash memory access |
| 16 | - compact flash driver | 22 | - compact flash driver |
diff --git a/Documentation/arm/SA1100/PLEB b/Documentation/arm/sa1100/pleb.rst index b9c8a631a351..d5b732967aa3 100644 --- a/Documentation/arm/SA1100/PLEB +++ b/Documentation/arm/sa1100/pleb.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ==== | ||
| 2 | PLEB | ||
| 3 | ==== | ||
| 4 | |||
| 1 | The PLEB project was started as a student initiative at the School of | 5 | The PLEB project was started as a student initiative at the School of |
| 2 | Computer Science and Engineering, University of New South Wales to make a | 6 | Computer Science and Engineering, University of New South Wales to make a |
| 3 | pocket computer capable of running the Linux Kernel. | 7 | pocket computer capable of running the Linux Kernel. |
| @@ -7,5 +11,3 @@ PLEB support has yet to be fully integrated. | |||
| 7 | For more information, see: | 11 | For more information, see: |
| 8 | 12 | ||
| 9 | http://www.cse.unsw.edu.au | 13 | http://www.cse.unsw.edu.au |
| 10 | |||
| 11 | |||
diff --git a/Documentation/arm/sa1100/serial_uart.rst b/Documentation/arm/sa1100/serial_uart.rst new file mode 100644 index 000000000000..ea983642b9be --- /dev/null +++ b/Documentation/arm/sa1100/serial_uart.rst | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | ================== | ||
| 2 | SA1100 serial port | ||
| 3 | ================== | ||
| 4 | |||
| 5 | The SA1100 serial port had its major/minor numbers officially assigned:: | ||
| 6 | |||
| 7 | > Date: Sun, 24 Sep 2000 21:40:27 -0700 | ||
| 8 | > From: H. Peter Anvin <hpa@transmeta.com> | ||
| 9 | > To: Nicolas Pitre <nico@CAM.ORG> | ||
| 10 | > Cc: Device List Maintainer <device@lanana.org> | ||
| 11 | > Subject: Re: device | ||
| 12 | > | ||
| 13 | > Okay. Note that device numbers 204 and 205 are used for "low density | ||
| 14 | > serial devices", so you will have a range of minors on those majors (the | ||
| 15 | > tty device layer handles this just fine, so you don't have to worry about | ||
| 16 | > doing anything special.) | ||
| 17 | > | ||
| 18 | > So your assignments are: | ||
| 19 | > | ||
| 20 | > 204 char Low-density serial ports | ||
| 21 | > 5 = /dev/ttySA0 SA1100 builtin serial port 0 | ||
| 22 | > 6 = /dev/ttySA1 SA1100 builtin serial port 1 | ||
| 23 | > 7 = /dev/ttySA2 SA1100 builtin serial port 2 | ||
| 24 | > | ||
| 25 | > 205 char Low-density serial ports (alternate device) | ||
| 26 | > 5 = /dev/cusa0 Callout device for ttySA0 | ||
| 27 | > 6 = /dev/cusa1 Callout device for ttySA1 | ||
| 28 | > 7 = /dev/cusa2 Callout device for ttySA2 | ||
| 29 | > | ||
| 30 | |||
| 31 | You must create those inodes in /dev on the root filesystem used | ||
| 32 | by your SA1100-based device:: | ||
| 33 | |||
| 34 | mknod ttySA0 c 204 5 | ||
| 35 | mknod ttySA1 c 204 6 | ||
| 36 | mknod ttySA2 c 204 7 | ||
| 37 | mknod cusa0 c 205 5 | ||
| 38 | mknod cusa1 c 205 6 | ||
| 39 | mknod cusa2 c 205 7 | ||
| 40 | |||
| 41 | In addition to the creation of the appropriate device nodes above, you | ||
| 42 | must ensure your user space applications make use of the correct device | ||
| 43 | name. The classic example is the content of the /etc/inittab file where | ||
| 44 | you might have a getty process started on ttyS0. | ||
| 45 | |||
| 46 | In this case: | ||
| 47 | |||
| 48 | - replace occurrences of ttyS0 with ttySA0, ttyS1 with ttySA1, etc. | ||
| 49 | |||
| 50 | - don't forget to add 'ttySA0', 'console', or the appropriate tty name | ||
| 51 | in /etc/securetty for root to be allowed to login as well. | ||
diff --git a/Documentation/arm/SA1100/Tifon b/Documentation/arm/sa1100/tifon.rst index dd1934d9c851..c26e910b9ea7 100644 --- a/Documentation/arm/SA1100/Tifon +++ b/Documentation/arm/sa1100/tifon.rst | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ===== | ||
| 1 | Tifon | 2 | Tifon |
| 2 | ----- | 3 | ===== |
| 3 | 4 | ||
| 4 | More info has to come... | 5 | More info has to come... |
| 5 | 6 | ||
| 6 | Contact: Peter Danielsson <peter.danielsson@era-t.ericsson.se> | 7 | Contact: Peter Danielsson <peter.danielsson@era-t.ericsson.se> |
| 7 | |||
diff --git a/Documentation/arm/SA1100/Yopy b/Documentation/arm/sa1100/yopy.rst index e14f16d836ac..5b35a5f61a44 100644 --- a/Documentation/arm/SA1100/Yopy +++ b/Documentation/arm/sa1100/yopy.rst | |||
| @@ -1,2 +1,5 @@ | |||
| 1 | See http://www.yopydeveloper.org for more. | 1 | ==== |
| 2 | Yopy | ||
| 3 | ==== | ||
| 2 | 4 | ||
| 5 | See http://www.yopydeveloper.org for more. | ||
diff --git a/Documentation/arm/Samsung-S3C24XX/CPUfreq.txt b/Documentation/arm/samsung-s3c24xx/cpufreq.rst index fa968aa99d67..2ddc26c03b1f 100644 --- a/Documentation/arm/Samsung-S3C24XX/CPUfreq.txt +++ b/Documentation/arm/samsung-s3c24xx/cpufreq.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | S3C24XX CPUfreq support | 1 | ======================= |
| 2 | ======================= | 2 | S3C24XX CPUfreq support |
| 3 | ======================= | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
diff --git a/Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt b/Documentation/arm/samsung-s3c24xx/eb2410itx.rst index b87292e05f2f..7863c93652f8 100644 --- a/Documentation/arm/Samsung-S3C24XX/EB2410ITX.txt +++ b/Documentation/arm/samsung-s3c24xx/eb2410itx.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | Simtec Electronics EB2410ITX (BAST) | 1 | =================================== |
| 2 | =================================== | 2 | Simtec Electronics EB2410ITX (BAST) |
| 3 | =================================== | ||
| 3 | 4 | ||
| 4 | http://www.simtec.co.uk/products/EB2410ITX/ | 5 | http://www.simtec.co.uk/products/EB2410ITX/ |
| 5 | 6 | ||
diff --git a/Documentation/arm/Samsung-S3C24XX/GPIO.txt b/Documentation/arm/samsung-s3c24xx/gpio.rst index e8f918b96123..f7c3d7d011a2 100644 --- a/Documentation/arm/Samsung-S3C24XX/GPIO.txt +++ b/Documentation/arm/samsung-s3c24xx/gpio.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | S3C24XX GPIO Control | 1 | ==================== |
| 2 | ==================== | 2 | S3C24XX GPIO Control |
| 3 | ==================== | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
| @@ -12,7 +13,7 @@ Introduction | |||
| 12 | of the s3c2410 GPIO system, please read the Samsung provided | 13 | of the s3c2410 GPIO system, please read the Samsung provided |
| 13 | data-sheet/users manual to find out the complete list. | 14 | data-sheet/users manual to find out the complete list. |
| 14 | 15 | ||
| 15 | See Documentation/arm/Samsung/GPIO.txt for the core implementation. | 16 | See Documentation/arm/samsung/gpio.rst for the core implementation. |
| 16 | 17 | ||
| 17 | 18 | ||
| 18 | GPIOLIB | 19 | GPIOLIB |
| @@ -26,16 +27,16 @@ GPIOLIB | |||
| 26 | listed below will be removed (they may be marked as __deprecated | 27 | listed below will be removed (they may be marked as __deprecated |
| 27 | in the near future). | 28 | in the near future). |
| 28 | 29 | ||
| 29 | The following functions now either have a s3c_ specific variant | 30 | The following functions now either have a `s3c_` specific variant |
| 30 | or are merged into gpiolib. See the definitions in | 31 | or are merged into gpiolib. See the definitions in |
| 31 | arch/arm/plat-samsung/include/plat/gpio-cfg.h: | 32 | arch/arm/plat-samsung/include/plat/gpio-cfg.h: |
| 32 | 33 | ||
| 33 | s3c2410_gpio_setpin() gpio_set_value() or gpio_direction_output() | 34 | - s3c2410_gpio_setpin() gpio_set_value() or gpio_direction_output() |
| 34 | s3c2410_gpio_getpin() gpio_get_value() or gpio_direction_input() | 35 | - s3c2410_gpio_getpin() gpio_get_value() or gpio_direction_input() |
| 35 | s3c2410_gpio_getirq() gpio_to_irq() | 36 | - s3c2410_gpio_getirq() gpio_to_irq() |
| 36 | s3c2410_gpio_cfgpin() s3c_gpio_cfgpin() | 37 | - s3c2410_gpio_cfgpin() s3c_gpio_cfgpin() |
| 37 | s3c2410_gpio_getcfg() s3c_gpio_getcfg() | 38 | - s3c2410_gpio_getcfg() s3c_gpio_getcfg() |
| 38 | s3c2410_gpio_pullup() s3c_gpio_setpull() | 39 | - s3c2410_gpio_pullup() s3c_gpio_setpull() |
| 39 | 40 | ||
| 40 | 41 | ||
| 41 | GPIOLIB conversion | 42 | GPIOLIB conversion |
| @@ -77,7 +78,7 @@ out s3c2410 API, then here are some notes on the process. | |||
| 77 | 6) s3c2410_gpio_getirq() should be directly replaceable with the | 78 | 6) s3c2410_gpio_getirq() should be directly replaceable with the |
| 78 | gpio_to_irq() call. | 79 | gpio_to_irq() call. |
| 79 | 80 | ||
| 80 | The s3c2410_gpio and gpio_ calls have always operated on the same gpio | 81 | The s3c2410_gpio and `gpio_` calls have always operated on the same gpio |
| 81 | numberspace, so there is no problem with converting the gpio numbering | 82 | numberspace, so there is no problem with converting the gpio numbering |
| 82 | between the calls. | 83 | between the calls. |
| 83 | 84 | ||
diff --git a/Documentation/arm/Samsung-S3C24XX/H1940.txt b/Documentation/arm/samsung-s3c24xx/h1940.rst index b738859b1fc0..62a562c178e3 100644 --- a/Documentation/arm/Samsung-S3C24XX/H1940.txt +++ b/Documentation/arm/samsung-s3c24xx/h1940.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | HP IPAQ H1940 | 1 | ============= |
| 2 | ============= | 2 | HP IPAQ H1940 |
| 3 | ============= | ||
| 3 | 4 | ||
| 4 | http://www.handhelds.org/projects/h1940.html | 5 | http://www.handhelds.org/projects/h1940.html |
| 5 | 6 | ||
diff --git a/Documentation/arm/samsung-s3c24xx/index.rst b/Documentation/arm/samsung-s3c24xx/index.rst new file mode 100644 index 000000000000..5b8a7f9398d8 --- /dev/null +++ b/Documentation/arm/samsung-s3c24xx/index.rst | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ========================== | ||
| 4 | Samsung S3C24XX SoC Family | ||
| 5 | ========================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | h1940 | ||
| 11 | gpio | ||
| 12 | cpufreq | ||
| 13 | suspend | ||
| 14 | usb-host | ||
| 15 | s3c2412 | ||
| 16 | eb2410itx | ||
| 17 | nand | ||
| 18 | smdk2440 | ||
| 19 | s3c2413 | ||
| 20 | overview | ||
diff --git a/Documentation/arm/Samsung-S3C24XX/NAND.txt b/Documentation/arm/samsung-s3c24xx/nand.rst index bc478a3409b8..938995694ee7 100644 --- a/Documentation/arm/Samsung-S3C24XX/NAND.txt +++ b/Documentation/arm/samsung-s3c24xx/nand.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | S3C24XX NAND Support | 1 | ==================== |
| 2 | ==================== | 2 | S3C24XX NAND Support |
| 3 | ==================== | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
| @@ -27,4 +28,3 @@ Document Author | |||
| 27 | --------------- | 28 | --------------- |
| 28 | 29 | ||
| 29 | Ben Dooks, Copyright 2007 Simtec Electronics | 30 | Ben Dooks, Copyright 2007 Simtec Electronics |
| 30 | |||
diff --git a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/samsung-s3c24xx/overview.rst index 00d3c3141e21..e9a1dc7276b5 100644 --- a/Documentation/arm/Samsung-S3C24XX/Overview.txt +++ b/Documentation/arm/samsung-s3c24xx/overview.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | S3C24XX ARM Linux Overview | 1 | ========================== |
| 2 | ========================== | 2 | S3C24XX ARM Linux Overview |
| 3 | ========================== | ||
| 3 | 4 | ||
| 4 | 5 | ||
| 5 | 6 | ||
| @@ -182,7 +183,7 @@ NAND | |||
| 182 | controller. If there are any problems the latest linux-mtd | 183 | controller. If there are any problems the latest linux-mtd |
| 183 | code can be found from http://www.linux-mtd.infradead.org/ | 184 | code can be found from http://www.linux-mtd.infradead.org/ |
| 184 | 185 | ||
| 185 | For more information see Documentation/arm/Samsung-S3C24XX/NAND.txt | 186 | For more information see Documentation/arm/samsung-s3c24xx/nand.rst |
| 186 | 187 | ||
| 187 | 188 | ||
| 188 | SD/MMC | 189 | SD/MMC |
| @@ -221,8 +222,8 @@ GPIO | |||
| 221 | As of v2.6.34, the move towards using gpiolib support is almost | 222 | As of v2.6.34, the move towards using gpiolib support is almost |
| 222 | complete, and very little of the old calls are left. | 223 | complete, and very little of the old calls are left. |
| 223 | 224 | ||
| 224 | See Documentation/arm/Samsung-S3C24XX/GPIO.txt for the S3C24XX specific | 225 | See Documentation/arm/samsung-s3c24xx/gpio.rst for the S3C24XX specific |
| 225 | support and Documentation/arm/Samsung/GPIO.txt for the core Samsung | 226 | support and Documentation/arm/samsung/gpio.rst for the core Samsung |
| 226 | implementation. | 227 | implementation. |
| 227 | 228 | ||
| 228 | 229 | ||
| @@ -276,18 +277,18 @@ Platform Data | |||
| 276 | kmalloc()s an area of memory, and copies the __initdata | 277 | kmalloc()s an area of memory, and copies the __initdata |
| 277 | and then sets the relevant device's platform data. Making | 278 | and then sets the relevant device's platform data. Making |
| 278 | the function `__init` takes care of ensuring it is discarded | 279 | the function `__init` takes care of ensuring it is discarded |
| 279 | with the rest of the initialisation code | 280 | with the rest of the initialisation code:: |
| 280 | 281 | ||
| 281 | static __init void s3c24xx_xxx_set_platdata(struct xxx_data *pd) | 282 | static __init void s3c24xx_xxx_set_platdata(struct xxx_data *pd) |
| 282 | { | 283 | { |
| 283 | struct s3c2410_xxx_mach_info *npd; | 284 | struct s3c2410_xxx_mach_info *npd; |
| 284 | 285 | ||
| 285 | npd = kmalloc(sizeof(struct s3c2410_xxx_mach_info), GFP_KERNEL); | 286 | npd = kmalloc(sizeof(struct s3c2410_xxx_mach_info), GFP_KERNEL); |
| 286 | if (npd) { | 287 | if (npd) { |
| 287 | memcpy(npd, pd, sizeof(struct s3c2410_xxx_mach_info)); | 288 | memcpy(npd, pd, sizeof(struct s3c2410_xxx_mach_info)); |
| 288 | s3c_device_xxx.dev.platform_data = npd; | 289 | s3c_device_xxx.dev.platform_data = npd; |
| 289 | } else { | 290 | } else { |
| 290 | printk(KERN_ERR "no memory for xxx platform data\n"); | 291 | printk(KERN_ERR "no memory for xxx platform data\n"); |
| 291 | } | 292 | } |
| 292 | } | 293 | } |
| 293 | 294 | ||
diff --git a/Documentation/arm/Samsung-S3C24XX/S3C2412.txt b/Documentation/arm/samsung-s3c24xx/s3c2412.rst index dc1fd362d3c1..68b985fc6bf4 100644 --- a/Documentation/arm/Samsung-S3C24XX/S3C2412.txt +++ b/Documentation/arm/samsung-s3c24xx/s3c2412.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | S3C2412 ARM Linux Overview | 1 | ========================== |
| 2 | ========================== | 2 | S3C2412 ARM Linux Overview |
| 3 | ========================== | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
diff --git a/Documentation/arm/Samsung-S3C24XX/S3C2413.txt b/Documentation/arm/samsung-s3c24xx/s3c2413.rst index 909bdc7dd7b5..1f51e207fc46 100644 --- a/Documentation/arm/Samsung-S3C24XX/S3C2413.txt +++ b/Documentation/arm/samsung-s3c24xx/s3c2413.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | S3C2413 ARM Linux Overview | 1 | ========================== |
| 2 | ========================== | 2 | S3C2413 ARM Linux Overview |
| 3 | ========================== | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
| @@ -10,7 +11,7 @@ Introduction | |||
| 10 | 11 | ||
| 11 | 12 | ||
| 12 | Camera Interface | 13 | Camera Interface |
| 13 | --------------- | 14 | ---------------- |
| 14 | 15 | ||
| 15 | This block is currently not supported. | 16 | This block is currently not supported. |
| 16 | 17 | ||
diff --git a/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt b/Documentation/arm/samsung-s3c24xx/smdk2440.rst index 429390bd4684..524fd0b4afaf 100644 --- a/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt +++ b/Documentation/arm/samsung-s3c24xx/smdk2440.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | Samsung/Meritech SMDK2440 | 1 | ========================= |
| 2 | ========================= | 2 | Samsung/Meritech SMDK2440 |
| 3 | ========================= | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
diff --git a/Documentation/arm/Samsung-S3C24XX/Suspend.txt b/Documentation/arm/samsung-s3c24xx/suspend.rst index cb4f0c0cdf9d..b4f3ae9fe76e 100644 --- a/Documentation/arm/Samsung-S3C24XX/Suspend.txt +++ b/Documentation/arm/samsung-s3c24xx/suspend.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | S3C24XX Suspend Support | 1 | ======================= |
| 2 | ======================= | 2 | S3C24XX Suspend Support |
| 3 | ======================= | ||
| 3 | 4 | ||
| 4 | 5 | ||
| 5 | Introduction | 6 | Introduction |
| @@ -57,16 +58,16 @@ Machine Support | |||
| 57 | and will end up initialising all compiled machines' pm init! | 58 | and will end up initialising all compiled machines' pm init! |
| 58 | 59 | ||
| 59 | The following is an example of code used for testing wakeup from | 60 | The following is an example of code used for testing wakeup from |
| 60 | an falling edge on IRQ_EINT0: | 61 | an falling edge on IRQ_EINT0:: |
| 61 | 62 | ||
| 62 | 63 | ||
| 63 | static irqreturn_t button_irq(int irq, void *pw) | 64 | static irqreturn_t button_irq(int irq, void *pw) |
| 64 | { | 65 | { |
| 65 | return IRQ_HANDLED; | 66 | return IRQ_HANDLED; |
| 66 | } | 67 | } |
| 67 | 68 | ||
| 68 | statuc void __init machine_init(void) | 69 | statuc void __init machine_init(void) |
| 69 | { | 70 | { |
| 70 | ... | 71 | ... |
| 71 | 72 | ||
| 72 | request_irq(IRQ_EINT0, button_irq, IRQF_TRIGGER_FALLING, | 73 | request_irq(IRQ_EINT0, button_irq, IRQF_TRIGGER_FALLING, |
| @@ -75,7 +76,7 @@ statuc void __init machine_init(void) | |||
| 75 | enable_irq_wake(IRQ_EINT0); | 76 | enable_irq_wake(IRQ_EINT0); |
| 76 | 77 | ||
| 77 | s3c_pm_init(); | 78 | s3c_pm_init(); |
| 78 | } | 79 | } |
| 79 | 80 | ||
| 80 | 81 | ||
| 81 | Debugging | 82 | Debugging |
| @@ -134,4 +135,3 @@ Document Author | |||
| 134 | --------------- | 135 | --------------- |
| 135 | 136 | ||
| 136 | Ben Dooks, Copyright 2004 Simtec Electronics | 137 | Ben Dooks, Copyright 2004 Simtec Electronics |
| 137 | |||
diff --git a/Documentation/arm/Samsung-S3C24XX/USB-Host.txt b/Documentation/arm/samsung-s3c24xx/usb-host.rst index f82b1faefad5..c84268bd1884 100644 --- a/Documentation/arm/Samsung-S3C24XX/USB-Host.txt +++ b/Documentation/arm/samsung-s3c24xx/usb-host.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | S3C24XX USB Host support | 1 | ======================== |
| 2 | ======================== | 2 | S3C24XX USB Host support |
| 3 | ======================== | ||
| 3 | 4 | ||
| 4 | 5 | ||
| 5 | 6 | ||
| @@ -13,7 +14,7 @@ Configuration | |||
| 13 | 14 | ||
| 14 | Enable at least the following kernel options: | 15 | Enable at least the following kernel options: |
| 15 | 16 | ||
| 16 | menuconfig: | 17 | menuconfig:: |
| 17 | 18 | ||
| 18 | Device Drivers ---> | 19 | Device Drivers ---> |
| 19 | USB support ---> | 20 | USB support ---> |
| @@ -22,8 +23,9 @@ Configuration | |||
| 22 | 23 | ||
| 23 | 24 | ||
| 24 | .config: | 25 | .config: |
| 25 | CONFIG_USB | 26 | |
| 26 | CONFIG_USB_OHCI_HCD | 27 | - CONFIG_USB |
| 28 | - CONFIG_USB_OHCI_HCD | ||
| 27 | 29 | ||
| 28 | 30 | ||
| 29 | Once these options are configured, the standard set of USB device | 31 | Once these options are configured, the standard set of USB device |
| @@ -60,17 +62,14 @@ Platform Data | |||
| 60 | The ports are numbered 0 and 1. | 62 | The ports are numbered 0 and 1. |
| 61 | 63 | ||
| 62 | power_control: | 64 | power_control: |
| 63 | |||
| 64 | Called to enable or disable the power on the port. | 65 | Called to enable or disable the power on the port. |
| 65 | 66 | ||
| 66 | enable_oc: | 67 | enable_oc: |
| 67 | |||
| 68 | Called to enable or disable the over-current monitoring. | 68 | Called to enable or disable the over-current monitoring. |
| 69 | This should claim or release the resources being used to | 69 | This should claim or release the resources being used to |
| 70 | check the power condition on the port, such as an IRQ. | 70 | check the power condition on the port, such as an IRQ. |
| 71 | 71 | ||
| 72 | report_oc: | 72 | report_oc: |
| 73 | |||
| 74 | The OHCI driver fills this field in for the over-current code | 73 | The OHCI driver fills this field in for the over-current code |
| 75 | to call when there is a change to the over-current state on | 74 | to call when there is a change to the over-current state on |
| 76 | an port. The ports argument is a bitmask of 1 bit per port, | 75 | an port. The ports argument is a bitmask of 1 bit per port, |
| @@ -80,7 +79,6 @@ Platform Data | |||
| 80 | ensure this is called correctly. | 79 | ensure this is called correctly. |
| 81 | 80 | ||
| 82 | port[x]: | 81 | port[x]: |
| 83 | |||
| 84 | This is struct describes each port, 0 or 1. The platform driver | 82 | This is struct describes each port, 0 or 1. The platform driver |
| 85 | should set the flags field of each port to S3C_HCDFLG_USED if | 83 | should set the flags field of each port to S3C_HCDFLG_USED if |
| 86 | the port is enabled. | 84 | the port is enabled. |
diff --git a/Documentation/arm/Samsung/Bootloader-interface.txt b/Documentation/arm/samsung/bootloader-interface.rst index d17ed518a7ea..a56f325dae78 100644 --- a/Documentation/arm/Samsung/Bootloader-interface.txt +++ b/Documentation/arm/samsung/bootloader-interface.rst | |||
| @@ -1,7 +1,9 @@ | |||
| 1 | Interface between kernel and boot loaders on Exynos boards | 1 | ========================================================== |
| 2 | ========================================================== | 2 | Interface between kernel and boot loaders on Exynos boards |
| 3 | ========================================================== | ||
| 3 | 4 | ||
| 4 | Author: Krzysztof Kozlowski | 5 | Author: Krzysztof Kozlowski |
| 6 | |||
| 5 | Date : 6 June 2015 | 7 | Date : 6 June 2015 |
| 6 | 8 | ||
| 7 | The document tries to describe currently used interface between Linux kernel | 9 | The document tries to describe currently used interface between Linux kernel |
| @@ -17,8 +19,10 @@ executing kernel. | |||
| 17 | 1. Non-Secure mode | 19 | 1. Non-Secure mode |
| 18 | 20 | ||
| 19 | Address: sysram_ns_base_addr | 21 | Address: sysram_ns_base_addr |
| 22 | |||
| 23 | ============= ============================================ ================== | ||
| 20 | Offset Value Purpose | 24 | Offset Value Purpose |
| 21 | ============================================================================= | 25 | ============= ============================================ ================== |
| 22 | 0x08 exynos_cpu_resume_ns, mcpm_entry_point System suspend | 26 | 0x08 exynos_cpu_resume_ns, mcpm_entry_point System suspend |
| 23 | 0x0c 0x00000bad (Magic cookie) System suspend | 27 | 0x0c 0x00000bad (Magic cookie) System suspend |
| 24 | 0x1c exynos4_secondary_startup Secondary CPU boot | 28 | 0x1c exynos4_secondary_startup Secondary CPU boot |
| @@ -27,22 +31,28 @@ Offset Value Purpose | |||
| 27 | 0x24 exynos_cpu_resume_ns AFTR | 31 | 0x24 exynos_cpu_resume_ns AFTR |
| 28 | 0x28 + 4*cpu 0x8 (Magic cookie, Exynos3250) AFTR | 32 | 0x28 + 4*cpu 0x8 (Magic cookie, Exynos3250) AFTR |
| 29 | 0x28 0x0 or last value during resume (Exynos542x) System suspend | 33 | 0x28 0x0 or last value during resume (Exynos542x) System suspend |
| 34 | ============= ============================================ ================== | ||
| 30 | 35 | ||
| 31 | 36 | ||
| 32 | 2. Secure mode | 37 | 2. Secure mode |
| 33 | 38 | ||
| 34 | Address: sysram_base_addr | 39 | Address: sysram_base_addr |
| 40 | |||
| 41 | ============= ============================================ ================== | ||
| 35 | Offset Value Purpose | 42 | Offset Value Purpose |
| 36 | ============================================================================= | 43 | ============= ============================================ ================== |
| 37 | 0x00 exynos4_secondary_startup Secondary CPU boot | 44 | 0x00 exynos4_secondary_startup Secondary CPU boot |
| 38 | 0x04 exynos4_secondary_startup (Exynos542x) Secondary CPU boot | 45 | 0x04 exynos4_secondary_startup (Exynos542x) Secondary CPU boot |
| 39 | 4*cpu exynos4_secondary_startup (Exynos4412) Secondary CPU boot | 46 | 4*cpu exynos4_secondary_startup (Exynos4412) Secondary CPU boot |
| 40 | 0x20 exynos_cpu_resume (Exynos4210 r1.0) AFTR | 47 | 0x20 exynos_cpu_resume (Exynos4210 r1.0) AFTR |
| 41 | 0x24 0xfcba0d10 (Magic cookie, Exynos4210 r1.0) AFTR | 48 | 0x24 0xfcba0d10 (Magic cookie, Exynos4210 r1.0) AFTR |
| 49 | ============= ============================================ ================== | ||
| 42 | 50 | ||
| 43 | Address: pmu_base_addr | 51 | Address: pmu_base_addr |
| 52 | |||
| 53 | ============= ============================================ ================== | ||
| 44 | Offset Value Purpose | 54 | Offset Value Purpose |
| 45 | ============================================================================= | 55 | ============= ============================================ ================== |
| 46 | 0x0800 exynos_cpu_resume AFTR, suspend | 56 | 0x0800 exynos_cpu_resume AFTR, suspend |
| 47 | 0x0800 mcpm_entry_point (Exynos542x with MCPM) AFTR, suspend | 57 | 0x0800 mcpm_entry_point (Exynos542x with MCPM) AFTR, suspend |
| 48 | 0x0804 0xfcba0d10 (Magic cookie) AFTR | 58 | 0x0804 0xfcba0d10 (Magic cookie) AFTR |
| @@ -50,15 +60,18 @@ Offset Value Purpose | |||
| 50 | 0x0814 exynos4_secondary_startup (Exynos4210 r1.1) Secondary CPU boot | 60 | 0x0814 exynos4_secondary_startup (Exynos4210 r1.1) Secondary CPU boot |
| 51 | 0x0818 0xfcba0d10 (Magic cookie, Exynos4210 r1.1) AFTR | 61 | 0x0818 0xfcba0d10 (Magic cookie, Exynos4210 r1.1) AFTR |
| 52 | 0x081C exynos_cpu_resume (Exynos4210 r1.1) AFTR | 62 | 0x081C exynos_cpu_resume (Exynos4210 r1.1) AFTR |
| 53 | 63 | ============= ============================================ ================== | |
| 54 | 64 | ||
| 55 | 3. Other (regardless of secure/non-secure mode) | 65 | 3. Other (regardless of secure/non-secure mode) |
| 56 | 66 | ||
| 57 | Address: pmu_base_addr | 67 | Address: pmu_base_addr |
| 68 | |||
| 69 | ============= =============================== =============================== | ||
| 58 | Offset Value Purpose | 70 | Offset Value Purpose |
| 59 | ============================================================================= | 71 | ============= =============================== =============================== |
| 60 | 0x0908 Non-zero Secondary CPU boot up indicator | 72 | 0x0908 Non-zero Secondary CPU boot up indicator |
| 61 | on Exynos3250 and Exynos542x | 73 | on Exynos3250 and Exynos542x |
| 74 | ============= =============================== =============================== | ||
| 62 | 75 | ||
| 63 | 76 | ||
| 64 | 4. Glossary | 77 | 4. Glossary |
diff --git a/Documentation/arm/Samsung/clksrc-change-registers.awk b/Documentation/arm/samsung/clksrc-change-registers.awk index 7be1b8aa7cd9..7be1b8aa7cd9 100755 --- a/Documentation/arm/Samsung/clksrc-change-registers.awk +++ b/Documentation/arm/samsung/clksrc-change-registers.awk | |||
diff --git a/Documentation/arm/Samsung/GPIO.txt b/Documentation/arm/samsung/gpio.rst index 795adfd88081..5f7cadd7159e 100644 --- a/Documentation/arm/Samsung/GPIO.txt +++ b/Documentation/arm/samsung/gpio.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | Samsung GPIO implementation | 1 | =========================== |
| 2 | =========================== | 2 | Samsung GPIO implementation |
| 3 | =========================== | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
| @@ -11,7 +12,7 @@ specific calls provided alongside the drivers/gpio core. | |||
| 11 | S3C24XX (Legacy) | 12 | S3C24XX (Legacy) |
| 12 | ---------------- | 13 | ---------------- |
| 13 | 14 | ||
| 14 | See Documentation/arm/Samsung-S3C24XX/GPIO.txt for more information | 15 | See Documentation/arm/samsung-s3c24xx/gpio.rst for more information |
| 15 | about these devices. Their implementation has been brought into line | 16 | about these devices. Their implementation has been brought into line |
| 16 | with the core samsung implementation described in this document. | 17 | with the core samsung implementation described in this document. |
| 17 | 18 | ||
diff --git a/Documentation/arm/samsung/index.rst b/Documentation/arm/samsung/index.rst new file mode 100644 index 000000000000..8142cce3d23e --- /dev/null +++ b/Documentation/arm/samsung/index.rst | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | =========== | ||
| 4 | Samsung SoC | ||
| 5 | =========== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | gpio | ||
| 11 | bootloader-interface | ||
| 12 | overview | ||
diff --git a/Documentation/arm/Samsung/Overview.txt b/Documentation/arm/samsung/overview.rst index 8f7309bad460..e74307897416 100644 --- a/Documentation/arm/Samsung/Overview.txt +++ b/Documentation/arm/samsung/overview.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | Samsung ARM Linux Overview | 1 | ========================== |
| 2 | ========================== | 2 | Samsung ARM Linux Overview |
| 3 | ========================== | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
| @@ -11,7 +12,7 @@ Introduction | |||
| 11 | 12 | ||
| 12 | The currently supported SoCs are: | 13 | The currently supported SoCs are: |
| 13 | 14 | ||
| 14 | - S3C24XX: See Documentation/arm/Samsung-S3C24XX/Overview.txt for full list | 15 | - S3C24XX: See Documentation/arm/samsung-s3c24xx/overview.rst for full list |
| 15 | - S3C64XX: S3C6400 and S3C6410 | 16 | - S3C64XX: S3C6400 and S3C6410 |
| 16 | - S5PC110 / S5PV210 | 17 | - S5PC110 / S5PV210 |
| 17 | 18 | ||
| @@ -22,7 +23,7 @@ S3C24XX Systems | |||
| 22 | There is still documentation in Documnetation/arm/Samsung-S3C24XX/ which | 23 | There is still documentation in Documnetation/arm/Samsung-S3C24XX/ which |
| 23 | deals with the architecture and drivers specific to these devices. | 24 | deals with the architecture and drivers specific to these devices. |
| 24 | 25 | ||
| 25 | See Documentation/arm/Samsung-S3C24XX/Overview.txt for more information | 26 | See Documentation/arm/samsung-s3c24xx/overview.rst for more information |
| 26 | on the implementation details and specific support. | 27 | on the implementation details and specific support. |
| 27 | 28 | ||
| 28 | 29 | ||
| @@ -32,8 +33,10 @@ Configuration | |||
| 32 | A number of configurations are supplied, as there is no current way of | 33 | A number of configurations are supplied, as there is no current way of |
| 33 | unifying all the SoCs into one kernel. | 34 | unifying all the SoCs into one kernel. |
| 34 | 35 | ||
| 35 | s5pc110_defconfig - S5PC110 specific default configuration | 36 | s5pc110_defconfig |
| 36 | s5pv210_defconfig - S5PV210 specific default configuration | 37 | - S5PC110 specific default configuration |
| 38 | s5pv210_defconfig | ||
| 39 | - S5PV210 specific default configuration | ||
| 37 | 40 | ||
| 38 | 41 | ||
| 39 | Layout | 42 | Layout |
diff --git a/Documentation/arm/Setup b/Documentation/arm/setup.rst index 0cb1e64bde80..8e12ef3fb9a7 100644 --- a/Documentation/arm/Setup +++ b/Documentation/arm/setup.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ============================================= | ||
| 1 | Kernel initialisation parameters on ARM Linux | 2 | Kernel initialisation parameters on ARM Linux |
| 2 | --------------------------------------------- | 3 | ============================================= |
| 3 | 4 | ||
| 4 | The following document describes the kernel initialisation parameter | 5 | The following document describes the kernel initialisation parameter |
| 5 | structure, otherwise known as 'struct param_struct' which is used | 6 | structure, otherwise known as 'struct param_struct' which is used |
| @@ -14,12 +15,10 @@ There are a lot of parameters listed in there, and they are described | |||
| 14 | below: | 15 | below: |
| 15 | 16 | ||
| 16 | page_size | 17 | page_size |
| 17 | |||
| 18 | This parameter must be set to the page size of the machine, and | 18 | This parameter must be set to the page size of the machine, and |
| 19 | will be checked by the kernel. | 19 | will be checked by the kernel. |
| 20 | 20 | ||
| 21 | nr_pages | 21 | nr_pages |
| 22 | |||
| 23 | This is the total number of pages of memory in the system. If | 22 | This is the total number of pages of memory in the system. If |
| 24 | the memory is banked, then this should contain the total number | 23 | the memory is banked, then this should contain the total number |
| 25 | of pages in the system. | 24 | of pages in the system. |
| @@ -28,24 +27,22 @@ below: | |||
| 28 | include this information. | 27 | include this information. |
| 29 | 28 | ||
| 30 | ramdisk_size | 29 | ramdisk_size |
| 31 | |||
| 32 | This is now obsolete, and should not be used. | 30 | This is now obsolete, and should not be used. |
| 33 | 31 | ||
| 34 | flags | 32 | flags |
| 35 | |||
| 36 | Various kernel flags, including: | 33 | Various kernel flags, including: |
| 37 | bit 0 - 1 = mount root read only | ||
| 38 | bit 1 - unused | ||
| 39 | bit 2 - 0 = load ramdisk | ||
| 40 | bit 3 - 0 = prompt for ramdisk | ||
| 41 | 34 | ||
| 42 | rootdev | 35 | ===== ======================== |
| 36 | bit 0 1 = mount root read only | ||
| 37 | bit 1 unused | ||
| 38 | bit 2 0 = load ramdisk | ||
| 39 | bit 3 0 = prompt for ramdisk | ||
| 40 | ===== ======================== | ||
| 43 | 41 | ||
| 42 | rootdev | ||
| 44 | major/minor number pair of device to mount as the root filesystem. | 43 | major/minor number pair of device to mount as the root filesystem. |
| 45 | 44 | ||
| 46 | video_num_cols | 45 | video_num_cols / video_num_rows |
| 47 | video_num_rows | ||
| 48 | |||
| 49 | These two together describe the character size of the dummy console, | 46 | These two together describe the character size of the dummy console, |
| 50 | or VGA console character size. They should not be used for any other | 47 | or VGA console character size. They should not be used for any other |
| 51 | purpose. | 48 | purpose. |
| @@ -54,66 +51,50 @@ below: | |||
| 54 | the equivalent character size of your fbcon display. This then allows | 51 | the equivalent character size of your fbcon display. This then allows |
| 55 | all the bootup messages to be displayed correctly. | 52 | all the bootup messages to be displayed correctly. |
| 56 | 53 | ||
| 57 | video_x | 54 | video_x / video_y |
| 58 | video_y | ||
| 59 | |||
| 60 | This describes the character position of cursor on VGA console, and | 55 | This describes the character position of cursor on VGA console, and |
| 61 | is otherwise unused. (should not be used for other console types, and | 56 | is otherwise unused. (should not be used for other console types, and |
| 62 | should not be used for other purposes). | 57 | should not be used for other purposes). |
| 63 | 58 | ||
| 64 | memc_control_reg | 59 | memc_control_reg |
| 65 | |||
| 66 | MEMC chip control register for Acorn Archimedes and Acorn A5000 | 60 | MEMC chip control register for Acorn Archimedes and Acorn A5000 |
| 67 | based machines. May be used differently by different architectures. | 61 | based machines. May be used differently by different architectures. |
| 68 | 62 | ||
| 69 | sounddefault | 63 | sounddefault |
| 70 | |||
| 71 | Default sound setting on Acorn machines. May be used differently by | 64 | Default sound setting on Acorn machines. May be used differently by |
| 72 | different architectures. | 65 | different architectures. |
| 73 | 66 | ||
| 74 | adfsdrives | 67 | adfsdrives |
| 75 | |||
| 76 | Number of ADFS/MFM disks. May be used differently by different | 68 | Number of ADFS/MFM disks. May be used differently by different |
| 77 | architectures. | 69 | architectures. |
| 78 | 70 | ||
| 79 | bytes_per_char_h | 71 | bytes_per_char_h / bytes_per_char_v |
| 80 | bytes_per_char_v | ||
| 81 | |||
| 82 | These are now obsolete, and should not be used. | 72 | These are now obsolete, and should not be used. |
| 83 | 73 | ||
| 84 | pages_in_bank[4] | 74 | pages_in_bank[4] |
| 85 | |||
| 86 | Number of pages in each bank of the systems memory (used for RiscPC). | 75 | Number of pages in each bank of the systems memory (used for RiscPC). |
| 87 | This is intended to be used on systems where the physical memory | 76 | This is intended to be used on systems where the physical memory |
| 88 | is non-contiguous from the processors point of view. | 77 | is non-contiguous from the processors point of view. |
| 89 | 78 | ||
| 90 | pages_in_vram | 79 | pages_in_vram |
| 91 | |||
| 92 | Number of pages in VRAM (used on Acorn RiscPC). This value may also | 80 | Number of pages in VRAM (used on Acorn RiscPC). This value may also |
| 93 | be used by loaders if the size of the video RAM can't be obtained | 81 | be used by loaders if the size of the video RAM can't be obtained |
| 94 | from the hardware. | 82 | from the hardware. |
| 95 | 83 | ||
| 96 | initrd_start | 84 | initrd_start / initrd_size |
| 97 | initrd_size | ||
| 98 | |||
| 99 | This describes the kernel virtual start address and size of the | 85 | This describes the kernel virtual start address and size of the |
| 100 | initial ramdisk. | 86 | initial ramdisk. |
| 101 | 87 | ||
| 102 | rd_start | 88 | rd_start |
| 103 | |||
| 104 | Start address in sectors of the ramdisk image on a floppy disk. | 89 | Start address in sectors of the ramdisk image on a floppy disk. |
| 105 | 90 | ||
| 106 | system_rev | 91 | system_rev |
| 107 | |||
| 108 | system revision number. | 92 | system revision number. |
| 109 | 93 | ||
| 110 | system_serial_low | 94 | system_serial_low / system_serial_high |
| 111 | system_serial_high | ||
| 112 | |||
| 113 | system 64-bit serial number | 95 | system 64-bit serial number |
| 114 | 96 | ||
| 115 | mem_fclk_21285 | 97 | mem_fclk_21285 |
| 116 | |||
| 117 | The speed of the external oscillator to the 21285 (footbridge), | 98 | The speed of the external oscillator to the 21285 (footbridge), |
| 118 | which control's the speed of the memory bus, timer & serial port. | 99 | which control's the speed of the memory bus, timer & serial port. |
| 119 | Depending upon the speed of the cpu its value can be between | 100 | Depending upon the speed of the cpu its value can be between |
| @@ -121,9 +102,7 @@ below: | |||
| 121 | then a value of 50 Mhz is the default on 21285 architectures. | 102 | then a value of 50 Mhz is the default on 21285 architectures. |
| 122 | 103 | ||
| 123 | paths[8][128] | 104 | paths[8][128] |
| 124 | |||
| 125 | These are now obsolete, and should not be used. | 105 | These are now obsolete, and should not be used. |
| 126 | 106 | ||
| 127 | commandline | 107 | commandline |
| 128 | |||
| 129 | Kernel command line parameters. Details can be found elsewhere. | 108 | Kernel command line parameters. Details can be found elsewhere. |
diff --git a/Documentation/arm/SH-Mobile/.gitignore b/Documentation/arm/sh-mobile/.gitignore index c928dbf3cc88..c928dbf3cc88 100644 --- a/Documentation/arm/SH-Mobile/.gitignore +++ b/Documentation/arm/sh-mobile/.gitignore | |||
diff --git a/Documentation/arm/SPEAr/overview.txt b/Documentation/arm/spear/overview.rst index 1b049be6c84f..1a77f6b213b6 100644 --- a/Documentation/arm/SPEAr/overview.txt +++ b/Documentation/arm/spear/overview.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | SPEAr ARM Linux Overview | 1 | ======================== |
| 2 | ========================== | 2 | SPEAr ARM Linux Overview |
| 3 | ======================== | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
| @@ -14,6 +15,7 @@ Introduction | |||
| 14 | Hierarchy in SPEAr is as follows: | 15 | Hierarchy in SPEAr is as follows: |
| 15 | 16 | ||
| 16 | SPEAr (Platform) | 17 | SPEAr (Platform) |
| 18 | |||
| 17 | - SPEAr3XX (3XX SOC series, based on ARM9) | 19 | - SPEAr3XX (3XX SOC series, based on ARM9) |
| 18 | - SPEAr300 (SOC) | 20 | - SPEAr300 (SOC) |
| 19 | - SPEAr300 Evaluation Board | 21 | - SPEAr300 Evaluation Board |
| @@ -30,17 +32,18 @@ Introduction | |||
| 30 | - SPEAr1340 (SOC) | 32 | - SPEAr1340 (SOC) |
| 31 | - SPEAr1340 Evaluation Board | 33 | - SPEAr1340 Evaluation Board |
| 32 | 34 | ||
| 33 | Configuration | 35 | Configuration |
| 34 | ------------- | 36 | ------------- |
| 35 | 37 | ||
| 36 | A generic configuration is provided for each machine, and can be used as the | 38 | A generic configuration is provided for each machine, and can be used as the |
| 37 | default by | 39 | default by:: |
| 40 | |||
| 38 | make spear13xx_defconfig | 41 | make spear13xx_defconfig |
| 39 | make spear3xx_defconfig | 42 | make spear3xx_defconfig |
| 40 | make spear6xx_defconfig | 43 | make spear6xx_defconfig |
| 41 | 44 | ||
| 42 | Layout | 45 | Layout |
| 43 | ------ | 46 | ------ |
| 44 | 47 | ||
| 45 | The common files for multiple machine families (SPEAr3xx, SPEAr6xx and | 48 | The common files for multiple machine families (SPEAr3xx, SPEAr6xx and |
| 46 | SPEAr13xx) are located in the platform code contained in arch/arm/plat-spear | 49 | SPEAr13xx) are located in the platform code contained in arch/arm/plat-spear |
| @@ -57,7 +60,7 @@ Introduction | |||
| 57 | support Flattened Device Tree. | 60 | support Flattened Device Tree. |
| 58 | 61 | ||
| 59 | 62 | ||
| 60 | Document Author | 63 | Document Author |
| 61 | --------------- | 64 | --------------- |
| 62 | 65 | ||
| 63 | Viresh Kumar <vireshk@kernel.org>, (c) 2010-2012 ST Microelectronics | 66 | Viresh Kumar <vireshk@kernel.org>, (c) 2010-2012 ST Microelectronics |
diff --git a/Documentation/arm/sti/overview.txt b/Documentation/arm/sti/overview.rst index 1a4e93d6027f..70743617a74f 100644 --- a/Documentation/arm/sti/overview.txt +++ b/Documentation/arm/sti/overview.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | STi ARM Linux Overview | 1 | ====================== |
| 2 | ========================== | 2 | STi ARM Linux Overview |
| 3 | ====================== | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
| @@ -10,15 +11,17 @@ Introduction | |||
| 10 | B2000 and B2020 Reference boards. | 11 | B2000 and B2020 Reference boards. |
| 11 | 12 | ||
| 12 | 13 | ||
| 13 | configuration | 14 | configuration |
| 14 | ------------- | 15 | ------------- |
| 15 | 16 | ||
| 16 | A generic configuration is provided for both STiH415/416, and can be used as the | 17 | A generic configuration is provided for both STiH415/416, and can be used as the |
| 17 | default by | 18 | default by:: |
| 19 | |||
| 18 | make stih41x_defconfig | 20 | make stih41x_defconfig |
| 19 | 21 | ||
| 20 | Layout | 22 | Layout |
| 21 | ------ | 23 | ------ |
| 24 | |||
| 22 | All the files for multiple machine families (STiH415, STiH416, and STiG125) | 25 | All the files for multiple machine families (STiH415, STiH416, and STiG125) |
| 23 | are located in the platform code contained in arch/arm/mach-sti | 26 | are located in the platform code contained in arch/arm/mach-sti |
| 24 | 27 | ||
| @@ -27,7 +30,7 @@ Introduction | |||
| 27 | Device Trees. | 30 | Device Trees. |
| 28 | 31 | ||
| 29 | 32 | ||
| 30 | Document Author | 33 | Document Author |
| 31 | --------------- | 34 | --------------- |
| 32 | 35 | ||
| 33 | Srinivas Kandagatla <srinivas.kandagatla@st.com>, (c) 2013 ST Microelectronics | 36 | Srinivas Kandagatla <srinivas.kandagatla@st.com>, (c) 2013 ST Microelectronics |
diff --git a/Documentation/arm/sti/stih407-overview.txt b/Documentation/arm/sti/stih407-overview.rst index 3343f32f58bc..027e75bc7b7c 100644 --- a/Documentation/arm/sti/stih407-overview.txt +++ b/Documentation/arm/sti/stih407-overview.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | STiH407 Overview | 1 | ================ |
| 2 | ================ | 2 | STiH407 Overview |
| 3 | ================ | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
| @@ -12,7 +13,7 @@ Introduction | |||
| 12 | - ARM Cortex-A9 1.5 GHz dual core CPU (28nm) | 13 | - ARM Cortex-A9 1.5 GHz dual core CPU (28nm) |
| 13 | - SATA2, USB 3.0, PCIe, Gbit Ethernet | 14 | - SATA2, USB 3.0, PCIe, Gbit Ethernet |
| 14 | 15 | ||
| 15 | Document Author | 16 | Document Author |
| 16 | --------------- | 17 | --------------- |
| 17 | 18 | ||
| 18 | Maxime Coquelin <maxime.coquelin@st.com>, (c) 2014 ST Microelectronics | 19 | Maxime Coquelin <maxime.coquelin@st.com>, (c) 2014 ST Microelectronics |
diff --git a/Documentation/arm/sti/stih415-overview.txt b/Documentation/arm/sti/stih415-overview.rst index 1383e33f265d..b67452d610c4 100644 --- a/Documentation/arm/sti/stih415-overview.txt +++ b/Documentation/arm/sti/stih415-overview.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | STiH415 Overview | 1 | ================ |
| 2 | ================ | 2 | STiH415 Overview |
| 3 | ================ | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
| @@ -7,6 +8,7 @@ Introduction | |||
| 7 | The STiH415 is the next generation of HD, AVC set-top box processors | 8 | The STiH415 is the next generation of HD, AVC set-top box processors |
| 8 | for satellite, cable, terrestrial and IP-STB markets. | 9 | for satellite, cable, terrestrial and IP-STB markets. |
| 9 | 10 | ||
| 10 | Features | 11 | Features: |
| 12 | |||
| 11 | - ARM Cortex-A9 1.0 GHz, dual-core CPU | 13 | - ARM Cortex-A9 1.0 GHz, dual-core CPU |
| 12 | - SATA2x2,USB 2.0x3, PCIe, Gbit Ethernet MACx2 | 14 | - SATA2x2,USB 2.0x3, PCIe, Gbit Ethernet MACx2 |
diff --git a/Documentation/arm/sti/stih416-overview.txt b/Documentation/arm/sti/stih416-overview.rst index 558444c201c6..93f17d74d8db 100644 --- a/Documentation/arm/sti/stih416-overview.txt +++ b/Documentation/arm/sti/stih416-overview.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | STiH416 Overview | 1 | ================ |
| 2 | ================ | 2 | STiH416 Overview |
| 3 | ================ | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
diff --git a/Documentation/arm/sti/stih418-overview.txt b/Documentation/arm/sti/stih418-overview.rst index 1cd8fc80646d..b563c1f4fe5a 100644 --- a/Documentation/arm/sti/stih418-overview.txt +++ b/Documentation/arm/sti/stih418-overview.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | STiH418 Overview | 1 | ================ |
| 2 | ================ | 2 | STiH418 Overview |
| 3 | ================ | ||
| 3 | 4 | ||
| 4 | Introduction | 5 | Introduction |
| 5 | ------------ | 6 | ------------ |
| @@ -14,7 +15,7 @@ Introduction | |||
| 14 | - HEVC L5.1 Main 10 | 15 | - HEVC L5.1 Main 10 |
| 15 | - VP9 | 16 | - VP9 |
| 16 | 17 | ||
| 17 | Document Author | 18 | Document Author |
| 18 | --------------- | 19 | --------------- |
| 19 | 20 | ||
| 20 | Maxime Coquelin <maxime.coquelin@st.com>, (c) 2015 ST Microelectronics | 21 | Maxime Coquelin <maxime.coquelin@st.com>, (c) 2015 ST Microelectronics |
diff --git a/Documentation/arm/stm32/overview.rst b/Documentation/arm/stm32/overview.rst index f7e734153860..85cfc8410798 100644 --- a/Documentation/arm/stm32/overview.rst +++ b/Documentation/arm/stm32/overview.rst | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | |||
| 3 | ======================== | 1 | ======================== |
| 4 | STM32 ARM Linux Overview | 2 | STM32 ARM Linux Overview |
| 5 | ======================== | 3 | ======================== |
diff --git a/Documentation/arm/stm32/stm32f429-overview.rst b/Documentation/arm/stm32/stm32f429-overview.rst index 65bbb1c3b423..a7ebe8ea6697 100644 --- a/Documentation/arm/stm32/stm32f429-overview.rst +++ b/Documentation/arm/stm32/stm32f429-overview.rst | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | :orphan: | 1 | ================== |
| 2 | |||
| 3 | STM32F429 Overview | 2 | STM32F429 Overview |
| 4 | ================== | 3 | ================== |
| 5 | 4 | ||
| @@ -23,6 +22,4 @@ Datasheet and reference manual are publicly available on ST website (STM32F429_) | |||
| 23 | 22 | ||
| 24 | .. _STM32F429: http://www.st.com/web/en/catalog/mmc/FM141/SC1169/SS1577/LN1806?ecmp=stm32f429-439_pron_pr-ces2014_nov2013 | 23 | .. _STM32F429: http://www.st.com/web/en/catalog/mmc/FM141/SC1169/SS1577/LN1806?ecmp=stm32f429-439_pron_pr-ces2014_nov2013 |
| 25 | 24 | ||
| 26 | :Authors: | 25 | :Authors: Maxime Coquelin <mcoquelin.stm32@gmail.com> |
| 27 | |||
| 28 | Maxime Coquelin <mcoquelin.stm32@gmail.com> | ||
diff --git a/Documentation/arm/stm32/stm32f746-overview.rst b/Documentation/arm/stm32/stm32f746-overview.rst index 42d593085015..78befddc7740 100644 --- a/Documentation/arm/stm32/stm32f746-overview.rst +++ b/Documentation/arm/stm32/stm32f746-overview.rst | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | :orphan: | 1 | ================== |
| 2 | |||
| 3 | STM32F746 Overview | 2 | STM32F746 Overview |
| 4 | ================== | 3 | ================== |
| 5 | 4 | ||
| @@ -30,6 +29,4 @@ Datasheet and reference manual are publicly available on ST website (STM32F746_) | |||
| 30 | 29 | ||
| 31 | .. _STM32F746: http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f7-series/stm32f7x6/stm32f746ng.html | 30 | .. _STM32F746: http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f7-series/stm32f7x6/stm32f746ng.html |
| 32 | 31 | ||
| 33 | :Authors: | 32 | :Authors: Alexandre Torgue <alexandre.torgue@st.com> |
| 34 | |||
| 35 | Alexandre Torgue <alexandre.torgue@st.com> | ||
diff --git a/Documentation/arm/stm32/stm32f769-overview.rst b/Documentation/arm/stm32/stm32f769-overview.rst index f6adac862b17..e482980ddf21 100644 --- a/Documentation/arm/stm32/stm32f769-overview.rst +++ b/Documentation/arm/stm32/stm32f769-overview.rst | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | :orphan: | 1 | ================== |
| 2 | |||
| 3 | STM32F769 Overview | 2 | STM32F769 Overview |
| 4 | ================== | 3 | ================== |
| 5 | 4 | ||
| @@ -32,6 +31,4 @@ Datasheet and reference manual are publicly available on ST website (STM32F769_) | |||
| 32 | 31 | ||
| 33 | .. _STM32F769: http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32-high-performance-mcus/stm32f7-series/stm32f7x9/stm32f769ni.html | 32 | .. _STM32F769: http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32-high-performance-mcus/stm32f7-series/stm32f7x9/stm32f769ni.html |
| 34 | 33 | ||
| 35 | :Authors: | 34 | :Authors: Alexandre Torgue <alexandre.torgue@st.com> |
| 36 | |||
| 37 | Alexandre Torgue <alexandre.torgue@st.com> | ||
diff --git a/Documentation/arm/stm32/stm32h743-overview.rst b/Documentation/arm/stm32/stm32h743-overview.rst index c525835e7473..4e15f1a42730 100644 --- a/Documentation/arm/stm32/stm32h743-overview.rst +++ b/Documentation/arm/stm32/stm32h743-overview.rst | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | :orphan: | 1 | ================== |
| 2 | |||
| 3 | STM32H743 Overview | 2 | STM32H743 Overview |
| 4 | ================== | 3 | ================== |
| 5 | 4 | ||
| @@ -31,6 +30,4 @@ Datasheet and reference manual are publicly available on ST website (STM32H743_) | |||
| 31 | 30 | ||
| 32 | .. _STM32H743: http://www.st.com/en/microcontrollers/stm32h7x3.html?querycriteria=productId=LN2033 | 31 | .. _STM32H743: http://www.st.com/en/microcontrollers/stm32h7x3.html?querycriteria=productId=LN2033 |
| 33 | 32 | ||
| 34 | :Authors: | 33 | :Authors: Alexandre Torgue <alexandre.torgue@st.com> |
| 35 | |||
| 36 | Alexandre Torgue <alexandre.torgue@st.com> | ||
diff --git a/Documentation/arm/stm32/stm32mp157-overview.rst b/Documentation/arm/stm32/stm32mp157-overview.rst index 2c52cd020601..f62fdc8e7d8d 100644 --- a/Documentation/arm/stm32/stm32mp157-overview.rst +++ b/Documentation/arm/stm32/stm32mp157-overview.rst | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | :orphan: | 1 | =================== |
| 2 | |||
| 3 | STM32MP157 Overview | 2 | STM32MP157 Overview |
| 4 | =================== | 3 | =================== |
| 5 | 4 | ||
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi.rst index f8efc21998bf..b037428aee98 100644 --- a/Documentation/arm/sunxi/README +++ b/Documentation/arm/sunxi.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ================== | ||
| 1 | ARM Allwinner SoCs | 2 | ARM Allwinner SoCs |
| 2 | ================== | 3 | ================== |
| 3 | 4 | ||
| @@ -10,93 +11,140 @@ SunXi family | |||
| 10 | Linux kernel mach directory: arch/arm/mach-sunxi | 11 | Linux kernel mach directory: arch/arm/mach-sunxi |
| 11 | 12 | ||
| 12 | Flavors: | 13 | Flavors: |
| 14 | |||
| 13 | * ARM926 based SoCs | 15 | * ARM926 based SoCs |
| 14 | - Allwinner F20 (sun3i) | 16 | - Allwinner F20 (sun3i) |
| 15 | + Not Supported | 17 | |
| 18 | * Not Supported | ||
| 16 | 19 | ||
| 17 | * ARM Cortex-A8 based SoCs | 20 | * ARM Cortex-A8 based SoCs |
| 18 | - Allwinner A10 (sun4i) | 21 | - Allwinner A10 (sun4i) |
| 19 | + Datasheet | 22 | |
| 23 | * Datasheet | ||
| 24 | |||
| 20 | http://dl.linux-sunxi.org/A10/A10%20Datasheet%20-%20v1.21%20%282012-04-06%29.pdf | 25 | http://dl.linux-sunxi.org/A10/A10%20Datasheet%20-%20v1.21%20%282012-04-06%29.pdf |
| 21 | + User Manual | 26 | * User Manual |
| 27 | |||
| 22 | http://dl.linux-sunxi.org/A10/A10%20User%20Manual%20-%20v1.20%20%282012-04-09%2c%20DECRYPTED%29.pdf | 28 | http://dl.linux-sunxi.org/A10/A10%20User%20Manual%20-%20v1.20%20%282012-04-09%2c%20DECRYPTED%29.pdf |
| 23 | 29 | ||
| 24 | - Allwinner A10s (sun5i) | 30 | - Allwinner A10s (sun5i) |
| 25 | + Datasheet | 31 | |
| 32 | * Datasheet | ||
| 33 | |||
| 26 | http://dl.linux-sunxi.org/A10s/A10s%20Datasheet%20-%20v1.20%20%282012-03-27%29.pdf | 34 | http://dl.linux-sunxi.org/A10s/A10s%20Datasheet%20-%20v1.20%20%282012-03-27%29.pdf |
| 27 | 35 | ||
| 28 | - Allwinner A13 / R8 (sun5i) | 36 | - Allwinner A13 / R8 (sun5i) |
| 29 | + Datasheet | 37 | |
| 38 | * Datasheet | ||
| 39 | |||
| 30 | http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf | 40 | http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf |
| 31 | + User Manual | 41 | * User Manual |
| 42 | |||
| 32 | http://dl.linux-sunxi.org/A13/A13%20User%20Manual%20-%20v1.2%20%282013-01-08%29.pdf | 43 | http://dl.linux-sunxi.org/A13/A13%20User%20Manual%20-%20v1.2%20%282013-01-08%29.pdf |
| 33 | 44 | ||
| 34 | - Next Thing Co GR8 (sun5i) | 45 | - Next Thing Co GR8 (sun5i) |
| 35 | 46 | ||
| 36 | * Single ARM Cortex-A7 based SoCs | 47 | * Single ARM Cortex-A7 based SoCs |
| 37 | - Allwinner V3s (sun8i) | 48 | - Allwinner V3s (sun8i) |
| 38 | + Datasheet | 49 | |
| 50 | * Datasheet | ||
| 51 | |||
| 39 | http://linux-sunxi.org/File:Allwinner_V3s_Datasheet_V1.0.pdf | 52 | http://linux-sunxi.org/File:Allwinner_V3s_Datasheet_V1.0.pdf |
| 40 | 53 | ||
| 41 | * Dual ARM Cortex-A7 based SoCs | 54 | * Dual ARM Cortex-A7 based SoCs |
| 42 | - Allwinner A20 (sun7i) | 55 | - Allwinner A20 (sun7i) |
| 43 | + User Manual | 56 | |
| 57 | * User Manual | ||
| 58 | |||
| 44 | http://dl.linux-sunxi.org/A20/A20%20User%20Manual%202013-03-22.pdf | 59 | http://dl.linux-sunxi.org/A20/A20%20User%20Manual%202013-03-22.pdf |
| 45 | 60 | ||
| 46 | - Allwinner A23 (sun8i) | 61 | - Allwinner A23 (sun8i) |
| 47 | + Datasheet | 62 | |
| 63 | * Datasheet | ||
| 64 | |||
| 48 | http://dl.linux-sunxi.org/A23/A23%20Datasheet%20V1.0%2020130830.pdf | 65 | http://dl.linux-sunxi.org/A23/A23%20Datasheet%20V1.0%2020130830.pdf |
| 49 | + User Manual | 66 | |
| 67 | * User Manual | ||
| 68 | |||
| 50 | http://dl.linux-sunxi.org/A23/A23%20User%20Manual%20V1.0%2020130830.pdf | 69 | http://dl.linux-sunxi.org/A23/A23%20User%20Manual%20V1.0%2020130830.pdf |
| 51 | 70 | ||
| 52 | * Quad ARM Cortex-A7 based SoCs | 71 | * Quad ARM Cortex-A7 based SoCs |
| 53 | - Allwinner A31 (sun6i) | 72 | - Allwinner A31 (sun6i) |
| 54 | + Datasheet | 73 | |
| 74 | * Datasheet | ||
| 75 | |||
| 55 | http://dl.linux-sunxi.org/A31/A3x_release_document/A31/IC/A31%20datasheet%20V1.3%2020131106.pdf | 76 | http://dl.linux-sunxi.org/A31/A3x_release_document/A31/IC/A31%20datasheet%20V1.3%2020131106.pdf |
| 56 | + User Manual | 77 | |
| 78 | * User Manual | ||
| 79 | |||
| 57 | http://dl.linux-sunxi.org/A31/A3x_release_document/A31/IC/A31%20user%20manual%20V1.1%2020130630.pdf | 80 | http://dl.linux-sunxi.org/A31/A3x_release_document/A31/IC/A31%20user%20manual%20V1.1%2020130630.pdf |
| 58 | 81 | ||
| 59 | - Allwinner A31s (sun6i) | 82 | - Allwinner A31s (sun6i) |
| 60 | + Datasheet | 83 | |
| 84 | * Datasheet | ||
| 85 | |||
| 61 | http://dl.linux-sunxi.org/A31/A3x_release_document/A31s/IC/A31s%20datasheet%20V1.3%2020131106.pdf | 86 | http://dl.linux-sunxi.org/A31/A3x_release_document/A31s/IC/A31s%20datasheet%20V1.3%2020131106.pdf |
| 62 | + User Manual | 87 | |
| 88 | * User Manual | ||
| 89 | |||
| 63 | http://dl.linux-sunxi.org/A31/A3x_release_document/A31s/IC/A31s%20User%20Manual%20%20V1.0%2020130322.pdf | 90 | http://dl.linux-sunxi.org/A31/A3x_release_document/A31s/IC/A31s%20User%20Manual%20%20V1.0%2020130322.pdf |
| 64 | 91 | ||
| 65 | - Allwinner A33 (sun8i) | 92 | - Allwinner A33 (sun8i) |
| 66 | + Datasheet | 93 | |
| 94 | * Datasheet | ||
| 95 | |||
| 67 | http://dl.linux-sunxi.org/A33/A33%20Datasheet%20release%201.1.pdf | 96 | http://dl.linux-sunxi.org/A33/A33%20Datasheet%20release%201.1.pdf |
| 68 | + User Manual | 97 | |
| 98 | * User Manual | ||
| 99 | |||
| 69 | http://dl.linux-sunxi.org/A33/A33%20user%20manual%20release%201.1.pdf | 100 | http://dl.linux-sunxi.org/A33/A33%20user%20manual%20release%201.1.pdf |
| 70 | 101 | ||
| 71 | - Allwinner H2+ (sun8i) | 102 | - Allwinner H2+ (sun8i) |
| 72 | + No document available now, but is known to be working properly with | 103 | |
| 104 | * No document available now, but is known to be working properly with | ||
| 73 | H3 drivers and memory map. | 105 | H3 drivers and memory map. |
| 74 | 106 | ||
| 75 | - Allwinner H3 (sun8i) | 107 | - Allwinner H3 (sun8i) |
| 76 | + Datasheet | 108 | |
| 109 | * Datasheet | ||
| 110 | |||
| 77 | http://dl.linux-sunxi.org/H3/Allwinner_H3_Datasheet_V1.0.pdf | 111 | http://dl.linux-sunxi.org/H3/Allwinner_H3_Datasheet_V1.0.pdf |
| 78 | 112 | ||
| 79 | - Allwinner R40 (sun8i) | 113 | - Allwinner R40 (sun8i) |
| 80 | + Datasheet | 114 | |
| 115 | * Datasheet | ||
| 116 | |||
| 81 | https://github.com/tinalinux/docs/raw/r40-v1.y/R40_Datasheet_V1.0.pdf | 117 | https://github.com/tinalinux/docs/raw/r40-v1.y/R40_Datasheet_V1.0.pdf |
| 82 | + User Manual | 118 | |
| 119 | * User Manual | ||
| 120 | |||
| 83 | https://github.com/tinalinux/docs/raw/r40-v1.y/Allwinner_R40_User_Manual_V1.0.pdf | 121 | https://github.com/tinalinux/docs/raw/r40-v1.y/Allwinner_R40_User_Manual_V1.0.pdf |
| 84 | 122 | ||
| 85 | * Quad ARM Cortex-A15, Quad ARM Cortex-A7 based SoCs | 123 | * Quad ARM Cortex-A15, Quad ARM Cortex-A7 based SoCs |
| 86 | - Allwinner A80 | 124 | - Allwinner A80 |
| 87 | + Datasheet | 125 | |
| 126 | * Datasheet | ||
| 127 | |||
| 88 | http://dl.linux-sunxi.org/A80/A80_Datasheet_Revision_1.0_0404.pdf | 128 | http://dl.linux-sunxi.org/A80/A80_Datasheet_Revision_1.0_0404.pdf |
| 89 | 129 | ||
| 90 | * Octa ARM Cortex-A7 based SoCs | 130 | * Octa ARM Cortex-A7 based SoCs |
| 91 | - Allwinner A83T | 131 | - Allwinner A83T |
| 92 | + Datasheet | 132 | |
| 133 | * Datasheet | ||
| 134 | |||
| 93 | https://github.com/allwinner-zh/documents/raw/master/A83T/A83T_Datasheet_v1.3_20150510.pdf | 135 | https://github.com/allwinner-zh/documents/raw/master/A83T/A83T_Datasheet_v1.3_20150510.pdf |
| 94 | + User Manual | 136 | |
| 137 | * User Manual | ||
| 138 | |||
| 95 | https://github.com/allwinner-zh/documents/raw/master/A83T/A83T_User_Manual_v1.5.1_20150513.pdf | 139 | https://github.com/allwinner-zh/documents/raw/master/A83T/A83T_User_Manual_v1.5.1_20150513.pdf |
| 96 | 140 | ||
| 97 | * Quad ARM Cortex-A53 based SoCs | 141 | * Quad ARM Cortex-A53 based SoCs |
| 98 | - Allwinner A64 | 142 | - Allwinner A64 |
| 99 | + Datasheet | 143 | |
| 144 | * Datasheet | ||
| 145 | |||
| 100 | http://dl.linux-sunxi.org/A64/A64_Datasheet_V1.1.pdf | 146 | http://dl.linux-sunxi.org/A64/A64_Datasheet_V1.1.pdf |
| 101 | + User Manual | 147 | |
| 148 | * User Manual | ||
| 149 | |||
| 102 | http://dl.linux-sunxi.org/A64/Allwinner%20A64%20User%20Manual%20v1.0.pdf | 150 | http://dl.linux-sunxi.org/A64/Allwinner%20A64%20User%20Manual%20v1.0.pdf |
diff --git a/Documentation/arm/sunxi/clocks.txt b/Documentation/arm/sunxi/clocks.rst index e09a88aa3136..23bd03f3e21f 100644 --- a/Documentation/arm/sunxi/clocks.txt +++ b/Documentation/arm/sunxi/clocks.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ======================================================= | ||
| 1 | Frequently asked questions about the sunxi clock system | 2 | Frequently asked questions about the sunxi clock system |
| 2 | ======================================================= | 3 | ======================================================= |
| 3 | 4 | ||
| @@ -12,7 +13,7 @@ A: The 24MHz oscillator allows gating to save power. Indeed, if gated | |||
| 12 | steps, one can gate it and keep the system running. Consider this | 13 | steps, one can gate it and keep the system running. Consider this |
| 13 | simplified suspend example: | 14 | simplified suspend example: |
| 14 | 15 | ||
| 15 | While the system is operational, you would see something like | 16 | While the system is operational, you would see something like:: |
| 16 | 17 | ||
| 17 | 24MHz 32kHz | 18 | 24MHz 32kHz |
| 18 | | | 19 | | |
| @@ -23,7 +24,7 @@ A: The 24MHz oscillator allows gating to save power. Indeed, if gated | |||
| 23 | [CPU] | 24 | [CPU] |
| 24 | 25 | ||
| 25 | When you are about to suspend, you switch the CPU Mux to the 32kHz | 26 | When you are about to suspend, you switch the CPU Mux to the 32kHz |
| 26 | oscillator: | 27 | oscillator:: |
| 27 | 28 | ||
| 28 | 24Mhz 32kHz | 29 | 24Mhz 32kHz |
| 29 | | | | 30 | | | |
| @@ -33,7 +34,7 @@ A: The 24MHz oscillator allows gating to save power. Indeed, if gated | |||
| 33 | | | 34 | | |
| 34 | [CPU] | 35 | [CPU] |
| 35 | 36 | ||
| 36 | Finally you can gate the main oscillator | 37 | Finally you can gate the main oscillator:: |
| 37 | 38 | ||
| 38 | 32kHz | 39 | 32kHz |
| 39 | | | 40 | | |
diff --git a/Documentation/arm/swp_emulation b/Documentation/arm/swp_emulation.rst index af903d22fd93..6a608a9c3715 100644 --- a/Documentation/arm/swp_emulation +++ b/Documentation/arm/swp_emulation.rst | |||
| @@ -11,17 +11,17 @@ sequence. If a memory access fault (an abort) occurs, a segmentation fault is | |||
| 11 | signalled to the triggering process. | 11 | signalled to the triggering process. |
| 12 | 12 | ||
| 13 | /proc/cpu/swp_emulation holds some statistics/information, including the PID of | 13 | /proc/cpu/swp_emulation holds some statistics/information, including the PID of |
| 14 | the last process to trigger the emulation to be invocated. For example: | 14 | the last process to trigger the emulation to be invocated. For example:: |
| 15 | --- | ||
| 16 | Emulated SWP: 12 | ||
| 17 | Emulated SWPB: 0 | ||
| 18 | Aborted SWP{B}: 1 | ||
| 19 | Last process: 314 | ||
| 20 | --- | ||
| 21 | 15 | ||
| 22 | NOTE: when accessing uncached shared regions, LDREX/STREX rely on an external | 16 | Emulated SWP: 12 |
| 23 | transaction monitoring block called a global monitor to maintain update | 17 | Emulated SWPB: 0 |
| 24 | atomicity. If your system does not implement a global monitor, this option can | 18 | Aborted SWP{B}: 1 |
| 25 | cause programs that perform SWP operations to uncached memory to deadlock, as | 19 | Last process: 314 |
| 26 | the STREX operation will always fail. | ||
| 27 | 20 | ||
| 21 | |||
| 22 | NOTE: | ||
| 23 | when accessing uncached shared regions, LDREX/STREX rely on an external | ||
| 24 | transaction monitoring block called a global monitor to maintain update | ||
| 25 | atomicity. If your system does not implement a global monitor, this option can | ||
| 26 | cause programs that perform SWP operations to uncached memory to deadlock, as | ||
| 27 | the STREX operation will always fail. | ||
diff --git a/Documentation/arm/tcm.txt b/Documentation/arm/tcm.rst index 7c15871c1885..effd9c7bc968 100644 --- a/Documentation/arm/tcm.txt +++ b/Documentation/arm/tcm.rst | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | ================================================== | ||
| 1 | ARM TCM (Tightly-Coupled Memory) handling in Linux | 2 | ARM TCM (Tightly-Coupled Memory) handling in Linux |
| 2 | ---- | 3 | ================================================== |
| 4 | |||
| 3 | Written by Linus Walleij <linus.walleij@stericsson.com> | 5 | Written by Linus Walleij <linus.walleij@stericsson.com> |
| 4 | 6 | ||
| 5 | Some ARM SoC:s have a so-called TCM (Tightly-Coupled Memory). | 7 | Some ARM SoC:s have a so-called TCM (Tightly-Coupled Memory). |
| @@ -85,46 +87,50 @@ to have functions called locally inside the TCM without | |||
| 85 | wasting space, there is also the __tcmlocalfunc prefix that | 87 | wasting space, there is also the __tcmlocalfunc prefix that |
| 86 | will make the call relative. | 88 | will make the call relative. |
| 87 | 89 | ||
| 88 | Variables to go into dtcm can be tagged like this: | 90 | Variables to go into dtcm can be tagged like this:: |
| 89 | int __tcmdata foo; | 91 | |
| 92 | int __tcmdata foo; | ||
| 93 | |||
| 94 | Constants can be tagged like this:: | ||
| 90 | 95 | ||
| 91 | Constants can be tagged like this: | 96 | int __tcmconst foo; |
| 92 | int __tcmconst foo; | 97 | |
| 98 | To put assembler into TCM just use:: | ||
| 99 | |||
| 100 | .section ".tcm.text" or .section ".tcm.data" | ||
| 93 | 101 | ||
| 94 | To put assembler into TCM just use | ||
| 95 | .section ".tcm.text" or .section ".tcm.data" | ||
| 96 | respectively. | 102 | respectively. |
| 97 | 103 | ||
| 98 | Example code: | 104 | Example code:: |
| 99 | 105 | ||
| 100 | #include <asm/tcm.h> | 106 | #include <asm/tcm.h> |
| 101 | 107 | ||
| 102 | /* Uninitialized data */ | 108 | /* Uninitialized data */ |
| 103 | static u32 __tcmdata tcmvar; | 109 | static u32 __tcmdata tcmvar; |
| 104 | /* Initialized data */ | 110 | /* Initialized data */ |
| 105 | static u32 __tcmdata tcmassigned = 0x2BADBABEU; | 111 | static u32 __tcmdata tcmassigned = 0x2BADBABEU; |
| 106 | /* Constant */ | 112 | /* Constant */ |
| 107 | static const u32 __tcmconst tcmconst = 0xCAFEBABEU; | 113 | static const u32 __tcmconst tcmconst = 0xCAFEBABEU; |
| 108 | 114 | ||
| 109 | static void __tcmlocalfunc tcm_to_tcm(void) | 115 | static void __tcmlocalfunc tcm_to_tcm(void) |
| 110 | { | 116 | { |
| 111 | int i; | 117 | int i; |
| 112 | for (i = 0; i < 100; i++) | 118 | for (i = 0; i < 100; i++) |
| 113 | tcmvar ++; | 119 | tcmvar ++; |
| 114 | } | 120 | } |
| 115 | 121 | ||
| 116 | static void __tcmfunc hello_tcm(void) | 122 | static void __tcmfunc hello_tcm(void) |
| 117 | { | 123 | { |
| 118 | /* Some abstract code that runs in ITCM */ | 124 | /* Some abstract code that runs in ITCM */ |
| 119 | int i; | 125 | int i; |
| 120 | for (i = 0; i < 100; i++) { | 126 | for (i = 0; i < 100; i++) { |
| 121 | tcmvar ++; | 127 | tcmvar ++; |
| 122 | } | 128 | } |
| 123 | tcm_to_tcm(); | 129 | tcm_to_tcm(); |
| 124 | } | 130 | } |
| 125 | 131 | ||
| 126 | static void __init test_tcm(void) | 132 | static void __init test_tcm(void) |
| 127 | { | 133 | { |
| 128 | u32 *tcmem; | 134 | u32 *tcmem; |
| 129 | int i; | 135 | int i; |
| 130 | 136 | ||
| @@ -152,4 +158,4 @@ static void __init test_tcm(void) | |||
| 152 | printk("TCM tcmem[%d] = %08x\n", i, tcmem[i]); | 158 | printk("TCM tcmem[%d] = %08x\n", i, tcmem[i]); |
| 153 | tcm_free(tcmem, 20); | 159 | tcm_free(tcmem, 20); |
| 154 | } | 160 | } |
| 155 | } | 161 | } |
diff --git a/Documentation/arm/uefi.txt b/Documentation/arm/uefi.rst index 6543a0adea8a..f868330df6be 100644 --- a/Documentation/arm/uefi.txt +++ b/Documentation/arm/uefi.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ================================================ | ||
| 2 | The Unified Extensible Firmware Interface (UEFI) | ||
| 3 | ================================================ | ||
| 4 | |||
| 1 | UEFI, the Unified Extensible Firmware Interface, is a specification | 5 | UEFI, the Unified Extensible Firmware Interface, is a specification |
| 2 | governing the behaviours of compatible firmware interfaces. It is | 6 | governing the behaviours of compatible firmware interfaces. It is |
| 3 | maintained by the UEFI Forum - http://www.uefi.org/. | 7 | maintained by the UEFI Forum - http://www.uefi.org/. |
| @@ -11,11 +15,13 @@ UEFI support in Linux | |||
| 11 | ===================== | 15 | ===================== |
| 12 | Booting on a platform with firmware compliant with the UEFI specification | 16 | Booting on a platform with firmware compliant with the UEFI specification |
| 13 | makes it possible for the kernel to support additional features: | 17 | makes it possible for the kernel to support additional features: |
| 18 | |||
| 14 | - UEFI Runtime Services | 19 | - UEFI Runtime Services |
| 15 | - Retrieving various configuration information through the standardised | 20 | - Retrieving various configuration information through the standardised |
| 16 | interface of UEFI configuration tables. (ACPI, SMBIOS, ...) | 21 | interface of UEFI configuration tables. (ACPI, SMBIOS, ...) |
| 17 | 22 | ||
| 18 | For actually enabling [U]EFI support, enable: | 23 | For actually enabling [U]EFI support, enable: |
| 24 | |||
| 19 | - CONFIG_EFI=y | 25 | - CONFIG_EFI=y |
| 20 | - CONFIG_EFI_VARS=y or m | 26 | - CONFIG_EFI_VARS=y or m |
| 21 | 27 | ||
| @@ -42,19 +48,20 @@ Instead, the kernel reads the UEFI memory map. | |||
| 42 | 48 | ||
| 43 | The stub populates the FDT /chosen node with (and the kernel scans for) the | 49 | The stub populates the FDT /chosen node with (and the kernel scans for) the |
| 44 | following parameters: | 50 | following parameters: |
| 45 | ________________________________________________________________________________ | 51 | |
| 46 | Name | Size | Description | 52 | ========================== ====== =========================================== |
| 47 | ================================================================================ | 53 | Name Size Description |
| 48 | linux,uefi-system-table | 64-bit | Physical address of the UEFI System Table. | 54 | ========================== ====== =========================================== |
| 49 | -------------------------------------------------------------------------------- | 55 | linux,uefi-system-table 64-bit Physical address of the UEFI System Table. |
| 50 | linux,uefi-mmap-start | 64-bit | Physical address of the UEFI memory map, | 56 | |
| 51 | | | populated by the UEFI GetMemoryMap() call. | 57 | linux,uefi-mmap-start 64-bit Physical address of the UEFI memory map, |
| 52 | -------------------------------------------------------------------------------- | 58 | populated by the UEFI GetMemoryMap() call. |
| 53 | linux,uefi-mmap-size | 32-bit | Size in bytes of the UEFI memory map | 59 | |
| 54 | | | pointed to in previous entry. | 60 | linux,uefi-mmap-size 32-bit Size in bytes of the UEFI memory map |
| 55 | -------------------------------------------------------------------------------- | 61 | pointed to in previous entry. |
| 56 | linux,uefi-mmap-desc-size | 32-bit | Size in bytes of each entry in the UEFI | 62 | |
| 57 | | | memory map. | 63 | linux,uefi-mmap-desc-size 32-bit Size in bytes of each entry in the UEFI |
| 58 | -------------------------------------------------------------------------------- | 64 | memory map. |
| 59 | linux,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format. | 65 | |
| 60 | -------------------------------------------------------------------------------- | 66 | linux,uefi-mmap-desc-ver 32-bit Version of the mmap descriptor format. |
| 67 | ========================== ====== =========================================== | ||
diff --git a/Documentation/arm/VFP/release-notes.txt b/Documentation/arm/vfp/release-notes.rst index 28a2795705ca..c6b04937cee3 100644 --- a/Documentation/arm/VFP/release-notes.txt +++ b/Documentation/arm/vfp/release-notes.rst | |||
| @@ -1,7 +1,9 @@ | |||
| 1 | =============================================== | ||
| 1 | Release notes for Linux Kernel VFP support code | 2 | Release notes for Linux Kernel VFP support code |
| 2 | ----------------------------------------------- | 3 | =============================================== |
| 3 | 4 | ||
| 4 | Date: 20 May 2004 | 5 | Date: 20 May 2004 |
| 6 | |||
| 5 | Author: Russell King | 7 | Author: Russell King |
| 6 | 8 | ||
| 7 | This is the first release of the Linux Kernel VFP support code. It | 9 | This is the first release of the Linux Kernel VFP support code. It |
diff --git a/Documentation/arm/vlocks.txt b/Documentation/arm/vlocks.rst index 45731672c564..a40a1742110b 100644 --- a/Documentation/arm/vlocks.txt +++ b/Documentation/arm/vlocks.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ====================================== | ||
| 1 | vlocks for Bare-Metal Mutual Exclusion | 2 | vlocks for Bare-Metal Mutual Exclusion |
| 2 | ====================================== | 3 | ====================================== |
| 3 | 4 | ||
| @@ -26,7 +27,7 @@ started yet. | |||
| 26 | Algorithm | 27 | Algorithm |
| 27 | --------- | 28 | --------- |
| 28 | 29 | ||
| 29 | The easiest way to explain the vlocks algorithm is with some pseudo-code: | 30 | The easiest way to explain the vlocks algorithm is with some pseudo-code:: |
| 30 | 31 | ||
| 31 | 32 | ||
| 32 | int currently_voting[NR_CPUS] = { 0, }; | 33 | int currently_voting[NR_CPUS] = { 0, }; |
| @@ -93,7 +94,7 @@ Features and limitations | |||
| 93 | number of CPUs. | 94 | number of CPUs. |
| 94 | 95 | ||
| 95 | vlocks can be cascaded in a voting hierarchy to permit better scaling | 96 | vlocks can be cascaded in a voting hierarchy to permit better scaling |
| 96 | if necessary, as in the following hypothetical example for 4096 CPUs: | 97 | if necessary, as in the following hypothetical example for 4096 CPUs:: |
| 97 | 98 | ||
| 98 | /* first level: local election */ | 99 | /* first level: local election */ |
| 99 | my_town = towns[(this_cpu >> 4) & 0xf]; | 100 | my_town = towns[(this_cpu >> 4) & 0xf]; |
| @@ -127,12 +128,12 @@ the basic algorithm: | |||
| 127 | reduces the number of round-trips required to external memory. | 128 | reduces the number of round-trips required to external memory. |
| 128 | 129 | ||
| 129 | In the ARM implementation, this means that we can use a single load | 130 | In the ARM implementation, this means that we can use a single load |
| 130 | and comparison: | 131 | and comparison:: |
| 131 | 132 | ||
| 132 | LDR Rt, [Rn] | 133 | LDR Rt, [Rn] |
| 133 | CMP Rt, #0 | 134 | CMP Rt, #0 |
| 134 | 135 | ||
| 135 | ...in place of code equivalent to: | 136 | ...in place of code equivalent to:: |
| 136 | 137 | ||
| 137 | LDRB Rt, [Rn] | 138 | LDRB Rt, [Rn] |
| 138 | CMP Rt, #0 | 139 | CMP Rt, #0 |
diff --git a/Documentation/arm64/index.rst b/Documentation/arm64/index.rst index 018b7836ecb7..96b696ba4e6c 100644 --- a/Documentation/arm64/index.rst +++ b/Documentation/arm64/index.rst | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | |||
| 3 | ================== | 1 | ================== |
| 4 | ARM64 Architecture | 2 | ARM64 Architecture |
| 5 | ================== | 3 | ================== |
diff --git a/Documentation/backlight/lp855x-driver.txt b/Documentation/backlight/lp855x-driver.txt deleted file mode 100644 index 01bce243d3d7..000000000000 --- a/Documentation/backlight/lp855x-driver.txt +++ /dev/null | |||
| @@ -1,66 +0,0 @@ | |||
| 1 | Kernel driver lp855x | ||
| 2 | ==================== | ||
| 3 | |||
| 4 | Backlight driver for LP855x ICs | ||
| 5 | |||
| 6 | Supported chips: | ||
| 7 | Texas Instruments LP8550, LP8551, LP8552, LP8553, LP8555, LP8556 and | ||
| 8 | LP8557 | ||
| 9 | |||
| 10 | Author: Milo(Woogyom) Kim <milo.kim@ti.com> | ||
| 11 | |||
| 12 | Description | ||
| 13 | ----------- | ||
| 14 | |||
| 15 | * Brightness control | ||
| 16 | |||
| 17 | Brightness can be controlled by the pwm input or the i2c command. | ||
| 18 | The lp855x driver supports both cases. | ||
| 19 | |||
| 20 | * Device attributes | ||
| 21 | |||
| 22 | 1) bl_ctl_mode | ||
| 23 | Backlight control mode. | ||
| 24 | Value : pwm based or register based | ||
| 25 | |||
| 26 | 2) chip_id | ||
| 27 | The lp855x chip id. | ||
| 28 | Value : lp8550/lp8551/lp8552/lp8553/lp8555/lp8556/lp8557 | ||
| 29 | |||
| 30 | Platform data for lp855x | ||
| 31 | ------------------------ | ||
| 32 | |||
| 33 | For supporting platform specific data, the lp855x platform data can be used. | ||
| 34 | |||
| 35 | * name : Backlight driver name. If it is not defined, default name is set. | ||
| 36 | * device_control : Value of DEVICE CONTROL register. | ||
| 37 | * initial_brightness : Initial value of backlight brightness. | ||
| 38 | * period_ns : Platform specific PWM period value. unit is nano. | ||
| 39 | Only valid when brightness is pwm input mode. | ||
| 40 | * size_program : Total size of lp855x_rom_data. | ||
| 41 | * rom_data : List of new eeprom/eprom registers. | ||
| 42 | |||
| 43 | example 1) lp8552 platform data : i2c register mode with new eeprom data | ||
| 44 | |||
| 45 | #define EEPROM_A5_ADDR 0xA5 | ||
| 46 | #define EEPROM_A5_VAL 0x4f /* EN_VSYNC=0 */ | ||
| 47 | |||
| 48 | static struct lp855x_rom_data lp8552_eeprom_arr[] = { | ||
| 49 | {EEPROM_A5_ADDR, EEPROM_A5_VAL}, | ||
| 50 | }; | ||
| 51 | |||
| 52 | static struct lp855x_platform_data lp8552_pdata = { | ||
| 53 | .name = "lcd-bl", | ||
| 54 | .device_control = I2C_CONFIG(LP8552), | ||
| 55 | .initial_brightness = INITIAL_BRT, | ||
| 56 | .size_program = ARRAY_SIZE(lp8552_eeprom_arr), | ||
| 57 | .rom_data = lp8552_eeprom_arr, | ||
| 58 | }; | ||
| 59 | |||
| 60 | example 2) lp8556 platform data : pwm input mode with default rom data | ||
| 61 | |||
| 62 | static struct lp855x_platform_data lp8556_pdata = { | ||
| 63 | .device_control = PWM_CONFIG(LP8556), | ||
| 64 | .initial_brightness = INITIAL_BRT, | ||
| 65 | .period_ns = 1000000, | ||
| 66 | }; | ||
diff --git a/Documentation/block/bfq-iosched.txt b/Documentation/block/bfq-iosched.rst index bbd6eb5bbb07..0d237d402860 100644 --- a/Documentation/block/bfq-iosched.txt +++ b/Documentation/block/bfq-iosched.rst | |||
| @@ -1,9 +1,11 @@ | |||
| 1 | ========================== | ||
| 1 | BFQ (Budget Fair Queueing) | 2 | BFQ (Budget Fair Queueing) |
| 2 | ========================== | 3 | ========================== |
| 3 | 4 | ||
| 4 | BFQ is a proportional-share I/O scheduler, with some extra | 5 | BFQ is a proportional-share I/O scheduler, with some extra |
| 5 | low-latency capabilities. In addition to cgroups support (blkio or io | 6 | low-latency capabilities. In addition to cgroups support (blkio or io |
| 6 | controllers), BFQ's main features are: | 7 | controllers), BFQ's main features are: |
| 8 | |||
| 7 | - BFQ guarantees a high system and application responsiveness, and a | 9 | - BFQ guarantees a high system and application responsiveness, and a |
| 8 | low latency for time-sensitive applications, such as audio or video | 10 | low latency for time-sensitive applications, such as audio or video |
| 9 | players; | 11 | players; |
| @@ -55,18 +57,18 @@ sustainable throughputs, on the same systems as above: | |||
| 55 | 57 | ||
| 56 | BFQ works for multi-queue devices too. | 58 | BFQ works for multi-queue devices too. |
| 57 | 59 | ||
| 58 | The table of contents follow. Impatients can just jump to Section 3. | 60 | .. The table of contents follow. Impatients can just jump to Section 3. |
| 59 | 61 | ||
| 60 | CONTENTS | 62 | .. CONTENTS |
| 61 | 63 | ||
| 62 | 1. When may BFQ be useful? | 64 | 1. When may BFQ be useful? |
| 63 | 1-1 Personal systems | 65 | 1-1 Personal systems |
| 64 | 1-2 Server systems | 66 | 1-2 Server systems |
| 65 | 2. How does BFQ work? | 67 | 2. How does BFQ work? |
| 66 | 3. What are BFQ's tunables and how to properly configure BFQ? | 68 | 3. What are BFQ's tunables and how to properly configure BFQ? |
| 67 | 4. BFQ group scheduling | 69 | 4. BFQ group scheduling |
| 68 | 4-1 Service guarantees provided | 70 | 4-1 Service guarantees provided |
| 69 | 4-2 Interface | 71 | 4-2 Interface |
| 70 | 72 | ||
| 71 | 1. When may BFQ be useful? | 73 | 1. When may BFQ be useful? |
| 72 | ========================== | 74 | ========================== |
| @@ -77,17 +79,20 @@ BFQ provides the following benefits on personal and server systems. | |||
| 77 | -------------------- | 79 | -------------------- |
| 78 | 80 | ||
| 79 | Low latency for interactive applications | 81 | Low latency for interactive applications |
| 82 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 80 | 83 | ||
| 81 | Regardless of the actual background workload, BFQ guarantees that, for | 84 | Regardless of the actual background workload, BFQ guarantees that, for |
| 82 | interactive tasks, the storage device is virtually as responsive as if | 85 | interactive tasks, the storage device is virtually as responsive as if |
| 83 | it was idle. For example, even if one or more of the following | 86 | it was idle. For example, even if one or more of the following |
| 84 | background workloads are being executed: | 87 | background workloads are being executed: |
| 88 | |||
| 85 | - one or more large files are being read, written or copied, | 89 | - one or more large files are being read, written or copied, |
| 86 | - a tree of source files is being compiled, | 90 | - a tree of source files is being compiled, |
| 87 | - one or more virtual machines are performing I/O, | 91 | - one or more virtual machines are performing I/O, |
| 88 | - a software update is in progress, | 92 | - a software update is in progress, |
| 89 | - indexing daemons are scanning filesystems and updating their | 93 | - indexing daemons are scanning filesystems and updating their |
| 90 | databases, | 94 | databases, |
| 95 | |||
| 91 | starting an application or loading a file from within an application | 96 | starting an application or loading a file from within an application |
| 92 | takes about the same time as if the storage device was idle. As a | 97 | takes about the same time as if the storage device was idle. As a |
| 93 | comparison, with CFQ, NOOP or DEADLINE, and in the same conditions, | 98 | comparison, with CFQ, NOOP or DEADLINE, and in the same conditions, |
| @@ -95,13 +100,14 @@ applications experience high latencies, or even become unresponsive | |||
| 95 | until the background workload terminates (also on SSDs). | 100 | until the background workload terminates (also on SSDs). |
| 96 | 101 | ||
| 97 | Low latency for soft real-time applications | 102 | Low latency for soft real-time applications |
| 98 | 103 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| 99 | Also soft real-time applications, such as audio and video | 104 | Also soft real-time applications, such as audio and video |
| 100 | players/streamers, enjoy a low latency and a low drop rate, regardless | 105 | players/streamers, enjoy a low latency and a low drop rate, regardless |
| 101 | of the background I/O workload. As a consequence, these applications | 106 | of the background I/O workload. As a consequence, these applications |
| 102 | do not suffer from almost any glitch due to the background workload. | 107 | do not suffer from almost any glitch due to the background workload. |
| 103 | 108 | ||
| 104 | Higher speed for code-development tasks | 109 | Higher speed for code-development tasks |
| 110 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 105 | 111 | ||
| 106 | If some additional workload happens to be executed in parallel, then | 112 | If some additional workload happens to be executed in parallel, then |
| 107 | BFQ executes the I/O-related components of typical code-development | 113 | BFQ executes the I/O-related components of typical code-development |
| @@ -109,6 +115,7 @@ tasks (compilation, checkout, merge, ...) much more quickly than CFQ, | |||
| 109 | NOOP or DEADLINE. | 115 | NOOP or DEADLINE. |
| 110 | 116 | ||
| 111 | High throughput | 117 | High throughput |
| 118 | ^^^^^^^^^^^^^^^ | ||
| 112 | 119 | ||
| 113 | On hard disks, BFQ achieves up to 30% higher throughput than CFQ, and | 120 | On hard disks, BFQ achieves up to 30% higher throughput than CFQ, and |
| 114 | up to 150% higher throughput than DEADLINE and NOOP, with all the | 121 | up to 150% higher throughput than DEADLINE and NOOP, with all the |
| @@ -117,6 +124,7 @@ and with all the workloads on flash-based devices, BFQ achieves, | |||
| 117 | instead, about the same throughput as the other schedulers. | 124 | instead, about the same throughput as the other schedulers. |
| 118 | 125 | ||
| 119 | Strong fairness, bandwidth and delay guarantees | 126 | Strong fairness, bandwidth and delay guarantees |
| 127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 120 | 128 | ||
| 121 | BFQ distributes the device throughput, and not just the device time, | 129 | BFQ distributes the device throughput, and not just the device time, |
| 122 | among I/O-bound applications in proportion their weights, with any | 130 | among I/O-bound applications in proportion their weights, with any |
| @@ -133,15 +141,15 @@ Most benefits for server systems follow from the same service | |||
| 133 | properties as above. In particular, regardless of whether additional, | 141 | properties as above. In particular, regardless of whether additional, |
| 134 | possibly heavy workloads are being served, BFQ guarantees: | 142 | possibly heavy workloads are being served, BFQ guarantees: |
| 135 | 143 | ||
| 136 | . audio and video-streaming with zero or very low jitter and drop | 144 | * audio and video-streaming with zero or very low jitter and drop |
| 137 | rate; | 145 | rate; |
| 138 | 146 | ||
| 139 | . fast retrieval of WEB pages and embedded objects; | 147 | * fast retrieval of WEB pages and embedded objects; |
| 140 | 148 | ||
| 141 | . real-time recording of data in live-dumping applications (e.g., | 149 | * real-time recording of data in live-dumping applications (e.g., |
| 142 | packet logging); | 150 | packet logging); |
| 143 | 151 | ||
| 144 | . responsiveness in local and remote access to a server. | 152 | * responsiveness in local and remote access to a server. |
| 145 | 153 | ||
| 146 | 154 | ||
| 147 | 2. How does BFQ work? | 155 | 2. How does BFQ work? |
| @@ -151,7 +159,7 @@ BFQ is a proportional-share I/O scheduler, whose general structure, | |||
| 151 | plus a lot of code, are borrowed from CFQ. | 159 | plus a lot of code, are borrowed from CFQ. |
| 152 | 160 | ||
| 153 | - Each process doing I/O on a device is associated with a weight and a | 161 | - Each process doing I/O on a device is associated with a weight and a |
| 154 | (bfq_)queue. | 162 | `(bfq_)queue`. |
| 155 | 163 | ||
| 156 | - BFQ grants exclusive access to the device, for a while, to one queue | 164 | - BFQ grants exclusive access to the device, for a while, to one queue |
| 157 | (process) at a time, and implements this service model by | 165 | (process) at a time, and implements this service model by |
| @@ -539,12 +547,13 @@ As for cgroups-v1 (blkio controller), the exact set of stat files | |||
| 539 | created, and kept up-to-date by bfq, depends on whether | 547 | created, and kept up-to-date by bfq, depends on whether |
| 540 | CONFIG_BFQ_CGROUP_DEBUG is set. If it is set, then bfq creates all | 548 | CONFIG_BFQ_CGROUP_DEBUG is set. If it is set, then bfq creates all |
| 541 | the stat files documented in | 549 | the stat files documented in |
| 542 | Documentation/cgroup-v1/blkio-controller.rst. If, instead, | 550 | Documentation/admin-guide/cgroup-v1/blkio-controller.rst. If, instead, |
| 543 | CONFIG_BFQ_CGROUP_DEBUG is not set, then bfq creates only the files | 551 | CONFIG_BFQ_CGROUP_DEBUG is not set, then bfq creates only the files:: |
| 544 | blkio.bfq.io_service_bytes | 552 | |
| 545 | blkio.bfq.io_service_bytes_recursive | 553 | blkio.bfq.io_service_bytes |
| 546 | blkio.bfq.io_serviced | 554 | blkio.bfq.io_service_bytes_recursive |
| 547 | blkio.bfq.io_serviced_recursive | 555 | blkio.bfq.io_serviced |
| 556 | blkio.bfq.io_serviced_recursive | ||
| 548 | 557 | ||
| 549 | The value of CONFIG_BFQ_CGROUP_DEBUG greatly influences the maximum | 558 | The value of CONFIG_BFQ_CGROUP_DEBUG greatly influences the maximum |
| 550 | throughput sustainable with bfq, because updating the blkio.bfq.* | 559 | throughput sustainable with bfq, because updating the blkio.bfq.* |
| @@ -567,17 +576,22 @@ weight of the queues associated with interactive and soft real-time | |||
| 567 | applications. Unset this tunable if you need/want to control weights. | 576 | applications. Unset this tunable if you need/want to control weights. |
| 568 | 577 | ||
| 569 | 578 | ||
| 570 | [1] P. Valente, A. Avanzini, "Evolution of the BFQ Storage I/O | 579 | [1] |
| 580 | P. Valente, A. Avanzini, "Evolution of the BFQ Storage I/O | ||
| 571 | Scheduler", Proceedings of the First Workshop on Mobile System | 581 | Scheduler", Proceedings of the First Workshop on Mobile System |
| 572 | Technologies (MST-2015), May 2015. | 582 | Technologies (MST-2015), May 2015. |
| 583 | |||
| 573 | http://algogroup.unimore.it/people/paolo/disk_sched/mst-2015.pdf | 584 | http://algogroup.unimore.it/people/paolo/disk_sched/mst-2015.pdf |
| 574 | 585 | ||
| 575 | [2] P. Valente and M. Andreolini, "Improving Application | 586 | [2] |
| 587 | P. Valente and M. Andreolini, "Improving Application | ||
| 576 | Responsiveness with the BFQ Disk I/O Scheduler", Proceedings of | 588 | Responsiveness with the BFQ Disk I/O Scheduler", Proceedings of |
| 577 | the 5th Annual International Systems and Storage Conference | 589 | the 5th Annual International Systems and Storage Conference |
| 578 | (SYSTOR '12), June 2012. | 590 | (SYSTOR '12), June 2012. |
| 591 | |||
| 579 | Slightly extended version: | 592 | Slightly extended version: |
| 580 | http://algogroup.unimore.it/people/paolo/disk_sched/bfq-v1-suite- | ||
| 581 | results.pdf | ||
| 582 | 593 | ||
| 583 | [3] https://github.com/Algodev-github/S | 594 | http://algogroup.unimore.it/people/paolo/disk_sched/bfq-v1-suite-results.pdf |
| 595 | |||
| 596 | [3] | ||
| 597 | https://github.com/Algodev-github/S | ||
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.rst index 5a4a799fe61b..b964796ec9c7 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.rst | |||
| @@ -1,15 +1,25 @@ | |||
| 1 | Notes on the Generic Block Layer Rewrite in Linux 2.5 | 1 | ===================================================== |
| 2 | ===================================================== | 2 | Notes on the Generic Block Layer Rewrite in Linux 2.5 |
| 3 | ===================================================== | ||
| 4 | |||
| 5 | .. note:: | ||
| 6 | |||
| 7 | It seems that there are lot of outdated stuff here. This seems | ||
| 8 | to be written somewhat as a task list. Yet, eventually, something | ||
| 9 | here might still be useful. | ||
| 3 | 10 | ||
| 4 | Notes Written on Jan 15, 2002: | 11 | Notes Written on Jan 15, 2002: |
| 5 | Jens Axboe <jens.axboe@oracle.com> | 12 | |
| 6 | Suparna Bhattacharya <suparna@in.ibm.com> | 13 | - Jens Axboe <jens.axboe@oracle.com> |
| 14 | - Suparna Bhattacharya <suparna@in.ibm.com> | ||
| 7 | 15 | ||
| 8 | Last Updated May 2, 2002 | 16 | Last Updated May 2, 2002 |
| 17 | |||
| 9 | September 2003: Updated I/O Scheduler portions | 18 | September 2003: Updated I/O Scheduler portions |
| 10 | Nick Piggin <npiggin@kernel.dk> | 19 | - Nick Piggin <npiggin@kernel.dk> |
| 11 | 20 | ||
| 12 | Introduction: | 21 | Introduction |
| 22 | ============ | ||
| 13 | 23 | ||
| 14 | These are some notes describing some aspects of the 2.5 block layer in the | 24 | These are some notes describing some aspects of the 2.5 block layer in the |
| 15 | context of the bio rewrite. The idea is to bring out some of the key | 25 | context of the bio rewrite. The idea is to bring out some of the key |
| @@ -17,11 +27,11 @@ changes and a glimpse of the rationale behind those changes. | |||
| 17 | 27 | ||
| 18 | Please mail corrections & suggestions to suparna@in.ibm.com. | 28 | Please mail corrections & suggestions to suparna@in.ibm.com. |
| 19 | 29 | ||
| 20 | Credits: | 30 | Credits |
| 21 | --------- | 31 | ======= |
| 22 | 32 | ||
| 23 | 2.5 bio rewrite: | 33 | 2.5 bio rewrite: |
| 24 | Jens Axboe <jens.axboe@oracle.com> | 34 | - Jens Axboe <jens.axboe@oracle.com> |
| 25 | 35 | ||
| 26 | Many aspects of the generic block layer redesign were driven by and evolved | 36 | Many aspects of the generic block layer redesign were driven by and evolved |
| 27 | over discussions, prior patches and the collective experience of several | 37 | over discussions, prior patches and the collective experience of several |
| @@ -29,62 +39,63 @@ people. See sections 8 and 9 for a list of some related references. | |||
| 29 | 39 | ||
| 30 | The following people helped with review comments and inputs for this | 40 | The following people helped with review comments and inputs for this |
| 31 | document: | 41 | document: |
| 32 | Christoph Hellwig <hch@infradead.org> | 42 | |
| 33 | Arjan van de Ven <arjanv@redhat.com> | 43 | - Christoph Hellwig <hch@infradead.org> |
| 34 | Randy Dunlap <rdunlap@xenotime.net> | 44 | - Arjan van de Ven <arjanv@redhat.com> |
| 35 | Andre Hedrick <andre@linux-ide.org> | 45 | - Randy Dunlap <rdunlap@xenotime.net> |
| 46 | - Andre Hedrick <andre@linux-ide.org> | ||
| 36 | 47 | ||
| 37 | The following people helped with fixes/contributions to the bio patches | 48 | The following people helped with fixes/contributions to the bio patches |
| 38 | while it was still work-in-progress: | 49 | while it was still work-in-progress: |
| 39 | David S. Miller <davem@redhat.com> | ||
| 40 | 50 | ||
| 51 | - David S. Miller <davem@redhat.com> | ||
| 41 | 52 | ||
| 42 | Description of Contents: | ||
| 43 | ------------------------ | ||
| 44 | 53 | ||
| 45 | 1. Scope for tuning of logic to various needs | 54 | .. Description of Contents: |
| 46 | 1.1 Tuning based on device or low level driver capabilities | 55 | |
| 56 | 1. Scope for tuning of logic to various needs | ||
| 57 | 1.1 Tuning based on device or low level driver capabilities | ||
| 47 | - Per-queue parameters | 58 | - Per-queue parameters |
| 48 | - Highmem I/O support | 59 | - Highmem I/O support |
| 49 | - I/O scheduler modularization | 60 | - I/O scheduler modularization |
| 50 | 1.2 Tuning based on high level requirements/capabilities | 61 | 1.2 Tuning based on high level requirements/capabilities |
| 51 | 1.2.1 Request Priority/Latency | 62 | 1.2.1 Request Priority/Latency |
| 52 | 1.3 Direct access/bypass to lower layers for diagnostics and special | 63 | 1.3 Direct access/bypass to lower layers for diagnostics and special |
| 53 | device operations | 64 | device operations |
| 54 | 1.3.1 Pre-built commands | 65 | 1.3.1 Pre-built commands |
| 55 | 2. New flexible and generic but minimalist i/o structure or descriptor | 66 | 2. New flexible and generic but minimalist i/o structure or descriptor |
| 56 | (instead of using buffer heads at the i/o layer) | 67 | (instead of using buffer heads at the i/o layer) |
| 57 | 2.1 Requirements/Goals addressed | 68 | 2.1 Requirements/Goals addressed |
| 58 | 2.2 The bio struct in detail (multi-page io unit) | 69 | 2.2 The bio struct in detail (multi-page io unit) |
| 59 | 2.3 Changes in the request structure | 70 | 2.3 Changes in the request structure |
| 60 | 3. Using bios | 71 | 3. Using bios |
| 61 | 3.1 Setup/teardown (allocation, splitting) | 72 | 3.1 Setup/teardown (allocation, splitting) |
| 62 | 3.2 Generic bio helper routines | 73 | 3.2 Generic bio helper routines |
| 63 | 3.2.1 Traversing segments and completion units in a request | 74 | 3.2.1 Traversing segments and completion units in a request |
| 64 | 3.2.2 Setting up DMA scatterlists | 75 | 3.2.2 Setting up DMA scatterlists |
| 65 | 3.2.3 I/O completion | 76 | 3.2.3 I/O completion |
| 66 | 3.2.4 Implications for drivers that do not interpret bios (don't handle | 77 | 3.2.4 Implications for drivers that do not interpret bios (don't handle |
| 67 | multiple segments) | 78 | multiple segments) |
| 68 | 3.3 I/O submission | 79 | 3.3 I/O submission |
| 69 | 4. The I/O scheduler | 80 | 4. The I/O scheduler |
| 70 | 5. Scalability related changes | 81 | 5. Scalability related changes |
| 71 | 5.1 Granular locking: Removal of io_request_lock | 82 | 5.1 Granular locking: Removal of io_request_lock |
| 72 | 5.2 Prepare for transition to 64 bit sector_t | 83 | 5.2 Prepare for transition to 64 bit sector_t |
| 73 | 6. Other Changes/Implications | 84 | 6. Other Changes/Implications |
| 74 | 6.1 Partition re-mapping handled by the generic block layer | 85 | 6.1 Partition re-mapping handled by the generic block layer |
| 75 | 7. A few tips on migration of older drivers | 86 | 7. A few tips on migration of older drivers |
| 76 | 8. A list of prior/related/impacted patches/ideas | 87 | 8. A list of prior/related/impacted patches/ideas |
| 77 | 9. Other References/Discussion Threads | 88 | 9. Other References/Discussion Threads |
| 78 | 89 | ||
| 79 | --------------------------------------------------------------------------- | ||
| 80 | 90 | ||
| 81 | Bio Notes | 91 | Bio Notes |
| 82 | -------- | 92 | ========= |
| 83 | 93 | ||
| 84 | Let us discuss the changes in the context of how some overall goals for the | 94 | Let us discuss the changes in the context of how some overall goals for the |
| 85 | block layer are addressed. | 95 | block layer are addressed. |
| 86 | 96 | ||
| 87 | 1. Scope for tuning the generic logic to satisfy various requirements | 97 | 1. Scope for tuning the generic logic to satisfy various requirements |
| 98 | ===================================================================== | ||
| 88 | 99 | ||
| 89 | The block layer design supports adaptable abstractions to handle common | 100 | The block layer design supports adaptable abstractions to handle common |
| 90 | processing with the ability to tune the logic to an appropriate extent | 101 | processing with the ability to tune the logic to an appropriate extent |
| @@ -97,6 +108,7 @@ and application/middleware software designed to take advantage of these | |||
| 97 | capabilities. | 108 | capabilities. |
| 98 | 109 | ||
| 99 | 1.1 Tuning based on low level device / driver capabilities | 110 | 1.1 Tuning based on low level device / driver capabilities |
| 111 | ---------------------------------------------------------- | ||
| 100 | 112 | ||
| 101 | Sophisticated devices with large built-in caches, intelligent i/o scheduling | 113 | Sophisticated devices with large built-in caches, intelligent i/o scheduling |
| 102 | optimizations, high memory DMA support, etc may find some of the | 114 | optimizations, high memory DMA support, etc may find some of the |
| @@ -133,12 +145,12 @@ Some new queue property settings: | |||
| 133 | Sets two variables that limit the size of the request. | 145 | Sets two variables that limit the size of the request. |
| 134 | 146 | ||
| 135 | - The request queue's max_sectors, which is a soft size in | 147 | - The request queue's max_sectors, which is a soft size in |
| 136 | units of 512 byte sectors, and could be dynamically varied | 148 | units of 512 byte sectors, and could be dynamically varied |
| 137 | by the core kernel. | 149 | by the core kernel. |
| 138 | 150 | ||
| 139 | - The request queue's max_hw_sectors, which is a hard limit | 151 | - The request queue's max_hw_sectors, which is a hard limit |
| 140 | and reflects the maximum size request a driver can handle | 152 | and reflects the maximum size request a driver can handle |
| 141 | in units of 512 byte sectors. | 153 | in units of 512 byte sectors. |
| 142 | 154 | ||
| 143 | The default for both max_sectors and max_hw_sectors is | 155 | The default for both max_sectors and max_hw_sectors is |
| 144 | 255. The upper limit of max_sectors is 1024. | 156 | 255. The upper limit of max_sectors is 1024. |
| @@ -161,8 +173,8 @@ Some new queue property settings: | |||
| 161 | 173 | ||
| 162 | New queue flags: | 174 | New queue flags: |
| 163 | 175 | ||
| 164 | QUEUE_FLAG_CLUSTER (see 3.2.2) | 176 | - QUEUE_FLAG_CLUSTER (see 3.2.2) |
| 165 | QUEUE_FLAG_QUEUED (see 3.2.4) | 177 | - QUEUE_FLAG_QUEUED (see 3.2.4) |
| 166 | 178 | ||
| 167 | 179 | ||
| 168 | ii. High-mem i/o capabilities are now considered the default | 180 | ii. High-mem i/o capabilities are now considered the default |
| @@ -234,6 +246,7 @@ I/O scheduler wrappers are to be used instead of accessing the queue directly. | |||
| 234 | See section 4. The I/O scheduler for details. | 246 | See section 4. The I/O scheduler for details. |
| 235 | 247 | ||
| 236 | 1.2 Tuning Based on High level code capabilities | 248 | 1.2 Tuning Based on High level code capabilities |
| 249 | ------------------------------------------------ | ||
| 237 | 250 | ||
| 238 | i. Application capabilities for raw i/o | 251 | i. Application capabilities for raw i/o |
| 239 | 252 | ||
| @@ -258,9 +271,11 @@ would need an additional mechanism either via open flags or ioctls, or some | |||
| 258 | other upper level mechanism to communicate such settings to block. | 271 | other upper level mechanism to communicate such settings to block. |
| 259 | 272 | ||
| 260 | 1.2.1 Request Priority/Latency | 273 | 1.2.1 Request Priority/Latency |
| 274 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 261 | 275 | ||
| 262 | Todo/Under discussion: | 276 | Todo/Under discussion:: |
| 263 | Arjan's proposed request priority scheme allows higher levels some broad | 277 | |
| 278 | Arjan's proposed request priority scheme allows higher levels some broad | ||
| 264 | control (high/med/low) over the priority of an i/o request vs other pending | 279 | control (high/med/low) over the priority of an i/o request vs other pending |
| 265 | requests in the queue. For example it allows reads for bringing in an | 280 | requests in the queue. For example it allows reads for bringing in an |
| 266 | executable page on demand to be given a higher priority over pending write | 281 | executable page on demand to be given a higher priority over pending write |
| @@ -272,7 +287,9 @@ Arjan's proposed request priority scheme allows higher levels some broad | |||
| 272 | 287 | ||
| 273 | 288 | ||
| 274 | 1.3 Direct Access to Low level Device/Driver Capabilities (Bypass mode) | 289 | 1.3 Direct Access to Low level Device/Driver Capabilities (Bypass mode) |
| 275 | (e.g Diagnostics, Systems Management) | 290 | ----------------------------------------------------------------------- |
| 291 | |||
| 292 | (e.g Diagnostics, Systems Management) | ||
| 276 | 293 | ||
| 277 | There are situations where high-level code needs to have direct access to | 294 | There are situations where high-level code needs to have direct access to |
| 278 | the low level device capabilities or requires the ability to issue commands | 295 | the low level device capabilities or requires the ability to issue commands |
| @@ -308,28 +325,32 @@ involved. In the latter case, the driver would modify and manage the | |||
| 308 | request->buffer, request->sector and request->nr_sectors or | 325 | request->buffer, request->sector and request->nr_sectors or |
| 309 | request->current_nr_sectors fields itself rather than using the block layer | 326 | request->current_nr_sectors fields itself rather than using the block layer |
| 310 | end_request or end_that_request_first completion interfaces. | 327 | end_request or end_that_request_first completion interfaces. |
| 311 | (See 2.3 or Documentation/block/request.txt for a brief explanation of | 328 | (See 2.3 or Documentation/block/request.rst for a brief explanation of |
| 312 | the request structure fields) | 329 | the request structure fields) |
| 313 | 330 | ||
| 314 | [TBD: end_that_request_last should be usable even in this case; | 331 | :: |
| 315 | Perhaps an end_that_direct_request_first routine could be implemented to make | 332 | |
| 316 | handling direct requests easier for such drivers; Also for drivers that | 333 | [TBD: end_that_request_last should be usable even in this case; |
| 317 | expect bios, a helper function could be provided for setting up a bio | 334 | Perhaps an end_that_direct_request_first routine could be implemented to make |
| 318 | corresponding to a data buffer] | 335 | handling direct requests easier for such drivers; Also for drivers that |
| 319 | 336 | expect bios, a helper function could be provided for setting up a bio | |
| 320 | <JENS: I dont understand the above, why is end_that_request_first() not | 337 | corresponding to a data buffer] |
| 321 | usable? Or _last for that matter. I must be missing something> | 338 | |
| 322 | <SUP: What I meant here was that if the request doesn't have a bio, then | 339 | <JENS: I dont understand the above, why is end_that_request_first() not |
| 323 | end_that_request_first doesn't modify nr_sectors or current_nr_sectors, | 340 | usable? Or _last for that matter. I must be missing something> |
| 324 | and hence can't be used for advancing request state settings on the | 341 | |
| 325 | completion of partial transfers. The driver has to modify these fields | 342 | <SUP: What I meant here was that if the request doesn't have a bio, then |
| 326 | directly by hand. | 343 | end_that_request_first doesn't modify nr_sectors or current_nr_sectors, |
| 327 | This is because end_that_request_first only iterates over the bio list, | 344 | and hence can't be used for advancing request state settings on the |
| 328 | and always returns 0 if there are none associated with the request. | 345 | completion of partial transfers. The driver has to modify these fields |
| 329 | _last works OK in this case, and is not a problem, as I mentioned earlier | 346 | directly by hand. |
| 330 | > | 347 | This is because end_that_request_first only iterates over the bio list, |
| 348 | and always returns 0 if there are none associated with the request. | ||
| 349 | _last works OK in this case, and is not a problem, as I mentioned earlier | ||
| 350 | > | ||
| 331 | 351 | ||
| 332 | 1.3.1 Pre-built Commands | 352 | 1.3.1 Pre-built Commands |
| 353 | ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 333 | 354 | ||
| 334 | A request can be created with a pre-built custom command to be sent directly | 355 | A request can be created with a pre-built custom command to be sent directly |
| 335 | to the device. The cmd block in the request structure has room for filling | 356 | to the device. The cmd block in the request structure has room for filling |
| @@ -360,9 +381,11 @@ Aside: | |||
| 360 | the pre-builder hook can be invoked there. | 381 | the pre-builder hook can be invoked there. |
| 361 | 382 | ||
| 362 | 383 | ||
| 363 | 2. Flexible and generic but minimalist i/o structure/descriptor. | 384 | 2. Flexible and generic but minimalist i/o structure/descriptor |
| 385 | =============================================================== | ||
| 364 | 386 | ||
| 365 | 2.1 Reason for a new structure and requirements addressed | 387 | 2.1 Reason for a new structure and requirements addressed |
| 388 | --------------------------------------------------------- | ||
| 366 | 389 | ||
| 367 | Prior to 2.5, buffer heads were used as the unit of i/o at the generic block | 390 | Prior to 2.5, buffer heads were used as the unit of i/o at the generic block |
| 368 | layer, and the low level request structure was associated with a chain of | 391 | layer, and the low level request structure was associated with a chain of |
| @@ -378,26 +401,26 @@ which were generated for each such chunk. | |||
| 378 | The following were some of the goals and expectations considered in the | 401 | The following were some of the goals and expectations considered in the |
| 379 | redesign of the block i/o data structure in 2.5. | 402 | redesign of the block i/o data structure in 2.5. |
| 380 | 403 | ||
| 381 | i. Should be appropriate as a descriptor for both raw and buffered i/o - | 404 | 1. Should be appropriate as a descriptor for both raw and buffered i/o - |
| 382 | avoid cache related fields which are irrelevant in the direct/page i/o path, | 405 | avoid cache related fields which are irrelevant in the direct/page i/o path, |
| 383 | or filesystem block size alignment restrictions which may not be relevant | 406 | or filesystem block size alignment restrictions which may not be relevant |
| 384 | for raw i/o. | 407 | for raw i/o. |
| 385 | ii. Ability to represent high-memory buffers (which do not have a virtual | 408 | 2. Ability to represent high-memory buffers (which do not have a virtual |
| 386 | address mapping in kernel address space). | 409 | address mapping in kernel address space). |
| 387 | iii.Ability to represent large i/os w/o unnecessarily breaking them up (i.e | 410 | 3. Ability to represent large i/os w/o unnecessarily breaking them up (i.e |
| 388 | greater than PAGE_SIZE chunks in one shot) | 411 | greater than PAGE_SIZE chunks in one shot) |
| 389 | iv. At the same time, ability to retain independent identity of i/os from | 412 | 4. At the same time, ability to retain independent identity of i/os from |
| 390 | different sources or i/o units requiring individual completion (e.g. for | 413 | different sources or i/o units requiring individual completion (e.g. for |
| 391 | latency reasons) | 414 | latency reasons) |
| 392 | v. Ability to represent an i/o involving multiple physical memory segments | 415 | 5. Ability to represent an i/o involving multiple physical memory segments |
| 393 | (including non-page aligned page fragments, as specified via readv/writev) | 416 | (including non-page aligned page fragments, as specified via readv/writev) |
| 394 | without unnecessarily breaking it up, if the underlying device is capable of | 417 | without unnecessarily breaking it up, if the underlying device is capable of |
| 395 | handling it. | 418 | handling it. |
| 396 | vi. Preferably should be based on a memory descriptor structure that can be | 419 | 6. Preferably should be based on a memory descriptor structure that can be |
| 397 | passed around different types of subsystems or layers, maybe even | 420 | passed around different types of subsystems or layers, maybe even |
| 398 | networking, without duplication or extra copies of data/descriptor fields | 421 | networking, without duplication or extra copies of data/descriptor fields |
| 399 | themselves in the process | 422 | themselves in the process |
| 400 | vii.Ability to handle the possibility of splits/merges as the structure passes | 423 | 7. Ability to handle the possibility of splits/merges as the structure passes |
| 401 | through layered drivers (lvm, md, evms), with minimal overhead. | 424 | through layered drivers (lvm, md, evms), with minimal overhead. |
| 402 | 425 | ||
| 403 | The solution was to define a new structure (bio) for the block layer, | 426 | The solution was to define a new structure (bio) for the block layer, |
| @@ -408,6 +431,7 @@ bh structure for buffered i/o, and in the case of raw/direct i/o kiobufs are | |||
| 408 | mapped to bio structures. | 431 | mapped to bio structures. |
| 409 | 432 | ||
| 410 | 2.2 The bio struct | 433 | 2.2 The bio struct |
| 434 | ------------------ | ||
| 411 | 435 | ||
| 412 | The bio structure uses a vector representation pointing to an array of tuples | 436 | The bio structure uses a vector representation pointing to an array of tuples |
| 413 | of <page, offset, len> to describe the i/o buffer, and has various other | 437 | of <page, offset, len> to describe the i/o buffer, and has various other |
| @@ -417,16 +441,18 @@ performing the i/o. | |||
| 417 | Notice that this representation means that a bio has no virtual address | 441 | Notice that this representation means that a bio has no virtual address |
| 418 | mapping at all (unlike buffer heads). | 442 | mapping at all (unlike buffer heads). |
| 419 | 443 | ||
| 420 | struct bio_vec { | 444 | :: |
| 445 | |||
| 446 | struct bio_vec { | ||
| 421 | struct page *bv_page; | 447 | struct page *bv_page; |
| 422 | unsigned short bv_len; | 448 | unsigned short bv_len; |
| 423 | unsigned short bv_offset; | 449 | unsigned short bv_offset; |
| 424 | }; | 450 | }; |
| 425 | 451 | ||
| 426 | /* | 452 | /* |
| 427 | * main unit of I/O for the block layer and lower layers (ie drivers) | 453 | * main unit of I/O for the block layer and lower layers (ie drivers) |
| 428 | */ | 454 | */ |
| 429 | struct bio { | 455 | struct bio { |
| 430 | struct bio *bi_next; /* request queue link */ | 456 | struct bio *bi_next; /* request queue link */ |
| 431 | struct block_device *bi_bdev; /* target device */ | 457 | struct block_device *bi_bdev; /* target device */ |
| 432 | unsigned long bi_flags; /* status, command, etc */ | 458 | unsigned long bi_flags; /* status, command, etc */ |
| @@ -443,7 +469,7 @@ struct bio { | |||
| 443 | bio_end_io_t *bi_end_io; /* bi_end_io (bio) */ | 469 | bio_end_io_t *bi_end_io; /* bi_end_io (bio) */ |
| 444 | atomic_t bi_cnt; /* pin count: free when it hits zero */ | 470 | atomic_t bi_cnt; /* pin count: free when it hits zero */ |
| 445 | void *bi_private; | 471 | void *bi_private; |
| 446 | }; | 472 | }; |
| 447 | 473 | ||
| 448 | With this multipage bio design: | 474 | With this multipage bio design: |
| 449 | 475 | ||
| @@ -453,7 +479,7 @@ With this multipage bio design: | |||
| 453 | - Splitting of an i/o request across multiple devices (as in the case of | 479 | - Splitting of an i/o request across multiple devices (as in the case of |
| 454 | lvm or raid) is achieved by cloning the bio (where the clone points to | 480 | lvm or raid) is achieved by cloning the bio (where the clone points to |
| 455 | the same bi_io_vec array, but with the index and size accordingly modified) | 481 | the same bi_io_vec array, but with the index and size accordingly modified) |
| 456 | - A linked list of bios is used as before for unrelated merges (*) - this | 482 | - A linked list of bios is used as before for unrelated merges [#]_ - this |
| 457 | avoids reallocs and makes independent completions easier to handle. | 483 | avoids reallocs and makes independent completions easier to handle. |
| 458 | - Code that traverses the req list can find all the segments of a bio | 484 | - Code that traverses the req list can find all the segments of a bio |
| 459 | by using rq_for_each_segment. This handles the fact that a request | 485 | by using rq_for_each_segment. This handles the fact that a request |
| @@ -462,10 +488,12 @@ With this multipage bio design: | |||
| 462 | field to keep track of the next bio_vec entry to process. | 488 | field to keep track of the next bio_vec entry to process. |
| 463 | (e.g a 1MB bio_vec needs to be handled in max 128kB chunks for IDE) | 489 | (e.g a 1MB bio_vec needs to be handled in max 128kB chunks for IDE) |
| 464 | [TBD: Should preferably also have a bi_voffset and bi_vlen to avoid modifying | 490 | [TBD: Should preferably also have a bi_voffset and bi_vlen to avoid modifying |
| 465 | bi_offset an len fields] | 491 | bi_offset an len fields] |
| 492 | |||
| 493 | .. [#] | ||
| 466 | 494 | ||
| 467 | (*) unrelated merges -- a request ends up containing two or more bios that | 495 | unrelated merges -- a request ends up containing two or more bios that |
| 468 | didn't originate from the same place. | 496 | didn't originate from the same place. |
| 469 | 497 | ||
| 470 | bi_end_io() i/o callback gets called on i/o completion of the entire bio. | 498 | bi_end_io() i/o callback gets called on i/o completion of the entire bio. |
| 471 | 499 | ||
| @@ -483,10 +511,11 @@ which in turn means that only raw I/O uses it (direct i/o may not work | |||
| 483 | right now). The intent however is to enable clustering of pages etc to | 511 | right now). The intent however is to enable clustering of pages etc to |
| 484 | become possible. The pagebuf abstraction layer from SGI also uses multi-page | 512 | become possible. The pagebuf abstraction layer from SGI also uses multi-page |
| 485 | bios, but that is currently not included in the stock development kernels. | 513 | bios, but that is currently not included in the stock development kernels. |
| 486 | The same is true of Andrew Morton's work-in-progress multipage bio writeout | 514 | The same is true of Andrew Morton's work-in-progress multipage bio writeout |
| 487 | and readahead patches. | 515 | and readahead patches. |
| 488 | 516 | ||
| 489 | 2.3 Changes in the Request Structure | 517 | 2.3 Changes in the Request Structure |
| 518 | ------------------------------------ | ||
| 490 | 519 | ||
| 491 | The request structure is the structure that gets passed down to low level | 520 | The request structure is the structure that gets passed down to low level |
| 492 | drivers. The block layer make_request function builds up a request structure, | 521 | drivers. The block layer make_request function builds up a request structure, |
| @@ -499,11 +528,11 @@ request structure. | |||
| 499 | Only some relevant fields (mainly those which changed or may be referred | 528 | Only some relevant fields (mainly those which changed or may be referred |
| 500 | to in some of the discussion here) are listed below, not necessarily in | 529 | to in some of the discussion here) are listed below, not necessarily in |
| 501 | the order in which they occur in the structure (see include/linux/blkdev.h) | 530 | the order in which they occur in the structure (see include/linux/blkdev.h) |
| 502 | Refer to Documentation/block/request.txt for details about all the request | 531 | Refer to Documentation/block/request.rst for details about all the request |
| 503 | structure fields and a quick reference about the layers which are | 532 | structure fields and a quick reference about the layers which are |
| 504 | supposed to use or modify those fields. | 533 | supposed to use or modify those fields:: |
| 505 | 534 | ||
| 506 | struct request { | 535 | struct request { |
| 507 | struct list_head queuelist; /* Not meant to be directly accessed by | 536 | struct list_head queuelist; /* Not meant to be directly accessed by |
| 508 | the driver. | 537 | the driver. |
| 509 | Used by q->elv_next_request_fn | 538 | Used by q->elv_next_request_fn |
| @@ -548,11 +577,11 @@ struct request { | |||
| 548 | . | 577 | . |
| 549 | struct bio *bio, *biotail; /* bio list instead of bh */ | 578 | struct bio *bio, *biotail; /* bio list instead of bh */ |
| 550 | struct request_list *rl; | 579 | struct request_list *rl; |
| 551 | } | 580 | } |
| 552 | 581 | ||
| 553 | See the req_ops and req_flag_bits definitions for an explanation of the various | 582 | See the req_ops and req_flag_bits definitions for an explanation of the various |
| 554 | flags available. Some bits are used by the block layer or i/o scheduler. | 583 | flags available. Some bits are used by the block layer or i/o scheduler. |
| 555 | 584 | ||
| 556 | The behaviour of the various sector counts are almost the same as before, | 585 | The behaviour of the various sector counts are almost the same as before, |
| 557 | except that since we have multi-segment bios, current_nr_sectors refers | 586 | except that since we have multi-segment bios, current_nr_sectors refers |
| 558 | to the numbers of sectors in the current segment being processed which could | 587 | to the numbers of sectors in the current segment being processed which could |
| @@ -578,8 +607,10 @@ a driver needs to be careful about interoperation with the block layer helper | |||
| 578 | functions which the driver uses. (Section 1.3) | 607 | functions which the driver uses. (Section 1.3) |
| 579 | 608 | ||
| 580 | 3. Using bios | 609 | 3. Using bios |
| 610 | ============= | ||
| 581 | 611 | ||
| 582 | 3.1 Setup/Teardown | 612 | 3.1 Setup/Teardown |
| 613 | ------------------ | ||
| 583 | 614 | ||
| 584 | There are routines for managing the allocation, and reference counting, and | 615 | There are routines for managing the allocation, and reference counting, and |
| 585 | freeing of bios (bio_alloc, bio_get, bio_put). | 616 | freeing of bios (bio_alloc, bio_get, bio_put). |
| @@ -606,10 +637,13 @@ case of bio, these routines make use of the standard slab allocator. | |||
| 606 | The caller of bio_alloc is expected to taken certain steps to avoid | 637 | The caller of bio_alloc is expected to taken certain steps to avoid |
| 607 | deadlocks, e.g. avoid trying to allocate more memory from the pool while | 638 | deadlocks, e.g. avoid trying to allocate more memory from the pool while |
| 608 | already holding memory obtained from the pool. | 639 | already holding memory obtained from the pool. |
| 609 | [TBD: This is a potential issue, though a rare possibility | 640 | |
| 610 | in the bounce bio allocation that happens in the current code, since | 641 | :: |
| 611 | it ends up allocating a second bio from the same pool while | 642 | |
| 612 | holding the original bio ] | 643 | [TBD: This is a potential issue, though a rare possibility |
| 644 | in the bounce bio allocation that happens in the current code, since | ||
| 645 | it ends up allocating a second bio from the same pool while | ||
| 646 | holding the original bio ] | ||
| 613 | 647 | ||
| 614 | Memory allocated from the pool should be released back within a limited | 648 | Memory allocated from the pool should be released back within a limited |
| 615 | amount of time (in the case of bio, that would be after the i/o is completed). | 649 | amount of time (in the case of bio, that would be after the i/o is completed). |
| @@ -635,14 +669,18 @@ same bio_vec_list). This would typically be used for splitting i/o requests | |||
| 635 | in lvm or md. | 669 | in lvm or md. |
| 636 | 670 | ||
| 637 | 3.2 Generic bio helper Routines | 671 | 3.2 Generic bio helper Routines |
| 672 | ------------------------------- | ||
| 638 | 673 | ||
| 639 | 3.2.1 Traversing segments and completion units in a request | 674 | 3.2.1 Traversing segments and completion units in a request |
| 675 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 640 | 676 | ||
| 641 | The macro rq_for_each_segment() should be used for traversing the bios | 677 | The macro rq_for_each_segment() should be used for traversing the bios |
| 642 | in the request list (drivers should avoid directly trying to do it | 678 | in the request list (drivers should avoid directly trying to do it |
| 643 | themselves). Using these helpers should also make it easier to cope | 679 | themselves). Using these helpers should also make it easier to cope |
| 644 | with block changes in the future. | 680 | with block changes in the future. |
| 645 | 681 | ||
| 682 | :: | ||
| 683 | |||
| 646 | struct req_iterator iter; | 684 | struct req_iterator iter; |
| 647 | rq_for_each_segment(bio_vec, rq, iter) | 685 | rq_for_each_segment(bio_vec, rq, iter) |
| 648 | /* bio_vec is now current segment */ | 686 | /* bio_vec is now current segment */ |
| @@ -653,6 +691,7 @@ which don't make a distinction between segments and completion units would | |||
| 653 | need to be reorganized to support multi-segment bios. | 691 | need to be reorganized to support multi-segment bios. |
| 654 | 692 | ||
| 655 | 3.2.2 Setting up DMA scatterlists | 693 | 3.2.2 Setting up DMA scatterlists |
| 694 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 656 | 695 | ||
| 657 | The blk_rq_map_sg() helper routine would be used for setting up scatter | 696 | The blk_rq_map_sg() helper routine would be used for setting up scatter |
| 658 | gather lists from a request, so a driver need not do it on its own. | 697 | gather lists from a request, so a driver need not do it on its own. |
| @@ -683,6 +722,7 @@ of physical data segments in a request (i.e. the largest sized scatter list | |||
| 683 | a driver could handle) | 722 | a driver could handle) |
| 684 | 723 | ||
| 685 | 3.2.3 I/O completion | 724 | 3.2.3 I/O completion |
| 725 | ^^^^^^^^^^^^^^^^^^^^ | ||
| 686 | 726 | ||
| 687 | The existing generic block layer helper routines end_request, | 727 | The existing generic block layer helper routines end_request, |
| 688 | end_that_request_first and end_that_request_last can be used for i/o | 728 | end_that_request_first and end_that_request_last can be used for i/o |
| @@ -691,8 +731,10 @@ request can be kicked of) as before. With the introduction of multi-page | |||
| 691 | bio support, end_that_request_first requires an additional argument indicating | 731 | bio support, end_that_request_first requires an additional argument indicating |
| 692 | the number of sectors completed. | 732 | the number of sectors completed. |
| 693 | 733 | ||
| 694 | 3.2.4 Implications for drivers that do not interpret bios (don't handle | 734 | 3.2.4 Implications for drivers that do not interpret bios |
| 695 | multiple segments) | 735 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 736 | |||
| 737 | (don't handle multiple segments) | ||
| 696 | 738 | ||
| 697 | Drivers that do not interpret bios e.g those which do not handle multiple | 739 | Drivers that do not interpret bios e.g those which do not handle multiple |
| 698 | segments and do not support i/o into high memory addresses (require bounce | 740 | segments and do not support i/o into high memory addresses (require bounce |
| @@ -707,15 +749,18 @@ be used if only if the request has come down from block/bio path, not for | |||
| 707 | direct access requests which only specify rq->buffer without a valid rq->bio) | 749 | direct access requests which only specify rq->buffer without a valid rq->bio) |
| 708 | 750 | ||
| 709 | 3.3 I/O Submission | 751 | 3.3 I/O Submission |
| 752 | ------------------ | ||
| 710 | 753 | ||
| 711 | The routine submit_bio() is used to submit a single io. Higher level i/o | 754 | The routine submit_bio() is used to submit a single io. Higher level i/o |
| 712 | routines make use of this: | 755 | routines make use of this: |
| 713 | 756 | ||
| 714 | (a) Buffered i/o: | 757 | (a) Buffered i/o: |
| 758 | |||
| 715 | The routine submit_bh() invokes submit_bio() on a bio corresponding to the | 759 | The routine submit_bh() invokes submit_bio() on a bio corresponding to the |
| 716 | bh, allocating the bio if required. ll_rw_block() uses submit_bh() as before. | 760 | bh, allocating the bio if required. ll_rw_block() uses submit_bh() as before. |
| 717 | 761 | ||
| 718 | (b) Kiobuf i/o (for raw/direct i/o): | 762 | (b) Kiobuf i/o (for raw/direct i/o): |
| 763 | |||
| 719 | The ll_rw_kio() routine breaks up the kiobuf into page sized chunks and | 764 | The ll_rw_kio() routine breaks up the kiobuf into page sized chunks and |
| 720 | maps the array to one or more multi-page bios, issuing submit_bio() to | 765 | maps the array to one or more multi-page bios, issuing submit_bio() to |
| 721 | perform the i/o on each of these. | 766 | perform the i/o on each of these. |
| @@ -738,6 +783,7 @@ Todo/Observation: | |||
| 738 | 783 | ||
| 739 | 784 | ||
| 740 | (c) Page i/o: | 785 | (c) Page i/o: |
| 786 | |||
| 741 | Todo/Under discussion: | 787 | Todo/Under discussion: |
| 742 | 788 | ||
| 743 | Andrew Morton's multi-page bio patches attempt to issue multi-page | 789 | Andrew Morton's multi-page bio patches attempt to issue multi-page |
| @@ -753,6 +799,7 @@ Todo/Under discussion: | |||
| 753 | abstraction, but intended to be as lightweight as possible). | 799 | abstraction, but intended to be as lightweight as possible). |
| 754 | 800 | ||
| 755 | (d) Direct access i/o: | 801 | (d) Direct access i/o: |
| 802 | |||
| 756 | Direct access requests that do not contain bios would be submitted differently | 803 | Direct access requests that do not contain bios would be submitted differently |
| 757 | as discussed earlier in section 1.3. | 804 | as discussed earlier in section 1.3. |
| 758 | 805 | ||
| @@ -780,11 +827,13 @@ Aside: | |||
| 780 | 827 | ||
| 781 | 828 | ||
| 782 | 4. The I/O scheduler | 829 | 4. The I/O scheduler |
| 830 | ==================== | ||
| 831 | |||
| 783 | I/O scheduler, a.k.a. elevator, is implemented in two layers. Generic dispatch | 832 | I/O scheduler, a.k.a. elevator, is implemented in two layers. Generic dispatch |
| 784 | queue and specific I/O schedulers. Unless stated otherwise, elevator is used | 833 | queue and specific I/O schedulers. Unless stated otherwise, elevator is used |
| 785 | to refer to both parts and I/O scheduler to specific I/O schedulers. | 834 | to refer to both parts and I/O scheduler to specific I/O schedulers. |
| 786 | 835 | ||
| 787 | Block layer implements generic dispatch queue in block/*.c. | 836 | Block layer implements generic dispatch queue in `block/*.c`. |
| 788 | The generic dispatch queue is responsible for requeueing, handling non-fs | 837 | The generic dispatch queue is responsible for requeueing, handling non-fs |
| 789 | requests and all other subtleties. | 838 | requests and all other subtleties. |
| 790 | 839 | ||
| @@ -802,8 +851,11 @@ doesn't implement a function, the switch does nothing or some minimal house | |||
| 802 | keeping work. | 851 | keeping work. |
| 803 | 852 | ||
| 804 | 4.1. I/O scheduler API | 853 | 4.1. I/O scheduler API |
| 854 | ---------------------- | ||
| 805 | 855 | ||
| 806 | The functions an elevator may implement are: (* are mandatory) | 856 | The functions an elevator may implement are: (* are mandatory) |
| 857 | |||
| 858 | =============================== ================================================ | ||
| 807 | elevator_merge_fn called to query requests for merge with a bio | 859 | elevator_merge_fn called to query requests for merge with a bio |
| 808 | 860 | ||
| 809 | elevator_merge_req_fn called when two requests get merged. the one | 861 | elevator_merge_req_fn called when two requests get merged. the one |
| @@ -857,8 +909,11 @@ elevator_deactivate_req_fn Called when device driver decides to delay | |||
| 857 | elevator_init_fn* | 909 | elevator_init_fn* |
| 858 | elevator_exit_fn Allocate and free any elevator specific storage | 910 | elevator_exit_fn Allocate and free any elevator specific storage |
| 859 | for a queue. | 911 | for a queue. |
| 912 | =============================== ================================================ | ||
| 860 | 913 | ||
| 861 | 4.2 Request flows seen by I/O schedulers | 914 | 4.2 Request flows seen by I/O schedulers |
| 915 | ---------------------------------------- | ||
| 916 | |||
| 862 | All requests seen by I/O schedulers strictly follow one of the following three | 917 | All requests seen by I/O schedulers strictly follow one of the following three |
| 863 | flows. | 918 | flows. |
| 864 | 919 | ||
| @@ -872,9 +927,12 @@ flows. | |||
| 872 | -> put_req_fn | 927 | -> put_req_fn |
| 873 | 928 | ||
| 874 | 4.3 I/O scheduler implementation | 929 | 4.3 I/O scheduler implementation |
| 930 | -------------------------------- | ||
| 931 | |||
| 875 | The generic i/o scheduler algorithm attempts to sort/merge/batch requests for | 932 | The generic i/o scheduler algorithm attempts to sort/merge/batch requests for |
| 876 | optimal disk scan and request servicing performance (based on generic | 933 | optimal disk scan and request servicing performance (based on generic |
| 877 | principles and device capabilities), optimized for: | 934 | principles and device capabilities), optimized for: |
| 935 | |||
| 878 | i. improved throughput | 936 | i. improved throughput |
| 879 | ii. improved latency | 937 | ii. improved latency |
| 880 | iii. better utilization of h/w & CPU time | 938 | iii. better utilization of h/w & CPU time |
| @@ -928,15 +986,19 @@ Aside: | |||
| 928 | a big request from the broken up pieces coming by. | 986 | a big request from the broken up pieces coming by. |
| 929 | 987 | ||
| 930 | 4.4 I/O contexts | 988 | 4.4 I/O contexts |
| 989 | ---------------- | ||
| 990 | |||
| 931 | I/O contexts provide a dynamically allocated per process data area. They may | 991 | I/O contexts provide a dynamically allocated per process data area. They may |
| 932 | be used in I/O schedulers, and in the block layer (could be used for IO statis, | 992 | be used in I/O schedulers, and in the block layer (could be used for IO statis, |
| 933 | priorities for example). See *io_context in block/ll_rw_blk.c, and as-iosched.c | 993 | priorities for example). See `*io_context` in block/ll_rw_blk.c, and as-iosched.c |
| 934 | for an example of usage in an i/o scheduler. | 994 | for an example of usage in an i/o scheduler. |
| 935 | 995 | ||
| 936 | 996 | ||
| 937 | 5. Scalability related changes | 997 | 5. Scalability related changes |
| 998 | ============================== | ||
| 938 | 999 | ||
| 939 | 5.1 Granular Locking: io_request_lock replaced by a per-queue lock | 1000 | 5.1 Granular Locking: io_request_lock replaced by a per-queue lock |
| 1001 | ------------------------------------------------------------------ | ||
| 940 | 1002 | ||
| 941 | The global io_request_lock has been removed as of 2.5, to avoid | 1003 | The global io_request_lock has been removed as of 2.5, to avoid |
| 942 | the scalability bottleneck it was causing, and has been replaced by more | 1004 | the scalability bottleneck it was causing, and has been replaced by more |
| @@ -951,20 +1013,23 @@ request_fn execution which it means that lots of older drivers | |||
| 951 | should still be SMP safe. Drivers are free to drop the queue | 1013 | should still be SMP safe. Drivers are free to drop the queue |
| 952 | lock themselves, if required. Drivers that explicitly used the | 1014 | lock themselves, if required. Drivers that explicitly used the |
| 953 | io_request_lock for serialization need to be modified accordingly. | 1015 | io_request_lock for serialization need to be modified accordingly. |
| 954 | Usually it's as easy as adding a global lock: | 1016 | Usually it's as easy as adding a global lock:: |
| 955 | 1017 | ||
| 956 | static DEFINE_SPINLOCK(my_driver_lock); | 1018 | static DEFINE_SPINLOCK(my_driver_lock); |
| 957 | 1019 | ||
| 958 | and passing the address to that lock to blk_init_queue(). | 1020 | and passing the address to that lock to blk_init_queue(). |
| 959 | 1021 | ||
| 960 | 5.2 64 bit sector numbers (sector_t prepares for 64 bit support) | 1022 | 5.2 64 bit sector numbers (sector_t prepares for 64 bit support) |
| 1023 | ---------------------------------------------------------------- | ||
| 961 | 1024 | ||
| 962 | The sector number used in the bio structure has been changed to sector_t, | 1025 | The sector number used in the bio structure has been changed to sector_t, |
| 963 | which could be defined as 64 bit in preparation for 64 bit sector support. | 1026 | which could be defined as 64 bit in preparation for 64 bit sector support. |
| 964 | 1027 | ||
| 965 | 6. Other Changes/Implications | 1028 | 6. Other Changes/Implications |
| 1029 | ============================= | ||
| 966 | 1030 | ||
| 967 | 6.1 Partition re-mapping handled by the generic block layer | 1031 | 6.1 Partition re-mapping handled by the generic block layer |
| 1032 | ----------------------------------------------------------- | ||
| 968 | 1033 | ||
| 969 | In 2.5 some of the gendisk/partition related code has been reorganized. | 1034 | In 2.5 some of the gendisk/partition related code has been reorganized. |
| 970 | Now the generic block layer performs partition-remapping early and thus | 1035 | Now the generic block layer performs partition-remapping early and thus |
| @@ -979,6 +1044,7 @@ sent are offset from the beginning of the device. | |||
| 979 | 1044 | ||
| 980 | 1045 | ||
| 981 | 7. A Few Tips on Migration of older drivers | 1046 | 7. A Few Tips on Migration of older drivers |
| 1047 | =========================================== | ||
| 982 | 1048 | ||
| 983 | Old-style drivers that just use CURRENT and ignores clustered requests, | 1049 | Old-style drivers that just use CURRENT and ignores clustered requests, |
| 984 | may not need much change. The generic layer will automatically handle | 1050 | may not need much change. The generic layer will automatically handle |
| @@ -1012,12 +1078,12 @@ blk_init_queue time. | |||
| 1012 | 1078 | ||
| 1013 | Drivers no longer have to map a {partition, sector offset} into the | 1079 | Drivers no longer have to map a {partition, sector offset} into the |
| 1014 | correct absolute location anymore, this is done by the block layer, so | 1080 | correct absolute location anymore, this is done by the block layer, so |
| 1015 | where a driver received a request ala this before: | 1081 | where a driver received a request ala this before:: |
| 1016 | 1082 | ||
| 1017 | rq->rq_dev = mk_kdev(3, 5); /* /dev/hda5 */ | 1083 | rq->rq_dev = mk_kdev(3, 5); /* /dev/hda5 */ |
| 1018 | rq->sector = 0; /* first sector on hda5 */ | 1084 | rq->sector = 0; /* first sector on hda5 */ |
| 1019 | 1085 | ||
| 1020 | it will now see | 1086 | it will now see:: |
| 1021 | 1087 | ||
| 1022 | rq->rq_dev = mk_kdev(3, 0); /* /dev/hda */ | 1088 | rq->rq_dev = mk_kdev(3, 0); /* /dev/hda */ |
| 1023 | rq->sector = 123128; /* offset from start of disk */ | 1089 | rq->sector = 123128; /* offset from start of disk */ |
| @@ -1034,38 +1100,65 @@ a bio into the virtual address space. | |||
| 1034 | 1100 | ||
| 1035 | 1101 | ||
| 1036 | 8. Prior/Related/Impacted patches | 1102 | 8. Prior/Related/Impacted patches |
| 1103 | ================================= | ||
| 1037 | 1104 | ||
| 1038 | 8.1. Earlier kiobuf patches (sct/axboe/chait/hch/mkp) | 1105 | 8.1. Earlier kiobuf patches (sct/axboe/chait/hch/mkp) |
| 1106 | ----------------------------------------------------- | ||
| 1107 | |||
| 1039 | - orig kiobuf & raw i/o patches (now in 2.4 tree) | 1108 | - orig kiobuf & raw i/o patches (now in 2.4 tree) |
| 1040 | - direct kiobuf based i/o to devices (no intermediate bh's) | 1109 | - direct kiobuf based i/o to devices (no intermediate bh's) |
| 1041 | - page i/o using kiobuf | 1110 | - page i/o using kiobuf |
| 1042 | - kiobuf splitting for lvm (mkp) | 1111 | - kiobuf splitting for lvm (mkp) |
| 1043 | - elevator support for kiobuf request merging (axboe) | 1112 | - elevator support for kiobuf request merging (axboe) |
| 1113 | |||
| 1044 | 8.2. Zero-copy networking (Dave Miller) | 1114 | 8.2. Zero-copy networking (Dave Miller) |
| 1115 | --------------------------------------- | ||
| 1116 | |||
| 1045 | 8.3. SGI XFS - pagebuf patches - use of kiobufs | 1117 | 8.3. SGI XFS - pagebuf patches - use of kiobufs |
| 1118 | ----------------------------------------------- | ||
| 1046 | 8.4. Multi-page pioent patch for bio (Christoph Hellwig) | 1119 | 8.4. Multi-page pioent patch for bio (Christoph Hellwig) |
| 1120 | -------------------------------------------------------- | ||
| 1047 | 8.5. Direct i/o implementation (Andrea Arcangeli) since 2.4.10-pre11 | 1121 | 8.5. Direct i/o implementation (Andrea Arcangeli) since 2.4.10-pre11 |
| 1122 | -------------------------------------------------------------------- | ||
| 1048 | 8.6. Async i/o implementation patch (Ben LaHaise) | 1123 | 8.6. Async i/o implementation patch (Ben LaHaise) |
| 1124 | ------------------------------------------------- | ||
| 1049 | 8.7. EVMS layering design (IBM EVMS team) | 1125 | 8.7. EVMS layering design (IBM EVMS team) |
| 1050 | 8.8. Larger page cache size patch (Ben LaHaise) and | 1126 | ----------------------------------------- |
| 1051 | Large page size (Daniel Phillips) | 1127 | 8.8. Larger page cache size patch (Ben LaHaise) and Large page size (Daniel Phillips) |
| 1128 | ------------------------------------------------------------------------------------- | ||
| 1129 | |||
| 1052 | => larger contiguous physical memory buffers | 1130 | => larger contiguous physical memory buffers |
| 1131 | |||
| 1053 | 8.9. VM reservations patch (Ben LaHaise) | 1132 | 8.9. VM reservations patch (Ben LaHaise) |
| 1133 | ---------------------------------------- | ||
| 1054 | 8.10. Write clustering patches ? (Marcelo/Quintela/Riel ?) | 1134 | 8.10. Write clustering patches ? (Marcelo/Quintela/Riel ?) |
| 1135 | ---------------------------------------------------------- | ||
| 1055 | 8.11. Block device in page cache patch (Andrea Archangeli) - now in 2.4.10+ | 1136 | 8.11. Block device in page cache patch (Andrea Archangeli) - now in 2.4.10+ |
| 1056 | 8.12. Multiple block-size transfers for faster raw i/o (Shailabh Nagar, | 1137 | --------------------------------------------------------------------------- |
| 1057 | Badari) | 1138 | 8.12. Multiple block-size transfers for faster raw i/o (Shailabh Nagar, Badari) |
| 1139 | ------------------------------------------------------------------------------- | ||
| 1058 | 8.13 Priority based i/o scheduler - prepatches (Arjan van de Ven) | 1140 | 8.13 Priority based i/o scheduler - prepatches (Arjan van de Ven) |
| 1141 | ------------------------------------------------------------------ | ||
| 1059 | 8.14 IDE Taskfile i/o patch (Andre Hedrick) | 1142 | 8.14 IDE Taskfile i/o patch (Andre Hedrick) |
| 1143 | -------------------------------------------- | ||
| 1060 | 8.15 Multi-page writeout and readahead patches (Andrew Morton) | 1144 | 8.15 Multi-page writeout and readahead patches (Andrew Morton) |
| 1145 | --------------------------------------------------------------- | ||
| 1061 | 8.16 Direct i/o patches for 2.5 using kvec and bio (Badari Pulavarthy) | 1146 | 8.16 Direct i/o patches for 2.5 using kvec and bio (Badari Pulavarthy) |
| 1147 | ----------------------------------------------------------------------- | ||
| 1062 | 1148 | ||
| 1063 | 9. Other References: | 1149 | 9. Other References |
| 1150 | =================== | ||
| 1064 | 1151 | ||
| 1065 | 9.1 The Splice I/O Model - Larry McVoy (and subsequent discussions on lkml, | 1152 | 9.1 The Splice I/O Model |
| 1066 | and Linus' comments - Jan 2001) | 1153 | ------------------------ |
| 1067 | 9.2 Discussions about kiobuf and bh design on lkml between sct, linus, alan | 1154 | |
| 1068 | et al - Feb-March 2001 (many of the initial thoughts that led to bio were | 1155 | Larry McVoy (and subsequent discussions on lkml, and Linus' comments - Jan 2001 |
| 1069 | brought up in this discussion thread) | ||
| 1070 | 9.3 Discussions on mempool on lkml - Dec 2001. | ||
| 1071 | 1156 | ||
| 1157 | 9.2 Discussions about kiobuf and bh design | ||
| 1158 | ------------------------------------------ | ||
| 1159 | |||
| 1160 | On lkml between sct, linus, alan et al - Feb-March 2001 (many of the | ||
| 1161 | initial thoughts that led to bio were brought up in this discussion thread) | ||
| 1162 | |||
| 1163 | 9.3 Discussions on mempool on lkml - Dec 2001. | ||
| 1164 | ---------------------------------------------- | ||
diff --git a/Documentation/block/biovecs.txt b/Documentation/block/biovecs.rst index ce6eccaf5df7..86fa66c87172 100644 --- a/Documentation/block/biovecs.txt +++ b/Documentation/block/biovecs.rst | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | 1 | ====================================== | |
| 2 | Immutable biovecs and biovec iterators: | 2 | Immutable biovecs and biovec iterators |
| 3 | ======================================= | 3 | ====================================== |
| 4 | 4 | ||
| 5 | Kent Overstreet <kmo@daterainc.com> | 5 | Kent Overstreet <kmo@daterainc.com> |
| 6 | 6 | ||
| @@ -121,10 +121,12 @@ Other implications: | |||
| 121 | Usage of helpers: | 121 | Usage of helpers: |
| 122 | ================= | 122 | ================= |
| 123 | 123 | ||
| 124 | * The following helpers whose names have the suffix of "_all" can only be used | 124 | * The following helpers whose names have the suffix of `_all` can only be used |
| 125 | on non-BIO_CLONED bio. They are usually used by filesystem code. Drivers | 125 | on non-BIO_CLONED bio. They are usually used by filesystem code. Drivers |
| 126 | shouldn't use them because the bio may have been split before it reached the | 126 | shouldn't use them because the bio may have been split before it reached the |
| 127 | driver. | 127 | driver. |
| 128 | |||
| 129 | :: | ||
| 128 | 130 | ||
| 129 | bio_for_each_segment_all() | 131 | bio_for_each_segment_all() |
| 130 | bio_first_bvec_all() | 132 | bio_first_bvec_all() |
| @@ -132,13 +134,13 @@ driver. | |||
| 132 | bio_last_bvec_all() | 134 | bio_last_bvec_all() |
| 133 | 135 | ||
| 134 | * The following helpers iterate over single-page segment. The passed 'struct | 136 | * The following helpers iterate over single-page segment. The passed 'struct |
| 135 | bio_vec' will contain a single-page IO vector during the iteration | 137 | bio_vec' will contain a single-page IO vector during the iteration:: |
| 136 | 138 | ||
| 137 | bio_for_each_segment() | 139 | bio_for_each_segment() |
| 138 | bio_for_each_segment_all() | 140 | bio_for_each_segment_all() |
| 139 | 141 | ||
| 140 | * The following helpers iterate over multi-page bvec. The passed 'struct | 142 | * The following helpers iterate over multi-page bvec. The passed 'struct |
| 141 | bio_vec' will contain a multi-page IO vector during the iteration | 143 | bio_vec' will contain a multi-page IO vector during the iteration:: |
| 142 | 144 | ||
| 143 | bio_for_each_bvec() | 145 | bio_for_each_bvec() |
| 144 | rq_for_each_bvec() | 146 | rq_for_each_bvec() |
diff --git a/Documentation/block/capability.rst b/Documentation/block/capability.rst new file mode 100644 index 000000000000..2cf258d64bbe --- /dev/null +++ b/Documentation/block/capability.rst | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | =============================== | ||
| 2 | Generic Block Device Capability | ||
| 3 | =============================== | ||
| 4 | |||
| 5 | This file documents the sysfs file block/<disk>/capability | ||
| 6 | |||
| 7 | capability is a hex word indicating which capabilities a specific disk | ||
| 8 | supports. For more information on bits not listed here, see | ||
| 9 | include/linux/genhd.h | ||
| 10 | |||
| 11 | GENHD_FL_MEDIA_CHANGE_NOTIFY | ||
| 12 | ---------------------------- | ||
| 13 | |||
| 14 | Value: 4 | ||
| 15 | |||
| 16 | When this bit is set, the disk supports Asynchronous Notification | ||
| 17 | of media change events. These events will be broadcast to user | ||
| 18 | space via kernel uevent. | ||
diff --git a/Documentation/block/capability.txt b/Documentation/block/capability.txt deleted file mode 100644 index 2f1729424ef4..000000000000 --- a/Documentation/block/capability.txt +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | Generic Block Device Capability | ||
| 2 | =============================================================================== | ||
| 3 | This file documents the sysfs file block/<disk>/capability | ||
| 4 | |||
| 5 | capability is a hex word indicating which capabilities a specific disk | ||
| 6 | supports. For more information on bits not listed here, see | ||
| 7 | include/linux/genhd.h | ||
| 8 | |||
| 9 | Capability Value | ||
| 10 | ------------------------------------------------------------------------------- | ||
| 11 | GENHD_FL_MEDIA_CHANGE_NOTIFY 4 | ||
| 12 | When this bit is set, the disk supports Asynchronous Notification | ||
| 13 | of media change events. These events will be broadcast to user | ||
| 14 | space via kernel uevent. | ||
| 15 | |||
diff --git a/Documentation/block/cmdline-partition.txt b/Documentation/block/cmdline-partition.rst index 760a3f7c3ed4..530bedff548a 100644 --- a/Documentation/block/cmdline-partition.txt +++ b/Documentation/block/cmdline-partition.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ============================================== | ||
| 1 | Embedded device command line partition parsing | 2 | Embedded device command line partition parsing |
| 2 | ===================================================================== | 3 | ============================================== |
| 3 | 4 | ||
| 4 | The "blkdevparts" command line option adds support for reading the | 5 | The "blkdevparts" command line option adds support for reading the |
| 5 | block device partition table from the kernel command line. | 6 | block device partition table from the kernel command line. |
| @@ -22,12 +23,15 @@ blkdevparts=<blkdev-def>[;<blkdev-def>] | |||
| 22 | <size> | 23 | <size> |
| 23 | partition size, in bytes, such as: 512, 1m, 1G. | 24 | partition size, in bytes, such as: 512, 1m, 1G. |
| 24 | size may contain an optional suffix of (upper or lower case): | 25 | size may contain an optional suffix of (upper or lower case): |
| 26 | |||
| 25 | K, M, G, T, P, E. | 27 | K, M, G, T, P, E. |
| 28 | |||
| 26 | "-" is used to denote all remaining space. | 29 | "-" is used to denote all remaining space. |
| 27 | 30 | ||
| 28 | <offset> | 31 | <offset> |
| 29 | partition start address, in bytes. | 32 | partition start address, in bytes. |
| 30 | offset may contain an optional suffix of (upper or lower case): | 33 | offset may contain an optional suffix of (upper or lower case): |
| 34 | |||
| 31 | K, M, G, T, P, E. | 35 | K, M, G, T, P, E. |
| 32 | 36 | ||
| 33 | (part-name) | 37 | (part-name) |
| @@ -36,11 +40,14 @@ blkdevparts=<blkdev-def>[;<blkdev-def>] | |||
| 36 | User space application can access partition by partition name. | 40 | User space application can access partition by partition name. |
| 37 | 41 | ||
| 38 | Example: | 42 | Example: |
| 43 | |||
| 39 | eMMC disk names are "mmcblk0" and "mmcblk0boot0". | 44 | eMMC disk names are "mmcblk0" and "mmcblk0boot0". |
| 40 | 45 | ||
| 41 | bootargs: | 46 | bootargs:: |
| 47 | |||
| 42 | 'blkdevparts=mmcblk0:1G(data0),1G(data1),-;mmcblk0boot0:1m(boot),-(kernel)' | 48 | 'blkdevparts=mmcblk0:1G(data0),1G(data1),-;mmcblk0boot0:1m(boot),-(kernel)' |
| 43 | 49 | ||
| 44 | dmesg: | 50 | dmesg:: |
| 51 | |||
| 45 | mmcblk0: p1(data0) p2(data1) p3() | 52 | mmcblk0: p1(data0) p2(data1) p3() |
| 46 | mmcblk0boot0: p1(boot) p2(kernel) | 53 | mmcblk0boot0: p1(boot) p2(kernel) |
diff --git a/Documentation/block/data-integrity.txt b/Documentation/block/data-integrity.rst index 934c44ea0c57..4f2452a95c43 100644 --- a/Documentation/block/data-integrity.txt +++ b/Documentation/block/data-integrity.rst | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | ---------------------------------------------------------------------- | 1 | ============== |
| 2 | 1. INTRODUCTION | 2 | Data Integrity |
| 3 | ============== | ||
| 4 | |||
| 5 | 1. Introduction | ||
| 6 | =============== | ||
| 3 | 7 | ||
| 4 | Modern filesystems feature checksumming of data and metadata to | 8 | Modern filesystems feature checksumming of data and metadata to |
| 5 | protect against data corruption. However, the detection of the | 9 | protect against data corruption. However, the detection of the |
| @@ -28,8 +32,8 @@ integrity of the I/O and reject it if corruption is detected. This | |||
| 28 | allows not only corruption prevention but also isolation of the point | 32 | allows not only corruption prevention but also isolation of the point |
| 29 | of failure. | 33 | of failure. |
| 30 | 34 | ||
| 31 | ---------------------------------------------------------------------- | 35 | 2. The Data Integrity Extensions |
| 32 | 2. THE DATA INTEGRITY EXTENSIONS | 36 | ================================ |
| 33 | 37 | ||
| 34 | As written, the protocol extensions only protect the path between | 38 | As written, the protocol extensions only protect the path between |
| 35 | controller and storage device. However, many controllers actually | 39 | controller and storage device. However, many controllers actually |
| @@ -75,8 +79,8 @@ Extensions. As these extensions are outside the scope of the protocol | |||
| 75 | bodies (T10, T13), Oracle and its partners are trying to standardize | 79 | bodies (T10, T13), Oracle and its partners are trying to standardize |
| 76 | them within the Storage Networking Industry Association. | 80 | them within the Storage Networking Industry Association. |
| 77 | 81 | ||
| 78 | ---------------------------------------------------------------------- | 82 | 3. Kernel Changes |
| 79 | 3. KERNEL CHANGES | 83 | ================= |
| 80 | 84 | ||
| 81 | The data integrity framework in Linux enables protection information | 85 | The data integrity framework in Linux enables protection information |
| 82 | to be pinned to I/Os and sent to/received from controllers that | 86 | to be pinned to I/Os and sent to/received from controllers that |
| @@ -123,10 +127,11 @@ access to manipulate the tags from user space. A passthrough | |||
| 123 | interface for this is being worked on. | 127 | interface for this is being worked on. |
| 124 | 128 | ||
| 125 | 129 | ||
| 126 | ---------------------------------------------------------------------- | 130 | 4. Block Layer Implementation Details |
| 127 | 4. BLOCK LAYER IMPLEMENTATION DETAILS | 131 | ===================================== |
| 128 | 132 | ||
| 129 | 4.1 BIO | 133 | 4.1 Bio |
| 134 | ------- | ||
| 130 | 135 | ||
| 131 | The data integrity patches add a new field to struct bio when | 136 | The data integrity patches add a new field to struct bio when |
| 132 | CONFIG_BLK_DEV_INTEGRITY is enabled. bio_integrity(bio) returns a | 137 | CONFIG_BLK_DEV_INTEGRITY is enabled. bio_integrity(bio) returns a |
| @@ -145,7 +150,8 @@ attached using bio_integrity_add_page(). | |||
| 145 | bio_free() will automatically free the bip. | 150 | bio_free() will automatically free the bip. |
| 146 | 151 | ||
| 147 | 152 | ||
| 148 | 4.2 BLOCK DEVICE | 153 | 4.2 Block Device |
| 154 | ---------------- | ||
| 149 | 155 | ||
| 150 | Because the format of the protection data is tied to the physical | 156 | Because the format of the protection data is tied to the physical |
| 151 | disk, each block device has been extended with a block integrity | 157 | disk, each block device has been extended with a block integrity |
| @@ -163,10 +169,11 @@ and MD linear, RAID0 and RAID1 are currently supported. RAID4/5/6 | |||
| 163 | will require extra work due to the application tag. | 169 | will require extra work due to the application tag. |
| 164 | 170 | ||
| 165 | 171 | ||
| 166 | ---------------------------------------------------------------------- | 172 | 5.0 Block Layer Integrity API |
| 167 | 5.0 BLOCK LAYER INTEGRITY API | 173 | ============================= |
| 168 | 174 | ||
| 169 | 5.1 NORMAL FILESYSTEM | 175 | 5.1 Normal Filesystem |
| 176 | --------------------- | ||
| 170 | 177 | ||
| 171 | The normal filesystem is unaware that the underlying block device | 178 | The normal filesystem is unaware that the underlying block device |
| 172 | is capable of sending/receiving integrity metadata. The IMD will | 179 | is capable of sending/receiving integrity metadata. The IMD will |
| @@ -174,25 +181,26 @@ will require extra work due to the application tag. | |||
| 174 | in case of a WRITE. A READ request will cause the I/O integrity | 181 | in case of a WRITE. A READ request will cause the I/O integrity |
| 175 | to be verified upon completion. | 182 | to be verified upon completion. |
| 176 | 183 | ||
| 177 | IMD generation and verification can be toggled using the | 184 | IMD generation and verification can be toggled using the:: |
| 178 | 185 | ||
| 179 | /sys/block/<bdev>/integrity/write_generate | 186 | /sys/block/<bdev>/integrity/write_generate |
| 180 | 187 | ||
| 181 | and | 188 | and:: |
| 182 | 189 | ||
| 183 | /sys/block/<bdev>/integrity/read_verify | 190 | /sys/block/<bdev>/integrity/read_verify |
| 184 | 191 | ||
| 185 | flags. | 192 | flags. |
| 186 | 193 | ||
| 187 | 194 | ||
| 188 | 5.2 INTEGRITY-AWARE FILESYSTEM | 195 | 5.2 Integrity-Aware Filesystem |
| 196 | ------------------------------ | ||
| 189 | 197 | ||
| 190 | A filesystem that is integrity-aware can prepare I/Os with IMD | 198 | A filesystem that is integrity-aware can prepare I/Os with IMD |
| 191 | attached. It can also use the application tag space if this is | 199 | attached. It can also use the application tag space if this is |
| 192 | supported by the block device. | 200 | supported by the block device. |
| 193 | 201 | ||
| 194 | 202 | ||
| 195 | bool bio_integrity_prep(bio); | 203 | `bool bio_integrity_prep(bio);` |
| 196 | 204 | ||
| 197 | To generate IMD for WRITE and to set up buffers for READ, the | 205 | To generate IMD for WRITE and to set up buffers for READ, the |
| 198 | filesystem must call bio_integrity_prep(bio). | 206 | filesystem must call bio_integrity_prep(bio). |
| @@ -204,14 +212,15 @@ will require extra work due to the application tag. | |||
| 204 | Complete bio with error if prepare failed for some reson. | 212 | Complete bio with error if prepare failed for some reson. |
| 205 | 213 | ||
| 206 | 214 | ||
| 207 | 5.3 PASSING EXISTING INTEGRITY METADATA | 215 | 5.3 Passing Existing Integrity Metadata |
| 216 | --------------------------------------- | ||
| 208 | 217 | ||
| 209 | Filesystems that either generate their own integrity metadata or | 218 | Filesystems that either generate their own integrity metadata or |
| 210 | are capable of transferring IMD from user space can use the | 219 | are capable of transferring IMD from user space can use the |
| 211 | following calls: | 220 | following calls: |
| 212 | 221 | ||
| 213 | 222 | ||
| 214 | struct bip * bio_integrity_alloc(bio, gfp_mask, nr_pages); | 223 | `struct bip * bio_integrity_alloc(bio, gfp_mask, nr_pages);` |
| 215 | 224 | ||
| 216 | Allocates the bio integrity payload and hangs it off of the bio. | 225 | Allocates the bio integrity payload and hangs it off of the bio. |
| 217 | nr_pages indicate how many pages of protection data need to be | 226 | nr_pages indicate how many pages of protection data need to be |
| @@ -220,7 +229,7 @@ will require extra work due to the application tag. | |||
| 220 | The integrity payload will be freed at bio_free() time. | 229 | The integrity payload will be freed at bio_free() time. |
| 221 | 230 | ||
| 222 | 231 | ||
| 223 | int bio_integrity_add_page(bio, page, len, offset); | 232 | `int bio_integrity_add_page(bio, page, len, offset);` |
| 224 | 233 | ||
| 225 | Attaches a page containing integrity metadata to an existing | 234 | Attaches a page containing integrity metadata to an existing |
| 226 | bio. The bio must have an existing bip, | 235 | bio. The bio must have an existing bip, |
| @@ -241,21 +250,21 @@ will require extra work due to the application tag. | |||
| 241 | integrity upon completion. | 250 | integrity upon completion. |
| 242 | 251 | ||
| 243 | 252 | ||
| 244 | 5.4 REGISTERING A BLOCK DEVICE AS CAPABLE OF EXCHANGING INTEGRITY | 253 | 5.4 Registering A Block Device As Capable Of Exchanging Integrity Metadata |
| 245 | METADATA | 254 | -------------------------------------------------------------------------- |
| 246 | 255 | ||
| 247 | To enable integrity exchange on a block device the gendisk must be | 256 | To enable integrity exchange on a block device the gendisk must be |
| 248 | registered as capable: | 257 | registered as capable: |
| 249 | 258 | ||
| 250 | int blk_integrity_register(gendisk, blk_integrity); | 259 | `int blk_integrity_register(gendisk, blk_integrity);` |
| 251 | 260 | ||
| 252 | The blk_integrity struct is a template and should contain the | 261 | The blk_integrity struct is a template and should contain the |
| 253 | following: | 262 | following:: |
| 254 | 263 | ||
| 255 | static struct blk_integrity my_profile = { | 264 | static struct blk_integrity my_profile = { |
| 256 | .name = "STANDARDSBODY-TYPE-VARIANT-CSUM", | 265 | .name = "STANDARDSBODY-TYPE-VARIANT-CSUM", |
| 257 | .generate_fn = my_generate_fn, | 266 | .generate_fn = my_generate_fn, |
| 258 | .verify_fn = my_verify_fn, | 267 | .verify_fn = my_verify_fn, |
| 259 | .tuple_size = sizeof(struct my_tuple_size), | 268 | .tuple_size = sizeof(struct my_tuple_size), |
| 260 | .tag_size = <tag bytes per hw sector>, | 269 | .tag_size = <tag bytes per hw sector>, |
| 261 | }; | 270 | }; |
| @@ -278,4 +287,5 @@ will require extra work due to the application tag. | |||
| 278 | 0 depending on the value of the Control Mode Page ATO bit. | 287 | 0 depending on the value of the Control Mode Page ATO bit. |
| 279 | 288 | ||
| 280 | ---------------------------------------------------------------------- | 289 | ---------------------------------------------------------------------- |
| 290 | |||
| 281 | 2007-12-24 Martin K. Petersen <martin.petersen@oracle.com> | 291 | 2007-12-24 Martin K. Petersen <martin.petersen@oracle.com> |
diff --git a/Documentation/block/deadline-iosched.txt b/Documentation/block/deadline-iosched.rst index 2d82c80322cb..9f5c5a4c370e 100644 --- a/Documentation/block/deadline-iosched.txt +++ b/Documentation/block/deadline-iosched.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ============================== | ||
| 1 | Deadline IO scheduler tunables | 2 | Deadline IO scheduler tunables |
| 2 | ============================== | 3 | ============================== |
| 3 | 4 | ||
| @@ -7,15 +8,13 @@ of interest to power users. | |||
| 7 | 8 | ||
| 8 | Selecting IO schedulers | 9 | Selecting IO schedulers |
| 9 | ----------------------- | 10 | ----------------------- |
| 10 | Refer to Documentation/block/switching-sched.txt for information on | 11 | Refer to Documentation/block/switching-sched.rst for information on |
| 11 | selecting an io scheduler on a per-device basis. | 12 | selecting an io scheduler on a per-device basis. |
| 12 | 13 | ||
| 13 | 14 | ------------------------------------------------------------------------------ | |
| 14 | ******************************************************************************** | ||
| 15 | |||
| 16 | 15 | ||
| 17 | read_expire (in ms) | 16 | read_expire (in ms) |
| 18 | ----------- | 17 | ----------------------- |
| 19 | 18 | ||
| 20 | The goal of the deadline io scheduler is to attempt to guarantee a start | 19 | The goal of the deadline io scheduler is to attempt to guarantee a start |
| 21 | service time for a request. As we focus mainly on read latencies, this is | 20 | service time for a request. As we focus mainly on read latencies, this is |
| @@ -25,15 +24,15 @@ milliseconds. | |||
| 25 | 24 | ||
| 26 | 25 | ||
| 27 | write_expire (in ms) | 26 | write_expire (in ms) |
| 28 | ----------- | 27 | ----------------------- |
| 29 | 28 | ||
| 30 | Similar to read_expire mentioned above, but for writes. | 29 | Similar to read_expire mentioned above, but for writes. |
| 31 | 30 | ||
| 32 | 31 | ||
| 33 | fifo_batch (number of requests) | 32 | fifo_batch (number of requests) |
| 34 | ---------- | 33 | ------------------------------------ |
| 35 | 34 | ||
| 36 | Requests are grouped into ``batches'' of a particular data direction (read or | 35 | Requests are grouped into ``batches`` of a particular data direction (read or |
| 37 | write) which are serviced in increasing sector order. To limit extra seeking, | 36 | write) which are serviced in increasing sector order. To limit extra seeking, |
| 38 | deadline expiries are only checked between batches. fifo_batch controls the | 37 | deadline expiries are only checked between batches. fifo_batch controls the |
| 39 | maximum number of requests per batch. | 38 | maximum number of requests per batch. |
| @@ -45,7 +44,7 @@ generally improves throughput, at the cost of latency variation. | |||
| 45 | 44 | ||
| 46 | 45 | ||
| 47 | writes_starved (number of dispatches) | 46 | writes_starved (number of dispatches) |
| 48 | -------------- | 47 | -------------------------------------- |
| 49 | 48 | ||
| 50 | When we have to move requests from the io scheduler queue to the block | 49 | When we have to move requests from the io scheduler queue to the block |
| 51 | device dispatch queue, we always give a preference to reads. However, we | 50 | device dispatch queue, we always give a preference to reads. However, we |
| @@ -56,7 +55,7 @@ same criteria as reads. | |||
| 56 | 55 | ||
| 57 | 56 | ||
| 58 | front_merges (bool) | 57 | front_merges (bool) |
| 59 | ------------ | 58 | ---------------------- |
| 60 | 59 | ||
| 61 | Sometimes it happens that a request enters the io scheduler that is contiguous | 60 | Sometimes it happens that a request enters the io scheduler that is contiguous |
| 62 | with a request that is already on the queue. Either it fits in the back of that | 61 | with a request that is already on the queue. Either it fits in the back of that |
| @@ -71,5 +70,3 @@ rbtree front sector lookup when the io scheduler merge function is called. | |||
| 71 | 70 | ||
| 72 | 71 | ||
| 73 | Nov 11 2002, Jens Axboe <jens.axboe@oracle.com> | 72 | Nov 11 2002, Jens Axboe <jens.axboe@oracle.com> |
| 74 | |||
| 75 | |||
diff --git a/Documentation/block/index.rst b/Documentation/block/index.rst new file mode 100644 index 000000000000..3fa7a52fafa4 --- /dev/null +++ b/Documentation/block/index.rst | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ===== | ||
| 4 | Block | ||
| 5 | ===== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | bfq-iosched | ||
| 11 | biodoc | ||
| 12 | biovecs | ||
| 13 | capability | ||
| 14 | cmdline-partition | ||
| 15 | data-integrity | ||
| 16 | deadline-iosched | ||
| 17 | ioprio | ||
| 18 | kyber-iosched | ||
| 19 | null_blk | ||
| 20 | pr | ||
| 21 | queue-sysfs | ||
| 22 | request | ||
| 23 | stat | ||
| 24 | switching-sched | ||
| 25 | writeback_cache_control | ||
diff --git a/Documentation/block/ioprio.txt b/Documentation/block/ioprio.rst index 8ed8c59380b4..f72b0de65af7 100644 --- a/Documentation/block/ioprio.txt +++ b/Documentation/block/ioprio.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | =================== | ||
| 1 | Block io priorities | 2 | Block io priorities |
| 2 | =================== | 3 | =================== |
| 3 | 4 | ||
| @@ -40,81 +41,81 @@ class data, since it doesn't really apply here. | |||
| 40 | Tools | 41 | Tools |
| 41 | ----- | 42 | ----- |
| 42 | 43 | ||
| 43 | See below for a sample ionice tool. Usage: | 44 | See below for a sample ionice tool. Usage:: |
| 44 | 45 | ||
| 45 | # ionice -c<class> -n<level> -p<pid> | 46 | # ionice -c<class> -n<level> -p<pid> |
| 46 | 47 | ||
| 47 | If pid isn't given, the current process is assumed. IO priority settings | 48 | If pid isn't given, the current process is assumed. IO priority settings |
| 48 | are inherited on fork, so you can use ionice to start the process at a given | 49 | are inherited on fork, so you can use ionice to start the process at a given |
| 49 | level: | 50 | level:: |
| 50 | 51 | ||
| 51 | # ionice -c2 -n0 /bin/ls | 52 | # ionice -c2 -n0 /bin/ls |
| 52 | 53 | ||
| 53 | will run ls at the best-effort scheduling class at the highest priority. | 54 | will run ls at the best-effort scheduling class at the highest priority. |
| 54 | For a running process, you can give the pid instead: | 55 | For a running process, you can give the pid instead:: |
| 55 | 56 | ||
| 56 | # ionice -c1 -n2 -p100 | 57 | # ionice -c1 -n2 -p100 |
| 57 | 58 | ||
| 58 | will change pid 100 to run at the realtime scheduling class, at priority 2. | 59 | will change pid 100 to run at the realtime scheduling class, at priority 2. |
| 59 | 60 | ||
| 60 | ---> snip ionice.c tool <--- | 61 | ionice.c tool:: |
| 61 | 62 | ||
| 62 | #include <stdio.h> | 63 | #include <stdio.h> |
| 63 | #include <stdlib.h> | 64 | #include <stdlib.h> |
| 64 | #include <errno.h> | 65 | #include <errno.h> |
| 65 | #include <getopt.h> | 66 | #include <getopt.h> |
| 66 | #include <unistd.h> | 67 | #include <unistd.h> |
| 67 | #include <sys/ptrace.h> | 68 | #include <sys/ptrace.h> |
| 68 | #include <asm/unistd.h> | 69 | #include <asm/unistd.h> |
| 69 | 70 | ||
| 70 | extern int sys_ioprio_set(int, int, int); | 71 | extern int sys_ioprio_set(int, int, int); |
| 71 | extern int sys_ioprio_get(int, int); | 72 | extern int sys_ioprio_get(int, int); |
| 72 | 73 | ||
| 73 | #if defined(__i386__) | 74 | #if defined(__i386__) |
| 74 | #define __NR_ioprio_set 289 | 75 | #define __NR_ioprio_set 289 |
| 75 | #define __NR_ioprio_get 290 | 76 | #define __NR_ioprio_get 290 |
| 76 | #elif defined(__ppc__) | 77 | #elif defined(__ppc__) |
| 77 | #define __NR_ioprio_set 273 | 78 | #define __NR_ioprio_set 273 |
| 78 | #define __NR_ioprio_get 274 | 79 | #define __NR_ioprio_get 274 |
| 79 | #elif defined(__x86_64__) | 80 | #elif defined(__x86_64__) |
| 80 | #define __NR_ioprio_set 251 | 81 | #define __NR_ioprio_set 251 |
| 81 | #define __NR_ioprio_get 252 | 82 | #define __NR_ioprio_get 252 |
| 82 | #elif defined(__ia64__) | 83 | #elif defined(__ia64__) |
| 83 | #define __NR_ioprio_set 1274 | 84 | #define __NR_ioprio_set 1274 |
| 84 | #define __NR_ioprio_get 1275 | 85 | #define __NR_ioprio_get 1275 |
| 85 | #else | 86 | #else |
| 86 | #error "Unsupported arch" | 87 | #error "Unsupported arch" |
| 87 | #endif | 88 | #endif |
| 88 | 89 | ||
| 89 | static inline int ioprio_set(int which, int who, int ioprio) | 90 | static inline int ioprio_set(int which, int who, int ioprio) |
| 90 | { | 91 | { |
| 91 | return syscall(__NR_ioprio_set, which, who, ioprio); | 92 | return syscall(__NR_ioprio_set, which, who, ioprio); |
| 92 | } | 93 | } |
| 93 | 94 | ||
| 94 | static inline int ioprio_get(int which, int who) | 95 | static inline int ioprio_get(int which, int who) |
| 95 | { | 96 | { |
| 96 | return syscall(__NR_ioprio_get, which, who); | 97 | return syscall(__NR_ioprio_get, which, who); |
| 97 | } | 98 | } |
| 98 | 99 | ||
| 99 | enum { | 100 | enum { |
| 100 | IOPRIO_CLASS_NONE, | 101 | IOPRIO_CLASS_NONE, |
| 101 | IOPRIO_CLASS_RT, | 102 | IOPRIO_CLASS_RT, |
| 102 | IOPRIO_CLASS_BE, | 103 | IOPRIO_CLASS_BE, |
| 103 | IOPRIO_CLASS_IDLE, | 104 | IOPRIO_CLASS_IDLE, |
| 104 | }; | 105 | }; |
| 105 | 106 | ||
| 106 | enum { | 107 | enum { |
| 107 | IOPRIO_WHO_PROCESS = 1, | 108 | IOPRIO_WHO_PROCESS = 1, |
| 108 | IOPRIO_WHO_PGRP, | 109 | IOPRIO_WHO_PGRP, |
| 109 | IOPRIO_WHO_USER, | 110 | IOPRIO_WHO_USER, |
| 110 | }; | 111 | }; |
| 111 | 112 | ||
| 112 | #define IOPRIO_CLASS_SHIFT 13 | 113 | #define IOPRIO_CLASS_SHIFT 13 |
| 113 | 114 | ||
| 114 | const char *to_prio[] = { "none", "realtime", "best-effort", "idle", }; | 115 | const char *to_prio[] = { "none", "realtime", "best-effort", "idle", }; |
| 115 | 116 | ||
| 116 | int main(int argc, char *argv[]) | 117 | int main(int argc, char *argv[]) |
| 117 | { | 118 | { |
| 118 | int ioprio = 4, set = 0, ioprio_class = IOPRIO_CLASS_BE; | 119 | int ioprio = 4, set = 0, ioprio_class = IOPRIO_CLASS_BE; |
| 119 | int c, pid = 0; | 120 | int c, pid = 0; |
| 120 | 121 | ||
| @@ -175,9 +176,7 @@ int main(int argc, char *argv[]) | |||
| 175 | } | 176 | } |
| 176 | 177 | ||
| 177 | return 0; | 178 | return 0; |
| 178 | } | 179 | } |
| 179 | |||
| 180 | ---> snip ionice.c tool <--- | ||
| 181 | 180 | ||
| 182 | 181 | ||
| 183 | March 11 2005, Jens Axboe <jens.axboe@oracle.com> | 182 | March 11 2005, Jens Axboe <jens.axboe@oracle.com> |
diff --git a/Documentation/block/kyber-iosched.txt b/Documentation/block/kyber-iosched.rst index e94feacd7edc..3e164dd0617c 100644 --- a/Documentation/block/kyber-iosched.txt +++ b/Documentation/block/kyber-iosched.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ============================ | ||
| 1 | Kyber I/O scheduler tunables | 2 | Kyber I/O scheduler tunables |
| 2 | =========================== | 3 | ============================ |
| 3 | 4 | ||
| 4 | The only two tunables for the Kyber scheduler are the target latencies for | 5 | The only two tunables for the Kyber scheduler are the target latencies for |
| 5 | reads and synchronous writes. Kyber will throttle requests in order to meet | 6 | reads and synchronous writes. Kyber will throttle requests in order to meet |
diff --git a/Documentation/block/null_blk.txt b/Documentation/block/null_blk.rst index 41f0a3d33bbd..31451d80783c 100644 --- a/Documentation/block/null_blk.txt +++ b/Documentation/block/null_blk.rst | |||
| @@ -1,33 +1,43 @@ | |||
| 1 | ======================== | ||
| 1 | Null block device driver | 2 | Null block device driver |
| 2 | ================================================================================ | 3 | ======================== |
| 3 | 4 | ||
| 4 | I. Overview | 5 | 1. Overview |
| 6 | =========== | ||
| 5 | 7 | ||
| 6 | The null block device (/dev/nullb*) is used for benchmarking the various | 8 | The null block device (/dev/nullb*) is used for benchmarking the various |
| 7 | block-layer implementations. It emulates a block device of X gigabytes in size. | 9 | block-layer implementations. It emulates a block device of X gigabytes in size. |
| 8 | The following instances are possible: | 10 | The following instances are possible: |
| 9 | 11 | ||
| 10 | Single-queue block-layer | 12 | Single-queue block-layer |
| 13 | |||
| 11 | - Request-based. | 14 | - Request-based. |
| 12 | - Single submission queue per device. | 15 | - Single submission queue per device. |
| 13 | - Implements IO scheduling algorithms (CFQ, Deadline, noop). | 16 | - Implements IO scheduling algorithms (CFQ, Deadline, noop). |
| 17 | |||
| 14 | Multi-queue block-layer | 18 | Multi-queue block-layer |
| 19 | |||
| 15 | - Request-based. | 20 | - Request-based. |
| 16 | - Configurable submission queues per device. | 21 | - Configurable submission queues per device. |
| 22 | |||
| 17 | No block-layer (Known as bio-based) | 23 | No block-layer (Known as bio-based) |
| 24 | |||
| 18 | - Bio-based. IO requests are submitted directly to the device driver. | 25 | - Bio-based. IO requests are submitted directly to the device driver. |
| 19 | - Directly accepts bio data structure and returns them. | 26 | - Directly accepts bio data structure and returns them. |
| 20 | 27 | ||
| 21 | All of them have a completion queue for each core in the system. | 28 | All of them have a completion queue for each core in the system. |
| 22 | 29 | ||
| 23 | II. Module parameters applicable for all instances: | 30 | 2. Module parameters applicable for all instances |
| 31 | ================================================= | ||
| 24 | 32 | ||
| 25 | queue_mode=[0-2]: Default: 2-Multi-queue | 33 | queue_mode=[0-2]: Default: 2-Multi-queue |
| 26 | Selects which block-layer the module should instantiate with. | 34 | Selects which block-layer the module should instantiate with. |
| 27 | 35 | ||
| 28 | 0: Bio-based. | 36 | = ============ |
| 29 | 1: Single-queue. | 37 | 0 Bio-based |
| 30 | 2: Multi-queue. | 38 | 1 Single-queue |
| 39 | 2 Multi-queue | ||
| 40 | = ============ | ||
| 31 | 41 | ||
| 32 | home_node=[0--nr_nodes]: Default: NUMA_NO_NODE | 42 | home_node=[0--nr_nodes]: Default: NUMA_NO_NODE |
| 33 | Selects what CPU node the data structures are allocated from. | 43 | Selects what CPU node the data structures are allocated from. |
| @@ -45,12 +55,14 @@ nr_devices=[Number of devices]: Default: 1 | |||
| 45 | irqmode=[0-2]: Default: 1-Soft-irq | 55 | irqmode=[0-2]: Default: 1-Soft-irq |
| 46 | The completion mode used for completing IOs to the block-layer. | 56 | The completion mode used for completing IOs to the block-layer. |
| 47 | 57 | ||
| 48 | 0: None. | 58 | = =========================================================================== |
| 49 | 1: Soft-irq. Uses IPI to complete IOs across CPU nodes. Simulates the overhead | 59 | 0 None. |
| 60 | 1 Soft-irq. Uses IPI to complete IOs across CPU nodes. Simulates the overhead | ||
| 50 | when IOs are issued from another CPU node than the home the device is | 61 | when IOs are issued from another CPU node than the home the device is |
| 51 | connected to. | 62 | connected to. |
| 52 | 2: Timer: Waits a specific period (completion_nsec) for each IO before | 63 | 2 Timer: Waits a specific period (completion_nsec) for each IO before |
| 53 | completion. | 64 | completion. |
| 65 | = =========================================================================== | ||
| 54 | 66 | ||
| 55 | completion_nsec=[ns]: Default: 10,000ns | 67 | completion_nsec=[ns]: Default: 10,000ns |
| 56 | Combined with irqmode=2 (timer). The time each completion event must wait. | 68 | Combined with irqmode=2 (timer). The time each completion event must wait. |
| @@ -66,30 +78,45 @@ hw_queue_depth=[0..qdepth]: Default: 64 | |||
| 66 | III: Multi-queue specific parameters | 78 | III: Multi-queue specific parameters |
| 67 | 79 | ||
| 68 | use_per_node_hctx=[0/1]: Default: 0 | 80 | use_per_node_hctx=[0/1]: Default: 0 |
| 69 | 0: The number of submit queues are set to the value of the submit_queues | 81 | |
| 82 | = ===================================================================== | ||
| 83 | 0 The number of submit queues are set to the value of the submit_queues | ||
| 70 | parameter. | 84 | parameter. |
| 71 | 1: The multi-queue block layer is instantiated with a hardware dispatch | 85 | 1 The multi-queue block layer is instantiated with a hardware dispatch |
| 72 | queue for each CPU node in the system. | 86 | queue for each CPU node in the system. |
| 87 | = ===================================================================== | ||
| 73 | 88 | ||
| 74 | no_sched=[0/1]: Default: 0 | 89 | no_sched=[0/1]: Default: 0 |
| 75 | 0: nullb* use default blk-mq io scheduler. | 90 | |
| 76 | 1: nullb* doesn't use io scheduler. | 91 | = ====================================== |
| 92 | 0 nullb* use default blk-mq io scheduler | ||
| 93 | 1 nullb* doesn't use io scheduler | ||
| 94 | = ====================================== | ||
| 77 | 95 | ||
| 78 | blocking=[0/1]: Default: 0 | 96 | blocking=[0/1]: Default: 0 |
| 79 | 0: Register as a non-blocking blk-mq driver device. | 97 | |
| 80 | 1: Register as a blocking blk-mq driver device, null_blk will set | 98 | = =============================================================== |
| 99 | 0 Register as a non-blocking blk-mq driver device. | ||
| 100 | 1 Register as a blocking blk-mq driver device, null_blk will set | ||
| 81 | the BLK_MQ_F_BLOCKING flag, indicating that it sometimes/always | 101 | the BLK_MQ_F_BLOCKING flag, indicating that it sometimes/always |
| 82 | needs to block in its ->queue_rq() function. | 102 | needs to block in its ->queue_rq() function. |
| 103 | = =============================================================== | ||
| 83 | 104 | ||
| 84 | shared_tags=[0/1]: Default: 0 | 105 | shared_tags=[0/1]: Default: 0 |
| 85 | 0: Tag set is not shared. | 106 | |
| 86 | 1: Tag set shared between devices for blk-mq. Only makes sense with | 107 | = ================================================================ |
| 108 | 0 Tag set is not shared. | ||
| 109 | 1 Tag set shared between devices for blk-mq. Only makes sense with | ||
| 87 | nr_devices > 1, otherwise there's no tag set to share. | 110 | nr_devices > 1, otherwise there's no tag set to share. |
| 111 | = ================================================================ | ||
| 88 | 112 | ||
| 89 | zoned=[0/1]: Default: 0 | 113 | zoned=[0/1]: Default: 0 |
| 90 | 0: Block device is exposed as a random-access block device. | 114 | |
| 91 | 1: Block device is exposed as a host-managed zoned block device. Requires | 115 | = ====================================================================== |
| 116 | 0 Block device is exposed as a random-access block device. | ||
| 117 | 1 Block device is exposed as a host-managed zoned block device. Requires | ||
| 92 | CONFIG_BLK_DEV_ZONED. | 118 | CONFIG_BLK_DEV_ZONED. |
| 119 | = ====================================================================== | ||
| 93 | 120 | ||
| 94 | zone_size=[MB]: Default: 256 | 121 | zone_size=[MB]: Default: 256 |
| 95 | Per zone size when exposed as a zoned block device. Must be a power of two. | 122 | Per zone size when exposed as a zoned block device. Must be a power of two. |
diff --git a/Documentation/block/pr.txt b/Documentation/block/pr.rst index ac9b8e70e64b..30ea1c2e39eb 100644 --- a/Documentation/block/pr.txt +++ b/Documentation/block/pr.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | 1 | =============================================== | |
| 2 | Block layer support for Persistent Reservations | 2 | Block layer support for Persistent Reservations |
| 3 | =============================================== | 3 | =============================================== |
| 4 | 4 | ||
| @@ -23,22 +23,18 @@ The following types of reservations are supported: | |||
| 23 | -------------------------------------------------- | 23 | -------------------------------------------------- |
| 24 | 24 | ||
| 25 | - PR_WRITE_EXCLUSIVE | 25 | - PR_WRITE_EXCLUSIVE |
| 26 | |||
| 27 | Only the initiator that owns the reservation can write to the | 26 | Only the initiator that owns the reservation can write to the |
| 28 | device. Any initiator can read from the device. | 27 | device. Any initiator can read from the device. |
| 29 | 28 | ||
| 30 | - PR_EXCLUSIVE_ACCESS | 29 | - PR_EXCLUSIVE_ACCESS |
| 31 | |||
| 32 | Only the initiator that owns the reservation can access the | 30 | Only the initiator that owns the reservation can access the |
| 33 | device. | 31 | device. |
| 34 | 32 | ||
| 35 | - PR_WRITE_EXCLUSIVE_REG_ONLY | 33 | - PR_WRITE_EXCLUSIVE_REG_ONLY |
| 36 | |||
| 37 | Only initiators with a registered key can write to the device, | 34 | Only initiators with a registered key can write to the device, |
| 38 | Any initiator can read from the device. | 35 | Any initiator can read from the device. |
| 39 | 36 | ||
| 40 | - PR_EXCLUSIVE_ACCESS_REG_ONLY | 37 | - PR_EXCLUSIVE_ACCESS_REG_ONLY |
| 41 | |||
| 42 | Only initiators with a registered key can access the device. | 38 | Only initiators with a registered key can access the device. |
| 43 | 39 | ||
| 44 | - PR_WRITE_EXCLUSIVE_ALL_REGS | 40 | - PR_WRITE_EXCLUSIVE_ALL_REGS |
| @@ -48,21 +44,21 @@ The following types of reservations are supported: | |||
| 48 | All initiators with a registered key are considered reservation | 44 | All initiators with a registered key are considered reservation |
| 49 | holders. | 45 | holders. |
| 50 | Please reference the SPC spec on the meaning of a reservation | 46 | Please reference the SPC spec on the meaning of a reservation |
| 51 | holder if you want to use this type. | 47 | holder if you want to use this type. |
| 52 | 48 | ||
| 53 | - PR_EXCLUSIVE_ACCESS_ALL_REGS | 49 | - PR_EXCLUSIVE_ACCESS_ALL_REGS |
| 54 | |||
| 55 | Only initiators with a registered key can access the device. | 50 | Only initiators with a registered key can access the device. |
| 56 | All initiators with a registered key are considered reservation | 51 | All initiators with a registered key are considered reservation |
| 57 | holders. | 52 | holders. |
| 58 | Please reference the SPC spec on the meaning of a reservation | 53 | Please reference the SPC spec on the meaning of a reservation |
| 59 | holder if you want to use this type. | 54 | holder if you want to use this type. |
| 60 | 55 | ||
| 61 | 56 | ||
| 62 | The following ioctl are supported: | 57 | The following ioctl are supported: |
| 63 | ---------------------------------- | 58 | ---------------------------------- |
| 64 | 59 | ||
| 65 | 1. IOC_PR_REGISTER | 60 | 1. IOC_PR_REGISTER |
| 61 | ^^^^^^^^^^^^^^^^^^ | ||
| 66 | 62 | ||
| 67 | This ioctl command registers a new reservation if the new_key argument | 63 | This ioctl command registers a new reservation if the new_key argument |
| 68 | is non-null. If no existing reservation exists old_key must be zero, | 64 | is non-null. If no existing reservation exists old_key must be zero, |
| @@ -74,6 +70,7 @@ in old_key. | |||
| 74 | 70 | ||
| 75 | 71 | ||
| 76 | 2. IOC_PR_RESERVE | 72 | 2. IOC_PR_RESERVE |
| 73 | ^^^^^^^^^^^^^^^^^ | ||
| 77 | 74 | ||
| 78 | This ioctl command reserves the device and thus restricts access for other | 75 | This ioctl command reserves the device and thus restricts access for other |
| 79 | devices based on the type argument. The key argument must be the existing | 76 | devices based on the type argument. The key argument must be the existing |
| @@ -82,12 +79,14 @@ IOC_PR_REGISTER_IGNORE, IOC_PR_PREEMPT or IOC_PR_PREEMPT_ABORT commands. | |||
| 82 | 79 | ||
| 83 | 80 | ||
| 84 | 3. IOC_PR_RELEASE | 81 | 3. IOC_PR_RELEASE |
| 82 | ^^^^^^^^^^^^^^^^^ | ||
| 85 | 83 | ||
| 86 | This ioctl command releases the reservation specified by key and flags | 84 | This ioctl command releases the reservation specified by key and flags |
| 87 | and thus removes any access restriction implied by it. | 85 | and thus removes any access restriction implied by it. |
| 88 | 86 | ||
| 89 | 87 | ||
| 90 | 4. IOC_PR_PREEMPT | 88 | 4. IOC_PR_PREEMPT |
| 89 | ^^^^^^^^^^^^^^^^^ | ||
| 91 | 90 | ||
| 92 | This ioctl command releases the existing reservation referred to by | 91 | This ioctl command releases the existing reservation referred to by |
| 93 | old_key and replaces it with a new reservation of type for the | 92 | old_key and replaces it with a new reservation of type for the |
| @@ -95,11 +94,13 @@ reservation key new_key. | |||
| 95 | 94 | ||
| 96 | 95 | ||
| 97 | 5. IOC_PR_PREEMPT_ABORT | 96 | 5. IOC_PR_PREEMPT_ABORT |
| 97 | ^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 98 | 98 | ||
| 99 | This ioctl command works like IOC_PR_PREEMPT except that it also aborts | 99 | This ioctl command works like IOC_PR_PREEMPT except that it also aborts |
| 100 | any outstanding command sent over a connection identified by old_key. | 100 | any outstanding command sent over a connection identified by old_key. |
| 101 | 101 | ||
| 102 | 6. IOC_PR_CLEAR | 102 | 6. IOC_PR_CLEAR |
| 103 | ^^^^^^^^^^^^^^^ | ||
| 103 | 104 | ||
| 104 | This ioctl command unregisters both key and any other reservation key | 105 | This ioctl command unregisters both key and any other reservation key |
| 105 | registered with the device and drops any existing reservation. | 106 | registered with the device and drops any existing reservation. |
| @@ -111,7 +112,6 @@ Flags | |||
| 111 | All the ioctls have a flag field. Currently only one flag is supported: | 112 | All the ioctls have a flag field. Currently only one flag is supported: |
| 112 | 113 | ||
| 113 | - PR_FL_IGNORE_KEY | 114 | - PR_FL_IGNORE_KEY |
| 114 | |||
| 115 | Ignore the existing reservation key. This is commonly supported for | 115 | Ignore the existing reservation key. This is commonly supported for |
| 116 | IOC_PR_REGISTER, and some implementation may support the flag for | 116 | IOC_PR_REGISTER, and some implementation may support the flag for |
| 117 | IOC_PR_RESERVE. | 117 | IOC_PR_RESERVE. |
diff --git a/Documentation/block/queue-sysfs.txt b/Documentation/block/queue-sysfs.rst index b40b5b7cebd9..6a8513af9201 100644 --- a/Documentation/block/queue-sysfs.txt +++ b/Documentation/block/queue-sysfs.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ================= | ||
| 1 | Queue sysfs files | 2 | Queue sysfs files |
| 2 | ================= | 3 | ================= |
| 3 | 4 | ||
| @@ -10,7 +11,7 @@ Files denoted with a RO postfix are readonly and the RW postfix means | |||
| 10 | read-write. | 11 | read-write. |
| 11 | 12 | ||
| 12 | add_random (RW) | 13 | add_random (RW) |
| 13 | ---------------- | 14 | --------------- |
| 14 | This file allows to turn off the disk entropy contribution. Default | 15 | This file allows to turn off the disk entropy contribution. Default |
| 15 | value of this file is '1'(on). | 16 | value of this file is '1'(on). |
| 16 | 17 | ||
| @@ -30,13 +31,13 @@ used by CPU-addressable storage to bypass the pagecache. It shows '1' | |||
| 30 | if true, '0' if not. | 31 | if true, '0' if not. |
| 31 | 32 | ||
| 32 | discard_granularity (RO) | 33 | discard_granularity (RO) |
| 33 | ----------------------- | 34 | ------------------------ |
| 34 | This shows the size of internal allocation of the device in bytes, if | 35 | This shows the size of internal allocation of the device in bytes, if |
| 35 | reported by the device. A value of '0' means device does not support | 36 | reported by the device. A value of '0' means device does not support |
| 36 | the discard functionality. | 37 | the discard functionality. |
| 37 | 38 | ||
| 38 | discard_max_hw_bytes (RO) | 39 | discard_max_hw_bytes (RO) |
| 39 | ---------------------- | 40 | ------------------------- |
| 40 | Devices that support discard functionality may have internal limits on | 41 | Devices that support discard functionality may have internal limits on |
| 41 | the number of bytes that can be trimmed or unmapped in a single operation. | 42 | the number of bytes that can be trimmed or unmapped in a single operation. |
| 42 | The discard_max_bytes parameter is set by the device driver to the maximum | 43 | The discard_max_bytes parameter is set by the device driver to the maximum |
diff --git a/Documentation/block/request.txt b/Documentation/block/request.rst index 754e104ed369..747021e1ffdb 100644 --- a/Documentation/block/request.txt +++ b/Documentation/block/request.rst | |||
| @@ -1,26 +1,37 @@ | |||
| 1 | 1 | ============================ | |
| 2 | struct request documentation | 2 | struct request documentation |
| 3 | ============================ | ||
| 3 | 4 | ||
| 4 | Jens Axboe <jens.axboe@oracle.com> 27/05/02 | 5 | Jens Axboe <jens.axboe@oracle.com> 27/05/02 |
| 5 | 6 | ||
| 6 | 1.0 | ||
| 7 | Index | ||
| 8 | 7 | ||
| 9 | 2.0 Struct request members classification | 8 | .. FIXME: |
| 9 | No idea about what does mean - seems just some noise, so comment it | ||
| 10 | |||
| 11 | 1.0 | ||
| 12 | Index | ||
| 13 | |||
| 14 | 2.0 Struct request members classification | ||
| 15 | |||
| 16 | 2.1 struct request members explanation | ||
| 10 | 17 | ||
| 11 | 2.1 struct request members explanation | 18 | 3.0 |
| 19 | |||
| 20 | |||
| 21 | 2.0 | ||
| 12 | 22 | ||
| 13 | 3.0 | ||
| 14 | 23 | ||
| 15 | 24 | ||
| 16 | 2.0 | ||
| 17 | Short explanation of request members | 25 | Short explanation of request members |
| 26 | ==================================== | ||
| 18 | 27 | ||
| 19 | Classification flags: | 28 | Classification flags: |
| 20 | 29 | ||
| 30 | = ==================== | ||
| 21 | D driver member | 31 | D driver member |
| 22 | B block layer member | 32 | B block layer member |
| 23 | I I/O scheduler member | 33 | I I/O scheduler member |
| 34 | = ==================== | ||
| 24 | 35 | ||
| 25 | Unless an entry contains a D classification, a device driver must not access | 36 | Unless an entry contains a D classification, a device driver must not access |
| 26 | this member. Some members may contain D classifications, but should only be | 37 | this member. Some members may contain D classifications, but should only be |
| @@ -28,14 +39,13 @@ access through certain macros or functions (eg ->flags). | |||
| 28 | 39 | ||
| 29 | <linux/blkdev.h> | 40 | <linux/blkdev.h> |
| 30 | 41 | ||
| 31 | 2.1 | 42 | =============================== ======= ======================================= |
| 32 | Member Flag Comment | 43 | Member Flag Comment |
| 33 | ------ ---- ------- | 44 | =============================== ======= ======================================= |
| 34 | |||
| 35 | struct list_head queuelist BI Organization on various internal | 45 | struct list_head queuelist BI Organization on various internal |
| 36 | queues | 46 | queues |
| 37 | 47 | ||
| 38 | void *elevator_private I I/O scheduler private data | 48 | ``void *elevator_private`` I I/O scheduler private data |
| 39 | 49 | ||
| 40 | unsigned char cmd[16] D Driver can use this for setting up | 50 | unsigned char cmd[16] D Driver can use this for setting up |
| 41 | a cdb before execution, see | 51 | a cdb before execution, see |
| @@ -71,18 +81,19 @@ unsigned int hard_cur_sectors B Used to keep current_nr_sectors sane | |||
| 71 | 81 | ||
| 72 | int tag DB TCQ tag, if assigned | 82 | int tag DB TCQ tag, if assigned |
| 73 | 83 | ||
| 74 | void *special D Free to be used by driver | 84 | ``void *special`` D Free to be used by driver |
| 75 | 85 | ||
| 76 | char *buffer D Map of first segment, also see | 86 | ``char *buffer`` D Map of first segment, also see |
| 77 | section on bouncing SECTION | 87 | section on bouncing SECTION |
| 78 | 88 | ||
| 79 | struct completion *waiting D Can be used by driver to get signalled | 89 | ``struct completion *waiting`` D Can be used by driver to get signalled |
| 80 | on request completion | 90 | on request completion |
| 81 | 91 | ||
| 82 | struct bio *bio DBI First bio in request | 92 | ``struct bio *bio`` DBI First bio in request |
| 83 | 93 | ||
| 84 | struct bio *biotail DBI Last bio in request | 94 | ``struct bio *biotail`` DBI Last bio in request |
| 85 | 95 | ||
| 86 | struct request_queue *q DB Request queue this request belongs to | 96 | ``struct request_queue *q`` DB Request queue this request belongs to |
| 87 | 97 | ||
| 88 | struct request_list *rl B Request list this request came from | 98 | ``struct request_list *rl`` B Request list this request came from |
| 99 | =============================== ======= ======================================= | ||
diff --git a/Documentation/block/stat.txt b/Documentation/block/stat.rst index 0aace9cc536c..9c07bc22b0bc 100644 --- a/Documentation/block/stat.txt +++ b/Documentation/block/stat.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | =============================================== | ||
| 1 | Block layer statistics in /sys/block/<dev>/stat | 2 | Block layer statistics in /sys/block/<dev>/stat |
| 2 | =============================================== | 3 | =============================================== |
| 3 | 4 | ||
| @@ -6,9 +7,12 @@ This file documents the contents of the /sys/block/<dev>/stat file. | |||
| 6 | The stat file provides several statistics about the state of block | 7 | The stat file provides several statistics about the state of block |
| 7 | device <dev>. | 8 | device <dev>. |
| 8 | 9 | ||
| 9 | Q. Why are there multiple statistics in a single file? Doesn't sysfs | 10 | Q. |
| 11 | Why are there multiple statistics in a single file? Doesn't sysfs | ||
| 10 | normally contain a single value per file? | 12 | normally contain a single value per file? |
| 11 | A. By having a single file, the kernel can guarantee that the statistics | 13 | |
| 14 | A. | ||
| 15 | By having a single file, the kernel can guarantee that the statistics | ||
| 12 | represent a consistent snapshot of the state of the device. If the | 16 | represent a consistent snapshot of the state of the device. If the |
| 13 | statistics were exported as multiple files containing one statistic | 17 | statistics were exported as multiple files containing one statistic |
| 14 | each, it would be impossible to guarantee that a set of readings | 18 | each, it would be impossible to guarantee that a set of readings |
| @@ -18,8 +22,10 @@ The stat file consists of a single line of text containing 11 decimal | |||
| 18 | values separated by whitespace. The fields are summarized in the | 22 | values separated by whitespace. The fields are summarized in the |
| 19 | following table, and described in more detail below. | 23 | following table, and described in more detail below. |
| 20 | 24 | ||
| 25 | |||
| 26 | =============== ============= ================================================= | ||
| 21 | Name units description | 27 | Name units description |
| 22 | ---- ----- ----------- | 28 | =============== ============= ================================================= |
| 23 | read I/Os requests number of read I/Os processed | 29 | read I/Os requests number of read I/Os processed |
| 24 | read merges requests number of read I/Os merged with in-queue I/O | 30 | read merges requests number of read I/Os merged with in-queue I/O |
| 25 | read sectors sectors number of sectors read | 31 | read sectors sectors number of sectors read |
| @@ -35,6 +41,7 @@ discard I/Os requests number of discard I/Os processed | |||
| 35 | discard merges requests number of discard I/Os merged with in-queue I/O | 41 | discard merges requests number of discard I/Os merged with in-queue I/O |
| 36 | discard sectors sectors number of sectors discarded | 42 | discard sectors sectors number of sectors discarded |
| 37 | discard ticks milliseconds total wait time for discard requests | 43 | discard ticks milliseconds total wait time for discard requests |
| 44 | =============== ============= ================================================= | ||
| 38 | 45 | ||
| 39 | read I/Os, write I/Os, discard I/0s | 46 | read I/Os, write I/Os, discard I/0s |
| 40 | =================================== | 47 | =================================== |
diff --git a/Documentation/block/switching-sched.txt b/Documentation/block/switching-sched.rst index 7977f6fb8b20..42042417380e 100644 --- a/Documentation/block/switching-sched.txt +++ b/Documentation/block/switching-sched.rst | |||
| @@ -1,35 +1,39 @@ | |||
| 1 | =================== | ||
| 2 | Switching Scheduler | ||
| 3 | =================== | ||
| 4 | |||
| 1 | To choose IO schedulers at boot time, use the argument 'elevator=deadline'. | 5 | To choose IO schedulers at boot time, use the argument 'elevator=deadline'. |
| 2 | 'noop' and 'cfq' (the default) are also available. IO schedulers are assigned | 6 | 'noop' and 'cfq' (the default) are also available. IO schedulers are assigned |
| 3 | globally at boot time only presently. | 7 | globally at boot time only presently. |
| 4 | 8 | ||
| 5 | Each io queue has a set of io scheduler tunables associated with it. These | 9 | Each io queue has a set of io scheduler tunables associated with it. These |
| 6 | tunables control how the io scheduler works. You can find these entries | 10 | tunables control how the io scheduler works. You can find these entries |
| 7 | in: | 11 | in:: |
| 8 | 12 | ||
| 9 | /sys/block/<device>/queue/iosched | 13 | /sys/block/<device>/queue/iosched |
| 10 | 14 | ||
| 11 | assuming that you have sysfs mounted on /sys. If you don't have sysfs mounted, | 15 | assuming that you have sysfs mounted on /sys. If you don't have sysfs mounted, |
| 12 | you can do so by typing: | 16 | you can do so by typing:: |
| 13 | 17 | ||
| 14 | # mount none /sys -t sysfs | 18 | # mount none /sys -t sysfs |
| 15 | 19 | ||
| 16 | It is possible to change the IO scheduler for a given block device on | 20 | It is possible to change the IO scheduler for a given block device on |
| 17 | the fly to select one of mq-deadline, none, bfq, or kyber schedulers - | 21 | the fly to select one of mq-deadline, none, bfq, or kyber schedulers - |
| 18 | which can improve that device's throughput. | 22 | which can improve that device's throughput. |
| 19 | 23 | ||
| 20 | To set a specific scheduler, simply do this: | 24 | To set a specific scheduler, simply do this:: |
| 21 | 25 | ||
| 22 | echo SCHEDNAME > /sys/block/DEV/queue/scheduler | 26 | echo SCHEDNAME > /sys/block/DEV/queue/scheduler |
| 23 | 27 | ||
| 24 | where SCHEDNAME is the name of a defined IO scheduler, and DEV is the | 28 | where SCHEDNAME is the name of a defined IO scheduler, and DEV is the |
| 25 | device name (hda, hdb, sga, or whatever you happen to have). | 29 | device name (hda, hdb, sga, or whatever you happen to have). |
| 26 | 30 | ||
| 27 | The list of defined schedulers can be found by simply doing | 31 | The list of defined schedulers can be found by simply doing |
| 28 | a "cat /sys/block/DEV/queue/scheduler" - the list of valid names | 32 | a "cat /sys/block/DEV/queue/scheduler" - the list of valid names |
| 29 | will be displayed, with the currently selected scheduler in brackets: | 33 | will be displayed, with the currently selected scheduler in brackets:: |
| 30 | 34 | ||
| 31 | # cat /sys/block/sda/queue/scheduler | 35 | # cat /sys/block/sda/queue/scheduler |
| 32 | [mq-deadline] kyber bfq none | 36 | [mq-deadline] kyber bfq none |
| 33 | # echo none >/sys/block/sda/queue/scheduler | 37 | # echo none >/sys/block/sda/queue/scheduler |
| 34 | # cat /sys/block/sda/queue/scheduler | 38 | # cat /sys/block/sda/queue/scheduler |
| 35 | [none] mq-deadline kyber bfq | 39 | [none] mq-deadline kyber bfq |
diff --git a/Documentation/block/writeback_cache_control.txt b/Documentation/block/writeback_cache_control.rst index 8a6bdada5f6b..2c752c57c14c 100644 --- a/Documentation/block/writeback_cache_control.txt +++ b/Documentation/block/writeback_cache_control.rst | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | 1 | ========================================== | |
| 2 | Explicit volatile write back cache control | 2 | Explicit volatile write back cache control |
| 3 | ===================================== | 3 | ========================================== |
| 4 | 4 | ||
| 5 | Introduction | 5 | Introduction |
| 6 | ------------ | 6 | ------------ |
| @@ -31,7 +31,7 @@ the blkdev_issue_flush() helper for a pure cache flush. | |||
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | Forced Unit Access | 33 | Forced Unit Access |
| 34 | ----------------- | 34 | ------------------ |
| 35 | 35 | ||
| 36 | The REQ_FUA flag can be OR ed into the r/w flags of a bio submitted from the | 36 | The REQ_FUA flag can be OR ed into the r/w flags of a bio submitted from the |
| 37 | filesystem and will make sure that I/O completion for this request is only | 37 | filesystem and will make sure that I/O completion for this request is only |
| @@ -62,14 +62,14 @@ flags themselves without any help from the block layer. | |||
| 62 | 62 | ||
| 63 | 63 | ||
| 64 | Implementation details for request_fn based block drivers | 64 | Implementation details for request_fn based block drivers |
| 65 | -------------------------------------------------------------- | 65 | --------------------------------------------------------- |
| 66 | 66 | ||
| 67 | For devices that do not support volatile write caches there is no driver | 67 | For devices that do not support volatile write caches there is no driver |
| 68 | support required, the block layer completes empty REQ_PREFLUSH requests before | 68 | support required, the block layer completes empty REQ_PREFLUSH requests before |
| 69 | entering the driver and strips off the REQ_PREFLUSH and REQ_FUA bits from | 69 | entering the driver and strips off the REQ_PREFLUSH and REQ_FUA bits from |
| 70 | requests that have a payload. For devices with volatile write caches the | 70 | requests that have a payload. For devices with volatile write caches the |
| 71 | driver needs to tell the block layer that it supports flushing caches by | 71 | driver needs to tell the block layer that it supports flushing caches by |
| 72 | doing: | 72 | doing:: |
| 73 | 73 | ||
| 74 | blk_queue_write_cache(sdkp->disk->queue, true, false); | 74 | blk_queue_write_cache(sdkp->disk->queue, true, false); |
| 75 | 75 | ||
| @@ -77,7 +77,7 @@ and handle empty REQ_OP_FLUSH requests in its prep_fn/request_fn. Note that | |||
| 77 | REQ_PREFLUSH requests with a payload are automatically turned into a sequence | 77 | REQ_PREFLUSH requests with a payload are automatically turned into a sequence |
| 78 | of an empty REQ_OP_FLUSH request followed by the actual write by the block | 78 | of an empty REQ_OP_FLUSH request followed by the actual write by the block |
| 79 | layer. For devices that also support the FUA bit the block layer needs | 79 | layer. For devices that also support the FUA bit the block layer needs |
| 80 | to be told to pass through the REQ_FUA bit using: | 80 | to be told to pass through the REQ_FUA bit using:: |
| 81 | 81 | ||
| 82 | blk_queue_write_cache(sdkp->disk->queue, true, true); | 82 | blk_queue_write_cache(sdkp->disk->queue, true, true); |
| 83 | 83 | ||
diff --git a/Documentation/cdrom/index.rst b/Documentation/cdrom/index.rst index efbd5d111825..338ad5f94e7c 100644 --- a/Documentation/cdrom/index.rst +++ b/Documentation/cdrom/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ===== | 3 | ===== |
| 4 | cdrom | 4 | cdrom |
diff --git a/Documentation/gcc-plugins.txt b/Documentation/core-api/gcc-plugins.rst index 8502f24396fb..8502f24396fb 100644 --- a/Documentation/gcc-plugins.txt +++ b/Documentation/core-api/gcc-plugins.rst | |||
diff --git a/Documentation/core-api/index.rst b/Documentation/core-api/index.rst index 322ac954b390..da0ed972d224 100644 --- a/Documentation/core-api/index.rst +++ b/Documentation/core-api/index.rst | |||
| @@ -36,6 +36,7 @@ Core utilities | |||
| 36 | memory-hotplug | 36 | memory-hotplug |
| 37 | protection-keys | 37 | protection-keys |
| 38 | ../RCU/index | 38 | ../RCU/index |
| 39 | gcc-plugins | ||
| 39 | 40 | ||
| 40 | 41 | ||
| 41 | Interfaces for kernel debugging | 42 | Interfaces for kernel debugging |
diff --git a/Documentation/core-api/printk-formats.rst b/Documentation/core-api/printk-formats.rst index 75d2bbe9813f..c6224d039bcb 100644 --- a/Documentation/core-api/printk-formats.rst +++ b/Documentation/core-api/printk-formats.rst | |||
| @@ -119,7 +119,7 @@ Kernel Pointers | |||
| 119 | 119 | ||
| 120 | For printing kernel pointers which should be hidden from unprivileged | 120 | For printing kernel pointers which should be hidden from unprivileged |
| 121 | users. The behaviour of %pK depends on the kptr_restrict sysctl - see | 121 | users. The behaviour of %pK depends on the kptr_restrict sysctl - see |
| 122 | Documentation/sysctl/kernel.txt for more details. | 122 | Documentation/admin-guide/sysctl/kernel.rst for more details. |
| 123 | 123 | ||
| 124 | Unmodified Addresses | 124 | Unmodified Addresses |
| 125 | -------------------- | 125 | -------------------- |
diff --git a/Documentation/devicetree/bindings/arm/xen.txt b/Documentation/devicetree/bindings/arm/xen.txt index c9b9321434ea..db5c56db30ec 100644 --- a/Documentation/devicetree/bindings/arm/xen.txt +++ b/Documentation/devicetree/bindings/arm/xen.txt | |||
| @@ -54,7 +54,7 @@ hypervisor { | |||
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | The format and meaning of the "xen,uefi-*" parameters are similar to those in | 56 | The format and meaning of the "xen,uefi-*" parameters are similar to those in |
| 57 | Documentation/arm/uefi.txt, which are provided by the regular UEFI stub. However | 57 | Documentation/arm/uefi.rst, which are provided by the regular UEFI stub. However |
| 58 | they differ because they are provided by the Xen hypervisor, together with a set | 58 | they differ because they are provided by the Xen hypervisor, together with a set |
| 59 | of UEFI runtime services implemented via hypercalls, see | 59 | of UEFI runtime services implemented via hypercalls, see |
| 60 | http://xenbits.xen.org/docs/unstable/hypercall/x86_64/include,public,platform.h.html. | 60 | http://xenbits.xen.org/docs/unstable/hypercall/x86_64/include,public,platform.h.html. |
diff --git a/Documentation/devicetree/bindings/phy/phy-bindings.txt b/Documentation/devicetree/bindings/phy/phy-bindings.txt index a403b81d0679..c4eb38902533 100644 --- a/Documentation/devicetree/bindings/phy/phy-bindings.txt +++ b/Documentation/devicetree/bindings/phy/phy-bindings.txt | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | This document explains only the device tree data binding. For general | 1 | This document explains only the device tree data binding. For general |
| 2 | information about PHY subsystem refer to Documentation/phy.txt | 2 | information about PHY subsystem refer to Documentation/driver-api/phy/phy.rst |
| 3 | 3 | ||
| 4 | PHY device node | 4 | PHY device node |
| 5 | =============== | 5 | =============== |
diff --git a/Documentation/devicetree/bindings/phy/phy-pxa-usb.txt b/Documentation/devicetree/bindings/phy/phy-pxa-usb.txt index 93fc09c12954..d80e36a77ec5 100644 --- a/Documentation/devicetree/bindings/phy/phy-pxa-usb.txt +++ b/Documentation/devicetree/bindings/phy/phy-pxa-usb.txt | |||
| @@ -15,4 +15,4 @@ Example: | |||
| 15 | }; | 15 | }; |
| 16 | 16 | ||
| 17 | This document explains the device tree binding. For general | 17 | This document explains the device tree binding. For general |
| 18 | information about PHY subsystem refer to Documentation/phy.txt | 18 | information about PHY subsystem refer to Documentation/driver-api/phy/phy.rst |
diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt index 60f8640f2b2f..4660ccee35a3 100644 --- a/Documentation/devicetree/booting-without-of.txt +++ b/Documentation/devicetree/booting-without-of.txt | |||
| @@ -160,7 +160,7 @@ it with special cases. | |||
| 160 | of the kernel image. That entry point supports two calling | 160 | of the kernel image. That entry point supports two calling |
| 161 | conventions. A summary of the interface is described here. A full | 161 | conventions. A summary of the interface is described here. A full |
| 162 | description of the boot requirements is documented in | 162 | description of the boot requirements is documented in |
| 163 | Documentation/arm/Booting | 163 | Documentation/arm/booting.rst |
| 164 | 164 | ||
| 165 | a) ATAGS interface. Minimal information is passed from firmware | 165 | a) ATAGS interface. Minimal information is passed from firmware |
| 166 | to the kernel with a tagged list of predefined parameters. | 166 | to the kernel with a tagged list of predefined parameters. |
| @@ -174,7 +174,7 @@ it with special cases. | |||
| 174 | b) Entry with a flattened device-tree block. Firmware loads the | 174 | b) Entry with a flattened device-tree block. Firmware loads the |
| 175 | physical address of the flattened device tree block (dtb) into r2, | 175 | physical address of the flattened device tree block (dtb) into r2, |
| 176 | r1 is not used, but it is considered good practice to use a valid | 176 | r1 is not used, but it is considered good practice to use a valid |
| 177 | machine number as described in Documentation/arm/Booting. | 177 | machine number as described in Documentation/arm/booting.rst. |
| 178 | 178 | ||
| 179 | r0 : 0 | 179 | r0 : 0 |
| 180 | 180 | ||
diff --git a/Documentation/driver-api/backlight/lp855x-driver.rst b/Documentation/driver-api/backlight/lp855x-driver.rst new file mode 100644 index 000000000000..1e0b224fc397 --- /dev/null +++ b/Documentation/driver-api/backlight/lp855x-driver.rst | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | ==================== | ||
| 2 | Kernel driver lp855x | ||
| 3 | ==================== | ||
| 4 | |||
| 5 | Backlight driver for LP855x ICs | ||
| 6 | |||
| 7 | Supported chips: | ||
| 8 | |||
| 9 | Texas Instruments LP8550, LP8551, LP8552, LP8553, LP8555, LP8556 and | ||
| 10 | LP8557 | ||
| 11 | |||
| 12 | Author: Milo(Woogyom) Kim <milo.kim@ti.com> | ||
| 13 | |||
| 14 | Description | ||
| 15 | ----------- | ||
| 16 | |||
| 17 | * Brightness control | ||
| 18 | |||
| 19 | Brightness can be controlled by the pwm input or the i2c command. | ||
| 20 | The lp855x driver supports both cases. | ||
| 21 | |||
| 22 | * Device attributes | ||
| 23 | |||
| 24 | 1) bl_ctl_mode | ||
| 25 | |||
| 26 | Backlight control mode. | ||
| 27 | |||
| 28 | Value: pwm based or register based | ||
| 29 | |||
| 30 | 2) chip_id | ||
| 31 | |||
| 32 | The lp855x chip id. | ||
| 33 | |||
| 34 | Value: lp8550/lp8551/lp8552/lp8553/lp8555/lp8556/lp8557 | ||
| 35 | |||
| 36 | Platform data for lp855x | ||
| 37 | ------------------------ | ||
| 38 | |||
| 39 | For supporting platform specific data, the lp855x platform data can be used. | ||
| 40 | |||
| 41 | * name: | ||
| 42 | Backlight driver name. If it is not defined, default name is set. | ||
| 43 | * device_control: | ||
| 44 | Value of DEVICE CONTROL register. | ||
| 45 | * initial_brightness: | ||
| 46 | Initial value of backlight brightness. | ||
| 47 | * period_ns: | ||
| 48 | Platform specific PWM period value. unit is nano. | ||
| 49 | Only valid when brightness is pwm input mode. | ||
| 50 | * size_program: | ||
| 51 | Total size of lp855x_rom_data. | ||
| 52 | * rom_data: | ||
| 53 | List of new eeprom/eprom registers. | ||
| 54 | |||
| 55 | Examples | ||
| 56 | ======== | ||
| 57 | |||
| 58 | 1) lp8552 platform data: i2c register mode with new eeprom data:: | ||
| 59 | |||
| 60 | #define EEPROM_A5_ADDR 0xA5 | ||
| 61 | #define EEPROM_A5_VAL 0x4f /* EN_VSYNC=0 */ | ||
| 62 | |||
| 63 | static struct lp855x_rom_data lp8552_eeprom_arr[] = { | ||
| 64 | {EEPROM_A5_ADDR, EEPROM_A5_VAL}, | ||
| 65 | }; | ||
| 66 | |||
| 67 | static struct lp855x_platform_data lp8552_pdata = { | ||
| 68 | .name = "lcd-bl", | ||
| 69 | .device_control = I2C_CONFIG(LP8552), | ||
| 70 | .initial_brightness = INITIAL_BRT, | ||
| 71 | .size_program = ARRAY_SIZE(lp8552_eeprom_arr), | ||
| 72 | .rom_data = lp8552_eeprom_arr, | ||
| 73 | }; | ||
| 74 | |||
| 75 | 2) lp8556 platform data: pwm input mode with default rom data:: | ||
| 76 | |||
| 77 | static struct lp855x_platform_data lp8556_pdata = { | ||
| 78 | .device_control = PWM_CONFIG(LP8556), | ||
| 79 | .initial_brightness = INITIAL_BRT, | ||
| 80 | .period_ns = 1000000, | ||
| 81 | }; | ||
diff --git a/Documentation/bt8xxgpio.txt b/Documentation/driver-api/bt8xxgpio.rst index a845feb074de..a845feb074de 100644 --- a/Documentation/bt8xxgpio.txt +++ b/Documentation/driver-api/bt8xxgpio.rst | |||
diff --git a/Documentation/connector/connector.txt b/Documentation/driver-api/connector.rst index ab7ca897fab7..c100c7482289 100644 --- a/Documentation/connector/connector.txt +++ b/Documentation/driver-api/connector.rst | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | /*****************************************/ | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | Kernel Connector. | 2 | |
| 3 | /*****************************************/ | 3 | ================ |
| 4 | Kernel Connector | ||
| 5 | ================ | ||
| 4 | 6 | ||
| 5 | Kernel connector - new netlink based userspace <-> kernel space easy | 7 | Kernel connector - new netlink based userspace <-> kernel space easy |
| 6 | to use communication module. | 8 | to use communication module. |
| @@ -12,94 +14,55 @@ identifier, the appropriate callback will be called. | |||
| 12 | 14 | ||
| 13 | From the userspace point of view it's quite straightforward: | 15 | From the userspace point of view it's quite straightforward: |
| 14 | 16 | ||
| 15 | socket(); | 17 | - socket(); |
| 16 | bind(); | 18 | - bind(); |
| 17 | send(); | 19 | - send(); |
| 18 | recv(); | 20 | - recv(); |
| 19 | 21 | ||
| 20 | But if kernelspace wants to use the full power of such connections, the | 22 | But if kernelspace wants to use the full power of such connections, the |
| 21 | driver writer must create special sockets, must know about struct sk_buff | 23 | driver writer must create special sockets, must know about struct sk_buff |
| 22 | handling, etc... The Connector driver allows any kernelspace agents to use | 24 | handling, etc... The Connector driver allows any kernelspace agents to use |
| 23 | netlink based networking for inter-process communication in a significantly | 25 | netlink based networking for inter-process communication in a significantly |
| 24 | easier way: | 26 | easier way:: |
| 25 | 27 | ||
| 26 | int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *)); | 28 | int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *)); |
| 27 | void cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 __group, int gfp_mask); | 29 | void cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 __group, int gfp_mask); |
| 28 | void cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __group, int gfp_mask); | 30 | void cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __group, int gfp_mask); |
| 29 | 31 | ||
| 30 | struct cb_id | 32 | struct cb_id |
| 31 | { | 33 | { |
| 32 | __u32 idx; | 34 | __u32 idx; |
| 33 | __u32 val; | 35 | __u32 val; |
| 34 | }; | 36 | }; |
| 35 | 37 | ||
| 36 | idx and val are unique identifiers which must be registered in the | 38 | idx and val are unique identifiers which must be registered in the |
| 37 | connector.h header for in-kernel usage. void (*callback) (void *) is a | 39 | connector.h header for in-kernel usage. `void (*callback) (void *)` is a |
| 38 | callback function which will be called when a message with above idx.val | 40 | callback function which will be called when a message with above idx.val |
| 39 | is received by the connector core. The argument for that function must | 41 | is received by the connector core. The argument for that function must |
| 40 | be dereferenced to struct cn_msg *. | 42 | be dereferenced to `struct cn_msg *`:: |
| 41 | 43 | ||
| 42 | struct cn_msg | 44 | struct cn_msg |
| 43 | { | 45 | { |
| 44 | struct cb_id id; | 46 | struct cb_id id; |
| 45 | 47 | ||
| 46 | __u32 seq; | 48 | __u32 seq; |
| 47 | __u32 ack; | 49 | __u32 ack; |
| 48 | 50 | ||
| 49 | __u32 len; /* Length of the following data */ | 51 | __u32 len; /* Length of the following data */ |
| 50 | __u8 data[0]; | 52 | __u8 data[0]; |
| 51 | }; | 53 | }; |
| 52 | |||
| 53 | /*****************************************/ | ||
| 54 | Connector interfaces. | ||
| 55 | /*****************************************/ | ||
| 56 | |||
| 57 | int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *)); | ||
| 58 | |||
| 59 | Registers new callback with connector core. | ||
| 60 | |||
| 61 | struct cb_id *id - unique connector's user identifier. | ||
| 62 | It must be registered in connector.h for legal in-kernel users. | ||
| 63 | char *name - connector's callback symbolic name. | ||
| 64 | void (*callback) (struct cn..) - connector's callback. | ||
| 65 | cn_msg and the sender's credentials | ||
| 66 | |||
| 67 | |||
| 68 | void cn_del_callback(struct cb_id *id); | ||
| 69 | |||
| 70 | Unregisters new callback with connector core. | ||
| 71 | |||
| 72 | struct cb_id *id - unique connector's user identifier. | ||
| 73 | |||
| 74 | |||
| 75 | int cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 __groups, int gfp_mask); | ||
| 76 | int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __groups, int gfp_mask); | ||
| 77 | 54 | ||
| 78 | Sends message to the specified groups. It can be safely called from | 55 | Connector interfaces |
| 79 | softirq context, but may silently fail under strong memory pressure. | 56 | ==================== |
| 80 | If there are no listeners for given group -ESRCH can be returned. | ||
| 81 | 57 | ||
| 82 | struct cn_msg * - message header(with attached data). | 58 | .. kernel-doc:: include/linux/connector.h |
| 83 | u16 len - for *_multi multiple cn_msg messages can be sent | ||
| 84 | u32 port - destination port. | ||
| 85 | If non-zero the message will be sent to the | ||
| 86 | given port, which should be set to the | ||
| 87 | original sender. | ||
| 88 | u32 __group - destination group. | ||
| 89 | If port and __group is zero, then appropriate group will | ||
| 90 | be searched through all registered connector users, | ||
| 91 | and message will be delivered to the group which was | ||
| 92 | created for user with the same ID as in msg. | ||
| 93 | If __group is not zero, then message will be delivered | ||
| 94 | to the specified group. | ||
| 95 | int gfp_mask - GFP mask. | ||
| 96 | 59 | ||
| 97 | Note: When registering new callback user, connector core assigns | 60 | Note: |
| 98 | netlink group to the user which is equal to its id.idx. | 61 | When registering new callback user, connector core assigns |
| 62 | netlink group to the user which is equal to its id.idx. | ||
| 99 | 63 | ||
| 100 | /*****************************************/ | 64 | Protocol description |
| 101 | Protocol description. | 65 | ==================== |
| 102 | /*****************************************/ | ||
| 103 | 66 | ||
| 104 | The current framework offers a transport layer with fixed headers. The | 67 | The current framework offers a transport layer with fixed headers. The |
| 105 | recommended protocol which uses such a header is as following: | 68 | recommended protocol which uses such a header is as following: |
| @@ -132,9 +95,8 @@ driver (it also registers itself with id={-1, -1}). | |||
| 132 | As example of this usage can be found in the cn_test.c module which | 95 | As example of this usage can be found in the cn_test.c module which |
| 133 | uses the connector to request notification and to send messages. | 96 | uses the connector to request notification and to send messages. |
| 134 | 97 | ||
| 135 | /*****************************************/ | 98 | Reliability |
| 136 | Reliability. | 99 | =========== |
| 137 | /*****************************************/ | ||
| 138 | 100 | ||
| 139 | Netlink itself is not a reliable protocol. That means that messages can | 101 | Netlink itself is not a reliable protocol. That means that messages can |
| 140 | be lost due to memory pressure or process' receiving queue overflowed, | 102 | be lost due to memory pressure or process' receiving queue overflowed, |
| @@ -142,32 +104,31 @@ so caller is warned that it must be prepared. That is why the struct | |||
| 142 | cn_msg [main connector's message header] contains u32 seq and u32 ack | 104 | cn_msg [main connector's message header] contains u32 seq and u32 ack |
| 143 | fields. | 105 | fields. |
| 144 | 106 | ||
| 145 | /*****************************************/ | 107 | Userspace usage |
| 146 | Userspace usage. | 108 | =============== |
| 147 | /*****************************************/ | ||
| 148 | 109 | ||
| 149 | 2.6.14 has a new netlink socket implementation, which by default does not | 110 | 2.6.14 has a new netlink socket implementation, which by default does not |
| 150 | allow people to send data to netlink groups other than 1. | 111 | allow people to send data to netlink groups other than 1. |
| 151 | So, if you wish to use a netlink socket (for example using connector) | 112 | So, if you wish to use a netlink socket (for example using connector) |
| 152 | with a different group number, the userspace application must subscribe to | 113 | with a different group number, the userspace application must subscribe to |
| 153 | that group first. It can be achieved by the following pseudocode: | 114 | that group first. It can be achieved by the following pseudocode:: |
| 154 | 115 | ||
| 155 | s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR); | 116 | s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR); |
| 156 | 117 | ||
| 157 | l_local.nl_family = AF_NETLINK; | 118 | l_local.nl_family = AF_NETLINK; |
| 158 | l_local.nl_groups = 12345; | 119 | l_local.nl_groups = 12345; |
| 159 | l_local.nl_pid = 0; | 120 | l_local.nl_pid = 0; |
| 160 | 121 | ||
| 161 | if (bind(s, (struct sockaddr *)&l_local, sizeof(struct sockaddr_nl)) == -1) { | 122 | if (bind(s, (struct sockaddr *)&l_local, sizeof(struct sockaddr_nl)) == -1) { |
| 162 | perror("bind"); | 123 | perror("bind"); |
| 163 | close(s); | 124 | close(s); |
| 164 | return -1; | 125 | return -1; |
| 165 | } | 126 | } |
| 166 | 127 | ||
| 167 | { | 128 | { |
| 168 | int on = l_local.nl_groups; | 129 | int on = l_local.nl_groups; |
| 169 | setsockopt(s, 270, 1, &on, sizeof(on)); | 130 | setsockopt(s, 270, 1, &on, sizeof(on)); |
| 170 | } | 131 | } |
| 171 | 132 | ||
| 172 | Where 270 above is SOL_NETLINK, and 1 is a NETLINK_ADD_MEMBERSHIP socket | 133 | Where 270 above is SOL_NETLINK, and 1 is a NETLINK_ADD_MEMBERSHIP socket |
| 173 | option. To drop a multicast subscription, one should call the above socket | 134 | option. To drop a multicast subscription, one should call the above socket |
| @@ -180,16 +141,15 @@ group number 12345, you must increment CN_NETLINK_USERS to that number. | |||
| 180 | Additional 0xf numbers are allocated to be used by non-in-kernel users. | 141 | Additional 0xf numbers are allocated to be used by non-in-kernel users. |
| 181 | 142 | ||
| 182 | Due to this limitation, group 0xffffffff does not work now, so one can | 143 | Due to this limitation, group 0xffffffff does not work now, so one can |
| 183 | not use add/remove connector's group notifications, but as far as I know, | 144 | not use add/remove connector's group notifications, but as far as I know, |
| 184 | only cn_test.c test module used it. | 145 | only cn_test.c test module used it. |
| 185 | 146 | ||
| 186 | Some work in netlink area is still being done, so things can be changed in | 147 | Some work in netlink area is still being done, so things can be changed in |
| 187 | 2.6.15 timeframe, if it will happen, documentation will be updated for that | 148 | 2.6.15 timeframe, if it will happen, documentation will be updated for that |
| 188 | kernel. | 149 | kernel. |
| 189 | 150 | ||
| 190 | /*****************************************/ | ||
| 191 | Code samples | 151 | Code samples |
| 192 | /*****************************************/ | 152 | ============ |
| 193 | 153 | ||
| 194 | Sample code for a connector test module and user space can be found | 154 | Sample code for a connector test module and user space can be found |
| 195 | in samples/connector/. To build this code, enable CONFIG_CONNECTOR | 155 | in samples/connector/. To build this code, enable CONFIG_CONNECTOR |
diff --git a/Documentation/console/console.txt b/Documentation/driver-api/console.rst index d73c2ab4beda..8394ad7747ac 100644 --- a/Documentation/console/console.txt +++ b/Documentation/driver-api/console.rst | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | =============== | ||
| 1 | Console Drivers | 4 | Console Drivers |
| 2 | =============== | 5 | =============== |
| 3 | 6 | ||
| @@ -17,25 +20,26 @@ of driver occupying the consoles.) They can only take over the console that is | |||
| 17 | occupied by the system driver. In the same token, if the modular driver is | 20 | occupied by the system driver. In the same token, if the modular driver is |
| 18 | released by the console, the system driver will take over. | 21 | released by the console, the system driver will take over. |
| 19 | 22 | ||
| 20 | Modular drivers, from the programmer's point of view, have to call: | 23 | Modular drivers, from the programmer's point of view, have to call:: |
| 21 | 24 | ||
| 22 | do_take_over_console() - load and bind driver to console layer | 25 | do_take_over_console() - load and bind driver to console layer |
| 23 | give_up_console() - unload driver; it will only work if driver | 26 | give_up_console() - unload driver; it will only work if driver |
| 24 | is fully unbound | 27 | is fully unbound |
| 25 | 28 | ||
| 26 | In newer kernels, the following are also available: | 29 | In newer kernels, the following are also available:: |
| 27 | 30 | ||
| 28 | do_register_con_driver() | 31 | do_register_con_driver() |
| 29 | do_unregister_con_driver() | 32 | do_unregister_con_driver() |
| 30 | 33 | ||
| 31 | If sysfs is enabled, the contents of /sys/class/vtconsole can be | 34 | If sysfs is enabled, the contents of /sys/class/vtconsole can be |
| 32 | examined. This shows the console backends currently registered by the | 35 | examined. This shows the console backends currently registered by the |
| 33 | system which are named vtcon<n> where <n> is an integer from 0 to 15. Thus: | 36 | system which are named vtcon<n> where <n> is an integer from 0 to 15. |
| 37 | Thus:: | ||
| 34 | 38 | ||
| 35 | ls /sys/class/vtconsole | 39 | ls /sys/class/vtconsole |
| 36 | . .. vtcon0 vtcon1 | 40 | . .. vtcon0 vtcon1 |
| 37 | 41 | ||
| 38 | Each directory in /sys/class/vtconsole has 3 files: | 42 | Each directory in /sys/class/vtconsole has 3 files:: |
| 39 | 43 | ||
| 40 | ls /sys/class/vtconsole/vtcon0 | 44 | ls /sys/class/vtconsole/vtcon0 |
| 41 | . .. bind name uevent | 45 | . .. bind name uevent |
| @@ -46,27 +50,29 @@ What do these files signify? | |||
| 46 | read, or acts to bind or unbind the driver to the virtual consoles | 50 | read, or acts to bind or unbind the driver to the virtual consoles |
| 47 | when written to. The possible values are: | 51 | when written to. The possible values are: |
| 48 | 52 | ||
| 49 | 0 - means the driver is not bound and if echo'ed, commands the driver | 53 | 0 |
| 54 | - means the driver is not bound and if echo'ed, commands the driver | ||
| 50 | to unbind | 55 | to unbind |
| 51 | 56 | ||
| 52 | 1 - means the driver is bound and if echo'ed, commands the driver to | 57 | 1 |
| 58 | - means the driver is bound and if echo'ed, commands the driver to | ||
| 53 | bind | 59 | bind |
| 54 | 60 | ||
| 55 | 2. name - read-only file. Shows the name of the driver in this format: | 61 | 2. name - read-only file. Shows the name of the driver in this format:: |
| 56 | 62 | ||
| 57 | cat /sys/class/vtconsole/vtcon0/name | 63 | cat /sys/class/vtconsole/vtcon0/name |
| 58 | (S) VGA+ | 64 | (S) VGA+ |
| 59 | 65 | ||
| 60 | '(S)' stands for a (S)ystem driver, i.e., it cannot be directly | 66 | '(S)' stands for a (S)ystem driver, i.e., it cannot be directly |
| 61 | commanded to bind or unbind | 67 | commanded to bind or unbind |
| 62 | 68 | ||
| 63 | 'VGA+' is the name of the driver | 69 | 'VGA+' is the name of the driver |
| 64 | 70 | ||
| 65 | cat /sys/class/vtconsole/vtcon1/name | 71 | cat /sys/class/vtconsole/vtcon1/name |
| 66 | (M) frame buffer device | 72 | (M) frame buffer device |
| 67 | 73 | ||
| 68 | In this case, '(M)' stands for a (M)odular driver, one that can be | 74 | In this case, '(M)' stands for a (M)odular driver, one that can be |
| 69 | directly commanded to bind or unbind. | 75 | directly commanded to bind or unbind. |
| 70 | 76 | ||
| 71 | 3. uevent - ignore this file | 77 | 3. uevent - ignore this file |
| 72 | 78 | ||
| @@ -75,14 +81,17 @@ driver takes over the consoles vacated by the driver. Binding, on the other | |||
| 75 | hand, will bind the driver to the consoles that are currently occupied by a | 81 | hand, will bind the driver to the consoles that are currently occupied by a |
| 76 | system driver. | 82 | system driver. |
| 77 | 83 | ||
| 78 | NOTE1: Binding and unbinding must be selected in Kconfig. It's under: | 84 | NOTE1: |
| 85 | Binding and unbinding must be selected in Kconfig. It's under:: | ||
| 79 | 86 | ||
| 80 | Device Drivers -> Character devices -> Support for binding and unbinding | 87 | Device Drivers -> |
| 81 | console drivers | 88 | Character devices -> |
| 89 | Support for binding and unbinding console drivers | ||
| 82 | 90 | ||
| 83 | NOTE2: If any of the virtual consoles are in KD_GRAPHICS mode, then binding or | 91 | NOTE2: |
| 84 | unbinding will not succeed. An example of an application that sets the console | 92 | If any of the virtual consoles are in KD_GRAPHICS mode, then binding or |
| 85 | to KD_GRAPHICS is X. | 93 | unbinding will not succeed. An example of an application that sets the |
| 94 | console to KD_GRAPHICS is X. | ||
| 86 | 95 | ||
| 87 | How useful is this feature? This is very useful for console driver | 96 | How useful is this feature? This is very useful for console driver |
| 88 | developers. By unbinding the driver from the console layer, one can unload the | 97 | developers. By unbinding the driver from the console layer, one can unload the |
| @@ -92,10 +101,10 @@ framebuffer console to VGA console and vice versa, this feature also makes | |||
| 92 | this possible. (NOTE NOTE NOTE: Please read fbcon.txt under Documentation/fb | 101 | this possible. (NOTE NOTE NOTE: Please read fbcon.txt under Documentation/fb |
| 93 | for more details.) | 102 | for more details.) |
| 94 | 103 | ||
| 95 | Notes for developers: | 104 | Notes for developers |
| 96 | ===================== | 105 | ==================== |
| 97 | 106 | ||
| 98 | do_take_over_console() is now broken up into: | 107 | do_take_over_console() is now broken up into:: |
| 99 | 108 | ||
| 100 | do_register_con_driver() | 109 | do_register_con_driver() |
| 101 | do_bind_con_driver() - private function | 110 | do_bind_con_driver() - private function |
| @@ -104,7 +113,7 @@ give_up_console() is a wrapper to do_unregister_con_driver(), and a driver must | |||
| 104 | be fully unbound for this call to succeed. con_is_bound() will check if the | 113 | be fully unbound for this call to succeed. con_is_bound() will check if the |
| 105 | driver is bound or not. | 114 | driver is bound or not. |
| 106 | 115 | ||
| 107 | Guidelines for console driver writers: | 116 | Guidelines for console driver writers |
| 108 | ===================================== | 117 | ===================================== |
| 109 | 118 | ||
| 110 | In order for binding to and unbinding from the console to properly work, | 119 | In order for binding to and unbinding from the console to properly work, |
| @@ -140,6 +149,4 @@ The current crop of console drivers should still work correctly, but binding | |||
| 140 | and unbinding them may cause problems. With minimal fixes, these drivers can | 149 | and unbinding them may cause problems. With minimal fixes, these drivers can |
| 141 | be made to work correctly. | 150 | be made to work correctly. |
| 142 | 151 | ||
| 143 | ========================== | ||
| 144 | Antonino Daplas <adaplas@pol.net> | 152 | Antonino Daplas <adaplas@pol.net> |
| 145 | |||
diff --git a/Documentation/dcdbas.txt b/Documentation/driver-api/dcdbas.rst index 309cc57a7c1c..309cc57a7c1c 100644 --- a/Documentation/dcdbas.txt +++ b/Documentation/driver-api/dcdbas.rst | |||
diff --git a/Documentation/dell_rbu.txt b/Documentation/driver-api/dell_rbu.rst index 5d1ce7bcd04d..5d1ce7bcd04d 100644 --- a/Documentation/dell_rbu.txt +++ b/Documentation/driver-api/dell_rbu.rst | |||
diff --git a/Documentation/driver-model/binding.rst b/Documentation/driver-api/driver-model/binding.rst index 7ea1d7a41e1d..7ea1d7a41e1d 100644 --- a/Documentation/driver-model/binding.rst +++ b/Documentation/driver-api/driver-model/binding.rst | |||
diff --git a/Documentation/driver-model/bus.rst b/Documentation/driver-api/driver-model/bus.rst index 016b15a6e8ea..016b15a6e8ea 100644 --- a/Documentation/driver-model/bus.rst +++ b/Documentation/driver-api/driver-model/bus.rst | |||
diff --git a/Documentation/driver-model/class.rst b/Documentation/driver-api/driver-model/class.rst index fff55b80e86a..fff55b80e86a 100644 --- a/Documentation/driver-model/class.rst +++ b/Documentation/driver-api/driver-model/class.rst | |||
diff --git a/Documentation/driver-model/design-patterns.rst b/Documentation/driver-api/driver-model/design-patterns.rst index 41eb8f41f7dd..41eb8f41f7dd 100644 --- a/Documentation/driver-model/design-patterns.rst +++ b/Documentation/driver-api/driver-model/design-patterns.rst | |||
diff --git a/Documentation/driver-model/device.rst b/Documentation/driver-api/driver-model/device.rst index 2b868d49d349..2b868d49d349 100644 --- a/Documentation/driver-model/device.rst +++ b/Documentation/driver-api/driver-model/device.rst | |||
diff --git a/Documentation/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst index 4ac99122b5f1..4ac99122b5f1 100644 --- a/Documentation/driver-model/devres.rst +++ b/Documentation/driver-api/driver-model/devres.rst | |||
diff --git a/Documentation/driver-model/driver.rst b/Documentation/driver-api/driver-model/driver.rst index 11d281506a04..11d281506a04 100644 --- a/Documentation/driver-model/driver.rst +++ b/Documentation/driver-api/driver-model/driver.rst | |||
diff --git a/Documentation/driver-model/index.rst b/Documentation/driver-api/driver-model/index.rst index 9f85d579ce56..755016422269 100644 --- a/Documentation/driver-model/index.rst +++ b/Documentation/driver-api/driver-model/index.rst | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | |||
| 3 | ============ | 1 | ============ |
| 4 | Driver Model | 2 | Driver Model |
| 5 | ============ | 3 | ============ |
diff --git a/Documentation/driver-model/overview.rst b/Documentation/driver-api/driver-model/overview.rst index d4d1e9b40e0c..d4d1e9b40e0c 100644 --- a/Documentation/driver-model/overview.rst +++ b/Documentation/driver-api/driver-model/overview.rst | |||
diff --git a/Documentation/driver-model/platform.rst b/Documentation/driver-api/driver-model/platform.rst index 334dd4071ae4..334dd4071ae4 100644 --- a/Documentation/driver-model/platform.rst +++ b/Documentation/driver-api/driver-model/platform.rst | |||
diff --git a/Documentation/driver-model/porting.rst b/Documentation/driver-api/driver-model/porting.rst index ae4bf843c1d6..931ea879af3f 100644 --- a/Documentation/driver-model/porting.rst +++ b/Documentation/driver-api/driver-model/porting.rst | |||
| @@ -9,7 +9,7 @@ Patrick Mochel | |||
| 9 | 9 | ||
| 10 | Overview | 10 | Overview |
| 11 | 11 | ||
| 12 | Please refer to `Documentation/driver-model/*.rst` for definitions of | 12 | Please refer to `Documentation/driver-api/driver-model/*.rst` for definitions of |
| 13 | various driver types and concepts. | 13 | various driver types and concepts. |
| 14 | 14 | ||
| 15 | Most of the work of porting devices drivers to the new model happens | 15 | Most of the work of porting devices drivers to the new model happens |
diff --git a/Documentation/early-userspace/buffer-format.txt b/Documentation/driver-api/early-userspace/buffer-format.rst index e1fd7f9dad16..7f74e301fdf3 100644 --- a/Documentation/early-userspace/buffer-format.txt +++ b/Documentation/driver-api/early-userspace/buffer-format.rst | |||
| @@ -1,8 +1,10 @@ | |||
| 1 | initramfs buffer format | 1 | ======================= |
| 2 | ----------------------- | 2 | initramfs buffer format |
| 3 | ======================= | ||
| 3 | 4 | ||
| 4 | Al Viro, H. Peter Anvin | 5 | Al Viro, H. Peter Anvin |
| 5 | Last revision: 2002-01-13 | 6 | |
| 7 | Last revision: 2002-01-13 | ||
| 6 | 8 | ||
| 7 | Starting with kernel 2.5.x, the old "initial ramdisk" protocol is | 9 | Starting with kernel 2.5.x, the old "initial ramdisk" protocol is |
| 8 | getting {replaced/complemented} with the new "initial ramfs" | 10 | getting {replaced/complemented} with the new "initial ramfs" |
| @@ -18,7 +20,8 @@ archive can be compressed using gzip(1). One valid version of an | |||
| 18 | initramfs buffer is thus a single .cpio.gz file. | 20 | initramfs buffer is thus a single .cpio.gz file. |
| 19 | 21 | ||
| 20 | The full format of the initramfs buffer is defined by the following | 22 | The full format of the initramfs buffer is defined by the following |
| 21 | grammar, where: | 23 | grammar, where:: |
| 24 | |||
| 22 | * is used to indicate "0 or more occurrences of" | 25 | * is used to indicate "0 or more occurrences of" |
| 23 | (|) indicates alternatives | 26 | (|) indicates alternatives |
| 24 | + indicates concatenation | 27 | + indicates concatenation |
| @@ -49,7 +52,9 @@ hexadecimal ASCII numbers fully padded with '0' on the left to the | |||
| 49 | full width of the field, for example, the integer 4780 is represented | 52 | full width of the field, for example, the integer 4780 is represented |
| 50 | by the ASCII string "000012ac"): | 53 | by the ASCII string "000012ac"): |
| 51 | 54 | ||
| 55 | ============= ================== ============================================== | ||
| 52 | Field name Field size Meaning | 56 | Field name Field size Meaning |
| 57 | ============= ================== ============================================== | ||
| 53 | c_magic 6 bytes The string "070701" or "070702" | 58 | c_magic 6 bytes The string "070701" or "070702" |
| 54 | c_ino 8 bytes File inode number | 59 | c_ino 8 bytes File inode number |
| 55 | c_mode 8 bytes File mode and permissions | 60 | c_mode 8 bytes File mode and permissions |
| @@ -65,6 +70,7 @@ c_rmin 8 bytes Minor part of device node reference | |||
| 65 | c_namesize 8 bytes Length of filename, including final \0 | 70 | c_namesize 8 bytes Length of filename, including final \0 |
| 66 | c_chksum 8 bytes Checksum of data field if c_magic is 070702; | 71 | c_chksum 8 bytes Checksum of data field if c_magic is 070702; |
| 67 | otherwise zero | 72 | otherwise zero |
| 73 | ============= ================== ============================================== | ||
| 68 | 74 | ||
| 69 | The c_mode field matches the contents of st_mode returned by stat(2) | 75 | The c_mode field matches the contents of st_mode returned by stat(2) |
| 70 | on Linux, and encodes the file type and file permissions. | 76 | on Linux, and encodes the file type and file permissions. |
| @@ -82,7 +88,8 @@ If the filename is "TRAILER!!!" this is actually an end-of-archive | |||
| 82 | marker; the c_filesize for an end-of-archive marker must be zero. | 88 | marker; the c_filesize for an end-of-archive marker must be zero. |
| 83 | 89 | ||
| 84 | 90 | ||
| 85 | *** Handling of hard links | 91 | Handling of hard links |
| 92 | ====================== | ||
| 86 | 93 | ||
| 87 | When a nondirectory with c_nlink > 1 is seen, the (c_maj,c_min,c_ino) | 94 | When a nondirectory with c_nlink > 1 is seen, the (c_maj,c_min,c_ino) |
| 88 | tuple is looked up in a tuple buffer. If not found, it is entered in | 95 | tuple is looked up in a tuple buffer. If not found, it is entered in |
diff --git a/Documentation/early-userspace/README b/Documentation/driver-api/early-userspace/early_userspace_support.rst index 955d667dc87e..3deefb34046b 100644 --- a/Documentation/early-userspace/README +++ b/Documentation/driver-api/early-userspace/early_userspace_support.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ======================= | ||
| 1 | Early userspace support | 2 | Early userspace support |
| 2 | ======================= | 3 | ======================= |
| 3 | 4 | ||
| @@ -26,6 +27,7 @@ archive to be used as the image or have the kernel build process build | |||
| 26 | the image from specifications. | 27 | the image from specifications. |
| 27 | 28 | ||
| 28 | CPIO ARCHIVE method | 29 | CPIO ARCHIVE method |
| 30 | ------------------- | ||
| 29 | 31 | ||
| 30 | You can create a cpio archive that contains the early userspace image. | 32 | You can create a cpio archive that contains the early userspace image. |
| 31 | Your cpio archive should be specified in CONFIG_INITRAMFS_SOURCE and it | 33 | Your cpio archive should be specified in CONFIG_INITRAMFS_SOURCE and it |
| @@ -34,6 +36,7 @@ CONFIG_INITRAMFS_SOURCE and directory and file names are not allowed in | |||
| 34 | combination with a cpio archive. | 36 | combination with a cpio archive. |
| 35 | 37 | ||
| 36 | IMAGE BUILDING method | 38 | IMAGE BUILDING method |
| 39 | --------------------- | ||
| 37 | 40 | ||
| 38 | The kernel build process can also build an early userspace image from | 41 | The kernel build process can also build an early userspace image from |
| 39 | source parts rather than supplying a cpio archive. This method provides | 42 | source parts rather than supplying a cpio archive. This method provides |
diff --git a/Documentation/driver-api/early-userspace/index.rst b/Documentation/driver-api/early-userspace/index.rst new file mode 100644 index 000000000000..149c1822f06d --- /dev/null +++ b/Documentation/driver-api/early-userspace/index.rst | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | =============== | ||
| 4 | Early Userspace | ||
| 5 | =============== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | early_userspace_support | ||
| 11 | buffer-format | ||
| 12 | |||
| 13 | .. only:: subproject and html | ||
| 14 | |||
| 15 | Indices | ||
| 16 | ======= | ||
| 17 | |||
| 18 | * :ref:`genindex` | ||
diff --git a/Documentation/EDID/howto.rst b/Documentation/driver-api/edid.rst index 725fd49a88ca..b1b5acd501ed 100644 --- a/Documentation/EDID/howto.rst +++ b/Documentation/driver-api/edid.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ==== | 3 | ==== |
| 4 | EDID | 4 | EDID |
diff --git a/Documentation/eisa.txt b/Documentation/driver-api/eisa.rst index f388545a85a7..c07565ba57da 100644 --- a/Documentation/eisa.txt +++ b/Documentation/driver-api/eisa.rst | |||
| @@ -103,7 +103,7 @@ id_table an array of NULL terminated EISA id strings, | |||
| 103 | (driver_data). | 103 | (driver_data). |
| 104 | 104 | ||
| 105 | driver a generic driver, such as described in | 105 | driver a generic driver, such as described in |
| 106 | Documentation/driver-model/driver.rst. Only .name, | 106 | Documentation/driver-api/driver-model/driver.rst. Only .name, |
| 107 | .probe and .remove members are mandatory. | 107 | .probe and .remove members are mandatory. |
| 108 | =============== ==================================================== | 108 | =============== ==================================================== |
| 109 | 109 | ||
| @@ -152,7 +152,7 @@ state set of flags indicating the state of the device. Current | |||
| 152 | flags are EISA_CONFIG_ENABLED and EISA_CONFIG_FORCED. | 152 | flags are EISA_CONFIG_ENABLED and EISA_CONFIG_FORCED. |
| 153 | res set of four 256 bytes I/O regions allocated to this device | 153 | res set of four 256 bytes I/O regions allocated to this device |
| 154 | dma_mask DMA mask set from the parent device. | 154 | dma_mask DMA mask set from the parent device. |
| 155 | dev generic device (see Documentation/driver-model/device.rst) | 155 | dev generic device (see Documentation/driver-api/driver-model/device.rst) |
| 156 | ======== ============================================================ | 156 | ======== ============================================================ |
| 157 | 157 | ||
| 158 | You can get the 'struct eisa_device' from 'struct device' using the | 158 | You can get the 'struct eisa_device' from 'struct device' using the |
diff --git a/Documentation/driver-api/gpio/driver.rst b/Documentation/driver-api/gpio/driver.rst index 349f2dc33029..921c71a3d683 100644 --- a/Documentation/driver-api/gpio/driver.rst +++ b/Documentation/driver-api/gpio/driver.rst | |||
| @@ -399,7 +399,7 @@ symbol: | |||
| 399 | will pass the struct gpio_chip* for the chip to all IRQ callbacks, so the | 399 | will pass the struct gpio_chip* for the chip to all IRQ callbacks, so the |
| 400 | callbacks need to embed the gpio_chip in its state container and obtain a | 400 | callbacks need to embed the gpio_chip in its state container and obtain a |
| 401 | pointer to the container using container_of(). | 401 | pointer to the container using container_of(). |
| 402 | (See Documentation/driver-model/design-patterns.rst) | 402 | (See Documentation/driver-api/driver-model/design-patterns.rst) |
| 403 | 403 | ||
| 404 | - gpiochip_irqchip_add_nested(): adds a nested cascaded irqchip to a gpiochip, | 404 | - gpiochip_irqchip_add_nested(): adds a nested cascaded irqchip to a gpiochip, |
| 405 | as discussed above regarding different types of cascaded irqchips. The | 405 | as discussed above regarding different types of cascaded irqchips. The |
diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst index 6cd750a03ea0..d12a80f386a6 100644 --- a/Documentation/driver-api/index.rst +++ b/Documentation/driver-api/index.rst | |||
| @@ -14,8 +14,10 @@ available subsections can be seen below. | |||
| 14 | .. toctree:: | 14 | .. toctree:: |
| 15 | :maxdepth: 2 | 15 | :maxdepth: 2 |
| 16 | 16 | ||
| 17 | driver-model/index | ||
| 17 | basics | 18 | basics |
| 18 | infrastructure | 19 | infrastructure |
| 20 | early-userspace/index | ||
| 19 | pm/index | 21 | pm/index |
| 20 | clk | 22 | clk |
| 21 | device-io | 23 | device-io |
| @@ -36,6 +38,7 @@ available subsections can be seen below. | |||
| 36 | i2c | 38 | i2c |
| 37 | ipmb | 39 | ipmb |
| 38 | i3c/index | 40 | i3c/index |
| 41 | interconnect | ||
| 39 | hsi | 42 | hsi |
| 40 | edac | 43 | edac |
| 41 | scsi | 44 | scsi |
| @@ -44,8 +47,11 @@ available subsections can be seen below. | |||
| 44 | mtdnand | 47 | mtdnand |
| 45 | miscellaneous | 48 | miscellaneous |
| 46 | mei/index | 49 | mei/index |
| 50 | mtd/index | ||
| 51 | mmc/index | ||
| 52 | nvdimm/index | ||
| 47 | w1 | 53 | w1 |
| 48 | rapidio | 54 | rapidio/index |
| 49 | s390-drivers | 55 | s390-drivers |
| 50 | vme | 56 | vme |
| 51 | 80211/index | 57 | 80211/index |
| @@ -53,13 +59,48 @@ available subsections can be seen below. | |||
| 53 | firmware/index | 59 | firmware/index |
| 54 | pinctl | 60 | pinctl |
| 55 | gpio/index | 61 | gpio/index |
| 62 | md/index | ||
| 56 | misc_devices | 63 | misc_devices |
| 64 | nfc/index | ||
| 57 | dmaengine/index | 65 | dmaengine/index |
| 58 | slimbus | 66 | slimbus |
| 59 | soundwire/index | 67 | soundwire/index |
| 60 | fpga/index | 68 | fpga/index |
| 61 | acpi/index | 69 | acpi/index |
| 70 | backlight/lp855x-driver.rst | ||
| 71 | bt8xxgpio | ||
| 72 | connector | ||
| 73 | console | ||
| 74 | dcdbas | ||
| 75 | dell_rbu | ||
| 76 | edid | ||
| 77 | eisa | ||
| 78 | isa | ||
| 79 | isapnp | ||
| 62 | generic-counter | 80 | generic-counter |
| 81 | lightnvm-pblk | ||
| 82 | memory-devices/index | ||
| 83 | men-chameleon-bus | ||
| 84 | ntb | ||
| 85 | nvmem | ||
| 86 | parport-lowlevel | ||
| 87 | pps | ||
| 88 | ptp | ||
| 89 | phy/index | ||
| 90 | pti_intel_mid | ||
| 91 | pwm | ||
| 92 | rfkill | ||
| 93 | serial/index | ||
| 94 | sgi-ioc4 | ||
| 95 | sm501 | ||
| 96 | smsc_ece1099 | ||
| 97 | switchtec | ||
| 98 | sync_file | ||
| 99 | vfio-mediated-device | ||
| 100 | vfio | ||
| 101 | xilinx/index | ||
| 102 | xillybus | ||
| 103 | zorro | ||
| 63 | 104 | ||
| 64 | .. only:: subproject and html | 105 | .. only:: subproject and html |
| 65 | 106 | ||
diff --git a/Documentation/interconnect/interconnect.rst b/Documentation/driver-api/interconnect.rst index 56e331dab70e..c3e004893796 100644 --- a/Documentation/interconnect/interconnect.rst +++ b/Documentation/driver-api/interconnect.rst | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | :orphan: | ||
| 4 | |||
| 5 | ===================================== | 3 | ===================================== |
| 6 | GENERIC SYSTEM INTERCONNECT SUBSYSTEM | 4 | GENERIC SYSTEM INTERCONNECT SUBSYSTEM |
| 7 | ===================================== | 5 | ===================================== |
diff --git a/Documentation/isa.txt b/Documentation/driver-api/isa.rst index def4a7b690b5..def4a7b690b5 100644 --- a/Documentation/isa.txt +++ b/Documentation/driver-api/isa.rst | |||
diff --git a/Documentation/isapnp.txt b/Documentation/driver-api/isapnp.rst index 8d0840ac847b..8d0840ac847b 100644 --- a/Documentation/isapnp.txt +++ b/Documentation/driver-api/isapnp.rst | |||
diff --git a/Documentation/lightnvm/pblk.txt b/Documentation/driver-api/lightnvm-pblk.rst index 1040ed1cec81..1040ed1cec81 100644 --- a/Documentation/lightnvm/pblk.txt +++ b/Documentation/driver-api/lightnvm-pblk.rst | |||
diff --git a/Documentation/driver-api/md/index.rst b/Documentation/driver-api/md/index.rst new file mode 100644 index 000000000000..18f54a7d7d6e --- /dev/null +++ b/Documentation/driver-api/md/index.rst | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ==== | ||
| 4 | RAID | ||
| 5 | ==== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | md-cluster | ||
| 11 | raid5-cache | ||
| 12 | raid5-ppl | ||
diff --git a/Documentation/md/md-cluster.txt b/Documentation/driver-api/md/md-cluster.rst index e1055f105cf5..96eb52cec7eb 100644 --- a/Documentation/md/md-cluster.txt +++ b/Documentation/driver-api/md/md-cluster.rst | |||
| @@ -1,19 +1,24 @@ | |||
| 1 | ========== | ||
| 2 | MD Cluster | ||
| 3 | ========== | ||
| 4 | |||
| 1 | The cluster MD is a shared-device RAID for a cluster, it supports | 5 | The cluster MD is a shared-device RAID for a cluster, it supports |
| 2 | two levels: raid1 and raid10 (limited support). | 6 | two levels: raid1 and raid10 (limited support). |
| 3 | 7 | ||
| 4 | 8 | ||
| 5 | 1. On-disk format | 9 | 1. On-disk format |
| 10 | ================= | ||
| 6 | 11 | ||
| 7 | Separate write-intent-bitmaps are used for each cluster node. | 12 | Separate write-intent-bitmaps are used for each cluster node. |
| 8 | The bitmaps record all writes that may have been started on that node, | 13 | The bitmaps record all writes that may have been started on that node, |
| 9 | and may not yet have finished. The on-disk layout is: | 14 | and may not yet have finished. The on-disk layout is:: |
| 10 | 15 | ||
| 11 | 0 4k 8k 12k | 16 | 0 4k 8k 12k |
| 12 | ------------------------------------------------------------------- | 17 | ------------------------------------------------------------------- |
| 13 | | idle | md super | bm super [0] + bits | | 18 | | idle | md super | bm super [0] + bits | |
| 14 | | bm bits[0, contd] | bm super[1] + bits | bm bits[1, contd] | | 19 | | bm bits[0, contd] | bm super[1] + bits | bm bits[1, contd] | |
| 15 | | bm super[2] + bits | bm bits [2, contd] | bm super[3] + bits | | 20 | | bm super[2] + bits | bm bits [2, contd] | bm super[3] + bits | |
| 16 | | bm bits [3, contd] | | | | 21 | | bm bits [3, contd] | | | |
| 17 | 22 | ||
| 18 | During "normal" functioning we assume the filesystem ensures that only | 23 | During "normal" functioning we assume the filesystem ensures that only |
| 19 | one node writes to any given block at a time, so a write request will | 24 | one node writes to any given block at a time, so a write request will |
| @@ -28,10 +33,12 @@ node) is writing. | |||
| 28 | 33 | ||
| 29 | 34 | ||
| 30 | 2. DLM Locks for management | 35 | 2. DLM Locks for management |
| 36 | =========================== | ||
| 31 | 37 | ||
| 32 | There are three groups of locks for managing the device: | 38 | There are three groups of locks for managing the device: |
| 33 | 39 | ||
| 34 | 2.1 Bitmap lock resource (bm_lockres) | 40 | 2.1 Bitmap lock resource (bm_lockres) |
| 41 | ------------------------------------- | ||
| 35 | 42 | ||
| 36 | The bm_lockres protects individual node bitmaps. They are named in | 43 | The bm_lockres protects individual node bitmaps. They are named in |
| 37 | the form bitmap000 for node 1, bitmap001 for node 2 and so on. When a | 44 | the form bitmap000 for node 1, bitmap001 for node 2 and so on. When a |
| @@ -48,6 +55,7 @@ There are three groups of locks for managing the device: | |||
| 48 | joins the cluster. | 55 | joins the cluster. |
| 49 | 56 | ||
| 50 | 2.2 Message passing locks | 57 | 2.2 Message passing locks |
| 58 | ------------------------- | ||
| 51 | 59 | ||
| 52 | Each node has to communicate with other nodes when starting or ending | 60 | Each node has to communicate with other nodes when starting or ending |
| 53 | resync, and for metadata superblock updates. This communication is | 61 | resync, and for metadata superblock updates. This communication is |
| @@ -55,116 +63,155 @@ There are three groups of locks for managing the device: | |||
| 55 | with the Lock Value Block (LVB) of one of the "message" lock. | 63 | with the Lock Value Block (LVB) of one of the "message" lock. |
| 56 | 64 | ||
| 57 | 2.3 new-device management | 65 | 2.3 new-device management |
| 66 | ------------------------- | ||
| 58 | 67 | ||
| 59 | A single lock: "no-new-dev" is used to co-ordinate the addition of | 68 | A single lock: "no-new-dev" is used to co-ordinate the addition of |
| 60 | new devices - this must be synchronized across the array. | 69 | new devices - this must be synchronized across the array. |
| 61 | Normally all nodes hold a concurrent-read lock on this device. | 70 | Normally all nodes hold a concurrent-read lock on this device. |
| 62 | 71 | ||
| 63 | 3. Communication | 72 | 3. Communication |
| 73 | ================ | ||
| 64 | 74 | ||
| 65 | Messages can be broadcast to all nodes, and the sender waits for all | 75 | Messages can be broadcast to all nodes, and the sender waits for all |
| 66 | other nodes to acknowledge the message before proceeding. Only one | 76 | other nodes to acknowledge the message before proceeding. Only one |
| 67 | message can be processed at a time. | 77 | message can be processed at a time. |
| 68 | 78 | ||
| 69 | 3.1 Message Types | 79 | 3.1 Message Types |
| 80 | ----------------- | ||
| 70 | 81 | ||
| 71 | There are six types of messages which are passed: | 82 | There are six types of messages which are passed: |
| 72 | 83 | ||
| 73 | 3.1.1 METADATA_UPDATED: informs other nodes that the metadata has | 84 | 3.1.1 METADATA_UPDATED |
| 85 | ^^^^^^^^^^^^^^^^^^^^^^ | ||
| 86 | |||
| 87 | informs other nodes that the metadata has | ||
| 74 | been updated, and the node must re-read the md superblock. This is | 88 | been updated, and the node must re-read the md superblock. This is |
| 75 | performed synchronously. It is primarily used to signal device | 89 | performed synchronously. It is primarily used to signal device |
| 76 | failure. | 90 | failure. |
| 77 | 91 | ||
| 78 | 3.1.2 RESYNCING: informs other nodes that a resync is initiated or | 92 | 3.1.2 RESYNCING |
| 93 | ^^^^^^^^^^^^^^^ | ||
| 94 | informs other nodes that a resync is initiated or | ||
| 79 | ended so that each node may suspend or resume the region. Each | 95 | ended so that each node may suspend or resume the region. Each |
| 80 | RESYNCING message identifies a range of the devices that the | 96 | RESYNCING message identifies a range of the devices that the |
| 81 | sending node is about to resync. This overrides any previous | 97 | sending node is about to resync. This overrides any previous |
| 82 | notification from that node: only one ranged can be resynced at a | 98 | notification from that node: only one ranged can be resynced at a |
| 83 | time per-node. | 99 | time per-node. |
| 84 | 100 | ||
| 85 | 3.1.3 NEWDISK: informs other nodes that a device is being added to | 101 | 3.1.3 NEWDISK |
| 102 | ^^^^^^^^^^^^^ | ||
| 103 | |||
| 104 | informs other nodes that a device is being added to | ||
| 86 | the array. Message contains an identifier for that device. See | 105 | the array. Message contains an identifier for that device. See |
| 87 | below for further details. | 106 | below for further details. |
| 88 | 107 | ||
| 89 | 3.1.4 REMOVE: A failed or spare device is being removed from the | 108 | 3.1.4 REMOVE |
| 109 | ^^^^^^^^^^^^ | ||
| 110 | |||
| 111 | A failed or spare device is being removed from the | ||
| 90 | array. The slot-number of the device is included in the message. | 112 | array. The slot-number of the device is included in the message. |
| 91 | 113 | ||
| 92 | 3.1.5 RE_ADD: A failed device is being re-activated - the assumption | 114 | 3.1.5 RE_ADD: |
| 115 | |||
| 116 | A failed device is being re-activated - the assumption | ||
| 93 | is that it has been determined to be working again. | 117 | is that it has been determined to be working again. |
| 94 | 118 | ||
| 95 | 3.1.6 BITMAP_NEEDS_SYNC: if a node is stopped locally but the bitmap | 119 | 3.1.6 BITMAP_NEEDS_SYNC: |
| 120 | |||
| 121 | If a node is stopped locally but the bitmap | ||
| 96 | isn't clean, then another node is informed to take the ownership of | 122 | isn't clean, then another node is informed to take the ownership of |
| 97 | resync. | 123 | resync. |
| 98 | 124 | ||
| 99 | 3.2 Communication mechanism | 125 | 3.2 Communication mechanism |
| 126 | --------------------------- | ||
| 100 | 127 | ||
| 101 | The DLM LVB is used to communicate within nodes of the cluster. There | 128 | The DLM LVB is used to communicate within nodes of the cluster. There |
| 102 | are three resources used for the purpose: | 129 | are three resources used for the purpose: |
| 103 | 130 | ||
| 104 | 3.2.1 token: The resource which protects the entire communication | 131 | 3.2.1 token |
| 132 | ^^^^^^^^^^^ | ||
| 133 | The resource which protects the entire communication | ||
| 105 | system. The node having the token resource is allowed to | 134 | system. The node having the token resource is allowed to |
| 106 | communicate. | 135 | communicate. |
| 107 | 136 | ||
| 108 | 3.2.2 message: The lock resource which carries the data to | 137 | 3.2.2 message |
| 109 | communicate. | 138 | ^^^^^^^^^^^^^ |
| 139 | The lock resource which carries the data to communicate. | ||
| 110 | 140 | ||
| 111 | 3.2.3 ack: The resource, acquiring which means the message has been | 141 | 3.2.3 ack |
| 142 | ^^^^^^^^^ | ||
| 143 | |||
| 144 | The resource, acquiring which means the message has been | ||
| 112 | acknowledged by all nodes in the cluster. The BAST of the resource | 145 | acknowledged by all nodes in the cluster. The BAST of the resource |
| 113 | is used to inform the receiving node that a node wants to | 146 | is used to inform the receiving node that a node wants to |
| 114 | communicate. | 147 | communicate. |
| 115 | 148 | ||
| 116 | The algorithm is: | 149 | The algorithm is: |
| 117 | 150 | ||
| 118 | 1. receive status - all nodes have concurrent-reader lock on "ack". | 151 | 1. receive status - all nodes have concurrent-reader lock on "ack":: |
| 152 | |||
| 153 | sender receiver receiver | ||
| 154 | "ack":CR "ack":CR "ack":CR | ||
| 119 | 155 | ||
| 120 | sender receiver receiver | 156 | 2. sender get EX on "token", |
| 121 | "ack":CR "ack":CR "ack":CR | 157 | sender get EX on "message":: |
| 122 | 158 | ||
| 123 | 2. sender get EX on "token" | 159 | sender receiver receiver |
| 124 | sender get EX on "message" | 160 | "token":EX "ack":CR "ack":CR |
| 125 | sender receiver receiver | 161 | "message":EX |
| 126 | "token":EX "ack":CR "ack":CR | 162 | "ack":CR |
| 127 | "message":EX | ||
| 128 | "ack":CR | ||
| 129 | 163 | ||
| 130 | Sender checks that it still needs to send a message. Messages | 164 | Sender checks that it still needs to send a message. Messages |
| 131 | received or other events that happened while waiting for the | 165 | received or other events that happened while waiting for the |
| 132 | "token" may have made this message inappropriate or redundant. | 166 | "token" may have made this message inappropriate or redundant. |
| 133 | 167 | ||
| 134 | 3. sender writes LVB. | 168 | 3. sender writes LVB |
| 169 | |||
| 135 | sender down-convert "message" from EX to CW | 170 | sender down-convert "message" from EX to CW |
| 171 | |||
| 136 | sender try to get EX of "ack" | 172 | sender try to get EX of "ack" |
| 137 | [ wait until all receivers have *processed* the "message" ] | ||
| 138 | 173 | ||
| 139 | [ triggered by bast of "ack" ] | 174 | :: |
| 140 | receiver get CR on "message" | 175 | |
| 141 | receiver read LVB | 176 | [ wait until all receivers have *processed* the "message" ] |
| 142 | receiver processes the message | ||
| 143 | [ wait finish ] | ||
| 144 | receiver releases "ack" | ||
| 145 | receiver tries to get PR on "message" | ||
| 146 | 177 | ||
| 147 | sender receiver receiver | 178 | [ triggered by bast of "ack" ] |
| 148 | "token":EX "message":CR "message":CR | 179 | receiver get CR on "message" |
| 149 | "message":CW | 180 | receiver read LVB |
| 150 | "ack":EX | 181 | receiver processes the message |
| 182 | [ wait finish ] | ||
| 183 | receiver releases "ack" | ||
| 184 | receiver tries to get PR on "message" | ||
| 185 | |||
| 186 | sender receiver receiver | ||
| 187 | "token":EX "message":CR "message":CR | ||
| 188 | "message":CW | ||
| 189 | "ack":EX | ||
| 151 | 190 | ||
| 152 | 4. triggered by grant of EX on "ack" (indicating all receivers | 191 | 4. triggered by grant of EX on "ack" (indicating all receivers |
| 153 | have processed message) | 192 | have processed message) |
| 193 | |||
| 154 | sender down-converts "ack" from EX to CR | 194 | sender down-converts "ack" from EX to CR |
| 195 | |||
| 155 | sender releases "message" | 196 | sender releases "message" |
| 197 | |||
| 156 | sender releases "token" | 198 | sender releases "token" |
| 157 | receiver upconvert to PR on "message" | ||
| 158 | receiver get CR of "ack" | ||
| 159 | receiver release "message" | ||
| 160 | 199 | ||
| 161 | sender receiver receiver | 200 | :: |
| 162 | "ack":CR "ack":CR "ack":CR | 201 | |
| 202 | receiver upconvert to PR on "message" | ||
| 203 | receiver get CR of "ack" | ||
| 204 | receiver release "message" | ||
| 205 | |||
| 206 | sender receiver receiver | ||
| 207 | "ack":CR "ack":CR "ack":CR | ||
| 163 | 208 | ||
| 164 | 209 | ||
| 165 | 4. Handling Failures | 210 | 4. Handling Failures |
| 211 | ==================== | ||
| 166 | 212 | ||
| 167 | 4.1 Node Failure | 213 | 4.1 Node Failure |
| 214 | ---------------- | ||
| 168 | 215 | ||
| 169 | When a node fails, the DLM informs the cluster with the slot | 216 | When a node fails, the DLM informs the cluster with the slot |
| 170 | number. The node starts a cluster recovery thread. The cluster | 217 | number. The node starts a cluster recovery thread. The cluster |
| @@ -177,11 +224,11 @@ The algorithm is: | |||
| 177 | - cleans the bitmap of the failed node | 224 | - cleans the bitmap of the failed node |
| 178 | - releases bitmap<number> lock of the failed node | 225 | - releases bitmap<number> lock of the failed node |
| 179 | - initiates resync of the bitmap on the current node | 226 | - initiates resync of the bitmap on the current node |
| 180 | md_check_recovery is invoked within recover_bitmaps, | 227 | md_check_recovery is invoked within recover_bitmaps, |
| 181 | then md_check_recovery -> metadata_update_start/finish, | 228 | then md_check_recovery -> metadata_update_start/finish, |
| 182 | it will lock the communication by lock_comm. | 229 | it will lock the communication by lock_comm. |
| 183 | Which means when one node is resyncing it blocks all | 230 | Which means when one node is resyncing it blocks all |
| 184 | other nodes from writing anywhere on the array. | 231 | other nodes from writing anywhere on the array. |
| 185 | 232 | ||
| 186 | The resync process is the regular md resync. However, in a clustered | 233 | The resync process is the regular md resync. However, in a clustered |
| 187 | environment when a resync is performed, it needs to tell other nodes | 234 | environment when a resync is performed, it needs to tell other nodes |
| @@ -198,6 +245,7 @@ The algorithm is: | |||
| 198 | particular I/O range should be suspended or not. | 245 | particular I/O range should be suspended or not. |
| 199 | 246 | ||
| 200 | 4.2 Device Failure | 247 | 4.2 Device Failure |
| 248 | ================== | ||
| 201 | 249 | ||
| 202 | Device failures are handled and communicated with the metadata update | 250 | Device failures are handled and communicated with the metadata update |
| 203 | routine. When a node detects a device failure it does not allow | 251 | routine. When a node detects a device failure it does not allow |
| @@ -205,38 +253,41 @@ The algorithm is: | |||
| 205 | acknowledged by all other nodes. | 253 | acknowledged by all other nodes. |
| 206 | 254 | ||
| 207 | 5. Adding a new Device | 255 | 5. Adding a new Device |
| 256 | ---------------------- | ||
| 208 | 257 | ||
| 209 | For adding a new device, it is necessary that all nodes "see" the new | 258 | For adding a new device, it is necessary that all nodes "see" the new |
| 210 | device to be added. For this, the following algorithm is used: | 259 | device to be added. For this, the following algorithm is used: |
| 211 | 260 | ||
| 212 | 1. Node 1 issues mdadm --manage /dev/mdX --add /dev/sdYY which issues | 261 | 1. Node 1 issues mdadm --manage /dev/mdX --add /dev/sdYY which issues |
| 213 | ioctl(ADD_NEW_DISK with disc.state set to MD_DISK_CLUSTER_ADD) | 262 | ioctl(ADD_NEW_DISK with disc.state set to MD_DISK_CLUSTER_ADD) |
| 214 | 2. Node 1 sends a NEWDISK message with uuid and slot number | 263 | 2. Node 1 sends a NEWDISK message with uuid and slot number |
| 215 | 3. Other nodes issue kobject_uevent_env with uuid and slot number | 264 | 3. Other nodes issue kobject_uevent_env with uuid and slot number |
| 216 | (Steps 4,5 could be a udev rule) | 265 | (Steps 4,5 could be a udev rule) |
| 217 | 4. In userspace, the node searches for the disk, perhaps | 266 | 4. In userspace, the node searches for the disk, perhaps |
| 218 | using blkid -t SUB_UUID="" | 267 | using blkid -t SUB_UUID="" |
| 219 | 5. Other nodes issue either of the following depending on whether | 268 | 5. Other nodes issue either of the following depending on whether |
| 220 | the disk was found: | 269 | the disk was found: |
| 221 | ioctl(ADD_NEW_DISK with disc.state set to MD_DISK_CANDIDATE and | 270 | ioctl(ADD_NEW_DISK with disc.state set to MD_DISK_CANDIDATE and |
| 222 | disc.number set to slot number) | 271 | disc.number set to slot number) |
| 223 | ioctl(CLUSTERED_DISK_NACK) | 272 | ioctl(CLUSTERED_DISK_NACK) |
| 224 | 6. Other nodes drop lock on "no-new-devs" (CR) if device is found | 273 | 6. Other nodes drop lock on "no-new-devs" (CR) if device is found |
| 225 | 7. Node 1 attempts EX lock on "no-new-dev" | 274 | 7. Node 1 attempts EX lock on "no-new-dev" |
| 226 | 8. If node 1 gets the lock, it sends METADATA_UPDATED after | 275 | 8. If node 1 gets the lock, it sends METADATA_UPDATED after |
| 227 | unmarking the disk as SpareLocal | 276 | unmarking the disk as SpareLocal |
| 228 | 9. If not (get "no-new-dev" lock), it fails the operation and sends | 277 | 9. If not (get "no-new-dev" lock), it fails the operation and sends |
| 229 | METADATA_UPDATED. | 278 | METADATA_UPDATED. |
| 230 | 10. Other nodes get the information whether a disk is added or not | 279 | 10. Other nodes get the information whether a disk is added or not |
| 231 | by the following METADATA_UPDATED. | 280 | by the following METADATA_UPDATED. |
| 232 | 281 | ||
| 233 | 6. Module interface. | 282 | 6. Module interface |
| 283 | =================== | ||
| 234 | 284 | ||
| 235 | There are 17 call-backs which the md core can make to the cluster | 285 | There are 17 call-backs which the md core can make to the cluster |
| 236 | module. Understanding these can give a good overview of the whole | 286 | module. Understanding these can give a good overview of the whole |
| 237 | process. | 287 | process. |
| 238 | 288 | ||
| 239 | 6.1 join(nodes) and leave() | 289 | 6.1 join(nodes) and leave() |
| 290 | --------------------------- | ||
| 240 | 291 | ||
| 241 | These are called when an array is started with a clustered bitmap, | 292 | These are called when an array is started with a clustered bitmap, |
| 242 | and when the array is stopped. join() ensures the cluster is | 293 | and when the array is stopped. join() ensures the cluster is |
| @@ -244,11 +295,13 @@ The algorithm is: | |||
| 244 | Only the first 'nodes' nodes in the cluster can use the array. | 295 | Only the first 'nodes' nodes in the cluster can use the array. |
| 245 | 296 | ||
| 246 | 6.2 slot_number() | 297 | 6.2 slot_number() |
| 298 | ----------------- | ||
| 247 | 299 | ||
| 248 | Reports the slot number advised by the cluster infrastructure. | 300 | Reports the slot number advised by the cluster infrastructure. |
| 249 | Range is from 0 to nodes-1. | 301 | Range is from 0 to nodes-1. |
| 250 | 302 | ||
| 251 | 6.3 resync_info_update() | 303 | 6.3 resync_info_update() |
| 304 | ------------------------ | ||
| 252 | 305 | ||
| 253 | This updates the resync range that is stored in the bitmap lock. | 306 | This updates the resync range that is stored in the bitmap lock. |
| 254 | The starting point is updated as the resync progresses. The | 307 | The starting point is updated as the resync progresses. The |
| @@ -256,6 +309,7 @@ The algorithm is: | |||
| 256 | It does *not* send a RESYNCING message. | 309 | It does *not* send a RESYNCING message. |
| 257 | 310 | ||
| 258 | 6.4 resync_start(), resync_finish() | 311 | 6.4 resync_start(), resync_finish() |
| 312 | ----------------------------------- | ||
| 259 | 313 | ||
| 260 | These are called when resync/recovery/reshape starts or stops. | 314 | These are called when resync/recovery/reshape starts or stops. |
| 261 | They update the resyncing range in the bitmap lock and also | 315 | They update the resyncing range in the bitmap lock and also |
| @@ -265,8 +319,8 @@ The algorithm is: | |||
| 265 | resync_finish() also sends a BITMAP_NEEDS_SYNC message which | 319 | resync_finish() also sends a BITMAP_NEEDS_SYNC message which |
| 266 | allows some other node to take over. | 320 | allows some other node to take over. |
| 267 | 321 | ||
| 268 | 6.5 metadata_update_start(), metadata_update_finish(), | 322 | 6.5 metadata_update_start(), metadata_update_finish(), metadata_update_cancel() |
| 269 | metadata_update_cancel(). | 323 | ------------------------------------------------------------------------------- |
| 270 | 324 | ||
| 271 | metadata_update_start is used to get exclusive access to | 325 | metadata_update_start is used to get exclusive access to |
| 272 | the metadata. If a change is still needed once that access is | 326 | the metadata. If a change is still needed once that access is |
| @@ -275,6 +329,7 @@ The algorithm is: | |||
| 275 | can be used to release the lock. | 329 | can be used to release the lock. |
| 276 | 330 | ||
| 277 | 6.6 area_resyncing() | 331 | 6.6 area_resyncing() |
| 332 | -------------------- | ||
| 278 | 333 | ||
| 279 | This combines two elements of functionality. | 334 | This combines two elements of functionality. |
| 280 | 335 | ||
| @@ -289,6 +344,7 @@ The algorithm is: | |||
| 289 | a node failure. | 344 | a node failure. |
| 290 | 345 | ||
| 291 | 6.7 add_new_disk_start(), add_new_disk_finish(), new_disk_ack() | 346 | 6.7 add_new_disk_start(), add_new_disk_finish(), new_disk_ack() |
| 347 | --------------------------------------------------------------- | ||
| 292 | 348 | ||
| 293 | These are used to manage the new-disk protocol described above. | 349 | These are used to manage the new-disk protocol described above. |
| 294 | When a new device is added, add_new_disk_start() is called before | 350 | When a new device is added, add_new_disk_start() is called before |
| @@ -300,17 +356,20 @@ The algorithm is: | |||
| 300 | new_disk_ack() is called. | 356 | new_disk_ack() is called. |
| 301 | 357 | ||
| 302 | 6.8 remove_disk() | 358 | 6.8 remove_disk() |
| 359 | ----------------- | ||
| 303 | 360 | ||
| 304 | This is called when a spare or failed device is removed from | 361 | This is called when a spare or failed device is removed from |
| 305 | the array. It causes a REMOVE message to be send to other nodes. | 362 | the array. It causes a REMOVE message to be send to other nodes. |
| 306 | 363 | ||
| 307 | 6.9 gather_bitmaps() | 364 | 6.9 gather_bitmaps() |
| 365 | -------------------- | ||
| 308 | 366 | ||
| 309 | This sends a RE_ADD message to all other nodes and then | 367 | This sends a RE_ADD message to all other nodes and then |
| 310 | gathers bitmap information from all bitmaps. This combined | 368 | gathers bitmap information from all bitmaps. This combined |
| 311 | bitmap is then used to recovery the re-added device. | 369 | bitmap is then used to recovery the re-added device. |
| 312 | 370 | ||
| 313 | 6.10 lock_all_bitmaps() and unlock_all_bitmaps() | 371 | 6.10 lock_all_bitmaps() and unlock_all_bitmaps() |
| 372 | ------------------------------------------------ | ||
| 314 | 373 | ||
| 315 | These are called when change bitmap to none. If a node plans | 374 | These are called when change bitmap to none. If a node plans |
| 316 | to clear the cluster raid's bitmap, it need to make sure no other | 375 | to clear the cluster raid's bitmap, it need to make sure no other |
| @@ -319,6 +378,7 @@ The algorithm is: | |||
| 319 | accordingly. | 378 | accordingly. |
| 320 | 379 | ||
| 321 | 7. Unsupported features | 380 | 7. Unsupported features |
| 381 | ======================= | ||
| 322 | 382 | ||
| 323 | There are somethings which are not supported by cluster MD yet. | 383 | There are somethings which are not supported by cluster MD yet. |
| 324 | 384 | ||
diff --git a/Documentation/md/raid5-cache.txt b/Documentation/driver-api/md/raid5-cache.rst index 2b210f295786..d7a15f44a7c3 100644 --- a/Documentation/md/raid5-cache.txt +++ b/Documentation/driver-api/md/raid5-cache.rst | |||
| @@ -1,4 +1,6 @@ | |||
| 1 | RAID5 cache | 1 | ================ |
| 2 | RAID 4/5/6 cache | ||
| 3 | ================ | ||
| 2 | 4 | ||
| 3 | Raid 4/5/6 could include an extra disk for data cache besides normal RAID | 5 | Raid 4/5/6 could include an extra disk for data cache besides normal RAID |
| 4 | disks. The role of RAID disks isn't changed with the cache disk. The cache disk | 6 | disks. The role of RAID disks isn't changed with the cache disk. The cache disk |
| @@ -6,19 +8,19 @@ caches data to the RAID disks. The cache can be in write-through (supported | |||
| 6 | since 4.4) or write-back mode (supported since 4.10). mdadm (supported since | 8 | since 4.4) or write-back mode (supported since 4.10). mdadm (supported since |
| 7 | 3.4) has a new option '--write-journal' to create array with cache. Please | 9 | 3.4) has a new option '--write-journal' to create array with cache. Please |
| 8 | refer to mdadm manual for details. By default (RAID array starts), the cache is | 10 | refer to mdadm manual for details. By default (RAID array starts), the cache is |
| 9 | in write-through mode. A user can switch it to write-back mode by: | 11 | in write-through mode. A user can switch it to write-back mode by:: |
| 10 | 12 | ||
| 11 | echo "write-back" > /sys/block/md0/md/journal_mode | 13 | echo "write-back" > /sys/block/md0/md/journal_mode |
| 12 | 14 | ||
| 13 | And switch it back to write-through mode by: | 15 | And switch it back to write-through mode by:: |
| 14 | 16 | ||
| 15 | echo "write-through" > /sys/block/md0/md/journal_mode | 17 | echo "write-through" > /sys/block/md0/md/journal_mode |
| 16 | 18 | ||
| 17 | In both modes, all writes to the array will hit cache disk first. This means | 19 | In both modes, all writes to the array will hit cache disk first. This means |
| 18 | the cache disk must be fast and sustainable. | 20 | the cache disk must be fast and sustainable. |
| 19 | 21 | ||
| 20 | ------------------------------------- | 22 | write-through mode |
| 21 | write-through mode: | 23 | ================== |
| 22 | 24 | ||
| 23 | This mode mainly fixes the 'write hole' issue. For RAID 4/5/6 array, an unclean | 25 | This mode mainly fixes the 'write hole' issue. For RAID 4/5/6 array, an unclean |
| 24 | shutdown can cause data in some stripes to not be in consistent state, eg, data | 26 | shutdown can cause data in some stripes to not be in consistent state, eg, data |
| @@ -42,8 +44,8 @@ exposed to 'write hole' again. | |||
| 42 | In write-through mode, the cache disk isn't required to be big. Several | 44 | In write-through mode, the cache disk isn't required to be big. Several |
| 43 | hundreds megabytes are enough. | 45 | hundreds megabytes are enough. |
| 44 | 46 | ||
| 45 | -------------------------------------- | 47 | write-back mode |
| 46 | write-back mode: | 48 | =============== |
| 47 | 49 | ||
| 48 | write-back mode fixes the 'write hole' issue too, since all write data is | 50 | write-back mode fixes the 'write hole' issue too, since all write data is |
| 49 | cached on cache disk. But the main goal of 'write-back' cache is to speed up | 51 | cached on cache disk. But the main goal of 'write-back' cache is to speed up |
| @@ -64,16 +66,16 @@ data loss. | |||
| 64 | In write-back mode, MD also caches data in memory. The memory cache includes | 66 | In write-back mode, MD also caches data in memory. The memory cache includes |
| 65 | the same data stored on cache disk, so a power loss doesn't cause data loss. | 67 | the same data stored on cache disk, so a power loss doesn't cause data loss. |
| 66 | The memory cache size has performance impact for the array. It's recommended | 68 | The memory cache size has performance impact for the array. It's recommended |
| 67 | the size is big. A user can configure the size by: | 69 | the size is big. A user can configure the size by:: |
| 68 | 70 | ||
| 69 | echo "2048" > /sys/block/md0/md/stripe_cache_size | 71 | echo "2048" > /sys/block/md0/md/stripe_cache_size |
| 70 | 72 | ||
| 71 | Too small cache disk will make the write aggregation less efficient in this | 73 | Too small cache disk will make the write aggregation less efficient in this |
| 72 | mode depending on the workloads. It's recommended to use a cache disk with at | 74 | mode depending on the workloads. It's recommended to use a cache disk with at |
| 73 | least several gigabytes size in write-back mode. | 75 | least several gigabytes size in write-back mode. |
| 74 | 76 | ||
| 75 | -------------------------------------- | 77 | The implementation |
| 76 | The implementation: | 78 | ================== |
| 77 | 79 | ||
| 78 | The write-through and write-back cache use the same disk format. The cache disk | 80 | The write-through and write-back cache use the same disk format. The cache disk |
| 79 | is organized as a simple write log. The log consists of 'meta data' and 'data' | 81 | is organized as a simple write log. The log consists of 'meta data' and 'data' |
diff --git a/Documentation/md/raid5-ppl.txt b/Documentation/driver-api/md/raid5-ppl.rst index bfa092589e00..357e5515bc55 100644 --- a/Documentation/md/raid5-ppl.txt +++ b/Documentation/driver-api/md/raid5-ppl.rst | |||
| @@ -1,4 +1,6 @@ | |||
| 1 | ================== | ||
| 1 | Partial Parity Log | 2 | Partial Parity Log |
| 3 | ================== | ||
| 2 | 4 | ||
| 3 | Partial Parity Log (PPL) is a feature available for RAID5 arrays. The issue | 5 | Partial Parity Log (PPL) is a feature available for RAID5 arrays. The issue |
| 4 | addressed by PPL is that after a dirty shutdown, parity of a particular stripe | 6 | addressed by PPL is that after a dirty shutdown, parity of a particular stripe |
diff --git a/Documentation/driver-api/memory-devices/index.rst b/Documentation/driver-api/memory-devices/index.rst new file mode 100644 index 000000000000..28101458cda5 --- /dev/null +++ b/Documentation/driver-api/memory-devices/index.rst | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ========================= | ||
| 4 | Memory Controller drivers | ||
| 5 | ========================= | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | ti-emif | ||
| 11 | ti-gpmc | ||
| 12 | |||
| 13 | .. only:: subproject and html | ||
| 14 | |||
| 15 | Indices | ||
| 16 | ======= | ||
| 17 | |||
| 18 | * :ref:`genindex` | ||
diff --git a/Documentation/memory-devices/ti-emif.txt b/Documentation/driver-api/memory-devices/ti-emif.rst index f4ad9a7d0f4b..dea2ad9bcd7e 100644 --- a/Documentation/memory-devices/ti-emif.txt +++ b/Documentation/driver-api/memory-devices/ti-emif.rst | |||
| @@ -1,20 +1,24 @@ | |||
| 1 | TI EMIF SDRAM Controller Driver: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | |||
| 3 | =============================== | ||
| 4 | TI EMIF SDRAM Controller Driver | ||
| 5 | =============================== | ||
| 2 | 6 | ||
| 3 | Author | 7 | Author |
| 4 | ======== | 8 | ====== |
| 5 | Aneesh V <aneesh@ti.com> | 9 | Aneesh V <aneesh@ti.com> |
| 6 | 10 | ||
| 7 | Location | 11 | Location |
| 8 | ============ | 12 | ======== |
| 9 | driver/memory/emif.c | 13 | driver/memory/emif.c |
| 10 | 14 | ||
| 11 | Supported SoCs: | 15 | Supported SoCs: |
| 12 | =================== | 16 | =============== |
| 13 | TI OMAP44xx | 17 | TI OMAP44xx |
| 14 | TI OMAP54xx | 18 | TI OMAP54xx |
| 15 | 19 | ||
| 16 | Menuconfig option: | 20 | Menuconfig option: |
| 17 | ========================== | 21 | ================== |
| 18 | Device Drivers | 22 | Device Drivers |
| 19 | Memory devices | 23 | Memory devices |
| 20 | Texas Instruments EMIF driver | 24 | Texas Instruments EMIF driver |
| @@ -29,10 +33,11 @@ functions of the driver includes re-configuring AC timing | |||
| 29 | parameters and other settings during frequency, voltage and | 33 | parameters and other settings during frequency, voltage and |
| 30 | temperature changes | 34 | temperature changes |
| 31 | 35 | ||
| 32 | Platform Data (see include/linux/platform_data/emif_plat.h): | 36 | Platform Data (see include/linux/platform_data/emif_plat.h) |
| 33 | ===================================================================== | 37 | =========================================================== |
| 34 | DDR device details and other board dependent and SoC dependent | 38 | DDR device details and other board dependent and SoC dependent |
| 35 | information can be passed through platform data (struct emif_platform_data) | 39 | information can be passed through platform data (struct emif_platform_data) |
| 40 | |||
| 36 | - DDR device details: 'struct ddr_device_info' | 41 | - DDR device details: 'struct ddr_device_info' |
| 37 | - Device AC timings: 'struct lpddr2_timings' and 'struct lpddr2_min_tck' | 42 | - Device AC timings: 'struct lpddr2_timings' and 'struct lpddr2_min_tck' |
| 38 | - Custom configurations: customizable policy options through | 43 | - Custom configurations: customizable policy options through |
| @@ -40,17 +45,19 @@ information can be passed through platform data (struct emif_platform_data) | |||
| 40 | - IP revision | 45 | - IP revision |
| 41 | - PHY type | 46 | - PHY type |
| 42 | 47 | ||
| 43 | Interface to the external world: | 48 | Interface to the external world |
| 44 | ================================ | 49 | =============================== |
| 45 | EMIF driver registers notifiers for voltage and frequency changes | 50 | EMIF driver registers notifiers for voltage and frequency changes |
| 46 | affecting EMIF and takes appropriate actions when these are invoked. | 51 | affecting EMIF and takes appropriate actions when these are invoked. |
| 52 | |||
| 47 | - freq_pre_notify_handling() | 53 | - freq_pre_notify_handling() |
| 48 | - freq_post_notify_handling() | 54 | - freq_post_notify_handling() |
| 49 | - volt_notify_handling() | 55 | - volt_notify_handling() |
| 50 | 56 | ||
| 51 | Debugfs | 57 | Debugfs |
| 52 | ======== | 58 | ======= |
| 53 | The driver creates two debugfs entries per device. | 59 | The driver creates two debugfs entries per device. |
| 60 | |||
| 54 | - regcache_dump : dump of register values calculated and saved for all | 61 | - regcache_dump : dump of register values calculated and saved for all |
| 55 | frequencies used so far. | 62 | frequencies used so far. |
| 56 | - mr4 : last polled value of MR4 register in the LPDDR2 device. MR4 | 63 | - mr4 : last polled value of MR4 register in the LPDDR2 device. MR4 |
diff --git a/Documentation/bus-devices/ti-gpmc.txt b/Documentation/driver-api/memory-devices/ti-gpmc.rst index cc9ce57e0a26..33efcb81f080 100644 --- a/Documentation/bus-devices/ti-gpmc.txt +++ b/Documentation/driver-api/memory-devices/ti-gpmc.rst | |||
| @@ -1,8 +1,12 @@ | |||
| 1 | GPMC (General Purpose Memory Controller): | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | ========================================= | 2 | |
| 3 | ======================================== | ||
| 4 | GPMC (General Purpose Memory Controller) | ||
| 5 | ======================================== | ||
| 3 | 6 | ||
| 4 | GPMC is an unified memory controller dedicated to interfacing external | 7 | GPMC is an unified memory controller dedicated to interfacing external |
| 5 | memory devices like | 8 | memory devices like |
| 9 | |||
| 6 | * Asynchronous SRAM like memories and application specific integrated | 10 | * Asynchronous SRAM like memories and application specific integrated |
| 7 | circuit devices. | 11 | circuit devices. |
| 8 | * Asynchronous, synchronous, and page mode burst NOR flash devices | 12 | * Asynchronous, synchronous, and page mode burst NOR flash devices |
| @@ -48,75 +52,128 @@ most of the datasheets & hardware (to be exact none of those supported | |||
| 48 | in mainline having custom timing routine) and by simulation. | 52 | in mainline having custom timing routine) and by simulation. |
| 49 | 53 | ||
| 50 | gpmc timing dependency on peripheral timings: | 54 | gpmc timing dependency on peripheral timings: |
| 55 | |||
| 51 | [<gpmc_timing>: <peripheral timing1>, <peripheral timing2> ...] | 56 | [<gpmc_timing>: <peripheral timing1>, <peripheral timing2> ...] |
| 52 | 57 | ||
| 53 | 1. common | 58 | 1. common |
| 54 | cs_on: t_ceasu | 59 | |
| 55 | adv_on: t_avdasu, t_ceavd | 60 | cs_on: |
| 61 | t_ceasu | ||
| 62 | adv_on: | ||
| 63 | t_avdasu, t_ceavd | ||
| 56 | 64 | ||
| 57 | 2. sync common | 65 | 2. sync common |
| 58 | sync_clk: clk | 66 | |
| 59 | page_burst_access: t_bacc | 67 | sync_clk: |
| 60 | clk_activation: t_ces, t_avds | 68 | clk |
| 69 | page_burst_access: | ||
| 70 | t_bacc | ||
| 71 | clk_activation: | ||
| 72 | t_ces, t_avds | ||
| 61 | 73 | ||
| 62 | 3. read async muxed | 74 | 3. read async muxed |
| 63 | adv_rd_off: t_avdp_r | 75 | |
| 64 | oe_on: t_oeasu, t_aavdh | 76 | adv_rd_off: |
| 65 | access: t_iaa, t_oe, t_ce, t_aa | 77 | t_avdp_r |
| 66 | rd_cycle: t_rd_cycle, t_cez_r, t_oez | 78 | oe_on: |
| 79 | t_oeasu, t_aavdh | ||
| 80 | access: | ||
| 81 | t_iaa, t_oe, t_ce, t_aa | ||
| 82 | rd_cycle: | ||
| 83 | t_rd_cycle, t_cez_r, t_oez | ||
| 67 | 84 | ||
| 68 | 4. read async non-muxed | 85 | 4. read async non-muxed |
| 69 | adv_rd_off: t_avdp_r | 86 | |
| 70 | oe_on: t_oeasu | 87 | adv_rd_off: |
| 71 | access: t_iaa, t_oe, t_ce, t_aa | 88 | t_avdp_r |
| 72 | rd_cycle: t_rd_cycle, t_cez_r, t_oez | 89 | oe_on: |
| 90 | t_oeasu | ||
| 91 | access: | ||
| 92 | t_iaa, t_oe, t_ce, t_aa | ||
| 93 | rd_cycle: | ||
| 94 | t_rd_cycle, t_cez_r, t_oez | ||
| 73 | 95 | ||
| 74 | 5. read sync muxed | 96 | 5. read sync muxed |
| 75 | adv_rd_off: t_avdp_r, t_avdh | 97 | |
| 76 | oe_on: t_oeasu, t_ach, cyc_aavdh_oe | 98 | adv_rd_off: |
| 77 | access: t_iaa, cyc_iaa, cyc_oe | 99 | t_avdp_r, t_avdh |
| 78 | rd_cycle: t_cez_r, t_oez, t_ce_rdyz | 100 | oe_on: |
| 101 | t_oeasu, t_ach, cyc_aavdh_oe | ||
| 102 | access: | ||
| 103 | t_iaa, cyc_iaa, cyc_oe | ||
| 104 | rd_cycle: | ||
| 105 | t_cez_r, t_oez, t_ce_rdyz | ||
| 79 | 106 | ||
| 80 | 6. read sync non-muxed | 107 | 6. read sync non-muxed |
| 81 | adv_rd_off: t_avdp_r | 108 | |
| 82 | oe_on: t_oeasu | 109 | adv_rd_off: |
| 83 | access: t_iaa, cyc_iaa, cyc_oe | 110 | t_avdp_r |
| 84 | rd_cycle: t_cez_r, t_oez, t_ce_rdyz | 111 | oe_on: |
| 112 | t_oeasu | ||
| 113 | access: | ||
| 114 | t_iaa, cyc_iaa, cyc_oe | ||
| 115 | rd_cycle: | ||
| 116 | t_cez_r, t_oez, t_ce_rdyz | ||
| 85 | 117 | ||
| 86 | 7. write async muxed | 118 | 7. write async muxed |
| 87 | adv_wr_off: t_avdp_w | 119 | |
| 88 | we_on, wr_data_mux_bus: t_weasu, t_aavdh, cyc_aavhd_we | 120 | adv_wr_off: |
| 89 | we_off: t_wpl | 121 | t_avdp_w |
| 90 | cs_wr_off: t_wph | 122 | we_on, wr_data_mux_bus: |
| 91 | wr_cycle: t_cez_w, t_wr_cycle | 123 | t_weasu, t_aavdh, cyc_aavhd_we |
| 124 | we_off: | ||
| 125 | t_wpl | ||
| 126 | cs_wr_off: | ||
| 127 | t_wph | ||
| 128 | wr_cycle: | ||
| 129 | t_cez_w, t_wr_cycle | ||
| 92 | 130 | ||
| 93 | 8. write async non-muxed | 131 | 8. write async non-muxed |
| 94 | adv_wr_off: t_avdp_w | 132 | |
| 95 | we_on, wr_data_mux_bus: t_weasu | 133 | adv_wr_off: |
| 96 | we_off: t_wpl | 134 | t_avdp_w |
| 97 | cs_wr_off: t_wph | 135 | we_on, wr_data_mux_bus: |
| 98 | wr_cycle: t_cez_w, t_wr_cycle | 136 | t_weasu |
| 137 | we_off: | ||
| 138 | t_wpl | ||
| 139 | cs_wr_off: | ||
| 140 | t_wph | ||
| 141 | wr_cycle: | ||
| 142 | t_cez_w, t_wr_cycle | ||
| 99 | 143 | ||
| 100 | 9. write sync muxed | 144 | 9. write sync muxed |
| 101 | adv_wr_off: t_avdp_w, t_avdh | 145 | |
| 102 | we_on, wr_data_mux_bus: t_weasu, t_rdyo, t_aavdh, cyc_aavhd_we | 146 | adv_wr_off: |
| 103 | we_off: t_wpl, cyc_wpl | 147 | t_avdp_w, t_avdh |
| 104 | cs_wr_off: t_wph | 148 | we_on, wr_data_mux_bus: |
| 105 | wr_cycle: t_cez_w, t_ce_rdyz | 149 | t_weasu, t_rdyo, t_aavdh, cyc_aavhd_we |
| 150 | we_off: | ||
| 151 | t_wpl, cyc_wpl | ||
| 152 | cs_wr_off: | ||
| 153 | t_wph | ||
| 154 | wr_cycle: | ||
| 155 | t_cez_w, t_ce_rdyz | ||
| 106 | 156 | ||
| 107 | 10. write sync non-muxed | 157 | 10. write sync non-muxed |
| 108 | adv_wr_off: t_avdp_w | 158 | |
| 109 | we_on, wr_data_mux_bus: t_weasu, t_rdyo | 159 | adv_wr_off: |
| 110 | we_off: t_wpl, cyc_wpl | 160 | t_avdp_w |
| 111 | cs_wr_off: t_wph | 161 | we_on, wr_data_mux_bus: |
| 112 | wr_cycle: t_cez_w, t_ce_rdyz | 162 | t_weasu, t_rdyo |
| 113 | 163 | we_off: | |
| 114 | 164 | t_wpl, cyc_wpl | |
| 115 | Note: Many of gpmc timings are dependent on other gpmc timings (a few | 165 | cs_wr_off: |
| 116 | gpmc timings purely dependent on other gpmc timings, a reason that | 166 | t_wph |
| 117 | some of the gpmc timings are missing above), and it will result in | 167 | wr_cycle: |
| 118 | indirect dependency of peripheral timings to gpmc timings other than | 168 | t_cez_w, t_ce_rdyz |
| 119 | mentioned above, refer timing routine for more details. To know what | 169 | |
| 120 | these peripheral timings correspond to, please see explanations in | 170 | |
| 121 | struct gpmc_device_timings definition. And for gpmc timings refer | 171 | Note: |
| 122 | IP details (link above). | 172 | Many of gpmc timings are dependent on other gpmc timings (a few |
| 173 | gpmc timings purely dependent on other gpmc timings, a reason that | ||
| 174 | some of the gpmc timings are missing above), and it will result in | ||
| 175 | indirect dependency of peripheral timings to gpmc timings other than | ||
| 176 | mentioned above, refer timing routine for more details. To know what | ||
| 177 | these peripheral timings correspond to, please see explanations in | ||
| 178 | struct gpmc_device_timings definition. And for gpmc timings refer | ||
| 179 | IP details (link above). | ||
diff --git a/Documentation/men-chameleon-bus.txt b/Documentation/driver-api/men-chameleon-bus.rst index 1b1f048aa748..1b1f048aa748 100644 --- a/Documentation/men-chameleon-bus.txt +++ b/Documentation/driver-api/men-chameleon-bus.rst | |||
diff --git a/Documentation/driver-api/mmc/index.rst b/Documentation/driver-api/mmc/index.rst new file mode 100644 index 000000000000..7339736ac774 --- /dev/null +++ b/Documentation/driver-api/mmc/index.rst | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ======================== | ||
| 4 | MMC/SD/SDIO card support | ||
| 5 | ======================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | mmc-dev-attrs | ||
| 11 | mmc-dev-parts | ||
| 12 | mmc-async-req | ||
| 13 | mmc-tools | ||
diff --git a/Documentation/mmc/mmc-async-req.txt b/Documentation/driver-api/mmc/mmc-async-req.rst index ae1907b10e4a..0f7197c9c3b5 100644 --- a/Documentation/mmc/mmc-async-req.txt +++ b/Documentation/driver-api/mmc/mmc-async-req.rst | |||
| @@ -1,13 +1,20 @@ | |||
| 1 | ======================== | ||
| 2 | MMC Asynchronous Request | ||
| 3 | ======================== | ||
| 4 | |||
| 1 | Rationale | 5 | Rationale |
| 2 | ========= | 6 | ========= |
| 3 | 7 | ||
| 4 | How significant is the cache maintenance overhead? | 8 | How significant is the cache maintenance overhead? |
| 9 | |||
| 5 | It depends. Fast eMMC and multiple cache levels with speculative cache | 10 | It depends. Fast eMMC and multiple cache levels with speculative cache |
| 6 | pre-fetch makes the cache overhead relatively significant. If the DMA | 11 | pre-fetch makes the cache overhead relatively significant. If the DMA |
| 7 | preparations for the next request are done in parallel with the current | 12 | preparations for the next request are done in parallel with the current |
| 8 | transfer, the DMA preparation overhead would not affect the MMC performance. | 13 | transfer, the DMA preparation overhead would not affect the MMC performance. |
| 14 | |||
| 9 | The intention of non-blocking (asynchronous) MMC requests is to minimize the | 15 | The intention of non-blocking (asynchronous) MMC requests is to minimize the |
| 10 | time between when an MMC request ends and another MMC request begins. | 16 | time between when an MMC request ends and another MMC request begins. |
| 17 | |||
| 11 | Using mmc_wait_for_req(), the MMC controller is idle while dma_map_sg and | 18 | Using mmc_wait_for_req(), the MMC controller is idle while dma_map_sg and |
| 12 | dma_unmap_sg are processing. Using non-blocking MMC requests makes it | 19 | dma_unmap_sg are processing. Using non-blocking MMC requests makes it |
| 13 | possible to prepare the caches for next job in parallel with an active | 20 | possible to prepare the caches for next job in parallel with an active |
| @@ -17,6 +24,7 @@ MMC block driver | |||
| 17 | ================ | 24 | ================ |
| 18 | 25 | ||
| 19 | The mmc_blk_issue_rw_rq() in the MMC block driver is made non-blocking. | 26 | The mmc_blk_issue_rw_rq() in the MMC block driver is made non-blocking. |
| 27 | |||
| 20 | The increase in throughput is proportional to the time it takes to | 28 | The increase in throughput is proportional to the time it takes to |
| 21 | prepare (major part of preparations are dma_map_sg() and dma_unmap_sg()) | 29 | prepare (major part of preparations are dma_map_sg() and dma_unmap_sg()) |
| 22 | a request and how fast the memory is. The faster the MMC/SD is the | 30 | a request and how fast the memory is. The faster the MMC/SD is the |
| @@ -35,6 +43,7 @@ MMC core API extension | |||
| 35 | ====================== | 43 | ====================== |
| 36 | 44 | ||
| 37 | There is one new public function mmc_start_req(). | 45 | There is one new public function mmc_start_req(). |
| 46 | |||
| 38 | It starts a new MMC command request for a host. The function isn't | 47 | It starts a new MMC command request for a host. The function isn't |
| 39 | truly non-blocking. If there is an ongoing async request it waits | 48 | truly non-blocking. If there is an ongoing async request it waits |
| 40 | for completion of that request and starts the new one and returns. It | 49 | for completion of that request and starts the new one and returns. It |
| @@ -47,6 +56,7 @@ MMC host extensions | |||
| 47 | There are two optional members in the mmc_host_ops -- pre_req() and | 56 | There are two optional members in the mmc_host_ops -- pre_req() and |
| 48 | post_req() -- that the host driver may implement in order to move work | 57 | post_req() -- that the host driver may implement in order to move work |
| 49 | to before and after the actual mmc_host_ops.request() function is called. | 58 | to before and after the actual mmc_host_ops.request() function is called. |
| 59 | |||
| 50 | In the DMA case pre_req() may do dma_map_sg() and prepare the DMA | 60 | In the DMA case pre_req() may do dma_map_sg() and prepare the DMA |
| 51 | descriptor, and post_req() runs the dma_unmap_sg(). | 61 | descriptor, and post_req() runs the dma_unmap_sg(). |
| 52 | 62 | ||
| @@ -55,33 +65,34 @@ Optimize for the first request | |||
| 55 | 65 | ||
| 56 | The first request in a series of requests can't be prepared in parallel | 66 | The first request in a series of requests can't be prepared in parallel |
| 57 | with the previous transfer, since there is no previous request. | 67 | with the previous transfer, since there is no previous request. |
| 68 | |||
| 58 | The argument is_first_req in pre_req() indicates that there is no previous | 69 | The argument is_first_req in pre_req() indicates that there is no previous |
| 59 | request. The host driver may optimize for this scenario to minimize | 70 | request. The host driver may optimize for this scenario to minimize |
| 60 | the performance loss. A way to optimize for this is to split the current | 71 | the performance loss. A way to optimize for this is to split the current |
| 61 | request in two chunks, prepare the first chunk and start the request, | 72 | request in two chunks, prepare the first chunk and start the request, |
| 62 | and finally prepare the second chunk and start the transfer. | 73 | and finally prepare the second chunk and start the transfer. |
| 63 | 74 | ||
| 64 | Pseudocode to handle is_first_req scenario with minimal prepare overhead: | 75 | Pseudocode to handle is_first_req scenario with minimal prepare overhead:: |
| 65 | 76 | ||
| 66 | if (is_first_req && req->size > threshold) | 77 | if (is_first_req && req->size > threshold) |
| 67 | /* start MMC transfer for the complete transfer size */ | 78 | /* start MMC transfer for the complete transfer size */ |
| 68 | mmc_start_command(MMC_CMD_TRANSFER_FULL_SIZE); | 79 | mmc_start_command(MMC_CMD_TRANSFER_FULL_SIZE); |
| 69 | 80 | ||
| 70 | /* | 81 | /* |
| 71 | * Begin to prepare DMA while cmd is being processed by MMC. | 82 | * Begin to prepare DMA while cmd is being processed by MMC. |
| 72 | * The first chunk of the request should take the same time | 83 | * The first chunk of the request should take the same time |
| 73 | * to prepare as the "MMC process command time". | 84 | * to prepare as the "MMC process command time". |
| 74 | * If prepare time exceeds MMC cmd time | 85 | * If prepare time exceeds MMC cmd time |
| 75 | * the transfer is delayed, guesstimate max 4k as first chunk size. | 86 | * the transfer is delayed, guesstimate max 4k as first chunk size. |
| 76 | */ | 87 | */ |
| 77 | prepare_1st_chunk_for_dma(req); | 88 | prepare_1st_chunk_for_dma(req); |
| 78 | /* flush pending desc to the DMAC (dmaengine.h) */ | 89 | /* flush pending desc to the DMAC (dmaengine.h) */ |
| 79 | dma_issue_pending(req->dma_desc); | 90 | dma_issue_pending(req->dma_desc); |
| 80 | 91 | ||
| 81 | prepare_2nd_chunk_for_dma(req); | 92 | prepare_2nd_chunk_for_dma(req); |
| 82 | /* | 93 | /* |
| 83 | * The second issue_pending should be called before MMC runs out | 94 | * The second issue_pending should be called before MMC runs out |
| 84 | * of the first chunk. If the MMC runs out of the first data chunk | 95 | * of the first chunk. If the MMC runs out of the first data chunk |
| 85 | * before this call, the transfer is delayed. | 96 | * before this call, the transfer is delayed. |
| 86 | */ | 97 | */ |
| 87 | dma_issue_pending(req->dma_desc); | 98 | dma_issue_pending(req->dma_desc); |
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/driver-api/mmc/mmc-dev-attrs.rst index 4ad0bb17f343..4f44b1b730d6 100644 --- a/Documentation/mmc/mmc-dev-attrs.txt +++ b/Documentation/driver-api/mmc/mmc-dev-attrs.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ================================== | ||
| 1 | SD and MMC Block Device Attributes | 2 | SD and MMC Block Device Attributes |
| 2 | ================================== | 3 | ================================== |
| 3 | 4 | ||
| @@ -6,23 +7,29 @@ SD or MMC device. | |||
| 6 | 7 | ||
| 7 | The following attributes are read/write. | 8 | The following attributes are read/write. |
| 8 | 9 | ||
| 9 | force_ro Enforce read-only access even if write protect switch is off. | 10 | ======== =============================================== |
| 11 | force_ro Enforce read-only access even if write protect switch is off. | ||
| 12 | ======== =============================================== | ||
| 10 | 13 | ||
| 11 | SD and MMC Device Attributes | 14 | SD and MMC Device Attributes |
| 12 | ============================ | 15 | ============================ |
| 13 | 16 | ||
| 14 | All attributes are read-only. | 17 | All attributes are read-only. |
| 15 | 18 | ||
| 19 | ====================== =============================================== | ||
| 16 | cid Card Identification Register | 20 | cid Card Identification Register |
| 17 | csd Card Specific Data Register | 21 | csd Card Specific Data Register |
| 18 | scr SD Card Configuration Register (SD only) | 22 | scr SD Card Configuration Register (SD only) |
| 19 | date Manufacturing Date (from CID Register) | 23 | date Manufacturing Date (from CID Register) |
| 20 | fwrev Firmware/Product Revision (from CID Register) (SD and MMCv1 only) | 24 | fwrev Firmware/Product Revision (from CID Register) |
| 21 | hwrev Hardware/Product Revision (from CID Register) (SD and MMCv1 only) | 25 | (SD and MMCv1 only) |
| 26 | hwrev Hardware/Product Revision (from CID Register) | ||
| 27 | (SD and MMCv1 only) | ||
| 22 | manfid Manufacturer ID (from CID Register) | 28 | manfid Manufacturer ID (from CID Register) |
| 23 | name Product Name (from CID Register) | 29 | name Product Name (from CID Register) |
| 24 | oemid OEM/Application ID (from CID Register) | 30 | oemid OEM/Application ID (from CID Register) |
| 25 | prv Product Revision (from CID Register) (SD and MMCv4 only) | 31 | prv Product Revision (from CID Register) |
| 32 | (SD and MMCv4 only) | ||
| 26 | serial Product Serial Number (from CID Register) | 33 | serial Product Serial Number (from CID Register) |
| 27 | erase_size Erase group size | 34 | erase_size Erase group size |
| 28 | preferred_erase_size Preferred erase size | 35 | preferred_erase_size Preferred erase size |
| @@ -30,7 +37,10 @@ All attributes are read-only. | |||
| 30 | rel_sectors Reliable write sector count | 37 | rel_sectors Reliable write sector count |
| 31 | ocr Operation Conditions Register | 38 | ocr Operation Conditions Register |
| 32 | dsr Driver Stage Register | 39 | dsr Driver Stage Register |
| 33 | cmdq_en Command Queue enabled: 1 => enabled, 0 => not enabled | 40 | cmdq_en Command Queue enabled: |
| 41 | |||
| 42 | 1 => enabled, 0 => not enabled | ||
| 43 | ====================== =============================================== | ||
| 34 | 44 | ||
| 35 | Note on Erase Size and Preferred Erase Size: | 45 | Note on Erase Size and Preferred Erase Size: |
| 36 | 46 | ||
| @@ -44,14 +54,15 @@ Note on Erase Size and Preferred Erase Size: | |||
| 44 | SD/MMC cards can erase an arbitrarily large area up to and | 54 | SD/MMC cards can erase an arbitrarily large area up to and |
| 45 | including the whole card. When erasing a large area it may | 55 | including the whole card. When erasing a large area it may |
| 46 | be desirable to do it in smaller chunks for three reasons: | 56 | be desirable to do it in smaller chunks for three reasons: |
| 47 | 1. A single erase command will make all other I/O on | 57 | |
| 58 | 1. A single erase command will make all other I/O on | ||
| 48 | the card wait. This is not a problem if the whole card | 59 | the card wait. This is not a problem if the whole card |
| 49 | is being erased, but erasing one partition will make | 60 | is being erased, but erasing one partition will make |
| 50 | I/O for another partition on the same card wait for the | 61 | I/O for another partition on the same card wait for the |
| 51 | duration of the erase - which could be a several | 62 | duration of the erase - which could be a several |
| 52 | minutes. | 63 | minutes. |
| 53 | 2. To be able to inform the user of erase progress. | 64 | 2. To be able to inform the user of erase progress. |
| 54 | 3. The erase timeout becomes too large to be very | 65 | 3. The erase timeout becomes too large to be very |
| 55 | useful. Because the erase timeout contains a margin | 66 | useful. Because the erase timeout contains a margin |
| 56 | which is multiplied by the size of the erase area, | 67 | which is multiplied by the size of the erase area, |
| 57 | the value can end up being several minutes for large | 68 | the value can end up being several minutes for large |
| @@ -72,6 +83,9 @@ Note on Erase Size and Preferred Erase Size: | |||
| 72 | "preferred_erase_size" is in bytes. | 83 | "preferred_erase_size" is in bytes. |
| 73 | 84 | ||
| 74 | Note on raw_rpmb_size_mult: | 85 | Note on raw_rpmb_size_mult: |
| 86 | |||
| 75 | "raw_rpmb_size_mult" is a multiple of 128kB block. | 87 | "raw_rpmb_size_mult" is a multiple of 128kB block. |
| 88 | |||
| 76 | RPMB size in byte is calculated by using the following equation: | 89 | RPMB size in byte is calculated by using the following equation: |
| 77 | RPMB partition size = 128kB x raw_rpmb_size_mult | 90 | |
| 91 | RPMB partition size = 128kB x raw_rpmb_size_mult | ||
diff --git a/Documentation/mmc/mmc-dev-parts.txt b/Documentation/driver-api/mmc/mmc-dev-parts.rst index f08d078d43cf..995922f1f744 100644 --- a/Documentation/mmc/mmc-dev-parts.txt +++ b/Documentation/driver-api/mmc/mmc-dev-parts.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ============================ | ||
| 1 | SD and MMC Device Partitions | 2 | SD and MMC Device Partitions |
| 2 | ============================ | 3 | ============================ |
| 3 | 4 | ||
| @@ -18,18 +19,18 @@ platform, write access is disabled by default to reduce the chance of | |||
| 18 | accidental bricking. | 19 | accidental bricking. |
| 19 | 20 | ||
| 20 | To enable write access to /dev/mmcblkXbootY, disable the forced read-only | 21 | To enable write access to /dev/mmcblkXbootY, disable the forced read-only |
| 21 | access with: | 22 | access with:: |
| 22 | 23 | ||
| 23 | echo 0 > /sys/block/mmcblkXbootY/force_ro | 24 | echo 0 > /sys/block/mmcblkXbootY/force_ro |
| 24 | 25 | ||
| 25 | To re-enable read-only access: | 26 | To re-enable read-only access:: |
| 26 | 27 | ||
| 27 | echo 1 > /sys/block/mmcblkXbootY/force_ro | 28 | echo 1 > /sys/block/mmcblkXbootY/force_ro |
| 28 | 29 | ||
| 29 | The boot partitions can also be locked read only until the next power on, | 30 | The boot partitions can also be locked read only until the next power on, |
| 30 | with: | 31 | with:: |
| 31 | 32 | ||
| 32 | echo 1 > /sys/block/mmcblkXbootY/ro_lock_until_next_power_on | 33 | echo 1 > /sys/block/mmcblkXbootY/ro_lock_until_next_power_on |
| 33 | 34 | ||
| 34 | This is a feature of the card and not of the kernel. If the card does | 35 | This is a feature of the card and not of the kernel. If the card does |
| 35 | not support boot partition locking, the file will not exist. If the | 36 | not support boot partition locking, the file will not exist. If the |
diff --git a/Documentation/mmc/mmc-tools.txt b/Documentation/driver-api/mmc/mmc-tools.rst index 735509c165d5..54406093768b 100644 --- a/Documentation/mmc/mmc-tools.txt +++ b/Documentation/driver-api/mmc/mmc-tools.rst | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | ====================== | ||
| 1 | MMC tools introduction | 2 | MMC tools introduction |
| 2 | ====================== | 3 | ====================== |
| 3 | 4 | ||
| 4 | There is one MMC test tools called mmc-utils, which is maintained by Chris Ball, | 5 | There is one MMC test tools called mmc-utils, which is maintained by Chris Ball, |
| 5 | you can find it at the below public git repository: | 6 | you can find it at the below public git repository: |
| 6 | http://git.kernel.org/cgit/linux/kernel/git/cjb/mmc-utils.git/ | 7 | |
| 8 | http://git.kernel.org/cgit/linux/kernel/git/cjb/mmc-utils.git/ | ||
| 7 | 9 | ||
| 8 | Functions | 10 | Functions |
| 9 | ========= | 11 | ========= |
| 10 | 12 | ||
| 11 | The mmc-utils tools can do the following: | 13 | The mmc-utils tools can do the following: |
| 14 | |||
| 12 | - Print and parse extcsd data. | 15 | - Print and parse extcsd data. |
| 13 | - Determine the eMMC writeprotect status. | 16 | - Determine the eMMC writeprotect status. |
| 14 | - Set the eMMC writeprotect status. | 17 | - Set the eMMC writeprotect status. |
diff --git a/Documentation/driver-api/mtd/index.rst b/Documentation/driver-api/mtd/index.rst new file mode 100644 index 000000000000..436ba5a851d7 --- /dev/null +++ b/Documentation/driver-api/mtd/index.rst | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ============================== | ||
| 4 | Memory Technology Device (MTD) | ||
| 5 | ============================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | intel-spi | ||
| 11 | nand_ecc | ||
| 12 | spi-nor | ||
diff --git a/Documentation/mtd/intel-spi.txt b/Documentation/driver-api/mtd/intel-spi.rst index bc357729c2cb..0e6d9cd5388d 100644 --- a/Documentation/mtd/intel-spi.txt +++ b/Documentation/driver-api/mtd/intel-spi.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ============================== | ||
| 1 | Upgrading BIOS using intel-spi | 2 | Upgrading BIOS using intel-spi |
| 2 | ------------------------------ | 3 | ============================== |
| 3 | 4 | ||
| 4 | Many Intel CPUs like Baytrail and Braswell include SPI serial flash host | 5 | Many Intel CPUs like Baytrail and Braswell include SPI serial flash host |
| 5 | controller which is used to hold BIOS and other platform specific data. | 6 | controller which is used to hold BIOS and other platform specific data. |
| @@ -36,45 +37,45 @@ Linux. | |||
| 36 | module parameter to modprobe). | 37 | module parameter to modprobe). |
| 37 | 38 | ||
| 38 | 4) Once the board is up and running again, find the right MTD partition | 39 | 4) Once the board is up and running again, find the right MTD partition |
| 39 | (it is named as "BIOS"): | 40 | (it is named as "BIOS"):: |
| 40 | 41 | ||
| 41 | # cat /proc/mtd | 42 | # cat /proc/mtd |
| 42 | dev: size erasesize name | 43 | dev: size erasesize name |
| 43 | mtd0: 00800000 00001000 "BIOS" | 44 | mtd0: 00800000 00001000 "BIOS" |
| 44 | 45 | ||
| 45 | So here it will be /dev/mtd0 but it may vary. | 46 | So here it will be /dev/mtd0 but it may vary. |
| 46 | 47 | ||
| 47 | 5) Make backup of the existing image first: | 48 | 5) Make backup of the existing image first:: |
| 48 | 49 | ||
| 49 | # dd if=/dev/mtd0ro of=bios.bak | 50 | # dd if=/dev/mtd0ro of=bios.bak |
| 50 | 16384+0 records in | 51 | 16384+0 records in |
| 51 | 16384+0 records out | 52 | 16384+0 records out |
| 52 | 8388608 bytes (8.4 MB) copied, 10.0269 s, 837 kB/s | 53 | 8388608 bytes (8.4 MB) copied, 10.0269 s, 837 kB/s |
| 53 | 54 | ||
| 54 | 6) Verify the backup | 55 | 6) Verify the backup: |
| 55 | 56 | ||
| 56 | # sha1sum /dev/mtd0ro bios.bak | 57 | # sha1sum /dev/mtd0ro bios.bak |
| 57 | fdbb011920572ca6c991377c4b418a0502668b73 /dev/mtd0ro | 58 | fdbb011920572ca6c991377c4b418a0502668b73 /dev/mtd0ro |
| 58 | fdbb011920572ca6c991377c4b418a0502668b73 bios.bak | 59 | fdbb011920572ca6c991377c4b418a0502668b73 bios.bak |
| 59 | 60 | ||
| 60 | The SHA1 sums must match. Otherwise do not continue any further! | 61 | The SHA1 sums must match. Otherwise do not continue any further! |
| 61 | 62 | ||
| 62 | 7) Erase the SPI serial flash. After this step, do not reboot the | 63 | 7) Erase the SPI serial flash. After this step, do not reboot the |
| 63 | board! Otherwise it will not start anymore. | 64 | board! Otherwise it will not start anymore:: |
| 64 | 65 | ||
| 65 | # flash_erase /dev/mtd0 0 0 | 66 | # flash_erase /dev/mtd0 0 0 |
| 66 | Erasing 4 Kibyte @ 7ff000 -- 100 % complete | 67 | Erasing 4 Kibyte @ 7ff000 -- 100 % complete |
| 67 | 68 | ||
| 68 | 8) Once completed without errors you can write the new BIOS image: | 69 | 8) Once completed without errors you can write the new BIOS image: |
| 69 | 70 | ||
| 70 | # dd if=MNW2MAX1.X64.0092.R01.1605221712.bin of=/dev/mtd0 | 71 | # dd if=MNW2MAX1.X64.0092.R01.1605221712.bin of=/dev/mtd0 |
| 71 | 72 | ||
| 72 | 9) Verify that the new content of the SPI serial flash matches the new | 73 | 9) Verify that the new content of the SPI serial flash matches the new |
| 73 | BIOS image: | 74 | BIOS image:: |
| 74 | 75 | ||
| 75 | # sha1sum /dev/mtd0ro MNW2MAX1.X64.0092.R01.1605221712.bin | 76 | # sha1sum /dev/mtd0ro MNW2MAX1.X64.0092.R01.1605221712.bin |
| 76 | 9b4df9e4be2057fceec3a5529ec3d950836c87a2 /dev/mtd0ro | 77 | 9b4df9e4be2057fceec3a5529ec3d950836c87a2 /dev/mtd0ro |
| 77 | 9b4df9e4be2057fceec3a5529ec3d950836c87a2 MNW2MAX1.X64.0092.R01.1605221712.bin | 78 | 9b4df9e4be2057fceec3a5529ec3d950836c87a2 MNW2MAX1.X64.0092.R01.1605221712.bin |
| 78 | 79 | ||
| 79 | The SHA1 sums should match. | 80 | The SHA1 sums should match. |
| 80 | 81 | ||
| @@ -84,5 +85,6 @@ Linux. | |||
| 84 | References | 85 | References |
| 85 | ---------- | 86 | ---------- |
| 86 | 87 | ||
| 87 | [1] https://firmware.intel.com/sites/default/files/MinnowBoard.MAX_.X64.92.R01.zip | 88 | [1] https://firmware.intel.com/sites/default/files/MinnowBoard%2EMAX_%2EX64%2E92%2ER01%2Ezip |
| 89 | |||
| 88 | [2] http://www.linux-mtd.infradead.org/ | 90 | [2] http://www.linux-mtd.infradead.org/ |
diff --git a/Documentation/mtd/nand_ecc.txt b/Documentation/driver-api/mtd/nand_ecc.rst index f8c3284bf6a7..e8d3c53a5056 100644 --- a/Documentation/mtd/nand_ecc.txt +++ b/Documentation/driver-api/mtd/nand_ecc.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ========================== | ||
| 2 | NAND Error-correction Code | ||
| 3 | ========================== | ||
| 4 | |||
| 1 | Introduction | 5 | Introduction |
| 2 | ============ | 6 | ============ |
| 3 | 7 | ||
| @@ -37,63 +41,79 @@ sometimes also referred to as xor. In C the operator for xor is ^ | |||
| 37 | Back to ecc. | 41 | Back to ecc. |
| 38 | Let's give a small figure: | 42 | Let's give a small figure: |
| 39 | 43 | ||
| 44 | ========= ==== ==== ==== ==== ==== ==== ==== ==== === === === === ==== | ||
| 40 | byte 0: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp0 rp2 rp4 ... rp14 | 45 | byte 0: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp0 rp2 rp4 ... rp14 |
| 41 | byte 1: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp1 rp2 rp4 ... rp14 | 46 | byte 1: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp1 rp2 rp4 ... rp14 |
| 42 | byte 2: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp0 rp3 rp4 ... rp14 | 47 | byte 2: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp0 rp3 rp4 ... rp14 |
| 43 | byte 3: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp1 rp3 rp4 ... rp14 | 48 | byte 3: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp1 rp3 rp4 ... rp14 |
| 44 | byte 4: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp0 rp2 rp5 ... rp14 | 49 | byte 4: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp0 rp2 rp5 ... rp14 |
| 45 | .... | 50 | ... |
| 46 | byte 254: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp0 rp3 rp5 ... rp15 | 51 | byte 254: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp0 rp3 rp5 ... rp15 |
| 47 | byte 255: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp1 rp3 rp5 ... rp15 | 52 | byte 255: bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 rp1 rp3 rp5 ... rp15 |
| 48 | cp1 cp0 cp1 cp0 cp1 cp0 cp1 cp0 | 53 | cp1 cp0 cp1 cp0 cp1 cp0 cp1 cp0 |
| 49 | cp3 cp3 cp2 cp2 cp3 cp3 cp2 cp2 | 54 | cp3 cp3 cp2 cp2 cp3 cp3 cp2 cp2 |
| 50 | cp5 cp5 cp5 cp5 cp4 cp4 cp4 cp4 | 55 | cp5 cp5 cp5 cp5 cp4 cp4 cp4 cp4 |
| 56 | ========= ==== ==== ==== ==== ==== ==== ==== ==== === === === === ==== | ||
| 51 | 57 | ||
| 52 | This figure represents a sector of 256 bytes. | 58 | This figure represents a sector of 256 bytes. |
| 53 | cp is my abbreviation for column parity, rp for row parity. | 59 | cp is my abbreviation for column parity, rp for row parity. |
| 54 | 60 | ||
| 55 | Let's start to explain column parity. | 61 | Let's start to explain column parity. |
| 56 | cp0 is the parity that belongs to all bit0, bit2, bit4, bit6. | 62 | |
| 57 | so the sum of all bit0, bit2, bit4 and bit6 values + cp0 itself is even. | 63 | - cp0 is the parity that belongs to all bit0, bit2, bit4, bit6. |
| 64 | |||
| 65 | so the sum of all bit0, bit2, bit4 and bit6 values + cp0 itself is even. | ||
| 66 | |||
| 58 | Similarly cp1 is the sum of all bit1, bit3, bit5 and bit7. | 67 | Similarly cp1 is the sum of all bit1, bit3, bit5 and bit7. |
| 59 | cp2 is the parity over bit0, bit1, bit4 and bit5 | 68 | |
| 60 | cp3 is the parity over bit2, bit3, bit6 and bit7. | 69 | - cp2 is the parity over bit0, bit1, bit4 and bit5 |
| 61 | cp4 is the parity over bit0, bit1, bit2 and bit3. | 70 | - cp3 is the parity over bit2, bit3, bit6 and bit7. |
| 62 | cp5 is the parity over bit4, bit5, bit6 and bit7. | 71 | - cp4 is the parity over bit0, bit1, bit2 and bit3. |
| 72 | - cp5 is the parity over bit4, bit5, bit6 and bit7. | ||
| 73 | |||
| 63 | Note that each of cp0 .. cp5 is exactly one bit. | 74 | Note that each of cp0 .. cp5 is exactly one bit. |
| 64 | 75 | ||
| 65 | Row parity actually works almost the same. | 76 | Row parity actually works almost the same. |
| 66 | rp0 is the parity of all even bytes (0, 2, 4, 6, ... 252, 254) | 77 | |
| 67 | rp1 is the parity of all odd bytes (1, 3, 5, 7, ..., 253, 255) | 78 | - rp0 is the parity of all even bytes (0, 2, 4, 6, ... 252, 254) |
| 68 | rp2 is the parity of all bytes 0, 1, 4, 5, 8, 9, ... | 79 | - rp1 is the parity of all odd bytes (1, 3, 5, 7, ..., 253, 255) |
| 69 | (so handle two bytes, then skip 2 bytes). | 80 | - rp2 is the parity of all bytes 0, 1, 4, 5, 8, 9, ... |
| 70 | rp3 is covers the half rp2 does not cover (bytes 2, 3, 6, 7, 10, 11, ...) | 81 | (so handle two bytes, then skip 2 bytes). |
| 71 | for rp4 the rule is cover 4 bytes, skip 4 bytes, cover 4 bytes, skip 4 etc. | 82 | - rp3 is covers the half rp2 does not cover (bytes 2, 3, 6, 7, 10, 11, ...) |
| 72 | so rp4 calculates parity over bytes 0, 1, 2, 3, 8, 9, 10, 11, 16, ...) | 83 | - for rp4 the rule is cover 4 bytes, skip 4 bytes, cover 4 bytes, skip 4 etc. |
| 73 | and rp5 covers the other half, so bytes 4, 5, 6, 7, 12, 13, 14, 15, 20, .. | 84 | |
| 85 | so rp4 calculates parity over bytes 0, 1, 2, 3, 8, 9, 10, 11, 16, ...) | ||
| 86 | - and rp5 covers the other half, so bytes 4, 5, 6, 7, 12, 13, 14, 15, 20, .. | ||
| 87 | |||
| 74 | The story now becomes quite boring. I guess you get the idea. | 88 | The story now becomes quite boring. I guess you get the idea. |
| 75 | rp6 covers 8 bytes then skips 8 etc | 89 | |
| 76 | rp7 skips 8 bytes then covers 8 etc | 90 | - rp6 covers 8 bytes then skips 8 etc |
| 77 | rp8 covers 16 bytes then skips 16 etc | 91 | - rp7 skips 8 bytes then covers 8 etc |
| 78 | rp9 skips 16 bytes then covers 16 etc | 92 | - rp8 covers 16 bytes then skips 16 etc |
| 79 | rp10 covers 32 bytes then skips 32 etc | 93 | - rp9 skips 16 bytes then covers 16 etc |
| 80 | rp11 skips 32 bytes then covers 32 etc | 94 | - rp10 covers 32 bytes then skips 32 etc |
| 81 | rp12 covers 64 bytes then skips 64 etc | 95 | - rp11 skips 32 bytes then covers 32 etc |
| 82 | rp13 skips 64 bytes then covers 64 etc | 96 | - rp12 covers 64 bytes then skips 64 etc |
| 83 | rp14 covers 128 bytes then skips 128 | 97 | - rp13 skips 64 bytes then covers 64 etc |
| 84 | rp15 skips 128 bytes then covers 128 | 98 | - rp14 covers 128 bytes then skips 128 |
| 99 | - rp15 skips 128 bytes then covers 128 | ||
| 85 | 100 | ||
| 86 | In the end the parity bits are grouped together in three bytes as | 101 | In the end the parity bits are grouped together in three bytes as |
| 87 | follows: | 102 | follows: |
| 103 | |||
| 104 | ===== ===== ===== ===== ===== ===== ===== ===== ===== | ||
| 88 | ECC Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 | 105 | ECC Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 |
| 106 | ===== ===== ===== ===== ===== ===== ===== ===== ===== | ||
| 89 | ECC 0 rp07 rp06 rp05 rp04 rp03 rp02 rp01 rp00 | 107 | ECC 0 rp07 rp06 rp05 rp04 rp03 rp02 rp01 rp00 |
| 90 | ECC 1 rp15 rp14 rp13 rp12 rp11 rp10 rp09 rp08 | 108 | ECC 1 rp15 rp14 rp13 rp12 rp11 rp10 rp09 rp08 |
| 91 | ECC 2 cp5 cp4 cp3 cp2 cp1 cp0 1 1 | 109 | ECC 2 cp5 cp4 cp3 cp2 cp1 cp0 1 1 |
| 110 | ===== ===== ===== ===== ===== ===== ===== ===== ===== | ||
| 92 | 111 | ||
| 93 | I detected after writing this that ST application note AN1823 | 112 | I detected after writing this that ST application note AN1823 |
| 94 | (http://www.st.com/stonline/) gives a much | 113 | (http://www.st.com/stonline/) gives a much |
| 95 | nicer picture.(but they use line parity as term where I use row parity) | 114 | nicer picture.(but they use line parity as term where I use row parity) |
| 96 | Oh well, I'm graphically challenged, so suffer with me for a moment :-) | 115 | Oh well, I'm graphically challenged, so suffer with me for a moment :-) |
| 116 | |||
| 97 | And I could not reuse the ST picture anyway for copyright reasons. | 117 | And I could not reuse the ST picture anyway for copyright reasons. |
| 98 | 118 | ||
| 99 | 119 | ||
| @@ -101,9 +121,10 @@ Attempt 0 | |||
| 101 | ========= | 121 | ========= |
| 102 | 122 | ||
| 103 | Implementing the parity calculation is pretty simple. | 123 | Implementing the parity calculation is pretty simple. |
| 104 | In C pseudocode: | 124 | In C pseudocode:: |
| 105 | for (i = 0; i < 256; i++) | 125 | |
| 106 | { | 126 | for (i = 0; i < 256; i++) |
| 127 | { | ||
| 107 | if (i & 0x01) | 128 | if (i & 0x01) |
| 108 | rp1 = bit7 ^ bit6 ^ bit5 ^ bit4 ^ bit3 ^ bit2 ^ bit1 ^ bit0 ^ rp1; | 129 | rp1 = bit7 ^ bit6 ^ bit5 ^ bit4 ^ bit3 ^ bit2 ^ bit1 ^ bit0 ^ rp1; |
| 109 | else | 130 | else |
| @@ -142,7 +163,7 @@ for (i = 0; i < 256; i++) | |||
| 142 | cp3 = bit7 ^ bit6 ^ bit3 ^ bit2 ^ cp3 | 163 | cp3 = bit7 ^ bit6 ^ bit3 ^ bit2 ^ cp3 |
| 143 | cp4 = bit3 ^ bit2 ^ bit1 ^ bit0 ^ cp4 | 164 | cp4 = bit3 ^ bit2 ^ bit1 ^ bit0 ^ cp4 |
| 144 | cp5 = bit7 ^ bit6 ^ bit5 ^ bit4 ^ cp5 | 165 | cp5 = bit7 ^ bit6 ^ bit5 ^ bit4 ^ cp5 |
| 145 | } | 166 | } |
| 146 | 167 | ||
| 147 | 168 | ||
| 148 | Analysis 0 | 169 | Analysis 0 |
| @@ -167,82 +188,84 @@ This leads to: | |||
| 167 | Attempt 1 | 188 | Attempt 1 |
| 168 | ========= | 189 | ========= |
| 169 | 190 | ||
| 170 | const char parity[256] = { | 191 | :: |
| 171 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, | 192 | |
| 172 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, | 193 | const char parity[256] = { |
| 173 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, | 194 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
| 174 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, | 195 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
| 175 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, | 196 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
| 176 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, | 197 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
| 177 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, | 198 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
| 178 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, | 199 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
| 179 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, | 200 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
| 180 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, | 201 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
| 181 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, | 202 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
| 182 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, | 203 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
| 183 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, | 204 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
| 184 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, | 205 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
| 185 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, | 206 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, |
| 186 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 | 207 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
| 187 | }; | 208 | 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, |
| 188 | 209 | 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 | |
| 189 | void ecc1(const unsigned char *buf, unsigned char *code) | 210 | }; |
| 190 | { | 211 | |
| 191 | int i; | 212 | void ecc1(const unsigned char *buf, unsigned char *code) |
| 192 | const unsigned char *bp = buf; | 213 | { |
| 193 | unsigned char cur; | 214 | int i; |
| 194 | unsigned char rp0, rp1, rp2, rp3, rp4, rp5, rp6, rp7; | 215 | const unsigned char *bp = buf; |
| 195 | unsigned char rp8, rp9, rp10, rp11, rp12, rp13, rp14, rp15; | 216 | unsigned char cur; |
| 196 | unsigned char par; | 217 | unsigned char rp0, rp1, rp2, rp3, rp4, rp5, rp6, rp7; |
| 197 | 218 | unsigned char rp8, rp9, rp10, rp11, rp12, rp13, rp14, rp15; | |
| 198 | par = 0; | 219 | unsigned char par; |
| 199 | rp0 = 0; rp1 = 0; rp2 = 0; rp3 = 0; | 220 | |
| 200 | rp4 = 0; rp5 = 0; rp6 = 0; rp7 = 0; | 221 | par = 0; |
| 201 | rp8 = 0; rp9 = 0; rp10 = 0; rp11 = 0; | 222 | rp0 = 0; rp1 = 0; rp2 = 0; rp3 = 0; |
| 202 | rp12 = 0; rp13 = 0; rp14 = 0; rp15 = 0; | 223 | rp4 = 0; rp5 = 0; rp6 = 0; rp7 = 0; |
| 203 | 224 | rp8 = 0; rp9 = 0; rp10 = 0; rp11 = 0; | |
| 204 | for (i = 0; i < 256; i++) | 225 | rp12 = 0; rp13 = 0; rp14 = 0; rp15 = 0; |
| 205 | { | 226 | |
| 206 | cur = *bp++; | 227 | for (i = 0; i < 256; i++) |
| 207 | par ^= cur; | 228 | { |
| 208 | if (i & 0x01) rp1 ^= cur; else rp0 ^= cur; | 229 | cur = *bp++; |
| 209 | if (i & 0x02) rp3 ^= cur; else rp2 ^= cur; | 230 | par ^= cur; |
| 210 | if (i & 0x04) rp5 ^= cur; else rp4 ^= cur; | 231 | if (i & 0x01) rp1 ^= cur; else rp0 ^= cur; |
| 211 | if (i & 0x08) rp7 ^= cur; else rp6 ^= cur; | 232 | if (i & 0x02) rp3 ^= cur; else rp2 ^= cur; |
| 212 | if (i & 0x10) rp9 ^= cur; else rp8 ^= cur; | 233 | if (i & 0x04) rp5 ^= cur; else rp4 ^= cur; |
| 213 | if (i & 0x20) rp11 ^= cur; else rp10 ^= cur; | 234 | if (i & 0x08) rp7 ^= cur; else rp6 ^= cur; |
| 214 | if (i & 0x40) rp13 ^= cur; else rp12 ^= cur; | 235 | if (i & 0x10) rp9 ^= cur; else rp8 ^= cur; |
| 215 | if (i & 0x80) rp15 ^= cur; else rp14 ^= cur; | 236 | if (i & 0x20) rp11 ^= cur; else rp10 ^= cur; |
| 216 | } | 237 | if (i & 0x40) rp13 ^= cur; else rp12 ^= cur; |
| 217 | code[0] = | 238 | if (i & 0x80) rp15 ^= cur; else rp14 ^= cur; |
| 218 | (parity[rp7] << 7) | | 239 | } |
| 219 | (parity[rp6] << 6) | | 240 | code[0] = |
| 220 | (parity[rp5] << 5) | | 241 | (parity[rp7] << 7) | |
| 221 | (parity[rp4] << 4) | | 242 | (parity[rp6] << 6) | |
| 222 | (parity[rp3] << 3) | | 243 | (parity[rp5] << 5) | |
| 223 | (parity[rp2] << 2) | | 244 | (parity[rp4] << 4) | |
| 224 | (parity[rp1] << 1) | | 245 | (parity[rp3] << 3) | |
| 225 | (parity[rp0]); | 246 | (parity[rp2] << 2) | |
| 226 | code[1] = | 247 | (parity[rp1] << 1) | |
| 227 | (parity[rp15] << 7) | | 248 | (parity[rp0]); |
| 228 | (parity[rp14] << 6) | | 249 | code[1] = |
| 229 | (parity[rp13] << 5) | | 250 | (parity[rp15] << 7) | |
| 230 | (parity[rp12] << 4) | | 251 | (parity[rp14] << 6) | |
| 231 | (parity[rp11] << 3) | | 252 | (parity[rp13] << 5) | |
| 232 | (parity[rp10] << 2) | | 253 | (parity[rp12] << 4) | |
| 233 | (parity[rp9] << 1) | | 254 | (parity[rp11] << 3) | |
| 234 | (parity[rp8]); | 255 | (parity[rp10] << 2) | |
| 235 | code[2] = | 256 | (parity[rp9] << 1) | |
| 236 | (parity[par & 0xf0] << 7) | | 257 | (parity[rp8]); |
| 237 | (parity[par & 0x0f] << 6) | | 258 | code[2] = |
| 238 | (parity[par & 0xcc] << 5) | | 259 | (parity[par & 0xf0] << 7) | |
| 239 | (parity[par & 0x33] << 4) | | 260 | (parity[par & 0x0f] << 6) | |
| 240 | (parity[par & 0xaa] << 3) | | 261 | (parity[par & 0xcc] << 5) | |
| 241 | (parity[par & 0x55] << 2); | 262 | (parity[par & 0x33] << 4) | |
| 242 | code[0] = ~code[0]; | 263 | (parity[par & 0xaa] << 3) | |
| 243 | code[1] = ~code[1]; | 264 | (parity[par & 0x55] << 2); |
| 244 | code[2] = ~code[2]; | 265 | code[0] = ~code[0]; |
| 245 | } | 266 | code[1] = ~code[1]; |
| 267 | code[2] = ~code[2]; | ||
| 268 | } | ||
| 246 | 269 | ||
| 247 | Still pretty straightforward. The last three invert statements are there to | 270 | Still pretty straightforward. The last three invert statements are there to |
| 248 | give a checksum of 0xff 0xff 0xff for an empty flash. In an empty flash | 271 | give a checksum of 0xff 0xff 0xff for an empty flash. In an empty flash |
| @@ -293,88 +316,90 @@ Let's give it a try... | |||
| 293 | Attempt 2 | 316 | Attempt 2 |
| 294 | ========= | 317 | ========= |
| 295 | 318 | ||
| 296 | extern const char parity[256]; | 319 | :: |
| 297 | 320 | ||
| 298 | void ecc2(const unsigned char *buf, unsigned char *code) | 321 | extern const char parity[256]; |
| 299 | { | 322 | |
| 300 | int i; | 323 | void ecc2(const unsigned char *buf, unsigned char *code) |
| 301 | const unsigned long *bp = (unsigned long *)buf; | 324 | { |
| 302 | unsigned long cur; | 325 | int i; |
| 303 | unsigned long rp0, rp1, rp2, rp3, rp4, rp5, rp6, rp7; | 326 | const unsigned long *bp = (unsigned long *)buf; |
| 304 | unsigned long rp8, rp9, rp10, rp11, rp12, rp13, rp14, rp15; | 327 | unsigned long cur; |
| 305 | unsigned long par; | 328 | unsigned long rp0, rp1, rp2, rp3, rp4, rp5, rp6, rp7; |
| 306 | 329 | unsigned long rp8, rp9, rp10, rp11, rp12, rp13, rp14, rp15; | |
| 307 | par = 0; | 330 | unsigned long par; |
| 308 | rp0 = 0; rp1 = 0; rp2 = 0; rp3 = 0; | 331 | |
| 309 | rp4 = 0; rp5 = 0; rp6 = 0; rp7 = 0; | 332 | par = 0; |
| 310 | rp8 = 0; rp9 = 0; rp10 = 0; rp11 = 0; | 333 | rp0 = 0; rp1 = 0; rp2 = 0; rp3 = 0; |
| 311 | rp12 = 0; rp13 = 0; rp14 = 0; rp15 = 0; | 334 | rp4 = 0; rp5 = 0; rp6 = 0; rp7 = 0; |
| 312 | 335 | rp8 = 0; rp9 = 0; rp10 = 0; rp11 = 0; | |
| 313 | for (i = 0; i < 64; i++) | 336 | rp12 = 0; rp13 = 0; rp14 = 0; rp15 = 0; |
| 314 | { | 337 | |
| 315 | cur = *bp++; | 338 | for (i = 0; i < 64; i++) |
| 316 | par ^= cur; | 339 | { |
| 317 | if (i & 0x01) rp5 ^= cur; else rp4 ^= cur; | 340 | cur = *bp++; |
| 318 | if (i & 0x02) rp7 ^= cur; else rp6 ^= cur; | 341 | par ^= cur; |
| 319 | if (i & 0x04) rp9 ^= cur; else rp8 ^= cur; | 342 | if (i & 0x01) rp5 ^= cur; else rp4 ^= cur; |
| 320 | if (i & 0x08) rp11 ^= cur; else rp10 ^= cur; | 343 | if (i & 0x02) rp7 ^= cur; else rp6 ^= cur; |
| 321 | if (i & 0x10) rp13 ^= cur; else rp12 ^= cur; | 344 | if (i & 0x04) rp9 ^= cur; else rp8 ^= cur; |
| 322 | if (i & 0x20) rp15 ^= cur; else rp14 ^= cur; | 345 | if (i & 0x08) rp11 ^= cur; else rp10 ^= cur; |
| 323 | } | 346 | if (i & 0x10) rp13 ^= cur; else rp12 ^= cur; |
| 324 | /* | 347 | if (i & 0x20) rp15 ^= cur; else rp14 ^= cur; |
| 325 | we need to adapt the code generation for the fact that rp vars are now | 348 | } |
| 326 | long; also the column parity calculation needs to be changed. | 349 | /* |
| 327 | we'll bring rp4 to 15 back to single byte entities by shifting and | 350 | we need to adapt the code generation for the fact that rp vars are now |
| 328 | xoring | 351 | long; also the column parity calculation needs to be changed. |
| 329 | */ | 352 | we'll bring rp4 to 15 back to single byte entities by shifting and |
| 330 | rp4 ^= (rp4 >> 16); rp4 ^= (rp4 >> 8); rp4 &= 0xff; | 353 | xoring |
| 331 | rp5 ^= (rp5 >> 16); rp5 ^= (rp5 >> 8); rp5 &= 0xff; | 354 | */ |
| 332 | rp6 ^= (rp6 >> 16); rp6 ^= (rp6 >> 8); rp6 &= 0xff; | 355 | rp4 ^= (rp4 >> 16); rp4 ^= (rp4 >> 8); rp4 &= 0xff; |
| 333 | rp7 ^= (rp7 >> 16); rp7 ^= (rp7 >> 8); rp7 &= 0xff; | 356 | rp5 ^= (rp5 >> 16); rp5 ^= (rp5 >> 8); rp5 &= 0xff; |
| 334 | rp8 ^= (rp8 >> 16); rp8 ^= (rp8 >> 8); rp8 &= 0xff; | 357 | rp6 ^= (rp6 >> 16); rp6 ^= (rp6 >> 8); rp6 &= 0xff; |
| 335 | rp9 ^= (rp9 >> 16); rp9 ^= (rp9 >> 8); rp9 &= 0xff; | 358 | rp7 ^= (rp7 >> 16); rp7 ^= (rp7 >> 8); rp7 &= 0xff; |
| 336 | rp10 ^= (rp10 >> 16); rp10 ^= (rp10 >> 8); rp10 &= 0xff; | 359 | rp8 ^= (rp8 >> 16); rp8 ^= (rp8 >> 8); rp8 &= 0xff; |
| 337 | rp11 ^= (rp11 >> 16); rp11 ^= (rp11 >> 8); rp11 &= 0xff; | 360 | rp9 ^= (rp9 >> 16); rp9 ^= (rp9 >> 8); rp9 &= 0xff; |
| 338 | rp12 ^= (rp12 >> 16); rp12 ^= (rp12 >> 8); rp12 &= 0xff; | 361 | rp10 ^= (rp10 >> 16); rp10 ^= (rp10 >> 8); rp10 &= 0xff; |
| 339 | rp13 ^= (rp13 >> 16); rp13 ^= (rp13 >> 8); rp13 &= 0xff; | 362 | rp11 ^= (rp11 >> 16); rp11 ^= (rp11 >> 8); rp11 &= 0xff; |
| 340 | rp14 ^= (rp14 >> 16); rp14 ^= (rp14 >> 8); rp14 &= 0xff; | 363 | rp12 ^= (rp12 >> 16); rp12 ^= (rp12 >> 8); rp12 &= 0xff; |
| 341 | rp15 ^= (rp15 >> 16); rp15 ^= (rp15 >> 8); rp15 &= 0xff; | 364 | rp13 ^= (rp13 >> 16); rp13 ^= (rp13 >> 8); rp13 &= 0xff; |
| 342 | rp3 = (par >> 16); rp3 ^= (rp3 >> 8); rp3 &= 0xff; | 365 | rp14 ^= (rp14 >> 16); rp14 ^= (rp14 >> 8); rp14 &= 0xff; |
| 343 | rp2 = par & 0xffff; rp2 ^= (rp2 >> 8); rp2 &= 0xff; | 366 | rp15 ^= (rp15 >> 16); rp15 ^= (rp15 >> 8); rp15 &= 0xff; |
| 344 | par ^= (par >> 16); | 367 | rp3 = (par >> 16); rp3 ^= (rp3 >> 8); rp3 &= 0xff; |
| 345 | rp1 = (par >> 8); rp1 &= 0xff; | 368 | rp2 = par & 0xffff; rp2 ^= (rp2 >> 8); rp2 &= 0xff; |
| 346 | rp0 = (par & 0xff); | 369 | par ^= (par >> 16); |
| 347 | par ^= (par >> 8); par &= 0xff; | 370 | rp1 = (par >> 8); rp1 &= 0xff; |
| 348 | 371 | rp0 = (par & 0xff); | |
| 349 | code[0] = | 372 | par ^= (par >> 8); par &= 0xff; |
| 350 | (parity[rp7] << 7) | | 373 | |
| 351 | (parity[rp6] << 6) | | 374 | code[0] = |
| 352 | (parity[rp5] << 5) | | 375 | (parity[rp7] << 7) | |
| 353 | (parity[rp4] << 4) | | 376 | (parity[rp6] << 6) | |
| 354 | (parity[rp3] << 3) | | 377 | (parity[rp5] << 5) | |
| 355 | (parity[rp2] << 2) | | 378 | (parity[rp4] << 4) | |
| 356 | (parity[rp1] << 1) | | 379 | (parity[rp3] << 3) | |
| 357 | (parity[rp0]); | 380 | (parity[rp2] << 2) | |
| 358 | code[1] = | 381 | (parity[rp1] << 1) | |
| 359 | (parity[rp15] << 7) | | 382 | (parity[rp0]); |
| 360 | (parity[rp14] << 6) | | 383 | code[1] = |
| 361 | (parity[rp13] << 5) | | 384 | (parity[rp15] << 7) | |
| 362 | (parity[rp12] << 4) | | 385 | (parity[rp14] << 6) | |
| 363 | (parity[rp11] << 3) | | 386 | (parity[rp13] << 5) | |
| 364 | (parity[rp10] << 2) | | 387 | (parity[rp12] << 4) | |
| 365 | (parity[rp9] << 1) | | 388 | (parity[rp11] << 3) | |
| 366 | (parity[rp8]); | 389 | (parity[rp10] << 2) | |
| 367 | code[2] = | 390 | (parity[rp9] << 1) | |
| 368 | (parity[par & 0xf0] << 7) | | 391 | (parity[rp8]); |
| 369 | (parity[par & 0x0f] << 6) | | 392 | code[2] = |
| 370 | (parity[par & 0xcc] << 5) | | 393 | (parity[par & 0xf0] << 7) | |
| 371 | (parity[par & 0x33] << 4) | | 394 | (parity[par & 0x0f] << 6) | |
| 372 | (parity[par & 0xaa] << 3) | | 395 | (parity[par & 0xcc] << 5) | |
| 373 | (parity[par & 0x55] << 2); | 396 | (parity[par & 0x33] << 4) | |
| 374 | code[0] = ~code[0]; | 397 | (parity[par & 0xaa] << 3) | |
| 375 | code[1] = ~code[1]; | 398 | (parity[par & 0x55] << 2); |
| 376 | code[2] = ~code[2]; | 399 | code[0] = ~code[0]; |
| 377 | } | 400 | code[1] = ~code[1]; |
| 401 | code[2] = ~code[2]; | ||
| 402 | } | ||
| 378 | 403 | ||
| 379 | The parity array is not shown any more. Note also that for these | 404 | The parity array is not shown any more. Note also that for these |
| 380 | examples I kinda deviated from my regular programming style by allowing | 405 | examples I kinda deviated from my regular programming style by allowing |
| @@ -403,28 +428,32 @@ lookups | |||
| 403 | Attempt 3 | 428 | Attempt 3 |
| 404 | ========= | 429 | ========= |
| 405 | 430 | ||
| 406 | Odd replaced: | 431 | Odd replaced:: |
| 407 | if (i & 0x01) rp5 ^= cur; else rp4 ^= cur; | 432 | |
| 408 | if (i & 0x02) rp7 ^= cur; else rp6 ^= cur; | 433 | if (i & 0x01) rp5 ^= cur; else rp4 ^= cur; |
| 409 | if (i & 0x04) rp9 ^= cur; else rp8 ^= cur; | 434 | if (i & 0x02) rp7 ^= cur; else rp6 ^= cur; |
| 410 | if (i & 0x08) rp11 ^= cur; else rp10 ^= cur; | 435 | if (i & 0x04) rp9 ^= cur; else rp8 ^= cur; |
| 411 | if (i & 0x10) rp13 ^= cur; else rp12 ^= cur; | 436 | if (i & 0x08) rp11 ^= cur; else rp10 ^= cur; |
| 412 | if (i & 0x20) rp15 ^= cur; else rp14 ^= cur; | 437 | if (i & 0x10) rp13 ^= cur; else rp12 ^= cur; |
| 413 | with | 438 | if (i & 0x20) rp15 ^= cur; else rp14 ^= cur; |
| 414 | if (i & 0x01) rp5 ^= cur; | 439 | |
| 415 | if (i & 0x02) rp7 ^= cur; | 440 | with:: |
| 416 | if (i & 0x04) rp9 ^= cur; | 441 | |
| 417 | if (i & 0x08) rp11 ^= cur; | 442 | if (i & 0x01) rp5 ^= cur; |
| 418 | if (i & 0x10) rp13 ^= cur; | 443 | if (i & 0x02) rp7 ^= cur; |
| 419 | if (i & 0x20) rp15 ^= cur; | 444 | if (i & 0x04) rp9 ^= cur; |
| 420 | 445 | if (i & 0x08) rp11 ^= cur; | |
| 421 | and outside the loop added: | 446 | if (i & 0x10) rp13 ^= cur; |
| 422 | rp4 = par ^ rp5; | 447 | if (i & 0x20) rp15 ^= cur; |
| 423 | rp6 = par ^ rp7; | 448 | |
| 424 | rp8 = par ^ rp9; | 449 | and outside the loop added:: |
| 425 | rp10 = par ^ rp11; | 450 | |
| 426 | rp12 = par ^ rp13; | 451 | rp4 = par ^ rp5; |
| 427 | rp14 = par ^ rp15; | 452 | rp6 = par ^ rp7; |
| 453 | rp8 = par ^ rp9; | ||
| 454 | rp10 = par ^ rp11; | ||
| 455 | rp12 = par ^ rp13; | ||
| 456 | rp14 = par ^ rp15; | ||
| 428 | 457 | ||
| 429 | And after that the code takes about 30% more time, although the number of | 458 | And after that the code takes about 30% more time, although the number of |
| 430 | statements is reduced. This is also reflected in the assembly code. | 459 | statements is reduced. This is also reflected in the assembly code. |
| @@ -448,7 +477,7 @@ Attempt 4 | |||
| 448 | ========= | 477 | ========= |
| 449 | 478 | ||
| 450 | Unrolled the loop 1, 2, 3 and 4 times. | 479 | Unrolled the loop 1, 2, 3 and 4 times. |
| 451 | For 4 the code starts with: | 480 | For 4 the code starts with:: |
| 452 | 481 | ||
| 453 | for (i = 0; i < 4; i++) | 482 | for (i = 0; i < 4; i++) |
| 454 | { | 483 | { |
| @@ -471,8 +500,11 @@ Analysis 4 | |||
| 471 | ========== | 500 | ========== |
| 472 | 501 | ||
| 473 | Unrolling once gains about 15% | 502 | Unrolling once gains about 15% |
| 503 | |||
| 474 | Unrolling twice keeps the gain at about 15% | 504 | Unrolling twice keeps the gain at about 15% |
| 505 | |||
| 475 | Unrolling three times gives a gain of 30% compared to attempt 2. | 506 | Unrolling three times gives a gain of 30% compared to attempt 2. |
| 507 | |||
| 476 | Unrolling four times gives a marginal improvement compared to unrolling | 508 | Unrolling four times gives a marginal improvement compared to unrolling |
| 477 | three times. | 509 | three times. |
| 478 | 510 | ||
| @@ -492,8 +524,10 @@ Attempt 5 | |||
| 492 | 524 | ||
| 493 | Effectively so all odd digit rp assignments in the loop were removed. | 525 | Effectively so all odd digit rp assignments in the loop were removed. |
| 494 | This included the else clause of the if statements. | 526 | This included the else clause of the if statements. |
| 495 | Of course after the loop we need to correct things by adding code like: | 527 | Of course after the loop we need to correct things by adding code like:: |
| 528 | |||
| 496 | rp5 = par ^ rp4; | 529 | rp5 = par ^ rp4; |
| 530 | |||
| 497 | Also the initial assignments (rp5 = 0; etc) could be removed. | 531 | Also the initial assignments (rp5 = 0; etc) could be removed. |
| 498 | Along the line I also removed the initialisation of rp0/1/2/3. | 532 | Along the line I also removed the initialisation of rp0/1/2/3. |
| 499 | 533 | ||
| @@ -513,7 +547,7 @@ statement. Time for yet another version! | |||
| 513 | Attempt 6 | 547 | Attempt 6 |
| 514 | ========= | 548 | ========= |
| 515 | 549 | ||
| 516 | THe code within the for loop was changed to: | 550 | THe code within the for loop was changed to:: |
| 517 | 551 | ||
| 518 | for (i = 0; i < 4; i++) | 552 | for (i = 0; i < 4; i++) |
| 519 | { | 553 | { |
| @@ -564,13 +598,17 @@ million iterations in order not to lose too much accuracy. This one | |||
| 564 | definitely seemed to be the jackpot! | 598 | definitely seemed to be the jackpot! |
| 565 | 599 | ||
| 566 | There is a little bit more room for improvement though. There are three | 600 | There is a little bit more room for improvement though. There are three |
| 567 | places with statements: | 601 | places with statements:: |
| 568 | rp4 ^= cur; rp6 ^= cur; | 602 | |
| 603 | rp4 ^= cur; rp6 ^= cur; | ||
| 604 | |||
| 569 | It seems more efficient to also maintain a variable rp4_6 in the while | 605 | It seems more efficient to also maintain a variable rp4_6 in the while |
| 570 | loop; This eliminates 3 statements per loop. Of course after the loop we | 606 | loop; This eliminates 3 statements per loop. Of course after the loop we |
| 571 | need to correct by adding: | 607 | need to correct by adding:: |
| 572 | rp4 ^= rp4_6; | 608 | |
| 573 | rp6 ^= rp4_6 | 609 | rp4 ^= rp4_6; |
| 610 | rp6 ^= rp4_6 | ||
| 611 | |||
| 574 | Furthermore there are 4 sequential assignments to rp8. This can be | 612 | Furthermore there are 4 sequential assignments to rp8. This can be |
| 575 | encoded slightly more efficiently by saving tmppar before those 4 lines | 613 | encoded slightly more efficiently by saving tmppar before those 4 lines |
| 576 | and later do rp8 = rp8 ^ tmppar ^ notrp8; | 614 | and later do rp8 = rp8 ^ tmppar ^ notrp8; |
| @@ -582,7 +620,7 @@ Time for a new test! | |||
| 582 | Attempt 7 | 620 | Attempt 7 |
| 583 | ========= | 621 | ========= |
| 584 | 622 | ||
| 585 | The new code now looks like: | 623 | The new code now looks like:: |
| 586 | 624 | ||
| 587 | for (i = 0; i < 4; i++) | 625 | for (i = 0; i < 4; i++) |
| 588 | { | 626 | { |
| @@ -644,9 +682,12 @@ Although it seems that the code within the loop cannot be optimised | |||
| 644 | further there is still room to optimize the generation of the ecc codes. | 682 | further there is still room to optimize the generation of the ecc codes. |
| 645 | We can simply calculate the total parity. If this is 0 then rp4 = rp5 | 683 | We can simply calculate the total parity. If this is 0 then rp4 = rp5 |
| 646 | etc. If the parity is 1, then rp4 = !rp5; | 684 | etc. If the parity is 1, then rp4 = !rp5; |
| 685 | |||
| 647 | But if rp4 = rp5 we do not need rp5 etc. We can just write the even bits | 686 | But if rp4 = rp5 we do not need rp5 etc. We can just write the even bits |
| 648 | in the result byte and then do something like | 687 | in the result byte and then do something like:: |
| 688 | |||
| 649 | code[0] |= (code[0] << 1); | 689 | code[0] |= (code[0] << 1); |
| 690 | |||
| 650 | Lets test this. | 691 | Lets test this. |
| 651 | 692 | ||
| 652 | 693 | ||
| @@ -657,11 +698,13 @@ Changed the code but again this slightly degrades performance. Tried all | |||
| 657 | kind of other things, like having dedicated parity arrays to avoid the | 698 | kind of other things, like having dedicated parity arrays to avoid the |
| 658 | shift after parity[rp7] << 7; No gain. | 699 | shift after parity[rp7] << 7; No gain. |
| 659 | Change the lookup using the parity array by using shift operators (e.g. | 700 | Change the lookup using the parity array by using shift operators (e.g. |
| 660 | replace parity[rp7] << 7 with: | 701 | replace parity[rp7] << 7 with:: |
| 661 | rp7 ^= (rp7 << 4); | 702 | |
| 662 | rp7 ^= (rp7 << 2); | 703 | rp7 ^= (rp7 << 4); |
| 663 | rp7 ^= (rp7 << 1); | 704 | rp7 ^= (rp7 << 2); |
| 664 | rp7 &= 0x80; | 705 | rp7 ^= (rp7 << 1); |
| 706 | rp7 &= 0x80; | ||
| 707 | |||
| 665 | No gain. | 708 | No gain. |
| 666 | 709 | ||
| 667 | The only marginal change was inverting the parity bits, so we can remove | 710 | The only marginal change was inverting the parity bits, so we can remove |
| @@ -683,13 +726,16 @@ Correcting errors | |||
| 683 | 726 | ||
| 684 | For correcting errors I again used the ST application note as a starter, | 727 | For correcting errors I again used the ST application note as a starter, |
| 685 | but I also peeked at the existing code. | 728 | but I also peeked at the existing code. |
| 729 | |||
| 686 | The algorithm itself is pretty straightforward. Just xor the given and | 730 | The algorithm itself is pretty straightforward. Just xor the given and |
| 687 | the calculated ecc. If all bytes are 0 there is no problem. If 11 bits | 731 | the calculated ecc. If all bytes are 0 there is no problem. If 11 bits |
| 688 | are 1 we have one correctable bit error. If there is 1 bit 1, we have an | 732 | are 1 we have one correctable bit error. If there is 1 bit 1, we have an |
| 689 | error in the given ecc code. | 733 | error in the given ecc code. |
| 734 | |||
| 690 | It proved to be fastest to do some table lookups. Performance gain | 735 | It proved to be fastest to do some table lookups. Performance gain |
| 691 | introduced by this is about a factor 2 on my system when a repair had to | 736 | introduced by this is about a factor 2 on my system when a repair had to |
| 692 | be done, and 1% or so if no repair had to be done. | 737 | be done, and 1% or so if no repair had to be done. |
| 738 | |||
| 693 | Code size increased from 330 bytes to 686 bytes for this function. | 739 | Code size increased from 330 bytes to 686 bytes for this function. |
| 694 | (gcc 4.2, -O3) | 740 | (gcc 4.2, -O3) |
| 695 | 741 | ||
| @@ -700,8 +746,10 @@ Conclusion | |||
| 700 | The gain when calculating the ecc is tremendous. Om my development hardware | 746 | The gain when calculating the ecc is tremendous. Om my development hardware |
| 701 | a speedup of a factor of 18 for ecc calculation was achieved. On a test on an | 747 | a speedup of a factor of 18 for ecc calculation was achieved. On a test on an |
| 702 | embedded system with a MIPS core a factor 7 was obtained. | 748 | embedded system with a MIPS core a factor 7 was obtained. |
| 749 | |||
| 703 | On a test with a Linksys NSLU2 (ARMv5TE processor) the speedup was a factor | 750 | On a test with a Linksys NSLU2 (ARMv5TE processor) the speedup was a factor |
| 704 | 5 (big endian mode, gcc 4.1.2, -O3) | 751 | 5 (big endian mode, gcc 4.1.2, -O3) |
| 752 | |||
| 705 | For correction not much gain could be obtained (as bitflips are rare). Then | 753 | For correction not much gain could be obtained (as bitflips are rare). Then |
| 706 | again there are also much less cycles spent there. | 754 | again there are also much less cycles spent there. |
| 707 | 755 | ||
| @@ -711,4 +759,5 @@ out of it with an assembler program, but due to pipeline behaviour etc | |||
| 711 | this is very tricky (at least for intel hw). | 759 | this is very tricky (at least for intel hw). |
| 712 | 760 | ||
| 713 | Author: Frans Meulenbroeks | 761 | Author: Frans Meulenbroeks |
| 762 | |||
| 714 | Copyright (C) 2008 Koninklijke Philips Electronics NV. | 763 | Copyright (C) 2008 Koninklijke Philips Electronics NV. |
diff --git a/Documentation/mtd/spi-nor.txt b/Documentation/driver-api/mtd/spi-nor.rst index da1fbff5a24c..f5333e3bf486 100644 --- a/Documentation/mtd/spi-nor.txt +++ b/Documentation/driver-api/mtd/spi-nor.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | SPI NOR framework | 1 | ================= |
| 2 | ============================================ | 2 | SPI NOR framework |
| 3 | ================= | ||
| 3 | 4 | ||
| 4 | Part I - Why do we need this framework? | 5 | Part I - Why do we need this framework? |
| 5 | --------------------------------------- | 6 | --------------------------------------- |
| @@ -23,7 +24,7 @@ This framework just adds a new layer between the MTD and the SPI bus driver. | |||
| 23 | With this new layer, the SPI NOR controller driver does not depend on the | 24 | With this new layer, the SPI NOR controller driver does not depend on the |
| 24 | m25p80 code anymore. | 25 | m25p80 code anymore. |
| 25 | 26 | ||
| 26 | Before this framework, the layer is like: | 27 | Before this framework, the layer is like:: |
| 27 | 28 | ||
| 28 | MTD | 29 | MTD |
| 29 | ------------------------ | 30 | ------------------------ |
diff --git a/Documentation/driver-api/nfc/index.rst b/Documentation/driver-api/nfc/index.rst new file mode 100644 index 000000000000..b6e9eedbff29 --- /dev/null +++ b/Documentation/driver-api/nfc/index.rst | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ======================== | ||
| 4 | Near Field Communication | ||
| 5 | ======================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | nfc-hci | ||
| 11 | nfc-pn544 | ||
diff --git a/Documentation/nfc/nfc-hci.txt b/Documentation/driver-api/nfc/nfc-hci.rst index 0dc078cab972..eb8a1a14e919 100644 --- a/Documentation/nfc/nfc-hci.txt +++ b/Documentation/driver-api/nfc/nfc-hci.rst | |||
| @@ -1,7 +1,9 @@ | |||
| 1 | ======================== | ||
| 1 | HCI backend for NFC Core | 2 | HCI backend for NFC Core |
| 3 | ======================== | ||
| 2 | 4 | ||
| 3 | Author: Eric Lapuyade, Samuel Ortiz | 5 | - Author: Eric Lapuyade, Samuel Ortiz |
| 4 | Contact: eric.lapuyade@intel.com, samuel.ortiz@intel.com | 6 | - Contact: eric.lapuyade@intel.com, samuel.ortiz@intel.com |
| 5 | 7 | ||
| 6 | General | 8 | General |
| 7 | ------- | 9 | ------- |
| @@ -24,12 +26,13 @@ HCI events can also be received from the host controller. They will be handled | |||
| 24 | and a translation will be forwarded to NFC Core as needed. There are hooks to | 26 | and a translation will be forwarded to NFC Core as needed. There are hooks to |
| 25 | let the HCI driver handle proprietary events or override standard behavior. | 27 | let the HCI driver handle proprietary events or override standard behavior. |
| 26 | HCI uses 2 execution contexts: | 28 | HCI uses 2 execution contexts: |
| 29 | |||
| 27 | - one for executing commands : nfc_hci_msg_tx_work(). Only one command | 30 | - one for executing commands : nfc_hci_msg_tx_work(). Only one command |
| 28 | can be executing at any given moment. | 31 | can be executing at any given moment. |
| 29 | - one for dispatching received events and commands : nfc_hci_msg_rx_work(). | 32 | - one for dispatching received events and commands : nfc_hci_msg_rx_work(). |
| 30 | 33 | ||
| 31 | HCI Session initialization: | 34 | HCI Session initialization |
| 32 | --------------------------- | 35 | -------------------------- |
| 33 | 36 | ||
| 34 | The Session initialization is an HCI standard which must unfortunately | 37 | The Session initialization is an HCI standard which must unfortunately |
| 35 | support proprietary gates. This is the reason why the driver will pass a list | 38 | support proprietary gates. This is the reason why the driver will pass a list |
| @@ -58,9 +61,9 @@ HCI Management | |||
| 58 | -------------- | 61 | -------------- |
| 59 | 62 | ||
| 60 | A driver would normally register itself with HCI and provide the following | 63 | A driver would normally register itself with HCI and provide the following |
| 61 | entry points: | 64 | entry points:: |
| 62 | 65 | ||
| 63 | struct nfc_hci_ops { | 66 | struct nfc_hci_ops { |
| 64 | int (*open)(struct nfc_hci_dev *hdev); | 67 | int (*open)(struct nfc_hci_dev *hdev); |
| 65 | void (*close)(struct nfc_hci_dev *hdev); | 68 | void (*close)(struct nfc_hci_dev *hdev); |
| 66 | int (*hci_ready) (struct nfc_hci_dev *hdev); | 69 | int (*hci_ready) (struct nfc_hci_dev *hdev); |
| @@ -82,38 +85,38 @@ struct nfc_hci_ops { | |||
| 82 | struct nfc_target *target); | 85 | struct nfc_target *target); |
| 83 | int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, | 86 | int (*event_received)(struct nfc_hci_dev *hdev, u8 gate, u8 event, |
| 84 | struct sk_buff *skb); | 87 | struct sk_buff *skb); |
| 85 | }; | 88 | }; |
| 86 | 89 | ||
| 87 | - open() and close() shall turn the hardware on and off. | 90 | - open() and close() shall turn the hardware on and off. |
| 88 | - hci_ready() is an optional entry point that is called right after the hci | 91 | - hci_ready() is an optional entry point that is called right after the hci |
| 89 | session has been set up. The driver can use it to do additional initialization | 92 | session has been set up. The driver can use it to do additional initialization |
| 90 | that must be performed using HCI commands. | 93 | that must be performed using HCI commands. |
| 91 | - xmit() shall simply write a frame to the physical link. | 94 | - xmit() shall simply write a frame to the physical link. |
| 92 | - start_poll() is an optional entrypoint that shall set the hardware in polling | 95 | - start_poll() is an optional entrypoint that shall set the hardware in polling |
| 93 | mode. This must be implemented only if the hardware uses proprietary gates or a | 96 | mode. This must be implemented only if the hardware uses proprietary gates or a |
| 94 | mechanism slightly different from the HCI standard. | 97 | mechanism slightly different from the HCI standard. |
| 95 | - dep_link_up() is called after a p2p target has been detected, to finish | 98 | - dep_link_up() is called after a p2p target has been detected, to finish |
| 96 | the p2p connection setup with hardware parameters that need to be passed back | 99 | the p2p connection setup with hardware parameters that need to be passed back |
| 97 | to nfc core. | 100 | to nfc core. |
| 98 | - dep_link_down() is called to bring the p2p link down. | 101 | - dep_link_down() is called to bring the p2p link down. |
| 99 | - target_from_gate() is an optional entrypoint to return the nfc protocols | 102 | - target_from_gate() is an optional entrypoint to return the nfc protocols |
| 100 | corresponding to a proprietary gate. | 103 | corresponding to a proprietary gate. |
| 101 | - complete_target_discovered() is an optional entry point to let the driver | 104 | - complete_target_discovered() is an optional entry point to let the driver |
| 102 | perform additional proprietary processing necessary to auto activate the | 105 | perform additional proprietary processing necessary to auto activate the |
| 103 | discovered target. | 106 | discovered target. |
| 104 | - im_transceive() must be implemented by the driver if proprietary HCI commands | 107 | - im_transceive() must be implemented by the driver if proprietary HCI commands |
| 105 | are required to send data to the tag. Some tag types will require custom | 108 | are required to send data to the tag. Some tag types will require custom |
| 106 | commands, others can be written to using the standard HCI commands. The driver | 109 | commands, others can be written to using the standard HCI commands. The driver |
| 107 | can check the tag type and either do proprietary processing, or return 1 to ask | 110 | can check the tag type and either do proprietary processing, or return 1 to ask |
| 108 | for standard processing. The data exchange command itself must be sent | 111 | for standard processing. The data exchange command itself must be sent |
| 109 | asynchronously. | 112 | asynchronously. |
| 110 | - tm_send() is called to send data in the case of a p2p connection | 113 | - tm_send() is called to send data in the case of a p2p connection |
| 111 | - check_presence() is an optional entry point that will be called regularly | 114 | - check_presence() is an optional entry point that will be called regularly |
| 112 | by the core to check that an activated tag is still in the field. If this is | 115 | by the core to check that an activated tag is still in the field. If this is |
| 113 | not implemented, the core will not be able to push tag_lost events to the user | 116 | not implemented, the core will not be able to push tag_lost events to the user |
| 114 | space | 117 | space |
| 115 | - event_received() is called to handle an event coming from the chip. Driver | 118 | - event_received() is called to handle an event coming from the chip. Driver |
| 116 | can handle the event or return 1 to let HCI attempt standard processing. | 119 | can handle the event or return 1 to let HCI attempt standard processing. |
| 117 | 120 | ||
| 118 | On the rx path, the driver is responsible to push incoming HCP frames to HCI | 121 | On the rx path, the driver is responsible to push incoming HCP frames to HCI |
| 119 | using nfc_hci_recv_frame(). HCI will take care of re-aggregation and handling | 122 | using nfc_hci_recv_frame(). HCI will take care of re-aggregation and handling |
| @@ -122,20 +125,23 @@ This must be done from a context that can sleep. | |||
| 122 | PHY Management | 125 | PHY Management |
| 123 | -------------- | 126 | -------------- |
| 124 | 127 | ||
| 125 | The physical link (i2c, ...) management is defined by the following structure: | 128 | The physical link (i2c, ...) management is defined by the following structure:: |
| 126 | 129 | ||
| 127 | struct nfc_phy_ops { | 130 | struct nfc_phy_ops { |
| 128 | int (*write)(void *dev_id, struct sk_buff *skb); | 131 | int (*write)(void *dev_id, struct sk_buff *skb); |
| 129 | int (*enable)(void *dev_id); | 132 | int (*enable)(void *dev_id); |
| 130 | void (*disable)(void *dev_id); | 133 | void (*disable)(void *dev_id); |
| 131 | }; | 134 | }; |
| 132 | 135 | ||
| 133 | enable(): turn the phy on (power on), make it ready to transfer data | 136 | enable(): |
| 134 | disable(): turn the phy off | 137 | turn the phy on (power on), make it ready to transfer data |
| 135 | write(): Send a data frame to the chip. Note that to enable higher | 138 | disable(): |
| 136 | layers such as an llc to store the frame for re-emission, this function must | 139 | turn the phy off |
| 137 | not alter the skb. It must also not return a positive result (return 0 for | 140 | write(): |
| 138 | success, negative for failure). | 141 | Send a data frame to the chip. Note that to enable higher |
| 142 | layers such as an llc to store the frame for re-emission, this | ||
| 143 | function must not alter the skb. It must also not return a positive | ||
| 144 | result (return 0 for success, negative for failure). | ||
| 139 | 145 | ||
| 140 | Data coming from the chip shall be sent directly to nfc_hci_recv_frame(). | 146 | Data coming from the chip shall be sent directly to nfc_hci_recv_frame(). |
| 141 | 147 | ||
| @@ -145,9 +151,9 @@ LLC | |||
| 145 | Communication between the CPU and the chip often requires some link layer | 151 | Communication between the CPU and the chip often requires some link layer |
| 146 | protocol. Those are isolated as modules managed by the HCI layer. There are | 152 | protocol. Those are isolated as modules managed by the HCI layer. There are |
| 147 | currently two modules : nop (raw transfert) and shdlc. | 153 | currently two modules : nop (raw transfert) and shdlc. |
| 148 | A new llc must implement the following functions: | 154 | A new llc must implement the following functions:: |
| 149 | 155 | ||
| 150 | struct nfc_llc_ops { | 156 | struct nfc_llc_ops { |
| 151 | void *(*init) (struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv, | 157 | void *(*init) (struct nfc_hci_dev *hdev, xmit_to_drv_t xmit_to_drv, |
| 152 | rcv_to_hci_t rcv_to_hci, int tx_headroom, | 158 | rcv_to_hci_t rcv_to_hci, int tx_headroom, |
| 153 | int tx_tailroom, int *rx_headroom, int *rx_tailroom, | 159 | int tx_tailroom, int *rx_headroom, int *rx_tailroom, |
| @@ -157,17 +163,25 @@ struct nfc_llc_ops { | |||
| 157 | int (*stop) (struct nfc_llc *llc); | 163 | int (*stop) (struct nfc_llc *llc); |
| 158 | void (*rcv_from_drv) (struct nfc_llc *llc, struct sk_buff *skb); | 164 | void (*rcv_from_drv) (struct nfc_llc *llc, struct sk_buff *skb); |
| 159 | int (*xmit_from_hci) (struct nfc_llc *llc, struct sk_buff *skb); | 165 | int (*xmit_from_hci) (struct nfc_llc *llc, struct sk_buff *skb); |
| 160 | }; | 166 | }; |
| 161 | 167 | ||
| 162 | - init() : allocate and init your private storage | 168 | init(): |
| 163 | - deinit() : cleanup | 169 | allocate and init your private storage |
| 164 | - start() : establish the logical connection | 170 | deinit(): |
| 165 | - stop () : terminate the logical connection | 171 | cleanup |
| 166 | - rcv_from_drv() : handle data coming from the chip, going to HCI | 172 | start(): |
| 167 | - xmit_from_hci() : handle data sent by HCI, going to the chip | 173 | establish the logical connection |
| 174 | stop (): | ||
| 175 | terminate the logical connection | ||
| 176 | rcv_from_drv(): | ||
| 177 | handle data coming from the chip, going to HCI | ||
| 178 | xmit_from_hci(): | ||
| 179 | handle data sent by HCI, going to the chip | ||
| 168 | 180 | ||
| 169 | The llc must be registered with nfc before it can be used. Do that by | 181 | The llc must be registered with nfc before it can be used. Do that by |
| 170 | calling nfc_llc_register(const char *name, struct nfc_llc_ops *ops); | 182 | calling:: |
| 183 | |||
| 184 | nfc_llc_register(const char *name, struct nfc_llc_ops *ops); | ||
| 171 | 185 | ||
| 172 | Again, note that the llc does not handle the physical link. It is thus very | 186 | Again, note that the llc does not handle the physical link. It is thus very |
| 173 | easy to mix any physical link with any llc for a given chip driver. | 187 | easy to mix any physical link with any llc for a given chip driver. |
| @@ -187,26 +201,32 @@ fast, cannot sleep. sends incoming frames to HCI where they are passed to | |||
| 187 | the current llc. In case of shdlc, the frame is queued in shdlc rx queue. | 201 | the current llc. In case of shdlc, the frame is queued in shdlc rx queue. |
| 188 | 202 | ||
| 189 | - SHDLC State Machine worker (SMW) | 203 | - SHDLC State Machine worker (SMW) |
| 190 | Only when llc_shdlc is used: handles shdlc rx & tx queues. | 204 | |
| 191 | Dispatches HCI cmd responses. | 205 | Only when llc_shdlc is used: handles shdlc rx & tx queues. |
| 206 | |||
| 207 | Dispatches HCI cmd responses. | ||
| 192 | 208 | ||
| 193 | - HCI Tx Cmd worker (MSGTXWQ) | 209 | - HCI Tx Cmd worker (MSGTXWQ) |
| 194 | Serializes execution of HCI commands. Completes execution in case of response | 210 | |
| 195 | timeout. | 211 | Serializes execution of HCI commands. |
| 212 | |||
| 213 | Completes execution in case of response timeout. | ||
| 196 | 214 | ||
| 197 | - HCI Rx worker (MSGRXWQ) | 215 | - HCI Rx worker (MSGRXWQ) |
| 198 | Dispatches incoming HCI commands or events. | 216 | |
| 217 | Dispatches incoming HCI commands or events. | ||
| 199 | 218 | ||
| 200 | - Syscall context from a userspace call (SYSCALL) | 219 | - Syscall context from a userspace call (SYSCALL) |
| 201 | Any entrypoint in HCI called from NFC Core | 220 | |
| 221 | Any entrypoint in HCI called from NFC Core | ||
| 202 | 222 | ||
| 203 | Workflow executing an HCI command (using shdlc) | 223 | Workflow executing an HCI command (using shdlc) |
| 204 | ----------------------------------------------- | 224 | ----------------------------------------------- |
| 205 | 225 | ||
| 206 | Executing an HCI command can easily be performed synchronously using the | 226 | Executing an HCI command can easily be performed synchronously using the |
| 207 | following API: | 227 | following API:: |
| 208 | 228 | ||
| 209 | int nfc_hci_send_cmd (struct nfc_hci_dev *hdev, u8 gate, u8 cmd, | 229 | int nfc_hci_send_cmd (struct nfc_hci_dev *hdev, u8 gate, u8 cmd, |
| 210 | const u8 *param, size_t param_len, struct sk_buff **skb) | 230 | const u8 *param, size_t param_len, struct sk_buff **skb) |
| 211 | 231 | ||
| 212 | The API must be invoked from a context that can sleep. Most of the time, this | 232 | The API must be invoked from a context that can sleep. Most of the time, this |
| @@ -234,11 +254,11 @@ waiting command execution. Response processing involves invoking the completion | |||
| 234 | callback that was provided by nfc_hci_msg_tx_work() when it sent the command. | 254 | callback that was provided by nfc_hci_msg_tx_work() when it sent the command. |
| 235 | The completion callback will then wake the syscall context. | 255 | The completion callback will then wake the syscall context. |
| 236 | 256 | ||
| 237 | It is also possible to execute the command asynchronously using this API: | 257 | It is also possible to execute the command asynchronously using this API:: |
| 238 | 258 | ||
| 239 | static int nfc_hci_execute_cmd_async(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd, | 259 | static int nfc_hci_execute_cmd_async(struct nfc_hci_dev *hdev, u8 pipe, u8 cmd, |
| 240 | const u8 *param, size_t param_len, | 260 | const u8 *param, size_t param_len, |
| 241 | data_exchange_cb_t cb, void *cb_context) | 261 | data_exchange_cb_t cb, void *cb_context) |
| 242 | 262 | ||
| 243 | The workflow is the same, except that the API call returns immediately, and | 263 | The workflow is the same, except that the API call returns immediately, and |
| 244 | the callback will be called with the result from the SMW context. | 264 | the callback will be called with the result from the SMW context. |
| @@ -268,23 +288,24 @@ went wrong below and know that expected events will probably never happen. | |||
| 268 | Handling of these errors is done as follows: | 288 | Handling of these errors is done as follows: |
| 269 | 289 | ||
| 270 | - driver (pn544) fails to deliver an incoming frame: it stores the error such | 290 | - driver (pn544) fails to deliver an incoming frame: it stores the error such |
| 271 | that any subsequent call to the driver will result in this error. Then it calls | 291 | that any subsequent call to the driver will result in this error. Then it |
| 272 | the standard nfc_shdlc_recv_frame() with a NULL argument to report the problem | 292 | calls the standard nfc_shdlc_recv_frame() with a NULL argument to report the |
| 273 | above. shdlc stores a EREMOTEIO sticky status, which will trigger SMW to | 293 | problem above. shdlc stores a EREMOTEIO sticky status, which will trigger |
| 274 | report above in turn. | 294 | SMW to report above in turn. |
| 275 | 295 | ||
| 276 | - SMW is basically a background thread to handle incoming and outgoing shdlc | 296 | - SMW is basically a background thread to handle incoming and outgoing shdlc |
| 277 | frames. This thread will also check the shdlc sticky status and report to HCI | 297 | frames. This thread will also check the shdlc sticky status and report to HCI |
| 278 | when it discovers it is not able to run anymore because of an unrecoverable | 298 | when it discovers it is not able to run anymore because of an unrecoverable |
| 279 | error that happened within shdlc or below. If the problem occurs during shdlc | 299 | error that happened within shdlc or below. If the problem occurs during shdlc |
| 280 | connection, the error is reported through the connect completion. | 300 | connection, the error is reported through the connect completion. |
| 281 | 301 | ||
| 282 | - HCI: if an internal HCI error happens (frame is lost), or HCI is reported an | 302 | - HCI: if an internal HCI error happens (frame is lost), or HCI is reported an |
| 283 | error from a lower layer, HCI will either complete the currently executing | 303 | error from a lower layer, HCI will either complete the currently executing |
| 284 | command with that error, or notify NFC Core directly if no command is executing. | 304 | command with that error, or notify NFC Core directly if no command is |
| 305 | executing. | ||
| 285 | 306 | ||
| 286 | - NFC Core: when NFC Core is notified of an error from below and polling is | 307 | - NFC Core: when NFC Core is notified of an error from below and polling is |
| 287 | active, it will send a tag discovered event with an empty tag list to the user | 308 | active, it will send a tag discovered event with an empty tag list to the user |
| 288 | space to let it know that the poll operation will never be able to detect a tag. | 309 | space to let it know that the poll operation will never be able to detect a |
| 289 | If polling is not active and the error was sticky, lower levels will return it | 310 | tag. If polling is not active and the error was sticky, lower levels will |
| 290 | at next invocation. | 311 | return it at next invocation. |
diff --git a/Documentation/nfc/nfc-pn544.txt b/Documentation/driver-api/nfc/nfc-pn544.rst index b36ca14ca2d6..6b2d8aae0c4e 100644 --- a/Documentation/nfc/nfc-pn544.txt +++ b/Documentation/driver-api/nfc/nfc-pn544.rst | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | Kernel driver for the NXP Semiconductors PN544 Near Field | 1 | ============================================================================ |
| 2 | Communication chip | 2 | Kernel driver for the NXP Semiconductors PN544 Near Field Communication chip |
| 3 | ============================================================================ | ||
| 4 | |||
| 3 | 5 | ||
| 4 | General | 6 | General |
| 5 | ------- | 7 | ------- |
diff --git a/Documentation/ntb.txt b/Documentation/driver-api/ntb.rst index 074a423c853c..074a423c853c 100644 --- a/Documentation/ntb.txt +++ b/Documentation/driver-api/ntb.rst | |||
diff --git a/Documentation/nvdimm/btt.txt b/Documentation/driver-api/nvdimm/btt.rst index e293fb664924..107395c042ae 100644 --- a/Documentation/nvdimm/btt.txt +++ b/Documentation/driver-api/nvdimm/btt.rst | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | ============================= | ||
| 1 | BTT - Block Translation Table | 2 | BTT - Block Translation Table |
| 2 | ============================= | 3 | ============================= |
| 3 | 4 | ||
| 4 | 5 | ||
| 5 | 1. Introduction | 6 | 1. Introduction |
| 6 | --------------- | 7 | =============== |
| 7 | 8 | ||
| 8 | Persistent memory based storage is able to perform IO at byte (or more | 9 | Persistent memory based storage is able to perform IO at byte (or more |
| 9 | accurately, cache line) granularity. However, we often want to expose such | 10 | accurately, cache line) granularity. However, we often want to expose such |
| @@ -25,7 +26,7 @@ provides atomic sector updates. | |||
| 25 | 26 | ||
| 26 | 27 | ||
| 27 | 2. Static Layout | 28 | 2. Static Layout |
| 28 | ---------------- | 29 | ================ |
| 29 | 30 | ||
| 30 | The underlying storage on which a BTT can be laid out is not limited in any way. | 31 | The underlying storage on which a BTT can be laid out is not limited in any way. |
| 31 | The BTT, however, splits the available space into chunks of up to 512 GiB, | 32 | The BTT, however, splits the available space into chunks of up to 512 GiB, |
| @@ -33,43 +34,43 @@ called "Arenas". | |||
| 33 | 34 | ||
| 34 | Each arena follows the same layout for its metadata, and all references in an | 35 | Each arena follows the same layout for its metadata, and all references in an |
| 35 | arena are internal to it (with the exception of one field that points to the | 36 | arena are internal to it (with the exception of one field that points to the |
| 36 | next arena). The following depicts the "On-disk" metadata layout: | 37 | next arena). The following depicts the "On-disk" metadata layout:: |
| 37 | 38 | ||
| 38 | 39 | ||
| 39 | Backing Store +-------> Arena | 40 | Backing Store +-------> Arena |
| 40 | +---------------+ | +------------------+ | 41 | +---------------+ | +------------------+ |
| 41 | | | | | Arena info block | | 42 | | | | | Arena info block | |
| 42 | | Arena 0 +---+ | 4K | | 43 | | Arena 0 +---+ | 4K | |
| 43 | | 512G | +------------------+ | 44 | | 512G | +------------------+ |
| 44 | | | | | | 45 | | | | | |
| 45 | +---------------+ | | | 46 | +---------------+ | | |
| 46 | | | | | | 47 | | | | | |
| 47 | | Arena 1 | | Data Blocks | | 48 | | Arena 1 | | Data Blocks | |
| 48 | | 512G | | | | 49 | | 512G | | | |
| 49 | | | | | | 50 | | | | | |
| 50 | +---------------+ | | | 51 | +---------------+ | | |
| 51 | | . | | | | 52 | | . | | | |
| 52 | | . | | | | 53 | | . | | | |
| 53 | | . | | | | 54 | | . | | | |
| 54 | | | | | | 55 | | | | | |
| 55 | | | | | | 56 | | | | | |
| 56 | +---------------+ +------------------+ | 57 | +---------------+ +------------------+ |
| 57 | | | | 58 | | | |
| 58 | | BTT Map | | 59 | | BTT Map | |
| 59 | | | | 60 | | | |
| 60 | | | | 61 | | | |
| 61 | +------------------+ | 62 | +------------------+ |
| 62 | | | | 63 | | | |
| 63 | | BTT Flog | | 64 | | BTT Flog | |
| 64 | | | | 65 | | | |
| 65 | +------------------+ | 66 | +------------------+ |
| 66 | | Info block copy | | 67 | | Info block copy | |
| 67 | | 4K | | 68 | | 4K | |
| 68 | +------------------+ | 69 | +------------------+ |
| 69 | 70 | ||
| 70 | 71 | ||
| 71 | 3. Theory of Operation | 72 | 3. Theory of Operation |
| 72 | ---------------------- | 73 | ====================== |
| 73 | 74 | ||
| 74 | 75 | ||
| 75 | a. The BTT Map | 76 | a. The BTT Map |
| @@ -79,31 +80,37 @@ The map is a simple lookup/indirection table that maps an LBA to an internal | |||
| 79 | block. Each map entry is 32 bits. The two most significant bits are special | 80 | block. Each map entry is 32 bits. The two most significant bits are special |
| 80 | flags, and the remaining form the internal block number. | 81 | flags, and the remaining form the internal block number. |
| 81 | 82 | ||
| 83 | ======== ============================================================= | ||
| 82 | Bit Description | 84 | Bit Description |
| 83 | 31 - 30 : Error and Zero flags - Used in the following way: | 85 | ======== ============================================================= |
| 84 | Bit Description | 86 | 31 - 30 Error and Zero flags - Used in the following way:: |
| 85 | 31 30 | ||
| 86 | ----------------------------------------------------------------------- | ||
| 87 | 00 Initial state. Reads return zeroes; Premap = Postmap | ||
| 88 | 01 Zero state: Reads return zeroes | ||
| 89 | 10 Error state: Reads fail; Writes clear 'E' bit | ||
| 90 | 11 Normal Block – has valid postmap | ||
| 91 | 87 | ||
| 88 | == == ==================================================== | ||
| 89 | 31 30 Description | ||
| 90 | == == ==================================================== | ||
| 91 | 0 0 Initial state. Reads return zeroes; Premap = Postmap | ||
| 92 | 0 1 Zero state: Reads return zeroes | ||
| 93 | 1 0 Error state: Reads fail; Writes clear 'E' bit | ||
| 94 | 1 1 Normal Block – has valid postmap | ||
| 95 | == == ==================================================== | ||
| 92 | 96 | ||
| 93 | 29 - 0 : Mappings to internal 'postmap' blocks | 97 | 29 - 0 Mappings to internal 'postmap' blocks |
| 98 | ======== ============================================================= | ||
| 94 | 99 | ||
| 95 | 100 | ||
| 96 | Some of the terminology that will be subsequently used: | 101 | Some of the terminology that will be subsequently used: |
| 97 | 102 | ||
| 98 | External LBA : LBA as made visible to upper layers. | 103 | ============ ================================================================ |
| 99 | ABA : Arena Block Address - Block offset/number within an arena | 104 | External LBA LBA as made visible to upper layers. |
| 100 | Premap ABA : The block offset into an arena, which was decided upon by range | 105 | ABA Arena Block Address - Block offset/number within an arena |
| 106 | Premap ABA The block offset into an arena, which was decided upon by range | ||
| 101 | checking the External LBA | 107 | checking the External LBA |
| 102 | Postmap ABA : The block number in the "Data Blocks" area obtained after | 108 | Postmap ABA The block number in the "Data Blocks" area obtained after |
| 103 | indirection from the map | 109 | indirection from the map |
| 104 | nfree : The number of free blocks that are maintained at any given time. | 110 | nfree The number of free blocks that are maintained at any given time. |
| 105 | This is the number of concurrent writes that can happen to the | 111 | This is the number of concurrent writes that can happen to the |
| 106 | arena. | 112 | arena. |
| 113 | ============ ================================================================ | ||
| 107 | 114 | ||
| 108 | 115 | ||
| 109 | For example, after adding a BTT, we surface a disk of 1024G. We get a read for | 116 | For example, after adding a BTT, we surface a disk of 1024G. We get a read for |
| @@ -121,19 +128,21 @@ i.e. Every write goes to a "free" block. A running list of free blocks is | |||
| 121 | maintained in the form of the BTT flog. 'Flog' is a combination of the words | 128 | maintained in the form of the BTT flog. 'Flog' is a combination of the words |
| 122 | "free list" and "log". The flog contains 'nfree' entries, and an entry contains: | 129 | "free list" and "log". The flog contains 'nfree' entries, and an entry contains: |
| 123 | 130 | ||
| 124 | lba : The premap ABA that is being written to | 131 | ======== ===================================================================== |
| 125 | old_map : The old postmap ABA - after 'this' write completes, this will be a | 132 | lba The premap ABA that is being written to |
| 133 | old_map The old postmap ABA - after 'this' write completes, this will be a | ||
| 126 | free block. | 134 | free block. |
| 127 | new_map : The new postmap ABA. The map will up updated to reflect this | 135 | new_map The new postmap ABA. The map will up updated to reflect this |
| 128 | lba->postmap_aba mapping, but we log it here in case we have to | 136 | lba->postmap_aba mapping, but we log it here in case we have to |
| 129 | recover. | 137 | recover. |
| 130 | seq : Sequence number to mark which of the 2 sections of this flog entry is | 138 | seq Sequence number to mark which of the 2 sections of this flog entry is |
| 131 | valid/newest. It cycles between 01->10->11->01 (binary) under normal | 139 | valid/newest. It cycles between 01->10->11->01 (binary) under normal |
| 132 | operation, with 00 indicating an uninitialized state. | 140 | operation, with 00 indicating an uninitialized state. |
| 133 | lba' : alternate lba entry | 141 | lba' alternate lba entry |
| 134 | old_map': alternate old postmap entry | 142 | old_map' alternate old postmap entry |
| 135 | new_map': alternate new postmap entry | 143 | new_map' alternate new postmap entry |
| 136 | seq' : alternate sequence number. | 144 | seq' alternate sequence number. |
| 145 | ======== ===================================================================== | ||
| 137 | 146 | ||
| 138 | Each of the above fields is 32-bit, making one entry 32 bytes. Entries are also | 147 | Each of the above fields is 32-bit, making one entry 32 bytes. Entries are also |
| 139 | padded to 64 bytes to avoid cache line sharing or aliasing. Flog updates are | 148 | padded to 64 bytes to avoid cache line sharing or aliasing. Flog updates are |
| @@ -147,8 +156,10 @@ c. The concept of lanes | |||
| 147 | 156 | ||
| 148 | While 'nfree' describes the number of concurrent IOs an arena can process | 157 | While 'nfree' describes the number of concurrent IOs an arena can process |
| 149 | concurrently, 'nlanes' is the number of IOs the BTT device as a whole can | 158 | concurrently, 'nlanes' is the number of IOs the BTT device as a whole can |
| 150 | process. | 159 | process:: |
| 151 | nlanes = min(nfree, num_cpus) | 160 | |
| 161 | nlanes = min(nfree, num_cpus) | ||
| 162 | |||
| 152 | A lane number is obtained at the start of any IO, and is used for indexing into | 163 | A lane number is obtained at the start of any IO, and is used for indexing into |
| 153 | all the on-disk and in-memory data structures for the duration of the IO. If | 164 | all the on-disk and in-memory data structures for the duration of the IO. If |
| 154 | there are more CPUs than the max number of available lanes, than lanes are | 165 | there are more CPUs than the max number of available lanes, than lanes are |
| @@ -180,10 +191,10 @@ e. In-memory data structure: map locks | |||
| 180 | -------------------------------------- | 191 | -------------------------------------- |
| 181 | 192 | ||
| 182 | Consider a case where two writer threads are writing to the same LBA. There can | 193 | Consider a case where two writer threads are writing to the same LBA. There can |
| 183 | be a race in the following sequence of steps: | 194 | be a race in the following sequence of steps:: |
| 184 | 195 | ||
| 185 | free[lane] = map[premap_aba] | 196 | free[lane] = map[premap_aba] |
| 186 | map[premap_aba] = postmap_aba | 197 | map[premap_aba] = postmap_aba |
| 187 | 198 | ||
| 188 | Both threads can update their respective free[lane] with the same old, freed | 199 | Both threads can update their respective free[lane] with the same old, freed |
| 189 | postmap_aba. This has made the layout inconsistent by losing a free entry, and | 200 | postmap_aba. This has made the layout inconsistent by losing a free entry, and |
| @@ -202,6 +213,7 @@ On startup, we analyze the BTT flog to create our list of free blocks. We walk | |||
| 202 | through all the entries, and for each lane, of the set of two possible | 213 | through all the entries, and for each lane, of the set of two possible |
| 203 | 'sections', we always look at the most recent one only (based on the sequence | 214 | 'sections', we always look at the most recent one only (based on the sequence |
| 204 | number). The reconstruction rules/steps are simple: | 215 | number). The reconstruction rules/steps are simple: |
| 216 | |||
| 205 | - Read map[log_entry.lba]. | 217 | - Read map[log_entry.lba]. |
| 206 | - If log_entry.new matches the map entry, then log_entry.old is free. | 218 | - If log_entry.new matches the map entry, then log_entry.old is free. |
| 207 | - If log_entry.new does not match the map entry, then log_entry.new is free. | 219 | - If log_entry.new does not match the map entry, then log_entry.new is free. |
| @@ -228,7 +240,7 @@ Write: | |||
| 228 | 1. Convert external LBA to Arena number + pre-map ABA | 240 | 1. Convert external LBA to Arena number + pre-map ABA |
| 229 | 2. Get a lane (and take lane_lock) | 241 | 2. Get a lane (and take lane_lock) |
| 230 | 3. Use lane to index into in-memory free list and obtain a new block, next flog | 242 | 3. Use lane to index into in-memory free list and obtain a new block, next flog |
| 231 | index, next sequence number | 243 | index, next sequence number |
| 232 | 4. Scan the RTT to check if free block is present, and spin/wait if it is. | 244 | 4. Scan the RTT to check if free block is present, and spin/wait if it is. |
| 233 | 5. Write data to this free block | 245 | 5. Write data to this free block |
| 234 | 6. Read map to get the existing post-map ABA entry for this pre-map ABA | 246 | 6. Read map to get the existing post-map ABA entry for this pre-map ABA |
| @@ -245,6 +257,7 @@ Write: | |||
| 245 | An arena would be in an error state if any of the metadata is corrupted | 257 | An arena would be in an error state if any of the metadata is corrupted |
| 246 | irrecoverably, either due to a bug or a media error. The following conditions | 258 | irrecoverably, either due to a bug or a media error. The following conditions |
| 247 | indicate an error: | 259 | indicate an error: |
| 260 | |||
| 248 | - Info block checksum does not match (and recovering from the copy also fails) | 261 | - Info block checksum does not match (and recovering from the copy also fails) |
| 249 | - All internal available blocks are not uniquely and entirely addressed by the | 262 | - All internal available blocks are not uniquely and entirely addressed by the |
| 250 | sum of mapped blocks and free blocks (from the BTT flog). | 263 | sum of mapped blocks and free blocks (from the BTT flog). |
| @@ -263,11 +276,10 @@ The BTT can be set up on any disk (namespace) exposed by the libnvdimm subsystem | |||
| 263 | (pmem, or blk mode). The easiest way to set up such a namespace is using the | 276 | (pmem, or blk mode). The easiest way to set up such a namespace is using the |
| 264 | 'ndctl' utility [1]: | 277 | 'ndctl' utility [1]: |
| 265 | 278 | ||
| 266 | For example, the ndctl command line to setup a btt with a 4k sector size is: | 279 | For example, the ndctl command line to setup a btt with a 4k sector size is:: |
| 267 | 280 | ||
| 268 | ndctl create-namespace -f -e namespace0.0 -m sector -l 4k | 281 | ndctl create-namespace -f -e namespace0.0 -m sector -l 4k |
| 269 | 282 | ||
| 270 | See ndctl create-namespace --help for more options. | 283 | See ndctl create-namespace --help for more options. |
| 271 | 284 | ||
| 272 | [1]: https://github.com/pmem/ndctl | 285 | [1]: https://github.com/pmem/ndctl |
| 273 | |||
diff --git a/Documentation/driver-api/nvdimm/index.rst b/Documentation/driver-api/nvdimm/index.rst new file mode 100644 index 000000000000..a4f8f98aeb94 --- /dev/null +++ b/Documentation/driver-api/nvdimm/index.rst | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | =================================== | ||
| 4 | Non-Volatile Memory Device (NVDIMM) | ||
| 5 | =================================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | nvdimm | ||
| 11 | btt | ||
| 12 | security | ||
diff --git a/Documentation/nvdimm/nvdimm.txt b/Documentation/driver-api/nvdimm/nvdimm.rst index 1669f626b037..08f855cbb4e6 100644 --- a/Documentation/nvdimm/nvdimm.txt +++ b/Documentation/driver-api/nvdimm/nvdimm.rst | |||
| @@ -1,8 +1,14 @@ | |||
| 1 | LIBNVDIMM: Non-Volatile Devices | 1 | =============================== |
| 2 | libnvdimm - kernel / libndctl - userspace helper library | 2 | LIBNVDIMM: Non-Volatile Devices |
| 3 | linux-nvdimm@lists.01.org | 3 | =============================== |
| 4 | v13 | ||
| 5 | 4 | ||
| 5 | libnvdimm - kernel / libndctl - userspace helper library | ||
| 6 | |||
| 7 | linux-nvdimm@lists.01.org | ||
| 8 | |||
| 9 | Version 13 | ||
| 10 | |||
| 11 | .. contents: | ||
| 6 | 12 | ||
| 7 | Glossary | 13 | Glossary |
| 8 | Overview | 14 | Overview |
| @@ -40,49 +46,57 @@ | |||
| 40 | 46 | ||
| 41 | 47 | ||
| 42 | Glossary | 48 | Glossary |
| 43 | -------- | 49 | ======== |
| 44 | 50 | ||
| 45 | PMEM: A system-physical-address range where writes are persistent. A | 51 | PMEM: |
| 46 | block device composed of PMEM is capable of DAX. A PMEM address range | 52 | A system-physical-address range where writes are persistent. A |
| 47 | may span an interleave of several DIMMs. | 53 | block device composed of PMEM is capable of DAX. A PMEM address range |
| 48 | 54 | may span an interleave of several DIMMs. | |
| 49 | BLK: A set of one or more programmable memory mapped apertures provided | 55 | |
| 50 | by a DIMM to access its media. This indirection precludes the | 56 | BLK: |
| 51 | performance benefit of interleaving, but enables DIMM-bounded failure | 57 | A set of one or more programmable memory mapped apertures provided |
| 52 | modes. | 58 | by a DIMM to access its media. This indirection precludes the |
| 53 | 59 | performance benefit of interleaving, but enables DIMM-bounded failure | |
| 54 | DPA: DIMM Physical Address, is a DIMM-relative offset. With one DIMM in | 60 | modes. |
| 55 | the system there would be a 1:1 system-physical-address:DPA association. | 61 | |
| 56 | Once more DIMMs are added a memory controller interleave must be | 62 | DPA: |
| 57 | decoded to determine the DPA associated with a given | 63 | DIMM Physical Address, is a DIMM-relative offset. With one DIMM in |
| 58 | system-physical-address. BLK capacity always has a 1:1 relationship | 64 | the system there would be a 1:1 system-physical-address:DPA association. |
| 59 | with a single-DIMM's DPA range. | 65 | Once more DIMMs are added a memory controller interleave must be |
| 60 | 66 | decoded to determine the DPA associated with a given | |
| 61 | DAX: File system extensions to bypass the page cache and block layer to | 67 | system-physical-address. BLK capacity always has a 1:1 relationship |
| 62 | mmap persistent memory, from a PMEM block device, directly into a | 68 | with a single-DIMM's DPA range. |
| 63 | process address space. | 69 | |
| 64 | 70 | DAX: | |
| 65 | DSM: Device Specific Method: ACPI method to to control specific | 71 | File system extensions to bypass the page cache and block layer to |
| 66 | device - in this case the firmware. | 72 | mmap persistent memory, from a PMEM block device, directly into a |
| 67 | 73 | process address space. | |
| 68 | DCR: NVDIMM Control Region Structure defined in ACPI 6 Section 5.2.25.5. | 74 | |
| 69 | It defines a vendor-id, device-id, and interface format for a given DIMM. | 75 | DSM: |
| 70 | 76 | Device Specific Method: ACPI method to to control specific | |
| 71 | BTT: Block Translation Table: Persistent memory is byte addressable. | 77 | device - in this case the firmware. |
| 72 | Existing software may have an expectation that the power-fail-atomicity | 78 | |
| 73 | of writes is at least one sector, 512 bytes. The BTT is an indirection | 79 | DCR: |
| 74 | table with atomic update semantics to front a PMEM/BLK block device | 80 | NVDIMM Control Region Structure defined in ACPI 6 Section 5.2.25.5. |
| 75 | driver and present arbitrary atomic sector sizes. | 81 | It defines a vendor-id, device-id, and interface format for a given DIMM. |
| 76 | 82 | ||
| 77 | LABEL: Metadata stored on a DIMM device that partitions and identifies | 83 | BTT: |
| 78 | (persistently names) storage between PMEM and BLK. It also partitions | 84 | Block Translation Table: Persistent memory is byte addressable. |
| 79 | BLK storage to host BTTs with different parameters per BLK-partition. | 85 | Existing software may have an expectation that the power-fail-atomicity |
| 80 | Note that traditional partition tables, GPT/MBR, are layered on top of a | 86 | of writes is at least one sector, 512 bytes. The BTT is an indirection |
| 81 | BLK or PMEM device. | 87 | table with atomic update semantics to front a PMEM/BLK block device |
| 88 | driver and present arbitrary atomic sector sizes. | ||
| 89 | |||
| 90 | LABEL: | ||
| 91 | Metadata stored on a DIMM device that partitions and identifies | ||
| 92 | (persistently names) storage between PMEM and BLK. It also partitions | ||
| 93 | BLK storage to host BTTs with different parameters per BLK-partition. | ||
| 94 | Note that traditional partition tables, GPT/MBR, are layered on top of a | ||
| 95 | BLK or PMEM device. | ||
| 82 | 96 | ||
| 83 | 97 | ||
| 84 | Overview | 98 | Overview |
| 85 | -------- | 99 | ======== |
| 86 | 100 | ||
| 87 | The LIBNVDIMM subsystem provides support for three types of NVDIMMs, namely, | 101 | The LIBNVDIMM subsystem provides support for three types of NVDIMMs, namely, |
| 88 | PMEM, BLK, and NVDIMM devices that can simultaneously support both PMEM | 102 | PMEM, BLK, and NVDIMM devices that can simultaneously support both PMEM |
| @@ -96,19 +110,30 @@ accessible via BLK. When that occurs a LABEL is needed to reserve DPA | |||
| 96 | for exclusive access via one mode a time. | 110 | for exclusive access via one mode a time. |
| 97 | 111 | ||
| 98 | Supporting Documents | 112 | Supporting Documents |
| 99 | ACPI 6: http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf | 113 | -------------------- |
| 100 | NVDIMM Namespace: http://pmem.io/documents/NVDIMM_Namespace_Spec.pdf | 114 | |
| 101 | DSM Interface Example: http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf | 115 | ACPI 6: |
| 102 | Driver Writer's Guide: http://pmem.io/documents/NVDIMM_Driver_Writers_Guide.pdf | 116 | http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf |
| 117 | NVDIMM Namespace: | ||
| 118 | http://pmem.io/documents/NVDIMM_Namespace_Spec.pdf | ||
| 119 | DSM Interface Example: | ||
| 120 | http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf | ||
| 121 | Driver Writer's Guide: | ||
| 122 | http://pmem.io/documents/NVDIMM_Driver_Writers_Guide.pdf | ||
| 103 | 123 | ||
| 104 | Git Trees | 124 | Git Trees |
| 105 | LIBNVDIMM: https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git | 125 | --------- |
| 106 | LIBNDCTL: https://github.com/pmem/ndctl.git | 126 | |
| 107 | PMEM: https://github.com/01org/prd | 127 | LIBNVDIMM: |
| 128 | https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git | ||
| 129 | LIBNDCTL: | ||
| 130 | https://github.com/pmem/ndctl.git | ||
| 131 | PMEM: | ||
| 132 | https://github.com/01org/prd | ||
| 108 | 133 | ||
| 109 | 134 | ||
| 110 | LIBNVDIMM PMEM and BLK | 135 | LIBNVDIMM PMEM and BLK |
| 111 | ------------------ | 136 | ====================== |
| 112 | 137 | ||
| 113 | Prior to the arrival of the NFIT, non-volatile memory was described to a | 138 | Prior to the arrival of the NFIT, non-volatile memory was described to a |
| 114 | system in various ad-hoc ways. Usually only the bare minimum was | 139 | system in various ad-hoc ways. Usually only the bare minimum was |
| @@ -122,38 +147,39 @@ For each NVDIMM access method (PMEM, BLK), LIBNVDIMM provides a block | |||
| 122 | device driver: | 147 | device driver: |
| 123 | 148 | ||
| 124 | 1. PMEM (nd_pmem.ko): Drives a system-physical-address range. This | 149 | 1. PMEM (nd_pmem.ko): Drives a system-physical-address range. This |
| 125 | range is contiguous in system memory and may be interleaved (hardware | 150 | range is contiguous in system memory and may be interleaved (hardware |
| 126 | memory controller striped) across multiple DIMMs. When interleaved the | 151 | memory controller striped) across multiple DIMMs. When interleaved the |
| 127 | platform may optionally provide details of which DIMMs are participating | 152 | platform may optionally provide details of which DIMMs are participating |
| 128 | in the interleave. | 153 | in the interleave. |
| 129 | 154 | ||
| 130 | Note that while LIBNVDIMM describes system-physical-address ranges that may | 155 | Note that while LIBNVDIMM describes system-physical-address ranges that may |
| 131 | alias with BLK access as ND_NAMESPACE_PMEM ranges and those without | 156 | alias with BLK access as ND_NAMESPACE_PMEM ranges and those without |
| 132 | alias as ND_NAMESPACE_IO ranges, to the nd_pmem driver there is no | 157 | alias as ND_NAMESPACE_IO ranges, to the nd_pmem driver there is no |
| 133 | distinction. The different device-types are an implementation detail | 158 | distinction. The different device-types are an implementation detail |
| 134 | that userspace can exploit to implement policies like "only interface | 159 | that userspace can exploit to implement policies like "only interface |
| 135 | with address ranges from certain DIMMs". It is worth noting that when | 160 | with address ranges from certain DIMMs". It is worth noting that when |
| 136 | aliasing is present and a DIMM lacks a label, then no block device can | 161 | aliasing is present and a DIMM lacks a label, then no block device can |
| 137 | be created by default as userspace needs to do at least one allocation | 162 | be created by default as userspace needs to do at least one allocation |
| 138 | of DPA to the PMEM range. In contrast ND_NAMESPACE_IO ranges, once | 163 | of DPA to the PMEM range. In contrast ND_NAMESPACE_IO ranges, once |
| 139 | registered, can be immediately attached to nd_pmem. | 164 | registered, can be immediately attached to nd_pmem. |
| 140 | 165 | ||
| 141 | 2. BLK (nd_blk.ko): This driver performs I/O using a set of platform | 166 | 2. BLK (nd_blk.ko): This driver performs I/O using a set of platform |
| 142 | defined apertures. A set of apertures will access just one DIMM. | 167 | defined apertures. A set of apertures will access just one DIMM. |
| 143 | Multiple windows (apertures) allow multiple concurrent accesses, much like | 168 | Multiple windows (apertures) allow multiple concurrent accesses, much like |
| 144 | tagged-command-queuing, and would likely be used by different threads or | 169 | tagged-command-queuing, and would likely be used by different threads or |
| 145 | different CPUs. | 170 | different CPUs. |
| 171 | |||
| 172 | The NFIT specification defines a standard format for a BLK-aperture, but | ||
| 173 | the spec also allows for vendor specific layouts, and non-NFIT BLK | ||
| 174 | implementations may have other designs for BLK I/O. For this reason | ||
| 175 | "nd_blk" calls back into platform-specific code to perform the I/O. | ||
| 146 | 176 | ||
| 147 | The NFIT specification defines a standard format for a BLK-aperture, but | 177 | One such implementation is defined in the "Driver Writer's Guide" and "DSM |
| 148 | the spec also allows for vendor specific layouts, and non-NFIT BLK | 178 | Interface Example". |
| 149 | implementations may have other designs for BLK I/O. For this reason | ||
| 150 | "nd_blk" calls back into platform-specific code to perform the I/O. | ||
| 151 | One such implementation is defined in the "Driver Writer's Guide" and "DSM | ||
| 152 | Interface Example". | ||
| 153 | 179 | ||
| 154 | 180 | ||
| 155 | Why BLK? | 181 | Why BLK? |
| 156 | -------- | 182 | ======== |
| 157 | 183 | ||
| 158 | While PMEM provides direct byte-addressable CPU-load/store access to | 184 | While PMEM provides direct byte-addressable CPU-load/store access to |
| 159 | NVDIMM storage, it does not provide the best system RAS (recovery, | 185 | NVDIMM storage, it does not provide the best system RAS (recovery, |
| @@ -162,12 +188,15 @@ system-physical-address address causes a CPU exception while an access | |||
| 162 | to a corrupted address through an BLK-aperture causes that block window | 188 | to a corrupted address through an BLK-aperture causes that block window |
| 163 | to raise an error status in a register. The latter is more aligned with | 189 | to raise an error status in a register. The latter is more aligned with |
| 164 | the standard error model that host-bus-adapter attached disks present. | 190 | the standard error model that host-bus-adapter attached disks present. |
| 191 | |||
| 165 | Also, if an administrator ever wants to replace a memory it is easier to | 192 | Also, if an administrator ever wants to replace a memory it is easier to |
| 166 | service a system at DIMM module boundaries. Compare this to PMEM where | 193 | service a system at DIMM module boundaries. Compare this to PMEM where |
| 167 | data could be interleaved in an opaque hardware specific manner across | 194 | data could be interleaved in an opaque hardware specific manner across |
| 168 | several DIMMs. | 195 | several DIMMs. |
| 169 | 196 | ||
| 170 | PMEM vs BLK | 197 | PMEM vs BLK |
| 198 | ----------- | ||
| 199 | |||
| 171 | BLK-apertures solve these RAS problems, but their presence is also the | 200 | BLK-apertures solve these RAS problems, but their presence is also the |
| 172 | major contributing factor to the complexity of the ND subsystem. They | 201 | major contributing factor to the complexity of the ND subsystem. They |
| 173 | complicate the implementation because PMEM and BLK alias in DPA space. | 202 | complicate the implementation because PMEM and BLK alias in DPA space. |
| @@ -185,13 +214,14 @@ carved into an arbitrary number of BLK devices with discontiguous | |||
| 185 | extents. | 214 | extents. |
| 186 | 215 | ||
| 187 | BLK-REGIONs, PMEM-REGIONs, Atomic Sectors, and DAX | 216 | BLK-REGIONs, PMEM-REGIONs, Atomic Sectors, and DAX |
| 188 | -------------------------------------------------- | 217 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 189 | 218 | ||
| 190 | One of the few | 219 | One of the few |
| 191 | reasons to allow multiple BLK namespaces per REGION is so that each | 220 | reasons to allow multiple BLK namespaces per REGION is so that each |
| 192 | BLK-namespace can be configured with a BTT with unique atomic sector | 221 | BLK-namespace can be configured with a BTT with unique atomic sector |
| 193 | sizes. While a PMEM device can host a BTT the LABEL specification does | 222 | sizes. While a PMEM device can host a BTT the LABEL specification does |
| 194 | not provide for a sector size to be specified for a PMEM namespace. | 223 | not provide for a sector size to be specified for a PMEM namespace. |
| 224 | |||
| 195 | This is due to the expectation that the primary usage model for PMEM is | 225 | This is due to the expectation that the primary usage model for PMEM is |
| 196 | via DAX, and the BTT is incompatible with DAX. However, for the cases | 226 | via DAX, and the BTT is incompatible with DAX. However, for the cases |
| 197 | where an application or filesystem still needs atomic sector update | 227 | where an application or filesystem still needs atomic sector update |
| @@ -200,52 +230,52 @@ LIBNVDIMM/NDCTL: Block Translation Table "btt" | |||
| 200 | 230 | ||
| 201 | 231 | ||
| 202 | Example NVDIMM Platform | 232 | Example NVDIMM Platform |
| 203 | ----------------------- | 233 | ======================= |
| 204 | 234 | ||
| 205 | For the remainder of this document the following diagram will be | 235 | For the remainder of this document the following diagram will be |
| 206 | referenced for any example sysfs layouts. | 236 | referenced for any example sysfs layouts:: |
| 207 | 237 | ||
| 208 | 238 | ||
| 209 | (a) (b) DIMM BLK-REGION | 239 | (a) (b) DIMM BLK-REGION |
| 210 | +-------------------+--------+--------+--------+ | 240 | +-------------------+--------+--------+--------+ |
| 211 | +------+ | pm0.0 | blk2.0 | pm1.0 | blk2.1 | 0 region2 | 241 | +------+ | pm0.0 | blk2.0 | pm1.0 | blk2.1 | 0 region2 |
| 212 | | imc0 +--+- - - region0- - - +--------+ +--------+ | 242 | | imc0 +--+- - - region0- - - +--------+ +--------+ |
| 213 | +--+---+ | pm0.0 | blk3.0 | pm1.0 | blk3.1 | 1 region3 | 243 | +--+---+ | pm0.0 | blk3.0 | pm1.0 | blk3.1 | 1 region3 |
| 214 | | +-------------------+--------v v--------+ | 244 | | +-------------------+--------v v--------+ |
| 215 | +--+---+ | | | 245 | +--+---+ | | |
| 216 | | cpu0 | region1 | 246 | | cpu0 | region1 |
| 217 | +--+---+ | | | 247 | +--+---+ | | |
| 218 | | +----------------------------^ ^--------+ | 248 | | +----------------------------^ ^--------+ |
| 219 | +--+---+ | blk4.0 | pm1.0 | blk4.0 | 2 region4 | 249 | +--+---+ | blk4.0 | pm1.0 | blk4.0 | 2 region4 |
| 220 | | imc1 +--+----------------------------| +--------+ | 250 | | imc1 +--+----------------------------| +--------+ |
| 221 | +------+ | blk5.0 | pm1.0 | blk5.0 | 3 region5 | 251 | +------+ | blk5.0 | pm1.0 | blk5.0 | 3 region5 |
| 222 | +----------------------------+--------+--------+ | 252 | +----------------------------+--------+--------+ |
| 223 | 253 | ||
| 224 | In this platform we have four DIMMs and two memory controllers in one | 254 | In this platform we have four DIMMs and two memory controllers in one |
| 225 | socket. Each unique interface (BLK or PMEM) to DPA space is identified | 255 | socket. Each unique interface (BLK or PMEM) to DPA space is identified |
| 226 | by a region device with a dynamically assigned id (REGION0 - REGION5). | 256 | by a region device with a dynamically assigned id (REGION0 - REGION5). |
| 227 | 257 | ||
| 228 | 1. The first portion of DIMM0 and DIMM1 are interleaved as REGION0. A | 258 | 1. The first portion of DIMM0 and DIMM1 are interleaved as REGION0. A |
| 229 | single PMEM namespace is created in the REGION0-SPA-range that spans most | 259 | single PMEM namespace is created in the REGION0-SPA-range that spans most |
| 230 | of DIMM0 and DIMM1 with a user-specified name of "pm0.0". Some of that | 260 | of DIMM0 and DIMM1 with a user-specified name of "pm0.0". Some of that |
| 231 | interleaved system-physical-address range is reclaimed as BLK-aperture | 261 | interleaved system-physical-address range is reclaimed as BLK-aperture |
| 232 | accessed space starting at DPA-offset (a) into each DIMM. In that | 262 | accessed space starting at DPA-offset (a) into each DIMM. In that |
| 233 | reclaimed space we create two BLK-aperture "namespaces" from REGION2 and | 263 | reclaimed space we create two BLK-aperture "namespaces" from REGION2 and |
| 234 | REGION3 where "blk2.0" and "blk3.0" are just human readable names that | 264 | REGION3 where "blk2.0" and "blk3.0" are just human readable names that |
| 235 | could be set to any user-desired name in the LABEL. | 265 | could be set to any user-desired name in the LABEL. |
| 236 | 266 | ||
| 237 | 2. In the last portion of DIMM0 and DIMM1 we have an interleaved | 267 | 2. In the last portion of DIMM0 and DIMM1 we have an interleaved |
| 238 | system-physical-address range, REGION1, that spans those two DIMMs as | 268 | system-physical-address range, REGION1, that spans those two DIMMs as |
| 239 | well as DIMM2 and DIMM3. Some of REGION1 is allocated to a PMEM namespace | 269 | well as DIMM2 and DIMM3. Some of REGION1 is allocated to a PMEM namespace |
| 240 | named "pm1.0", the rest is reclaimed in 4 BLK-aperture namespaces (for | 270 | named "pm1.0", the rest is reclaimed in 4 BLK-aperture namespaces (for |
| 241 | each DIMM in the interleave set), "blk2.1", "blk3.1", "blk4.0", and | 271 | each DIMM in the interleave set), "blk2.1", "blk3.1", "blk4.0", and |
| 242 | "blk5.0". | 272 | "blk5.0". |
| 243 | 273 | ||
| 244 | 3. The portion of DIMM2 and DIMM3 that do not participate in the REGION1 | 274 | 3. The portion of DIMM2 and DIMM3 that do not participate in the REGION1 |
| 245 | interleaved system-physical-address range (i.e. the DPA address past | 275 | interleaved system-physical-address range (i.e. the DPA address past |
| 246 | offset (b) are also included in the "blk4.0" and "blk5.0" namespaces. | 276 | offset (b) are also included in the "blk4.0" and "blk5.0" namespaces. |
| 247 | Note, that this example shows that BLK-aperture namespaces don't need to | 277 | Note, that this example shows that BLK-aperture namespaces don't need to |
| 248 | be contiguous in DPA-space. | 278 | be contiguous in DPA-space. |
| 249 | 279 | ||
| 250 | This bus is provided by the kernel under the device | 280 | This bus is provided by the kernel under the device |
| 251 | /sys/devices/platform/nfit_test.0 when CONFIG_NFIT_TEST is enabled and | 281 | /sys/devices/platform/nfit_test.0 when CONFIG_NFIT_TEST is enabled and |
| @@ -254,7 +284,7 @@ by a region device with a dynamically assigned id (REGION0 - REGION5). | |||
| 254 | 284 | ||
| 255 | 285 | ||
| 256 | LIBNVDIMM Kernel Device Model and LIBNDCTL Userspace API | 286 | LIBNVDIMM Kernel Device Model and LIBNDCTL Userspace API |
| 257 | ---------------------------------------------------- | 287 | ======================================================== |
| 258 | 288 | ||
| 259 | What follows is a description of the LIBNVDIMM sysfs layout and a | 289 | What follows is a description of the LIBNVDIMM sysfs layout and a |
| 260 | corresponding object hierarchy diagram as viewed through the LIBNDCTL | 290 | corresponding object hierarchy diagram as viewed through the LIBNDCTL |
| @@ -263,12 +293,18 @@ NVDIMM Platform which is also the LIBNVDIMM bus used in the LIBNDCTL unit | |||
| 263 | test. | 293 | test. |
| 264 | 294 | ||
| 265 | LIBNDCTL: Context | 295 | LIBNDCTL: Context |
| 296 | ----------------- | ||
| 297 | |||
| 266 | Every API call in the LIBNDCTL library requires a context that holds the | 298 | Every API call in the LIBNDCTL library requires a context that holds the |
| 267 | logging parameters and other library instance state. The library is | 299 | logging parameters and other library instance state. The library is |
| 268 | based on the libabc template: | 300 | based on the libabc template: |
| 269 | https://git.kernel.org/cgit/linux/kernel/git/kay/libabc.git | 301 | |
| 302 | https://git.kernel.org/cgit/linux/kernel/git/kay/libabc.git | ||
| 270 | 303 | ||
| 271 | LIBNDCTL: instantiate a new library context example | 304 | LIBNDCTL: instantiate a new library context example |
| 305 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 306 | |||
| 307 | :: | ||
| 272 | 308 | ||
| 273 | struct ndctl_ctx *ctx; | 309 | struct ndctl_ctx *ctx; |
| 274 | 310 | ||
| @@ -278,7 +314,7 @@ LIBNDCTL: instantiate a new library context example | |||
| 278 | return NULL; | 314 | return NULL; |
| 279 | 315 | ||
| 280 | LIBNVDIMM/LIBNDCTL: Bus | 316 | LIBNVDIMM/LIBNDCTL: Bus |
| 281 | ------------------- | 317 | ----------------------- |
| 282 | 318 | ||
| 283 | A bus has a 1:1 relationship with an NFIT. The current expectation for | 319 | A bus has a 1:1 relationship with an NFIT. The current expectation for |
| 284 | ACPI based systems is that there is only ever one platform-global NFIT. | 320 | ACPI based systems is that there is only ever one platform-global NFIT. |
| @@ -288,9 +324,10 @@ we use this capability to test multiple NFIT configurations in the unit | |||
| 288 | test. | 324 | test. |
| 289 | 325 | ||
| 290 | LIBNVDIMM: control class device in /sys/class | 326 | LIBNVDIMM: control class device in /sys/class |
| 327 | --------------------------------------------- | ||
| 291 | 328 | ||
| 292 | This character device accepts DSM messages to be passed to DIMM | 329 | This character device accepts DSM messages to be passed to DIMM |
| 293 | identified by its NFIT handle. | 330 | identified by its NFIT handle:: |
| 294 | 331 | ||
| 295 | /sys/class/nd/ndctl0 | 332 | /sys/class/nd/ndctl0 |
| 296 | |-- dev | 333 | |-- dev |
| @@ -300,10 +337,15 @@ identified by its NFIT handle. | |||
| 300 | 337 | ||
| 301 | 338 | ||
| 302 | LIBNVDIMM: bus | 339 | LIBNVDIMM: bus |
| 340 | -------------- | ||
| 341 | |||
| 342 | :: | ||
| 303 | 343 | ||
| 304 | struct nvdimm_bus *nvdimm_bus_register(struct device *parent, | 344 | struct nvdimm_bus *nvdimm_bus_register(struct device *parent, |
| 305 | struct nvdimm_bus_descriptor *nfit_desc); | 345 | struct nvdimm_bus_descriptor *nfit_desc); |
| 306 | 346 | ||
| 347 | :: | ||
| 348 | |||
| 307 | /sys/devices/platform/nfit_test.0/ndbus0 | 349 | /sys/devices/platform/nfit_test.0/ndbus0 |
| 308 | |-- commands | 350 | |-- commands |
| 309 | |-- nd | 351 | |-- nd |
| @@ -324,7 +366,9 @@ LIBNVDIMM: bus | |||
| 324 | `-- wait_probe | 366 | `-- wait_probe |
| 325 | 367 | ||
| 326 | LIBNDCTL: bus enumeration example | 368 | LIBNDCTL: bus enumeration example |
| 327 | Find the bus handle that describes the bus from Example NVDIMM Platform | 369 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 370 | |||
| 371 | Find the bus handle that describes the bus from Example NVDIMM Platform:: | ||
| 328 | 372 | ||
| 329 | static struct ndctl_bus *get_bus_by_provider(struct ndctl_ctx *ctx, | 373 | static struct ndctl_bus *get_bus_by_provider(struct ndctl_ctx *ctx, |
| 330 | const char *provider) | 374 | const char *provider) |
| @@ -342,7 +386,7 @@ Find the bus handle that describes the bus from Example NVDIMM Platform | |||
| 342 | 386 | ||
| 343 | 387 | ||
| 344 | LIBNVDIMM/LIBNDCTL: DIMM (NMEM) | 388 | LIBNVDIMM/LIBNDCTL: DIMM (NMEM) |
| 345 | --------------------------- | 389 | ------------------------------- |
| 346 | 390 | ||
| 347 | The DIMM device provides a character device for sending commands to | 391 | The DIMM device provides a character device for sending commands to |
| 348 | hardware, and it is a container for LABELs. If the DIMM is defined by | 392 | hardware, and it is a container for LABELs. If the DIMM is defined by |
| @@ -355,11 +399,16 @@ Range Mapping Structure", and there is no requirement that they actually | |||
| 355 | be physical DIMMs, so we use a more generic name. | 399 | be physical DIMMs, so we use a more generic name. |
| 356 | 400 | ||
| 357 | LIBNVDIMM: DIMM (NMEM) | 401 | LIBNVDIMM: DIMM (NMEM) |
| 402 | ^^^^^^^^^^^^^^^^^^^^^^ | ||
| 403 | |||
| 404 | :: | ||
| 358 | 405 | ||
| 359 | struct nvdimm *nvdimm_create(struct nvdimm_bus *nvdimm_bus, void *provider_data, | 406 | struct nvdimm *nvdimm_create(struct nvdimm_bus *nvdimm_bus, void *provider_data, |
| 360 | const struct attribute_group **groups, unsigned long flags, | 407 | const struct attribute_group **groups, unsigned long flags, |
| 361 | unsigned long *dsm_mask); | 408 | unsigned long *dsm_mask); |
| 362 | 409 | ||
| 410 | :: | ||
| 411 | |||
| 363 | /sys/devices/platform/nfit_test.0/ndbus0 | 412 | /sys/devices/platform/nfit_test.0/ndbus0 |
| 364 | |-- nmem0 | 413 | |-- nmem0 |
| 365 | | |-- available_slots | 414 | | |-- available_slots |
| @@ -384,15 +433,20 @@ LIBNVDIMM: DIMM (NMEM) | |||
| 384 | 433 | ||
| 385 | 434 | ||
| 386 | LIBNDCTL: DIMM enumeration example | 435 | LIBNDCTL: DIMM enumeration example |
| 436 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 387 | 437 | ||
| 388 | Note, in this example we are assuming NFIT-defined DIMMs which are | 438 | Note, in this example we are assuming NFIT-defined DIMMs which are |
| 389 | identified by an "nfit_handle" a 32-bit value where: | 439 | identified by an "nfit_handle" a 32-bit value where: |
| 390 | Bit 3:0 DIMM number within the memory channel | 440 | |
| 391 | Bit 7:4 memory channel number | 441 | - Bit 3:0 DIMM number within the memory channel |
| 392 | Bit 11:8 memory controller ID | 442 | - Bit 7:4 memory channel number |
| 393 | Bit 15:12 socket ID (within scope of a Node controller if node controller is present) | 443 | - Bit 11:8 memory controller ID |
| 394 | Bit 27:16 Node Controller ID | 444 | - Bit 15:12 socket ID (within scope of a Node controller if node |
| 395 | Bit 31:28 Reserved | 445 | controller is present) |
| 446 | - Bit 27:16 Node Controller ID | ||
| 447 | - Bit 31:28 Reserved | ||
| 448 | |||
| 449 | :: | ||
| 396 | 450 | ||
| 397 | static struct ndctl_dimm *get_dimm_by_handle(struct ndctl_bus *bus, | 451 | static struct ndctl_dimm *get_dimm_by_handle(struct ndctl_bus *bus, |
| 398 | unsigned int handle) | 452 | unsigned int handle) |
| @@ -413,7 +467,7 @@ Bit 31:28 Reserved | |||
| 413 | dimm = get_dimm_by_handle(bus, DIMM_HANDLE(0, 0, 0, 0, 0)); | 467 | dimm = get_dimm_by_handle(bus, DIMM_HANDLE(0, 0, 0, 0, 0)); |
| 414 | 468 | ||
| 415 | LIBNVDIMM/LIBNDCTL: Region | 469 | LIBNVDIMM/LIBNDCTL: Region |
| 416 | ---------------------- | 470 | -------------------------- |
| 417 | 471 | ||
| 418 | A generic REGION device is registered for each PMEM range or BLK-aperture | 472 | A generic REGION device is registered for each PMEM range or BLK-aperture |
| 419 | set. Per the example there are 6 regions: 2 PMEM and 4 BLK-aperture | 473 | set. Per the example there are 6 regions: 2 PMEM and 4 BLK-aperture |
| @@ -435,13 +489,15 @@ emits, "devtype" duplicates the DEVTYPE variable stored by udev at the | |||
| 435 | at the 'add' event, and finally, the optional "spa_index" is provided in | 489 | at the 'add' event, and finally, the optional "spa_index" is provided in |
| 436 | the case where the region is defined by a SPA. | 490 | the case where the region is defined by a SPA. |
| 437 | 491 | ||
| 438 | LIBNVDIMM: region | 492 | LIBNVDIMM: region:: |
| 439 | 493 | ||
| 440 | struct nd_region *nvdimm_pmem_region_create(struct nvdimm_bus *nvdimm_bus, | 494 | struct nd_region *nvdimm_pmem_region_create(struct nvdimm_bus *nvdimm_bus, |
| 441 | struct nd_region_desc *ndr_desc); | 495 | struct nd_region_desc *ndr_desc); |
| 442 | struct nd_region *nvdimm_blk_region_create(struct nvdimm_bus *nvdimm_bus, | 496 | struct nd_region *nvdimm_blk_region_create(struct nvdimm_bus *nvdimm_bus, |
| 443 | struct nd_region_desc *ndr_desc); | 497 | struct nd_region_desc *ndr_desc); |
| 444 | 498 | ||
| 499 | :: | ||
| 500 | |||
| 445 | /sys/devices/platform/nfit_test.0/ndbus0 | 501 | /sys/devices/platform/nfit_test.0/ndbus0 |
| 446 | |-- region0 | 502 | |-- region0 |
| 447 | | |-- available_size | 503 | | |-- available_size |
| @@ -468,10 +524,11 @@ LIBNVDIMM: region | |||
| 468 | [..] | 524 | [..] |
| 469 | 525 | ||
| 470 | LIBNDCTL: region enumeration example | 526 | LIBNDCTL: region enumeration example |
| 527 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 471 | 528 | ||
| 472 | Sample region retrieval routines based on NFIT-unique data like | 529 | Sample region retrieval routines based on NFIT-unique data like |
| 473 | "spa_index" (interleave set id) for PMEM and "nfit_handle" (dimm id) for | 530 | "spa_index" (interleave set id) for PMEM and "nfit_handle" (dimm id) for |
| 474 | BLK. | 531 | BLK:: |
| 475 | 532 | ||
| 476 | static struct ndctl_region *get_pmem_region_by_spa_index(struct ndctl_bus *bus, | 533 | static struct ndctl_region *get_pmem_region_by_spa_index(struct ndctl_bus *bus, |
| 477 | unsigned int spa_index) | 534 | unsigned int spa_index) |
| @@ -518,33 +575,33 @@ REGION name generic and expects userspace to always consider the | |||
| 518 | region-attributes for four reasons: | 575 | region-attributes for four reasons: |
| 519 | 576 | ||
| 520 | 1. There are already more than two REGION and "namespace" types. For | 577 | 1. There are already more than two REGION and "namespace" types. For |
| 521 | PMEM there are two subtypes. As mentioned previously we have PMEM where | 578 | PMEM there are two subtypes. As mentioned previously we have PMEM where |
| 522 | the constituent DIMM devices are known and anonymous PMEM. For BLK | 579 | the constituent DIMM devices are known and anonymous PMEM. For BLK |
| 523 | regions the NFIT specification already anticipates vendor specific | 580 | regions the NFIT specification already anticipates vendor specific |
| 524 | implementations. The exact distinction of what a region contains is in | 581 | implementations. The exact distinction of what a region contains is in |
| 525 | the region-attributes not the region-name or the region-devtype. | 582 | the region-attributes not the region-name or the region-devtype. |
| 526 | 583 | ||
| 527 | 2. A region with zero child-namespaces is a possible configuration. For | 584 | 2. A region with zero child-namespaces is a possible configuration. For |
| 528 | example, the NFIT allows for a DCR to be published without a | 585 | example, the NFIT allows for a DCR to be published without a |
| 529 | corresponding BLK-aperture. This equates to a DIMM that can only accept | 586 | corresponding BLK-aperture. This equates to a DIMM that can only accept |
| 530 | control/configuration messages, but no i/o through a descendant block | 587 | control/configuration messages, but no i/o through a descendant block |
| 531 | device. Again, this "type" is advertised in the attributes ('mappings' | 588 | device. Again, this "type" is advertised in the attributes ('mappings' |
| 532 | == 0) and the name does not tell you much. | 589 | == 0) and the name does not tell you much. |
| 533 | 590 | ||
| 534 | 3. What if a third major interface type arises in the future? Outside | 591 | 3. What if a third major interface type arises in the future? Outside |
| 535 | of vendor specific implementations, it's not difficult to envision a | 592 | of vendor specific implementations, it's not difficult to envision a |
| 536 | third class of interface type beyond BLK and PMEM. With a generic name | 593 | third class of interface type beyond BLK and PMEM. With a generic name |
| 537 | for the REGION level of the device-hierarchy old userspace | 594 | for the REGION level of the device-hierarchy old userspace |
| 538 | implementations can still make sense of new kernel advertised | 595 | implementations can still make sense of new kernel advertised |
| 539 | region-types. Userspace can always rely on the generic region | 596 | region-types. Userspace can always rely on the generic region |
| 540 | attributes like "mappings", "size", etc and the expected child devices | 597 | attributes like "mappings", "size", etc and the expected child devices |
| 541 | named "namespace". This generic format of the device-model hierarchy | 598 | named "namespace". This generic format of the device-model hierarchy |
| 542 | allows the LIBNVDIMM and LIBNDCTL implementations to be more uniform and | 599 | allows the LIBNVDIMM and LIBNDCTL implementations to be more uniform and |
| 543 | future-proof. | 600 | future-proof. |
| 544 | 601 | ||
| 545 | 4. There are more robust mechanisms for determining the major type of a | 602 | 4. There are more robust mechanisms for determining the major type of a |
| 546 | region than a device name. See the next section, How Do I Determine the | 603 | region than a device name. See the next section, How Do I Determine the |
| 547 | Major Type of a Region? | 604 | Major Type of a Region? |
| 548 | 605 | ||
| 549 | How Do I Determine the Major Type of a Region? | 606 | How Do I Determine the Major Type of a Region? |
| 550 | ---------------------------------------------- | 607 | ---------------------------------------------- |
| @@ -553,7 +610,8 @@ Outside of the blanket recommendation of "use libndctl", or simply | |||
| 553 | looking at the kernel header (/usr/include/linux/ndctl.h) to decode the | 610 | looking at the kernel header (/usr/include/linux/ndctl.h) to decode the |
| 554 | "nstype" integer attribute, here are some other options. | 611 | "nstype" integer attribute, here are some other options. |
| 555 | 612 | ||
| 556 | 1. module alias lookup: | 613 | 1. module alias lookup |
| 614 | ^^^^^^^^^^^^^^^^^^^^^^ | ||
| 557 | 615 | ||
| 558 | The whole point of region/namespace device type differentiation is to | 616 | The whole point of region/namespace device type differentiation is to |
| 559 | decide which block-device driver will attach to a given LIBNVDIMM namespace. | 617 | decide which block-device driver will attach to a given LIBNVDIMM namespace. |
| @@ -569,28 +627,31 @@ looking at the kernel header (/usr/include/linux/ndctl.h) to decode the | |||
| 569 | the resulting namespaces. The output from module resolution is more | 627 | the resulting namespaces. The output from module resolution is more |
| 570 | accurate than a region-name or region-devtype. | 628 | accurate than a region-name or region-devtype. |
| 571 | 629 | ||
| 572 | 2. udev: | 630 | 2. udev |
| 631 | ^^^^^^^ | ||
| 632 | |||
| 633 | The kernel "devtype" is registered in the udev database:: | ||
| 573 | 634 | ||
| 574 | The kernel "devtype" is registered in the udev database | 635 | # udevadm info --path=/devices/platform/nfit_test.0/ndbus0/region0 |
| 575 | # udevadm info --path=/devices/platform/nfit_test.0/ndbus0/region0 | 636 | P: /devices/platform/nfit_test.0/ndbus0/region0 |
| 576 | P: /devices/platform/nfit_test.0/ndbus0/region0 | 637 | E: DEVPATH=/devices/platform/nfit_test.0/ndbus0/region0 |
| 577 | E: DEVPATH=/devices/platform/nfit_test.0/ndbus0/region0 | 638 | E: DEVTYPE=nd_pmem |
| 578 | E: DEVTYPE=nd_pmem | 639 | E: MODALIAS=nd:t2 |
| 579 | E: MODALIAS=nd:t2 | 640 | E: SUBSYSTEM=nd |
| 580 | E: SUBSYSTEM=nd | ||
| 581 | 641 | ||
| 582 | # udevadm info --path=/devices/platform/nfit_test.0/ndbus0/region4 | 642 | # udevadm info --path=/devices/platform/nfit_test.0/ndbus0/region4 |
| 583 | P: /devices/platform/nfit_test.0/ndbus0/region4 | 643 | P: /devices/platform/nfit_test.0/ndbus0/region4 |
| 584 | E: DEVPATH=/devices/platform/nfit_test.0/ndbus0/region4 | 644 | E: DEVPATH=/devices/platform/nfit_test.0/ndbus0/region4 |
| 585 | E: DEVTYPE=nd_blk | 645 | E: DEVTYPE=nd_blk |
| 586 | E: MODALIAS=nd:t3 | 646 | E: MODALIAS=nd:t3 |
| 587 | E: SUBSYSTEM=nd | 647 | E: SUBSYSTEM=nd |
| 588 | 648 | ||
| 589 | ...and is available as a region attribute, but keep in mind that the | 649 | ...and is available as a region attribute, but keep in mind that the |
| 590 | "devtype" does not indicate sub-type variations and scripts should | 650 | "devtype" does not indicate sub-type variations and scripts should |
| 591 | really be understanding the other attributes. | 651 | really be understanding the other attributes. |
| 592 | 652 | ||
| 593 | 3. type specific attributes: | 653 | 3. type specific attributes |
| 654 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 594 | 655 | ||
| 595 | As it currently stands a BLK-aperture region will never have a | 656 | As it currently stands a BLK-aperture region will never have a |
| 596 | "nfit/spa_index" attribute, but neither will a non-NFIT PMEM region. A | 657 | "nfit/spa_index" attribute, but neither will a non-NFIT PMEM region. A |
| @@ -600,7 +661,7 @@ looking at the kernel header (/usr/include/linux/ndctl.h) to decode the | |||
| 600 | 661 | ||
| 601 | 662 | ||
| 602 | LIBNVDIMM/LIBNDCTL: Namespace | 663 | LIBNVDIMM/LIBNDCTL: Namespace |
| 603 | ------------------------- | 664 | ----------------------------- |
| 604 | 665 | ||
| 605 | A REGION, after resolving DPA aliasing and LABEL specified boundaries, | 666 | A REGION, after resolving DPA aliasing and LABEL specified boundaries, |
| 606 | surfaces one or more "namespace" devices. The arrival of a "namespace" | 667 | surfaces one or more "namespace" devices. The arrival of a "namespace" |
| @@ -608,12 +669,14 @@ device currently triggers either the nd_blk or nd_pmem driver to load | |||
| 608 | and register a disk/block device. | 669 | and register a disk/block device. |
| 609 | 670 | ||
| 610 | LIBNVDIMM: namespace | 671 | LIBNVDIMM: namespace |
| 672 | ^^^^^^^^^^^^^^^^^^^^ | ||
| 673 | |||
| 611 | Here is a sample layout from the three major types of NAMESPACE where | 674 | Here is a sample layout from the three major types of NAMESPACE where |
| 612 | namespace0.0 represents DIMM-info-backed PMEM (note that it has a 'uuid' | 675 | namespace0.0 represents DIMM-info-backed PMEM (note that it has a 'uuid' |
| 613 | attribute), namespace2.0 represents a BLK namespace (note it has a | 676 | attribute), namespace2.0 represents a BLK namespace (note it has a |
| 614 | 'sector_size' attribute) that, and namespace6.0 represents an anonymous | 677 | 'sector_size' attribute) that, and namespace6.0 represents an anonymous |
| 615 | PMEM namespace (note that has no 'uuid' attribute due to not support a | 678 | PMEM namespace (note that has no 'uuid' attribute due to not support a |
| 616 | LABEL). | 679 | LABEL):: |
| 617 | 680 | ||
| 618 | /sys/devices/platform/nfit_test.0/ndbus0/region0/namespace0.0 | 681 | /sys/devices/platform/nfit_test.0/ndbus0/region0/namespace0.0 |
| 619 | |-- alt_name | 682 | |-- alt_name |
| @@ -656,76 +719,84 @@ LABEL). | |||
| 656 | `-- uevent | 719 | `-- uevent |
| 657 | 720 | ||
| 658 | LIBNDCTL: namespace enumeration example | 721 | LIBNDCTL: namespace enumeration example |
| 722 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 659 | Namespaces are indexed relative to their parent region, example below. | 723 | Namespaces are indexed relative to their parent region, example below. |
| 660 | These indexes are mostly static from boot to boot, but subsystem makes | 724 | These indexes are mostly static from boot to boot, but subsystem makes |
| 661 | no guarantees in this regard. For a static namespace identifier use its | 725 | no guarantees in this regard. For a static namespace identifier use its |
| 662 | 'uuid' attribute. | 726 | 'uuid' attribute. |
| 663 | 727 | ||
| 664 | static struct ndctl_namespace *get_namespace_by_id(struct ndctl_region *region, | 728 | :: |
| 665 | unsigned int id) | ||
| 666 | { | ||
| 667 | struct ndctl_namespace *ndns; | ||
| 668 | 729 | ||
| 669 | ndctl_namespace_foreach(region, ndns) | 730 | static struct ndctl_namespace |
| 670 | if (ndctl_namespace_get_id(ndns) == id) | 731 | *get_namespace_by_id(struct ndctl_region *region, unsigned int id) |
| 671 | return ndns; | 732 | { |
| 733 | struct ndctl_namespace *ndns; | ||
| 672 | 734 | ||
| 673 | return NULL; | 735 | ndctl_namespace_foreach(region, ndns) |
| 674 | } | 736 | if (ndctl_namespace_get_id(ndns) == id) |
| 737 | return ndns; | ||
| 738 | |||
| 739 | return NULL; | ||
| 740 | } | ||
| 675 | 741 | ||
| 676 | LIBNDCTL: namespace creation example | 742 | LIBNDCTL: namespace creation example |
| 743 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 744 | |||
| 677 | Idle namespaces are automatically created by the kernel if a given | 745 | Idle namespaces are automatically created by the kernel if a given |
| 678 | region has enough available capacity to create a new namespace. | 746 | region has enough available capacity to create a new namespace. |
| 679 | Namespace instantiation involves finding an idle namespace and | 747 | Namespace instantiation involves finding an idle namespace and |
| 680 | configuring it. For the most part the setting of namespace attributes | 748 | configuring it. For the most part the setting of namespace attributes |
| 681 | can occur in any order, the only constraint is that 'uuid' must be set | 749 | can occur in any order, the only constraint is that 'uuid' must be set |
| 682 | before 'size'. This enables the kernel to track DPA allocations | 750 | before 'size'. This enables the kernel to track DPA allocations |
| 683 | internally with a static identifier. | 751 | internally with a static identifier:: |
| 684 | 752 | ||
| 685 | static int configure_namespace(struct ndctl_region *region, | 753 | static int configure_namespace(struct ndctl_region *region, |
| 686 | struct ndctl_namespace *ndns, | 754 | struct ndctl_namespace *ndns, |
| 687 | struct namespace_parameters *parameters) | 755 | struct namespace_parameters *parameters) |
| 688 | { | 756 | { |
| 689 | char devname[50]; | 757 | char devname[50]; |
| 690 | 758 | ||
| 691 | snprintf(devname, sizeof(devname), "namespace%d.%d", | 759 | snprintf(devname, sizeof(devname), "namespace%d.%d", |
| 692 | ndctl_region_get_id(region), paramaters->id); | 760 | ndctl_region_get_id(region), paramaters->id); |
| 693 | 761 | ||
| 694 | ndctl_namespace_set_alt_name(ndns, devname); | 762 | ndctl_namespace_set_alt_name(ndns, devname); |
| 695 | /* 'uuid' must be set prior to setting size! */ | 763 | /* 'uuid' must be set prior to setting size! */ |
| 696 | ndctl_namespace_set_uuid(ndns, paramaters->uuid); | 764 | ndctl_namespace_set_uuid(ndns, paramaters->uuid); |
| 697 | ndctl_namespace_set_size(ndns, paramaters->size); | 765 | ndctl_namespace_set_size(ndns, paramaters->size); |
| 698 | /* unlike pmem namespaces, blk namespaces have a sector size */ | 766 | /* unlike pmem namespaces, blk namespaces have a sector size */ |
| 699 | if (parameters->lbasize) | 767 | if (parameters->lbasize) |
| 700 | ndctl_namespace_set_sector_size(ndns, parameters->lbasize); | 768 | ndctl_namespace_set_sector_size(ndns, parameters->lbasize); |
| 701 | ndctl_namespace_enable(ndns); | 769 | ndctl_namespace_enable(ndns); |
| 702 | } | 770 | } |
| 703 | 771 | ||
| 704 | 772 | ||
| 705 | Why the Term "namespace"? | 773 | Why the Term "namespace"? |
| 774 | ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 706 | 775 | ||
| 707 | 1. Why not "volume" for instance? "volume" ran the risk of confusing | 776 | 1. Why not "volume" for instance? "volume" ran the risk of confusing |
| 708 | ND (libnvdimm subsystem) to a volume manager like device-mapper. | 777 | ND (libnvdimm subsystem) to a volume manager like device-mapper. |
| 709 | 778 | ||
| 710 | 2. The term originated to describe the sub-devices that can be created | 779 | 2. The term originated to describe the sub-devices that can be created |
| 711 | within a NVME controller (see the nvme specification: | 780 | within a NVME controller (see the nvme specification: |
| 712 | http://www.nvmexpress.org/specifications/), and NFIT namespaces are | 781 | http://www.nvmexpress.org/specifications/), and NFIT namespaces are |
| 713 | meant to parallel the capabilities and configurability of | 782 | meant to parallel the capabilities and configurability of |
| 714 | NVME-namespaces. | 783 | NVME-namespaces. |
| 715 | 784 | ||
| 716 | 785 | ||
| 717 | LIBNVDIMM/LIBNDCTL: Block Translation Table "btt" | 786 | LIBNVDIMM/LIBNDCTL: Block Translation Table "btt" |
| 718 | --------------------------------------------- | 787 | ------------------------------------------------- |
| 719 | 788 | ||
| 720 | A BTT (design document: http://pmem.io/2014/09/23/btt.html) is a stacked | 789 | A BTT (design document: http://pmem.io/2014/09/23/btt.html) is a stacked |
| 721 | block device driver that fronts either the whole block device or a | 790 | block device driver that fronts either the whole block device or a |
| 722 | partition of a block device emitted by either a PMEM or BLK NAMESPACE. | 791 | partition of a block device emitted by either a PMEM or BLK NAMESPACE. |
| 723 | 792 | ||
| 724 | LIBNVDIMM: btt layout | 793 | LIBNVDIMM: btt layout |
| 794 | ^^^^^^^^^^^^^^^^^^^^^ | ||
| 795 | |||
| 725 | Every region will start out with at least one BTT device which is the | 796 | Every region will start out with at least one BTT device which is the |
| 726 | seed device. To activate it set the "namespace", "uuid", and | 797 | seed device. To activate it set the "namespace", "uuid", and |
| 727 | "sector_size" attributes and then bind the device to the nd_pmem or | 798 | "sector_size" attributes and then bind the device to the nd_pmem or |
| 728 | nd_blk driver depending on the region type. | 799 | nd_blk driver depending on the region type:: |
| 729 | 800 | ||
| 730 | /sys/devices/platform/nfit_test.1/ndbus0/region0/btt0/ | 801 | /sys/devices/platform/nfit_test.1/ndbus0/region0/btt0/ |
| 731 | |-- namespace | 802 | |-- namespace |
| @@ -739,10 +810,12 @@ nd_blk driver depending on the region type. | |||
| 739 | `-- uuid | 810 | `-- uuid |
| 740 | 811 | ||
| 741 | LIBNDCTL: btt creation example | 812 | LIBNDCTL: btt creation example |
| 813 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| 814 | |||
| 742 | Similar to namespaces an idle BTT device is automatically created per | 815 | Similar to namespaces an idle BTT device is automatically created per |
| 743 | region. Each time this "seed" btt device is configured and enabled a new | 816 | region. Each time this "seed" btt device is configured and enabled a new |
| 744 | seed is created. Creating a BTT configuration involves two steps of | 817 | seed is created. Creating a BTT configuration involves two steps of |
| 745 | finding and idle BTT and assigning it to consume a PMEM or BLK namespace. | 818 | finding and idle BTT and assigning it to consume a PMEM or BLK namespace:: |
| 746 | 819 | ||
| 747 | static struct ndctl_btt *get_idle_btt(struct ndctl_region *region) | 820 | static struct ndctl_btt *get_idle_btt(struct ndctl_region *region) |
| 748 | { | 821 | { |
| @@ -787,29 +860,28 @@ Summary LIBNDCTL Diagram | |||
| 787 | ------------------------ | 860 | ------------------------ |
| 788 | 861 | ||
| 789 | For the given example above, here is the view of the objects as seen by the | 862 | For the given example above, here is the view of the objects as seen by the |
| 790 | LIBNDCTL API: | 863 | LIBNDCTL API:: |
| 791 | +---+ | 864 | |
| 792 | |CTX| +---------+ +--------------+ +---------------+ | 865 | +---+ |
| 793 | +-+-+ +-> REGION0 +---> NAMESPACE0.0 +--> PMEM8 "pm0.0" | | 866 | |CTX| +---------+ +--------------+ +---------------+ |
| 794 | | | +---------+ +--------------+ +---------------+ | 867 | +-+-+ +-> REGION0 +---> NAMESPACE0.0 +--> PMEM8 "pm0.0" | |
| 795 | +-------+ | | +---------+ +--------------+ +---------------+ | 868 | | | +---------+ +--------------+ +---------------+ |
| 796 | | DIMM0 <-+ | +-> REGION1 +---> NAMESPACE1.0 +--> PMEM6 "pm1.0" | | 869 | +-------+ | | +---------+ +--------------+ +---------------+ |
| 797 | +-------+ | | | +---------+ +--------------+ +---------------+ | 870 | | DIMM0 <-+ | +-> REGION1 +---> NAMESPACE1.0 +--> PMEM6 "pm1.0" | |
| 798 | | DIMM1 <-+ +-v--+ | +---------+ +--------------+ +---------------+ | 871 | +-------+ | | | +---------+ +--------------+ +---------------+ |
| 799 | +-------+ +-+BUS0+---> REGION2 +-+-> NAMESPACE2.0 +--> ND6 "blk2.0" | | 872 | | DIMM1 <-+ +-v--+ | +---------+ +--------------+ +---------------+ |
| 800 | | DIMM2 <-+ +----+ | +---------+ | +--------------+ +----------------------+ | 873 | +-------+ +-+BUS0+---> REGION2 +-+-> NAMESPACE2.0 +--> ND6 "blk2.0" | |
| 801 | +-------+ | | +-> NAMESPACE2.1 +--> ND5 "blk2.1" | BTT2 | | 874 | | DIMM2 <-+ +----+ | +---------+ | +--------------+ +----------------------+ |
| 802 | | DIMM3 <-+ | +--------------+ +----------------------+ | 875 | +-------+ | | +-> NAMESPACE2.1 +--> ND5 "blk2.1" | BTT2 | |
| 803 | +-------+ | +---------+ +--------------+ +---------------+ | 876 | | DIMM3 <-+ | +--------------+ +----------------------+ |
| 804 | +-> REGION3 +-+-> NAMESPACE3.0 +--> ND4 "blk3.0" | | 877 | +-------+ | +---------+ +--------------+ +---------------+ |
| 805 | | +---------+ | +--------------+ +----------------------+ | 878 | +-> REGION3 +-+-> NAMESPACE3.0 +--> ND4 "blk3.0" | |
| 806 | | +-> NAMESPACE3.1 +--> ND3 "blk3.1" | BTT1 | | 879 | | +---------+ | +--------------+ +----------------------+ |
| 807 | | +--------------+ +----------------------+ | 880 | | +-> NAMESPACE3.1 +--> ND3 "blk3.1" | BTT1 | |
| 808 | | +---------+ +--------------+ +---------------+ | 881 | | +--------------+ +----------------------+ |
| 809 | +-> REGION4 +---> NAMESPACE4.0 +--> ND2 "blk4.0" | | 882 | | +---------+ +--------------+ +---------------+ |
| 810 | | +---------+ +--------------+ +---------------+ | 883 | +-> REGION4 +---> NAMESPACE4.0 +--> ND2 "blk4.0" | |
| 811 | | +---------+ +--------------+ +----------------------+ | 884 | | +---------+ +--------------+ +---------------+ |
| 812 | +-> REGION5 +---> NAMESPACE5.0 +--> ND1 "blk5.0" | BTT0 | | 885 | | +---------+ +--------------+ +----------------------+ |
| 813 | +---------+ +--------------+ +---------------+------+ | 886 | +-> REGION5 +---> NAMESPACE5.0 +--> ND1 "blk5.0" | BTT0 | |
| 814 | 887 | +---------+ +--------------+ +---------------+------+ | |
| 815 | |||
diff --git a/Documentation/nvdimm/security.txt b/Documentation/driver-api/nvdimm/security.rst index 4c36c05ca98e..ad9dea099b34 100644 --- a/Documentation/nvdimm/security.txt +++ b/Documentation/driver-api/nvdimm/security.rst | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | NVDIMM SECURITY | 1 | =============== |
| 2 | NVDIMM Security | ||
| 2 | =============== | 3 | =============== |
| 3 | 4 | ||
| 4 | 1. Introduction | 5 | 1. Introduction |
| @@ -138,4 +139,5 @@ This command is only available when the master security is enabled, indicated | |||
| 138 | by the extended security status. | 139 | by the extended security status. |
| 139 | 140 | ||
| 140 | [1]: http://pmem.io/documents/NVDIMM_DSM_Interface-V1.8.pdf | 141 | [1]: http://pmem.io/documents/NVDIMM_DSM_Interface-V1.8.pdf |
| 142 | |||
| 141 | [2]: http://www.t13.org/documents/UploadedDocuments/docs2006/e05179r4-ACS-SecurityClarifications.pdf | 143 | [2]: http://www.t13.org/documents/UploadedDocuments/docs2006/e05179r4-ACS-SecurityClarifications.pdf |
diff --git a/Documentation/nvmem/nvmem.txt b/Documentation/driver-api/nvmem.rst index fc2fe4b18655..d9d958d5c824 100644 --- a/Documentation/nvmem/nvmem.txt +++ b/Documentation/driver-api/nvmem.rst | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | NVMEM SUBSYSTEM | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2 | |
| 3 | =============== | ||
| 4 | NVMEM Subsystem | ||
| 5 | =============== | ||
| 6 | |||
| 7 | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | ||
| 3 | 8 | ||
| 4 | This document explains the NVMEM Framework along with the APIs provided, | 9 | This document explains the NVMEM Framework along with the APIs provided, |
| 5 | and how to use it. | 10 | and how to use it. |
| @@ -40,54 +45,54 @@ nvmem_device pointer. | |||
| 40 | 45 | ||
| 41 | nvmem_unregister(nvmem) is used to unregister a previously registered provider. | 46 | nvmem_unregister(nvmem) is used to unregister a previously registered provider. |
| 42 | 47 | ||
| 43 | For example, a simple qfprom case: | 48 | For example, a simple qfprom case:: |
| 44 | 49 | ||
| 45 | static struct nvmem_config econfig = { | 50 | static struct nvmem_config econfig = { |
| 46 | .name = "qfprom", | 51 | .name = "qfprom", |
| 47 | .owner = THIS_MODULE, | 52 | .owner = THIS_MODULE, |
| 48 | }; | 53 | }; |
| 49 | 54 | ||
| 50 | static int qfprom_probe(struct platform_device *pdev) | 55 | static int qfprom_probe(struct platform_device *pdev) |
| 51 | { | 56 | { |
| 52 | ... | 57 | ... |
| 53 | econfig.dev = &pdev->dev; | 58 | econfig.dev = &pdev->dev; |
| 54 | nvmem = nvmem_register(&econfig); | 59 | nvmem = nvmem_register(&econfig); |
| 55 | ... | 60 | ... |
| 56 | } | 61 | } |
| 57 | 62 | ||
| 58 | It is mandatory that the NVMEM provider has a regmap associated with its | 63 | It is mandatory that the NVMEM provider has a regmap associated with its |
| 59 | struct device. Failure to do would return error code from nvmem_register(). | 64 | struct device. Failure to do would return error code from nvmem_register(). |
| 60 | 65 | ||
| 61 | Users of board files can define and register nvmem cells using the | 66 | Users of board files can define and register nvmem cells using the |
| 62 | nvmem_cell_table struct: | 67 | nvmem_cell_table struct:: |
| 63 | 68 | ||
| 64 | static struct nvmem_cell_info foo_nvmem_cells[] = { | 69 | static struct nvmem_cell_info foo_nvmem_cells[] = { |
| 65 | { | 70 | { |
| 66 | .name = "macaddr", | 71 | .name = "macaddr", |
| 67 | .offset = 0x7f00, | 72 | .offset = 0x7f00, |
| 68 | .bytes = ETH_ALEN, | 73 | .bytes = ETH_ALEN, |
| 69 | } | 74 | } |
| 70 | }; | 75 | }; |
| 71 | 76 | ||
| 72 | static struct nvmem_cell_table foo_nvmem_cell_table = { | 77 | static struct nvmem_cell_table foo_nvmem_cell_table = { |
| 73 | .nvmem_name = "i2c-eeprom", | 78 | .nvmem_name = "i2c-eeprom", |
| 74 | .cells = foo_nvmem_cells, | 79 | .cells = foo_nvmem_cells, |
| 75 | .ncells = ARRAY_SIZE(foo_nvmem_cells), | 80 | .ncells = ARRAY_SIZE(foo_nvmem_cells), |
| 76 | }; | 81 | }; |
| 77 | 82 | ||
| 78 | nvmem_add_cell_table(&foo_nvmem_cell_table); | 83 | nvmem_add_cell_table(&foo_nvmem_cell_table); |
| 79 | 84 | ||
| 80 | Additionally it is possible to create nvmem cell lookup entries and register | 85 | Additionally it is possible to create nvmem cell lookup entries and register |
| 81 | them with the nvmem framework from machine code as shown in the example below: | 86 | them with the nvmem framework from machine code as shown in the example below:: |
| 82 | 87 | ||
| 83 | static struct nvmem_cell_lookup foo_nvmem_lookup = { | 88 | static struct nvmem_cell_lookup foo_nvmem_lookup = { |
| 84 | .nvmem_name = "i2c-eeprom", | 89 | .nvmem_name = "i2c-eeprom", |
| 85 | .cell_name = "macaddr", | 90 | .cell_name = "macaddr", |
| 86 | .dev_id = "foo_mac.0", | 91 | .dev_id = "foo_mac.0", |
| 87 | .con_id = "mac-address", | 92 | .con_id = "mac-address", |
| 88 | }; | 93 | }; |
| 89 | 94 | ||
| 90 | nvmem_add_cell_lookups(&foo_nvmem_lookup, 1); | 95 | nvmem_add_cell_lookups(&foo_nvmem_lookup, 1); |
| 91 | 96 | ||
| 92 | NVMEM Consumers | 97 | NVMEM Consumers |
| 93 | +++++++++++++++ | 98 | +++++++++++++++ |
| @@ -99,43 +104,43 @@ read from and to NVMEM. | |||
| 99 | ================================= | 104 | ================================= |
| 100 | 105 | ||
| 101 | NVMEM cells are the data entries/fields in the NVMEM. | 106 | NVMEM cells are the data entries/fields in the NVMEM. |
| 102 | The NVMEM framework provides 3 APIs to read/write NVMEM cells. | 107 | The NVMEM framework provides 3 APIs to read/write NVMEM cells:: |
| 103 | 108 | ||
| 104 | struct nvmem_cell *nvmem_cell_get(struct device *dev, const char *name); | 109 | struct nvmem_cell *nvmem_cell_get(struct device *dev, const char *name); |
| 105 | struct nvmem_cell *devm_nvmem_cell_get(struct device *dev, const char *name); | 110 | struct nvmem_cell *devm_nvmem_cell_get(struct device *dev, const char *name); |
| 106 | 111 | ||
| 107 | void nvmem_cell_put(struct nvmem_cell *cell); | 112 | void nvmem_cell_put(struct nvmem_cell *cell); |
| 108 | void devm_nvmem_cell_put(struct device *dev, struct nvmem_cell *cell); | 113 | void devm_nvmem_cell_put(struct device *dev, struct nvmem_cell *cell); |
| 109 | 114 | ||
| 110 | void *nvmem_cell_read(struct nvmem_cell *cell, ssize_t *len); | 115 | void *nvmem_cell_read(struct nvmem_cell *cell, ssize_t *len); |
| 111 | int nvmem_cell_write(struct nvmem_cell *cell, void *buf, ssize_t len); | 116 | int nvmem_cell_write(struct nvmem_cell *cell, void *buf, ssize_t len); |
| 112 | 117 | ||
| 113 | *nvmem_cell_get() apis will get a reference to nvmem cell for a given id, | 118 | `*nvmem_cell_get()` apis will get a reference to nvmem cell for a given id, |
| 114 | and nvmem_cell_read/write() can then read or write to the cell. | 119 | and nvmem_cell_read/write() can then read or write to the cell. |
| 115 | Once the usage of the cell is finished the consumer should call *nvmem_cell_put() | 120 | Once the usage of the cell is finished the consumer should call |
| 116 | to free all the allocation memory for the cell. | 121 | `*nvmem_cell_put()` to free all the allocation memory for the cell. |
| 117 | 122 | ||
| 118 | 4. Direct NVMEM device based consumer APIs | 123 | 4. Direct NVMEM device based consumer APIs |
| 119 | ========================================== | 124 | ========================================== |
| 120 | 125 | ||
| 121 | In some instances it is necessary to directly read/write the NVMEM. | 126 | In some instances it is necessary to directly read/write the NVMEM. |
| 122 | To facilitate such consumers NVMEM framework provides below apis. | 127 | To facilitate such consumers NVMEM framework provides below apis:: |
| 123 | 128 | ||
| 124 | struct nvmem_device *nvmem_device_get(struct device *dev, const char *name); | 129 | struct nvmem_device *nvmem_device_get(struct device *dev, const char *name); |
| 125 | struct nvmem_device *devm_nvmem_device_get(struct device *dev, | 130 | struct nvmem_device *devm_nvmem_device_get(struct device *dev, |
| 126 | const char *name); | 131 | const char *name); |
| 127 | void nvmem_device_put(struct nvmem_device *nvmem); | 132 | void nvmem_device_put(struct nvmem_device *nvmem); |
| 128 | int nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset, | 133 | int nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset, |
| 129 | size_t bytes, void *buf); | 134 | size_t bytes, void *buf); |
| 130 | int nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset, | 135 | int nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset, |
| 131 | size_t bytes, void *buf); | 136 | size_t bytes, void *buf); |
| 132 | int nvmem_device_cell_read(struct nvmem_device *nvmem, | 137 | int nvmem_device_cell_read(struct nvmem_device *nvmem, |
| 133 | struct nvmem_cell_info *info, void *buf); | 138 | struct nvmem_cell_info *info, void *buf); |
| 134 | int nvmem_device_cell_write(struct nvmem_device *nvmem, | 139 | int nvmem_device_cell_write(struct nvmem_device *nvmem, |
| 135 | struct nvmem_cell_info *info, void *buf); | 140 | struct nvmem_cell_info *info, void *buf); |
| 136 | 141 | ||
| 137 | Before the consumers can read/write NVMEM directly, it should get hold | 142 | Before the consumers can read/write NVMEM directly, it should get hold |
| 138 | of nvmem_controller from one of the *nvmem_device_get() api. | 143 | of nvmem_controller from one of the `*nvmem_device_get()` api. |
| 139 | 144 | ||
| 140 | The difference between these apis and cell based apis is that these apis always | 145 | The difference between these apis and cell based apis is that these apis always |
| 141 | take nvmem_device as parameter. | 146 | take nvmem_device as parameter. |
| @@ -145,12 +150,12 @@ take nvmem_device as parameter. | |||
| 145 | 150 | ||
| 146 | When a consumer no longer needs the NVMEM, it has to release the reference | 151 | When a consumer no longer needs the NVMEM, it has to release the reference |
| 147 | to the NVMEM it has obtained using the APIs mentioned in the above section. | 152 | to the NVMEM it has obtained using the APIs mentioned in the above section. |
| 148 | The NVMEM framework provides 2 APIs to release a reference to the NVMEM. | 153 | The NVMEM framework provides 2 APIs to release a reference to the NVMEM:: |
| 149 | 154 | ||
| 150 | void nvmem_cell_put(struct nvmem_cell *cell); | 155 | void nvmem_cell_put(struct nvmem_cell *cell); |
| 151 | void devm_nvmem_cell_put(struct device *dev, struct nvmem_cell *cell); | 156 | void devm_nvmem_cell_put(struct device *dev, struct nvmem_cell *cell); |
| 152 | void nvmem_device_put(struct nvmem_device *nvmem); | 157 | void nvmem_device_put(struct nvmem_device *nvmem); |
| 153 | void devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem); | 158 | void devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem); |
| 154 | 159 | ||
| 155 | Both these APIs are used to release a reference to the NVMEM and | 160 | Both these APIs are used to release a reference to the NVMEM and |
| 156 | devm_nvmem_cell_put and devm_nvmem_device_put destroys the devres associated | 161 | devm_nvmem_cell_put and devm_nvmem_device_put destroys the devres associated |
| @@ -162,20 +167,21 @@ Userspace | |||
| 162 | 6. Userspace binary interface | 167 | 6. Userspace binary interface |
| 163 | ============================== | 168 | ============================== |
| 164 | 169 | ||
| 165 | Userspace can read/write the raw NVMEM file located at | 170 | Userspace can read/write the raw NVMEM file located at:: |
| 166 | /sys/bus/nvmem/devices/*/nvmem | 171 | |
| 172 | /sys/bus/nvmem/devices/*/nvmem | ||
| 167 | 173 | ||
| 168 | ex: | 174 | ex:: |
| 169 | 175 | ||
| 170 | hexdump /sys/bus/nvmem/devices/qfprom0/nvmem | 176 | hexdump /sys/bus/nvmem/devices/qfprom0/nvmem |
| 171 | 177 | ||
| 172 | 0000000 0000 0000 0000 0000 0000 0000 0000 0000 | 178 | 0000000 0000 0000 0000 0000 0000 0000 0000 0000 |
| 173 | * | 179 | * |
| 174 | 00000a0 db10 2240 0000 e000 0c00 0c00 0000 0c00 | 180 | 00000a0 db10 2240 0000 e000 0c00 0c00 0000 0c00 |
| 175 | 0000000 0000 0000 0000 0000 0000 0000 0000 0000 | 181 | 0000000 0000 0000 0000 0000 0000 0000 0000 0000 |
| 176 | ... | 182 | ... |
| 177 | * | 183 | * |
| 178 | 0001000 | 184 | 0001000 |
| 179 | 185 | ||
| 180 | 7. DeviceTree Binding | 186 | 7. DeviceTree Binding |
| 181 | ===================== | 187 | ===================== |
diff --git a/Documentation/parport-lowlevel.txt b/Documentation/driver-api/parport-lowlevel.rst index 0633d70ffda7..0633d70ffda7 100644 --- a/Documentation/parport-lowlevel.txt +++ b/Documentation/driver-api/parport-lowlevel.rst | |||
diff --git a/Documentation/driver-api/phy/index.rst b/Documentation/driver-api/phy/index.rst new file mode 100644 index 000000000000..69ba1216de72 --- /dev/null +++ b/Documentation/driver-api/phy/index.rst | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ===================== | ||
| 4 | Generic PHY Framework | ||
| 5 | ===================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | |||
| 9 | phy | ||
| 10 | samsung-usb2 | ||
| 11 | |||
| 12 | .. only:: subproject and html | ||
| 13 | |||
| 14 | Indices | ||
| 15 | ======= | ||
| 16 | |||
| 17 | * :ref:`genindex` | ||
| 18 | |||
diff --git a/Documentation/phy.txt b/Documentation/driver-api/phy/phy.rst index 457c3e0f86d6..457c3e0f86d6 100644 --- a/Documentation/phy.txt +++ b/Documentation/driver-api/phy/phy.rst | |||
diff --git a/Documentation/phy/samsung-usb2.txt b/Documentation/driver-api/phy/samsung-usb2.rst index ed12d437189d..c48c8b9797b9 100644 --- a/Documentation/phy/samsung-usb2.txt +++ b/Documentation/driver-api/phy/samsung-usb2.rst | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | .------------------------------------------------------------------------------+ | 1 | ==================================== |
| 2 | | Samsung USB 2.0 PHY adaptation layer | | 2 | Samsung USB 2.0 PHY adaptation layer |
| 3 | +-----------------------------------------------------------------------------+' | 3 | ==================================== |
| 4 | 4 | ||
| 5 | | 1. Description | 5 | 1. Description |
| 6 | +---------------- | 6 | -------------- |
| 7 | 7 | ||
| 8 | The architecture of the USB 2.0 PHY module in Samsung SoCs is similar | 8 | The architecture of the USB 2.0 PHY module in Samsung SoCs is similar |
| 9 | among many SoCs. In spite of the similarities it proved difficult to | 9 | among many SoCs. In spite of the similarities it proved difficult to |
| @@ -14,8 +14,8 @@ the PHY powering up process had to be altered. This adaptation layer is | |||
| 14 | a compromise between having separate drivers and having a single driver | 14 | a compromise between having separate drivers and having a single driver |
| 15 | with added support for many special cases. | 15 | with added support for many special cases. |
| 16 | 16 | ||
| 17 | | 2. Files description | 17 | 2. Files description |
| 18 | +---------------------- | 18 | -------------------- |
| 19 | 19 | ||
| 20 | - phy-samsung-usb2.c | 20 | - phy-samsung-usb2.c |
| 21 | This is the main file of the adaptation layer. This file contains | 21 | This is the main file of the adaptation layer. This file contains |
| @@ -32,44 +32,45 @@ with added support for many special cases. | |||
| 32 | driver. In addition it should contain extern declarations for | 32 | driver. In addition it should contain extern declarations for |
| 33 | structures that describe particular SoCs. | 33 | structures that describe particular SoCs. |
| 34 | 34 | ||
| 35 | | 3. Supporting SoCs | 35 | 3. Supporting SoCs |
| 36 | +-------------------- | 36 | ------------------ |
| 37 | 37 | ||
| 38 | To support a new SoC a new file should be added to the drivers/phy | 38 | To support a new SoC a new file should be added to the drivers/phy |
| 39 | directory. Each SoC's configuration is stored in an instance of the | 39 | directory. Each SoC's configuration is stored in an instance of the |
| 40 | struct samsung_usb2_phy_config. | 40 | struct samsung_usb2_phy_config:: |
| 41 | 41 | ||
| 42 | struct samsung_usb2_phy_config { | 42 | struct samsung_usb2_phy_config { |
| 43 | const struct samsung_usb2_common_phy *phys; | 43 | const struct samsung_usb2_common_phy *phys; |
| 44 | int (*rate_to_clk)(unsigned long, u32 *); | 44 | int (*rate_to_clk)(unsigned long, u32 *); |
| 45 | unsigned int num_phys; | 45 | unsigned int num_phys; |
| 46 | bool has_mode_switch; | 46 | bool has_mode_switch; |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | The num_phys is the number of phys handled by the driver. *phys is an | 49 | The num_phys is the number of phys handled by the driver. `*phys` is an |
| 50 | array that contains the configuration for each phy. The has_mode_switch | 50 | array that contains the configuration for each phy. The has_mode_switch |
| 51 | property is a boolean flag that determines whether the SoC has USB host | 51 | property is a boolean flag that determines whether the SoC has USB host |
| 52 | and device on a single pair of pins. If so, a special register has to | 52 | and device on a single pair of pins. If so, a special register has to |
| 53 | be modified to change the internal routing of these pins between a USB | 53 | be modified to change the internal routing of these pins between a USB |
| 54 | device or host module. | 54 | device or host module. |
| 55 | 55 | ||
| 56 | For example the configuration for Exynos 4210 is following: | 56 | For example the configuration for Exynos 4210 is following:: |
| 57 | 57 | ||
| 58 | const struct samsung_usb2_phy_config exynos4210_usb2_phy_config = { | 58 | const struct samsung_usb2_phy_config exynos4210_usb2_phy_config = { |
| 59 | .has_mode_switch = 0, | 59 | .has_mode_switch = 0, |
| 60 | .num_phys = EXYNOS4210_NUM_PHYS, | 60 | .num_phys = EXYNOS4210_NUM_PHYS, |
| 61 | .phys = exynos4210_phys, | 61 | .phys = exynos4210_phys, |
| 62 | .rate_to_clk = exynos4210_rate_to_clk, | 62 | .rate_to_clk = exynos4210_rate_to_clk, |
| 63 | } | 63 | } |
| 64 | |||
| 65 | - `int (*rate_to_clk)(unsigned long, u32 *)` | ||
| 64 | 66 | ||
| 65 | - int (*rate_to_clk)(unsigned long, u32 *) | ||
| 66 | The rate_to_clk callback is to convert the rate of the clock | 67 | The rate_to_clk callback is to convert the rate of the clock |
| 67 | used as the reference clock for the PHY module to the value | 68 | used as the reference clock for the PHY module to the value |
| 68 | that should be written in the hardware register. | 69 | that should be written in the hardware register. |
| 69 | 70 | ||
| 70 | The exynos4210_phys configuration array is as follows: | 71 | The exynos4210_phys configuration array is as follows:: |
| 71 | 72 | ||
| 72 | static const struct samsung_usb2_common_phy exynos4210_phys[] = { | 73 | static const struct samsung_usb2_common_phy exynos4210_phys[] = { |
| 73 | { | 74 | { |
| 74 | .label = "device", | 75 | .label = "device", |
| 75 | .id = EXYNOS4210_DEVICE, | 76 | .id = EXYNOS4210_DEVICE, |
| @@ -95,29 +96,30 @@ static const struct samsung_usb2_common_phy exynos4210_phys[] = { | |||
| 95 | .power_off = exynos4210_power_off, | 96 | .power_off = exynos4210_power_off, |
| 96 | }, | 97 | }, |
| 97 | {}, | 98 | {}, |
| 98 | }; | 99 | }; |
| 100 | |||
| 101 | - `int (*power_on)(struct samsung_usb2_phy_instance *);` | ||
| 102 | `int (*power_off)(struct samsung_usb2_phy_instance *);` | ||
| 99 | 103 | ||
| 100 | - int (*power_on)(struct samsung_usb2_phy_instance *); | ||
| 101 | - int (*power_off)(struct samsung_usb2_phy_instance *); | ||
| 102 | These two callbacks are used to power on and power off the phy | 104 | These two callbacks are used to power on and power off the phy |
| 103 | by modifying appropriate registers. | 105 | by modifying appropriate registers. |
| 104 | 106 | ||
| 105 | Final change to the driver is adding appropriate compatible value to the | 107 | Final change to the driver is adding appropriate compatible value to the |
| 106 | phy-samsung-usb2.c file. In case of Exynos 4210 the following lines were | 108 | phy-samsung-usb2.c file. In case of Exynos 4210 the following lines were |
| 107 | added to the struct of_device_id samsung_usb2_phy_of_match[] array: | 109 | added to the struct of_device_id samsung_usb2_phy_of_match[] array:: |
| 108 | 110 | ||
| 109 | #ifdef CONFIG_PHY_EXYNOS4210_USB2 | 111 | #ifdef CONFIG_PHY_EXYNOS4210_USB2 |
| 110 | { | 112 | { |
| 111 | .compatible = "samsung,exynos4210-usb2-phy", | 113 | .compatible = "samsung,exynos4210-usb2-phy", |
| 112 | .data = &exynos4210_usb2_phy_config, | 114 | .data = &exynos4210_usb2_phy_config, |
| 113 | }, | 115 | }, |
| 114 | #endif | 116 | #endif |
| 115 | 117 | ||
| 116 | To add further flexibility to the driver the Kconfig file enables to | 118 | To add further flexibility to the driver the Kconfig file enables to |
| 117 | include support for selected SoCs in the compiled driver. The Kconfig | 119 | include support for selected SoCs in the compiled driver. The Kconfig |
| 118 | entry for Exynos 4210 is following: | 120 | entry for Exynos 4210 is following:: |
| 119 | 121 | ||
| 120 | config PHY_EXYNOS4210_USB2 | 122 | config PHY_EXYNOS4210_USB2 |
| 121 | bool "Support for Exynos 4210" | 123 | bool "Support for Exynos 4210" |
| 122 | depends on PHY_SAMSUNG_USB2 | 124 | depends on PHY_SAMSUNG_USB2 |
| 123 | depends on CPU_EXYNOS4210 | 125 | depends on CPU_EXYNOS4210 |
| @@ -128,8 +130,8 @@ config PHY_EXYNOS4210_USB2 | |||
| 128 | phys are available - device, host, HSCI0 and HSCI1. | 130 | phys are available - device, host, HSCI0 and HSCI1. |
| 129 | 131 | ||
| 130 | The newly created file that supports the new SoC has to be also added to the | 132 | The newly created file that supports the new SoC has to be also added to the |
| 131 | Makefile. In case of Exynos 4210 the added line is following: | 133 | Makefile. In case of Exynos 4210 the added line is following:: |
| 132 | 134 | ||
| 133 | obj-$(CONFIG_PHY_EXYNOS4210_USB2) += phy-exynos4210-usb2.o | 135 | obj-$(CONFIG_PHY_EXYNOS4210_USB2) += phy-exynos4210-usb2.o |
| 134 | 136 | ||
| 135 | After completing these steps the support for the new SoC should be ready. | 137 | After completing these steps the support for the new SoC should be ready. |
diff --git a/Documentation/driver-api/pps.rst b/Documentation/driver-api/pps.rst index 1456d2c32ebd..2d6b99766ee8 100644 --- a/Documentation/driver-api/pps.rst +++ b/Documentation/driver-api/pps.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ====================== | 3 | ====================== |
| 4 | PPS - Pulse Per Second | 4 | PPS - Pulse Per Second |
diff --git a/Documentation/driver-api/pti_intel_mid.rst b/Documentation/driver-api/pti_intel_mid.rst new file mode 100644 index 000000000000..20f1cff42d5f --- /dev/null +++ b/Documentation/driver-api/pti_intel_mid.rst | |||
| @@ -0,0 +1,106 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ============= | ||
| 4 | Intel MID PTI | ||
| 5 | ============= | ||
| 6 | |||
| 7 | The Intel MID PTI project is HW implemented in Intel Atom | ||
| 8 | system-on-a-chip designs based on the Parallel Trace | ||
| 9 | Interface for MIPI P1149.7 cJTAG standard. The kernel solution | ||
| 10 | for this platform involves the following files:: | ||
| 11 | |||
| 12 | ./include/linux/pti.h | ||
| 13 | ./drivers/.../n_tracesink.h | ||
| 14 | ./drivers/.../n_tracerouter.c | ||
| 15 | ./drivers/.../n_tracesink.c | ||
| 16 | ./drivers/.../pti.c | ||
| 17 | |||
| 18 | pti.c is the driver that enables various debugging features | ||
| 19 | popular on platforms from certain mobile manufacturers. | ||
| 20 | n_tracerouter.c and n_tracesink.c allow extra system information to | ||
| 21 | be collected and routed to the pti driver, such as trace | ||
| 22 | debugging data from a modem. Although n_tracerouter | ||
| 23 | and n_tracesink are a part of the complete PTI solution, | ||
| 24 | these two line disciplines can work separately from | ||
| 25 | pti.c and route any data stream from one /dev/tty node | ||
| 26 | to another /dev/tty node via kernel-space. This provides | ||
| 27 | a stable, reliable connection that will not break unless | ||
| 28 | the user-space application shuts down (plus avoids | ||
| 29 | kernel->user->kernel context switch overheads of routing | ||
| 30 | data). | ||
| 31 | |||
| 32 | An example debugging usage for this driver system: | ||
| 33 | |||
| 34 | * Hook /dev/ttyPTI0 to syslogd. Opening this port will also start | ||
| 35 | a console device to further capture debugging messages to PTI. | ||
| 36 | * Hook /dev/ttyPTI1 to modem debugging data to write to PTI HW. | ||
| 37 | This is where n_tracerouter and n_tracesink are used. | ||
| 38 | * Hook /dev/pti to a user-level debugging application for writing | ||
| 39 | to PTI HW. | ||
| 40 | * `Use mipi_` Kernel Driver API in other device drivers for | ||
| 41 | debugging to PTI by first requesting a PTI write address via | ||
| 42 | mipi_request_masterchannel(1). | ||
| 43 | |||
| 44 | Below is example pseudo-code on how a 'privileged' application | ||
| 45 | can hook up n_tracerouter and n_tracesink to any tty on | ||
| 46 | a system. 'Privileged' means the application has enough | ||
| 47 | privileges to successfully manipulate the ldisc drivers | ||
| 48 | but is not just blindly executing as 'root'. Keep in mind | ||
| 49 | the use of ioctl(,TIOCSETD,) is not specific to the n_tracerouter | ||
| 50 | and n_tracesink line discpline drivers but is a generic | ||
| 51 | operation for a program to use a line discpline driver | ||
| 52 | on a tty port other than the default n_tty:: | ||
| 53 | |||
| 54 | /////////// To hook up n_tracerouter and n_tracesink ///////// | ||
| 55 | |||
| 56 | // Note that n_tracerouter depends on n_tracesink. | ||
| 57 | #include <errno.h> | ||
| 58 | #define ONE_TTY "/dev/ttyOne" | ||
| 59 | #define TWO_TTY "/dev/ttyTwo" | ||
| 60 | |||
| 61 | // needed global to hand onto ldisc connection | ||
| 62 | static int g_fd_source = -1; | ||
| 63 | static int g_fd_sink = -1; | ||
| 64 | |||
| 65 | // these two vars used to grab LDISC values from loaded ldisc drivers | ||
| 66 | // in OS. Look at /proc/tty/ldiscs to get the right numbers from | ||
| 67 | // the ldiscs loaded in the system. | ||
| 68 | int source_ldisc_num, sink_ldisc_num = -1; | ||
| 69 | int retval; | ||
| 70 | |||
| 71 | g_fd_source = open(ONE_TTY, O_RDWR); // must be R/W | ||
| 72 | g_fd_sink = open(TWO_TTY, O_RDWR); // must be R/W | ||
| 73 | |||
| 74 | if (g_fd_source <= 0) || (g_fd_sink <= 0) { | ||
| 75 | // doubt you'll want to use these exact error lines of code | ||
| 76 | printf("Error on open(). errno: %d\n",errno); | ||
| 77 | return errno; | ||
| 78 | } | ||
| 79 | |||
| 80 | retval = ioctl(g_fd_sink, TIOCSETD, &sink_ldisc_num); | ||
| 81 | if (retval < 0) { | ||
| 82 | printf("Error on ioctl(). errno: %d\n", errno); | ||
| 83 | return errno; | ||
| 84 | } | ||
| 85 | |||
| 86 | retval = ioctl(g_fd_source, TIOCSETD, &source_ldisc_num); | ||
| 87 | if (retval < 0) { | ||
| 88 | printf("Error on ioctl(). errno: %d\n", errno); | ||
| 89 | return errno; | ||
| 90 | } | ||
| 91 | |||
| 92 | /////////// To disconnect n_tracerouter and n_tracesink //////// | ||
| 93 | |||
| 94 | // First make sure data through the ldiscs has stopped. | ||
| 95 | |||
| 96 | // Second, disconnect ldiscs. This provides a | ||
| 97 | // little cleaner shutdown on tty stack. | ||
| 98 | sink_ldisc_num = 0; | ||
| 99 | source_ldisc_num = 0; | ||
| 100 | ioctl(g_fd_uart, TIOCSETD, &sink_ldisc_num); | ||
| 101 | ioctl(g_fd_gadget, TIOCSETD, &source_ldisc_num); | ||
| 102 | |||
| 103 | // Three, program closes connection, and cleanup: | ||
| 104 | close(g_fd_uart); | ||
| 105 | close(g_fd_gadget); | ||
| 106 | g_fd_uart = g_fd_gadget = NULL; | ||
diff --git a/Documentation/driver-api/ptp.rst b/Documentation/driver-api/ptp.rst index b6e65d66d37a..a15192e32347 100644 --- a/Documentation/driver-api/ptp.rst +++ b/Documentation/driver-api/ptp.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | =========================================== | 3 | =========================================== |
| 4 | PTP hardware clock infrastructure for Linux | 4 | PTP hardware clock infrastructure for Linux |
diff --git a/Documentation/pwm.txt b/Documentation/driver-api/pwm.rst index ab62f1bb0366..ab62f1bb0366 100644 --- a/Documentation/pwm.txt +++ b/Documentation/driver-api/pwm.rst | |||
diff --git a/Documentation/driver-api/rapidio/index.rst b/Documentation/driver-api/rapidio/index.rst new file mode 100644 index 000000000000..a41b4242d16f --- /dev/null +++ b/Documentation/driver-api/rapidio/index.rst | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | =========================== | ||
| 4 | The Linux RapidIO Subsystem | ||
| 5 | =========================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | rapidio | ||
| 11 | sysfs | ||
| 12 | |||
| 13 | tsi721 | ||
| 14 | mport_cdev | ||
| 15 | rio_cm | ||
diff --git a/Documentation/rapidio/mport_cdev.txt b/Documentation/driver-api/rapidio/mport_cdev.rst index a53f786ee2e9..df77a7f7be7d 100644 --- a/Documentation/rapidio/mport_cdev.txt +++ b/Documentation/driver-api/rapidio/mport_cdev.rst | |||
| @@ -1,13 +1,9 @@ | |||
| 1 | RapidIO subsystem mport character device driver (rio_mport_cdev.c) | ||
| 2 | ================================================================== | 1 | ================================================================== |
| 3 | 2 | RapidIO subsystem mport character device driver (rio_mport_cdev.c) | |
| 4 | Version History: | ||
| 5 | ---------------- | ||
| 6 | 1.0.0 - Initial driver release. | ||
| 7 | |||
| 8 | ================================================================== | 3 | ================================================================== |
| 9 | 4 | ||
| 10 | I. Overview | 5 | 1. Overview |
| 6 | =========== | ||
| 11 | 7 | ||
| 12 | This device driver is the result of collaboration within the RapidIO.org | 8 | This device driver is the result of collaboration within the RapidIO.org |
| 13 | Software Task Group (STG) between Texas Instruments, Freescale, | 9 | Software Task Group (STG) between Texas Instruments, Freescale, |
| @@ -29,40 +25,41 @@ Using available set of ioctl commands user-space applications can perform | |||
| 29 | following RapidIO bus and subsystem operations: | 25 | following RapidIO bus and subsystem operations: |
| 30 | 26 | ||
| 31 | - Reads and writes from/to configuration registers of mport devices | 27 | - Reads and writes from/to configuration registers of mport devices |
| 32 | (RIO_MPORT_MAINT_READ_LOCAL/RIO_MPORT_MAINT_WRITE_LOCAL) | 28 | (RIO_MPORT_MAINT_READ_LOCAL/RIO_MPORT_MAINT_WRITE_LOCAL) |
| 33 | - Reads and writes from/to configuration registers of remote RapidIO devices. | 29 | - Reads and writes from/to configuration registers of remote RapidIO devices. |
| 34 | This operations are defined as RapidIO Maintenance reads/writes in RIO spec. | 30 | This operations are defined as RapidIO Maintenance reads/writes in RIO spec. |
| 35 | (RIO_MPORT_MAINT_READ_REMOTE/RIO_MPORT_MAINT_WRITE_REMOTE) | 31 | (RIO_MPORT_MAINT_READ_REMOTE/RIO_MPORT_MAINT_WRITE_REMOTE) |
| 36 | - Set RapidIO Destination ID for mport devices (RIO_MPORT_MAINT_HDID_SET) | 32 | - Set RapidIO Destination ID for mport devices (RIO_MPORT_MAINT_HDID_SET) |
| 37 | - Set RapidIO Component Tag for mport devices (RIO_MPORT_MAINT_COMPTAG_SET) | 33 | - Set RapidIO Component Tag for mport devices (RIO_MPORT_MAINT_COMPTAG_SET) |
| 38 | - Query logical index of mport devices (RIO_MPORT_MAINT_PORT_IDX_GET) | 34 | - Query logical index of mport devices (RIO_MPORT_MAINT_PORT_IDX_GET) |
| 39 | - Query capabilities and RapidIO link configuration of mport devices | 35 | - Query capabilities and RapidIO link configuration of mport devices |
| 40 | (RIO_MPORT_GET_PROPERTIES) | 36 | (RIO_MPORT_GET_PROPERTIES) |
| 41 | - Enable/Disable reporting of RapidIO doorbell events to user-space applications | 37 | - Enable/Disable reporting of RapidIO doorbell events to user-space applications |
| 42 | (RIO_ENABLE_DOORBELL_RANGE/RIO_DISABLE_DOORBELL_RANGE) | 38 | (RIO_ENABLE_DOORBELL_RANGE/RIO_DISABLE_DOORBELL_RANGE) |
| 43 | - Enable/Disable reporting of RIO port-write events to user-space applications | 39 | - Enable/Disable reporting of RIO port-write events to user-space applications |
| 44 | (RIO_ENABLE_PORTWRITE_RANGE/RIO_DISABLE_PORTWRITE_RANGE) | 40 | (RIO_ENABLE_PORTWRITE_RANGE/RIO_DISABLE_PORTWRITE_RANGE) |
| 45 | - Query/Control type of events reported through this driver: doorbells, | 41 | - Query/Control type of events reported through this driver: doorbells, |
| 46 | port-writes or both (RIO_SET_EVENT_MASK/RIO_GET_EVENT_MASK) | 42 | port-writes or both (RIO_SET_EVENT_MASK/RIO_GET_EVENT_MASK) |
| 47 | - Configure/Map mport's outbound requests window(s) for specific size, | 43 | - Configure/Map mport's outbound requests window(s) for specific size, |
| 48 | RapidIO destination ID, hopcount and request type | 44 | RapidIO destination ID, hopcount and request type |
| 49 | (RIO_MAP_OUTBOUND/RIO_UNMAP_OUTBOUND) | 45 | (RIO_MAP_OUTBOUND/RIO_UNMAP_OUTBOUND) |
| 50 | - Configure/Map mport's inbound requests window(s) for specific size, | 46 | - Configure/Map mport's inbound requests window(s) for specific size, |
| 51 | RapidIO base address and local memory base address | 47 | RapidIO base address and local memory base address |
| 52 | (RIO_MAP_INBOUND/RIO_UNMAP_INBOUND) | 48 | (RIO_MAP_INBOUND/RIO_UNMAP_INBOUND) |
| 53 | - Allocate/Free contiguous DMA coherent memory buffer for DMA data transfers | 49 | - Allocate/Free contiguous DMA coherent memory buffer for DMA data transfers |
| 54 | to/from remote RapidIO devices (RIO_ALLOC_DMA/RIO_FREE_DMA) | 50 | to/from remote RapidIO devices (RIO_ALLOC_DMA/RIO_FREE_DMA) |
| 55 | - Initiate DMA data transfers to/from remote RapidIO devices (RIO_TRANSFER). | 51 | - Initiate DMA data transfers to/from remote RapidIO devices (RIO_TRANSFER). |
| 56 | Supports blocking, asynchronous and posted (a.k.a 'fire-and-forget') data | 52 | Supports blocking, asynchronous and posted (a.k.a 'fire-and-forget') data |
| 57 | transfer modes. | 53 | transfer modes. |
| 58 | - Check/Wait for completion of asynchronous DMA data transfer | 54 | - Check/Wait for completion of asynchronous DMA data transfer |
| 59 | (RIO_WAIT_FOR_ASYNC) | 55 | (RIO_WAIT_FOR_ASYNC) |
| 60 | - Manage device objects supported by RapidIO subsystem (RIO_DEV_ADD/RIO_DEV_DEL). | 56 | - Manage device objects supported by RapidIO subsystem (RIO_DEV_ADD/RIO_DEV_DEL). |
| 61 | This allows implementation of various RapidIO fabric enumeration algorithms | 57 | This allows implementation of various RapidIO fabric enumeration algorithms |
| 62 | as user-space applications while using remaining functionality provided by | 58 | as user-space applications while using remaining functionality provided by |
| 63 | kernel RapidIO subsystem. | 59 | kernel RapidIO subsystem. |
| 64 | 60 | ||
| 65 | II. Hardware Compatibility | 61 | 2. Hardware Compatibility |
| 62 | ========================= | ||
| 66 | 63 | ||
| 67 | This device driver uses standard interfaces defined by kernel RapidIO subsystem | 64 | This device driver uses standard interfaces defined by kernel RapidIO subsystem |
| 68 | and therefore it can be used with any mport device driver registered by RapidIO | 65 | and therefore it can be used with any mport device driver registered by RapidIO |
| @@ -78,29 +75,35 @@ functionality of their platform when planning to use this driver: | |||
| 78 | specific DMA engine support and therefore DMA data transfers mport_cdev driver | 75 | specific DMA engine support and therefore DMA data transfers mport_cdev driver |
| 79 | are not available. | 76 | are not available. |
| 80 | 77 | ||
| 81 | III. Module parameters | 78 | 3. Module parameters |
| 79 | ==================== | ||
| 82 | 80 | ||
| 83 | - 'dma_timeout' - DMA transfer completion timeout (in msec, default value 3000). | 81 | - 'dma_timeout' |
| 82 | - DMA transfer completion timeout (in msec, default value 3000). | ||
| 84 | This parameter set a maximum completion wait time for SYNC mode DMA | 83 | This parameter set a maximum completion wait time for SYNC mode DMA |
| 85 | transfer requests and for RIO_WAIT_FOR_ASYNC ioctl requests. | 84 | transfer requests and for RIO_WAIT_FOR_ASYNC ioctl requests. |
| 86 | 85 | ||
| 87 | - 'dbg_level' - This parameter allows to control amount of debug information | 86 | - 'dbg_level' |
| 87 | - This parameter allows to control amount of debug information | ||
| 88 | generated by this device driver. This parameter is formed by set of | 88 | generated by this device driver. This parameter is formed by set of |
| 89 | bit masks that correspond to the specific functional blocks. | 89 | bit masks that correspond to the specific functional blocks. |
| 90 | For mask definitions see 'drivers/rapidio/devices/rio_mport_cdev.c' | 90 | For mask definitions see 'drivers/rapidio/devices/rio_mport_cdev.c' |
| 91 | This parameter can be changed dynamically. | 91 | This parameter can be changed dynamically. |
| 92 | Use CONFIG_RAPIDIO_DEBUG=y to enable debug output at the top level. | 92 | Use CONFIG_RAPIDIO_DEBUG=y to enable debug output at the top level. |
| 93 | 93 | ||
| 94 | IV. Known problems | 94 | 4. Known problems |
| 95 | ================= | ||
| 95 | 96 | ||
| 96 | None. | 97 | None. |
| 97 | 98 | ||
| 98 | V. User-space Applications and API | 99 | 5. User-space Applications and API |
| 100 | ================================== | ||
| 99 | 101 | ||
| 100 | API library and applications that use this device driver are available from | 102 | API library and applications that use this device driver are available from |
| 101 | RapidIO.org. | 103 | RapidIO.org. |
| 102 | 104 | ||
| 103 | VI. TODO List | 105 | 6. TODO List |
| 106 | ============ | ||
| 104 | 107 | ||
| 105 | - Add support for sending/receiving "raw" RapidIO messaging packets. | 108 | - Add support for sending/receiving "raw" RapidIO messaging packets. |
| 106 | - Add memory mapped DMA data transfers as an option when RapidIO-specific DMA | 109 | - Add memory mapped DMA data transfers as an option when RapidIO-specific DMA |
diff --git a/Documentation/rapidio/rapidio.txt b/Documentation/driver-api/rapidio/rapidio.rst index 28fbd877f85a..fb8942d3ba85 100644 --- a/Documentation/rapidio/rapidio.txt +++ b/Documentation/driver-api/rapidio/rapidio.rst | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | The Linux RapidIO Subsystem | 1 | ============ |
| 2 | 2 | Introduction | |
| 3 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 3 | ============ |
| 4 | 4 | ||
| 5 | The RapidIO standard is a packet-based fabric interconnect standard designed for | 5 | The RapidIO standard is a packet-based fabric interconnect standard designed for |
| 6 | use in embedded systems. Development of the RapidIO standard is directed by the | 6 | use in embedded systems. Development of the RapidIO standard is directed by the |
| @@ -11,7 +11,7 @@ This document describes the basics of the Linux RapidIO subsystem and provides | |||
| 11 | information on its major components. | 11 | information on its major components. |
| 12 | 12 | ||
| 13 | 1 Overview | 13 | 1 Overview |
| 14 | ---------- | 14 | ========== |
| 15 | 15 | ||
| 16 | Because the RapidIO subsystem follows the Linux device model it is integrated | 16 | Because the RapidIO subsystem follows the Linux device model it is integrated |
| 17 | into the kernel similarly to other buses by defining RapidIO-specific device and | 17 | into the kernel similarly to other buses by defining RapidIO-specific device and |
| @@ -22,7 +22,7 @@ architecture-specific interfaces that provide support for common RapidIO | |||
| 22 | subsystem operations. | 22 | subsystem operations. |
| 23 | 23 | ||
| 24 | 2. Core Components | 24 | 2. Core Components |
| 25 | ------------------ | 25 | ================== |
| 26 | 26 | ||
| 27 | A typical RapidIO network is a combination of endpoints and switches. | 27 | A typical RapidIO network is a combination of endpoints and switches. |
| 28 | Each of these components is represented in the subsystem by an associated data | 28 | Each of these components is represented in the subsystem by an associated data |
| @@ -30,6 +30,7 @@ structure. The core logical components of the RapidIO subsystem are defined | |||
| 30 | in include/linux/rio.h file. | 30 | in include/linux/rio.h file. |
| 31 | 31 | ||
| 32 | 2.1 Master Port | 32 | 2.1 Master Port |
| 33 | --------------- | ||
| 33 | 34 | ||
| 34 | A master port (or mport) is a RapidIO interface controller that is local to the | 35 | A master port (or mport) is a RapidIO interface controller that is local to the |
| 35 | processor executing the Linux code. A master port generates and receives RapidIO | 36 | processor executing the Linux code. A master port generates and receives RapidIO |
| @@ -46,6 +47,7 @@ includes rio_ops data structure which contains pointers to hardware specific | |||
| 46 | implementations of RapidIO functions. | 47 | implementations of RapidIO functions. |
| 47 | 48 | ||
| 48 | 2.2 Device | 49 | 2.2 Device |
| 50 | ---------- | ||
| 49 | 51 | ||
| 50 | A RapidIO device is any endpoint (other than mport) or switch in the network. | 52 | A RapidIO device is any endpoint (other than mport) or switch in the network. |
| 51 | All devices are presented in the RapidIO subsystem by corresponding rio_dev data | 53 | All devices are presented in the RapidIO subsystem by corresponding rio_dev data |
| @@ -53,6 +55,7 @@ structure. Devices form one global device list and per-network device lists | |||
| 53 | (depending on number of available mports and networks). | 55 | (depending on number of available mports and networks). |
| 54 | 56 | ||
| 55 | 2.3 Switch | 57 | 2.3 Switch |
| 58 | ---------- | ||
| 56 | 59 | ||
| 57 | A RapidIO switch is a special class of device that routes packets between its | 60 | A RapidIO switch is a special class of device that routes packets between its |
| 58 | ports towards their final destination. The packet destination port within a | 61 | ports towards their final destination. The packet destination port within a |
| @@ -66,6 +69,7 @@ specific switch drivers that are designed to provide hardware-specific | |||
| 66 | implementation of common switch management routines. | 69 | implementation of common switch management routines. |
| 67 | 70 | ||
| 68 | 2.4 Network | 71 | 2.4 Network |
| 72 | ----------- | ||
| 69 | 73 | ||
| 70 | A RapidIO network is a combination of interconnected endpoint and switch devices. | 74 | A RapidIO network is a combination of interconnected endpoint and switch devices. |
| 71 | Each RapidIO network known to the system is represented by corresponding rio_net | 75 | Each RapidIO network known to the system is represented by corresponding rio_net |
| @@ -74,11 +78,13 @@ ports that form the same network. It also contains a pointer to the default | |||
| 74 | master port that is used to communicate with devices within the network. | 78 | master port that is used to communicate with devices within the network. |
| 75 | 79 | ||
| 76 | 2.5 Device Drivers | 80 | 2.5 Device Drivers |
| 81 | ------------------ | ||
| 77 | 82 | ||
| 78 | RapidIO device-specific drivers follow Linux Kernel Driver Model and are | 83 | RapidIO device-specific drivers follow Linux Kernel Driver Model and are |
| 79 | intended to support specific RapidIO devices attached to the RapidIO network. | 84 | intended to support specific RapidIO devices attached to the RapidIO network. |
| 80 | 85 | ||
| 81 | 2.6 Subsystem Interfaces | 86 | 2.6 Subsystem Interfaces |
| 87 | ------------------------ | ||
| 82 | 88 | ||
| 83 | RapidIO interconnect specification defines features that may be used to provide | 89 | RapidIO interconnect specification defines features that may be used to provide |
| 84 | one or more common service layers for all participating RapidIO devices. These | 90 | one or more common service layers for all participating RapidIO devices. These |
| @@ -90,7 +96,7 @@ subsystem interfaces. This allows to have multiple common services attached to | |||
| 90 | the same device without blocking attachment of a device-specific driver. | 96 | the same device without blocking attachment of a device-specific driver. |
| 91 | 97 | ||
| 92 | 3. Subsystem Initialization | 98 | 3. Subsystem Initialization |
| 93 | --------------------------- | 99 | =========================== |
| 94 | 100 | ||
| 95 | In order to initialize the RapidIO subsystem, a platform must initialize and | 101 | In order to initialize the RapidIO subsystem, a platform must initialize and |
| 96 | register at least one master port within the RapidIO network. To register mport | 102 | register at least one master port within the RapidIO network. To register mport |
| @@ -105,7 +111,7 @@ RapidIO subsystem can be configured to be built as a statically linked or | |||
| 105 | modular component of the kernel (see details below). | 111 | modular component of the kernel (see details below). |
| 106 | 112 | ||
| 107 | 4. Enumeration and Discovery | 113 | 4. Enumeration and Discovery |
| 108 | ---------------------------- | 114 | ============================ |
| 109 | 115 | ||
| 110 | 4.1 Overview | 116 | 4.1 Overview |
| 111 | ------------ | 117 | ------------ |
| @@ -168,14 +174,16 @@ on RapidIO subsystem build configuration: | |||
| 168 | (b) If the RapidIO subsystem core is built as a loadable module, in addition | 174 | (b) If the RapidIO subsystem core is built as a loadable module, in addition |
| 169 | to the method shown above, the host destination ID(s) can be specified using | 175 | to the method shown above, the host destination ID(s) can be specified using |
| 170 | traditional methods of passing module parameter "hdid=" during its loading: | 176 | traditional methods of passing module parameter "hdid=" during its loading: |
| 177 | |||
| 171 | - from command line: "modprobe rapidio hdid=-1,7", or | 178 | - from command line: "modprobe rapidio hdid=-1,7", or |
| 172 | - from modprobe configuration file using configuration command "options", | 179 | - from modprobe configuration file using configuration command "options", |
| 173 | like in this example: "options rapidio hdid=-1,7". An example of modprobe | 180 | like in this example: "options rapidio hdid=-1,7". An example of modprobe |
| 174 | configuration file is provided in the section below. | 181 | configuration file is provided in the section below. |
| 175 | 182 | ||
| 176 | NOTES: | 183 | NOTES: |
| 177 | (i) if "hdid=" parameter is omitted all available mport will be assigned | 184 | (i) if "hdid=" parameter is omitted all available mport will be assigned |
| 178 | destination ID = -1; | 185 | destination ID = -1; |
| 186 | |||
| 179 | (ii) the "hdid=" parameter in systems with multiple mports can have | 187 | (ii) the "hdid=" parameter in systems with multiple mports can have |
| 180 | destination ID assignments omitted from the end of list (default = -1). | 188 | destination ID assignments omitted from the end of list (default = -1). |
| 181 | 189 | ||
| @@ -317,8 +325,7 @@ must ensure that they are loaded before the enumeration/discovery starts. | |||
| 317 | This process can be automated by specifying pre- or post- dependencies in the | 325 | This process can be automated by specifying pre- or post- dependencies in the |
| 318 | RapidIO-specific modprobe configuration file as shown in the example below. | 326 | RapidIO-specific modprobe configuration file as shown in the example below. |
| 319 | 327 | ||
| 320 | File /etc/modprobe.d/rapidio.conf: | 328 | File /etc/modprobe.d/rapidio.conf:: |
| 321 | ---------------------------------- | ||
| 322 | 329 | ||
| 323 | # Configure RapidIO subsystem modules | 330 | # Configure RapidIO subsystem modules |
| 324 | 331 | ||
| @@ -335,17 +342,21 @@ RapidIO-specific modprobe configuration file as shown in the example below. | |||
| 335 | 342 | ||
| 336 | -------------------------- | 343 | -------------------------- |
| 337 | 344 | ||
| 338 | NOTE: In the example above, one of "softdep" commands must be removed or | 345 | NOTE: |
| 339 | commented out to keep required module loading sequence. | 346 | In the example above, one of "softdep" commands must be removed or |
| 347 | commented out to keep required module loading sequence. | ||
| 340 | 348 | ||
| 341 | A. References | 349 | 5. References |
| 342 | ------------- | 350 | ============= |
| 343 | 351 | ||
| 344 | [1] RapidIO Trade Association. RapidIO Interconnect Specifications. | 352 | [1] RapidIO Trade Association. RapidIO Interconnect Specifications. |
| 345 | http://www.rapidio.org. | 353 | http://www.rapidio.org. |
| 354 | |||
| 346 | [2] Rapidio TA. Technology Comparisons. | 355 | [2] Rapidio TA. Technology Comparisons. |
| 347 | http://www.rapidio.org/education/technology_comparisons/ | 356 | http://www.rapidio.org/education/technology_comparisons/ |
| 357 | |||
| 348 | [3] RapidIO support for Linux. | 358 | [3] RapidIO support for Linux. |
| 349 | http://lwn.net/Articles/139118/ | 359 | http://lwn.net/Articles/139118/ |
| 360 | |||
| 350 | [4] Matt Porter. RapidIO for Linux. Ottawa Linux Symposium, 2005 | 361 | [4] Matt Porter. RapidIO for Linux. Ottawa Linux Symposium, 2005 |
| 351 | http://www.kernel.org/doc/ols/2005/ols2005v2-pages-43-56.pdf | 362 | http://www.kernel.org/doc/ols/2005/ols2005v2-pages-43-56.pdf |
diff --git a/Documentation/rapidio/rio_cm.txt b/Documentation/driver-api/rapidio/rio_cm.rst index 27aa401f1126..5294430a7a74 100644 --- a/Documentation/rapidio/rio_cm.txt +++ b/Documentation/driver-api/rapidio/rio_cm.rst | |||
| @@ -1,13 +1,10 @@ | |||
| 1 | ========================================================================== | ||
| 1 | RapidIO subsystem Channelized Messaging character device driver (rio_cm.c) | 2 | RapidIO subsystem Channelized Messaging character device driver (rio_cm.c) |
| 2 | ========================================================================== | 3 | ========================================================================== |
| 3 | 4 | ||
| 4 | Version History: | ||
| 5 | ---------------- | ||
| 6 | 1.0.0 - Initial driver release. | ||
| 7 | |||
| 8 | ========================================================================== | ||
| 9 | 5 | ||
| 10 | I. Overview | 6 | 1. Overview |
| 7 | =========== | ||
| 11 | 8 | ||
| 12 | This device driver is the result of collaboration within the RapidIO.org | 9 | This device driver is the result of collaboration within the RapidIO.org |
| 13 | Software Task Group (STG) between Texas Instruments, Prodrive Technologies, | 10 | Software Task Group (STG) between Texas Instruments, Prodrive Technologies, |
| @@ -41,79 +38,98 @@ in /dev directory common for all registered RapidIO mport devices. | |||
| 41 | 38 | ||
| 42 | Following ioctl commands are available to user-space applications: | 39 | Following ioctl commands are available to user-space applications: |
| 43 | 40 | ||
| 44 | - RIO_CM_MPORT_GET_LIST : Returns to caller list of local mport devices that | 41 | - RIO_CM_MPORT_GET_LIST: |
| 42 | Returns to caller list of local mport devices that | ||
| 45 | support messaging operations (number of entries up to RIO_MAX_MPORTS). | 43 | support messaging operations (number of entries up to RIO_MAX_MPORTS). |
| 46 | Each list entry is combination of mport's index in the system and RapidIO | 44 | Each list entry is combination of mport's index in the system and RapidIO |
| 47 | destination ID assigned to the port. | 45 | destination ID assigned to the port. |
| 48 | - RIO_CM_EP_GET_LIST_SIZE : Returns number of messaging capable remote endpoints | 46 | - RIO_CM_EP_GET_LIST_SIZE: |
| 47 | Returns number of messaging capable remote endpoints | ||
| 49 | in a RapidIO network associated with the specified mport device. | 48 | in a RapidIO network associated with the specified mport device. |
| 50 | - RIO_CM_EP_GET_LIST : Returns list of RapidIO destination IDs for messaging | 49 | - RIO_CM_EP_GET_LIST: |
| 50 | Returns list of RapidIO destination IDs for messaging | ||
| 51 | capable remote endpoints (peers) available in a RapidIO network associated | 51 | capable remote endpoints (peers) available in a RapidIO network associated |
| 52 | with the specified mport device. | 52 | with the specified mport device. |
| 53 | - RIO_CM_CHAN_CREATE : Creates RapidIO message exchange channel data structure | 53 | - RIO_CM_CHAN_CREATE: |
| 54 | Creates RapidIO message exchange channel data structure | ||
| 54 | with channel ID assigned automatically or as requested by a caller. | 55 | with channel ID assigned automatically or as requested by a caller. |
| 55 | - RIO_CM_CHAN_BIND : Binds the specified channel data structure to the specified | 56 | - RIO_CM_CHAN_BIND: |
| 57 | Binds the specified channel data structure to the specified | ||
| 56 | mport device. | 58 | mport device. |
| 57 | - RIO_CM_CHAN_LISTEN : Enables listening for connection requests on the specified | 59 | - RIO_CM_CHAN_LISTEN: |
| 60 | Enables listening for connection requests on the specified | ||
| 58 | channel. | 61 | channel. |
| 59 | - RIO_CM_CHAN_ACCEPT : Accepts a connection request from peer on the specified | 62 | - RIO_CM_CHAN_ACCEPT: |
| 63 | Accepts a connection request from peer on the specified | ||
| 60 | channel. If wait timeout for this request is specified by a caller it is | 64 | channel. If wait timeout for this request is specified by a caller it is |
| 61 | a blocking call. If timeout set to 0 this is non-blocking call - ioctl | 65 | a blocking call. If timeout set to 0 this is non-blocking call - ioctl |
| 62 | handler checks for a pending connection request and if one is not available | 66 | handler checks for a pending connection request and if one is not available |
| 63 | exits with -EGAIN error status immediately. | 67 | exits with -EGAIN error status immediately. |
| 64 | - RIO_CM_CHAN_CONNECT : Sends a connection request to a remote peer/channel. | 68 | - RIO_CM_CHAN_CONNECT: |
| 65 | - RIO_CM_CHAN_SEND : Sends a data message through the specified channel. | 69 | Sends a connection request to a remote peer/channel. |
| 70 | - RIO_CM_CHAN_SEND: | ||
| 71 | Sends a data message through the specified channel. | ||
| 66 | The handler for this request assumes that message buffer specified by | 72 | The handler for this request assumes that message buffer specified by |
| 67 | a caller includes the reserved space for a packet header required by | 73 | a caller includes the reserved space for a packet header required by |
| 68 | this driver. | 74 | this driver. |
| 69 | - RIO_CM_CHAN_RECEIVE : Receives a data message through a connected channel. | 75 | - RIO_CM_CHAN_RECEIVE: |
| 76 | Receives a data message through a connected channel. | ||
| 70 | If the channel does not have an incoming message ready to return this ioctl | 77 | If the channel does not have an incoming message ready to return this ioctl |
| 71 | handler will wait for new message until timeout specified by a caller | 78 | handler will wait for new message until timeout specified by a caller |
| 72 | expires. If timeout value is set to 0, ioctl handler uses a default value | 79 | expires. If timeout value is set to 0, ioctl handler uses a default value |
| 73 | defined by MAX_SCHEDULE_TIMEOUT. | 80 | defined by MAX_SCHEDULE_TIMEOUT. |
| 74 | - RIO_CM_CHAN_CLOSE : Closes a specified channel and frees associated buffers. | 81 | - RIO_CM_CHAN_CLOSE: |
| 82 | Closes a specified channel and frees associated buffers. | ||
| 75 | If the specified channel is in the CONNECTED state, sends close notification | 83 | If the specified channel is in the CONNECTED state, sends close notification |
| 76 | to the remote peer. | 84 | to the remote peer. |
| 77 | 85 | ||
| 78 | The ioctl command codes and corresponding data structures intended for use by | 86 | The ioctl command codes and corresponding data structures intended for use by |
| 79 | user-space applications are defined in 'include/uapi/linux/rio_cm_cdev.h'. | 87 | user-space applications are defined in 'include/uapi/linux/rio_cm_cdev.h'. |
| 80 | 88 | ||
| 81 | II. Hardware Compatibility | 89 | 2. Hardware Compatibility |
| 90 | ========================= | ||
| 82 | 91 | ||
| 83 | This device driver uses standard interfaces defined by kernel RapidIO subsystem | 92 | This device driver uses standard interfaces defined by kernel RapidIO subsystem |
| 84 | and therefore it can be used with any mport device driver registered by RapidIO | 93 | and therefore it can be used with any mport device driver registered by RapidIO |
| 85 | subsystem with limitations set by available mport HW implementation of messaging | 94 | subsystem with limitations set by available mport HW implementation of messaging |
| 86 | mailboxes. | 95 | mailboxes. |
| 87 | 96 | ||
| 88 | III. Module parameters | 97 | 3. Module parameters |
| 98 | ==================== | ||
| 89 | 99 | ||
| 90 | - 'dbg_level' - This parameter allows to control amount of debug information | 100 | - 'dbg_level' |
| 101 | - This parameter allows to control amount of debug information | ||
| 91 | generated by this device driver. This parameter is formed by set of | 102 | generated by this device driver. This parameter is formed by set of |
| 92 | bit masks that correspond to the specific functional block. | 103 | bit masks that correspond to the specific functional block. |
| 93 | For mask definitions see 'drivers/rapidio/devices/rio_cm.c' | 104 | For mask definitions see 'drivers/rapidio/devices/rio_cm.c' |
| 94 | This parameter can be changed dynamically. | 105 | This parameter can be changed dynamically. |
| 95 | Use CONFIG_RAPIDIO_DEBUG=y to enable debug output at the top level. | 106 | Use CONFIG_RAPIDIO_DEBUG=y to enable debug output at the top level. |
| 96 | 107 | ||
| 97 | - 'cmbox' - Number of RapidIO mailbox to use (default value is 1). | 108 | - 'cmbox' |
| 109 | - Number of RapidIO mailbox to use (default value is 1). | ||
| 98 | This parameter allows to set messaging mailbox number that will be used | 110 | This parameter allows to set messaging mailbox number that will be used |
| 99 | within entire RapidIO network. It can be used when default mailbox is | 111 | within entire RapidIO network. It can be used when default mailbox is |
| 100 | used by other device drivers or is not supported by some nodes in the | 112 | used by other device drivers or is not supported by some nodes in the |
| 101 | RapidIO network. | 113 | RapidIO network. |
| 102 | 114 | ||
| 103 | - 'chstart' - Start channel number for dynamic assignment. Default value - 256. | 115 | - 'chstart' |
| 116 | - Start channel number for dynamic assignment. Default value - 256. | ||
| 104 | Allows to exclude channel numbers below this parameter from dynamic | 117 | Allows to exclude channel numbers below this parameter from dynamic |
| 105 | allocation to avoid conflicts with software components that use | 118 | allocation to avoid conflicts with software components that use |
| 106 | reserved predefined channel numbers. | 119 | reserved predefined channel numbers. |
| 107 | 120 | ||
| 108 | IV. Known problems | 121 | 4. Known problems |
| 122 | ================= | ||
| 109 | 123 | ||
| 110 | None. | 124 | None. |
| 111 | 125 | ||
| 112 | V. User-space Applications and API Library | 126 | 5. User-space Applications and API Library |
| 127 | ========================================== | ||
| 113 | 128 | ||
| 114 | Messaging API library and applications that use this device driver are available | 129 | Messaging API library and applications that use this device driver are available |
| 115 | from RapidIO.org. | 130 | from RapidIO.org. |
| 116 | 131 | ||
| 117 | VI. TODO List | 132 | 6. TODO List |
| 133 | ============ | ||
| 118 | 134 | ||
| 119 | - Add support for system notification messages (reserved channel 0). | 135 | - Add support for system notification messages (reserved channel 0). |
diff --git a/Documentation/rapidio/sysfs.txt b/Documentation/driver-api/rapidio/sysfs.rst index a1adac888e6e..540f72683496 100644 --- a/Documentation/rapidio/sysfs.txt +++ b/Documentation/driver-api/rapidio/sysfs.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ============= | ||
| 2 | Sysfs entries | ||
| 3 | ============= | ||
| 4 | |||
| 1 | The RapidIO sysfs files have moved to: | 5 | The RapidIO sysfs files have moved to: |
| 2 | Documentation/ABI/testing/sysfs-bus-rapidio and | 6 | Documentation/ABI/testing/sysfs-bus-rapidio and |
| 3 | Documentation/ABI/testing/sysfs-class-rapidio | 7 | Documentation/ABI/testing/sysfs-class-rapidio |
diff --git a/Documentation/rapidio/tsi721.txt b/Documentation/driver-api/rapidio/tsi721.rst index cd2a2935d51d..42aea438cd20 100644 --- a/Documentation/rapidio/tsi721.txt +++ b/Documentation/driver-api/rapidio/tsi721.rst | |||
| @@ -1,7 +1,9 @@ | |||
| 1 | ========================================================================= | ||
| 1 | RapidIO subsystem mport driver for IDT Tsi721 PCI Express-to-SRIO bridge. | 2 | RapidIO subsystem mport driver for IDT Tsi721 PCI Express-to-SRIO bridge. |
| 2 | ========================================================================= | 3 | ========================================================================= |
| 3 | 4 | ||
| 4 | I. Overview | 5 | 1. Overview |
| 6 | =========== | ||
| 5 | 7 | ||
| 6 | This driver implements all currently defined RapidIO mport callback functions. | 8 | This driver implements all currently defined RapidIO mport callback functions. |
| 7 | It supports maintenance read and write operations, inbound and outbound RapidIO | 9 | It supports maintenance read and write operations, inbound and outbound RapidIO |
| @@ -17,7 +19,9 @@ into the corresponding message queue. Messaging callbacks are implemented to be | |||
| 17 | fully compatible with RIONET driver (Ethernet over RapidIO messaging services). | 19 | fully compatible with RIONET driver (Ethernet over RapidIO messaging services). |
| 18 | 20 | ||
| 19 | 1. Module parameters: | 21 | 1. Module parameters: |
| 20 | - 'dbg_level' - This parameter allows to control amount of debug information | 22 | |
| 23 | - 'dbg_level' | ||
| 24 | - This parameter allows to control amount of debug information | ||
| 21 | generated by this device driver. This parameter is formed by set of | 25 | generated by this device driver. This parameter is formed by set of |
| 22 | This parameter can be changed bit masks that correspond to the specific | 26 | This parameter can be changed bit masks that correspond to the specific |
| 23 | functional block. | 27 | functional block. |
| @@ -25,37 +29,44 @@ fully compatible with RIONET driver (Ethernet over RapidIO messaging services). | |||
| 25 | This parameter can be changed dynamically. | 29 | This parameter can be changed dynamically. |
| 26 | Use CONFIG_RAPIDIO_DEBUG=y to enable debug output at the top level. | 30 | Use CONFIG_RAPIDIO_DEBUG=y to enable debug output at the top level. |
| 27 | 31 | ||
| 28 | - 'dma_desc_per_channel' - This parameter defines number of hardware buffer | 32 | - 'dma_desc_per_channel' |
| 33 | - This parameter defines number of hardware buffer | ||
| 29 | descriptors allocated for each registered Tsi721 DMA channel. | 34 | descriptors allocated for each registered Tsi721 DMA channel. |
| 30 | Its default value is 128. | 35 | Its default value is 128. |
| 31 | 36 | ||
| 32 | - 'dma_txqueue_sz' - DMA transactions queue size. Defines number of pending | 37 | - 'dma_txqueue_sz' |
| 38 | - DMA transactions queue size. Defines number of pending | ||
| 33 | transaction requests that can be accepted by each DMA channel. | 39 | transaction requests that can be accepted by each DMA channel. |
| 34 | Default value is 16. | 40 | Default value is 16. |
| 35 | 41 | ||
| 36 | - 'dma_sel' - DMA channel selection mask. Bitmask that defines which hardware | 42 | - 'dma_sel' |
| 43 | - DMA channel selection mask. Bitmask that defines which hardware | ||
| 37 | DMA channels (0 ... 6) will be registered with DmaEngine core. | 44 | DMA channels (0 ... 6) will be registered with DmaEngine core. |
| 38 | If bit is set to 1, the corresponding DMA channel will be registered. | 45 | If bit is set to 1, the corresponding DMA channel will be registered. |
| 39 | DMA channels not selected by this mask will not be used by this device | 46 | DMA channels not selected by this mask will not be used by this device |
| 40 | driver. Default value is 0x7f (use all channels). | 47 | driver. Default value is 0x7f (use all channels). |
| 41 | 48 | ||
| 42 | - 'pcie_mrrs' - override value for PCIe Maximum Read Request Size (MRRS). | 49 | - 'pcie_mrrs' |
| 50 | - override value for PCIe Maximum Read Request Size (MRRS). | ||
| 43 | This parameter gives an ability to override MRRS value set during PCIe | 51 | This parameter gives an ability to override MRRS value set during PCIe |
| 44 | configuration process. Tsi721 supports read request sizes up to 4096B. | 52 | configuration process. Tsi721 supports read request sizes up to 4096B. |
| 45 | Value for this parameter must be set as defined by PCIe specification: | 53 | Value for this parameter must be set as defined by PCIe specification: |
| 46 | 0 = 128B, 1 = 256B, 2 = 512B, 3 = 1024B, 4 = 2048B and 5 = 4096B. | 54 | 0 = 128B, 1 = 256B, 2 = 512B, 3 = 1024B, 4 = 2048B and 5 = 4096B. |
| 47 | Default value is '-1' (= keep platform setting). | 55 | Default value is '-1' (= keep platform setting). |
| 48 | 56 | ||
| 49 | - 'mbox_sel' - RIO messaging MBOX selection mask. This is a bitmask that defines | 57 | - 'mbox_sel' |
| 58 | - RIO messaging MBOX selection mask. This is a bitmask that defines | ||
| 50 | messaging MBOXes are managed by this device driver. Mask bits 0 - 3 | 59 | messaging MBOXes are managed by this device driver. Mask bits 0 - 3 |
| 51 | correspond to MBOX0 - MBOX3. MBOX is under driver's control if the | 60 | correspond to MBOX0 - MBOX3. MBOX is under driver's control if the |
| 52 | corresponding bit is set to '1'. Default value is 0x0f (= all). | 61 | corresponding bit is set to '1'. Default value is 0x0f (= all). |
| 53 | 62 | ||
| 54 | II. Known problems | 63 | 2. Known problems |
| 64 | ================= | ||
| 55 | 65 | ||
| 56 | None. | 66 | None. |
| 57 | 67 | ||
| 58 | III. DMA Engine Support | 68 | 3. DMA Engine Support |
| 69 | ===================== | ||
| 59 | 70 | ||
| 60 | Tsi721 mport driver supports DMA data transfers between local system memory and | 71 | Tsi721 mport driver supports DMA data transfers between local system memory and |
| 61 | remote RapidIO devices. This functionality is implemented according to SLAVE | 72 | remote RapidIO devices. This functionality is implemented according to SLAVE |
| @@ -68,17 +79,21 @@ One BDMA channel is reserved for generation of maintenance read/write requests. | |||
| 68 | 79 | ||
| 69 | If Tsi721 mport driver have been built with RAPIDIO_DMA_ENGINE support included, | 80 | If Tsi721 mport driver have been built with RAPIDIO_DMA_ENGINE support included, |
| 70 | this driver will accept DMA-specific module parameter: | 81 | this driver will accept DMA-specific module parameter: |
| 71 | "dma_desc_per_channel" - defines number of hardware buffer descriptors used by | 82 | |
| 83 | "dma_desc_per_channel" | ||
| 84 | - defines number of hardware buffer descriptors used by | ||
| 72 | each BDMA channel of Tsi721 (by default - 128). | 85 | each BDMA channel of Tsi721 (by default - 128). |
| 73 | 86 | ||
| 74 | IV. Version History | 87 | 4. Version History |
| 75 | 88 | ||
| 76 | 1.1.0 - DMA operations re-worked to support data scatter/gather lists larger | 89 | ===== ==================================================================== |
| 90 | 1.1.0 DMA operations re-worked to support data scatter/gather lists larger | ||
| 77 | than hardware buffer descriptors ring. | 91 | than hardware buffer descriptors ring. |
| 78 | 1.0.0 - Initial driver release. | 92 | 1.0.0 Initial driver release. |
| 93 | ===== ==================================================================== | ||
| 79 | 94 | ||
| 80 | V. License | 95 | 5. License |
| 81 | ----------------------------------------------- | 96 | =========== |
| 82 | 97 | ||
| 83 | Copyright(c) 2011 Integrated Device Technology, Inc. All rights reserved. | 98 | Copyright(c) 2011 Integrated Device Technology, Inc. All rights reserved. |
| 84 | 99 | ||
diff --git a/Documentation/rfkill.txt b/Documentation/driver-api/rfkill.rst index 7d3684e81df6..7d3684e81df6 100644 --- a/Documentation/rfkill.txt +++ b/Documentation/driver-api/rfkill.rst | |||
diff --git a/Documentation/serial/cyclades_z.rst b/Documentation/driver-api/serial/cyclades_z.rst index 532ff67e2f1c..532ff67e2f1c 100644 --- a/Documentation/serial/cyclades_z.rst +++ b/Documentation/driver-api/serial/cyclades_z.rst | |||
diff --git a/Documentation/serial/driver.rst b/Documentation/driver-api/serial/driver.rst index 4537119bf624..31bd4e16fb1f 100644 --- a/Documentation/serial/driver.rst +++ b/Documentation/driver-api/serial/driver.rst | |||
| @@ -311,7 +311,7 @@ hardware. | |||
| 311 | This call must not sleep | 311 | This call must not sleep |
| 312 | 312 | ||
| 313 | set_ldisc(port,termios) | 313 | set_ldisc(port,termios) |
| 314 | Notifier for discipline change. See Documentation/serial/tty.rst. | 314 | Notifier for discipline change. See Documentation/driver-api/serial/tty.rst. |
| 315 | 315 | ||
| 316 | Locking: caller holds tty_port->mutex | 316 | Locking: caller holds tty_port->mutex |
| 317 | 317 | ||
diff --git a/Documentation/serial/index.rst b/Documentation/driver-api/serial/index.rst index d0ba22ea23bf..33ad10d05b26 100644 --- a/Documentation/serial/index.rst +++ b/Documentation/driver-api/serial/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ========================== | 3 | ========================== |
| 4 | Support for Serial devices | 4 | Support for Serial devices |
diff --git a/Documentation/serial/moxa-smartio.rst b/Documentation/driver-api/serial/moxa-smartio.rst index 156100f17c3f..156100f17c3f 100644 --- a/Documentation/serial/moxa-smartio.rst +++ b/Documentation/driver-api/serial/moxa-smartio.rst | |||
diff --git a/Documentation/serial/n_gsm.rst b/Documentation/driver-api/serial/n_gsm.rst index f3ad9fd26408..f3ad9fd26408 100644 --- a/Documentation/serial/n_gsm.rst +++ b/Documentation/driver-api/serial/n_gsm.rst | |||
diff --git a/Documentation/serial/rocket.rst b/Documentation/driver-api/serial/rocket.rst index 23761eae4282..23761eae4282 100644 --- a/Documentation/serial/rocket.rst +++ b/Documentation/driver-api/serial/rocket.rst | |||
diff --git a/Documentation/serial/serial-iso7816.rst b/Documentation/driver-api/serial/serial-iso7816.rst index d990143de0c6..d990143de0c6 100644 --- a/Documentation/serial/serial-iso7816.rst +++ b/Documentation/driver-api/serial/serial-iso7816.rst | |||
diff --git a/Documentation/serial/serial-rs485.rst b/Documentation/driver-api/serial/serial-rs485.rst index 6bc824f948f9..6bc824f948f9 100644 --- a/Documentation/serial/serial-rs485.rst +++ b/Documentation/driver-api/serial/serial-rs485.rst | |||
diff --git a/Documentation/serial/tty.rst b/Documentation/driver-api/serial/tty.rst index dd972caacf3e..dd972caacf3e 100644 --- a/Documentation/serial/tty.rst +++ b/Documentation/driver-api/serial/tty.rst | |||
diff --git a/Documentation/sgi-ioc4.txt b/Documentation/driver-api/sgi-ioc4.rst index 72709222d3c0..72709222d3c0 100644 --- a/Documentation/sgi-ioc4.txt +++ b/Documentation/driver-api/sgi-ioc4.rst | |||
diff --git a/Documentation/SM501.txt b/Documentation/driver-api/sm501.rst index 882507453ba4..882507453ba4 100644 --- a/Documentation/SM501.txt +++ b/Documentation/driver-api/sm501.rst | |||
diff --git a/Documentation/smsc_ece1099.txt b/Documentation/driver-api/smsc_ece1099.rst index 079277421eaf..079277421eaf 100644 --- a/Documentation/smsc_ece1099.txt +++ b/Documentation/driver-api/smsc_ece1099.rst | |||
diff --git a/Documentation/switchtec.txt b/Documentation/driver-api/switchtec.rst index 30d6a64e53f7..7611fdc53e19 100644 --- a/Documentation/switchtec.txt +++ b/Documentation/driver-api/switchtec.rst | |||
| @@ -97,6 +97,6 @@ the following configuration settings: | |||
| 97 | NT EP BAR 2 will be dynamically configured as a Direct Window, and | 97 | NT EP BAR 2 will be dynamically configured as a Direct Window, and |
| 98 | the configuration file does not need to configure it explicitly. | 98 | the configuration file does not need to configure it explicitly. |
| 99 | 99 | ||
| 100 | Please refer to Documentation/ntb.txt in Linux source tree for an overall | 100 | Please refer to Documentation/driver-api/ntb.rst in Linux source tree for an overall |
| 101 | understanding of the Linux NTB stack. ntb_hw_switchtec works as an NTB | 101 | understanding of the Linux NTB stack. ntb_hw_switchtec works as an NTB |
| 102 | Hardware Driver in this stack. | 102 | Hardware Driver in this stack. |
diff --git a/Documentation/sync_file.txt b/Documentation/driver-api/sync_file.rst index 496fb2c3b3e6..496fb2c3b3e6 100644 --- a/Documentation/sync_file.txt +++ b/Documentation/driver-api/sync_file.rst | |||
diff --git a/Documentation/vfio-mediated-device.txt b/Documentation/driver-api/vfio-mediated-device.rst index c3f69bcaf96e..25eb7d5b834b 100644 --- a/Documentation/vfio-mediated-device.txt +++ b/Documentation/driver-api/vfio-mediated-device.rst | |||
| @@ -408,7 +408,7 @@ card. | |||
| 408 | References | 408 | References |
| 409 | ========== | 409 | ========== |
| 410 | 410 | ||
| 411 | 1. See Documentation/vfio.txt for more information on VFIO. | 411 | 1. See Documentation/driver-api/vfio.rst for more information on VFIO. |
| 412 | 2. struct mdev_driver in include/linux/mdev.h | 412 | 2. struct mdev_driver in include/linux/mdev.h |
| 413 | 3. struct mdev_parent_ops in include/linux/mdev.h | 413 | 3. struct mdev_parent_ops in include/linux/mdev.h |
| 414 | 4. struct vfio_iommu_driver_ops in include/linux/vfio.h | 414 | 4. struct vfio_iommu_driver_ops in include/linux/vfio.h |
diff --git a/Documentation/vfio.txt b/Documentation/driver-api/vfio.rst index f1a4d3c3ba0b..f1a4d3c3ba0b 100644 --- a/Documentation/vfio.txt +++ b/Documentation/driver-api/vfio.rst | |||
diff --git a/Documentation/xilinx/eemi.rst b/Documentation/driver-api/xilinx/eemi.rst index 9dcbc6f18d75..9dcbc6f18d75 100644 --- a/Documentation/xilinx/eemi.rst +++ b/Documentation/driver-api/xilinx/eemi.rst | |||
diff --git a/Documentation/xilinx/index.rst b/Documentation/driver-api/xilinx/index.rst index 01cc1a0714df..13f7589ed442 100644 --- a/Documentation/xilinx/index.rst +++ b/Documentation/driver-api/xilinx/index.rst | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | 1 | ||
| 3 | =========== | 2 | =========== |
| 4 | Xilinx FPGA | 3 | Xilinx FPGA |
diff --git a/Documentation/xillybus.txt b/Documentation/driver-api/xillybus.rst index 2446ee303c09..2446ee303c09 100644 --- a/Documentation/xillybus.txt +++ b/Documentation/driver-api/xillybus.rst | |||
diff --git a/Documentation/zorro.txt b/Documentation/driver-api/zorro.rst index 664072b017e3..664072b017e3 100644 --- a/Documentation/zorro.txt +++ b/Documentation/driver-api/zorro.rst | |||
diff --git a/Documentation/fault-injection/index.rst b/Documentation/fault-injection/index.rst index 92b5639ed07a..8408a8a91b34 100644 --- a/Documentation/fault-injection/index.rst +++ b/Documentation/fault-injection/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | =============== | 3 | =============== |
| 4 | fault-injection | 4 | fault-injection |
diff --git a/Documentation/fb/fbcon.rst b/Documentation/fb/fbcon.rst index 1da65b9000de..ebca41785abe 100644 --- a/Documentation/fb/fbcon.rst +++ b/Documentation/fb/fbcon.rst | |||
| @@ -187,7 +187,7 @@ the hardware. Thus, in a VGA console:: | |||
| 187 | Assuming the VGA driver can be unloaded, one must first unbind the VGA driver | 187 | Assuming the VGA driver can be unloaded, one must first unbind the VGA driver |
| 188 | from the console layer before unloading the driver. The VGA driver cannot be | 188 | from the console layer before unloading the driver. The VGA driver cannot be |
| 189 | unloaded if it is still bound to the console layer. (See | 189 | unloaded if it is still bound to the console layer. (See |
| 190 | Documentation/console/console.txt for more information). | 190 | Documentation/driver-api/console.rst for more information). |
| 191 | 191 | ||
| 192 | This is more complicated in the case of the framebuffer console (fbcon), | 192 | This is more complicated in the case of the framebuffer console (fbcon), |
| 193 | because fbcon is an intermediate layer between the console and the drivers:: | 193 | because fbcon is an intermediate layer between the console and the drivers:: |
| @@ -204,7 +204,7 @@ fbcon. Thus, there is no need to explicitly unbind the fbdev drivers from | |||
| 204 | fbcon. | 204 | fbcon. |
| 205 | 205 | ||
| 206 | So, how do we unbind fbcon from the console? Part of the answer is in | 206 | So, how do we unbind fbcon from the console? Part of the answer is in |
| 207 | Documentation/console/console.txt. To summarize: | 207 | Documentation/driver-api/console.rst. To summarize: |
| 208 | 208 | ||
| 209 | Echo a value to the bind file that represents the framebuffer console | 209 | Echo a value to the bind file that represents the framebuffer console |
| 210 | driver. So assuming vtcon1 represents fbcon, then:: | 210 | driver. So assuming vtcon1 represents fbcon, then:: |
diff --git a/Documentation/fb/index.rst b/Documentation/fb/index.rst index d47313714635..baf02393d8ee 100644 --- a/Documentation/fb/index.rst +++ b/Documentation/fb/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ============ | 3 | ============ |
| 4 | Frame Buffer | 4 | Frame Buffer |
diff --git a/Documentation/fb/vesafb.rst b/Documentation/fb/vesafb.rst index 2ed0dfb661cf..6821c87b7893 100644 --- a/Documentation/fb/vesafb.rst +++ b/Documentation/fb/vesafb.rst | |||
| @@ -30,7 +30,7 @@ How to use it? | |||
| 30 | ============== | 30 | ============== |
| 31 | 31 | ||
| 32 | Switching modes is done using the vga=... boot parameter. Read | 32 | Switching modes is done using the vga=... boot parameter. Read |
| 33 | Documentation/svga.txt for details. | 33 | Documentation/admin-guide/svga.rst for details. |
| 34 | 34 | ||
| 35 | You should compile in both vgacon (for text mode) and vesafb (for | 35 | You should compile in both vgacon (for text mode) and vesafb (for |
| 36 | graphics mode). Which of them takes over the console depends on | 36 | graphics mode). Which of them takes over the console depends on |
diff --git a/Documentation/filesystems/nfs/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt index d2963123eb1c..ae4332464560 100644 --- a/Documentation/filesystems/nfs/nfsroot.txt +++ b/Documentation/filesystems/nfs/nfsroot.txt | |||
| @@ -239,7 +239,7 @@ rdinit=<executable file> | |||
| 239 | A description of the process of mounting the root file system can be | 239 | A description of the process of mounting the root file system can be |
| 240 | found in: | 240 | found in: |
| 241 | 241 | ||
| 242 | Documentation/early-userspace/README | 242 | Documentation/driver-api/early-userspace/early_userspace_support.rst |
| 243 | 243 | ||
| 244 | 244 | ||
| 245 | 245 | ||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index d750b6926899..fb4735fd73b0 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
| @@ -1500,7 +1500,7 @@ review the kernel documentation in the directory /usr/src/linux/Documentation. | |||
| 1500 | This chapter is heavily based on the documentation included in the pre 2.2 | 1500 | This chapter is heavily based on the documentation included in the pre 2.2 |
| 1501 | kernels, and became part of it in version 2.2.1 of the Linux kernel. | 1501 | kernels, and became part of it in version 2.2.1 of the Linux kernel. |
| 1502 | 1502 | ||
| 1503 | Please see: Documentation/sysctl/ directory for descriptions of these | 1503 | Please see: Documentation/admin-guide/sysctl/ directory for descriptions of these |
| 1504 | entries. | 1504 | entries. |
| 1505 | 1505 | ||
| 1506 | ------------------------------------------------------------------------------ | 1506 | ------------------------------------------------------------------------------ |
diff --git a/Documentation/filesystems/ramfs-rootfs-initramfs.txt b/Documentation/filesystems/ramfs-rootfs-initramfs.txt index 79637d227e85..97d42ccaa92d 100644 --- a/Documentation/filesystems/ramfs-rootfs-initramfs.txt +++ b/Documentation/filesystems/ramfs-rootfs-initramfs.txt | |||
| @@ -105,7 +105,7 @@ All this differs from the old initrd in several ways: | |||
| 105 | - The old initrd file was a gzipped filesystem image (in some file format, | 105 | - The old initrd file was a gzipped filesystem image (in some file format, |
| 106 | such as ext2, that needed a driver built into the kernel), while the new | 106 | such as ext2, that needed a driver built into the kernel), while the new |
| 107 | initramfs archive is a gzipped cpio archive (like tar only simpler, | 107 | initramfs archive is a gzipped cpio archive (like tar only simpler, |
| 108 | see cpio(1) and Documentation/early-userspace/buffer-format.txt). The | 108 | see cpio(1) and Documentation/driver-api/early-userspace/buffer-format.rst). The |
| 109 | kernel's cpio extraction code is not only extremely small, it's also | 109 | kernel's cpio extraction code is not only extremely small, it's also |
| 110 | __init text and data that can be discarded during the boot process. | 110 | __init text and data that can be discarded during the boot process. |
| 111 | 111 | ||
| @@ -159,7 +159,7 @@ One advantage of the configuration file is that root access is not required to | |||
| 159 | set permissions or create device nodes in the new archive. (Note that those | 159 | set permissions or create device nodes in the new archive. (Note that those |
| 160 | two example "file" entries expect to find files named "init.sh" and "busybox" in | 160 | two example "file" entries expect to find files named "init.sh" and "busybox" in |
| 161 | a directory called "initramfs", under the linux-2.6.* directory. See | 161 | a directory called "initramfs", under the linux-2.6.* directory. See |
| 162 | Documentation/early-userspace/README for more details.) | 162 | Documentation/driver-api/early-userspace/early_userspace_support.rst for more details.) |
| 163 | 163 | ||
| 164 | The kernel does not depend on external cpio tools. If you specify a | 164 | The kernel does not depend on external cpio tools. If you specify a |
| 165 | directory instead of a configuration file, the kernel's build infrastructure | 165 | directory instead of a configuration file, the kernel's build infrastructure |
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt index 5b5311f9358d..ddf15b1b0d5a 100644 --- a/Documentation/filesystems/sysfs.txt +++ b/Documentation/filesystems/sysfs.txt | |||
| @@ -319,7 +319,7 @@ quick way to lookup the sysfs interface for a device from the result of | |||
| 319 | a stat(2) operation. | 319 | a stat(2) operation. |
| 320 | 320 | ||
| 321 | More information can driver-model specific features can be found in | 321 | More information can driver-model specific features can be found in |
| 322 | Documentation/driver-model/. | 322 | Documentation/driver-api/driver-model/. |
| 323 | 323 | ||
| 324 | 324 | ||
| 325 | TODO: Finish this section. | 325 | TODO: Finish this section. |
diff --git a/Documentation/filesystems/tmpfs.txt b/Documentation/filesystems/tmpfs.txt index cad797a8a39e..5ecbc03e6b2f 100644 --- a/Documentation/filesystems/tmpfs.txt +++ b/Documentation/filesystems/tmpfs.txt | |||
| @@ -98,7 +98,7 @@ A memory policy with a valid NodeList will be saved, as specified, for | |||
| 98 | use at file creation time. When a task allocates a file in the file | 98 | use at file creation time. When a task allocates a file in the file |
| 99 | system, the mount option memory policy will be applied with a NodeList, | 99 | system, the mount option memory policy will be applied with a NodeList, |
| 100 | if any, modified by the calling task's cpuset constraints | 100 | if any, modified by the calling task's cpuset constraints |
| 101 | [See Documentation/cgroup-v1/cpusets.rst] and any optional flags, listed | 101 | [See Documentation/admin-guide/cgroup-v1/cpusets.rst] and any optional flags, listed |
| 102 | below. If the resulting NodeLists is the empty set, the effective memory | 102 | below. If the resulting NodeLists is the empty set, the effective memory |
| 103 | policy for the file will revert to "default" policy. | 103 | policy for the file will revert to "default" policy. |
| 104 | 104 | ||
diff --git a/Documentation/firmware-guide/acpi/enumeration.rst b/Documentation/firmware-guide/acpi/enumeration.rst index 1252617b520f..0a72b6321f5f 100644 --- a/Documentation/firmware-guide/acpi/enumeration.rst +++ b/Documentation/firmware-guide/acpi/enumeration.rst | |||
| @@ -316,7 +316,7 @@ specifies the path to the controller. In order to use these GPIOs in Linux | |||
| 316 | we need to translate them to the corresponding Linux GPIO descriptors. | 316 | we need to translate them to the corresponding Linux GPIO descriptors. |
| 317 | 317 | ||
| 318 | There is a standard GPIO API for that and is documented in | 318 | There is a standard GPIO API for that and is documented in |
| 319 | Documentation/gpio/. | 319 | Documentation/admin-guide/gpio/. |
| 320 | 320 | ||
| 321 | In the above example we can get the corresponding two GPIO descriptors with | 321 | In the above example we can get the corresponding two GPIO descriptors with |
| 322 | a code like this:: | 322 | a code like this:: |
diff --git a/Documentation/fpga/index.rst b/Documentation/fpga/index.rst index 2c87d1ea084f..f80f95667ca2 100644 --- a/Documentation/fpga/index.rst +++ b/Documentation/fpga/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ==== | 3 | ==== |
| 4 | fpga | 4 | fpga |
diff --git a/Documentation/hid/index.rst b/Documentation/hid/index.rst index af4324902622..737d66dc16a1 100644 --- a/Documentation/hid/index.rst +++ b/Documentation/hid/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ============================= | 3 | ============================= |
| 4 | Human Interface Devices (HID) | 4 | Human Interface Devices (HID) |
diff --git a/Documentation/hwmon/submitting-patches.rst b/Documentation/hwmon/submitting-patches.rst index d5b05d3e54ba..452fc28d8e0b 100644 --- a/Documentation/hwmon/submitting-patches.rst +++ b/Documentation/hwmon/submitting-patches.rst | |||
| @@ -89,7 +89,7 @@ increase the chances of your change being accepted. | |||
| 89 | console. Excessive logging can seriously affect system performance. | 89 | console. Excessive logging can seriously affect system performance. |
| 90 | 90 | ||
| 91 | * Use devres functions whenever possible to allocate resources. For rationale | 91 | * Use devres functions whenever possible to allocate resources. For rationale |
| 92 | and supported functions, please see Documentation/driver-model/devres.rst. | 92 | and supported functions, please see Documentation/driver-api/driver-model/devres.rst. |
| 93 | If a function is not supported by devres, consider using devm_add_action(). | 93 | If a function is not supported by devres, consider using devm_add_action(). |
| 94 | 94 | ||
| 95 | * If the driver has a detect function, make sure it is silent. Debug messages | 95 | * If the driver has a detect function, make sure it is silent. Debug messages |
diff --git a/Documentation/ia64/aliasing.txt b/Documentation/ia64/aliasing.rst index 5a4dea6abebd..a08b36aba015 100644 --- a/Documentation/ia64/aliasing.txt +++ b/Documentation/ia64/aliasing.rst | |||
| @@ -1,20 +1,25 @@ | |||
| 1 | MEMORY ATTRIBUTE ALIASING ON IA-64 | 1 | ================================== |
| 2 | Memory Attribute Aliasing on IA-64 | ||
| 3 | ================================== | ||
| 2 | 4 | ||
| 3 | Bjorn Helgaas | 5 | Bjorn Helgaas <bjorn.helgaas@hp.com> |
| 4 | <bjorn.helgaas@hp.com> | ||
| 5 | May 4, 2006 | ||
| 6 | 6 | ||
| 7 | May 4, 2006 | ||
| 7 | 8 | ||
| 8 | MEMORY ATTRIBUTES | 9 | |
| 10 | Memory Attributes | ||
| 11 | ================= | ||
| 9 | 12 | ||
| 10 | Itanium supports several attributes for virtual memory references. | 13 | Itanium supports several attributes for virtual memory references. |
| 11 | The attribute is part of the virtual translation, i.e., it is | 14 | The attribute is part of the virtual translation, i.e., it is |
| 12 | contained in the TLB entry. The ones of most interest to the Linux | 15 | contained in the TLB entry. The ones of most interest to the Linux |
| 13 | kernel are: | 16 | kernel are: |
| 14 | 17 | ||
| 15 | WB Write-back (cacheable) | 18 | == ====================== |
| 19 | WB Write-back (cacheable) | ||
| 16 | UC Uncacheable | 20 | UC Uncacheable |
| 17 | WC Write-coalescing | 21 | WC Write-coalescing |
| 22 | == ====================== | ||
| 18 | 23 | ||
| 19 | System memory typically uses the WB attribute. The UC attribute is | 24 | System memory typically uses the WB attribute. The UC attribute is |
| 20 | used for memory-mapped I/O devices. The WC attribute is uncacheable | 25 | used for memory-mapped I/O devices. The WC attribute is uncacheable |
| @@ -29,7 +34,8 @@ MEMORY ATTRIBUTES | |||
| 29 | support either WB or UC access to main memory, while others support | 34 | support either WB or UC access to main memory, while others support |
| 30 | only WB access. | 35 | only WB access. |
| 31 | 36 | ||
| 32 | MEMORY MAP | 37 | Memory Map |
| 38 | ========== | ||
| 33 | 39 | ||
| 34 | Platform firmware describes the physical memory map and the | 40 | Platform firmware describes the physical memory map and the |
| 35 | supported attributes for each region. At boot-time, the kernel uses | 41 | supported attributes for each region. At boot-time, the kernel uses |
| @@ -55,7 +61,8 @@ MEMORY MAP | |||
| 55 | The efi_memmap table is preserved unmodified because the original | 61 | The efi_memmap table is preserved unmodified because the original |
| 56 | boot-time information is required for kexec. | 62 | boot-time information is required for kexec. |
| 57 | 63 | ||
| 58 | KERNEL IDENTITY MAPPINGS | 64 | Kernel Identify Mappings |
| 65 | ======================== | ||
| 59 | 66 | ||
| 60 | Linux/ia64 identity mappings are done with large pages, currently | 67 | Linux/ia64 identity mappings are done with large pages, currently |
| 61 | either 16MB or 64MB, referred to as "granules." Cacheable mappings | 68 | either 16MB or 64MB, referred to as "granules." Cacheable mappings |
| @@ -74,17 +81,20 @@ KERNEL IDENTITY MAPPINGS | |||
| 74 | are only partially populated, or populated with a combination of UC | 81 | are only partially populated, or populated with a combination of UC |
| 75 | and WB regions. | 82 | and WB regions. |
| 76 | 83 | ||
| 77 | USER MAPPINGS | 84 | User Mappings |
| 85 | ============= | ||
| 78 | 86 | ||
| 79 | User mappings are typically done with 16K or 64K pages. The smaller | 87 | User mappings are typically done with 16K or 64K pages. The smaller |
| 80 | page size allows more flexibility because only 16K or 64K has to be | 88 | page size allows more flexibility because only 16K or 64K has to be |
| 81 | homogeneous with respect to memory attributes. | 89 | homogeneous with respect to memory attributes. |
| 82 | 90 | ||
| 83 | POTENTIAL ATTRIBUTE ALIASING CASES | 91 | Potential Attribute Aliasing Cases |
| 92 | ================================== | ||
| 84 | 93 | ||
| 85 | There are several ways the kernel creates new mappings: | 94 | There are several ways the kernel creates new mappings: |
| 86 | 95 | ||
| 87 | mmap of /dev/mem | 96 | mmap of /dev/mem |
| 97 | ---------------- | ||
| 88 | 98 | ||
| 89 | This uses remap_pfn_range(), which creates user mappings. These | 99 | This uses remap_pfn_range(), which creates user mappings. These |
| 90 | mappings may be either WB or UC. If the region being mapped | 100 | mappings may be either WB or UC. If the region being mapped |
| @@ -98,7 +108,8 @@ POTENTIAL ATTRIBUTE ALIASING CASES | |||
| 98 | Since the EFI memory map does not describe MMIO on some | 108 | Since the EFI memory map does not describe MMIO on some |
| 99 | machines, this should use an uncacheable mapping as a fallback. | 109 | machines, this should use an uncacheable mapping as a fallback. |
| 100 | 110 | ||
| 101 | mmap of /sys/class/pci_bus/.../legacy_mem | 111 | mmap of /sys/class/pci_bus/.../legacy_mem |
| 112 | ----------------------------------------- | ||
| 102 | 113 | ||
| 103 | This is very similar to mmap of /dev/mem, except that legacy_mem | 114 | This is very similar to mmap of /dev/mem, except that legacy_mem |
| 104 | only allows mmap of the one megabyte "legacy MMIO" area for a | 115 | only allows mmap of the one megabyte "legacy MMIO" area for a |
| @@ -112,9 +123,10 @@ POTENTIAL ATTRIBUTE ALIASING CASES | |||
| 112 | 123 | ||
| 113 | The /dev/mem mmap constraints apply. | 124 | The /dev/mem mmap constraints apply. |
| 114 | 125 | ||
| 115 | mmap of /proc/bus/pci/.../??.? | 126 | mmap of /proc/bus/pci/.../??.? |
| 127 | ------------------------------ | ||
| 116 | 128 | ||
| 117 | This is an MMIO mmap of PCI functions, which additionally may or | 129 | This is an MMIO mmap of PCI functions, which additionally may or |
| 118 | may not be requested as using the WC attribute. | 130 | may not be requested as using the WC attribute. |
| 119 | 131 | ||
| 120 | If WC is requested, and the region in kern_memmap is either WC | 132 | If WC is requested, and the region in kern_memmap is either WC |
| @@ -124,7 +136,8 @@ POTENTIAL ATTRIBUTE ALIASING CASES | |||
| 124 | Otherwise, the user mapping must use the same attribute as the | 136 | Otherwise, the user mapping must use the same attribute as the |
| 125 | kernel mapping. | 137 | kernel mapping. |
| 126 | 138 | ||
| 127 | read/write of /dev/mem | 139 | read/write of /dev/mem |
| 140 | ---------------------- | ||
| 128 | 141 | ||
| 129 | This uses copy_from_user(), which implicitly uses a kernel | 142 | This uses copy_from_user(), which implicitly uses a kernel |
| 130 | identity mapping. This is obviously safe for things in | 143 | identity mapping. This is obviously safe for things in |
| @@ -138,7 +151,8 @@ POTENTIAL ATTRIBUTE ALIASING CASES | |||
| 138 | eight-byte accesses, and the copy_from_user() path doesn't allow | 151 | eight-byte accesses, and the copy_from_user() path doesn't allow |
| 139 | any control over the access size, so this would be dangerous. | 152 | any control over the access size, so this would be dangerous. |
| 140 | 153 | ||
| 141 | ioremap() | 154 | ioremap() |
| 155 | --------- | ||
| 142 | 156 | ||
| 143 | This returns a mapping for use inside the kernel. | 157 | This returns a mapping for use inside the kernel. |
| 144 | 158 | ||
| @@ -155,9 +169,11 @@ POTENTIAL ATTRIBUTE ALIASING CASES | |||
| 155 | 169 | ||
| 156 | Failing all of the above, we have to fall back to a UC mapping. | 170 | Failing all of the above, we have to fall back to a UC mapping. |
| 157 | 171 | ||
| 158 | PAST PROBLEM CASES | 172 | Past Problem Cases |
| 173 | ================== | ||
| 159 | 174 | ||
| 160 | mmap of various MMIO regions from /dev/mem by "X" on Intel platforms | 175 | mmap of various MMIO regions from /dev/mem by "X" on Intel platforms |
| 176 | -------------------------------------------------------------------- | ||
| 161 | 177 | ||
| 162 | The EFI memory map may not report these MMIO regions. | 178 | The EFI memory map may not report these MMIO regions. |
| 163 | 179 | ||
| @@ -166,12 +182,16 @@ PAST PROBLEM CASES | |||
| 166 | succeed. It may create either WB or UC user mappings, depending | 182 | succeed. It may create either WB or UC user mappings, depending |
| 167 | on whether the region is in kern_memmap or the EFI memory map. | 183 | on whether the region is in kern_memmap or the EFI memory map. |
| 168 | 184 | ||
| 169 | mmap of 0x0-0x9FFFF /dev/mem by "hwinfo" on HP sx1000 with VGA enabled | 185 | mmap of 0x0-0x9FFFF /dev/mem by "hwinfo" on HP sx1000 with VGA enabled |
| 186 | ---------------------------------------------------------------------- | ||
| 170 | 187 | ||
| 171 | The EFI memory map reports the following attributes: | 188 | The EFI memory map reports the following attributes: |
| 189 | |||
| 190 | =============== ======= ================== | ||
| 172 | 0x00000-0x9FFFF WB only | 191 | 0x00000-0x9FFFF WB only |
| 173 | 0xA0000-0xBFFFF UC only (VGA frame buffer) | 192 | 0xA0000-0xBFFFF UC only (VGA frame buffer) |
| 174 | 0xC0000-0xFFFFF WB only | 193 | 0xC0000-0xFFFFF WB only |
| 194 | =============== ======= ================== | ||
| 175 | 195 | ||
| 176 | This mmap is done with user pages, not kernel identity mappings, | 196 | This mmap is done with user pages, not kernel identity mappings, |
| 177 | so it is safe to use WB mappings. | 197 | so it is safe to use WB mappings. |
| @@ -182,7 +202,8 @@ PAST PROBLEM CASES | |||
| 182 | never generate an uncacheable reference to the WB-only areas unless | 202 | never generate an uncacheable reference to the WB-only areas unless |
| 183 | the driver explicitly touches them. | 203 | the driver explicitly touches them. |
| 184 | 204 | ||
| 185 | mmap of 0x0-0xFFFFF legacy_mem by "X" | 205 | mmap of 0x0-0xFFFFF legacy_mem by "X" |
| 206 | ------------------------------------- | ||
| 186 | 207 | ||
| 187 | If the EFI memory map reports that the entire range supports the | 208 | If the EFI memory map reports that the entire range supports the |
| 188 | same attributes, we can allow the mmap (and we will prefer WB if | 209 | same attributes, we can allow the mmap (and we will prefer WB if |
| @@ -197,15 +218,18 @@ PAST PROBLEM CASES | |||
| 197 | that doesn't report the VGA frame buffer at all), we should fail the | 218 | that doesn't report the VGA frame buffer at all), we should fail the |
| 198 | mmap and force the user to map just the specific region of interest. | 219 | mmap and force the user to map just the specific region of interest. |
| 199 | 220 | ||
| 200 | mmap of 0xA0000-0xBFFFF legacy_mem by "X" on HP sx1000 with VGA disabled | 221 | mmap of 0xA0000-0xBFFFF legacy_mem by "X" on HP sx1000 with VGA disabled |
| 222 | ------------------------------------------------------------------------ | ||
| 223 | |||
| 224 | The EFI memory map reports the following attributes:: | ||
| 201 | 225 | ||
| 202 | The EFI memory map reports the following attributes: | ||
| 203 | 0x00000-0xFFFFF WB only (no VGA MMIO hole) | 226 | 0x00000-0xFFFFF WB only (no VGA MMIO hole) |
| 204 | 227 | ||
| 205 | This is a special case of the previous case, and the mmap should | 228 | This is a special case of the previous case, and the mmap should |
| 206 | fail for the same reason as above. | 229 | fail for the same reason as above. |
| 207 | 230 | ||
| 208 | read of /sys/devices/.../rom | 231 | read of /sys/devices/.../rom |
| 232 | ---------------------------- | ||
| 209 | 233 | ||
| 210 | For VGA devices, this may cause an ioremap() of 0xC0000. This | 234 | For VGA devices, this may cause an ioremap() of 0xC0000. This |
| 211 | used to be done with a UC mapping, because the VGA frame buffer | 235 | used to be done with a UC mapping, because the VGA frame buffer |
| @@ -215,7 +239,8 @@ PAST PROBLEM CASES | |||
| 215 | We should use WB page table mappings to avoid covering the VGA | 239 | We should use WB page table mappings to avoid covering the VGA |
| 216 | frame buffer. | 240 | frame buffer. |
| 217 | 241 | ||
| 218 | NOTES | 242 | Notes |
| 243 | ===== | ||
| 219 | 244 | ||
| 220 | [1] SDM rev 2.2, vol 2, sec 4.4.1. | 245 | [1] SDM rev 2.2, vol 2, sec 4.4.1. |
| 221 | [2] SDM rev 2.2, vol 2, sec 4.4.6. | 246 | [2] SDM rev 2.2, vol 2, sec 4.4.6. |
diff --git a/Documentation/ia64/efirtc.txt b/Documentation/ia64/efirtc.rst index 057e6bebda8f..2f7ff5026308 100644 --- a/Documentation/ia64/efirtc.txt +++ b/Documentation/ia64/efirtc.rst | |||
| @@ -1,12 +1,16 @@ | |||
| 1 | ========================== | ||
| 1 | EFI Real Time Clock driver | 2 | EFI Real Time Clock driver |
| 2 | ------------------------------- | 3 | ========================== |
| 4 | |||
| 3 | S. Eranian <eranian@hpl.hp.com> | 5 | S. Eranian <eranian@hpl.hp.com> |
| 6 | |||
| 4 | March 2000 | 7 | March 2000 |
| 5 | 8 | ||
| 6 | I/ Introduction | 9 | 1. Introduction |
| 10 | =============== | ||
| 7 | 11 | ||
| 8 | This document describes the efirtc.c driver has provided for | 12 | This document describes the efirtc.c driver has provided for |
| 9 | the IA-64 platform. | 13 | the IA-64 platform. |
| 10 | 14 | ||
| 11 | The purpose of this driver is to supply an API for kernel and user applications | 15 | The purpose of this driver is to supply an API for kernel and user applications |
| 12 | to get access to the Time Service offered by EFI version 0.92. | 16 | to get access to the Time Service offered by EFI version 0.92. |
| @@ -16,112 +20,124 @@ SetTime(), GetWakeupTime(), SetWakeupTime() which are all supported by this | |||
| 16 | driver. We describe those calls as well the design of the driver in the | 20 | driver. We describe those calls as well the design of the driver in the |
| 17 | following sections. | 21 | following sections. |
| 18 | 22 | ||
| 19 | II/ Design Decisions | 23 | 2. Design Decisions |
| 24 | =================== | ||
| 20 | 25 | ||
| 21 | The original ideas was to provide a very simple driver to get access to, | 26 | The original ideas was to provide a very simple driver to get access to, |
| 22 | at first, the time of day service. This is required in order to access, in a | 27 | at first, the time of day service. This is required in order to access, in a |
| 23 | portable way, the CMOS clock. A program like /sbin/hwclock uses such a clock | 28 | portable way, the CMOS clock. A program like /sbin/hwclock uses such a clock |
| 24 | to initialize the system view of the time during boot. | 29 | to initialize the system view of the time during boot. |
| 25 | 30 | ||
| 26 | Because we wanted to minimize the impact on existing user-level apps using | 31 | Because we wanted to minimize the impact on existing user-level apps using |
| 27 | the CMOS clock, we decided to expose an API that was very similar to the one | 32 | the CMOS clock, we decided to expose an API that was very similar to the one |
| 28 | used today with the legacy RTC driver (driver/char/rtc.c). However, because | 33 | used today with the legacy RTC driver (driver/char/rtc.c). However, because |
| 29 | EFI provides a simpler services, not all ioctl() are available. Also | 34 | EFI provides a simpler services, not all ioctl() are available. Also |
| 30 | new ioctl()s have been introduced for things that EFI provides but not the | 35 | new ioctl()s have been introduced for things that EFI provides but not the |
| 31 | legacy. | 36 | legacy. |
| 32 | 37 | ||
| 33 | EFI uses a slightly different way of representing the time, noticeably | 38 | EFI uses a slightly different way of representing the time, noticeably |
| 34 | the reference date is different. Year is the using the full 4-digit format. | 39 | the reference date is different. Year is the using the full 4-digit format. |
| 35 | The Epoch is January 1st 1998. For backward compatibility reasons we don't | 40 | The Epoch is January 1st 1998. For backward compatibility reasons we don't |
| 36 | expose this new way of representing time. Instead we use something very | 41 | expose this new way of representing time. Instead we use something very |
| 37 | similar to the struct tm, i.e. struct rtc_time, as used by hwclock. | 42 | similar to the struct tm, i.e. struct rtc_time, as used by hwclock. |
| 38 | One of the reasons for doing it this way is to allow for EFI to still evolve | 43 | One of the reasons for doing it this way is to allow for EFI to still evolve |
| 39 | without necessarily impacting any of the user applications. The decoupling | 44 | without necessarily impacting any of the user applications. The decoupling |
| 40 | enables flexibility and permits writing wrapper code is ncase things change. | 45 | enables flexibility and permits writing wrapper code is ncase things change. |
| 41 | 46 | ||
| 42 | The driver exposes two interfaces, one via the device file and a set of | 47 | The driver exposes two interfaces, one via the device file and a set of |
| 43 | ioctl()s. The other is read-only via the /proc filesystem. | 48 | ioctl()s. The other is read-only via the /proc filesystem. |
| 44 | 49 | ||
| 45 | As of today we don't offer a /proc/sys interface. | 50 | As of today we don't offer a /proc/sys interface. |
| 46 | 51 | ||
| 47 | To allow for a uniform interface between the legacy RTC and EFI time service, | 52 | To allow for a uniform interface between the legacy RTC and EFI time service, |
| 48 | we have created the include/linux/rtc.h header file to contain only the | 53 | we have created the include/linux/rtc.h header file to contain only the |
| 49 | "public" API of the two drivers. The specifics of the legacy RTC are still | 54 | "public" API of the two drivers. The specifics of the legacy RTC are still |
| 50 | in include/linux/mc146818rtc.h. | 55 | in include/linux/mc146818rtc.h. |
| 51 | 56 | ||
| 52 | 57 | ||
| 53 | III/ Time of day service | 58 | 3. Time of day service |
| 59 | ====================== | ||
| 54 | 60 | ||
| 55 | The part of the driver gives access to the time of day service of EFI. | 61 | The part of the driver gives access to the time of day service of EFI. |
| 56 | Two ioctl()s, compatible with the legacy RTC calls: | 62 | Two ioctl()s, compatible with the legacy RTC calls: |
| 57 | 63 | ||
| 58 | Read the CMOS clock: ioctl(d, RTC_RD_TIME, &rtc); | 64 | Read the CMOS clock:: |
| 65 | |||
| 66 | ioctl(d, RTC_RD_TIME, &rtc); | ||
| 67 | |||
| 68 | Write the CMOS clock:: | ||
| 59 | 69 | ||
| 60 | Write the CMOS clock: ioctl(d, RTC_SET_TIME, &rtc); | 70 | ioctl(d, RTC_SET_TIME, &rtc); |
| 61 | 71 | ||
| 62 | The rtc is a pointer to a data structure defined in rtc.h which is close | 72 | The rtc is a pointer to a data structure defined in rtc.h which is close |
| 63 | to a struct tm: | 73 | to a struct tm:: |
| 64 | 74 | ||
| 65 | struct rtc_time { | 75 | struct rtc_time { |
| 66 | int tm_sec; | 76 | int tm_sec; |
| 67 | int tm_min; | 77 | int tm_min; |
| 68 | int tm_hour; | 78 | int tm_hour; |
| 69 | int tm_mday; | 79 | int tm_mday; |
| 70 | int tm_mon; | 80 | int tm_mon; |
| 71 | int tm_year; | 81 | int tm_year; |
| 72 | int tm_wday; | 82 | int tm_wday; |
| 73 | int tm_yday; | 83 | int tm_yday; |
| 74 | int tm_isdst; | 84 | int tm_isdst; |
| 75 | }; | 85 | }; |
| 76 | 86 | ||
| 77 | The driver takes care of converting back an forth between the EFI time and | 87 | The driver takes care of converting back an forth between the EFI time and |
| 78 | this format. | 88 | this format. |
| 79 | 89 | ||
| 80 | Those two ioctl()s can be exercised with the hwclock command: | 90 | Those two ioctl()s can be exercised with the hwclock command: |
| 81 | 91 | ||
| 82 | For reading: | 92 | For reading:: |
| 83 | # /sbin/hwclock --show | ||
| 84 | Mon Mar 6 15:32:32 2000 -0.910248 seconds | ||
| 85 | 93 | ||
| 86 | For setting: | 94 | # /sbin/hwclock --show |
| 87 | # /sbin/hwclock --systohc | 95 | Mon Mar 6 15:32:32 2000 -0.910248 seconds |
| 96 | |||
| 97 | For setting:: | ||
| 98 | |||
| 99 | # /sbin/hwclock --systohc | ||
| 88 | 100 | ||
| 89 | Root privileges are required to be able to set the time of day. | 101 | Root privileges are required to be able to set the time of day. |
| 90 | 102 | ||
| 91 | IV/ Wakeup Alarm service | 103 | 4. Wakeup Alarm service |
| 104 | ======================= | ||
| 92 | 105 | ||
| 93 | EFI provides an API by which one can program when a machine should wakeup, | 106 | EFI provides an API by which one can program when a machine should wakeup, |
| 94 | i.e. reboot. This is very different from the alarm provided by the legacy | 107 | i.e. reboot. This is very different from the alarm provided by the legacy |
| 95 | RTC which is some kind of interval timer alarm. For this reason we don't use | 108 | RTC which is some kind of interval timer alarm. For this reason we don't use |
| 96 | the same ioctl()s to get access to the service. Instead we have | 109 | the same ioctl()s to get access to the service. Instead we have |
| 97 | introduced 2 news ioctl()s to the interface of an RTC. | 110 | introduced 2 news ioctl()s to the interface of an RTC. |
| 98 | 111 | ||
| 99 | We have added 2 new ioctl()s that are specific to the EFI driver: | 112 | We have added 2 new ioctl()s that are specific to the EFI driver: |
| 100 | 113 | ||
| 101 | Read the current state of the alarm | 114 | Read the current state of the alarm:: |
| 102 | ioctl(d, RTC_WKLAM_RD, &wkt) | 115 | |
| 116 | ioctl(d, RTC_WKLAM_RD, &wkt) | ||
| 117 | |||
| 118 | Set the alarm or change its status:: | ||
| 119 | |||
| 120 | ioctl(d, RTC_WKALM_SET, &wkt) | ||
| 103 | 121 | ||
| 104 | Set the alarm or change its status | 122 | The wkt structure encapsulates a struct rtc_time + 2 extra fields to get |
| 105 | ioctl(d, RTC_WKALM_SET, &wkt) | 123 | status information:: |
| 106 | 124 | ||
| 107 | The wkt structure encapsulates a struct rtc_time + 2 extra fields to get | 125 | struct rtc_wkalrm { |
| 108 | status information: | ||
| 109 | |||
| 110 | struct rtc_wkalrm { | ||
| 111 | 126 | ||
| 112 | unsigned char enabled; /* =1 if alarm is enabled */ | 127 | unsigned char enabled; /* =1 if alarm is enabled */ |
| 113 | unsigned char pending; /* =1 if alarm is pending */ | 128 | unsigned char pending; /* =1 if alarm is pending */ |
| 114 | 129 | ||
| 115 | struct rtc_time time; | 130 | struct rtc_time time; |
| 116 | } | 131 | } |
| 117 | 132 | ||
| 118 | As of today, none of the existing user-level apps supports this feature. | 133 | As of today, none of the existing user-level apps supports this feature. |
| 119 | However writing such a program should be hard by simply using those two | 134 | However writing such a program should be hard by simply using those two |
| 120 | ioctl(). | 135 | ioctl(). |
| 121 | 136 | ||
| 122 | Root privileges are required to be able to set the alarm. | 137 | Root privileges are required to be able to set the alarm. |
| 123 | 138 | ||
| 124 | V/ References. | 139 | 5. References |
| 140 | ============= | ||
| 125 | 141 | ||
| 126 | Checkout the following Web site for more information on EFI: | 142 | Checkout the following Web site for more information on EFI: |
| 127 | 143 | ||
diff --git a/Documentation/ia64/err_inject.txt b/Documentation/ia64/err_inject.rst index 9f651c181429..900f71e93a29 100644 --- a/Documentation/ia64/err_inject.txt +++ b/Documentation/ia64/err_inject.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | 1 | ======================================== | |
| 2 | IPF Machine Check (MC) error inject tool | 2 | IPF Machine Check (MC) error inject tool |
| 3 | ======================================== | 3 | ======================================== |
| 4 | 4 | ||
| @@ -32,94 +32,94 @@ Errata: Itanium 2 Processors Specification Update lists some errata against | |||
| 32 | the pal_mc_error_inject PAL procedure. The following err.conf has been tested | 32 | the pal_mc_error_inject PAL procedure. The following err.conf has been tested |
| 33 | on latest Montecito PAL. | 33 | on latest Montecito PAL. |
| 34 | 34 | ||
| 35 | err.conf: | 35 | err.conf:: |
| 36 | 36 | ||
| 37 | #This is configuration file for err_inject_tool. | 37 | #This is configuration file for err_inject_tool. |
| 38 | #The format of the each line is: | 38 | #The format of the each line is: |
| 39 | #cpu, loop, interval, err_type_info, err_struct_info, err_data_buffer | 39 | #cpu, loop, interval, err_type_info, err_struct_info, err_data_buffer |
| 40 | #where | 40 | #where |
| 41 | # cpu: logical cpu number the error will be inject in. | 41 | # cpu: logical cpu number the error will be inject in. |
| 42 | # loop: times the error will be injected. | 42 | # loop: times the error will be injected. |
| 43 | # interval: In second. every so often one error is injected. | 43 | # interval: In second. every so often one error is injected. |
| 44 | # err_type_info, err_struct_info: PAL parameters. | 44 | # err_type_info, err_struct_info: PAL parameters. |
| 45 | # | 45 | # |
| 46 | #Note: All values are hex w/o or w/ 0x prefix. | 46 | #Note: All values are hex w/o or w/ 0x prefix. |
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | #On cpu2, inject only total 0x10 errors, interval 5 seconds | 49 | #On cpu2, inject only total 0x10 errors, interval 5 seconds |
| 50 | #corrected, data cache, hier-2, physical addr(assigned by tool code). | 50 | #corrected, data cache, hier-2, physical addr(assigned by tool code). |
| 51 | #working on Montecito latest PAL. | 51 | #working on Montecito latest PAL. |
| 52 | 2, 10, 5, 4101, 95 | 52 | 2, 10, 5, 4101, 95 |
| 53 | 53 | ||
| 54 | #On cpu4, inject and consume total 0x10 errors, interval 5 seconds | 54 | #On cpu4, inject and consume total 0x10 errors, interval 5 seconds |
| 55 | #corrected, data cache, hier-2, physical addr(assigned by tool code). | 55 | #corrected, data cache, hier-2, physical addr(assigned by tool code). |
| 56 | #working on Montecito latest PAL. | 56 | #working on Montecito latest PAL. |
| 57 | 4, 10, 5, 4109, 95 | 57 | 4, 10, 5, 4109, 95 |
| 58 | 58 | ||
| 59 | #On cpu15, inject and consume total 0x10 errors, interval 5 seconds | 59 | #On cpu15, inject and consume total 0x10 errors, interval 5 seconds |
| 60 | #recoverable, DTR0, hier-2. | 60 | #recoverable, DTR0, hier-2. |
| 61 | #working on Montecito latest PAL. | 61 | #working on Montecito latest PAL. |
| 62 | 0xf, 0x10, 5, 4249, 15 | 62 | 0xf, 0x10, 5, 4249, 15 |
| 63 | 63 | ||
| 64 | The sample application source code: | 64 | The sample application source code: |
| 65 | 65 | ||
| 66 | err_injection_tool.c: | 66 | err_injection_tool.c:: |
| 67 | 67 | ||
| 68 | /* | 68 | /* |
| 69 | * This program is free software; you can redistribute it and/or modify | 69 | * This program is free software; you can redistribute it and/or modify |
| 70 | * it under the terms of the GNU General Public License as published by | 70 | * it under the terms of the GNU General Public License as published by |
| 71 | * the Free Software Foundation; either version 2 of the License, or | 71 | * the Free Software Foundation; either version 2 of the License, or |
| 72 | * (at your option) any later version. | 72 | * (at your option) any later version. |
| 73 | * | 73 | * |
| 74 | * This program is distributed in the hope that it will be useful, but | 74 | * This program is distributed in the hope that it will be useful, but |
| 75 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 75 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 76 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | 76 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or |
| 77 | * NON INFRINGEMENT. See the GNU General Public License for more | 77 | * NON INFRINGEMENT. See the GNU General Public License for more |
| 78 | * details. | 78 | * details. |
| 79 | * | 79 | * |
| 80 | * You should have received a copy of the GNU General Public License | 80 | * You should have received a copy of the GNU General Public License |
| 81 | * along with this program; if not, write to the Free Software | 81 | * along with this program; if not, write to the Free Software |
| 82 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 82 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 83 | * | 83 | * |
| 84 | * Copyright (C) 2006 Intel Co | 84 | * Copyright (C) 2006 Intel Co |
| 85 | * Fenghua Yu <fenghua.yu@intel.com> | 85 | * Fenghua Yu <fenghua.yu@intel.com> |
| 86 | * | 86 | * |
| 87 | */ | 87 | */ |
| 88 | #include <sys/types.h> | 88 | #include <sys/types.h> |
| 89 | #include <sys/stat.h> | 89 | #include <sys/stat.h> |
| 90 | #include <fcntl.h> | 90 | #include <fcntl.h> |
| 91 | #include <stdio.h> | 91 | #include <stdio.h> |
| 92 | #include <sched.h> | 92 | #include <sched.h> |
| 93 | #include <unistd.h> | 93 | #include <unistd.h> |
| 94 | #include <stdlib.h> | 94 | #include <stdlib.h> |
| 95 | #include <stdarg.h> | 95 | #include <stdarg.h> |
| 96 | #include <string.h> | 96 | #include <string.h> |
| 97 | #include <errno.h> | 97 | #include <errno.h> |
| 98 | #include <time.h> | 98 | #include <time.h> |
| 99 | #include <sys/ipc.h> | 99 | #include <sys/ipc.h> |
| 100 | #include <sys/sem.h> | 100 | #include <sys/sem.h> |
| 101 | #include <sys/wait.h> | 101 | #include <sys/wait.h> |
| 102 | #include <sys/mman.h> | 102 | #include <sys/mman.h> |
| 103 | #include <sys/shm.h> | 103 | #include <sys/shm.h> |
| 104 | 104 | ||
| 105 | #define MAX_FN_SIZE 256 | 105 | #define MAX_FN_SIZE 256 |
| 106 | #define MAX_BUF_SIZE 256 | 106 | #define MAX_BUF_SIZE 256 |
| 107 | #define DATA_BUF_SIZE 256 | 107 | #define DATA_BUF_SIZE 256 |
| 108 | #define NR_CPUS 512 | 108 | #define NR_CPUS 512 |
| 109 | #define MAX_TASK_NUM 2048 | 109 | #define MAX_TASK_NUM 2048 |
| 110 | #define MIN_INTERVAL 5 // seconds | 110 | #define MIN_INTERVAL 5 // seconds |
| 111 | #define ERR_DATA_BUFFER_SIZE 3 // Three 8-byte. | 111 | #define ERR_DATA_BUFFER_SIZE 3 // Three 8-byte. |
| 112 | #define PARA_FIELD_NUM 5 | 112 | #define PARA_FIELD_NUM 5 |
| 113 | #define MASK_SIZE (NR_CPUS/64) | 113 | #define MASK_SIZE (NR_CPUS/64) |
| 114 | #define PATH_FORMAT "/sys/devices/system/cpu/cpu%d/err_inject/" | 114 | #define PATH_FORMAT "/sys/devices/system/cpu/cpu%d/err_inject/" |
| 115 | 115 | ||
| 116 | int sched_setaffinity(pid_t pid, unsigned int len, unsigned long *mask); | 116 | int sched_setaffinity(pid_t pid, unsigned int len, unsigned long *mask); |
| 117 | 117 | ||
| 118 | int verbose; | 118 | int verbose; |
| 119 | #define vbprintf if (verbose) printf | 119 | #define vbprintf if (verbose) printf |
| 120 | 120 | ||
| 121 | int log_info(int cpu, const char *fmt, ...) | 121 | int log_info(int cpu, const char *fmt, ...) |
| 122 | { | 122 | { |
| 123 | FILE *log; | 123 | FILE *log; |
| 124 | char fn[MAX_FN_SIZE]; | 124 | char fn[MAX_FN_SIZE]; |
| 125 | char buf[MAX_BUF_SIZE]; | 125 | char buf[MAX_BUF_SIZE]; |
| @@ -142,12 +142,12 @@ int log_info(int cpu, const char *fmt, ...) | |||
| 142 | fclose(log); | 142 | fclose(log); |
| 143 | 143 | ||
| 144 | return 0; | 144 | return 0; |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | typedef unsigned long u64; | 147 | typedef unsigned long u64; |
| 148 | typedef unsigned int u32; | 148 | typedef unsigned int u32; |
| 149 | 149 | ||
| 150 | typedef union err_type_info_u { | 150 | typedef union err_type_info_u { |
| 151 | struct { | 151 | struct { |
| 152 | u64 mode : 3, /* 0-2 */ | 152 | u64 mode : 3, /* 0-2 */ |
| 153 | err_inj : 3, /* 3-5 */ | 153 | err_inj : 3, /* 3-5 */ |
| @@ -157,9 +157,9 @@ typedef union err_type_info_u { | |||
| 157 | reserved : 48; /* 16-63 */ | 157 | reserved : 48; /* 16-63 */ |
| 158 | } err_type_info_u; | 158 | } err_type_info_u; |
| 159 | u64 err_type_info; | 159 | u64 err_type_info; |
| 160 | } err_type_info_t; | 160 | } err_type_info_t; |
| 161 | 161 | ||
| 162 | typedef union err_struct_info_u { | 162 | typedef union err_struct_info_u { |
| 163 | struct { | 163 | struct { |
| 164 | u64 siv : 1, /* 0 */ | 164 | u64 siv : 1, /* 0 */ |
| 165 | c_t : 2, /* 1-2 */ | 165 | c_t : 2, /* 1-2 */ |
| @@ -197,9 +197,9 @@ typedef union err_struct_info_u { | |||
| 197 | u64 reserved; | 197 | u64 reserved; |
| 198 | } err_struct_info_bus_processor_interconnect; | 198 | } err_struct_info_bus_processor_interconnect; |
| 199 | u64 err_struct_info; | 199 | u64 err_struct_info; |
| 200 | } err_struct_info_t; | 200 | } err_struct_info_t; |
| 201 | 201 | ||
| 202 | typedef union err_data_buffer_u { | 202 | typedef union err_data_buffer_u { |
| 203 | struct { | 203 | struct { |
| 204 | u64 trigger_addr; /* 0-63 */ | 204 | u64 trigger_addr; /* 0-63 */ |
| 205 | u64 inj_addr; /* 64-127 */ | 205 | u64 inj_addr; /* 64-127 */ |
| @@ -221,9 +221,9 @@ typedef union err_data_buffer_u { | |||
| 221 | u64 reserved; /* 0-63 */ | 221 | u64 reserved; /* 0-63 */ |
| 222 | } err_data_buffer_bus_processor_interconnect; | 222 | } err_data_buffer_bus_processor_interconnect; |
| 223 | u64 err_data_buffer[ERR_DATA_BUFFER_SIZE]; | 223 | u64 err_data_buffer[ERR_DATA_BUFFER_SIZE]; |
| 224 | } err_data_buffer_t; | 224 | } err_data_buffer_t; |
| 225 | 225 | ||
| 226 | typedef union capabilities_u { | 226 | typedef union capabilities_u { |
| 227 | struct { | 227 | struct { |
| 228 | u64 i : 1, | 228 | u64 i : 1, |
| 229 | d : 1, | 229 | d : 1, |
| @@ -276,9 +276,9 @@ typedef union capabilities_u { | |||
| 276 | struct { | 276 | struct { |
| 277 | u64 reserved; | 277 | u64 reserved; |
| 278 | } capabilities_bus_processor_interconnect; | 278 | } capabilities_bus_processor_interconnect; |
| 279 | } capabilities_t; | 279 | } capabilities_t; |
| 280 | 280 | ||
| 281 | typedef struct resources_s { | 281 | typedef struct resources_s { |
| 282 | u64 ibr0 : 1, | 282 | u64 ibr0 : 1, |
| 283 | ibr2 : 1, | 283 | ibr2 : 1, |
| 284 | ibr4 : 1, | 284 | ibr4 : 1, |
| @@ -288,24 +288,24 @@ typedef struct resources_s { | |||
| 288 | dbr4 : 1, | 288 | dbr4 : 1, |
| 289 | dbr6 : 1, | 289 | dbr6 : 1, |
| 290 | reserved : 48; | 290 | reserved : 48; |
| 291 | } resources_t; | 291 | } resources_t; |
| 292 | 292 | ||
| 293 | 293 | ||
| 294 | long get_page_size(void) | 294 | long get_page_size(void) |
| 295 | { | 295 | { |
| 296 | long page_size=sysconf(_SC_PAGESIZE); | 296 | long page_size=sysconf(_SC_PAGESIZE); |
| 297 | return page_size; | 297 | return page_size; |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | #define PAGE_SIZE (get_page_size()==-1?0x4000:get_page_size()) | 300 | #define PAGE_SIZE (get_page_size()==-1?0x4000:get_page_size()) |
| 301 | #define SHM_SIZE (2*PAGE_SIZE*NR_CPUS) | 301 | #define SHM_SIZE (2*PAGE_SIZE*NR_CPUS) |
| 302 | #define SHM_VA 0x2000000100000000 | 302 | #define SHM_VA 0x2000000100000000 |
| 303 | 303 | ||
| 304 | int shmid; | 304 | int shmid; |
| 305 | void *shmaddr; | 305 | void *shmaddr; |
| 306 | 306 | ||
| 307 | int create_shm(void) | 307 | int create_shm(void) |
| 308 | { | 308 | { |
| 309 | key_t key; | 309 | key_t key; |
| 310 | char fn[MAX_FN_SIZE]; | 310 | char fn[MAX_FN_SIZE]; |
| 311 | 311 | ||
| @@ -343,34 +343,34 @@ int create_shm(void) | |||
| 343 | mlock(shmaddr, SHM_SIZE); | 343 | mlock(shmaddr, SHM_SIZE); |
| 344 | 344 | ||
| 345 | return 0; | 345 | return 0; |
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | int free_shm() | 348 | int free_shm() |
| 349 | { | 349 | { |
| 350 | munlock(shmaddr, SHM_SIZE); | 350 | munlock(shmaddr, SHM_SIZE); |
| 351 | shmdt(shmaddr); | 351 | shmdt(shmaddr); |
| 352 | semctl(shmid, 0, IPC_RMID); | 352 | semctl(shmid, 0, IPC_RMID); |
| 353 | 353 | ||
| 354 | return 0; | 354 | return 0; |
| 355 | } | 355 | } |
| 356 | 356 | ||
| 357 | #ifdef _SEM_SEMUN_UNDEFINED | 357 | #ifdef _SEM_SEMUN_UNDEFINED |
| 358 | union semun | 358 | union semun |
| 359 | { | 359 | { |
| 360 | int val; | 360 | int val; |
| 361 | struct semid_ds *buf; | 361 | struct semid_ds *buf; |
| 362 | unsigned short int *array; | 362 | unsigned short int *array; |
| 363 | struct seminfo *__buf; | 363 | struct seminfo *__buf; |
| 364 | }; | 364 | }; |
| 365 | #endif | 365 | #endif |
| 366 | 366 | ||
| 367 | u32 mode=1; /* 1: physical mode; 2: virtual mode. */ | 367 | u32 mode=1; /* 1: physical mode; 2: virtual mode. */ |
| 368 | int one_lock=1; | 368 | int one_lock=1; |
| 369 | key_t key[NR_CPUS]; | 369 | key_t key[NR_CPUS]; |
| 370 | int semid[NR_CPUS]; | 370 | int semid[NR_CPUS]; |
| 371 | 371 | ||
| 372 | int create_sem(int cpu) | 372 | int create_sem(int cpu) |
| 373 | { | 373 | { |
| 374 | union semun arg; | 374 | union semun arg; |
| 375 | char fn[MAX_FN_SIZE]; | 375 | char fn[MAX_FN_SIZE]; |
| 376 | int sid; | 376 | int sid; |
| @@ -407,37 +407,37 @@ int create_sem(int cpu) | |||
| 407 | } | 407 | } |
| 408 | 408 | ||
| 409 | return 0; | 409 | return 0; |
| 410 | } | 410 | } |
| 411 | 411 | ||
| 412 | static int lock(int cpu) | 412 | static int lock(int cpu) |
| 413 | { | 413 | { |
| 414 | struct sembuf lock; | 414 | struct sembuf lock; |
| 415 | 415 | ||
| 416 | lock.sem_num = cpu; | 416 | lock.sem_num = cpu; |
| 417 | lock.sem_op = 1; | 417 | lock.sem_op = 1; |
| 418 | semop(semid[cpu], &lock, 1); | 418 | semop(semid[cpu], &lock, 1); |
| 419 | 419 | ||
| 420 | return 0; | 420 | return 0; |
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | static int unlock(int cpu) | 423 | static int unlock(int cpu) |
| 424 | { | 424 | { |
| 425 | struct sembuf unlock; | 425 | struct sembuf unlock; |
| 426 | 426 | ||
| 427 | unlock.sem_num = cpu; | 427 | unlock.sem_num = cpu; |
| 428 | unlock.sem_op = -1; | 428 | unlock.sem_op = -1; |
| 429 | semop(semid[cpu], &unlock, 1); | 429 | semop(semid[cpu], &unlock, 1); |
| 430 | 430 | ||
| 431 | return 0; | 431 | return 0; |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | void free_sem(int cpu) | 434 | void free_sem(int cpu) |
| 435 | { | 435 | { |
| 436 | semctl(semid[cpu], 0, IPC_RMID); | 436 | semctl(semid[cpu], 0, IPC_RMID); |
| 437 | } | 437 | } |
| 438 | 438 | ||
| 439 | int wr_multi(char *fn, unsigned long *data, int size) | 439 | int wr_multi(char *fn, unsigned long *data, int size) |
| 440 | { | 440 | { |
| 441 | int fd; | 441 | int fd; |
| 442 | char buf[MAX_BUF_SIZE]; | 442 | char buf[MAX_BUF_SIZE]; |
| 443 | int ret; | 443 | int ret; |
| @@ -459,15 +459,15 @@ int wr_multi(char *fn, unsigned long *data, int size) | |||
| 459 | ret=write(fd, buf, sizeof(buf)); | 459 | ret=write(fd, buf, sizeof(buf)); |
| 460 | close(fd); | 460 | close(fd); |
| 461 | return ret; | 461 | return ret; |
| 462 | } | 462 | } |
| 463 | 463 | ||
| 464 | int wr(char *fn, unsigned long data) | 464 | int wr(char *fn, unsigned long data) |
| 465 | { | 465 | { |
| 466 | return wr_multi(fn, &data, 1); | 466 | return wr_multi(fn, &data, 1); |
| 467 | } | 467 | } |
| 468 | 468 | ||
| 469 | int rd(char *fn, unsigned long *data) | 469 | int rd(char *fn, unsigned long *data) |
| 470 | { | 470 | { |
| 471 | int fd; | 471 | int fd; |
| 472 | char buf[MAX_BUF_SIZE]; | 472 | char buf[MAX_BUF_SIZE]; |
| 473 | 473 | ||
| @@ -480,10 +480,10 @@ int rd(char *fn, unsigned long *data) | |||
| 480 | *data=strtoul(buf, NULL, 16); | 480 | *data=strtoul(buf, NULL, 16); |
| 481 | close(fd); | 481 | close(fd); |
| 482 | return 0; | 482 | return 0; |
| 483 | } | 483 | } |
| 484 | 484 | ||
| 485 | int rd_status(char *path, int *status) | 485 | int rd_status(char *path, int *status) |
| 486 | { | 486 | { |
| 487 | char fn[MAX_FN_SIZE]; | 487 | char fn[MAX_FN_SIZE]; |
| 488 | sprintf(fn, "%s/status", path); | 488 | sprintf(fn, "%s/status", path); |
| 489 | if (rd(fn, (u64*)status)<0) { | 489 | if (rd(fn, (u64*)status)<0) { |
| @@ -492,10 +492,10 @@ int rd_status(char *path, int *status) | |||
| 492 | } | 492 | } |
| 493 | 493 | ||
| 494 | return 0; | 494 | return 0; |
| 495 | } | 495 | } |
| 496 | 496 | ||
| 497 | int rd_capabilities(char *path, u64 *capabilities) | 497 | int rd_capabilities(char *path, u64 *capabilities) |
| 498 | { | 498 | { |
| 499 | char fn[MAX_FN_SIZE]; | 499 | char fn[MAX_FN_SIZE]; |
| 500 | sprintf(fn, "%s/capabilities", path); | 500 | sprintf(fn, "%s/capabilities", path); |
| 501 | if (rd(fn, capabilities)<0) { | 501 | if (rd(fn, capabilities)<0) { |
| @@ -504,10 +504,10 @@ int rd_capabilities(char *path, u64 *capabilities) | |||
| 504 | } | 504 | } |
| 505 | 505 | ||
| 506 | return 0; | 506 | return 0; |
| 507 | } | 507 | } |
| 508 | 508 | ||
| 509 | int rd_all(char *path) | 509 | int rd_all(char *path) |
| 510 | { | 510 | { |
| 511 | unsigned long err_type_info, err_struct_info, err_data_buffer; | 511 | unsigned long err_type_info, err_struct_info, err_data_buffer; |
| 512 | int status; | 512 | int status; |
| 513 | unsigned long capabilities, resources; | 513 | unsigned long capabilities, resources; |
| @@ -556,11 +556,11 @@ int rd_all(char *path) | |||
| 556 | printf("resources=%lx\n", resources); | 556 | printf("resources=%lx\n", resources); |
| 557 | 557 | ||
| 558 | return 0; | 558 | return 0; |
| 559 | } | 559 | } |
| 560 | 560 | ||
| 561 | int query_capabilities(char *path, err_type_info_t err_type_info, | 561 | int query_capabilities(char *path, err_type_info_t err_type_info, |
| 562 | u64 *capabilities) | 562 | u64 *capabilities) |
| 563 | { | 563 | { |
| 564 | char fn[MAX_FN_SIZE]; | 564 | char fn[MAX_FN_SIZE]; |
| 565 | err_struct_info_t err_struct_info; | 565 | err_struct_info_t err_struct_info; |
| 566 | err_data_buffer_t err_data_buffer; | 566 | err_data_buffer_t err_data_buffer; |
| @@ -583,10 +583,10 @@ int query_capabilities(char *path, err_type_info_t err_type_info, | |||
| 583 | return -1; | 583 | return -1; |
| 584 | 584 | ||
| 585 | return 0; | 585 | return 0; |
| 586 | } | 586 | } |
| 587 | 587 | ||
| 588 | int query_all_capabilities() | 588 | int query_all_capabilities() |
| 589 | { | 589 | { |
| 590 | int status; | 590 | int status; |
| 591 | err_type_info_t err_type_info; | 591 | err_type_info_t err_type_info; |
| 592 | int err_sev, err_struct, struct_hier; | 592 | int err_sev, err_struct, struct_hier; |
| @@ -629,12 +629,12 @@ int query_all_capabilities() | |||
| 629 | } | 629 | } |
| 630 | 630 | ||
| 631 | return 0; | 631 | return 0; |
| 632 | } | 632 | } |
| 633 | 633 | ||
| 634 | int err_inject(int cpu, char *path, err_type_info_t err_type_info, | 634 | int err_inject(int cpu, char *path, err_type_info_t err_type_info, |
| 635 | err_struct_info_t err_struct_info, | 635 | err_struct_info_t err_struct_info, |
| 636 | err_data_buffer_t err_data_buffer) | 636 | err_data_buffer_t err_data_buffer) |
| 637 | { | 637 | { |
| 638 | int status; | 638 | int status; |
| 639 | char fn[MAX_FN_SIZE]; | 639 | char fn[MAX_FN_SIZE]; |
| 640 | 640 | ||
| @@ -667,13 +667,13 @@ int err_inject(int cpu, char *path, err_type_info_t err_type_info, | |||
| 667 | } | 667 | } |
| 668 | 668 | ||
| 669 | return status; | 669 | return status; |
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | static int construct_data_buf(char *path, err_type_info_t err_type_info, | 672 | static int construct_data_buf(char *path, err_type_info_t err_type_info, |
| 673 | err_struct_info_t err_struct_info, | 673 | err_struct_info_t err_struct_info, |
| 674 | err_data_buffer_t *err_data_buffer, | 674 | err_data_buffer_t *err_data_buffer, |
| 675 | void *va1) | 675 | void *va1) |
| 676 | { | 676 | { |
| 677 | char fn[MAX_FN_SIZE]; | 677 | char fn[MAX_FN_SIZE]; |
| 678 | u64 virt_addr=0, phys_addr=0; | 678 | u64 virt_addr=0, phys_addr=0; |
| 679 | 679 | ||
| @@ -710,22 +710,22 @@ static int construct_data_buf(char *path, err_type_info_t err_type_info, | |||
| 710 | } | 710 | } |
| 711 | 711 | ||
| 712 | return 0; | 712 | return 0; |
| 713 | } | 713 | } |
| 714 | 714 | ||
| 715 | typedef struct { | 715 | typedef struct { |
| 716 | u64 cpu; | 716 | u64 cpu; |
| 717 | u64 loop; | 717 | u64 loop; |
| 718 | u64 interval; | 718 | u64 interval; |
| 719 | u64 err_type_info; | 719 | u64 err_type_info; |
| 720 | u64 err_struct_info; | 720 | u64 err_struct_info; |
| 721 | u64 err_data_buffer[ERR_DATA_BUFFER_SIZE]; | 721 | u64 err_data_buffer[ERR_DATA_BUFFER_SIZE]; |
| 722 | } parameters_t; | 722 | } parameters_t; |
| 723 | 723 | ||
| 724 | parameters_t line_para; | 724 | parameters_t line_para; |
| 725 | int para; | 725 | int para; |
| 726 | 726 | ||
| 727 | static int empty_data_buffer(u64 *err_data_buffer) | 727 | static int empty_data_buffer(u64 *err_data_buffer) |
| 728 | { | 728 | { |
| 729 | int empty=1; | 729 | int empty=1; |
| 730 | int i; | 730 | int i; |
| 731 | 731 | ||
| @@ -734,10 +734,10 @@ static int empty_data_buffer(u64 *err_data_buffer) | |||
| 734 | empty=0; | 734 | empty=0; |
| 735 | 735 | ||
| 736 | return empty; | 736 | return empty; |
| 737 | } | 737 | } |
| 738 | 738 | ||
| 739 | int err_inj() | 739 | int err_inj() |
| 740 | { | 740 | { |
| 741 | err_type_info_t err_type_info; | 741 | err_type_info_t err_type_info; |
| 742 | err_struct_info_t err_struct_info; | 742 | err_struct_info_t err_struct_info; |
| 743 | err_data_buffer_t err_data_buffer; | 743 | err_data_buffer_t err_data_buffer; |
| @@ -951,10 +951,10 @@ int err_inj() | |||
| 951 | printf("All done.\n"); | 951 | printf("All done.\n"); |
| 952 | 952 | ||
| 953 | return 0; | 953 | return 0; |
| 954 | } | 954 | } |
| 955 | 955 | ||
| 956 | void help() | 956 | void help() |
| 957 | { | 957 | { |
| 958 | printf("err_inject_tool:\n"); | 958 | printf("err_inject_tool:\n"); |
| 959 | printf("\t-q: query all capabilities. default: off\n"); | 959 | printf("\t-q: query all capabilities. default: off\n"); |
| 960 | printf("\t-m: procedure mode. 1: physical 2: virtual. default: 1\n"); | 960 | printf("\t-m: procedure mode. 1: physical 2: virtual. default: 1\n"); |
| @@ -977,10 +977,10 @@ void help() | |||
| 977 | printf("The tool will take err.conf file as "); | 977 | printf("The tool will take err.conf file as "); |
| 978 | printf("input to inject single or multiple errors "); | 978 | printf("input to inject single or multiple errors "); |
| 979 | printf("on one or multiple cpus in parallel.\n"); | 979 | printf("on one or multiple cpus in parallel.\n"); |
| 980 | } | 980 | } |
| 981 | 981 | ||
| 982 | int main(int argc, char **argv) | 982 | int main(int argc, char **argv) |
| 983 | { | 983 | { |
| 984 | char c; | 984 | char c; |
| 985 | int do_err_inj=0; | 985 | int do_err_inj=0; |
| 986 | int do_query_all=0; | 986 | int do_query_all=0; |
| @@ -1031,7 +1031,7 @@ int main(int argc, char **argv) | |||
| 1031 | if (count!=PARA_FIELD_NUM+3) { | 1031 | if (count!=PARA_FIELD_NUM+3) { |
| 1032 | line_para.err_data_buffer[0]=-1, | 1032 | line_para.err_data_buffer[0]=-1, |
| 1033 | line_para.err_data_buffer[1]=-1, | 1033 | line_para.err_data_buffer[1]=-1, |
| 1034 | line_para.err_data_buffer[2]=-1; | 1034 | line_para.err_data_buffer[2]=-1; |
| 1035 | count=sscanf(optarg, "%lx, %lx, %lx, %lx, %lx\n", | 1035 | count=sscanf(optarg, "%lx, %lx, %lx, %lx, %lx\n", |
| 1036 | &line_para.cpu, | 1036 | &line_para.cpu, |
| 1037 | &line_para.loop, | 1037 | &line_para.loop, |
| @@ -1064,5 +1064,4 @@ int main(int argc, char **argv) | |||
| 1064 | help(); | 1064 | help(); |
| 1065 | 1065 | ||
| 1066 | return 0; | 1066 | return 0; |
| 1067 | } | 1067 | } |
| 1068 | |||
diff --git a/Documentation/ia64/fsys.txt b/Documentation/ia64/fsys.rst index 59dd689d9b86..a702d2cc94b6 100644 --- a/Documentation/ia64/fsys.txt +++ b/Documentation/ia64/fsys.rst | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | -*-Mode: outline-*- | 1 | =================================== |
| 2 | 2 | Light-weight System Calls for IA-64 | |
| 3 | Light-weight System Calls for IA-64 | 3 | =================================== |
| 4 | ----------------------------------- | ||
| 5 | 4 | ||
| 6 | Started: 13-Jan-2003 | 5 | Started: 13-Jan-2003 |
| 6 | |||
| 7 | Last update: 27-Sep-2003 | 7 | Last update: 27-Sep-2003 |
| 8 | 8 | ||
| 9 | David Mosberger-Tang | 9 | David Mosberger-Tang |
| @@ -52,12 +52,13 @@ privilege level is at level 0, this means that fsys-mode requires some | |||
| 52 | care (see below). | 52 | care (see below). |
| 53 | 53 | ||
| 54 | 54 | ||
| 55 | * How to tell fsys-mode | 55 | How to tell fsys-mode |
| 56 | ===================== | ||
| 56 | 57 | ||
| 57 | Linux operates in fsys-mode when (a) the privilege level is 0 (most | 58 | Linux operates in fsys-mode when (a) the privilege level is 0 (most |
| 58 | privileged) and (b) the stacks have NOT been switched to kernel memory | 59 | privileged) and (b) the stacks have NOT been switched to kernel memory |
| 59 | yet. For convenience, the header file <asm-ia64/ptrace.h> provides | 60 | yet. For convenience, the header file <asm-ia64/ptrace.h> provides |
| 60 | three macros: | 61 | three macros:: |
| 61 | 62 | ||
| 62 | user_mode(regs) | 63 | user_mode(regs) |
| 63 | user_stack(task,regs) | 64 | user_stack(task,regs) |
| @@ -70,11 +71,12 @@ to by "regs" was executing in user mode (privilege level 3). | |||
| 70 | user_stack() returns TRUE if the state pointed to by "regs" was | 71 | user_stack() returns TRUE if the state pointed to by "regs" was |
| 71 | executing on the user-level stack(s). Finally, fsys_mode() returns | 72 | executing on the user-level stack(s). Finally, fsys_mode() returns |
| 72 | TRUE if the CPU state pointed to by "regs" was executing in fsys-mode. | 73 | TRUE if the CPU state pointed to by "regs" was executing in fsys-mode. |
| 73 | The fsys_mode() macro is equivalent to the expression: | 74 | The fsys_mode() macro is equivalent to the expression:: |
| 74 | 75 | ||
| 75 | !user_mode(regs) && user_stack(task,regs) | 76 | !user_mode(regs) && user_stack(task,regs) |
| 76 | 77 | ||
| 77 | * How to write an fsyscall handler | 78 | How to write an fsyscall handler |
| 79 | ================================ | ||
| 78 | 80 | ||
| 79 | The file arch/ia64/kernel/fsys.S contains a table of fsyscall-handlers | 81 | The file arch/ia64/kernel/fsys.S contains a table of fsyscall-handlers |
| 80 | (fsyscall_table). This table contains one entry for each system call. | 82 | (fsyscall_table). This table contains one entry for each system call. |
| @@ -87,66 +89,72 @@ of the getpid() system call. | |||
| 87 | 89 | ||
| 88 | The entry and exit-state of an fsyscall handler is as follows: | 90 | The entry and exit-state of an fsyscall handler is as follows: |
| 89 | 91 | ||
| 90 | ** Machine state on entry to fsyscall handler: | 92 | Machine state on entry to fsyscall handler |
| 91 | 93 | ------------------------------------------ | |
| 92 | - r10 = 0 | 94 | |
| 93 | - r11 = saved ar.pfs (a user-level value) | 95 | ========= =============================================================== |
| 94 | - r15 = system call number | 96 | r10 0 |
| 95 | - r16 = "current" task pointer (in normal kernel-mode, this is in r13) | 97 | r11 saved ar.pfs (a user-level value) |
| 96 | - r32-r39 = system call arguments | 98 | r15 system call number |
| 97 | - b6 = return address (a user-level value) | 99 | r16 "current" task pointer (in normal kernel-mode, this is in r13) |
| 98 | - ar.pfs = previous frame-state (a user-level value) | 100 | r32-r39 system call arguments |
| 99 | - PSR.be = cleared to zero (i.e., little-endian byte order is in effect) | 101 | b6 return address (a user-level value) |
| 100 | - all other registers may contain values passed in from user-mode | 102 | ar.pfs previous frame-state (a user-level value) |
| 101 | 103 | PSR.be cleared to zero (i.e., little-endian byte order is in effect) | |
| 102 | ** Required machine state on exit to fsyscall handler: | 104 | - all other registers may contain values passed in from user-mode |
| 103 | 105 | ========= =============================================================== | |
| 104 | - r11 = saved ar.pfs (as passed into the fsyscall handler) | 106 | |
| 105 | - r15 = system call number (as passed into the fsyscall handler) | 107 | Required machine state on exit to fsyscall handler |
| 106 | - r32-r39 = system call arguments (as passed into the fsyscall handler) | 108 | -------------------------------------------------- |
| 107 | - b6 = return address (as passed into the fsyscall handler) | 109 | |
| 108 | - ar.pfs = previous frame-state (as passed into the fsyscall handler) | 110 | ========= =========================================================== |
| 111 | r11 saved ar.pfs (as passed into the fsyscall handler) | ||
| 112 | r15 system call number (as passed into the fsyscall handler) | ||
| 113 | r32-r39 system call arguments (as passed into the fsyscall handler) | ||
| 114 | b6 return address (as passed into the fsyscall handler) | ||
| 115 | ar.pfs previous frame-state (as passed into the fsyscall handler) | ||
| 116 | ========= =========================================================== | ||
| 109 | 117 | ||
| 110 | Fsyscall handlers can execute with very little overhead, but with that | 118 | Fsyscall handlers can execute with very little overhead, but with that |
| 111 | speed comes a set of restrictions: | 119 | speed comes a set of restrictions: |
| 112 | 120 | ||
| 113 | o Fsyscall-handlers MUST check for any pending work in the flags | 121 | * Fsyscall-handlers MUST check for any pending work in the flags |
| 114 | member of the thread-info structure and if any of the | 122 | member of the thread-info structure and if any of the |
| 115 | TIF_ALLWORK_MASK flags are set, the handler needs to fall back on | 123 | TIF_ALLWORK_MASK flags are set, the handler needs to fall back on |
| 116 | doing a full system call (by calling fsys_fallback_syscall). | 124 | doing a full system call (by calling fsys_fallback_syscall). |
| 117 | 125 | ||
| 118 | o Fsyscall-handlers MUST preserve incoming arguments (r32-r39, r11, | 126 | * Fsyscall-handlers MUST preserve incoming arguments (r32-r39, r11, |
| 119 | r15, b6, and ar.pfs) because they will be needed in case of a | 127 | r15, b6, and ar.pfs) because they will be needed in case of a |
| 120 | system call restart. Of course, all "preserved" registers also | 128 | system call restart. Of course, all "preserved" registers also |
| 121 | must be preserved, in accordance to the normal calling conventions. | 129 | must be preserved, in accordance to the normal calling conventions. |
| 122 | 130 | ||
| 123 | o Fsyscall-handlers MUST check argument registers for containing a | 131 | * Fsyscall-handlers MUST check argument registers for containing a |
| 124 | NaT value before using them in any way that could trigger a | 132 | NaT value before using them in any way that could trigger a |
| 125 | NaT-consumption fault. If a system call argument is found to | 133 | NaT-consumption fault. If a system call argument is found to |
| 126 | contain a NaT value, an fsyscall-handler may return immediately | 134 | contain a NaT value, an fsyscall-handler may return immediately |
| 127 | with r8=EINVAL, r10=-1. | 135 | with r8=EINVAL, r10=-1. |
| 128 | 136 | ||
| 129 | o Fsyscall-handlers MUST NOT use the "alloc" instruction or perform | 137 | * Fsyscall-handlers MUST NOT use the "alloc" instruction or perform |
| 130 | any other operation that would trigger mandatory RSE | 138 | any other operation that would trigger mandatory RSE |
| 131 | (register-stack engine) traffic. | 139 | (register-stack engine) traffic. |
| 132 | 140 | ||
| 133 | o Fsyscall-handlers MUST NOT write to any stacked registers because | 141 | * Fsyscall-handlers MUST NOT write to any stacked registers because |
| 134 | it is not safe to assume that user-level called a handler with the | 142 | it is not safe to assume that user-level called a handler with the |
| 135 | proper number of arguments. | 143 | proper number of arguments. |
| 136 | 144 | ||
| 137 | o Fsyscall-handlers need to be careful when accessing per-CPU variables: | 145 | * Fsyscall-handlers need to be careful when accessing per-CPU variables: |
| 138 | unless proper safe-guards are taken (e.g., interruptions are avoided), | 146 | unless proper safe-guards are taken (e.g., interruptions are avoided), |
| 139 | execution may be pre-empted and resumed on another CPU at any given | 147 | execution may be pre-empted and resumed on another CPU at any given |
| 140 | time. | 148 | time. |
| 141 | 149 | ||
| 142 | o Fsyscall-handlers must be careful not to leak sensitive kernel' | 150 | * Fsyscall-handlers must be careful not to leak sensitive kernel' |
| 143 | information back to user-level. In particular, before returning to | 151 | information back to user-level. In particular, before returning to |
| 144 | user-level, care needs to be taken to clear any scratch registers | 152 | user-level, care needs to be taken to clear any scratch registers |
| 145 | that could contain sensitive information (note that the current | 153 | that could contain sensitive information (note that the current |
| 146 | task pointer is not considered sensitive: it's already exposed | 154 | task pointer is not considered sensitive: it's already exposed |
| 147 | through ar.k6). | 155 | through ar.k6). |
| 148 | 156 | ||
| 149 | o Fsyscall-handlers MUST NOT access user-memory without first | 157 | * Fsyscall-handlers MUST NOT access user-memory without first |
| 150 | validating access-permission (this can be done typically via | 158 | validating access-permission (this can be done typically via |
| 151 | probe.r.fault and/or probe.w.fault) and without guarding against | 159 | probe.r.fault and/or probe.w.fault) and without guarding against |
| 152 | memory access exceptions (this can be done with the EX() macros | 160 | memory access exceptions (this can be done with the EX() macros |
| @@ -162,7 +170,8 @@ fast system call execution (while fully preserving system call | |||
| 162 | semantics), but there is also a lot of flexibility in handling more | 170 | semantics), but there is also a lot of flexibility in handling more |
| 163 | complicated cases. | 171 | complicated cases. |
| 164 | 172 | ||
| 165 | * Signal handling | 173 | Signal handling |
| 174 | =============== | ||
| 166 | 175 | ||
| 167 | The delivery of (asynchronous) signals must be delayed until fsys-mode | 176 | The delivery of (asynchronous) signals must be delayed until fsys-mode |
| 168 | is exited. This is accomplished with the help of the lower-privilege | 177 | is exited. This is accomplished with the help of the lower-privilege |
| @@ -173,7 +182,8 @@ PSR.lp and returns immediately. When fsys-mode is exited via the | |||
| 173 | occur. The trap handler clears PSR.lp again and returns immediately. | 182 | occur. The trap handler clears PSR.lp again and returns immediately. |
| 174 | The kernel exit path then checks for and delivers any pending signals. | 183 | The kernel exit path then checks for and delivers any pending signals. |
| 175 | 184 | ||
| 176 | * PSR Handling | 185 | PSR Handling |
| 186 | ============ | ||
| 177 | 187 | ||
| 178 | The "epc" instruction doesn't change the contents of PSR at all. This | 188 | The "epc" instruction doesn't change the contents of PSR at all. This |
| 179 | is in contrast to a regular interruption, which clears almost all | 189 | is in contrast to a regular interruption, which clears almost all |
| @@ -181,6 +191,7 @@ bits. Because of that, some care needs to be taken to ensure things | |||
| 181 | work as expected. The following discussion describes how each PSR bit | 191 | work as expected. The following discussion describes how each PSR bit |
| 182 | is handled. | 192 | is handled. |
| 183 | 193 | ||
| 194 | ======= ======================================================================= | ||
| 184 | PSR.be Cleared when entering fsys-mode. A srlz.d instruction is used | 195 | PSR.be Cleared when entering fsys-mode. A srlz.d instruction is used |
| 185 | to ensure the CPU is in little-endian mode before the first | 196 | to ensure the CPU is in little-endian mode before the first |
| 186 | load/store instruction is executed. PSR.be is normally NOT | 197 | load/store instruction is executed. PSR.be is normally NOT |
| @@ -202,7 +213,8 @@ PSR.pp Unchanged. | |||
| 202 | PSR.di Unchanged. | 213 | PSR.di Unchanged. |
| 203 | PSR.si Unchanged. | 214 | PSR.si Unchanged. |
| 204 | PSR.db Unchanged. The kernel prevents user-level from setting a hardware | 215 | PSR.db Unchanged. The kernel prevents user-level from setting a hardware |
| 205 | breakpoint that triggers at any privilege level other than 3 (user-mode). | 216 | breakpoint that triggers at any privilege level other than |
| 217 | 3 (user-mode). | ||
| 206 | PSR.lp Unchanged. | 218 | PSR.lp Unchanged. |
| 207 | PSR.tb Lazy redirect. If a taken-branch trap occurs while in | 219 | PSR.tb Lazy redirect. If a taken-branch trap occurs while in |
| 208 | fsys-mode, the trap-handler modifies the saved machine state | 220 | fsys-mode, the trap-handler modifies the saved machine state |
| @@ -235,47 +247,52 @@ PSR.ed Unchanged. Note: This bit could only have an effect if an fsys-mode | |||
| 235 | PSR.bn Unchanged. Note: fsys-mode handlers may clear the bit, if needed. | 247 | PSR.bn Unchanged. Note: fsys-mode handlers may clear the bit, if needed. |
| 236 | Doing so requires clearing PSR.i and PSR.ic as well. | 248 | Doing so requires clearing PSR.i and PSR.ic as well. |
| 237 | PSR.ia Unchanged. Note: the ia64 linux kernel never sets this bit. | 249 | PSR.ia Unchanged. Note: the ia64 linux kernel never sets this bit. |
| 250 | ======= ======================================================================= | ||
| 238 | 251 | ||
| 239 | * Using fast system calls | 252 | Using fast system calls |
| 253 | ======================= | ||
| 240 | 254 | ||
| 241 | To use fast system calls, userspace applications need simply call | 255 | To use fast system calls, userspace applications need simply call |
| 242 | __kernel_syscall_via_epc(). For example | 256 | __kernel_syscall_via_epc(). For example |
| 243 | 257 | ||
| 244 | -- example fgettimeofday() call -- | 258 | -- example fgettimeofday() call -- |
| 259 | |||
| 245 | -- fgettimeofday.S -- | 260 | -- fgettimeofday.S -- |
| 246 | 261 | ||
| 247 | #include <asm/asmmacro.h> | 262 | :: |
| 263 | |||
| 264 | #include <asm/asmmacro.h> | ||
| 248 | 265 | ||
| 249 | GLOBAL_ENTRY(fgettimeofday) | 266 | GLOBAL_ENTRY(fgettimeofday) |
| 250 | .prologue | 267 | .prologue |
| 251 | .save ar.pfs, r11 | 268 | .save ar.pfs, r11 |
| 252 | mov r11 = ar.pfs | 269 | mov r11 = ar.pfs |
| 253 | .body | 270 | .body |
| 254 | 271 | ||
| 255 | mov r2 = 0xa000000000020660;; // gate address | 272 | mov r2 = 0xa000000000020660;; // gate address |
| 256 | // found by inspection of System.map for the | 273 | // found by inspection of System.map for the |
| 257 | // __kernel_syscall_via_epc() function. See | 274 | // __kernel_syscall_via_epc() function. See |
| 258 | // below for how to do this for real. | 275 | // below for how to do this for real. |
| 259 | 276 | ||
| 260 | mov b7 = r2 | 277 | mov b7 = r2 |
| 261 | mov r15 = 1087 // gettimeofday syscall | 278 | mov r15 = 1087 // gettimeofday syscall |
| 262 | ;; | 279 | ;; |
| 263 | br.call.sptk.many b6 = b7 | 280 | br.call.sptk.many b6 = b7 |
| 264 | ;; | 281 | ;; |
| 265 | 282 | ||
| 266 | .restore sp | 283 | .restore sp |
| 267 | 284 | ||
| 268 | mov ar.pfs = r11 | 285 | mov ar.pfs = r11 |
| 269 | br.ret.sptk.many rp;; // return to caller | 286 | br.ret.sptk.many rp;; // return to caller |
| 270 | END(fgettimeofday) | 287 | END(fgettimeofday) |
| 271 | 288 | ||
| 272 | -- end fgettimeofday.S -- | 289 | -- end fgettimeofday.S -- |
| 273 | 290 | ||
| 274 | In reality, getting the gate address is accomplished by two extra | 291 | In reality, getting the gate address is accomplished by two extra |
| 275 | values passed via the ELF auxiliary vector (include/asm-ia64/elf.h) | 292 | values passed via the ELF auxiliary vector (include/asm-ia64/elf.h) |
| 276 | 293 | ||
| 277 | o AT_SYSINFO : is the address of __kernel_syscall_via_epc() | 294 | * AT_SYSINFO : is the address of __kernel_syscall_via_epc() |
| 278 | o AT_SYSINFO_EHDR : is the address of the kernel gate ELF DSO | 295 | * AT_SYSINFO_EHDR : is the address of the kernel gate ELF DSO |
| 279 | 296 | ||
| 280 | The ELF DSO is a pre-linked library that is mapped in by the kernel at | 297 | The ELF DSO is a pre-linked library that is mapped in by the kernel at |
| 281 | the gate page. It is a proper ELF shared object so, with a dynamic | 298 | the gate page. It is a proper ELF shared object so, with a dynamic |
diff --git a/Documentation/ia64/README b/Documentation/ia64/ia64.rst index aa17f2154cba..b725019a9492 100644 --- a/Documentation/ia64/README +++ b/Documentation/ia64/ia64.rst | |||
| @@ -1,43 +1,49 @@ | |||
| 1 | Linux kernel release 2.4.xx for the IA-64 Platform | 1 | =========================================== |
| 2 | Linux kernel release for the IA-64 Platform | ||
| 3 | =========================================== | ||
| 2 | 4 | ||
| 3 | These are the release notes for Linux version 2.4 for IA-64 | 5 | These are the release notes for Linux since version 2.4 for IA-64 |
| 4 | platform. This document provides information specific to IA-64 | 6 | platform. This document provides information specific to IA-64 |
| 5 | ONLY, to get additional information about the Linux kernel also | 7 | ONLY, to get additional information about the Linux kernel also |
| 6 | read the original Linux README provided with the kernel. | 8 | read the original Linux README provided with the kernel. |
| 7 | 9 | ||
| 8 | INSTALLING the kernel: | 10 | Installing the Kernel |
| 11 | ===================== | ||
| 9 | 12 | ||
| 10 | - IA-64 kernel installation is the same as the other platforms, see | 13 | - IA-64 kernel installation is the same as the other platforms, see |
| 11 | original README for details. | 14 | original README for details. |
| 12 | 15 | ||
| 13 | 16 | ||
| 14 | SOFTWARE REQUIREMENTS | 17 | Software Requirements |
| 18 | ===================== | ||
| 15 | 19 | ||
| 16 | Compiling and running this kernel requires an IA-64 compliant GCC | 20 | Compiling and running this kernel requires an IA-64 compliant GCC |
| 17 | compiler. And various software packages also compiled with an | 21 | compiler. And various software packages also compiled with an |
| 18 | IA-64 compliant GCC compiler. | 22 | IA-64 compliant GCC compiler. |
| 19 | 23 | ||
| 20 | 24 | ||
| 21 | CONFIGURING the kernel: | 25 | Configuring the Kernel |
| 26 | ====================== | ||
| 22 | 27 | ||
| 23 | Configuration is the same, see original README for details. | 28 | Configuration is the same, see original README for details. |
| 24 | 29 | ||
| 25 | 30 | ||
| 26 | COMPILING the kernel: | 31 | Compiling the Kernel: |
| 27 | 32 | ||
| 28 | - Compiling this kernel doesn't differ from other platform so read | 33 | - Compiling this kernel doesn't differ from other platform so read |
| 29 | the original README for details BUT make sure you have an IA-64 | 34 | the original README for details BUT make sure you have an IA-64 |
| 30 | compliant GCC compiler. | 35 | compliant GCC compiler. |
| 31 | 36 | ||
| 32 | IA-64 SPECIFICS | 37 | IA-64 Specifics |
| 38 | =============== | ||
| 33 | 39 | ||
| 34 | - General issues: | 40 | - General issues: |
| 35 | 41 | ||
| 36 | o Hardly any performance tuning has been done. Obvious targets | 42 | * Hardly any performance tuning has been done. Obvious targets |
| 37 | include the library routines (IP checksum, etc.). Less | 43 | include the library routines (IP checksum, etc.). Less |
| 38 | obvious targets include making sure we don't flush the TLB | 44 | obvious targets include making sure we don't flush the TLB |
| 39 | needlessly, etc. | 45 | needlessly, etc. |
| 40 | 46 | ||
| 41 | o SMP locks cleanup/optimization | 47 | * SMP locks cleanup/optimization |
| 42 | 48 | ||
| 43 | o IA32 support. Currently experimental. It mostly works. | 49 | * IA32 support. Currently experimental. It mostly works. |
diff --git a/Documentation/ia64/index.rst b/Documentation/ia64/index.rst new file mode 100644 index 000000000000..0436e1034115 --- /dev/null +++ b/Documentation/ia64/index.rst | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ================== | ||
| 4 | IA-64 Architecture | ||
| 5 | ================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | ia64 | ||
| 11 | aliasing | ||
| 12 | efirtc | ||
| 13 | err_inject | ||
| 14 | fsys | ||
| 15 | irq-redir | ||
| 16 | mca | ||
| 17 | serial | ||
| 18 | xen | ||
diff --git a/Documentation/ia64/IRQ-redir.txt b/Documentation/ia64/irq-redir.rst index f7bd72261283..39bf94484a15 100644 --- a/Documentation/ia64/IRQ-redir.txt +++ b/Documentation/ia64/irq-redir.rst | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | ============================== | ||
| 1 | IRQ affinity on IA64 platforms | 2 | IRQ affinity on IA64 platforms |
| 2 | ------------------------------ | 3 | ============================== |
| 3 | 07.01.2002, Erich Focht <efocht@ess.nec.de> | 4 | |
| 5 | 07.01.2002, Erich Focht <efocht@ess.nec.de> | ||
| 4 | 6 | ||
| 5 | 7 | ||
| 6 | By writing to /proc/irq/IRQ#/smp_affinity the interrupt routing can be | 8 | By writing to /proc/irq/IRQ#/smp_affinity the interrupt routing can be |
| @@ -12,22 +14,27 @@ IRQ target is one particular CPU and cannot be a mask of several | |||
| 12 | CPUs. Only the first non-zero bit is taken into account. | 14 | CPUs. Only the first non-zero bit is taken into account. |
| 13 | 15 | ||
| 14 | 16 | ||
| 15 | Usage examples: | 17 | Usage examples |
| 18 | ============== | ||
| 16 | 19 | ||
| 17 | The target CPU has to be specified as a hexadecimal CPU mask. The | 20 | The target CPU has to be specified as a hexadecimal CPU mask. The |
| 18 | first non-zero bit is the selected CPU. This format has been kept for | 21 | first non-zero bit is the selected CPU. This format has been kept for |
| 19 | compatibility reasons with i386. | 22 | compatibility reasons with i386. |
| 20 | 23 | ||
| 21 | Set the delivery mode of interrupt 41 to fixed and route the | 24 | Set the delivery mode of interrupt 41 to fixed and route the |
| 22 | interrupts to CPU #3 (logical CPU number) (2^3=0x08): | 25 | interrupts to CPU #3 (logical CPU number) (2^3=0x08):: |
| 26 | |||
| 23 | echo "8" >/proc/irq/41/smp_affinity | 27 | echo "8" >/proc/irq/41/smp_affinity |
| 24 | 28 | ||
| 25 | Set the default route for IRQ number 41 to CPU 6 in lowest priority | 29 | Set the default route for IRQ number 41 to CPU 6 in lowest priority |
| 26 | delivery mode (redirectable): | 30 | delivery mode (redirectable):: |
| 31 | |||
| 27 | echo "r 40" >/proc/irq/41/smp_affinity | 32 | echo "r 40" >/proc/irq/41/smp_affinity |
| 28 | 33 | ||
| 29 | The output of the command | 34 | The output of the command:: |
| 35 | |||
| 30 | cat /proc/irq/IRQ#/smp_affinity | 36 | cat /proc/irq/IRQ#/smp_affinity |
| 37 | |||
| 31 | gives the target CPU mask for the specified interrupt vector. If the CPU | 38 | gives the target CPU mask for the specified interrupt vector. If the CPU |
| 32 | mask is preceded by the character "r", the interrupt is redirectable | 39 | mask is preceded by the character "r", the interrupt is redirectable |
| 33 | (i.e. lowest priority mode routing is used), otherwise its route is | 40 | (i.e. lowest priority mode routing is used), otherwise its route is |
| @@ -35,7 +42,8 @@ fixed. | |||
| 35 | 42 | ||
| 36 | 43 | ||
| 37 | 44 | ||
| 38 | Initialization and default behavior: | 45 | Initialization and default behavior |
| 46 | =================================== | ||
| 39 | 47 | ||
| 40 | If the platform features IRQ redirection (info provided by SAL) all | 48 | If the platform features IRQ redirection (info provided by SAL) all |
| 41 | IO-SAPIC interrupts are initialized with CPU#0 as their default target | 49 | IO-SAPIC interrupts are initialized with CPU#0 as their default target |
| @@ -43,9 +51,11 @@ and the routing is the so called "lowest priority mode" (actually | |||
| 43 | fixed SAPIC mode with hint). The XTP chipset registers are used as hints | 51 | fixed SAPIC mode with hint). The XTP chipset registers are used as hints |
| 44 | for the IRQ routing. Currently in Linux XTP registers can have three | 52 | for the IRQ routing. Currently in Linux XTP registers can have three |
| 45 | values: | 53 | values: |
| 54 | |||
| 46 | - minimal for an idle task, | 55 | - minimal for an idle task, |
| 47 | - normal if any other task runs, | 56 | - normal if any other task runs, |
| 48 | - maximal if the CPU is going to be switched off. | 57 | - maximal if the CPU is going to be switched off. |
| 58 | |||
| 49 | The IRQ is routed to the CPU with lowest XTP register value, the | 59 | The IRQ is routed to the CPU with lowest XTP register value, the |
| 50 | search begins at the default CPU. Therefore most of the interrupts | 60 | search begins at the default CPU. Therefore most of the interrupts |
| 51 | will be handled by CPU #0. | 61 | will be handled by CPU #0. |
| @@ -53,12 +63,14 @@ will be handled by CPU #0. | |||
| 53 | If the platform doesn't feature interrupt redirection IOSAPIC fixed | 63 | If the platform doesn't feature interrupt redirection IOSAPIC fixed |
| 54 | routing is used. The target CPUs are distributed in a round robin | 64 | routing is used. The target CPUs are distributed in a round robin |
| 55 | manner. IRQs will be routed only to the selected target CPUs. Check | 65 | manner. IRQs will be routed only to the selected target CPUs. Check |
| 56 | with | 66 | with:: |
| 67 | |||
| 57 | cat /proc/interrupts | 68 | cat /proc/interrupts |
| 58 | 69 | ||
| 59 | 70 | ||
| 60 | 71 | ||
| 61 | Comments: | 72 | Comments |
| 73 | ======== | ||
| 62 | 74 | ||
| 63 | On large (multi-node) systems it is recommended to route the IRQs to | 75 | On large (multi-node) systems it is recommended to route the IRQs to |
| 64 | the node to which the corresponding device is connected. | 76 | the node to which the corresponding device is connected. |
| @@ -66,4 +78,3 @@ For systems like the NEC AzusA we get IRQ node-affinity for free. This | |||
| 66 | is because usually the chipsets on each node redirect the interrupts | 78 | is because usually the chipsets on each node redirect the interrupts |
| 67 | only to their own CPUs (as they cannot see the XTP registers on the | 79 | only to their own CPUs (as they cannot see the XTP registers on the |
| 68 | other nodes). | 80 | other nodes). |
| 69 | |||
diff --git a/Documentation/ia64/mca.txt b/Documentation/ia64/mca.rst index f097c60cba1b..08270bba44a4 100644 --- a/Documentation/ia64/mca.txt +++ b/Documentation/ia64/mca.rst | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | An ad-hoc collection of notes on IA64 MCA and INIT processing. Feel | 1 | ============================================================= |
| 2 | free to update it with notes about any area that is not clear. | 2 | An ad-hoc collection of notes on IA64 MCA and INIT processing |
| 3 | ============================================================= | ||
| 4 | |||
| 5 | Feel free to update it with notes about any area that is not clear. | ||
| 3 | 6 | ||
| 4 | --- | 7 | --- |
| 5 | 8 | ||
| @@ -82,7 +85,8 @@ if we have a choice here. | |||
| 82 | own stack as running on that cpu. Then a recursive error gets a | 85 | own stack as running on that cpu. Then a recursive error gets a |
| 83 | trace of the failing handler's "task". | 86 | trace of the failing handler's "task". |
| 84 | 87 | ||
| 85 | [1] My (Keith Owens) original design called for ia64 to separate its | 88 | [1] |
| 89 | My (Keith Owens) original design called for ia64 to separate its | ||
| 86 | struct task and the kernel stacks. Then the MCA/INIT data would be | 90 | struct task and the kernel stacks. Then the MCA/INIT data would be |
| 87 | chained stacks like i386 interrupt stacks. But that required | 91 | chained stacks like i386 interrupt stacks. But that required |
| 88 | radical surgery on the rest of ia64, plus extra hard wired TLB | 92 | radical surgery on the rest of ia64, plus extra hard wired TLB |
diff --git a/Documentation/ia64/serial.txt b/Documentation/ia64/serial.rst index a63d2c54329b..1de70c305a79 100644 --- a/Documentation/ia64/serial.txt +++ b/Documentation/ia64/serial.rst | |||
| @@ -1,4 +1,9 @@ | |||
| 1 | SERIAL DEVICE NAMING | 1 | ============== |
| 2 | Serial Devices | ||
| 3 | ============== | ||
| 4 | |||
| 5 | Serial Device Naming | ||
| 6 | ==================== | ||
| 2 | 7 | ||
| 3 | As of 2.6.10, serial devices on ia64 are named based on the | 8 | As of 2.6.10, serial devices on ia64 are named based on the |
| 4 | order of ACPI and PCI enumeration. The first device in the | 9 | order of ACPI and PCI enumeration. The first device in the |
| @@ -30,17 +35,21 @@ SERIAL DEVICE NAMING | |||
| 30 | (described in the ACPI namespace) plus an MP[2] (a PCI device) has | 35 | (described in the ACPI namespace) plus an MP[2] (a PCI device) has |
| 31 | these ports: | 36 | these ports: |
| 32 | 37 | ||
| 33 | pre-2.6.10 pre-2.6.10 | 38 | ========== ========== ============ ============ ======= |
| 34 | MMIO (EFI console (EFI console | 39 | Type MMIO pre-2.6.10 pre-2.6.10 2.6.10+ |
| 35 | address on builtin) on MP port) 2.6.10 | 40 | address |
| 36 | ========== ========== ========== ====== | 41 | (EFI console (EFI console |
| 42 | on builtin) on MP port) | ||
| 43 | ========== ========== ============ ============ ======= | ||
| 37 | builtin 0xff5e0000 ttyS0 ttyS1 ttyS0 | 44 | builtin 0xff5e0000 ttyS0 ttyS1 ttyS0 |
| 38 | MP UPS 0xf8031000 ttyS1 ttyS2 ttyS1 | 45 | MP UPS 0xf8031000 ttyS1 ttyS2 ttyS1 |
| 39 | MP Console 0xf8030000 ttyS2 ttyS0 ttyS2 | 46 | MP Console 0xf8030000 ttyS2 ttyS0 ttyS2 |
| 40 | MP 2 0xf8030010 ttyS3 ttyS3 ttyS3 | 47 | MP 2 0xf8030010 ttyS3 ttyS3 ttyS3 |
| 41 | MP 3 0xf8030038 ttyS4 ttyS4 ttyS4 | 48 | MP 3 0xf8030038 ttyS4 ttyS4 ttyS4 |
| 49 | ========== ========== ============ ============ ======= | ||
| 42 | 50 | ||
| 43 | CONSOLE SELECTION | 51 | Console Selection |
| 52 | ================= | ||
| 44 | 53 | ||
| 45 | EFI knows what your console devices are, but it doesn't tell the | 54 | EFI knows what your console devices are, but it doesn't tell the |
| 46 | kernel quite enough to actually locate them. The DIG64 HCDP | 55 | kernel quite enough to actually locate them. The DIG64 HCDP |
| @@ -67,7 +76,8 @@ CONSOLE SELECTION | |||
| 67 | entries in /etc/inittab (for getty) and /etc/securetty (to allow | 76 | entries in /etc/inittab (for getty) and /etc/securetty (to allow |
| 68 | root login). | 77 | root login). |
| 69 | 78 | ||
| 70 | EARLY SERIAL CONSOLE | 79 | Early Serial Console |
| 80 | ==================== | ||
| 71 | 81 | ||
| 72 | The kernel can't start using a serial console until it knows where | 82 | The kernel can't start using a serial console until it knows where |
| 73 | the device lives. Normally this happens when the driver enumerates | 83 | the device lives. Normally this happens when the driver enumerates |
| @@ -80,7 +90,8 @@ EARLY SERIAL CONSOLE | |||
| 80 | or if the EFI console path contains only a UART device and the | 90 | or if the EFI console path contains only a UART device and the |
| 81 | firmware supplies an HCDP. | 91 | firmware supplies an HCDP. |
| 82 | 92 | ||
| 83 | TROUBLESHOOTING SERIAL CONSOLE PROBLEMS | 93 | Troubleshooting Serial Console Problems |
| 94 | ======================================= | ||
| 84 | 95 | ||
| 85 | No kernel output after elilo prints "Uncompressing Linux... done": | 96 | No kernel output after elilo prints "Uncompressing Linux... done": |
| 86 | 97 | ||
| @@ -133,19 +144,22 @@ TROUBLESHOOTING SERIAL CONSOLE PROBLEMS | |||
| 133 | 144 | ||
| 134 | 145 | ||
| 135 | 146 | ||
| 136 | [1] http://www.dig64.org/specifications/agreement | 147 | [1] |
| 148 | http://www.dig64.org/specifications/agreement | ||
| 137 | The table was originally defined as the "HCDP" for "Headless | 149 | The table was originally defined as the "HCDP" for "Headless |
| 138 | Console/Debug Port." The current version is the "PCDP" for | 150 | Console/Debug Port." The current version is the "PCDP" for |
| 139 | "Primary Console and Debug Port Devices." | 151 | "Primary Console and Debug Port Devices." |
| 140 | 152 | ||
| 141 | [2] The HP MP (management processor) is a PCI device that provides | 153 | [2] |
| 154 | The HP MP (management processor) is a PCI device that provides | ||
| 142 | several UARTs. One of the UARTs is often used as a console; the | 155 | several UARTs. One of the UARTs is often used as a console; the |
| 143 | EFI Boot Manager identifies it as "Acpi(HWP0002,700)/Pci(...)/Uart". | 156 | EFI Boot Manager identifies it as "Acpi(HWP0002,700)/Pci(...)/Uart". |
| 144 | The external connection is usually a 25-pin connector, and a | 157 | The external connection is usually a 25-pin connector, and a |
| 145 | special dongle converts that to three 9-pin connectors, one of | 158 | special dongle converts that to three 9-pin connectors, one of |
| 146 | which is labelled "Console." | 159 | which is labelled "Console." |
| 147 | 160 | ||
| 148 | [3] EFI console devices are configured using the EFI Boot Manager | 161 | [3] |
| 162 | EFI console devices are configured using the EFI Boot Manager | ||
| 149 | "Boot option maintenance" menu. You may have to interrupt the | 163 | "Boot option maintenance" menu. You may have to interrupt the |
| 150 | boot sequence to use this menu, and you will have to reset the | 164 | boot sequence to use this menu, and you will have to reset the |
| 151 | box after changing console configuration. | 165 | box after changing console configuration. |
diff --git a/Documentation/ia64/xen.rst b/Documentation/ia64/xen.rst new file mode 100644 index 000000000000..831339c74441 --- /dev/null +++ b/Documentation/ia64/xen.rst | |||
| @@ -0,0 +1,206 @@ | |||
| 1 | ******************************************************** | ||
| 2 | Recipe for getting/building/running Xen/ia64 with pv_ops | ||
| 3 | ******************************************************** | ||
| 4 | This recipe describes how to get xen-ia64 source and build it, | ||
| 5 | and run domU with pv_ops. | ||
| 6 | |||
| 7 | Requirements | ||
| 8 | ============ | ||
| 9 | |||
| 10 | - python | ||
| 11 | - mercurial | ||
| 12 | it (aka "hg") is an open-source source code | ||
| 13 | management software. See the below. | ||
| 14 | http://www.selenic.com/mercurial/wiki/ | ||
| 15 | - git | ||
| 16 | - bridge-utils | ||
| 17 | |||
| 18 | Getting and Building Xen and Dom0 | ||
| 19 | ================================= | ||
| 20 | |||
| 21 | My environment is: | ||
| 22 | |||
| 23 | - Machine : Tiger4 | ||
| 24 | - Domain0 OS : RHEL5 | ||
| 25 | - DomainU OS : RHEL5 | ||
| 26 | |||
| 27 | 1. Download source:: | ||
| 28 | |||
| 29 | # hg clone http://xenbits.xensource.com/ext/ia64/xen-unstable.hg | ||
| 30 | # cd xen-unstable.hg | ||
| 31 | # hg clone http://xenbits.xensource.com/ext/ia64/linux-2.6.18-xen.hg | ||
| 32 | |||
| 33 | 2. # make world | ||
| 34 | |||
| 35 | 3. # make install-tools | ||
| 36 | |||
| 37 | 4. copy kernels and xen:: | ||
| 38 | |||
| 39 | # cp xen/xen.gz /boot/efi/efi/redhat/ | ||
| 40 | # cp build-linux-2.6.18-xen_ia64/vmlinux.gz \ | ||
| 41 | /boot/efi/efi/redhat/vmlinuz-2.6.18.8-xen | ||
| 42 | |||
| 43 | 5. make initrd for Dom0/DomU:: | ||
| 44 | |||
| 45 | # make -C linux-2.6.18-xen.hg ARCH=ia64 modules_install \ | ||
| 46 | O=$(pwd)/build-linux-2.6.18-xen_ia64 | ||
| 47 | # mkinitrd -f /boot/efi/efi/redhat/initrd-2.6.18.8-xen.img \ | ||
| 48 | 2.6.18.8-xen --builtin mptspi --builtin mptbase \ | ||
| 49 | --builtin mptscsih --builtin uhci-hcd --builtin ohci-hcd \ | ||
| 50 | --builtin ehci-hcd | ||
| 51 | |||
| 52 | Making a disk image for guest OS | ||
| 53 | ================================ | ||
| 54 | |||
| 55 | 1. make file:: | ||
| 56 | |||
| 57 | # dd if=/dev/zero of=/root/rhel5.img bs=1M seek=4096 count=0 | ||
| 58 | # mke2fs -F -j /root/rhel5.img | ||
| 59 | # mount -o loop /root/rhel5.img /mnt | ||
| 60 | # cp -ax /{dev,var,etc,usr,bin,sbin,lib} /mnt | ||
| 61 | # mkdir /mnt/{root,proc,sys,home,tmp} | ||
| 62 | |||
| 63 | Note: You may miss some device files. If so, please create them | ||
| 64 | with mknod. Or you can use tar instead of cp. | ||
| 65 | |||
| 66 | 2. modify DomU's fstab:: | ||
| 67 | |||
| 68 | # vi /mnt/etc/fstab | ||
| 69 | /dev/xvda1 / ext3 defaults 1 1 | ||
| 70 | none /dev/pts devpts gid=5,mode=620 0 0 | ||
| 71 | none /dev/shm tmpfs defaults 0 0 | ||
| 72 | none /proc proc defaults 0 0 | ||
| 73 | none /sys sysfs defaults 0 0 | ||
| 74 | |||
| 75 | 3. modify inittab | ||
| 76 | |||
| 77 | set runlevel to 3 to avoid X trying to start:: | ||
| 78 | |||
| 79 | # vi /mnt/etc/inittab | ||
| 80 | id:3:initdefault: | ||
| 81 | |||
| 82 | Start a getty on the hvc0 console:: | ||
| 83 | |||
| 84 | X0:2345:respawn:/sbin/mingetty hvc0 | ||
| 85 | |||
| 86 | tty1-6 mingetty can be commented out | ||
| 87 | |||
| 88 | 4. add hvc0 into /etc/securetty:: | ||
| 89 | |||
| 90 | # vi /mnt/etc/securetty (add hvc0) | ||
| 91 | |||
| 92 | 5. umount:: | ||
| 93 | |||
| 94 | # umount /mnt | ||
| 95 | |||
| 96 | FYI, virt-manager can also make a disk image for guest OS. | ||
| 97 | It's GUI tools and easy to make it. | ||
| 98 | |||
| 99 | Boot Xen & Domain0 | ||
| 100 | ================== | ||
| 101 | |||
| 102 | 1. replace elilo | ||
| 103 | elilo of RHEL5 can boot Xen and Dom0. | ||
| 104 | If you use old elilo (e.g RHEL4), please download from the below | ||
| 105 | http://elilo.sourceforge.net/cgi-bin/blosxom | ||
| 106 | and copy into /boot/efi/efi/redhat/:: | ||
| 107 | |||
| 108 | # cp elilo-3.6-ia64.efi /boot/efi/efi/redhat/elilo.efi | ||
| 109 | |||
| 110 | 2. modify elilo.conf (like the below):: | ||
| 111 | |||
| 112 | # vi /boot/efi/efi/redhat/elilo.conf | ||
| 113 | prompt | ||
| 114 | timeout=20 | ||
| 115 | default=xen | ||
| 116 | relocatable | ||
| 117 | |||
| 118 | image=vmlinuz-2.6.18.8-xen | ||
| 119 | label=xen | ||
| 120 | vmm=xen.gz | ||
| 121 | initrd=initrd-2.6.18.8-xen.img | ||
| 122 | read-only | ||
| 123 | append=" -- rhgb root=/dev/sda2" | ||
| 124 | |||
| 125 | The append options before "--" are for xen hypervisor, | ||
| 126 | the options after "--" are for dom0. | ||
| 127 | |||
| 128 | FYI, your machine may need console options like | ||
| 129 | "com1=19200,8n1 console=vga,com1". For example, | ||
| 130 | append="com1=19200,8n1 console=vga,com1 -- rhgb console=tty0 \ | ||
| 131 | console=ttyS0 root=/dev/sda2" | ||
| 132 | |||
| 133 | Getting and Building domU with pv_ops | ||
| 134 | ===================================== | ||
| 135 | |||
| 136 | 1. get pv_ops tree:: | ||
| 137 | |||
| 138 | # git clone http://people.valinux.co.jp/~yamahata/xen-ia64/linux-2.6-xen-ia64.git/ | ||
| 139 | |||
| 140 | 2. git branch (if necessary):: | ||
| 141 | |||
| 142 | # cd linux-2.6-xen-ia64/ | ||
| 143 | # git checkout -b your_branch origin/xen-ia64-domu-minimal-2008may19 | ||
| 144 | |||
| 145 | Note: | ||
| 146 | The current branch is xen-ia64-domu-minimal-2008may19. | ||
| 147 | But you would find the new branch. You can see with | ||
| 148 | "git branch -r" to get the branch lists. | ||
| 149 | |||
| 150 | http://people.valinux.co.jp/~yamahata/xen-ia64/for_eagl/linux-2.6-ia64-pv-ops.git/ | ||
| 151 | |||
| 152 | is also available. | ||
| 153 | |||
| 154 | The tree is based on | ||
| 155 | |||
| 156 | git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 test) | ||
| 157 | |||
| 158 | 3. copy .config for pv_ops of domU:: | ||
| 159 | |||
| 160 | # cp arch/ia64/configs/xen_domu_wip_defconfig .config | ||
| 161 | |||
| 162 | 4. make kernel with pv_ops:: | ||
| 163 | |||
| 164 | # make oldconfig | ||
| 165 | # make | ||
| 166 | |||
| 167 | 5. install the kernel and initrd:: | ||
| 168 | |||
| 169 | # cp vmlinux.gz /boot/efi/efi/redhat/vmlinuz-2.6-pv_ops-xenU | ||
| 170 | # make modules_install | ||
| 171 | # mkinitrd -f /boot/efi/efi/redhat/initrd-2.6-pv_ops-xenU.img \ | ||
| 172 | 2.6.26-rc3xen-ia64-08941-g1b12161 --builtin mptspi \ | ||
| 173 | --builtin mptbase --builtin mptscsih --builtin uhci-hcd \ | ||
| 174 | --builtin ohci-hcd --builtin ehci-hcd | ||
| 175 | |||
| 176 | Boot DomainU with pv_ops | ||
| 177 | ======================== | ||
| 178 | |||
| 179 | 1. make config of DomU:: | ||
| 180 | |||
| 181 | # vi /etc/xen/rhel5 | ||
| 182 | kernel = "/boot/efi/efi/redhat/vmlinuz-2.6-pv_ops-xenU" | ||
| 183 | ramdisk = "/boot/efi/efi/redhat/initrd-2.6-pv_ops-xenU.img" | ||
| 184 | vcpus = 1 | ||
| 185 | memory = 512 | ||
| 186 | name = "rhel5" | ||
| 187 | disk = [ 'file:/root/rhel5.img,xvda1,w' ] | ||
| 188 | root = "/dev/xvda1 ro" | ||
| 189 | extra= "rhgb console=hvc0" | ||
| 190 | |||
| 191 | 2. After boot xen and dom0, start xend:: | ||
| 192 | |||
| 193 | # /etc/init.d/xend start | ||
| 194 | |||
| 195 | ( In the debugging case, `# XEND_DEBUG=1 xend trace_start` ) | ||
| 196 | |||
| 197 | 3. start domU:: | ||
| 198 | |||
| 199 | # xm create -c rhel5 | ||
| 200 | |||
| 201 | Reference | ||
| 202 | ========= | ||
| 203 | - Wiki of Xen/IA64 upstream merge | ||
| 204 | http://wiki.xensource.com/xenwiki/XenIA64/UpstreamMerge | ||
| 205 | |||
| 206 | Written by Akio Takebe <takebe_akio@jp.fujitsu.com> on 28 May 2008 | ||
diff --git a/Documentation/ia64/xen.txt b/Documentation/ia64/xen.txt deleted file mode 100644 index a12c74ce2773..000000000000 --- a/Documentation/ia64/xen.txt +++ /dev/null | |||
| @@ -1,183 +0,0 @@ | |||
| 1 | Recipe for getting/building/running Xen/ia64 with pv_ops | ||
| 2 | -------------------------------------------------------- | ||
| 3 | |||
| 4 | This recipe describes how to get xen-ia64 source and build it, | ||
| 5 | and run domU with pv_ops. | ||
| 6 | |||
| 7 | ============ | ||
| 8 | Requirements | ||
| 9 | ============ | ||
| 10 | |||
| 11 | - python | ||
| 12 | - mercurial | ||
| 13 | it (aka "hg") is an open-source source code | ||
| 14 | management software. See the below. | ||
| 15 | http://www.selenic.com/mercurial/wiki/ | ||
| 16 | - git | ||
| 17 | - bridge-utils | ||
| 18 | |||
| 19 | ================================= | ||
| 20 | Getting and Building Xen and Dom0 | ||
| 21 | ================================= | ||
| 22 | |||
| 23 | My environment is; | ||
| 24 | Machine : Tiger4 | ||
| 25 | Domain0 OS : RHEL5 | ||
| 26 | DomainU OS : RHEL5 | ||
| 27 | |||
| 28 | 1. Download source | ||
| 29 | # hg clone http://xenbits.xensource.com/ext/ia64/xen-unstable.hg | ||
| 30 | # cd xen-unstable.hg | ||
| 31 | # hg clone http://xenbits.xensource.com/ext/ia64/linux-2.6.18-xen.hg | ||
| 32 | |||
| 33 | 2. # make world | ||
| 34 | |||
| 35 | 3. # make install-tools | ||
| 36 | |||
| 37 | 4. copy kernels and xen | ||
| 38 | # cp xen/xen.gz /boot/efi/efi/redhat/ | ||
| 39 | # cp build-linux-2.6.18-xen_ia64/vmlinux.gz \ | ||
| 40 | /boot/efi/efi/redhat/vmlinuz-2.6.18.8-xen | ||
| 41 | |||
| 42 | 5. make initrd for Dom0/DomU | ||
| 43 | # make -C linux-2.6.18-xen.hg ARCH=ia64 modules_install \ | ||
| 44 | O=$(pwd)/build-linux-2.6.18-xen_ia64 | ||
| 45 | # mkinitrd -f /boot/efi/efi/redhat/initrd-2.6.18.8-xen.img \ | ||
| 46 | 2.6.18.8-xen --builtin mptspi --builtin mptbase \ | ||
| 47 | --builtin mptscsih --builtin uhci-hcd --builtin ohci-hcd \ | ||
| 48 | --builtin ehci-hcd | ||
| 49 | |||
| 50 | ================================ | ||
| 51 | Making a disk image for guest OS | ||
| 52 | ================================ | ||
| 53 | |||
| 54 | 1. make file | ||
| 55 | # dd if=/dev/zero of=/root/rhel5.img bs=1M seek=4096 count=0 | ||
| 56 | # mke2fs -F -j /root/rhel5.img | ||
| 57 | # mount -o loop /root/rhel5.img /mnt | ||
| 58 | # cp -ax /{dev,var,etc,usr,bin,sbin,lib} /mnt | ||
| 59 | # mkdir /mnt/{root,proc,sys,home,tmp} | ||
| 60 | |||
| 61 | Note: You may miss some device files. If so, please create them | ||
| 62 | with mknod. Or you can use tar instead of cp. | ||
| 63 | |||
| 64 | 2. modify DomU's fstab | ||
| 65 | # vi /mnt/etc/fstab | ||
| 66 | /dev/xvda1 / ext3 defaults 1 1 | ||
| 67 | none /dev/pts devpts gid=5,mode=620 0 0 | ||
| 68 | none /dev/shm tmpfs defaults 0 0 | ||
| 69 | none /proc proc defaults 0 0 | ||
| 70 | none /sys sysfs defaults 0 0 | ||
| 71 | |||
| 72 | 3. modify inittab | ||
| 73 | set runlevel to 3 to avoid X trying to start | ||
| 74 | # vi /mnt/etc/inittab | ||
| 75 | id:3:initdefault: | ||
| 76 | Start a getty on the hvc0 console | ||
| 77 | X0:2345:respawn:/sbin/mingetty hvc0 | ||
| 78 | tty1-6 mingetty can be commented out | ||
| 79 | |||
| 80 | 4. add hvc0 into /etc/securetty | ||
| 81 | # vi /mnt/etc/securetty (add hvc0) | ||
| 82 | |||
| 83 | 5. umount | ||
| 84 | # umount /mnt | ||
| 85 | |||
| 86 | FYI, virt-manager can also make a disk image for guest OS. | ||
| 87 | It's GUI tools and easy to make it. | ||
| 88 | |||
| 89 | ================== | ||
| 90 | Boot Xen & Domain0 | ||
| 91 | ================== | ||
| 92 | |||
| 93 | 1. replace elilo | ||
| 94 | elilo of RHEL5 can boot Xen and Dom0. | ||
| 95 | If you use old elilo (e.g RHEL4), please download from the below | ||
| 96 | http://elilo.sourceforge.net/cgi-bin/blosxom | ||
| 97 | and copy into /boot/efi/efi/redhat/ | ||
| 98 | # cp elilo-3.6-ia64.efi /boot/efi/efi/redhat/elilo.efi | ||
| 99 | |||
| 100 | 2. modify elilo.conf (like the below) | ||
| 101 | # vi /boot/efi/efi/redhat/elilo.conf | ||
| 102 | prompt | ||
| 103 | timeout=20 | ||
| 104 | default=xen | ||
| 105 | relocatable | ||
| 106 | |||
| 107 | image=vmlinuz-2.6.18.8-xen | ||
| 108 | label=xen | ||
| 109 | vmm=xen.gz | ||
| 110 | initrd=initrd-2.6.18.8-xen.img | ||
| 111 | read-only | ||
| 112 | append=" -- rhgb root=/dev/sda2" | ||
| 113 | |||
| 114 | The append options before "--" are for xen hypervisor, | ||
| 115 | the options after "--" are for dom0. | ||
| 116 | |||
| 117 | FYI, your machine may need console options like | ||
| 118 | "com1=19200,8n1 console=vga,com1". For example, | ||
| 119 | append="com1=19200,8n1 console=vga,com1 -- rhgb console=tty0 \ | ||
| 120 | console=ttyS0 root=/dev/sda2" | ||
| 121 | |||
| 122 | ===================================== | ||
| 123 | Getting and Building domU with pv_ops | ||
| 124 | ===================================== | ||
| 125 | |||
| 126 | 1. get pv_ops tree | ||
| 127 | # git clone http://people.valinux.co.jp/~yamahata/xen-ia64/linux-2.6-xen-ia64.git/ | ||
| 128 | |||
| 129 | 2. git branch (if necessary) | ||
| 130 | # cd linux-2.6-xen-ia64/ | ||
| 131 | # git checkout -b your_branch origin/xen-ia64-domu-minimal-2008may19 | ||
| 132 | (Note: The current branch is xen-ia64-domu-minimal-2008may19. | ||
| 133 | But you would find the new branch. You can see with | ||
| 134 | "git branch -r" to get the branch lists. | ||
| 135 | http://people.valinux.co.jp/~yamahata/xen-ia64/for_eagl/linux-2.6-ia64-pv-ops.git/ | ||
| 136 | is also available. The tree is based on | ||
| 137 | git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 test) | ||
| 138 | |||
| 139 | |||
| 140 | 3. copy .config for pv_ops of domU | ||
| 141 | # cp arch/ia64/configs/xen_domu_wip_defconfig .config | ||
| 142 | |||
| 143 | 4. make kernel with pv_ops | ||
| 144 | # make oldconfig | ||
| 145 | # make | ||
| 146 | |||
| 147 | 5. install the kernel and initrd | ||
| 148 | # cp vmlinux.gz /boot/efi/efi/redhat/vmlinuz-2.6-pv_ops-xenU | ||
| 149 | # make modules_install | ||
| 150 | # mkinitrd -f /boot/efi/efi/redhat/initrd-2.6-pv_ops-xenU.img \ | ||
| 151 | 2.6.26-rc3xen-ia64-08941-g1b12161 --builtin mptspi \ | ||
| 152 | --builtin mptbase --builtin mptscsih --builtin uhci-hcd \ | ||
| 153 | --builtin ohci-hcd --builtin ehci-hcd | ||
| 154 | |||
| 155 | ======================== | ||
| 156 | Boot DomainU with pv_ops | ||
| 157 | ======================== | ||
| 158 | |||
| 159 | 1. make config of DomU | ||
| 160 | # vi /etc/xen/rhel5 | ||
| 161 | kernel = "/boot/efi/efi/redhat/vmlinuz-2.6-pv_ops-xenU" | ||
| 162 | ramdisk = "/boot/efi/efi/redhat/initrd-2.6-pv_ops-xenU.img" | ||
| 163 | vcpus = 1 | ||
| 164 | memory = 512 | ||
| 165 | name = "rhel5" | ||
| 166 | disk = [ 'file:/root/rhel5.img,xvda1,w' ] | ||
| 167 | root = "/dev/xvda1 ro" | ||
| 168 | extra= "rhgb console=hvc0" | ||
| 169 | |||
| 170 | 2. After boot xen and dom0, start xend | ||
| 171 | # /etc/init.d/xend start | ||
| 172 | ( In the debugging case, # XEND_DEBUG=1 xend trace_start ) | ||
| 173 | |||
| 174 | 3. start domU | ||
| 175 | # xm create -c rhel5 | ||
| 176 | |||
| 177 | ========= | ||
| 178 | Reference | ||
| 179 | ========= | ||
| 180 | - Wiki of Xen/IA64 upstream merge | ||
| 181 | http://wiki.xensource.com/xenwiki/XenIA64/UpstreamMerge | ||
| 182 | |||
| 183 | Written by Akio Takebe <takebe_akio@jp.fujitsu.com> on 28 May 2008 | ||
diff --git a/Documentation/ide/index.rst b/Documentation/ide/index.rst index 45bc12d3957f..813dfe611a31 100644 --- a/Documentation/ide/index.rst +++ b/Documentation/ide/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ================================== | 3 | ================================== |
| 4 | Integrated Drive Electronics (IDE) | 4 | Integrated Drive Electronics (IDE) |
diff --git a/Documentation/iio/index.rst b/Documentation/iio/index.rst index 0593dca89a94..58b7a4ebac51 100644 --- a/Documentation/iio/index.rst +++ b/Documentation/iio/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ============== | 3 | ============== |
| 4 | Industrial I/O | 4 | Industrial I/O |
diff --git a/Documentation/index.rst b/Documentation/index.rst index 00a0fe4241a4..70ae148ec980 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | |||
| 1 | .. The Linux Kernel documentation master file, created by | 2 | .. The Linux Kernel documentation master file, created by |
| 2 | sphinx-quickstart on Fri Feb 12 13:51:46 2016. | 3 | sphinx-quickstart on Fri Feb 12 13:51:46 2016. |
| 3 | You can adapt this file completely to your liking, but it should at least | 4 | You can adapt this file completely to your liking, but it should at least |
| @@ -34,6 +35,7 @@ trying to get it to work optimally on a given system. | |||
| 34 | :maxdepth: 2 | 35 | :maxdepth: 2 |
| 35 | 36 | ||
| 36 | admin-guide/index | 37 | admin-guide/index |
| 38 | kbuild/index | ||
| 37 | 39 | ||
| 38 | Firmware-related documentation | 40 | Firmware-related documentation |
| 39 | ------------------------------ | 41 | ------------------------------ |
| @@ -55,6 +57,7 @@ the kernel interface as seen by application developers. | |||
| 55 | :maxdepth: 2 | 57 | :maxdepth: 2 |
| 56 | 58 | ||
| 57 | userspace-api/index | 59 | userspace-api/index |
| 60 | ioctl/index | ||
| 58 | 61 | ||
| 59 | 62 | ||
| 60 | Introduction to kernel development | 63 | Introduction to kernel development |
| @@ -75,6 +78,9 @@ merged much easier. | |||
| 75 | kernel-hacking/index | 78 | kernel-hacking/index |
| 76 | trace/index | 79 | trace/index |
| 77 | maintainer/index | 80 | maintainer/index |
| 81 | fault-injection/index | ||
| 82 | livepatch/index | ||
| 83 | |||
| 78 | 84 | ||
| 79 | Kernel API documentation | 85 | Kernel API documentation |
| 80 | ------------------------ | 86 | ------------------------ |
| @@ -90,9 +96,24 @@ needed). | |||
| 90 | 96 | ||
| 91 | driver-api/index | 97 | driver-api/index |
| 92 | core-api/index | 98 | core-api/index |
| 99 | locking/index | ||
| 100 | accounting/index | ||
| 101 | block/index | ||
| 102 | cdrom/index | ||
| 103 | ide/index | ||
| 104 | fb/index | ||
| 105 | fpga/index | ||
| 106 | hid/index | ||
| 107 | iio/index | ||
| 93 | infiniband/index | 108 | infiniband/index |
| 109 | leds/index | ||
| 94 | media/index | 110 | media/index |
| 111 | netlabel/index | ||
| 95 | networking/index | 112 | networking/index |
| 113 | pcmcia/index | ||
| 114 | target/index | ||
| 115 | timers/index | ||
| 116 | watchdog/index | ||
| 96 | input/index | 117 | input/index |
| 97 | hwmon/index | 118 | hwmon/index |
| 98 | gpu/index | 119 | gpu/index |
| @@ -105,6 +126,8 @@ needed). | |||
| 105 | usb/index | 126 | usb/index |
| 106 | PCI/index | 127 | PCI/index |
| 107 | misc-devices/index | 128 | misc-devices/index |
| 129 | mic/index | ||
| 130 | scheduler/index | ||
| 108 | 131 | ||
| 109 | Architecture-specific documentation | 132 | Architecture-specific documentation |
| 110 | ----------------------------------- | 133 | ----------------------------------- |
| @@ -116,7 +139,16 @@ implementation. | |||
| 116 | :maxdepth: 2 | 139 | :maxdepth: 2 |
| 117 | 140 | ||
| 118 | sh/index | 141 | sh/index |
| 142 | arm/index | ||
| 143 | arm64/index | ||
| 144 | ia64/index | ||
| 145 | m68k/index | ||
| 146 | riscv/index | ||
| 147 | s390/index | ||
| 148 | sh/index | ||
| 149 | sparc/index | ||
| 119 | x86/index | 150 | x86/index |
| 151 | xtensa/index | ||
| 120 | 152 | ||
| 121 | Filesystem Documentation | 153 | Filesystem Documentation |
| 122 | ------------------------ | 154 | ------------------------ |
diff --git a/Documentation/ioctl/botching-up-ioctls.txt b/Documentation/ioctl/botching-up-ioctls.rst index 883fb034bd04..ac697fef3545 100644 --- a/Documentation/ioctl/botching-up-ioctls.txt +++ b/Documentation/ioctl/botching-up-ioctls.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ================================= | ||
| 1 | (How to avoid) Botching up ioctls | 2 | (How to avoid) Botching up ioctls |
| 2 | ================================= | 3 | ================================= |
| 3 | 4 | ||
diff --git a/Documentation/ioctl/cdrom.rst b/Documentation/ioctl/cdrom.rst new file mode 100644 index 000000000000..3b4c0506de46 --- /dev/null +++ b/Documentation/ioctl/cdrom.rst | |||
| @@ -0,0 +1,1233 @@ | |||
| 1 | ============================ | ||
| 2 | Summary of CDROM ioctl calls | ||
| 3 | ============================ | ||
| 4 | |||
| 5 | - Edward A. Falk <efalk@google.com> | ||
| 6 | |||
| 7 | November, 2004 | ||
| 8 | |||
| 9 | This document attempts to describe the ioctl(2) calls supported by | ||
| 10 | the CDROM layer. These are by-and-large implemented (as of Linux 2.6) | ||
| 11 | in drivers/cdrom/cdrom.c and drivers/block/scsi_ioctl.c | ||
| 12 | |||
| 13 | ioctl values are listed in <linux/cdrom.h>. As of this writing, they | ||
| 14 | are as follows: | ||
| 15 | |||
| 16 | ====================== =============================================== | ||
| 17 | CDROMPAUSE Pause Audio Operation | ||
| 18 | CDROMRESUME Resume paused Audio Operation | ||
| 19 | CDROMPLAYMSF Play Audio MSF (struct cdrom_msf) | ||
| 20 | CDROMPLAYTRKIND Play Audio Track/index (struct cdrom_ti) | ||
| 21 | CDROMREADTOCHDR Read TOC header (struct cdrom_tochdr) | ||
| 22 | CDROMREADTOCENTRY Read TOC entry (struct cdrom_tocentry) | ||
| 23 | CDROMSTOP Stop the cdrom drive | ||
| 24 | CDROMSTART Start the cdrom drive | ||
| 25 | CDROMEJECT Ejects the cdrom media | ||
| 26 | CDROMVOLCTRL Control output volume (struct cdrom_volctrl) | ||
| 27 | CDROMSUBCHNL Read subchannel data (struct cdrom_subchnl) | ||
| 28 | CDROMREADMODE2 Read CDROM mode 2 data (2336 Bytes) | ||
| 29 | (struct cdrom_read) | ||
| 30 | CDROMREADMODE1 Read CDROM mode 1 data (2048 Bytes) | ||
| 31 | (struct cdrom_read) | ||
| 32 | CDROMREADAUDIO (struct cdrom_read_audio) | ||
| 33 | CDROMEJECT_SW enable(1)/disable(0) auto-ejecting | ||
| 34 | CDROMMULTISESSION Obtain the start-of-last-session | ||
| 35 | address of multi session disks | ||
| 36 | (struct cdrom_multisession) | ||
| 37 | CDROM_GET_MCN Obtain the "Universal Product Code" | ||
| 38 | if available (struct cdrom_mcn) | ||
| 39 | CDROM_GET_UPC Deprecated, use CDROM_GET_MCN instead. | ||
| 40 | CDROMRESET hard-reset the drive | ||
| 41 | CDROMVOLREAD Get the drive's volume setting | ||
| 42 | (struct cdrom_volctrl) | ||
| 43 | CDROMREADRAW read data in raw mode (2352 Bytes) | ||
| 44 | (struct cdrom_read) | ||
| 45 | CDROMREADCOOKED read data in cooked mode | ||
| 46 | CDROMSEEK seek msf address | ||
| 47 | CDROMPLAYBLK scsi-cd only, (struct cdrom_blk) | ||
| 48 | CDROMREADALL read all 2646 bytes | ||
| 49 | CDROMGETSPINDOWN return 4-bit spindown value | ||
| 50 | CDROMSETSPINDOWN set 4-bit spindown value | ||
| 51 | CDROMCLOSETRAY pendant of CDROMEJECT | ||
| 52 | CDROM_SET_OPTIONS Set behavior options | ||
| 53 | CDROM_CLEAR_OPTIONS Clear behavior options | ||
| 54 | CDROM_SELECT_SPEED Set the CD-ROM speed | ||
| 55 | CDROM_SELECT_DISC Select disc (for juke-boxes) | ||
| 56 | CDROM_MEDIA_CHANGED Check is media changed | ||
| 57 | CDROM_DRIVE_STATUS Get tray position, etc. | ||
| 58 | CDROM_DISC_STATUS Get disc type, etc. | ||
| 59 | CDROM_CHANGER_NSLOTS Get number of slots | ||
| 60 | CDROM_LOCKDOOR lock or unlock door | ||
| 61 | CDROM_DEBUG Turn debug messages on/off | ||
| 62 | CDROM_GET_CAPABILITY get capabilities | ||
| 63 | CDROMAUDIOBUFSIZ set the audio buffer size | ||
| 64 | DVD_READ_STRUCT Read structure | ||
| 65 | DVD_WRITE_STRUCT Write structure | ||
| 66 | DVD_AUTH Authentication | ||
| 67 | CDROM_SEND_PACKET send a packet to the drive | ||
| 68 | CDROM_NEXT_WRITABLE get next writable block | ||
| 69 | CDROM_LAST_WRITTEN get last block written on disc | ||
| 70 | ====================== =============================================== | ||
| 71 | |||
| 72 | |||
| 73 | The information that follows was determined from reading kernel source | ||
| 74 | code. It is likely that some corrections will be made over time. | ||
| 75 | |||
| 76 | ------------------------------------------------------------------------------ | ||
| 77 | |||
| 78 | General: | ||
| 79 | |||
| 80 | Unless otherwise specified, all ioctl calls return 0 on success | ||
| 81 | and -1 with errno set to an appropriate value on error. (Some | ||
| 82 | ioctls return non-negative data values.) | ||
| 83 | |||
| 84 | Unless otherwise specified, all ioctl calls return -1 and set | ||
| 85 | errno to EFAULT on a failed attempt to copy data to or from user | ||
| 86 | address space. | ||
| 87 | |||
| 88 | Individual drivers may return error codes not listed here. | ||
| 89 | |||
| 90 | Unless otherwise specified, all data structures and constants | ||
| 91 | are defined in <linux/cdrom.h> | ||
| 92 | |||
| 93 | ------------------------------------------------------------------------------ | ||
| 94 | |||
| 95 | |||
| 96 | CDROMPAUSE | ||
| 97 | Pause Audio Operation | ||
| 98 | |||
| 99 | |||
| 100 | usage:: | ||
| 101 | |||
| 102 | ioctl(fd, CDROMPAUSE, 0); | ||
| 103 | |||
| 104 | |||
| 105 | inputs: | ||
| 106 | none | ||
| 107 | |||
| 108 | |||
| 109 | outputs: | ||
| 110 | none | ||
| 111 | |||
| 112 | |||
| 113 | error return: | ||
| 114 | - ENOSYS cd drive not audio-capable. | ||
| 115 | |||
| 116 | |||
| 117 | CDROMRESUME | ||
| 118 | Resume paused Audio Operation | ||
| 119 | |||
| 120 | |||
| 121 | usage:: | ||
| 122 | |||
| 123 | ioctl(fd, CDROMRESUME, 0); | ||
| 124 | |||
| 125 | |||
| 126 | inputs: | ||
| 127 | none | ||
| 128 | |||
| 129 | |||
| 130 | outputs: | ||
| 131 | none | ||
| 132 | |||
| 133 | |||
| 134 | error return: | ||
| 135 | - ENOSYS cd drive not audio-capable. | ||
| 136 | |||
| 137 | |||
| 138 | CDROMPLAYMSF | ||
| 139 | Play Audio MSF | ||
| 140 | |||
| 141 | (struct cdrom_msf) | ||
| 142 | |||
| 143 | |||
| 144 | usage:: | ||
| 145 | |||
| 146 | struct cdrom_msf msf; | ||
| 147 | |||
| 148 | ioctl(fd, CDROMPLAYMSF, &msf); | ||
| 149 | |||
| 150 | inputs: | ||
| 151 | cdrom_msf structure, describing a segment of music to play | ||
| 152 | |||
| 153 | |||
| 154 | outputs: | ||
| 155 | none | ||
| 156 | |||
| 157 | |||
| 158 | error return: | ||
| 159 | - ENOSYS cd drive not audio-capable. | ||
| 160 | |||
| 161 | notes: | ||
| 162 | - MSF stands for minutes-seconds-frames | ||
| 163 | - LBA stands for logical block address | ||
| 164 | - Segment is described as start and end times, where each time | ||
| 165 | is described as minutes:seconds:frames. | ||
| 166 | A frame is 1/75 of a second. | ||
| 167 | |||
| 168 | |||
| 169 | CDROMPLAYTRKIND | ||
| 170 | Play Audio Track/index | ||
| 171 | |||
| 172 | (struct cdrom_ti) | ||
| 173 | |||
| 174 | |||
| 175 | usage:: | ||
| 176 | |||
| 177 | struct cdrom_ti ti; | ||
| 178 | |||
| 179 | ioctl(fd, CDROMPLAYTRKIND, &ti); | ||
| 180 | |||
| 181 | inputs: | ||
| 182 | cdrom_ti structure, describing a segment of music to play | ||
| 183 | |||
| 184 | |||
| 185 | outputs: | ||
| 186 | none | ||
| 187 | |||
| 188 | |||
| 189 | error return: | ||
| 190 | - ENOSYS cd drive not audio-capable. | ||
| 191 | |||
| 192 | notes: | ||
| 193 | - Segment is described as start and end times, where each time | ||
| 194 | is described as a track and an index. | ||
| 195 | |||
| 196 | |||
| 197 | |||
| 198 | CDROMREADTOCHDR | ||
| 199 | Read TOC header | ||
| 200 | |||
| 201 | (struct cdrom_tochdr) | ||
| 202 | |||
| 203 | |||
| 204 | usage:: | ||
| 205 | |||
| 206 | cdrom_tochdr header; | ||
| 207 | |||
| 208 | ioctl(fd, CDROMREADTOCHDR, &header); | ||
| 209 | |||
| 210 | inputs: | ||
| 211 | cdrom_tochdr structure | ||
| 212 | |||
| 213 | |||
| 214 | outputs: | ||
| 215 | cdrom_tochdr structure | ||
| 216 | |||
| 217 | |||
| 218 | error return: | ||
| 219 | - ENOSYS cd drive not audio-capable. | ||
| 220 | |||
| 221 | |||
| 222 | |||
| 223 | CDROMREADTOCENTRY | ||
| 224 | Read TOC entry | ||
| 225 | |||
| 226 | (struct cdrom_tocentry) | ||
| 227 | |||
| 228 | |||
| 229 | usage:: | ||
| 230 | |||
| 231 | struct cdrom_tocentry entry; | ||
| 232 | |||
| 233 | ioctl(fd, CDROMREADTOCENTRY, &entry); | ||
| 234 | |||
| 235 | inputs: | ||
| 236 | cdrom_tocentry structure | ||
| 237 | |||
| 238 | |||
| 239 | outputs: | ||
| 240 | cdrom_tocentry structure | ||
| 241 | |||
| 242 | |||
| 243 | error return: | ||
| 244 | - ENOSYS cd drive not audio-capable. | ||
| 245 | - EINVAL entry.cdte_format not CDROM_MSF or CDROM_LBA | ||
| 246 | - EINVAL requested track out of bounds | ||
| 247 | - EIO I/O error reading TOC | ||
| 248 | |||
| 249 | notes: | ||
| 250 | - TOC stands for Table Of Contents | ||
| 251 | - MSF stands for minutes-seconds-frames | ||
| 252 | - LBA stands for logical block address | ||
| 253 | |||
| 254 | |||
| 255 | |||
| 256 | CDROMSTOP | ||
| 257 | Stop the cdrom drive | ||
| 258 | |||
| 259 | |||
| 260 | usage:: | ||
| 261 | |||
| 262 | ioctl(fd, CDROMSTOP, 0); | ||
| 263 | |||
| 264 | |||
| 265 | inputs: | ||
| 266 | none | ||
| 267 | |||
| 268 | |||
| 269 | outputs: | ||
| 270 | none | ||
| 271 | |||
| 272 | |||
| 273 | error return: | ||
| 274 | - ENOSYS cd drive not audio-capable. | ||
| 275 | |||
| 276 | notes: | ||
| 277 | - Exact interpretation of this ioctl depends on the device, | ||
| 278 | but most seem to spin the drive down. | ||
| 279 | |||
| 280 | |||
| 281 | CDROMSTART | ||
| 282 | Start the cdrom drive | ||
| 283 | |||
| 284 | |||
| 285 | usage:: | ||
| 286 | |||
| 287 | ioctl(fd, CDROMSTART, 0); | ||
| 288 | |||
| 289 | |||
| 290 | inputs: | ||
| 291 | none | ||
| 292 | |||
| 293 | |||
| 294 | outputs: | ||
| 295 | none | ||
| 296 | |||
| 297 | |||
| 298 | error return: | ||
| 299 | - ENOSYS cd drive not audio-capable. | ||
| 300 | |||
| 301 | notes: | ||
| 302 | - Exact interpretation of this ioctl depends on the device, | ||
| 303 | but most seem to spin the drive up and/or close the tray. | ||
| 304 | Other devices ignore the ioctl completely. | ||
| 305 | |||
| 306 | |||
| 307 | CDROMEJECT | ||
| 308 | - Ejects the cdrom media | ||
| 309 | |||
| 310 | |||
| 311 | usage:: | ||
| 312 | |||
| 313 | ioctl(fd, CDROMEJECT, 0); | ||
| 314 | |||
| 315 | |||
| 316 | inputs: | ||
| 317 | none | ||
| 318 | |||
| 319 | |||
| 320 | outputs: | ||
| 321 | none | ||
| 322 | |||
| 323 | |||
| 324 | error returns: | ||
| 325 | - ENOSYS cd drive not capable of ejecting | ||
| 326 | - EBUSY other processes are accessing drive, or door is locked | ||
| 327 | |||
| 328 | notes: | ||
| 329 | - See CDROM_LOCKDOOR, below. | ||
| 330 | |||
| 331 | |||
| 332 | |||
| 333 | |||
| 334 | CDROMCLOSETRAY | ||
| 335 | pendant of CDROMEJECT | ||
| 336 | |||
| 337 | |||
| 338 | usage:: | ||
| 339 | |||
| 340 | ioctl(fd, CDROMCLOSETRAY, 0); | ||
| 341 | |||
| 342 | |||
| 343 | inputs: | ||
| 344 | none | ||
| 345 | |||
| 346 | |||
| 347 | outputs: | ||
| 348 | none | ||
| 349 | |||
| 350 | |||
| 351 | error returns: | ||
| 352 | - ENOSYS cd drive not capable of closing the tray | ||
| 353 | - EBUSY other processes are accessing drive, or door is locked | ||
| 354 | |||
| 355 | notes: | ||
| 356 | - See CDROM_LOCKDOOR, below. | ||
| 357 | |||
| 358 | |||
| 359 | |||
| 360 | |||
| 361 | CDROMVOLCTRL | ||
| 362 | Control output volume (struct cdrom_volctrl) | ||
| 363 | |||
| 364 | |||
| 365 | usage:: | ||
| 366 | |||
| 367 | struct cdrom_volctrl volume; | ||
| 368 | |||
| 369 | ioctl(fd, CDROMVOLCTRL, &volume); | ||
| 370 | |||
| 371 | inputs: | ||
| 372 | cdrom_volctrl structure containing volumes for up to 4 | ||
| 373 | channels. | ||
| 374 | |||
| 375 | outputs: | ||
| 376 | none | ||
| 377 | |||
| 378 | |||
| 379 | error return: | ||
| 380 | - ENOSYS cd drive not audio-capable. | ||
| 381 | |||
| 382 | |||
| 383 | |||
| 384 | CDROMVOLREAD | ||
| 385 | Get the drive's volume setting | ||
| 386 | |||
| 387 | (struct cdrom_volctrl) | ||
| 388 | |||
| 389 | |||
| 390 | usage:: | ||
| 391 | |||
| 392 | struct cdrom_volctrl volume; | ||
| 393 | |||
| 394 | ioctl(fd, CDROMVOLREAD, &volume); | ||
| 395 | |||
| 396 | inputs: | ||
| 397 | none | ||
| 398 | |||
| 399 | |||
| 400 | outputs: | ||
| 401 | The current volume settings. | ||
| 402 | |||
| 403 | |||
| 404 | error return: | ||
| 405 | - ENOSYS cd drive not audio-capable. | ||
| 406 | |||
| 407 | |||
| 408 | |||
| 409 | CDROMSUBCHNL | ||
| 410 | Read subchannel data | ||
| 411 | |||
| 412 | (struct cdrom_subchnl) | ||
| 413 | |||
| 414 | |||
| 415 | usage:: | ||
| 416 | |||
| 417 | struct cdrom_subchnl q; | ||
| 418 | |||
| 419 | ioctl(fd, CDROMSUBCHNL, &q); | ||
| 420 | |||
| 421 | inputs: | ||
| 422 | cdrom_subchnl structure | ||
| 423 | |||
| 424 | |||
| 425 | outputs: | ||
| 426 | cdrom_subchnl structure | ||
| 427 | |||
| 428 | |||
| 429 | error return: | ||
| 430 | - ENOSYS cd drive not audio-capable. | ||
| 431 | - EINVAL format not CDROM_MSF or CDROM_LBA | ||
| 432 | |||
| 433 | notes: | ||
| 434 | - Format is converted to CDROM_MSF or CDROM_LBA | ||
| 435 | as per user request on return | ||
| 436 | |||
| 437 | |||
| 438 | |||
| 439 | CDROMREADRAW | ||
| 440 | read data in raw mode (2352 Bytes) | ||
| 441 | |||
| 442 | (struct cdrom_read) | ||
| 443 | |||
| 444 | usage:: | ||
| 445 | |||
| 446 | union { | ||
| 447 | |||
| 448 | struct cdrom_msf msf; /* input */ | ||
| 449 | char buffer[CD_FRAMESIZE_RAW]; /* return */ | ||
| 450 | } arg; | ||
| 451 | ioctl(fd, CDROMREADRAW, &arg); | ||
| 452 | |||
| 453 | inputs: | ||
| 454 | cdrom_msf structure indicating an address to read. | ||
| 455 | |||
| 456 | Only the start values are significant. | ||
| 457 | |||
| 458 | outputs: | ||
| 459 | Data written to address provided by user. | ||
| 460 | |||
| 461 | |||
| 462 | error return: | ||
| 463 | - EINVAL address less than 0, or msf less than 0:2:0 | ||
| 464 | - ENOMEM out of memory | ||
| 465 | |||
| 466 | notes: | ||
| 467 | - As of 2.6.8.1, comments in <linux/cdrom.h> indicate that this | ||
| 468 | ioctl accepts a cdrom_read structure, but actual source code | ||
| 469 | reads a cdrom_msf structure and writes a buffer of data to | ||
| 470 | the same address. | ||
| 471 | |||
| 472 | - MSF values are converted to LBA values via this formula:: | ||
| 473 | |||
| 474 | lba = (((m * CD_SECS) + s) * CD_FRAMES + f) - CD_MSF_OFFSET; | ||
| 475 | |||
| 476 | |||
| 477 | |||
| 478 | |||
| 479 | CDROMREADMODE1 | ||
| 480 | Read CDROM mode 1 data (2048 Bytes) | ||
| 481 | |||
| 482 | (struct cdrom_read) | ||
| 483 | |||
| 484 | notes: | ||
| 485 | Identical to CDROMREADRAW except that block size is | ||
| 486 | CD_FRAMESIZE (2048) bytes | ||
| 487 | |||
| 488 | |||
| 489 | |||
| 490 | CDROMREADMODE2 | ||
| 491 | Read CDROM mode 2 data (2336 Bytes) | ||
| 492 | |||
| 493 | (struct cdrom_read) | ||
| 494 | |||
| 495 | notes: | ||
| 496 | Identical to CDROMREADRAW except that block size is | ||
| 497 | CD_FRAMESIZE_RAW0 (2336) bytes | ||
| 498 | |||
| 499 | |||
| 500 | |||
| 501 | CDROMREADAUDIO | ||
| 502 | (struct cdrom_read_audio) | ||
| 503 | |||
| 504 | usage:: | ||
| 505 | |||
| 506 | struct cdrom_read_audio ra; | ||
| 507 | |||
| 508 | ioctl(fd, CDROMREADAUDIO, &ra); | ||
| 509 | |||
| 510 | inputs: | ||
| 511 | cdrom_read_audio structure containing read start | ||
| 512 | point and length | ||
| 513 | |||
| 514 | outputs: | ||
| 515 | audio data, returned to buffer indicated by ra | ||
| 516 | |||
| 517 | |||
| 518 | error return: | ||
| 519 | - EINVAL format not CDROM_MSF or CDROM_LBA | ||
| 520 | - EINVAL nframes not in range [1 75] | ||
| 521 | - ENXIO drive has no queue (probably means invalid fd) | ||
| 522 | - ENOMEM out of memory | ||
| 523 | |||
| 524 | |||
| 525 | CDROMEJECT_SW | ||
| 526 | enable(1)/disable(0) auto-ejecting | ||
| 527 | |||
| 528 | |||
| 529 | usage:: | ||
| 530 | |||
| 531 | int val; | ||
| 532 | |||
| 533 | ioctl(fd, CDROMEJECT_SW, val); | ||
| 534 | |||
| 535 | inputs: | ||
| 536 | Flag specifying auto-eject flag. | ||
| 537 | |||
| 538 | |||
| 539 | outputs: | ||
| 540 | none | ||
| 541 | |||
| 542 | |||
| 543 | error return: | ||
| 544 | - ENOSYS Drive is not capable of ejecting. | ||
| 545 | - EBUSY Door is locked | ||
| 546 | |||
| 547 | |||
| 548 | |||
| 549 | |||
| 550 | CDROMMULTISESSION | ||
| 551 | Obtain the start-of-last-session address of multi session disks | ||
| 552 | |||
| 553 | (struct cdrom_multisession) | ||
| 554 | |||
| 555 | usage:: | ||
| 556 | |||
| 557 | struct cdrom_multisession ms_info; | ||
| 558 | |||
| 559 | ioctl(fd, CDROMMULTISESSION, &ms_info); | ||
| 560 | |||
| 561 | inputs: | ||
| 562 | cdrom_multisession structure containing desired | ||
| 563 | |||
| 564 | format. | ||
| 565 | |||
| 566 | outputs: | ||
| 567 | cdrom_multisession structure is filled with last_session | ||
| 568 | information. | ||
| 569 | |||
| 570 | error return: | ||
| 571 | - EINVAL format not CDROM_MSF or CDROM_LBA | ||
| 572 | |||
| 573 | |||
| 574 | CDROM_GET_MCN | ||
| 575 | Obtain the "Universal Product Code" | ||
| 576 | if available | ||
| 577 | |||
| 578 | (struct cdrom_mcn) | ||
| 579 | |||
| 580 | |||
| 581 | usage:: | ||
| 582 | |||
| 583 | struct cdrom_mcn mcn; | ||
| 584 | |||
| 585 | ioctl(fd, CDROM_GET_MCN, &mcn); | ||
| 586 | |||
| 587 | inputs: | ||
| 588 | none | ||
| 589 | |||
| 590 | |||
| 591 | outputs: | ||
| 592 | Universal Product Code | ||
| 593 | |||
| 594 | |||
| 595 | error return: | ||
| 596 | - ENOSYS Drive is not capable of reading MCN data. | ||
| 597 | |||
| 598 | notes: | ||
| 599 | - Source code comments state:: | ||
| 600 | |||
| 601 | The following function is implemented, although very few | ||
| 602 | audio discs give Universal Product Code information, which | ||
| 603 | should just be the Medium Catalog Number on the box. Note, | ||
| 604 | that the way the code is written on the CD is /not/ uniform | ||
| 605 | across all discs! | ||
| 606 | |||
| 607 | |||
| 608 | |||
| 609 | |||
| 610 | CDROM_GET_UPC | ||
| 611 | CDROM_GET_MCN (deprecated) | ||
| 612 | |||
| 613 | |||
| 614 | Not implemented, as of 2.6.8.1 | ||
| 615 | |||
| 616 | |||
| 617 | |||
| 618 | CDROMRESET | ||
| 619 | hard-reset the drive | ||
| 620 | |||
| 621 | |||
| 622 | usage:: | ||
| 623 | |||
| 624 | ioctl(fd, CDROMRESET, 0); | ||
| 625 | |||
| 626 | |||
| 627 | inputs: | ||
| 628 | none | ||
| 629 | |||
| 630 | |||
| 631 | outputs: | ||
| 632 | none | ||
| 633 | |||
| 634 | |||
| 635 | error return: | ||
| 636 | - EACCES Access denied: requires CAP_SYS_ADMIN | ||
| 637 | - ENOSYS Drive is not capable of resetting. | ||
| 638 | |||
| 639 | |||
| 640 | |||
| 641 | |||
| 642 | CDROMREADCOOKED | ||
| 643 | read data in cooked mode | ||
| 644 | |||
| 645 | |||
| 646 | usage:: | ||
| 647 | |||
| 648 | u8 buffer[CD_FRAMESIZE] | ||
| 649 | |||
| 650 | ioctl(fd, CDROMREADCOOKED, buffer); | ||
| 651 | |||
| 652 | inputs: | ||
| 653 | none | ||
| 654 | |||
| 655 | |||
| 656 | outputs: | ||
| 657 | 2048 bytes of data, "cooked" mode. | ||
| 658 | |||
| 659 | |||
| 660 | notes: | ||
| 661 | Not implemented on all drives. | ||
| 662 | |||
| 663 | |||
| 664 | |||
| 665 | |||
| 666 | |||
| 667 | CDROMREADALL | ||
| 668 | read all 2646 bytes | ||
| 669 | |||
| 670 | |||
| 671 | Same as CDROMREADCOOKED, but reads 2646 bytes. | ||
| 672 | |||
| 673 | |||
| 674 | |||
| 675 | CDROMSEEK | ||
| 676 | seek msf address | ||
| 677 | |||
| 678 | |||
| 679 | usage:: | ||
| 680 | |||
| 681 | struct cdrom_msf msf; | ||
| 682 | |||
| 683 | ioctl(fd, CDROMSEEK, &msf); | ||
| 684 | |||
| 685 | inputs: | ||
| 686 | MSF address to seek to. | ||
| 687 | |||
| 688 | |||
| 689 | outputs: | ||
| 690 | none | ||
| 691 | |||
| 692 | |||
| 693 | |||
| 694 | |||
| 695 | CDROMPLAYBLK | ||
| 696 | scsi-cd only | ||
| 697 | |||
| 698 | (struct cdrom_blk) | ||
| 699 | |||
| 700 | |||
| 701 | usage:: | ||
| 702 | |||
| 703 | struct cdrom_blk blk; | ||
| 704 | |||
| 705 | ioctl(fd, CDROMPLAYBLK, &blk); | ||
| 706 | |||
| 707 | inputs: | ||
| 708 | Region to play | ||
| 709 | |||
| 710 | |||
| 711 | outputs: | ||
| 712 | none | ||
| 713 | |||
| 714 | |||
| 715 | |||
| 716 | |||
| 717 | CDROMGETSPINDOWN | ||
| 718 | usage:: | ||
| 719 | |||
| 720 | char spindown; | ||
| 721 | |||
| 722 | ioctl(fd, CDROMGETSPINDOWN, &spindown); | ||
| 723 | |||
| 724 | inputs: | ||
| 725 | none | ||
| 726 | |||
| 727 | |||
| 728 | outputs: | ||
| 729 | The value of the current 4-bit spindown value. | ||
| 730 | |||
| 731 | |||
| 732 | |||
| 733 | |||
| 734 | |||
| 735 | CDROMSETSPINDOWN | ||
| 736 | usage:: | ||
| 737 | |||
| 738 | char spindown | ||
| 739 | |||
| 740 | ioctl(fd, CDROMSETSPINDOWN, &spindown); | ||
| 741 | |||
| 742 | inputs: | ||
| 743 | 4-bit value used to control spindown (TODO: more detail here) | ||
| 744 | |||
| 745 | |||
| 746 | outputs: | ||
| 747 | none | ||
| 748 | |||
| 749 | |||
| 750 | |||
| 751 | |||
| 752 | |||
| 753 | |||
| 754 | CDROM_SET_OPTIONS | ||
| 755 | Set behavior options | ||
| 756 | |||
| 757 | |||
| 758 | usage:: | ||
| 759 | |||
| 760 | int options; | ||
| 761 | |||
| 762 | ioctl(fd, CDROM_SET_OPTIONS, options); | ||
| 763 | |||
| 764 | inputs: | ||
| 765 | New values for drive options. The logical 'or' of: | ||
| 766 | |||
| 767 | ============== ================================== | ||
| 768 | CDO_AUTO_CLOSE close tray on first open(2) | ||
| 769 | CDO_AUTO_EJECT open tray on last release | ||
| 770 | CDO_USE_FFLAGS use O_NONBLOCK information on open | ||
| 771 | CDO_LOCK lock tray on open files | ||
| 772 | CDO_CHECK_TYPE check type on open for data | ||
| 773 | ============== ================================== | ||
| 774 | |||
| 775 | outputs: | ||
| 776 | Returns the resulting options settings in the | ||
| 777 | ioctl return value. Returns -1 on error. | ||
| 778 | |||
| 779 | error return: | ||
| 780 | - ENOSYS selected option(s) not supported by drive. | ||
| 781 | |||
| 782 | |||
| 783 | |||
| 784 | |||
| 785 | CDROM_CLEAR_OPTIONS | ||
| 786 | Clear behavior options | ||
| 787 | |||
| 788 | |||
| 789 | Same as CDROM_SET_OPTIONS, except that selected options are | ||
| 790 | turned off. | ||
| 791 | |||
| 792 | |||
| 793 | |||
| 794 | CDROM_SELECT_SPEED | ||
| 795 | Set the CD-ROM speed | ||
| 796 | |||
| 797 | |||
| 798 | usage:: | ||
| 799 | |||
| 800 | int speed; | ||
| 801 | |||
| 802 | ioctl(fd, CDROM_SELECT_SPEED, speed); | ||
| 803 | |||
| 804 | inputs: | ||
| 805 | New drive speed. | ||
| 806 | |||
| 807 | |||
| 808 | outputs: | ||
| 809 | none | ||
| 810 | |||
| 811 | |||
| 812 | error return: | ||
| 813 | - ENOSYS speed selection not supported by drive. | ||
| 814 | |||
| 815 | |||
| 816 | |||
| 817 | CDROM_SELECT_DISC | ||
| 818 | Select disc (for juke-boxes) | ||
| 819 | |||
| 820 | |||
| 821 | usage:: | ||
| 822 | |||
| 823 | int disk; | ||
| 824 | |||
| 825 | ioctl(fd, CDROM_SELECT_DISC, disk); | ||
| 826 | |||
| 827 | inputs: | ||
| 828 | Disk to load into drive. | ||
| 829 | |||
| 830 | |||
| 831 | outputs: | ||
| 832 | none | ||
| 833 | |||
| 834 | |||
| 835 | error return: | ||
| 836 | - EINVAL Disk number beyond capacity of drive | ||
| 837 | |||
| 838 | |||
| 839 | |||
| 840 | CDROM_MEDIA_CHANGED | ||
| 841 | Check is media changed | ||
| 842 | |||
| 843 | |||
| 844 | usage:: | ||
| 845 | |||
| 846 | int slot; | ||
| 847 | |||
| 848 | ioctl(fd, CDROM_MEDIA_CHANGED, slot); | ||
| 849 | |||
| 850 | inputs: | ||
| 851 | Slot number to be tested, always zero except for jukeboxes. | ||
| 852 | |||
| 853 | May also be special values CDSL_NONE or CDSL_CURRENT | ||
| 854 | |||
| 855 | outputs: | ||
| 856 | Ioctl return value is 0 or 1 depending on whether the media | ||
| 857 | |||
| 858 | has been changed, or -1 on error. | ||
| 859 | |||
| 860 | error returns: | ||
| 861 | - ENOSYS Drive can't detect media change | ||
| 862 | - EINVAL Slot number beyond capacity of drive | ||
| 863 | - ENOMEM Out of memory | ||
| 864 | |||
| 865 | |||
| 866 | |||
| 867 | CDROM_DRIVE_STATUS | ||
| 868 | Get tray position, etc. | ||
| 869 | |||
| 870 | |||
| 871 | usage:: | ||
| 872 | |||
| 873 | int slot; | ||
| 874 | |||
| 875 | ioctl(fd, CDROM_DRIVE_STATUS, slot); | ||
| 876 | |||
| 877 | inputs: | ||
| 878 | Slot number to be tested, always zero except for jukeboxes. | ||
| 879 | |||
| 880 | May also be special values CDSL_NONE or CDSL_CURRENT | ||
| 881 | |||
| 882 | outputs: | ||
| 883 | Ioctl return value will be one of the following values | ||
| 884 | |||
| 885 | from <linux/cdrom.h>: | ||
| 886 | |||
| 887 | =================== ========================== | ||
| 888 | CDS_NO_INFO Information not available. | ||
| 889 | CDS_NO_DISC | ||
| 890 | CDS_TRAY_OPEN | ||
| 891 | CDS_DRIVE_NOT_READY | ||
| 892 | CDS_DISC_OK | ||
| 893 | -1 error | ||
| 894 | =================== ========================== | ||
| 895 | |||
| 896 | error returns: | ||
| 897 | - ENOSYS Drive can't detect drive status | ||
| 898 | - EINVAL Slot number beyond capacity of drive | ||
| 899 | - ENOMEM Out of memory | ||
| 900 | |||
| 901 | |||
| 902 | |||
| 903 | |||
| 904 | CDROM_DISC_STATUS | ||
| 905 | Get disc type, etc. | ||
| 906 | |||
| 907 | |||
| 908 | usage:: | ||
| 909 | |||
| 910 | ioctl(fd, CDROM_DISC_STATUS, 0); | ||
| 911 | |||
| 912 | |||
| 913 | inputs: | ||
| 914 | none | ||
| 915 | |||
| 916 | |||
| 917 | outputs: | ||
| 918 | Ioctl return value will be one of the following values | ||
| 919 | |||
| 920 | from <linux/cdrom.h>: | ||
| 921 | |||
| 922 | - CDS_NO_INFO | ||
| 923 | - CDS_AUDIO | ||
| 924 | - CDS_MIXED | ||
| 925 | - CDS_XA_2_2 | ||
| 926 | - CDS_XA_2_1 | ||
| 927 | - CDS_DATA_1 | ||
| 928 | |||
| 929 | error returns: | ||
| 930 | none at present | ||
| 931 | |||
| 932 | notes: | ||
| 933 | - Source code comments state:: | ||
| 934 | |||
| 935 | |||
| 936 | Ok, this is where problems start. The current interface for | ||
| 937 | the CDROM_DISC_STATUS ioctl is flawed. It makes the false | ||
| 938 | assumption that CDs are all CDS_DATA_1 or all CDS_AUDIO, etc. | ||
| 939 | Unfortunately, while this is often the case, it is also | ||
| 940 | very common for CDs to have some tracks with data, and some | ||
| 941 | tracks with audio. Just because I feel like it, I declare | ||
| 942 | the following to be the best way to cope. If the CD has | ||
| 943 | ANY data tracks on it, it will be returned as a data CD. | ||
| 944 | If it has any XA tracks, I will return it as that. Now I | ||
| 945 | could simplify this interface by combining these returns with | ||
| 946 | the above, but this more clearly demonstrates the problem | ||
| 947 | with the current interface. Too bad this wasn't designed | ||
| 948 | to use bitmasks... -Erik | ||
| 949 | |||
| 950 | Well, now we have the option CDS_MIXED: a mixed-type CD. | ||
| 951 | User level programmers might feel the ioctl is not very | ||
| 952 | useful. | ||
| 953 | ---david | ||
| 954 | |||
| 955 | |||
| 956 | |||
| 957 | |||
| 958 | CDROM_CHANGER_NSLOTS | ||
| 959 | Get number of slots | ||
| 960 | |||
| 961 | |||
| 962 | usage:: | ||
| 963 | |||
| 964 | ioctl(fd, CDROM_CHANGER_NSLOTS, 0); | ||
| 965 | |||
| 966 | |||
| 967 | inputs: | ||
| 968 | none | ||
| 969 | |||
| 970 | |||
| 971 | outputs: | ||
| 972 | The ioctl return value will be the number of slots in a | ||
| 973 | CD changer. Typically 1 for non-multi-disk devices. | ||
| 974 | |||
| 975 | error returns: | ||
| 976 | none | ||
| 977 | |||
| 978 | |||
| 979 | |||
| 980 | CDROM_LOCKDOOR | ||
| 981 | lock or unlock door | ||
| 982 | |||
| 983 | |||
| 984 | usage:: | ||
| 985 | |||
| 986 | int lock; | ||
| 987 | |||
| 988 | ioctl(fd, CDROM_LOCKDOOR, lock); | ||
| 989 | |||
| 990 | inputs: | ||
| 991 | Door lock flag, 1=lock, 0=unlock | ||
| 992 | |||
| 993 | |||
| 994 | outputs: | ||
| 995 | none | ||
| 996 | |||
| 997 | |||
| 998 | error returns: | ||
| 999 | - EDRIVE_CANT_DO_THIS | ||
| 1000 | |||
| 1001 | Door lock function not supported. | ||
| 1002 | - EBUSY | ||
| 1003 | |||
| 1004 | Attempt to unlock when multiple users | ||
| 1005 | have the drive open and not CAP_SYS_ADMIN | ||
| 1006 | |||
| 1007 | notes: | ||
| 1008 | As of 2.6.8.1, the lock flag is a global lock, meaning that | ||
| 1009 | all CD drives will be locked or unlocked together. This is | ||
| 1010 | probably a bug. | ||
| 1011 | |||
| 1012 | The EDRIVE_CANT_DO_THIS value is defined in <linux/cdrom.h> | ||
| 1013 | and is currently (2.6.8.1) the same as EOPNOTSUPP | ||
| 1014 | |||
| 1015 | |||
| 1016 | |||
| 1017 | CDROM_DEBUG | ||
| 1018 | Turn debug messages on/off | ||
| 1019 | |||
| 1020 | |||
| 1021 | usage:: | ||
| 1022 | |||
| 1023 | int debug; | ||
| 1024 | |||
| 1025 | ioctl(fd, CDROM_DEBUG, debug); | ||
| 1026 | |||
| 1027 | inputs: | ||
| 1028 | Cdrom debug flag, 0=disable, 1=enable | ||
| 1029 | |||
| 1030 | |||
| 1031 | outputs: | ||
| 1032 | The ioctl return value will be the new debug flag. | ||
| 1033 | |||
| 1034 | |||
| 1035 | error return: | ||
| 1036 | - EACCES Access denied: requires CAP_SYS_ADMIN | ||
| 1037 | |||
| 1038 | |||
| 1039 | |||
| 1040 | CDROM_GET_CAPABILITY | ||
| 1041 | get capabilities | ||
| 1042 | |||
| 1043 | |||
| 1044 | usage:: | ||
| 1045 | |||
| 1046 | ioctl(fd, CDROM_GET_CAPABILITY, 0); | ||
| 1047 | |||
| 1048 | |||
| 1049 | inputs: | ||
| 1050 | none | ||
| 1051 | |||
| 1052 | |||
| 1053 | outputs: | ||
| 1054 | The ioctl return value is the current device capability | ||
| 1055 | flags. See CDC_CLOSE_TRAY, CDC_OPEN_TRAY, etc. | ||
| 1056 | |||
| 1057 | |||
| 1058 | |||
| 1059 | CDROMAUDIOBUFSIZ | ||
| 1060 | set the audio buffer size | ||
| 1061 | |||
| 1062 | |||
| 1063 | usage:: | ||
| 1064 | |||
| 1065 | int arg; | ||
| 1066 | |||
| 1067 | ioctl(fd, CDROMAUDIOBUFSIZ, val); | ||
| 1068 | |||
| 1069 | inputs: | ||
| 1070 | New audio buffer size | ||
| 1071 | |||
| 1072 | |||
| 1073 | outputs: | ||
| 1074 | The ioctl return value is the new audio buffer size, or -1 | ||
| 1075 | on error. | ||
| 1076 | |||
| 1077 | error return: | ||
| 1078 | - ENOSYS Not supported by this driver. | ||
| 1079 | |||
| 1080 | notes: | ||
| 1081 | Not supported by all drivers. | ||
| 1082 | |||
| 1083 | |||
| 1084 | |||
| 1085 | |||
| 1086 | DVD_READ_STRUCT Read structure | ||
| 1087 | |||
| 1088 | usage:: | ||
| 1089 | |||
| 1090 | dvd_struct s; | ||
| 1091 | |||
| 1092 | ioctl(fd, DVD_READ_STRUCT, &s); | ||
| 1093 | |||
| 1094 | inputs: | ||
| 1095 | dvd_struct structure, containing: | ||
| 1096 | |||
| 1097 | =================== ========================================== | ||
| 1098 | type specifies the information desired, one of | ||
| 1099 | DVD_STRUCT_PHYSICAL, DVD_STRUCT_COPYRIGHT, | ||
| 1100 | DVD_STRUCT_DISCKEY, DVD_STRUCT_BCA, | ||
| 1101 | DVD_STRUCT_MANUFACT | ||
| 1102 | physical.layer_num desired layer, indexed from 0 | ||
| 1103 | copyright.layer_num desired layer, indexed from 0 | ||
| 1104 | disckey.agid | ||
| 1105 | =================== ========================================== | ||
| 1106 | |||
| 1107 | outputs: | ||
| 1108 | dvd_struct structure, containing: | ||
| 1109 | |||
| 1110 | =================== ================================ | ||
| 1111 | physical for type == DVD_STRUCT_PHYSICAL | ||
| 1112 | copyright for type == DVD_STRUCT_COPYRIGHT | ||
| 1113 | disckey.value for type == DVD_STRUCT_DISCKEY | ||
| 1114 | bca.{len,value} for type == DVD_STRUCT_BCA | ||
| 1115 | manufact.{len,valu} for type == DVD_STRUCT_MANUFACT | ||
| 1116 | =================== ================================ | ||
| 1117 | |||
| 1118 | error returns: | ||
| 1119 | - EINVAL physical.layer_num exceeds number of layers | ||
| 1120 | - EIO Received invalid response from drive | ||
| 1121 | |||
| 1122 | |||
| 1123 | |||
| 1124 | DVD_WRITE_STRUCT Write structure | ||
| 1125 | |||
| 1126 | Not implemented, as of 2.6.8.1 | ||
| 1127 | |||
| 1128 | |||
| 1129 | |||
| 1130 | DVD_AUTH Authentication | ||
| 1131 | |||
| 1132 | usage:: | ||
| 1133 | |||
| 1134 | dvd_authinfo ai; | ||
| 1135 | |||
| 1136 | ioctl(fd, DVD_AUTH, &ai); | ||
| 1137 | |||
| 1138 | inputs: | ||
| 1139 | dvd_authinfo structure. See <linux/cdrom.h> | ||
| 1140 | |||
| 1141 | |||
| 1142 | outputs: | ||
| 1143 | dvd_authinfo structure. | ||
| 1144 | |||
| 1145 | |||
| 1146 | error return: | ||
| 1147 | - ENOTTY ai.type not recognized. | ||
| 1148 | |||
| 1149 | |||
| 1150 | |||
| 1151 | CDROM_SEND_PACKET | ||
| 1152 | send a packet to the drive | ||
| 1153 | |||
| 1154 | |||
| 1155 | usage:: | ||
| 1156 | |||
| 1157 | struct cdrom_generic_command cgc; | ||
| 1158 | |||
| 1159 | ioctl(fd, CDROM_SEND_PACKET, &cgc); | ||
| 1160 | |||
| 1161 | inputs: | ||
| 1162 | cdrom_generic_command structure containing the packet to send. | ||
| 1163 | |||
| 1164 | |||
| 1165 | outputs: | ||
| 1166 | none | ||
| 1167 | |||
| 1168 | cdrom_generic_command structure containing results. | ||
| 1169 | |||
| 1170 | error return: | ||
| 1171 | - EIO | ||
| 1172 | |||
| 1173 | command failed. | ||
| 1174 | - EPERM | ||
| 1175 | |||
| 1176 | Operation not permitted, either because a | ||
| 1177 | write command was attempted on a drive which | ||
| 1178 | is opened read-only, or because the command | ||
| 1179 | requires CAP_SYS_RAWIO | ||
| 1180 | - EINVAL | ||
| 1181 | |||
| 1182 | cgc.data_direction not set | ||
| 1183 | |||
| 1184 | |||
| 1185 | |||
| 1186 | CDROM_NEXT_WRITABLE | ||
| 1187 | get next writable block | ||
| 1188 | |||
| 1189 | |||
| 1190 | usage:: | ||
| 1191 | |||
| 1192 | long next; | ||
| 1193 | |||
| 1194 | ioctl(fd, CDROM_NEXT_WRITABLE, &next); | ||
| 1195 | |||
| 1196 | inputs: | ||
| 1197 | none | ||
| 1198 | |||
| 1199 | |||
| 1200 | outputs: | ||
| 1201 | The next writable block. | ||
| 1202 | |||
| 1203 | |||
| 1204 | notes: | ||
| 1205 | If the device does not support this ioctl directly, the | ||
| 1206 | |||
| 1207 | ioctl will return CDROM_LAST_WRITTEN + 7. | ||
| 1208 | |||
| 1209 | |||
| 1210 | |||
| 1211 | CDROM_LAST_WRITTEN | ||
| 1212 | get last block written on disc | ||
| 1213 | |||
| 1214 | |||
| 1215 | usage:: | ||
| 1216 | |||
| 1217 | long last; | ||
| 1218 | |||
| 1219 | ioctl(fd, CDROM_LAST_WRITTEN, &last); | ||
| 1220 | |||
| 1221 | inputs: | ||
| 1222 | none | ||
| 1223 | |||
| 1224 | |||
| 1225 | outputs: | ||
| 1226 | The last block written on disc | ||
| 1227 | |||
| 1228 | |||
| 1229 | notes: | ||
| 1230 | If the device does not support this ioctl directly, the | ||
| 1231 | result is derived from the disc's table of contents. If the | ||
| 1232 | table of contents can't be read, this ioctl returns an | ||
| 1233 | error. | ||
diff --git a/Documentation/ioctl/cdrom.txt b/Documentation/ioctl/cdrom.txt deleted file mode 100644 index a4d62a9d6771..000000000000 --- a/Documentation/ioctl/cdrom.txt +++ /dev/null | |||
| @@ -1,967 +0,0 @@ | |||
| 1 | Summary of CDROM ioctl calls. | ||
| 2 | ============================ | ||
| 3 | |||
| 4 | Edward A. Falk <efalk@google.com> | ||
| 5 | |||
| 6 | November, 2004 | ||
| 7 | |||
| 8 | This document attempts to describe the ioctl(2) calls supported by | ||
| 9 | the CDROM layer. These are by-and-large implemented (as of Linux 2.6) | ||
| 10 | in drivers/cdrom/cdrom.c and drivers/block/scsi_ioctl.c | ||
| 11 | |||
| 12 | ioctl values are listed in <linux/cdrom.h>. As of this writing, they | ||
| 13 | are as follows: | ||
| 14 | |||
| 15 | CDROMPAUSE Pause Audio Operation | ||
| 16 | CDROMRESUME Resume paused Audio Operation | ||
| 17 | CDROMPLAYMSF Play Audio MSF (struct cdrom_msf) | ||
| 18 | CDROMPLAYTRKIND Play Audio Track/index (struct cdrom_ti) | ||
| 19 | CDROMREADTOCHDR Read TOC header (struct cdrom_tochdr) | ||
| 20 | CDROMREADTOCENTRY Read TOC entry (struct cdrom_tocentry) | ||
| 21 | CDROMSTOP Stop the cdrom drive | ||
| 22 | CDROMSTART Start the cdrom drive | ||
| 23 | CDROMEJECT Ejects the cdrom media | ||
| 24 | CDROMVOLCTRL Control output volume (struct cdrom_volctrl) | ||
| 25 | CDROMSUBCHNL Read subchannel data (struct cdrom_subchnl) | ||
| 26 | CDROMREADMODE2 Read CDROM mode 2 data (2336 Bytes) | ||
| 27 | (struct cdrom_read) | ||
| 28 | CDROMREADMODE1 Read CDROM mode 1 data (2048 Bytes) | ||
| 29 | (struct cdrom_read) | ||
| 30 | CDROMREADAUDIO (struct cdrom_read_audio) | ||
| 31 | CDROMEJECT_SW enable(1)/disable(0) auto-ejecting | ||
| 32 | CDROMMULTISESSION Obtain the start-of-last-session | ||
| 33 | address of multi session disks | ||
| 34 | (struct cdrom_multisession) | ||
| 35 | CDROM_GET_MCN Obtain the "Universal Product Code" | ||
| 36 | if available (struct cdrom_mcn) | ||
| 37 | CDROM_GET_UPC Deprecated, use CDROM_GET_MCN instead. | ||
| 38 | CDROMRESET hard-reset the drive | ||
| 39 | CDROMVOLREAD Get the drive's volume setting | ||
| 40 | (struct cdrom_volctrl) | ||
| 41 | CDROMREADRAW read data in raw mode (2352 Bytes) | ||
| 42 | (struct cdrom_read) | ||
| 43 | CDROMREADCOOKED read data in cooked mode | ||
| 44 | CDROMSEEK seek msf address | ||
| 45 | CDROMPLAYBLK scsi-cd only, (struct cdrom_blk) | ||
| 46 | CDROMREADALL read all 2646 bytes | ||
| 47 | CDROMGETSPINDOWN return 4-bit spindown value | ||
| 48 | CDROMSETSPINDOWN set 4-bit spindown value | ||
| 49 | CDROMCLOSETRAY pendant of CDROMEJECT | ||
| 50 | CDROM_SET_OPTIONS Set behavior options | ||
| 51 | CDROM_CLEAR_OPTIONS Clear behavior options | ||
| 52 | CDROM_SELECT_SPEED Set the CD-ROM speed | ||
| 53 | CDROM_SELECT_DISC Select disc (for juke-boxes) | ||
| 54 | CDROM_MEDIA_CHANGED Check is media changed | ||
| 55 | CDROM_DRIVE_STATUS Get tray position, etc. | ||
| 56 | CDROM_DISC_STATUS Get disc type, etc. | ||
| 57 | CDROM_CHANGER_NSLOTS Get number of slots | ||
| 58 | CDROM_LOCKDOOR lock or unlock door | ||
| 59 | CDROM_DEBUG Turn debug messages on/off | ||
| 60 | CDROM_GET_CAPABILITY get capabilities | ||
| 61 | CDROMAUDIOBUFSIZ set the audio buffer size | ||
| 62 | DVD_READ_STRUCT Read structure | ||
| 63 | DVD_WRITE_STRUCT Write structure | ||
| 64 | DVD_AUTH Authentication | ||
| 65 | CDROM_SEND_PACKET send a packet to the drive | ||
| 66 | CDROM_NEXT_WRITABLE get next writable block | ||
| 67 | CDROM_LAST_WRITTEN get last block written on disc | ||
| 68 | |||
| 69 | |||
| 70 | The information that follows was determined from reading kernel source | ||
| 71 | code. It is likely that some corrections will be made over time. | ||
| 72 | |||
| 73 | |||
| 74 | |||
| 75 | |||
| 76 | |||
| 77 | |||
| 78 | |||
| 79 | General: | ||
| 80 | |||
| 81 | Unless otherwise specified, all ioctl calls return 0 on success | ||
| 82 | and -1 with errno set to an appropriate value on error. (Some | ||
| 83 | ioctls return non-negative data values.) | ||
| 84 | |||
| 85 | Unless otherwise specified, all ioctl calls return -1 and set | ||
| 86 | errno to EFAULT on a failed attempt to copy data to or from user | ||
| 87 | address space. | ||
| 88 | |||
| 89 | Individual drivers may return error codes not listed here. | ||
| 90 | |||
| 91 | Unless otherwise specified, all data structures and constants | ||
| 92 | are defined in <linux/cdrom.h> | ||
| 93 | |||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | CDROMPAUSE Pause Audio Operation | ||
| 98 | |||
| 99 | usage: | ||
| 100 | |||
| 101 | ioctl(fd, CDROMPAUSE, 0); | ||
| 102 | |||
| 103 | inputs: none | ||
| 104 | |||
| 105 | outputs: none | ||
| 106 | |||
| 107 | error return: | ||
| 108 | ENOSYS cd drive not audio-capable. | ||
| 109 | |||
| 110 | |||
| 111 | CDROMRESUME Resume paused Audio Operation | ||
| 112 | |||
| 113 | usage: | ||
| 114 | |||
| 115 | ioctl(fd, CDROMRESUME, 0); | ||
| 116 | |||
| 117 | inputs: none | ||
| 118 | |||
| 119 | outputs: none | ||
| 120 | |||
| 121 | error return: | ||
| 122 | ENOSYS cd drive not audio-capable. | ||
| 123 | |||
| 124 | |||
| 125 | CDROMPLAYMSF Play Audio MSF (struct cdrom_msf) | ||
| 126 | |||
| 127 | usage: | ||
| 128 | |||
| 129 | struct cdrom_msf msf; | ||
| 130 | ioctl(fd, CDROMPLAYMSF, &msf); | ||
| 131 | |||
| 132 | inputs: | ||
| 133 | cdrom_msf structure, describing a segment of music to play | ||
| 134 | |||
| 135 | outputs: none | ||
| 136 | |||
| 137 | error return: | ||
| 138 | ENOSYS cd drive not audio-capable. | ||
| 139 | |||
| 140 | notes: | ||
| 141 | MSF stands for minutes-seconds-frames | ||
| 142 | LBA stands for logical block address | ||
| 143 | |||
| 144 | Segment is described as start and end times, where each time | ||
| 145 | is described as minutes:seconds:frames. A frame is 1/75 of | ||
| 146 | a second. | ||
| 147 | |||
| 148 | |||
| 149 | CDROMPLAYTRKIND Play Audio Track/index (struct cdrom_ti) | ||
| 150 | |||
| 151 | usage: | ||
| 152 | |||
| 153 | struct cdrom_ti ti; | ||
| 154 | ioctl(fd, CDROMPLAYTRKIND, &ti); | ||
| 155 | |||
| 156 | inputs: | ||
| 157 | cdrom_ti structure, describing a segment of music to play | ||
| 158 | |||
| 159 | outputs: none | ||
| 160 | |||
| 161 | error return: | ||
| 162 | ENOSYS cd drive not audio-capable. | ||
| 163 | |||
| 164 | notes: | ||
| 165 | Segment is described as start and end times, where each time | ||
| 166 | is described as a track and an index. | ||
| 167 | |||
| 168 | |||
| 169 | |||
| 170 | CDROMREADTOCHDR Read TOC header (struct cdrom_tochdr) | ||
| 171 | |||
| 172 | usage: | ||
| 173 | |||
| 174 | cdrom_tochdr header; | ||
| 175 | ioctl(fd, CDROMREADTOCHDR, &header); | ||
| 176 | |||
| 177 | inputs: | ||
| 178 | cdrom_tochdr structure | ||
| 179 | |||
| 180 | outputs: | ||
| 181 | cdrom_tochdr structure | ||
| 182 | |||
| 183 | error return: | ||
| 184 | ENOSYS cd drive not audio-capable. | ||
| 185 | |||
| 186 | |||
| 187 | |||
| 188 | CDROMREADTOCENTRY Read TOC entry (struct cdrom_tocentry) | ||
| 189 | |||
| 190 | usage: | ||
| 191 | |||
| 192 | struct cdrom_tocentry entry; | ||
| 193 | ioctl(fd, CDROMREADTOCENTRY, &entry); | ||
| 194 | |||
| 195 | inputs: | ||
| 196 | cdrom_tocentry structure | ||
| 197 | |||
| 198 | outputs: | ||
| 199 | cdrom_tocentry structure | ||
| 200 | |||
| 201 | error return: | ||
| 202 | ENOSYS cd drive not audio-capable. | ||
| 203 | EINVAL entry.cdte_format not CDROM_MSF or CDROM_LBA | ||
| 204 | EINVAL requested track out of bounds | ||
| 205 | EIO I/O error reading TOC | ||
| 206 | |||
| 207 | notes: | ||
| 208 | TOC stands for Table Of Contents | ||
| 209 | MSF stands for minutes-seconds-frames | ||
| 210 | LBA stands for logical block address | ||
| 211 | |||
| 212 | |||
| 213 | |||
| 214 | CDROMSTOP Stop the cdrom drive | ||
| 215 | |||
| 216 | usage: | ||
| 217 | |||
| 218 | ioctl(fd, CDROMSTOP, 0); | ||
| 219 | |||
| 220 | inputs: none | ||
| 221 | |||
| 222 | outputs: none | ||
| 223 | |||
| 224 | error return: | ||
| 225 | ENOSYS cd drive not audio-capable. | ||
| 226 | |||
| 227 | notes: | ||
| 228 | Exact interpretation of this ioctl depends on the device, | ||
| 229 | but most seem to spin the drive down. | ||
| 230 | |||
| 231 | |||
| 232 | CDROMSTART Start the cdrom drive | ||
| 233 | |||
| 234 | usage: | ||
| 235 | |||
| 236 | ioctl(fd, CDROMSTART, 0); | ||
| 237 | |||
| 238 | inputs: none | ||
| 239 | |||
| 240 | outputs: none | ||
| 241 | |||
| 242 | error return: | ||
| 243 | ENOSYS cd drive not audio-capable. | ||
| 244 | |||
| 245 | notes: | ||
| 246 | Exact interpretation of this ioctl depends on the device, | ||
| 247 | but most seem to spin the drive up and/or close the tray. | ||
| 248 | Other devices ignore the ioctl completely. | ||
| 249 | |||
| 250 | |||
| 251 | CDROMEJECT Ejects the cdrom media | ||
| 252 | |||
| 253 | usage: | ||
| 254 | |||
| 255 | ioctl(fd, CDROMEJECT, 0); | ||
| 256 | |||
| 257 | inputs: none | ||
| 258 | |||
| 259 | outputs: none | ||
| 260 | |||
| 261 | error returns: | ||
| 262 | ENOSYS cd drive not capable of ejecting | ||
| 263 | EBUSY other processes are accessing drive, or door is locked | ||
| 264 | |||
| 265 | notes: | ||
| 266 | See CDROM_LOCKDOOR, below. | ||
| 267 | |||
| 268 | |||
| 269 | |||
| 270 | CDROMCLOSETRAY pendant of CDROMEJECT | ||
| 271 | |||
| 272 | usage: | ||
| 273 | |||
| 274 | ioctl(fd, CDROMCLOSETRAY, 0); | ||
| 275 | |||
| 276 | inputs: none | ||
| 277 | |||
| 278 | outputs: none | ||
| 279 | |||
| 280 | error returns: | ||
| 281 | ENOSYS cd drive not capable of closing the tray | ||
| 282 | EBUSY other processes are accessing drive, or door is locked | ||
| 283 | |||
| 284 | notes: | ||
| 285 | See CDROM_LOCKDOOR, below. | ||
| 286 | |||
| 287 | |||
| 288 | |||
| 289 | CDROMVOLCTRL Control output volume (struct cdrom_volctrl) | ||
| 290 | |||
| 291 | usage: | ||
| 292 | |||
| 293 | struct cdrom_volctrl volume; | ||
| 294 | ioctl(fd, CDROMVOLCTRL, &volume); | ||
| 295 | |||
| 296 | inputs: | ||
| 297 | cdrom_volctrl structure containing volumes for up to 4 | ||
| 298 | channels. | ||
| 299 | |||
| 300 | outputs: none | ||
| 301 | |||
| 302 | error return: | ||
| 303 | ENOSYS cd drive not audio-capable. | ||
| 304 | |||
| 305 | |||
| 306 | |||
| 307 | CDROMVOLREAD Get the drive's volume setting | ||
| 308 | (struct cdrom_volctrl) | ||
| 309 | |||
| 310 | usage: | ||
| 311 | |||
| 312 | struct cdrom_volctrl volume; | ||
| 313 | ioctl(fd, CDROMVOLREAD, &volume); | ||
| 314 | |||
| 315 | inputs: none | ||
| 316 | |||
| 317 | outputs: | ||
| 318 | The current volume settings. | ||
| 319 | |||
| 320 | error return: | ||
| 321 | ENOSYS cd drive not audio-capable. | ||
| 322 | |||
| 323 | |||
| 324 | |||
| 325 | CDROMSUBCHNL Read subchannel data (struct cdrom_subchnl) | ||
| 326 | |||
| 327 | usage: | ||
| 328 | |||
| 329 | struct cdrom_subchnl q; | ||
| 330 | ioctl(fd, CDROMSUBCHNL, &q); | ||
| 331 | |||
| 332 | inputs: | ||
| 333 | cdrom_subchnl structure | ||
| 334 | |||
| 335 | outputs: | ||
| 336 | cdrom_subchnl structure | ||
| 337 | |||
| 338 | error return: | ||
| 339 | ENOSYS cd drive not audio-capable. | ||
| 340 | EINVAL format not CDROM_MSF or CDROM_LBA | ||
| 341 | |||
| 342 | notes: | ||
| 343 | Format is converted to CDROM_MSF or CDROM_LBA | ||
| 344 | as per user request on return | ||
| 345 | |||
| 346 | |||
| 347 | |||
| 348 | CDROMREADRAW read data in raw mode (2352 Bytes) | ||
| 349 | (struct cdrom_read) | ||
| 350 | |||
| 351 | usage: | ||
| 352 | |||
| 353 | union { | ||
| 354 | struct cdrom_msf msf; /* input */ | ||
| 355 | char buffer[CD_FRAMESIZE_RAW]; /* return */ | ||
| 356 | } arg; | ||
| 357 | ioctl(fd, CDROMREADRAW, &arg); | ||
| 358 | |||
| 359 | inputs: | ||
| 360 | cdrom_msf structure indicating an address to read. | ||
| 361 | Only the start values are significant. | ||
| 362 | |||
| 363 | outputs: | ||
| 364 | Data written to address provided by user. | ||
| 365 | |||
| 366 | error return: | ||
| 367 | EINVAL address less than 0, or msf less than 0:2:0 | ||
| 368 | ENOMEM out of memory | ||
| 369 | |||
| 370 | notes: | ||
| 371 | As of 2.6.8.1, comments in <linux/cdrom.h> indicate that this | ||
| 372 | ioctl accepts a cdrom_read structure, but actual source code | ||
| 373 | reads a cdrom_msf structure and writes a buffer of data to | ||
| 374 | the same address. | ||
| 375 | |||
| 376 | MSF values are converted to LBA values via this formula: | ||
| 377 | |||
| 378 | lba = (((m * CD_SECS) + s) * CD_FRAMES + f) - CD_MSF_OFFSET; | ||
| 379 | |||
| 380 | |||
| 381 | |||
| 382 | |||
| 383 | CDROMREADMODE1 Read CDROM mode 1 data (2048 Bytes) | ||
| 384 | (struct cdrom_read) | ||
| 385 | |||
| 386 | notes: | ||
| 387 | Identical to CDROMREADRAW except that block size is | ||
| 388 | CD_FRAMESIZE (2048) bytes | ||
| 389 | |||
| 390 | |||
| 391 | |||
| 392 | CDROMREADMODE2 Read CDROM mode 2 data (2336 Bytes) | ||
| 393 | (struct cdrom_read) | ||
| 394 | |||
| 395 | notes: | ||
| 396 | Identical to CDROMREADRAW except that block size is | ||
| 397 | CD_FRAMESIZE_RAW0 (2336) bytes | ||
| 398 | |||
| 399 | |||
| 400 | |||
| 401 | CDROMREADAUDIO (struct cdrom_read_audio) | ||
| 402 | |||
| 403 | usage: | ||
| 404 | |||
| 405 | struct cdrom_read_audio ra; | ||
| 406 | ioctl(fd, CDROMREADAUDIO, &ra); | ||
| 407 | |||
| 408 | inputs: | ||
| 409 | cdrom_read_audio structure containing read start | ||
| 410 | point and length | ||
| 411 | |||
| 412 | outputs: | ||
| 413 | audio data, returned to buffer indicated by ra | ||
| 414 | |||
| 415 | error return: | ||
| 416 | EINVAL format not CDROM_MSF or CDROM_LBA | ||
| 417 | EINVAL nframes not in range [1 75] | ||
| 418 | ENXIO drive has no queue (probably means invalid fd) | ||
| 419 | ENOMEM out of memory | ||
| 420 | |||
| 421 | |||
| 422 | CDROMEJECT_SW enable(1)/disable(0) auto-ejecting | ||
| 423 | |||
| 424 | usage: | ||
| 425 | |||
| 426 | int val; | ||
| 427 | ioctl(fd, CDROMEJECT_SW, val); | ||
| 428 | |||
| 429 | inputs: | ||
| 430 | Flag specifying auto-eject flag. | ||
| 431 | |||
| 432 | outputs: none | ||
| 433 | |||
| 434 | error return: | ||
| 435 | ENOSYS Drive is not capable of ejecting. | ||
| 436 | EBUSY Door is locked | ||
| 437 | |||
| 438 | |||
| 439 | |||
| 440 | |||
| 441 | CDROMMULTISESSION Obtain the start-of-last-session | ||
| 442 | address of multi session disks | ||
| 443 | (struct cdrom_multisession) | ||
| 444 | usage: | ||
| 445 | |||
| 446 | struct cdrom_multisession ms_info; | ||
| 447 | ioctl(fd, CDROMMULTISESSION, &ms_info); | ||
| 448 | |||
| 449 | inputs: | ||
| 450 | cdrom_multisession structure containing desired | ||
| 451 | format. | ||
| 452 | |||
| 453 | outputs: | ||
| 454 | cdrom_multisession structure is filled with last_session | ||
| 455 | information. | ||
| 456 | |||
| 457 | error return: | ||
| 458 | EINVAL format not CDROM_MSF or CDROM_LBA | ||
| 459 | |||
| 460 | |||
| 461 | CDROM_GET_MCN Obtain the "Universal Product Code" | ||
| 462 | if available (struct cdrom_mcn) | ||
| 463 | |||
| 464 | usage: | ||
| 465 | |||
| 466 | struct cdrom_mcn mcn; | ||
| 467 | ioctl(fd, CDROM_GET_MCN, &mcn); | ||
| 468 | |||
| 469 | inputs: none | ||
| 470 | |||
| 471 | outputs: | ||
| 472 | Universal Product Code | ||
| 473 | |||
| 474 | error return: | ||
| 475 | ENOSYS Drive is not capable of reading MCN data. | ||
| 476 | |||
| 477 | notes: | ||
| 478 | Source code comments state: | ||
| 479 | |||
| 480 | The following function is implemented, although very few | ||
| 481 | audio discs give Universal Product Code information, which | ||
| 482 | should just be the Medium Catalog Number on the box. Note, | ||
| 483 | that the way the code is written on the CD is /not/ uniform | ||
| 484 | across all discs! | ||
| 485 | |||
| 486 | |||
| 487 | |||
| 488 | |||
| 489 | CDROM_GET_UPC CDROM_GET_MCN (deprecated) | ||
| 490 | |||
| 491 | Not implemented, as of 2.6.8.1 | ||
| 492 | |||
| 493 | |||
| 494 | |||
| 495 | CDROMRESET hard-reset the drive | ||
| 496 | |||
| 497 | usage: | ||
| 498 | |||
| 499 | ioctl(fd, CDROMRESET, 0); | ||
| 500 | |||
| 501 | inputs: none | ||
| 502 | |||
| 503 | outputs: none | ||
| 504 | |||
| 505 | error return: | ||
| 506 | EACCES Access denied: requires CAP_SYS_ADMIN | ||
| 507 | ENOSYS Drive is not capable of resetting. | ||
| 508 | |||
| 509 | |||
| 510 | |||
| 511 | |||
| 512 | CDROMREADCOOKED read data in cooked mode | ||
| 513 | |||
| 514 | usage: | ||
| 515 | |||
| 516 | u8 buffer[CD_FRAMESIZE] | ||
| 517 | ioctl(fd, CDROMREADCOOKED, buffer); | ||
| 518 | |||
| 519 | inputs: none | ||
| 520 | |||
| 521 | outputs: | ||
| 522 | 2048 bytes of data, "cooked" mode. | ||
| 523 | |||
| 524 | notes: | ||
| 525 | Not implemented on all drives. | ||
| 526 | |||
| 527 | |||
| 528 | |||
| 529 | |||
| 530 | CDROMREADALL read all 2646 bytes | ||
| 531 | |||
| 532 | Same as CDROMREADCOOKED, but reads 2646 bytes. | ||
| 533 | |||
| 534 | |||
| 535 | |||
| 536 | CDROMSEEK seek msf address | ||
| 537 | |||
| 538 | usage: | ||
| 539 | |||
| 540 | struct cdrom_msf msf; | ||
| 541 | ioctl(fd, CDROMSEEK, &msf); | ||
| 542 | |||
| 543 | inputs: | ||
| 544 | MSF address to seek to. | ||
| 545 | |||
| 546 | outputs: none | ||
| 547 | |||
| 548 | |||
| 549 | |||
| 550 | CDROMPLAYBLK scsi-cd only, (struct cdrom_blk) | ||
| 551 | |||
| 552 | usage: | ||
| 553 | |||
| 554 | struct cdrom_blk blk; | ||
| 555 | ioctl(fd, CDROMPLAYBLK, &blk); | ||
| 556 | |||
| 557 | inputs: | ||
| 558 | Region to play | ||
| 559 | |||
| 560 | outputs: none | ||
| 561 | |||
| 562 | |||
| 563 | |||
| 564 | CDROMGETSPINDOWN | ||
| 565 | |||
| 566 | usage: | ||
| 567 | |||
| 568 | char spindown; | ||
| 569 | ioctl(fd, CDROMGETSPINDOWN, &spindown); | ||
| 570 | |||
| 571 | inputs: none | ||
| 572 | |||
| 573 | outputs: | ||
| 574 | The value of the current 4-bit spindown value. | ||
| 575 | |||
| 576 | |||
| 577 | |||
| 578 | |||
| 579 | CDROMSETSPINDOWN | ||
| 580 | |||
| 581 | usage: | ||
| 582 | |||
| 583 | char spindown | ||
| 584 | ioctl(fd, CDROMSETSPINDOWN, &spindown); | ||
| 585 | |||
| 586 | inputs: | ||
| 587 | 4-bit value used to control spindown (TODO: more detail here) | ||
| 588 | |||
| 589 | outputs: none | ||
| 590 | |||
| 591 | |||
| 592 | |||
| 593 | |||
| 594 | |||
| 595 | CDROM_SET_OPTIONS Set behavior options | ||
| 596 | |||
| 597 | usage: | ||
| 598 | |||
| 599 | int options; | ||
| 600 | ioctl(fd, CDROM_SET_OPTIONS, options); | ||
| 601 | |||
| 602 | inputs: | ||
| 603 | New values for drive options. The logical 'or' of: | ||
| 604 | CDO_AUTO_CLOSE close tray on first open(2) | ||
| 605 | CDO_AUTO_EJECT open tray on last release | ||
| 606 | CDO_USE_FFLAGS use O_NONBLOCK information on open | ||
| 607 | CDO_LOCK lock tray on open files | ||
| 608 | CDO_CHECK_TYPE check type on open for data | ||
| 609 | |||
| 610 | outputs: | ||
| 611 | Returns the resulting options settings in the | ||
| 612 | ioctl return value. Returns -1 on error. | ||
| 613 | |||
| 614 | error return: | ||
| 615 | ENOSYS selected option(s) not supported by drive. | ||
| 616 | |||
| 617 | |||
| 618 | |||
| 619 | |||
| 620 | CDROM_CLEAR_OPTIONS Clear behavior options | ||
| 621 | |||
| 622 | Same as CDROM_SET_OPTIONS, except that selected options are | ||
| 623 | turned off. | ||
| 624 | |||
| 625 | |||
| 626 | |||
| 627 | CDROM_SELECT_SPEED Set the CD-ROM speed | ||
| 628 | |||
| 629 | usage: | ||
| 630 | |||
| 631 | int speed; | ||
| 632 | ioctl(fd, CDROM_SELECT_SPEED, speed); | ||
| 633 | |||
| 634 | inputs: | ||
| 635 | New drive speed. | ||
| 636 | |||
| 637 | outputs: none | ||
| 638 | |||
| 639 | error return: | ||
| 640 | ENOSYS speed selection not supported by drive. | ||
| 641 | |||
| 642 | |||
| 643 | |||
| 644 | CDROM_SELECT_DISC Select disc (for juke-boxes) | ||
| 645 | |||
| 646 | usage: | ||
| 647 | |||
| 648 | int disk; | ||
| 649 | ioctl(fd, CDROM_SELECT_DISC, disk); | ||
| 650 | |||
| 651 | inputs: | ||
| 652 | Disk to load into drive. | ||
| 653 | |||
| 654 | outputs: none | ||
| 655 | |||
| 656 | error return: | ||
| 657 | EINVAL Disk number beyond capacity of drive | ||
| 658 | |||
| 659 | |||
| 660 | |||
| 661 | CDROM_MEDIA_CHANGED Check is media changed | ||
| 662 | |||
| 663 | usage: | ||
| 664 | |||
| 665 | int slot; | ||
| 666 | ioctl(fd, CDROM_MEDIA_CHANGED, slot); | ||
| 667 | |||
| 668 | inputs: | ||
| 669 | Slot number to be tested, always zero except for jukeboxes. | ||
| 670 | May also be special values CDSL_NONE or CDSL_CURRENT | ||
| 671 | |||
| 672 | outputs: | ||
| 673 | Ioctl return value is 0 or 1 depending on whether the media | ||
| 674 | has been changed, or -1 on error. | ||
| 675 | |||
| 676 | error returns: | ||
| 677 | ENOSYS Drive can't detect media change | ||
| 678 | EINVAL Slot number beyond capacity of drive | ||
| 679 | ENOMEM Out of memory | ||
| 680 | |||
| 681 | |||
| 682 | |||
| 683 | CDROM_DRIVE_STATUS Get tray position, etc. | ||
| 684 | |||
| 685 | usage: | ||
| 686 | |||
| 687 | int slot; | ||
| 688 | ioctl(fd, CDROM_DRIVE_STATUS, slot); | ||
| 689 | |||
| 690 | inputs: | ||
| 691 | Slot number to be tested, always zero except for jukeboxes. | ||
| 692 | May also be special values CDSL_NONE or CDSL_CURRENT | ||
| 693 | |||
| 694 | outputs: | ||
| 695 | Ioctl return value will be one of the following values | ||
| 696 | from <linux/cdrom.h>: | ||
| 697 | |||
| 698 | CDS_NO_INFO Information not available. | ||
| 699 | CDS_NO_DISC | ||
| 700 | CDS_TRAY_OPEN | ||
| 701 | CDS_DRIVE_NOT_READY | ||
| 702 | CDS_DISC_OK | ||
| 703 | -1 error | ||
| 704 | |||
| 705 | error returns: | ||
| 706 | ENOSYS Drive can't detect drive status | ||
| 707 | EINVAL Slot number beyond capacity of drive | ||
| 708 | ENOMEM Out of memory | ||
| 709 | |||
| 710 | |||
| 711 | |||
| 712 | |||
| 713 | CDROM_DISC_STATUS Get disc type, etc. | ||
| 714 | |||
| 715 | usage: | ||
| 716 | |||
| 717 | ioctl(fd, CDROM_DISC_STATUS, 0); | ||
| 718 | |||
| 719 | inputs: none | ||
| 720 | |||
| 721 | outputs: | ||
| 722 | Ioctl return value will be one of the following values | ||
| 723 | from <linux/cdrom.h>: | ||
| 724 | CDS_NO_INFO | ||
| 725 | CDS_AUDIO | ||
| 726 | CDS_MIXED | ||
| 727 | CDS_XA_2_2 | ||
| 728 | CDS_XA_2_1 | ||
| 729 | CDS_DATA_1 | ||
| 730 | |||
| 731 | error returns: none at present | ||
| 732 | |||
| 733 | notes: | ||
| 734 | Source code comments state: | ||
| 735 | |||
| 736 | Ok, this is where problems start. The current interface for | ||
| 737 | the CDROM_DISC_STATUS ioctl is flawed. It makes the false | ||
| 738 | assumption that CDs are all CDS_DATA_1 or all CDS_AUDIO, etc. | ||
| 739 | Unfortunately, while this is often the case, it is also | ||
| 740 | very common for CDs to have some tracks with data, and some | ||
| 741 | tracks with audio. Just because I feel like it, I declare | ||
| 742 | the following to be the best way to cope. If the CD has | ||
| 743 | ANY data tracks on it, it will be returned as a data CD. | ||
| 744 | If it has any XA tracks, I will return it as that. Now I | ||
| 745 | could simplify this interface by combining these returns with | ||
| 746 | the above, but this more clearly demonstrates the problem | ||
| 747 | with the current interface. Too bad this wasn't designed | ||
| 748 | to use bitmasks... -Erik | ||
| 749 | |||
| 750 | Well, now we have the option CDS_MIXED: a mixed-type CD. | ||
| 751 | User level programmers might feel the ioctl is not very | ||
| 752 | useful. | ||
| 753 | ---david | ||
| 754 | |||
| 755 | |||
| 756 | |||
| 757 | |||
| 758 | CDROM_CHANGER_NSLOTS Get number of slots | ||
| 759 | |||
| 760 | usage: | ||
| 761 | |||
| 762 | ioctl(fd, CDROM_CHANGER_NSLOTS, 0); | ||
| 763 | |||
| 764 | inputs: none | ||
| 765 | |||
| 766 | outputs: | ||
| 767 | The ioctl return value will be the number of slots in a | ||
| 768 | CD changer. Typically 1 for non-multi-disk devices. | ||
| 769 | |||
| 770 | error returns: none | ||
| 771 | |||
| 772 | |||
| 773 | |||
| 774 | CDROM_LOCKDOOR lock or unlock door | ||
| 775 | |||
| 776 | usage: | ||
| 777 | |||
| 778 | int lock; | ||
| 779 | ioctl(fd, CDROM_LOCKDOOR, lock); | ||
| 780 | |||
| 781 | inputs: | ||
| 782 | Door lock flag, 1=lock, 0=unlock | ||
| 783 | |||
| 784 | outputs: none | ||
| 785 | |||
| 786 | error returns: | ||
| 787 | EDRIVE_CANT_DO_THIS Door lock function not supported. | ||
| 788 | EBUSY Attempt to unlock when multiple users | ||
| 789 | have the drive open and not CAP_SYS_ADMIN | ||
| 790 | |||
| 791 | notes: | ||
| 792 | As of 2.6.8.1, the lock flag is a global lock, meaning that | ||
| 793 | all CD drives will be locked or unlocked together. This is | ||
| 794 | probably a bug. | ||
| 795 | |||
| 796 | The EDRIVE_CANT_DO_THIS value is defined in <linux/cdrom.h> | ||
| 797 | and is currently (2.6.8.1) the same as EOPNOTSUPP | ||
| 798 | |||
| 799 | |||
| 800 | |||
| 801 | CDROM_DEBUG Turn debug messages on/off | ||
| 802 | |||
| 803 | usage: | ||
| 804 | |||
| 805 | int debug; | ||
| 806 | ioctl(fd, CDROM_DEBUG, debug); | ||
| 807 | |||
| 808 | inputs: | ||
| 809 | Cdrom debug flag, 0=disable, 1=enable | ||
| 810 | |||
| 811 | outputs: | ||
| 812 | The ioctl return value will be the new debug flag. | ||
| 813 | |||
| 814 | error return: | ||
| 815 | EACCES Access denied: requires CAP_SYS_ADMIN | ||
| 816 | |||
| 817 | |||
| 818 | |||
| 819 | CDROM_GET_CAPABILITY get capabilities | ||
| 820 | |||
| 821 | usage: | ||
| 822 | |||
| 823 | ioctl(fd, CDROM_GET_CAPABILITY, 0); | ||
| 824 | |||
| 825 | inputs: none | ||
| 826 | |||
| 827 | outputs: | ||
| 828 | The ioctl return value is the current device capability | ||
| 829 | flags. See CDC_CLOSE_TRAY, CDC_OPEN_TRAY, etc. | ||
| 830 | |||
| 831 | |||
| 832 | |||
| 833 | CDROMAUDIOBUFSIZ set the audio buffer size | ||
| 834 | |||
| 835 | usage: | ||
| 836 | |||
| 837 | int arg; | ||
| 838 | ioctl(fd, CDROMAUDIOBUFSIZ, val); | ||
| 839 | |||
| 840 | inputs: | ||
| 841 | New audio buffer size | ||
| 842 | |||
| 843 | outputs: | ||
| 844 | The ioctl return value is the new audio buffer size, or -1 | ||
| 845 | on error. | ||
| 846 | |||
| 847 | error return: | ||
| 848 | ENOSYS Not supported by this driver. | ||
| 849 | |||
| 850 | notes: | ||
| 851 | Not supported by all drivers. | ||
| 852 | |||
| 853 | |||
| 854 | |||
| 855 | DVD_READ_STRUCT Read structure | ||
| 856 | |||
| 857 | usage: | ||
| 858 | |||
| 859 | dvd_struct s; | ||
| 860 | ioctl(fd, DVD_READ_STRUCT, &s); | ||
| 861 | |||
| 862 | inputs: | ||
| 863 | dvd_struct structure, containing: | ||
| 864 | type specifies the information desired, one of | ||
| 865 | DVD_STRUCT_PHYSICAL, DVD_STRUCT_COPYRIGHT, | ||
| 866 | DVD_STRUCT_DISCKEY, DVD_STRUCT_BCA, | ||
| 867 | DVD_STRUCT_MANUFACT | ||
| 868 | physical.layer_num desired layer, indexed from 0 | ||
| 869 | copyright.layer_num desired layer, indexed from 0 | ||
| 870 | disckey.agid | ||
| 871 | |||
| 872 | outputs: | ||
| 873 | dvd_struct structure, containing: | ||
| 874 | physical for type == DVD_STRUCT_PHYSICAL | ||
| 875 | copyright for type == DVD_STRUCT_COPYRIGHT | ||
| 876 | disckey.value for type == DVD_STRUCT_DISCKEY | ||
| 877 | bca.{len,value} for type == DVD_STRUCT_BCA | ||
| 878 | manufact.{len,valu} for type == DVD_STRUCT_MANUFACT | ||
| 879 | |||
| 880 | error returns: | ||
| 881 | EINVAL physical.layer_num exceeds number of layers | ||
| 882 | EIO Received invalid response from drive | ||
| 883 | |||
| 884 | |||
| 885 | |||
| 886 | DVD_WRITE_STRUCT Write structure | ||
| 887 | |||
| 888 | Not implemented, as of 2.6.8.1 | ||
| 889 | |||
| 890 | |||
| 891 | |||
| 892 | DVD_AUTH Authentication | ||
| 893 | |||
| 894 | usage: | ||
| 895 | |||
| 896 | dvd_authinfo ai; | ||
| 897 | ioctl(fd, DVD_AUTH, &ai); | ||
| 898 | |||
| 899 | inputs: | ||
| 900 | dvd_authinfo structure. See <linux/cdrom.h> | ||
| 901 | |||
| 902 | outputs: | ||
| 903 | dvd_authinfo structure. | ||
| 904 | |||
| 905 | error return: | ||
| 906 | ENOTTY ai.type not recognized. | ||
| 907 | |||
| 908 | |||
| 909 | |||
| 910 | CDROM_SEND_PACKET send a packet to the drive | ||
| 911 | |||
| 912 | usage: | ||
| 913 | |||
| 914 | struct cdrom_generic_command cgc; | ||
| 915 | ioctl(fd, CDROM_SEND_PACKET, &cgc); | ||
| 916 | |||
| 917 | inputs: | ||
| 918 | cdrom_generic_command structure containing the packet to send. | ||
| 919 | |||
| 920 | outputs: none | ||
| 921 | cdrom_generic_command structure containing results. | ||
| 922 | |||
| 923 | error return: | ||
| 924 | EIO command failed. | ||
| 925 | EPERM Operation not permitted, either because a | ||
| 926 | write command was attempted on a drive which | ||
| 927 | is opened read-only, or because the command | ||
| 928 | requires CAP_SYS_RAWIO | ||
| 929 | EINVAL cgc.data_direction not set | ||
| 930 | |||
| 931 | |||
| 932 | |||
| 933 | CDROM_NEXT_WRITABLE get next writable block | ||
| 934 | |||
| 935 | usage: | ||
| 936 | |||
| 937 | long next; | ||
| 938 | ioctl(fd, CDROM_NEXT_WRITABLE, &next); | ||
| 939 | |||
| 940 | inputs: none | ||
| 941 | |||
| 942 | outputs: | ||
| 943 | The next writable block. | ||
| 944 | |||
| 945 | notes: | ||
| 946 | If the device does not support this ioctl directly, the | ||
| 947 | ioctl will return CDROM_LAST_WRITTEN + 7. | ||
| 948 | |||
| 949 | |||
| 950 | |||
| 951 | CDROM_LAST_WRITTEN get last block written on disc | ||
| 952 | |||
| 953 | usage: | ||
| 954 | |||
| 955 | long last; | ||
| 956 | ioctl(fd, CDROM_LAST_WRITTEN, &last); | ||
| 957 | |||
| 958 | inputs: none | ||
| 959 | |||
| 960 | outputs: | ||
| 961 | The last block written on disc | ||
| 962 | |||
| 963 | notes: | ||
| 964 | If the device does not support this ioctl directly, the | ||
| 965 | result is derived from the disc's table of contents. If the | ||
| 966 | table of contents can't be read, this ioctl returns an | ||
| 967 | error. | ||
diff --git a/Documentation/ioctl/hdio.txt b/Documentation/ioctl/hdio.rst index 18eb98c44ffe..e822e3dff176 100644 --- a/Documentation/ioctl/hdio.txt +++ b/Documentation/ioctl/hdio.rst | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | Summary of HDIO_ ioctl calls. | 1 | ============================== |
| 2 | ============================ | 2 | Summary of `HDIO_` ioctl calls |
| 3 | ============================== | ||
| 3 | 4 | ||
| 4 | Edward A. Falk <efalk@google.com> | 5 | - Edward A. Falk <efalk@google.com> |
| 5 | 6 | ||
| 6 | November, 2004 | 7 | November, 2004 |
| 7 | 8 | ||
| 8 | This document attempts to describe the ioctl(2) calls supported by | 9 | This document attempts to describe the ioctl(2) calls supported by |
| 9 | the HD/IDE layer. These are by-and-large implemented (as of Linux 2.6) | 10 | the HD/IDE layer. These are by-and-large implemented (as of Linux 2.6) |
| @@ -14,6 +15,7 @@ are as follows: | |||
| 14 | 15 | ||
| 15 | ioctls that pass argument pointers to user space: | 16 | ioctls that pass argument pointers to user space: |
| 16 | 17 | ||
| 18 | ======================= ======================================= | ||
| 17 | HDIO_GETGEO get device geometry | 19 | HDIO_GETGEO get device geometry |
| 18 | HDIO_GET_UNMASKINTR get current unmask setting | 20 | HDIO_GET_UNMASKINTR get current unmask setting |
| 19 | HDIO_GET_MULTCOUNT get current IDE blockmode setting | 21 | HDIO_GET_MULTCOUNT get current IDE blockmode setting |
| @@ -36,9 +38,11 @@ are as follows: | |||
| 36 | HDIO_DRIVE_TASK execute task and special drive command | 38 | HDIO_DRIVE_TASK execute task and special drive command |
| 37 | HDIO_DRIVE_CMD execute a special drive command | 39 | HDIO_DRIVE_CMD execute a special drive command |
| 38 | HDIO_DRIVE_CMD_AEB HDIO_DRIVE_TASK | 40 | HDIO_DRIVE_CMD_AEB HDIO_DRIVE_TASK |
| 41 | ======================= ======================================= | ||
| 39 | 42 | ||
| 40 | ioctls that pass non-pointer values: | 43 | ioctls that pass non-pointer values: |
| 41 | 44 | ||
| 45 | ======================= ======================================= | ||
| 42 | HDIO_SET_MULTCOUNT change IDE blockmode | 46 | HDIO_SET_MULTCOUNT change IDE blockmode |
| 43 | HDIO_SET_UNMASKINTR permit other irqs during I/O | 47 | HDIO_SET_UNMASKINTR permit other irqs during I/O |
| 44 | HDIO_SET_KEEPSETTINGS keep ioctl settings on reset | 48 | HDIO_SET_KEEPSETTINGS keep ioctl settings on reset |
| @@ -57,16 +61,13 @@ are as follows: | |||
| 57 | 61 | ||
| 58 | HDIO_SET_IDE_SCSI Set scsi emulation mode on/off | 62 | HDIO_SET_IDE_SCSI Set scsi emulation mode on/off |
| 59 | HDIO_SET_SCSI_IDE not implemented yet | 63 | HDIO_SET_SCSI_IDE not implemented yet |
| 64 | ======================= ======================================= | ||
| 60 | 65 | ||
| 61 | 66 | ||
| 62 | The information that follows was determined from reading kernel source | 67 | The information that follows was determined from reading kernel source |
| 63 | code. It is likely that some corrections will be made over time. | 68 | code. It is likely that some corrections will be made over time. |
| 64 | 69 | ||
| 65 | 70 | ------------------------------------------------------------------------------ | |
| 66 | |||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | 71 | ||
| 71 | General: | 72 | General: |
| 72 | 73 | ||
| @@ -80,459 +81,610 @@ General: | |||
| 80 | Unless otherwise specified, all data structures and constants | 81 | Unless otherwise specified, all data structures and constants |
| 81 | are defined in <linux/hdreg.h> | 82 | are defined in <linux/hdreg.h> |
| 82 | 83 | ||
| 84 | ------------------------------------------------------------------------------ | ||
| 83 | 85 | ||
| 86 | HDIO_GETGEO | ||
| 87 | get device geometry | ||
| 84 | 88 | ||
| 85 | HDIO_GETGEO get device geometry | ||
| 86 | 89 | ||
| 87 | usage: | 90 | usage:: |
| 88 | 91 | ||
| 89 | struct hd_geometry geom; | 92 | struct hd_geometry geom; |
| 93 | |||
| 90 | ioctl(fd, HDIO_GETGEO, &geom); | 94 | ioctl(fd, HDIO_GETGEO, &geom); |
| 91 | 95 | ||
| 92 | 96 | ||
| 93 | inputs: none | 97 | inputs: |
| 98 | none | ||
| 99 | |||
| 100 | |||
| 94 | 101 | ||
| 95 | outputs: | 102 | outputs: |
| 103 | hd_geometry structure containing: | ||
| 96 | 104 | ||
| 97 | hd_geometry structure containing: | ||
| 98 | 105 | ||
| 106 | ========= ================================== | ||
| 99 | heads number of heads | 107 | heads number of heads |
| 100 | sectors number of sectors/track | 108 | sectors number of sectors/track |
| 101 | cylinders number of cylinders, mod 65536 | 109 | cylinders number of cylinders, mod 65536 |
| 102 | start starting sector of this partition. | 110 | start starting sector of this partition. |
| 111 | ========= ================================== | ||
| 103 | 112 | ||
| 104 | 113 | ||
| 105 | error returns: | 114 | error returns: |
| 106 | EINVAL if the device is not a disk drive or floppy drive, | 115 | - EINVAL |
| 107 | or if the user passes a null pointer | 116 | |
| 117 | if the device is not a disk drive or floppy drive, | ||
| 118 | or if the user passes a null pointer | ||
| 108 | 119 | ||
| 109 | 120 | ||
| 110 | notes: | 121 | notes: |
| 122 | Not particularly useful with modern disk drives, whose geometry | ||
| 123 | is a polite fiction anyway. Modern drives are addressed | ||
| 124 | purely by sector number nowadays (lba addressing), and the | ||
| 125 | drive geometry is an abstraction which is actually subject | ||
| 126 | to change. Currently (as of Nov 2004), the geometry values | ||
| 127 | are the "bios" values -- presumably the values the drive had | ||
| 128 | when Linux first booted. | ||
| 111 | 129 | ||
| 112 | Not particularly useful with modern disk drives, whose geometry | 130 | In addition, the cylinders field of the hd_geometry is an |
| 113 | is a polite fiction anyway. Modern drives are addressed | 131 | unsigned short, meaning that on most architectures, this |
| 114 | purely by sector number nowadays (lba addressing), and the | 132 | ioctl will not return a meaningful value on drives with more |
| 115 | drive geometry is an abstraction which is actually subject | 133 | than 65535 tracks. |
| 116 | to change. Currently (as of Nov 2004), the geometry values | ||
| 117 | are the "bios" values -- presumably the values the drive had | ||
| 118 | when Linux first booted. | ||
| 119 | 134 | ||
| 120 | In addition, the cylinders field of the hd_geometry is an | 135 | The start field is unsigned long, meaning that it will not |
| 121 | unsigned short, meaning that on most architectures, this | 136 | contain a meaningful value for disks over 219 Gb in size. |
| 122 | ioctl will not return a meaningful value on drives with more | ||
| 123 | than 65535 tracks. | ||
| 124 | 137 | ||
| 125 | The start field is unsigned long, meaning that it will not | ||
| 126 | contain a meaningful value for disks over 219 Gb in size. | ||
| 127 | 138 | ||
| 128 | 139 | ||
| 129 | 140 | ||
| 141 | HDIO_GET_UNMASKINTR | ||
| 142 | get current unmask setting | ||
| 130 | 143 | ||
| 131 | HDIO_GET_UNMASKINTR get current unmask setting | ||
| 132 | 144 | ||
| 133 | usage: | 145 | usage:: |
| 134 | 146 | ||
| 135 | long val; | 147 | long val; |
| 148 | |||
| 136 | ioctl(fd, HDIO_GET_UNMASKINTR, &val); | 149 | ioctl(fd, HDIO_GET_UNMASKINTR, &val); |
| 137 | 150 | ||
| 138 | inputs: none | 151 | inputs: |
| 152 | none | ||
| 153 | |||
| 154 | |||
| 139 | 155 | ||
| 140 | outputs: | 156 | outputs: |
| 141 | The value of the drive's current unmask setting | 157 | The value of the drive's current unmask setting |
| 142 | 158 | ||
| 143 | 159 | ||
| 144 | 160 | ||
| 145 | HDIO_SET_UNMASKINTR permit other irqs during I/O | ||
| 146 | 161 | ||
| 147 | usage: | 162 | |
| 163 | HDIO_SET_UNMASKINTR | ||
| 164 | permit other irqs during I/O | ||
| 165 | |||
| 166 | |||
| 167 | usage:: | ||
| 148 | 168 | ||
| 149 | unsigned long val; | 169 | unsigned long val; |
| 170 | |||
| 150 | ioctl(fd, HDIO_SET_UNMASKINTR, val); | 171 | ioctl(fd, HDIO_SET_UNMASKINTR, val); |
| 151 | 172 | ||
| 152 | inputs: | 173 | inputs: |
| 153 | New value for unmask flag | 174 | New value for unmask flag |
| 175 | |||
| 176 | |||
| 177 | |||
| 178 | outputs: | ||
| 179 | none | ||
| 180 | |||
| 154 | 181 | ||
| 155 | outputs: none | ||
| 156 | 182 | ||
| 157 | error return: | 183 | error return: |
| 158 | EINVAL (bdev != bdev->bd_contains) (not sure what this means) | 184 | - EINVAL (bdev != bdev->bd_contains) (not sure what this means) |
| 159 | EACCES Access denied: requires CAP_SYS_ADMIN | 185 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 160 | EINVAL value out of range [0 1] | 186 | - EINVAL value out of range [0 1] |
| 161 | EBUSY Controller busy | 187 | - EBUSY Controller busy |
| 188 | |||
| 162 | 189 | ||
| 163 | 190 | ||
| 164 | 191 | ||
| 192 | HDIO_GET_MULTCOUNT | ||
| 193 | get current IDE blockmode setting | ||
| 165 | 194 | ||
| 166 | HDIO_GET_MULTCOUNT get current IDE blockmode setting | ||
| 167 | 195 | ||
| 168 | usage: | 196 | usage:: |
| 169 | 197 | ||
| 170 | long val; | 198 | long val; |
| 199 | |||
| 171 | ioctl(fd, HDIO_GET_MULTCOUNT, &val); | 200 | ioctl(fd, HDIO_GET_MULTCOUNT, &val); |
| 172 | 201 | ||
| 173 | inputs: none | 202 | inputs: |
| 203 | none | ||
| 204 | |||
| 205 | |||
| 174 | 206 | ||
| 175 | outputs: | 207 | outputs: |
| 176 | The value of the current IDE block mode setting. This | 208 | The value of the current IDE block mode setting. This |
| 177 | controls how many sectors the drive will transfer per | 209 | controls how many sectors the drive will transfer per |
| 178 | interrupt. | 210 | interrupt. |
| 211 | |||
| 179 | 212 | ||
| 180 | 213 | ||
| 214 | HDIO_SET_MULTCOUNT | ||
| 215 | change IDE blockmode | ||
| 181 | 216 | ||
| 182 | HDIO_SET_MULTCOUNT change IDE blockmode | ||
| 183 | 217 | ||
| 184 | usage: | 218 | usage:: |
| 185 | 219 | ||
| 186 | int val; | 220 | int val; |
| 221 | |||
| 187 | ioctl(fd, HDIO_SET_MULTCOUNT, val); | 222 | ioctl(fd, HDIO_SET_MULTCOUNT, val); |
| 188 | 223 | ||
| 189 | inputs: | 224 | inputs: |
| 190 | New value for IDE block mode setting. This controls how many | 225 | New value for IDE block mode setting. This controls how many |
| 191 | sectors the drive will transfer per interrupt. | 226 | sectors the drive will transfer per interrupt. |
| 227 | |||
| 228 | outputs: | ||
| 229 | none | ||
| 230 | |||
| 192 | 231 | ||
| 193 | outputs: none | ||
| 194 | 232 | ||
| 195 | error return: | 233 | error return: |
| 196 | EINVAL (bdev != bdev->bd_contains) (not sure what this means) | 234 | - EINVAL (bdev != bdev->bd_contains) (not sure what this means) |
| 197 | EACCES Access denied: requires CAP_SYS_ADMIN | 235 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 198 | EINVAL value out of range supported by disk. | 236 | - EINVAL value out of range supported by disk. |
| 199 | EBUSY Controller busy or blockmode already set. | 237 | - EBUSY Controller busy or blockmode already set. |
| 200 | EIO Drive did not accept new block mode. | 238 | - EIO Drive did not accept new block mode. |
| 201 | 239 | ||
| 202 | notes: | 240 | notes: |
| 203 | 241 | Source code comments read:: | |
| 204 | Source code comments read: | ||
| 205 | 242 | ||
| 206 | This is tightly woven into the driver->do_special cannot | 243 | This is tightly woven into the driver->do_special cannot |
| 207 | touch. DON'T do it again until a total personality rewrite | 244 | touch. DON'T do it again until a total personality rewrite |
| 208 | is committed. | 245 | is committed. |
| 209 | 246 | ||
| 210 | If blockmode has already been set, this ioctl will fail with | 247 | If blockmode has already been set, this ioctl will fail with |
| 211 | EBUSY | 248 | -EBUSY |
| 212 | 249 | ||
| 213 | 250 | ||
| 214 | 251 | ||
| 215 | HDIO_GET_QDMA get use-qdma flag | 252 | HDIO_GET_QDMA |
| 253 | get use-qdma flag | ||
| 254 | |||
| 216 | 255 | ||
| 217 | Not implemented, as of 2.6.8.1 | 256 | Not implemented, as of 2.6.8.1 |
| 218 | 257 | ||
| 219 | 258 | ||
| 220 | 259 | ||
| 221 | HDIO_SET_XFER set transfer rate via proc | 260 | HDIO_SET_XFER |
| 261 | set transfer rate via proc | ||
| 262 | |||
| 222 | 263 | ||
| 223 | Not implemented, as of 2.6.8.1 | 264 | Not implemented, as of 2.6.8.1 |
| 224 | 265 | ||
| 225 | 266 | ||
| 226 | 267 | ||
| 227 | HDIO_OBSOLETE_IDENTITY OBSOLETE, DO NOT USE | 268 | HDIO_OBSOLETE_IDENTITY |
| 269 | OBSOLETE, DO NOT USE | ||
| 270 | |||
| 228 | 271 | ||
| 229 | Same as HDIO_GET_IDENTITY (see below), except that it only | 272 | Same as HDIO_GET_IDENTITY (see below), except that it only |
| 230 | returns the first 142 bytes of drive identity information. | 273 | returns the first 142 bytes of drive identity information. |
| 231 | 274 | ||
| 232 | 275 | ||
| 233 | 276 | ||
| 234 | HDIO_GET_IDENTITY get IDE identification info | 277 | HDIO_GET_IDENTITY |
| 278 | get IDE identification info | ||
| 279 | |||
| 235 | 280 | ||
| 236 | usage: | 281 | usage:: |
| 237 | 282 | ||
| 238 | unsigned char identity[512]; | 283 | unsigned char identity[512]; |
| 284 | |||
| 239 | ioctl(fd, HDIO_GET_IDENTITY, identity); | 285 | ioctl(fd, HDIO_GET_IDENTITY, identity); |
| 240 | 286 | ||
| 241 | inputs: none | 287 | inputs: |
| 288 | none | ||
| 242 | 289 | ||
| 243 | outputs: | ||
| 244 | 290 | ||
| 245 | ATA drive identity information. For full description, see | 291 | |
| 246 | the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands in | 292 | outputs: |
| 247 | the ATA specification. | 293 | ATA drive identity information. For full description, see |
| 294 | the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands in | ||
| 295 | the ATA specification. | ||
| 248 | 296 | ||
| 249 | error returns: | 297 | error returns: |
| 250 | EINVAL (bdev != bdev->bd_contains) (not sure what this means) | 298 | - EINVAL (bdev != bdev->bd_contains) (not sure what this means) |
| 251 | ENOMSG IDENTIFY DEVICE information not available | 299 | - ENOMSG IDENTIFY DEVICE information not available |
| 252 | 300 | ||
| 253 | notes: | 301 | notes: |
| 302 | Returns information that was obtained when the drive was | ||
| 303 | probed. Some of this information is subject to change, and | ||
| 304 | this ioctl does not re-probe the drive to update the | ||
| 305 | information. | ||
| 254 | 306 | ||
| 255 | Returns information that was obtained when the drive was | 307 | This information is also available from /proc/ide/hdX/identify |
| 256 | probed. Some of this information is subject to change, and | ||
| 257 | this ioctl does not re-probe the drive to update the | ||
| 258 | information. | ||
| 259 | 308 | ||
| 260 | This information is also available from /proc/ide/hdX/identify | ||
| 261 | 309 | ||
| 262 | 310 | ||
| 311 | HDIO_GET_KEEPSETTINGS | ||
| 312 | get keep-settings-on-reset flag | ||
| 263 | 313 | ||
| 264 | HDIO_GET_KEEPSETTINGS get keep-settings-on-reset flag | ||
| 265 | 314 | ||
| 266 | usage: | 315 | usage:: |
| 267 | 316 | ||
| 268 | long val; | 317 | long val; |
| 318 | |||
| 269 | ioctl(fd, HDIO_GET_KEEPSETTINGS, &val); | 319 | ioctl(fd, HDIO_GET_KEEPSETTINGS, &val); |
| 270 | 320 | ||
| 271 | inputs: none | 321 | inputs: |
| 322 | none | ||
| 323 | |||
| 324 | |||
| 272 | 325 | ||
| 273 | outputs: | 326 | outputs: |
| 274 | The value of the current "keep settings" flag | 327 | The value of the current "keep settings" flag |
| 328 | |||
| 329 | |||
| 275 | 330 | ||
| 276 | notes: | 331 | notes: |
| 332 | When set, indicates that kernel should restore settings | ||
| 333 | after a drive reset. | ||
| 277 | 334 | ||
| 278 | When set, indicates that kernel should restore settings | ||
| 279 | after a drive reset. | ||
| 280 | 335 | ||
| 281 | 336 | ||
| 337 | HDIO_SET_KEEPSETTINGS | ||
| 338 | keep ioctl settings on reset | ||
| 282 | 339 | ||
| 283 | HDIO_SET_KEEPSETTINGS keep ioctl settings on reset | ||
| 284 | 340 | ||
| 285 | usage: | 341 | usage:: |
| 286 | 342 | ||
| 287 | long val; | 343 | long val; |
| 344 | |||
| 288 | ioctl(fd, HDIO_SET_KEEPSETTINGS, val); | 345 | ioctl(fd, HDIO_SET_KEEPSETTINGS, val); |
| 289 | 346 | ||
| 290 | inputs: | 347 | inputs: |
| 291 | New value for keep_settings flag | 348 | New value for keep_settings flag |
| 349 | |||
| 350 | |||
| 351 | |||
| 352 | outputs: | ||
| 353 | none | ||
| 354 | |||
| 292 | 355 | ||
| 293 | outputs: none | ||
| 294 | 356 | ||
| 295 | error return: | 357 | error return: |
| 296 | EINVAL (bdev != bdev->bd_contains) (not sure what this means) | 358 | - EINVAL (bdev != bdev->bd_contains) (not sure what this means) |
| 297 | EACCES Access denied: requires CAP_SYS_ADMIN | 359 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 298 | EINVAL value out of range [0 1] | 360 | - EINVAL value out of range [0 1] |
| 299 | EBUSY Controller busy | 361 | - EBUSY Controller busy |
| 362 | |||
| 300 | 363 | ||
| 301 | 364 | ||
| 365 | HDIO_GET_32BIT | ||
| 366 | get current io_32bit setting | ||
| 302 | 367 | ||
| 303 | HDIO_GET_32BIT get current io_32bit setting | ||
| 304 | 368 | ||
| 305 | usage: | 369 | usage:: |
| 306 | 370 | ||
| 307 | long val; | 371 | long val; |
| 372 | |||
| 308 | ioctl(fd, HDIO_GET_32BIT, &val); | 373 | ioctl(fd, HDIO_GET_32BIT, &val); |
| 309 | 374 | ||
| 310 | inputs: none | 375 | inputs: |
| 376 | none | ||
| 377 | |||
| 378 | |||
| 311 | 379 | ||
| 312 | outputs: | 380 | outputs: |
| 313 | The value of the current io_32bit setting | 381 | The value of the current io_32bit setting |
| 382 | |||
| 383 | |||
| 314 | 384 | ||
| 315 | notes: | 385 | notes: |
| 386 | 0=16-bit, 1=32-bit, 2,3 = 32bit+sync | ||
| 387 | |||
| 316 | 388 | ||
| 317 | 0=16-bit, 1=32-bit, 2,3 = 32bit+sync | ||
| 318 | 389 | ||
| 319 | 390 | ||
| 320 | 391 | ||
| 321 | HDIO_GET_NOWERR get ignore-write-error flag | 392 | HDIO_GET_NOWERR |
| 393 | get ignore-write-error flag | ||
| 322 | 394 | ||
| 323 | usage: | 395 | |
| 396 | usage:: | ||
| 324 | 397 | ||
| 325 | long val; | 398 | long val; |
| 399 | |||
| 326 | ioctl(fd, HDIO_GET_NOWERR, &val); | 400 | ioctl(fd, HDIO_GET_NOWERR, &val); |
| 327 | 401 | ||
| 328 | inputs: none | 402 | inputs: |
| 403 | none | ||
| 404 | |||
| 405 | |||
| 329 | 406 | ||
| 330 | outputs: | 407 | outputs: |
| 331 | The value of the current ignore-write-error flag | 408 | The value of the current ignore-write-error flag |
| 332 | 409 | ||
| 333 | 410 | ||
| 334 | 411 | ||
| 335 | HDIO_GET_DMA get use-dma flag | ||
| 336 | 412 | ||
| 337 | usage: | 413 | |
| 414 | HDIO_GET_DMA | ||
| 415 | get use-dma flag | ||
| 416 | |||
| 417 | |||
| 418 | usage:: | ||
| 338 | 419 | ||
| 339 | long val; | 420 | long val; |
| 421 | |||
| 340 | ioctl(fd, HDIO_GET_DMA, &val); | 422 | ioctl(fd, HDIO_GET_DMA, &val); |
| 341 | 423 | ||
| 342 | inputs: none | 424 | inputs: |
| 425 | none | ||
| 426 | |||
| 427 | |||
| 343 | 428 | ||
| 344 | outputs: | 429 | outputs: |
| 345 | The value of the current use-dma flag | 430 | The value of the current use-dma flag |
| 346 | 431 | ||
| 347 | 432 | ||
| 348 | 433 | ||
| 349 | HDIO_GET_NICE get nice flags | ||
| 350 | 434 | ||
| 351 | usage: | 435 | |
| 436 | HDIO_GET_NICE | ||
| 437 | get nice flags | ||
| 438 | |||
| 439 | |||
| 440 | usage:: | ||
| 352 | 441 | ||
| 353 | long nice; | 442 | long nice; |
| 443 | |||
| 354 | ioctl(fd, HDIO_GET_NICE, &nice); | 444 | ioctl(fd, HDIO_GET_NICE, &nice); |
| 355 | 445 | ||
| 356 | inputs: none | 446 | inputs: |
| 447 | none | ||
| 448 | |||
| 449 | |||
| 357 | 450 | ||
| 358 | outputs: | 451 | outputs: |
| 452 | The drive's "nice" values. | ||
| 453 | |||
| 359 | 454 | ||
| 360 | The drive's "nice" values. | ||
| 361 | 455 | ||
| 362 | notes: | 456 | notes: |
| 457 | Per-drive flags which determine when the system will give more | ||
| 458 | bandwidth to other devices sharing the same IDE bus. | ||
| 363 | 459 | ||
| 364 | Per-drive flags which determine when the system will give more | 460 | See <linux/hdreg.h>, near symbol IDE_NICE_DSC_OVERLAP. |
| 365 | bandwidth to other devices sharing the same IDE bus. | ||
| 366 | See <linux/hdreg.h>, near symbol IDE_NICE_DSC_OVERLAP. | ||
| 367 | 461 | ||
| 368 | 462 | ||
| 369 | 463 | ||
| 370 | 464 | ||
| 371 | HDIO_SET_NICE set nice flags | 465 | HDIO_SET_NICE |
| 466 | set nice flags | ||
| 372 | 467 | ||
| 373 | usage: | 468 | |
| 469 | usage:: | ||
| 374 | 470 | ||
| 375 | unsigned long nice; | 471 | unsigned long nice; |
| 472 | |||
| 376 | ... | 473 | ... |
| 377 | ioctl(fd, HDIO_SET_NICE, nice); | 474 | ioctl(fd, HDIO_SET_NICE, nice); |
| 378 | 475 | ||
| 379 | inputs: | 476 | inputs: |
| 380 | bitmask of nice flags. | 477 | bitmask of nice flags. |
| 478 | |||
| 479 | |||
| 480 | |||
| 481 | outputs: | ||
| 482 | none | ||
| 483 | |||
| 381 | 484 | ||
| 382 | outputs: none | ||
| 383 | 485 | ||
| 384 | error returns: | 486 | error returns: |
| 385 | EACCES Access denied: requires CAP_SYS_ADMIN | 487 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 386 | EPERM Flags other than DSC_OVERLAP and NICE_1 set. | 488 | - EPERM Flags other than DSC_OVERLAP and NICE_1 set. |
| 387 | EPERM DSC_OVERLAP specified but not supported by drive | 489 | - EPERM DSC_OVERLAP specified but not supported by drive |
| 388 | 490 | ||
| 389 | notes: | 491 | notes: |
| 492 | This ioctl sets the DSC_OVERLAP and NICE_1 flags from values | ||
| 493 | provided by the user. | ||
| 390 | 494 | ||
| 391 | This ioctl sets the DSC_OVERLAP and NICE_1 flags from values | 495 | Nice flags are listed in <linux/hdreg.h>, starting with |
| 392 | provided by the user. | 496 | IDE_NICE_DSC_OVERLAP. These values represent shifts. |
| 393 | 497 | ||
| 394 | Nice flags are listed in <linux/hdreg.h>, starting with | ||
| 395 | IDE_NICE_DSC_OVERLAP. These values represent shifts. | ||
| 396 | 498 | ||
| 397 | 499 | ||
| 398 | 500 | ||
| 399 | 501 | ||
| 502 | HDIO_GET_WCACHE | ||
| 503 | get write cache mode on|off | ||
| 400 | 504 | ||
| 401 | HDIO_GET_WCACHE get write cache mode on|off | ||
| 402 | 505 | ||
| 403 | usage: | 506 | usage:: |
| 404 | 507 | ||
| 405 | long val; | 508 | long val; |
| 509 | |||
| 406 | ioctl(fd, HDIO_GET_WCACHE, &val); | 510 | ioctl(fd, HDIO_GET_WCACHE, &val); |
| 407 | 511 | ||
| 408 | inputs: none | 512 | inputs: |
| 513 | none | ||
| 514 | |||
| 515 | |||
| 409 | 516 | ||
| 410 | outputs: | 517 | outputs: |
| 411 | The value of the current write cache mode | 518 | The value of the current write cache mode |
| 412 | 519 | ||
| 413 | 520 | ||
| 414 | 521 | ||
| 415 | HDIO_GET_ACOUSTIC get acoustic value | ||
| 416 | 522 | ||
| 417 | usage: | 523 | |
| 524 | HDIO_GET_ACOUSTIC | ||
| 525 | get acoustic value | ||
| 526 | |||
| 527 | |||
| 528 | usage:: | ||
| 418 | 529 | ||
| 419 | long val; | 530 | long val; |
| 531 | |||
| 420 | ioctl(fd, HDIO_GET_ACOUSTIC, &val); | 532 | ioctl(fd, HDIO_GET_ACOUSTIC, &val); |
| 421 | 533 | ||
| 422 | inputs: none | 534 | inputs: |
| 535 | none | ||
| 536 | |||
| 537 | |||
| 423 | 538 | ||
| 424 | outputs: | 539 | outputs: |
| 425 | The value of the current acoustic settings | 540 | The value of the current acoustic settings |
| 541 | |||
| 542 | |||
| 426 | 543 | ||
| 427 | notes: | 544 | notes: |
| 545 | See HDIO_SET_ACOUSTIC | ||
| 546 | |||
| 428 | 547 | ||
| 429 | See HDIO_SET_ACOUSTIC | ||
| 430 | 548 | ||
| 431 | 549 | ||
| 432 | 550 | ||
| 433 | HDIO_GET_ADDRESS | 551 | HDIO_GET_ADDRESS |
| 552 | usage:: | ||
| 434 | 553 | ||
| 435 | usage: | ||
| 436 | 554 | ||
| 437 | long val; | 555 | long val; |
| 556 | |||
| 438 | ioctl(fd, HDIO_GET_ADDRESS, &val); | 557 | ioctl(fd, HDIO_GET_ADDRESS, &val); |
| 439 | 558 | ||
| 440 | inputs: none | 559 | inputs: |
| 560 | none | ||
| 561 | |||
| 562 | |||
| 441 | 563 | ||
| 442 | outputs: | 564 | outputs: |
| 443 | The value of the current addressing mode: | 565 | The value of the current addressing mode: |
| 444 | 0 = 28-bit | 566 | |
| 445 | 1 = 48-bit | 567 | = =================== |
| 446 | 2 = 48-bit doing 28-bit | 568 | 0 28-bit |
| 447 | 3 = 64-bit | 569 | 1 48-bit |
| 570 | 2 48-bit doing 28-bit | ||
| 571 | 3 64-bit | ||
| 572 | = =================== | ||
| 448 | 573 | ||
| 449 | 574 | ||
| 450 | 575 | ||
| 451 | HDIO_GET_BUSSTATE get the bus state of the hwif | 576 | HDIO_GET_BUSSTATE |
| 577 | get the bus state of the hwif | ||
| 452 | 578 | ||
| 453 | usage: | 579 | |
| 580 | usage:: | ||
| 454 | 581 | ||
| 455 | long state; | 582 | long state; |
| 583 | |||
| 456 | ioctl(fd, HDIO_SCAN_HWIF, &state); | 584 | ioctl(fd, HDIO_SCAN_HWIF, &state); |
| 457 | 585 | ||
| 458 | inputs: none | 586 | inputs: |
| 587 | none | ||
| 588 | |||
| 589 | |||
| 459 | 590 | ||
| 460 | outputs: | 591 | outputs: |
| 461 | Current power state of the IDE bus. One of BUSSTATE_OFF, | 592 | Current power state of the IDE bus. One of BUSSTATE_OFF, |
| 462 | BUSSTATE_ON, or BUSSTATE_TRISTATE | 593 | BUSSTATE_ON, or BUSSTATE_TRISTATE |
| 463 | 594 | ||
| 464 | error returns: | 595 | error returns: |
| 465 | EACCES Access denied: requires CAP_SYS_ADMIN | 596 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 466 | 597 | ||
| 467 | 598 | ||
| 468 | 599 | ||
| 469 | 600 | ||
| 470 | HDIO_SET_BUSSTATE set the bus state of the hwif | 601 | HDIO_SET_BUSSTATE |
| 602 | set the bus state of the hwif | ||
| 471 | 603 | ||
| 472 | usage: | 604 | |
| 605 | usage:: | ||
| 473 | 606 | ||
| 474 | int state; | 607 | int state; |
| 608 | |||
| 475 | ... | 609 | ... |
| 476 | ioctl(fd, HDIO_SCAN_HWIF, state); | 610 | ioctl(fd, HDIO_SCAN_HWIF, state); |
| 477 | 611 | ||
| 478 | inputs: | 612 | inputs: |
| 479 | Desired IDE power state. One of BUSSTATE_OFF, BUSSTATE_ON, | 613 | Desired IDE power state. One of BUSSTATE_OFF, BUSSTATE_ON, |
| 480 | or BUSSTATE_TRISTATE | 614 | or BUSSTATE_TRISTATE |
| 615 | |||
| 616 | outputs: | ||
| 617 | none | ||
| 618 | |||
| 481 | 619 | ||
| 482 | outputs: none | ||
| 483 | 620 | ||
| 484 | error returns: | 621 | error returns: |
| 485 | EACCES Access denied: requires CAP_SYS_RAWIO | 622 | - EACCES Access denied: requires CAP_SYS_RAWIO |
| 486 | EOPNOTSUPP Hardware interface does not support bus power control | 623 | - EOPNOTSUPP Hardware interface does not support bus power control |
| 624 | |||
| 487 | 625 | ||
| 488 | 626 | ||
| 489 | 627 | ||
| 628 | HDIO_TRISTATE_HWIF | ||
| 629 | execute a channel tristate | ||
| 490 | 630 | ||
| 491 | HDIO_TRISTATE_HWIF execute a channel tristate | ||
| 492 | 631 | ||
| 493 | Not implemented, as of 2.6.8.1. See HDIO_SET_BUSSTATE | 632 | Not implemented, as of 2.6.8.1. See HDIO_SET_BUSSTATE |
| 494 | 633 | ||
| 495 | 634 | ||
| 496 | 635 | ||
| 497 | HDIO_DRIVE_RESET execute a device reset | 636 | HDIO_DRIVE_RESET |
| 637 | execute a device reset | ||
| 638 | |||
| 498 | 639 | ||
| 499 | usage: | 640 | usage:: |
| 500 | 641 | ||
| 501 | int args[3] | 642 | int args[3] |
| 643 | |||
| 502 | ... | 644 | ... |
| 503 | ioctl(fd, HDIO_DRIVE_RESET, args); | 645 | ioctl(fd, HDIO_DRIVE_RESET, args); |
| 504 | 646 | ||
| 505 | inputs: none | 647 | inputs: |
| 648 | none | ||
| 649 | |||
| 650 | |||
| 651 | |||
| 652 | outputs: | ||
| 653 | none | ||
| 654 | |||
| 506 | 655 | ||
| 507 | outputs: none | ||
| 508 | 656 | ||
| 509 | error returns: | 657 | error returns: |
| 510 | EACCES Access denied: requires CAP_SYS_ADMIN | 658 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 511 | ENXIO No such device: phy dead or ctl_addr == 0 | 659 | - ENXIO No such device: phy dead or ctl_addr == 0 |
| 512 | EIO I/O error: reset timed out or hardware error | 660 | - EIO I/O error: reset timed out or hardware error |
| 513 | 661 | ||
| 514 | notes: | 662 | notes: |
| 515 | 663 | ||
| 516 | Execute a reset on the device as soon as the current IO | 664 | - Execute a reset on the device as soon as the current IO |
| 517 | operation has completed. | 665 | operation has completed. |
| 518 | 666 | ||
| 519 | Executes an ATAPI soft reset if applicable, otherwise | 667 | - Executes an ATAPI soft reset if applicable, otherwise |
| 520 | executes an ATA soft reset on the controller. | 668 | executes an ATA soft reset on the controller. |
| 521 | 669 | ||
| 522 | 670 | ||
| 523 | 671 | ||
| 524 | HDIO_DRIVE_TASKFILE execute raw taskfile | 672 | HDIO_DRIVE_TASKFILE |
| 673 | execute raw taskfile | ||
| 525 | 674 | ||
| 526 | Note: If you don't have a copy of the ANSI ATA specification | ||
| 527 | handy, you should probably ignore this ioctl. | ||
| 528 | 675 | ||
| 529 | Execute an ATA disk command directly by writing the "taskfile" | 676 | Note: |
| 530 | registers of the drive. Requires ADMIN and RAWIO access | 677 | If you don't have a copy of the ANSI ATA specification |
| 531 | privileges. | 678 | handy, you should probably ignore this ioctl. |
| 679 | |||
| 680 | - Execute an ATA disk command directly by writing the "taskfile" | ||
| 681 | registers of the drive. Requires ADMIN and RAWIO access | ||
| 682 | privileges. | ||
| 532 | 683 | ||
| 533 | usage: | 684 | usage:: |
| 534 | 685 | ||
| 535 | struct { | 686 | struct { |
| 687 | |||
| 536 | ide_task_request_t req_task; | 688 | ide_task_request_t req_task; |
| 537 | u8 outbuf[OUTPUT_SIZE]; | 689 | u8 outbuf[OUTPUT_SIZE]; |
| 538 | u8 inbuf[INPUT_SIZE]; | 690 | u8 inbuf[INPUT_SIZE]; |
| @@ -548,6 +700,7 @@ HDIO_DRIVE_TASKFILE execute raw taskfile | |||
| 548 | 700 | ||
| 549 | (See below for details on memory area passed to ioctl.) | 701 | (See below for details on memory area passed to ioctl.) |
| 550 | 702 | ||
| 703 | ============ =================================================== | ||
| 551 | io_ports[8] values to be written to taskfile registers | 704 | io_ports[8] values to be written to taskfile registers |
| 552 | hob_ports[8] high-order bytes, for extended commands. | 705 | hob_ports[8] high-order bytes, for extended commands. |
| 553 | out_flags flags indicating which registers are valid | 706 | out_flags flags indicating which registers are valid |
| @@ -557,24 +710,29 @@ HDIO_DRIVE_TASKFILE execute raw taskfile | |||
| 557 | out_size size of output buffer | 710 | out_size size of output buffer |
| 558 | outbuf buffer of data to be transmitted to disk | 711 | outbuf buffer of data to be transmitted to disk |
| 559 | inbuf buffer of data to be received from disk (see [1]) | 712 | inbuf buffer of data to be received from disk (see [1]) |
| 713 | ============ =================================================== | ||
| 560 | 714 | ||
| 561 | outputs: | 715 | outputs: |
| 562 | 716 | ||
| 717 | =========== ==================================================== | ||
| 563 | io_ports[] values returned in the taskfile registers | 718 | io_ports[] values returned in the taskfile registers |
| 564 | hob_ports[] high-order bytes, for extended commands. | 719 | hob_ports[] high-order bytes, for extended commands. |
| 565 | out_flags flags indicating which registers are valid (see [2]) | 720 | out_flags flags indicating which registers are valid (see [2]) |
| 566 | in_flags flags indicating which registers should be returned | 721 | in_flags flags indicating which registers should be returned |
| 567 | outbuf buffer of data to be transmitted to disk (see [1]) | 722 | outbuf buffer of data to be transmitted to disk (see [1]) |
| 568 | inbuf buffer of data to be received from disk | 723 | inbuf buffer of data to be received from disk |
| 724 | =========== ==================================================== | ||
| 569 | 725 | ||
| 570 | error returns: | 726 | error returns: |
| 571 | EACCES CAP_SYS_ADMIN or CAP_SYS_RAWIO privilege not set. | 727 | - EACCES CAP_SYS_ADMIN or CAP_SYS_RAWIO privilege not set. |
| 572 | ENOMSG Device is not a disk drive. | 728 | - ENOMSG Device is not a disk drive. |
| 573 | ENOMEM Unable to allocate memory for task | 729 | - ENOMEM Unable to allocate memory for task |
| 574 | EFAULT req_cmd == TASKFILE_IN_OUT (not implemented as of 2.6.8) | 730 | - EFAULT req_cmd == TASKFILE_IN_OUT (not implemented as of 2.6.8) |
| 575 | EPERM req_cmd == TASKFILE_MULTI_OUT and drive | 731 | - EPERM |
| 576 | multi-count not yet set. | 732 | |
| 577 | EIO Drive failed the command. | 733 | req_cmd == TASKFILE_MULTI_OUT and drive |
| 734 | multi-count not yet set. | ||
| 735 | - EIO Drive failed the command. | ||
| 578 | 736 | ||
| 579 | notes: | 737 | notes: |
| 580 | 738 | ||
| @@ -615,22 +773,25 @@ HDIO_DRIVE_TASKFILE execute raw taskfile | |||
| 615 | Command is passed to the disk drive via the ide_task_request_t | 773 | Command is passed to the disk drive via the ide_task_request_t |
| 616 | structure, which contains these fields: | 774 | structure, which contains these fields: |
| 617 | 775 | ||
| 776 | ============ =============================================== | ||
| 618 | io_ports[8] values for the taskfile registers | 777 | io_ports[8] values for the taskfile registers |
| 619 | hob_ports[8] high-order bytes, for extended commands | 778 | hob_ports[8] high-order bytes, for extended commands |
| 620 | out_flags flags indicating which entries in the | 779 | out_flags flags indicating which entries in the |
| 621 | io_ports[] and hob_ports[] arrays | 780 | io_ports[] and hob_ports[] arrays |
| 622 | contain valid values. Type ide_reg_valid_t. | 781 | contain valid values. Type ide_reg_valid_t. |
| 623 | in_flags flags indicating which entries in the | 782 | in_flags flags indicating which entries in the |
| 624 | io_ports[] and hob_ports[] arrays | 783 | io_ports[] and hob_ports[] arrays |
| 625 | are expected to contain valid values | 784 | are expected to contain valid values |
| 626 | on return. | 785 | on return. |
| 627 | data_phase See below | 786 | data_phase See below |
| 628 | req_cmd Command type, see below | 787 | req_cmd Command type, see below |
| 629 | out_size output (user->drive) buffer size, bytes | 788 | out_size output (user->drive) buffer size, bytes |
| 630 | in_size input (drive->user) buffer size, bytes | 789 | in_size input (drive->user) buffer size, bytes |
| 790 | ============ =============================================== | ||
| 631 | 791 | ||
| 632 | When out_flags is zero, the following registers are loaded. | 792 | When out_flags is zero, the following registers are loaded. |
| 633 | 793 | ||
| 794 | ============ =============================================== | ||
| 634 | HOB_FEATURE If the drive supports LBA48 | 795 | HOB_FEATURE If the drive supports LBA48 |
| 635 | HOB_NSECTOR If the drive supports LBA48 | 796 | HOB_NSECTOR If the drive supports LBA48 |
| 636 | HOB_SECTOR If the drive supports LBA48 | 797 | HOB_SECTOR If the drive supports LBA48 |
| @@ -644,9 +805,11 @@ HDIO_DRIVE_TASKFILE execute raw taskfile | |||
| 644 | SELECT First, masked with 0xE0 if LBA48, 0xEF | 805 | SELECT First, masked with 0xE0 if LBA48, 0xEF |
| 645 | otherwise; then, or'ed with the default | 806 | otherwise; then, or'ed with the default |
| 646 | value of SELECT. | 807 | value of SELECT. |
| 808 | ============ =============================================== | ||
| 647 | 809 | ||
| 648 | If any bit in out_flags is set, the following registers are loaded. | 810 | If any bit in out_flags is set, the following registers are loaded. |
| 649 | 811 | ||
| 812 | ============ =============================================== | ||
| 650 | HOB_DATA If out_flags.b.data is set. HOB_DATA will | 813 | HOB_DATA If out_flags.b.data is set. HOB_DATA will |
| 651 | travel on DD8-DD15 on little endian machines | 814 | travel on DD8-DD15 on little endian machines |
| 652 | and on DD0-DD7 on big endian machines. | 815 | and on DD0-DD7 on big endian machines. |
| @@ -664,6 +827,7 @@ HDIO_DRIVE_TASKFILE execute raw taskfile | |||
| 664 | HCYL If out_flags.b.hcyl is set | 827 | HCYL If out_flags.b.hcyl is set |
| 665 | SELECT Or'ed with the default value of SELECT and | 828 | SELECT Or'ed with the default value of SELECT and |
| 666 | loaded regardless of out_flags.b.select. | 829 | loaded regardless of out_flags.b.select. |
| 830 | ============ =============================================== | ||
| 667 | 831 | ||
| 668 | Taskfile registers are read back from the drive into | 832 | Taskfile registers are read back from the drive into |
| 669 | {io|hob}_ports[] after the command completes iff one of the | 833 | {io|hob}_ports[] after the command completes iff one of the |
| @@ -674,6 +838,7 @@ HDIO_DRIVE_TASKFILE execute raw taskfile | |||
| 674 | 2. One or more than one bits are set in out_flags. | 838 | 2. One or more than one bits are set in out_flags. |
| 675 | 3. The requested data_phase is TASKFILE_NO_DATA. | 839 | 3. The requested data_phase is TASKFILE_NO_DATA. |
| 676 | 840 | ||
| 841 | ============ =============================================== | ||
| 677 | HOB_DATA If in_flags.b.data is set. It will contain | 842 | HOB_DATA If in_flags.b.data is set. It will contain |
| 678 | DD8-DD15 on little endian machines and | 843 | DD8-DD15 on little endian machines and |
| 679 | DD0-DD7 on big endian machines. | 844 | DD0-DD7 on big endian machines. |
| @@ -689,10 +854,12 @@ HDIO_DRIVE_TASKFILE execute raw taskfile | |||
| 689 | SECTOR | 854 | SECTOR |
| 690 | LCYL | 855 | LCYL |
| 691 | HCYL | 856 | HCYL |
| 857 | ============ =============================================== | ||
| 692 | 858 | ||
| 693 | The data_phase field describes the data transfer to be | 859 | The data_phase field describes the data transfer to be |
| 694 | performed. Value is one of: | 860 | performed. Value is one of: |
| 695 | 861 | ||
| 862 | =================== ======================================== | ||
| 696 | TASKFILE_IN | 863 | TASKFILE_IN |
| 697 | TASKFILE_MULTI_IN | 864 | TASKFILE_MULTI_IN |
| 698 | TASKFILE_OUT | 865 | TASKFILE_OUT |
| @@ -708,15 +875,18 @@ HDIO_DRIVE_TASKFILE execute raw taskfile | |||
| 708 | TASKFILE_P_OUT unimplemented | 875 | TASKFILE_P_OUT unimplemented |
| 709 | TASKFILE_P_OUT_DMA unimplemented | 876 | TASKFILE_P_OUT_DMA unimplemented |
| 710 | TASKFILE_P_OUT_DMAQ unimplemented | 877 | TASKFILE_P_OUT_DMAQ unimplemented |
| 878 | =================== ======================================== | ||
| 711 | 879 | ||
| 712 | The req_cmd field classifies the command type. It may be | 880 | The req_cmd field classifies the command type. It may be |
| 713 | one of: | 881 | one of: |
| 714 | 882 | ||
| 883 | ======================== ======================================= | ||
| 715 | IDE_DRIVE_TASK_NO_DATA | 884 | IDE_DRIVE_TASK_NO_DATA |
| 716 | IDE_DRIVE_TASK_SET_XFER unimplemented | 885 | IDE_DRIVE_TASK_SET_XFER unimplemented |
| 717 | IDE_DRIVE_TASK_IN | 886 | IDE_DRIVE_TASK_IN |
| 718 | IDE_DRIVE_TASK_OUT unimplemented | 887 | IDE_DRIVE_TASK_OUT unimplemented |
| 719 | IDE_DRIVE_TASK_RAW_WRITE | 888 | IDE_DRIVE_TASK_RAW_WRITE |
| 889 | ======================== ======================================= | ||
| 720 | 890 | ||
| 721 | [6] Do not access {in|out}_flags->all except for resetting | 891 | [6] Do not access {in|out}_flags->all except for resetting |
| 722 | all the bits. Always access individual bit fields. ->all | 892 | all the bits. Always access individual bit fields. ->all |
| @@ -726,45 +896,57 @@ HDIO_DRIVE_TASKFILE execute raw taskfile | |||
| 726 | 896 | ||
| 727 | 897 | ||
| 728 | 898 | ||
| 729 | HDIO_DRIVE_CMD execute a special drive command | 899 | HDIO_DRIVE_CMD |
| 900 | execute a special drive command | ||
| 901 | |||
| 730 | 902 | ||
| 731 | Note: If you don't have a copy of the ANSI ATA specification | 903 | Note: If you don't have a copy of the ANSI ATA specification |
| 732 | handy, you should probably ignore this ioctl. | 904 | handy, you should probably ignore this ioctl. |
| 733 | 905 | ||
| 734 | usage: | 906 | usage:: |
| 735 | 907 | ||
| 736 | u8 args[4+XFER_SIZE]; | 908 | u8 args[4+XFER_SIZE]; |
| 909 | |||
| 737 | ... | 910 | ... |
| 738 | ioctl(fd, HDIO_DRIVE_CMD, args); | 911 | ioctl(fd, HDIO_DRIVE_CMD, args); |
| 739 | 912 | ||
| 740 | inputs: | 913 | inputs: |
| 914 | Commands other than WIN_SMART: | ||
| 741 | 915 | ||
| 742 | Commands other than WIN_SMART | 916 | ======= ======= |
| 743 | args[0] COMMAND | 917 | args[0] COMMAND |
| 744 | args[1] NSECTOR | 918 | args[1] NSECTOR |
| 745 | args[2] FEATURE | 919 | args[2] FEATURE |
| 746 | args[3] NSECTOR | 920 | args[3] NSECTOR |
| 921 | ======= ======= | ||
| 922 | |||
| 923 | WIN_SMART: | ||
| 747 | 924 | ||
| 748 | WIN_SMART | 925 | ======= ======= |
| 749 | args[0] COMMAND | 926 | args[0] COMMAND |
| 750 | args[1] SECTOR | 927 | args[1] SECTOR |
| 751 | args[2] FEATURE | 928 | args[2] FEATURE |
| 752 | args[3] NSECTOR | 929 | args[3] NSECTOR |
| 930 | ======= ======= | ||
| 753 | 931 | ||
| 754 | outputs: | 932 | outputs: |
| 933 | args[] buffer is filled with register values followed by any | ||
| 934 | |||
| 755 | 935 | ||
| 756 | args[] buffer is filled with register values followed by any | ||
| 757 | data returned by the disk. | 936 | data returned by the disk. |
| 937 | |||
| 938 | ======== ==================================================== | ||
| 758 | args[0] status | 939 | args[0] status |
| 759 | args[1] error | 940 | args[1] error |
| 760 | args[2] NSECTOR | 941 | args[2] NSECTOR |
| 761 | args[3] undefined | 942 | args[3] undefined |
| 762 | args[4+] NSECTOR * 512 bytes of data returned by the command. | 943 | args[4+] NSECTOR * 512 bytes of data returned by the command. |
| 944 | ======== ==================================================== | ||
| 763 | 945 | ||
| 764 | error returns: | 946 | error returns: |
| 765 | EACCES Access denied: requires CAP_SYS_RAWIO | 947 | - EACCES Access denied: requires CAP_SYS_RAWIO |
| 766 | ENOMEM Unable to allocate memory for task | 948 | - ENOMEM Unable to allocate memory for task |
| 767 | EIO Drive reports error | 949 | - EIO Drive reports error |
| 768 | 950 | ||
| 769 | notes: | 951 | notes: |
| 770 | 952 | ||
| @@ -789,20 +971,24 @@ HDIO_DRIVE_CMD execute a special drive command | |||
| 789 | 971 | ||
| 790 | 972 | ||
| 791 | 973 | ||
| 792 | HDIO_DRIVE_TASK execute task and special drive command | 974 | HDIO_DRIVE_TASK |
| 975 | execute task and special drive command | ||
| 976 | |||
| 793 | 977 | ||
| 794 | Note: If you don't have a copy of the ANSI ATA specification | 978 | Note: If you don't have a copy of the ANSI ATA specification |
| 795 | handy, you should probably ignore this ioctl. | 979 | handy, you should probably ignore this ioctl. |
| 796 | 980 | ||
| 797 | usage: | 981 | usage:: |
| 798 | 982 | ||
| 799 | u8 args[7]; | 983 | u8 args[7]; |
| 984 | |||
| 800 | ... | 985 | ... |
| 801 | ioctl(fd, HDIO_DRIVE_TASK, args); | 986 | ioctl(fd, HDIO_DRIVE_TASK, args); |
| 802 | 987 | ||
| 803 | inputs: | 988 | inputs: |
| 989 | Taskfile register values: | ||
| 804 | 990 | ||
| 805 | Taskfile register values: | 991 | ======= ======= |
| 806 | args[0] COMMAND | 992 | args[0] COMMAND |
| 807 | args[1] FEATURE | 993 | args[1] FEATURE |
| 808 | args[2] NSECTOR | 994 | args[2] NSECTOR |
| @@ -810,10 +996,13 @@ HDIO_DRIVE_TASK execute task and special drive command | |||
| 810 | args[4] LCYL | 996 | args[4] LCYL |
| 811 | args[5] HCYL | 997 | args[5] HCYL |
| 812 | args[6] SELECT | 998 | args[6] SELECT |
| 999 | ======= ======= | ||
| 813 | 1000 | ||
| 814 | outputs: | 1001 | outputs: |
| 1002 | Taskfile register values: | ||
| 1003 | |||
| 815 | 1004 | ||
| 816 | Taskfile register values: | 1005 | ======= ======= |
| 817 | args[0] status | 1006 | args[0] status |
| 818 | args[1] error | 1007 | args[1] error |
| 819 | args[2] NSECTOR | 1008 | args[2] NSECTOR |
| @@ -821,12 +1010,13 @@ HDIO_DRIVE_TASK execute task and special drive command | |||
| 821 | args[4] LCYL | 1010 | args[4] LCYL |
| 822 | args[5] HCYL | 1011 | args[5] HCYL |
| 823 | args[6] SELECT | 1012 | args[6] SELECT |
| 1013 | ======= ======= | ||
| 824 | 1014 | ||
| 825 | error returns: | 1015 | error returns: |
| 826 | EACCES Access denied: requires CAP_SYS_RAWIO | 1016 | - EACCES Access denied: requires CAP_SYS_RAWIO |
| 827 | ENOMEM Unable to allocate memory for task | 1017 | - ENOMEM Unable to allocate memory for task |
| 828 | ENOMSG Device is not a disk drive. | 1018 | - ENOMSG Device is not a disk drive. |
| 829 | EIO Drive failed the command. | 1019 | - EIO Drive failed the command. |
| 830 | 1020 | ||
| 831 | notes: | 1021 | notes: |
| 832 | 1022 | ||
| @@ -836,236 +1026,317 @@ HDIO_DRIVE_TASK execute task and special drive command | |||
| 836 | 1026 | ||
| 837 | 1027 | ||
| 838 | 1028 | ||
| 839 | HDIO_DRIVE_CMD_AEB HDIO_DRIVE_TASK | 1029 | HDIO_DRIVE_CMD_AEB |
| 1030 | HDIO_DRIVE_TASK | ||
| 1031 | |||
| 840 | 1032 | ||
| 841 | Not implemented, as of 2.6.8.1 | 1033 | Not implemented, as of 2.6.8.1 |
| 842 | 1034 | ||
| 843 | 1035 | ||
| 844 | 1036 | ||
| 845 | HDIO_SET_32BIT change io_32bit flags | 1037 | HDIO_SET_32BIT |
| 1038 | change io_32bit flags | ||
| 1039 | |||
| 846 | 1040 | ||
| 847 | usage: | 1041 | usage:: |
| 848 | 1042 | ||
| 849 | int val; | 1043 | int val; |
| 1044 | |||
| 850 | ioctl(fd, HDIO_SET_32BIT, val); | 1045 | ioctl(fd, HDIO_SET_32BIT, val); |
| 851 | 1046 | ||
| 852 | inputs: | 1047 | inputs: |
| 853 | New value for io_32bit flag | 1048 | New value for io_32bit flag |
| 1049 | |||
| 1050 | |||
| 1051 | |||
| 1052 | outputs: | ||
| 1053 | none | ||
| 1054 | |||
| 854 | 1055 | ||
| 855 | outputs: none | ||
| 856 | 1056 | ||
| 857 | error return: | 1057 | error return: |
| 858 | EINVAL (bdev != bdev->bd_contains) (not sure what this means) | 1058 | - EINVAL (bdev != bdev->bd_contains) (not sure what this means) |
| 859 | EACCES Access denied: requires CAP_SYS_ADMIN | 1059 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 860 | EINVAL value out of range [0 3] | 1060 | - EINVAL value out of range [0 3] |
| 861 | EBUSY Controller busy | 1061 | - EBUSY Controller busy |
| 862 | 1062 | ||
| 863 | 1063 | ||
| 864 | 1064 | ||
| 865 | 1065 | ||
| 866 | HDIO_SET_NOWERR change ignore-write-error flag | 1066 | HDIO_SET_NOWERR |
| 1067 | change ignore-write-error flag | ||
| 867 | 1068 | ||
| 868 | usage: | 1069 | |
| 1070 | usage:: | ||
| 869 | 1071 | ||
| 870 | int val; | 1072 | int val; |
| 1073 | |||
| 871 | ioctl(fd, HDIO_SET_NOWERR, val); | 1074 | ioctl(fd, HDIO_SET_NOWERR, val); |
| 872 | 1075 | ||
| 873 | inputs: | 1076 | inputs: |
| 874 | New value for ignore-write-error flag. Used for ignoring | 1077 | New value for ignore-write-error flag. Used for ignoring |
| 1078 | |||
| 1079 | |||
| 875 | WRERR_STAT | 1080 | WRERR_STAT |
| 876 | 1081 | ||
| 877 | outputs: none | 1082 | outputs: |
| 1083 | none | ||
| 1084 | |||
| 1085 | |||
| 878 | 1086 | ||
| 879 | error return: | 1087 | error return: |
| 880 | EINVAL (bdev != bdev->bd_contains) (not sure what this means) | 1088 | - EINVAL (bdev != bdev->bd_contains) (not sure what this means) |
| 881 | EACCES Access denied: requires CAP_SYS_ADMIN | 1089 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 882 | EINVAL value out of range [0 1] | 1090 | - EINVAL value out of range [0 1] |
| 883 | EBUSY Controller busy | 1091 | - EBUSY Controller busy |
| 1092 | |||
| 884 | 1093 | ||
| 885 | 1094 | ||
| 1095 | HDIO_SET_DMA | ||
| 1096 | change use-dma flag | ||
| 886 | 1097 | ||
| 887 | HDIO_SET_DMA change use-dma flag | ||
| 888 | 1098 | ||
| 889 | usage: | 1099 | usage:: |
| 890 | 1100 | ||
| 891 | long val; | 1101 | long val; |
| 1102 | |||
| 892 | ioctl(fd, HDIO_SET_DMA, val); | 1103 | ioctl(fd, HDIO_SET_DMA, val); |
| 893 | 1104 | ||
| 894 | inputs: | 1105 | inputs: |
| 895 | New value for use-dma flag | 1106 | New value for use-dma flag |
| 1107 | |||
| 1108 | |||
| 1109 | |||
| 1110 | outputs: | ||
| 1111 | none | ||
| 1112 | |||
| 896 | 1113 | ||
| 897 | outputs: none | ||
| 898 | 1114 | ||
| 899 | error return: | 1115 | error return: |
| 900 | EINVAL (bdev != bdev->bd_contains) (not sure what this means) | 1116 | - EINVAL (bdev != bdev->bd_contains) (not sure what this means) |
| 901 | EACCES Access denied: requires CAP_SYS_ADMIN | 1117 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 902 | EINVAL value out of range [0 1] | 1118 | - EINVAL value out of range [0 1] |
| 903 | EBUSY Controller busy | 1119 | - EBUSY Controller busy |
| 1120 | |||
| 904 | 1121 | ||
| 905 | 1122 | ||
| 1123 | HDIO_SET_PIO_MODE | ||
| 1124 | reconfig interface to new speed | ||
| 906 | 1125 | ||
| 907 | HDIO_SET_PIO_MODE reconfig interface to new speed | ||
| 908 | 1126 | ||
| 909 | usage: | 1127 | usage:: |
| 910 | 1128 | ||
| 911 | long val; | 1129 | long val; |
| 1130 | |||
| 912 | ioctl(fd, HDIO_SET_PIO_MODE, val); | 1131 | ioctl(fd, HDIO_SET_PIO_MODE, val); |
| 913 | 1132 | ||
| 914 | inputs: | 1133 | inputs: |
| 915 | New interface speed. | 1134 | New interface speed. |
| 1135 | |||
| 1136 | |||
| 1137 | |||
| 1138 | outputs: | ||
| 1139 | none | ||
| 1140 | |||
| 916 | 1141 | ||
| 917 | outputs: none | ||
| 918 | 1142 | ||
| 919 | error return: | 1143 | error return: |
| 920 | EINVAL (bdev != bdev->bd_contains) (not sure what this means) | 1144 | - EINVAL (bdev != bdev->bd_contains) (not sure what this means) |
| 921 | EACCES Access denied: requires CAP_SYS_ADMIN | 1145 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 922 | EINVAL value out of range [0 255] | 1146 | - EINVAL value out of range [0 255] |
| 923 | EBUSY Controller busy | 1147 | - EBUSY Controller busy |
| 1148 | |||
| 924 | 1149 | ||
| 925 | 1150 | ||
| 1151 | HDIO_SCAN_HWIF | ||
| 1152 | register and (re)scan interface | ||
| 926 | 1153 | ||
| 927 | HDIO_SCAN_HWIF register and (re)scan interface | ||
| 928 | 1154 | ||
| 929 | usage: | 1155 | usage:: |
| 930 | 1156 | ||
| 931 | int args[3] | 1157 | int args[3] |
| 1158 | |||
| 932 | ... | 1159 | ... |
| 933 | ioctl(fd, HDIO_SCAN_HWIF, args); | 1160 | ioctl(fd, HDIO_SCAN_HWIF, args); |
| 934 | 1161 | ||
| 935 | inputs: | 1162 | inputs: |
| 1163 | |||
| 1164 | ======= ========================= | ||
| 936 | args[0] io address to probe | 1165 | args[0] io address to probe |
| 1166 | |||
| 1167 | |||
| 937 | args[1] control address to probe | 1168 | args[1] control address to probe |
| 938 | args[2] irq number | 1169 | args[2] irq number |
| 1170 | ======= ========================= | ||
| 1171 | |||
| 1172 | outputs: | ||
| 1173 | none | ||
| 1174 | |||
| 939 | 1175 | ||
| 940 | outputs: none | ||
| 941 | 1176 | ||
| 942 | error returns: | 1177 | error returns: |
| 943 | EACCES Access denied: requires CAP_SYS_RAWIO | 1178 | - EACCES Access denied: requires CAP_SYS_RAWIO |
| 944 | EIO Probe failed. | 1179 | - EIO Probe failed. |
| 945 | 1180 | ||
| 946 | notes: | 1181 | notes: |
| 1182 | This ioctl initializes the addresses and irq for a disk | ||
| 1183 | controller, probes for drives, and creates /proc/ide | ||
| 1184 | interfaces as appropriate. | ||
| 947 | 1185 | ||
| 948 | This ioctl initializes the addresses and irq for a disk | ||
| 949 | controller, probes for drives, and creates /proc/ide | ||
| 950 | interfaces as appropriate. | ||
| 951 | 1186 | ||
| 952 | 1187 | ||
| 1188 | HDIO_UNREGISTER_HWIF | ||
| 1189 | unregister interface | ||
| 953 | 1190 | ||
| 954 | HDIO_UNREGISTER_HWIF unregister interface | ||
| 955 | 1191 | ||
| 956 | usage: | 1192 | usage:: |
| 957 | 1193 | ||
| 958 | int index; | 1194 | int index; |
| 1195 | |||
| 959 | ioctl(fd, HDIO_UNREGISTER_HWIF, index); | 1196 | ioctl(fd, HDIO_UNREGISTER_HWIF, index); |
| 960 | 1197 | ||
| 961 | inputs: | 1198 | inputs: |
| 962 | index index of hardware interface to unregister | 1199 | index index of hardware interface to unregister |
| 1200 | |||
| 1201 | |||
| 1202 | |||
| 1203 | outputs: | ||
| 1204 | none | ||
| 1205 | |||
| 963 | 1206 | ||
| 964 | outputs: none | ||
| 965 | 1207 | ||
| 966 | error returns: | 1208 | error returns: |
| 967 | EACCES Access denied: requires CAP_SYS_RAWIO | 1209 | - EACCES Access denied: requires CAP_SYS_RAWIO |
| 968 | 1210 | ||
| 969 | notes: | 1211 | notes: |
| 1212 | This ioctl removes a hardware interface from the kernel. | ||
| 970 | 1213 | ||
| 971 | This ioctl removes a hardware interface from the kernel. | 1214 | Currently (2.6.8) this ioctl silently fails if any drive on |
| 1215 | the interface is busy. | ||
| 972 | 1216 | ||
| 973 | Currently (2.6.8) this ioctl silently fails if any drive on | ||
| 974 | the interface is busy. | ||
| 975 | 1217 | ||
| 976 | 1218 | ||
| 1219 | HDIO_SET_WCACHE | ||
| 1220 | change write cache enable-disable | ||
| 977 | 1221 | ||
| 978 | HDIO_SET_WCACHE change write cache enable-disable | ||
| 979 | 1222 | ||
| 980 | usage: | 1223 | usage:: |
| 981 | 1224 | ||
| 982 | int val; | 1225 | int val; |
| 1226 | |||
| 983 | ioctl(fd, HDIO_SET_WCACHE, val); | 1227 | ioctl(fd, HDIO_SET_WCACHE, val); |
| 984 | 1228 | ||
| 985 | inputs: | 1229 | inputs: |
| 986 | New value for write cache enable | 1230 | New value for write cache enable |
| 1231 | |||
| 1232 | |||
| 1233 | |||
| 1234 | outputs: | ||
| 1235 | none | ||
| 1236 | |||
| 987 | 1237 | ||
| 988 | outputs: none | ||
| 989 | 1238 | ||
| 990 | error return: | 1239 | error return: |
| 991 | EINVAL (bdev != bdev->bd_contains) (not sure what this means) | 1240 | - EINVAL (bdev != bdev->bd_contains) (not sure what this means) |
| 992 | EACCES Access denied: requires CAP_SYS_ADMIN | 1241 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 993 | EINVAL value out of range [0 1] | 1242 | - EINVAL value out of range [0 1] |
| 994 | EBUSY Controller busy | 1243 | - EBUSY Controller busy |
| 1244 | |||
| 995 | 1245 | ||
| 996 | 1246 | ||
| 1247 | HDIO_SET_ACOUSTIC | ||
| 1248 | change acoustic behavior | ||
| 997 | 1249 | ||
| 998 | HDIO_SET_ACOUSTIC change acoustic behavior | ||
| 999 | 1250 | ||
| 1000 | usage: | 1251 | usage:: |
| 1001 | 1252 | ||
| 1002 | int val; | 1253 | int val; |
| 1254 | |||
| 1003 | ioctl(fd, HDIO_SET_ACOUSTIC, val); | 1255 | ioctl(fd, HDIO_SET_ACOUSTIC, val); |
| 1004 | 1256 | ||
| 1005 | inputs: | 1257 | inputs: |
| 1006 | New value for drive acoustic settings | 1258 | New value for drive acoustic settings |
| 1259 | |||
| 1260 | |||
| 1261 | |||
| 1262 | outputs: | ||
| 1263 | none | ||
| 1264 | |||
| 1007 | 1265 | ||
| 1008 | outputs: none | ||
| 1009 | 1266 | ||
| 1010 | error return: | 1267 | error return: |
| 1011 | EINVAL (bdev != bdev->bd_contains) (not sure what this means) | 1268 | - EINVAL (bdev != bdev->bd_contains) (not sure what this means) |
| 1012 | EACCES Access denied: requires CAP_SYS_ADMIN | 1269 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 1013 | EINVAL value out of range [0 254] | 1270 | - EINVAL value out of range [0 254] |
| 1014 | EBUSY Controller busy | 1271 | - EBUSY Controller busy |
| 1015 | 1272 | ||
| 1016 | 1273 | ||
| 1017 | 1274 | ||
| 1018 | HDIO_SET_QDMA change use-qdma flag | 1275 | HDIO_SET_QDMA |
| 1276 | change use-qdma flag | ||
| 1277 | |||
| 1019 | 1278 | ||
| 1020 | Not implemented, as of 2.6.8.1 | 1279 | Not implemented, as of 2.6.8.1 |
| 1021 | 1280 | ||
| 1022 | 1281 | ||
| 1023 | 1282 | ||
| 1024 | HDIO_SET_ADDRESS change lba addressing modes | 1283 | HDIO_SET_ADDRESS |
| 1284 | change lba addressing modes | ||
| 1285 | |||
| 1025 | 1286 | ||
| 1026 | usage: | 1287 | usage:: |
| 1027 | 1288 | ||
| 1028 | int val; | 1289 | int val; |
| 1290 | |||
| 1029 | ioctl(fd, HDIO_SET_ADDRESS, val); | 1291 | ioctl(fd, HDIO_SET_ADDRESS, val); |
| 1030 | 1292 | ||
| 1031 | inputs: | 1293 | inputs: |
| 1032 | New value for addressing mode | 1294 | New value for addressing mode |
| 1033 | 0 = 28-bit | 1295 | |
| 1034 | 1 = 48-bit | 1296 | = =================== |
| 1035 | 2 = 48-bit doing 28-bit | 1297 | 0 28-bit |
| 1298 | 1 48-bit | ||
| 1299 | 2 48-bit doing 28-bit | ||
| 1300 | = =================== | ||
| 1301 | |||
| 1302 | outputs: | ||
| 1303 | none | ||
| 1304 | |||
| 1036 | 1305 | ||
| 1037 | outputs: none | ||
| 1038 | 1306 | ||
| 1039 | error return: | 1307 | error return: |
| 1040 | EINVAL (bdev != bdev->bd_contains) (not sure what this means) | 1308 | - EINVAL (bdev != bdev->bd_contains) (not sure what this means) |
| 1041 | EACCES Access denied: requires CAP_SYS_ADMIN | 1309 | - EACCES Access denied: requires CAP_SYS_ADMIN |
| 1042 | EINVAL value out of range [0 2] | 1310 | - EINVAL value out of range [0 2] |
| 1043 | EBUSY Controller busy | 1311 | - EBUSY Controller busy |
| 1044 | EIO Drive does not support lba48 mode. | 1312 | - EIO Drive does not support lba48 mode. |
| 1045 | 1313 | ||
| 1046 | 1314 | ||
| 1047 | HDIO_SET_IDE_SCSI | 1315 | HDIO_SET_IDE_SCSI |
| 1316 | usage:: | ||
| 1048 | 1317 | ||
| 1049 | usage: | ||
| 1050 | 1318 | ||
| 1051 | long val; | 1319 | long val; |
| 1320 | |||
| 1052 | ioctl(fd, HDIO_SET_IDE_SCSI, val); | 1321 | ioctl(fd, HDIO_SET_IDE_SCSI, val); |
| 1053 | 1322 | ||
| 1054 | inputs: | 1323 | inputs: |
| 1055 | New value for scsi emulation mode (?) | 1324 | New value for scsi emulation mode (?) |
| 1056 | 1325 | ||
| 1057 | outputs: none | ||
| 1058 | 1326 | ||
| 1059 | error return: | ||
| 1060 | EINVAL (bdev != bdev->bd_contains) (not sure what this means) | ||
| 1061 | EACCES Access denied: requires CAP_SYS_ADMIN | ||
| 1062 | EINVAL value out of range [0 1] | ||
| 1063 | EBUSY Controller busy | ||
| 1064 | 1327 | ||
| 1328 | outputs: | ||
| 1329 | none | ||
| 1065 | 1330 | ||
| 1066 | 1331 | ||
| 1067 | HDIO_SET_SCSI_IDE | ||
| 1068 | 1332 | ||
| 1069 | Not implemented, as of 2.6.8.1 | 1333 | error return: |
| 1334 | - EINVAL (bdev != bdev->bd_contains) (not sure what this means) | ||
| 1335 | - EACCES Access denied: requires CAP_SYS_ADMIN | ||
| 1336 | - EINVAL value out of range [0 1] | ||
| 1337 | - EBUSY Controller busy | ||
| 1070 | 1338 | ||
| 1071 | 1339 | ||
| 1340 | |||
| 1341 | HDIO_SET_SCSI_IDE | ||
| 1342 | Not implemented, as of 2.6.8.1 | ||
diff --git a/Documentation/ioctl/index.rst b/Documentation/ioctl/index.rst new file mode 100644 index 000000000000..0f0a857f6615 --- /dev/null +++ b/Documentation/ioctl/index.rst | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ====== | ||
| 4 | IOCTLs | ||
| 5 | ====== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | ioctl-number | ||
| 11 | |||
| 12 | botching-up-ioctls | ||
| 13 | ioctl-decoding | ||
| 14 | |||
| 15 | cdrom | ||
| 16 | hdio | ||
diff --git a/Documentation/ioctl/ioctl-decoding.txt b/Documentation/ioctl/ioctl-decoding.rst index e35efb0cec2e..380d6bb3e3ea 100644 --- a/Documentation/ioctl/ioctl-decoding.txt +++ b/Documentation/ioctl/ioctl-decoding.rst | |||
| @@ -1,10 +1,16 @@ | |||
| 1 | ============================== | ||
| 2 | Decoding an IOCTL Magic Number | ||
| 3 | ============================== | ||
| 4 | |||
| 1 | To decode a hex IOCTL code: | 5 | To decode a hex IOCTL code: |
| 2 | 6 | ||
| 3 | Most architectures use this generic format, but check | 7 | Most architectures use this generic format, but check |
| 4 | include/ARCH/ioctl.h for specifics, e.g. powerpc | 8 | include/ARCH/ioctl.h for specifics, e.g. powerpc |
| 5 | uses 3 bits to encode read/write and 13 bits for size. | 9 | uses 3 bits to encode read/write and 13 bits for size. |
| 6 | 10 | ||
| 7 | bits meaning | 11 | ====== ================================== |
| 12 | bits meaning | ||
| 13 | ====== ================================== | ||
| 8 | 31-30 00 - no parameters: uses _IO macro | 14 | 31-30 00 - no parameters: uses _IO macro |
| 9 | 10 - read: _IOR | 15 | 10 - read: _IOR |
| 10 | 01 - write: _IOW | 16 | 01 - write: _IOW |
| @@ -16,9 +22,10 @@ uses 3 bits to encode read/write and 13 bits for size. | |||
| 16 | unique to each driver | 22 | unique to each driver |
| 17 | 23 | ||
| 18 | 7-0 function # | 24 | 7-0 function # |
| 25 | ====== ================================== | ||
| 19 | 26 | ||
| 20 | 27 | ||
| 21 | So for example 0x82187201 is a read with arg length of 0x218, | 28 | So for example 0x82187201 is a read with arg length of 0x218, |
| 22 | character 'r' function 1. Grepping the source reveals this is: | 29 | character 'r' function 1. Grepping the source reveals this is:: |
| 23 | 30 | ||
| 24 | #define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct dirent [2]) | 31 | #define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct dirent [2]) |
diff --git a/Documentation/ioctl/ioctl-number.rst b/Documentation/ioctl/ioctl-number.rst new file mode 100644 index 000000000000..7f8dcae7a230 --- /dev/null +++ b/Documentation/ioctl/ioctl-number.rst | |||
| @@ -0,0 +1,361 @@ | |||
| 1 | ============= | ||
| 2 | Ioctl Numbers | ||
| 3 | ============= | ||
| 4 | |||
| 5 | 19 October 1999 | ||
| 6 | |||
| 7 | Michael Elizabeth Chastain | ||
| 8 | <mec@shout.net> | ||
| 9 | |||
| 10 | If you are adding new ioctl's to the kernel, you should use the _IO | ||
| 11 | macros defined in <linux/ioctl.h>: | ||
| 12 | |||
| 13 | ====== == ============================================ | ||
| 14 | _IO an ioctl with no parameters | ||
| 15 | _IOW an ioctl with write parameters (copy_from_user) | ||
| 16 | _IOR an ioctl with read parameters (copy_to_user) | ||
| 17 | _IOWR an ioctl with both write and read parameters. | ||
| 18 | ====== == ============================================ | ||
| 19 | |||
| 20 | 'Write' and 'read' are from the user's point of view, just like the | ||
| 21 | system calls 'write' and 'read'. For example, a SET_FOO ioctl would | ||
| 22 | be _IOW, although the kernel would actually read data from user space; | ||
| 23 | a GET_FOO ioctl would be _IOR, although the kernel would actually write | ||
| 24 | data to user space. | ||
| 25 | |||
| 26 | The first argument to _IO, _IOW, _IOR, or _IOWR is an identifying letter | ||
| 27 | or number from the table below. Because of the large number of drivers, | ||
| 28 | many drivers share a partial letter with other drivers. | ||
| 29 | |||
| 30 | If you are writing a driver for a new device and need a letter, pick an | ||
| 31 | unused block with enough room for expansion: 32 to 256 ioctl commands. | ||
| 32 | You can register the block by patching this file and submitting the | ||
| 33 | patch to Linus Torvalds. Or you can e-mail me at <mec@shout.net> and | ||
| 34 | I'll register one for you. | ||
| 35 | |||
| 36 | The second argument to _IO, _IOW, _IOR, or _IOWR is a sequence number | ||
| 37 | to distinguish ioctls from each other. The third argument to _IOW, | ||
| 38 | _IOR, or _IOWR is the type of the data going into the kernel or coming | ||
| 39 | out of the kernel (e.g. 'int' or 'struct foo'). NOTE! Do NOT use | ||
| 40 | sizeof(arg) as the third argument as this results in your ioctl thinking | ||
| 41 | it passes an argument of type size_t. | ||
| 42 | |||
| 43 | Some devices use their major number as the identifier; this is OK, as | ||
| 44 | long as it is unique. Some devices are irregular and don't follow any | ||
| 45 | convention at all. | ||
| 46 | |||
| 47 | Following this convention is good because: | ||
| 48 | |||
| 49 | (1) Keeping the ioctl's globally unique helps error checking: | ||
| 50 | if a program calls an ioctl on the wrong device, it will get an | ||
| 51 | error rather than some unexpected behaviour. | ||
| 52 | |||
| 53 | (2) The 'strace' build procedure automatically finds ioctl numbers | ||
| 54 | defined with _IO, _IOW, _IOR, or _IOWR. | ||
| 55 | |||
| 56 | (3) 'strace' can decode numbers back into useful names when the | ||
| 57 | numbers are unique. | ||
| 58 | |||
| 59 | (4) People looking for ioctls can grep for them more easily when | ||
| 60 | this convention is used to define the ioctl numbers. | ||
| 61 | |||
| 62 | (5) When following the convention, the driver code can use generic | ||
| 63 | code to copy the parameters between user and kernel space. | ||
| 64 | |||
| 65 | This table lists ioctls visible from user land for Linux/x86. It contains | ||
| 66 | most drivers up to 2.6.31, but I know I am missing some. There has been | ||
| 67 | no attempt to list non-X86 architectures or ioctls from drivers/staging/. | ||
| 68 | |||
| 69 | ==== ===== ======================================================= ================================================================ | ||
| 70 | Code Seq# Include File Comments | ||
| 71 | (hex) | ||
| 72 | ==== ===== ======================================================= ================================================================ | ||
| 73 | 0x00 00-1F linux/fs.h conflict! | ||
| 74 | 0x00 00-1F scsi/scsi_ioctl.h conflict! | ||
| 75 | 0x00 00-1F linux/fb.h conflict! | ||
| 76 | 0x00 00-1F linux/wavefront.h conflict! | ||
| 77 | 0x02 all linux/fd.h | ||
| 78 | 0x03 all linux/hdreg.h | ||
| 79 | 0x04 D2-DC linux/umsdos_fs.h Dead since 2.6.11, but don't reuse these. | ||
| 80 | 0x06 all linux/lp.h | ||
| 81 | 0x09 all linux/raid/md_u.h | ||
| 82 | 0x10 00-0F drivers/char/s390/vmcp.h | ||
| 83 | 0x10 10-1F arch/s390/include/uapi/sclp_ctl.h | ||
| 84 | 0x10 20-2F arch/s390/include/uapi/asm/hypfs.h | ||
| 85 | 0x12 all linux/fs.h | ||
| 86 | linux/blkpg.h | ||
| 87 | 0x1b all InfiniBand Subsystem | ||
| 88 | <http://infiniband.sourceforge.net/> | ||
| 89 | 0x20 all drivers/cdrom/cm206.h | ||
| 90 | 0x22 all scsi/sg.h | ||
| 91 | '!' 00-1F uapi/linux/seccomp.h | ||
| 92 | '#' 00-3F IEEE 1394 Subsystem | ||
| 93 | Block for the entire subsystem | ||
| 94 | '$' 00-0F linux/perf_counter.h, linux/perf_event.h | ||
| 95 | '%' 00-0F include/uapi/linux/stm.h System Trace Module subsystem | ||
| 96 | <mailto:alexander.shishkin@linux.intel.com> | ||
| 97 | '&' 00-07 drivers/firewire/nosy-user.h | ||
| 98 | '1' 00-1F linux/timepps.h PPS kit from Ulrich Windl | ||
| 99 | <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/> | ||
| 100 | '2' 01-04 linux/i2o.h | ||
| 101 | '3' 00-0F drivers/s390/char/raw3270.h conflict! | ||
| 102 | '3' 00-1F linux/suspend_ioctls.h, conflict! | ||
| 103 | kernel/power/user.c | ||
| 104 | '8' all SNP8023 advanced NIC card | ||
| 105 | <mailto:mcr@solidum.com> | ||
| 106 | ';' 64-7F linux/vfio.h | ||
| 107 | '@' 00-0F linux/radeonfb.h conflict! | ||
| 108 | '@' 00-0F drivers/video/aty/aty128fb.c conflict! | ||
| 109 | 'A' 00-1F linux/apm_bios.h conflict! | ||
| 110 | 'A' 00-0F linux/agpgart.h, conflict! | ||
| 111 | drivers/char/agp/compat_ioctl.h | ||
| 112 | 'A' 00-7F sound/asound.h conflict! | ||
| 113 | 'B' 00-1F linux/cciss_ioctl.h conflict! | ||
| 114 | 'B' 00-0F include/linux/pmu.h conflict! | ||
| 115 | 'B' C0-FF advanced bbus <mailto:maassen@uni-freiburg.de> | ||
| 116 | 'C' all linux/soundcard.h conflict! | ||
| 117 | 'C' 01-2F linux/capi.h conflict! | ||
| 118 | 'C' F0-FF drivers/net/wan/cosa.h conflict! | ||
| 119 | 'D' all arch/s390/include/asm/dasd.h | ||
| 120 | 'D' 40-5F drivers/scsi/dpt/dtpi_ioctl.h | ||
| 121 | 'D' 05 drivers/scsi/pmcraid.h | ||
| 122 | 'E' all linux/input.h conflict! | ||
| 123 | 'E' 00-0F xen/evtchn.h conflict! | ||
| 124 | 'F' all linux/fb.h conflict! | ||
| 125 | 'F' 01-02 drivers/scsi/pmcraid.h conflict! | ||
| 126 | 'F' 20 drivers/video/fsl-diu-fb.h conflict! | ||
| 127 | 'F' 20 drivers/video/intelfb/intelfb.h conflict! | ||
| 128 | 'F' 20 linux/ivtvfb.h conflict! | ||
| 129 | 'F' 20 linux/matroxfb.h conflict! | ||
| 130 | 'F' 20 drivers/video/aty/atyfb_base.c conflict! | ||
| 131 | 'F' 00-0F video/da8xx-fb.h conflict! | ||
| 132 | 'F' 80-8F linux/arcfb.h conflict! | ||
| 133 | 'F' DD video/sstfb.h conflict! | ||
| 134 | 'G' 00-3F drivers/misc/sgi-gru/grulib.h conflict! | ||
| 135 | 'G' 00-0F linux/gigaset_dev.h conflict! | ||
| 136 | 'H' 00-7F linux/hiddev.h conflict! | ||
| 137 | 'H' 00-0F linux/hidraw.h conflict! | ||
| 138 | 'H' 01 linux/mei.h conflict! | ||
| 139 | 'H' 02 linux/mei.h conflict! | ||
| 140 | 'H' 03 linux/mei.h conflict! | ||
| 141 | 'H' 00-0F sound/asound.h conflict! | ||
| 142 | 'H' 20-40 sound/asound_fm.h conflict! | ||
| 143 | 'H' 80-8F sound/sfnt_info.h conflict! | ||
| 144 | 'H' 10-8F sound/emu10k1.h conflict! | ||
| 145 | 'H' 10-1F sound/sb16_csp.h conflict! | ||
| 146 | 'H' 10-1F sound/hda_hwdep.h conflict! | ||
| 147 | 'H' 40-4F sound/hdspm.h conflict! | ||
| 148 | 'H' 40-4F sound/hdsp.h conflict! | ||
| 149 | 'H' 90 sound/usb/usx2y/usb_stream.h | ||
| 150 | 'H' A0 uapi/linux/usb/cdc-wdm.h | ||
| 151 | 'H' C0-F0 net/bluetooth/hci.h conflict! | ||
| 152 | 'H' C0-DF net/bluetooth/hidp/hidp.h conflict! | ||
| 153 | 'H' C0-DF net/bluetooth/cmtp/cmtp.h conflict! | ||
| 154 | 'H' C0-DF net/bluetooth/bnep/bnep.h conflict! | ||
| 155 | 'H' F1 linux/hid-roccat.h <mailto:erazor_de@users.sourceforge.net> | ||
| 156 | 'H' F8-FA sound/firewire.h | ||
| 157 | 'I' all linux/isdn.h conflict! | ||
| 158 | 'I' 00-0F drivers/isdn/divert/isdn_divert.h conflict! | ||
| 159 | 'I' 40-4F linux/mISDNif.h conflict! | ||
| 160 | 'J' 00-1F drivers/scsi/gdth_ioctl.h | ||
| 161 | 'K' all linux/kd.h | ||
| 162 | 'L' 00-1F linux/loop.h conflict! | ||
| 163 | 'L' 10-1F drivers/scsi/mpt3sas/mpt3sas_ctl.h conflict! | ||
| 164 | 'L' 20-2F linux/lightnvm.h | ||
| 165 | 'L' E0-FF linux/ppdd.h encrypted disk device driver | ||
| 166 | <http://linux01.gwdg.de/~alatham/ppdd.html> | ||
| 167 | 'M' all linux/soundcard.h conflict! | ||
| 168 | 'M' 01-16 mtd/mtd-abi.h conflict! | ||
| 169 | and drivers/mtd/mtdchar.c | ||
| 170 | 'M' 01-03 drivers/scsi/megaraid/megaraid_sas.h | ||
| 171 | 'M' 00-0F drivers/video/fsl-diu-fb.h conflict! | ||
| 172 | 'N' 00-1F drivers/usb/scanner.h | ||
| 173 | 'N' 40-7F drivers/block/nvme.c | ||
| 174 | 'O' 00-06 mtd/ubi-user.h UBI | ||
| 175 | 'P' all linux/soundcard.h conflict! | ||
| 176 | 'P' 60-6F sound/sscape_ioctl.h conflict! | ||
| 177 | 'P' 00-0F drivers/usb/class/usblp.c conflict! | ||
| 178 | 'P' 01-09 drivers/misc/pci_endpoint_test.c conflict! | ||
| 179 | 'Q' all linux/soundcard.h | ||
| 180 | 'R' 00-1F linux/random.h conflict! | ||
| 181 | 'R' 01 linux/rfkill.h conflict! | ||
| 182 | 'R' C0-DF net/bluetooth/rfcomm.h | ||
| 183 | 'S' all linux/cdrom.h conflict! | ||
| 184 | 'S' 80-81 scsi/scsi_ioctl.h conflict! | ||
| 185 | 'S' 82-FF scsi/scsi.h conflict! | ||
| 186 | 'S' 00-7F sound/asequencer.h conflict! | ||
| 187 | 'T' all linux/soundcard.h conflict! | ||
| 188 | 'T' 00-AF sound/asound.h conflict! | ||
| 189 | 'T' all arch/x86/include/asm/ioctls.h conflict! | ||
| 190 | 'T' C0-DF linux/if_tun.h conflict! | ||
| 191 | 'U' all sound/asound.h conflict! | ||
| 192 | 'U' 00-CF linux/uinput.h conflict! | ||
| 193 | 'U' 00-EF linux/usbdevice_fs.h | ||
| 194 | 'U' C0-CF drivers/bluetooth/hci_uart.h | ||
| 195 | 'V' all linux/vt.h conflict! | ||
| 196 | 'V' all linux/videodev2.h conflict! | ||
| 197 | 'V' C0 linux/ivtvfb.h conflict! | ||
| 198 | 'V' C0 linux/ivtv.h conflict! | ||
| 199 | 'V' C0 media/davinci/vpfe_capture.h conflict! | ||
| 200 | 'V' C0 media/si4713.h conflict! | ||
| 201 | 'W' 00-1F linux/watchdog.h conflict! | ||
| 202 | 'W' 00-1F linux/wanrouter.h conflict! (pre 3.9) | ||
| 203 | 'W' 00-3F sound/asound.h conflict! | ||
| 204 | 'W' 40-5F drivers/pci/switch/switchtec.c | ||
| 205 | 'X' all fs/xfs/xfs_fs.h, conflict! | ||
| 206 | fs/xfs/linux-2.6/xfs_ioctl32.h, | ||
| 207 | include/linux/falloc.h, | ||
| 208 | linux/fs.h, | ||
| 209 | 'X' all fs/ocfs2/ocfs_fs.h conflict! | ||
| 210 | 'X' 01 linux/pktcdvd.h conflict! | ||
| 211 | 'Y' all linux/cyclades.h | ||
| 212 | 'Z' 14-15 drivers/message/fusion/mptctl.h | ||
| 213 | '[' 00-3F linux/usb/tmc.h USB Test and Measurement Devices | ||
| 214 | <mailto:gregkh@linuxfoundation.org> | ||
| 215 | 'a' all linux/atm*.h, linux/sonet.h ATM on linux | ||
| 216 | <http://lrcwww.epfl.ch/> | ||
| 217 | 'a' 00-0F drivers/crypto/qat/qat_common/adf_cfg_common.h conflict! qat driver | ||
| 218 | 'b' 00-FF conflict! bit3 vme host bridge | ||
| 219 | <mailto:natalia@nikhefk.nikhef.nl> | ||
| 220 | 'c' all linux/cm4000_cs.h conflict! | ||
| 221 | 'c' 00-7F linux/comstats.h conflict! | ||
| 222 | 'c' 00-7F linux/coda.h conflict! | ||
| 223 | 'c' 00-1F linux/chio.h conflict! | ||
| 224 | 'c' 80-9F arch/s390/include/asm/chsc.h conflict! | ||
| 225 | 'c' A0-AF arch/x86/include/asm/msr.h conflict! | ||
| 226 | 'd' 00-FF linux/char/drm/drm.h conflict! | ||
| 227 | 'd' 02-40 pcmcia/ds.h conflict! | ||
| 228 | 'd' F0-FF linux/digi1.h | ||
| 229 | 'e' all linux/digi1.h conflict! | ||
| 230 | 'f' 00-1F linux/ext2_fs.h conflict! | ||
| 231 | 'f' 00-1F linux/ext3_fs.h conflict! | ||
| 232 | 'f' 00-0F fs/jfs/jfs_dinode.h conflict! | ||
| 233 | 'f' 00-0F fs/ext4/ext4.h conflict! | ||
| 234 | 'f' 00-0F linux/fs.h conflict! | ||
| 235 | 'f' 00-0F fs/ocfs2/ocfs2_fs.h conflict! | ||
| 236 | 'g' 00-0F linux/usb/gadgetfs.h | ||
| 237 | 'g' 20-2F linux/usb/g_printer.h | ||
| 238 | 'h' 00-7F conflict! Charon filesystem | ||
| 239 | <mailto:zapman@interlan.net> | ||
| 240 | 'h' 00-1F linux/hpet.h conflict! | ||
| 241 | 'h' 80-8F fs/hfsplus/ioctl.c | ||
| 242 | 'i' 00-3F linux/i2o-dev.h conflict! | ||
| 243 | 'i' 0B-1F linux/ipmi.h conflict! | ||
| 244 | 'i' 80-8F linux/i8k.h | ||
| 245 | 'j' 00-3F linux/joystick.h | ||
| 246 | 'k' 00-0F linux/spi/spidev.h conflict! | ||
| 247 | 'k' 00-05 video/kyro.h conflict! | ||
| 248 | 'k' 10-17 linux/hsi/hsi_char.h HSI character device | ||
| 249 | 'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system | ||
| 250 | <http://web.archive.org/web/%2A/http://mikonos.dia.unisa.it/tcfs> | ||
| 251 | 'l' 40-7F linux/udf_fs_i.h in development: | ||
| 252 | <http://sourceforge.net/projects/linux-udf/> | ||
| 253 | 'm' 00-09 linux/mmtimer.h conflict! | ||
| 254 | 'm' all linux/mtio.h conflict! | ||
| 255 | 'm' all linux/soundcard.h conflict! | ||
| 256 | 'm' all linux/synclink.h conflict! | ||
| 257 | 'm' 00-19 drivers/message/fusion/mptctl.h conflict! | ||
| 258 | 'm' 00 drivers/scsi/megaraid/megaraid_ioctl.h conflict! | ||
| 259 | 'n' 00-7F linux/ncp_fs.h and fs/ncpfs/ioctl.c | ||
| 260 | 'n' 80-8F uapi/linux/nilfs2_api.h NILFS2 | ||
| 261 | 'n' E0-FF linux/matroxfb.h matroxfb | ||
| 262 | 'o' 00-1F fs/ocfs2/ocfs2_fs.h OCFS2 | ||
| 263 | 'o' 00-03 mtd/ubi-user.h conflict! (OCFS2 and UBI overlaps) | ||
| 264 | 'o' 40-41 mtd/ubi-user.h UBI | ||
| 265 | 'o' 01-A1 `linux/dvb/*.h` DVB | ||
| 266 | 'p' 00-0F linux/phantom.h conflict! (OpenHaptics needs this) | ||
| 267 | 'p' 00-1F linux/rtc.h conflict! | ||
| 268 | 'p' 00-3F linux/mc146818rtc.h conflict! | ||
| 269 | 'p' 40-7F linux/nvram.h | ||
| 270 | 'p' 80-9F linux/ppdev.h user-space parport | ||
| 271 | <mailto:tim@cyberelk.net> | ||
| 272 | 'p' A1-A5 linux/pps.h LinuxPPS | ||
| 273 | <mailto:giometti@linux.it> | ||
| 274 | 'q' 00-1F linux/serio.h | ||
| 275 | 'q' 80-FF linux/telephony.h Internet PhoneJACK, Internet LineJACK | ||
| 276 | linux/ixjuser.h <http://web.archive.org/web/%2A/http://www.quicknet.net> | ||
| 277 | 'r' 00-1F linux/msdos_fs.h and fs/fat/dir.c | ||
| 278 | 's' all linux/cdk.h | ||
| 279 | 't' 00-7F linux/ppp-ioctl.h | ||
| 280 | 't' 80-8F linux/isdn_ppp.h | ||
| 281 | 't' 90-91 linux/toshiba.h toshiba and toshiba_acpi SMM | ||
| 282 | 'u' 00-1F linux/smb_fs.h gone | ||
| 283 | 'u' 20-3F linux/uvcvideo.h USB video class host driver | ||
| 284 | 'u' 40-4f linux/udmabuf.h userspace dma-buf misc device | ||
| 285 | 'v' 00-1F linux/ext2_fs.h conflict! | ||
| 286 | 'v' 00-1F linux/fs.h conflict! | ||
| 287 | 'v' 00-0F linux/sonypi.h conflict! | ||
| 288 | 'v' 00-0F media/v4l2-subdev.h conflict! | ||
| 289 | 'v' C0-FF linux/meye.h conflict! | ||
| 290 | 'w' all CERN SCI driver | ||
| 291 | 'y' 00-1F packet based user level communications | ||
| 292 | <mailto:zapman@interlan.net> | ||
| 293 | 'z' 00-3F CAN bus card conflict! | ||
| 294 | <mailto:hdstich@connectu.ulm.circular.de> | ||
| 295 | 'z' 40-7F CAN bus card conflict! | ||
| 296 | <mailto:oe@port.de> | ||
| 297 | 'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! | ||
| 298 | '|' 00-7F linux/media.h | ||
| 299 | 0x80 00-1F linux/fb.h | ||
| 300 | 0x89 00-06 arch/x86/include/asm/sockios.h | ||
| 301 | 0x89 0B-DF linux/sockios.h | ||
| 302 | 0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range | ||
| 303 | 0x89 E0-EF linux/dn.h PROTOPRIVATE range | ||
| 304 | 0x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range | ||
| 305 | 0x8B all linux/wireless.h | ||
| 306 | 0x8C 00-3F WiNRADiO driver | ||
| 307 | <http://www.winradio.com.au/> | ||
| 308 | 0x90 00 drivers/cdrom/sbpcd.h | ||
| 309 | 0x92 00-0F drivers/usb/mon/mon_bin.c | ||
| 310 | 0x93 60-7F linux/auto_fs.h | ||
| 311 | 0x94 all fs/btrfs/ioctl.h Btrfs filesystem | ||
| 312 | and linux/fs.h some lifted to vfs/generic | ||
| 313 | 0x97 00-7F fs/ceph/ioctl.h Ceph file system | ||
| 314 | 0x99 00-0F 537-Addinboard driver | ||
| 315 | <mailto:buk@buks.ipn.de> | ||
| 316 | 0xA0 all linux/sdp/sdp.h Industrial Device Project | ||
| 317 | <mailto:kenji@bitgate.com> | ||
| 318 | 0xA1 0 linux/vtpm_proxy.h TPM Emulator Proxy Driver | ||
| 319 | 0xA3 80-8F Port ACL in development: | ||
| 320 | <mailto:tlewis@mindspring.com> | ||
| 321 | 0xA3 90-9F linux/dtlk.h | ||
| 322 | 0xA4 00-1F uapi/linux/tee.h Generic TEE subsystem | ||
| 323 | 0xAA 00-3F linux/uapi/linux/userfaultfd.h | ||
| 324 | 0xAB 00-1F linux/nbd.h | ||
| 325 | 0xAC 00-1F linux/raw.h | ||
| 326 | 0xAD 00 Netfilter device in development: | ||
| 327 | <mailto:rusty@rustcorp.com.au> | ||
| 328 | 0xAE all linux/kvm.h Kernel-based Virtual Machine | ||
| 329 | <mailto:kvm@vger.kernel.org> | ||
| 330 | 0xAF 00-1F linux/fsl_hypervisor.h Freescale hypervisor | ||
| 331 | 0xB0 all RATIO devices in development: | ||
| 332 | <mailto:vgo@ratio.de> | ||
| 333 | 0xB1 00-1F PPPoX | ||
| 334 | <mailto:mostrows@styx.uwaterloo.ca> | ||
| 335 | 0xB3 00 linux/mmc/ioctl.h | ||
| 336 | 0xB4 00-0F linux/gpio.h <mailto:linux-gpio@vger.kernel.org> | ||
| 337 | 0xB5 00-0F uapi/linux/rpmsg.h <mailto:linux-remoteproc@vger.kernel.org> | ||
| 338 | 0xB6 all linux/fpga-dfl.h | ||
| 339 | 0xC0 00-0F linux/usb/iowarrior.h | ||
| 340 | 0xCA 00-0F uapi/misc/cxl.h | ||
| 341 | 0xCA 10-2F uapi/misc/ocxl.h | ||
| 342 | 0xCA 80-BF uapi/scsi/cxlflash_ioctl.h | ||
| 343 | 0xCB 00-1F CBM serial IEC bus in development: | ||
| 344 | <mailto:michael.klein@puffin.lb.shuttle.de> | ||
| 345 | 0xCC 00-0F drivers/misc/ibmvmc.h pseries VMC driver | ||
| 346 | 0xCD 01 linux/reiserfs_fs.h | ||
| 347 | 0xCF 02 fs/cifs/ioctl.c | ||
| 348 | 0xDB 00-0F drivers/char/mwave/mwavepub.h | ||
| 349 | 0xDD 00-3F ZFCP device driver see drivers/s390/scsi/ | ||
| 350 | <mailto:aherrman@de.ibm.com> | ||
| 351 | 0xE5 00-3F linux/fuse.h | ||
| 352 | 0xEC 00-01 drivers/platform/chrome/cros_ec_dev.h ChromeOS EC driver | ||
| 353 | 0xF3 00-3F drivers/usb/misc/sisusbvga/sisusb.h sisfb (in development) | ||
| 354 | <mailto:thomas@winischhofer.net> | ||
| 355 | 0xF4 00-1F video/mbxfb.h mbxfb | ||
| 356 | <mailto:raph@8d.com> | ||
| 357 | 0xF6 all LTTng Linux Trace Toolkit Next Generation | ||
| 358 | <mailto:mathieu.desnoyers@efficios.com> | ||
| 359 | 0xFD all linux/dm-ioctl.h | ||
| 360 | 0xFE all linux/isst_if.h | ||
| 361 | ==== ===== ======================================================= ================================================================ | ||
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt deleted file mode 100644 index ab0b3f686454..000000000000 --- a/Documentation/ioctl/ioctl-number.txt +++ /dev/null | |||
| @@ -1,351 +0,0 @@ | |||
| 1 | Ioctl Numbers | ||
| 2 | 19 October 1999 | ||
| 3 | Michael Elizabeth Chastain | ||
| 4 | <mec@shout.net> | ||
| 5 | |||
| 6 | If you are adding new ioctl's to the kernel, you should use the _IO | ||
| 7 | macros defined in <linux/ioctl.h>: | ||
| 8 | |||
| 9 | _IO an ioctl with no parameters | ||
| 10 | _IOW an ioctl with write parameters (copy_from_user) | ||
| 11 | _IOR an ioctl with read parameters (copy_to_user) | ||
| 12 | _IOWR an ioctl with both write and read parameters. | ||
| 13 | |||
| 14 | 'Write' and 'read' are from the user's point of view, just like the | ||
| 15 | system calls 'write' and 'read'. For example, a SET_FOO ioctl would | ||
| 16 | be _IOW, although the kernel would actually read data from user space; | ||
| 17 | a GET_FOO ioctl would be _IOR, although the kernel would actually write | ||
| 18 | data to user space. | ||
| 19 | |||
| 20 | The first argument to _IO, _IOW, _IOR, or _IOWR is an identifying letter | ||
| 21 | or number from the table below. Because of the large number of drivers, | ||
| 22 | many drivers share a partial letter with other drivers. | ||
| 23 | |||
| 24 | If you are writing a driver for a new device and need a letter, pick an | ||
| 25 | unused block with enough room for expansion: 32 to 256 ioctl commands. | ||
| 26 | You can register the block by patching this file and submitting the | ||
| 27 | patch to Linus Torvalds. Or you can e-mail me at <mec@shout.net> and | ||
| 28 | I'll register one for you. | ||
| 29 | |||
| 30 | The second argument to _IO, _IOW, _IOR, or _IOWR is a sequence number | ||
| 31 | to distinguish ioctls from each other. The third argument to _IOW, | ||
| 32 | _IOR, or _IOWR is the type of the data going into the kernel or coming | ||
| 33 | out of the kernel (e.g. 'int' or 'struct foo'). NOTE! Do NOT use | ||
| 34 | sizeof(arg) as the third argument as this results in your ioctl thinking | ||
| 35 | it passes an argument of type size_t. | ||
| 36 | |||
| 37 | Some devices use their major number as the identifier; this is OK, as | ||
| 38 | long as it is unique. Some devices are irregular and don't follow any | ||
| 39 | convention at all. | ||
| 40 | |||
| 41 | Following this convention is good because: | ||
| 42 | |||
| 43 | (1) Keeping the ioctl's globally unique helps error checking: | ||
| 44 | if a program calls an ioctl on the wrong device, it will get an | ||
| 45 | error rather than some unexpected behaviour. | ||
| 46 | |||
| 47 | (2) The 'strace' build procedure automatically finds ioctl numbers | ||
| 48 | defined with _IO, _IOW, _IOR, or _IOWR. | ||
| 49 | |||
| 50 | (3) 'strace' can decode numbers back into useful names when the | ||
| 51 | numbers are unique. | ||
| 52 | |||
| 53 | (4) People looking for ioctls can grep for them more easily when | ||
| 54 | this convention is used to define the ioctl numbers. | ||
| 55 | |||
| 56 | (5) When following the convention, the driver code can use generic | ||
| 57 | code to copy the parameters between user and kernel space. | ||
| 58 | |||
| 59 | This table lists ioctls visible from user land for Linux/x86. It contains | ||
| 60 | most drivers up to 2.6.31, but I know I am missing some. There has been | ||
| 61 | no attempt to list non-X86 architectures or ioctls from drivers/staging/. | ||
| 62 | |||
| 63 | Code Seq#(hex) Include File Comments | ||
| 64 | ======================================================== | ||
| 65 | 0x00 00-1F linux/fs.h conflict! | ||
| 66 | 0x00 00-1F scsi/scsi_ioctl.h conflict! | ||
| 67 | 0x00 00-1F linux/fb.h conflict! | ||
| 68 | 0x00 00-1F linux/wavefront.h conflict! | ||
| 69 | 0x02 all linux/fd.h | ||
| 70 | 0x03 all linux/hdreg.h | ||
| 71 | 0x04 D2-DC linux/umsdos_fs.h Dead since 2.6.11, but don't reuse these. | ||
| 72 | 0x06 all linux/lp.h | ||
| 73 | 0x09 all linux/raid/md_u.h | ||
| 74 | 0x10 00-0F drivers/char/s390/vmcp.h | ||
| 75 | 0x10 10-1F arch/s390/include/uapi/sclp_ctl.h | ||
| 76 | 0x10 20-2F arch/s390/include/uapi/asm/hypfs.h | ||
| 77 | 0x12 all linux/fs.h | ||
| 78 | linux/blkpg.h | ||
| 79 | 0x1b all InfiniBand Subsystem <http://infiniband.sourceforge.net/> | ||
| 80 | 0x20 all drivers/cdrom/cm206.h | ||
| 81 | 0x22 all scsi/sg.h | ||
| 82 | '!' 00-1F uapi/linux/seccomp.h | ||
| 83 | '#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem | ||
| 84 | '$' 00-0F linux/perf_counter.h, linux/perf_event.h | ||
| 85 | '%' 00-0F include/uapi/linux/stm.h | ||
| 86 | System Trace Module subsystem | ||
| 87 | <mailto:alexander.shishkin@linux.intel.com> | ||
| 88 | '&' 00-07 drivers/firewire/nosy-user.h | ||
| 89 | '1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl | ||
| 90 | <ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/> | ||
| 91 | '2' 01-04 linux/i2o.h | ||
| 92 | '3' 00-0F drivers/s390/char/raw3270.h conflict! | ||
| 93 | '3' 00-1F linux/suspend_ioctls.h conflict! | ||
| 94 | and kernel/power/user.c | ||
| 95 | '8' all SNP8023 advanced NIC card | ||
| 96 | <mailto:mcr@solidum.com> | ||
| 97 | ';' 64-7F linux/vfio.h | ||
| 98 | '@' 00-0F linux/radeonfb.h conflict! | ||
| 99 | '@' 00-0F drivers/video/aty/aty128fb.c conflict! | ||
| 100 | 'A' 00-1F linux/apm_bios.h conflict! | ||
| 101 | 'A' 00-0F linux/agpgart.h conflict! | ||
| 102 | and drivers/char/agp/compat_ioctl.h | ||
| 103 | 'A' 00-7F sound/asound.h conflict! | ||
| 104 | 'B' 00-1F linux/cciss_ioctl.h conflict! | ||
| 105 | 'B' 00-0F include/linux/pmu.h conflict! | ||
| 106 | 'B' C0-FF advanced bbus | ||
| 107 | <mailto:maassen@uni-freiburg.de> | ||
| 108 | 'C' all linux/soundcard.h conflict! | ||
| 109 | 'C' 01-2F linux/capi.h conflict! | ||
| 110 | 'C' F0-FF drivers/net/wan/cosa.h conflict! | ||
| 111 | 'D' all arch/s390/include/asm/dasd.h | ||
| 112 | 'D' 40-5F drivers/scsi/dpt/dtpi_ioctl.h | ||
| 113 | 'D' 05 drivers/scsi/pmcraid.h | ||
| 114 | 'E' all linux/input.h conflict! | ||
| 115 | 'E' 00-0F xen/evtchn.h conflict! | ||
| 116 | 'F' all linux/fb.h conflict! | ||
| 117 | 'F' 01-02 drivers/scsi/pmcraid.h conflict! | ||
| 118 | 'F' 20 drivers/video/fsl-diu-fb.h conflict! | ||
| 119 | 'F' 20 drivers/video/intelfb/intelfb.h conflict! | ||
| 120 | 'F' 20 linux/ivtvfb.h conflict! | ||
| 121 | 'F' 20 linux/matroxfb.h conflict! | ||
| 122 | 'F' 20 drivers/video/aty/atyfb_base.c conflict! | ||
| 123 | 'F' 00-0F video/da8xx-fb.h conflict! | ||
| 124 | 'F' 80-8F linux/arcfb.h conflict! | ||
| 125 | 'F' DD video/sstfb.h conflict! | ||
| 126 | 'G' 00-3F drivers/misc/sgi-gru/grulib.h conflict! | ||
| 127 | 'G' 00-0F linux/gigaset_dev.h conflict! | ||
| 128 | 'H' 00-7F linux/hiddev.h conflict! | ||
| 129 | 'H' 00-0F linux/hidraw.h conflict! | ||
| 130 | 'H' 01 linux/mei.h conflict! | ||
| 131 | 'H' 02 linux/mei.h conflict! | ||
| 132 | 'H' 03 linux/mei.h conflict! | ||
| 133 | 'H' 00-0F sound/asound.h conflict! | ||
| 134 | 'H' 20-40 sound/asound_fm.h conflict! | ||
| 135 | 'H' 80-8F sound/sfnt_info.h conflict! | ||
| 136 | 'H' 10-8F sound/emu10k1.h conflict! | ||
| 137 | 'H' 10-1F sound/sb16_csp.h conflict! | ||
| 138 | 'H' 10-1F sound/hda_hwdep.h conflict! | ||
| 139 | 'H' 40-4F sound/hdspm.h conflict! | ||
| 140 | 'H' 40-4F sound/hdsp.h conflict! | ||
| 141 | 'H' 90 sound/usb/usx2y/usb_stream.h | ||
| 142 | 'H' A0 uapi/linux/usb/cdc-wdm.h | ||
| 143 | 'H' C0-F0 net/bluetooth/hci.h conflict! | ||
| 144 | 'H' C0-DF net/bluetooth/hidp/hidp.h conflict! | ||
| 145 | 'H' C0-DF net/bluetooth/cmtp/cmtp.h conflict! | ||
| 146 | 'H' C0-DF net/bluetooth/bnep/bnep.h conflict! | ||
| 147 | 'H' F1 linux/hid-roccat.h <mailto:erazor_de@users.sourceforge.net> | ||
| 148 | 'H' F8-FA sound/firewire.h | ||
| 149 | 'I' all linux/isdn.h conflict! | ||
| 150 | 'I' 00-0F drivers/isdn/divert/isdn_divert.h conflict! | ||
| 151 | 'I' 40-4F linux/mISDNif.h conflict! | ||
| 152 | 'J' 00-1F drivers/scsi/gdth_ioctl.h | ||
| 153 | 'K' all linux/kd.h | ||
| 154 | 'L' 00-1F linux/loop.h conflict! | ||
| 155 | 'L' 10-1F drivers/scsi/mpt3sas/mpt3sas_ctl.h conflict! | ||
| 156 | 'L' 20-2F linux/lightnvm.h | ||
| 157 | 'L' E0-FF linux/ppdd.h encrypted disk device driver | ||
| 158 | <http://linux01.gwdg.de/~alatham/ppdd.html> | ||
| 159 | 'M' all linux/soundcard.h conflict! | ||
| 160 | 'M' 01-16 mtd/mtd-abi.h conflict! | ||
| 161 | and drivers/mtd/mtdchar.c | ||
| 162 | 'M' 01-03 drivers/scsi/megaraid/megaraid_sas.h | ||
| 163 | 'M' 00-0F drivers/video/fsl-diu-fb.h conflict! | ||
| 164 | 'N' 00-1F drivers/usb/scanner.h | ||
| 165 | 'N' 40-7F drivers/block/nvme.c | ||
| 166 | 'O' 00-06 mtd/ubi-user.h UBI | ||
| 167 | 'P' all linux/soundcard.h conflict! | ||
| 168 | 'P' 60-6F sound/sscape_ioctl.h conflict! | ||
| 169 | 'P' 00-0F drivers/usb/class/usblp.c conflict! | ||
| 170 | 'P' 01-09 drivers/misc/pci_endpoint_test.c conflict! | ||
| 171 | 'Q' all linux/soundcard.h | ||
| 172 | 'R' 00-1F linux/random.h conflict! | ||
| 173 | 'R' 01 linux/rfkill.h conflict! | ||
| 174 | 'R' C0-DF net/bluetooth/rfcomm.h | ||
| 175 | 'S' all linux/cdrom.h conflict! | ||
| 176 | 'S' 80-81 scsi/scsi_ioctl.h conflict! | ||
| 177 | 'S' 82-FF scsi/scsi.h conflict! | ||
| 178 | 'S' 00-7F sound/asequencer.h conflict! | ||
| 179 | 'T' all linux/soundcard.h conflict! | ||
| 180 | 'T' 00-AF sound/asound.h conflict! | ||
| 181 | 'T' all arch/x86/include/asm/ioctls.h conflict! | ||
| 182 | 'T' C0-DF linux/if_tun.h conflict! | ||
| 183 | 'U' all sound/asound.h conflict! | ||
| 184 | 'U' 00-CF linux/uinput.h conflict! | ||
| 185 | 'U' 00-EF linux/usbdevice_fs.h | ||
| 186 | 'U' C0-CF drivers/bluetooth/hci_uart.h | ||
| 187 | 'V' all linux/vt.h conflict! | ||
| 188 | 'V' all linux/videodev2.h conflict! | ||
| 189 | 'V' C0 linux/ivtvfb.h conflict! | ||
| 190 | 'V' C0 linux/ivtv.h conflict! | ||
| 191 | 'V' C0 media/davinci/vpfe_capture.h conflict! | ||
| 192 | 'V' C0 media/si4713.h conflict! | ||
| 193 | 'W' 00-1F linux/watchdog.h conflict! | ||
| 194 | 'W' 00-1F linux/wanrouter.h conflict! (pre 3.9) | ||
| 195 | 'W' 00-3F sound/asound.h conflict! | ||
| 196 | 'W' 40-5F drivers/pci/switch/switchtec.c | ||
| 197 | 'X' all fs/xfs/xfs_fs.h conflict! | ||
| 198 | and fs/xfs/linux-2.6/xfs_ioctl32.h | ||
| 199 | and include/linux/falloc.h | ||
| 200 | and linux/fs.h | ||
| 201 | 'X' all fs/ocfs2/ocfs_fs.h conflict! | ||
| 202 | 'X' 01 linux/pktcdvd.h conflict! | ||
| 203 | 'Y' all linux/cyclades.h | ||
| 204 | 'Z' 14-15 drivers/message/fusion/mptctl.h | ||
| 205 | '[' 00-3F linux/usb/tmc.h USB Test and Measurement Devices | ||
| 206 | <mailto:gregkh@linuxfoundation.org> | ||
| 207 | 'a' all linux/atm*.h, linux/sonet.h ATM on linux | ||
| 208 | <http://lrcwww.epfl.ch/> | ||
| 209 | 'a' 00-0F drivers/crypto/qat/qat_common/adf_cfg_common.h conflict! qat driver | ||
| 210 | 'b' 00-FF conflict! bit3 vme host bridge | ||
| 211 | <mailto:natalia@nikhefk.nikhef.nl> | ||
| 212 | 'c' all linux/cm4000_cs.h conflict! | ||
| 213 | 'c' 00-7F linux/comstats.h conflict! | ||
| 214 | 'c' 00-7F linux/coda.h conflict! | ||
| 215 | 'c' 00-1F linux/chio.h conflict! | ||
| 216 | 'c' 80-9F arch/s390/include/asm/chsc.h conflict! | ||
| 217 | 'c' A0-AF arch/x86/include/asm/msr.h conflict! | ||
| 218 | 'd' 00-FF linux/char/drm/drm.h conflict! | ||
| 219 | 'd' 02-40 pcmcia/ds.h conflict! | ||
| 220 | 'd' F0-FF linux/digi1.h | ||
| 221 | 'e' all linux/digi1.h conflict! | ||
| 222 | 'f' 00-1F linux/ext2_fs.h conflict! | ||
| 223 | 'f' 00-1F linux/ext3_fs.h conflict! | ||
| 224 | 'f' 00-0F fs/jfs/jfs_dinode.h conflict! | ||
| 225 | 'f' 00-0F fs/ext4/ext4.h conflict! | ||
| 226 | 'f' 00-0F linux/fs.h conflict! | ||
| 227 | 'f' 00-0F fs/ocfs2/ocfs2_fs.h conflict! | ||
| 228 | 'g' 00-0F linux/usb/gadgetfs.h | ||
| 229 | 'g' 20-2F linux/usb/g_printer.h | ||
| 230 | 'h' 00-7F conflict! Charon filesystem | ||
| 231 | <mailto:zapman@interlan.net> | ||
| 232 | 'h' 00-1F linux/hpet.h conflict! | ||
| 233 | 'h' 80-8F fs/hfsplus/ioctl.c | ||
| 234 | 'i' 00-3F linux/i2o-dev.h conflict! | ||
| 235 | 'i' 0B-1F linux/ipmi.h conflict! | ||
| 236 | 'i' 80-8F linux/i8k.h | ||
| 237 | 'j' 00-3F linux/joystick.h | ||
| 238 | 'k' 00-0F linux/spi/spidev.h conflict! | ||
| 239 | 'k' 00-05 video/kyro.h conflict! | ||
| 240 | 'k' 10-17 linux/hsi/hsi_char.h HSI character device | ||
| 241 | 'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system | ||
| 242 | <http://web.archive.org/web/*/http://mikonos.dia.unisa.it/tcfs> | ||
| 243 | 'l' 40-7F linux/udf_fs_i.h in development: | ||
| 244 | <http://sourceforge.net/projects/linux-udf/> | ||
| 245 | 'm' 00-09 linux/mmtimer.h conflict! | ||
| 246 | 'm' all linux/mtio.h conflict! | ||
| 247 | 'm' all linux/soundcard.h conflict! | ||
| 248 | 'm' all linux/synclink.h conflict! | ||
| 249 | 'm' 00-19 drivers/message/fusion/mptctl.h conflict! | ||
| 250 | 'm' 00 drivers/scsi/megaraid/megaraid_ioctl.h conflict! | ||
| 251 | 'n' 00-7F linux/ncp_fs.h and fs/ncpfs/ioctl.c | ||
| 252 | 'n' 80-8F uapi/linux/nilfs2_api.h NILFS2 | ||
| 253 | 'n' E0-FF linux/matroxfb.h matroxfb | ||
| 254 | 'o' 00-1F fs/ocfs2/ocfs2_fs.h OCFS2 | ||
| 255 | 'o' 00-03 mtd/ubi-user.h conflict! (OCFS2 and UBI overlaps) | ||
| 256 | 'o' 40-41 mtd/ubi-user.h UBI | ||
| 257 | 'o' 01-A1 linux/dvb/*.h DVB | ||
| 258 | 'p' 00-0F linux/phantom.h conflict! (OpenHaptics needs this) | ||
| 259 | 'p' 00-1F linux/rtc.h conflict! | ||
| 260 | 'p' 00-3F linux/mc146818rtc.h conflict! | ||
| 261 | 'p' 40-7F linux/nvram.h | ||
| 262 | 'p' 80-9F linux/ppdev.h user-space parport | ||
| 263 | <mailto:tim@cyberelk.net> | ||
| 264 | 'p' A1-A5 linux/pps.h LinuxPPS | ||
| 265 | <mailto:giometti@linux.it> | ||
| 266 | 'q' 00-1F linux/serio.h | ||
| 267 | 'q' 80-FF linux/telephony.h Internet PhoneJACK, Internet LineJACK | ||
| 268 | linux/ixjuser.h <http://web.archive.org/web/*/http://www.quicknet.net> | ||
| 269 | 'r' 00-1F linux/msdos_fs.h and fs/fat/dir.c | ||
| 270 | 's' all linux/cdk.h | ||
| 271 | 't' 00-7F linux/ppp-ioctl.h | ||
| 272 | 't' 80-8F linux/isdn_ppp.h | ||
| 273 | 't' 90-91 linux/toshiba.h toshiba and toshiba_acpi SMM | ||
| 274 | 'u' 00-1F linux/smb_fs.h gone | ||
| 275 | 'u' 20-3F linux/uvcvideo.h USB video class host driver | ||
| 276 | 'u' 40-4f linux/udmabuf.h userspace dma-buf misc device | ||
| 277 | 'v' 00-1F linux/ext2_fs.h conflict! | ||
| 278 | 'v' 00-1F linux/fs.h conflict! | ||
| 279 | 'v' 00-0F linux/sonypi.h conflict! | ||
| 280 | 'v' 00-0F media/v4l2-subdev.h conflict! | ||
| 281 | 'v' C0-FF linux/meye.h conflict! | ||
| 282 | 'w' all CERN SCI driver | ||
| 283 | 'y' 00-1F packet based user level communications | ||
| 284 | <mailto:zapman@interlan.net> | ||
| 285 | 'z' 00-3F CAN bus card conflict! | ||
| 286 | <mailto:hdstich@connectu.ulm.circular.de> | ||
| 287 | 'z' 40-7F CAN bus card conflict! | ||
| 288 | <mailto:oe@port.de> | ||
| 289 | 'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! | ||
| 290 | '|' 00-7F linux/media.h | ||
| 291 | 0x80 00-1F linux/fb.h | ||
| 292 | 0x89 00-06 arch/x86/include/asm/sockios.h | ||
| 293 | 0x89 0B-DF linux/sockios.h | ||
| 294 | 0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range | ||
| 295 | 0x89 E0-EF linux/dn.h PROTOPRIVATE range | ||
| 296 | 0x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range | ||
| 297 | 0x8B all linux/wireless.h | ||
| 298 | 0x8C 00-3F WiNRADiO driver | ||
| 299 | <http://www.winradio.com.au/> | ||
| 300 | 0x90 00 drivers/cdrom/sbpcd.h | ||
| 301 | 0x92 00-0F drivers/usb/mon/mon_bin.c | ||
| 302 | 0x93 60-7F linux/auto_fs.h | ||
| 303 | 0x94 all fs/btrfs/ioctl.h Btrfs filesystem | ||
| 304 | and linux/fs.h some lifted to vfs/generic | ||
| 305 | 0x97 00-7F fs/ceph/ioctl.h Ceph file system | ||
| 306 | 0x99 00-0F 537-Addinboard driver | ||
| 307 | <mailto:buk@buks.ipn.de> | ||
| 308 | 0xA0 all linux/sdp/sdp.h Industrial Device Project | ||
| 309 | <mailto:kenji@bitgate.com> | ||
| 310 | 0xA1 0 linux/vtpm_proxy.h TPM Emulator Proxy Driver | ||
| 311 | 0xA3 80-8F Port ACL in development: | ||
| 312 | <mailto:tlewis@mindspring.com> | ||
| 313 | 0xA3 90-9F linux/dtlk.h | ||
| 314 | 0xA4 00-1F uapi/linux/tee.h Generic TEE subsystem | ||
| 315 | 0xAA 00-3F linux/uapi/linux/userfaultfd.h | ||
| 316 | 0xAB 00-1F linux/nbd.h | ||
| 317 | 0xAC 00-1F linux/raw.h | ||
| 318 | 0xAD 00 Netfilter device in development: | ||
| 319 | <mailto:rusty@rustcorp.com.au> | ||
| 320 | 0xAE all linux/kvm.h Kernel-based Virtual Machine | ||
| 321 | <mailto:kvm@vger.kernel.org> | ||
| 322 | 0xAF 00-1F linux/fsl_hypervisor.h Freescale hypervisor | ||
| 323 | 0xB0 all RATIO devices in development: | ||
| 324 | <mailto:vgo@ratio.de> | ||
| 325 | 0xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca> | ||
| 326 | 0xB3 00 linux/mmc/ioctl.h | ||
| 327 | 0xB4 00-0F linux/gpio.h <mailto:linux-gpio@vger.kernel.org> | ||
| 328 | 0xB5 00-0F uapi/linux/rpmsg.h <mailto:linux-remoteproc@vger.kernel.org> | ||
| 329 | 0xB6 all linux/fpga-dfl.h | ||
| 330 | 0xC0 00-0F linux/usb/iowarrior.h | ||
| 331 | 0xCA 00-0F uapi/misc/cxl.h | ||
| 332 | 0xCA 10-2F uapi/misc/ocxl.h | ||
| 333 | 0xCA 80-BF uapi/scsi/cxlflash_ioctl.h | ||
| 334 | 0xCB 00-1F CBM serial IEC bus in development: | ||
| 335 | <mailto:michael.klein@puffin.lb.shuttle.de> | ||
| 336 | 0xCC 00-0F drivers/misc/ibmvmc.h pseries VMC driver | ||
| 337 | 0xCD 01 linux/reiserfs_fs.h | ||
| 338 | 0xCF 02 fs/cifs/ioctl.c | ||
| 339 | 0xDB 00-0F drivers/char/mwave/mwavepub.h | ||
| 340 | 0xDD 00-3F ZFCP device driver see drivers/s390/scsi/ | ||
| 341 | <mailto:aherrman@de.ibm.com> | ||
| 342 | 0xE5 00-3F linux/fuse.h | ||
| 343 | 0xEC 00-01 drivers/platform/chrome/cros_ec_dev.h ChromeOS EC driver | ||
| 344 | 0xF3 00-3F drivers/usb/misc/sisusbvga/sisusb.h sisfb (in development) | ||
| 345 | <mailto:thomas@winischhofer.net> | ||
| 346 | 0xF4 00-1F video/mbxfb.h mbxfb | ||
| 347 | <mailto:raph@8d.com> | ||
| 348 | 0xF6 all LTTng Linux Trace Toolkit Next Generation | ||
| 349 | <mailto:mathieu.desnoyers@efficios.com> | ||
| 350 | 0xFD all linux/dm-ioctl.h | ||
| 351 | 0xFE all linux/isst_if.h | ||
diff --git a/Documentation/kbuild/index.rst b/Documentation/kbuild/index.rst index 42d4cbe4460c..e323a3f2cc81 100644 --- a/Documentation/kbuild/index.rst +++ b/Documentation/kbuild/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | =================== | 3 | =================== |
| 4 | Kernel Build System | 4 | Kernel Build System |
diff --git a/Documentation/kbuild/issues.rst b/Documentation/kbuild/issues.rst index 9fdded4b681c..bdab01f733f6 100644 --- a/Documentation/kbuild/issues.rst +++ b/Documentation/kbuild/issues.rst | |||
| @@ -1,11 +1,15 @@ | |||
| 1 | Recursion issue #1 | 1 | ================ |
| 2 | ------------------ | 2 | Recursion issues |
| 3 | ================ | ||
| 3 | 4 | ||
| 4 | .. include:: Kconfig.recursion-issue-01 | 5 | issue #1 |
| 5 | :literal: | 6 | -------- |
| 6 | 7 | ||
| 7 | Recursion issue #2 | 8 | .. literalinclude:: Kconfig.recursion-issue-01 |
| 8 | ------------------ | 9 | :language: kconfig |
| 9 | 10 | ||
| 10 | .. include:: Kconfig.recursion-issue-02 | 11 | issue #2 |
| 11 | :literal: | 12 | -------- |
| 13 | |||
| 14 | .. literalinclude:: Kconfig.recursion-issue-02 | ||
| 15 | :language: kconfig | ||
diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.rst index b25548963d70..ce9b99c004ae 100644 --- a/Documentation/kbuild/kbuild.rst +++ b/Documentation/kbuild/kbuild.rst | |||
| @@ -18,7 +18,7 @@ This file lists all modules that are built into the kernel. This is used | |||
| 18 | by modprobe to not fail when trying to load something builtin. | 18 | by modprobe to not fail when trying to load something builtin. |
| 19 | 19 | ||
| 20 | modules.builtin.modinfo | 20 | modules.builtin.modinfo |
| 21 | -------------------------------------------------- | 21 | ----------------------- |
| 22 | This file contains modinfo from all modules that are built into the kernel. | 22 | This file contains modinfo from all modules that are built into the kernel. |
| 23 | Unlike modinfo of a separate module, all fields are prefixed with module name. | 23 | Unlike modinfo of a separate module, all fields are prefixed with module name. |
| 24 | 24 | ||
| @@ -153,6 +153,7 @@ Install script called when using "make install". | |||
| 153 | The default name is "installkernel". | 153 | The default name is "installkernel". |
| 154 | 154 | ||
| 155 | The script will be called with the following arguments: | 155 | The script will be called with the following arguments: |
| 156 | |||
| 156 | - $1 - kernel version | 157 | - $1 - kernel version |
| 157 | - $2 - kernel image file | 158 | - $2 - kernel image file |
| 158 | - $3 - kernel map file | 159 | - $3 - kernel map file |
diff --git a/Documentation/kbuild/kconfig-language.rst b/Documentation/kbuild/kconfig-language.rst index 2bc8a7803365..74bef19f69f0 100644 --- a/Documentation/kbuild/kconfig-language.rst +++ b/Documentation/kbuild/kconfig-language.rst | |||
| @@ -53,6 +53,7 @@ A menu entry can have a number of attributes. Not all of them are | |||
| 53 | applicable everywhere (see syntax). | 53 | applicable everywhere (see syntax). |
| 54 | 54 | ||
| 55 | - type definition: "bool"/"tristate"/"string"/"hex"/"int" | 55 | - type definition: "bool"/"tristate"/"string"/"hex"/"int" |
| 56 | |||
| 56 | Every config option must have a type. There are only two basic types: | 57 | Every config option must have a type. There are only two basic types: |
| 57 | tristate and string; the other types are based on these two. The type | 58 | tristate and string; the other types are based on these two. The type |
| 58 | definition optionally accepts an input prompt, so these two examples | 59 | definition optionally accepts an input prompt, so these two examples |
| @@ -66,11 +67,13 @@ applicable everywhere (see syntax). | |||
| 66 | prompt "Networking support" | 67 | prompt "Networking support" |
| 67 | 68 | ||
| 68 | - input prompt: "prompt" <prompt> ["if" <expr>] | 69 | - input prompt: "prompt" <prompt> ["if" <expr>] |
| 70 | |||
| 69 | Every menu entry can have at most one prompt, which is used to display | 71 | Every menu entry can have at most one prompt, which is used to display |
| 70 | to the user. Optionally dependencies only for this prompt can be added | 72 | to the user. Optionally dependencies only for this prompt can be added |
| 71 | with "if". | 73 | with "if". |
| 72 | 74 | ||
| 73 | - default value: "default" <expr> ["if" <expr>] | 75 | - default value: "default" <expr> ["if" <expr>] |
| 76 | |||
| 74 | A config option can have any number of default values. If multiple | 77 | A config option can have any number of default values. If multiple |
| 75 | default values are visible, only the first defined one is active. | 78 | default values are visible, only the first defined one is active. |
| 76 | Default values are not limited to the menu entry where they are | 79 | Default values are not limited to the menu entry where they are |
| @@ -112,6 +115,7 @@ applicable everywhere (see syntax). | |||
| 112 | Optionally dependencies for this default value can be added with "if". | 115 | Optionally dependencies for this default value can be added with "if". |
| 113 | 116 | ||
| 114 | - dependencies: "depends on" <expr> | 117 | - dependencies: "depends on" <expr> |
| 118 | |||
| 115 | This defines a dependency for this menu entry. If multiple | 119 | This defines a dependency for this menu entry. If multiple |
| 116 | dependencies are defined, they are connected with '&&'. Dependencies | 120 | dependencies are defined, they are connected with '&&'. Dependencies |
| 117 | are applied to all other options within this menu entry (which also | 121 | are applied to all other options within this menu entry (which also |
| @@ -127,6 +131,7 @@ applicable everywhere (see syntax). | |||
| 127 | default y | 131 | default y |
| 128 | 132 | ||
| 129 | - reverse dependencies: "select" <symbol> ["if" <expr>] | 133 | - reverse dependencies: "select" <symbol> ["if" <expr>] |
| 134 | |||
| 130 | While normal dependencies reduce the upper limit of a symbol (see | 135 | While normal dependencies reduce the upper limit of a symbol (see |
| 131 | below), reverse dependencies can be used to force a lower limit of | 136 | below), reverse dependencies can be used to force a lower limit of |
| 132 | another symbol. The value of the current menu symbol is used as the | 137 | another symbol. The value of the current menu symbol is used as the |
| @@ -146,6 +151,7 @@ applicable everywhere (see syntax). | |||
| 146 | the illegal configurations all over. | 151 | the illegal configurations all over. |
| 147 | 152 | ||
| 148 | - weak reverse dependencies: "imply" <symbol> ["if" <expr>] | 153 | - weak reverse dependencies: "imply" <symbol> ["if" <expr>] |
| 154 | |||
| 149 | This is similar to "select" as it enforces a lower limit on another | 155 | This is similar to "select" as it enforces a lower limit on another |
| 150 | symbol except that the "implied" symbol's value may still be set to n | 156 | symbol except that the "implied" symbol's value may still be set to n |
| 151 | from a direct dependency or with a visible prompt. | 157 | from a direct dependency or with a visible prompt. |
| @@ -176,6 +182,7 @@ applicable everywhere (see syntax). | |||
| 176 | configure that subsystem out without also having to unset these drivers. | 182 | configure that subsystem out without also having to unset these drivers. |
| 177 | 183 | ||
| 178 | - limiting menu display: "visible if" <expr> | 184 | - limiting menu display: "visible if" <expr> |
| 185 | |||
| 179 | This attribute is only applicable to menu blocks, if the condition is | 186 | This attribute is only applicable to menu blocks, if the condition is |
| 180 | false, the menu block is not displayed to the user (the symbols | 187 | false, the menu block is not displayed to the user (the symbols |
| 181 | contained there can still be selected by other symbols, though). It is | 188 | contained there can still be selected by other symbols, though). It is |
| @@ -183,12 +190,14 @@ applicable everywhere (see syntax). | |||
| 183 | entries. Default value of "visible" is true. | 190 | entries. Default value of "visible" is true. |
| 184 | 191 | ||
| 185 | - numerical ranges: "range" <symbol> <symbol> ["if" <expr>] | 192 | - numerical ranges: "range" <symbol> <symbol> ["if" <expr>] |
| 193 | |||
| 186 | This allows to limit the range of possible input values for int | 194 | This allows to limit the range of possible input values for int |
| 187 | and hex symbols. The user can only input a value which is larger than | 195 | and hex symbols. The user can only input a value which is larger than |
| 188 | or equal to the first symbol and smaller than or equal to the second | 196 | or equal to the first symbol and smaller than or equal to the second |
| 189 | symbol. | 197 | symbol. |
| 190 | 198 | ||
| 191 | - help text: "help" or "---help---" | 199 | - help text: "help" or "---help---" |
| 200 | |||
| 192 | This defines a help text. The end of the help text is determined by | 201 | This defines a help text. The end of the help text is determined by |
| 193 | the indentation level, this means it ends at the first line which has | 202 | the indentation level, this means it ends at the first line which has |
| 194 | a smaller indentation than the first line of the help text. | 203 | a smaller indentation than the first line of the help text. |
| @@ -197,6 +206,7 @@ applicable everywhere (see syntax). | |||
| 197 | the file as an aid to developers. | 206 | the file as an aid to developers. |
| 198 | 207 | ||
| 199 | - misc options: "option" <symbol>[=<value>] | 208 | - misc options: "option" <symbol>[=<value>] |
| 209 | |||
| 200 | Various less common options can be defined via this option syntax, | 210 | Various less common options can be defined via this option syntax, |
| 201 | which can modify the behaviour of the menu entry and its config | 211 | which can modify the behaviour of the menu entry and its config |
| 202 | symbol. These options are currently possible: | 212 | symbol. These options are currently possible: |
| @@ -325,6 +335,7 @@ end a menu entry: | |||
| 325 | The first five also start the definition of a menu entry. | 335 | The first five also start the definition of a menu entry. |
| 326 | 336 | ||
| 327 | config:: | 337 | config:: |
| 338 | |||
| 328 | "config" <symbol> | 339 | "config" <symbol> |
| 329 | <config options> | 340 | <config options> |
| 330 | 341 | ||
| @@ -332,6 +343,7 @@ This defines a config symbol <symbol> and accepts any of above | |||
| 332 | attributes as options. | 343 | attributes as options. |
| 333 | 344 | ||
| 334 | menuconfig:: | 345 | menuconfig:: |
| 346 | |||
| 335 | "menuconfig" <symbol> | 347 | "menuconfig" <symbol> |
| 336 | <config options> | 348 | <config options> |
| 337 | 349 | ||
diff --git a/Documentation/kbuild/kconfig.rst b/Documentation/kbuild/kconfig.rst index 88129af7e539..a9a855f894b3 100644 --- a/Documentation/kbuild/kconfig.rst +++ b/Documentation/kbuild/kconfig.rst | |||
| @@ -264,6 +264,7 @@ NCONFIG_MODE | |||
| 264 | This mode shows all sub-menus in one large tree. | 264 | This mode shows all sub-menus in one large tree. |
| 265 | 265 | ||
| 266 | Example:: | 266 | Example:: |
| 267 | |||
| 267 | make NCONFIG_MODE=single_menu nconfig | 268 | make NCONFIG_MODE=single_menu nconfig |
| 268 | 269 | ||
| 269 | ---------------------------------------------------------------------- | 270 | ---------------------------------------------------------------------- |
| @@ -277,9 +278,12 @@ Searching in xconfig: | |||
| 277 | names, so you have to know something close to what you are | 278 | names, so you have to know something close to what you are |
| 278 | looking for. | 279 | looking for. |
| 279 | 280 | ||
| 280 | Example: | 281 | Example:: |
| 282 | |||
| 281 | Ctrl-F hotplug | 283 | Ctrl-F hotplug |
| 282 | or | 284 | |
| 285 | or:: | ||
| 286 | |||
| 283 | Menu: File, Search, hotplug | 287 | Menu: File, Search, hotplug |
| 284 | 288 | ||
| 285 | lists all config symbol entries that contain "hotplug" in | 289 | lists all config symbol entries that contain "hotplug" in |
diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst index 093f2d79ab95..f31158457753 100644 --- a/Documentation/kbuild/makefiles.rst +++ b/Documentation/kbuild/makefiles.rst | |||
| @@ -384,6 +384,7 @@ more details, with real examples. | |||
| 384 | ----------------------- | 384 | ----------------------- |
| 385 | 385 | ||
| 386 | Kbuild tracks dependencies on the following: | 386 | Kbuild tracks dependencies on the following: |
| 387 | |||
| 387 | 1) All prerequisite files (both `*.c` and `*.h`) | 388 | 1) All prerequisite files (both `*.c` and `*.h`) |
| 388 | 2) `CONFIG_` options used in all prerequisite files | 389 | 2) `CONFIG_` options used in all prerequisite files |
| 389 | 3) Command-line used to compile target | 390 | 3) Command-line used to compile target |
diff --git a/Documentation/kernel-hacking/locking.rst b/Documentation/kernel-hacking/locking.rst index dc698ea456e0..a8518ac0d31d 100644 --- a/Documentation/kernel-hacking/locking.rst +++ b/Documentation/kernel-hacking/locking.rst | |||
| @@ -1364,7 +1364,7 @@ Futex API reference | |||
| 1364 | Further reading | 1364 | Further reading |
| 1365 | =============== | 1365 | =============== |
| 1366 | 1366 | ||
| 1367 | - ``Documentation/locking/spinlocks.txt``: Linus Torvalds' spinlocking | 1367 | - ``Documentation/locking/spinlocks.rst``: Linus Torvalds' spinlocking |
| 1368 | tutorial in the kernel sources. | 1368 | tutorial in the kernel sources. |
| 1369 | 1369 | ||
| 1370 | - Unix Systems for Modern Architectures: Symmetric Multiprocessing and | 1370 | - Unix Systems for Modern Architectures: Symmetric Multiprocessing and |
diff --git a/Documentation/leds/index.rst b/Documentation/leds/index.rst index 9885f7c1b75d..060f4e485897 100644 --- a/Documentation/leds/index.rst +++ b/Documentation/leds/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ==== | 3 | ==== |
| 4 | LEDs | 4 | LEDs |
diff --git a/Documentation/livepatch/index.rst b/Documentation/livepatch/index.rst index edd291d51847..17674a9e21b2 100644 --- a/Documentation/livepatch/index.rst +++ b/Documentation/livepatch/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | =================== | 3 | =================== |
| 4 | Kernel Livepatching | 4 | Kernel Livepatching |
diff --git a/Documentation/locking/index.rst b/Documentation/locking/index.rst new file mode 100644 index 000000000000..626a463f7e42 --- /dev/null +++ b/Documentation/locking/index.rst | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ======= | ||
| 4 | locking | ||
| 5 | ======= | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | lockdep-design | ||
| 11 | lockstat | ||
| 12 | locktorture | ||
| 13 | mutex-design | ||
| 14 | rt-mutex-design | ||
| 15 | rt-mutex | ||
| 16 | spinlocks | ||
| 17 | ww-mutex-design | ||
| 18 | |||
| 19 | .. only:: subproject and html | ||
| 20 | |||
| 21 | Indices | ||
| 22 | ======= | ||
| 23 | |||
| 24 | * :ref:`genindex` | ||
diff --git a/Documentation/locking/lockdep-design.txt b/Documentation/locking/lockdep-design.rst index f189d130e543..23fcbc4d3fc0 100644 --- a/Documentation/locking/lockdep-design.txt +++ b/Documentation/locking/lockdep-design.rst | |||
| @@ -2,6 +2,7 @@ Runtime locking correctness validator | |||
| 2 | ===================================== | 2 | ===================================== |
| 3 | 3 | ||
| 4 | started by Ingo Molnar <mingo@redhat.com> | 4 | started by Ingo Molnar <mingo@redhat.com> |
| 5 | |||
| 5 | additions by Arjan van de Ven <arjan@linux.intel.com> | 6 | additions by Arjan van de Ven <arjan@linux.intel.com> |
| 6 | 7 | ||
| 7 | Lock-class | 8 | Lock-class |
| @@ -56,7 +57,7 @@ where the last 1 category is: | |||
| 56 | 57 | ||
| 57 | When locking rules are violated, these usage bits are presented in the | 58 | When locking rules are violated, these usage bits are presented in the |
| 58 | locking error messages, inside curlies, with a total of 2 * n STATEs bits. | 59 | locking error messages, inside curlies, with a total of 2 * n STATEs bits. |
| 59 | A contrived example: | 60 | A contrived example:: |
| 60 | 61 | ||
| 61 | modprobe/2287 is trying to acquire lock: | 62 | modprobe/2287 is trying to acquire lock: |
| 62 | (&sio_locks[i].lock){-.-.}, at: [<c02867fd>] mutex_lock+0x21/0x24 | 63 | (&sio_locks[i].lock){-.-.}, at: [<c02867fd>] mutex_lock+0x21/0x24 |
| @@ -70,12 +71,14 @@ of the lock and readlock (if exists), for each of the n STATEs listed | |||
| 70 | above respectively, and the character displayed at each bit position | 71 | above respectively, and the character displayed at each bit position |
| 71 | indicates: | 72 | indicates: |
| 72 | 73 | ||
| 74 | === =================================================== | ||
| 73 | '.' acquired while irqs disabled and not in irq context | 75 | '.' acquired while irqs disabled and not in irq context |
| 74 | '-' acquired in irq context | 76 | '-' acquired in irq context |
| 75 | '+' acquired with irqs enabled | 77 | '+' acquired with irqs enabled |
| 76 | '?' acquired in irq context with irqs enabled. | 78 | '?' acquired in irq context with irqs enabled. |
| 79 | === =================================================== | ||
| 77 | 80 | ||
| 78 | The bits are illustrated with an example: | 81 | The bits are illustrated with an example:: |
| 79 | 82 | ||
| 80 | (&sio_locks[i].lock){-.-.}, at: [<c02867fd>] mutex_lock+0x21/0x24 | 83 | (&sio_locks[i].lock){-.-.}, at: [<c02867fd>] mutex_lock+0x21/0x24 |
| 81 | |||| | 84 | |||| |
| @@ -90,13 +93,13 @@ context and whether that STATE is enabled yields four possible cases as | |||
| 90 | shown in the table below. The bit character is able to indicate which | 93 | shown in the table below. The bit character is able to indicate which |
| 91 | exact case is for the lock as of the reporting time. | 94 | exact case is for the lock as of the reporting time. |
| 92 | 95 | ||
| 93 | ------------------------------------------- | 96 | +--------------+-------------+--------------+ |
| 94 | | | irq enabled | irq disabled | | 97 | | | irq enabled | irq disabled | |
| 95 | |-------------------------------------------| | 98 | +--------------+-------------+--------------+ |
| 96 | | ever in irq | ? | - | | 99 | | ever in irq | ? | - | |
| 97 | |-------------------------------------------| | 100 | +--------------+-------------+--------------+ |
| 98 | | never in irq | + | . | | 101 | | never in irq | + | . | |
| 99 | ------------------------------------------- | 102 | +--------------+-------------+--------------+ |
| 100 | 103 | ||
| 101 | The character '-' suggests irq is disabled because if otherwise the | 104 | The character '-' suggests irq is disabled because if otherwise the |
| 102 | charactor '?' would have been shown instead. Similar deduction can be | 105 | charactor '?' would have been shown instead. Similar deduction can be |
| @@ -113,7 +116,7 @@ is irq-unsafe means it was ever acquired with irq enabled. | |||
| 113 | 116 | ||
| 114 | A softirq-unsafe lock-class is automatically hardirq-unsafe as well. The | 117 | A softirq-unsafe lock-class is automatically hardirq-unsafe as well. The |
| 115 | following states must be exclusive: only one of them is allowed to be set | 118 | following states must be exclusive: only one of them is allowed to be set |
| 116 | for any lock-class based on its usage: | 119 | for any lock-class based on its usage:: |
| 117 | 120 | ||
| 118 | <hardirq-safe> or <hardirq-unsafe> | 121 | <hardirq-safe> or <hardirq-unsafe> |
| 119 | <softirq-safe> or <softirq-unsafe> | 122 | <softirq-safe> or <softirq-unsafe> |
| @@ -134,7 +137,7 @@ Multi-lock dependency rules: | |||
| 134 | The same lock-class must not be acquired twice, because this could lead | 137 | The same lock-class must not be acquired twice, because this could lead |
| 135 | to lock recursion deadlocks. | 138 | to lock recursion deadlocks. |
| 136 | 139 | ||
| 137 | Furthermore, two locks can not be taken in inverse order: | 140 | Furthermore, two locks can not be taken in inverse order:: |
| 138 | 141 | ||
| 139 | <L1> -> <L2> | 142 | <L1> -> <L2> |
| 140 | <L2> -> <L1> | 143 | <L2> -> <L1> |
| @@ -148,7 +151,7 @@ operations; the validator will still find whether these locks can be | |||
| 148 | acquired in a circular fashion. | 151 | acquired in a circular fashion. |
| 149 | 152 | ||
| 150 | Furthermore, the following usage based lock dependencies are not allowed | 153 | Furthermore, the following usage based lock dependencies are not allowed |
| 151 | between any two lock-classes: | 154 | between any two lock-classes:: |
| 152 | 155 | ||
| 153 | <hardirq-safe> -> <hardirq-unsafe> | 156 | <hardirq-safe> -> <hardirq-unsafe> |
| 154 | <softirq-safe> -> <softirq-unsafe> | 157 | <softirq-safe> -> <softirq-unsafe> |
| @@ -204,16 +207,16 @@ the ordering is not static. | |||
| 204 | In order to teach the validator about this correct usage model, new | 207 | In order to teach the validator about this correct usage model, new |
| 205 | versions of the various locking primitives were added that allow you to | 208 | versions of the various locking primitives were added that allow you to |
| 206 | specify a "nesting level". An example call, for the block device mutex, | 209 | specify a "nesting level". An example call, for the block device mutex, |
| 207 | looks like this: | 210 | looks like this:: |
| 208 | 211 | ||
| 209 | enum bdev_bd_mutex_lock_class | 212 | enum bdev_bd_mutex_lock_class |
| 210 | { | 213 | { |
| 211 | BD_MUTEX_NORMAL, | 214 | BD_MUTEX_NORMAL, |
| 212 | BD_MUTEX_WHOLE, | 215 | BD_MUTEX_WHOLE, |
| 213 | BD_MUTEX_PARTITION | 216 | BD_MUTEX_PARTITION |
| 214 | }; | 217 | }; |
| 215 | 218 | ||
| 216 | mutex_lock_nested(&bdev->bd_contains->bd_mutex, BD_MUTEX_PARTITION); | 219 | mutex_lock_nested(&bdev->bd_contains->bd_mutex, BD_MUTEX_PARTITION); |
| 217 | 220 | ||
| 218 | In this case the locking is done on a bdev object that is known to be a | 221 | In this case the locking is done on a bdev object that is known to be a |
| 219 | partition. | 222 | partition. |
| @@ -234,7 +237,7 @@ must be held: lockdep_assert_held*(&lock) and lockdep_*pin_lock(&lock). | |||
| 234 | As the name suggests, lockdep_assert_held* family of macros assert that a | 237 | As the name suggests, lockdep_assert_held* family of macros assert that a |
| 235 | particular lock is held at a certain time (and generate a WARN() otherwise). | 238 | particular lock is held at a certain time (and generate a WARN() otherwise). |
| 236 | This annotation is largely used all over the kernel, e.g. kernel/sched/ | 239 | This annotation is largely used all over the kernel, e.g. kernel/sched/ |
| 237 | core.c | 240 | core.c:: |
| 238 | 241 | ||
| 239 | void update_rq_clock(struct rq *rq) | 242 | void update_rq_clock(struct rq *rq) |
| 240 | { | 243 | { |
| @@ -253,7 +256,7 @@ out to be especially helpful to debug code with callbacks, where an upper | |||
| 253 | layer assumes a lock remains taken, but a lower layer thinks it can maybe drop | 256 | layer assumes a lock remains taken, but a lower layer thinks it can maybe drop |
| 254 | and reacquire the lock ("unwittingly" introducing races). lockdep_pin_lock() | 257 | and reacquire the lock ("unwittingly" introducing races). lockdep_pin_lock() |
| 255 | returns a 'struct pin_cookie' that is then used by lockdep_unpin_lock() to check | 258 | returns a 'struct pin_cookie' that is then used by lockdep_unpin_lock() to check |
| 256 | that nobody tampered with the lock, e.g. kernel/sched/sched.h | 259 | that nobody tampered with the lock, e.g. kernel/sched/sched.h:: |
| 257 | 260 | ||
| 258 | static inline void rq_pin_lock(struct rq *rq, struct rq_flags *rf) | 261 | static inline void rq_pin_lock(struct rq *rq, struct rq_flags *rf) |
| 259 | { | 262 | { |
| @@ -280,7 +283,7 @@ correctness) in the sense that for every simple, standalone single-task | |||
| 280 | locking sequence that occurred at least once during the lifetime of the | 283 | locking sequence that occurred at least once during the lifetime of the |
| 281 | kernel, the validator proves it with a 100% certainty that no | 284 | kernel, the validator proves it with a 100% certainty that no |
| 282 | combination and timing of these locking sequences can cause any class of | 285 | combination and timing of these locking sequences can cause any class of |
| 283 | lock related deadlock. [*] | 286 | lock related deadlock. [1]_ |
| 284 | 287 | ||
| 285 | I.e. complex multi-CPU and multi-task locking scenarios do not have to | 288 | I.e. complex multi-CPU and multi-task locking scenarios do not have to |
| 286 | occur in practice to prove a deadlock: only the simple 'component' | 289 | occur in practice to prove a deadlock: only the simple 'component' |
| @@ -299,7 +302,9 @@ possible combination of locking interaction between CPUs, combined with | |||
| 299 | every possible hardirq and softirq nesting scenario (which is impossible | 302 | every possible hardirq and softirq nesting scenario (which is impossible |
| 300 | to do in practice). | 303 | to do in practice). |
| 301 | 304 | ||
| 302 | [*] assuming that the validator itself is 100% correct, and no other | 305 | .. [1] |
| 306 | |||
| 307 | assuming that the validator itself is 100% correct, and no other | ||
| 303 | part of the system corrupts the state of the validator in any way. | 308 | part of the system corrupts the state of the validator in any way. |
| 304 | We also assume that all NMI/SMM paths [which could interrupt | 309 | We also assume that all NMI/SMM paths [which could interrupt |
| 305 | even hardirq-disabled codepaths] are correct and do not interfere | 310 | even hardirq-disabled codepaths] are correct and do not interfere |
| @@ -310,7 +315,7 @@ to do in practice). | |||
| 310 | Performance: | 315 | Performance: |
| 311 | ------------ | 316 | ------------ |
| 312 | 317 | ||
| 313 | The above rules require _massive_ amounts of runtime checking. If we did | 318 | The above rules require **massive** amounts of runtime checking. If we did |
| 314 | that for every lock taken and for every irqs-enable event, it would | 319 | that for every lock taken and for every irqs-enable event, it would |
| 315 | render the system practically unusably slow. The complexity of checking | 320 | render the system practically unusably slow. The complexity of checking |
| 316 | is O(N^2), so even with just a few hundred lock-classes we'd have to do | 321 | is O(N^2), so even with just a few hundred lock-classes we'd have to do |
| @@ -369,17 +374,17 @@ be harder to do than to say. | |||
| 369 | 374 | ||
| 370 | Of course, if you do run out of lock classes, the next thing to do is | 375 | Of course, if you do run out of lock classes, the next thing to do is |
| 371 | to find the offending lock classes. First, the following command gives | 376 | to find the offending lock classes. First, the following command gives |
| 372 | you the number of lock classes currently in use along with the maximum: | 377 | you the number of lock classes currently in use along with the maximum:: |
| 373 | 378 | ||
| 374 | grep "lock-classes" /proc/lockdep_stats | 379 | grep "lock-classes" /proc/lockdep_stats |
| 375 | 380 | ||
| 376 | This command produces the following output on a modest system: | 381 | This command produces the following output on a modest system:: |
| 377 | 382 | ||
| 378 | lock-classes: 748 [max: 8191] | 383 | lock-classes: 748 [max: 8191] |
| 379 | 384 | ||
| 380 | If the number allocated (748 above) increases continually over time, | 385 | If the number allocated (748 above) increases continually over time, |
| 381 | then there is likely a leak. The following command can be used to | 386 | then there is likely a leak. The following command can be used to |
| 382 | identify the leaking lock classes: | 387 | identify the leaking lock classes:: |
| 383 | 388 | ||
| 384 | grep "BD" /proc/lockdep | 389 | grep "BD" /proc/lockdep |
| 385 | 390 | ||
diff --git a/Documentation/locking/lockstat.rst b/Documentation/locking/lockstat.rst new file mode 100644 index 000000000000..536eab8dbd99 --- /dev/null +++ b/Documentation/locking/lockstat.rst | |||
| @@ -0,0 +1,204 @@ | |||
| 1 | =============== | ||
| 2 | Lock Statistics | ||
| 3 | =============== | ||
| 4 | |||
| 5 | What | ||
| 6 | ==== | ||
| 7 | |||
| 8 | As the name suggests, it provides statistics on locks. | ||
| 9 | |||
| 10 | |||
| 11 | Why | ||
| 12 | === | ||
| 13 | |||
| 14 | Because things like lock contention can severely impact performance. | ||
| 15 | |||
| 16 | How | ||
| 17 | === | ||
| 18 | |||
| 19 | Lockdep already has hooks in the lock functions and maps lock instances to | ||
| 20 | lock classes. We build on that (see Documentation/locking/lockdep-design.rst). | ||
| 21 | The graph below shows the relation between the lock functions and the various | ||
| 22 | hooks therein:: | ||
| 23 | |||
| 24 | __acquire | ||
| 25 | | | ||
| 26 | lock _____ | ||
| 27 | | \ | ||
| 28 | | __contended | ||
| 29 | | | | ||
| 30 | | <wait> | ||
| 31 | | _______/ | ||
| 32 | |/ | ||
| 33 | | | ||
| 34 | __acquired | ||
| 35 | | | ||
| 36 | . | ||
| 37 | <hold> | ||
| 38 | . | ||
| 39 | | | ||
| 40 | __release | ||
| 41 | | | ||
| 42 | unlock | ||
| 43 | |||
| 44 | lock, unlock - the regular lock functions | ||
| 45 | __* - the hooks | ||
| 46 | <> - states | ||
| 47 | |||
| 48 | With these hooks we provide the following statistics: | ||
| 49 | |||
| 50 | con-bounces | ||
| 51 | - number of lock contention that involved x-cpu data | ||
| 52 | contentions | ||
| 53 | - number of lock acquisitions that had to wait | ||
| 54 | wait time | ||
| 55 | min | ||
| 56 | - shortest (non-0) time we ever had to wait for a lock | ||
| 57 | max | ||
| 58 | - longest time we ever had to wait for a lock | ||
| 59 | total | ||
| 60 | - total time we spend waiting on this lock | ||
| 61 | avg | ||
| 62 | - average time spent waiting on this lock | ||
| 63 | acq-bounces | ||
| 64 | - number of lock acquisitions that involved x-cpu data | ||
| 65 | acquisitions | ||
| 66 | - number of times we took the lock | ||
| 67 | hold time | ||
| 68 | min | ||
| 69 | - shortest (non-0) time we ever held the lock | ||
| 70 | max | ||
| 71 | - longest time we ever held the lock | ||
| 72 | total | ||
| 73 | - total time this lock was held | ||
| 74 | avg | ||
| 75 | - average time this lock was held | ||
| 76 | |||
| 77 | These numbers are gathered per lock class, per read/write state (when | ||
| 78 | applicable). | ||
| 79 | |||
| 80 | It also tracks 4 contention points per class. A contention point is a call site | ||
| 81 | that had to wait on lock acquisition. | ||
| 82 | |||
| 83 | Configuration | ||
| 84 | ------------- | ||
| 85 | |||
| 86 | Lock statistics are enabled via CONFIG_LOCK_STAT. | ||
| 87 | |||
| 88 | Usage | ||
| 89 | ----- | ||
| 90 | |||
| 91 | Enable collection of statistics:: | ||
| 92 | |||
| 93 | # echo 1 >/proc/sys/kernel/lock_stat | ||
| 94 | |||
| 95 | Disable collection of statistics:: | ||
| 96 | |||
| 97 | # echo 0 >/proc/sys/kernel/lock_stat | ||
| 98 | |||
| 99 | Look at the current lock statistics:: | ||
| 100 | |||
| 101 | ( line numbers not part of actual output, done for clarity in the explanation | ||
| 102 | below ) | ||
| 103 | |||
| 104 | # less /proc/lock_stat | ||
| 105 | |||
| 106 | 01 lock_stat version 0.4 | ||
| 107 | 02----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
| 108 | 03 class name con-bounces contentions waittime-min waittime-max waittime-total waittime-avg acq-bounces acquisitions holdtime-min holdtime-max holdtime-total holdtime-avg | ||
| 109 | 04----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
| 110 | 05 | ||
| 111 | 06 &mm->mmap_sem-W: 46 84 0.26 939.10 16371.53 194.90 47291 2922365 0.16 2220301.69 17464026916.32 5975.99 | ||
| 112 | 07 &mm->mmap_sem-R: 37 100 1.31 299502.61 325629.52 3256.30 212344 34316685 0.10 7744.91 95016910.20 2.77 | ||
| 113 | 08 --------------- | ||
| 114 | 09 &mm->mmap_sem 1 [<ffffffff811502a7>] khugepaged_scan_mm_slot+0x57/0x280 | ||
| 115 | 10 &mm->mmap_sem 96 [<ffffffff815351c4>] __do_page_fault+0x1d4/0x510 | ||
| 116 | 11 &mm->mmap_sem 34 [<ffffffff81113d77>] vm_mmap_pgoff+0x87/0xd0 | ||
| 117 | 12 &mm->mmap_sem 17 [<ffffffff81127e71>] vm_munmap+0x41/0x80 | ||
| 118 | 13 --------------- | ||
| 119 | 14 &mm->mmap_sem 1 [<ffffffff81046fda>] dup_mmap+0x2a/0x3f0 | ||
| 120 | 15 &mm->mmap_sem 60 [<ffffffff81129e29>] SyS_mprotect+0xe9/0x250 | ||
| 121 | 16 &mm->mmap_sem 41 [<ffffffff815351c4>] __do_page_fault+0x1d4/0x510 | ||
| 122 | 17 &mm->mmap_sem 68 [<ffffffff81113d77>] vm_mmap_pgoff+0x87/0xd0 | ||
| 123 | 18 | ||
| 124 | 19............................................................................................................................................................................................................................. | ||
| 125 | 20 | ||
| 126 | 21 unix_table_lock: 110 112 0.21 49.24 163.91 1.46 21094 66312 0.12 624.42 31589.81 0.48 | ||
| 127 | 22 --------------- | ||
| 128 | 23 unix_table_lock 45 [<ffffffff8150ad8e>] unix_create1+0x16e/0x1b0 | ||
| 129 | 24 unix_table_lock 47 [<ffffffff8150b111>] unix_release_sock+0x31/0x250 | ||
| 130 | 25 unix_table_lock 15 [<ffffffff8150ca37>] unix_find_other+0x117/0x230 | ||
| 131 | 26 unix_table_lock 5 [<ffffffff8150a09f>] unix_autobind+0x11f/0x1b0 | ||
| 132 | 27 --------------- | ||
| 133 | 28 unix_table_lock 39 [<ffffffff8150b111>] unix_release_sock+0x31/0x250 | ||
| 134 | 29 unix_table_lock 49 [<ffffffff8150ad8e>] unix_create1+0x16e/0x1b0 | ||
| 135 | 30 unix_table_lock 20 [<ffffffff8150ca37>] unix_find_other+0x117/0x230 | ||
| 136 | 31 unix_table_lock 4 [<ffffffff8150a09f>] unix_autobind+0x11f/0x1b0 | ||
| 137 | |||
| 138 | |||
| 139 | This excerpt shows the first two lock class statistics. Line 01 shows the | ||
| 140 | output version - each time the format changes this will be updated. Line 02-04 | ||
| 141 | show the header with column descriptions. Lines 05-18 and 20-31 show the actual | ||
| 142 | statistics. These statistics come in two parts; the actual stats separated by a | ||
| 143 | short separator (line 08, 13) from the contention points. | ||
| 144 | |||
| 145 | Lines 09-12 show the first 4 recorded contention points (the code | ||
| 146 | which tries to get the lock) and lines 14-17 show the first 4 recorded | ||
| 147 | contended points (the lock holder). It is possible that the max | ||
| 148 | con-bounces point is missing in the statistics. | ||
| 149 | |||
| 150 | The first lock (05-18) is a read/write lock, and shows two lines above the | ||
| 151 | short separator. The contention points don't match the column descriptors, | ||
| 152 | they have two: contentions and [<IP>] symbol. The second set of contention | ||
| 153 | points are the points we're contending with. | ||
| 154 | |||
| 155 | The integer part of the time values is in us. | ||
| 156 | |||
| 157 | Dealing with nested locks, subclasses may appear:: | ||
| 158 | |||
| 159 | 32........................................................................................................................................................................................................................... | ||
| 160 | 33 | ||
| 161 | 34 &rq->lock: 13128 13128 0.43 190.53 103881.26 7.91 97454 3453404 0.00 401.11 13224683.11 3.82 | ||
| 162 | 35 --------- | ||
| 163 | 36 &rq->lock 645 [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75 | ||
| 164 | 37 &rq->lock 297 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a | ||
| 165 | 38 &rq->lock 360 [<ffffffff8103c4c5>] select_task_rq_fair+0x1f0/0x74a | ||
| 166 | 39 &rq->lock 428 [<ffffffff81045f98>] scheduler_tick+0x46/0x1fb | ||
| 167 | 40 --------- | ||
| 168 | 41 &rq->lock 77 [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75 | ||
| 169 | 42 &rq->lock 174 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a | ||
| 170 | 43 &rq->lock 4715 [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54 | ||
| 171 | 44 &rq->lock 893 [<ffffffff81340524>] schedule+0x157/0x7b8 | ||
| 172 | 45 | ||
| 173 | 46........................................................................................................................................................................................................................... | ||
| 174 | 47 | ||
| 175 | 48 &rq->lock/1: 1526 11488 0.33 388.73 136294.31 11.86 21461 38404 0.00 37.93 109388.53 2.84 | ||
| 176 | 49 ----------- | ||
| 177 | 50 &rq->lock/1 11526 [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54 | ||
| 178 | 51 ----------- | ||
| 179 | 52 &rq->lock/1 5645 [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54 | ||
| 180 | 53 &rq->lock/1 1224 [<ffffffff81340524>] schedule+0x157/0x7b8 | ||
| 181 | 54 &rq->lock/1 4336 [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54 | ||
| 182 | 55 &rq->lock/1 181 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a | ||
| 183 | |||
| 184 | Line 48 shows statistics for the second subclass (/1) of &rq->lock class | ||
| 185 | (subclass starts from 0), since in this case, as line 50 suggests, | ||
| 186 | double_rq_lock actually acquires a nested lock of two spinlocks. | ||
| 187 | |||
| 188 | View the top contending locks:: | ||
| 189 | |||
| 190 | # grep : /proc/lock_stat | head | ||
| 191 | clockevents_lock: 2926159 2947636 0.15 46882.81 1784540466.34 605.41 3381345 3879161 0.00 2260.97 53178395.68 13.71 | ||
| 192 | tick_broadcast_lock: 346460 346717 0.18 2257.43 39364622.71 113.54 3642919 4242696 0.00 2263.79 49173646.60 11.59 | ||
| 193 | &mapping->i_mmap_mutex: 203896 203899 3.36 645530.05 31767507988.39 155800.21 3361776 8893984 0.17 2254.15 14110121.02 1.59 | ||
| 194 | &rq->lock: 135014 136909 0.18 606.09 842160.68 6.15 1540728 10436146 0.00 728.72 17606683.41 1.69 | ||
| 195 | &(&zone->lru_lock)->rlock: 93000 94934 0.16 59.18 188253.78 1.98 1199912 3809894 0.15 391.40 3559518.81 0.93 | ||
| 196 | tasklist_lock-W: 40667 41130 0.23 1189.42 428980.51 10.43 270278 510106 0.16 653.51 3939674.91 7.72 | ||
| 197 | tasklist_lock-R: 21298 21305 0.20 1310.05 215511.12 10.12 186204 241258 0.14 1162.33 1179779.23 4.89 | ||
| 198 | rcu_node_1: 47656 49022 0.16 635.41 193616.41 3.95 844888 1865423 0.00 764.26 1656226.96 0.89 | ||
| 199 | &(&dentry->d_lockref.lock)->rlock: 39791 40179 0.15 1302.08 88851.96 2.21 2790851 12527025 0.10 1910.75 3379714.27 0.27 | ||
| 200 | rcu_node_0: 29203 30064 0.16 786.55 1555573.00 51.74 88963 244254 0.00 398.87 428872.51 1.76 | ||
| 201 | |||
| 202 | Clear the statistics:: | ||
| 203 | |||
| 204 | # echo 0 > /proc/lock_stat | ||
diff --git a/Documentation/locking/lockstat.txt b/Documentation/locking/lockstat.txt deleted file mode 100644 index fdbeb0c45ef3..000000000000 --- a/Documentation/locking/lockstat.txt +++ /dev/null | |||
| @@ -1,183 +0,0 @@ | |||
| 1 | |||
| 2 | LOCK STATISTICS | ||
| 3 | |||
| 4 | - WHAT | ||
| 5 | |||
| 6 | As the name suggests, it provides statistics on locks. | ||
| 7 | |||
| 8 | - WHY | ||
| 9 | |||
| 10 | Because things like lock contention can severely impact performance. | ||
| 11 | |||
| 12 | - HOW | ||
| 13 | |||
| 14 | Lockdep already has hooks in the lock functions and maps lock instances to | ||
| 15 | lock classes. We build on that (see Documentation/locking/lockdep-design.txt). | ||
| 16 | The graph below shows the relation between the lock functions and the various | ||
| 17 | hooks therein. | ||
| 18 | |||
| 19 | __acquire | ||
| 20 | | | ||
| 21 | lock _____ | ||
| 22 | | \ | ||
| 23 | | __contended | ||
| 24 | | | | ||
| 25 | | <wait> | ||
| 26 | | _______/ | ||
| 27 | |/ | ||
| 28 | | | ||
| 29 | __acquired | ||
| 30 | | | ||
| 31 | . | ||
| 32 | <hold> | ||
| 33 | . | ||
| 34 | | | ||
| 35 | __release | ||
| 36 | | | ||
| 37 | unlock | ||
| 38 | |||
| 39 | lock, unlock - the regular lock functions | ||
| 40 | __* - the hooks | ||
| 41 | <> - states | ||
| 42 | |||
| 43 | With these hooks we provide the following statistics: | ||
| 44 | |||
| 45 | con-bounces - number of lock contention that involved x-cpu data | ||
| 46 | contentions - number of lock acquisitions that had to wait | ||
| 47 | wait time min - shortest (non-0) time we ever had to wait for a lock | ||
| 48 | max - longest time we ever had to wait for a lock | ||
| 49 | total - total time we spend waiting on this lock | ||
| 50 | avg - average time spent waiting on this lock | ||
| 51 | acq-bounces - number of lock acquisitions that involved x-cpu data | ||
| 52 | acquisitions - number of times we took the lock | ||
| 53 | hold time min - shortest (non-0) time we ever held the lock | ||
| 54 | max - longest time we ever held the lock | ||
| 55 | total - total time this lock was held | ||
| 56 | avg - average time this lock was held | ||
| 57 | |||
| 58 | These numbers are gathered per lock class, per read/write state (when | ||
| 59 | applicable). | ||
| 60 | |||
| 61 | It also tracks 4 contention points per class. A contention point is a call site | ||
| 62 | that had to wait on lock acquisition. | ||
| 63 | |||
| 64 | - CONFIGURATION | ||
| 65 | |||
| 66 | Lock statistics are enabled via CONFIG_LOCK_STAT. | ||
| 67 | |||
| 68 | - USAGE | ||
| 69 | |||
| 70 | Enable collection of statistics: | ||
| 71 | |||
| 72 | # echo 1 >/proc/sys/kernel/lock_stat | ||
| 73 | |||
| 74 | Disable collection of statistics: | ||
| 75 | |||
| 76 | # echo 0 >/proc/sys/kernel/lock_stat | ||
| 77 | |||
| 78 | Look at the current lock statistics: | ||
| 79 | |||
| 80 | ( line numbers not part of actual output, done for clarity in the explanation | ||
| 81 | below ) | ||
| 82 | |||
| 83 | # less /proc/lock_stat | ||
| 84 | |||
| 85 | 01 lock_stat version 0.4 | ||
| 86 | 02----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
| 87 | 03 class name con-bounces contentions waittime-min waittime-max waittime-total waittime-avg acq-bounces acquisitions holdtime-min holdtime-max holdtime-total holdtime-avg | ||
| 88 | 04----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
| 89 | 05 | ||
| 90 | 06 &mm->mmap_sem-W: 46 84 0.26 939.10 16371.53 194.90 47291 2922365 0.16 2220301.69 17464026916.32 5975.99 | ||
| 91 | 07 &mm->mmap_sem-R: 37 100 1.31 299502.61 325629.52 3256.30 212344 34316685 0.10 7744.91 95016910.20 2.77 | ||
| 92 | 08 --------------- | ||
| 93 | 09 &mm->mmap_sem 1 [<ffffffff811502a7>] khugepaged_scan_mm_slot+0x57/0x280 | ||
| 94 | 10 &mm->mmap_sem 96 [<ffffffff815351c4>] __do_page_fault+0x1d4/0x510 | ||
| 95 | 11 &mm->mmap_sem 34 [<ffffffff81113d77>] vm_mmap_pgoff+0x87/0xd0 | ||
| 96 | 12 &mm->mmap_sem 17 [<ffffffff81127e71>] vm_munmap+0x41/0x80 | ||
| 97 | 13 --------------- | ||
| 98 | 14 &mm->mmap_sem 1 [<ffffffff81046fda>] dup_mmap+0x2a/0x3f0 | ||
| 99 | 15 &mm->mmap_sem 60 [<ffffffff81129e29>] SyS_mprotect+0xe9/0x250 | ||
| 100 | 16 &mm->mmap_sem 41 [<ffffffff815351c4>] __do_page_fault+0x1d4/0x510 | ||
| 101 | 17 &mm->mmap_sem 68 [<ffffffff81113d77>] vm_mmap_pgoff+0x87/0xd0 | ||
| 102 | 18 | ||
| 103 | 19............................................................................................................................................................................................................................. | ||
| 104 | 20 | ||
| 105 | 21 unix_table_lock: 110 112 0.21 49.24 163.91 1.46 21094 66312 0.12 624.42 31589.81 0.48 | ||
| 106 | 22 --------------- | ||
| 107 | 23 unix_table_lock 45 [<ffffffff8150ad8e>] unix_create1+0x16e/0x1b0 | ||
| 108 | 24 unix_table_lock 47 [<ffffffff8150b111>] unix_release_sock+0x31/0x250 | ||
| 109 | 25 unix_table_lock 15 [<ffffffff8150ca37>] unix_find_other+0x117/0x230 | ||
| 110 | 26 unix_table_lock 5 [<ffffffff8150a09f>] unix_autobind+0x11f/0x1b0 | ||
| 111 | 27 --------------- | ||
| 112 | 28 unix_table_lock 39 [<ffffffff8150b111>] unix_release_sock+0x31/0x250 | ||
| 113 | 29 unix_table_lock 49 [<ffffffff8150ad8e>] unix_create1+0x16e/0x1b0 | ||
| 114 | 30 unix_table_lock 20 [<ffffffff8150ca37>] unix_find_other+0x117/0x230 | ||
| 115 | 31 unix_table_lock 4 [<ffffffff8150a09f>] unix_autobind+0x11f/0x1b0 | ||
| 116 | |||
| 117 | |||
| 118 | This excerpt shows the first two lock class statistics. Line 01 shows the | ||
| 119 | output version - each time the format changes this will be updated. Line 02-04 | ||
| 120 | show the header with column descriptions. Lines 05-18 and 20-31 show the actual | ||
| 121 | statistics. These statistics come in two parts; the actual stats separated by a | ||
| 122 | short separator (line 08, 13) from the contention points. | ||
| 123 | |||
| 124 | Lines 09-12 show the first 4 recorded contention points (the code | ||
| 125 | which tries to get the lock) and lines 14-17 show the first 4 recorded | ||
| 126 | contended points (the lock holder). It is possible that the max | ||
| 127 | con-bounces point is missing in the statistics. | ||
| 128 | |||
| 129 | The first lock (05-18) is a read/write lock, and shows two lines above the | ||
| 130 | short separator. The contention points don't match the column descriptors, | ||
| 131 | they have two: contentions and [<IP>] symbol. The second set of contention | ||
| 132 | points are the points we're contending with. | ||
| 133 | |||
| 134 | The integer part of the time values is in us. | ||
| 135 | |||
| 136 | Dealing with nested locks, subclasses may appear: | ||
| 137 | |||
| 138 | 32........................................................................................................................................................................................................................... | ||
| 139 | 33 | ||
| 140 | 34 &rq->lock: 13128 13128 0.43 190.53 103881.26 7.91 97454 3453404 0.00 401.11 13224683.11 3.82 | ||
| 141 | 35 --------- | ||
| 142 | 36 &rq->lock 645 [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75 | ||
| 143 | 37 &rq->lock 297 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a | ||
| 144 | 38 &rq->lock 360 [<ffffffff8103c4c5>] select_task_rq_fair+0x1f0/0x74a | ||
| 145 | 39 &rq->lock 428 [<ffffffff81045f98>] scheduler_tick+0x46/0x1fb | ||
| 146 | 40 --------- | ||
| 147 | 41 &rq->lock 77 [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75 | ||
| 148 | 42 &rq->lock 174 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a | ||
| 149 | 43 &rq->lock 4715 [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54 | ||
| 150 | 44 &rq->lock 893 [<ffffffff81340524>] schedule+0x157/0x7b8 | ||
| 151 | 45 | ||
| 152 | 46........................................................................................................................................................................................................................... | ||
| 153 | 47 | ||
| 154 | 48 &rq->lock/1: 1526 11488 0.33 388.73 136294.31 11.86 21461 38404 0.00 37.93 109388.53 2.84 | ||
| 155 | 49 ----------- | ||
| 156 | 50 &rq->lock/1 11526 [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54 | ||
| 157 | 51 ----------- | ||
| 158 | 52 &rq->lock/1 5645 [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54 | ||
| 159 | 53 &rq->lock/1 1224 [<ffffffff81340524>] schedule+0x157/0x7b8 | ||
| 160 | 54 &rq->lock/1 4336 [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54 | ||
| 161 | 55 &rq->lock/1 181 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a | ||
| 162 | |||
| 163 | Line 48 shows statistics for the second subclass (/1) of &rq->lock class | ||
| 164 | (subclass starts from 0), since in this case, as line 50 suggests, | ||
| 165 | double_rq_lock actually acquires a nested lock of two spinlocks. | ||
| 166 | |||
| 167 | View the top contending locks: | ||
| 168 | |||
| 169 | # grep : /proc/lock_stat | head | ||
| 170 | clockevents_lock: 2926159 2947636 0.15 46882.81 1784540466.34 605.41 3381345 3879161 0.00 2260.97 53178395.68 13.71 | ||
| 171 | tick_broadcast_lock: 346460 346717 0.18 2257.43 39364622.71 113.54 3642919 4242696 0.00 2263.79 49173646.60 11.59 | ||
| 172 | &mapping->i_mmap_mutex: 203896 203899 3.36 645530.05 31767507988.39 155800.21 3361776 8893984 0.17 2254.15 14110121.02 1.59 | ||
| 173 | &rq->lock: 135014 136909 0.18 606.09 842160.68 6.15 1540728 10436146 0.00 728.72 17606683.41 1.69 | ||
| 174 | &(&zone->lru_lock)->rlock: 93000 94934 0.16 59.18 188253.78 1.98 1199912 3809894 0.15 391.40 3559518.81 0.93 | ||
| 175 | tasklist_lock-W: 40667 41130 0.23 1189.42 428980.51 10.43 270278 510106 0.16 653.51 3939674.91 7.72 | ||
| 176 | tasklist_lock-R: 21298 21305 0.20 1310.05 215511.12 10.12 186204 241258 0.14 1162.33 1179779.23 4.89 | ||
| 177 | rcu_node_1: 47656 49022 0.16 635.41 193616.41 3.95 844888 1865423 0.00 764.26 1656226.96 0.89 | ||
| 178 | &(&dentry->d_lockref.lock)->rlock: 39791 40179 0.15 1302.08 88851.96 2.21 2790851 12527025 0.10 1910.75 3379714.27 0.27 | ||
| 179 | rcu_node_0: 29203 30064 0.16 786.55 1555573.00 51.74 88963 244254 0.00 398.87 428872.51 1.76 | ||
| 180 | |||
| 181 | Clear the statistics: | ||
| 182 | |||
| 183 | # echo 0 > /proc/lock_stat | ||
diff --git a/Documentation/locking/locktorture.txt b/Documentation/locking/locktorture.rst index 6a8df4cd19bf..e79eeeca3ac6 100644 --- a/Documentation/locking/locktorture.txt +++ b/Documentation/locking/locktorture.rst | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | ================================== | ||
| 1 | Kernel Lock Torture Test Operation | 2 | Kernel Lock Torture Test Operation |
| 3 | ================================== | ||
| 2 | 4 | ||
| 3 | CONFIG_LOCK_TORTURE_TEST | 5 | CONFIG_LOCK_TORTURE_TEST |
| 6 | ======================== | ||
| 4 | 7 | ||
| 5 | The CONFIG LOCK_TORTURE_TEST config option provides a kernel module | 8 | The CONFIG LOCK_TORTURE_TEST config option provides a kernel module |
| 6 | that runs torture tests on core kernel locking primitives. The kernel | 9 | that runs torture tests on core kernel locking primitives. The kernel |
| @@ -18,61 +21,77 @@ can be simulated by either enlarging this critical region hold time and/or | |||
| 18 | creating more kthreads. | 21 | creating more kthreads. |
| 19 | 22 | ||
| 20 | 23 | ||
| 21 | MODULE PARAMETERS | 24 | Module Parameters |
| 25 | ================= | ||
| 22 | 26 | ||
| 23 | This module has the following parameters: | 27 | This module has the following parameters: |
| 24 | 28 | ||
| 25 | 29 | ||
| 26 | ** Locktorture-specific ** | 30 | Locktorture-specific |
| 31 | -------------------- | ||
| 27 | 32 | ||
| 28 | nwriters_stress Number of kernel threads that will stress exclusive lock | 33 | nwriters_stress |
| 34 | Number of kernel threads that will stress exclusive lock | ||
| 29 | ownership (writers). The default value is twice the number | 35 | ownership (writers). The default value is twice the number |
| 30 | of online CPUs. | 36 | of online CPUs. |
| 31 | 37 | ||
| 32 | nreaders_stress Number of kernel threads that will stress shared lock | 38 | nreaders_stress |
| 39 | Number of kernel threads that will stress shared lock | ||
| 33 | ownership (readers). The default is the same amount of writer | 40 | ownership (readers). The default is the same amount of writer |
| 34 | locks. If the user did not specify nwriters_stress, then | 41 | locks. If the user did not specify nwriters_stress, then |
| 35 | both readers and writers be the amount of online CPUs. | 42 | both readers and writers be the amount of online CPUs. |
| 36 | 43 | ||
| 37 | torture_type Type of lock to torture. By default, only spinlocks will | 44 | torture_type |
| 45 | Type of lock to torture. By default, only spinlocks will | ||
| 38 | be tortured. This module can torture the following locks, | 46 | be tortured. This module can torture the following locks, |
| 39 | with string values as follows: | 47 | with string values as follows: |
| 40 | 48 | ||
| 41 | o "lock_busted": Simulates a buggy lock implementation. | 49 | - "lock_busted": |
| 50 | Simulates a buggy lock implementation. | ||
| 42 | 51 | ||
| 43 | o "spin_lock": spin_lock() and spin_unlock() pairs. | 52 | - "spin_lock": |
| 53 | spin_lock() and spin_unlock() pairs. | ||
| 44 | 54 | ||
| 45 | o "spin_lock_irq": spin_lock_irq() and spin_unlock_irq() | 55 | - "spin_lock_irq": |
| 46 | pairs. | 56 | spin_lock_irq() and spin_unlock_irq() pairs. |
| 47 | 57 | ||
| 48 | o "rw_lock": read/write lock() and unlock() rwlock pairs. | 58 | - "rw_lock": |
| 59 | read/write lock() and unlock() rwlock pairs. | ||
| 49 | 60 | ||
| 50 | o "rw_lock_irq": read/write lock_irq() and unlock_irq() | 61 | - "rw_lock_irq": |
| 51 | rwlock pairs. | 62 | read/write lock_irq() and unlock_irq() |
| 63 | rwlock pairs. | ||
| 52 | 64 | ||
| 53 | o "mutex_lock": mutex_lock() and mutex_unlock() pairs. | 65 | - "mutex_lock": |
| 66 | mutex_lock() and mutex_unlock() pairs. | ||
| 54 | 67 | ||
| 55 | o "rtmutex_lock": rtmutex_lock() and rtmutex_unlock() | 68 | - "rtmutex_lock": |
| 56 | pairs. Kernel must have CONFIG_RT_MUTEX=y. | 69 | rtmutex_lock() and rtmutex_unlock() pairs. |
| 70 | Kernel must have CONFIG_RT_MUTEX=y. | ||
| 57 | 71 | ||
| 58 | o "rwsem_lock": read/write down() and up() semaphore pairs. | 72 | - "rwsem_lock": |
| 73 | read/write down() and up() semaphore pairs. | ||
| 59 | 74 | ||
| 60 | 75 | ||
| 61 | ** Torture-framework (RCU + locking) ** | 76 | Torture-framework (RCU + locking) |
| 77 | --------------------------------- | ||
| 62 | 78 | ||
| 63 | shutdown_secs The number of seconds to run the test before terminating | 79 | shutdown_secs |
| 80 | The number of seconds to run the test before terminating | ||
| 64 | the test and powering off the system. The default is | 81 | the test and powering off the system. The default is |
| 65 | zero, which disables test termination and system shutdown. | 82 | zero, which disables test termination and system shutdown. |
| 66 | This capability is useful for automated testing. | 83 | This capability is useful for automated testing. |
| 67 | 84 | ||
| 68 | onoff_interval The number of seconds between each attempt to execute a | 85 | onoff_interval |
| 86 | The number of seconds between each attempt to execute a | ||
| 69 | randomly selected CPU-hotplug operation. Defaults | 87 | randomly selected CPU-hotplug operation. Defaults |
| 70 | to zero, which disables CPU hotplugging. In | 88 | to zero, which disables CPU hotplugging. In |
| 71 | CONFIG_HOTPLUG_CPU=n kernels, locktorture will silently | 89 | CONFIG_HOTPLUG_CPU=n kernels, locktorture will silently |
| 72 | refuse to do any CPU-hotplug operations regardless of | 90 | refuse to do any CPU-hotplug operations regardless of |
| 73 | what value is specified for onoff_interval. | 91 | what value is specified for onoff_interval. |
| 74 | 92 | ||
| 75 | onoff_holdoff The number of seconds to wait until starting CPU-hotplug | 93 | onoff_holdoff |
| 94 | The number of seconds to wait until starting CPU-hotplug | ||
| 76 | operations. This would normally only be used when | 95 | operations. This would normally only be used when |
| 77 | locktorture was built into the kernel and started | 96 | locktorture was built into the kernel and started |
| 78 | automatically at boot time, in which case it is useful | 97 | automatically at boot time, in which case it is useful |
| @@ -80,53 +99,59 @@ onoff_holdoff The number of seconds to wait until starting CPU-hotplug | |||
| 80 | coming and going. This parameter is only useful if | 99 | coming and going. This parameter is only useful if |
| 81 | CONFIG_HOTPLUG_CPU is enabled. | 100 | CONFIG_HOTPLUG_CPU is enabled. |
| 82 | 101 | ||
| 83 | stat_interval Number of seconds between statistics-related printk()s. | 102 | stat_interval |
| 103 | Number of seconds between statistics-related printk()s. | ||
| 84 | By default, locktorture will report stats every 60 seconds. | 104 | By default, locktorture will report stats every 60 seconds. |
| 85 | Setting the interval to zero causes the statistics to | 105 | Setting the interval to zero causes the statistics to |
| 86 | be printed -only- when the module is unloaded, and this | 106 | be printed -only- when the module is unloaded, and this |
| 87 | is the default. | 107 | is the default. |
| 88 | 108 | ||
| 89 | stutter The length of time to run the test before pausing for this | 109 | stutter |
| 110 | The length of time to run the test before pausing for this | ||
| 90 | same period of time. Defaults to "stutter=5", so as | 111 | same period of time. Defaults to "stutter=5", so as |
| 91 | to run and pause for (roughly) five-second intervals. | 112 | to run and pause for (roughly) five-second intervals. |
| 92 | Specifying "stutter=0" causes the test to run continuously | 113 | Specifying "stutter=0" causes the test to run continuously |
| 93 | without pausing, which is the old default behavior. | 114 | without pausing, which is the old default behavior. |
| 94 | 115 | ||
| 95 | shuffle_interval The number of seconds to keep the test threads affinitied | 116 | shuffle_interval |
| 117 | The number of seconds to keep the test threads affinitied | ||
| 96 | to a particular subset of the CPUs, defaults to 3 seconds. | 118 | to a particular subset of the CPUs, defaults to 3 seconds. |
| 97 | Used in conjunction with test_no_idle_hz. | 119 | Used in conjunction with test_no_idle_hz. |
| 98 | 120 | ||
| 99 | verbose Enable verbose debugging printing, via printk(). Enabled | 121 | verbose |
| 122 | Enable verbose debugging printing, via printk(). Enabled | ||
| 100 | by default. This extra information is mostly related to | 123 | by default. This extra information is mostly related to |
| 101 | high-level errors and reports from the main 'torture' | 124 | high-level errors and reports from the main 'torture' |
| 102 | framework. | 125 | framework. |
| 103 | 126 | ||
| 104 | 127 | ||
| 105 | STATISTICS | 128 | Statistics |
| 129 | ========== | ||
| 106 | 130 | ||
| 107 | Statistics are printed in the following format: | 131 | Statistics are printed in the following format:: |
| 108 | 132 | ||
| 109 | spin_lock-torture: Writes: Total: 93746064 Max/Min: 0/0 Fail: 0 | 133 | spin_lock-torture: Writes: Total: 93746064 Max/Min: 0/0 Fail: 0 |
| 110 | (A) (B) (C) (D) (E) | 134 | (A) (B) (C) (D) (E) |
| 111 | 135 | ||
| 112 | (A): Lock type that is being tortured -- torture_type parameter. | 136 | (A): Lock type that is being tortured -- torture_type parameter. |
| 113 | 137 | ||
| 114 | (B): Number of writer lock acquisitions. If dealing with a read/write primitive | 138 | (B): Number of writer lock acquisitions. If dealing with a read/write |
| 115 | a second "Reads" statistics line is printed. | 139 | primitive a second "Reads" statistics line is printed. |
| 116 | 140 | ||
| 117 | (C): Number of times the lock was acquired. | 141 | (C): Number of times the lock was acquired. |
| 118 | 142 | ||
| 119 | (D): Min and max number of times threads failed to acquire the lock. | 143 | (D): Min and max number of times threads failed to acquire the lock. |
| 120 | 144 | ||
| 121 | (E): true/false values if there were errors acquiring the lock. This should | 145 | (E): true/false values if there were errors acquiring the lock. This should |
| 122 | -only- be positive if there is a bug in the locking primitive's | 146 | -only- be positive if there is a bug in the locking primitive's |
| 123 | implementation. Otherwise a lock should never fail (i.e., spin_lock()). | 147 | implementation. Otherwise a lock should never fail (i.e., spin_lock()). |
| 124 | Of course, the same applies for (C), above. A dummy example of this is | 148 | Of course, the same applies for (C), above. A dummy example of this is |
| 125 | the "lock_busted" type. | 149 | the "lock_busted" type. |
| 126 | 150 | ||
| 127 | USAGE | 151 | Usage |
| 152 | ===== | ||
| 128 | 153 | ||
| 129 | The following script may be used to torture locks: | 154 | The following script may be used to torture locks:: |
| 130 | 155 | ||
| 131 | #!/bin/sh | 156 | #!/bin/sh |
| 132 | 157 | ||
diff --git a/Documentation/locking/mutex-design.txt b/Documentation/locking/mutex-design.rst index 818aca19612f..4d8236b81fa5 100644 --- a/Documentation/locking/mutex-design.txt +++ b/Documentation/locking/mutex-design.rst | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | ======================= | ||
| 1 | Generic Mutex Subsystem | 2 | Generic Mutex Subsystem |
| 3 | ======================= | ||
| 2 | 4 | ||
| 3 | started by Ingo Molnar <mingo@redhat.com> | 5 | started by Ingo Molnar <mingo@redhat.com> |
| 6 | |||
| 4 | updated by Davidlohr Bueso <davidlohr@hp.com> | 7 | updated by Davidlohr Bueso <davidlohr@hp.com> |
| 5 | 8 | ||
| 6 | What are mutexes? | 9 | What are mutexes? |
| @@ -23,7 +26,7 @@ Implementation | |||
| 23 | Mutexes are represented by 'struct mutex', defined in include/linux/mutex.h | 26 | Mutexes are represented by 'struct mutex', defined in include/linux/mutex.h |
| 24 | and implemented in kernel/locking/mutex.c. These locks use an atomic variable | 27 | and implemented in kernel/locking/mutex.c. These locks use an atomic variable |
| 25 | (->owner) to keep track of the lock state during its lifetime. Field owner | 28 | (->owner) to keep track of the lock state during its lifetime. Field owner |
| 26 | actually contains 'struct task_struct *' to the current lock owner and it is | 29 | actually contains `struct task_struct *` to the current lock owner and it is |
| 27 | therefore NULL if not currently owned. Since task_struct pointers are aligned | 30 | therefore NULL if not currently owned. Since task_struct pointers are aligned |
| 28 | at at least L1_CACHE_BYTES, low bits (3) are used to store extra state (e.g., | 31 | at at least L1_CACHE_BYTES, low bits (3) are used to store extra state (e.g., |
| 29 | if waiter list is non-empty). In its most basic form it also includes a | 32 | if waiter list is non-empty). In its most basic form it also includes a |
| @@ -101,29 +104,36 @@ features that make lock debugging easier and faster: | |||
| 101 | 104 | ||
| 102 | Interfaces | 105 | Interfaces |
| 103 | ---------- | 106 | ---------- |
| 104 | Statically define the mutex: | 107 | Statically define the mutex:: |
| 108 | |||
| 105 | DEFINE_MUTEX(name); | 109 | DEFINE_MUTEX(name); |
| 106 | 110 | ||
| 107 | Dynamically initialize the mutex: | 111 | Dynamically initialize the mutex:: |
| 112 | |||
| 108 | mutex_init(mutex); | 113 | mutex_init(mutex); |
| 109 | 114 | ||
| 110 | Acquire the mutex, uninterruptible: | 115 | Acquire the mutex, uninterruptible:: |
| 116 | |||
| 111 | void mutex_lock(struct mutex *lock); | 117 | void mutex_lock(struct mutex *lock); |
| 112 | void mutex_lock_nested(struct mutex *lock, unsigned int subclass); | 118 | void mutex_lock_nested(struct mutex *lock, unsigned int subclass); |
| 113 | int mutex_trylock(struct mutex *lock); | 119 | int mutex_trylock(struct mutex *lock); |
| 114 | 120 | ||
| 115 | Acquire the mutex, interruptible: | 121 | Acquire the mutex, interruptible:: |
| 122 | |||
| 116 | int mutex_lock_interruptible_nested(struct mutex *lock, | 123 | int mutex_lock_interruptible_nested(struct mutex *lock, |
| 117 | unsigned int subclass); | 124 | unsigned int subclass); |
| 118 | int mutex_lock_interruptible(struct mutex *lock); | 125 | int mutex_lock_interruptible(struct mutex *lock); |
| 119 | 126 | ||
| 120 | Acquire the mutex, interruptible, if dec to 0: | 127 | Acquire the mutex, interruptible, if dec to 0:: |
| 128 | |||
| 121 | int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); | 129 | int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); |
| 122 | 130 | ||
| 123 | Unlock the mutex: | 131 | Unlock the mutex:: |
| 132 | |||
| 124 | void mutex_unlock(struct mutex *lock); | 133 | void mutex_unlock(struct mutex *lock); |
| 125 | 134 | ||
| 126 | Test if the mutex is taken: | 135 | Test if the mutex is taken:: |
| 136 | |||
| 127 | int mutex_is_locked(struct mutex *lock); | 137 | int mutex_is_locked(struct mutex *lock); |
| 128 | 138 | ||
| 129 | Disadvantages | 139 | Disadvantages |
diff --git a/Documentation/locking/rt-mutex-design.txt b/Documentation/locking/rt-mutex-design.rst index 3d7b865539cc..59c2a64efb21 100644 --- a/Documentation/locking/rt-mutex-design.txt +++ b/Documentation/locking/rt-mutex-design.rst | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | # | 1 | ============================== |
| 2 | # Copyright (c) 2006 Steven Rostedt | ||
| 3 | # Licensed under the GNU Free Documentation License, Version 1.2 | ||
| 4 | # | ||
| 5 | |||
| 6 | RT-mutex implementation design | 2 | RT-mutex implementation design |
| 7 | ------------------------------ | 3 | ============================== |
| 4 | |||
| 5 | Copyright (c) 2006 Steven Rostedt | ||
| 6 | |||
| 7 | Licensed under the GNU Free Documentation License, Version 1.2 | ||
| 8 | |||
| 8 | 9 | ||
| 9 | This document tries to describe the design of the rtmutex.c implementation. | 10 | This document tries to describe the design of the rtmutex.c implementation. |
| 10 | It doesn't describe the reasons why rtmutex.c exists. For that please see | 11 | It doesn't describe the reasons why rtmutex.c exists. For that please see |
| 11 | Documentation/locking/rt-mutex.txt. Although this document does explain problems | 12 | Documentation/locking/rt-mutex.rst. Although this document does explain problems |
| 12 | that happen without this code, but that is in the concept to understand | 13 | that happen without this code, but that is in the concept to understand |
| 13 | what the code actually is doing. | 14 | what the code actually is doing. |
| 14 | 15 | ||
| @@ -41,17 +42,17 @@ to release the lock, because for all we know, B is a CPU hog and will | |||
| 41 | never give C a chance to release the lock. This is called unbounded priority | 42 | never give C a chance to release the lock. This is called unbounded priority |
| 42 | inversion. | 43 | inversion. |
| 43 | 44 | ||
| 44 | Here's a little ASCII art to show the problem. | 45 | Here's a little ASCII art to show the problem:: |
| 45 | 46 | ||
| 46 | grab lock L1 (owned by C) | 47 | grab lock L1 (owned by C) |
| 47 | | | 48 | | |
| 48 | A ---+ | 49 | A ---+ |
| 49 | C preempted by B | 50 | C preempted by B |
| 50 | | | 51 | | |
| 51 | C +----+ | 52 | C +----+ |
| 52 | 53 | ||
| 53 | B +--------> | 54 | B +--------> |
| 54 | B now keeps A from running. | 55 | B now keeps A from running. |
| 55 | 56 | ||
| 56 | 57 | ||
| 57 | Priority Inheritance (PI) | 58 | Priority Inheritance (PI) |
| @@ -75,24 +76,29 @@ Terminology | |||
| 75 | Here I explain some terminology that is used in this document to help describe | 76 | Here I explain some terminology that is used in this document to help describe |
| 76 | the design that is used to implement PI. | 77 | the design that is used to implement PI. |
| 77 | 78 | ||
| 78 | PI chain - The PI chain is an ordered series of locks and processes that cause | 79 | PI chain |
| 80 | - The PI chain is an ordered series of locks and processes that cause | ||
| 79 | processes to inherit priorities from a previous process that is | 81 | processes to inherit priorities from a previous process that is |
| 80 | blocked on one of its locks. This is described in more detail | 82 | blocked on one of its locks. This is described in more detail |
| 81 | later in this document. | 83 | later in this document. |
| 82 | 84 | ||
| 83 | mutex - In this document, to differentiate from locks that implement | 85 | mutex |
| 86 | - In this document, to differentiate from locks that implement | ||
| 84 | PI and spin locks that are used in the PI code, from now on | 87 | PI and spin locks that are used in the PI code, from now on |
| 85 | the PI locks will be called a mutex. | 88 | the PI locks will be called a mutex. |
| 86 | 89 | ||
| 87 | lock - In this document from now on, I will use the term lock when | 90 | lock |
| 91 | - In this document from now on, I will use the term lock when | ||
| 88 | referring to spin locks that are used to protect parts of the PI | 92 | referring to spin locks that are used to protect parts of the PI |
| 89 | algorithm. These locks disable preemption for UP (when | 93 | algorithm. These locks disable preemption for UP (when |
| 90 | CONFIG_PREEMPT is enabled) and on SMP prevents multiple CPUs from | 94 | CONFIG_PREEMPT is enabled) and on SMP prevents multiple CPUs from |
| 91 | entering critical sections simultaneously. | 95 | entering critical sections simultaneously. |
| 92 | 96 | ||
| 93 | spin lock - Same as lock above. | 97 | spin lock |
| 98 | - Same as lock above. | ||
| 94 | 99 | ||
| 95 | waiter - A waiter is a struct that is stored on the stack of a blocked | 100 | waiter |
| 101 | - A waiter is a struct that is stored on the stack of a blocked | ||
| 96 | process. Since the scope of the waiter is within the code for | 102 | process. Since the scope of the waiter is within the code for |
| 97 | a process being blocked on the mutex, it is fine to allocate | 103 | a process being blocked on the mutex, it is fine to allocate |
| 98 | the waiter on the process's stack (local variable). This | 104 | the waiter on the process's stack (local variable). This |
| @@ -104,14 +110,18 @@ waiter - A waiter is a struct that is stored on the stack of a blocked | |||
| 104 | waiter is sometimes used in reference to the task that is waiting | 110 | waiter is sometimes used in reference to the task that is waiting |
| 105 | on a mutex. This is the same as waiter->task. | 111 | on a mutex. This is the same as waiter->task. |
| 106 | 112 | ||
| 107 | waiters - A list of processes that are blocked on a mutex. | 113 | waiters |
| 114 | - A list of processes that are blocked on a mutex. | ||
| 108 | 115 | ||
| 109 | top waiter - The highest priority process waiting on a specific mutex. | 116 | top waiter |
| 117 | - The highest priority process waiting on a specific mutex. | ||
| 110 | 118 | ||
| 111 | top pi waiter - The highest priority process waiting on one of the mutexes | 119 | top pi waiter |
| 120 | - The highest priority process waiting on one of the mutexes | ||
| 112 | that a specific process owns. | 121 | that a specific process owns. |
| 113 | 122 | ||
| 114 | Note: task and process are used interchangeably in this document, mostly to | 123 | Note: |
| 124 | task and process are used interchangeably in this document, mostly to | ||
| 115 | differentiate between two processes that are being described together. | 125 | differentiate between two processes that are being described together. |
| 116 | 126 | ||
| 117 | 127 | ||
| @@ -123,7 +133,7 @@ inheritance to take place. Multiple chains may converge, but a chain | |||
| 123 | would never diverge, since a process can't be blocked on more than one | 133 | would never diverge, since a process can't be blocked on more than one |
| 124 | mutex at a time. | 134 | mutex at a time. |
| 125 | 135 | ||
| 126 | Example: | 136 | Example:: |
| 127 | 137 | ||
| 128 | Process: A, B, C, D, E | 138 | Process: A, B, C, D, E |
| 129 | Mutexes: L1, L2, L3, L4 | 139 | Mutexes: L1, L2, L3, L4 |
| @@ -137,21 +147,21 @@ Example: | |||
| 137 | D owns L4 | 147 | D owns L4 |
| 138 | E blocked on L4 | 148 | E blocked on L4 |
| 139 | 149 | ||
| 140 | The chain would be: | 150 | The chain would be:: |
| 141 | 151 | ||
| 142 | E->L4->D->L3->C->L2->B->L1->A | 152 | E->L4->D->L3->C->L2->B->L1->A |
| 143 | 153 | ||
| 144 | To show where two chains merge, we could add another process F and | 154 | To show where two chains merge, we could add another process F and |
| 145 | another mutex L5 where B owns L5 and F is blocked on mutex L5. | 155 | another mutex L5 where B owns L5 and F is blocked on mutex L5. |
| 146 | 156 | ||
| 147 | The chain for F would be: | 157 | The chain for F would be:: |
| 148 | 158 | ||
| 149 | F->L5->B->L1->A | 159 | F->L5->B->L1->A |
| 150 | 160 | ||
| 151 | Since a process may own more than one mutex, but never be blocked on more than | 161 | Since a process may own more than one mutex, but never be blocked on more than |
| 152 | one, the chains merge. | 162 | one, the chains merge. |
| 153 | 163 | ||
| 154 | Here we show both chains: | 164 | Here we show both chains:: |
| 155 | 165 | ||
| 156 | E->L4->D->L3->C->L2-+ | 166 | E->L4->D->L3->C->L2-+ |
| 157 | | | 167 | | |
| @@ -165,12 +175,12 @@ than the processes to the left or below in the chain. | |||
| 165 | 175 | ||
| 166 | Also since a mutex may have more than one process blocked on it, we can | 176 | Also since a mutex may have more than one process blocked on it, we can |
| 167 | have multiple chains merge at mutexes. If we add another process G that is | 177 | have multiple chains merge at mutexes. If we add another process G that is |
| 168 | blocked on mutex L2: | 178 | blocked on mutex L2:: |
| 169 | 179 | ||
| 170 | G->L2->B->L1->A | 180 | G->L2->B->L1->A |
| 171 | 181 | ||
| 172 | And once again, to show how this can grow I will show the merging chains | 182 | And once again, to show how this can grow I will show the merging chains |
| 173 | again. | 183 | again:: |
| 174 | 184 | ||
| 175 | E->L4->D->L3->C-+ | 185 | E->L4->D->L3->C-+ |
| 176 | +->L2-+ | 186 | +->L2-+ |
| @@ -184,7 +194,7 @@ the chain (A and B in this example), must have their priorities increased | |||
| 184 | to that of G. | 194 | to that of G. |
| 185 | 195 | ||
| 186 | Mutex Waiters Tree | 196 | Mutex Waiters Tree |
| 187 | ----------------- | 197 | ------------------ |
| 188 | 198 | ||
| 189 | Every mutex keeps track of all the waiters that are blocked on itself. The | 199 | Every mutex keeps track of all the waiters that are blocked on itself. The |
| 190 | mutex has a rbtree to store these waiters by priority. This tree is protected | 200 | mutex has a rbtree to store these waiters by priority. This tree is protected |
| @@ -219,19 +229,19 @@ defined. But is very complex to figure it out, since it depends on all | |||
| 219 | the nesting of mutexes. Let's look at the example where we have 3 mutexes, | 229 | the nesting of mutexes. Let's look at the example where we have 3 mutexes, |
| 220 | L1, L2, and L3, and four separate functions func1, func2, func3 and func4. | 230 | L1, L2, and L3, and four separate functions func1, func2, func3 and func4. |
| 221 | The following shows a locking order of L1->L2->L3, but may not actually | 231 | The following shows a locking order of L1->L2->L3, but may not actually |
| 222 | be directly nested that way. | 232 | be directly nested that way:: |
| 223 | 233 | ||
| 224 | void func1(void) | 234 | void func1(void) |
| 225 | { | 235 | { |
| 226 | mutex_lock(L1); | 236 | mutex_lock(L1); |
| 227 | 237 | ||
| 228 | /* do anything */ | 238 | /* do anything */ |
| 229 | 239 | ||
| 230 | mutex_unlock(L1); | 240 | mutex_unlock(L1); |
| 231 | } | 241 | } |
| 232 | 242 | ||
| 233 | void func2(void) | 243 | void func2(void) |
| 234 | { | 244 | { |
| 235 | mutex_lock(L1); | 245 | mutex_lock(L1); |
| 236 | mutex_lock(L2); | 246 | mutex_lock(L2); |
| 237 | 247 | ||
| @@ -239,10 +249,10 @@ void func2(void) | |||
| 239 | 249 | ||
| 240 | mutex_unlock(L2); | 250 | mutex_unlock(L2); |
| 241 | mutex_unlock(L1); | 251 | mutex_unlock(L1); |
| 242 | } | 252 | } |
| 243 | 253 | ||
| 244 | void func3(void) | 254 | void func3(void) |
| 245 | { | 255 | { |
| 246 | mutex_lock(L2); | 256 | mutex_lock(L2); |
| 247 | mutex_lock(L3); | 257 | mutex_lock(L3); |
| 248 | 258 | ||
| @@ -250,30 +260,30 @@ void func3(void) | |||
| 250 | 260 | ||
| 251 | mutex_unlock(L3); | 261 | mutex_unlock(L3); |
| 252 | mutex_unlock(L2); | 262 | mutex_unlock(L2); |
| 253 | } | 263 | } |
| 254 | 264 | ||
| 255 | void func4(void) | 265 | void func4(void) |
| 256 | { | 266 | { |
| 257 | mutex_lock(L3); | 267 | mutex_lock(L3); |
| 258 | 268 | ||
| 259 | /* do something again */ | 269 | /* do something again */ |
| 260 | 270 | ||
| 261 | mutex_unlock(L3); | 271 | mutex_unlock(L3); |
| 262 | } | 272 | } |
| 263 | 273 | ||
| 264 | Now we add 4 processes that run each of these functions separately. | 274 | Now we add 4 processes that run each of these functions separately. |
| 265 | Processes A, B, C, and D which run functions func1, func2, func3 and func4 | 275 | Processes A, B, C, and D which run functions func1, func2, func3 and func4 |
| 266 | respectively, and such that D runs first and A last. With D being preempted | 276 | respectively, and such that D runs first and A last. With D being preempted |
| 267 | in func4 in the "do something again" area, we have a locking that follows: | 277 | in func4 in the "do something again" area, we have a locking that follows:: |
| 268 | 278 | ||
| 269 | D owns L3 | 279 | D owns L3 |
| 270 | C blocked on L3 | 280 | C blocked on L3 |
| 271 | C owns L2 | 281 | C owns L2 |
| 272 | B blocked on L2 | 282 | B blocked on L2 |
| 273 | B owns L1 | 283 | B owns L1 |
| 274 | A blocked on L1 | 284 | A blocked on L1 |
| 275 | 285 | ||
| 276 | And thus we have the chain A->L1->B->L2->C->L3->D. | 286 | And thus we have the chain A->L1->B->L2->C->L3->D. |
| 277 | 287 | ||
| 278 | This gives us a PI depth of 4 (four processes), but looking at any of the | 288 | This gives us a PI depth of 4 (four processes), but looking at any of the |
| 279 | functions individually, it seems as though they only have at most a locking | 289 | functions individually, it seems as though they only have at most a locking |
| @@ -298,7 +308,7 @@ not true, the rtmutex.c code will be broken!), this allows for the least | |||
| 298 | significant bit to be used as a flag. Bit 0 is used as the "Has Waiters" | 308 | significant bit to be used as a flag. Bit 0 is used as the "Has Waiters" |
| 299 | flag. It's set whenever there are waiters on a mutex. | 309 | flag. It's set whenever there are waiters on a mutex. |
| 300 | 310 | ||
| 301 | See Documentation/locking/rt-mutex.txt for further details. | 311 | See Documentation/locking/rt-mutex.rst for further details. |
| 302 | 312 | ||
| 303 | cmpxchg Tricks | 313 | cmpxchg Tricks |
| 304 | -------------- | 314 | -------------- |
| @@ -307,17 +317,17 @@ Some architectures implement an atomic cmpxchg (Compare and Exchange). This | |||
| 307 | is used (when applicable) to keep the fast path of grabbing and releasing | 317 | is used (when applicable) to keep the fast path of grabbing and releasing |
| 308 | mutexes short. | 318 | mutexes short. |
| 309 | 319 | ||
| 310 | cmpxchg is basically the following function performed atomically: | 320 | cmpxchg is basically the following function performed atomically:: |
| 311 | 321 | ||
| 312 | unsigned long _cmpxchg(unsigned long *A, unsigned long *B, unsigned long *C) | 322 | unsigned long _cmpxchg(unsigned long *A, unsigned long *B, unsigned long *C) |
| 313 | { | 323 | { |
| 314 | unsigned long T = *A; | 324 | unsigned long T = *A; |
| 315 | if (*A == *B) { | 325 | if (*A == *B) { |
| 316 | *A = *C; | 326 | *A = *C; |
| 317 | } | 327 | } |
| 318 | return T; | 328 | return T; |
| 319 | } | 329 | } |
| 320 | #define cmpxchg(a,b,c) _cmpxchg(&a,&b,&c) | 330 | #define cmpxchg(a,b,c) _cmpxchg(&a,&b,&c) |
| 321 | 331 | ||
| 322 | This is really nice to have, since it allows you to only update a variable | 332 | This is really nice to have, since it allows you to only update a variable |
| 323 | if the variable is what you expect it to be. You know if it succeeded if | 333 | if the variable is what you expect it to be. You know if it succeeded if |
| @@ -352,9 +362,10 @@ Then rt_mutex_setprio is called to adjust the priority of the task to the | |||
| 352 | new priority. Note that rt_mutex_setprio is defined in kernel/sched/core.c | 362 | new priority. Note that rt_mutex_setprio is defined in kernel/sched/core.c |
| 353 | to implement the actual change in priority. | 363 | to implement the actual change in priority. |
| 354 | 364 | ||
| 355 | (Note: For the "prio" field in task_struct, the lower the number, the | 365 | Note: |
| 366 | For the "prio" field in task_struct, the lower the number, the | ||
| 356 | higher the priority. A "prio" of 5 is of higher priority than a | 367 | higher the priority. A "prio" of 5 is of higher priority than a |
| 357 | "prio" of 10.) | 368 | "prio" of 10. |
| 358 | 369 | ||
| 359 | It is interesting to note that rt_mutex_adjust_prio can either increase | 370 | It is interesting to note that rt_mutex_adjust_prio can either increase |
| 360 | or decrease the priority of the task. In the case that a higher priority | 371 | or decrease the priority of the task. In the case that a higher priority |
| @@ -439,6 +450,7 @@ wait_lock, which this code currently holds. So setting the "Has Waiters" flag | |||
| 439 | forces the current owner to synchronize with this code. | 450 | forces the current owner to synchronize with this code. |
| 440 | 451 | ||
| 441 | The lock is taken if the following are true: | 452 | The lock is taken if the following are true: |
| 453 | |||
| 442 | 1) The lock has no owner | 454 | 1) The lock has no owner |
| 443 | 2) The current task is the highest priority against all other | 455 | 2) The current task is the highest priority against all other |
| 444 | waiters of the lock | 456 | waiters of the lock |
| @@ -546,10 +558,13 @@ Credits | |||
| 546 | ------- | 558 | ------- |
| 547 | 559 | ||
| 548 | Author: Steven Rostedt <rostedt@goodmis.org> | 560 | Author: Steven Rostedt <rostedt@goodmis.org> |
| 561 | |||
| 549 | Updated: Alex Shi <alex.shi@linaro.org> - 7/6/2017 | 562 | Updated: Alex Shi <alex.shi@linaro.org> - 7/6/2017 |
| 550 | 563 | ||
| 551 | Original Reviewers: Ingo Molnar, Thomas Gleixner, Thomas Duetsch, and | 564 | Original Reviewers: |
| 565 | Ingo Molnar, Thomas Gleixner, Thomas Duetsch, and | ||
| 552 | Randy Dunlap | 566 | Randy Dunlap |
| 567 | |||
| 553 | Update (7/6/2017) Reviewers: Steven Rostedt and Sebastian Siewior | 568 | Update (7/6/2017) Reviewers: Steven Rostedt and Sebastian Siewior |
| 554 | 569 | ||
| 555 | Updates | 570 | Updates |
diff --git a/Documentation/locking/rt-mutex.txt b/Documentation/locking/rt-mutex.rst index 35793e003041..c365dc302081 100644 --- a/Documentation/locking/rt-mutex.txt +++ b/Documentation/locking/rt-mutex.rst | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ================================== | ||
| 1 | RT-mutex subsystem with PI support | 2 | RT-mutex subsystem with PI support |
| 2 | ---------------------------------- | 3 | ================================== |
| 3 | 4 | ||
| 4 | RT-mutexes with priority inheritance are used to support PI-futexes, | 5 | RT-mutexes with priority inheritance are used to support PI-futexes, |
| 5 | which enable pthread_mutex_t priority inheritance attributes | 6 | which enable pthread_mutex_t priority inheritance attributes |
| @@ -46,27 +47,30 @@ The state of the rt-mutex is tracked via the owner field of the rt-mutex | |||
| 46 | structure: | 47 | structure: |
| 47 | 48 | ||
| 48 | lock->owner holds the task_struct pointer of the owner. Bit 0 is used to | 49 | lock->owner holds the task_struct pointer of the owner. Bit 0 is used to |
| 49 | keep track of the "lock has waiters" state. | 50 | keep track of the "lock has waiters" state: |
| 50 | 51 | ||
| 51 | owner bit0 | 52 | ============ ======= ================================================ |
| 53 | owner bit0 Notes | ||
| 54 | ============ ======= ================================================ | ||
| 52 | NULL 0 lock is free (fast acquire possible) | 55 | NULL 0 lock is free (fast acquire possible) |
| 53 | NULL 1 lock is free and has waiters and the top waiter | 56 | NULL 1 lock is free and has waiters and the top waiter |
| 54 | is going to take the lock* | 57 | is going to take the lock [1]_ |
| 55 | taskpointer 0 lock is held (fast release possible) | 58 | taskpointer 0 lock is held (fast release possible) |
| 56 | taskpointer 1 lock is held and has waiters** | 59 | taskpointer 1 lock is held and has waiters [2]_ |
| 60 | ============ ======= ================================================ | ||
| 57 | 61 | ||
| 58 | The fast atomic compare exchange based acquire and release is only | 62 | The fast atomic compare exchange based acquire and release is only |
| 59 | possible when bit 0 of lock->owner is 0. | 63 | possible when bit 0 of lock->owner is 0. |
| 60 | 64 | ||
| 61 | (*) It also can be a transitional state when grabbing the lock | 65 | .. [1] It also can be a transitional state when grabbing the lock |
| 62 | with ->wait_lock is held. To prevent any fast path cmpxchg to the lock, | 66 | with ->wait_lock is held. To prevent any fast path cmpxchg to the lock, |
| 63 | we need to set the bit0 before looking at the lock, and the owner may be | 67 | we need to set the bit0 before looking at the lock, and the owner may |
| 64 | NULL in this small time, hence this can be a transitional state. | 68 | be NULL in this small time, hence this can be a transitional state. |
| 65 | 69 | ||
| 66 | (**) There is a small time when bit 0 is set but there are no | 70 | .. [2] There is a small time when bit 0 is set but there are no |
| 67 | waiters. This can happen when grabbing the lock in the slow path. | 71 | waiters. This can happen when grabbing the lock in the slow path. |
| 68 | To prevent a cmpxchg of the owner releasing the lock, we need to | 72 | To prevent a cmpxchg of the owner releasing the lock, we need to |
| 69 | set this bit before looking at the lock. | 73 | set this bit before looking at the lock. |
| 70 | 74 | ||
| 71 | BTW, there is still technically a "Pending Owner", it's just not called | 75 | BTW, there is still technically a "Pending Owner", it's just not called |
| 72 | that anymore. The pending owner happens to be the top_waiter of a lock | 76 | that anymore. The pending owner happens to be the top_waiter of a lock |
diff --git a/Documentation/locking/spinlocks.txt b/Documentation/locking/spinlocks.rst index ff35e40bdf5b..098107fb7d86 100644 --- a/Documentation/locking/spinlocks.txt +++ b/Documentation/locking/spinlocks.rst | |||
| @@ -1,8 +1,13 @@ | |||
| 1 | =============== | ||
| 2 | Locking lessons | ||
| 3 | =============== | ||
| 4 | |||
| 1 | Lesson 1: Spin locks | 5 | Lesson 1: Spin locks |
| 6 | ==================== | ||
| 2 | 7 | ||
| 3 | The most basic primitive for locking is spinlock. | 8 | The most basic primitive for locking is spinlock:: |
| 4 | 9 | ||
| 5 | static DEFINE_SPINLOCK(xxx_lock); | 10 | static DEFINE_SPINLOCK(xxx_lock); |
| 6 | 11 | ||
| 7 | unsigned long flags; | 12 | unsigned long flags; |
| 8 | 13 | ||
| @@ -19,23 +24,25 @@ worry about UP vs SMP issues: the spinlocks work correctly under both. | |||
| 19 | NOTE! Implications of spin_locks for memory are further described in: | 24 | NOTE! Implications of spin_locks for memory are further described in: |
| 20 | 25 | ||
| 21 | Documentation/memory-barriers.txt | 26 | Documentation/memory-barriers.txt |
| 27 | |||
| 22 | (5) LOCK operations. | 28 | (5) LOCK operations. |
| 29 | |||
| 23 | (6) UNLOCK operations. | 30 | (6) UNLOCK operations. |
| 24 | 31 | ||
| 25 | The above is usually pretty simple (you usually need and want only one | 32 | The above is usually pretty simple (you usually need and want only one |
| 26 | spinlock for most things - using more than one spinlock can make things a | 33 | spinlock for most things - using more than one spinlock can make things a |
| 27 | lot more complex and even slower and is usually worth it only for | 34 | lot more complex and even slower and is usually worth it only for |
| 28 | sequences that you _know_ need to be split up: avoid it at all cost if you | 35 | sequences that you **know** need to be split up: avoid it at all cost if you |
| 29 | aren't sure). | 36 | aren't sure). |
| 30 | 37 | ||
| 31 | This is really the only really hard part about spinlocks: once you start | 38 | This is really the only really hard part about spinlocks: once you start |
| 32 | using spinlocks they tend to expand to areas you might not have noticed | 39 | using spinlocks they tend to expand to areas you might not have noticed |
| 33 | before, because you have to make sure the spinlocks correctly protect the | 40 | before, because you have to make sure the spinlocks correctly protect the |
| 34 | shared data structures _everywhere_ they are used. The spinlocks are most | 41 | shared data structures **everywhere** they are used. The spinlocks are most |
| 35 | easily added to places that are completely independent of other code (for | 42 | easily added to places that are completely independent of other code (for |
| 36 | example, internal driver data structures that nobody else ever touches). | 43 | example, internal driver data structures that nobody else ever touches). |
| 37 | 44 | ||
| 38 | NOTE! The spin-lock is safe only when you _also_ use the lock itself | 45 | NOTE! The spin-lock is safe only when you **also** use the lock itself |
| 39 | to do locking across CPU's, which implies that EVERYTHING that | 46 | to do locking across CPU's, which implies that EVERYTHING that |
| 40 | touches a shared variable has to agree about the spinlock they want | 47 | touches a shared variable has to agree about the spinlock they want |
| 41 | to use. | 48 | to use. |
| @@ -43,6 +50,7 @@ example, internal driver data structures that nobody else ever touches). | |||
| 43 | ---- | 50 | ---- |
| 44 | 51 | ||
| 45 | Lesson 2: reader-writer spinlocks. | 52 | Lesson 2: reader-writer spinlocks. |
| 53 | ================================== | ||
| 46 | 54 | ||
| 47 | If your data accesses have a very natural pattern where you usually tend | 55 | If your data accesses have a very natural pattern where you usually tend |
| 48 | to mostly read from the shared variables, the reader-writer locks | 56 | to mostly read from the shared variables, the reader-writer locks |
| @@ -54,7 +62,7 @@ to change the variables it has to get an exclusive write lock. | |||
| 54 | simple spinlocks. Unless the reader critical section is long, you | 62 | simple spinlocks. Unless the reader critical section is long, you |
| 55 | are better off just using spinlocks. | 63 | are better off just using spinlocks. |
| 56 | 64 | ||
| 57 | The routines look the same as above: | 65 | The routines look the same as above:: |
| 58 | 66 | ||
| 59 | rwlock_t xxx_lock = __RW_LOCK_UNLOCKED(xxx_lock); | 67 | rwlock_t xxx_lock = __RW_LOCK_UNLOCKED(xxx_lock); |
| 60 | 68 | ||
| @@ -71,7 +79,7 @@ The routines look the same as above: | |||
| 71 | The above kind of lock may be useful for complex data structures like | 79 | The above kind of lock may be useful for complex data structures like |
| 72 | linked lists, especially searching for entries without changing the list | 80 | linked lists, especially searching for entries without changing the list |
| 73 | itself. The read lock allows many concurrent readers. Anything that | 81 | itself. The read lock allows many concurrent readers. Anything that |
| 74 | _changes_ the list will have to get the write lock. | 82 | **changes** the list will have to get the write lock. |
| 75 | 83 | ||
| 76 | NOTE! RCU is better for list traversal, but requires careful | 84 | NOTE! RCU is better for list traversal, but requires careful |
| 77 | attention to design detail (see Documentation/RCU/listRCU.txt). | 85 | attention to design detail (see Documentation/RCU/listRCU.txt). |
| @@ -87,10 +95,11 @@ to get the write-lock at the very beginning. | |||
| 87 | ---- | 95 | ---- |
| 88 | 96 | ||
| 89 | Lesson 3: spinlocks revisited. | 97 | Lesson 3: spinlocks revisited. |
| 98 | ============================== | ||
| 90 | 99 | ||
| 91 | The single spin-lock primitives above are by no means the only ones. They | 100 | The single spin-lock primitives above are by no means the only ones. They |
| 92 | are the most safe ones, and the ones that work under all circumstances, | 101 | are the most safe ones, and the ones that work under all circumstances, |
| 93 | but partly _because_ they are safe they are also fairly slow. They are slower | 102 | but partly **because** they are safe they are also fairly slow. They are slower |
| 94 | than they'd need to be, because they do have to disable interrupts | 103 | than they'd need to be, because they do have to disable interrupts |
| 95 | (which is just a single instruction on a x86, but it's an expensive one - | 104 | (which is just a single instruction on a x86, but it's an expensive one - |
| 96 | and on other architectures it can be worse). | 105 | and on other architectures it can be worse). |
| @@ -98,7 +107,7 @@ and on other architectures it can be worse). | |||
| 98 | If you have a case where you have to protect a data structure across | 107 | If you have a case where you have to protect a data structure across |
| 99 | several CPU's and you want to use spinlocks you can potentially use | 108 | several CPU's and you want to use spinlocks you can potentially use |
| 100 | cheaper versions of the spinlocks. IFF you know that the spinlocks are | 109 | cheaper versions of the spinlocks. IFF you know that the spinlocks are |
| 101 | never used in interrupt handlers, you can use the non-irq versions: | 110 | never used in interrupt handlers, you can use the non-irq versions:: |
| 102 | 111 | ||
| 103 | spin_lock(&lock); | 112 | spin_lock(&lock); |
| 104 | ... | 113 | ... |
| @@ -110,7 +119,7 @@ This is useful if you know that the data in question is only ever | |||
| 110 | manipulated from a "process context", ie no interrupts involved. | 119 | manipulated from a "process context", ie no interrupts involved. |
| 111 | 120 | ||
| 112 | The reasons you mustn't use these versions if you have interrupts that | 121 | The reasons you mustn't use these versions if you have interrupts that |
| 113 | play with the spinlock is that you can get deadlocks: | 122 | play with the spinlock is that you can get deadlocks:: |
| 114 | 123 | ||
| 115 | spin_lock(&lock); | 124 | spin_lock(&lock); |
| 116 | ... | 125 | ... |
| @@ -147,9 +156,10 @@ indeed), while write-locks need to protect themselves against interrupts. | |||
| 147 | ---- | 156 | ---- |
| 148 | 157 | ||
| 149 | Reference information: | 158 | Reference information: |
| 159 | ====================== | ||
| 150 | 160 | ||
| 151 | For dynamic initialization, use spin_lock_init() or rwlock_init() as | 161 | For dynamic initialization, use spin_lock_init() or rwlock_init() as |
| 152 | appropriate: | 162 | appropriate:: |
| 153 | 163 | ||
| 154 | spinlock_t xxx_lock; | 164 | spinlock_t xxx_lock; |
| 155 | rwlock_t xxx_rw_lock; | 165 | rwlock_t xxx_rw_lock; |
diff --git a/Documentation/locking/ww-mutex-design.txt b/Documentation/locking/ww-mutex-design.rst index f0ed7c30e695..1846c199da23 100644 --- a/Documentation/locking/ww-mutex-design.txt +++ b/Documentation/locking/ww-mutex-design.rst | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | ====================================== | ||
| 1 | Wound/Wait Deadlock-Proof Mutex Design | 2 | Wound/Wait Deadlock-Proof Mutex Design |
| 2 | ====================================== | 3 | ====================================== |
| 3 | 4 | ||
| @@ -85,6 +86,7 @@ Furthermore there are three different class of w/w lock acquire functions: | |||
| 85 | no deadlock potential and hence the ww_mutex_lock call will block and not | 86 | no deadlock potential and hence the ww_mutex_lock call will block and not |
| 86 | prematurely return -EDEADLK. The advantage of the _slow functions is in | 87 | prematurely return -EDEADLK. The advantage of the _slow functions is in |
| 87 | interface safety: | 88 | interface safety: |
| 89 | |||
| 88 | - ww_mutex_lock has a __must_check int return type, whereas ww_mutex_lock_slow | 90 | - ww_mutex_lock has a __must_check int return type, whereas ww_mutex_lock_slow |
| 89 | has a void return type. Note that since ww mutex code needs loops/retries | 91 | has a void return type. Note that since ww mutex code needs loops/retries |
| 90 | anyway the __must_check doesn't result in spurious warnings, even though the | 92 | anyway the __must_check doesn't result in spurious warnings, even though the |
| @@ -115,36 +117,36 @@ expect the number of simultaneous competing transactions to be typically small, | |||
| 115 | and you want to reduce the number of rollbacks. | 117 | and you want to reduce the number of rollbacks. |
| 116 | 118 | ||
| 117 | Three different ways to acquire locks within the same w/w class. Common | 119 | Three different ways to acquire locks within the same w/w class. Common |
| 118 | definitions for methods #1 and #2: | 120 | definitions for methods #1 and #2:: |
| 119 | 121 | ||
| 120 | static DEFINE_WW_CLASS(ww_class); | 122 | static DEFINE_WW_CLASS(ww_class); |
| 121 | 123 | ||
| 122 | struct obj { | 124 | struct obj { |
| 123 | struct ww_mutex lock; | 125 | struct ww_mutex lock; |
| 124 | /* obj data */ | 126 | /* obj data */ |
| 125 | }; | 127 | }; |
| 126 | 128 | ||
| 127 | struct obj_entry { | 129 | struct obj_entry { |
| 128 | struct list_head head; | 130 | struct list_head head; |
| 129 | struct obj *obj; | 131 | struct obj *obj; |
| 130 | }; | 132 | }; |
| 131 | 133 | ||
| 132 | Method 1, using a list in execbuf->buffers that's not allowed to be reordered. | 134 | Method 1, using a list in execbuf->buffers that's not allowed to be reordered. |
| 133 | This is useful if a list of required objects is already tracked somewhere. | 135 | This is useful if a list of required objects is already tracked somewhere. |
| 134 | Furthermore the lock helper can use propagate the -EALREADY return code back to | 136 | Furthermore the lock helper can use propagate the -EALREADY return code back to |
| 135 | the caller as a signal that an object is twice on the list. This is useful if | 137 | the caller as a signal that an object is twice on the list. This is useful if |
| 136 | the list is constructed from userspace input and the ABI requires userspace to | 138 | the list is constructed from userspace input and the ABI requires userspace to |
| 137 | not have duplicate entries (e.g. for a gpu commandbuffer submission ioctl). | 139 | not have duplicate entries (e.g. for a gpu commandbuffer submission ioctl):: |
| 138 | 140 | ||
| 139 | int lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) | 141 | int lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) |
| 140 | { | 142 | { |
| 141 | struct obj *res_obj = NULL; | 143 | struct obj *res_obj = NULL; |
| 142 | struct obj_entry *contended_entry = NULL; | 144 | struct obj_entry *contended_entry = NULL; |
| 143 | struct obj_entry *entry; | 145 | struct obj_entry *entry; |
| 144 | 146 | ||
| 145 | ww_acquire_init(ctx, &ww_class); | 147 | ww_acquire_init(ctx, &ww_class); |
| 146 | 148 | ||
| 147 | retry: | 149 | retry: |
| 148 | list_for_each_entry (entry, list, head) { | 150 | list_for_each_entry (entry, list, head) { |
| 149 | if (entry->obj == res_obj) { | 151 | if (entry->obj == res_obj) { |
| 150 | res_obj = NULL; | 152 | res_obj = NULL; |
| @@ -160,7 +162,7 @@ retry: | |||
| 160 | ww_acquire_done(ctx); | 162 | ww_acquire_done(ctx); |
| 161 | return 0; | 163 | return 0; |
| 162 | 164 | ||
| 163 | err: | 165 | err: |
| 164 | list_for_each_entry_continue_reverse (entry, list, head) | 166 | list_for_each_entry_continue_reverse (entry, list, head) |
| 165 | ww_mutex_unlock(&entry->obj->lock); | 167 | ww_mutex_unlock(&entry->obj->lock); |
| 166 | 168 | ||
| @@ -176,14 +178,14 @@ err: | |||
| 176 | ww_acquire_fini(ctx); | 178 | ww_acquire_fini(ctx); |
| 177 | 179 | ||
| 178 | return ret; | 180 | return ret; |
| 179 | } | 181 | } |
| 180 | 182 | ||
| 181 | Method 2, using a list in execbuf->buffers that can be reordered. Same semantics | 183 | Method 2, using a list in execbuf->buffers that can be reordered. Same semantics |
| 182 | of duplicate entry detection using -EALREADY as method 1 above. But the | 184 | of duplicate entry detection using -EALREADY as method 1 above. But the |
| 183 | list-reordering allows for a bit more idiomatic code. | 185 | list-reordering allows for a bit more idiomatic code:: |
| 184 | 186 | ||
| 185 | int lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) | 187 | int lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) |
| 186 | { | 188 | { |
| 187 | struct obj_entry *entry, *entry2; | 189 | struct obj_entry *entry, *entry2; |
| 188 | 190 | ||
| 189 | ww_acquire_init(ctx, &ww_class); | 191 | ww_acquire_init(ctx, &ww_class); |
| @@ -216,24 +218,25 @@ int lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) | |||
| 216 | 218 | ||
| 217 | ww_acquire_done(ctx); | 219 | ww_acquire_done(ctx); |
| 218 | return 0; | 220 | return 0; |
| 219 | } | 221 | } |
| 220 | 222 | ||
| 221 | Unlocking works the same way for both methods #1 and #2: | 223 | Unlocking works the same way for both methods #1 and #2:: |
| 222 | 224 | ||
| 223 | void unlock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) | 225 | void unlock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) |
| 224 | { | 226 | { |
| 225 | struct obj_entry *entry; | 227 | struct obj_entry *entry; |
| 226 | 228 | ||
| 227 | list_for_each_entry (entry, list, head) | 229 | list_for_each_entry (entry, list, head) |
| 228 | ww_mutex_unlock(&entry->obj->lock); | 230 | ww_mutex_unlock(&entry->obj->lock); |
| 229 | 231 | ||
| 230 | ww_acquire_fini(ctx); | 232 | ww_acquire_fini(ctx); |
| 231 | } | 233 | } |
| 232 | 234 | ||
| 233 | Method 3 is useful if the list of objects is constructed ad-hoc and not upfront, | 235 | Method 3 is useful if the list of objects is constructed ad-hoc and not upfront, |
| 234 | e.g. when adjusting edges in a graph where each node has its own ww_mutex lock, | 236 | e.g. when adjusting edges in a graph where each node has its own ww_mutex lock, |
| 235 | and edges can only be changed when holding the locks of all involved nodes. w/w | 237 | and edges can only be changed when holding the locks of all involved nodes. w/w |
| 236 | mutexes are a natural fit for such a case for two reasons: | 238 | mutexes are a natural fit for such a case for two reasons: |
| 239 | |||
| 237 | - They can handle lock-acquisition in any order which allows us to start walking | 240 | - They can handle lock-acquisition in any order which allows us to start walking |
| 238 | a graph from a starting point and then iteratively discovering new edges and | 241 | a graph from a starting point and then iteratively discovering new edges and |
| 239 | locking down the nodes those edges connect to. | 242 | locking down the nodes those edges connect to. |
| @@ -243,6 +246,7 @@ mutexes are a natural fit for such a case for two reasons: | |||
| 243 | as a starting point). | 246 | as a starting point). |
| 244 | 247 | ||
| 245 | Note that this approach differs in two important ways from the above methods: | 248 | Note that this approach differs in two important ways from the above methods: |
| 249 | |||
| 246 | - Since the list of objects is dynamically constructed (and might very well be | 250 | - Since the list of objects is dynamically constructed (and might very well be |
| 247 | different when retrying due to hitting the -EDEADLK die condition) there's | 251 | different when retrying due to hitting the -EDEADLK die condition) there's |
| 248 | no need to keep any object on a persistent list when it's not locked. We can | 252 | no need to keep any object on a persistent list when it's not locked. We can |
| @@ -260,17 +264,17 @@ any interface misuse for these cases. | |||
| 260 | 264 | ||
| 261 | Also, method 3 can't fail the lock acquisition step since it doesn't return | 265 | Also, method 3 can't fail the lock acquisition step since it doesn't return |
| 262 | -EALREADY. Of course this would be different when using the _interruptible | 266 | -EALREADY. Of course this would be different when using the _interruptible |
| 263 | variants, but that's outside of the scope of these examples here. | 267 | variants, but that's outside of the scope of these examples here:: |
| 264 | 268 | ||
| 265 | struct obj { | 269 | struct obj { |
| 266 | struct ww_mutex ww_mutex; | 270 | struct ww_mutex ww_mutex; |
| 267 | struct list_head locked_list; | 271 | struct list_head locked_list; |
| 268 | }; | 272 | }; |
| 269 | 273 | ||
| 270 | static DEFINE_WW_CLASS(ww_class); | 274 | static DEFINE_WW_CLASS(ww_class); |
| 271 | 275 | ||
| 272 | void __unlock_objs(struct list_head *list) | 276 | void __unlock_objs(struct list_head *list) |
| 273 | { | 277 | { |
| 274 | struct obj *entry, *temp; | 278 | struct obj *entry, *temp; |
| 275 | 279 | ||
| 276 | list_for_each_entry_safe (entry, temp, list, locked_list) { | 280 | list_for_each_entry_safe (entry, temp, list, locked_list) { |
| @@ -279,15 +283,15 @@ void __unlock_objs(struct list_head *list) | |||
| 279 | list_del(&entry->locked_list); | 283 | list_del(&entry->locked_list); |
| 280 | ww_mutex_unlock(entry->ww_mutex) | 284 | ww_mutex_unlock(entry->ww_mutex) |
| 281 | } | 285 | } |
| 282 | } | 286 | } |
| 283 | 287 | ||
| 284 | void lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) | 288 | void lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) |
| 285 | { | 289 | { |
| 286 | struct obj *obj; | 290 | struct obj *obj; |
| 287 | 291 | ||
| 288 | ww_acquire_init(ctx, &ww_class); | 292 | ww_acquire_init(ctx, &ww_class); |
| 289 | 293 | ||
| 290 | retry: | 294 | retry: |
| 291 | /* re-init loop start state */ | 295 | /* re-init loop start state */ |
| 292 | loop { | 296 | loop { |
| 293 | /* magic code which walks over a graph and decides which objects | 297 | /* magic code which walks over a graph and decides which objects |
| @@ -312,13 +316,13 @@ retry: | |||
| 312 | 316 | ||
| 313 | ww_acquire_done(ctx); | 317 | ww_acquire_done(ctx); |
| 314 | return 0; | 318 | return 0; |
| 315 | } | 319 | } |
| 316 | 320 | ||
| 317 | void unlock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) | 321 | void unlock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) |
| 318 | { | 322 | { |
| 319 | __unlock_objs(list); | 323 | __unlock_objs(list); |
| 320 | ww_acquire_fini(ctx); | 324 | ww_acquire_fini(ctx); |
| 321 | } | 325 | } |
| 322 | 326 | ||
| 323 | Method 4: Only lock one single objects. In that case deadlock detection and | 327 | Method 4: Only lock one single objects. In that case deadlock detection and |
| 324 | prevention is obviously overkill, since with grabbing just one lock you can't | 328 | prevention is obviously overkill, since with grabbing just one lock you can't |
| @@ -329,11 +333,14 @@ Implementation Details | |||
| 329 | ---------------------- | 333 | ---------------------- |
| 330 | 334 | ||
| 331 | Design: | 335 | Design: |
| 336 | ^^^^^^^ | ||
| 337 | |||
| 332 | ww_mutex currently encapsulates a struct mutex, this means no extra overhead for | 338 | ww_mutex currently encapsulates a struct mutex, this means no extra overhead for |
| 333 | normal mutex locks, which are far more common. As such there is only a small | 339 | normal mutex locks, which are far more common. As such there is only a small |
| 334 | increase in code size if wait/wound mutexes are not used. | 340 | increase in code size if wait/wound mutexes are not used. |
| 335 | 341 | ||
| 336 | We maintain the following invariants for the wait list: | 342 | We maintain the following invariants for the wait list: |
| 343 | |||
| 337 | (1) Waiters with an acquire context are sorted by stamp order; waiters | 344 | (1) Waiters with an acquire context are sorted by stamp order; waiters |
| 338 | without an acquire context are interspersed in FIFO order. | 345 | without an acquire context are interspersed in FIFO order. |
| 339 | (2) For Wait-Die, among waiters with contexts, only the first one can have | 346 | (2) For Wait-Die, among waiters with contexts, only the first one can have |
| @@ -355,6 +362,8 @@ Design: | |||
| 355 | therefore be directed towards the uncontended cases. | 362 | therefore be directed towards the uncontended cases. |
| 356 | 363 | ||
| 357 | Lockdep: | 364 | Lockdep: |
| 365 | ^^^^^^^^ | ||
| 366 | |||
| 358 | Special care has been taken to warn for as many cases of api abuse | 367 | Special care has been taken to warn for as many cases of api abuse |
| 359 | as possible. Some common api abuses will be caught with | 368 | as possible. Some common api abuses will be caught with |
| 360 | CONFIG_DEBUG_MUTEXES, but CONFIG_PROVE_LOCKING is recommended. | 369 | CONFIG_DEBUG_MUTEXES, but CONFIG_PROVE_LOCKING is recommended. |
| @@ -379,5 +388,6 @@ Lockdep: | |||
| 379 | having called ww_acquire_fini on the first. | 388 | having called ww_acquire_fini on the first. |
| 380 | - 'normal' deadlocks that can occur. | 389 | - 'normal' deadlocks that can occur. |
| 381 | 390 | ||
| 382 | FIXME: Update this section once we have the TASK_DEADLOCK task state flag magic | 391 | FIXME: |
| 383 | implemented. | 392 | Update this section once we have the TASK_DEADLOCK task state flag magic |
| 393 | implemented. | ||
diff --git a/Documentation/m68k/index.rst b/Documentation/m68k/index.rst new file mode 100644 index 000000000000..3a5ba7fe1703 --- /dev/null +++ b/Documentation/m68k/index.rst | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | ================= | ||
| 4 | m68k Architecture | ||
| 5 | ================= | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 2 | ||
| 9 | |||
| 10 | kernel-options | ||
| 11 | |||
| 12 | .. only:: subproject and html | ||
| 13 | |||
| 14 | Indices | ||
| 15 | ======= | ||
| 16 | |||
| 17 | * :ref:`genindex` | ||
diff --git a/Documentation/m68k/kernel-options.txt b/Documentation/m68k/kernel-options.rst index 79d21246c75a..cabd9419740d 100644 --- a/Documentation/m68k/kernel-options.txt +++ b/Documentation/m68k/kernel-options.rst | |||
| @@ -1,22 +1,24 @@ | |||
| 1 | 1 | =================================== | |
| 2 | 2 | Command Line Options for Linux/m68k | |
| 3 | Command Line Options for Linux/m68k | 3 | =================================== |
| 4 | =================================== | ||
| 5 | 4 | ||
| 6 | Last Update: 2 May 1999 | 5 | Last Update: 2 May 1999 |
| 6 | |||
| 7 | Linux/m68k version: 2.2.6 | 7 | Linux/m68k version: 2.2.6 |
| 8 | |||
| 8 | Author: Roman.Hodek@informatik.uni-erlangen.de (Roman Hodek) | 9 | Author: Roman.Hodek@informatik.uni-erlangen.de (Roman Hodek) |
| 10 | |||
| 9 | Update: jds@kom.auc.dk (Jes Sorensen) and faq@linux-m68k.org (Chris Lawrence) | 11 | Update: jds@kom.auc.dk (Jes Sorensen) and faq@linux-m68k.org (Chris Lawrence) |
| 10 | 12 | ||
| 11 | 0) Introduction | 13 | 0) Introduction |
| 12 | =============== | 14 | =============== |
| 13 | 15 | ||
| 14 | Often I've been asked which command line options the Linux/m68k | 16 | Often I've been asked which command line options the Linux/m68k |
| 15 | kernel understands, or how the exact syntax for the ... option is, or | 17 | kernel understands, or how the exact syntax for the ... option is, or |
| 16 | ... about the option ... . I hope, this document supplies all the | 18 | ... about the option ... . I hope, this document supplies all the |
| 17 | answers... | 19 | answers... |
| 18 | 20 | ||
| 19 | Note that some options might be outdated, their descriptions being | 21 | Note that some options might be outdated, their descriptions being |
| 20 | incomplete or missing. Please update the information and send in the | 22 | incomplete or missing. Please update the information and send in the |
| 21 | patches. | 23 | patches. |
| 22 | 24 | ||
| @@ -38,11 +40,11 @@ argument contains an '=', it is of class 2, and the definition is put | |||
| 38 | into init's environment. All other arguments are passed to init as | 40 | into init's environment. All other arguments are passed to init as |
| 39 | command line options. | 41 | command line options. |
| 40 | 42 | ||
| 41 | This document describes the valid kernel options for Linux/m68k in | 43 | This document describes the valid kernel options for Linux/m68k in |
| 42 | the version mentioned at the start of this file. Later revisions may | 44 | the version mentioned at the start of this file. Later revisions may |
| 43 | add new such options, and some may be missing in older versions. | 45 | add new such options, and some may be missing in older versions. |
| 44 | 46 | ||
| 45 | In general, the value (the part after the '=') of an option is a | 47 | In general, the value (the part after the '=') of an option is a |
| 46 | list of values separated by commas. The interpretation of these values | 48 | list of values separated by commas. The interpretation of these values |
| 47 | is up to the driver that "owns" the option. This association of | 49 | is up to the driver that "owns" the option. This association of |
| 48 | options with drivers is also the reason that some are further | 50 | options with drivers is also the reason that some are further |
| @@ -55,21 +57,21 @@ subdivided. | |||
| 55 | 2.1) root= | 57 | 2.1) root= |
| 56 | ---------- | 58 | ---------- |
| 57 | 59 | ||
| 58 | Syntax: root=/dev/<device> | 60 | :Syntax: root=/dev/<device> |
| 59 | or: root=<hex_number> | 61 | :or: root=<hex_number> |
| 60 | 62 | ||
| 61 | This tells the kernel which device it should mount as the root | 63 | This tells the kernel which device it should mount as the root |
| 62 | filesystem. The device must be a block device with a valid filesystem | 64 | filesystem. The device must be a block device with a valid filesystem |
| 63 | on it. | 65 | on it. |
| 64 | 66 | ||
| 65 | The first syntax gives the device by name. These names are converted | 67 | The first syntax gives the device by name. These names are converted |
| 66 | into a major/minor number internally in the kernel in an unusual way. | 68 | into a major/minor number internally in the kernel in an unusual way. |
| 67 | Normally, this "conversion" is done by the device files in /dev, but | 69 | Normally, this "conversion" is done by the device files in /dev, but |
| 68 | this isn't possible here, because the root filesystem (with /dev) | 70 | this isn't possible here, because the root filesystem (with /dev) |
| 69 | isn't mounted yet... So the kernel parses the name itself, with some | 71 | isn't mounted yet... So the kernel parses the name itself, with some |
| 70 | hardcoded name to number mappings. The name must always be a | 72 | hardcoded name to number mappings. The name must always be a |
| 71 | combination of two or three letters, followed by a decimal number. | 73 | combination of two or three letters, followed by a decimal number. |
| 72 | Valid names are: | 74 | Valid names are:: |
| 73 | 75 | ||
| 74 | /dev/ram: -> 0x0100 (initial ramdisk) | 76 | /dev/ram: -> 0x0100 (initial ramdisk) |
| 75 | /dev/hda: -> 0x0300 (first IDE disk) | 77 | /dev/hda: -> 0x0300 (first IDE disk) |
| @@ -81,7 +83,7 @@ Valid names are: | |||
| 81 | /dev/sde: -> 0x0840 (fifth SCSI disk) | 83 | /dev/sde: -> 0x0840 (fifth SCSI disk) |
| 82 | /dev/fd : -> 0x0200 (floppy disk) | 84 | /dev/fd : -> 0x0200 (floppy disk) |
| 83 | 85 | ||
| 84 | The name must be followed by a decimal number, that stands for the | 86 | The name must be followed by a decimal number, that stands for the |
| 85 | partition number. Internally, the value of the number is just | 87 | partition number. Internally, the value of the number is just |
| 86 | added to the device number mentioned in the table above. The | 88 | added to the device number mentioned in the table above. The |
| 87 | exceptions are /dev/ram and /dev/fd, where /dev/ram refers to an | 89 | exceptions are /dev/ram and /dev/fd, where /dev/ram refers to an |
| @@ -100,12 +102,12 @@ the kernel command line. | |||
| 100 | 102 | ||
| 101 | [Strange and maybe uninteresting stuff ON] | 103 | [Strange and maybe uninteresting stuff ON] |
| 102 | 104 | ||
| 103 | This unusual translation of device names has some strange | 105 | This unusual translation of device names has some strange |
| 104 | consequences: If, for example, you have a symbolic link from /dev/fd | 106 | consequences: If, for example, you have a symbolic link from /dev/fd |
| 105 | to /dev/fd0D720 as an abbreviation for floppy driver #0 in DD format, | 107 | to /dev/fd0D720 as an abbreviation for floppy driver #0 in DD format, |
| 106 | you cannot use this name for specifying the root device, because the | 108 | you cannot use this name for specifying the root device, because the |
| 107 | kernel cannot see this symlink before mounting the root FS and it | 109 | kernel cannot see this symlink before mounting the root FS and it |
| 108 | isn't in the table above. If you use it, the root device will not be | 110 | isn't in the table above. If you use it, the root device will not be |
| 109 | set at all, without an error message. Another example: You cannot use a | 111 | set at all, without an error message. Another example: You cannot use a |
| 110 | partition on e.g. the sixth SCSI disk as the root filesystem, if you | 112 | partition on e.g. the sixth SCSI disk as the root filesystem, if you |
| 111 | want to specify it by name. This is, because only the devices up to | 113 | want to specify it by name. This is, because only the devices up to |
| @@ -118,7 +120,7 @@ knowledge that each disk uses 16 minors, and write "root=/dev/sde17" | |||
| 118 | 120 | ||
| 119 | [Strange and maybe uninteresting stuff OFF] | 121 | [Strange and maybe uninteresting stuff OFF] |
| 120 | 122 | ||
| 121 | If the device containing your root partition isn't in the table | 123 | If the device containing your root partition isn't in the table |
| 122 | above, you can also specify it by major and minor numbers. These are | 124 | above, you can also specify it by major and minor numbers. These are |
| 123 | written in hex, with no prefix and no separator between. E.g., if you | 125 | written in hex, with no prefix and no separator between. E.g., if you |
| 124 | have a CD with contents appropriate as a root filesystem in the first | 126 | have a CD with contents appropriate as a root filesystem in the first |
| @@ -136,6 +138,7 @@ known partition UUID as the starting point. For example, | |||
| 136 | if partition 5 of the device has the UUID of | 138 | if partition 5 of the device has the UUID of |
| 137 | 00112233-4455-6677-8899-AABBCCDDEEFF then partition 3 may be found as | 139 | 00112233-4455-6677-8899-AABBCCDDEEFF then partition 3 may be found as |
| 138 | follows: | 140 | follows: |
| 141 | |||
| 139 | PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF/PARTNROFF=-2 | 142 | PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF/PARTNROFF=-2 |
| 140 | 143 | ||
| 141 | Authoritative information can be found in | 144 | Authoritative information can be found in |
| @@ -145,8 +148,8 @@ Authoritative information can be found in | |||
| 145 | 2.2) ro, rw | 148 | 2.2) ro, rw |
| 146 | ----------- | 149 | ----------- |
| 147 | 150 | ||
| 148 | Syntax: ro | 151 | :Syntax: ro |
| 149 | or: rw | 152 | :or: rw |
| 150 | 153 | ||
| 151 | These two options tell the kernel whether it should mount the root | 154 | These two options tell the kernel whether it should mount the root |
| 152 | filesystem read-only or read-write. The default is read-only, except | 155 | filesystem read-only or read-write. The default is read-only, except |
| @@ -156,7 +159,7 @@ for ramdisks, which default to read-write. | |||
| 156 | 2.3) debug | 159 | 2.3) debug |
| 157 | ---------- | 160 | ---------- |
| 158 | 161 | ||
| 159 | Syntax: debug | 162 | :Syntax: debug |
| 160 | 163 | ||
| 161 | This raises the kernel log level to 10 (the default is 7). This is the | 164 | This raises the kernel log level to 10 (the default is 7). This is the |
| 162 | same level as set by the "dmesg" command, just that the maximum level | 165 | same level as set by the "dmesg" command, just that the maximum level |
| @@ -166,7 +169,7 @@ selectable by dmesg is 8. | |||
| 166 | 2.4) debug= | 169 | 2.4) debug= |
| 167 | ----------- | 170 | ----------- |
| 168 | 171 | ||
| 169 | Syntax: debug=<device> | 172 | :Syntax: debug=<device> |
| 170 | 173 | ||
| 171 | This option causes certain kernel messages be printed to the selected | 174 | This option causes certain kernel messages be printed to the selected |
| 172 | debugging device. This can aid debugging the kernel, since the | 175 | debugging device. This can aid debugging the kernel, since the |
| @@ -175,7 +178,7 @@ devices are possible depends on the machine type. There are no checks | |||
| 175 | for the validity of the device name. If the device isn't implemented, | 178 | for the validity of the device name. If the device isn't implemented, |
| 176 | nothing happens. | 179 | nothing happens. |
| 177 | 180 | ||
| 178 | Messages logged this way are in general stack dumps after kernel | 181 | Messages logged this way are in general stack dumps after kernel |
| 179 | memory faults or bad kernel traps, and kernel panics. To be exact: all | 182 | memory faults or bad kernel traps, and kernel panics. To be exact: all |
| 180 | messages of level 0 (panic messages) and all messages printed while | 183 | messages of level 0 (panic messages) and all messages printed while |
| 181 | the log level is 8 or more (their level doesn't matter). Before stack | 184 | the log level is 8 or more (their level doesn't matter). Before stack |
| @@ -185,19 +188,27 @@ at least 8 can also be set by the "debug" command line option (see | |||
| 185 | 188 | ||
| 186 | Devices possible for Amiga: | 189 | Devices possible for Amiga: |
| 187 | 190 | ||
| 188 | - "ser": built-in serial port; parameters: 9600bps, 8N1 | 191 | - "ser": |
| 189 | - "mem": Save the messages to a reserved area in chip mem. After | 192 | built-in serial port; parameters: 9600bps, 8N1 |
| 193 | - "mem": | ||
| 194 | Save the messages to a reserved area in chip mem. After | ||
| 190 | rebooting, they can be read under AmigaOS with the tool | 195 | rebooting, they can be read under AmigaOS with the tool |
| 191 | 'dmesg'. | 196 | 'dmesg'. |
| 192 | 197 | ||
| 193 | Devices possible for Atari: | 198 | Devices possible for Atari: |
| 194 | 199 | ||
| 195 | - "ser1": ST-MFP serial port ("Modem1"); parameters: 9600bps, 8N1 | 200 | - "ser1": |
| 196 | - "ser2": SCC channel B serial port ("Modem2"); parameters: 9600bps, 8N1 | 201 | ST-MFP serial port ("Modem1"); parameters: 9600bps, 8N1 |
| 197 | - "ser" : default serial port | 202 | - "ser2": |
| 203 | SCC channel B serial port ("Modem2"); parameters: 9600bps, 8N1 | ||
| 204 | - "ser" : | ||
| 205 | default serial port | ||
| 198 | This is "ser2" for a Falcon, and "ser1" for any other machine | 206 | This is "ser2" for a Falcon, and "ser1" for any other machine |
| 199 | - "midi": The MIDI port; parameters: 31250bps, 8N1 | 207 | - "midi": |
| 200 | - "par" : parallel port | 208 | The MIDI port; parameters: 31250bps, 8N1 |
| 209 | - "par" : | ||
| 210 | parallel port | ||
| 211 | |||
| 201 | The printing routine for this implements a timeout for the | 212 | The printing routine for this implements a timeout for the |
| 202 | case there's no printer connected (else the kernel would | 213 | case there's no printer connected (else the kernel would |
| 203 | lock up). The timeout is not exact, but usually a few | 214 | lock up). The timeout is not exact, but usually a few |
| @@ -205,26 +216,29 @@ Devices possible for Atari: | |||
| 205 | 216 | ||
| 206 | 217 | ||
| 207 | 2.6) ramdisk_size= | 218 | 2.6) ramdisk_size= |
| 208 | ------------- | 219 | ------------------ |
| 209 | 220 | ||
| 210 | Syntax: ramdisk_size=<size> | 221 | :Syntax: ramdisk_size=<size> |
| 211 | 222 | ||
| 212 | This option instructs the kernel to set up a ramdisk of the given | 223 | This option instructs the kernel to set up a ramdisk of the given |
| 213 | size in KBytes. Do not use this option if the ramdisk contents are | 224 | size in KBytes. Do not use this option if the ramdisk contents are |
| 214 | passed by bootstrap! In this case, the size is selected automatically | 225 | passed by bootstrap! In this case, the size is selected automatically |
| 215 | and should not be overwritten. | 226 | and should not be overwritten. |
| 216 | 227 | ||
| 217 | The only application is for root filesystems on floppy disks, that | 228 | The only application is for root filesystems on floppy disks, that |
| 218 | should be loaded into memory. To do that, select the corresponding | 229 | should be loaded into memory. To do that, select the corresponding |
| 219 | size of the disk as ramdisk size, and set the root device to the disk | 230 | size of the disk as ramdisk size, and set the root device to the disk |
| 220 | drive (with "root="). | 231 | drive (with "root="). |
| 221 | 232 | ||
| 222 | 233 | ||
| 223 | 2.7) swap= | 234 | 2.7) swap= |
| 235 | |||
| 236 | I can't find any sign of this option in 2.2.6. | ||
| 237 | |||
| 224 | 2.8) buff= | 238 | 2.8) buff= |
| 225 | ----------- | 239 | ----------- |
| 226 | 240 | ||
| 227 | I can't find any sign of these options in 2.2.6. | 241 | I can't find any sign of this option in 2.2.6. |
| 228 | 242 | ||
| 229 | 243 | ||
| 230 | 3) General Device Options (Amiga and Atari) | 244 | 3) General Device Options (Amiga and Atari) |
| @@ -233,13 +247,13 @@ drive (with "root="). | |||
| 233 | 3.1) ether= | 247 | 3.1) ether= |
| 234 | ----------- | 248 | ----------- |
| 235 | 249 | ||
| 236 | Syntax: ether=[<irq>[,<base_addr>[,<mem_start>[,<mem_end>]]]],<dev-name> | 250 | :Syntax: ether=[<irq>[,<base_addr>[,<mem_start>[,<mem_end>]]]],<dev-name> |
| 237 | 251 | ||
| 238 | <dev-name> is the name of a net driver, as specified in | 252 | <dev-name> is the name of a net driver, as specified in |
| 239 | drivers/net/Space.c in the Linux source. Most prominent are eth0, ... | 253 | drivers/net/Space.c in the Linux source. Most prominent are eth0, ... |
| 240 | eth3, sl0, ... sl3, ppp0, ..., ppp3, dummy, and lo. | 254 | eth3, sl0, ... sl3, ppp0, ..., ppp3, dummy, and lo. |
| 241 | 255 | ||
| 242 | The non-ethernet drivers (sl, ppp, dummy, lo) obviously ignore the | 256 | The non-ethernet drivers (sl, ppp, dummy, lo) obviously ignore the |
| 243 | settings by this options. Also, the existing ethernet drivers for | 257 | settings by this options. Also, the existing ethernet drivers for |
| 244 | Linux/m68k (ariadne, a2065, hydra) don't use them because Zorro boards | 258 | Linux/m68k (ariadne, a2065, hydra) don't use them because Zorro boards |
| 245 | are really Plug-'n-Play, so the "ether=" option is useless altogether | 259 | are really Plug-'n-Play, so the "ether=" option is useless altogether |
| @@ -249,9 +263,9 @@ for Linux/m68k. | |||
| 249 | 3.2) hd= | 263 | 3.2) hd= |
| 250 | -------- | 264 | -------- |
| 251 | 265 | ||
| 252 | Syntax: hd=<cylinders>,<heads>,<sectors> | 266 | :Syntax: hd=<cylinders>,<heads>,<sectors> |
| 253 | 267 | ||
| 254 | This option sets the disk geometry of an IDE disk. The first hd= | 268 | This option sets the disk geometry of an IDE disk. The first hd= |
| 255 | option is for the first IDE disk, the second for the second one. | 269 | option is for the first IDE disk, the second for the second one. |
| 256 | (I.e., you can give this option twice.) In most cases, you won't have | 270 | (I.e., you can give this option twice.) In most cases, you won't have |
| 257 | to use this option, since the kernel can obtain the geometry data | 271 | to use this option, since the kernel can obtain the geometry data |
| @@ -262,9 +276,9 @@ disks. | |||
| 262 | 3.3) max_scsi_luns= | 276 | 3.3) max_scsi_luns= |
| 263 | ------------------- | 277 | ------------------- |
| 264 | 278 | ||
| 265 | Syntax: max_scsi_luns=<n> | 279 | :Syntax: max_scsi_luns=<n> |
| 266 | 280 | ||
| 267 | Sets the maximum number of LUNs (logical units) of SCSI devices to | 281 | Sets the maximum number of LUNs (logical units) of SCSI devices to |
| 268 | be scanned. Valid values for <n> are between 1 and 8. Default is 8 if | 282 | be scanned. Valid values for <n> are between 1 and 8. Default is 8 if |
| 269 | "Probe all LUNs on each SCSI device" was selected during the kernel | 283 | "Probe all LUNs on each SCSI device" was selected during the kernel |
| 270 | configuration, else 1. | 284 | configuration, else 1. |
| @@ -273,9 +287,9 @@ configuration, else 1. | |||
| 273 | 3.4) st= | 287 | 3.4) st= |
| 274 | -------- | 288 | -------- |
| 275 | 289 | ||
| 276 | Syntax: st=<buffer_size>,[<write_thres>,[<max_buffers>]] | 290 | :Syntax: st=<buffer_size>,[<write_thres>,[<max_buffers>]] |
| 277 | 291 | ||
| 278 | Sets several parameters of the SCSI tape driver. <buffer_size> is | 292 | Sets several parameters of the SCSI tape driver. <buffer_size> is |
| 279 | the number of 512-byte buffers reserved for tape operations for each | 293 | the number of 512-byte buffers reserved for tape operations for each |
| 280 | device. <write_thres> sets the number of blocks which must be filled | 294 | device. <write_thres> sets the number of blocks which must be filled |
| 281 | to start an actual write operation to the tape. Maximum value is the | 295 | to start an actual write operation to the tape. Maximum value is the |
| @@ -286,9 +300,9 @@ buffers allocated for all tape devices. | |||
| 286 | 3.5) dmasound= | 300 | 3.5) dmasound= |
| 287 | -------------- | 301 | -------------- |
| 288 | 302 | ||
| 289 | Syntax: dmasound=[<buffers>,<buffer-size>[,<catch-radius>]] | 303 | :Syntax: dmasound=[<buffers>,<buffer-size>[,<catch-radius>]] |
| 290 | 304 | ||
| 291 | This option controls some configurations of the Linux/m68k DMA sound | 305 | This option controls some configurations of the Linux/m68k DMA sound |
| 292 | driver (Amiga and Atari): <buffers> is the number of buffers you want | 306 | driver (Amiga and Atari): <buffers> is the number of buffers you want |
| 293 | to use (minimum 4, default 4), <buffer-size> is the size of each | 307 | to use (minimum 4, default 4), <buffer-size> is the size of each |
| 294 | buffer in kilobytes (minimum 4, default 32) and <catch-radius> says | 308 | buffer in kilobytes (minimum 4, default 32) and <catch-radius> says |
| @@ -305,20 +319,22 @@ don't need to expand the sound. | |||
| 305 | 4.1) video= | 319 | 4.1) video= |
| 306 | ----------- | 320 | ----------- |
| 307 | 321 | ||
| 308 | Syntax: video=<fbname>:<sub-options...> | 322 | :Syntax: video=<fbname>:<sub-options...> |
| 309 | 323 | ||
| 310 | The <fbname> parameter specifies the name of the frame buffer, | 324 | The <fbname> parameter specifies the name of the frame buffer, |
| 311 | eg. most atari users will want to specify `atafb' here. The | 325 | eg. most atari users will want to specify `atafb` here. The |
| 312 | <sub-options> is a comma-separated list of the sub-options listed | 326 | <sub-options> is a comma-separated list of the sub-options listed |
| 313 | below. | 327 | below. |
| 314 | 328 | ||
| 315 | NB: Please notice that this option was renamed from `atavideo' to | 329 | NB: |
| 316 | `video' during the development of the 1.3.x kernels, thus you | 330 | Please notice that this option was renamed from `atavideo` to |
| 331 | `video` during the development of the 1.3.x kernels, thus you | ||
| 317 | might need to update your boot-scripts if upgrading to 2.x from | 332 | might need to update your boot-scripts if upgrading to 2.x from |
| 318 | an 1.2.x kernel. | 333 | an 1.2.x kernel. |
| 319 | 334 | ||
| 320 | NBB: The behavior of video= was changed in 2.1.57 so the recommended | 335 | NBB: |
| 321 | option is to specify the name of the frame buffer. | 336 | The behavior of video= was changed in 2.1.57 so the recommended |
| 337 | option is to specify the name of the frame buffer. | ||
| 322 | 338 | ||
| 323 | 4.1.1) Video Mode | 339 | 4.1.1) Video Mode |
| 324 | ----------------- | 340 | ----------------- |
| @@ -341,11 +357,11 @@ mode, if the hardware allows. Currently defined names are: | |||
| 341 | - falh2 : 896x608x1, Falcon only | 357 | - falh2 : 896x608x1, Falcon only |
| 342 | - falh16 : 896x608x4, Falcon only | 358 | - falh16 : 896x608x4, Falcon only |
| 343 | 359 | ||
| 344 | If no video mode is given on the command line, the kernel tries the | 360 | If no video mode is given on the command line, the kernel tries the |
| 345 | modes names "default<n>" in turn, until one is possible with the | 361 | modes names "default<n>" in turn, until one is possible with the |
| 346 | hardware in use. | 362 | hardware in use. |
| 347 | 363 | ||
| 348 | A video mode setting doesn't make sense, if the external driver is | 364 | A video mode setting doesn't make sense, if the external driver is |
| 349 | activated by a "external:" sub-option. | 365 | activated by a "external:" sub-option. |
| 350 | 366 | ||
| 351 | 4.1.2) inverse | 367 | 4.1.2) inverse |
| @@ -358,17 +374,17 @@ option, you can make the background white. | |||
| 358 | 4.1.3) font | 374 | 4.1.3) font |
| 359 | ----------- | 375 | ----------- |
| 360 | 376 | ||
| 361 | Syntax: font:<fontname> | 377 | :Syntax: font:<fontname> |
| 362 | 378 | ||
| 363 | Specify the font to use in text modes. Currently you can choose only | 379 | Specify the font to use in text modes. Currently you can choose only |
| 364 | between `VGA8x8', `VGA8x16' and `PEARL8x8'. `VGA8x8' is default, if the | 380 | between `VGA8x8`, `VGA8x16` and `PEARL8x8`. `VGA8x8` is default, if the |
| 365 | vertical size of the display is less than 400 pixel rows. Otherwise, the | 381 | vertical size of the display is less than 400 pixel rows. Otherwise, the |
| 366 | `VGA8x16' font is the default. | 382 | `VGA8x16` font is the default. |
| 367 | 383 | ||
| 368 | 4.1.4) hwscroll_ | 384 | 4.1.4) `hwscroll_` |
| 369 | ---------------- | 385 | ------------------ |
| 370 | 386 | ||
| 371 | Syntax: hwscroll_<n> | 387 | :Syntax: `hwscroll_<n>` |
| 372 | 388 | ||
| 373 | The number of additional lines of video memory to reserve for | 389 | The number of additional lines of video memory to reserve for |
| 374 | speeding up the scrolling ("hardware scrolling"). Hardware scrolling | 390 | speeding up the scrolling ("hardware scrolling"). Hardware scrolling |
| @@ -378,7 +394,7 @@ possible with plain STs and graphics cards (The former because the | |||
| 378 | base address must be on a 256 byte boundary there, the latter because | 394 | base address must be on a 256 byte boundary there, the latter because |
| 379 | the kernel doesn't know how to set the base address at all.) | 395 | the kernel doesn't know how to set the base address at all.) |
| 380 | 396 | ||
| 381 | By default, <n> is set to the number of visible text lines on the | 397 | By default, <n> is set to the number of visible text lines on the |
| 382 | display. Thus, the amount of video memory is doubled, compared to no | 398 | display. Thus, the amount of video memory is doubled, compared to no |
| 383 | hardware scrolling. You can turn off the hardware scrolling altogether | 399 | hardware scrolling. You can turn off the hardware scrolling altogether |
| 384 | by setting <n> to 0. | 400 | by setting <n> to 0. |
| @@ -386,31 +402,31 @@ by setting <n> to 0. | |||
| 386 | 4.1.5) internal: | 402 | 4.1.5) internal: |
| 387 | ---------------- | 403 | ---------------- |
| 388 | 404 | ||
| 389 | Syntax: internal:<xres>;<yres>[;<xres_max>;<yres_max>;<offset>] | 405 | :Syntax: internal:<xres>;<yres>[;<xres_max>;<yres_max>;<offset>] |
| 390 | 406 | ||
| 391 | This option specifies the capabilities of some extended internal video | 407 | This option specifies the capabilities of some extended internal video |
| 392 | hardware, like e.g. OverScan. <xres> and <yres> give the (extended) | 408 | hardware, like e.g. OverScan. <xres> and <yres> give the (extended) |
| 393 | dimensions of the screen. | 409 | dimensions of the screen. |
| 394 | 410 | ||
| 395 | If your OverScan needs a black border, you have to write the last | 411 | If your OverScan needs a black border, you have to write the last |
| 396 | three arguments of the "internal:". <xres_max> is the maximum line | 412 | three arguments of the "internal:". <xres_max> is the maximum line |
| 397 | length the hardware allows, <yres_max> the maximum number of lines. | 413 | length the hardware allows, <yres_max> the maximum number of lines. |
| 398 | <offset> is the offset of the visible part of the screen memory to its | 414 | <offset> is the offset of the visible part of the screen memory to its |
| 399 | physical start, in bytes. | 415 | physical start, in bytes. |
| 400 | 416 | ||
| 401 | Often, extended interval video hardware has to be activated somehow. | 417 | Often, extended interval video hardware has to be activated somehow. |
| 402 | For this, see the "sw_*" options below. | 418 | For this, see the "sw_*" options below. |
| 403 | 419 | ||
| 404 | 4.1.6) external: | 420 | 4.1.6) external: |
| 405 | ---------------- | 421 | ---------------- |
| 406 | 422 | ||
| 407 | Syntax: | 423 | :Syntax: |
| 408 | external:<xres>;<yres>;<depth>;<org>;<scrmem>[;<scrlen>[;<vgabase>\ | 424 | external:<xres>;<yres>;<depth>;<org>;<scrmem>[;<scrlen>[;<vgabase> |
| 409 | [;<colw>[;<coltype>[;<xres_virtual>]]]]] | 425 | [;<colw>[;<coltype>[;<xres_virtual>]]]]] |
| 410 | 426 | ||
| 411 | [I had to break this line...] | 427 | .. I had to break this line... |
| 412 | 428 | ||
| 413 | This is probably the most complicated parameter... It specifies that | 429 | This is probably the most complicated parameter... It specifies that |
| 414 | you have some external video hardware (a graphics board), and how to | 430 | you have some external video hardware (a graphics board), and how to |
| 415 | use it under Linux/m68k. The kernel cannot know more about the hardware | 431 | use it under Linux/m68k. The kernel cannot know more about the hardware |
| 416 | than you tell it here! The kernel also is unable to set or change any | 432 | than you tell it here! The kernel also is unable to set or change any |
| @@ -418,38 +434,44 @@ video modes, since it doesn't know about any board internal. So, you | |||
| 418 | have to switch to that video mode before you start Linux, and cannot | 434 | have to switch to that video mode before you start Linux, and cannot |
| 419 | switch to another mode once Linux has started. | 435 | switch to another mode once Linux has started. |
| 420 | 436 | ||
| 421 | The first 3 parameters of this sub-option should be obvious: <xres>, | 437 | The first 3 parameters of this sub-option should be obvious: <xres>, |
| 422 | <yres> and <depth> give the dimensions of the screen and the number of | 438 | <yres> and <depth> give the dimensions of the screen and the number of |
| 423 | planes (depth). The depth is the logarithm to base 2 of the number | 439 | planes (depth). The depth is the logarithm to base 2 of the number |
| 424 | of colors possible. (Or, the other way round: The number of colors is | 440 | of colors possible. (Or, the other way round: The number of colors is |
| 425 | 2^depth). | 441 | 2^depth). |
| 426 | 442 | ||
| 427 | You have to tell the kernel furthermore how the video memory is | 443 | You have to tell the kernel furthermore how the video memory is |
| 428 | organized. This is done by a letter as <org> parameter: | 444 | organized. This is done by a letter as <org> parameter: |
| 429 | 445 | ||
| 430 | 'n': "normal planes", i.e. one whole plane after another | 446 | 'n': |
| 431 | 'i': "interleaved planes", i.e. 16 bit of the first plane, than 16 bit | 447 | "normal planes", i.e. one whole plane after another |
| 448 | 'i': | ||
| 449 | "interleaved planes", i.e. 16 bit of the first plane, than 16 bit | ||
| 432 | of the next, and so on... This mode is used only with the | 450 | of the next, and so on... This mode is used only with the |
| 433 | built-in Atari video modes, I think there is no card that | 451 | built-in Atari video modes, I think there is no card that |
| 434 | supports this mode. | 452 | supports this mode. |
| 435 | 'p': "packed pixels", i.e. <depth> consecutive bits stand for all | 453 | 'p': |
| 436 | planes of one pixel; this is the most common mode for 8 planes | 454 | "packed pixels", i.e. <depth> consecutive bits stand for all |
| 437 | (256 colors) on graphic cards | 455 | planes of one pixel; this is the most common mode for 8 planes |
| 438 | 't': "true color" (more or less packed pixels, but without a color | 456 | (256 colors) on graphic cards |
| 439 | lookup table); usually depth is 24 | 457 | 't': |
| 458 | "true color" (more or less packed pixels, but without a color | ||
| 459 | lookup table); usually depth is 24 | ||
| 440 | 460 | ||
| 441 | For monochrome modes (i.e., <depth> is 1), the <org> letter has a | 461 | For monochrome modes (i.e., <depth> is 1), the <org> letter has a |
| 442 | different meaning: | 462 | different meaning: |
| 443 | 463 | ||
| 444 | 'n': normal colors, i.e. 0=white, 1=black | 464 | 'n': |
| 445 | 'i': inverted colors, i.e. 0=black, 1=white | 465 | normal colors, i.e. 0=white, 1=black |
| 466 | 'i': | ||
| 467 | inverted colors, i.e. 0=black, 1=white | ||
| 446 | 468 | ||
| 447 | The next important information about the video hardware is the base | 469 | The next important information about the video hardware is the base |
| 448 | address of the video memory. That is given in the <scrmem> parameter, | 470 | address of the video memory. That is given in the <scrmem> parameter, |
| 449 | as a hexadecimal number with a "0x" prefix. You have to find out this | 471 | as a hexadecimal number with a "0x" prefix. You have to find out this |
| 450 | address in the documentation of your hardware. | 472 | address in the documentation of your hardware. |
| 451 | 473 | ||
| 452 | The next parameter, <scrlen>, tells the kernel about the size of the | 474 | The next parameter, <scrlen>, tells the kernel about the size of the |
| 453 | video memory. If it's missing, the size is calculated from <xres>, | 475 | video memory. If it's missing, the size is calculated from <xres>, |
| 454 | <yres>, and <depth>. For now, it is not useful to write a value here. | 476 | <yres>, and <depth>. For now, it is not useful to write a value here. |
| 455 | It would be used only for hardware scrolling (which isn't possible | 477 | It would be used only for hardware scrolling (which isn't possible |
| @@ -460,7 +482,7 @@ empty, either by ending the "external:" after the video address or by | |||
| 460 | writing two consecutive semicolons, if you want to give a <vgabase> | 482 | writing two consecutive semicolons, if you want to give a <vgabase> |
| 461 | (it is allowed to leave this parameter empty). | 483 | (it is allowed to leave this parameter empty). |
| 462 | 484 | ||
| 463 | The <vgabase> parameter is optional. If it is not given, the kernel | 485 | The <vgabase> parameter is optional. If it is not given, the kernel |
| 464 | cannot read or write any color registers of the video hardware, and | 486 | cannot read or write any color registers of the video hardware, and |
| 465 | thus you have to set appropriate colors before you start Linux. But if | 487 | thus you have to set appropriate colors before you start Linux. But if |
| 466 | your card is somehow VGA compatible, you can tell the kernel the base | 488 | your card is somehow VGA compatible, you can tell the kernel the base |
| @@ -472,18 +494,18 @@ uses the addresses vgabase+0x3c7...vgabase+0x3c9. The <vgabase> | |||
| 472 | parameter is written in hexadecimal with a "0x" prefix, just as | 494 | parameter is written in hexadecimal with a "0x" prefix, just as |
| 473 | <scrmem>. | 495 | <scrmem>. |
| 474 | 496 | ||
| 475 | <colw> is meaningful only if <vgabase> is specified. It tells the | 497 | <colw> is meaningful only if <vgabase> is specified. It tells the |
| 476 | kernel how wide each of the color register is, i.e. the number of bits | 498 | kernel how wide each of the color register is, i.e. the number of bits |
| 477 | per single color (red/green/blue). Default is 6, another quite usual | 499 | per single color (red/green/blue). Default is 6, another quite usual |
| 478 | value is 8. | 500 | value is 8. |
| 479 | 501 | ||
| 480 | Also <coltype> is used together with <vgabase>. It tells the kernel | 502 | Also <coltype> is used together with <vgabase>. It tells the kernel |
| 481 | about the color register model of your gfx board. Currently, the types | 503 | about the color register model of your gfx board. Currently, the types |
| 482 | "vga" (which is also the default) and "mv300" (SANG MV300) are | 504 | "vga" (which is also the default) and "mv300" (SANG MV300) are |
| 483 | implemented. | 505 | implemented. |
| 484 | 506 | ||
| 485 | Parameter <xres_virtual> is required for ProMST or ET4000 cards where | 507 | Parameter <xres_virtual> is required for ProMST or ET4000 cards where |
| 486 | the physical linelength differs from the visible length. With ProMST, | 508 | the physical linelength differs from the visible length. With ProMST, |
| 487 | xres_virtual must be set to 2048. For ET4000, xres_virtual depends on the | 509 | xres_virtual must be set to 2048. For ET4000, xres_virtual depends on the |
| 488 | initialisation of the video-card. | 510 | initialisation of the video-card. |
| 489 | If you're missing a corresponding yres_virtual: the external part is legacy, | 511 | If you're missing a corresponding yres_virtual: the external part is legacy, |
| @@ -499,13 +521,13 @@ currently works only with the ScreenWonder! | |||
| 499 | 4.1.8) monitorcap: | 521 | 4.1.8) monitorcap: |
| 500 | ------------------- | 522 | ------------------- |
| 501 | 523 | ||
| 502 | Syntax: monitorcap:<vmin>;<vmax>;<hmin>;<hmax> | 524 | :Syntax: monitorcap:<vmin>;<vmax>;<hmin>;<hmax> |
| 503 | 525 | ||
| 504 | This describes the capabilities of a multisync monitor. Don't use it | 526 | This describes the capabilities of a multisync monitor. Don't use it |
| 505 | with a fixed-frequency monitor! For now, only the Falcon frame buffer | 527 | with a fixed-frequency monitor! For now, only the Falcon frame buffer |
| 506 | uses the settings of "monitorcap:". | 528 | uses the settings of "monitorcap:". |
| 507 | 529 | ||
| 508 | <vmin> and <vmax> are the minimum and maximum, resp., vertical frequencies | 530 | <vmin> and <vmax> are the minimum and maximum, resp., vertical frequencies |
| 509 | your monitor can work with, in Hz. <hmin> and <hmax> are the same for | 531 | your monitor can work with, in Hz. <hmin> and <hmax> are the same for |
| 510 | the horizontal frequency, in kHz. | 532 | the horizontal frequency, in kHz. |
| 511 | 533 | ||
| @@ -520,28 +542,28 @@ If this option is given, the framebuffer device doesn't do any video | |||
| 520 | mode calculations and settings on its own. The only Atari fb device | 542 | mode calculations and settings on its own. The only Atari fb device |
| 521 | that does this currently is the Falcon. | 543 | that does this currently is the Falcon. |
| 522 | 544 | ||
| 523 | What you reach with this: Settings for unknown video extensions | 545 | What you reach with this: Settings for unknown video extensions |
| 524 | aren't overridden by the driver, so you can still use the mode found | 546 | aren't overridden by the driver, so you can still use the mode found |
| 525 | when booting, when the driver doesn't know to set this mode itself. | 547 | when booting, when the driver doesn't know to set this mode itself. |
| 526 | But this also means, that you can't switch video modes anymore... | 548 | But this also means, that you can't switch video modes anymore... |
| 527 | 549 | ||
| 528 | An example where you may want to use "keep" is the ScreenBlaster for | 550 | An example where you may want to use "keep" is the ScreenBlaster for |
| 529 | the Falcon. | 551 | the Falcon. |
| 530 | 552 | ||
| 531 | 553 | ||
| 532 | 4.2) atamouse= | 554 | 4.2) atamouse= |
| 533 | -------------- | 555 | -------------- |
| 534 | 556 | ||
| 535 | Syntax: atamouse=<x-threshold>,[<y-threshold>] | 557 | :Syntax: atamouse=<x-threshold>,[<y-threshold>] |
| 536 | 558 | ||
| 537 | With this option, you can set the mouse movement reporting threshold. | 559 | With this option, you can set the mouse movement reporting threshold. |
| 538 | This is the number of pixels of mouse movement that have to accumulate | 560 | This is the number of pixels of mouse movement that have to accumulate |
| 539 | before the IKBD sends a new mouse packet to the kernel. Higher values | 561 | before the IKBD sends a new mouse packet to the kernel. Higher values |
| 540 | reduce the mouse interrupt load and thus reduce the chance of keyboard | 562 | reduce the mouse interrupt load and thus reduce the chance of keyboard |
| 541 | overruns. Lower values give a slightly faster mouse responses and | 563 | overruns. Lower values give a slightly faster mouse responses and |
| 542 | slightly better mouse tracking. | 564 | slightly better mouse tracking. |
| 543 | 565 | ||
| 544 | You can set the threshold in x and y separately, but usually this is | 566 | You can set the threshold in x and y separately, but usually this is |
| 545 | of little practical use. If there's just one number in the option, it | 567 | of little practical use. If there's just one number in the option, it |
| 546 | is used for both dimensions. The default value is 2 for both | 568 | is used for both dimensions. The default value is 2 for both |
| 547 | thresholds. | 569 | thresholds. |
| @@ -550,7 +572,7 @@ thresholds. | |||
| 550 | 4.3) ataflop= | 572 | 4.3) ataflop= |
| 551 | ------------- | 573 | ------------- |
| 552 | 574 | ||
| 553 | Syntax: ataflop=<drive type>[,<trackbuffering>[,<steprateA>[,<steprateB>]]] | 575 | :Syntax: ataflop=<drive type>[,<trackbuffering>[,<steprateA>[,<steprateB>]]] |
| 554 | 576 | ||
| 555 | The drive type may be 0, 1, or 2, for DD, HD, and ED, resp. This | 577 | The drive type may be 0, 1, or 2, for DD, HD, and ED, resp. This |
| 556 | setting affects how many buffers are reserved and which formats are | 578 | setting affects how many buffers are reserved and which formats are |
| @@ -563,15 +585,15 @@ Syntax: ataflop=<drive type>[,<trackbuffering>[,<steprateA>[,<steprateB>]]] | |||
| 563 | no for the Medusa and yes for all others. | 585 | no for the Medusa and yes for all others. |
| 564 | 586 | ||
| 565 | With the two following parameters, you can change the default | 587 | With the two following parameters, you can change the default |
| 566 | steprate used for drive A and B, resp. | 588 | steprate used for drive A and B, resp. |
| 567 | 589 | ||
| 568 | 590 | ||
| 569 | 4.4) atascsi= | 591 | 4.4) atascsi= |
| 570 | ------------- | 592 | ------------- |
| 571 | 593 | ||
| 572 | Syntax: atascsi=<can_queue>[,<cmd_per_lun>[,<scat-gat>[,<host-id>[,<tagged>]]]] | 594 | :Syntax: atascsi=<can_queue>[,<cmd_per_lun>[,<scat-gat>[,<host-id>[,<tagged>]]]] |
| 573 | 595 | ||
| 574 | This option sets some parameters for the Atari native SCSI driver. | 596 | This option sets some parameters for the Atari native SCSI driver. |
| 575 | Generally, any number of arguments can be omitted from the end. And | 597 | Generally, any number of arguments can be omitted from the end. And |
| 576 | for each of the numbers, a negative value means "use default". The | 598 | for each of the numbers, a negative value means "use default". The |
| 577 | defaults depend on whether TT-style or Falcon-style SCSI is used. | 599 | defaults depend on whether TT-style or Falcon-style SCSI is used. |
| @@ -597,11 +619,14 @@ ignored (others aren't affected). | |||
| 597 | 32). Default: 8/1. (Note: Values > 1 seem to cause problems on a | 619 | 32). Default: 8/1. (Note: Values > 1 seem to cause problems on a |
| 598 | Falcon, cause not yet known.) | 620 | Falcon, cause not yet known.) |
| 599 | 621 | ||
| 600 | The <cmd_per_lun> value at a great part determines the amount of | 622 | The <cmd_per_lun> value at a great part determines the amount of |
| 601 | memory SCSI reserves for itself. The formula is rather | 623 | memory SCSI reserves for itself. The formula is rather |
| 602 | complicated, but I can give you some hints: | 624 | complicated, but I can give you some hints: |
| 603 | no scatter-gather : cmd_per_lun * 232 bytes | 625 | |
| 604 | full scatter-gather: cmd_per_lun * approx. 17 Kbytes | 626 | no scatter-gather: |
| 627 | cmd_per_lun * 232 bytes | ||
| 628 | full scatter-gather: | ||
| 629 | cmd_per_lun * approx. 17 Kbytes | ||
| 605 | 630 | ||
| 606 | <scat-gat>: | 631 | <scat-gat>: |
| 607 | Size of the scatter-gather table, i.e. the number of requests | 632 | Size of the scatter-gather table, i.e. the number of requests |
| @@ -634,19 +659,23 @@ ignored (others aren't affected). | |||
| 634 | 4.5 switches= | 659 | 4.5 switches= |
| 635 | ------------- | 660 | ------------- |
| 636 | 661 | ||
| 637 | Syntax: switches=<list of switches> | 662 | :Syntax: switches=<list of switches> |
| 638 | 663 | ||
| 639 | With this option you can switch some hardware lines that are often | 664 | With this option you can switch some hardware lines that are often |
| 640 | used to enable/disable certain hardware extensions. Examples are | 665 | used to enable/disable certain hardware extensions. Examples are |
| 641 | OverScan, overclocking, ... | 666 | OverScan, overclocking, ... |
| 642 | 667 | ||
| 643 | The <list of switches> is a comma-separated list of the following | 668 | The <list of switches> is a comma-separated list of the following |
| 644 | items: | 669 | items: |
| 645 | 670 | ||
| 646 | ikbd: set RTS of the keyboard ACIA high | 671 | ikbd: |
| 647 | midi: set RTS of the MIDI ACIA high | 672 | set RTS of the keyboard ACIA high |
| 648 | snd6: set bit 6 of the PSG port A | 673 | midi: |
| 649 | snd7: set bit 6 of the PSG port A | 674 | set RTS of the MIDI ACIA high |
| 675 | snd6: | ||
| 676 | set bit 6 of the PSG port A | ||
| 677 | snd7: | ||
| 678 | set bit 6 of the PSG port A | ||
| 650 | 679 | ||
| 651 | It doesn't make sense to mention a switch more than once (no | 680 | It doesn't make sense to mention a switch more than once (no |
| 652 | difference to only once), but you can give as many switches as you | 681 | difference to only once), but you can give as many switches as you |
| @@ -654,16 +683,16 @@ want to enable different features. The switch lines are set as early | |||
| 654 | as possible during kernel initialization (even before determining the | 683 | as possible during kernel initialization (even before determining the |
| 655 | present hardware.) | 684 | present hardware.) |
| 656 | 685 | ||
| 657 | All of the items can also be prefixed with "ov_", i.e. "ov_ikbd", | 686 | All of the items can also be prefixed with `ov_`, i.e. `ov_ikbd`, |
| 658 | "ov_midi", ... These options are meant for switching on an OverScan | 687 | `ov_midi`, ... These options are meant for switching on an OverScan |
| 659 | video extension. The difference to the bare option is that the | 688 | video extension. The difference to the bare option is that the |
| 660 | switch-on is done after video initialization, and somehow synchronized | 689 | switch-on is done after video initialization, and somehow synchronized |
| 661 | to the HBLANK. A speciality is that ov_ikbd and ov_midi are switched | 690 | to the HBLANK. A speciality is that ov_ikbd and ov_midi are switched |
| 662 | off before rebooting, so that OverScan is disabled and TOS boots | 691 | off before rebooting, so that OverScan is disabled and TOS boots |
| 663 | correctly. | 692 | correctly. |
| 664 | 693 | ||
| 665 | If you give an option both, with and without the "ov_" prefix, the | 694 | If you give an option both, with and without the `ov_` prefix, the |
| 666 | earlier initialization ("ov_"-less) takes precedence. But the | 695 | earlier initialization (`ov_`-less) takes precedence. But the |
| 667 | switching-off on reset still happens in this case. | 696 | switching-off on reset still happens in this case. |
| 668 | 697 | ||
| 669 | 5) Options for Amiga Only: | 698 | 5) Options for Amiga Only: |
| @@ -672,10 +701,10 @@ switching-off on reset still happens in this case. | |||
| 672 | 5.1) video= | 701 | 5.1) video= |
| 673 | ----------- | 702 | ----------- |
| 674 | 703 | ||
| 675 | Syntax: video=<fbname>:<sub-options...> | 704 | :Syntax: video=<fbname>:<sub-options...> |
| 676 | 705 | ||
| 677 | The <fbname> parameter specifies the name of the frame buffer, valid | 706 | The <fbname> parameter specifies the name of the frame buffer, valid |
| 678 | options are `amifb', `cyber', 'virge', `retz3' and `clgen', provided | 707 | options are `amifb`, `cyber`, 'virge', `retz3` and `clgen`, provided |
| 679 | that the respective frame buffer devices have been compiled into the | 708 | that the respective frame buffer devices have been compiled into the |
| 680 | kernel (or compiled as loadable modules). The behavior of the <fbname> | 709 | kernel (or compiled as loadable modules). The behavior of the <fbname> |
| 681 | option was changed in 2.1.57 so it is now recommended to specify this | 710 | option was changed in 2.1.57 so it is now recommended to specify this |
| @@ -697,9 +726,11 @@ predefined video modes are available: | |||
| 697 | NTSC modes: | 726 | NTSC modes: |
| 698 | - ntsc : 640x200, 15 kHz, 60 Hz | 727 | - ntsc : 640x200, 15 kHz, 60 Hz |
| 699 | - ntsc-lace : 640x400, 15 kHz, 60 Hz interlaced | 728 | - ntsc-lace : 640x400, 15 kHz, 60 Hz interlaced |
| 729 | |||
| 700 | PAL modes: | 730 | PAL modes: |
| 701 | - pal : 640x256, 15 kHz, 50 Hz | 731 | - pal : 640x256, 15 kHz, 50 Hz |
| 702 | - pal-lace : 640x512, 15 kHz, 50 Hz interlaced | 732 | - pal-lace : 640x512, 15 kHz, 50 Hz interlaced |
| 733 | |||
| 703 | ECS modes: | 734 | ECS modes: |
| 704 | - multiscan : 640x480, 29 kHz, 57 Hz | 735 | - multiscan : 640x480, 29 kHz, 57 Hz |
| 705 | - multiscan-lace : 640x960, 29 kHz, 57 Hz interlaced | 736 | - multiscan-lace : 640x960, 29 kHz, 57 Hz interlaced |
| @@ -715,6 +746,7 @@ ECS modes: | |||
| 715 | - dblpal-lace : 640x1024, 27 kHz, 47 Hz interlaced | 746 | - dblpal-lace : 640x1024, 27 kHz, 47 Hz interlaced |
| 716 | - dblntsc : 640x200, 27 kHz, 57 Hz doublescan | 747 | - dblntsc : 640x200, 27 kHz, 57 Hz doublescan |
| 717 | - dblpal : 640x256, 27 kHz, 47 Hz doublescan | 748 | - dblpal : 640x256, 27 kHz, 47 Hz doublescan |
| 749 | |||
| 718 | VGA modes: | 750 | VGA modes: |
| 719 | - vga : 640x480, 31 kHz, 60 Hz | 751 | - vga : 640x480, 31 kHz, 60 Hz |
| 720 | - vga70 : 640x400, 31 kHz, 70 Hz | 752 | - vga70 : 640x400, 31 kHz, 70 Hz |
| @@ -726,7 +758,7 @@ chipset and 8-bit color for the AGA chipset. | |||
| 726 | 5.1.2) depth | 758 | 5.1.2) depth |
| 727 | ------------ | 759 | ------------ |
| 728 | 760 | ||
| 729 | Syntax: depth:<nr. of bit-planes> | 761 | :Syntax: depth:<nr. of bit-planes> |
| 730 | 762 | ||
| 731 | Specify the number of bit-planes for the selected video-mode. | 763 | Specify the number of bit-planes for the selected video-mode. |
| 732 | 764 | ||
| @@ -739,32 +771,32 @@ Use inverted display (black on white). Functionally the same as the | |||
| 739 | 5.1.4) font | 771 | 5.1.4) font |
| 740 | ----------- | 772 | ----------- |
| 741 | 773 | ||
| 742 | Syntax: font:<fontname> | 774 | :Syntax: font:<fontname> |
| 743 | 775 | ||
| 744 | Specify the font to use in text modes. Functionally the same as the | 776 | Specify the font to use in text modes. Functionally the same as the |
| 745 | "font" sub-option for the Atari, except that `PEARL8x8' is used instead | 777 | "font" sub-option for the Atari, except that `PEARL8x8` is used instead |
| 746 | of `VGA8x8' if the vertical size of the display is less than 400 pixel | 778 | of `VGA8x8` if the vertical size of the display is less than 400 pixel |
| 747 | rows. | 779 | rows. |
| 748 | 780 | ||
| 749 | 5.1.5) monitorcap: | 781 | 5.1.5) monitorcap: |
| 750 | ------------------- | 782 | ------------------- |
| 751 | 783 | ||
| 752 | Syntax: monitorcap:<vmin>;<vmax>;<hmin>;<hmax> | 784 | :Syntax: monitorcap:<vmin>;<vmax>;<hmin>;<hmax> |
| 753 | 785 | ||
| 754 | This describes the capabilities of a multisync monitor. For now, only | 786 | This describes the capabilities of a multisync monitor. For now, only |
| 755 | the color frame buffer uses the settings of "monitorcap:". | 787 | the color frame buffer uses the settings of "monitorcap:". |
| 756 | 788 | ||
| 757 | <vmin> and <vmax> are the minimum and maximum, resp., vertical frequencies | 789 | <vmin> and <vmax> are the minimum and maximum, resp., vertical frequencies |
| 758 | your monitor can work with, in Hz. <hmin> and <hmax> are the same for | 790 | your monitor can work with, in Hz. <hmin> and <hmax> are the same for |
| 759 | the horizontal frequency, in kHz. | 791 | the horizontal frequency, in kHz. |
| 760 | 792 | ||
| 761 | The defaults are 50;90;15;38 (Generic Amiga multisync monitor). | 793 | The defaults are 50;90;15;38 (Generic Amiga multisync monitor). |
| 762 | 794 | ||
| 763 | 795 | ||
| 764 | 5.2) fd_def_df0= | 796 | 5.2) fd_def_df0= |
| 765 | ---------------- | 797 | ---------------- |
| 766 | 798 | ||
| 767 | Syntax: fd_def_df0=<value> | 799 | :Syntax: fd_def_df0=<value> |
| 768 | 800 | ||
| 769 | Sets the df0 value for "silent" floppy drives. The value should be in | 801 | Sets the df0 value for "silent" floppy drives. The value should be in |
| 770 | hexadecimal with "0x" prefix. | 802 | hexadecimal with "0x" prefix. |
| @@ -773,7 +805,7 @@ hexadecimal with "0x" prefix. | |||
| 773 | 5.3) wd33c93= | 805 | 5.3) wd33c93= |
| 774 | ------------- | 806 | ------------- |
| 775 | 807 | ||
| 776 | Syntax: wd33c93=<sub-options...> | 808 | :Syntax: wd33c93=<sub-options...> |
| 777 | 809 | ||
| 778 | These options affect the A590/A2091, A3000 and GVP Series II SCSI | 810 | These options affect the A590/A2091, A3000 and GVP Series II SCSI |
| 779 | controllers. | 811 | controllers. |
| @@ -784,9 +816,9 @@ below. | |||
| 784 | 5.3.1) nosync | 816 | 5.3.1) nosync |
| 785 | ------------- | 817 | ------------- |
| 786 | 818 | ||
| 787 | Syntax: nosync:bitmask | 819 | :Syntax: nosync:bitmask |
| 788 | 820 | ||
| 789 | bitmask is a byte where the 1st 7 bits correspond with the 7 | 821 | bitmask is a byte where the 1st 7 bits correspond with the 7 |
| 790 | possible SCSI devices. Set a bit to prevent sync negotiation on that | 822 | possible SCSI devices. Set a bit to prevent sync negotiation on that |
| 791 | device. To maintain backwards compatibility, a command-line such as | 823 | device. To maintain backwards compatibility, a command-line such as |
| 792 | "wd33c93=255" will be automatically translated to | 824 | "wd33c93=255" will be automatically translated to |
| @@ -796,35 +828,35 @@ all devices, eg. nosync:0xff. | |||
| 796 | 5.3.2) period | 828 | 5.3.2) period |
| 797 | ------------- | 829 | ------------- |
| 798 | 830 | ||
| 799 | Syntax: period:ns | 831 | :Syntax: period:ns |
| 800 | 832 | ||
| 801 | `ns' is the minimum # of nanoseconds in a SCSI data transfer | 833 | `ns` is the minimum # of nanoseconds in a SCSI data transfer |
| 802 | period. Default is 500; acceptable values are 250 - 1000. | 834 | period. Default is 500; acceptable values are 250 - 1000. |
| 803 | 835 | ||
| 804 | 5.3.3) disconnect | 836 | 5.3.3) disconnect |
| 805 | ----------------- | 837 | ----------------- |
| 806 | 838 | ||
| 807 | Syntax: disconnect:x | 839 | :Syntax: disconnect:x |
| 808 | 840 | ||
| 809 | Specify x = 0 to never allow disconnects, 2 to always allow them. | 841 | Specify x = 0 to never allow disconnects, 2 to always allow them. |
| 810 | x = 1 does 'adaptive' disconnects, which is the default and generally | 842 | x = 1 does 'adaptive' disconnects, which is the default and generally |
| 811 | the best choice. | 843 | the best choice. |
| 812 | 844 | ||
| 813 | 5.3.4) debug | 845 | 5.3.4) debug |
| 814 | ------------ | 846 | ------------ |
| 815 | 847 | ||
| 816 | Syntax: debug:x | 848 | :Syntax: debug:x |
| 817 | 849 | ||
| 818 | If `DEBUGGING_ON' is defined, x is a bit mask that causes various | 850 | If `DEBUGGING_ON` is defined, x is a bit mask that causes various |
| 819 | types of debug output to printed - see the DB_xxx defines in | 851 | types of debug output to printed - see the DB_xxx defines in |
| 820 | wd33c93.h. | 852 | wd33c93.h. |
| 821 | 853 | ||
| 822 | 5.3.5) clock | 854 | 5.3.5) clock |
| 823 | ------------ | 855 | ------------ |
| 824 | 856 | ||
| 825 | Syntax: clock:x | 857 | :Syntax: clock:x |
| 826 | 858 | ||
| 827 | x = clock input in MHz for WD33c93 chip. Normal values would be from | 859 | x = clock input in MHz for WD33c93 chip. Normal values would be from |
| 828 | 8 through 20. The default value depends on your hostadapter(s), | 860 | 8 through 20. The default value depends on your hostadapter(s), |
| 829 | default for the A3000 internal controller is 14, for the A2091 it's 8 | 861 | default for the A3000 internal controller is 14, for the A2091 it's 8 |
| 830 | and for the GVP hostadapters it's either 8 or 14, depending on the | 862 | and for the GVP hostadapters it's either 8 or 14, depending on the |
| @@ -834,15 +866,15 @@ hostadapters. | |||
| 834 | 5.3.6) next | 866 | 5.3.6) next |
| 835 | ----------- | 867 | ----------- |
| 836 | 868 | ||
| 837 | No argument. Used to separate blocks of keywords when there's more | 869 | No argument. Used to separate blocks of keywords when there's more |
| 838 | than one wd33c93-based host adapter in the system. | 870 | than one wd33c93-based host adapter in the system. |
| 839 | 871 | ||
| 840 | 5.3.7) nodma | 872 | 5.3.7) nodma |
| 841 | ------------ | 873 | ------------ |
| 842 | 874 | ||
| 843 | Syntax: nodma:x | 875 | :Syntax: nodma:x |
| 844 | 876 | ||
| 845 | If x is 1 (or if the option is just written as "nodma"), the WD33c93 | 877 | If x is 1 (or if the option is just written as "nodma"), the WD33c93 |
| 846 | controller will not use DMA (= direct memory access) to access the | 878 | controller will not use DMA (= direct memory access) to access the |
| 847 | Amiga's memory. This is useful for some systems (like A3000's and | 879 | Amiga's memory. This is useful for some systems (like A3000's and |
| 848 | A4000's with the A3640 accelerator, revision 3.0) that have problems | 880 | A4000's with the A3640 accelerator, revision 3.0) that have problems |
| @@ -853,32 +885,27 @@ possible. | |||
| 853 | 5.4) gvp11= | 885 | 5.4) gvp11= |
| 854 | ----------- | 886 | ----------- |
| 855 | 887 | ||
| 856 | Syntax: gvp11=<addr-mask> | 888 | :Syntax: gvp11=<addr-mask> |
| 857 | 889 | ||
| 858 | The earlier versions of the GVP driver did not handle DMA | 890 | The earlier versions of the GVP driver did not handle DMA |
| 859 | address-mask settings correctly which made it necessary for some | 891 | address-mask settings correctly which made it necessary for some |
| 860 | people to use this option, in order to get their GVP controller | 892 | people to use this option, in order to get their GVP controller |
| 861 | running under Linux. These problems have hopefully been solved and the | 893 | running under Linux. These problems have hopefully been solved and the |
| 862 | use of this option is now highly unrecommended! | 894 | use of this option is now highly unrecommended! |
| 863 | 895 | ||
| 864 | Incorrect use can lead to unpredictable behavior, so please only use | 896 | Incorrect use can lead to unpredictable behavior, so please only use |
| 865 | this option if you *know* what you are doing and have a reason to do | 897 | this option if you *know* what you are doing and have a reason to do |
| 866 | so. In any case if you experience problems and need to use this | 898 | so. In any case if you experience problems and need to use this |
| 867 | option, please inform us about it by mailing to the Linux/68k kernel | 899 | option, please inform us about it by mailing to the Linux/68k kernel |
| 868 | mailing list. | 900 | mailing list. |
| 869 | 901 | ||
| 870 | The address mask set by this option specifies which addresses are | 902 | The address mask set by this option specifies which addresses are |
| 871 | valid for DMA with the GVP Series II SCSI controller. An address is | 903 | valid for DMA with the GVP Series II SCSI controller. An address is |
| 872 | valid, if no bits are set except the bits that are set in the mask, | 904 | valid, if no bits are set except the bits that are set in the mask, |
| 873 | too. | 905 | too. |
| 874 | 906 | ||
| 875 | Some versions of the GVP can only DMA into a 24 bit address range, | 907 | Some versions of the GVP can only DMA into a 24 bit address range, |
| 876 | some can address a 25 bit address range while others can use the whole | 908 | some can address a 25 bit address range while others can use the whole |
| 877 | 32 bit address range for DMA. The correct setting depends on your | 909 | 32 bit address range for DMA. The correct setting depends on your |
| 878 | controller and should be autodetected by the driver. An example is the | 910 | controller and should be autodetected by the driver. An example is the |
| 879 | 24 bit region which is specified by a mask of 0x00fffffe. | 911 | 24 bit region which is specified by a mask of 0x00fffffe. |
| 880 | |||
| 881 | |||
| 882 | /* Local Variables: */ | ||
| 883 | /* mode: text */ | ||
| 884 | /* End: */ | ||
diff --git a/Documentation/mic/index.rst b/Documentation/mic/index.rst index 082fa8f6a260..3a8d06367ef1 100644 --- a/Documentation/mic/index.rst +++ b/Documentation/mic/index.rst | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | |||
| 3 | ============================================= | 1 | ============================================= |
| 4 | Intel Many Integrated Core (MIC) architecture | 2 | Intel Many Integrated Core (MIC) architecture |
| 5 | ============================================= | 3 | ============================================= |
diff --git a/Documentation/netlabel/index.rst b/Documentation/netlabel/index.rst index 47f1e0e5acd1..984e1b191b12 100644 --- a/Documentation/netlabel/index.rst +++ b/Documentation/netlabel/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ======== | 3 | ======== |
| 4 | NetLabel | 4 | NetLabel |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 48c79e78817b..df33674799b5 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
| @@ -2287,7 +2287,7 @@ addr_scope_policy - INTEGER | |||
| 2287 | 2287 | ||
| 2288 | 2288 | ||
| 2289 | /proc/sys/net/core/* | 2289 | /proc/sys/net/core/* |
| 2290 | Please see: Documentation/sysctl/net.txt for descriptions of these entries. | 2290 | Please see: Documentation/admin-guide/sysctl/net.rst for descriptions of these entries. |
| 2291 | 2291 | ||
| 2292 | 2292 | ||
| 2293 | /proc/sys/net/unix/* | 2293 | /proc/sys/net/unix/* |
diff --git a/Documentation/pcmcia/index.rst b/Documentation/pcmcia/index.rst index 779c8527109e..7ae1f62fca14 100644 --- a/Documentation/pcmcia/index.rst +++ b/Documentation/pcmcia/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ====== | 3 | ====== |
| 4 | pcmcia | 4 | pcmcia |
diff --git a/Documentation/pi-futex.txt b/Documentation/pi-futex.txt index b154f6c0c36e..c33ba2befbf8 100644 --- a/Documentation/pi-futex.txt +++ b/Documentation/pi-futex.txt | |||
| @@ -119,4 +119,4 @@ properties of futexes, and all four combinations are possible: futex, | |||
| 119 | robust-futex, PI-futex, robust+PI-futex. | 119 | robust-futex, PI-futex, robust+PI-futex. |
| 120 | 120 | ||
| 121 | More details about priority inheritance can be found in | 121 | More details about priority inheritance can be found in |
| 122 | Documentation/locking/rt-mutex.txt. | 122 | Documentation/locking/rt-mutex.rst. |
diff --git a/Documentation/powerpc/firmware-assisted-dump.txt b/Documentation/powerpc/firmware-assisted-dump.txt index 0c41d6d463f3..10e7f4d16c14 100644 --- a/Documentation/powerpc/firmware-assisted-dump.txt +++ b/Documentation/powerpc/firmware-assisted-dump.txt | |||
| @@ -59,7 +59,7 @@ as follows: | |||
| 59 | the default calculated size. Use this option if default | 59 | the default calculated size. Use this option if default |
| 60 | boot memory size is not sufficient for second kernel to | 60 | boot memory size is not sufficient for second kernel to |
| 61 | boot successfully. For syntax of crashkernel= parameter, | 61 | boot successfully. For syntax of crashkernel= parameter, |
| 62 | refer to Documentation/kdump/kdump.rst. If any offset is | 62 | refer to Documentation/admin-guide/kdump/kdump.rst. If any offset is |
| 63 | provided in crashkernel= parameter, it will be ignored | 63 | provided in crashkernel= parameter, it will be ignored |
| 64 | as fadump uses a predefined offset to reserve memory | 64 | as fadump uses a predefined offset to reserve memory |
| 65 | for boot memory dump preservation in case of a crash. | 65 | for boot memory dump preservation in case of a crash. |
diff --git a/Documentation/process/submit-checklist.rst b/Documentation/process/submit-checklist.rst index 365efc9e4aa8..8e56337d422d 100644 --- a/Documentation/process/submit-checklist.rst +++ b/Documentation/process/submit-checklist.rst | |||
| @@ -107,7 +107,7 @@ and elsewhere regarding submitting Linux kernel patches. | |||
| 107 | and why. | 107 | and why. |
| 108 | 108 | ||
| 109 | 26) If any ioctl's are added by the patch, then also update | 109 | 26) If any ioctl's are added by the patch, then also update |
| 110 | ``Documentation/ioctl/ioctl-number.txt``. | 110 | ``Documentation/ioctl/ioctl-number.rst``. |
| 111 | 111 | ||
| 112 | 27) If your modified source code depends on or uses any of the kernel | 112 | 27) If your modified source code depends on or uses any of the kernel |
| 113 | APIs or features that are related to the following ``Kconfig`` symbols, | 113 | APIs or features that are related to the following ``Kconfig`` symbols, |
diff --git a/Documentation/pti/pti_intel_mid.txt b/Documentation/pti/pti_intel_mid.txt deleted file mode 100644 index e7a5b6d1f7a9..000000000000 --- a/Documentation/pti/pti_intel_mid.txt +++ /dev/null | |||
| @@ -1,99 +0,0 @@ | |||
| 1 | The Intel MID PTI project is HW implemented in Intel Atom | ||
| 2 | system-on-a-chip designs based on the Parallel Trace | ||
| 3 | Interface for MIPI P1149.7 cJTAG standard. The kernel solution | ||
| 4 | for this platform involves the following files: | ||
| 5 | |||
| 6 | ./include/linux/pti.h | ||
| 7 | ./drivers/.../n_tracesink.h | ||
| 8 | ./drivers/.../n_tracerouter.c | ||
| 9 | ./drivers/.../n_tracesink.c | ||
| 10 | ./drivers/.../pti.c | ||
| 11 | |||
| 12 | pti.c is the driver that enables various debugging features | ||
| 13 | popular on platforms from certain mobile manufacturers. | ||
| 14 | n_tracerouter.c and n_tracesink.c allow extra system information to | ||
| 15 | be collected and routed to the pti driver, such as trace | ||
| 16 | debugging data from a modem. Although n_tracerouter | ||
| 17 | and n_tracesink are a part of the complete PTI solution, | ||
| 18 | these two line disciplines can work separately from | ||
| 19 | pti.c and route any data stream from one /dev/tty node | ||
| 20 | to another /dev/tty node via kernel-space. This provides | ||
| 21 | a stable, reliable connection that will not break unless | ||
| 22 | the user-space application shuts down (plus avoids | ||
| 23 | kernel->user->kernel context switch overheads of routing | ||
| 24 | data). | ||
| 25 | |||
| 26 | An example debugging usage for this driver system: | ||
| 27 | *Hook /dev/ttyPTI0 to syslogd. Opening this port will also start | ||
| 28 | a console device to further capture debugging messages to PTI. | ||
| 29 | *Hook /dev/ttyPTI1 to modem debugging data to write to PTI HW. | ||
| 30 | This is where n_tracerouter and n_tracesink are used. | ||
| 31 | *Hook /dev/pti to a user-level debugging application for writing | ||
| 32 | to PTI HW. | ||
| 33 | *Use mipi_* Kernel Driver API in other device drivers for | ||
| 34 | debugging to PTI by first requesting a PTI write address via | ||
| 35 | mipi_request_masterchannel(1). | ||
| 36 | |||
| 37 | Below is example pseudo-code on how a 'privileged' application | ||
| 38 | can hook up n_tracerouter and n_tracesink to any tty on | ||
| 39 | a system. 'Privileged' means the application has enough | ||
| 40 | privileges to successfully manipulate the ldisc drivers | ||
| 41 | but is not just blindly executing as 'root'. Keep in mind | ||
| 42 | the use of ioctl(,TIOCSETD,) is not specific to the n_tracerouter | ||
| 43 | and n_tracesink line discpline drivers but is a generic | ||
| 44 | operation for a program to use a line discpline driver | ||
| 45 | on a tty port other than the default n_tty. | ||
| 46 | |||
| 47 | /////////// To hook up n_tracerouter and n_tracesink ///////// | ||
| 48 | |||
| 49 | // Note that n_tracerouter depends on n_tracesink. | ||
| 50 | #include <errno.h> | ||
| 51 | #define ONE_TTY "/dev/ttyOne" | ||
| 52 | #define TWO_TTY "/dev/ttyTwo" | ||
| 53 | |||
| 54 | // needed global to hand onto ldisc connection | ||
| 55 | static int g_fd_source = -1; | ||
| 56 | static int g_fd_sink = -1; | ||
| 57 | |||
| 58 | // these two vars used to grab LDISC values from loaded ldisc drivers | ||
| 59 | // in OS. Look at /proc/tty/ldiscs to get the right numbers from | ||
| 60 | // the ldiscs loaded in the system. | ||
| 61 | int source_ldisc_num, sink_ldisc_num = -1; | ||
| 62 | int retval; | ||
| 63 | |||
| 64 | g_fd_source = open(ONE_TTY, O_RDWR); // must be R/W | ||
| 65 | g_fd_sink = open(TWO_TTY, O_RDWR); // must be R/W | ||
| 66 | |||
| 67 | if (g_fd_source <= 0) || (g_fd_sink <= 0) { | ||
| 68 | // doubt you'll want to use these exact error lines of code | ||
| 69 | printf("Error on open(). errno: %d\n",errno); | ||
| 70 | return errno; | ||
| 71 | } | ||
| 72 | |||
| 73 | retval = ioctl(g_fd_sink, TIOCSETD, &sink_ldisc_num); | ||
| 74 | if (retval < 0) { | ||
| 75 | printf("Error on ioctl(). errno: %d\n", errno); | ||
| 76 | return errno; | ||
| 77 | } | ||
| 78 | |||
| 79 | retval = ioctl(g_fd_source, TIOCSETD, &source_ldisc_num); | ||
| 80 | if (retval < 0) { | ||
| 81 | printf("Error on ioctl(). errno: %d\n", errno); | ||
| 82 | return errno; | ||
| 83 | } | ||
| 84 | |||
| 85 | /////////// To disconnect n_tracerouter and n_tracesink //////// | ||
| 86 | |||
| 87 | // First make sure data through the ldiscs has stopped. | ||
| 88 | |||
| 89 | // Second, disconnect ldiscs. This provides a | ||
| 90 | // little cleaner shutdown on tty stack. | ||
| 91 | sink_ldisc_num = 0; | ||
| 92 | source_ldisc_num = 0; | ||
| 93 | ioctl(g_fd_uart, TIOCSETD, &sink_ldisc_num); | ||
| 94 | ioctl(g_fd_gadget, TIOCSETD, &source_ldisc_num); | ||
| 95 | |||
| 96 | // Three, program closes connection, and cleanup: | ||
| 97 | close(g_fd_uart); | ||
| 98 | close(g_fd_gadget); | ||
| 99 | g_fd_uart = g_fd_gadget = NULL; | ||
diff --git a/Documentation/rbtree.txt b/Documentation/rbtree.txt index c42a21b99046..523d54b60087 100644 --- a/Documentation/rbtree.txt +++ b/Documentation/rbtree.txt | |||
| @@ -204,21 +204,21 @@ potentially expensive tree iterations. This is done at negligible runtime | |||
| 204 | overhead for maintanence; albeit larger memory footprint. | 204 | overhead for maintanence; albeit larger memory footprint. |
| 205 | 205 | ||
| 206 | Similar to the rb_root structure, cached rbtrees are initialized to be | 206 | Similar to the rb_root structure, cached rbtrees are initialized to be |
| 207 | empty via: | 207 | empty via:: |
| 208 | 208 | ||
| 209 | struct rb_root_cached mytree = RB_ROOT_CACHED; | 209 | struct rb_root_cached mytree = RB_ROOT_CACHED; |
| 210 | 210 | ||
| 211 | Cached rbtree is simply a regular rb_root with an extra pointer to cache the | 211 | Cached rbtree is simply a regular rb_root with an extra pointer to cache the |
| 212 | leftmost node. This allows rb_root_cached to exist wherever rb_root does, | 212 | leftmost node. This allows rb_root_cached to exist wherever rb_root does, |
| 213 | which permits augmented trees to be supported as well as only a few extra | 213 | which permits augmented trees to be supported as well as only a few extra |
| 214 | interfaces: | 214 | interfaces:: |
| 215 | 215 | ||
| 216 | struct rb_node *rb_first_cached(struct rb_root_cached *tree); | 216 | struct rb_node *rb_first_cached(struct rb_root_cached *tree); |
| 217 | void rb_insert_color_cached(struct rb_node *, struct rb_root_cached *, bool); | 217 | void rb_insert_color_cached(struct rb_node *, struct rb_root_cached *, bool); |
| 218 | void rb_erase_cached(struct rb_node *node, struct rb_root_cached *); | 218 | void rb_erase_cached(struct rb_node *node, struct rb_root_cached *); |
| 219 | 219 | ||
| 220 | Both insert and erase calls have their respective counterpart of augmented | 220 | Both insert and erase calls have their respective counterpart of augmented |
| 221 | trees: | 221 | trees:: |
| 222 | 222 | ||
| 223 | void rb_insert_augmented_cached(struct rb_node *node, struct rb_root_cached *, | 223 | void rb_insert_augmented_cached(struct rb_node *node, struct rb_root_cached *, |
| 224 | bool, struct rb_augment_callbacks *); | 224 | bool, struct rb_augment_callbacks *); |
diff --git a/Documentation/riscv/index.rst b/Documentation/riscv/index.rst index c4b906d9b5a7..e3ca0922a8c2 100644 --- a/Documentation/riscv/index.rst +++ b/Documentation/riscv/index.rst | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | |||
| 3 | =================== | 1 | =================== |
| 4 | RISC-V architecture | 2 | RISC-V architecture |
| 5 | =================== | 3 | =================== |
diff --git a/Documentation/s390/debugging390.rst b/Documentation/s390/debugging390.rst index d49305fd5e1a..73ad0b06c666 100644 --- a/Documentation/s390/debugging390.rst +++ b/Documentation/s390/debugging390.rst | |||
| @@ -170,7 +170,7 @@ currently running at. | |||
| 170 | | +----------------+-------------------------------------------------+ | 170 | | +----------------+-------------------------------------------------+ |
| 171 | | | 32 | Basic Addressing Mode | | 171 | | | 32 | Basic Addressing Mode | |
| 172 | | | | | | 172 | | | | | |
| 173 | | | | Used to set addressing mode | | 173 | | | | Used to set addressing mode:: | |
| 174 | | | | | | 174 | | | | | |
| 175 | | | | +---------+----------+----------+ | | 175 | | | | +---------+----------+----------+ | |
| 176 | | | | | PSW 31 | PSW 32 | | | | 176 | | | | | PSW 31 | PSW 32 | | | |
diff --git a/Documentation/s390/index.rst b/Documentation/s390/index.rst index 1a914da2a07b..4602312909d3 100644 --- a/Documentation/s390/index.rst +++ b/Documentation/s390/index.rst | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | |||
| 3 | ================= | 1 | ================= |
| 4 | s390 Architecture | 2 | s390 Architecture |
| 5 | ================= | 3 | ================= |
diff --git a/Documentation/s390/vfio-ccw.rst b/Documentation/s390/vfio-ccw.rst index 1f6d0b56d53e..1e210c6afa88 100644 --- a/Documentation/s390/vfio-ccw.rst +++ b/Documentation/s390/vfio-ccw.rst | |||
| @@ -38,7 +38,7 @@ every detail. More information/reference could be found here: | |||
| 38 | qemu/hw/s390x/css.c | 38 | qemu/hw/s390x/css.c |
| 39 | 39 | ||
| 40 | For vfio mediated device framework: | 40 | For vfio mediated device framework: |
| 41 | - Documentation/vfio-mediated-device.txt | 41 | - Documentation/driver-api/vfio-mediated-device.rst |
| 42 | 42 | ||
| 43 | Motivation of vfio-ccw | 43 | Motivation of vfio-ccw |
| 44 | ---------------------- | 44 | ---------------------- |
| @@ -322,5 +322,5 @@ Reference | |||
| 322 | 2. ESA/390 Common I/O Device Commands manual (IBM Form. No. SA22-7204) | 322 | 2. ESA/390 Common I/O Device Commands manual (IBM Form. No. SA22-7204) |
| 323 | 3. https://en.wikipedia.org/wiki/Channel_I/O | 323 | 3. https://en.wikipedia.org/wiki/Channel_I/O |
| 324 | 4. Documentation/s390/cds.rst | 324 | 4. Documentation/s390/cds.rst |
| 325 | 5. Documentation/vfio.txt | 325 | 5. Documentation/driver-api/vfio.rst |
| 326 | 6. Documentation/vfio-mediated-device.txt | 326 | 6. Documentation/driver-api/vfio-mediated-device.rst |
diff --git a/Documentation/scheduler/index.rst b/Documentation/scheduler/index.rst index 058be77a4c34..69074e5de9c4 100644 --- a/Documentation/scheduler/index.rst +++ b/Documentation/scheduler/index.rst | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | |||
| 3 | =============== | 1 | =============== |
| 4 | Linux Scheduler | 2 | Linux Scheduler |
| 5 | =============== | 3 | =============== |
diff --git a/Documentation/scheduler/sched-deadline.rst b/Documentation/scheduler/sched-deadline.rst index 3391e86d810c..14a2f7bf63fe 100644 --- a/Documentation/scheduler/sched-deadline.rst +++ b/Documentation/scheduler/sched-deadline.rst | |||
| @@ -669,7 +669,7 @@ Deadline Task Scheduling | |||
| 669 | 669 | ||
| 670 | -deadline tasks cannot have an affinity mask smaller that the entire | 670 | -deadline tasks cannot have an affinity mask smaller that the entire |
| 671 | root_domain they are created on. However, affinities can be specified | 671 | root_domain they are created on. However, affinities can be specified |
| 672 | through the cpuset facility (Documentation/cgroup-v1/cpusets.rst). | 672 | through the cpuset facility (Documentation/admin-guide/cgroup-v1/cpusets.rst). |
| 673 | 673 | ||
| 674 | 5.1 SCHED_DEADLINE and cpusets HOWTO | 674 | 5.1 SCHED_DEADLINE and cpusets HOWTO |
| 675 | ------------------------------------ | 675 | ------------------------------------ |
diff --git a/Documentation/scheduler/sched-design-CFS.rst b/Documentation/scheduler/sched-design-CFS.rst index 53b30d1967cf..a96c72651877 100644 --- a/Documentation/scheduler/sched-design-CFS.rst +++ b/Documentation/scheduler/sched-design-CFS.rst | |||
| @@ -222,7 +222,7 @@ SCHED_BATCH) tasks. | |||
| 222 | 222 | ||
| 223 | These options need CONFIG_CGROUPS to be defined, and let the administrator | 223 | These options need CONFIG_CGROUPS to be defined, and let the administrator |
| 224 | create arbitrary groups of tasks, using the "cgroup" pseudo filesystem. See | 224 | create arbitrary groups of tasks, using the "cgroup" pseudo filesystem. See |
| 225 | Documentation/cgroup-v1/cgroups.rst for more information about this filesystem. | 225 | Documentation/admin-guide/cgroup-v1/cgroups.rst for more information about this filesystem. |
| 226 | 226 | ||
| 227 | When CONFIG_FAIR_GROUP_SCHED is defined, a "cpu.shares" file is created for each | 227 | When CONFIG_FAIR_GROUP_SCHED is defined, a "cpu.shares" file is created for each |
| 228 | group created using the pseudo filesystem. See example steps below to create | 228 | group created using the pseudo filesystem. See example steps below to create |
diff --git a/Documentation/scheduler/sched-rt-group.rst b/Documentation/scheduler/sched-rt-group.rst index d27d3f3712fd..655a096ec8fb 100644 --- a/Documentation/scheduler/sched-rt-group.rst +++ b/Documentation/scheduler/sched-rt-group.rst | |||
| @@ -133,7 +133,7 @@ This uses the cgroup virtual file system and "<cgroup>/cpu.rt_runtime_us" | |||
| 133 | to control the CPU time reserved for each control group. | 133 | to control the CPU time reserved for each control group. |
| 134 | 134 | ||
| 135 | For more information on working with control groups, you should read | 135 | For more information on working with control groups, you should read |
| 136 | Documentation/cgroup-v1/cgroups.rst as well. | 136 | Documentation/admin-guide/cgroup-v1/cgroups.rst as well. |
| 137 | 137 | ||
| 138 | Group settings are checked against the following limits in order to keep the | 138 | Group settings are checked against the following limits in order to keep the |
| 139 | configuration schedulable: | 139 | configuration schedulable: |
diff --git a/Documentation/security/index.rst b/Documentation/security/index.rst index aad6d92ffe31..fc503dd689a7 100644 --- a/Documentation/security/index.rst +++ b/Documentation/security/index.rst | |||
| @@ -8,7 +8,10 @@ Security Documentation | |||
| 8 | credentials | 8 | credentials |
| 9 | IMA-templates | 9 | IMA-templates |
| 10 | keys/index | 10 | keys/index |
| 11 | LSM | 11 | lsm |
| 12 | lsm-development | ||
| 13 | sak | ||
| 12 | SCTP | 14 | SCTP |
| 13 | self-protection | 15 | self-protection |
| 16 | siphash | ||
| 14 | tpm/index | 17 | tpm/index |
diff --git a/Documentation/security/LSM.rst b/Documentation/security/lsm-development.rst index 31d92bc5fdd2..31d92bc5fdd2 100644 --- a/Documentation/security/LSM.rst +++ b/Documentation/security/lsm-development.rst | |||
diff --git a/Documentation/lsm.txt b/Documentation/security/lsm.rst index ad4dfd020e0d..ad4dfd020e0d 100644 --- a/Documentation/lsm.txt +++ b/Documentation/security/lsm.rst | |||
diff --git a/Documentation/SAK.txt b/Documentation/security/sak.rst index 260e1d3687bd..260e1d3687bd 100644 --- a/Documentation/SAK.txt +++ b/Documentation/security/sak.rst | |||
diff --git a/Documentation/siphash.txt b/Documentation/security/siphash.rst index 9965821ab333..9965821ab333 100644 --- a/Documentation/siphash.txt +++ b/Documentation/security/siphash.rst | |||
diff --git a/Documentation/security/tpm/index.rst b/Documentation/security/tpm/index.rst index af77a7bbb070..3296533e54cf 100644 --- a/Documentation/security/tpm/index.rst +++ b/Documentation/security/tpm/index.rst | |||
| @@ -5,3 +5,4 @@ Trusted Platform Module documentation | |||
| 5 | .. toctree:: | 5 | .. toctree:: |
| 6 | 6 | ||
| 7 | tpm_vtpm_proxy | 7 | tpm_vtpm_proxy |
| 8 | xen-tpmfront | ||
diff --git a/Documentation/security/tpm/xen-tpmfront.txt b/Documentation/security/tpm/xen-tpmfront.rst index 69346de87ff3..00d5b1db227d 100644 --- a/Documentation/security/tpm/xen-tpmfront.txt +++ b/Documentation/security/tpm/xen-tpmfront.rst | |||
| @@ -1,4 +1,6 @@ | |||
| 1 | ============================= | ||
| 1 | Virtual TPM interface for Xen | 2 | Virtual TPM interface for Xen |
| 3 | ============================= | ||
| 2 | 4 | ||
| 3 | Authors: Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA) | 5 | Authors: Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA) |
| 4 | 6 | ||
| @@ -6,7 +8,8 @@ This document describes the virtual Trusted Platform Module (vTPM) subsystem for | |||
| 6 | Xen. The reader is assumed to have familiarity with building and installing Xen, | 8 | Xen. The reader is assumed to have familiarity with building and installing Xen, |
| 7 | Linux, and a basic understanding of the TPM and vTPM concepts. | 9 | Linux, and a basic understanding of the TPM and vTPM concepts. |
| 8 | 10 | ||
| 9 | INTRODUCTION | 11 | Introduction |
| 12 | ------------ | ||
| 10 | 13 | ||
| 11 | The goal of this work is to provide a TPM functionality to a virtual guest | 14 | The goal of this work is to provide a TPM functionality to a virtual guest |
| 12 | operating system (in Xen terms, a DomU). This allows programs to interact with | 15 | operating system (in Xen terms, a DomU). This allows programs to interact with |
| @@ -24,81 +27,89 @@ This mini-os vTPM subsystem was built on top of the previous vTPM work done by | |||
| 24 | IBM and Intel corporation. | 27 | IBM and Intel corporation. |
| 25 | 28 | ||
| 26 | 29 | ||
| 27 | DESIGN OVERVIEW | 30 | Design Overview |
| 28 | --------------- | 31 | --------------- |
| 29 | 32 | ||
| 30 | The architecture of vTPM is described below: | 33 | The architecture of vTPM is described below:: |
| 31 | 34 | ||
| 32 | +------------------+ | 35 | +------------------+ |
| 33 | | Linux DomU | ... | 36 | | Linux DomU | ... |
| 34 | | | ^ | | 37 | | | ^ | |
| 35 | | v | | | 38 | | v | | |
| 36 | | xen-tpmfront | | 39 | | xen-tpmfront | |
| 37 | +------------------+ | 40 | +------------------+ |
| 38 | | ^ | 41 | | ^ |
| 39 | v | | 42 | v | |
| 40 | +------------------+ | 43 | +------------------+ |
| 41 | | mini-os/tpmback | | 44 | | mini-os/tpmback | |
| 42 | | | ^ | | 45 | | | ^ | |
| 43 | | v | | | 46 | | v | | |
| 44 | | vtpm-stubdom | ... | 47 | | vtpm-stubdom | ... |
| 45 | | | ^ | | 48 | | | ^ | |
| 46 | | v | | | 49 | | v | | |
| 47 | | mini-os/tpmfront | | 50 | | mini-os/tpmfront | |
| 48 | +------------------+ | 51 | +------------------+ |
| 49 | | ^ | 52 | | ^ |
| 50 | v | | 53 | v | |
| 51 | +------------------+ | 54 | +------------------+ |
| 52 | | mini-os/tpmback | | 55 | | mini-os/tpmback | |
| 53 | | | ^ | | 56 | | | ^ | |
| 54 | | v | | | 57 | | v | | |
| 55 | | vtpmmgr-stubdom | | 58 | | vtpmmgr-stubdom | |
| 56 | | | ^ | | 59 | | | ^ | |
| 57 | | v | | | 60 | | v | | |
| 58 | | mini-os/tpm_tis | | 61 | | mini-os/tpm_tis | |
| 59 | +------------------+ | 62 | +------------------+ |
| 60 | | ^ | 63 | | ^ |
| 61 | v | | 64 | v | |
| 62 | +------------------+ | 65 | +------------------+ |
| 63 | | Hardware TPM | | 66 | | Hardware TPM | |
| 64 | +------------------+ | 67 | +------------------+ |
| 65 | 68 | ||
| 66 | * Linux DomU: The Linux based guest that wants to use a vTPM. There may be | 69 | * Linux DomU: |
| 70 | The Linux based guest that wants to use a vTPM. There may be | ||
| 67 | more than one of these. | 71 | more than one of these. |
| 68 | 72 | ||
| 69 | * xen-tpmfront.ko: Linux kernel virtual TPM frontend driver. This driver | 73 | * xen-tpmfront.ko: |
| 74 | Linux kernel virtual TPM frontend driver. This driver | ||
| 70 | provides vTPM access to a Linux-based DomU. | 75 | provides vTPM access to a Linux-based DomU. |
| 71 | 76 | ||
| 72 | * mini-os/tpmback: Mini-os TPM backend driver. The Linux frontend driver | 77 | * mini-os/tpmback: |
| 78 | Mini-os TPM backend driver. The Linux frontend driver | ||
| 73 | connects to this backend driver to facilitate communications | 79 | connects to this backend driver to facilitate communications |
| 74 | between the Linux DomU and its vTPM. This driver is also | 80 | between the Linux DomU and its vTPM. This driver is also |
| 75 | used by vtpmmgr-stubdom to communicate with vtpm-stubdom. | 81 | used by vtpmmgr-stubdom to communicate with vtpm-stubdom. |
| 76 | 82 | ||
| 77 | * vtpm-stubdom: A mini-os stub domain that implements a vTPM. There is a | 83 | * vtpm-stubdom: |
| 84 | A mini-os stub domain that implements a vTPM. There is a | ||
| 78 | one to one mapping between running vtpm-stubdom instances and | 85 | one to one mapping between running vtpm-stubdom instances and |
| 79 | logical vtpms on the system. The vTPM Platform Configuration | 86 | logical vtpms on the system. The vTPM Platform Configuration |
| 80 | Registers (PCRs) are normally all initialized to zero. | 87 | Registers (PCRs) are normally all initialized to zero. |
| 81 | 88 | ||
| 82 | * mini-os/tpmfront: Mini-os TPM frontend driver. The vTPM mini-os domain | 89 | * mini-os/tpmfront: |
| 90 | Mini-os TPM frontend driver. The vTPM mini-os domain | ||
| 83 | vtpm-stubdom uses this driver to communicate with | 91 | vtpm-stubdom uses this driver to communicate with |
| 84 | vtpmmgr-stubdom. This driver is also used in mini-os | 92 | vtpmmgr-stubdom. This driver is also used in mini-os |
| 85 | domains such as pv-grub that talk to the vTPM domain. | 93 | domains such as pv-grub that talk to the vTPM domain. |
| 86 | 94 | ||
| 87 | * vtpmmgr-stubdom: A mini-os domain that implements the vTPM manager. There is | 95 | * vtpmmgr-stubdom: |
| 96 | A mini-os domain that implements the vTPM manager. There is | ||
| 88 | only one vTPM manager and it should be running during the | 97 | only one vTPM manager and it should be running during the |
| 89 | entire lifetime of the machine. This domain regulates | 98 | entire lifetime of the machine. This domain regulates |
| 90 | access to the physical TPM on the system and secures the | 99 | access to the physical TPM on the system and secures the |
| 91 | persistent state of each vTPM. | 100 | persistent state of each vTPM. |
| 92 | 101 | ||
| 93 | * mini-os/tpm_tis: Mini-os TPM version 1.2 TPM Interface Specification (TIS) | 102 | * mini-os/tpm_tis: |
| 103 | Mini-os TPM version 1.2 TPM Interface Specification (TIS) | ||
| 94 | driver. This driver used by vtpmmgr-stubdom to talk directly to | 104 | driver. This driver used by vtpmmgr-stubdom to talk directly to |
| 95 | the hardware TPM. Communication is facilitated by mapping | 105 | the hardware TPM. Communication is facilitated by mapping |
| 96 | hardware memory pages into vtpmmgr-stubdom. | 106 | hardware memory pages into vtpmmgr-stubdom. |
| 97 | 107 | ||
| 98 | * Hardware TPM: The physical TPM that is soldered onto the motherboard. | 108 | * Hardware TPM: |
| 109 | The physical TPM that is soldered onto the motherboard. | ||
| 99 | 110 | ||
| 100 | 111 | ||
| 101 | INTEGRATION WITH XEN | 112 | Integration With Xen |
| 102 | -------------------- | 113 | -------------------- |
| 103 | 114 | ||
| 104 | Support for the vTPM driver was added in Xen using the libxl toolstack in Xen | 115 | Support for the vTPM driver was added in Xen using the libxl toolstack in Xen |
diff --git a/Documentation/sparc/index.rst b/Documentation/sparc/index.rst index 91f7d6643dd5..71cff621f243 100644 --- a/Documentation/sparc/index.rst +++ b/Documentation/sparc/index.rst | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | |||
| 3 | ================== | 1 | ================== |
| 4 | Sparc Architecture | 2 | Sparc Architecture |
| 5 | ================== | 3 | ================== |
diff --git a/Documentation/sysctl/abi.txt b/Documentation/sysctl/abi.txt deleted file mode 100644 index 63f4ebcf652c..000000000000 --- a/Documentation/sysctl/abi.txt +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | Documentation for /proc/sys/abi/* kernel version 2.6.0.test2 | ||
| 2 | (c) 2003, Fabian Frederick <ffrederick@users.sourceforge.net> | ||
| 3 | |||
| 4 | For general info : README. | ||
| 5 | |||
| 6 | ============================================================== | ||
| 7 | |||
| 8 | This path is binary emulation relevant aka personality types aka abi. | ||
| 9 | When a process is executed, it's linked to an exec_domain whose | ||
| 10 | personality is defined using values available from /proc/sys/abi. | ||
| 11 | You can find further details about abi in include/linux/personality.h. | ||
| 12 | |||
| 13 | Here are the files featuring in 2.6 kernel : | ||
| 14 | |||
| 15 | - defhandler_coff | ||
| 16 | - defhandler_elf | ||
| 17 | - defhandler_lcall7 | ||
| 18 | - defhandler_libcso | ||
| 19 | - fake_utsname | ||
| 20 | - trace | ||
| 21 | |||
| 22 | =========================================================== | ||
| 23 | defhandler_coff: | ||
| 24 | defined value : | ||
| 25 | PER_SCOSVR3 | ||
| 26 | 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS | SHORT_INODE | ||
| 27 | |||
| 28 | =========================================================== | ||
| 29 | defhandler_elf: | ||
| 30 | defined value : | ||
| 31 | PER_LINUX | ||
| 32 | 0 | ||
| 33 | |||
| 34 | =========================================================== | ||
| 35 | defhandler_lcall7: | ||
| 36 | defined value : | ||
| 37 | PER_SVR4 | ||
| 38 | 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, | ||
| 39 | |||
| 40 | =========================================================== | ||
| 41 | defhandler_libsco: | ||
| 42 | defined value: | ||
| 43 | PER_SVR4 | ||
| 44 | 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, | ||
| 45 | |||
| 46 | =========================================================== | ||
| 47 | fake_utsname: | ||
| 48 | Unused | ||
| 49 | |||
| 50 | =========================================================== | ||
| 51 | trace: | ||
| 52 | Unused | ||
| 53 | |||
| 54 | =========================================================== | ||
diff --git a/Documentation/target/index.rst b/Documentation/target/index.rst index b68f48982392..4b24f81f747e 100644 --- a/Documentation/target/index.rst +++ b/Documentation/target/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ================== | 3 | ================== |
| 4 | TCM Virtual Device | 4 | TCM Virtual Device |
diff --git a/Documentation/timers/index.rst b/Documentation/timers/index.rst index 91f6f8263c48..df510ad0c989 100644 --- a/Documentation/timers/index.rst +++ b/Documentation/timers/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ====== | 3 | ====== |
| 4 | timers | 4 | timers |
diff --git a/Documentation/translations/it_IT/kernel-hacking/locking.rst b/Documentation/translations/it_IT/kernel-hacking/locking.rst index 5fd8a1abd2be..b9a6be4b8499 100644 --- a/Documentation/translations/it_IT/kernel-hacking/locking.rst +++ b/Documentation/translations/it_IT/kernel-hacking/locking.rst | |||
| @@ -1404,7 +1404,7 @@ Riferimento per l'API dei Futex | |||
| 1404 | Approfondimenti | 1404 | Approfondimenti |
| 1405 | =============== | 1405 | =============== |
| 1406 | 1406 | ||
| 1407 | - ``Documentation/locking/spinlocks.txt``: la guida di Linus Torvalds agli | 1407 | - ``Documentation/locking/spinlocks.rst``: la guida di Linus Torvalds agli |
| 1408 | spinlock del kernel. | 1408 | spinlock del kernel. |
| 1409 | 1409 | ||
| 1410 | - Unix Systems for Modern Architectures: Symmetric Multiprocessing and | 1410 | - Unix Systems for Modern Architectures: Symmetric Multiprocessing and |
diff --git a/Documentation/translations/it_IT/process/submit-checklist.rst b/Documentation/translations/it_IT/process/submit-checklist.rst index ea74cae958d7..995ee69fab11 100644 --- a/Documentation/translations/it_IT/process/submit-checklist.rst +++ b/Documentation/translations/it_IT/process/submit-checklist.rst | |||
| @@ -117,7 +117,7 @@ sottomissione delle patch, in particolare | |||
| 117 | sorgenti che ne spieghi la logica: cosa fanno e perché. | 117 | sorgenti che ne spieghi la logica: cosa fanno e perché. |
| 118 | 118 | ||
| 119 | 25) Se la patch aggiunge nuove chiamate ioctl, allora aggiornate | 119 | 25) Se la patch aggiunge nuove chiamate ioctl, allora aggiornate |
| 120 | ``Documentation/ioctl/ioctl-number.txt``. | 120 | ``Documentation/ioctl/ioctl-number.rst``. |
| 121 | 121 | ||
| 122 | 26) Se il codice che avete modificato dipende o usa una qualsiasi interfaccia o | 122 | 26) Se il codice che avete modificato dipende o usa una qualsiasi interfaccia o |
| 123 | funzionalità del kernel che è associata a uno dei seguenti simboli | 123 | funzionalità del kernel che è associata a uno dei seguenti simboli |
diff --git a/Documentation/translations/zh_CN/arm/Booting b/Documentation/translations/zh_CN/arm/Booting index 1fe866f8218f..562e9a2957e6 100644 --- a/Documentation/translations/zh_CN/arm/Booting +++ b/Documentation/translations/zh_CN/arm/Booting | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | Chinese translated version of Documentation/arm/Booting | 1 | Chinese translated version of Documentation/arm/booting.rst |
| 2 | 2 | ||
| 3 | If you have any comment or update to the content, please contact the | 3 | If you have any comment or update to the content, please contact the |
| 4 | original document maintainer directly. However, if you have a problem | 4 | original document maintainer directly. However, if you have a problem |
| @@ -9,7 +9,7 @@ or if there is a problem with the translation. | |||
| 9 | Maintainer: Russell King <linux@arm.linux.org.uk> | 9 | Maintainer: Russell King <linux@arm.linux.org.uk> |
| 10 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | 10 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> |
| 11 | --------------------------------------------------------------------- | 11 | --------------------------------------------------------------------- |
| 12 | Documentation/arm/Booting çš„ä¸æ–‡ç¿»è¯‘ | 12 | Documentation/arm/booting.rst çš„ä¸æ–‡ç¿»è¯‘ |
| 13 | 13 | ||
| 14 | 如果想评论或更新本文的内容,请直接è”ç³»åŽŸæ–‡æ¡£çš„ç»´æŠ¤è€…ã€‚å¦‚æžœä½ ä½¿ç”¨è‹±æ–‡ | 14 | 如果想评论或更新本文的内容,请直接è”ç³»åŽŸæ–‡æ¡£çš„ç»´æŠ¤è€…ã€‚å¦‚æžœä½ ä½¿ç”¨è‹±æ–‡ |
| 15 | äº¤æµæœ‰å›°éš¾çš„è¯ï¼Œä¹Ÿå¯ä»¥å‘䏿–‡ç‰ˆç»´æŠ¤è€…求助。如果本翻译更新ä¸åŠæ—¶æˆ–者翻 | 15 | äº¤æµæœ‰å›°éš¾çš„è¯ï¼Œä¹Ÿå¯ä»¥å‘䏿–‡ç‰ˆç»´æŠ¤è€…求助。如果本翻译更新ä¸åŠæ—¶æˆ–者翻 |
diff --git a/Documentation/translations/zh_CN/arm/kernel_user_helpers.txt b/Documentation/translations/zh_CN/arm/kernel_user_helpers.txt index cd7fc8f34cf9..99af4363984d 100644 --- a/Documentation/translations/zh_CN/arm/kernel_user_helpers.txt +++ b/Documentation/translations/zh_CN/arm/kernel_user_helpers.txt | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | Chinese translated version of Documentation/arm/kernel_user_helpers.txt | 1 | Chinese translated version of Documentation/arm/kernel_user_helpers.rst |
| 2 | 2 | ||
| 3 | If you have any comment or update to the content, please contact the | 3 | If you have any comment or update to the content, please contact the |
| 4 | original document maintainer directly. However, if you have a problem | 4 | original document maintainer directly. However, if you have a problem |
| @@ -10,7 +10,7 @@ Maintainer: Nicolas Pitre <nicolas.pitre@linaro.org> | |||
| 10 | Dave Martin <dave.martin@linaro.org> | 10 | Dave Martin <dave.martin@linaro.org> |
| 11 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | 11 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> |
| 12 | --------------------------------------------------------------------- | 12 | --------------------------------------------------------------------- |
| 13 | Documentation/arm/kernel_user_helpers.txt çš„ä¸æ–‡ç¿»è¯‘ | 13 | Documentation/arm/kernel_user_helpers.rst çš„ä¸æ–‡ç¿»è¯‘ |
| 14 | 14 | ||
| 15 | 如果想评论或更新本文的内容,请直接è”ç³»åŽŸæ–‡æ¡£çš„ç»´æŠ¤è€…ã€‚å¦‚æžœä½ ä½¿ç”¨è‹±æ–‡ | 15 | 如果想评论或更新本文的内容,请直接è”ç³»åŽŸæ–‡æ¡£çš„ç»´æŠ¤è€…ã€‚å¦‚æžœä½ ä½¿ç”¨è‹±æ–‡ |
| 16 | äº¤æµæœ‰å›°éš¾çš„è¯ï¼Œä¹Ÿå¯ä»¥å‘䏿–‡ç‰ˆç»´æŠ¤è€…求助。如果本翻译更新ä¸åŠæ—¶æˆ–者翻 | 16 | äº¤æµæœ‰å›°éš¾çš„è¯ï¼Œä¹Ÿå¯ä»¥å‘䏿–‡ç‰ˆç»´æŠ¤è€…求助。如果本翻译更新ä¸åŠæ—¶æˆ–者翻 |
diff --git a/Documentation/translations/zh_CN/filesystems/sysfs.txt b/Documentation/translations/zh_CN/filesystems/sysfs.txt index 452271dda141..ee1f37da5b23 100644 --- a/Documentation/translations/zh_CN/filesystems/sysfs.txt +++ b/Documentation/translations/zh_CN/filesystems/sysfs.txt | |||
| @@ -288,7 +288,7 @@ dev/ 包å«ä¸¤ä¸ªå目录: char/ å’Œ block/。在这两个å目录ä¸ï¼Œæœ‰ä | |||
| 288 | ä¸ç›¸åº”的设备。/sys/dev æä¾›ä¸€ä¸ªé€šè¿‡ä¸€ä¸ª stat(2) æ“作结果,查找 | 288 | ä¸ç›¸åº”的设备。/sys/dev æä¾›ä¸€ä¸ªé€šè¿‡ä¸€ä¸ª stat(2) æ“作结果,查找 |
| 289 | 设备 sysfs 接å£å¿«æ·çš„æ–¹æ³•。 | 289 | 设备 sysfs 接å£å¿«æ·çš„æ–¹æ³•。 |
| 290 | 290 | ||
| 291 | 更多有关 driver-model 的特性信æ¯å¯ä»¥åœ¨ Documentation/driver-model/ | 291 | 更多有关 driver-model 的特性信æ¯å¯ä»¥åœ¨ Documentation/driver-api/driver-model/ |
| 292 | 䏿‰¾åˆ°ã€‚ | 292 | 䏿‰¾åˆ°ã€‚ |
| 293 | 293 | ||
| 294 | 294 | ||
diff --git a/Documentation/translations/zh_CN/gpio.txt b/Documentation/translations/zh_CN/gpio.txt index 4cb1ba8b8fed..a23ee14fc927 100644 --- a/Documentation/translations/zh_CN/gpio.txt +++ b/Documentation/translations/zh_CN/gpio.txt | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | Chinese translated version of Documentation/gpio | 1 | Chinese translated version of Documentation/admin-guide/gpio |
| 2 | 2 | ||
| 3 | If you have any comment or update to the content, please contact the | 3 | If you have any comment or update to the content, please contact the |
| 4 | original document maintainer directly. However, if you have a problem | 4 | original document maintainer directly. However, if you have a problem |
| @@ -10,7 +10,7 @@ Maintainer: Grant Likely <grant.likely@secretlab.ca> | |||
| 10 | Linus Walleij <linus.walleij@linaro.org> | 10 | Linus Walleij <linus.walleij@linaro.org> |
| 11 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> | 11 | Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> |
| 12 | --------------------------------------------------------------------- | 12 | --------------------------------------------------------------------- |
| 13 | Documentation/gpio çš„ä¸æ–‡ç¿»è¯‘ | 13 | Documentation/admin-guide/gpio çš„ä¸æ–‡ç¿»è¯‘ |
| 14 | 14 | ||
| 15 | 如果想评论或更新本文的内容,请直接è”ç³»åŽŸæ–‡æ¡£çš„ç»´æŠ¤è€…ã€‚å¦‚æžœä½ ä½¿ç”¨è‹±æ–‡ | 15 | 如果想评论或更新本文的内容,请直接è”ç³»åŽŸæ–‡æ¡£çš„ç»´æŠ¤è€…ã€‚å¦‚æžœä½ ä½¿ç”¨è‹±æ–‡ |
| 16 | äº¤æµæœ‰å›°éš¾çš„è¯ï¼Œä¹Ÿå¯ä»¥å‘䏿–‡ç‰ˆç»´æŠ¤è€…求助。如果本翻译更新ä¸åŠæ—¶æˆ–者翻 | 16 | äº¤æµæœ‰å›°éš¾çš„è¯ï¼Œä¹Ÿå¯ä»¥å‘䏿–‡ç‰ˆç»´æŠ¤è€…求助。如果本翻译更新ä¸åŠæ—¶æˆ–者翻 |
diff --git a/Documentation/translations/zh_CN/oops-tracing.txt b/Documentation/translations/zh_CN/oops-tracing.txt index 368ddd05b304..c5f3bda7abcb 100644 --- a/Documentation/translations/zh_CN/oops-tracing.txt +++ b/Documentation/translations/zh_CN/oops-tracing.txt | |||
| @@ -53,8 +53,8 @@ cat /proc/kmsg > file, ç„¶è€Œä½ å¿…é¡»ä»‹å…¥ä¸æ¢ä¼ 输, kmsgæ˜¯ä¸€ä¸ªâ€œæ° | |||
| 53 | (2)用串å£ç»ˆç«¯å¯åŠ¨ï¼ˆè¯·å‚看Documentation/admin-guide/serial-console.rst),è¿è¡Œä¸€ä¸ªnull | 53 | (2)用串å£ç»ˆç«¯å¯åŠ¨ï¼ˆè¯·å‚看Documentation/admin-guide/serial-console.rst),è¿è¡Œä¸€ä¸ªnull |
| 54 | modem到å¦ä¸€å°æœºå™¨å¹¶ç”¨ä½ 喜欢的通讯工具获å–输出。Minicom工作地很好。 | 54 | modem到å¦ä¸€å°æœºå™¨å¹¶ç”¨ä½ 喜欢的通讯工具获å–输出。Minicom工作地很好。 |
| 55 | 55 | ||
| 56 | (3)使用Kdump(请å‚看Documentation/kdump/kdump.rst), | 56 | (3)使用Kdump(请å‚看Documentation/admin-guide/kdump/kdump.rst), |
| 57 | 使用在Documentation/kdump/gdbmacros.txtä¸å®šä¹‰çš„dmesg gdbå®ï¼Œä»Žæ—§çš„内å˜ä¸æå–å†…æ ¸ | 57 | 使用在Documentation/admin-guide/kdump/gdbmacros.txtä¸å®šä¹‰çš„dmesg gdbå®ï¼Œä»Žæ—§çš„内å˜ä¸æå–å†…æ ¸ |
| 58 | 环形缓冲区。 | 58 | 环形缓冲区。 |
| 59 | 59 | ||
| 60 | å®Œæ•´ä¿¡æ¯ | 60 | å®Œæ•´ä¿¡æ¯ |
diff --git a/Documentation/translations/zh_CN/process/submit-checklist.rst b/Documentation/translations/zh_CN/process/submit-checklist.rst index f4785d2b0491..8738c55e42a2 100644 --- a/Documentation/translations/zh_CN/process/submit-checklist.rst +++ b/Documentation/translations/zh_CN/process/submit-checklist.rst | |||
| @@ -97,7 +97,7 @@ Linuxå†…æ ¸è¡¥ä¸æäº¤æ¸…å• | |||
| 97 | 24) 所有内å˜å±éšœä¾‹å¦‚ ``barrier()``, ``rmb()``, ``wmb()`` éƒ½éœ€è¦æºä»£ç ä¸çš„æ³¨ | 97 | 24) 所有内å˜å±éšœä¾‹å¦‚ ``barrier()``, ``rmb()``, ``wmb()`` éƒ½éœ€è¦æºä»£ç ä¸çš„æ³¨ |
| 98 | 释æ¥è§£é‡Šå®ƒä»¬æ£åœ¨æ‰§è¡Œçš„æ“ä½œåŠå…¶åŽŸå› çš„é€»è¾‘ã€‚ | 98 | 释æ¥è§£é‡Šå®ƒä»¬æ£åœ¨æ‰§è¡Œçš„æ“ä½œåŠå…¶åŽŸå› çš„é€»è¾‘ã€‚ |
| 99 | 99 | ||
| 100 | 25) å¦‚æžœè¡¥ä¸æ·»åŠ äº†ä»»ä½•ioctlï¼Œé‚£ä¹ˆä¹Ÿè¦æ›´æ–° ``Documentation/ioctl/ioctl-number.txt`` | 100 | 25) å¦‚æžœè¡¥ä¸æ·»åŠ äº†ä»»ä½•ioctlï¼Œé‚£ä¹ˆä¹Ÿè¦æ›´æ–° ``Documentation/ioctl/ioctl-number.rst`` |
| 101 | 101 | ||
| 102 | 26) 如果修改åŽçš„æºä»£ç ä¾èµ–或使用与以下 ``Kconfig`` 符å·ç›¸å…³çš„ä»»ä½•å†…æ ¸API或 | 102 | 26) 如果修改åŽçš„æºä»£ç ä¾èµ–或使用与以下 ``Kconfig`` 符å·ç›¸å…³çš„ä»»ä½•å†…æ ¸API或 |
| 103 | 功能,则在ç¦ç”¨ç›¸å…³ ``Kconfig`` 符å·å’Œ/或 ``=m`` (如果该选项å¯ç”¨ï¼‰çš„æƒ…况 | 103 | 功能,则在ç¦ç”¨ç›¸å…³ ``Kconfig`` 符å·å’Œ/或 ``=m`` (如果该选项å¯ç”¨ï¼‰çš„æƒ…况 |
diff --git a/Documentation/accelerators/ocxl.rst b/Documentation/userspace-api/accelerators/ocxl.rst index b1cea19a90f5..14cefc020e2d 100644 --- a/Documentation/accelerators/ocxl.rst +++ b/Documentation/userspace-api/accelerators/ocxl.rst | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | :orphan: | ||
| 2 | |||
| 3 | ======================================================== | 1 | ======================================================== |
| 4 | OpenCAPI (Open Coherent Accelerator Processor Interface) | 2 | OpenCAPI (Open Coherent Accelerator Processor Interface) |
| 5 | ======================================================== | 3 | ======================================================== |
diff --git a/Documentation/userspace-api/index.rst b/Documentation/userspace-api/index.rst index a3233da7fa88..ad494da40009 100644 --- a/Documentation/userspace-api/index.rst +++ b/Documentation/userspace-api/index.rst | |||
| @@ -20,6 +20,7 @@ place where this information is gathered. | |||
| 20 | seccomp_filter | 20 | seccomp_filter |
| 21 | unshare | 21 | unshare |
| 22 | spec_ctrl | 22 | spec_ctrl |
| 23 | accelerators/ocxl | ||
| 23 | 24 | ||
| 24 | .. only:: subproject and html | 25 | .. only:: subproject and html |
| 25 | 26 | ||
diff --git a/Documentation/vm/numa.rst b/Documentation/vm/numa.rst index 130f3cfa1c19..99fdeca917ca 100644 --- a/Documentation/vm/numa.rst +++ b/Documentation/vm/numa.rst | |||
| @@ -67,7 +67,7 @@ nodes. Each emulated node will manage a fraction of the underlying cells' | |||
| 67 | physical memory. NUMA emluation is useful for testing NUMA kernel and | 67 | physical memory. NUMA emluation is useful for testing NUMA kernel and |
| 68 | application features on non-NUMA platforms, and as a sort of memory resource | 68 | application features on non-NUMA platforms, and as a sort of memory resource |
| 69 | management mechanism when used together with cpusets. | 69 | management mechanism when used together with cpusets. |
| 70 | [see Documentation/cgroup-v1/cpusets.rst] | 70 | [see Documentation/admin-guide/cgroup-v1/cpusets.rst] |
| 71 | 71 | ||
| 72 | For each node with memory, Linux constructs an independent memory management | 72 | For each node with memory, Linux constructs an independent memory management |
| 73 | subsystem, complete with its own free page lists, in-use page lists, usage | 73 | subsystem, complete with its own free page lists, in-use page lists, usage |
| @@ -114,7 +114,7 @@ allocation behavior using Linux NUMA memory policy. [see | |||
| 114 | 114 | ||
| 115 | System administrators can restrict the CPUs and nodes' memories that a non- | 115 | System administrators can restrict the CPUs and nodes' memories that a non- |
| 116 | privileged user can specify in the scheduling or NUMA commands and functions | 116 | privileged user can specify in the scheduling or NUMA commands and functions |
| 117 | using control groups and CPUsets. [see Documentation/cgroup-v1/cpusets.rst] | 117 | using control groups and CPUsets. [see Documentation/admin-guide/cgroup-v1/cpusets.rst] |
| 118 | 118 | ||
| 119 | On architectures that do not hide memoryless nodes, Linux will include only | 119 | On architectures that do not hide memoryless nodes, Linux will include only |
| 120 | zones [nodes] with memory in the zonelists. This means that for a memoryless | 120 | zones [nodes] with memory in the zonelists. This means that for a memoryless |
diff --git a/Documentation/vm/page_migration.rst b/Documentation/vm/page_migration.rst index 35bba27d5fff..1d6cd7db4e43 100644 --- a/Documentation/vm/page_migration.rst +++ b/Documentation/vm/page_migration.rst | |||
| @@ -41,7 +41,7 @@ locations. | |||
| 41 | Larger installations usually partition the system using cpusets into | 41 | Larger installations usually partition the system using cpusets into |
| 42 | sections of nodes. Paul Jackson has equipped cpusets with the ability to | 42 | sections of nodes. Paul Jackson has equipped cpusets with the ability to |
| 43 | move pages when a task is moved to another cpuset (See | 43 | move pages when a task is moved to another cpuset (See |
| 44 | Documentation/cgroup-v1/cpusets.rst). | 44 | Documentation/admin-guide/cgroup-v1/cpusets.rst). |
| 45 | Cpusets allows the automation of process locality. If a task is moved to | 45 | Cpusets allows the automation of process locality. If a task is moved to |
| 46 | a new cpuset then also all its pages are moved with it so that the | 46 | a new cpuset then also all its pages are moved with it so that the |
| 47 | performance of the process does not sink dramatically. Also the pages | 47 | performance of the process does not sink dramatically. Also the pages |
diff --git a/Documentation/vm/unevictable-lru.rst b/Documentation/vm/unevictable-lru.rst index c6d94118fbcc..17d0861b0f1d 100644 --- a/Documentation/vm/unevictable-lru.rst +++ b/Documentation/vm/unevictable-lru.rst | |||
| @@ -98,7 +98,7 @@ Memory Control Group Interaction | |||
| 98 | -------------------------------- | 98 | -------------------------------- |
| 99 | 99 | ||
| 100 | The unevictable LRU facility interacts with the memory control group [aka | 100 | The unevictable LRU facility interacts with the memory control group [aka |
| 101 | memory controller; see Documentation/cgroup-v1/memory.rst] by extending the | 101 | memory controller; see Documentation/admin-guide/cgroup-v1/memory.rst] by extending the |
| 102 | lru_list enum. | 102 | lru_list enum. |
| 103 | 103 | ||
| 104 | The memory controller data structure automatically gets a per-zone unevictable | 104 | The memory controller data structure automatically gets a per-zone unevictable |
| @@ -439,7 +439,7 @@ Compacting MLOCKED Pages | |||
| 439 | 439 | ||
| 440 | The unevictable LRU can be scanned for compactable regions and the default | 440 | The unevictable LRU can be scanned for compactable regions and the default |
| 441 | behavior is to do so. /proc/sys/vm/compact_unevictable_allowed controls | 441 | behavior is to do so. /proc/sys/vm/compact_unevictable_allowed controls |
| 442 | this behavior (see Documentation/sysctl/vm.txt). Once scanning of the | 442 | this behavior (see Documentation/admin-guide/sysctl/vm.rst). Once scanning of the |
| 443 | unevictable LRU is enabled, the work of compaction is mostly handled by | 443 | unevictable LRU is enabled, the work of compaction is mostly handled by |
| 444 | the page migration code and the same work flow as described in MIGRATING | 444 | the page migration code and the same work flow as described in MIGRATING |
| 445 | MLOCKED PAGES will apply. | 445 | MLOCKED PAGES will apply. |
diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink index ef2727192d69..94ad4c420828 100644 --- a/Documentation/w1/w1.netlink +++ b/Documentation/w1/w1.netlink | |||
| @@ -183,7 +183,7 @@ acknowledge number is set to seq+1. | |||
| 183 | Additional documantion, source code examples. | 183 | Additional documantion, source code examples. |
| 184 | ============================================ | 184 | ============================================ |
| 185 | 185 | ||
| 186 | 1. Documentation/connector | 186 | 1. Documentation/driver-api/connector.rst |
| 187 | 2. http://www.ioremap.net/archive/w1 | 187 | 2. http://www.ioremap.net/archive/w1 |
| 188 | This archive includes userspace application w1d.c which uses | 188 | This archive includes userspace application w1d.c which uses |
| 189 | read/write/search commands for all master/slave devices found on the bus. | 189 | read/write/search commands for all master/slave devices found on the bus. |
diff --git a/Documentation/watchdog/index.rst b/Documentation/watchdog/index.rst index 33a0de631e84..c177645081d8 100644 --- a/Documentation/watchdog/index.rst +++ b/Documentation/watchdog/index.rst | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | ||
| 3 | ====================== | 3 | ====================== |
| 4 | Linux Watchdog Support | 4 | Linux Watchdog Support |
diff --git a/Documentation/x86/index.rst b/Documentation/x86/index.rst index f2de1b2d3ac7..af64c4bb4447 100644 --- a/Documentation/x86/index.rst +++ b/Documentation/x86/index.rst | |||
| @@ -20,6 +20,8 @@ x86-specific Documentation | |||
| 20 | mtrr | 20 | mtrr |
| 21 | pat | 21 | pat |
| 22 | intel_mpx | 22 | intel_mpx |
| 23 | intel-iommu | ||
| 24 | intel_txt | ||
| 23 | amd-memory-encryption | 25 | amd-memory-encryption |
| 24 | pti | 26 | pti |
| 25 | mds | 27 | mds |
diff --git a/Documentation/Intel-IOMMU.txt b/Documentation/x86/intel-iommu.rst index 9dae6b47e398..9dae6b47e398 100644 --- a/Documentation/Intel-IOMMU.txt +++ b/Documentation/x86/intel-iommu.rst | |||
diff --git a/Documentation/intel_txt.txt b/Documentation/x86/intel_txt.rst index d83c1a2122c9..d83c1a2122c9 100644 --- a/Documentation/intel_txt.txt +++ b/Documentation/x86/intel_txt.rst | |||
diff --git a/Documentation/x86/topology.rst b/Documentation/x86/topology.rst index 8e9704f61017..e29739904e37 100644 --- a/Documentation/x86/topology.rst +++ b/Documentation/x86/topology.rst | |||
| @@ -9,7 +9,7 @@ representation in the kernel. Update/change when doing changes to the | |||
| 9 | respective code. | 9 | respective code. |
| 10 | 10 | ||
| 11 | The architecture-agnostic topology definitions are in | 11 | The architecture-agnostic topology definitions are in |
| 12 | Documentation/cputopology.txt. This file holds x86-specific | 12 | Documentation/admin-guide/cputopology.rst. This file holds x86-specific |
| 13 | differences/specialities which must not necessarily apply to the generic | 13 | differences/specialities which must not necessarily apply to the generic |
| 14 | definitions. Thus, the way to read up on Linux topology on x86 is to start | 14 | definitions. Thus, the way to read up on Linux topology on x86 is to start |
| 15 | with the generic one and look at this one in parallel for the x86 specifics. | 15 | with the generic one and look at this one in parallel for the x86 specifics. |
diff --git a/Documentation/x86/x86_64/fake-numa-for-cpusets.rst b/Documentation/x86/x86_64/fake-numa-for-cpusets.rst index 30108684ae87..ff9bcfd2cc14 100644 --- a/Documentation/x86/x86_64/fake-numa-for-cpusets.rst +++ b/Documentation/x86/x86_64/fake-numa-for-cpusets.rst | |||
| @@ -15,7 +15,7 @@ assign them to cpusets and their attached tasks. This is a way of limiting the | |||
| 15 | amount of system memory that are available to a certain class of tasks. | 15 | amount of system memory that are available to a certain class of tasks. |
| 16 | 16 | ||
| 17 | For more information on the features of cpusets, see | 17 | For more information on the features of cpusets, see |
| 18 | Documentation/cgroup-v1/cpusets.rst. | 18 | Documentation/admin-guide/cgroup-v1/cpusets.rst. |
| 19 | There are a number of different configurations you can use for your needs. For | 19 | There are a number of different configurations you can use for your needs. For |
| 20 | more information on the numa=fake command line option and its various ways of | 20 | more information on the numa=fake command line option and its various ways of |
| 21 | configuring fake nodes, see Documentation/x86/x86_64/boot-options.rst. | 21 | configuring fake nodes, see Documentation/x86/x86_64/boot-options.rst. |
| @@ -40,7 +40,7 @@ A machine may be split as follows with "numa=fake=4*512," as reported by dmesg:: | |||
| 40 | On node 3 totalpages: 131072 | 40 | On node 3 totalpages: 131072 |
| 41 | 41 | ||
| 42 | Now following the instructions for mounting the cpusets filesystem from | 42 | Now following the instructions for mounting the cpusets filesystem from |
| 43 | Documentation/cgroup-v1/cpusets.rst, you can assign fake nodes (i.e. contiguous memory | 43 | Documentation/admin-guide/cgroup-v1/cpusets.rst, you can assign fake nodes (i.e. contiguous memory |
| 44 | address spaces) to individual cpusets:: | 44 | address spaces) to individual cpusets:: |
| 45 | 45 | ||
| 46 | [root@xroads /]# mkdir exampleset | 46 | [root@xroads /]# mkdir exampleset |
diff --git a/Documentation/xtensa/atomctl.txt b/Documentation/xtensa/atomctl.rst index 1da783ac200c..1ecbd0ba9a2e 100644 --- a/Documentation/xtensa/atomctl.txt +++ b/Documentation/xtensa/atomctl.rst | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | =========================================== | ||
| 2 | Atomic Operation Control (ATOMCTL) Register | ||
| 3 | =========================================== | ||
| 4 | |||
| 1 | We Have Atomic Operation Control (ATOMCTL) Register. | 5 | We Have Atomic Operation Control (ATOMCTL) Register. |
| 2 | This register determines the effect of using a S32C1I instruction | 6 | This register determines the effect of using a S32C1I instruction |
| 3 | with various combinations of: | 7 | with various combinations of: |
| @@ -8,7 +12,7 @@ with various combinations of: | |||
| 8 | 2. With and without An Intelligent Memory Controller which | 12 | 2. With and without An Intelligent Memory Controller which |
| 9 | can do Atomic Transactions itself. | 13 | can do Atomic Transactions itself. |
| 10 | 14 | ||
| 11 | The Core comes up with a default value of for the three types of cache ops: | 15 | The Core comes up with a default value of for the three types of cache ops:: |
| 12 | 16 | ||
| 13 | 0x28: (WB: Internal, WT: Internal, BY:Exception) | 17 | 0x28: (WB: Internal, WT: Internal, BY:Exception) |
| 14 | 18 | ||
| @@ -30,15 +34,18 @@ CUSTOMER-WARNING: | |||
| 30 | Developers might find using RCW in Bypass mode convenient when testing | 34 | Developers might find using RCW in Bypass mode convenient when testing |
| 31 | with the cache being bypassed; for example studying cache alias problems. | 35 | with the cache being bypassed; for example studying cache alias problems. |
| 32 | 36 | ||
| 33 | See Section 4.3.12.4 of ISA; Bits: | 37 | See Section 4.3.12.4 of ISA; Bits:: |
| 34 | 38 | ||
| 35 | WB WT BY | 39 | WB WT BY |
| 36 | 5 4 | 3 2 | 1 0 | 40 | 5 4 | 3 2 | 1 0 |
| 41 | |||
| 42 | ========= ================== ================== =============== | ||
| 37 | 2 Bit | 43 | 2 Bit |
| 38 | Field | 44 | Field |
| 39 | Values WB - Write Back WT - Write Thru BY - Bypass | 45 | Values WB - Write Back WT - Write Thru BY - Bypass |
| 40 | --------- --------------- ----------------- ---------------- | 46 | ========= ================== ================== =============== |
| 41 | 0 Exception Exception Exception | 47 | 0 Exception Exception Exception |
| 42 | 1 RCW Transaction RCW Transaction RCW Transaction | 48 | 1 RCW Transaction RCW Transaction RCW Transaction |
| 43 | 2 Internal Operation Internal Operation Reserved | 49 | 2 Internal Operation Internal Operation Reserved |
| 44 | 3 Reserved Reserved Reserved | 50 | 3 Reserved Reserved Reserved |
| 51 | ========= ================== ================== =============== | ||
diff --git a/Documentation/xtensa/booting.txt b/Documentation/xtensa/booting.rst index 402b33a2619f..e1b83707e5b6 100644 --- a/Documentation/xtensa/booting.txt +++ b/Documentation/xtensa/booting.rst | |||
| @@ -1,10 +1,13 @@ | |||
| 1 | Passing boot parameters to the kernel. | 1 | ===================================== |
| 2 | Passing boot parameters to the kernel | ||
| 3 | ===================================== | ||
| 2 | 4 | ||
| 3 | Boot parameters are represented as a TLV list in the memory. Please see | 5 | Boot parameters are represented as a TLV list in the memory. Please see |
| 4 | arch/xtensa/include/asm/bootparam.h for definition of the bp_tag structure and | 6 | arch/xtensa/include/asm/bootparam.h for definition of the bp_tag structure and |
| 5 | tag value constants. First entry in the list must have type BP_TAG_FIRST, last | 7 | tag value constants. First entry in the list must have type BP_TAG_FIRST, last |
| 6 | entry must have type BP_TAG_LAST. The address of the first list entry is | 8 | entry must have type BP_TAG_LAST. The address of the first list entry is |
| 7 | passed to the kernel in the register a2. The address type depends on MMU type: | 9 | passed to the kernel in the register a2. The address type depends on MMU type: |
| 10 | |||
| 8 | - For configurations without MMU, with region protection or with MPU the | 11 | - For configurations without MMU, with region protection or with MPU the |
| 9 | address must be the physical address. | 12 | address must be the physical address. |
| 10 | - For configurations with region translarion MMU or with MMUv3 and CONFIG_MMU=n | 13 | - For configurations with region translarion MMU or with MMUv3 and CONFIG_MMU=n |
diff --git a/Documentation/xtensa/index.rst b/Documentation/xtensa/index.rst new file mode 100644 index 000000000000..52fa04eb39a3 --- /dev/null +++ b/Documentation/xtensa/index.rst | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | .. SPDX-License-Identifier: GPL-2.0 | ||
| 2 | |||
| 3 | =================== | ||
| 4 | Xtensa Architecture | ||
| 5 | =================== | ||
| 6 | |||
| 7 | .. toctree:: | ||
| 8 | :maxdepth: 1 | ||
| 9 | |||
| 10 | atomctl | ||
| 11 | booting | ||
| 12 | mmu | ||
diff --git a/Documentation/xtensa/mmu.rst b/Documentation/xtensa/mmu.rst new file mode 100644 index 000000000000..e52a12960fdc --- /dev/null +++ b/Documentation/xtensa/mmu.rst | |||
| @@ -0,0 +1,195 @@ | |||
| 1 | ============================= | ||
| 2 | MMUv3 initialization sequence | ||
| 3 | ============================= | ||
| 4 | |||
| 5 | The code in the initialize_mmu macro sets up MMUv3 memory mapping | ||
| 6 | identically to MMUv2 fixed memory mapping. Depending on | ||
| 7 | CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX symbol this code is | ||
| 8 | located in addresses it was linked for (symbol undefined), or not | ||
| 9 | (symbol defined), so it needs to be position-independent. | ||
| 10 | |||
| 11 | The code has the following assumptions: | ||
| 12 | |||
| 13 | - This code fragment is run only on an MMU v3. | ||
| 14 | - TLBs are in their reset state. | ||
| 15 | - ITLBCFG and DTLBCFG are zero (reset state). | ||
| 16 | - RASID is 0x04030201 (reset state). | ||
| 17 | - PS.RING is zero (reset state). | ||
| 18 | - LITBASE is zero (reset state, PC-relative literals); required to be PIC. | ||
| 19 | |||
| 20 | TLB setup proceeds along the following steps. | ||
| 21 | |||
| 22 | Legend: | ||
| 23 | |||
| 24 | - VA = virtual address (two upper nibbles of it); | ||
| 25 | - PA = physical address (two upper nibbles of it); | ||
| 26 | - pc = physical range that contains this code; | ||
| 27 | |||
| 28 | After step 2, we jump to virtual address in the range 0x40000000..0x5fffffff | ||
| 29 | or 0x00000000..0x1fffffff, depending on whether the kernel was loaded below | ||
| 30 | 0x40000000 or above. That address corresponds to next instruction to execute | ||
| 31 | in this code. After step 4, we jump to intended (linked) address of this code. | ||
| 32 | The scheme below assumes that the kernel is loaded below 0x40000000. | ||
| 33 | |||
| 34 | ====== ===== ===== ===== ===== ====== ===== ===== | ||
| 35 | - Step0 Step1 Step2 Step3 Step4 Step5 | ||
| 36 | |||
| 37 | VA PA PA PA PA VA PA PA | ||
| 38 | ====== ===== ===== ===== ===== ====== ===== ===== | ||
| 39 | E0..FF -> E0 -> E0 -> E0 F0..FF -> F0 -> F0 | ||
| 40 | C0..DF -> C0 -> C0 -> C0 E0..EF -> F0 -> F0 | ||
| 41 | A0..BF -> A0 -> A0 -> A0 D8..DF -> 00 -> 00 | ||
| 42 | 80..9F -> 80 -> 80 -> 80 D0..D7 -> 00 -> 00 | ||
| 43 | 60..7F -> 60 -> 60 -> 60 | ||
| 44 | 40..5F -> 40 -> pc -> pc 40..5F -> pc | ||
| 45 | 20..3F -> 20 -> 20 -> 20 | ||
| 46 | 00..1F -> 00 -> 00 -> 00 | ||
| 47 | ====== ===== ===== ===== ===== ====== ===== ===== | ||
| 48 | |||
| 49 | The default location of IO peripherals is above 0xf0000000. This may be changed | ||
| 50 | using a "ranges" property in a device tree simple-bus node. See the Devicetree | ||
| 51 | Specification, section 4.5 for details on the syntax and semantics of | ||
| 52 | simple-bus nodes. The following limitations apply: | ||
| 53 | |||
| 54 | 1. Only top level simple-bus nodes are considered | ||
| 55 | |||
| 56 | 2. Only one (first) simple-bus node is considered | ||
| 57 | |||
| 58 | 3. Empty "ranges" properties are not supported | ||
| 59 | |||
| 60 | 4. Only the first triplet in the "ranges" property is considered | ||
| 61 | |||
| 62 | 5. The parent-bus-address value is rounded down to the nearest 256MB boundary | ||
| 63 | |||
| 64 | 6. The IO area covers the entire 256MB segment of parent-bus-address; the | ||
| 65 | "ranges" triplet length field is ignored | ||
| 66 | |||
| 67 | |||
| 68 | MMUv3 address space layouts. | ||
| 69 | ============================ | ||
| 70 | |||
| 71 | Default MMUv2-compatible layout:: | ||
| 72 | |||
| 73 | Symbol VADDR Size | ||
| 74 | +------------------+ | ||
| 75 | | Userspace | 0x00000000 TASK_SIZE | ||
| 76 | +------------------+ 0x40000000 | ||
| 77 | +------------------+ | ||
| 78 | | Page table | XCHAL_PAGE_TABLE_VADDR 0x80000000 XCHAL_PAGE_TABLE_SIZE | ||
| 79 | +------------------+ | ||
| 80 | | KASAN shadow map | KASAN_SHADOW_START 0x80400000 KASAN_SHADOW_SIZE | ||
| 81 | +------------------+ 0x8e400000 | ||
| 82 | +------------------+ | ||
| 83 | | VMALLOC area | VMALLOC_START 0xc0000000 128MB - 64KB | ||
| 84 | +------------------+ VMALLOC_END | ||
| 85 | | Cache aliasing | TLBTEMP_BASE_1 0xc7ff0000 DCACHE_WAY_SIZE | ||
| 86 | | remap area 1 | | ||
| 87 | +------------------+ | ||
| 88 | | Cache aliasing | TLBTEMP_BASE_2 DCACHE_WAY_SIZE | ||
| 89 | | remap area 2 | | ||
| 90 | +------------------+ | ||
| 91 | +------------------+ | ||
| 92 | | KMAP area | PKMAP_BASE PTRS_PER_PTE * | ||
| 93 | | | DCACHE_N_COLORS * | ||
| 94 | | | PAGE_SIZE | ||
| 95 | | | (4MB * DCACHE_N_COLORS) | ||
| 96 | +------------------+ | ||
| 97 | | Atomic KMAP area | FIXADDR_START KM_TYPE_NR * | ||
| 98 | | | NR_CPUS * | ||
| 99 | | | DCACHE_N_COLORS * | ||
| 100 | | | PAGE_SIZE | ||
| 101 | +------------------+ FIXADDR_TOP 0xcffff000 | ||
| 102 | +------------------+ | ||
| 103 | | Cached KSEG | XCHAL_KSEG_CACHED_VADDR 0xd0000000 128MB | ||
| 104 | +------------------+ | ||
| 105 | | Uncached KSEG | XCHAL_KSEG_BYPASS_VADDR 0xd8000000 128MB | ||
| 106 | +------------------+ | ||
| 107 | | Cached KIO | XCHAL_KIO_CACHED_VADDR 0xe0000000 256MB | ||
| 108 | +------------------+ | ||
| 109 | | Uncached KIO | XCHAL_KIO_BYPASS_VADDR 0xf0000000 256MB | ||
| 110 | +------------------+ | ||
| 111 | |||
| 112 | |||
| 113 | 256MB cached + 256MB uncached layout:: | ||
| 114 | |||
| 115 | Symbol VADDR Size | ||
| 116 | +------------------+ | ||
| 117 | | Userspace | 0x00000000 TASK_SIZE | ||
| 118 | +------------------+ 0x40000000 | ||
| 119 | +------------------+ | ||
| 120 | | Page table | XCHAL_PAGE_TABLE_VADDR 0x80000000 XCHAL_PAGE_TABLE_SIZE | ||
| 121 | +------------------+ | ||
| 122 | | KASAN shadow map | KASAN_SHADOW_START 0x80400000 KASAN_SHADOW_SIZE | ||
| 123 | +------------------+ 0x8e400000 | ||
| 124 | +------------------+ | ||
| 125 | | VMALLOC area | VMALLOC_START 0xa0000000 128MB - 64KB | ||
| 126 | +------------------+ VMALLOC_END | ||
| 127 | | Cache aliasing | TLBTEMP_BASE_1 0xa7ff0000 DCACHE_WAY_SIZE | ||
| 128 | | remap area 1 | | ||
| 129 | +------------------+ | ||
| 130 | | Cache aliasing | TLBTEMP_BASE_2 DCACHE_WAY_SIZE | ||
| 131 | | remap area 2 | | ||
| 132 | +------------------+ | ||
| 133 | +------------------+ | ||
| 134 | | KMAP area | PKMAP_BASE PTRS_PER_PTE * | ||
| 135 | | | DCACHE_N_COLORS * | ||
| 136 | | | PAGE_SIZE | ||
| 137 | | | (4MB * DCACHE_N_COLORS) | ||
| 138 | +------------------+ | ||
| 139 | | Atomic KMAP area | FIXADDR_START KM_TYPE_NR * | ||
| 140 | | | NR_CPUS * | ||
| 141 | | | DCACHE_N_COLORS * | ||
| 142 | | | PAGE_SIZE | ||
| 143 | +------------------+ FIXADDR_TOP 0xaffff000 | ||
| 144 | +------------------+ | ||
| 145 | | Cached KSEG | XCHAL_KSEG_CACHED_VADDR 0xb0000000 256MB | ||
| 146 | +------------------+ | ||
| 147 | | Uncached KSEG | XCHAL_KSEG_BYPASS_VADDR 0xc0000000 256MB | ||
| 148 | +------------------+ | ||
| 149 | +------------------+ | ||
| 150 | | Cached KIO | XCHAL_KIO_CACHED_VADDR 0xe0000000 256MB | ||
| 151 | +------------------+ | ||
| 152 | | Uncached KIO | XCHAL_KIO_BYPASS_VADDR 0xf0000000 256MB | ||
| 153 | +------------------+ | ||
| 154 | |||
| 155 | |||
| 156 | 512MB cached + 512MB uncached layout:: | ||
| 157 | |||
| 158 | Symbol VADDR Size | ||
| 159 | +------------------+ | ||
| 160 | | Userspace | 0x00000000 TASK_SIZE | ||
| 161 | +------------------+ 0x40000000 | ||
| 162 | +------------------+ | ||
| 163 | | Page table | XCHAL_PAGE_TABLE_VADDR 0x80000000 XCHAL_PAGE_TABLE_SIZE | ||
| 164 | +------------------+ | ||
| 165 | | KASAN shadow map | KASAN_SHADOW_START 0x80400000 KASAN_SHADOW_SIZE | ||
| 166 | +------------------+ 0x8e400000 | ||
| 167 | +------------------+ | ||
| 168 | | VMALLOC area | VMALLOC_START 0x90000000 128MB - 64KB | ||
| 169 | +------------------+ VMALLOC_END | ||
| 170 | | Cache aliasing | TLBTEMP_BASE_1 0x97ff0000 DCACHE_WAY_SIZE | ||
| 171 | | remap area 1 | | ||
| 172 | +------------------+ | ||
| 173 | | Cache aliasing | TLBTEMP_BASE_2 DCACHE_WAY_SIZE | ||
| 174 | | remap area 2 | | ||
| 175 | +------------------+ | ||
| 176 | +------------------+ | ||
| 177 | | KMAP area | PKMAP_BASE PTRS_PER_PTE * | ||
| 178 | | | DCACHE_N_COLORS * | ||
| 179 | | | PAGE_SIZE | ||
| 180 | | | (4MB * DCACHE_N_COLORS) | ||
| 181 | +------------------+ | ||
| 182 | | Atomic KMAP area | FIXADDR_START KM_TYPE_NR * | ||
| 183 | | | NR_CPUS * | ||
| 184 | | | DCACHE_N_COLORS * | ||
| 185 | | | PAGE_SIZE | ||
| 186 | +------------------+ FIXADDR_TOP 0x9ffff000 | ||
| 187 | +------------------+ | ||
| 188 | | Cached KSEG | XCHAL_KSEG_CACHED_VADDR 0xa0000000 512MB | ||
| 189 | +------------------+ | ||
| 190 | | Uncached KSEG | XCHAL_KSEG_BYPASS_VADDR 0xc0000000 512MB | ||
| 191 | +------------------+ | ||
| 192 | | Cached KIO | XCHAL_KIO_CACHED_VADDR 0xe0000000 256MB | ||
| 193 | +------------------+ | ||
| 194 | | Uncached KIO | XCHAL_KIO_BYPASS_VADDR 0xf0000000 256MB | ||
| 195 | +------------------+ | ||
diff --git a/Documentation/xtensa/mmu.txt b/Documentation/xtensa/mmu.txt deleted file mode 100644 index 318114de63f3..000000000000 --- a/Documentation/xtensa/mmu.txt +++ /dev/null | |||
| @@ -1,189 +0,0 @@ | |||
| 1 | MMUv3 initialization sequence. | ||
| 2 | |||
| 3 | The code in the initialize_mmu macro sets up MMUv3 memory mapping | ||
| 4 | identically to MMUv2 fixed memory mapping. Depending on | ||
| 5 | CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX symbol this code is | ||
| 6 | located in addresses it was linked for (symbol undefined), or not | ||
| 7 | (symbol defined), so it needs to be position-independent. | ||
| 8 | |||
| 9 | The code has the following assumptions: | ||
| 10 | This code fragment is run only on an MMU v3. | ||
| 11 | TLBs are in their reset state. | ||
| 12 | ITLBCFG and DTLBCFG are zero (reset state). | ||
| 13 | RASID is 0x04030201 (reset state). | ||
| 14 | PS.RING is zero (reset state). | ||
| 15 | LITBASE is zero (reset state, PC-relative literals); required to be PIC. | ||
| 16 | |||
| 17 | TLB setup proceeds along the following steps. | ||
| 18 | |||
| 19 | Legend: | ||
| 20 | VA = virtual address (two upper nibbles of it); | ||
| 21 | PA = physical address (two upper nibbles of it); | ||
| 22 | pc = physical range that contains this code; | ||
| 23 | |||
| 24 | After step 2, we jump to virtual address in the range 0x40000000..0x5fffffff | ||
| 25 | or 0x00000000..0x1fffffff, depending on whether the kernel was loaded below | ||
| 26 | 0x40000000 or above. That address corresponds to next instruction to execute | ||
| 27 | in this code. After step 4, we jump to intended (linked) address of this code. | ||
| 28 | The scheme below assumes that the kernel is loaded below 0x40000000. | ||
| 29 | |||
| 30 | Step0 Step1 Step2 Step3 Step4 Step5 | ||
| 31 | ===== ===== ===== ===== ===== ===== | ||
| 32 | VA PA PA PA PA VA PA PA | ||
| 33 | ------ -- -- -- -- ------ -- -- | ||
| 34 | E0..FF -> E0 -> E0 -> E0 F0..FF -> F0 -> F0 | ||
| 35 | C0..DF -> C0 -> C0 -> C0 E0..EF -> F0 -> F0 | ||
| 36 | A0..BF -> A0 -> A0 -> A0 D8..DF -> 00 -> 00 | ||
| 37 | 80..9F -> 80 -> 80 -> 80 D0..D7 -> 00 -> 00 | ||
| 38 | 60..7F -> 60 -> 60 -> 60 | ||
| 39 | 40..5F -> 40 -> pc -> pc 40..5F -> pc | ||
| 40 | 20..3F -> 20 -> 20 -> 20 | ||
| 41 | 00..1F -> 00 -> 00 -> 00 | ||
| 42 | |||
| 43 | The default location of IO peripherals is above 0xf0000000. This may be changed | ||
| 44 | using a "ranges" property in a device tree simple-bus node. See the Devicetree | ||
| 45 | Specification, section 4.5 for details on the syntax and semantics of | ||
| 46 | simple-bus nodes. The following limitations apply: | ||
| 47 | |||
| 48 | 1. Only top level simple-bus nodes are considered | ||
| 49 | |||
| 50 | 2. Only one (first) simple-bus node is considered | ||
| 51 | |||
| 52 | 3. Empty "ranges" properties are not supported | ||
| 53 | |||
| 54 | 4. Only the first triplet in the "ranges" property is considered | ||
| 55 | |||
| 56 | 5. The parent-bus-address value is rounded down to the nearest 256MB boundary | ||
| 57 | |||
| 58 | 6. The IO area covers the entire 256MB segment of parent-bus-address; the | ||
| 59 | "ranges" triplet length field is ignored | ||
| 60 | |||
| 61 | |||
| 62 | MMUv3 address space layouts. | ||
| 63 | ============================ | ||
| 64 | |||
| 65 | Default MMUv2-compatible layout. | ||
| 66 | |||
| 67 | Symbol VADDR Size | ||
| 68 | +------------------+ | ||
| 69 | | Userspace | 0x00000000 TASK_SIZE | ||
| 70 | +------------------+ 0x40000000 | ||
| 71 | +------------------+ | ||
| 72 | | Page table | XCHAL_PAGE_TABLE_VADDR 0x80000000 XCHAL_PAGE_TABLE_SIZE | ||
| 73 | +------------------+ | ||
| 74 | | KASAN shadow map | KASAN_SHADOW_START 0x80400000 KASAN_SHADOW_SIZE | ||
| 75 | +------------------+ 0x8e400000 | ||
| 76 | +------------------+ | ||
| 77 | | VMALLOC area | VMALLOC_START 0xc0000000 128MB - 64KB | ||
| 78 | +------------------+ VMALLOC_END | ||
| 79 | | Cache aliasing | TLBTEMP_BASE_1 0xc7ff0000 DCACHE_WAY_SIZE | ||
| 80 | | remap area 1 | | ||
| 81 | +------------------+ | ||
| 82 | | Cache aliasing | TLBTEMP_BASE_2 DCACHE_WAY_SIZE | ||
| 83 | | remap area 2 | | ||
| 84 | +------------------+ | ||
| 85 | +------------------+ | ||
| 86 | | KMAP area | PKMAP_BASE PTRS_PER_PTE * | ||
| 87 | | | DCACHE_N_COLORS * | ||
| 88 | | | PAGE_SIZE | ||
| 89 | | | (4MB * DCACHE_N_COLORS) | ||
| 90 | +------------------+ | ||
| 91 | | Atomic KMAP area | FIXADDR_START KM_TYPE_NR * | ||
| 92 | | | NR_CPUS * | ||
| 93 | | | DCACHE_N_COLORS * | ||
| 94 | | | PAGE_SIZE | ||
| 95 | +------------------+ FIXADDR_TOP 0xcffff000 | ||
| 96 | +------------------+ | ||
| 97 | | Cached KSEG | XCHAL_KSEG_CACHED_VADDR 0xd0000000 128MB | ||
| 98 | +------------------+ | ||
| 99 | | Uncached KSEG | XCHAL_KSEG_BYPASS_VADDR 0xd8000000 128MB | ||
| 100 | +------------------+ | ||
| 101 | | Cached KIO | XCHAL_KIO_CACHED_VADDR 0xe0000000 256MB | ||
| 102 | +------------------+ | ||
| 103 | | Uncached KIO | XCHAL_KIO_BYPASS_VADDR 0xf0000000 256MB | ||
| 104 | +------------------+ | ||
| 105 | |||
| 106 | |||
| 107 | 256MB cached + 256MB uncached layout. | ||
| 108 | |||
| 109 | Symbol VADDR Size | ||
| 110 | +------------------+ | ||
| 111 | | Userspace | 0x00000000 TASK_SIZE | ||
| 112 | +------------------+ 0x40000000 | ||
| 113 | +------------------+ | ||
| 114 | | Page table | XCHAL_PAGE_TABLE_VADDR 0x80000000 XCHAL_PAGE_TABLE_SIZE | ||
| 115 | +------------------+ | ||
| 116 | | KASAN shadow map | KASAN_SHADOW_START 0x80400000 KASAN_SHADOW_SIZE | ||
| 117 | +------------------+ 0x8e400000 | ||
| 118 | +------------------+ | ||
| 119 | | VMALLOC area | VMALLOC_START 0xa0000000 128MB - 64KB | ||
| 120 | +------------------+ VMALLOC_END | ||
| 121 | | Cache aliasing | TLBTEMP_BASE_1 0xa7ff0000 DCACHE_WAY_SIZE | ||
| 122 | | remap area 1 | | ||
| 123 | +------------------+ | ||
| 124 | | Cache aliasing | TLBTEMP_BASE_2 DCACHE_WAY_SIZE | ||
| 125 | | remap area 2 | | ||
| 126 | +------------------+ | ||
| 127 | +------------------+ | ||
| 128 | | KMAP area | PKMAP_BASE PTRS_PER_PTE * | ||
| 129 | | | DCACHE_N_COLORS * | ||
| 130 | | | PAGE_SIZE | ||
| 131 | | | (4MB * DCACHE_N_COLORS) | ||
| 132 | +------------------+ | ||
| 133 | | Atomic KMAP area | FIXADDR_START KM_TYPE_NR * | ||
| 134 | | | NR_CPUS * | ||
| 135 | | | DCACHE_N_COLORS * | ||
| 136 | | | PAGE_SIZE | ||
| 137 | +------------------+ FIXADDR_TOP 0xaffff000 | ||
| 138 | +------------------+ | ||
| 139 | | Cached KSEG | XCHAL_KSEG_CACHED_VADDR 0xb0000000 256MB | ||
| 140 | +------------------+ | ||
| 141 | | Uncached KSEG | XCHAL_KSEG_BYPASS_VADDR 0xc0000000 256MB | ||
| 142 | +------------------+ | ||
| 143 | +------------------+ | ||
| 144 | | Cached KIO | XCHAL_KIO_CACHED_VADDR 0xe0000000 256MB | ||
| 145 | +------------------+ | ||
| 146 | | Uncached KIO | XCHAL_KIO_BYPASS_VADDR 0xf0000000 256MB | ||
| 147 | +------------------+ | ||
| 148 | |||
| 149 | |||
| 150 | 512MB cached + 512MB uncached layout. | ||
| 151 | |||
| 152 | Symbol VADDR Size | ||
| 153 | +------------------+ | ||
| 154 | | Userspace | 0x00000000 TASK_SIZE | ||
| 155 | +------------------+ 0x40000000 | ||
| 156 | +------------------+ | ||
| 157 | | Page table | XCHAL_PAGE_TABLE_VADDR 0x80000000 XCHAL_PAGE_TABLE_SIZE | ||
| 158 | +------------------+ | ||
| 159 | | KASAN shadow map | KASAN_SHADOW_START 0x80400000 KASAN_SHADOW_SIZE | ||
| 160 | +------------------+ 0x8e400000 | ||
| 161 | +------------------+ | ||
| 162 | | VMALLOC area | VMALLOC_START 0x90000000 128MB - 64KB | ||
| 163 | +------------------+ VMALLOC_END | ||
| 164 | | Cache aliasing | TLBTEMP_BASE_1 0x97ff0000 DCACHE_WAY_SIZE | ||
| 165 | | remap area 1 | | ||
| 166 | +------------------+ | ||
| 167 | | Cache aliasing | TLBTEMP_BASE_2 DCACHE_WAY_SIZE | ||
| 168 | | remap area 2 | | ||
| 169 | +------------------+ | ||
| 170 | +------------------+ | ||
| 171 | | KMAP area | PKMAP_BASE PTRS_PER_PTE * | ||
| 172 | | | DCACHE_N_COLORS * | ||
| 173 | | | PAGE_SIZE | ||
| 174 | | | (4MB * DCACHE_N_COLORS) | ||
| 175 | +------------------+ | ||
| 176 | | Atomic KMAP area | FIXADDR_START KM_TYPE_NR * | ||
| 177 | | | NR_CPUS * | ||
| 178 | | | DCACHE_N_COLORS * | ||
| 179 | | | PAGE_SIZE | ||
| 180 | +------------------+ FIXADDR_TOP 0x9ffff000 | ||
| 181 | +------------------+ | ||
| 182 | | Cached KSEG | XCHAL_KSEG_CACHED_VADDR 0xa0000000 512MB | ||
| 183 | +------------------+ | ||
| 184 | | Uncached KSEG | XCHAL_KSEG_BYPASS_VADDR 0xc0000000 512MB | ||
| 185 | +------------------+ | ||
| 186 | | Cached KIO | XCHAL_KIO_CACHED_VADDR 0xe0000000 256MB | ||
| 187 | +------------------+ | ||
| 188 | | Uncached KIO | XCHAL_KIO_BYPASS_VADDR 0xf0000000 256MB | ||
| 189 | +------------------+ | ||
diff --git a/MAINTAINERS b/MAINTAINERS index afba8bf5d716..c144bd6a432e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -1155,7 +1155,7 @@ APPLIED MICRO (APM) X-GENE SOC PMU | |||
| 1155 | M: Khuong Dinh <khuong@os.amperecomputing.com> | 1155 | M: Khuong Dinh <khuong@os.amperecomputing.com> |
| 1156 | S: Supported | 1156 | S: Supported |
| 1157 | F: drivers/perf/xgene_pmu.c | 1157 | F: drivers/perf/xgene_pmu.c |
| 1158 | F: Documentation/perf/xgene-pmu.txt | 1158 | F: Documentation/admin-guide/perf/xgene-pmu.rst |
| 1159 | F: Documentation/devicetree/bindings/perf/apm-xgene-pmu.txt | 1159 | F: Documentation/devicetree/bindings/perf/apm-xgene-pmu.txt |
| 1160 | 1160 | ||
| 1161 | APTINA CAMERA SENSOR PLL | 1161 | APTINA CAMERA SENSOR PLL |
| @@ -2218,7 +2218,7 @@ F: drivers/*/*s3c64xx* | |||
| 2218 | F: drivers/*/*s5pv210* | 2218 | F: drivers/*/*s5pv210* |
| 2219 | F: drivers/memory/samsung/* | 2219 | F: drivers/memory/samsung/* |
| 2220 | F: drivers/soc/samsung/* | 2220 | F: drivers/soc/samsung/* |
| 2221 | F: Documentation/arm/Samsung/ | 2221 | F: Documentation/arm/samsung/ |
| 2222 | F: Documentation/devicetree/bindings/arm/samsung/ | 2222 | F: Documentation/devicetree/bindings/arm/samsung/ |
| 2223 | F: Documentation/devicetree/bindings/sram/samsung-sram.txt | 2223 | F: Documentation/devicetree/bindings/sram/samsung-sram.txt |
| 2224 | F: Documentation/devicetree/bindings/power/pd-samsung.txt | 2224 | F: Documentation/devicetree/bindings/power/pd-samsung.txt |
| @@ -2689,7 +2689,7 @@ ATA OVER ETHERNET (AOE) DRIVER | |||
| 2689 | M: "Justin Sanders" <justin@coraid.com> | 2689 | M: "Justin Sanders" <justin@coraid.com> |
| 2690 | W: http://www.openaoe.org/ | 2690 | W: http://www.openaoe.org/ |
| 2691 | S: Supported | 2691 | S: Supported |
| 2692 | F: Documentation/aoe/ | 2692 | F: Documentation/admin-guide/aoe/ |
| 2693 | F: drivers/block/aoe/ | 2693 | F: drivers/block/aoe/ |
| 2694 | 2694 | ||
| 2695 | ATHEROS 71XX/9XXX GPIO DRIVER | 2695 | ATHEROS 71XX/9XXX GPIO DRIVER |
| @@ -2968,7 +2968,7 @@ M: Jens Axboe <axboe@kernel.dk> | |||
| 2968 | L: linux-block@vger.kernel.org | 2968 | L: linux-block@vger.kernel.org |
| 2969 | S: Maintained | 2969 | S: Maintained |
| 2970 | F: block/bfq-* | 2970 | F: block/bfq-* |
| 2971 | F: Documentation/block/bfq-iosched.txt | 2971 | F: Documentation/block/bfq-iosched.rst |
| 2972 | 2972 | ||
| 2973 | BFS FILE SYSTEM | 2973 | BFS FILE SYSTEM |
| 2974 | M: "Tigran A. Aivazian" <aivazian.tigran@gmail.com> | 2974 | M: "Tigran A. Aivazian" <aivazian.tigran@gmail.com> |
| @@ -4158,7 +4158,7 @@ L: cgroups@vger.kernel.org | |||
| 4158 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git | 4158 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git |
| 4159 | S: Maintained | 4159 | S: Maintained |
| 4160 | F: Documentation/admin-guide/cgroup-v2.rst | 4160 | F: Documentation/admin-guide/cgroup-v2.rst |
| 4161 | F: Documentation/cgroup-v1/ | 4161 | F: Documentation/admin-guide/cgroup-v1/ |
| 4162 | F: include/linux/cgroup* | 4162 | F: include/linux/cgroup* |
| 4163 | F: kernel/cgroup/ | 4163 | F: kernel/cgroup/ |
| 4164 | 4164 | ||
| @@ -4169,7 +4169,7 @@ W: http://www.bullopensource.org/cpuset/ | |||
| 4169 | W: http://oss.sgi.com/projects/cpusets/ | 4169 | W: http://oss.sgi.com/projects/cpusets/ |
| 4170 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git | 4170 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git |
| 4171 | S: Maintained | 4171 | S: Maintained |
| 4172 | F: Documentation/cgroup-v1/cpusets.rst | 4172 | F: Documentation/admin-guide/cgroup-v1/cpusets.rst |
| 4173 | F: include/linux/cpuset.h | 4173 | F: include/linux/cpuset.h |
| 4174 | F: kernel/cgroup/cpuset.c | 4174 | F: kernel/cgroup/cpuset.c |
| 4175 | 4175 | ||
| @@ -4655,7 +4655,7 @@ DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas) | |||
| 4655 | M: Stuart Hayes <stuart.w.hayes@gmail.com> | 4655 | M: Stuart Hayes <stuart.w.hayes@gmail.com> |
| 4656 | L: platform-driver-x86@vger.kernel.org | 4656 | L: platform-driver-x86@vger.kernel.org |
| 4657 | S: Maintained | 4657 | S: Maintained |
| 4658 | F: Documentation/dcdbas.txt | 4658 | F: Documentation/driver-api/dcdbas.rst |
| 4659 | F: drivers/platform/x86/dcdbas.* | 4659 | F: drivers/platform/x86/dcdbas.* |
| 4660 | 4660 | ||
| 4661 | DELL WMI NOTIFICATIONS DRIVER | 4661 | DELL WMI NOTIFICATIONS DRIVER |
| @@ -4748,7 +4748,7 @@ Q: http://patchwork.kernel.org/project/dm-devel/list/ | |||
| 4748 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git | 4748 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git |
| 4749 | T: quilt http://people.redhat.com/agk/patches/linux/editing/ | 4749 | T: quilt http://people.redhat.com/agk/patches/linux/editing/ |
| 4750 | S: Maintained | 4750 | S: Maintained |
| 4751 | F: Documentation/device-mapper/ | 4751 | F: Documentation/admin-guide/device-mapper/ |
| 4752 | F: drivers/md/Makefile | 4752 | F: drivers/md/Makefile |
| 4753 | F: drivers/md/Kconfig | 4753 | F: drivers/md/Kconfig |
| 4754 | F: drivers/md/dm* | 4754 | F: drivers/md/dm* |
| @@ -5019,7 +5019,7 @@ T: git git://git.linbit.com/drbd-8.4.git | |||
| 5019 | S: Supported | 5019 | S: Supported |
| 5020 | F: drivers/block/drbd/ | 5020 | F: drivers/block/drbd/ |
| 5021 | F: lib/lru_cache.c | 5021 | F: lib/lru_cache.c |
| 5022 | F: Documentation/blockdev/drbd/ | 5022 | F: Documentation/admin-guide/blockdev/ |
| 5023 | 5023 | ||
| 5024 | DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS | 5024 | DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS |
| 5025 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 5025 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| @@ -6100,7 +6100,7 @@ M: Ard Biesheuvel <ard.biesheuvel@linaro.org> | |||
| 6100 | L: linux-efi@vger.kernel.org | 6100 | L: linux-efi@vger.kernel.org |
| 6101 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git | 6101 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git |
| 6102 | S: Maintained | 6102 | S: Maintained |
| 6103 | F: Documentation/efi-stub.txt | 6103 | F: Documentation/admin-guide/efi-stub.rst |
| 6104 | F: arch/*/kernel/efi.c | 6104 | F: arch/*/kernel/efi.c |
| 6105 | F: arch/x86/boot/compressed/eboot.[ch] | 6105 | F: arch/x86/boot/compressed/eboot.[ch] |
| 6106 | F: arch/*/include/asm/efi.h | 6106 | F: arch/*/include/asm/efi.h |
| @@ -6675,7 +6675,7 @@ S: Maintained | |||
| 6675 | F: scripts/gcc-plugins/ | 6675 | F: scripts/gcc-plugins/ |
| 6676 | F: scripts/gcc-plugin.sh | 6676 | F: scripts/gcc-plugin.sh |
| 6677 | F: scripts/Makefile.gcc-plugins | 6677 | F: scripts/Makefile.gcc-plugins |
| 6678 | F: Documentation/gcc-plugins.txt | 6678 | F: Documentation/core-api/gcc-plugins.rst |
| 6679 | 6679 | ||
| 6680 | GASKET DRIVER FRAMEWORK | 6680 | GASKET DRIVER FRAMEWORK |
| 6681 | M: Rob Springer <rspringer@google.com> | 6681 | M: Rob Springer <rspringer@google.com> |
| @@ -6887,7 +6887,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git | |||
| 6887 | S: Maintained | 6887 | S: Maintained |
| 6888 | F: Documentation/devicetree/bindings/gpio/ | 6888 | F: Documentation/devicetree/bindings/gpio/ |
| 6889 | F: Documentation/driver-api/gpio/ | 6889 | F: Documentation/driver-api/gpio/ |
| 6890 | F: Documentation/gpio/ | 6890 | F: Documentation/admin-guide/gpio/ |
| 6891 | F: Documentation/ABI/testing/gpio-cdev | 6891 | F: Documentation/ABI/testing/gpio-cdev |
| 6892 | F: Documentation/ABI/obsolete/sysfs-gpio | 6892 | F: Documentation/ABI/obsolete/sysfs-gpio |
| 6893 | F: drivers/gpio/ | 6893 | F: drivers/gpio/ |
| @@ -7108,7 +7108,7 @@ M: Herbert Xu <herbert@gondor.apana.org.au> | |||
| 7108 | L: linux-crypto@vger.kernel.org | 7108 | L: linux-crypto@vger.kernel.org |
| 7109 | S: Odd fixes | 7109 | S: Odd fixes |
| 7110 | F: Documentation/devicetree/bindings/rng/ | 7110 | F: Documentation/devicetree/bindings/rng/ |
| 7111 | F: Documentation/hw_random.txt | 7111 | F: Documentation/admin-guide/hw_random.rst |
| 7112 | F: drivers/char/hw_random/ | 7112 | F: drivers/char/hw_random/ |
| 7113 | F: include/linux/hw_random.h | 7113 | F: include/linux/hw_random.h |
| 7114 | 7114 | ||
| @@ -7282,7 +7282,7 @@ M: Shaokun Zhang <zhangshaokun@hisilicon.com> | |||
| 7282 | W: http://www.hisilicon.com | 7282 | W: http://www.hisilicon.com |
| 7283 | S: Supported | 7283 | S: Supported |
| 7284 | F: drivers/perf/hisilicon | 7284 | F: drivers/perf/hisilicon |
| 7285 | F: Documentation/perf/hisi-pmu.txt | 7285 | F: Documentation/admin-guide/perf/hisi-pmu.rst |
| 7286 | 7286 | ||
| 7287 | HISILICON ROCE DRIVER | 7287 | HISILICON ROCE DRIVER |
| 7288 | M: Lijun Ou <oulijun@huawei.com> | 7288 | M: Lijun Ou <oulijun@huawei.com> |
| @@ -8332,7 +8332,7 @@ L: tboot-devel@lists.sourceforge.net | |||
| 8332 | W: http://tboot.sourceforge.net | 8332 | W: http://tboot.sourceforge.net |
| 8333 | T: hg http://tboot.hg.sourceforge.net:8000/hgroot/tboot/tboot | 8333 | T: hg http://tboot.hg.sourceforge.net:8000/hgroot/tboot/tboot |
| 8334 | S: Supported | 8334 | S: Supported |
| 8335 | F: Documentation/intel_txt.txt | 8335 | F: Documentation/x86/intel_txt.rst |
| 8336 | F: include/linux/tboot.h | 8336 | F: include/linux/tboot.h |
| 8337 | F: arch/x86/kernel/tboot.c | 8337 | F: arch/x86/kernel/tboot.c |
| 8338 | 8338 | ||
| @@ -8346,7 +8346,7 @@ INTERCONNECT API | |||
| 8346 | M: Georgi Djakov <georgi.djakov@linaro.org> | 8346 | M: Georgi Djakov <georgi.djakov@linaro.org> |
| 8347 | L: linux-pm@vger.kernel.org | 8347 | L: linux-pm@vger.kernel.org |
| 8348 | S: Maintained | 8348 | S: Maintained |
| 8349 | F: Documentation/interconnect/ | 8349 | F: Documentation/driver-api/interconnect.rst |
| 8350 | F: Documentation/devicetree/bindings/interconnect/ | 8350 | F: Documentation/devicetree/bindings/interconnect/ |
| 8351 | F: drivers/interconnect/ | 8351 | F: drivers/interconnect/ |
| 8352 | F: include/dt-bindings/interconnect/ | 8352 | F: include/dt-bindings/interconnect/ |
| @@ -8482,7 +8482,7 @@ F: drivers/irqchip/ | |||
| 8482 | ISA | 8482 | ISA |
| 8483 | M: William Breathitt Gray <vilhelm.gray@gmail.com> | 8483 | M: William Breathitt Gray <vilhelm.gray@gmail.com> |
| 8484 | S: Maintained | 8484 | S: Maintained |
| 8485 | F: Documentation/isa.txt | 8485 | F: Documentation/driver-api/isa.rst |
| 8486 | F: drivers/base/isa.c | 8486 | F: drivers/base/isa.c |
| 8487 | F: include/linux/isa.h | 8487 | F: include/linux/isa.h |
| 8488 | 8488 | ||
| @@ -8497,7 +8497,7 @@ F: drivers/media/radio/radio-isa* | |||
| 8497 | ISAPNP | 8497 | ISAPNP |
| 8498 | M: Jaroslav Kysela <perex@perex.cz> | 8498 | M: Jaroslav Kysela <perex@perex.cz> |
| 8499 | S: Maintained | 8499 | S: Maintained |
| 8500 | F: Documentation/isapnp.txt | 8500 | F: Documentation/driver-api/isapnp.rst |
| 8501 | F: drivers/pnp/isapnp/ | 8501 | F: drivers/pnp/isapnp/ |
| 8502 | F: include/linux/isapnp.h | 8502 | F: include/linux/isapnp.h |
| 8503 | 8503 | ||
| @@ -8695,7 +8695,7 @@ R: Vivek Goyal <vgoyal@redhat.com> | |||
| 8695 | L: kexec@lists.infradead.org | 8695 | L: kexec@lists.infradead.org |
| 8696 | W: http://lse.sourceforge.net/kdump/ | 8696 | W: http://lse.sourceforge.net/kdump/ |
| 8697 | S: Maintained | 8697 | S: Maintained |
| 8698 | F: Documentation/kdump/ | 8698 | F: Documentation/admin-guide/kdump/ |
| 8699 | 8699 | ||
| 8700 | KEENE FM RADIO TRANSMITTER DRIVER | 8700 | KEENE FM RADIO TRANSMITTER DRIVER |
| 8701 | M: Hans Verkuil <hverkuil@xs4all.nl> | 8701 | M: Hans Verkuil <hverkuil@xs4all.nl> |
| @@ -9049,7 +9049,7 @@ M: Matan Ziv-Av <matan@svgalib.org> | |||
| 9049 | L: platform-driver-x86@vger.kernel.org | 9049 | L: platform-driver-x86@vger.kernel.org |
| 9050 | S: Maintained | 9050 | S: Maintained |
| 9051 | F: Documentation/ABI/testing/sysfs-platform-lg-laptop | 9051 | F: Documentation/ABI/testing/sysfs-platform-lg-laptop |
| 9052 | F: Documentation/laptops/lg-laptop.rst | 9052 | F: Documentation/admin-guide/laptops/lg-laptop.rst |
| 9053 | F: drivers/platform/x86/lg-laptop.c | 9053 | F: drivers/platform/x86/lg-laptop.c |
| 9054 | 9054 | ||
| 9055 | LG2160 MEDIA DRIVER | 9055 | LG2160 MEDIA DRIVER |
| @@ -9418,7 +9418,7 @@ M: "Richard Russon (FlatCap)" <ldm@flatcap.org> | |||
| 9418 | L: linux-ntfs-dev@lists.sourceforge.net | 9418 | L: linux-ntfs-dev@lists.sourceforge.net |
| 9419 | W: http://www.linux-ntfs.org/content/view/19/37/ | 9419 | W: http://www.linux-ntfs.org/content/view/19/37/ |
| 9420 | S: Maintained | 9420 | S: Maintained |
| 9421 | F: Documentation/ldm.txt | 9421 | F: Documentation/admin-guide/ldm.rst |
| 9422 | F: block/partitions/ldm.* | 9422 | F: block/partitions/ldm.* |
| 9423 | 9423 | ||
| 9424 | LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) | 9424 | LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) |
| @@ -10380,7 +10380,7 @@ M: Johannes Thumshirn <morbidrsa@gmail.com> | |||
| 10380 | S: Maintained | 10380 | S: Maintained |
| 10381 | F: drivers/mcb/ | 10381 | F: drivers/mcb/ |
| 10382 | F: include/linux/mcb.h | 10382 | F: include/linux/mcb.h |
| 10383 | F: Documentation/men-chameleon-bus.txt | 10383 | F: Documentation/driver-api/men-chameleon-bus.rst |
| 10384 | 10384 | ||
| 10385 | MEN F21BMC (Board Management Controller) | 10385 | MEN F21BMC (Board Management Controller) |
| 10386 | M: Andreas Werner <andreas.werner@men.de> | 10386 | M: Andreas Werner <andreas.werner@men.de> |
| @@ -10794,7 +10794,7 @@ F: include/uapi/linux/meye.h | |||
| 10794 | MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD | 10794 | MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD |
| 10795 | M: Jiri Slaby <jirislaby@gmail.com> | 10795 | M: Jiri Slaby <jirislaby@gmail.com> |
| 10796 | S: Maintained | 10796 | S: Maintained |
| 10797 | F: Documentation/serial/moxa-smartio.rst | 10797 | F: Documentation/driver-api/serial/moxa-smartio.rst |
| 10798 | F: drivers/tty/mxser.* | 10798 | F: drivers/tty/mxser.* |
| 10799 | 10799 | ||
| 10800 | MR800 AVERMEDIA USB FM RADIO DRIVER | 10800 | MR800 AVERMEDIA USB FM RADIO DRIVER |
| @@ -11095,7 +11095,7 @@ M: Josef Bacik <josef@toxicpanda.com> | |||
| 11095 | S: Maintained | 11095 | S: Maintained |
| 11096 | L: linux-block@vger.kernel.org | 11096 | L: linux-block@vger.kernel.org |
| 11097 | L: nbd@other.debian.org | 11097 | L: nbd@other.debian.org |
| 11098 | F: Documentation/blockdev/nbd.txt | 11098 | F: Documentation/admin-guide/blockdev/nbd.rst |
| 11099 | F: drivers/block/nbd.c | 11099 | F: drivers/block/nbd.c |
| 11100 | F: include/trace/events/nbd.h | 11100 | F: include/trace/events/nbd.h |
| 11101 | F: include/uapi/linux/nbd.h | 11101 | F: include/uapi/linux/nbd.h |
| @@ -11554,7 +11554,7 @@ F: arch/powerpc/include/asm/pnv-ocxl.h | |||
| 11554 | F: drivers/misc/ocxl/ | 11554 | F: drivers/misc/ocxl/ |
| 11555 | F: include/misc/ocxl* | 11555 | F: include/misc/ocxl* |
| 11556 | F: include/uapi/misc/ocxl.h | 11556 | F: include/uapi/misc/ocxl.h |
| 11557 | F: Documentation/accelerators/ocxl.rst | 11557 | F: Documentation/userspace-api/accelerators/ocxl.rst |
| 11558 | 11558 | ||
| 11559 | OMAP AUDIO SUPPORT | 11559 | OMAP AUDIO SUPPORT |
| 11560 | M: Peter Ujfalusi <peter.ujfalusi@ti.com> | 11560 | M: Peter Ujfalusi <peter.ujfalusi@ti.com> |
| @@ -11590,7 +11590,7 @@ L: linux-omap@vger.kernel.org | |||
| 11590 | L: linux-fbdev@vger.kernel.org | 11590 | L: linux-fbdev@vger.kernel.org |
| 11591 | S: Orphan | 11591 | S: Orphan |
| 11592 | F: drivers/video/fbdev/omap2/ | 11592 | F: drivers/video/fbdev/omap2/ |
| 11593 | F: Documentation/arm/OMAP/DSS | 11593 | F: Documentation/arm/omap/dss.rst |
| 11594 | 11594 | ||
| 11595 | OMAP FRAMEBUFFER SUPPORT | 11595 | OMAP FRAMEBUFFER SUPPORT |
| 11596 | L: linux-fbdev@vger.kernel.org | 11596 | L: linux-fbdev@vger.kernel.org |
| @@ -12077,7 +12077,7 @@ PARALLEL LCD/KEYPAD PANEL DRIVER | |||
| 12077 | M: Willy Tarreau <willy@haproxy.com> | 12077 | M: Willy Tarreau <willy@haproxy.com> |
| 12078 | M: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> | 12078 | M: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> |
| 12079 | S: Odd Fixes | 12079 | S: Odd Fixes |
| 12080 | F: Documentation/auxdisplay/lcd-panel-cgram.txt | 12080 | F: Documentation/admin-guide/lcd-panel-cgram.rst |
| 12081 | F: drivers/auxdisplay/panel.c | 12081 | F: drivers/auxdisplay/panel.c |
| 12082 | 12082 | ||
| 12083 | PARALLEL PORT SUBSYSTEM | 12083 | PARALLEL PORT SUBSYSTEM |
| @@ -12089,7 +12089,7 @@ F: drivers/parport/ | |||
| 12089 | F: include/linux/parport*.h | 12089 | F: include/linux/parport*.h |
| 12090 | F: drivers/char/ppdev.c | 12090 | F: drivers/char/ppdev.c |
| 12091 | F: include/uapi/linux/ppdev.h | 12091 | F: include/uapi/linux/ppdev.h |
| 12092 | F: Documentation/parport*.txt | 12092 | F: Documentation/driver-api/parport*.rst |
| 12093 | 12093 | ||
| 12094 | PARAVIRT_OPS INTERFACE | 12094 | PARAVIRT_OPS INTERFACE |
| 12095 | M: Juergen Gross <jgross@suse.com> | 12095 | M: Juergen Gross <jgross@suse.com> |
| @@ -12105,7 +12105,7 @@ PARIDE DRIVERS FOR PARALLEL PORT IDE DEVICES | |||
| 12105 | M: Tim Waugh <tim@cyberelk.net> | 12105 | M: Tim Waugh <tim@cyberelk.net> |
| 12106 | L: linux-parport@lists.infradead.org (subscribers-only) | 12106 | L: linux-parport@lists.infradead.org (subscribers-only) |
| 12107 | S: Maintained | 12107 | S: Maintained |
| 12108 | F: Documentation/blockdev/paride.txt | 12108 | F: Documentation/admin-guide/blockdev/paride.rst |
| 12109 | F: drivers/block/paride/ | 12109 | F: drivers/block/paride/ |
| 12110 | 12110 | ||
| 12111 | PARISC ARCHITECTURE | 12111 | PARISC ARCHITECTURE |
| @@ -12264,7 +12264,7 @@ M: Kurt Schwemmer <kurt.schwemmer@microsemi.com> | |||
| 12264 | M: Logan Gunthorpe <logang@deltatee.com> | 12264 | M: Logan Gunthorpe <logang@deltatee.com> |
| 12265 | L: linux-pci@vger.kernel.org | 12265 | L: linux-pci@vger.kernel.org |
| 12266 | S: Maintained | 12266 | S: Maintained |
| 12267 | F: Documentation/switchtec.txt | 12267 | F: Documentation/driver-api/switchtec.rst |
| 12268 | F: Documentation/ABI/testing/sysfs-class-switchtec | 12268 | F: Documentation/ABI/testing/sysfs-class-switchtec |
| 12269 | F: drivers/pci/switch/switchtec* | 12269 | F: drivers/pci/switch/switchtec* |
| 12270 | F: include/uapi/linux/switchtec_ioctl.h | 12270 | F: include/uapi/linux/switchtec_ioctl.h |
| @@ -13036,7 +13036,7 @@ M: Thierry Reding <thierry.reding@gmail.com> | |||
| 13036 | L: linux-pwm@vger.kernel.org | 13036 | L: linux-pwm@vger.kernel.org |
| 13037 | S: Maintained | 13037 | S: Maintained |
| 13038 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git | 13038 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git |
| 13039 | F: Documentation/pwm.txt | 13039 | F: Documentation/driver-api/pwm.rst |
| 13040 | F: Documentation/devicetree/bindings/pwm/ | 13040 | F: Documentation/devicetree/bindings/pwm/ |
| 13041 | F: include/linux/pwm.h | 13041 | F: include/linux/pwm.h |
| 13042 | F: drivers/pwm/ | 13042 | F: drivers/pwm/ |
| @@ -13397,7 +13397,7 @@ F: drivers/net/wireless/ralink/rt2x00/ | |||
| 13397 | RAMDISK RAM BLOCK DEVICE DRIVER | 13397 | RAMDISK RAM BLOCK DEVICE DRIVER |
| 13398 | M: Jens Axboe <axboe@kernel.dk> | 13398 | M: Jens Axboe <axboe@kernel.dk> |
| 13399 | S: Maintained | 13399 | S: Maintained |
| 13400 | F: Documentation/blockdev/ramdisk.txt | 13400 | F: Documentation/admin-guide/blockdev/ramdisk.rst |
| 13401 | F: drivers/block/brd.c | 13401 | F: drivers/block/brd.c |
| 13402 | 13402 | ||
| 13403 | RANCHU VIRTUAL BOARD FOR MIPS | 13403 | RANCHU VIRTUAL BOARD FOR MIPS |
| @@ -13506,7 +13506,7 @@ Q: http://patchwork.ozlabs.org/project/rtc-linux/list/ | |||
| 13506 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git | 13506 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git |
| 13507 | S: Maintained | 13507 | S: Maintained |
| 13508 | F: Documentation/devicetree/bindings/rtc/ | 13508 | F: Documentation/devicetree/bindings/rtc/ |
| 13509 | F: Documentation/rtc.txt | 13509 | F: Documentation/admin-guide/rtc.rst |
| 13510 | F: drivers/rtc/ | 13510 | F: drivers/rtc/ |
| 13511 | F: include/linux/rtc.h | 13511 | F: include/linux/rtc.h |
| 13512 | F: include/uapi/linux/rtc.h | 13512 | F: include/uapi/linux/rtc.h |
| @@ -13650,7 +13650,7 @@ W: http://wireless.kernel.org/ | |||
| 13650 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git | 13650 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git |
| 13651 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git | 13651 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git |
| 13652 | S: Maintained | 13652 | S: Maintained |
| 13653 | F: Documentation/rfkill.txt | 13653 | F: Documentation/driver-api/rfkill.rst |
| 13654 | F: Documentation/ABI/stable/sysfs-class-rfkill | 13654 | F: Documentation/ABI/stable/sysfs-class-rfkill |
| 13655 | F: net/rfkill/ | 13655 | F: net/rfkill/ |
| 13656 | F: include/linux/rfkill.h | 13656 | F: include/linux/rfkill.h |
| @@ -13719,7 +13719,7 @@ ROCKETPORT DRIVER | |||
| 13719 | P: Comtrol Corp. | 13719 | P: Comtrol Corp. |
| 13720 | W: http://www.comtrol.com | 13720 | W: http://www.comtrol.com |
| 13721 | S: Maintained | 13721 | S: Maintained |
| 13722 | F: Documentation/serial/rocket.rst | 13722 | F: Documentation/driver-api/serial/rocket.rst |
| 13723 | F: drivers/tty/rocket* | 13723 | F: drivers/tty/rocket* |
| 13724 | 13724 | ||
| 13725 | ROCKETPORT EXPRESS/INFINITY DRIVER | 13725 | ROCKETPORT EXPRESS/INFINITY DRIVER |
| @@ -14113,7 +14113,7 @@ M: Sylwester Nawrocki <s.nawrocki@samsung.com> | |||
| 14113 | L: linux-kernel@vger.kernel.org | 14113 | L: linux-kernel@vger.kernel.org |
| 14114 | S: Supported | 14114 | S: Supported |
| 14115 | F: Documentation/devicetree/bindings/phy/samsung-phy.txt | 14115 | F: Documentation/devicetree/bindings/phy/samsung-phy.txt |
| 14116 | F: Documentation/phy/samsung-usb2.txt | 14116 | F: Documentation/driver-api/phy/samsung-usb2.rst |
| 14117 | F: drivers/phy/samsung/phy-exynos4210-usb2.c | 14117 | F: drivers/phy/samsung/phy-exynos4210-usb2.c |
| 14118 | F: drivers/phy/samsung/phy-exynos4x12-usb2.c | 14118 | F: drivers/phy/samsung/phy-exynos4x12-usb2.c |
| 14119 | F: drivers/phy/samsung/phy-exynos5250-usb2.c | 14119 | F: drivers/phy/samsung/phy-exynos5250-usb2.c |
| @@ -14419,7 +14419,7 @@ SGI SN-IA64 (Altix) SERIAL CONSOLE DRIVER | |||
| 14419 | M: Pat Gefre <pfg@sgi.com> | 14419 | M: Pat Gefre <pfg@sgi.com> |
| 14420 | L: linux-ia64@vger.kernel.org | 14420 | L: linux-ia64@vger.kernel.org |
| 14421 | S: Supported | 14421 | S: Supported |
| 14422 | F: Documentation/ia64/serial.txt | 14422 | F: Documentation/ia64/serial.rst |
| 14423 | F: drivers/tty/serial/ioc?_serial.c | 14423 | F: drivers/tty/serial/ioc?_serial.c |
| 14424 | F: include/linux/ioc?.h | 14424 | F: include/linux/ioc?.h |
| 14425 | 14425 | ||
| @@ -14925,7 +14925,7 @@ M: Mattia Dongili <malattia@linux.it> | |||
| 14925 | L: platform-driver-x86@vger.kernel.org | 14925 | L: platform-driver-x86@vger.kernel.org |
| 14926 | W: http://www.linux.it/~malattia/wiki/index.php/Sony_drivers | 14926 | W: http://www.linux.it/~malattia/wiki/index.php/Sony_drivers |
| 14927 | S: Maintained | 14927 | S: Maintained |
| 14928 | F: Documentation/laptops/sony-laptop.txt | 14928 | F: Documentation/admin-guide/laptops/sony-laptop.rst |
| 14929 | F: drivers/char/sonypi.c | 14929 | F: drivers/char/sonypi.c |
| 14930 | F: drivers/platform/x86/sony-laptop.c | 14930 | F: drivers/platform/x86/sony-laptop.c |
| 14931 | F: include/linux/sony-laptop.h | 14931 | F: include/linux/sony-laptop.h |
| @@ -15343,7 +15343,7 @@ SVGA HANDLING | |||
| 15343 | M: Martin Mares <mj@ucw.cz> | 15343 | M: Martin Mares <mj@ucw.cz> |
| 15344 | L: linux-video@atrey.karlin.mff.cuni.cz | 15344 | L: linux-video@atrey.karlin.mff.cuni.cz |
| 15345 | S: Maintained | 15345 | S: Maintained |
| 15346 | F: Documentation/svga.txt | 15346 | F: Documentation/admin-guide/svga.rst |
| 15347 | F: arch/x86/boot/video* | 15347 | F: arch/x86/boot/video* |
| 15348 | 15348 | ||
| 15349 | SWIOTLB SUBSYSTEM | 15349 | SWIOTLB SUBSYSTEM |
| @@ -15380,7 +15380,7 @@ F: drivers/dma-buf/dma-fence* | |||
| 15380 | F: drivers/dma-buf/sw_sync.c | 15380 | F: drivers/dma-buf/sw_sync.c |
| 15381 | F: include/linux/sync_file.h | 15381 | F: include/linux/sync_file.h |
| 15382 | F: include/uapi/linux/sync_file.h | 15382 | F: include/uapi/linux/sync_file.h |
| 15383 | F: Documentation/sync_file.txt | 15383 | F: Documentation/driver-api/sync_file.rst |
| 15384 | T: git git://anongit.freedesktop.org/drm/drm-misc | 15384 | T: git git://anongit.freedesktop.org/drm/drm-misc |
| 15385 | 15385 | ||
| 15386 | SYNOPSYS ARC ARCHITECTURE | 15386 | SYNOPSYS ARC ARCHITECTURE |
| @@ -16001,7 +16001,7 @@ F: sound/soc/codecs/isabelle* | |||
| 16001 | TI LP855x BACKLIGHT DRIVER | 16001 | TI LP855x BACKLIGHT DRIVER |
| 16002 | M: Milo Kim <milo.kim@ti.com> | 16002 | M: Milo Kim <milo.kim@ti.com> |
| 16003 | S: Maintained | 16003 | S: Maintained |
| 16004 | F: Documentation/backlight/lp855x-driver.txt | 16004 | F: Documentation/driver-api/backlight/lp855x-driver.rst |
| 16005 | F: drivers/video/backlight/lp855x_bl.c | 16005 | F: drivers/video/backlight/lp855x_bl.c |
| 16006 | F: include/linux/platform_data/lp855x.h | 16006 | F: include/linux/platform_data/lp855x.h |
| 16007 | 16007 | ||
| @@ -16265,7 +16265,7 @@ M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |||
| 16265 | M: Jiri Slaby <jslaby@suse.com> | 16265 | M: Jiri Slaby <jslaby@suse.com> |
| 16266 | S: Supported | 16266 | S: Supported |
| 16267 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git | 16267 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git |
| 16268 | F: Documentation/serial/ | 16268 | F: Documentation/driver-api/serial/ |
| 16269 | F: drivers/tty/ | 16269 | F: drivers/tty/ |
| 16270 | F: drivers/tty/serial/serial_core.c | 16270 | F: drivers/tty/serial/serial_core.c |
| 16271 | F: include/linux/serial_core.h | 16271 | F: include/linux/serial_core.h |
| @@ -16876,7 +16876,7 @@ R: Cornelia Huck <cohuck@redhat.com> | |||
| 16876 | L: kvm@vger.kernel.org | 16876 | L: kvm@vger.kernel.org |
| 16877 | T: git git://github.com/awilliam/linux-vfio.git | 16877 | T: git git://github.com/awilliam/linux-vfio.git |
| 16878 | S: Maintained | 16878 | S: Maintained |
| 16879 | F: Documentation/vfio.txt | 16879 | F: Documentation/driver-api/vfio.rst |
| 16880 | F: drivers/vfio/ | 16880 | F: drivers/vfio/ |
| 16881 | F: include/linux/vfio.h | 16881 | F: include/linux/vfio.h |
| 16882 | F: include/uapi/linux/vfio.h | 16882 | F: include/uapi/linux/vfio.h |
| @@ -16885,7 +16885,7 @@ VFIO MEDIATED DEVICE DRIVERS | |||
| 16885 | M: Kirti Wankhede <kwankhede@nvidia.com> | 16885 | M: Kirti Wankhede <kwankhede@nvidia.com> |
| 16886 | L: kvm@vger.kernel.org | 16886 | L: kvm@vger.kernel.org |
| 16887 | S: Maintained | 16887 | S: Maintained |
| 16888 | F: Documentation/vfio-mediated-device.txt | 16888 | F: Documentation/driver-api/vfio-mediated-device.rst |
| 16889 | F: drivers/vfio/mdev/ | 16889 | F: drivers/vfio/mdev/ |
| 16890 | F: include/linux/mdev.h | 16890 | F: include/linux/mdev.h |
| 16891 | F: samples/vfio-mdev/ | 16891 | F: samples/vfio-mdev/ |
| @@ -17760,7 +17760,7 @@ R: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> | |||
| 17760 | L: linux-kernel@vger.kernel.org | 17760 | L: linux-kernel@vger.kernel.org |
| 17761 | S: Maintained | 17761 | S: Maintained |
| 17762 | F: drivers/block/zram/ | 17762 | F: drivers/block/zram/ |
| 17763 | F: Documentation/blockdev/zram.txt | 17763 | F: Documentation/admin-guide/blockdev/zram.rst |
| 17764 | 17764 | ||
| 17765 | ZS DECSTATION Z85C30 SERIAL DRIVER | 17765 | ZS DECSTATION Z85C30 SERIAL DRIVER |
| 17766 | M: "Maciej W. Rozycki" <macro@linux-mips.org> | 17766 | M: "Maciej W. Rozycki" <macro@linux-mips.org> |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2bf1ce39a96d..600c5ba1af41 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -1297,7 +1297,7 @@ config SMP | |||
| 1297 | will run faster if you say N here. | 1297 | will run faster if you say N here. |
| 1298 | 1298 | ||
| 1299 | See also <file:Documentation/x86/i386/IO-APIC.rst>, | 1299 | See also <file:Documentation/x86/i386/IO-APIC.rst>, |
| 1300 | <file:Documentation/lockup-watchdogs.txt> and the SMP-HOWTO available at | 1300 | <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO available at |
| 1301 | <http://tldp.org/HOWTO/SMP-HOWTO.html>. | 1301 | <http://tldp.org/HOWTO/SMP-HOWTO.html>. |
| 1302 | 1302 | ||
| 1303 | If you don't know what to do here, say N. | 1303 | If you don't know what to do here, say N. |
| @@ -2036,7 +2036,7 @@ config CRASH_DUMP | |||
| 2036 | kdump/kexec. The crash dump kernel must be compiled to a | 2036 | kdump/kexec. The crash dump kernel must be compiled to a |
| 2037 | memory address not used by the main kernel | 2037 | memory address not used by the main kernel |
| 2038 | 2038 | ||
| 2039 | For more details see Documentation/kdump/kdump.rst | 2039 | For more details see Documentation/admin-guide/kdump/kdump.rst |
| 2040 | 2040 | ||
| 2041 | config AUTO_ZRELADDR | 2041 | config AUTO_ZRELADDR |
| 2042 | bool "Auto calculation of the decompressed kernel image address" | 2042 | bool "Auto calculation of the decompressed kernel image address" |
| @@ -2142,7 +2142,7 @@ config VFP | |||
| 2142 | Say Y to include VFP support code in the kernel. This is needed | 2142 | Say Y to include VFP support code in the kernel. This is needed |
| 2143 | if your hardware includes a VFP unit. | 2143 | if your hardware includes a VFP unit. |
| 2144 | 2144 | ||
| 2145 | Please see <file:Documentation/arm/VFP/release-notes.txt> for | 2145 | Please see <file:Documentation/arm/vfp/release-notes.rst> for |
| 2146 | release notes and additional status information. | 2146 | release notes and additional status information. |
| 2147 | 2147 | ||
| 2148 | Say N if your target does not have VFP hardware. | 2148 | Say N if your target does not have VFP hardware. |
diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c index e24ad60891b2..8a9aeeb504dd 100644 --- a/arch/arm/common/mcpm_entry.c +++ b/arch/arm/common/mcpm_entry.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | /* | 21 | /* |
| 22 | * The public API for this code is documented in arch/arm/include/asm/mcpm.h. | 22 | * The public API for this code is documented in arch/arm/include/asm/mcpm.h. |
| 23 | * For a comprehensive description of the main algorithm used here, please | 23 | * For a comprehensive description of the main algorithm used here, please |
| 24 | * see Documentation/arm/cluster-pm-race-avoidance.txt. | 24 | * see Documentation/arm/cluster-pm-race-avoidance.rst. |
| 25 | */ | 25 | */ |
| 26 | 26 | ||
| 27 | struct sync_struct mcpm_sync; | 27 | struct sync_struct mcpm_sync; |
diff --git a/arch/arm/common/mcpm_head.S b/arch/arm/common/mcpm_head.S index d5bd75dd576d..291d969bc719 100644 --- a/arch/arm/common/mcpm_head.S +++ b/arch/arm/common/mcpm_head.S | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Created by: Nicolas Pitre, March 2012 | 5 | * Created by: Nicolas Pitre, March 2012 |
| 6 | * Copyright: (C) 2012-2013 Linaro Limited | 6 | * Copyright: (C) 2012-2013 Linaro Limited |
| 7 | * | 7 | * |
| 8 | * Refer to Documentation/arm/cluster-pm-race-avoidance.txt | 8 | * Refer to Documentation/arm/cluster-pm-race-avoidance.rst |
| 9 | * for details of the synchronisation algorithms used here. | 9 | * for details of the synchronisation algorithms used here. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
diff --git a/arch/arm/common/vlock.S b/arch/arm/common/vlock.S index 9675cc15d0c4..f1c7fd44f1b1 100644 --- a/arch/arm/common/vlock.S +++ b/arch/arm/common/vlock.S | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Copyright: (C) 2012-2013 Linaro Limited | 6 | * Copyright: (C) 2012-2013 Linaro Limited |
| 7 | * | 7 | * |
| 8 | * This algorithm is described in more detail in | 8 | * This algorithm is described in more detail in |
| 9 | * Documentation/arm/vlocks.txt. | 9 | * Documentation/arm/vlocks.rst. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index 77e5582c2259..67d20712cb48 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Copyright (C) 1997-1999 Russell King | 5 | * Copyright (C) 1997-1999 Russell King |
| 6 | * | 6 | * |
| 7 | * Structure passed to kernel to tell it about the | 7 | * Structure passed to kernel to tell it about the |
| 8 | * hardware it's running on. See Documentation/arm/Setup | 8 | * hardware it's running on. See Documentation/arm/setup.rst |
| 9 | * for more info. | 9 | * for more info. |
| 10 | */ | 10 | */ |
| 11 | #ifndef __ASMARM_SETUP_H | 11 | #ifndef __ASMARM_SETUP_H |
diff --git a/arch/arm/include/uapi/asm/setup.h b/arch/arm/include/uapi/asm/setup.h index 6b335a9ff8c8..25ceda63b284 100644 --- a/arch/arm/include/uapi/asm/setup.h +++ b/arch/arm/include/uapi/asm/setup.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
| 10 | * | 10 | * |
| 11 | * Structure passed to kernel to tell it about the | 11 | * Structure passed to kernel to tell it about the |
| 12 | * hardware it's running on. See Documentation/arm/Setup | 12 | * hardware it's running on. See Documentation/arm/setup.rst |
| 13 | * for more info. | 13 | * for more info. |
| 14 | */ | 14 | */ |
| 15 | #ifndef _UAPI__ASMARM_SETUP_H | 15 | #ifndef _UAPI__ASMARM_SETUP_H |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 0b8cfdd60b90..858d4e541532 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
| @@ -826,7 +826,7 @@ ENDPROC(__switch_to) | |||
| 826 | * existing ones. This mechanism should be used only for things that are | 826 | * existing ones. This mechanism should be used only for things that are |
| 827 | * really small and justified, and not be abused freely. | 827 | * really small and justified, and not be abused freely. |
| 828 | * | 828 | * |
| 829 | * See Documentation/arm/kernel_user_helpers.txt for formal definitions. | 829 | * See Documentation/arm/kernel_user_helpers.rst for formal definitions. |
| 830 | */ | 830 | */ |
| 831 | THUMB( .arm ) | 831 | THUMB( .arm ) |
| 832 | 832 | ||
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index c93356a8d662..56411bb63d45 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h | |||
| @@ -106,7 +106,7 @@ void exynos_firmware_init(void); | |||
| 106 | #define C2_STATE (1 << 3) | 106 | #define C2_STATE (1 << 3) |
| 107 | /* | 107 | /* |
| 108 | * Magic values for bootloader indicating chosen low power mode. | 108 | * Magic values for bootloader indicating chosen low power mode. |
| 109 | * See also Documentation/arm/Samsung/Bootloader-interface.txt | 109 | * See also Documentation/arm/samsung/bootloader-interface.rst |
| 110 | */ | 110 | */ |
| 111 | #define EXYNOS_SLEEP_MAGIC 0x00000bad | 111 | #define EXYNOS_SLEEP_MAGIC 0x00000bad |
| 112 | #define EXYNOS_AFTR_MAGIC 0xfcba0d10 | 112 | #define EXYNOS_AFTR_MAGIC 0xfcba0d10 |
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig index fc5378b00f3d..f7211b57b1e7 100644 --- a/arch/arm/mach-ixp4xx/Kconfig +++ b/arch/arm/mach-ixp4xx/Kconfig | |||
| @@ -33,7 +33,7 @@ config MACH_AVILA | |||
| 33 | help | 33 | help |
| 34 | Say 'Y' here if you want your kernel to support the Gateworks | 34 | Say 'Y' here if you want your kernel to support the Gateworks |
| 35 | Avila Network Platform. For more information on this platform, | 35 | Avila Network Platform. For more information on this platform, |
| 36 | see <file:Documentation/arm/IXP4xx>. | 36 | see <file:Documentation/arm/ixp4xx.rst>. |
| 37 | 37 | ||
| 38 | config MACH_LOFT | 38 | config MACH_LOFT |
| 39 | bool "Loft" | 39 | bool "Loft" |
| @@ -49,7 +49,7 @@ config ARCH_ADI_COYOTE | |||
| 49 | help | 49 | help |
| 50 | Say 'Y' here if you want your kernel to support the ADI | 50 | Say 'Y' here if you want your kernel to support the ADI |
| 51 | Engineering Coyote Gateway Reference Platform. For more | 51 | Engineering Coyote Gateway Reference Platform. For more |
| 52 | information on this platform, see <file:Documentation/arm/IXP4xx>. | 52 | information on this platform, see <file:Documentation/arm/ixp4xx.rst>. |
| 53 | 53 | ||
| 54 | config MACH_GATEWAY7001 | 54 | config MACH_GATEWAY7001 |
| 55 | bool "Gateway 7001" | 55 | bool "Gateway 7001" |
| @@ -72,21 +72,21 @@ config ARCH_IXDP425 | |||
| 72 | help | 72 | help |
| 73 | Say 'Y' here if you want your kernel to support Intel's | 73 | Say 'Y' here if you want your kernel to support Intel's |
| 74 | IXDP425 Development Platform (Also known as Richfield). | 74 | IXDP425 Development Platform (Also known as Richfield). |
| 75 | For more information on this platform, see <file:Documentation/arm/IXP4xx>. | 75 | For more information on this platform, see <file:Documentation/arm/ixp4xx.rst>. |
| 76 | 76 | ||
| 77 | config MACH_IXDPG425 | 77 | config MACH_IXDPG425 |
| 78 | bool "IXDPG425" | 78 | bool "IXDPG425" |
| 79 | help | 79 | help |
| 80 | Say 'Y' here if you want your kernel to support Intel's | 80 | Say 'Y' here if you want your kernel to support Intel's |
| 81 | IXDPG425 Development Platform (Also known as Montajade). | 81 | IXDPG425 Development Platform (Also known as Montajade). |
| 82 | For more information on this platform, see <file:Documentation/arm/IXP4xx>. | 82 | For more information on this platform, see <file:Documentation/arm/ixp4xx.rst>. |
| 83 | 83 | ||
| 84 | config MACH_IXDP465 | 84 | config MACH_IXDP465 |
| 85 | bool "IXDP465" | 85 | bool "IXDP465" |
| 86 | help | 86 | help |
| 87 | Say 'Y' here if you want your kernel to support Intel's | 87 | Say 'Y' here if you want your kernel to support Intel's |
| 88 | IXDP465 Development Platform (Also known as BMP). | 88 | IXDP465 Development Platform (Also known as BMP). |
| 89 | For more information on this platform, see <file:Documentation/arm/IXP4xx>. | 89 | For more information on this platform, see <file:Documentation/arm/ixp4xx.rst>. |
| 90 | 90 | ||
| 91 | config MACH_GORAMO_MLR | 91 | config MACH_GORAMO_MLR |
| 92 | bool "GORAMO Multi Link Router" | 92 | bool "GORAMO Multi Link Router" |
| @@ -99,7 +99,7 @@ config MACH_KIXRP435 | |||
| 99 | help | 99 | help |
| 100 | Say 'Y' here if you want your kernel to support Intel's | 100 | Say 'Y' here if you want your kernel to support Intel's |
| 101 | KIXRP435 Reference Platform. | 101 | KIXRP435 Reference Platform. |
| 102 | For more information on this platform, see <file:Documentation/arm/IXP4xx>. | 102 | For more information on this platform, see <file:Documentation/arm/ixp4xx.rst>. |
| 103 | 103 | ||
| 104 | # | 104 | # |
| 105 | # IXCDP1100 is the exact same HW as IXDP425, but with a different machine | 105 | # IXCDP1100 is the exact same HW as IXDP425, but with a different machine |
| @@ -116,7 +116,7 @@ config ARCH_PRPMC1100 | |||
| 116 | help | 116 | help |
| 117 | Say 'Y' here if you want your kernel to support the Motorola | 117 | Say 'Y' here if you want your kernel to support the Motorola |
| 118 | PrPCM1100 Processor Mezanine Module. For more information on | 118 | PrPCM1100 Processor Mezanine Module. For more information on |
| 119 | this platform, see <file:Documentation/arm/IXP4xx>. | 119 | this platform, see <file:Documentation/arm/ixp4xx.rst>. |
| 120 | 120 | ||
| 121 | config MACH_NAS100D | 121 | config MACH_NAS100D |
| 122 | bool | 122 | bool |
diff --git a/arch/arm/mach-s3c24xx/pm.c b/arch/arm/mach-s3c24xx/pm.c index adcb90645460..c64988c609ad 100644 --- a/arch/arm/mach-s3c24xx/pm.c +++ b/arch/arm/mach-s3c24xx/pm.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | // | 5 | // |
| 6 | // S3C24XX Power Manager (Suspend-To-RAM) support | 6 | // S3C24XX Power Manager (Suspend-To-RAM) support |
| 7 | // | 7 | // |
| 8 | // See Documentation/arm/Samsung-S3C24XX/Suspend.txt for more information | 8 | // See Documentation/arm/samsung-s3c24xx/suspend.rst for more information |
| 9 | // | 9 | // |
| 10 | // Parts based on arch/arm/mach-pxa/pm.c | 10 | // Parts based on arch/arm/mach-pxa/pm.c |
| 11 | // | 11 | // |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index cc798115aa9b..820b60a50125 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
| @@ -709,7 +709,7 @@ config ARM_VIRT_EXT | |||
| 709 | assistance. | 709 | assistance. |
| 710 | 710 | ||
| 711 | A compliant bootloader is required in order to make maximum | 711 | A compliant bootloader is required in order to make maximum |
| 712 | use of this feature. Refer to Documentation/arm/Booting for | 712 | use of this feature. Refer to Documentation/arm/booting.rst for |
| 713 | details. | 713 | details. |
| 714 | 714 | ||
| 715 | config SWP_EMULATE | 715 | config SWP_EMULATE |
| @@ -875,7 +875,7 @@ config KUSER_HELPERS | |||
| 875 | the CPU type fitted to the system. This permits binaries to be | 875 | the CPU type fitted to the system. This permits binaries to be |
| 876 | run on ARMv4 through to ARMv7 without modification. | 876 | run on ARMv4 through to ARMv7 without modification. |
| 877 | 877 | ||
| 878 | See Documentation/arm/kernel_user_helpers.txt for details. | 878 | See Documentation/arm/kernel_user_helpers.rst for details. |
| 879 | 879 | ||
| 880 | However, the fixed address nature of these helpers can be used | 880 | However, the fixed address nature of these helpers can be used |
| 881 | by ROP (return orientated programming) authors when creating | 881 | by ROP (return orientated programming) authors when creating |
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 53da57fba39c..301e572651c0 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
| @@ -243,7 +243,7 @@ config SAMSUNG_PM_DEBUG | |||
| 243 | depends on DEBUG_EXYNOS_UART || DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART | 243 | depends on DEBUG_EXYNOS_UART || DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART |
| 244 | help | 244 | help |
| 245 | Say Y here if you want verbose debugging from the PM Suspend and | 245 | Say Y here if you want verbose debugging from the PM Suspend and |
| 246 | Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> | 246 | Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst> |
| 247 | for more information. | 247 | for more information. |
| 248 | 248 | ||
| 249 | config S3C_PM_DEBUG_LED_SMDK | 249 | config S3C_PM_DEBUG_LED_SMDK |
| @@ -268,7 +268,7 @@ config SAMSUNG_PM_CHECK | |||
| 268 | Note, this can take several seconds depending on memory size | 268 | Note, this can take several seconds depending on memory size |
| 269 | and CPU speed. | 269 | and CPU speed. |
| 270 | 270 | ||
| 271 | See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> | 271 | See <file:Documentation/arm/samsung-s3c24xx/suspend.rst> |
| 272 | 272 | ||
| 273 | config SAMSUNG_PM_CHECK_CHUNKSIZE | 273 | config SAMSUNG_PM_CHECK_CHUNKSIZE |
| 274 | int "S3C2410 PM Suspend CRC Chunksize (KiB)" | 274 | int "S3C2410 PM Suspend CRC Chunksize (KiB)" |
| @@ -280,7 +280,7 @@ config SAMSUNG_PM_CHECK_CHUNKSIZE | |||
| 280 | the CRC data block will take more memory, but will identify any | 280 | the CRC data block will take more memory, but will identify any |
| 281 | faults with better precision. | 281 | faults with better precision. |
| 282 | 282 | ||
| 283 | See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> | 283 | See <file:Documentation/arm/samsung-s3c24xx/suspend.rst> |
| 284 | 284 | ||
| 285 | config SAMSUNG_WAKEMASK | 285 | config SAMSUNG_WAKEMASK |
| 286 | bool | 286 | bool |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 4eac94c1eb6f..9e74c7ff6b04 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | # http://www.arm.linux.org.uk/developer/machines/download.php | 7 | # http://www.arm.linux.org.uk/developer/machines/download.php |
| 8 | # | 8 | # |
| 9 | # Please do not send patches to this file; it is automatically generated! | 9 | # Please do not send patches to this file; it is automatically generated! |
| 10 | # To add an entry into this database, please see Documentation/arm/README, | 10 | # To add an entry into this database, please see Documentation/arm/arm.rst, |
| 11 | # or visit: | 11 | # or visit: |
| 12 | # | 12 | # |
| 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index a36ff61321ce..86f81b5afd95 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
| @@ -996,7 +996,7 @@ config CRASH_DUMP | |||
| 996 | reserved region and then later executed after a crash by | 996 | reserved region and then later executed after a crash by |
| 997 | kdump/kexec. | 997 | kdump/kexec. |
| 998 | 998 | ||
| 999 | For more details see Documentation/kdump/kdump.rst | 999 | For more details see Documentation/admin-guide/kdump/kdump.rst |
| 1000 | 1000 | ||
| 1001 | config XEN_DOM0 | 1001 | config XEN_DOM0 |
| 1002 | def_bool y | 1002 | def_bool y |
| @@ -1142,7 +1142,7 @@ config KUSER_HELPERS | |||
| 1142 | the system. This permits binaries to be run on ARMv4 through | 1142 | the system. This permits binaries to be run on ARMv4 through |
| 1143 | to ARMv8 without modification. | 1143 | to ARMv8 without modification. |
| 1144 | 1144 | ||
| 1145 | See Documentation/arm/kernel_user_helpers.txt for details. | 1145 | See Documentation/arm/kernel_user_helpers.rst for details. |
| 1146 | 1146 | ||
| 1147 | However, the fixed address nature of these helpers can be used | 1147 | However, the fixed address nature of these helpers can be used |
| 1148 | by ROP (return orientated programming) authors when creating | 1148 | by ROP (return orientated programming) authors when creating |
diff --git a/arch/arm64/kernel/kuser32.S b/arch/arm64/kernel/kuser32.S index 49825e9e421e..42bd8c0c60e0 100644 --- a/arch/arm64/kernel/kuser32.S +++ b/arch/arm64/kernel/kuser32.S | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * aarch32_setup_additional_pages() and are provided for compatibility | 10 | * aarch32_setup_additional_pages() and are provided for compatibility |
| 11 | * reasons with 32 bit (aarch32) applications that need them. | 11 | * reasons with 32 bit (aarch32) applications that need them. |
| 12 | * | 12 | * |
| 13 | * See Documentation/arm/kernel_user_helpers.txt for formal definitions. | 13 | * See Documentation/arm/kernel_user_helpers.rst for formal definitions. |
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | #include <asm/unistd.h> | 16 | #include <asm/unistd.h> |
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 8f106638913c..3795d18276c4 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
| @@ -852,7 +852,7 @@ valid_phys_addr_range (phys_addr_t phys_addr, unsigned long size) | |||
| 852 | * /dev/mem reads and writes use copy_to_user(), which implicitly | 852 | * /dev/mem reads and writes use copy_to_user(), which implicitly |
| 853 | * uses a granule-sized kernel identity mapping. It's really | 853 | * uses a granule-sized kernel identity mapping. It's really |
| 854 | * only safe to do this for regions in kern_memmap. For more | 854 | * only safe to do this for regions in kern_memmap. For more |
| 855 | * details, see Documentation/ia64/aliasing.txt. | 855 | * details, see Documentation/ia64/aliasing.rst. |
| 856 | */ | 856 | */ |
| 857 | attr = kern_mem_attribute(phys_addr, size); | 857 | attr = kern_mem_attribute(phys_addr, size); |
| 858 | if (attr & EFI_MEMORY_WB || attr & EFI_MEMORY_UC) | 858 | if (attr & EFI_MEMORY_WB || attr & EFI_MEMORY_UC) |
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S index d80c99a5f55d..0750a716adc7 100644 --- a/arch/ia64/kernel/fsys.S +++ b/arch/ia64/kernel/fsys.S | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | #include <asm/native/inst.h> | 28 | #include <asm/native/inst.h> |
| 29 | 29 | ||
| 30 | /* | 30 | /* |
| 31 | * See Documentation/ia64/fsys.txt for details on fsyscalls. | 31 | * See Documentation/ia64/fsys.rst for details on fsyscalls. |
| 32 | * | 32 | * |
| 33 | * On entry to an fsyscall handler: | 33 | * On entry to an fsyscall handler: |
| 34 | * r10 = 0 (i.e., defaults to "successful syscall return") | 34 | * r10 = 0 (i.e., defaults to "successful syscall return") |
diff --git a/arch/ia64/mm/ioremap.c b/arch/ia64/mm/ioremap.c index 5e3e7b1fdac5..0c0de2c4ec69 100644 --- a/arch/ia64/mm/ioremap.c +++ b/arch/ia64/mm/ioremap.c | |||
| @@ -42,7 +42,7 @@ ioremap (unsigned long phys_addr, unsigned long size) | |||
| 42 | /* | 42 | /* |
| 43 | * For things in kern_memmap, we must use the same attribute | 43 | * For things in kern_memmap, we must use the same attribute |
| 44 | * as the rest of the kernel. For more details, see | 44 | * as the rest of the kernel. For more details, see |
| 45 | * Documentation/ia64/aliasing.txt. | 45 | * Documentation/ia64/aliasing.rst. |
| 46 | */ | 46 | */ |
| 47 | attr = kern_mem_attribute(phys_addr, size); | 47 | attr = kern_mem_attribute(phys_addr, size); |
| 48 | if (attr & EFI_MEMORY_WB) | 48 | if (attr & EFI_MEMORY_WB) |
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index e308196c2229..165e561dc81a 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
| @@ -450,7 +450,7 @@ pci_mmap_legacy_page_range(struct pci_bus *bus, struct vm_area_struct *vma, | |||
| 450 | return -ENOSYS; | 450 | return -ENOSYS; |
| 451 | 451 | ||
| 452 | /* | 452 | /* |
| 453 | * Avoid attribute aliasing. See Documentation/ia64/aliasing.txt | 453 | * Avoid attribute aliasing. See Documentation/ia64/aliasing.rst |
| 454 | * for more details. | 454 | * for more details. |
| 455 | */ | 455 | */ |
| 456 | if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size)) | 456 | if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size)) |
diff --git a/arch/mips/bmips/setup.c b/arch/mips/bmips/setup.c index 1738a06396f9..2f81a94c71a6 100644 --- a/arch/mips/bmips/setup.c +++ b/arch/mips/bmips/setup.c | |||
| @@ -162,7 +162,7 @@ void __init plat_mem_setup(void) | |||
| 162 | ioport_resource.start = 0; | 162 | ioport_resource.start = 0; |
| 163 | ioport_resource.end = ~0; | 163 | ioport_resource.end = ~0; |
| 164 | 164 | ||
| 165 | /* intended to somewhat resemble ARM; see Documentation/arm/Booting */ | 165 | /* intended to somewhat resemble ARM; see Documentation/arm/booting.rst */ |
| 166 | if (fw_arg0 == 0 && fw_arg1 == 0xffffffff) | 166 | if (fw_arg0 == 0 && fw_arg1 == 0xffffffff) |
| 167 | dtb = phys_to_virt(fw_arg2); | 167 | dtb = phys_to_virt(fw_arg2); |
| 168 | else if (fw_passed_dtb) /* UHI interface or appended dtb */ | 168 | else if (fw_passed_dtb) /* UHI interface or appended dtb */ |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 42875ff15671..6d732e451071 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
| @@ -277,7 +277,7 @@ config SMP | |||
| 277 | machines, but will use only one CPU of a multiprocessor machine. | 277 | machines, but will use only one CPU of a multiprocessor machine. |
| 278 | On a uniprocessor machine, the kernel will run faster if you say N. | 278 | On a uniprocessor machine, the kernel will run faster if you say N. |
| 279 | 279 | ||
| 280 | See also <file:Documentation/lockup-watchdogs.txt> and the SMP-HOWTO | 280 | See also <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO |
| 281 | available at <http://www.tldp.org/docs.html#howto>. | 281 | available at <http://www.tldp.org/docs.html#howto>. |
| 282 | 282 | ||
| 283 | If you don't know what to do here, say N. | 283 | If you don't know what to do here, say N. |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 31a7d12db705..6b1b5941b618 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
| @@ -626,7 +626,7 @@ config CRASH_DUMP | |||
| 626 | to a memory address not used by the main kernel using | 626 | to a memory address not used by the main kernel using |
| 627 | PHYSICAL_START. | 627 | PHYSICAL_START. |
| 628 | 628 | ||
| 629 | For more details see Documentation/kdump/kdump.rst | 629 | For more details see Documentation/admin-guide/kdump/kdump.rst |
| 630 | 630 | ||
| 631 | config KEXEC_JUMP | 631 | config KEXEC_JUMP |
| 632 | bool "kexec jump (EXPERIMENTAL)" | 632 | bool "kexec jump (EXPERIMENTAL)" |
| @@ -679,7 +679,7 @@ config SMP | |||
| 679 | People using multiprocessor machines who say Y here should also say | 679 | People using multiprocessor machines who say Y here should also say |
| 680 | Y to "Enhanced Real Time Clock Support", below. | 680 | Y to "Enhanced Real Time Clock Support", below. |
| 681 | 681 | ||
| 682 | See also <file:Documentation/lockup-watchdogs.txt> and the SMP-HOWTO | 682 | See also <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO |
| 683 | available at <http://www.tldp.org/docs.html#howto>. | 683 | available at <http://www.tldp.org/docs.html#howto>. |
| 684 | 684 | ||
| 685 | If you don't know what to do here, say N. | 685 | If you don't know what to do here, say N. |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index e9f5d62e9817..7926a2e11bdc 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
| @@ -180,7 +180,7 @@ config SMP | |||
| 180 | Y to "Enhanced Real Time Clock Support", below. The "Advanced Power | 180 | Y to "Enhanced Real Time Clock Support", below. The "Advanced Power |
| 181 | Management" code will be disabled if you say Y here. | 181 | Management" code will be disabled if you say Y here. |
| 182 | 182 | ||
| 183 | See also <file:Documentation/lockup-watchdogs.txt> and the SMP-HOWTO | 183 | See also <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO |
| 184 | available at <http://www.tldp.org/docs.html#howto>. | 184 | available at <http://www.tldp.org/docs.html#howto>. |
| 185 | 185 | ||
| 186 | If you don't know what to do here, say N. | 186 | If you don't know what to do here, say N. |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 879741336771..57d3b5d96bd2 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
| @@ -402,7 +402,7 @@ config SMP | |||
| 402 | Management" code will be disabled if you say Y here. | 402 | Management" code will be disabled if you say Y here. |
| 403 | 403 | ||
| 404 | See also <file:Documentation/x86/i386/IO-APIC.rst>, | 404 | See also <file:Documentation/x86/i386/IO-APIC.rst>, |
| 405 | <file:Documentation/lockup-watchdogs.txt> and the SMP-HOWTO available at | 405 | <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO available at |
| 406 | <http://www.tldp.org/docs.html#howto>. | 406 | <http://www.tldp.org/docs.html#howto>. |
| 407 | 407 | ||
| 408 | If you don't know what to do here, say N. | 408 | If you don't know what to do here, say N. |
| @@ -1959,7 +1959,7 @@ config EFI_STUB | |||
| 1959 | This kernel feature allows a bzImage to be loaded directly | 1959 | This kernel feature allows a bzImage to be loaded directly |
| 1960 | by EFI firmware without the use of a bootloader. | 1960 | by EFI firmware without the use of a bootloader. |
| 1961 | 1961 | ||
| 1962 | See Documentation/efi-stub.txt for more information. | 1962 | See Documentation/admin-guide/efi-stub.rst for more information. |
| 1963 | 1963 | ||
| 1964 | config EFI_MIXED | 1964 | config EFI_MIXED |
| 1965 | bool "EFI mixed-mode support" | 1965 | bool "EFI mixed-mode support" |
| @@ -2057,7 +2057,7 @@ config CRASH_DUMP | |||
| 2057 | to a memory address not used by the main kernel or BIOS using | 2057 | to a memory address not used by the main kernel or BIOS using |
| 2058 | PHYSICAL_START, or it must be built as a relocatable image | 2058 | PHYSICAL_START, or it must be built as a relocatable image |
| 2059 | (CONFIG_RELOCATABLE=y). | 2059 | (CONFIG_RELOCATABLE=y). |
| 2060 | For more details see Documentation/kdump/kdump.rst | 2060 | For more details see Documentation/admin-guide/kdump/kdump.rst |
| 2061 | 2061 | ||
| 2062 | config KEXEC_JUMP | 2062 | config KEXEC_JUMP |
| 2063 | bool "kexec jump" | 2063 | bool "kexec jump" |
| @@ -2094,7 +2094,7 @@ config PHYSICAL_START | |||
| 2094 | the reserved region. In other words, it can be set based on | 2094 | the reserved region. In other words, it can be set based on |
| 2095 | the "X" value as specified in the "crashkernel=YM@XM" | 2095 | the "X" value as specified in the "crashkernel=YM@XM" |
| 2096 | command line boot parameter passed to the panic-ed | 2096 | command line boot parameter passed to the panic-ed |
| 2097 | kernel. Please take a look at Documentation/kdump/kdump.rst | 2097 | kernel. Please take a look at Documentation/admin-guide/kdump/kdump.rst |
| 2098 | for more details about crash dumps. | 2098 | for more details about crash dumps. |
| 2099 | 2099 | ||
| 2100 | Usage of bzImage for capturing the crash dump is recommended as | 2100 | Usage of bzImage for capturing the crash dump is recommended as |
diff --git a/arch/xtensa/include/asm/initialize_mmu.h b/arch/xtensa/include/asm/initialize_mmu.h index 323d05789159..3b054d2bede0 100644 --- a/arch/xtensa/include/asm/initialize_mmu.h +++ b/arch/xtensa/include/asm/initialize_mmu.h | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | #if XCHAL_HAVE_S32C1I && (XCHAL_HW_MIN_VERSION >= XTENSA_HWVERSION_RC_2009_0) | 42 | #if XCHAL_HAVE_S32C1I && (XCHAL_HW_MIN_VERSION >= XTENSA_HWVERSION_RC_2009_0) |
| 43 | /* | 43 | /* |
| 44 | * We Have Atomic Operation Control (ATOMCTL) Register; Initialize it. | 44 | * We Have Atomic Operation Control (ATOMCTL) Register; Initialize it. |
| 45 | * For details see Documentation/xtensa/atomctl.txt | 45 | * For details see Documentation/xtensa/atomctl.rst |
| 46 | */ | 46 | */ |
| 47 | #if XCHAL_DCACHE_IS_COHERENT | 47 | #if XCHAL_DCACHE_IS_COHERENT |
| 48 | movi a3, 0x25 /* For SMP/MX -- internal for writeback, | 48 | movi a3, 0x25 /* For SMP/MX -- internal for writeback, |
diff --git a/block/Kconfig b/block/Kconfig index 56cb1695cd87..8b5f8e560eb4 100644 --- a/block/Kconfig +++ b/block/Kconfig | |||
| @@ -89,7 +89,7 @@ config BLK_DEV_THROTTLING | |||
| 89 | one needs to mount and use blkio cgroup controller for creating | 89 | one needs to mount and use blkio cgroup controller for creating |
| 90 | cgroups and specifying per device IO rate policies. | 90 | cgroups and specifying per device IO rate policies. |
| 91 | 91 | ||
| 92 | See Documentation/cgroup-v1/blkio-controller.rst for more information. | 92 | See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information. |
| 93 | 93 | ||
| 94 | config BLK_DEV_THROTTLING_LOW | 94 | config BLK_DEV_THROTTLING_LOW |
| 95 | bool "Block throttling .low limit interface support (EXPERIMENTAL)" | 95 | bool "Block throttling .low limit interface support (EXPERIMENTAL)" |
| @@ -110,7 +110,7 @@ config BLK_CMDLINE_PARSER | |||
| 110 | which don't otherwise have any standardized method for listing the | 110 | which don't otherwise have any standardized method for listing the |
| 111 | partitions on a block device. | 111 | partitions on a block device. |
| 112 | 112 | ||
| 113 | See Documentation/block/cmdline-partition.txt for more information. | 113 | See Documentation/block/cmdline-partition.rst for more information. |
| 114 | 114 | ||
| 115 | config BLK_WBT | 115 | config BLK_WBT |
| 116 | bool "Enable support for block device writeback throttling" | 116 | bool "Enable support for block device writeback throttling" |
diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched index 7a6b2f29a582..b89310a022ad 100644 --- a/block/Kconfig.iosched +++ b/block/Kconfig.iosched | |||
| @@ -26,7 +26,7 @@ config IOSCHED_BFQ | |||
| 26 | regardless of the device parameters and with any workload. It | 26 | regardless of the device parameters and with any workload. It |
| 27 | also guarantees a low latency to interactive and soft | 27 | also guarantees a low latency to interactive and soft |
| 28 | real-time applications. Details in | 28 | real-time applications. Details in |
| 29 | Documentation/block/bfq-iosched.txt | 29 | Documentation/block/bfq-iosched.rst |
| 30 | 30 | ||
| 31 | config BFQ_GROUP_IOSCHED | 31 | config BFQ_GROUP_IOSCHED |
| 32 | bool "BFQ hierarchical scheduling support" | 32 | bool "BFQ hierarchical scheduling support" |
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 50c9d2598500..72860325245a 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * low-latency capabilities. BFQ also supports full hierarchical | 17 | * low-latency capabilities. BFQ also supports full hierarchical |
| 18 | * scheduling through cgroups. Next paragraphs provide an introduction | 18 | * scheduling through cgroups. Next paragraphs provide an introduction |
| 19 | * on BFQ inner workings. Details on BFQ benefits, usage and | 19 | * on BFQ inner workings. Details on BFQ benefits, usage and |
| 20 | * limitations can be found in Documentation/block/bfq-iosched.txt. | 20 | * limitations can be found in Documentation/block/bfq-iosched.rst. |
| 21 | * | 21 | * |
| 22 | * BFQ is a proportional-share storage-I/O scheduling algorithm based | 22 | * BFQ is a proportional-share storage-I/O scheduling algorithm based |
| 23 | * on the slice-by-slice service scheme of CFQ. But BFQ assigns | 23 | * on the slice-by-slice service scheme of CFQ. But BFQ assigns |
diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 825c9c070458..ca39b4624cf8 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c | |||
| @@ -383,7 +383,7 @@ static const struct blk_integrity_profile nop_profile = { | |||
| 383 | * send/receive integrity metadata it must use this function to register | 383 | * send/receive integrity metadata it must use this function to register |
| 384 | * the capability with the block layer. The template is a blk_integrity | 384 | * the capability with the block layer. The template is a blk_integrity |
| 385 | * struct with values appropriate for the underlying hardware. See | 385 | * struct with values appropriate for the underlying hardware. See |
| 386 | * Documentation/block/data-integrity.txt. | 386 | * Documentation/block/data-integrity.rst. |
| 387 | */ | 387 | */ |
| 388 | void blk_integrity_register(struct gendisk *disk, struct blk_integrity *template) | 388 | void blk_integrity_register(struct gendisk *disk, struct blk_integrity *template) |
| 389 | { | 389 | { |
diff --git a/block/ioprio.c b/block/ioprio.c index 2e0559f157c8..77bcab11dce5 100644 --- a/block/ioprio.c +++ b/block/ioprio.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | * | 17 | * |
| 18 | * ioprio_set(PRIO_PROCESS, pid, prio); | 18 | * ioprio_set(PRIO_PROCESS, pid, prio); |
| 19 | * | 19 | * |
| 20 | * See also Documentation/block/ioprio.txt | 20 | * See also Documentation/block/ioprio.rst |
| 21 | * | 21 | * |
| 22 | */ | 22 | */ |
| 23 | #include <linux/gfp.h> | 23 | #include <linux/gfp.h> |
diff --git a/block/mq-deadline.c b/block/mq-deadline.c index b8a682b5a1bb..2a2a2e82832e 100644 --- a/block/mq-deadline.c +++ b/block/mq-deadline.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #include "blk-mq-sched.h" | 25 | #include "blk-mq-sched.h" |
| 26 | 26 | ||
| 27 | /* | 27 | /* |
| 28 | * See Documentation/block/deadline-iosched.txt | 28 | * See Documentation/block/deadline-iosched.rst |
| 29 | */ | 29 | */ |
| 30 | static const int read_expire = HZ / 2; /* max time before a read is submitted. */ | 30 | static const int read_expire = HZ / 2; /* max time before a read is submitted. */ |
| 31 | static const int write_expire = 5 * HZ; /* ditto for writes, these limits are SOFT! */ | 31 | static const int write_expire = 5 * HZ; /* ditto for writes, these limits are SOFT! */ |
diff --git a/block/partitions/Kconfig b/block/partitions/Kconfig index 37b9710cc80a..702689a628f0 100644 --- a/block/partitions/Kconfig +++ b/block/partitions/Kconfig | |||
| @@ -194,7 +194,7 @@ config LDM_PARTITION | |||
| 194 | Normal partitions are now called Basic Disks under Windows 2000, XP, | 194 | Normal partitions are now called Basic Disks under Windows 2000, XP, |
| 195 | and Vista. | 195 | and Vista. |
| 196 | 196 | ||
| 197 | For a fuller description read <file:Documentation/ldm.txt>. | 197 | For a fuller description read <file:Documentation/admin-guide/ldm.rst>. |
| 198 | 198 | ||
| 199 | If unsure, say N. | 199 | If unsure, say N. |
| 200 | 200 | ||
diff --git a/block/partitions/cmdline.c b/block/partitions/cmdline.c index 60fb3df9897c..f1edd5452249 100644 --- a/block/partitions/cmdline.c +++ b/block/partitions/cmdline.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * | 11 | * |
| 12 | * The format for the command line is just like mtdparts. | 12 | * The format for the command line is just like mtdparts. |
| 13 | * | 13 | * |
| 14 | * For further information, see "Documentation/block/cmdline-partition.txt" | 14 | * For further information, see "Documentation/block/cmdline-partition.rst" |
| 15 | * | 15 | * |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 713903290385..506a0175a5a7 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Copyright (c) 2002-3 Patrick Mochel | 5 | * Copyright (c) 2002-3 Patrick Mochel |
| 6 | * Copyright (c) 2002-3 Open Source Development Labs | 6 | * Copyright (c) 2002-3 Open Source Development Labs |
| 7 | * | 7 | * |
| 8 | * Please see Documentation/driver-model/platform.rst for more | 8 | * Please see Documentation/driver-api/driver-model/platform.rst for more |
| 9 | * information. | 9 | * information. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 96ec7e0fc1ea..1bb8ec575352 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig | |||
| @@ -31,7 +31,7 @@ config BLK_DEV_FD | |||
| 31 | If you want to use the floppy disk drive(s) of your PC under Linux, | 31 | If you want to use the floppy disk drive(s) of your PC under Linux, |
| 32 | say Y. Information about this driver, especially important for IBM | 32 | say Y. Information about this driver, especially important for IBM |
| 33 | Thinkpad users, is contained in | 33 | Thinkpad users, is contained in |
| 34 | <file:Documentation/blockdev/floppy.txt>. | 34 | <file:Documentation/admin-guide/blockdev/floppy.rst>. |
| 35 | That file also contains the location of the Floppy driver FAQ as | 35 | That file also contains the location of the Floppy driver FAQ as |
| 36 | well as location of the fdutils package used to configure additional | 36 | well as location of the fdutils package used to configure additional |
| 37 | parameters of the driver at run time. | 37 | parameters of the driver at run time. |
| @@ -96,7 +96,7 @@ config PARIDE | |||
| 96 | your computer's parallel port. Most of them are actually IDE devices | 96 | your computer's parallel port. Most of them are actually IDE devices |
| 97 | using a parallel port IDE adapter. This option enables the PARIDE | 97 | using a parallel port IDE adapter. This option enables the PARIDE |
| 98 | subsystem which contains drivers for many of these external drives. | 98 | subsystem which contains drivers for many of these external drives. |
| 99 | Read <file:Documentation/blockdev/paride.txt> for more information. | 99 | Read <file:Documentation/admin-guide/blockdev/paride.rst> for more information. |
| 100 | 100 | ||
| 101 | If you have said Y to the "Parallel-port support" configuration | 101 | If you have said Y to the "Parallel-port support" configuration |
| 102 | option, you may share a single port between your printer and other | 102 | option, you may share a single port between your printer and other |
| @@ -261,7 +261,7 @@ config BLK_DEV_NBD | |||
| 261 | userland (making server and client physically the same computer, | 261 | userland (making server and client physically the same computer, |
| 262 | communicating using the loopback network device). | 262 | communicating using the loopback network device). |
| 263 | 263 | ||
| 264 | Read <file:Documentation/blockdev/nbd.txt> for more information, | 264 | Read <file:Documentation/admin-guide/blockdev/nbd.rst> for more information, |
| 265 | especially about where to find the server code, which runs in user | 265 | especially about where to find the server code, which runs in user |
| 266 | space and does not need special kernel support. | 266 | space and does not need special kernel support. |
| 267 | 267 | ||
| @@ -303,7 +303,7 @@ config BLK_DEV_RAM | |||
| 303 | during the initial install of Linux. | 303 | during the initial install of Linux. |
| 304 | 304 | ||
| 305 | Note that the kernel command line option "ramdisk=XX" is now obsolete. | 305 | Note that the kernel command line option "ramdisk=XX" is now obsolete. |
| 306 | For details, read <file:Documentation/blockdev/ramdisk.txt>. | 306 | For details, read <file:Documentation/admin-guide/blockdev/ramdisk.rst>. |
| 307 | 307 | ||
| 308 | To compile this driver as a module, choose M here: the | 308 | To compile this driver as a module, choose M here: the |
| 309 | module will be called brd. An alias "rd" has been defined | 309 | module will be called brd. An alias "rd" has been defined |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index b933a7eea52b..f652c1ac3ae9 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
| @@ -4424,7 +4424,7 @@ static int __init floppy_setup(char *str) | |||
| 4424 | pr_cont("\n"); | 4424 | pr_cont("\n"); |
| 4425 | } else | 4425 | } else |
| 4426 | DPRINT("botched floppy option\n"); | 4426 | DPRINT("botched floppy option\n"); |
| 4427 | DPRINT("Read Documentation/blockdev/floppy.txt\n"); | 4427 | DPRINT("Read Documentation/admin-guide/blockdev/floppy.rst\n"); |
| 4428 | return 0; | 4428 | return 0; |
| 4429 | } | 4429 | } |
| 4430 | 4430 | ||
diff --git a/drivers/block/zram/Kconfig b/drivers/block/zram/Kconfig index 1ffc64770643..fe7a4b7d30cf 100644 --- a/drivers/block/zram/Kconfig +++ b/drivers/block/zram/Kconfig | |||
| @@ -12,7 +12,7 @@ config ZRAM | |||
| 12 | It has several use cases, for example: /tmp storage, use as swap | 12 | It has several use cases, for example: /tmp storage, use as swap |
| 13 | disks and maybe many more. | 13 | disks and maybe many more. |
| 14 | 14 | ||
| 15 | See Documentation/blockdev/zram.txt for more information. | 15 | See Documentation/admin-guide/blockdev/zram.rst for more information. |
| 16 | 16 | ||
| 17 | config ZRAM_WRITEBACK | 17 | config ZRAM_WRITEBACK |
| 18 | bool "Write back incompressible or idle page to backing device" | 18 | bool "Write back incompressible or idle page to backing device" |
| @@ -26,7 +26,7 @@ config ZRAM_WRITEBACK | |||
| 26 | With /sys/block/zramX/{idle,writeback}, application could ask | 26 | With /sys/block/zramX/{idle,writeback}, application could ask |
| 27 | idle page's writeback to the backing device to save in memory. | 27 | idle page's writeback to the backing device to save in memory. |
| 28 | 28 | ||
| 29 | See Documentation/blockdev/zram.txt for more information. | 29 | See Documentation/admin-guide/blockdev/zram.rst for more information. |
| 30 | 30 | ||
| 31 | config ZRAM_MEMORY_TRACKING | 31 | config ZRAM_MEMORY_TRACKING |
| 32 | bool "Track zRam block status" | 32 | bool "Track zRam block status" |
| @@ -36,4 +36,4 @@ config ZRAM_MEMORY_TRACKING | |||
| 36 | of zRAM. Admin could see the information via | 36 | of zRAM. Admin could see the information via |
| 37 | /sys/kernel/debug/zram/zramX/block_state. | 37 | /sys/kernel/debug/zram/zramX/block_state. |
| 38 | 38 | ||
| 39 | See Documentation/blockdev/zram.txt for more information. | 39 | See Documentation/admin-guide/blockdev/zram.rst for more information. |
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 466ebd84ad17..3e866885a405 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
| @@ -291,7 +291,7 @@ config RTC | |||
| 291 | and set the RTC in an SMP compatible fashion. | 291 | and set the RTC in an SMP compatible fashion. |
| 292 | 292 | ||
| 293 | If you think you have a use for such a device (such as periodic data | 293 | If you think you have a use for such a device (such as periodic data |
| 294 | sampling), then say Y here, and read <file:Documentation/rtc.txt> | 294 | sampling), then say Y here, and read <file:Documentation/admin-guide/rtc.rst> |
| 295 | for details. | 295 | for details. |
| 296 | 296 | ||
| 297 | To compile this driver as a module, choose M here: the | 297 | To compile this driver as a module, choose M here: the |
| @@ -313,7 +313,7 @@ config JS_RTC | |||
| 313 | /dev/rtc. | 313 | /dev/rtc. |
| 314 | 314 | ||
| 315 | If you think you have a use for such a device (such as periodic data | 315 | If you think you have a use for such a device (such as periodic data |
| 316 | sampling), then say Y here, and read <file:Documentation/rtc.txt> | 316 | sampling), then say Y here, and read <file:Documentation/admin-guide/rtc.rst> |
| 317 | for details. | 317 | for details. |
| 318 | 318 | ||
| 319 | To compile this driver as a module, choose M here: the | 319 | To compile this driver as a module, choose M here: the |
| @@ -382,7 +382,7 @@ config SONYPI | |||
| 382 | Device which can be found in many (all ?) Sony Vaio laptops. | 382 | Device which can be found in many (all ?) Sony Vaio laptops. |
| 383 | 383 | ||
| 384 | If you have one of those laptops, read | 384 | If you have one of those laptops, read |
| 385 | <file:Documentation/laptops/sonypi.txt>, and say Y or M here. | 385 | <file:Documentation/admin-guide/laptops/sonypi.rst>, and say Y or M here. |
| 386 | 386 | ||
| 387 | To compile this driver as a module, choose M here: the | 387 | To compile this driver as a module, choose M here: the |
| 388 | module will be called sonypi. | 388 | module will be called sonypi. |
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index 95be7228f327..9044d31ab1a1 100644 --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Copyright 2006 Michael Buesch <m@bues.ch> | 4 | * Copyright 2006 Michael Buesch <m@bues.ch> |
| 5 | * Copyright 2005 (c) MontaVista Software, Inc. | 5 | * Copyright 2005 (c) MontaVista Software, Inc. |
| 6 | * | 6 | * |
| 7 | * Please read Documentation/hw_random.txt for details on use. | 7 | * Please read Documentation/admin-guide/hw_random.rst for details on use. |
| 8 | * | 8 | * |
| 9 | * This software may be used and distributed according to the terms | 9 | * This software may be used and distributed according to the terms |
| 10 | * of the GNU General Public License, incorporated herein by reference. | 10 | * of the GNU General Public License, incorporated herein by reference. |
diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c index 4ab14d58e85b..6f7cbf6c2b55 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * keysize in CBC and ECB mode. | 8 | * keysize in CBC and ECB mode. |
| 9 | * Add support also for DES and 3DES in CBC and ECB mode. | 9 | * Add support also for DES and 3DES in CBC and ECB mode. |
| 10 | * | 10 | * |
| 11 | * You could find the datasheet in Documentation/arm/sunxi/README | 11 | * You could find the datasheet in Documentation/arm/sunxi.rst |
| 12 | */ | 12 | */ |
| 13 | #include "sun4i-ss.h" | 13 | #include "sun4i-ss.h" |
| 14 | 14 | ||
diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c index cdcda7f059c8..2e8704271f45 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * | 6 | * |
| 7 | * Core file which registers crypto algorithms supported by the SS. | 7 | * Core file which registers crypto algorithms supported by the SS. |
| 8 | * | 8 | * |
| 9 | * You could find a link for the datasheet in Documentation/arm/sunxi/README | 9 | * You could find a link for the datasheet in Documentation/arm/sunxi.rst |
| 10 | */ | 10 | */ |
| 11 | #include <linux/clk.h> | 11 | #include <linux/clk.h> |
| 12 | #include <linux/crypto.h> | 12 | #include <linux/crypto.h> |
diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-hash.c b/drivers/crypto/sunxi-ss/sun4i-ss-hash.c index d2b6d89aad28..fcffba5ef927 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss-hash.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-hash.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * | 6 | * |
| 7 | * This file add support for MD5 and SHA1. | 7 | * This file add support for MD5 and SHA1. |
| 8 | * | 8 | * |
| 9 | * You could find the datasheet in Documentation/arm/sunxi/README | 9 | * You could find the datasheet in Documentation/arm/sunxi.rst |
| 10 | */ | 10 | */ |
| 11 | #include "sun4i-ss.h" | 11 | #include "sun4i-ss.h" |
| 12 | #include <linux/scatterlist.h> | 12 | #include <linux/scatterlist.h> |
diff --git a/drivers/crypto/sunxi-ss/sun4i-ss.h b/drivers/crypto/sunxi-ss/sun4i-ss.h index 68b82d1a6303..8654d48aedc0 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss.h +++ b/drivers/crypto/sunxi-ss/sun4i-ss.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * Support MD5 and SHA1 hash algorithms. | 8 | * Support MD5 and SHA1 hash algorithms. |
| 9 | * Support DES and 3DES | 9 | * Support DES and 3DES |
| 10 | * | 10 | * |
| 11 | * You could find the datasheet in Documentation/arm/sunxi/README | 11 | * You could find the datasheet in Documentation/arm/sunxi.rst |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig index d5f915830b68..b6a9c2f1bc41 100644 --- a/drivers/dma-buf/Kconfig +++ b/drivers/dma-buf/Kconfig | |||
| @@ -15,7 +15,7 @@ config SYNC_FILE | |||
| 15 | associated with a buffer. When a job is submitted to the GPU a fence | 15 | associated with a buffer. When a job is submitted to the GPU a fence |
| 16 | is attached to the buffer and is transferred via userspace, using Sync | 16 | is attached to the buffer and is transferred via userspace, using Sync |
| 17 | Files fds, to the DRM driver for example. More details at | 17 | Files fds, to the DRM driver for example. More details at |
| 18 | Documentation/sync_file.txt. | 18 | Documentation/driver-api/sync_file.rst. |
| 19 | 19 | ||
| 20 | config SW_SYNC | 20 | config SW_SYNC |
| 21 | bool "Sync File Validation Framework" | 21 | bool "Sync File Validation Framework" |
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 43d7d6a9d9ab..bb13c266c329 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig | |||
| @@ -1312,7 +1312,7 @@ config GPIO_BT8XX | |||
| 1312 | The card needs to be physically altered for using it as a | 1312 | The card needs to be physically altered for using it as a |
| 1313 | GPIO card. For more information on how to build a GPIO card | 1313 | GPIO card. For more information on how to build a GPIO card |
| 1314 | from a BT8xx TV card, see the documentation file at | 1314 | from a BT8xx TV card, see the documentation file at |
| 1315 | Documentation/bt8xxgpio.txt | 1315 | Documentation/driver-api/bt8xxgpio.rst |
| 1316 | 1316 | ||
| 1317 | If unsure, say N. | 1317 | If unsure, say N. |
| 1318 | 1318 | ||
diff --git a/drivers/gpio/gpio-cs5535.c b/drivers/gpio/gpio-cs5535.c index 3611a0571667..53b24e3ae7de 100644 --- a/drivers/gpio/gpio-cs5535.c +++ b/drivers/gpio/gpio-cs5535.c | |||
| @@ -41,7 +41,7 @@ MODULE_PARM_DESC(mask, "GPIO channel mask."); | |||
| 41 | 41 | ||
| 42 | /* | 42 | /* |
| 43 | * FIXME: convert this singleton driver to use the state container | 43 | * FIXME: convert this singleton driver to use the state container |
| 44 | * design pattern, see Documentation/driver-model/design-patterns.rst | 44 | * design pattern, see Documentation/driver-api/driver-model/design-patterns.rst |
| 45 | */ | 45 | */ |
| 46 | static struct cs5535_gpio_chip { | 46 | static struct cs5535_gpio_chip { |
| 47 | struct gpio_chip chip; | 47 | struct gpio_chip chip; |
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 3313378c743b..1d80222587ad 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig | |||
| @@ -141,7 +141,7 @@ config DRM_LOAD_EDID_FIRMWARE | |||
| 141 | monitor are unable to provide appropriate EDID data. Since this | 141 | monitor are unable to provide appropriate EDID data. Since this |
| 142 | feature is provided as a workaround for broken hardware, the | 142 | feature is provided as a workaround for broken hardware, the |
| 143 | default case is N. Details and instructions how to build your own | 143 | default case is N. Details and instructions how to build your own |
| 144 | EDID data are given in Documentation/EDID/howto.rst. | 144 | EDID data are given in Documentation/driver-api/edid.rst. |
| 145 | 145 | ||
| 146 | config DRM_DP_CEC | 146 | config DRM_DP_CEC |
| 147 | bool "Enable DisplayPort CEC-Tunneling-over-AUX HDMI support" | 147 | bool "Enable DisplayPort CEC-Tunneling-over-AUX HDMI support" |
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 9441a36a2469..bd810454d239 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c | |||
| @@ -736,7 +736,7 @@ static const struct drm_ioctl_desc drm_ioctls[] = { | |||
| 736 | * }; | 736 | * }; |
| 737 | * | 737 | * |
| 738 | * Please make sure that you follow all the best practices from | 738 | * Please make sure that you follow all the best practices from |
| 739 | * ``Documentation/ioctl/botching-up-ioctls.txt``. Note that drm_ioctl() | 739 | * ``Documentation/ioctl/botching-up-ioctls.rst``. Note that drm_ioctl() |
| 740 | * automatically zero-extends structures, hence make sure you can add more stuff | 740 | * automatically zero-extends structures, hence make sure you can add more stuff |
| 741 | * at the end, i.e. don't put a variable sized array there. | 741 | * at the end, i.e. don't put a variable sized array there. |
| 742 | * | 742 | * |
diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c index 53187821df01..fcfe1a03c4a1 100644 --- a/drivers/gpu/drm/drm_modeset_lock.c +++ b/drivers/gpu/drm/drm_modeset_lock.c | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | * of extra utility/tracking out of our acquire-ctx. This is provided | 36 | * of extra utility/tracking out of our acquire-ctx. This is provided |
| 37 | * by &struct drm_modeset_lock and &struct drm_modeset_acquire_ctx. | 37 | * by &struct drm_modeset_lock and &struct drm_modeset_acquire_ctx. |
| 38 | * | 38 | * |
| 39 | * For basic principles of &ww_mutex, see: Documentation/locking/ww-mutex-design.txt | 39 | * For basic principles of &ww_mutex, see: Documentation/locking/ww-mutex-design.rst |
| 40 | * | 40 | * |
| 41 | * The basic usage pattern is to:: | 41 | * The basic usage pattern is to:: |
| 42 | * | 42 | * |
diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c index 92f6e1ae23a2..f11ba7f2dca7 100644 --- a/drivers/input/touchscreen/sun4i-ts.c +++ b/drivers/input/touchscreen/sun4i-ts.c | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | * in the kernel). So this driver offers straight forward, reliable single | 22 | * in the kernel). So this driver offers straight forward, reliable single |
| 23 | * touch functionality only. | 23 | * touch functionality only. |
| 24 | * | 24 | * |
| 25 | * s.a. A20 User Manual "1.15 TP" (Documentation/arm/sunxi/README) | 25 | * s.a. A20 User Manual "1.15 TP" (Documentation/arm/sunxi.rst) |
| 26 | * (looks like the description in the A20 User Manual v1.3 is better | 26 | * (looks like the description in the A20 User Manual v1.3 is better |
| 27 | * than the one in the A10 User Manual v.1.5) | 27 | * than the one in the A10 User Manual v.1.5) |
| 28 | */ | 28 | */ |
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig index 5ccac0b77f17..3834332f4963 100644 --- a/drivers/md/Kconfig +++ b/drivers/md/Kconfig | |||
| @@ -453,7 +453,7 @@ config DM_INIT | |||
| 453 | Enable "dm-mod.create=" parameter to create mapped devices at init time. | 453 | Enable "dm-mod.create=" parameter to create mapped devices at init time. |
| 454 | This option is useful to allow mounting rootfs without requiring an | 454 | This option is useful to allow mounting rootfs without requiring an |
| 455 | initramfs. | 455 | initramfs. |
| 456 | See Documentation/device-mapper/dm-init.rst for dm-mod.create="..." | 456 | See Documentation/admin-guide/device-mapper/dm-init.rst for dm-mod.create="..." |
| 457 | format. | 457 | format. |
| 458 | 458 | ||
| 459 | If unsure, say N. | 459 | If unsure, say N. |
diff --git a/drivers/md/dm-init.c b/drivers/md/dm-init.c index b65faef2c4b5..b869316d3722 100644 --- a/drivers/md/dm-init.c +++ b/drivers/md/dm-init.c | |||
| @@ -25,7 +25,7 @@ static char *create; | |||
| 25 | * Format: dm-mod.create=<name>,<uuid>,<minor>,<flags>,<table>[,<table>+][;<name>,<uuid>,<minor>,<flags>,<table>[,<table>+]+] | 25 | * Format: dm-mod.create=<name>,<uuid>,<minor>,<flags>,<table>[,<table>+][;<name>,<uuid>,<minor>,<flags>,<table>[,<table>+]+] |
| 26 | * Table format: <start_sector> <num_sectors> <target_type> <target_args> | 26 | * Table format: <start_sector> <num_sectors> <target_type> <target_args> |
| 27 | * | 27 | * |
| 28 | * See Documentation/device-mapper/dm-init.rst for dm-mod.create="..." format | 28 | * See Documentation/admin-guide/device-mapper/dm-init.rst for dm-mod.create="..." format |
| 29 | * details. | 29 | * details. |
| 30 | */ | 30 | */ |
| 31 | 31 | ||
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 7a87a640f8ba..8a60a4a070ac 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c | |||
| @@ -3558,7 +3558,7 @@ static void raid_status(struct dm_target *ti, status_type_t type, | |||
| 3558 | * v1.5.0+: | 3558 | * v1.5.0+: |
| 3559 | * | 3559 | * |
| 3560 | * Sync action: | 3560 | * Sync action: |
| 3561 | * See Documentation/device-mapper/dm-raid.rst for | 3561 | * See Documentation/admin-guide/device-mapper/dm-raid.rst for |
| 3562 | * information on each of these states. | 3562 | * information on each of these states. |
| 3563 | */ | 3563 | */ |
| 3564 | DMEMIT(" %s", sync_action); | 3564 | DMEMIT(" %s", sync_action); |
diff --git a/drivers/mtd/nand/raw/nand_ecc.c b/drivers/mtd/nand/raw/nand_ecc.c index 223fbd8052b3..09fdced659f5 100644 --- a/drivers/mtd/nand/raw/nand_ecc.c +++ b/drivers/mtd/nand/raw/nand_ecc.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | * Thomas Gleixner (tglx@linutronix.de) | 11 | * Thomas Gleixner (tglx@linutronix.de) |
| 12 | * | 12 | * |
| 13 | * Information on how this algorithm works and how it was developed | 13 | * Information on how this algorithm works and how it was developed |
| 14 | * can be found in Documentation/mtd/nand_ecc.txt | 14 | * can be found in Documentation/driver-api/mtd/nand_ecc.rst |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 41c90f2ddb31..63db08d9bafa 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c | |||
| @@ -2286,7 +2286,7 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent) | |||
| 2286 | struct ice_hw *hw; | 2286 | struct ice_hw *hw; |
| 2287 | int err; | 2287 | int err; |
| 2288 | 2288 | ||
| 2289 | /* this driver uses devres, see Documentation/driver-model/devres.rst */ | 2289 | /* this driver uses devres, see Documentation/driver-api/driver-model/devres.rst */ |
| 2290 | err = pcim_enable_device(pdev); | 2290 | err = pcim_enable_device(pdev); |
| 2291 | if (err) | 2291 | if (err) |
| 2292 | return err; | 2292 | return err; |
diff --git a/drivers/nvdimm/Kconfig b/drivers/nvdimm/Kconfig index 54500798f23a..a5fde15e91d3 100644 --- a/drivers/nvdimm/Kconfig +++ b/drivers/nvdimm/Kconfig | |||
| @@ -33,7 +33,7 @@ config BLK_DEV_PMEM | |||
| 33 | Documentation/admin-guide/kernel-parameters.rst). This driver converts | 33 | Documentation/admin-guide/kernel-parameters.rst). This driver converts |
| 34 | these persistent memory ranges into block devices that are | 34 | these persistent memory ranges into block devices that are |
| 35 | capable of DAX (direct-access) file system mappings. See | 35 | capable of DAX (direct-access) file system mappings. See |
| 36 | Documentation/nvdimm/nvdimm.txt for more details. | 36 | Documentation/driver-api/nvdimm/nvdimm.rst for more details. |
| 37 | 37 | ||
| 38 | Say Y if you want to use an NVDIMM | 38 | Say Y if you want to use an NVDIMM |
| 39 | 39 | ||
diff --git a/drivers/pci/switch/Kconfig b/drivers/pci/switch/Kconfig index aee28a5bb98f..d370f4ce0492 100644 --- a/drivers/pci/switch/Kconfig +++ b/drivers/pci/switch/Kconfig | |||
| @@ -9,7 +9,7 @@ config PCI_SW_SWITCHTEC | |||
| 9 | Enables support for the management interface for the MicroSemi | 9 | Enables support for the management interface for the MicroSemi |
| 10 | Switchtec series of PCIe switches. Supports userspace access | 10 | Switchtec series of PCIe switches. Supports userspace access |
| 11 | to submit MRPC commands to the switch via /dev/switchtecX | 11 | to submit MRPC commands to the switch via /dev/switchtecX |
| 12 | devices. See <file:Documentation/switchtec.txt> for more | 12 | devices. See <file:Documentation/driver-api/switchtec.rst> for more |
| 13 | information. | 13 | information. |
| 14 | 14 | ||
| 15 | endmenu | 15 | endmenu |
diff --git a/drivers/perf/qcom_l3_pmu.c b/drivers/perf/qcom_l3_pmu.c index 15b8c10c2b2b..656e830798d9 100644 --- a/drivers/perf/qcom_l3_pmu.c +++ b/drivers/perf/qcom_l3_pmu.c | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | * the slices. User space needs to aggregate to individual counts to provide | 8 | * the slices. User space needs to aggregate to individual counts to provide |
| 9 | * a global picture. | 9 | * a global picture. |
| 10 | * | 10 | * |
| 11 | * See Documentation/perf/qcom_l3_pmu.txt for more details. | 11 | * See Documentation/admin-guide/perf/qcom_l3_pmu.rst for more details. |
| 12 | * | 12 | * |
| 13 | * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. | 13 | * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. |
| 14 | */ | 14 | */ |
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index cc29fe79c283..1b67bb578f9f 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig | |||
| @@ -118,7 +118,7 @@ config DCDBAS | |||
| 118 | Interrupts (SMIs) and Host Control Actions (system power cycle or | 118 | Interrupts (SMIs) and Host Control Actions (system power cycle or |
| 119 | power off after OS shutdown) on certain Dell systems. | 119 | power off after OS shutdown) on certain Dell systems. |
| 120 | 120 | ||
| 121 | See <file:Documentation/dcdbas.txt> for more details on the driver | 121 | See <file:Documentation/driver-api/dcdbas.rst> for more details on the driver |
| 122 | and the Dell systems on which Dell systems management software makes | 122 | and the Dell systems on which Dell systems management software makes |
| 123 | use of this driver. | 123 | use of this driver. |
| 124 | 124 | ||
| @@ -259,7 +259,7 @@ config DELL_RBU | |||
| 259 | DELL system. Note you need a Dell OpenManage or Dell Update package (DUP) | 259 | DELL system. Note you need a Dell OpenManage or Dell Update package (DUP) |
| 260 | supporting application to communicate with the BIOS regarding the new | 260 | supporting application to communicate with the BIOS regarding the new |
| 261 | image for the image update to take effect. | 261 | image for the image update to take effect. |
| 262 | See <file:Documentation/dell_rbu.txt> for more details on the driver. | 262 | See <file:Documentation/driver-api/dell_rbu.rst> for more details on the driver. |
| 263 | 263 | ||
| 264 | 264 | ||
| 265 | config FUJITSU_LAPTOP | 265 | config FUJITSU_LAPTOP |
| @@ -448,7 +448,7 @@ config SONY_LAPTOP | |||
| 448 | screen brightness control, Fn keys and allows powering on/off some | 448 | screen brightness control, Fn keys and allows powering on/off some |
| 449 | devices. | 449 | devices. |
| 450 | 450 | ||
| 451 | Read <file:Documentation/laptops/sony-laptop.txt> for more information. | 451 | Read <file:Documentation/admin-guide/laptops/sony-laptop.rst> for more information. |
| 452 | 452 | ||
| 453 | config SONYPI_COMPAT | 453 | config SONYPI_COMPAT |
| 454 | bool "Sonypi compatibility" | 454 | bool "Sonypi compatibility" |
| @@ -500,7 +500,7 @@ config THINKPAD_ACPI | |||
| 500 | support for Fn-Fx key combinations, Bluetooth control, video | 500 | support for Fn-Fx key combinations, Bluetooth control, video |
| 501 | output switching, ThinkLight control, UltraBay eject and more. | 501 | output switching, ThinkLight control, UltraBay eject and more. |
| 502 | For more information about this driver see | 502 | For more information about this driver see |
| 503 | <file:Documentation/laptops/thinkpad-acpi.txt> and | 503 | <file:Documentation/admin-guide/laptops/thinkpad-acpi.rst> and |
| 504 | <http://ibm-acpi.sf.net/> . | 504 | <http://ibm-acpi.sf.net/> . |
| 505 | 505 | ||
| 506 | This driver was formerly known as ibm-acpi. | 506 | This driver was formerly known as ibm-acpi. |
diff --git a/drivers/platform/x86/dcdbas.c b/drivers/platform/x86/dcdbas.c index 12cf9475ac85..84f4cc839cc3 100644 --- a/drivers/platform/x86/dcdbas.c +++ b/drivers/platform/x86/dcdbas.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | * and Host Control Actions (power cycle or power off after OS shutdown) on | 7 | * and Host Control Actions (power cycle or power off after OS shutdown) on |
| 8 | * Dell systems. | 8 | * Dell systems. |
| 9 | * | 9 | * |
| 10 | * See Documentation/dcdbas.txt for more information. | 10 | * See Documentation/driver-api/dcdbas.rst for more information. |
| 11 | * | 11 | * |
| 12 | * Copyright (C) 1995-2006 Dell Inc. | 12 | * Copyright (C) 1995-2006 Dell Inc. |
| 13 | */ | 13 | */ |
diff --git a/drivers/platform/x86/dell_rbu.c b/drivers/platform/x86/dell_rbu.c index a58fc10293ee..3691391fea6b 100644 --- a/drivers/platform/x86/dell_rbu.c +++ b/drivers/platform/x86/dell_rbu.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | * on every time the packet data is written. This driver requires an | 24 | * on every time the packet data is written. This driver requires an |
| 25 | * application to break the BIOS image in to fixed sized packet chunks. | 25 | * application to break the BIOS image in to fixed sized packet chunks. |
| 26 | * | 26 | * |
| 27 | * See Documentation/dell_rbu.txt for more info. | 27 | * See Documentation/driver-api/dell_rbu.rst for more info. |
| 28 | */ | 28 | */ |
| 29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
| 30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
diff --git a/drivers/pnp/isapnp/Kconfig b/drivers/pnp/isapnp/Kconfig index 4b58a3dcb52b..d0479a563123 100644 --- a/drivers/pnp/isapnp/Kconfig +++ b/drivers/pnp/isapnp/Kconfig | |||
| @@ -7,6 +7,6 @@ config ISAPNP | |||
| 7 | depends on ISA || COMPILE_TEST | 7 | depends on ISA || COMPILE_TEST |
| 8 | help | 8 | help |
| 9 | Say Y here if you would like support for ISA Plug and Play devices. | 9 | Say Y here if you would like support for ISA Plug and Play devices. |
| 10 | Some information is in <file:Documentation/isapnp.txt>. | 10 | Some information is in <file:Documentation/driver-api/isapnp.rst>. |
| 11 | 11 | ||
| 12 | If unsure, say Y. | 12 | If unsure, say Y. |
diff --git a/drivers/rapidio/Kconfig b/drivers/rapidio/Kconfig index fadafc64705f..677d1aff61b7 100644 --- a/drivers/rapidio/Kconfig +++ b/drivers/rapidio/Kconfig | |||
| @@ -86,7 +86,7 @@ config RAPIDIO_CHMAN | |||
| 86 | This option includes RapidIO channelized messaging driver which | 86 | This option includes RapidIO channelized messaging driver which |
| 87 | provides socket-like interface to allow sharing of single RapidIO | 87 | provides socket-like interface to allow sharing of single RapidIO |
| 88 | messaging mailbox between multiple user-space applications. | 88 | messaging mailbox between multiple user-space applications. |
| 89 | See "Documentation/rapidio/rio_cm.txt" for driver description. | 89 | See "Documentation/driver-api/rapidio/rio_cm.rst" for driver description. |
| 90 | 90 | ||
| 91 | config RAPIDIO_MPORT_CDEV | 91 | config RAPIDIO_MPORT_CDEV |
| 92 | tristate "RapidIO /dev mport device driver" | 92 | tristate "RapidIO /dev mport device driver" |
diff --git a/drivers/staging/unisys/Documentation/overview.txt b/drivers/staging/unisys/Documentation/overview.txt index 9ab30af265a5..f8a4144b239c 100644 --- a/drivers/staging/unisys/Documentation/overview.txt +++ b/drivers/staging/unisys/Documentation/overview.txt | |||
| @@ -15,7 +15,7 @@ normally be unsharable, specifically: | |||
| 15 | * visorinput - keyboard and mouse | 15 | * visorinput - keyboard and mouse |
| 16 | 16 | ||
| 17 | These drivers conform to the standard Linux bus/device model described | 17 | These drivers conform to the standard Linux bus/device model described |
| 18 | within Documentation/driver-model/, and utilize a driver named visorbus to | 18 | within Documentation/driver-api/driver-model/, and utilize a driver named visorbus to |
| 19 | present the virtual busses involved. Drivers in the 'visor*' driver set are | 19 | present the virtual busses involved. Drivers in the 'visor*' driver set are |
| 20 | commonly referred to as "guest drivers" or "client drivers". All drivers | 20 | commonly referred to as "guest drivers" or "client drivers". All drivers |
| 21 | except visorbus expose a device of a specific usable class to the Linux guest | 21 | except visorbus expose a device of a specific usable class to the Linux guest |
| @@ -141,7 +141,7 @@ called automatically by the visorbus driver at appropriate times: | |||
| 141 | ----------------------------------- | 141 | ----------------------------------- |
| 142 | 142 | ||
| 143 | Because visorbus is a standard Linux bus driver in the model described in | 143 | Because visorbus is a standard Linux bus driver in the model described in |
| 144 | Documentation/driver-model/, the hierarchy of s-Par virtual devices is | 144 | Documentation/driver-api/driver-model/, the hierarchy of s-Par virtual devices is |
| 145 | published in the sysfs tree beneath /bus/visorbus/, e.g., | 145 | published in the sysfs tree beneath /bus/visorbus/, e.g., |
| 146 | /sys/bus/visorbus/devices/ might look like: | 146 | /sys/bus/visorbus/devices/ might look like: |
| 147 | 147 | ||
diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig index 0e3e4dacbc12..c7623f99ac0f 100644 --- a/drivers/tty/Kconfig +++ b/drivers/tty/Kconfig | |||
| @@ -93,7 +93,7 @@ config VT_HW_CONSOLE_BINDING | |||
| 93 | select the console driver that will serve as the backend for the | 93 | select the console driver that will serve as the backend for the |
| 94 | virtual terminals. | 94 | virtual terminals. |
| 95 | 95 | ||
| 96 | See <file:Documentation/console/console.txt> for more | 96 | See <file:Documentation/driver-api/console.rst> for more |
| 97 | information. For framebuffer console users, please refer to | 97 | information. For framebuffer console users, please refer to |
| 98 | <file:Documentation/fb/fbcon.rst>. | 98 | <file:Documentation/fb/fbcon.rst>. |
| 99 | 99 | ||
| @@ -175,7 +175,7 @@ config ROCKETPORT | |||
| 175 | This driver supports Comtrol RocketPort and RocketModem PCI boards. | 175 | This driver supports Comtrol RocketPort and RocketModem PCI boards. |
| 176 | These boards provide 2, 4, 8, 16, or 32 high-speed serial ports or | 176 | These boards provide 2, 4, 8, 16, or 32 high-speed serial ports or |
| 177 | modems. For information about the RocketPort/RocketModem boards | 177 | modems. For information about the RocketPort/RocketModem boards |
| 178 | and this driver read <file:Documentation/serial/rocket.rst>. | 178 | and this driver read <file:Documentation/driver-api/serial/rocket.rst>. |
| 179 | 179 | ||
| 180 | To compile this driver as a module, choose M here: the | 180 | To compile this driver as a module, choose M here: the |
| 181 | module will be called rocket. | 181 | module will be called rocket. |
| @@ -193,7 +193,7 @@ config CYCLADES | |||
| 193 | your Linux box, for instance in order to become a dial-in server. | 193 | your Linux box, for instance in order to become a dial-in server. |
| 194 | 194 | ||
| 195 | For information about the Cyclades-Z card, read | 195 | For information about the Cyclades-Z card, read |
| 196 | <file:Documentation/serial/cyclades_z.rst>. | 196 | <file:Documentation/driver-api/serial/cyclades_z.rst>. |
| 197 | 197 | ||
| 198 | To compile this driver as a module, choose M here: the | 198 | To compile this driver as a module, choose M here: the |
| 199 | module will be called cyclades. | 199 | module will be called cyclades. |
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index b416c7b33f49..04c23951b831 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig | |||
| @@ -500,7 +500,7 @@ config SERIAL_SA1100 | |||
| 500 | help | 500 | help |
| 501 | If you have a machine based on a SA1100/SA1110 StrongARM(R) CPU you | 501 | If you have a machine based on a SA1100/SA1110 StrongARM(R) CPU you |
| 502 | can enable its onboard serial port by enabling this option. | 502 | can enable its onboard serial port by enabling this option. |
| 503 | Please read <file:Documentation/arm/SA1100/serial_UART> for further | 503 | Please read <file:Documentation/arm/sa1100/serial_uart.rst> for further |
| 504 | info. | 504 | info. |
| 505 | 505 | ||
| 506 | config SERIAL_SA1100_CONSOLE | 506 | config SERIAL_SA1100_CONSOLE |
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c index 6e3c66ab0e62..a0555ae2b1ef 100644 --- a/drivers/tty/serial/ucc_uart.c +++ b/drivers/tty/serial/ucc_uart.c | |||
| @@ -1081,7 +1081,7 @@ static int qe_uart_verify_port(struct uart_port *port, | |||
| 1081 | } | 1081 | } |
| 1082 | /* UART operations | 1082 | /* UART operations |
| 1083 | * | 1083 | * |
| 1084 | * Details on these functions can be found in Documentation/serial/driver.rst | 1084 | * Details on these functions can be found in Documentation/driver-api/serial/driver.rst |
| 1085 | */ | 1085 | */ |
| 1086 | static const struct uart_ops qe_uart_pops = { | 1086 | static const struct uart_ops qe_uart_pops = { |
| 1087 | .tx_empty = qe_uart_tx_empty, | 1087 | .tx_empty = qe_uart_tx_empty, |
diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig index e5a7a454fe17..fd17db9b432f 100644 --- a/drivers/vfio/Kconfig +++ b/drivers/vfio/Kconfig | |||
| @@ -25,7 +25,7 @@ menuconfig VFIO | |||
| 25 | select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM || ARM64) | 25 | select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM || ARM64) |
| 26 | help | 26 | help |
| 27 | VFIO provides a framework for secure userspace device drivers. | 27 | VFIO provides a framework for secure userspace device drivers. |
| 28 | See Documentation/vfio.txt for more details. | 28 | See Documentation/driver-api/vfio.rst for more details. |
| 29 | 29 | ||
| 30 | If you don't know what to do here, say N. | 30 | If you don't know what to do here, say N. |
| 31 | 31 | ||
diff --git a/drivers/vfio/mdev/Kconfig b/drivers/vfio/mdev/Kconfig index ba94a076887f..5da27f2100f9 100644 --- a/drivers/vfio/mdev/Kconfig +++ b/drivers/vfio/mdev/Kconfig | |||
| @@ -6,7 +6,7 @@ config VFIO_MDEV | |||
| 6 | default n | 6 | default n |
| 7 | help | 7 | help |
| 8 | Provides a framework to virtualize devices. | 8 | Provides a framework to virtualize devices. |
| 9 | See Documentation/vfio-mediated-device.txt for more details. | 9 | See Documentation/driver-api/vfio-mediated-device.rst for more details. |
| 10 | 10 | ||
| 11 | If you don't know what do here, say N. | 11 | If you don't know what do here, say N. |
| 12 | 12 | ||
diff --git a/drivers/w1/Kconfig b/drivers/w1/Kconfig index 03dd57581df7..3e7ad7b232fe 100644 --- a/drivers/w1/Kconfig +++ b/drivers/w1/Kconfig | |||
| @@ -19,7 +19,7 @@ config W1_CON | |||
| 19 | default y | 19 | default y |
| 20 | ---help--- | 20 | ---help--- |
| 21 | This allows to communicate with userspace using connector. For more | 21 | This allows to communicate with userspace using connector. For more |
| 22 | information see <file:Documentation/connector/connector.txt>. | 22 | information see <file:Documentation/driver-api/connector.rst>. |
| 23 | There are three types of messages between w1 core and userspace: | 23 | There are three types of messages between w1 core and userspace: |
| 24 | 1. Events. They are generated each time new master or slave device found | 24 | 1. Events. They are generated each time new master or slave device found |
| 25 | either due to automatic or requested search. | 25 | either due to automatic or requested search. |
diff --git a/fs/proc/Kconfig b/fs/proc/Kconfig index 4c3dcb718961..47d2651fd9dc 100644 --- a/fs/proc/Kconfig +++ b/fs/proc/Kconfig | |||
| @@ -72,7 +72,7 @@ config PROC_SYSCTL | |||
| 72 | interface is through /proc/sys. If you say Y here a tree of | 72 | interface is through /proc/sys. If you say Y here a tree of |
| 73 | modifiable sysctl entries will be generated beneath the | 73 | modifiable sysctl entries will be generated beneath the |
| 74 | /proc/sys directory. They are explained in the files | 74 | /proc/sys directory. They are explained in the files |
| 75 | in <file:Documentation/sysctl/>. Note that enabling this | 75 | in <file:Documentation/admin-guide/sysctl/>. Note that enabling this |
| 76 | option will enlarge the kernel by at least 8 KB. | 76 | option will enlarge the kernel by at least 8 KB. |
| 77 | 77 | ||
| 78 | As it is generally a good thing, you should say Y here unless | 78 | As it is generally a good thing, you should say Y here unless |
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h index c5311935239d..430e219e3aba 100644 --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h | |||
| @@ -624,7 +624,7 @@ struct cftype { | |||
| 624 | 624 | ||
| 625 | /* | 625 | /* |
| 626 | * Control Group subsystem type. | 626 | * Control Group subsystem type. |
| 627 | * See Documentation/cgroup-v1/cgroups.rst for details | 627 | * See Documentation/admin-guide/cgroup-v1/cgroups.rst for details |
| 628 | */ | 628 | */ |
| 629 | struct cgroup_subsys { | 629 | struct cgroup_subsys { |
| 630 | struct cgroup_subsys_state *(*css_alloc)(struct cgroup_subsys_state *parent_css); | 630 | struct cgroup_subsys_state *(*css_alloc)(struct cgroup_subsys_state *parent_css); |
diff --git a/include/linux/connector.h b/include/linux/connector.h index 1d72ef76f24f..6b6c7396a584 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
| @@ -55,10 +55,71 @@ struct cn_dev { | |||
| 55 | struct cn_queue_dev *cbdev; | 55 | struct cn_queue_dev *cbdev; |
| 56 | }; | 56 | }; |
| 57 | 57 | ||
| 58 | /** | ||
| 59 | * cn_add_callback() - Registers new callback with connector core. | ||
| 60 | * | ||
| 61 | * @id: unique connector's user identifier. | ||
| 62 | * It must be registered in connector.h for legal | ||
| 63 | * in-kernel users. | ||
| 64 | * @name: connector's callback symbolic name. | ||
| 65 | * @callback: connector's callback. | ||
| 66 | * parameters are %cn_msg and the sender's credentials | ||
| 67 | */ | ||
| 58 | int cn_add_callback(struct cb_id *id, const char *name, | 68 | int cn_add_callback(struct cb_id *id, const char *name, |
| 59 | void (*callback)(struct cn_msg *, struct netlink_skb_parms *)); | 69 | void (*callback)(struct cn_msg *, struct netlink_skb_parms *)); |
| 60 | void cn_del_callback(struct cb_id *); | 70 | /** |
| 71 | * cn_del_callback() - Unregisters new callback with connector core. | ||
| 72 | * | ||
| 73 | * @id: unique connector's user identifier. | ||
| 74 | */ | ||
| 75 | void cn_del_callback(struct cb_id *id); | ||
| 76 | |||
| 77 | |||
| 78 | /** | ||
| 79 | * cn_netlink_send_mult - Sends message to the specified groups. | ||
| 80 | * | ||
| 81 | * @msg: message header(with attached data). | ||
| 82 | * @len: Number of @msg to be sent. | ||
| 83 | * @portid: destination port. | ||
| 84 | * If non-zero the message will be sent to the given port, | ||
| 85 | * which should be set to the original sender. | ||
| 86 | * @group: destination group. | ||
| 87 | * If @portid and @group is zero, then appropriate group will | ||
| 88 | * be searched through all registered connector users, and | ||
| 89 | * message will be delivered to the group which was created | ||
| 90 | * for user with the same ID as in @msg. | ||
| 91 | * If @group is not zero, then message will be delivered | ||
| 92 | * to the specified group. | ||
| 93 | * @gfp_mask: GFP mask. | ||
| 94 | * | ||
| 95 | * It can be safely called from softirq context, but may silently | ||
| 96 | * fail under strong memory pressure. | ||
| 97 | * | ||
| 98 | * If there are no listeners for given group %-ESRCH can be returned. | ||
| 99 | */ | ||
| 61 | int cn_netlink_send_mult(struct cn_msg *msg, u16 len, u32 portid, u32 group, gfp_t gfp_mask); | 100 | int cn_netlink_send_mult(struct cn_msg *msg, u16 len, u32 portid, u32 group, gfp_t gfp_mask); |
| 101 | |||
| 102 | /** | ||
| 103 | * cn_netlink_send_mult - Sends message to the specified groups. | ||
| 104 | * | ||
| 105 | * @msg: message header(with attached data). | ||
| 106 | * @portid: destination port. | ||
| 107 | * If non-zero the message will be sent to the given port, | ||
| 108 | * which should be set to the original sender. | ||
| 109 | * @group: destination group. | ||
| 110 | * If @portid and @group is zero, then appropriate group will | ||
| 111 | * be searched through all registered connector users, and | ||
| 112 | * message will be delivered to the group which was created | ||
| 113 | * for user with the same ID as in @msg. | ||
| 114 | * If @group is not zero, then message will be delivered | ||
| 115 | * to the specified group. | ||
| 116 | * @gfp_mask: GFP mask. | ||
| 117 | * | ||
| 118 | * It can be safely called from softirq context, but may silently | ||
| 119 | * fail under strong memory pressure. | ||
| 120 | * | ||
| 121 | * If there are no listeners for given group %-ESRCH can be returned. | ||
| 122 | */ | ||
| 62 | int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 group, gfp_t gfp_mask); | 123 | int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 group, gfp_t gfp_mask); |
| 63 | 124 | ||
| 64 | int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name, | 125 | int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name, |
diff --git a/include/linux/device.h b/include/linux/device.h index 5eabfa0c4dee..c330b75c6c57 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Copyright (c) 2004-2009 Greg Kroah-Hartman <gregkh@suse.de> | 6 | * Copyright (c) 2004-2009 Greg Kroah-Hartman <gregkh@suse.de> |
| 7 | * Copyright (c) 2008-2009 Novell Inc. | 7 | * Copyright (c) 2008-2009 Novell Inc. |
| 8 | * | 8 | * |
| 9 | * See Documentation/driver-model/ for more information. | 9 | * See Documentation/driver-api/driver-model/ for more information. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #ifndef _DEVICE_H_ | 12 | #ifndef _DEVICE_H_ |
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h index c0b93e0ff0c0..8e6dd908da21 100644 --- a/include/linux/hw_random.h +++ b/include/linux/hw_random.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | Hardware Random Number Generator | 2 | Hardware Random Number Generator |
| 3 | 3 | ||
| 4 | Please read Documentation/hw_random.txt for details on use. | 4 | Please read Documentation/admin-guide/hw_random.rst for details on use. |
| 5 | 5 | ||
| 6 | ---------------------------------------------------------- | 6 | ---------------------------------------------------------- |
| 7 | This software may be used and distributed according to the terms | 7 | This software may be used and distributed according to the terms |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 57baa27f238c..0b0d7259276d 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Copyright (C) 2006,2007 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | 5 | * Copyright (C) 2006,2007 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> |
| 6 | * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra | 6 | * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra |
| 7 | * | 7 | * |
| 8 | * see Documentation/locking/lockdep-design.txt for more details. | 8 | * see Documentation/locking/lockdep-design.rst for more details. |
| 9 | */ | 9 | */ |
| 10 | #ifndef __LINUX_LOCKDEP_H | 10 | #ifndef __LINUX_LOCKDEP_H |
| 11 | #define __LINUX_LOCKDEP_H | 11 | #define __LINUX_LOCKDEP_H |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 3093dd162424..dcd03fee6e01 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
| @@ -151,7 +151,7 @@ static inline bool mutex_is_locked(struct mutex *lock) | |||
| 151 | 151 | ||
| 152 | /* | 152 | /* |
| 153 | * See kernel/locking/mutex.c for detailed documentation of these APIs. | 153 | * See kernel/locking/mutex.c for detailed documentation of these APIs. |
| 154 | * Also see Documentation/locking/mutex-design.txt. | 154 | * Also see Documentation/locking/mutex-design.rst. |
| 155 | */ | 155 | */ |
| 156 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 156 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
| 157 | extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); | 157 | extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index beb25f277889..9bc36b589827 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org> | 5 | * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org> |
| 6 | * | 6 | * |
| 7 | * See Documentation/driver-model/ for more information. | 7 | * See Documentation/driver-api/driver-model/ for more information. |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | #ifndef _PLATFORM_DEVICE_H_ | 10 | #ifndef _PLATFORM_DEVICE_H_ |
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index e401358c4e7e..9d9c663987d8 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h | |||
| @@ -160,7 +160,7 @@ extern void downgrade_write(struct rw_semaphore *sem); | |||
| 160 | * static then another method for expressing nested locking is | 160 | * static then another method for expressing nested locking is |
| 161 | * the explicit definition of lock class keys and the use of | 161 | * the explicit definition of lock class keys and the use of |
| 162 | * lockdep_set_class() at lock initialization time. | 162 | * lockdep_set_class() at lock initialization time. |
| 163 | * See Documentation/locking/lockdep-design.txt for more details.) | 163 | * See Documentation/locking/lockdep-design.rst for more details.) |
| 164 | */ | 164 | */ |
| 165 | extern void down_read_nested(struct rw_semaphore *sem, int subclass); | 165 | extern void down_read_nested(struct rw_semaphore *sem, int subclass); |
| 166 | extern void down_write_nested(struct rw_semaphore *sem, int subclass); | 166 | extern void down_write_nested(struct rw_semaphore *sem, int subclass); |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 05b179015d6c..2b78cc734719 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -32,7 +32,7 @@ struct device; | |||
| 32 | 32 | ||
| 33 | /* | 33 | /* |
| 34 | * This structure describes all the operations that can be done on the | 34 | * This structure describes all the operations that can be done on the |
| 35 | * physical hardware. See Documentation/serial/driver.rst for details. | 35 | * physical hardware. See Documentation/driver-api/serial/driver.rst for details. |
| 36 | */ | 36 | */ |
| 37 | struct uart_ops { | 37 | struct uart_ops { |
| 38 | unsigned int (*tx_empty)(struct uart_port *); | 38 | unsigned int (*tx_empty)(struct uart_port *); |
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 6f68438aa4ed..82699845ef79 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
| @@ -806,7 +806,7 @@ union bpf_attr { | |||
| 806 | * based on a user-provided identifier for all traffic coming from | 806 | * based on a user-provided identifier for all traffic coming from |
| 807 | * the tasks belonging to the related cgroup. See also the related | 807 | * the tasks belonging to the related cgroup. See also the related |
| 808 | * kernel documentation, available from the Linux sources in file | 808 | * kernel documentation, available from the Linux sources in file |
| 809 | * *Documentation/cgroup-v1/net_cls.rst*. | 809 | * *Documentation/admin-guide/cgroup-v1/net_cls.rst*. |
| 810 | * | 810 | * |
| 811 | * The Linux kernel has two versions for cgroups: there are | 811 | * The Linux kernel has two versions for cgroups: there are |
| 812 | * cgroups v1 and cgroups v2. Both are available to users, who can | 812 | * cgroups v1 and cgroups v2. Both are available to users, who can |
diff --git a/include/uapi/rdma/rdma_user_ioctl_cmds.h b/include/uapi/rdma/rdma_user_ioctl_cmds.h index 64c14cb0022f..b8bb285f6b2a 100644 --- a/include/uapi/rdma/rdma_user_ioctl_cmds.h +++ b/include/uapi/rdma/rdma_user_ioctl_cmds.h | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
| 37 | #include <linux/ioctl.h> | 37 | #include <linux/ioctl.h> |
| 38 | 38 | ||
| 39 | /* Documentation/ioctl/ioctl-number.txt */ | 39 | /* Documentation/ioctl/ioctl-number.rst */ |
| 40 | #define RDMA_IOCTL_MAGIC 0x1b | 40 | #define RDMA_IOCTL_MAGIC 0x1b |
| 41 | #define RDMA_VERBS_IOCTL \ | 41 | #define RDMA_VERBS_IOCTL \ |
| 42 | _IOWR(RDMA_IOCTL_MAGIC, 1, struct ib_uverbs_ioctl_hdr) | 42 | _IOWR(RDMA_IOCTL_MAGIC, 1, struct ib_uverbs_ioctl_hdr) |
diff --git a/init/Kconfig b/init/Kconfig index 9697c6b5303c..381cdfee6e0e 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
| @@ -550,7 +550,7 @@ config PSI | |||
| 550 | have cpu.pressure, memory.pressure, and io.pressure files, | 550 | have cpu.pressure, memory.pressure, and io.pressure files, |
| 551 | which aggregate pressure stalls for the grouped tasks only. | 551 | which aggregate pressure stalls for the grouped tasks only. |
| 552 | 552 | ||
| 553 | For more details see Documentation/accounting/psi.txt. | 553 | For more details see Documentation/accounting/psi.rst. |
| 554 | 554 | ||
| 555 | Say N if unsure. | 555 | Say N if unsure. |
| 556 | 556 | ||
| @@ -821,7 +821,7 @@ menuconfig CGROUPS | |||
| 821 | controls or device isolation. | 821 | controls or device isolation. |
| 822 | See | 822 | See |
| 823 | - Documentation/scheduler/sched-design-CFS.rst (CFS) | 823 | - Documentation/scheduler/sched-design-CFS.rst (CFS) |
| 824 | - Documentation/cgroup-v1/ (features for grouping, isolation | 824 | - Documentation/admin-guide/cgroup-v1/ (features for grouping, isolation |
| 825 | and resource control) | 825 | and resource control) |
| 826 | 826 | ||
| 827 | Say N if unsure. | 827 | Say N if unsure. |
| @@ -883,7 +883,7 @@ config BLK_CGROUP | |||
| 883 | CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set | 883 | CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set |
| 884 | CONFIG_BLK_DEV_THROTTLING=y. | 884 | CONFIG_BLK_DEV_THROTTLING=y. |
| 885 | 885 | ||
| 886 | See Documentation/cgroup-v1/blkio-controller.rst for more information. | 886 | See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information. |
| 887 | 887 | ||
| 888 | config CGROUP_WRITEBACK | 888 | config CGROUP_WRITEBACK |
| 889 | bool | 889 | bool |
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index b3b02b9c4405..863e434a6020 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c | |||
| @@ -729,7 +729,7 @@ static inline int nr_cpusets(void) | |||
| 729 | * load balancing domains (sched domains) as specified by that partial | 729 | * load balancing domains (sched domains) as specified by that partial |
| 730 | * partition. | 730 | * partition. |
| 731 | * | 731 | * |
| 732 | * See "What is sched_load_balance" in Documentation/cgroup-v1/cpusets.rst | 732 | * See "What is sched_load_balance" in Documentation/admin-guide/cgroup-v1/cpusets.rst |
| 733 | * for a background explanation of this. | 733 | * for a background explanation of this. |
| 734 | * | 734 | * |
| 735 | * Does not return errors, on the theory that the callers of this | 735 | * Does not return errors, on the theory that the callers of this |
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c index 0c601ae072b3..edd1c082dbf5 100644 --- a/kernel/locking/mutex.c +++ b/kernel/locking/mutex.c | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | * by Steven Rostedt, based on work by Gregory Haskins, Peter Morreale | 16 | * by Steven Rostedt, based on work by Gregory Haskins, Peter Morreale |
| 17 | * and Sven Dietrich. | 17 | * and Sven Dietrich. |
| 18 | * | 18 | * |
| 19 | * Also see Documentation/locking/mutex-design.txt. | 19 | * Also see Documentation/locking/mutex-design.rst. |
| 20 | */ | 20 | */ |
| 21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
| 22 | #include <linux/ww_mutex.h> | 22 | #include <linux/ww_mutex.h> |
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 38fbf9fa7f1b..fa83d36e30c6 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | * Copyright (C) 2005 Kihon Technologies Inc., Steven Rostedt | 9 | * Copyright (C) 2005 Kihon Technologies Inc., Steven Rostedt |
| 10 | * Copyright (C) 2006 Esben Nielsen | 10 | * Copyright (C) 2006 Esben Nielsen |
| 11 | * | 11 | * |
| 12 | * See Documentation/locking/rt-mutex-design.txt for details. | 12 | * See Documentation/locking/rt-mutex-design.rst for details. |
| 13 | */ | 13 | */ |
| 14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
| 15 | #include <linux/export.h> | 15 | #include <linux/export.h> |
diff --git a/kernel/panic.c b/kernel/panic.c index 4d9f55bf7d38..057540b6eee9 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
| @@ -372,7 +372,7 @@ const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = { | |||
| 372 | /** | 372 | /** |
| 373 | * print_tainted - return a string to represent the kernel taint state. | 373 | * print_tainted - return a string to represent the kernel taint state. |
| 374 | * | 374 | * |
| 375 | * For individual taint flag meanings, see Documentation/sysctl/kernel.txt | 375 | * For individual taint flag meanings, see Documentation/admin-guide/sysctl/kernel.rst |
| 376 | * | 376 | * |
| 377 | * The string is overwritten by the next call to print_tainted(), | 377 | * The string is overwritten by the next call to print_tainted(), |
| 378 | * but is always NULL terminated. | 378 | * but is always NULL terminated. |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 4ac4ca21a30a..a858b55e8ac7 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -1139,7 +1139,7 @@ config PROVE_LOCKING | |||
| 1139 | the proof of observed correctness is also maintained for an | 1139 | the proof of observed correctness is also maintained for an |
| 1140 | arbitrary combination of these separate locking variants. | 1140 | arbitrary combination of these separate locking variants. |
| 1141 | 1141 | ||
| 1142 | For more details, see Documentation/locking/lockdep-design.txt. | 1142 | For more details, see Documentation/locking/lockdep-design.rst. |
| 1143 | 1143 | ||
| 1144 | config LOCK_STAT | 1144 | config LOCK_STAT |
| 1145 | bool "Lock usage statistics" | 1145 | bool "Lock usage statistics" |
| @@ -1153,7 +1153,7 @@ config LOCK_STAT | |||
| 1153 | help | 1153 | help |
| 1154 | This feature enables tracking lock contention points | 1154 | This feature enables tracking lock contention points |
| 1155 | 1155 | ||
| 1156 | For more details, see Documentation/locking/lockstat.txt | 1156 | For more details, see Documentation/locking/lockstat.rst |
| 1157 | 1157 | ||
| 1158 | This also enables lock events required by "perf lock", | 1158 | This also enables lock events required by "perf lock", |
| 1159 | subcommand of perf. | 1159 | subcommand of perf. |
| @@ -8,7 +8,7 @@ | |||
| 8 | /* | 8 | /* |
| 9 | * This file contains the default values for the operation of the | 9 | * This file contains the default values for the operation of the |
| 10 | * Linux VM subsystem. Fine-tuning documentation can be found in | 10 | * Linux VM subsystem. Fine-tuning documentation can be found in |
| 11 | * Documentation/sysctl/vm.txt. | 11 | * Documentation/admin-guide/sysctl/vm.rst. |
| 12 | * Started 18.12.91 | 12 | * Started 18.12.91 |
| 13 | * Swap aging added 23.2.95, Stephen Tweedie. | 13 | * Swap aging added 23.2.95, Stephen Tweedie. |
| 14 | * Buffermem limits added 12.3.98, Rik van Riel. | 14 | * Buffermem limits added 12.3.98, Rik van Riel. |
diff --git a/samples/Kconfig b/samples/Kconfig index 71b5e833dd9e..c8dacb4dda80 100644 --- a/samples/Kconfig +++ b/samples/Kconfig | |||
| @@ -99,7 +99,7 @@ config SAMPLE_CONNECTOR | |||
| 99 | When enabled, this builds both a sample kernel module for | 99 | When enabled, this builds both a sample kernel module for |
| 100 | the connector interface and a user space tool to communicate | 100 | the connector interface and a user space tool to communicate |
| 101 | with it. | 101 | with it. |
| 102 | See also Documentation/connector/connector.txt | 102 | See also Documentation/driver-api/connector.rst |
| 103 | 103 | ||
| 104 | config SAMPLE_HIDRAW | 104 | config SAMPLE_HIDRAW |
| 105 | bool "hidraw sample" | 105 | bool "hidraw sample" |
diff --git a/scripts/coccinelle/free/devm_free.cocci b/scripts/coccinelle/free/devm_free.cocci index fefd0331a2de..441799b5359b 100644 --- a/scripts/coccinelle/free/devm_free.cocci +++ b/scripts/coccinelle/free/devm_free.cocci | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | /// functions. Values allocated using the devm_functions are freed when | 3 | /// functions. Values allocated using the devm_functions are freed when |
| 4 | /// the device is detached, and thus the use of the standard freeing | 4 | /// the device is detached, and thus the use of the standard freeing |
| 5 | /// function would cause a double free. | 5 | /// function would cause a double free. |
| 6 | /// See Documentation/driver-model/devres.rst for more information. | 6 | /// See Documentation/driver-api/driver-model/devres.rst for more information. |
| 7 | /// | 7 | /// |
| 8 | /// A difficulty of detecting this problem is that the standard freeing | 8 | /// A difficulty of detecting this problem is that the standard freeing |
| 9 | /// function might be called from a different function than the one | 9 | /// function might be called from a different function than the one |
diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig index e9c677a53c74..d33de0b9f4f5 100644 --- a/scripts/gcc-plugins/Kconfig +++ b/scripts/gcc-plugins/Kconfig | |||
| @@ -23,7 +23,7 @@ config GCC_PLUGINS | |||
| 23 | GCC plugins are loadable modules that provide extra features to the | 23 | GCC plugins are loadable modules that provide extra features to the |
| 24 | compiler. They are useful for runtime instrumentation and static analysis. | 24 | compiler. They are useful for runtime instrumentation and static analysis. |
| 25 | 25 | ||
| 26 | See Documentation/gcc-plugins.txt for details. | 26 | See Documentation/core-api/gcc-plugins.rst for details. |
| 27 | 27 | ||
| 28 | menu "GCC plugins" | 28 | menu "GCC plugins" |
| 29 | depends on GCC_PLUGINS | 29 | depends on GCC_PLUGINS |
diff --git a/security/Kconfig b/security/Kconfig index 06a30851511a..0d65594b5196 100644 --- a/security/Kconfig +++ b/security/Kconfig | |||
| @@ -121,7 +121,7 @@ config INTEL_TXT | |||
| 121 | See <http://www.intel.com/technology/security/> for more information | 121 | See <http://www.intel.com/technology/security/> for more information |
| 122 | about Intel(R) TXT. | 122 | about Intel(R) TXT. |
| 123 | See <http://tboot.sourceforge.net> for more information about tboot. | 123 | See <http://tboot.sourceforge.net> for more information about tboot. |
| 124 | See Documentation/intel_txt.txt for a description of how to enable | 124 | See Documentation/x86/intel_txt.rst for a description of how to enable |
| 125 | Intel TXT support in a kernel boot. | 125 | Intel TXT support in a kernel boot. |
| 126 | 126 | ||
| 127 | If you are unsure as to whether this is required, answer N. | 127 | If you are unsure as to whether this is required, answer N. |
diff --git a/security/device_cgroup.c b/security/device_cgroup.c index c07196502577..725674f3276d 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c | |||
| @@ -509,7 +509,7 @@ static inline int may_allow_all(struct dev_cgroup *parent) | |||
| 509 | * This is one of the three key functions for hierarchy implementation. | 509 | * This is one of the three key functions for hierarchy implementation. |
| 510 | * This function is responsible for re-evaluating all the cgroup's active | 510 | * This function is responsible for re-evaluating all the cgroup's active |
| 511 | * exceptions due to a parent's exception change. | 511 | * exceptions due to a parent's exception change. |
| 512 | * Refer to Documentation/cgroup-v1/devices.rst for more details. | 512 | * Refer to Documentation/admin-guide/cgroup-v1/devices.rst for more details. |
| 513 | */ | 513 | */ |
| 514 | static void revalidate_active_exceptions(struct dev_cgroup *devcg) | 514 | static void revalidate_active_exceptions(struct dev_cgroup *devcg) |
| 515 | { | 515 | { |
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index f506c68b2612..17e2b1713702 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h | |||
| @@ -806,7 +806,7 @@ union bpf_attr { | |||
| 806 | * based on a user-provided identifier for all traffic coming from | 806 | * based on a user-provided identifier for all traffic coming from |
| 807 | * the tasks belonging to the related cgroup. See also the related | 807 | * the tasks belonging to the related cgroup. See also the related |
| 808 | * kernel documentation, available from the Linux sources in file | 808 | * kernel documentation, available from the Linux sources in file |
| 809 | * *Documentation/cgroup-v1/net_cls.rst*. | 809 | * *Documentation/admin-guide/cgroup-v1/net_cls.rst*. |
| 810 | * | 810 | * |
| 811 | * The Linux kernel has two versions for cgroups: there are | 811 | * The Linux kernel has two versions for cgroups: there are |
| 812 | * cgroups v1 and cgroups v2. Both are available to users, who can | 812 | * cgroups v1 and cgroups v2. Both are available to users, who can |
diff --git a/tools/testing/selftests/zram/README b/tools/testing/selftests/zram/README index 7972cc512408..110b34834a6f 100644 --- a/tools/testing/selftests/zram/README +++ b/tools/testing/selftests/zram/README | |||
| @@ -37,4 +37,4 @@ Commands required for testing: | |||
| 37 | - mkfs/ mkfs.ext4 | 37 | - mkfs/ mkfs.ext4 |
| 38 | 38 | ||
| 39 | For more information please refer: | 39 | For more information please refer: |
| 40 | kernel-source-tree/Documentation/blockdev/zram.txt | 40 | kernel-source-tree/Documentation/admin-guide/blockdev/zram.rst |
diff --git a/usr/Kconfig b/usr/Kconfig index 43658b8a975e..a6b68503d177 100644 --- a/usr/Kconfig +++ b/usr/Kconfig | |||
| @@ -18,7 +18,7 @@ config INITRAMFS_SOURCE | |||
| 18 | When multiple directories and files are specified then the | 18 | When multiple directories and files are specified then the |
| 19 | initramfs image will be the aggregate of all of them. | 19 | initramfs image will be the aggregate of all of them. |
| 20 | 20 | ||
| 21 | See <file:Documentation/early-userspace/README> for more details. | 21 | See <file:Documentation/driver-api/early-userspace/early_userspace_support.rst> for more details. |
| 22 | 22 | ||
| 23 | If you are not sure, leave it blank. | 23 | If you are not sure, leave it blank. |
| 24 | 24 | ||
