perf.c (1da177e4c3f41524e886b7f1b8a0c1fc7321cac2) | perf.c (53f01bba49938f115237fe43a261c31ac13ae5c6) |
---|---|
1/* 2 * Parisc performance counters 3 * Copyright (C) 2001 Randolph Chung <tausq@debian.org> 4 * 5 * This code is derived, with permission, from HP/UX sources. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 732 unchanged lines hidden (view full) --- 741 * Write the given image out to the processor 742 */ 743static int perf_write_image(uint64_t *memaddr) 744{ 745 uint64_t buffer[MAX_RDR_WORDS]; 746 uint64_t *bptr; 747 uint32_t dwords; 748 uint32_t *intrigue_rdr; | 1/* 2 * Parisc performance counters 3 * Copyright (C) 2001 Randolph Chung <tausq@debian.org> 4 * 5 * This code is derived, with permission, from HP/UX sources. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 732 unchanged lines hidden (view full) --- 741 * Write the given image out to the processor 742 */ 743static int perf_write_image(uint64_t *memaddr) 744{ 745 uint64_t buffer[MAX_RDR_WORDS]; 746 uint64_t *bptr; 747 uint32_t dwords; 748 uint32_t *intrigue_rdr; |
749 uint64_t *intrigue_bitmask, tmp64, proc_hpa; | 749 uint64_t *intrigue_bitmask, tmp64; 750 void __iomem *runway; |
750 struct rdr_tbl_ent *tentry; 751 int i; 752 753 /* Clear out counters */ 754 if (perf_processor_interface == ONYX_INTF) { 755 756 perf_rdr_clear(16); 757 --- 35 unchanged lines hidden (view full) --- 793 */ 794 795 if (cpu_device == NULL) 796 { 797 printk(KERN_ERR "write_image: cpu_device not yet initialized!\n"); 798 return -1; 799 } 800 | 751 struct rdr_tbl_ent *tentry; 752 int i; 753 754 /* Clear out counters */ 755 if (perf_processor_interface == ONYX_INTF) { 756 757 perf_rdr_clear(16); 758 --- 35 unchanged lines hidden (view full) --- 794 */ 795 796 if (cpu_device == NULL) 797 { 798 printk(KERN_ERR "write_image: cpu_device not yet initialized!\n"); 799 return -1; 800 } 801 |
801 proc_hpa = cpu_device->hpa; | 802 runway = ioremap(cpu_device->hpa.start, 4096); |
802 803 /* Merge intrigue bits into Runway STATUS 0 */ | 803 804 /* Merge intrigue bits into Runway STATUS 0 */ |
804 tmp64 = __raw_readq(proc_hpa + RUNWAY_STATUS) & 0xffecfffffffffffful; 805 __raw_writeq(tmp64 | (*memaddr++ & 0x0013000000000000ul), proc_hpa + RUNWAY_STATUS); | 805 tmp64 = __raw_readq(runway + RUNWAY_STATUS) & 0xffecfffffffffffful; 806 __raw_writeq(tmp64 | (*memaddr++ & 0x0013000000000000ul), 807 runway + RUNWAY_STATUS); |
806 807 /* Write RUNWAY DEBUG registers */ 808 for (i = 0; i < 8; i++) { | 808 809 /* Write RUNWAY DEBUG registers */ 810 for (i = 0; i < 8; i++) { |
809 __raw_writeq(*memaddr++, proc_hpa + RUNWAY_DEBUG + i); | 811 __raw_writeq(*memaddr++, runway + RUNWAY_DEBUG); |
810 } 811 812 return 0; 813} 814 815/* 816 * perf_rdr_write 817 * --- 24 unchanged lines hidden --- | 812 } 813 814 return 0; 815} 816 817/* 818 * perf_rdr_write 819 * --- 24 unchanged lines hidden --- |