mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 12:21:37 +00:00
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton: "190 patches. Subsystems affected by this patch series: mm (hugetlb, userfaultfd, vmscan, kconfig, proc, z3fold, zbud, ras, mempolicy, memblock, migration, thp, nommu, kconfig, madvise, memory-hotplug, zswap, zsmalloc, zram, cleanups, kfence, and hmm), procfs, sysctl, misc, core-kernel, lib, lz4, checkpatch, init, kprobes, nilfs2, hfs, signals, exec, kcov, selftests, compress/decompress, and ipc" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (190 commits) ipc/util.c: use binary search for max_idx ipc/sem.c: use READ_ONCE()/WRITE_ONCE() for use_global_lock ipc: use kmalloc for msg_queue and shmid_kernel ipc sem: use kvmalloc for sem_undo allocation lib/decompressors: remove set but not used variabled 'level' selftests/vm/pkeys: exercise x86 XSAVE init state selftests/vm/pkeys: refill shadow register after implicit kernel write selftests/vm/pkeys: handle negative sys_pkey_alloc() return code selftests/vm/pkeys: fix alloc_random_pkey() to make it really, really random kcov: add __no_sanitize_coverage to fix noinstr for all architectures exec: remove checks in __register_bimfmt() x86: signal: don't do sas_ss_reset() until we are certain that sigframe won't be abandoned hfsplus: report create_date to kstat.btime hfsplus: remove unnecessary oom message nilfs2: remove redundant continue statement in a while-loop kprobes: remove duplicated strong free_insn_page in x86 and s390 init: print out unknown kernel parameters checkpatch: do not complain about positive return values starting with EPOLL checkpatch: improve the indented label test checkpatch: scripts/spdxcheck.py now requires python3 ...
This commit is contained in:
commit
71bd934101
@ -1594,6 +1594,23 @@
|
||||
Documentation/admin-guide/mm/hugetlbpage.rst.
|
||||
Format: size[KMG]
|
||||
|
||||
hugetlb_free_vmemmap=
|
||||
[KNL] Reguires CONFIG_HUGETLB_PAGE_FREE_VMEMMAP
|
||||
enabled.
|
||||
Allows heavy hugetlb users to free up some more
|
||||
memory (6 * PAGE_SIZE for each 2MB hugetlb page).
|
||||
Format: { on | off (default) }
|
||||
|
||||
on: enable the feature
|
||||
off: disable the feature
|
||||
|
||||
Built with CONFIG_HUGETLB_PAGE_FREE_VMEMMAP_DEFAULT_ON=y,
|
||||
the default is on.
|
||||
|
||||
This is not compatible with memory_hotplug.memmap_on_memory.
|
||||
If both parameters are enabled, hugetlb_free_vmemmap takes
|
||||
precedence over memory_hotplug.memmap_on_memory.
|
||||
|
||||
hung_task_panic=
|
||||
[KNL] Should the hung task detector generate panics.
|
||||
Format: 0 | 1
|
||||
@ -2860,6 +2877,10 @@
|
||||
Note that even when enabled, there are a few cases where
|
||||
the feature is not effective.
|
||||
|
||||
This is not compatible with hugetlb_free_vmemmap. If
|
||||
both parameters are enabled, hugetlb_free_vmemmap takes
|
||||
precedence over memory_hotplug.memmap_on_memory.
|
||||
|
||||
memtest= [KNL,X86,ARM,PPC,RISCV] Enable memtest
|
||||
Format: <integer>
|
||||
default : 0 <disable>
|
||||
|
@ -60,6 +60,10 @@ HugePages_Surp
|
||||
the pool above the value in ``/proc/sys/vm/nr_hugepages``. The
|
||||
maximum number of surplus huge pages is controlled by
|
||||
``/proc/sys/vm/nr_overcommit_hugepages``.
|
||||
Note: When the feature of freeing unused vmemmap pages associated
|
||||
with each hugetlb page is enabled, the number of surplus huge pages
|
||||
may be temporarily larger than the maximum number of surplus huge
|
||||
pages when the system is under memory pressure.
|
||||
Hugepagesize
|
||||
is the default hugepage size (in Kb).
|
||||
Hugetlb
|
||||
@ -80,6 +84,10 @@ returned to the huge page pool when freed by a task. A user with root
|
||||
privileges can dynamically allocate more or free some persistent huge pages
|
||||
by increasing or decreasing the value of ``nr_hugepages``.
|
||||
|
||||
Note: When the feature of freeing unused vmemmap pages associated with each
|
||||
hugetlb page is enabled, we can fail to free the huge pages triggered by
|
||||
the user when ths system is under memory pressure. Please try again later.
|
||||
|
||||
Pages that are used as huge pages are reserved inside the kernel and cannot
|
||||
be used for other purposes. Huge pages cannot be swapped out under
|
||||
memory pressure.
|
||||
@ -145,6 +153,9 @@ default_hugepagesz
|
||||
|
||||
will all result in 256 2M huge pages being allocated. Valid default
|
||||
huge page size is architecture dependent.
|
||||
hugetlb_free_vmemmap
|
||||
When CONFIG_HUGETLB_PAGE_FREE_VMEMMAP is set, this enables freeing
|
||||
unused vmemmap pages associated with each HugeTLB page.
|
||||
|
||||
When multiple huge page sizes are supported, ``/proc/sys/vm/nr_hugepages``
|
||||
indicates the current number of pre-allocated huge pages of the default size.
|
||||
|
@ -357,6 +357,19 @@ creates ZONE_MOVABLE as following.
|
||||
Unfortunately, there is no information to show which memory block belongs
|
||||
to ZONE_MOVABLE. This is TBD.
|
||||
|
||||
Memory offlining can fail when dissolving a free huge page on ZONE_MOVABLE
|
||||
and the feature of freeing unused vmemmap pages associated with each hugetlb
|
||||
page is enabled.
|
||||
|
||||
This can happen when we have plenty of ZONE_MOVABLE memory, but not enough
|
||||
kernel memory to allocate vmemmmap pages. We may even be able to migrate
|
||||
huge page contents, but will not be able to dissolve the source huge page.
|
||||
This will prevent an offline operation and is unfortunate as memory offlining
|
||||
is expected to succeed on movable zones. Users that depend on memory hotplug
|
||||
to succeed for movable zones should carefully consider whether the memory
|
||||
savings gained from this feature are worth the risk of possibly not being
|
||||
able to offline memory in certain situations.
|
||||
|
||||
.. note::
|
||||
Techniques that rely on long-term pinnings of memory (especially, RDMA and
|
||||
vfio) are fundamentally problematic with ZONE_MOVABLE and, therefore, memory
|
||||
|
@ -21,6 +21,8 @@ There are four components to pagemap:
|
||||
* Bit 55 pte is soft-dirty (see
|
||||
:ref:`Documentation/admin-guide/mm/soft-dirty.rst <soft_dirty>`)
|
||||
* Bit 56 page exclusively mapped (since 4.2)
|
||||
* Bit 57 pte is uffd-wp write-protected (since 5.13) (see
|
||||
:ref:`Documentation/admin-guide/mm/userfaultfd.rst <userfaultfd>`)
|
||||
* Bits 57-60 zero
|
||||
* Bit 61 page is file-page or shared-anon (since 3.5)
|
||||
* Bit 62 page swapped
|
||||
|
@ -77,7 +77,8 @@ events, except page fault notifications, may be generated:
|
||||
|
||||
- ``UFFD_FEATURE_MINOR_HUGETLBFS`` indicates that the kernel supports
|
||||
``UFFDIO_REGISTER_MODE_MINOR`` registration for hugetlbfs virtual memory
|
||||
areas.
|
||||
areas. ``UFFD_FEATURE_MINOR_SHMEM`` is the analogous feature indicating
|
||||
support for shmem virtual memory areas.
|
||||
|
||||
The userland application should set the feature flags it intends to use
|
||||
when invoking the ``UFFDIO_API`` ioctl, to request that those features be
|
||||
|
@ -24,11 +24,8 @@ String Conversions
|
||||
.. kernel-doc:: lib/vsprintf.c
|
||||
:export:
|
||||
|
||||
.. kernel-doc:: include/linux/kernel.h
|
||||
:functions: kstrtol
|
||||
|
||||
.. kernel-doc:: include/linux/kernel.h
|
||||
:functions: kstrtoul
|
||||
.. kernel-doc:: include/linux/kstrtox.h
|
||||
:functions: kstrtol kstrtoul
|
||||
|
||||
.. kernel-doc:: lib/kstrtox.c
|
||||
:export:
|
||||
|
@ -933,8 +933,15 @@ meminfo
|
||||
~~~~~~~
|
||||
|
||||
Provides information about distribution and utilization of memory. This
|
||||
varies by architecture and compile options. The following is from a
|
||||
16GB PIII, which has highmem enabled. You may not have all of these fields.
|
||||
varies by architecture and compile options. Some of the counters reported
|
||||
here overlap. The memory reported by the non overlapping counters may not
|
||||
add up to the overall memory usage and the difference for some workloads
|
||||
can be substantial. In many cases there are other means to find out
|
||||
additional memory using subsystem specific interfaces, for instance
|
||||
/proc/net/sockstat for TCP memory allocations.
|
||||
|
||||
The following is from a 16GB PIII, which has highmem enabled.
|
||||
You may not have all of these fields.
|
||||
|
||||
::
|
||||
|
||||
@ -1913,18 +1920,20 @@ if precise results are needed.
|
||||
3.8 /proc/<pid>/fdinfo/<fd> - Information about opened file
|
||||
---------------------------------------------------------------
|
||||
This file provides information associated with an opened file. The regular
|
||||
files have at least three fields -- 'pos', 'flags' and 'mnt_id'. The 'pos'
|
||||
represents the current offset of the opened file in decimal form [see lseek(2)
|
||||
for details], 'flags' denotes the octal O_xxx mask the file has been
|
||||
created with [see open(2) for details] and 'mnt_id' represents mount ID of
|
||||
the file system containing the opened file [see 3.5 /proc/<pid>/mountinfo
|
||||
for details].
|
||||
files have at least four fields -- 'pos', 'flags', 'mnt_id' and 'ino'.
|
||||
The 'pos' represents the current offset of the opened file in decimal
|
||||
form [see lseek(2) for details], 'flags' denotes the octal O_xxx mask the
|
||||
file has been created with [see open(2) for details] and 'mnt_id' represents
|
||||
mount ID of the file system containing the opened file [see 3.5
|
||||
/proc/<pid>/mountinfo for details]. 'ino' represents the inode number of
|
||||
the file.
|
||||
|
||||
A typical output is::
|
||||
|
||||
pos: 0
|
||||
flags: 0100002
|
||||
mnt_id: 19
|
||||
ino: 63107
|
||||
|
||||
All locks associated with a file descriptor are shown in its fdinfo too::
|
||||
|
||||
@ -1941,6 +1950,7 @@ Eventfd files
|
||||
pos: 0
|
||||
flags: 04002
|
||||
mnt_id: 9
|
||||
ino: 63107
|
||||
eventfd-count: 5a
|
||||
|
||||
where 'eventfd-count' is hex value of a counter.
|
||||
@ -1953,6 +1963,7 @@ Signalfd files
|
||||
pos: 0
|
||||
flags: 04002
|
||||
mnt_id: 9
|
||||
ino: 63107
|
||||
sigmask: 0000000000000200
|
||||
|
||||
where 'sigmask' is hex value of the signal mask associated
|
||||
@ -1966,6 +1977,7 @@ Epoll files
|
||||
pos: 0
|
||||
flags: 02
|
||||
mnt_id: 9
|
||||
ino: 63107
|
||||
tfd: 5 events: 1d data: ffffffffffffffff pos:0 ino:61af sdev:7
|
||||
|
||||
where 'tfd' is a target file descriptor number in decimal form,
|
||||
@ -1982,6 +1994,8 @@ For inotify files the format is the following::
|
||||
|
||||
pos: 0
|
||||
flags: 02000000
|
||||
mnt_id: 9
|
||||
ino: 63107
|
||||
inotify wd:3 ino:9e7e sdev:800013 mask:800afce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:7e9e0000640d1b6d
|
||||
|
||||
where 'wd' is a watch descriptor in decimal form, i.e. a target file
|
||||
@ -2004,6 +2018,7 @@ For fanotify files the format is::
|
||||
pos: 0
|
||||
flags: 02
|
||||
mnt_id: 9
|
||||
ino: 63107
|
||||
fanotify flags:10 event-flags:0
|
||||
fanotify mnt_id:12 mflags:40 mask:38 ignored_mask:40000003
|
||||
fanotify ino:4f969 sdev:800013 mflags:0 mask:3b ignored_mask:40000000 fhandle-bytes:8 fhandle-type:1 f_handle:69f90400c275b5b4
|
||||
@ -2028,6 +2043,7 @@ Timerfd files
|
||||
pos: 0
|
||||
flags: 02
|
||||
mnt_id: 9
|
||||
ino: 63107
|
||||
clockid: 0
|
||||
ticks: 0
|
||||
settime flags: 01
|
||||
@ -2042,6 +2058,22 @@ details]. 'it_value' is remaining time until the timer expiration.
|
||||
with TIMER_ABSTIME option which will be shown in 'settime flags', but 'it_value'
|
||||
still exhibits timer's remaining time.
|
||||
|
||||
DMA Buffer files
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
::
|
||||
|
||||
pos: 0
|
||||
flags: 04002
|
||||
mnt_id: 9
|
||||
ino: 63107
|
||||
size: 32768
|
||||
count: 2
|
||||
exp_name: system-heap
|
||||
|
||||
where 'size' is the size of the DMA buffer in bytes. 'count' is the file count of
|
||||
the DMA buffer file. 'exp_name' is the name of the DMA buffer exporter.
|
||||
|
||||
3.9 /proc/<pid>/map_files - Information about memory mapped files
|
||||
---------------------------------------------------------------------
|
||||
This directory contains symbolic links which represent memory mapped files
|
||||
|
@ -332,7 +332,7 @@ between device driver specific code and shared common code:
|
||||
walks to fill in the ``args->src`` array with PFNs to be migrated.
|
||||
The ``invalidate_range_start()`` callback is passed a
|
||||
``struct mmu_notifier_range`` with the ``event`` field set to
|
||||
``MMU_NOTIFY_MIGRATE`` and the ``migrate_pgmap_owner`` field set to
|
||||
``MMU_NOTIFY_MIGRATE`` and the ``owner`` field set to
|
||||
the ``args->pgmap_owner`` field passed to migrate_vma_setup(). This is
|
||||
allows the device driver to skip the invalidation callback and only
|
||||
invalidate device private MMU mappings that are actually migrating.
|
||||
@ -405,6 +405,23 @@ between device driver specific code and shared common code:
|
||||
|
||||
The lock can now be released.
|
||||
|
||||
Exclusive access memory
|
||||
=======================
|
||||
|
||||
Some devices have features such as atomic PTE bits that can be used to implement
|
||||
atomic access to system memory. To support atomic operations to a shared virtual
|
||||
memory page such a device needs access to that page which is exclusive of any
|
||||
userspace access from the CPU. The ``make_device_exclusive_range()`` function
|
||||
can be used to make a memory range inaccessible from userspace.
|
||||
|
||||
This replaces all mappings for pages in the given range with special swap
|
||||
entries. Any attempt to access the swap entry results in a fault which is
|
||||
resovled by replacing the entry with the original mapping. A driver gets
|
||||
notified that the mapping has been changed by MMU notifiers, after which point
|
||||
it will no longer have exclusive access to the page. Exclusive access is
|
||||
guranteed to last until the driver drops the page lock and page reference, at
|
||||
which point any CPU faults on the page may proceed as described.
|
||||
|
||||
Memory cgroup (memcg) and rss accounting
|
||||
========================================
|
||||
|
||||
|
@ -389,14 +389,14 @@ mlocked, munlock_vma_page() updates that zone statistics for the number of
|
||||
mlocked pages. Note, however, that at this point we haven't checked whether
|
||||
the page is mapped by other VM_LOCKED VMAs.
|
||||
|
||||
We can't call try_to_munlock(), the function that walks the reverse map to
|
||||
We can't call page_mlock(), the function that walks the reverse map to
|
||||
check for other VM_LOCKED VMAs, without first isolating the page from the LRU.
|
||||
try_to_munlock() is a variant of try_to_unmap() and thus requires that the page
|
||||
page_mlock() is a variant of try_to_unmap() and thus requires that the page
|
||||
not be on an LRU list [more on these below]. However, the call to
|
||||
isolate_lru_page() could fail, in which case we couldn't try_to_munlock(). So,
|
||||
isolate_lru_page() could fail, in which case we can't call page_mlock(). So,
|
||||
we go ahead and clear PG_mlocked up front, as this might be the only chance we
|
||||
have. If we can successfully isolate the page, we go ahead and
|
||||
try_to_munlock(), which will restore the PG_mlocked flag and update the zone
|
||||
have. If we can successfully isolate the page, we go ahead and call
|
||||
page_mlock(), which will restore the PG_mlocked flag and update the zone
|
||||
page statistics if it finds another VMA holding the page mlocked. If we fail
|
||||
to isolate the page, we'll have left a potentially mlocked page on the LRU.
|
||||
This is fine, because we'll catch it later if and if vmscan tries to reclaim
|
||||
@ -545,31 +545,24 @@ munlock or munmap system calls, mm teardown (munlock_vma_pages_all), reclaim,
|
||||
holepunching, and truncation of file pages and their anonymous COWed pages.
|
||||
|
||||
|
||||
try_to_munlock() Reverse Map Scan
|
||||
page_mlock() Reverse Map Scan
|
||||
---------------------------------
|
||||
|
||||
.. warning::
|
||||
[!] TODO/FIXME: a better name might be page_mlocked() - analogous to the
|
||||
page_referenced() reverse map walker.
|
||||
|
||||
When munlock_vma_page() [see section :ref:`munlock()/munlockall() System Call
|
||||
Handling <munlock_munlockall_handling>` above] tries to munlock a
|
||||
page, it needs to determine whether or not the page is mapped by any
|
||||
VM_LOCKED VMA without actually attempting to unmap all PTEs from the
|
||||
page. For this purpose, the unevictable/mlock infrastructure
|
||||
introduced a variant of try_to_unmap() called try_to_munlock().
|
||||
introduced a variant of try_to_unmap() called page_mlock().
|
||||
|
||||
try_to_munlock() calls the same functions as try_to_unmap() for anonymous and
|
||||
mapped file and KSM pages with a flag argument specifying unlock versus unmap
|
||||
processing. Again, these functions walk the respective reverse maps looking
|
||||
for VM_LOCKED VMAs. When such a VMA is found, as in the try_to_unmap() case,
|
||||
the functions mlock the page via mlock_vma_page() and return SWAP_MLOCK. This
|
||||
undoes the pre-clearing of the page's PG_mlocked done by munlock_vma_page.
|
||||
page_mlock() walks the respective reverse maps looking for VM_LOCKED VMAs. When
|
||||
such a VMA is found the page is mlocked via mlock_vma_page(). This undoes the
|
||||
pre-clearing of the page's PG_mlocked done by munlock_vma_page.
|
||||
|
||||
Note that try_to_munlock()'s reverse map walk must visit every VMA in a page's
|
||||
Note that page_mlock()'s reverse map walk must visit every VMA in a page's
|
||||
reverse map to determine that a page is NOT mapped into any VM_LOCKED VMA.
|
||||
However, the scan can terminate when it encounters a VM_LOCKED VMA.
|
||||
Although try_to_munlock() might be called a great many times when munlocking a
|
||||
Although page_mlock() might be called a great many times when munlocking a
|
||||
large region or tearing down a large address space that has been mlocked via
|
||||
mlockall(), overall this is a fairly rare event.
|
||||
|
||||
@ -602,7 +595,7 @@ inactive lists to the appropriate node's unevictable list.
|
||||
shrink_inactive_list() should only see SHM_LOCK'd pages that became SHM_LOCK'd
|
||||
after shrink_active_list() had moved them to the inactive list, or pages mapped
|
||||
into VM_LOCKED VMAs that munlock_vma_page() couldn't isolate from the LRU to
|
||||
recheck via try_to_munlock(). shrink_inactive_list() won't notice the latter,
|
||||
recheck via page_mlock(). shrink_inactive_list() won't notice the latter,
|
||||
but will pass on to shrink_page_list().
|
||||
|
||||
shrink_page_list() again culls obviously unevictable pages that it could
|
||||
|
10
MAINTAINERS
10
MAINTAINERS
@ -7704,6 +7704,14 @@ L: linux-input@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/input/touchscreen/resistive-adc-touch.c
|
||||
|
||||
GENERIC STRING LIBRARY
|
||||
R: Andy Shevchenko <andy@kernel.org>
|
||||
S: Maintained
|
||||
F: lib/string.c
|
||||
F: lib/string_helpers.c
|
||||
F: lib/test_string.c
|
||||
F: lib/test-string_helpers.c
|
||||
|
||||
GENERIC UIO DRIVER FOR PCI DEVICES
|
||||
M: "Michael S. Tsirkin" <mst@redhat.com>
|
||||
L: kvm@vger.kernel.org
|
||||
@ -11900,6 +11908,7 @@ F: include/linux/mmzone.h
|
||||
F: include/linux/pagewalk.h
|
||||
F: include/linux/vmalloc.h
|
||||
F: mm/
|
||||
F: tools/testing/selftests/vm/
|
||||
|
||||
MEMORY TECHNOLOGY DEVICES (MTD)
|
||||
M: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
@ -20307,7 +20316,6 @@ M: Seth Jennings <sjenning@redhat.com>
|
||||
M: Dan Streetman <ddstreet@ieee.org>
|
||||
L: linux-mm@kvack.org
|
||||
S: Maintained
|
||||
F: include/linux/zbud.h
|
||||
F: mm/zbud.c
|
||||
|
||||
ZD1211RW WIRELESS DRIVER
|
||||
|
@ -40,6 +40,7 @@ config ALPHA
|
||||
select MMU_GATHER_NO_RANGE
|
||||
select SET_FS
|
||||
select SPARSEMEM_EXTREME if SPARSEMEM
|
||||
select ZONE_DMA
|
||||
help
|
||||
The Alpha is a 64-bit general-purpose processor designed and
|
||||
marketed by the Digital Equipment Corporation of blessed memory,
|
||||
@ -65,10 +66,6 @@ config GENERIC_CALIBRATE_DELAY
|
||||
bool
|
||||
default y
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_ISA_DMA
|
||||
bool
|
||||
default y
|
||||
|
@ -18,7 +18,6 @@ pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t pte)
|
||||
{
|
||||
pmd_set(pmd, (pte_t *)(page_to_pa(pte) + PAGE_OFFSET));
|
||||
}
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
static inline void
|
||||
pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
|
||||
|
@ -46,7 +46,6 @@ struct vm_area_struct;
|
||||
#define PTRS_PER_PMD (1UL << (PAGE_SHIFT-3))
|
||||
#define PTRS_PER_PGD (1UL << (PAGE_SHIFT-3))
|
||||
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
/* Number of pointers that fit on a page: this will go away. */
|
||||
#define PTRS_PER_PAGE (1UL << (PAGE_SHIFT-3))
|
||||
|
@ -71,6 +71,9 @@
|
||||
#define MADV_COLD 20 /* deactivate these pages */
|
||||
#define MADV_PAGEOUT 21 /* reclaim these pages */
|
||||
|
||||
#define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */
|
||||
#define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */
|
||||
|
||||
/* compatibility flags */
|
||||
#define MAP_FILE 0
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/pci.h>
|
||||
@ -46,7 +47,6 @@
|
||||
#include <linux/log2.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
extern struct atomic_notifier_head panic_notifier_list;
|
||||
static int alpha_panic_event(struct notifier_block *, unsigned long, void *);
|
||||
static struct notifier_block alpha_panic_block = {
|
||||
alpha_panic_event,
|
||||
|
@ -129,6 +129,4 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t ptep)
|
||||
|
||||
#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, pte)
|
||||
|
||||
#define pmd_pgtable(pmd) ((pgtable_t) pmd_page_vaddr(pmd))
|
||||
|
||||
#endif /* _ASM_ARC_PGALLOC_H */
|
||||
|
@ -222,12 +222,6 @@
|
||||
*/
|
||||
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
|
||||
|
||||
/*
|
||||
* No special requirements for lowest virtual address we permit any user space
|
||||
* mapping to be mapped at.
|
||||
*/
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* Bucket load of VM Helpers
|
||||
@ -356,6 +350,8 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
|
||||
|
||||
#define kern_addr_valid(addr) (1)
|
||||
|
||||
#define pmd_pgtable(pmd) ((pgtable_t) pmd_page_vaddr(pmd))
|
||||
|
||||
/*
|
||||
* remap a physical page `pfn' of size `size' with page protection `prot'
|
||||
* into virtual address `from'
|
||||
|
@ -218,9 +218,6 @@ config GENERIC_CALIBRATE_DELAY
|
||||
config ARCH_MAY_HAVE_PC_FDC
|
||||
bool
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
|
||||
config ARCH_SUPPORTS_UPROBES
|
||||
def_bool y
|
||||
|
||||
|
@ -143,7 +143,6 @@ pmd_populate(struct mm_struct *mm, pmd_t *pmdp, pgtable_t ptep)
|
||||
|
||||
__pmd_populate(pmdp, page_to_phys(ptep), prot);
|
||||
}
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
|
@ -42,6 +42,7 @@ config ARM64
|
||||
select ARCH_HAS_SYSCALL_WRAPPER
|
||||
select ARCH_HAS_TEARDOWN_DMA_OPS if IOMMU_SUPPORT
|
||||
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
||||
select ARCH_HAS_ZONE_DMA_SET if EXPERT
|
||||
select ARCH_HAVE_ELF_PROT
|
||||
select ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||
select ARCH_INLINE_READ_LOCK if !PREEMPTION
|
||||
@ -155,7 +156,6 @@ config ARM64
|
||||
select HAVE_ARCH_KGDB
|
||||
select HAVE_ARCH_MMAP_RND_BITS
|
||||
select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
|
||||
select HAVE_ARCH_PFN_VALID
|
||||
select HAVE_ARCH_PREL32_RELOCATIONS
|
||||
select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
|
||||
select HAVE_ARCH_SECCOMP_FILTER
|
||||
@ -308,14 +308,6 @@ config GENERIC_CSUM
|
||||
config GENERIC_CALIBRATE_DELAY
|
||||
def_bool y
|
||||
|
||||
config ZONE_DMA
|
||||
bool "Support DMA zone" if EXPERT
|
||||
default y
|
||||
|
||||
config ZONE_DMA32
|
||||
bool "Support DMA32 zone" if EXPERT
|
||||
default y
|
||||
|
||||
config ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
|
||||
def_bool y
|
||||
|
||||
@ -1053,9 +1045,6 @@ config NEED_PER_CPU_EMBED_FIRST_CHUNK
|
||||
def_bool y
|
||||
depends on NUMA
|
||||
|
||||
config HOLES_IN_ZONE
|
||||
def_bool y
|
||||
|
||||
source "kernel/Kconfig.hz"
|
||||
|
||||
config ARCH_SPARSEMEM_ENABLE
|
||||
|
@ -23,8 +23,7 @@ static inline void arch_clear_hugepage_flags(struct page *page)
|
||||
}
|
||||
#define arch_clear_hugepage_flags arch_clear_hugepage_flags
|
||||
|
||||
extern pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,
|
||||
struct page *page, int writable);
|
||||
pte_t arch_make_huge_pte(pte_t entry, unsigned int shift, vm_flags_t flags);
|
||||
#define arch_make_huge_pte arch_make_huge_pte
|
||||
#define __HAVE_ARCH_HUGE_SET_HUGE_PTE_AT
|
||||
extern void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
|
@ -351,7 +351,7 @@ static inline void *phys_to_virt(phys_addr_t x)
|
||||
|
||||
#define virt_addr_valid(addr) ({ \
|
||||
__typeof__(addr) __addr = __tag_reset(addr); \
|
||||
__is_lm_address(__addr) && pfn_valid(virt_to_pfn(__addr)); \
|
||||
__is_lm_address(__addr) && pfn_is_map_memory(virt_to_pfn(__addr)); \
|
||||
})
|
||||
|
||||
void dump_mem_limit(void);
|
||||
|
@ -41,7 +41,7 @@ void tag_clear_highpage(struct page *to);
|
||||
|
||||
typedef struct page *pgtable_t;
|
||||
|
||||
extern int pfn_valid(unsigned long);
|
||||
int pfn_is_map_memory(unsigned long pfn);
|
||||
|
||||
#include <asm/memory.h>
|
||||
|
||||
|
@ -86,6 +86,5 @@ pmd_populate(struct mm_struct *mm, pmd_t *pmdp, pgtable_t ptep)
|
||||
VM_BUG_ON(mm == &init_mm);
|
||||
__pmd_populate(pmdp, page_to_phys(ptep), PMD_TYPE_TABLE | PMD_TABLE_PXN);
|
||||
}
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
#endif
|
||||
|
@ -26,8 +26,6 @@
|
||||
|
||||
#define vmemmap ((struct page *)VMEMMAP_START - (memstart_addr >> PAGE_SHIFT))
|
||||
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <asm/cmpxchg.h>
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/of_fdt.h>
|
||||
|
@ -85,7 +85,7 @@ void kvm_flush_remote_tlbs(struct kvm *kvm)
|
||||
|
||||
static bool kvm_is_device_pfn(unsigned long pfn)
|
||||
{
|
||||
return !pfn_valid(pfn);
|
||||
return !pfn_is_map_memory(pfn);
|
||||
}
|
||||
|
||||
static void *stage2_memcache_zalloc_page(void *arg)
|
||||
|
@ -339,10 +339,9 @@ pte_t *huge_pte_offset(struct mm_struct *mm,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,
|
||||
struct page *page, int writable)
|
||||
pte_t arch_make_huge_pte(pte_t entry, unsigned int shift, vm_flags_t flags)
|
||||
{
|
||||
size_t pagesize = huge_page_size(hstate_vma(vma));
|
||||
size_t pagesize = 1UL << shift;
|
||||
|
||||
if (pagesize == CONT_PTE_SIZE) {
|
||||
entry = pte_mkcont(entry);
|
||||
|
@ -219,42 +219,17 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)
|
||||
free_area_init(max_zone_pfns);
|
||||
}
|
||||
|
||||
int pfn_valid(unsigned long pfn)
|
||||
int pfn_is_map_memory(unsigned long pfn)
|
||||
{
|
||||
phys_addr_t addr = PFN_PHYS(pfn);
|
||||
struct mem_section *ms;
|
||||
|
||||
/*
|
||||
* Ensure the upper PAGE_SHIFT bits are clear in the
|
||||
* pfn. Else it might lead to false positives when
|
||||
* some of the upper bits are set, but the lower bits
|
||||
* match a valid pfn.
|
||||
*/
|
||||
/* avoid false positives for bogus PFNs, see comment in pfn_valid() */
|
||||
if (PHYS_PFN(addr) != pfn)
|
||||
return 0;
|
||||
|
||||
if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
|
||||
return 0;
|
||||
|
||||
ms = __pfn_to_section(pfn);
|
||||
if (!valid_section(ms))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* ZONE_DEVICE memory does not have the memblock entries.
|
||||
* memblock_is_map_memory() check for ZONE_DEVICE based
|
||||
* addresses will always fail. Even the normal hotplugged
|
||||
* memory will never have MEMBLOCK_NOMAP flag set in their
|
||||
* memblock entries. Skip memblock search for all non early
|
||||
* memory sections covering all of hotplug memory including
|
||||
* both normal and ZONE_DEVICE based.
|
||||
*/
|
||||
if (!early_section(ms))
|
||||
return pfn_section_valid(ms, pfn);
|
||||
|
||||
return memblock_is_map_memory(addr);
|
||||
}
|
||||
EXPORT_SYMBOL(pfn_valid);
|
||||
EXPORT_SYMBOL(pfn_is_map_memory);
|
||||
|
||||
static phys_addr_t memory_limit = PHYS_ADDR_MAX;
|
||||
|
||||
|
@ -43,7 +43,7 @@ static void __iomem *__ioremap_caller(phys_addr_t phys_addr, size_t size,
|
||||
/*
|
||||
* Don't allow RAM to be mapped.
|
||||
*/
|
||||
if (WARN_ON(pfn_valid(__phys_to_pfn(phys_addr))))
|
||||
if (WARN_ON(pfn_is_map_memory(__phys_to_pfn(phys_addr))))
|
||||
return NULL;
|
||||
|
||||
area = get_vm_area_caller(size, VM_IOREMAP, caller);
|
||||
@ -84,7 +84,7 @@ EXPORT_SYMBOL(iounmap);
|
||||
void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size)
|
||||
{
|
||||
/* For normal memory we already have a cacheable mapping. */
|
||||
if (pfn_valid(__phys_to_pfn(phys_addr)))
|
||||
if (pfn_is_map_memory(__phys_to_pfn(phys_addr)))
|
||||
return (void __iomem *)__phys_to_virt(phys_addr);
|
||||
|
||||
return __ioremap_caller(phys_addr, size, __pgprot(PROT_NORMAL),
|
||||
|
@ -82,7 +82,7 @@ void set_swapper_pgd(pgd_t *pgdp, pgd_t pgd)
|
||||
pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
|
||||
unsigned long size, pgprot_t vma_prot)
|
||||
{
|
||||
if (!pfn_valid(pfn))
|
||||
if (!pfn_is_map_memory(pfn))
|
||||
return pgprot_noncached(vma_prot);
|
||||
else if (file->f_flags & O_SYNC)
|
||||
return pgprot_writecombine(vma_prot);
|
||||
@ -1339,6 +1339,7 @@ void *__init fixmap_remap_fdt(phys_addr_t dt_phys, int *size, pgprot_t prot)
|
||||
return dt_virt;
|
||||
}
|
||||
|
||||
#if CONFIG_PGTABLE_LEVELS > 3
|
||||
int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot)
|
||||
{
|
||||
pud_t new_pud = pfn_pud(__phys_to_pfn(phys), mk_pud_sect_prot(prot));
|
||||
@ -1353,6 +1354,16 @@ int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int pud_clear_huge(pud_t *pudp)
|
||||
{
|
||||
if (!pud_sect(READ_ONCE(*pudp)))
|
||||
return 0;
|
||||
pud_clear(pudp);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_PGTABLE_LEVELS > 2
|
||||
int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot)
|
||||
{
|
||||
pmd_t new_pmd = pfn_pmd(__phys_to_pfn(phys), mk_pmd_sect_prot(prot));
|
||||
@ -1367,14 +1378,6 @@ int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int pud_clear_huge(pud_t *pudp)
|
||||
{
|
||||
if (!pud_sect(READ_ONCE(*pudp)))
|
||||
return 0;
|
||||
pud_clear(pudp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int pmd_clear_huge(pmd_t *pmdp)
|
||||
{
|
||||
if (!pmd_sect(READ_ONCE(*pmdp)))
|
||||
@ -1382,6 +1385,7 @@ int pmd_clear_huge(pmd_t *pmdp)
|
||||
pmd_clear(pmdp);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int pmd_free_pte_page(pmd_t *pmdp, unsigned long addr)
|
||||
{
|
||||
|
@ -22,8 +22,6 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
|
||||
set_pmd(pmd, __pmd(__pa(page_address(pte))));
|
||||
}
|
||||
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
extern void pgd_init(unsigned long *p);
|
||||
|
||||
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
|
||||
|
@ -14,7 +14,6 @@
|
||||
#define PGDIR_MASK (~(PGDIR_SIZE-1))
|
||||
|
||||
#define USER_PTRS_PER_PGD (PAGE_OFFSET/PGDIR_SIZE)
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
/*
|
||||
* C-SKY is two-level paging structure:
|
||||
|
@ -155,9 +155,6 @@ extern unsigned long _dflt_cache_att;
|
||||
|
||||
extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* located in head.S */
|
||||
|
||||
/* Seems to be zero even in architectures where the zero page is firewalled? */
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
/* HUGETLB not working currently */
|
||||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
#define pte_mkhuge(pte) __pte((pte_val(pte) & ~0x3) | HVM_HUGEPAGE_SIZE)
|
||||
@ -242,7 +239,6 @@ static inline int pmd_bad(pmd_t pmd)
|
||||
* pmd_page - converts a PMD entry to a page pointer
|
||||
*/
|
||||
#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
/**
|
||||
* pte_none - check if pte is mapped
|
||||
|
@ -60,6 +60,7 @@ config IA64
|
||||
select NUMA if !FLATMEM
|
||||
select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
|
||||
select SET_FS
|
||||
select ZONE_DMA32
|
||||
default y
|
||||
help
|
||||
The Itanium Processor Family is Intel's 64-bit successor to
|
||||
@ -72,9 +73,6 @@ config 64BIT
|
||||
select ATA_NONSTANDARD if ATA
|
||||
default y
|
||||
|
||||
config ZONE_DMA32
|
||||
def_bool y
|
||||
|
||||
config MMU
|
||||
bool
|
||||
default y
|
||||
@ -308,9 +306,6 @@ config NODES_SHIFT
|
||||
MAX_NUMNODES will be 2^(This value).
|
||||
If in doubt, use the default.
|
||||
|
||||
config HOLES_IN_ZONE
|
||||
bool
|
||||
|
||||
config HAVE_ARCH_NODEDATA_EXTENSION
|
||||
def_bool y
|
||||
depends on NUMA
|
||||
|
@ -99,6 +99,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/fpu.h>
|
||||
#include <asm/intrinsics.h>
|
||||
|
||||
/*
|
||||
* Data types needed to pass information into PAL procedures and
|
||||
|
@ -52,7 +52,6 @@ pmd_populate(struct mm_struct *mm, pmd_t * pmd_entry, pgtable_t pte)
|
||||
{
|
||||
pmd_val(*pmd_entry) = page_to_phys(pte);
|
||||
}
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
static inline void
|
||||
pmd_populate_kernel(struct mm_struct *mm, pmd_t * pmd_entry, pte_t * pte)
|
||||
|
@ -128,7 +128,6 @@
|
||||
#define PTRS_PER_PGD_SHIFT PTRS_PER_PTD_SHIFT
|
||||
#define PTRS_PER_PGD (1UL << PTRS_PER_PGD_SHIFT)
|
||||
#define USER_PTRS_PER_PGD (5*PTRS_PER_PGD/8) /* regions 0-4 are user regions */
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
/*
|
||||
* All the normal masks have the "page accessed" bits on, as any time
|
||||
|
@ -34,6 +34,7 @@ config M68K
|
||||
select SET_FS
|
||||
select UACCESS_MEMCPY if !MMU
|
||||
select VIRT_TO_BUS
|
||||
select ZONE_DMA
|
||||
|
||||
config CPU_BIG_ENDIAN
|
||||
def_bool y
|
||||
@ -62,10 +63,6 @@ config TIME_LOW_RES
|
||||
config NO_IOPORT_MAP
|
||||
def_bool y
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
default y
|
||||
|
||||
config HZ
|
||||
int
|
||||
default 1000 if CLEOPATRA
|
||||
|
@ -32,8 +32,6 @@ extern inline pmd_t *pmd_alloc_kernel(pgd_t *pgd, unsigned long address)
|
||||
|
||||
#define pmd_populate_kernel pmd_populate
|
||||
|
||||
#define pmd_pgtable(pmd) pfn_to_virt(pmd_val(pmd) >> PAGE_SHIFT)
|
||||
|
||||
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pgtable,
|
||||
unsigned long address)
|
||||
{
|
||||
|
@ -150,6 +150,8 @@
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#define pmd_pgtable(pmd) pfn_to_virt(pmd_val(pmd) >> PAGE_SHIFT)
|
||||
|
||||
/*
|
||||
* Conversion functions: convert a page and protection to a page entry,
|
||||
* and a page entry and page directory to the page they refer to.
|
||||
|
@ -88,7 +88,6 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page
|
||||
{
|
||||
pmd_set(pmd, page);
|
||||
}
|
||||
#define pmd_pgtable(pmd) ((pgtable_t)pmd_page_vaddr(pmd))
|
||||
|
||||
static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
|
||||
{
|
||||
|
@ -105,6 +105,8 @@ extern unsigned long mm_cachebits;
|
||||
#define __S110 PAGE_SHARED_C
|
||||
#define __S111 PAGE_SHARED_C
|
||||
|
||||
#define pmd_pgtable(pmd) ((pgtable_t)pmd_page_vaddr(pmd))
|
||||
|
||||
/*
|
||||
* Conversion functions: convert a page and protection to a page entry,
|
||||
* and a page entry and page directory to the page they refer to.
|
||||
|
@ -72,7 +72,6 @@
|
||||
#define PTRS_PER_PGD 128
|
||||
#endif
|
||||
#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
/* Virtual address region for use by kernel_map() */
|
||||
#ifdef CONFIG_SUN3
|
||||
|
@ -32,7 +32,6 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page
|
||||
{
|
||||
pmd_val(*pmd) = __pa((unsigned long)page_address(page));
|
||||
}
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
/*
|
||||
* allocating and freeing a pmd is trivial: the 1-entry pmd is
|
||||
|
@ -43,6 +43,7 @@ config MICROBLAZE
|
||||
select MMU_GATHER_NO_RANGE
|
||||
select SPARSE_IRQ
|
||||
select SET_FS
|
||||
select ZONE_DMA
|
||||
|
||||
# Endianness selection
|
||||
choice
|
||||
@ -60,9 +61,6 @@ config CPU_LITTLE_ENDIAN
|
||||
|
||||
endchoice
|
||||
|
||||
config ZONE_DMA
|
||||
def_bool y
|
||||
|
||||
config ARCH_HAS_ILOG2_U32
|
||||
def_bool n
|
||||
|
||||
|
@ -28,8 +28,6 @@ static inline pgd_t *get_pgd(void)
|
||||
|
||||
#define pgd_alloc(mm) get_pgd()
|
||||
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm);
|
||||
|
||||
#define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, (pte))
|
||||
|
@ -25,8 +25,6 @@ extern int mem_init_done;
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
extern unsigned long va_to_phys(unsigned long address);
|
||||
extern pte_t *va_to_pte(unsigned long address);
|
||||
|
||||
|
@ -3274,13 +3274,6 @@ config I8253
|
||||
select CLKSRC_I8253
|
||||
select CLKEVT_I8253
|
||||
select MIPS_EXTERNAL_TIMER
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
|
||||
config ZONE_DMA32
|
||||
bool
|
||||
|
||||
endmenu
|
||||
|
||||
config TRAD_SIGNALS
|
||||
|
@ -28,7 +28,6 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
|
||||
{
|
||||
set_pmd(pmd, __pmd((unsigned long)page_address(pte)));
|
||||
}
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
/*
|
||||
* Initialize a new pmd table with invalid pointers.
|
||||
|
@ -93,7 +93,6 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1,
|
||||
#endif
|
||||
|
||||
#define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE)
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
#define VMALLOC_START MAP_BASE
|
||||
|
||||
|
@ -137,7 +137,6 @@
|
||||
#define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t))
|
||||
|
||||
#define USER_PTRS_PER_PGD ((TASK_SIZE64 / PGDIR_SIZE)?(TASK_SIZE64 / PGDIR_SIZE):1)
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
/*
|
||||
* TLB refill handlers also map the vmalloc area into xuseg. Avoid
|
||||
|
@ -98,6 +98,9 @@
|
||||
#define MADV_COLD 20 /* deactivate these pages */
|
||||
#define MADV_PAGEOUT 21 /* reclaim these pages */
|
||||
|
||||
#define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */
|
||||
#define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */
|
||||
|
||||
/* compatibility flags */
|
||||
#define MAP_FILE 0
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/libfdt.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/sched/task.h>
|
||||
#include <linux/start_kernel.h>
|
||||
#include <linux/string.h>
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/sched/signal.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/timer.h>
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/sched/signal.h>
|
||||
#include <linux/notifier.h>
|
||||
|
@ -12,11 +12,6 @@
|
||||
#define __HAVE_ARCH_PTE_ALLOC_ONE
|
||||
#include <asm-generic/pgalloc.h> /* for pte_{alloc,free}_one */
|
||||
|
||||
/*
|
||||
* Since we have only two-level page tables, these are trivial
|
||||
*/
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
extern pgd_t *pgd_alloc(struct mm_struct *mm);
|
||||
extern void pgd_free(struct mm_struct *mm, pgd_t * pgd);
|
||||
|
||||
|
@ -25,7 +25,6 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
|
||||
{
|
||||
set_pmd(pmd, __pmd((unsigned long)page_address(pte)));
|
||||
}
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
/*
|
||||
* Initialize a new pmd table with invalid pointers.
|
||||
|
@ -24,8 +24,6 @@
|
||||
#include <asm/pgtable-bits.h>
|
||||
#include <asm-generic/pgtable-nopmd.h>
|
||||
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
#define VMALLOC_START CONFIG_NIOS2_KERNEL_MMU_REGION_BASE
|
||||
#define VMALLOC_END (CONFIG_NIOS2_KERNEL_REGION_BASE - 1)
|
||||
|
||||
|
@ -72,6 +72,4 @@ do { \
|
||||
tlb_remove_page((tlb), (pte)); \
|
||||
} while (0)
|
||||
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
#endif
|
||||
|
@ -73,7 +73,6 @@ extern void paging_init(void);
|
||||
*/
|
||||
|
||||
#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
/*
|
||||
* Kernels own virtual memory area.
|
||||
|
@ -69,6 +69,5 @@ pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte)
|
||||
|
||||
#define pmd_populate(mm, pmd, pte_page) \
|
||||
pmd_populate_kernel(mm, pmd, page_address(pte_page))
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
#endif
|
||||
|
@ -171,8 +171,6 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
|
||||
* pgd entries used up by user/kernel:
|
||||
*/
|
||||
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
/* NB: The tlb miss handlers make certain assumptions about the order */
|
||||
/* of the following bits, so be careful (One example, bits 25-31 */
|
||||
/* are moved together in one instruction). */
|
||||
|
@ -52,6 +52,9 @@
|
||||
#define MADV_COLD 20 /* deactivate these pages */
|
||||
#define MADV_PAGEOUT 21 /* reclaim these pages */
|
||||
|
||||
#define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */
|
||||
#define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */
|
||||
|
||||
#define MADV_MERGEABLE 65 /* KSM may merge identical pages */
|
||||
#define MADV_UNMERGEABLE 66 /* KSM may not merge identical pages */
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/cache.h>
|
||||
|
@ -187,7 +187,7 @@ config PPC
|
||||
select GENERIC_VDSO_TIME_NS
|
||||
select HAVE_ARCH_AUDITSYSCALL
|
||||
select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP
|
||||
select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU
|
||||
select HAVE_ARCH_HUGE_VMAP if PPC_RADIX_MMU || PPC_8xx
|
||||
select HAVE_ARCH_JUMP_LABEL
|
||||
select HAVE_ARCH_JUMP_LABEL_RELATIVE
|
||||
select HAVE_ARCH_KASAN if PPC32 && PPC_PAGE_SHIFT <= 14
|
||||
@ -403,10 +403,6 @@ config PPC_ADV_DEBUG_DAC_RANGE
|
||||
config PPC_DAWR
|
||||
bool
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
default y if PPC_BOOK3E_64
|
||||
|
||||
config PGTABLE_LEVELS
|
||||
int
|
||||
default 2 if !PPC64
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <asm/book3s/32/pgtable.h>
|
||||
#endif
|
||||
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
#ifndef __ASSEMBLY__
|
||||
/* Insert a PTE, top-level function is out of line. It uses an inline
|
||||
* low level function in the respective pgtable-* files
|
||||
|
@ -66,10 +66,9 @@ static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC_4K_PAGES
|
||||
static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,
|
||||
struct page *page, int writable)
|
||||
static inline pte_t arch_make_huge_pte(pte_t entry, unsigned int shift, vm_flags_t flags)
|
||||
{
|
||||
size_t size = huge_page_size(hstate_vma(vma));
|
||||
size_t size = 1UL << shift;
|
||||
|
||||
if (size == SZ_16K)
|
||||
return __pte(pte_val(entry) & ~_PAGE_HUGE);
|
||||
|
@ -178,6 +178,7 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/mmdebug.h>
|
||||
#include <linux/sizes.h>
|
||||
|
||||
void mmu_pin_tlb(unsigned long top, bool readonly);
|
||||
|
||||
@ -225,6 +226,48 @@ static inline unsigned int mmu_psize_to_shift(unsigned int mmu_psize)
|
||||
BUG();
|
||||
}
|
||||
|
||||
static inline bool arch_vmap_try_size(unsigned long addr, unsigned long end, u64 pfn,
|
||||
unsigned int max_page_shift, unsigned long size)
|
||||
{
|
||||
if (end - addr < size)
|
||||
return false;
|
||||
|
||||
if ((1UL << max_page_shift) < size)
|
||||
return false;
|
||||
|
||||
if (!IS_ALIGNED(addr, size))
|
||||
return false;
|
||||
|
||||
if (!IS_ALIGNED(PFN_PHYS(pfn), size))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline unsigned long arch_vmap_pte_range_map_size(unsigned long addr, unsigned long end,
|
||||
u64 pfn, unsigned int max_page_shift)
|
||||
{
|
||||
if (arch_vmap_try_size(addr, end, pfn, max_page_shift, SZ_512K))
|
||||
return SZ_512K;
|
||||
if (PAGE_SIZE == SZ_16K)
|
||||
return SZ_16K;
|
||||
if (arch_vmap_try_size(addr, end, pfn, max_page_shift, SZ_16K))
|
||||
return SZ_16K;
|
||||
return PAGE_SIZE;
|
||||
}
|
||||
#define arch_vmap_pte_range_map_size arch_vmap_pte_range_map_size
|
||||
|
||||
static inline int arch_vmap_pte_supported_shift(unsigned long size)
|
||||
{
|
||||
if (size >= SZ_512K)
|
||||
return 19;
|
||||
else if (size >= SZ_16K)
|
||||
return 14;
|
||||
else
|
||||
return PAGE_SHIFT;
|
||||
}
|
||||
#define arch_vmap_pte_supported_shift arch_vmap_pte_supported_shift
|
||||
|
||||
/* patch sites */
|
||||
extern s32 patch__itlbmiss_exit_1, patch__dtlbmiss_exit_1;
|
||||
extern s32 patch__itlbmiss_perf, patch__dtlbmiss_perf;
|
||||
|
@ -54,7 +54,6 @@ extern int icache_44x_need_flush;
|
||||
#define PGD_MASKED_BITS 0
|
||||
|
||||
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
#define pte_ERROR(e) \
|
||||
pr_err("%s:%d: bad pte %llx.\n", __FILE__, __LINE__, \
|
||||
|
@ -12,8 +12,6 @@
|
||||
#include <asm/barrier.h>
|
||||
#include <asm/asm-const.h>
|
||||
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
/*
|
||||
* Size of EA range mapped by our pagetables.
|
||||
*/
|
||||
|
@ -70,9 +70,4 @@ extern struct kmem_cache *pgtable_cache[];
|
||||
#include <asm/nohash/pgalloc.h>
|
||||
#endif
|
||||
|
||||
static inline pgtable_t pmd_pgtable(pmd_t pmd)
|
||||
{
|
||||
return (pgtable_t)pmd_page_vaddr(pmd);
|
||||
}
|
||||
|
||||
#endif /* _ASM_POWERPC_PGALLOC_H */
|
||||
|
@ -152,6 +152,12 @@ static inline bool p4d_is_leaf(p4d_t p4d)
|
||||
}
|
||||
#endif
|
||||
|
||||
#define pmd_pgtable pmd_pgtable
|
||||
static inline pgtable_t pmd_pgtable(pmd_t pmd)
|
||||
{
|
||||
return (pgtable_t)pmd_page_vaddr(pmd);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
#define is_ioremap_addr is_ioremap_addr
|
||||
static inline bool is_ioremap_addr(const void *x)
|
||||
|
@ -9,6 +9,7 @@
|
||||
#undef DEBUG
|
||||
|
||||
#include <linux/export.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/init.h>
|
||||
|
@ -111,6 +111,7 @@ config PPC_BOOK3E_64
|
||||
select PPC_FPU # Make it a choice ?
|
||||
select PPC_SMP_MUXED_IPI
|
||||
select PPC_DOORBELL
|
||||
select ZONE_DMA
|
||||
|
||||
endchoice
|
||||
|
||||
|
@ -104,6 +104,7 @@ config RISCV
|
||||
select SYSCTL_EXCEPTION_TRACE
|
||||
select THREAD_INFO_IN_TASK
|
||||
select UACCESS_MEMCPY if !MMU
|
||||
select ZONE_DMA32 if 64BIT
|
||||
|
||||
config ARCH_MMAP_RND_BITS_MIN
|
||||
default 18 if 64BIT
|
||||
@ -133,10 +134,6 @@ config MMU
|
||||
Select if you want MMU-based virtualised addressing space
|
||||
support by paged memory management. If unsure, say 'Y'.
|
||||
|
||||
config ZONE_DMA32
|
||||
bool
|
||||
default y if 64BIT
|
||||
|
||||
config VA_BITS
|
||||
int
|
||||
default 32 if 32BIT
|
||||
|
@ -38,8 +38,6 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
|
||||
}
|
||||
#endif /* __PAGETABLE_PMD_FOLDED */
|
||||
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
static inline pgd_t *pgd_alloc(struct mm_struct *mm)
|
||||
{
|
||||
pgd_t *pgd;
|
||||
|
@ -536,8 +536,6 @@ void setup_bootmem(void);
|
||||
void paging_init(void);
|
||||
void misc_mem_init(void);
|
||||
|
||||
#define FIRST_USER_ADDRESS 0
|
||||
|
||||
/*
|
||||
* ZERO_PAGE is a global shared page that is always zero,
|
||||
* used for zero-mapped memory areas, etc.
|
||||
|
@ -2,9 +2,6 @@
|
||||
config MMU
|
||||
def_bool y
|
||||
|
||||
config ZONE_DMA
|
||||
def_bool y
|
||||
|
||||
config CPU_BIG_ENDIAN
|
||||
def_bool y
|
||||
|
||||
@ -62,7 +59,7 @@ config S390
|
||||
select ARCH_BINFMT_ELF_STATE
|
||||
select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM
|
||||
select ARCH_ENABLE_MEMORY_HOTREMOVE
|
||||
select ARCH_ENABLE_SPLIT_PMD_PTLOCK
|
||||
select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
|
||||
select ARCH_HAS_DEBUG_VM_PGTABLE
|
||||
select ARCH_HAS_DEBUG_WX
|
||||
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
||||
@ -211,6 +208,7 @@ config S390
|
||||
select THREAD_INFO_IN_TASK
|
||||
select TTY
|
||||
select VIRT_CPU_ACCOUNTING
|
||||
select ZONE_DMA
|
||||
# Note: keep the above list sorted alphabetically
|
||||
|
||||
config SCHED_OMIT_FRAME_POINTER
|
||||
|
@ -134,9 +134,6 @@ static inline void pmd_populate(struct mm_struct *mm,
|
||||
|
||||
#define pmd_populate_kernel(mm, pmd, pte) pmd_populate(mm, pmd, pte)
|
||||
|
||||
#define pmd_pgtable(pmd) \
|
||||
((pgtable_t)__va(pmd_val(pmd) & -sizeof(pte_t)*PTRS_PER_PTE))
|
||||
|
||||
/*
|
||||
* page table entry allocation/free routines.
|
||||
*/
|
||||
|
@ -65,8 +65,6 @@ extern unsigned long zero_page_mask;
|
||||
|
||||
/* TODO: s390 cannot support io_remap_pfn_range... */
|
||||
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
#define pte_ERROR(e) \
|
||||
printk("%s:%d: bad pte %p.\n", __FILE__, __LINE__, (void *) pte_val(e))
|
||||
#define pmd_ERROR(e) \
|
||||
@ -1711,4 +1709,7 @@ extern void s390_reset_cmma(struct mm_struct *mm);
|
||||
#define HAVE_ARCH_UNMAPPED_AREA
|
||||
#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
|
||||
|
||||
#define pmd_pgtable(pmd) \
|
||||
((pgtable_t)__va(pmd_val(pmd) & -sizeof(pte_t)*PTRS_PER_PTE))
|
||||
|
||||
#endif /* _S390_PAGE_H */
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/fs.h>
|
||||
|
@ -44,11 +44,6 @@ void *alloc_insn_page(void)
|
||||
return page;
|
||||
}
|
||||
|
||||
void free_insn_page(void *page)
|
||||
{
|
||||
module_memfree(page);
|
||||
}
|
||||
|
||||
static void *alloc_s390_insn_page(void)
|
||||
{
|
||||
if (xchg(&insn_page_in_use, 1) == 1)
|
||||
|
@ -691,7 +691,7 @@ static void ptep_zap_swap_entry(struct mm_struct *mm, swp_entry_t entry)
|
||||
if (!non_swap_entry(entry))
|
||||
dec_mm_counter(mm, MM_SWAPENTS);
|
||||
else if (is_migration_entry(entry)) {
|
||||
struct page *page = migration_entry_to_page(entry);
|
||||
struct page *page = pfn_swap_entry_to_page(entry);
|
||||
|
||||
dec_mm_counter(mm, mm_counter(page));
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
|
||||
{
|
||||
set_pmd(pmd, __pmd((unsigned long)page_address(pte)));
|
||||
}
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
#define __pte_free_tlb(tlb,pte,addr) \
|
||||
do { \
|
||||
|
@ -59,8 +59,6 @@ static inline unsigned long long neff_sign_extend(unsigned long val)
|
||||
/* Entries per level */
|
||||
#define PTRS_PER_PTE (PAGE_SIZE / (1 << PTE_MAGNITUDE))
|
||||
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
#define PHYS_ADDR_MASK29 0x1fffffff
|
||||
#define PHYS_ADDR_MASK32 0xffffffff
|
||||
|
||||
|
@ -59,6 +59,7 @@ config SPARC32
|
||||
select CLZ_TAB
|
||||
select HAVE_UID16
|
||||
select OLD_SIGACTION
|
||||
select ZONE_DMA
|
||||
|
||||
config SPARC64
|
||||
def_bool 64BIT
|
||||
@ -141,10 +142,6 @@ config HIGHMEM
|
||||
default y if SPARC32
|
||||
select KMAP_LOCAL
|
||||
|
||||
config ZONE_DMA
|
||||
bool
|
||||
default y if SPARC32
|
||||
|
||||
config GENERIC_ISA_DMA
|
||||
bool
|
||||
default y if SPARC32
|
||||
|
@ -51,7 +51,6 @@ static inline void free_pmd_fast(pmd_t * pmd)
|
||||
#define __pmd_free_tlb(tlb, pmd, addr) pmd_free((tlb)->mm, pmd)
|
||||
|
||||
#define pmd_populate(mm, pmd, pte) pmd_set(pmd, pte)
|
||||
#define pmd_pgtable(pmd) (pgtable_t)__pmd_page(pmd)
|
||||
|
||||
void pmd_set(pmd_t *pmdp, pte_t *ptep);
|
||||
#define pmd_populate_kernel pmd_populate
|
||||
|
@ -67,7 +67,6 @@ void pte_free(struct mm_struct *mm, pgtable_t ptepage);
|
||||
|
||||
#define pmd_populate_kernel(MM, PMD, PTE) pmd_set(MM, PMD, PTE)
|
||||
#define pmd_populate(MM, PMD, PTE) pmd_set(MM, PMD, PTE)
|
||||
#define pmd_pgtable(PMD) ((pte_t *)pmd_page_vaddr(PMD))
|
||||
|
||||
void pgtable_free(void *table, bool is_page);
|
||||
|
||||
|
@ -48,7 +48,6 @@ unsigned long __init bootmem_init(unsigned long *pages_avail);
|
||||
#define PTRS_PER_PMD 64
|
||||
#define PTRS_PER_PGD 256
|
||||
#define USER_PTRS_PER_PGD PAGE_OFFSET / PGDIR_SIZE
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
#define PTE_SIZE (PTRS_PER_PTE*4)
|
||||
|
||||
#define PAGE_NONE SRMMU_PAGE_NONE
|
||||
@ -433,4 +432,6 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma,
|
||||
/* We provide our own get_unmapped_area to cope with VA holes for userland */
|
||||
#define HAVE_ARCH_UNMAPPED_AREA
|
||||
|
||||
#define pmd_pgtable(pmd) ((pgtable_t)__pmd_page(pmd))
|
||||
|
||||
#endif /* !(_SPARC_PGTABLE_H) */
|
||||
|
@ -95,9 +95,6 @@ bool kern_addr_valid(unsigned long addr);
|
||||
#define PTRS_PER_PUD (1UL << PUD_BITS)
|
||||
#define PTRS_PER_PGD (1UL << PGDIR_BITS)
|
||||
|
||||
/* Kernel has a separate 44bit address space. */
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
#define pmd_ERROR(e) \
|
||||
pr_err("%s:%d: bad pmd %p(%016lx) seen at (%pS)\n", \
|
||||
__FILE__, __LINE__, &(e), pmd_val(e), __builtin_return_address(0))
|
||||
@ -377,8 +374,7 @@ static inline pgprot_t pgprot_noncached(pgprot_t prot)
|
||||
#define pgprot_noncached pgprot_noncached
|
||||
|
||||
#if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE)
|
||||
extern pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,
|
||||
struct page *page, int writable);
|
||||
pte_t arch_make_huge_pte(pte_t entry, unsigned int shift, vm_flags_t flags);
|
||||
#define arch_make_huge_pte arch_make_huge_pte
|
||||
static inline unsigned long __pte_default_huge_mask(void)
|
||||
{
|
||||
@ -1121,6 +1117,8 @@ extern unsigned long cmdline_memory_size;
|
||||
|
||||
asmlinkage void do_sparc64_fault(struct pt_regs *regs);
|
||||
|
||||
#define pmd_pgtable(PMD) ((pte_t *)pmd_page_vaddr(PMD))
|
||||
|
||||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
|
||||
#define pud_leaf_size pud_leaf_size
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
|
@ -177,10 +177,8 @@ static pte_t hugepage_shift_to_tte(pte_t entry, unsigned int shift)
|
||||
return sun4u_hugepage_shift_to_tte(entry, shift);
|
||||
}
|
||||
|
||||
pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,
|
||||
struct page *page, int writeable)
|
||||
pte_t arch_make_huge_pte(pte_t entry, unsigned int shift, vm_flags_t flags)
|
||||
{
|
||||
unsigned int shift = huge_page_shift(hstate_vma(vma));
|
||||
pte_t pte;
|
||||
|
||||
pte = hugepage_shift_to_tte(entry, shift);
|
||||
@ -188,7 +186,7 @@ pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,
|
||||
#ifdef CONFIG_SPARC64
|
||||
/* If this vma has ADI enabled on it, turn on TTE.mcd
|
||||
*/
|
||||
if (vma->vm_flags & VM_SPARC_ADI)
|
||||
if (flags & VM_SPARC_ADI)
|
||||
return pte_mkmcd(pte);
|
||||
else
|
||||
return pte_mknotmcd(pte);
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/mmzone.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/bootmem_info.h>
|
||||
|
||||
#include <asm/head.h>
|
||||
#include <asm/page.h>
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/sched/debug.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
@ -19,7 +19,6 @@
|
||||
set_pmd(pmd, __pmd(_PAGE_TABLE + \
|
||||
((unsigned long long)page_to_pfn(pte) << \
|
||||
(unsigned long long) PAGE_SHIFT)))
|
||||
#define pmd_pgtable(pmd) pmd_page(pmd)
|
||||
|
||||
/*
|
||||
* Allocate and free page tables.
|
||||
|
@ -23,7 +23,6 @@
|
||||
#define PTRS_PER_PTE 1024
|
||||
#define USER_PTRS_PER_PGD ((TASK_SIZE + (PGDIR_SIZE - 1)) / PGDIR_SIZE)
|
||||
#define PTRS_PER_PGD 1024
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
#define pte_ERROR(e) \
|
||||
printk("%s:%d: bad pte %p(%08lx).\n", __FILE__, __LINE__, &(e), \
|
||||
|
@ -41,7 +41,6 @@
|
||||
#endif
|
||||
|
||||
#define USER_PTRS_PER_PGD ((TASK_SIZE + (PGDIR_SIZE - 1)) / PGDIR_SIZE)
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
#define pte_ERROR(e) \
|
||||
printk("%s:%d: bad pte %p(%016lx).\n", __FILE__, __LINE__, &(e), \
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/utsname.h>
|
||||
|
@ -33,6 +33,7 @@ config X86_64
|
||||
select NEED_DMA_MAP_STATE
|
||||
select SWIOTLB
|
||||
select ARCH_HAS_ELFCORE_COMPAT
|
||||
select ZONE_DMA32
|
||||
|
||||
config FORCE_DYNAMIC_FTRACE
|
||||
def_bool y
|
||||
@ -63,7 +64,7 @@ config X86
|
||||
select ARCH_ENABLE_HUGEPAGE_MIGRATION if X86_64 && HUGETLB_PAGE && MIGRATION
|
||||
select ARCH_ENABLE_MEMORY_HOTPLUG if X86_64 || (X86_32 && HIGHMEM)
|
||||
select ARCH_ENABLE_MEMORY_HOTREMOVE if MEMORY_HOTPLUG
|
||||
select ARCH_ENABLE_SPLIT_PMD_PTLOCK if X86_64 || X86_PAE
|
||||
select ARCH_ENABLE_SPLIT_PMD_PTLOCK if (PGTABLE_LEVELS > 2) && (X86_64 || X86_PAE)
|
||||
select ARCH_ENABLE_THP_MIGRATION if X86_64 && TRANSPARENT_HUGEPAGE
|
||||
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
|
||||
select ARCH_HAS_CACHE_LINE_SIZE
|
||||
@ -93,6 +94,7 @@ config X86
|
||||
select ARCH_HAS_SYSCALL_WRAPPER
|
||||
select ARCH_HAS_UBSAN_SANITIZE_ALL
|
||||
select ARCH_HAS_DEBUG_WX
|
||||
select ARCH_HAS_ZONE_DMA_SET if EXPERT
|
||||
select ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||
select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
|
||||
select ARCH_MIGHT_HAVE_PC_PARPORT
|
||||
@ -344,9 +346,6 @@ config ARCH_SUSPEND_POSSIBLE
|
||||
config ARCH_WANT_GENERAL_HUGETLB
|
||||
def_bool y
|
||||
|
||||
config ZONE_DMA32
|
||||
def_bool y if X86_64
|
||||
|
||||
config AUDIT_ARCH
|
||||
def_bool y if X86_64
|
||||
|
||||
@ -394,16 +393,6 @@ config CC_HAS_SANE_STACKPROTECTOR
|
||||
|
||||
menu "Processor type and features"
|
||||
|
||||
config ZONE_DMA
|
||||
bool "DMA memory allocation support" if EXPERT
|
||||
default y
|
||||
help
|
||||
DMA memory allocation support allows devices with less than 32-bit
|
||||
addressing to allocate within the first 16MB of address space.
|
||||
Disable if no such devices will be used.
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config SMP
|
||||
bool "Symmetric multi-processing support"
|
||||
help
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user