Loading Documentation/DocBook/libata.tmpl +16 −33 Original line number Original line Diff line number Diff line Loading @@ -107,10 +107,6 @@ void (*dev_config) (struct ata_port *, struct ata_device *); issue of SET FEATURES - XFER MODE, and prior to operation. issue of SET FEATURES - XFER MODE, and prior to operation. </para> </para> <para> <para> Called by ata_device_add() after ata_dev_identify() determines a device is present. </para> <para> This entry may be specified as NULL in ata_port_operations. This entry may be specified as NULL in ata_port_operations. </para> </para> Loading Loading @@ -154,8 +150,8 @@ unsigned int (*mode_filter) (struct ata_port *, struct ata_device *, unsigned in <sect2><title>Taskfile read/write</title> <sect2><title>Taskfile read/write</title> <programlisting> <programlisting> void (*tf_load) (struct ata_port *ap, struct ata_taskfile *tf); void (*sff_tf_load) (struct ata_port *ap, struct ata_taskfile *tf); void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); void (*sff_tf_read) (struct ata_port *ap, struct ata_taskfile *tf); </programlisting> </programlisting> <para> <para> Loading @@ -164,36 +160,35 @@ void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); hardware registers / DMA buffers, to obtain the current set of hardware registers / DMA buffers, to obtain the current set of taskfile register values. taskfile register values. Most drivers for taskfile-based hardware (PIO or MMIO) use Most drivers for taskfile-based hardware (PIO or MMIO) use ata_tf_load() and ata_tf_read() for these hooks. ata_sff_tf_load() and ata_sff_tf_read() for these hooks. </para> </para> </sect2> </sect2> <sect2><title>PIO data read/write</title> <sect2><title>PIO data read/write</title> <programlisting> <programlisting> void (*data_xfer) (struct ata_device *, unsigned char *, unsigned int, int); void (*sff_data_xfer) (struct ata_device *, unsigned char *, unsigned int, int); </programlisting> </programlisting> <para> <para> All bmdma-style drivers must implement this hook. This is the low-level All bmdma-style drivers must implement this hook. This is the low-level operation that actually copies the data bytes during a PIO data operation that actually copies the data bytes during a PIO data transfer. transfer. Typically the driver Typically the driver will choose one of ata_sff_data_xfer_noirq(), will choose one of ata_pio_data_xfer_noirq(), ata_pio_data_xfer(), or ata_sff_data_xfer(), or ata_sff_data_xfer32(). ata_mmio_data_xfer(). </para> </para> </sect2> </sect2> <sect2><title>ATA command execute</title> <sect2><title>ATA command execute</title> <programlisting> <programlisting> void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf); void (*sff_exec_command)(struct ata_port *ap, struct ata_taskfile *tf); </programlisting> </programlisting> <para> <para> causes an ATA command, previously loaded with causes an ATA command, previously loaded with ->tf_load(), to be initiated in hardware. ->tf_load(), to be initiated in hardware. Most drivers for taskfile-based hardware use ata_exec_command() Most drivers for taskfile-based hardware use ata_sff_exec_command() for this hook. for this hook. </para> </para> Loading @@ -218,8 +213,8 @@ command. <sect2><title>Read specific ATA shadow registers</title> <sect2><title>Read specific ATA shadow registers</title> <programlisting> <programlisting> u8 (*check_status)(struct ata_port *ap); u8 (*sff_check_status)(struct ata_port *ap); u8 (*check_altstatus)(struct ata_port *ap); u8 (*sff_check_altstatus)(struct ata_port *ap); </programlisting> </programlisting> <para> <para> Loading @@ -227,20 +222,14 @@ u8 (*check_altstatus)(struct ata_port *ap); hardware. On some hardware, reading the Status register has hardware. On some hardware, reading the Status register has the side effect of clearing the interrupt condition. the side effect of clearing the interrupt condition. Most drivers for taskfile-based hardware use Most drivers for taskfile-based hardware use ata_check_status() for this hook. ata_sff_check_status() for this hook. </para> <para> Note that because this is called from ata_device_add(), at least a dummy function that clears device interrupts must be provided for all drivers, even if the controller doesn't actually have a taskfile status register. </para> </para> </sect2> </sect2> <sect2><title>Select ATA device on bus</title> <sect2><title>Select ATA device on bus</title> <programlisting> <programlisting> void (*dev_select)(struct ata_port *ap, unsigned int device); void (*sff_dev_select)(struct ata_port *ap, unsigned int device); </programlisting> </programlisting> <para> <para> Loading @@ -251,9 +240,7 @@ void (*dev_select)(struct ata_port *ap, unsigned int device); </para> </para> <para> <para> Most drivers for taskfile-based hardware use Most drivers for taskfile-based hardware use ata_std_dev_select() for this hook. Controllers which do not ata_sff_dev_select() for this hook. support second drives on a port (such as SATA contollers) will use ata_noop_dev_select(). </para> </para> </sect2> </sect2> Loading Loading @@ -441,13 +428,13 @@ void (*irq_clear) (struct ata_port *); to struct ata_host_set. to struct ata_host_set. </para> </para> <para> <para> Most legacy IDE drivers use ata_interrupt() for the Most legacy IDE drivers use ata_sff_interrupt() for the irq_handler hook, which scans all ports in the host_set, irq_handler hook, which scans all ports in the host_set, determines which queued command was active (if any), and calls determines which queued command was active (if any), and calls ata_host_intr(ap,qc). ata_sff_host_intr(ap,qc). </para> </para> <para> <para> Most legacy IDE drivers use ata_bmdma_irq_clear() for the Most legacy IDE drivers use ata_sff_irq_clear() for the irq_clear() hook, which simply clears the interrupt and error irq_clear() hook, which simply clears the interrupt and error flags in the DMA status register. flags in the DMA status register. </para> </para> Loading Loading @@ -496,10 +483,6 @@ void (*host_stop) (struct ata_host_set *host_set); data from port at this time. data from port at this time. </para> </para> <para> <para> Many drivers use ata_port_stop() as this hook, which frees the PRD table. </para> <para> ->host_stop() is called after all ->port_stop() calls ->host_stop() is called after all ->port_stop() calls have completed. The hook must finalize hardware shutdown, release DMA have completed. The hook must finalize hardware shutdown, release DMA and other resources, etc. and other resources, etc. Loading Documentation/DocBook/sh.tmpl +7 −3 Original line number Original line Diff line number Diff line Loading @@ -19,13 +19,17 @@ </authorgroup> </authorgroup> <copyright> <copyright> <year>2008</year> <year>2008-2010</year> <holder>Paul Mundt</holder> <holder>Paul Mundt</holder> </copyright> </copyright> <copyright> <copyright> <year>2008</year> <year>2008-2010</year> <holder>Renesas Technology Corp.</holder> <holder>Renesas Technology Corp.</holder> </copyright> </copyright> <copyright> <year>2010</year> <holder>Renesas Electronics Corp.</holder> </copyright> <legalnotice> <legalnotice> <para> <para> Loading Loading @@ -77,7 +81,7 @@ </chapter> </chapter> <chapter id="clk"> <chapter id="clk"> <title>Clock Framework Extensions</title> <title>Clock Framework Extensions</title> !Iarch/sh/include/asm/clock.h !Iinclude/linux/sh_clk.h </chapter> </chapter> <chapter id="mach"> <chapter id="mach"> <title>Machine Specific Interfaces</title> <title>Machine Specific Interfaces</title> Loading Documentation/DocBook/tracepoint.tmpl +13 −0 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,15 @@ </address> </address> </affiliation> </affiliation> </author> </author> <author> <firstname>William</firstname> <surname>Cohen</surname> <affiliation> <address> <email>wcohen@redhat.com</email> </address> </affiliation> </author> </authorgroup> </authorgroup> <legalnotice> <legalnotice> Loading Loading @@ -91,4 +100,8 @@ !Iinclude/trace/events/signal.h !Iinclude/trace/events/signal.h </chapter> </chapter> <chapter id="block"> <title>Block IO</title> !Iinclude/trace/events/block.h </chapter> </book> </book> Documentation/HOWTO +1 −1 Original line number Original line Diff line number Diff line Loading @@ -234,7 +234,7 @@ process is as follows: Linus, usually the patches that have already been included in the Linus, usually the patches that have already been included in the -next kernel for a few weeks. The preferred way to submit big changes -next kernel for a few weeks. The preferred way to submit big changes is using git (the kernel's source management tool, more information is using git (the kernel's source management tool, more information can be found at http://git.or.cz/) but plain patches are also just can be found at http://git-scm.com/) but plain patches are also just fine. fine. - After two weeks a -rc1 kernel is released it is now possible to push - After two weeks a -rc1 kernel is released it is now possible to push only patches that do not include new features that could affect the only patches that do not include new features that could affect the Loading Documentation/RCU/NMI-RCU.txt +22 −17 Original line number Original line Diff line number Diff line Loading @@ -34,7 +34,7 @@ NMI handler. cpu = smp_processor_id(); cpu = smp_processor_id(); ++nmi_count(cpu); ++nmi_count(cpu); if (!rcu_dereference(nmi_callback)(regs, cpu)) if (!rcu_dereference_sched(nmi_callback)(regs, cpu)) default_do_nmi(regs); default_do_nmi(regs); nmi_exit(); nmi_exit(); Loading @@ -47,12 +47,13 @@ function pointer. If this handler returns zero, do_nmi() invokes the default_do_nmi() function to handle a machine-specific NMI. Finally, default_do_nmi() function to handle a machine-specific NMI. Finally, preemption is restored. preemption is restored. Strictly speaking, rcu_dereference() is not needed, since this code runs In theory, rcu_dereference_sched() is not needed, since this code runs only on i386, which does not need rcu_dereference() anyway. However, only on i386, which in theory does not need rcu_dereference_sched() it is a good documentation aid, particularly for anyone attempting to anyway. However, in practice it is a good documentation aid, particularly do something similar on Alpha. for anyone attempting to do something similar on Alpha or on systems with aggressive optimizing compilers. Quick Quiz: Why might the rcu_dereference() be necessary on Alpha, Quick Quiz: Why might the rcu_dereference_sched() be necessary on Alpha, given that the code referenced by the pointer is read-only? given that the code referenced by the pointer is read-only? Loading Loading @@ -99,17 +100,21 @@ invoke irq_enter() and irq_exit() on NMI entry and exit, respectively. Answer to Quick Quiz Answer to Quick Quiz Why might the rcu_dereference() be necessary on Alpha, given Why might the rcu_dereference_sched() be necessary on Alpha, given that the code referenced by the pointer is read-only? that the code referenced by the pointer is read-only? Answer: The caller to set_nmi_callback() might well have Answer: The caller to set_nmi_callback() might well have initialized some data that is to be used by the initialized some data that is to be used by the new NMI new NMI handler. In this case, the rcu_dereference() handler. In this case, the rcu_dereference_sched() would would be needed, because otherwise a CPU that received be needed, because otherwise a CPU that received an NMI an NMI just after the new handler was set might see just after the new handler was set might see the pointer the pointer to the new NMI handler, but the old to the new NMI handler, but the old pre-initialized pre-initialized version of the handler's data. version of the handler's data. More important, the rcu_dereference() makes it clear This same sad story can happen on other CPUs when using to someone reading the code that the pointer is being a compiler with aggressive pointer-value speculation protected by RCU. optimizations. More important, the rcu_dereference_sched() makes it clear to someone reading the code that the pointer is being protected by RCU-sched. Loading
Documentation/DocBook/libata.tmpl +16 −33 Original line number Original line Diff line number Diff line Loading @@ -107,10 +107,6 @@ void (*dev_config) (struct ata_port *, struct ata_device *); issue of SET FEATURES - XFER MODE, and prior to operation. issue of SET FEATURES - XFER MODE, and prior to operation. </para> </para> <para> <para> Called by ata_device_add() after ata_dev_identify() determines a device is present. </para> <para> This entry may be specified as NULL in ata_port_operations. This entry may be specified as NULL in ata_port_operations. </para> </para> Loading Loading @@ -154,8 +150,8 @@ unsigned int (*mode_filter) (struct ata_port *, struct ata_device *, unsigned in <sect2><title>Taskfile read/write</title> <sect2><title>Taskfile read/write</title> <programlisting> <programlisting> void (*tf_load) (struct ata_port *ap, struct ata_taskfile *tf); void (*sff_tf_load) (struct ata_port *ap, struct ata_taskfile *tf); void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); void (*sff_tf_read) (struct ata_port *ap, struct ata_taskfile *tf); </programlisting> </programlisting> <para> <para> Loading @@ -164,36 +160,35 @@ void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); hardware registers / DMA buffers, to obtain the current set of hardware registers / DMA buffers, to obtain the current set of taskfile register values. taskfile register values. Most drivers for taskfile-based hardware (PIO or MMIO) use Most drivers for taskfile-based hardware (PIO or MMIO) use ata_tf_load() and ata_tf_read() for these hooks. ata_sff_tf_load() and ata_sff_tf_read() for these hooks. </para> </para> </sect2> </sect2> <sect2><title>PIO data read/write</title> <sect2><title>PIO data read/write</title> <programlisting> <programlisting> void (*data_xfer) (struct ata_device *, unsigned char *, unsigned int, int); void (*sff_data_xfer) (struct ata_device *, unsigned char *, unsigned int, int); </programlisting> </programlisting> <para> <para> All bmdma-style drivers must implement this hook. This is the low-level All bmdma-style drivers must implement this hook. This is the low-level operation that actually copies the data bytes during a PIO data operation that actually copies the data bytes during a PIO data transfer. transfer. Typically the driver Typically the driver will choose one of ata_sff_data_xfer_noirq(), will choose one of ata_pio_data_xfer_noirq(), ata_pio_data_xfer(), or ata_sff_data_xfer(), or ata_sff_data_xfer32(). ata_mmio_data_xfer(). </para> </para> </sect2> </sect2> <sect2><title>ATA command execute</title> <sect2><title>ATA command execute</title> <programlisting> <programlisting> void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf); void (*sff_exec_command)(struct ata_port *ap, struct ata_taskfile *tf); </programlisting> </programlisting> <para> <para> causes an ATA command, previously loaded with causes an ATA command, previously loaded with ->tf_load(), to be initiated in hardware. ->tf_load(), to be initiated in hardware. Most drivers for taskfile-based hardware use ata_exec_command() Most drivers for taskfile-based hardware use ata_sff_exec_command() for this hook. for this hook. </para> </para> Loading @@ -218,8 +213,8 @@ command. <sect2><title>Read specific ATA shadow registers</title> <sect2><title>Read specific ATA shadow registers</title> <programlisting> <programlisting> u8 (*check_status)(struct ata_port *ap); u8 (*sff_check_status)(struct ata_port *ap); u8 (*check_altstatus)(struct ata_port *ap); u8 (*sff_check_altstatus)(struct ata_port *ap); </programlisting> </programlisting> <para> <para> Loading @@ -227,20 +222,14 @@ u8 (*check_altstatus)(struct ata_port *ap); hardware. On some hardware, reading the Status register has hardware. On some hardware, reading the Status register has the side effect of clearing the interrupt condition. the side effect of clearing the interrupt condition. Most drivers for taskfile-based hardware use Most drivers for taskfile-based hardware use ata_check_status() for this hook. ata_sff_check_status() for this hook. </para> <para> Note that because this is called from ata_device_add(), at least a dummy function that clears device interrupts must be provided for all drivers, even if the controller doesn't actually have a taskfile status register. </para> </para> </sect2> </sect2> <sect2><title>Select ATA device on bus</title> <sect2><title>Select ATA device on bus</title> <programlisting> <programlisting> void (*dev_select)(struct ata_port *ap, unsigned int device); void (*sff_dev_select)(struct ata_port *ap, unsigned int device); </programlisting> </programlisting> <para> <para> Loading @@ -251,9 +240,7 @@ void (*dev_select)(struct ata_port *ap, unsigned int device); </para> </para> <para> <para> Most drivers for taskfile-based hardware use Most drivers for taskfile-based hardware use ata_std_dev_select() for this hook. Controllers which do not ata_sff_dev_select() for this hook. support second drives on a port (such as SATA contollers) will use ata_noop_dev_select(). </para> </para> </sect2> </sect2> Loading Loading @@ -441,13 +428,13 @@ void (*irq_clear) (struct ata_port *); to struct ata_host_set. to struct ata_host_set. </para> </para> <para> <para> Most legacy IDE drivers use ata_interrupt() for the Most legacy IDE drivers use ata_sff_interrupt() for the irq_handler hook, which scans all ports in the host_set, irq_handler hook, which scans all ports in the host_set, determines which queued command was active (if any), and calls determines which queued command was active (if any), and calls ata_host_intr(ap,qc). ata_sff_host_intr(ap,qc). </para> </para> <para> <para> Most legacy IDE drivers use ata_bmdma_irq_clear() for the Most legacy IDE drivers use ata_sff_irq_clear() for the irq_clear() hook, which simply clears the interrupt and error irq_clear() hook, which simply clears the interrupt and error flags in the DMA status register. flags in the DMA status register. </para> </para> Loading Loading @@ -496,10 +483,6 @@ void (*host_stop) (struct ata_host_set *host_set); data from port at this time. data from port at this time. </para> </para> <para> <para> Many drivers use ata_port_stop() as this hook, which frees the PRD table. </para> <para> ->host_stop() is called after all ->port_stop() calls ->host_stop() is called after all ->port_stop() calls have completed. The hook must finalize hardware shutdown, release DMA have completed. The hook must finalize hardware shutdown, release DMA and other resources, etc. and other resources, etc. Loading
Documentation/DocBook/sh.tmpl +7 −3 Original line number Original line Diff line number Diff line Loading @@ -19,13 +19,17 @@ </authorgroup> </authorgroup> <copyright> <copyright> <year>2008</year> <year>2008-2010</year> <holder>Paul Mundt</holder> <holder>Paul Mundt</holder> </copyright> </copyright> <copyright> <copyright> <year>2008</year> <year>2008-2010</year> <holder>Renesas Technology Corp.</holder> <holder>Renesas Technology Corp.</holder> </copyright> </copyright> <copyright> <year>2010</year> <holder>Renesas Electronics Corp.</holder> </copyright> <legalnotice> <legalnotice> <para> <para> Loading Loading @@ -77,7 +81,7 @@ </chapter> </chapter> <chapter id="clk"> <chapter id="clk"> <title>Clock Framework Extensions</title> <title>Clock Framework Extensions</title> !Iarch/sh/include/asm/clock.h !Iinclude/linux/sh_clk.h </chapter> </chapter> <chapter id="mach"> <chapter id="mach"> <title>Machine Specific Interfaces</title> <title>Machine Specific Interfaces</title> Loading
Documentation/DocBook/tracepoint.tmpl +13 −0 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,15 @@ </address> </address> </affiliation> </affiliation> </author> </author> <author> <firstname>William</firstname> <surname>Cohen</surname> <affiliation> <address> <email>wcohen@redhat.com</email> </address> </affiliation> </author> </authorgroup> </authorgroup> <legalnotice> <legalnotice> Loading Loading @@ -91,4 +100,8 @@ !Iinclude/trace/events/signal.h !Iinclude/trace/events/signal.h </chapter> </chapter> <chapter id="block"> <title>Block IO</title> !Iinclude/trace/events/block.h </chapter> </book> </book>
Documentation/HOWTO +1 −1 Original line number Original line Diff line number Diff line Loading @@ -234,7 +234,7 @@ process is as follows: Linus, usually the patches that have already been included in the Linus, usually the patches that have already been included in the -next kernel for a few weeks. The preferred way to submit big changes -next kernel for a few weeks. The preferred way to submit big changes is using git (the kernel's source management tool, more information is using git (the kernel's source management tool, more information can be found at http://git.or.cz/) but plain patches are also just can be found at http://git-scm.com/) but plain patches are also just fine. fine. - After two weeks a -rc1 kernel is released it is now possible to push - After two weeks a -rc1 kernel is released it is now possible to push only patches that do not include new features that could affect the only patches that do not include new features that could affect the Loading
Documentation/RCU/NMI-RCU.txt +22 −17 Original line number Original line Diff line number Diff line Loading @@ -34,7 +34,7 @@ NMI handler. cpu = smp_processor_id(); cpu = smp_processor_id(); ++nmi_count(cpu); ++nmi_count(cpu); if (!rcu_dereference(nmi_callback)(regs, cpu)) if (!rcu_dereference_sched(nmi_callback)(regs, cpu)) default_do_nmi(regs); default_do_nmi(regs); nmi_exit(); nmi_exit(); Loading @@ -47,12 +47,13 @@ function pointer. If this handler returns zero, do_nmi() invokes the default_do_nmi() function to handle a machine-specific NMI. Finally, default_do_nmi() function to handle a machine-specific NMI. Finally, preemption is restored. preemption is restored. Strictly speaking, rcu_dereference() is not needed, since this code runs In theory, rcu_dereference_sched() is not needed, since this code runs only on i386, which does not need rcu_dereference() anyway. However, only on i386, which in theory does not need rcu_dereference_sched() it is a good documentation aid, particularly for anyone attempting to anyway. However, in practice it is a good documentation aid, particularly do something similar on Alpha. for anyone attempting to do something similar on Alpha or on systems with aggressive optimizing compilers. Quick Quiz: Why might the rcu_dereference() be necessary on Alpha, Quick Quiz: Why might the rcu_dereference_sched() be necessary on Alpha, given that the code referenced by the pointer is read-only? given that the code referenced by the pointer is read-only? Loading Loading @@ -99,17 +100,21 @@ invoke irq_enter() and irq_exit() on NMI entry and exit, respectively. Answer to Quick Quiz Answer to Quick Quiz Why might the rcu_dereference() be necessary on Alpha, given Why might the rcu_dereference_sched() be necessary on Alpha, given that the code referenced by the pointer is read-only? that the code referenced by the pointer is read-only? Answer: The caller to set_nmi_callback() might well have Answer: The caller to set_nmi_callback() might well have initialized some data that is to be used by the initialized some data that is to be used by the new NMI new NMI handler. In this case, the rcu_dereference() handler. In this case, the rcu_dereference_sched() would would be needed, because otherwise a CPU that received be needed, because otherwise a CPU that received an NMI an NMI just after the new handler was set might see just after the new handler was set might see the pointer the pointer to the new NMI handler, but the old to the new NMI handler, but the old pre-initialized pre-initialized version of the handler's data. version of the handler's data. More important, the rcu_dereference() makes it clear This same sad story can happen on other CPUs when using to someone reading the code that the pointer is being a compiler with aggressive pointer-value speculation protected by RCU. optimizations. More important, the rcu_dereference_sched() makes it clear to someone reading the code that the pointer is being protected by RCU-sched.