static int __init devtime_start(void)
{
uint64_t addr;
- uint32_t t1, t2;
+ uint32_t t1, t2;
uint32_t trash;
int x;
printk("Devtime Driver Version %s Loaded...\n", DRIVER_VER);
- if ((dataAddr != 0) && (count != 0))
- {
+ if (dataAddr != 0 && count != 0) {
addr = simple_strtoull(dataAddr, NULL, 0);
devSum = 0;
* linear addressing, so its not a problem. But it can fail in x86
* if physical memory is mapped to this address.
*/
- if (addr)
- {
+ if (addr) {
printk("Preparing to read %#llx %d times.\n", addr, count);
t1 = cycleCounter(trash);
- for (x=0; x < count; x++)
- {
+ for (x = 0; x < count; x++) {
trash = readl(addr);
t2 = cycleCounter(trash);
devSum += t2 - t1;
*/
iounmap(addr);
- printk("Read Address %#llx %ld times. Average latency %ld.\n", addr, devCnt, devSum/devCnt);
+ printk("Read Address %#llx %ld times. Average latency %ld.\n",
+ addr, devCnt, devSum/devCnt);
}
else
printk("Unable to remap address. Please try again later.\n");
} else {
dev = dev_get_by_name("eth0");
- if (dev)
- {
- printk("Eth0: MemStart: %#lx MemEnd: %#lx I/O Addr: %#lx\n", dev->mem_start,
- dev->mem_end, dev->base_addr);
+ if (dev) {
+ printk("Eth0: MemStart: %#lx MemEnd: %#lx I/O Addr: %#lx\n",
+ dev->mem_start, dev->mem_end, dev->base_addr);
dev_put(dev);
}
dev = 0;
dev = dev_get_by_name("eth1");
- if (dev)
- {
- printk("Eth1: MemStart: %#lx MemEnd: %#lx I/O Addr: %#lx\n", dev->mem_start,
- dev->mem_end, dev->base_addr);
+ if (dev) {
+ printk("Eth1: MemStart: %#lx MemEnd: %#lx I/O Addr: %#lx\n",
+ dev->mem_start, dev->mem_end, dev->base_addr);
dev_put(dev);
}
-
printk("Required information not supplied.\n");
}
#error Architecture NOT SUPPORTE
#endif
-static void __exit devtime_end(void) {
+static void __exit devtime_end(void)
+{
printk("Devtime Driver Version %s Unloaded...\n", DRIVER_VER);
}