title: Kernel module crashes when reading memory
body: <p>If I know the physical memory of data, because it was placed there by a memory mapped peripheral, how do I access it in a kernel module? My first instinct is to make a pointer </p>
  
  <pre><code>int * addr;
  </code></pre>
  
  <p>and assign it</p>
  
  <pre><code>addr = 0x________;
  </code></pre>
  
  <p>then read it</p>
  
  <pre><code>printk(KERN_INFO "%d\n",*addr);
  </code></pre>
  
  <p>but trying this makes the module crash. What's the appropriate way to do this?</p>