| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * PS3 Platform spu routines. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2006 Sony Computer Entertainment Inc. |
|---|
| 5 | 6 | * Copyright 2006 Sony Corp. |
|---|
| 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 |
|---|
| 9 | | - * the Free Software Foundation; version 2 of the License. |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | | - * GNU General Public License for more details. |
|---|
| 15 | | - * |
|---|
| 16 | | - * You should have received a copy of the GNU General Public License |
|---|
| 17 | | - * along with this program; if not, write to the Free Software |
|---|
| 18 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 19 | 7 | */ |
|---|
| 20 | 8 | |
|---|
| 21 | 9 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 196 | 184 | * setup_areas - Map the spu regions into the address space. |
|---|
| 197 | 185 | * |
|---|
| 198 | 186 | * The current HV requires the spu shadow regs to be mapped with the |
|---|
| 199 | | - * PTE page protection bits set as read-only (PP=3). This implementation |
|---|
| 200 | | - * uses the low level __ioremap() to bypass the page protection settings |
|---|
| 201 | | - * inforced by ioremap_prot() to get the needed PTE bits set for the |
|---|
| 202 | | - * shadow regs. |
|---|
| 187 | + * PTE page protection bits set as read-only. |
|---|
| 203 | 188 | */ |
|---|
| 204 | 189 | |
|---|
| 205 | 190 | static int __init setup_areas(struct spu *spu) |
|---|
| .. | .. |
|---|
| 207 | 192 | struct table {char* name; unsigned long addr; unsigned long size;}; |
|---|
| 208 | 193 | unsigned long shadow_flags = pgprot_val(pgprot_noncached_wc(PAGE_KERNEL_RO)); |
|---|
| 209 | 194 | |
|---|
| 210 | | - spu_pdata(spu)->shadow = __ioremap(spu_pdata(spu)->shadow_addr, |
|---|
| 211 | | - sizeof(struct spe_shadow), |
|---|
| 212 | | - shadow_flags); |
|---|
| 195 | + spu_pdata(spu)->shadow = ioremap_prot(spu_pdata(spu)->shadow_addr, |
|---|
| 196 | + sizeof(struct spe_shadow), shadow_flags); |
|---|
| 213 | 197 | if (!spu_pdata(spu)->shadow) { |
|---|
| 214 | 198 | pr_debug("%s:%d: ioremap shadow failed\n", __func__, __LINE__); |
|---|
| 215 | 199 | goto fail_ioremap; |
|---|
| 216 | 200 | } |
|---|
| 217 | 201 | |
|---|
| 218 | | - spu->local_store = (__force void *)ioremap_prot(spu->local_store_phys, |
|---|
| 219 | | - LS_SIZE, pgprot_val(pgprot_noncached_wc(__pgprot(0)))); |
|---|
| 202 | + spu->local_store = (__force void *)ioremap_wc(spu->local_store_phys, LS_SIZE); |
|---|
| 220 | 203 | |
|---|
| 221 | 204 | if (!spu->local_store) { |
|---|
| 222 | 205 | pr_debug("%s:%d: ioremap local_store failed\n", |
|---|
| .. | .. |
|---|
| 465 | 448 | ctx->ops->runcntl_stop(ctx); |
|---|
| 466 | 449 | } |
|---|
| 467 | 450 | |
|---|
| 468 | | -const struct spu_management_ops spu_management_ps3_ops = { |
|---|
| 451 | +static const struct spu_management_ops spu_management_ps3_ops = { |
|---|
| 469 | 452 | .enumerate_spus = ps3_enumerate_spus, |
|---|
| 470 | 453 | .create_spu = ps3_create_spu, |
|---|
| 471 | 454 | .destroy_spu = ps3_destroy_spu, |
|---|
| .. | .. |
|---|
| 606 | 589 | return 0; /* No support. */ |
|---|
| 607 | 590 | } |
|---|
| 608 | 591 | |
|---|
| 609 | | -const struct spu_priv1_ops spu_priv1_ps3_ops = { |
|---|
| 592 | +static const struct spu_priv1_ops spu_priv1_ps3_ops = { |
|---|
| 610 | 593 | .int_mask_and = int_mask_and, |
|---|
| 611 | 594 | .int_mask_or = int_mask_or, |
|---|
| 612 | 595 | .int_mask_set = int_mask_set, |
|---|