.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * arch/arm/include/asm/io.h |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 1996-2000 Russell King |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License version 2 as |
---|
8 | | - * published by the Free Software Foundation. |
---|
9 | 6 | * |
---|
10 | 7 | * Modifications: |
---|
11 | 8 | * 16-Sep-1996 RMK Inlined the inx/outx functions & optimised for both |
---|
.. | .. |
---|
28 | 25 | #include <asm/byteorder.h> |
---|
29 | 26 | #include <asm/memory.h> |
---|
30 | 27 | #include <asm-generic/pci_iomap.h> |
---|
31 | | -#include <xen/xen.h> |
---|
32 | 28 | |
---|
33 | 29 | /* |
---|
34 | 30 | * ISA I/O bus memory addresses are 1:1 with the physical address. |
---|
35 | 31 | */ |
---|
36 | 32 | #define isa_virt_to_bus virt_to_phys |
---|
37 | | -#define isa_page_to_bus page_to_phys |
---|
38 | 33 | #define isa_bus_to_virt phys_to_virt |
---|
39 | 34 | |
---|
40 | 35 | /* |
---|
.. | .. |
---|
282 | 277 | extern void _memcpy_toio(volatile void __iomem *, const void *, size_t); |
---|
283 | 278 | extern void _memset_io(volatile void __iomem *, int, size_t); |
---|
284 | 279 | |
---|
285 | | -#define mmiowb() |
---|
286 | | - |
---|
287 | 280 | /* |
---|
288 | 281 | * Memory access primitives |
---|
289 | 282 | * ------------------------ |
---|
.. | .. |
---|
363 | 356 | * |
---|
364 | 357 | * Function Memory type Cacheability Cache hint |
---|
365 | 358 | * ioremap() Device n/a n/a |
---|
366 | | - * ioremap_nocache() Device n/a n/a |
---|
367 | 359 | * ioremap_cache() Normal Writeback Read allocate |
---|
368 | 360 | * ioremap_wc() Normal Non-cacheable n/a |
---|
369 | 361 | * ioremap_wt() Normal Non-cacheable n/a |
---|
.. | .. |
---|
374 | 366 | * - number, order and size of accesses are maintained |
---|
375 | 367 | * - unaligned accesses are "unpredictable" |
---|
376 | 368 | * - writes may be delayed before they hit the endpoint device |
---|
377 | | - * |
---|
378 | | - * ioremap_nocache() is the same as ioremap() as there are too many device |
---|
379 | | - * drivers using this for device registers, and documentation which tells |
---|
380 | | - * people to use it for such for this to be any different. This is not a |
---|
381 | | - * safe fallback for memory-like mappings, or memory regions where the |
---|
382 | | - * compiler may generate unaligned accesses - eg, via inlining its own |
---|
383 | | - * memcpy. |
---|
384 | 369 | * |
---|
385 | 370 | * All normal memory mappings have the following properties: |
---|
386 | 371 | * - reads can be repeated with no side effects |
---|
.. | .. |
---|
399 | 384 | */ |
---|
400 | 385 | void __iomem *ioremap(resource_size_t res_cookie, size_t size); |
---|
401 | 386 | #define ioremap ioremap |
---|
402 | | -#define ioremap_nocache ioremap |
---|
403 | 387 | |
---|
404 | 388 | /* |
---|
405 | 389 | * Do not use ioremap_cache for mapping memory. Use memremap instead. |
---|
406 | 390 | */ |
---|
407 | 391 | void __iomem *ioremap_cache(resource_size_t res_cookie, size_t size); |
---|
408 | 392 | #define ioremap_cache ioremap_cache |
---|
409 | | - |
---|
410 | | -/* |
---|
411 | | - * Do not use ioremap_cached in new code. Provided for the benefit of |
---|
412 | | - * the pxa2xx-flash MTD driver only. |
---|
413 | | - */ |
---|
414 | | -void __iomem *ioremap_cached(resource_size_t res_cookie, size_t size); |
---|
415 | 393 | |
---|
416 | 394 | void __iomem *ioremap_wc(resource_size_t res_cookie, size_t size); |
---|
417 | 395 | #define ioremap_wc ioremap_wc |
---|
.. | .. |
---|
459 | 437 | |
---|
460 | 438 | #include <asm-generic/io.h> |
---|
461 | 439 | |
---|
462 | | -/* |
---|
463 | | - * can the hardware map this into one segment or not, given no other |
---|
464 | | - * constraints. |
---|
465 | | - */ |
---|
466 | | -#define BIOVEC_MERGEABLE(vec1, vec2) \ |
---|
467 | | - ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) |
---|
468 | | - |
---|
469 | | -struct bio_vec; |
---|
470 | | -extern bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, |
---|
471 | | - const struct bio_vec *vec2); |
---|
472 | | -#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ |
---|
473 | | - (__BIOVEC_PHYS_MERGEABLE(vec1, vec2) && \ |
---|
474 | | - (!xen_domain() || xen_biovec_phys_mergeable(vec1, vec2))) |
---|
475 | | - |
---|
476 | 440 | #ifdef CONFIG_MMU |
---|
477 | 441 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE |
---|
478 | 442 | extern int valid_phys_addr_range(phys_addr_t addr, size_t size); |
---|
479 | 443 | extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size); |
---|
480 | 444 | extern int devmem_is_allowed(unsigned long pfn); |
---|
| 445 | +extern bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size, |
---|
| 446 | + unsigned long flags); |
---|
| 447 | +#define arch_memremap_can_ram_remap arch_memremap_can_ram_remap |
---|
481 | 448 | #endif |
---|
482 | 449 | |
---|
483 | 450 | /* |
---|