mm.c (b711531641038f3ff3723914f3d5ba79848d347e) mm.c (126554465d93b10662742128918a5fc338cda4aa)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * PS3 address space management.
4 *
5 * Copyright (C) 2006 Sony Computer Entertainment Inc.
6 * Copyright 2006 Sony Corp.
7 */
8

--- 186 unchanged lines hidden (view full) ---

195/**
196 * ps3_mm_vas_destroy -
197 */
198
199void ps3_mm_vas_destroy(void)
200{
201 int result;
202
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * PS3 address space management.
4 *
5 * Copyright (C) 2006 Sony Computer Entertainment Inc.
6 * Copyright 2006 Sony Corp.
7 */
8

--- 186 unchanged lines hidden (view full) ---

195/**
196 * ps3_mm_vas_destroy -
197 */
198
199void ps3_mm_vas_destroy(void)
200{
201 int result;
202
203 DBG("%s:%d: map.vas_id = %llu\n", __func__, __LINE__, map.vas_id);
204
205 if (map.vas_id) {
206 result = lv1_select_virtual_address_space(0);
203 if (map.vas_id) {
204 result = lv1_select_virtual_address_space(0);
207 BUG_ON(result);
208 result = lv1_destruct_virtual_address_space(map.vas_id);
209 BUG_ON(result);
205 result += lv1_destruct_virtual_address_space(map.vas_id);
206
207 if (result) {
208 lv1_panic(0);
209 }
210
210 map.vas_id = 0;
211 }
212}
213
214static int ps3_mm_get_repository_highmem(struct mem_region *r)
215{
216 int result;
217

--- 81 unchanged lines hidden (view full) ---

299 * @r: pointer to struct mem_region
300 */
301
302static void ps3_mm_region_destroy(struct mem_region *r)
303{
304 int result;
305
306 if (!r->destroy) {
211 map.vas_id = 0;
212 }
213}
214
215static int ps3_mm_get_repository_highmem(struct mem_region *r)
216{
217 int result;
218

--- 81 unchanged lines hidden (view full) ---

300 * @r: pointer to struct mem_region
301 */
302
303static void ps3_mm_region_destroy(struct mem_region *r)
304{
305 int result;
306
307 if (!r->destroy) {
307 pr_info("%s:%d: Not destroying high region: %llxh %llxh\n",
308 __func__, __LINE__, r->base, r->size);
309 return;
310 }
311
308 return;
309 }
310
312 DBG("%s:%d: r->base = %llxh\n", __func__, __LINE__, r->base);
313
314 if (r->base) {
315 result = lv1_release_memory(r->base);
311 if (r->base) {
312 result = lv1_release_memory(r->base);
316 BUG_ON(result);
313
314 if (result) {
315 lv1_panic(0);
316 }
317
317 r->size = r->base = r->offset = 0;
318 map.total = map.rm.size;
319 }
318 r->size = r->base = r->offset = 0;
319 map.total = map.rm.size;
320 }
321
320 ps3_mm_set_repository_highmem(NULL);
321}
322
323/*============================================================================*/
324/* dma routines */
325/*============================================================================*/
326
327/**

--- 910 unchanged lines hidden ---
322 ps3_mm_set_repository_highmem(NULL);
323}
324
325/*============================================================================*/
326/* dma routines */
327/*============================================================================*/
328
329/**

--- 910 unchanged lines hidden ---