aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@parisc-linux.org>2005-10-21 22:36:40 -0400
committerKyle McMartin <kyle@parisc-linux.org>2005-10-21 22:36:40 -0400
commit53f01bba49938f115237fe43a261c31ac13ae5c6 (patch)
treedf2a5fa9d95c7e69447ac0c89d6e149888c9bd1c /arch/parisc
parentbdad1f836ab1ca2b18a625222f63f630cfd14e41 (diff)
[PARISC] Convert parisc_device to use struct resource for hpa
Convert pa_dev->hpa from an unsigned long to a struct resource. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Fix up users of ->hpa to use ->hpa.start instead. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/perf.c12
-rw-r--r--arch/parisc/kernel/processor.c8
2 files changed, 11 insertions, 9 deletions
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c
index b3ad0a505b87..44670d6e06f4 100644
--- a/arch/parisc/kernel/perf.c
+++ b/arch/parisc/kernel/perf.c
@@ -746,7 +746,8 @@ static int perf_write_image(uint64_t *memaddr)
746 uint64_t *bptr; 746 uint64_t *bptr;
747 uint32_t dwords; 747 uint32_t dwords;
748 uint32_t *intrigue_rdr; 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 struct rdr_tbl_ent *tentry;
751 int i; 752 int i;
752 753
@@ -798,15 +799,16 @@ static int perf_write_image(uint64_t *memaddr)
798 return -1; 799 return -1;
799 } 800 }
800 801
801 proc_hpa = cpu_device->hpa; 802 runway = ioremap(cpu_device->hpa.start, 4096);
802 803
803 /* Merge intrigue bits into Runway STATUS 0 */ 804 /* Merge intrigue bits into Runway STATUS 0 */
804 tmp64 = __raw_readq(proc_hpa + RUNWAY_STATUS) & 0xffecfffffffffffful; 805 tmp64 = __raw_readq(runway + RUNWAY_STATUS) & 0xffecfffffffffffful;
805 __raw_writeq(tmp64 | (*memaddr++ & 0x0013000000000000ul), proc_hpa + RUNWAY_STATUS); 806 __raw_writeq(tmp64 | (*memaddr++ & 0x0013000000000000ul),
807 runway + RUNWAY_STATUS);
806 808
807 /* Write RUNWAY DEBUG registers */ 809 /* Write RUNWAY DEBUG registers */
808 for (i = 0; i < 8; i++) { 810 for (i = 0; i < 8; i++) {
809 __raw_writeq(*memaddr++, proc_hpa + RUNWAY_DEBUG + i); 811 __raw_writeq(*memaddr++, runway + RUNWAY_DEBUG);
810 } 812 }
811 813
812 return 0; 814 return 0;
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index 13b721cb9f55..4f5bbcf1f5a4 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -92,7 +92,7 @@ static int __init processor_probe(struct parisc_device *dev)
92 * May get overwritten by PAT code. 92 * May get overwritten by PAT code.
93 */ 93 */
94 cpuid = boot_cpu_data.cpu_count; 94 cpuid = boot_cpu_data.cpu_count;
95 txn_addr = dev->hpa; /* for legacy PDC */ 95 txn_addr = dev->hpa.start; /* for legacy PDC */
96 96
97#ifdef __LP64__ 97#ifdef __LP64__
98 if (is_pdc_pat()) { 98 if (is_pdc_pat()) {
@@ -122,7 +122,7 @@ static int __init processor_probe(struct parisc_device *dev)
122 * boot time (ie shutdown a CPU from an OS perspective). 122 * boot time (ie shutdown a CPU from an OS perspective).
123 */ 123 */
124 /* get the cpu number */ 124 /* get the cpu number */
125 status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa); 125 status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa.start);
126 126
127 BUG_ON(PDC_OK != status); 127 BUG_ON(PDC_OK != status);
128 128
@@ -130,7 +130,7 @@ static int __init processor_probe(struct parisc_device *dev)
130 printk(KERN_WARNING "IGNORING CPU at 0x%x," 130 printk(KERN_WARNING "IGNORING CPU at 0x%x,"
131 " cpu_slot_id > NR_CPUS" 131 " cpu_slot_id > NR_CPUS"
132 " (%ld > %d)\n", 132 " (%ld > %d)\n",
133 dev->hpa, cpu_info.cpu_num, NR_CPUS); 133 dev->hpa.start, cpu_info.cpu_num, NR_CPUS);
134 /* Ignore CPU since it will only crash */ 134 /* Ignore CPU since it will only crash */
135 boot_cpu_data.cpu_count--; 135 boot_cpu_data.cpu_count--;
136 return 1; 136 return 1;
@@ -149,7 +149,7 @@ static int __init processor_probe(struct parisc_device *dev)
149 149
150 p->loops_per_jiffy = loops_per_jiffy; 150 p->loops_per_jiffy = loops_per_jiffy;
151 p->dev = dev; /* Save IODC data in case we need it */ 151 p->dev = dev; /* Save IODC data in case we need it */
152 p->hpa = dev->hpa; /* save CPU hpa */ 152 p->hpa = dev->hpa.start; /* save CPU hpa */
153 p->cpuid = cpuid; /* save CPU id */ 153 p->cpuid = cpuid; /* save CPU id */
154 p->txn_addr = txn_addr; /* save CPU IRQ address */ 154 p->txn_addr = txn_addr; /* save CPU IRQ address */
155#ifdef CONFIG_SMP 155#ifdef CONFIG_SMP