forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/misc/sgi-gru/grutables.h
....@@ -1,23 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * SN Platform GRU Driver
34 *
45 * GRU DRIVER TABLES, MACROS, externs, etc
56 *
67 * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program; if not, write to the Free Software
20
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
218 */
229
2310 #ifndef __GRUTABLES_H__
....@@ -320,10 +307,8 @@
320307
321308 struct gru_mm_struct {
322309 struct mmu_notifier ms_notifier;
323
- atomic_t ms_refcnt;
324310 spinlock_t ms_asid_lock; /* protects ASID assignment */
325311 atomic_t ms_range_active;/* num range_invals active */
326
- char ms_released;
327312 wait_queue_head_t ms_wait_queue;
328313 DECLARE_BITMAP(ms_asidmap, GRU_MAX_GRUS);
329314 struct gru_mm_tracker ms_asids[GRU_MAX_GRUS];
....@@ -387,7 +372,7 @@
387372 int ts_data_valid; /* Indicates if ts_gdata has
388373 valid data */
389374 struct gru_gseg_statistics ustats; /* User statistics */
390
- unsigned long ts_gdata[0]; /* save area for GRU data (CB,
375
+ unsigned long ts_gdata[]; /* save area for GRU data (CB,
391376 DS, CBE) */
392377 };
393378
....@@ -652,7 +637,7 @@
652637 extern int gru_user_unload_context(unsigned long arg);
653638 extern int gru_get_exception_detail(unsigned long arg);
654639 extern int gru_set_context_option(unsigned long address);
655
-extern void gru_check_context_placement(struct gru_thread_state *gts);
640
+extern int gru_check_context_placement(struct gru_thread_state *gts);
656641 extern int gru_cpu_fault_map_id(void);
657642 extern struct vm_area_struct *gru_find_vma(unsigned long vaddr);
658643 extern void gru_flush_all_tlb(struct gru_state *gru);