.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2001-2008 Silicon Graphics, Inc. All rights reserved. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify it |
---|
5 | | - * under the terms of version 2 of the GNU General Public License |
---|
6 | | - * as published by the Free Software Foundation. |
---|
7 | 4 | * |
---|
8 | 5 | * A simple uncached page allocator using the generic allocator. This |
---|
9 | 6 | * allocator first utilizes the spare (spill) pages found in the EFI |
---|
.. | .. |
---|
22 | 19 | #include <linux/nmi.h> |
---|
23 | 20 | #include <linux/genalloc.h> |
---|
24 | 21 | #include <linux/gfp.h> |
---|
| 22 | +#include <linux/pgtable.h> |
---|
25 | 23 | #include <asm/page.h> |
---|
26 | 24 | #include <asm/pal.h> |
---|
27 | | -#include <asm/pgtable.h> |
---|
28 | 25 | #include <linux/atomic.h> |
---|
29 | 26 | #include <asm/tlbflush.h> |
---|
30 | | -#include <asm/sn/arch.h> |
---|
31 | 27 | |
---|
32 | 28 | |
---|
33 | 29 | extern void __init efi_memmap_walk_uc(efi_freemem_callback_t, void *); |
---|
.. | .. |
---|
124 | 120 | status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL); |
---|
125 | 121 | if (status == PAL_VISIBILITY_OK_REMOTE_NEEDED) { |
---|
126 | 122 | atomic_set(&uc_pool->status, 0); |
---|
127 | | - status = smp_call_function(uncached_ipi_visibility, uc_pool, 1); |
---|
128 | | - if (status || atomic_read(&uc_pool->status)) |
---|
| 123 | + smp_call_function(uncached_ipi_visibility, uc_pool, 1); |
---|
| 124 | + if (atomic_read(&uc_pool->status)) |
---|
129 | 125 | goto failed; |
---|
130 | 126 | } else if (status != PAL_VISIBILITY_OK) |
---|
131 | 127 | goto failed; |
---|
132 | 128 | |
---|
133 | 129 | preempt_disable(); |
---|
134 | 130 | |
---|
135 | | - if (ia64_platform_is("sn2")) |
---|
136 | | - sn_flush_all_caches(uc_addr, IA64_GRANULE_SIZE); |
---|
137 | | - else |
---|
138 | | - flush_icache_range(uc_addr, uc_addr + IA64_GRANULE_SIZE); |
---|
| 131 | + flush_icache_range(uc_addr, uc_addr + IA64_GRANULE_SIZE); |
---|
139 | 132 | |
---|
140 | 133 | /* flush the just introduced uncached translation from the TLB */ |
---|
141 | 134 | local_flush_tlb_all(); |
---|
.. | .. |
---|
146 | 139 | if (status != PAL_STATUS_SUCCESS) |
---|
147 | 140 | goto failed; |
---|
148 | 141 | atomic_set(&uc_pool->status, 0); |
---|
149 | | - status = smp_call_function(uncached_ipi_mc_drain, uc_pool, 1); |
---|
150 | | - if (status || atomic_read(&uc_pool->status)) |
---|
| 142 | + smp_call_function(uncached_ipi_mc_drain, uc_pool, 1); |
---|
| 143 | + if (atomic_read(&uc_pool->status)) |
---|
151 | 144 | goto failed; |
---|
152 | 145 | |
---|
153 | 146 | /* |
---|