Re: request_region in the kernel

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

 



Dear Vinay,

THX for You answer!

On 21 Mar 2002 at 15:07, Vinay wrote:

> Why do you need ioremap() as you are using request_region() . ioremap() must
> be used when you are requesting for a memory region (request_mem_region) .
> 
> can u explain u'r problem in detail .

I'm implementing the real time clock handling routines for a ppc platform. 
This equipment has own RTC chip (not the one which is integrated to the CPU 
as the kernel sources expects).

I need to get/set rtc time from the kernel, so I modified 
arch/ppc/kernel/m8xx_setup.c to use the proper IO ports for setting and 
getting data to and from the RTC chip (with readb and writeb).

Also I had to create an RTC module which also modifies data stored in the RTC 

chip.

So there are two possible way to communicate with the RTC: thru the kernel 
and thru the module. I wanted to create the kernel modification no to allow 
anyone else to touches the IO range of the RTC. That's why I wanted to use 
request_region() in the kernel. But when I do that the kernel is not able to 
boot up.

Now I don't use the request_region() in the kernel, just in the loadable 
module, so I can see the result in /proc/ioports and no other modules can 
touch these io region, but there is a possibility to load an other module 
before mine which can modify the data stored in the RTC chip.

Would it be possible to forbid other processes to reach a given IO range in 
the kernel?

TIA && Good byte!

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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