Re: why would someone reinvent the kernel space read/write routines?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I really don't have any background information. This post is just
inference, from the function definitions.

2008/12/27 Robert P. J. Day <rpjday@xxxxxxxxxxxxxx>:
>  unsigned char read8(void* address)
>  {
>        return *((unsigned char*) address);
>  }

As you can see, this function reads from a *memory* address. This
would be useful for memory mapped IO. The address is a part of the
address space of the processor.

>
> normal kernel source provides the universal primitives inb(), inw(),
> inl(), outb(), outw() and outl(), no?  shouldn't one expect to have

These functions work on IO-ports; port numbers form a part of the
16-bit addressable IO-space of a processor.

Having a common interface for read8(), write8(), etc, could simplify
changes to the code, to make them work on different endian machines.

-- 
Vimal

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux