Determining 32bit or 64bit OS from a running kernel module

Saket Sinha saket.sinha89 at gmail.com
Wed Oct 23 08:54:24 EDT 2013


>> I know we have CONFIG_X86_64 and CONFIG_X86_32 for  x86 architecture but
> how do I exactly check it in my module code?

>>I'm totally failing to understand why '#ifdef CONFIG_X86_64' isn't
sufficient?

'#ifdef CONFIG_X86_64 is working for me but I couldn't  find it being used
by drivers in the kernel source tree so I guessed people were doing it by
some better, smarter method.

Regards,
Saket Sinha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131023/c0cce7b0/attachment.html 


More information about the Kernelnewbies mailing list