FASTIO
18 Jan 2021 05:49 #195752
by tjtr33
Hal_parport has a note about FASTIO
/* If FASTIO is defined, uses outb() and inb() from <asm.io>,
instead of rtapi_outb() and rtapi_inb() - the <asm.io> ones
are inlined, and save a microsecond or two (on my 233MHz box)
*/
I searched around and saw this FASTIO mentioned and enabled in several drivers.
it is NOT in a file name asm.io ( doesnt exist)
there IS an asm/io.h
BUT the macros (inline) seem to be in rtapi_parport.h
the CODE between the triple quotes could be inserted into hal_parport to try
(my intenet is to rewrite hal_pi_gpio to allow invert and reset pins,
so I study all the current techniques to enumrate and store pins & states)
"""
This FASTIO could allow faster threads or reduce UXRTdelays
(UnexpectedRealtimeDelays)
"""
If FASTIO is defined, uses outb() and inb() from <asm.io>,
instead of rtapi_outb() and rtapi_inb() - the <asm.io> ones
are inlined, and save a microsecond or two (on my 233MHz box)
(JMKasunich)
(usage)
#define FASTIO
#ifdef FASTIO
#define rtapi_inb inb
#define rtapi_outb outb
#include <asm/io.h>
#endif
"""
This 'usage' seems to contradict the original notes.
Has anyone tried FASTIO ( used an assembler macro to speed up byte sized reads and writes? )
and
There is no <asm.io> so where are these macros?
Thanks
TomP
/* If FASTIO is defined, uses outb() and inb() from <asm.io>,
instead of rtapi_outb() and rtapi_inb() - the <asm.io> ones
are inlined, and save a microsecond or two (on my 233MHz box)
*/
I searched around and saw this FASTIO mentioned and enabled in several drivers.
it is NOT in a file name asm.io ( doesnt exist)
there IS an asm/io.h
BUT the macros (inline) seem to be in rtapi_parport.h
the CODE between the triple quotes could be inserted into hal_parport to try
(my intenet is to rewrite hal_pi_gpio to allow invert and reset pins,
so I study all the current techniques to enumrate and store pins & states)
"""
This FASTIO could allow faster threads or reduce UXRTdelays
(UnexpectedRealtimeDelays)
"""
If FASTIO is defined, uses outb() and inb() from <asm.io>,
instead of rtapi_outb() and rtapi_inb() - the <asm.io> ones
are inlined, and save a microsecond or two (on my 233MHz box)
(JMKasunich)
(usage)
#define FASTIO
#ifdef FASTIO
#define rtapi_inb inb
#define rtapi_outb outb
#include <asm/io.h>
#endif
"""
This 'usage' seems to contradict the original notes.
Has anyone tried FASTIO ( used an assembler macro to speed up byte sized reads and writes? )
and
There is no <asm.io> so where are these macros?
Thanks
TomP
Please Log in or Create an account to join the conversation.
19 Jan 2021 12:43 #195882
by andypugh
As this is J M Kasunich, and he is talking about a 233MHz PC I think that this is very old information. Possibly 20 years old.
I am pretty sure that the note is referring to <asm/io.h> as that is where inb and outb are defined.
github.com/torvalds/linux/blob/master/arch/x86/include/asm/io.h
I even think that this note might date from when LinuxCNC was compiled-to-suit, ie before JMK invented HAL.
Current code should _not_ use inb and outb as the ability to use both kernel and uspace modes depends on the abstraction in rtapi.
I am pretty sure that the note is referring to <asm/io.h> as that is where inb and outb are defined.
github.com/torvalds/linux/blob/master/arch/x86/include/asm/io.h
I even think that this note might date from when LinuxCNC was compiled-to-suit, ie before JMK invented HAL.
Current code should _not_ use inb and outb as the ability to use both kernel and uspace modes depends on the abstraction in rtapi.
Please Log in or Create an account to join the conversation.
Time to create page: 0.114 seconds