aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/perf/hv-24x7.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/perf/hv-24x7.c')
-rw-r--r--arch/powerpc/perf/hv-24x7.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
index 95a67f81f22a..e0766b82e165 100644
--- a/arch/powerpc/perf/hv-24x7.c
+++ b/arch/powerpc/perf/hv-24x7.c
@@ -171,7 +171,7 @@ static unsigned long h_get_24x7_catalog_page_(unsigned long phys_4096,
171} 171}
172 172
173static unsigned long h_get_24x7_catalog_page(char page[], 173static unsigned long h_get_24x7_catalog_page(char page[],
174 u32 version, u32 index) 174 u64 version, u32 index)
175{ 175{
176 return h_get_24x7_catalog_page_(virt_to_phys(page), 176 return h_get_24x7_catalog_page_(virt_to_phys(page),
177 version, index); 177 version, index);
@@ -185,7 +185,7 @@ static ssize_t catalog_read(struct file *filp, struct kobject *kobj,
185 ssize_t ret = 0; 185 ssize_t ret = 0;
186 size_t catalog_len = 0, catalog_page_len = 0, page_count = 0; 186 size_t catalog_len = 0, catalog_page_len = 0, page_count = 0;
187 loff_t page_offset = 0; 187 loff_t page_offset = 0;
188 uint32_t catalog_version_num = 0; 188 uint64_t catalog_version_num = 0;
189 void *page = kmem_cache_alloc(hv_page_cache, GFP_USER); 189 void *page = kmem_cache_alloc(hv_page_cache, GFP_USER);
190 struct hv_24x7_catalog_page_0 *page_0 = page; 190 struct hv_24x7_catalog_page_0 *page_0 = page;
191 if (!page) 191 if (!page)
@@ -197,7 +197,7 @@ static ssize_t catalog_read(struct file *filp, struct kobject *kobj,
197 goto e_free; 197 goto e_free;
198 } 198 }
199 199
200 catalog_version_num = be32_to_cpu(page_0->version); 200 catalog_version_num = be64_to_cpu(page_0->version);
201 catalog_page_len = be32_to_cpu(page_0->length); 201 catalog_page_len = be32_to_cpu(page_0->length);
202 catalog_len = catalog_page_len * 4096; 202 catalog_len = catalog_page_len * 4096;
203 203
@@ -220,8 +220,9 @@ static ssize_t catalog_read(struct file *filp, struct kobject *kobj,
220 page, 4096, page_offset * 4096); 220 page, 4096, page_offset * 4096);
221e_free: 221e_free:
222 if (hret) 222 if (hret)
223 pr_err("h_get_24x7_catalog_page(ver=%d, page=%lld) failed: rc=%ld\n", 223 pr_err("h_get_24x7_catalog_page(ver=%lld, page=%lld) failed:"
224 catalog_version_num, page_offset, hret); 224 " rc=%ld\n",
225 catalog_version_num, page_offset, hret);
225 kfree(page); 226 kfree(page);
226 227
227 pr_devel("catalog_read: offset=%lld(%lld) count=%zu(%zu) catalog_len=%zu(%zu) => %zd\n", 228 pr_devel("catalog_read: offset=%lld(%lld) count=%zu(%zu) catalog_len=%zu(%zu) => %zd\n",
@@ -255,7 +256,7 @@ e_free: \
255static DEVICE_ATTR_RO(_name) 256static DEVICE_ATTR_RO(_name)
256 257
257PAGE_0_ATTR(catalog_version, "%lld\n", 258PAGE_0_ATTR(catalog_version, "%lld\n",
258 (unsigned long long)be32_to_cpu(page_0->version)); 259 (unsigned long long)be64_to_cpu(page_0->version));
259PAGE_0_ATTR(catalog_len, "%lld\n", 260PAGE_0_ATTR(catalog_len, "%lld\n",
260 (unsigned long long)be32_to_cpu(page_0->length) * 4096); 261 (unsigned long long)be32_to_cpu(page_0->length) * 4096);
261static BIN_ATTR_RO(catalog, 0/* real length varies */); 262static BIN_ATTR_RO(catalog, 0/* real length varies */);