If you are newbie programmer you should not be hacking the Linux kernel. In order to access the HPET timer directly you need to be running in kernel space. This means modifying and recompiling a Linux kernel and rebooting into that kernel. Presumably you are trying to access it from user space? (assuming you know the difference)
Also, no offense, but please read
http://www.catb.org/~esr/faqs/smart-questions.html , as that will benefit both you and every person to whom you want to ask a question. Congratulations for your efforts, and I encourage them. Still, if you will continue then you really, really, really, need to read and understand the ESR FAQ at the link above. I promise you will get much further, much faster, without annoying people or sitting back wondering why noone is responding to your question!
Good Luck!
(I almost didn't respond, but then thought back to my newbie days, and decided to take pity on you ;-)