Merge 493ffd6605
("Merge tag 'ucount-rlimits-cleanups-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace") into android-mainline
Steps on the way to 6.1-rc1 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I71ed5f00bef9c7afd7260c80a067ca82a9f202d0
This commit is contained in:
commit
ed27852308
1
.mailmap
1
.mailmap
@ -336,6 +336,7 @@ Oleksij Rempel <linux@rempel-privat.de> <external.Oleksij.Rempel@de.bosch.com>
|
||||
Oleksij Rempel <linux@rempel-privat.de> <fixed-term.Oleksij.Rempel@de.bosch.com>
|
||||
Oleksij Rempel <linux@rempel-privat.de> <o.rempel@pengutronix.de>
|
||||
Oleksij Rempel <linux@rempel-privat.de> <ore@pengutronix.de>
|
||||
Oliver Upton <oliver.upton@linux.dev> <oupton@google.com>
|
||||
Pali Rohár <pali@kernel.org> <pali.rohar@gmail.com>
|
||||
Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
|
||||
Patrick Mochel <mochel@digitalimplant.org>
|
||||
|
@ -1355,6 +1355,11 @@ PAGE_SIZE multiple when read back.
|
||||
pagetables
|
||||
Amount of memory allocated for page tables.
|
||||
|
||||
sec_pagetables
|
||||
Amount of memory allocated for secondary page tables,
|
||||
this currently includes KVM mmu allocations on x86
|
||||
and arm64.
|
||||
|
||||
percpu (npn)
|
||||
Amount of memory used for storing per-cpu kernel
|
||||
data structures.
|
||||
|
@ -3637,7 +3637,7 @@
|
||||
(bounds check bypass). With this option data leaks are
|
||||
possible in the system.
|
||||
|
||||
nospectre_v2 [X86,PPC_FSL_BOOK3E,ARM64] Disable all mitigations for
|
||||
nospectre_v2 [X86,PPC_E500,ARM64] Disable all mitigations for
|
||||
the Spectre variant 2 (indirect branch prediction)
|
||||
vulnerability. System may allow data leaks with this
|
||||
option.
|
||||
@ -3756,9 +3756,9 @@
|
||||
[X86,PV_OPS] Disable paravirtualized VMware scheduler
|
||||
clock and use the default one.
|
||||
|
||||
no-steal-acc [X86,PV_OPS,ARM64] Disable paravirtualized steal time
|
||||
accounting. steal time is computed, but won't
|
||||
influence scheduler behaviour
|
||||
no-steal-acc [X86,PV_OPS,ARM64,PPC/PSERIES] Disable paravirtualized
|
||||
steal time accounting. steal time is computed, but
|
||||
won't influence scheduler behaviour
|
||||
|
||||
nolapic [X86-32,APIC] Do not enable or use the local APIC.
|
||||
|
||||
|
@ -982,6 +982,7 @@ Example output. You may not have all of these fields.
|
||||
SUnreclaim: 142336 kB
|
||||
KernelStack: 11168 kB
|
||||
PageTables: 20540 kB
|
||||
SecPageTables: 0 kB
|
||||
NFS_Unstable: 0 kB
|
||||
Bounce: 0 kB
|
||||
WritebackTmp: 0 kB
|
||||
@ -1090,6 +1091,9 @@ KernelStack
|
||||
Memory consumed by the kernel stacks of all tasks
|
||||
PageTables
|
||||
Memory consumed by userspace page tables
|
||||
SecPageTables
|
||||
Memory consumed by secondary page tables, this currently
|
||||
currently includes KVM mmu allocations on x86 and arm64.
|
||||
NFS_Unstable
|
||||
Always zero. Previous counted pages which had been written to
|
||||
the server, but has not been committed to stable storage.
|
||||
|
@ -4,12 +4,16 @@ CPU to ISA Version Mapping
|
||||
|
||||
Mapping of some CPU versions to relevant ISA versions.
|
||||
|
||||
Note Power4 and Power4+ are not supported.
|
||||
|
||||
========= ====================================================================
|
||||
CPU Architecture version
|
||||
========= ====================================================================
|
||||
Power10 Power ISA v3.1
|
||||
Power9 Power ISA v3.0B
|
||||
Power8 Power ISA v2.07
|
||||
e6500 Power ISA v2.06 with some exceptions
|
||||
e5500 Power ISA v2.06 with some exceptions, no Altivec
|
||||
Power7 Power ISA v2.06
|
||||
Power6 Power ISA v2.05
|
||||
PA6T Power ISA v2.04
|
||||
@ -24,6 +28,12 @@ PPC970 - PowerPC User Instruction Set Architecture Book I v2.01
|
||||
- PowerPC Virtual Environment Architecture Book II v2.01
|
||||
- PowerPC Operating Environment Architecture Book III v2.01
|
||||
- Plus Altivec/VMX ~= 2.03
|
||||
Power4+ - PowerPC User Instruction Set Architecture Book I v2.01
|
||||
- PowerPC Virtual Environment Architecture Book II v2.01
|
||||
- PowerPC Operating Environment Architecture Book III v2.01
|
||||
Power4 - PowerPC User Instruction Set Architecture Book I v2.00
|
||||
- PowerPC Virtual Environment Architecture Book II v2.00
|
||||
- PowerPC Operating Environment Architecture Book III v2.00
|
||||
========= ====================================================================
|
||||
|
||||
|
||||
@ -36,6 +46,8 @@ CPU VMX (aka. Altivec)
|
||||
Power10 Yes
|
||||
Power9 Yes
|
||||
Power8 Yes
|
||||
e6500 Yes
|
||||
e5500 No
|
||||
Power7 Yes
|
||||
Power6 Yes
|
||||
PA6T Yes
|
||||
@ -44,6 +56,8 @@ Power5++ No
|
||||
Power5+ No
|
||||
Power5 No
|
||||
PPC970 Yes
|
||||
Power4+ No
|
||||
Power4 No
|
||||
========== ==================
|
||||
|
||||
========== ====
|
||||
@ -52,6 +66,8 @@ CPU VSX
|
||||
Power10 Yes
|
||||
Power9 Yes
|
||||
Power8 Yes
|
||||
e6500 No
|
||||
e5500 No
|
||||
Power7 Yes
|
||||
Power6 No
|
||||
PA6T No
|
||||
@ -60,6 +76,8 @@ Power5++ No
|
||||
Power5+ No
|
||||
Power5 No
|
||||
PPC970 No
|
||||
Power4+ No
|
||||
Power4 No
|
||||
========== ====
|
||||
|
||||
========== ====================================
|
||||
@ -68,6 +86,8 @@ CPU Transactional Memory
|
||||
Power10 No (* see Power ISA v3.1, "Appendix A. Notes on the Removal of Transactional Memory from the Architecture")
|
||||
Power9 Yes (* see transactional_memory.txt)
|
||||
Power8 Yes
|
||||
e6500 No
|
||||
e5500 No
|
||||
Power7 No
|
||||
Power6 No
|
||||
PA6T No
|
||||
@ -76,4 +96,6 @@ Power5++ No
|
||||
Power5+ No
|
||||
Power5 No
|
||||
PPC970 No
|
||||
Power4+ No
|
||||
Power4 No
|
||||
========== ====================================
|
||||
|
@ -4074,7 +4074,7 @@ Queues an SMI on the thread's vcpu.
|
||||
4.97 KVM_X86_SET_MSR_FILTER
|
||||
----------------------------
|
||||
|
||||
:Capability: KVM_X86_SET_MSR_FILTER
|
||||
:Capability: KVM_CAP_X86_MSR_FILTER
|
||||
:Architectures: x86
|
||||
:Type: vm ioctl
|
||||
:Parameters: struct kvm_msr_filter
|
||||
@ -4173,8 +4173,10 @@ If an MSR access is not permitted through the filtering, it generates a
|
||||
allows user space to deflect and potentially handle various MSR accesses
|
||||
into user space.
|
||||
|
||||
If a vCPU is in running state while this ioctl is invoked, the vCPU may
|
||||
experience inconsistent filtering behavior on MSR accesses.
|
||||
Note, invoking this ioctl while a vCPU is running is inherently racy. However,
|
||||
KVM does guarantee that vCPUs will see either the previous filter or the new
|
||||
filter, e.g. MSRs with identical settings in both the old and new filter will
|
||||
have deterministic behavior.
|
||||
|
||||
4.98 KVM_CREATE_SPAPR_TCE_64
|
||||
----------------------------
|
||||
@ -5287,110 +5289,7 @@ KVM_PV_DUMP
|
||||
authentication tag all of which are needed to decrypt the dump at a
|
||||
later time.
|
||||
|
||||
|
||||
4.126 KVM_X86_SET_MSR_FILTER
|
||||
----------------------------
|
||||
|
||||
:Capability: KVM_CAP_X86_MSR_FILTER
|
||||
:Architectures: x86
|
||||
:Type: vm ioctl
|
||||
:Parameters: struct kvm_msr_filter
|
||||
:Returns: 0 on success, < 0 on error
|
||||
|
||||
::
|
||||
|
||||
struct kvm_msr_filter_range {
|
||||
#define KVM_MSR_FILTER_READ (1 << 0)
|
||||
#define KVM_MSR_FILTER_WRITE (1 << 1)
|
||||
__u32 flags;
|
||||
__u32 nmsrs; /* number of msrs in bitmap */
|
||||
__u32 base; /* MSR index the bitmap starts at */
|
||||
__u8 *bitmap; /* a 1 bit allows the operations in flags, 0 denies */
|
||||
};
|
||||
|
||||
#define KVM_MSR_FILTER_MAX_RANGES 16
|
||||
struct kvm_msr_filter {
|
||||
#define KVM_MSR_FILTER_DEFAULT_ALLOW (0 << 0)
|
||||
#define KVM_MSR_FILTER_DEFAULT_DENY (1 << 0)
|
||||
__u32 flags;
|
||||
struct kvm_msr_filter_range ranges[KVM_MSR_FILTER_MAX_RANGES];
|
||||
};
|
||||
|
||||
flags values for ``struct kvm_msr_filter_range``:
|
||||
|
||||
``KVM_MSR_FILTER_READ``
|
||||
|
||||
Filter read accesses to MSRs using the given bitmap. A 0 in the bitmap
|
||||
indicates that a read should immediately fail, while a 1 indicates that
|
||||
a read for a particular MSR should be handled regardless of the default
|
||||
filter action.
|
||||
|
||||
``KVM_MSR_FILTER_WRITE``
|
||||
|
||||
Filter write accesses to MSRs using the given bitmap. A 0 in the bitmap
|
||||
indicates that a write should immediately fail, while a 1 indicates that
|
||||
a write for a particular MSR should be handled regardless of the default
|
||||
filter action.
|
||||
|
||||
``KVM_MSR_FILTER_READ | KVM_MSR_FILTER_WRITE``
|
||||
|
||||
Filter both read and write accesses to MSRs using the given bitmap. A 0
|
||||
in the bitmap indicates that both reads and writes should immediately fail,
|
||||
while a 1 indicates that reads and writes for a particular MSR are not
|
||||
filtered by this range.
|
||||
|
||||
flags values for ``struct kvm_msr_filter``:
|
||||
|
||||
``KVM_MSR_FILTER_DEFAULT_ALLOW``
|
||||
|
||||
If no filter range matches an MSR index that is getting accessed, KVM will
|
||||
fall back to allowing access to the MSR.
|
||||
|
||||
``KVM_MSR_FILTER_DEFAULT_DENY``
|
||||
|
||||
If no filter range matches an MSR index that is getting accessed, KVM will
|
||||
fall back to rejecting access to the MSR. In this mode, all MSRs that should
|
||||
be processed by KVM need to explicitly be marked as allowed in the bitmaps.
|
||||
|
||||
This ioctl allows user space to define up to 16 bitmaps of MSR ranges to
|
||||
specify whether a certain MSR access should be explicitly filtered for or not.
|
||||
|
||||
If this ioctl has never been invoked, MSR accesses are not guarded and the
|
||||
default KVM in-kernel emulation behavior is fully preserved.
|
||||
|
||||
Calling this ioctl with an empty set of ranges (all nmsrs == 0) disables MSR
|
||||
filtering. In that mode, ``KVM_MSR_FILTER_DEFAULT_DENY`` is invalid and causes
|
||||
an error.
|
||||
|
||||
As soon as the filtering is in place, every MSR access is processed through
|
||||
the filtering except for accesses to the x2APIC MSRs (from 0x800 to 0x8ff);
|
||||
x2APIC MSRs are always allowed, independent of the ``default_allow`` setting,
|
||||
and their behavior depends on the ``X2APIC_ENABLE`` bit of the APIC base
|
||||
register.
|
||||
|
||||
If a bit is within one of the defined ranges, read and write accesses are
|
||||
guarded by the bitmap's value for the MSR index if the kind of access
|
||||
is included in the ``struct kvm_msr_filter_range`` flags. If no range
|
||||
cover this particular access, the behavior is determined by the flags
|
||||
field in the kvm_msr_filter struct: ``KVM_MSR_FILTER_DEFAULT_ALLOW``
|
||||
and ``KVM_MSR_FILTER_DEFAULT_DENY``.
|
||||
|
||||
Each bitmap range specifies a range of MSRs to potentially allow access on.
|
||||
The range goes from MSR index [base .. base+nmsrs]. The flags field
|
||||
indicates whether reads, writes or both reads and writes are filtered
|
||||
by setting a 1 bit in the bitmap for the corresponding MSR index.
|
||||
|
||||
If an MSR access is not permitted through the filtering, it generates a
|
||||
#GP inside the guest. When combined with KVM_CAP_X86_USER_SPACE_MSR, that
|
||||
allows user space to deflect and potentially handle various MSR accesses
|
||||
into user space.
|
||||
|
||||
Note, invoking this ioctl with a vCPU is running is inherently racy. However,
|
||||
KVM does guarantee that vCPUs will see either the previous filter or the new
|
||||
filter, e.g. MSRs with identical settings in both the old and new filter will
|
||||
have deterministic behavior.
|
||||
|
||||
4.127 KVM_XEN_HVM_SET_ATTR
|
||||
4.126 KVM_XEN_HVM_SET_ATTR
|
||||
--------------------------
|
||||
|
||||
:Capability: KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_SHARED_INFO
|
||||
|
@ -97,7 +97,7 @@ VCPU requests are simply bit indices of the ``vcpu->requests`` bitmap.
|
||||
This means general bitops, like those documented in [atomic-ops]_ could
|
||||
also be used, e.g. ::
|
||||
|
||||
clear_bit(KVM_REQ_UNHALT & KVM_REQUEST_MASK, &vcpu->requests);
|
||||
clear_bit(KVM_REQ_UNBLOCK & KVM_REQUEST_MASK, &vcpu->requests);
|
||||
|
||||
However, VCPU request users should refrain from doing so, as it would
|
||||
break the abstraction. The first 8 bits are reserved for architecture
|
||||
@ -126,17 +126,6 @@ KVM_REQ_UNBLOCK
|
||||
or in order to update the interrupt routing and ensure that assigned
|
||||
devices will wake up the vCPU.
|
||||
|
||||
KVM_REQ_UNHALT
|
||||
|
||||
This request may be made from the KVM common function kvm_vcpu_block(),
|
||||
which is used to emulate an instruction that causes a CPU to halt until
|
||||
one of an architectural specific set of events and/or interrupts is
|
||||
received (determined by checking kvm_arch_vcpu_runnable()). When that
|
||||
event or interrupt arrives kvm_vcpu_block() makes the request. This is
|
||||
in contrast to when kvm_vcpu_block() returns due to any other reason,
|
||||
such as a pending signal, which does not indicate the VCPU's halt
|
||||
emulation should stop, and therefore does not make the request.
|
||||
|
||||
KVM_REQ_OUTSIDE_GUEST_MODE
|
||||
|
||||
This "request" ensures the target vCPU has exited guest mode prior to the
|
||||
@ -297,21 +286,6 @@ architecture dependent. kvm_vcpu_block() calls kvm_arch_vcpu_runnable()
|
||||
to check if it should awaken. One reason to do so is to provide
|
||||
architectures a function where requests may be checked if necessary.
|
||||
|
||||
Clearing Requests
|
||||
-----------------
|
||||
|
||||
Generally it only makes sense for the receiving VCPU thread to clear a
|
||||
request. However, in some circumstances, such as when the requesting
|
||||
thread and the receiving VCPU thread are executed serially, such as when
|
||||
they are the same thread, or when they are using some form of concurrency
|
||||
control to temporarily execute synchronously, then it's possible to know
|
||||
that the request may be cleared immediately, rather than waiting for the
|
||||
receiving VCPU thread to handle the request in VCPU RUN. The only current
|
||||
examples of this are kvm_vcpu_block() calls made by VCPUs to block
|
||||
themselves. A possible side-effect of that call is to make the
|
||||
KVM_REQ_UNHALT request, which may then be cleared immediately when the
|
||||
VCPU returns from the call.
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
|
@ -22,46 +22,6 @@
|
||||
#include <asm/cputype.h>
|
||||
#include <asm/topology.h>
|
||||
|
||||
void store_cpu_topology(unsigned int cpuid)
|
||||
{
|
||||
struct cpu_topology *cpuid_topo = &cpu_topology[cpuid];
|
||||
u64 mpidr;
|
||||
|
||||
if (cpuid_topo->package_id != -1)
|
||||
goto topology_populated;
|
||||
|
||||
mpidr = read_cpuid_mpidr();
|
||||
|
||||
/* Uniprocessor systems can rely on default topology values */
|
||||
if (mpidr & MPIDR_UP_BITMASK)
|
||||
return;
|
||||
|
||||
/*
|
||||
* This would be the place to create cpu topology based on MPIDR.
|
||||
*
|
||||
* However, it cannot be trusted to depict the actual topology; some
|
||||
* pieces of the architecture enforce an artificial cap on Aff0 values
|
||||
* (e.g. GICv3's ICC_SGI1R_EL1 limits it to 15), leading to an
|
||||
* artificial cycling of Aff1, Aff2 and Aff3 values. IOW, these end up
|
||||
* having absolutely no relationship to the actual underlying system
|
||||
* topology, and cannot be reasonably used as core / package ID.
|
||||
*
|
||||
* If the MT bit is set, Aff0 *could* be used to define a thread ID, but
|
||||
* we still wouldn't be able to obtain a sane core ID. This means we
|
||||
* need to entirely ignore MPIDR for any topology deduction.
|
||||
*/
|
||||
cpuid_topo->thread_id = -1;
|
||||
cpuid_topo->core_id = cpuid;
|
||||
cpuid_topo->package_id = cpu_to_node(cpuid);
|
||||
|
||||
pr_debug("CPU%u: cluster %d core %d thread %d mpidr %#016llx\n",
|
||||
cpuid, cpuid_topo->package_id, cpuid_topo->core_id,
|
||||
cpuid_topo->thread_id, mpidr);
|
||||
|
||||
topology_populated:
|
||||
update_siblings_masks(cpuid);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
static bool __init acpi_cpu_is_threaded(int cpu)
|
||||
{
|
||||
|
@ -666,7 +666,6 @@ void kvm_vcpu_wfi(struct kvm_vcpu *vcpu)
|
||||
|
||||
kvm_vcpu_halt(vcpu);
|
||||
vcpu_clear_flag(vcpu, IN_WFIT);
|
||||
kvm_clear_request(KVM_REQ_UNHALT, vcpu);
|
||||
|
||||
preempt_disable();
|
||||
vgic_v4_load(vcpu);
|
||||
|
@ -92,9 +92,13 @@ static bool kvm_is_device_pfn(unsigned long pfn)
|
||||
static void *stage2_memcache_zalloc_page(void *arg)
|
||||
{
|
||||
struct kvm_mmu_memory_cache *mc = arg;
|
||||
void *virt;
|
||||
|
||||
/* Allocated with __GFP_ZERO, so no need to zero */
|
||||
return kvm_mmu_memory_cache_alloc(mc);
|
||||
virt = kvm_mmu_memory_cache_alloc(mc);
|
||||
if (virt)
|
||||
kvm_account_pgtable_pages(virt, 1);
|
||||
return virt;
|
||||
}
|
||||
|
||||
static void *kvm_host_zalloc_pages_exact(size_t size)
|
||||
@ -102,6 +106,21 @@ static void *kvm_host_zalloc_pages_exact(size_t size)
|
||||
return alloc_pages_exact(size, GFP_KERNEL_ACCOUNT | __GFP_ZERO);
|
||||
}
|
||||
|
||||
static void *kvm_s2_zalloc_pages_exact(size_t size)
|
||||
{
|
||||
void *virt = kvm_host_zalloc_pages_exact(size);
|
||||
|
||||
if (virt)
|
||||
kvm_account_pgtable_pages(virt, (size >> PAGE_SHIFT));
|
||||
return virt;
|
||||
}
|
||||
|
||||
static void kvm_s2_free_pages_exact(void *virt, size_t size)
|
||||
{
|
||||
kvm_account_pgtable_pages(virt, -(size >> PAGE_SHIFT));
|
||||
free_pages_exact(virt, size);
|
||||
}
|
||||
|
||||
static void kvm_host_get_page(void *addr)
|
||||
{
|
||||
get_page(virt_to_page(addr));
|
||||
@ -112,6 +131,15 @@ static void kvm_host_put_page(void *addr)
|
||||
put_page(virt_to_page(addr));
|
||||
}
|
||||
|
||||
static void kvm_s2_put_page(void *addr)
|
||||
{
|
||||
struct page *p = virt_to_page(addr);
|
||||
/* Dropping last refcount, the page will be freed */
|
||||
if (page_count(p) == 1)
|
||||
kvm_account_pgtable_pages(addr, -1);
|
||||
put_page(p);
|
||||
}
|
||||
|
||||
static int kvm_host_page_count(void *addr)
|
||||
{
|
||||
return page_count(virt_to_page(addr));
|
||||
@ -625,10 +653,10 @@ static int get_user_mapping_size(struct kvm *kvm, u64 addr)
|
||||
|
||||
static struct kvm_pgtable_mm_ops kvm_s2_mm_ops = {
|
||||
.zalloc_page = stage2_memcache_zalloc_page,
|
||||
.zalloc_pages_exact = kvm_host_zalloc_pages_exact,
|
||||
.free_pages_exact = free_pages_exact,
|
||||
.zalloc_pages_exact = kvm_s2_zalloc_pages_exact,
|
||||
.free_pages_exact = kvm_s2_free_pages_exact,
|
||||
.get_page = kvm_host_get_page,
|
||||
.put_page = kvm_host_put_page,
|
||||
.put_page = kvm_s2_put_page,
|
||||
.page_count = kvm_host_page_count,
|
||||
.phys_to_virt = kvm_host_va,
|
||||
.virt_to_phys = kvm_host_pa,
|
||||
|
@ -204,6 +204,16 @@ config TASK_SIZE
|
||||
hex "Size of user task space" if TASK_SIZE_BOOL
|
||||
default "0x80000000"
|
||||
|
||||
config MB_MANAGER
|
||||
bool "Support for Microblaze Manager"
|
||||
depends on ADVANCED_OPTIONS
|
||||
help
|
||||
This option enables API for configuring the MicroBlaze manager
|
||||
control register, which is consumed by the break handler to
|
||||
block the break.
|
||||
|
||||
Say N here unless you know what you are doing.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Bus Options"
|
||||
|
29
arch/microblaze/include/asm/xilinx_mb_manager.h
Normal file
29
arch/microblaze/include/asm/xilinx_mb_manager.h
Normal file
@ -0,0 +1,29 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2022 Xilinx, Inc.
|
||||
*/
|
||||
#ifndef _XILINX_MB_MANAGER_H
|
||||
#define _XILINX_MB_MANAGER_H
|
||||
|
||||
# ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/of_address.h>
|
||||
|
||||
/*
|
||||
* When the break vector gets asserted because of error injection, the break
|
||||
* signal must be blocked before exiting from the break handler, Below api
|
||||
* updates the manager address and control register and error counter callback
|
||||
* arguments, which will be used by the break handler to block the break and
|
||||
* call the callback function.
|
||||
*/
|
||||
void xmb_manager_register(uintptr_t phys_baseaddr, u32 cr_val,
|
||||
void (*callback)(void *data),
|
||||
void *priv, void (*reset_callback)(void *data));
|
||||
asmlinkage void xmb_inject_err(void);
|
||||
|
||||
# endif /* __ASSEMBLY__ */
|
||||
|
||||
/* Error injection offset */
|
||||
#define XMB_INJECT_ERR_OFFSET 0x200
|
||||
|
||||
#endif /* _XILINX_MB_MANAGER_H */
|
@ -120,5 +120,12 @@ int main(int argc, char *argv[])
|
||||
DEFINE(CC_FSR, offsetof(struct cpu_context, fsr));
|
||||
BLANK();
|
||||
|
||||
/* struct cpuinfo */
|
||||
DEFINE(CI_DCS, offsetof(struct cpuinfo, dcache_size));
|
||||
DEFINE(CI_DCL, offsetof(struct cpuinfo, dcache_line_length));
|
||||
DEFINE(CI_ICS, offsetof(struct cpuinfo, icache_size));
|
||||
DEFINE(CI_ICL, offsetof(struct cpuinfo, icache_line_length));
|
||||
BLANK();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -27,9 +27,11 @@
|
||||
|
||||
#include <asm/page.h>
|
||||
#include <asm/unistd.h>
|
||||
#include <asm/xilinx_mb_manager.h>
|
||||
|
||||
#include <linux/errno.h>
|
||||
#include <asm/signal.h>
|
||||
#include <asm/mmu.h>
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
@ -287,6 +289,44 @@ syscall_debug_table:
|
||||
|
||||
.text
|
||||
|
||||
.extern cpuinfo
|
||||
|
||||
C_ENTRY(mb_flush_dcache):
|
||||
addik r1, r1, -PT_SIZE
|
||||
SAVE_REGS
|
||||
|
||||
addik r3, r0, cpuinfo
|
||||
lwi r7, r3, CI_DCS
|
||||
lwi r8, r3, CI_DCL
|
||||
sub r9, r7, r8
|
||||
1:
|
||||
wdc.flush r9, r0
|
||||
bgtid r9, 1b
|
||||
addk r9, r9, r8
|
||||
|
||||
RESTORE_REGS
|
||||
addik r1, r1, PT_SIZE
|
||||
rtsd r15, 8
|
||||
nop
|
||||
|
||||
C_ENTRY(mb_invalidate_icache):
|
||||
addik r1, r1, -PT_SIZE
|
||||
SAVE_REGS
|
||||
|
||||
addik r3, r0, cpuinfo
|
||||
lwi r7, r3, CI_ICS
|
||||
lwi r8, r3, CI_ICL
|
||||
sub r9, r7, r8
|
||||
1:
|
||||
wic r9, r0
|
||||
bgtid r9, 1b
|
||||
addk r9, r9, r8
|
||||
|
||||
RESTORE_REGS
|
||||
addik r1, r1, PT_SIZE
|
||||
rtsd r15, 8
|
||||
nop
|
||||
|
||||
/*
|
||||
* User trap.
|
||||
*
|
||||
@ -753,6 +793,160 @@ IRQ_return: /* MS: Make global symbol for debugging */
|
||||
rtid r14, 0
|
||||
nop
|
||||
|
||||
#ifdef CONFIG_MB_MANAGER
|
||||
|
||||
#define PT_PID PT_SIZE
|
||||
#define PT_TLBI PT_SIZE + 4
|
||||
#define PT_ZPR PT_SIZE + 8
|
||||
#define PT_TLBL0 PT_SIZE + 12
|
||||
#define PT_TLBH0 PT_SIZE + 16
|
||||
|
||||
C_ENTRY(_xtmr_manager_reset):
|
||||
lwi r1, r0, xmb_manager_stackpointer
|
||||
|
||||
/* Restore MSR */
|
||||
lwi r2, r1, PT_MSR
|
||||
mts rmsr, r2
|
||||
bri 4
|
||||
|
||||
/* restore Special purpose registers */
|
||||
lwi r2, r1, PT_PID
|
||||
mts rpid, r2
|
||||
|
||||
lwi r2, r1, PT_TLBI
|
||||
mts rtlbx, r2
|
||||
|
||||
lwi r2, r1, PT_ZPR
|
||||
mts rzpr, r2
|
||||
|
||||
#if CONFIG_XILINX_MICROBLAZE0_USE_FPU
|
||||
lwi r2, r1, PT_FSR
|
||||
mts rfsr, r2
|
||||
#endif
|
||||
|
||||
/* restore all the tlb's */
|
||||
addik r3, r0, TOPHYS(tlb_skip)
|
||||
addik r6, r0, PT_TLBL0
|
||||
addik r7, r0, PT_TLBH0
|
||||
restore_tlb:
|
||||
add r6, r6, r1
|
||||
add r7, r7, r1
|
||||
lwi r2, r6, 0
|
||||
mts rtlblo, r2
|
||||
lwi r2, r7, 0
|
||||
mts rtlbhi, r2
|
||||
addik r6, r6, 4
|
||||
addik r7, r7, 4
|
||||
bgtid r3, restore_tlb
|
||||
addik r3, r3, -1
|
||||
|
||||
lwi r5, r0, TOPHYS(xmb_manager_dev)
|
||||
lwi r8, r0, TOPHYS(xmb_manager_reset_callback)
|
||||
set_vms
|
||||
/* return from reset need -8 to adjust for rtsd r15, 8 */
|
||||
addik r15, r0, ret_from_reset - 8
|
||||
rtbd r8, 0
|
||||
nop
|
||||
|
||||
ret_from_reset:
|
||||
set_bip /* Ints masked for state restore */
|
||||
VM_OFF
|
||||
/* MS: Restore all regs */
|
||||
RESTORE_REGS
|
||||
lwi r14, r1, PT_R14
|
||||
lwi r16, r1, PT_PC
|
||||
addik r1, r1, PT_SIZE + 36
|
||||
rtbd r16, 0
|
||||
nop
|
||||
|
||||
/*
|
||||
* Break handler for MB Manager. Enter to _xmb_manager_break by
|
||||
* injecting fault in one of the TMR Microblaze core.
|
||||
* FIXME: This break handler supports getting
|
||||
* called from kernel space only.
|
||||
*/
|
||||
C_ENTRY(_xmb_manager_break):
|
||||
/*
|
||||
* Reserve memory in the stack for context store/restore
|
||||
* (which includes memory for storing tlbs (max two tlbs))
|
||||
*/
|
||||
addik r1, r1, -PT_SIZE - 36
|
||||
swi r1, r0, xmb_manager_stackpointer
|
||||
SAVE_REGS
|
||||
swi r14, r1, PT_R14 /* rewrite saved R14 value */
|
||||
swi r16, r1, PT_PC; /* PC and r16 are the same */
|
||||
|
||||
lwi r6, r0, TOPHYS(xmb_manager_baseaddr)
|
||||
lwi r7, r0, TOPHYS(xmb_manager_crval)
|
||||
/*
|
||||
* When the break vector gets asserted because of error injection,
|
||||
* the break signal must be blocked before exiting from the
|
||||
* break handler, below code configures the tmr manager
|
||||
* control register to block break signal.
|
||||
*/
|
||||
swi r7, r6, 0
|
||||
|
||||
/* Save the special purpose registers */
|
||||
mfs r2, rpid
|
||||
swi r2, r1, PT_PID
|
||||
|
||||
mfs r2, rtlbx
|
||||
swi r2, r1, PT_TLBI
|
||||
|
||||
mfs r2, rzpr
|
||||
swi r2, r1, PT_ZPR
|
||||
|
||||
#if CONFIG_XILINX_MICROBLAZE0_USE_FPU
|
||||
mfs r2, rfsr
|
||||
swi r2, r1, PT_FSR
|
||||
#endif
|
||||
mfs r2, rmsr
|
||||
swi r2, r1, PT_MSR
|
||||
|
||||
/* Save all the tlb's */
|
||||
addik r3, r0, TOPHYS(tlb_skip)
|
||||
addik r6, r0, PT_TLBL0
|
||||
addik r7, r0, PT_TLBH0
|
||||
save_tlb:
|
||||
add r6, r6, r1
|
||||
add r7, r7, r1
|
||||
mfs r2, rtlblo
|
||||
swi r2, r6, 0
|
||||
mfs r2, rtlbhi
|
||||
swi r2, r7, 0
|
||||
addik r6, r6, 4
|
||||
addik r7, r7, 4
|
||||
bgtid r3, save_tlb
|
||||
addik r3, r3, -1
|
||||
|
||||
lwi r5, r0, TOPHYS(xmb_manager_dev)
|
||||
lwi r8, r0, TOPHYS(xmb_manager_callback)
|
||||
/* return from break need -8 to adjust for rtsd r15, 8 */
|
||||
addik r15, r0, ret_from_break - 8
|
||||
rtbd r8, 0
|
||||
nop
|
||||
|
||||
ret_from_break:
|
||||
/* flush the d-cache */
|
||||
bralid r15, mb_flush_dcache
|
||||
nop
|
||||
|
||||
/*
|
||||
* To make sure microblaze i-cache is in a proper state
|
||||
* invalidate the i-cache.
|
||||
*/
|
||||
bralid r15, mb_invalidate_icache
|
||||
nop
|
||||
|
||||
set_bip; /* Ints masked for state restore */
|
||||
VM_OFF;
|
||||
mbar 1
|
||||
mbar 2
|
||||
bri 4
|
||||
suspend
|
||||
nop
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Debug trap for KGDB. Enter to _debug_exception by brki r16, 0x18
|
||||
* and call handling function with saved pt_regs
|
||||
@ -957,6 +1151,88 @@ ENTRY(_switch_to)
|
||||
rtsd r15, 8
|
||||
nop
|
||||
|
||||
#ifdef CONFIG_MB_MANAGER
|
||||
.global xmb_inject_err
|
||||
.section .text
|
||||
.align 2
|
||||
.ent xmb_inject_err
|
||||
.type xmb_inject_err, @function
|
||||
xmb_inject_err:
|
||||
addik r1, r1, -PT_SIZE
|
||||
SAVE_REGS
|
||||
|
||||
/* Switch to real mode */
|
||||
VM_OFF;
|
||||
set_bip;
|
||||
mbar 1
|
||||
mbar 2
|
||||
bralid r15, XMB_INJECT_ERR_OFFSET
|
||||
nop;
|
||||
|
||||
/* enable virtual mode */
|
||||
set_vms;
|
||||
/* barrier for instructions and data accesses */
|
||||
mbar 1
|
||||
mbar 2
|
||||
/*
|
||||
* Enable Interrupts, Virtual Protected Mode, equalize
|
||||
* initial state for all possible entries.
|
||||
*/
|
||||
rtbd r0, 1f
|
||||
nop;
|
||||
1:
|
||||
RESTORE_REGS
|
||||
addik r1, r1, PT_SIZE
|
||||
rtsd r15, 8;
|
||||
nop;
|
||||
.end xmb_inject_err
|
||||
|
||||
.section .data
|
||||
.global xmb_manager_dev
|
||||
.global xmb_manager_baseaddr
|
||||
.global xmb_manager_crval
|
||||
.global xmb_manager_callback
|
||||
.global xmb_manager_reset_callback
|
||||
.global xmb_manager_stackpointer
|
||||
.align 4
|
||||
xmb_manager_dev:
|
||||
.long 0
|
||||
xmb_manager_baseaddr:
|
||||
.long 0
|
||||
xmb_manager_crval:
|
||||
.long 0
|
||||
xmb_manager_callback:
|
||||
.long 0
|
||||
xmb_manager_reset_callback:
|
||||
.long 0
|
||||
xmb_manager_stackpointer:
|
||||
.long 0
|
||||
|
||||
/*
|
||||
* When the break vector gets asserted because of error injection,
|
||||
* the break signal must be blocked before exiting from the
|
||||
* break handler, Below api updates the manager address and
|
||||
* control register and error count callback arguments,
|
||||
* which will be used by the break handler to block the
|
||||
* break and call the callback function.
|
||||
*/
|
||||
.global xmb_manager_register
|
||||
.section .text
|
||||
.align 2
|
||||
.ent xmb_manager_register
|
||||
.type xmb_manager_register, @function
|
||||
xmb_manager_register:
|
||||
swi r5, r0, xmb_manager_baseaddr
|
||||
swi r6, r0, xmb_manager_crval
|
||||
swi r7, r0, xmb_manager_callback
|
||||
swi r8, r0, xmb_manager_dev
|
||||
swi r9, r0, xmb_manager_reset_callback
|
||||
|
||||
rtsd r15, 8;
|
||||
nop;
|
||||
.end xmb_manager_register
|
||||
#endif
|
||||
|
||||
ENTRY(_reset)
|
||||
VM_OFF
|
||||
brai 0; /* Jump to reset vector */
|
||||
@ -964,19 +1240,43 @@ ENTRY(_reset)
|
||||
/* These are compiled and loaded into high memory, then
|
||||
* copied into place in mach_early_setup */
|
||||
.section .init.ivt, "ax"
|
||||
#if CONFIG_MANUAL_RESET_VECTOR
|
||||
#if CONFIG_MANUAL_RESET_VECTOR && !defined(CONFIG_MB_MANAGER)
|
||||
.org 0x0
|
||||
brai CONFIG_MANUAL_RESET_VECTOR
|
||||
#elif defined(CONFIG_MB_MANAGER)
|
||||
.org 0x0
|
||||
brai TOPHYS(_xtmr_manager_reset);
|
||||
#endif
|
||||
.org 0x8
|
||||
brai TOPHYS(_user_exception); /* syscall handler */
|
||||
.org 0x10
|
||||
brai TOPHYS(_interrupt); /* Interrupt handler */
|
||||
#ifdef CONFIG_MB_MANAGER
|
||||
.org 0x18
|
||||
brai TOPHYS(_xmb_manager_break); /* microblaze manager break handler */
|
||||
#else
|
||||
.org 0x18
|
||||
brai TOPHYS(_debug_exception); /* debug trap handler */
|
||||
#endif
|
||||
.org 0x20
|
||||
brai TOPHYS(_hw_exception_handler); /* HW exception handler */
|
||||
|
||||
#ifdef CONFIG_MB_MANAGER
|
||||
/*
|
||||
* For TMR Inject API which injects the error should
|
||||
* be executed from LMB.
|
||||
* TMR Inject is programmed with address of 0x200 so that
|
||||
* when program counter matches with this address error will
|
||||
* be injected. 0x200 is expected to be next available bram
|
||||
* offset, hence used for this api.
|
||||
*/
|
||||
.org XMB_INJECT_ERR_OFFSET
|
||||
xmb_inject_error:
|
||||
nop
|
||||
rtsd r15, 8
|
||||
nop
|
||||
#endif
|
||||
|
||||
.section .rodata,"a"
|
||||
#include "syscall_table.S"
|
||||
|
||||
|
@ -955,13 +955,11 @@ enum emulation_result kvm_mips_emul_wait(struct kvm_vcpu *vcpu)
|
||||
kvm_vcpu_halt(vcpu);
|
||||
|
||||
/*
|
||||
* We we are runnable, then definitely go off to user space to
|
||||
* We are runnable, then definitely go off to user space to
|
||||
* check if any I/O interrupts are pending.
|
||||
*/
|
||||
if (kvm_check_request(KVM_REQ_UNHALT, vcpu)) {
|
||||
kvm_clear_request(KVM_REQ_UNHALT, vcpu);
|
||||
if (kvm_arch_vcpu_runnable(vcpu))
|
||||
vcpu->run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
|
||||
}
|
||||
}
|
||||
|
||||
return EMULATE_DONE;
|
||||
|
@ -135,8 +135,9 @@ config PPC
|
||||
select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
|
||||
select ARCH_HAS_SET_MEMORY
|
||||
select ARCH_HAS_STRICT_KERNEL_RWX if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION
|
||||
select ARCH_HAS_STRICT_KERNEL_RWX if FSL_BOOKE && !HIBERNATION && !RANDOMIZE_BASE
|
||||
select ARCH_HAS_STRICT_KERNEL_RWX if PPC_85xx && !HIBERNATION && !RANDOMIZE_BASE
|
||||
select ARCH_HAS_STRICT_MODULE_RWX if ARCH_HAS_STRICT_KERNEL_RWX
|
||||
select ARCH_HAS_SYSCALL_WRAPPER if !SPU_BASE && !COMPAT
|
||||
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
||||
select ARCH_HAS_UACCESS_FLUSHCACHE
|
||||
select ARCH_HAS_UBSAN_SANITIZE_ALL
|
||||
@ -194,7 +195,7 @@ config PPC
|
||||
select HAVE_ARCH_KASAN if PPC_RADIX_MMU
|
||||
select HAVE_ARCH_KASAN if PPC_BOOK3E_64
|
||||
select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
|
||||
select HAVE_ARCH_KFENCE if PPC_BOOK3S_32 || PPC_8xx || 40x
|
||||
select HAVE_ARCH_KFENCE if ARCH_SUPPORTS_DEBUG_PAGEALLOC
|
||||
select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
|
||||
select HAVE_ARCH_KGDB
|
||||
select HAVE_ARCH_MMAP_RND_BITS
|
||||
@ -211,7 +212,7 @@ config PPC
|
||||
select HAVE_DYNAMIC_FTRACE_WITH_ARGS if MPROFILE_KERNEL || PPC32
|
||||
select HAVE_DYNAMIC_FTRACE_WITH_REGS if MPROFILE_KERNEL || PPC32
|
||||
select HAVE_EBPF_JIT
|
||||
select HAVE_EFFICIENT_UNALIGNED_ACCESS if !(CPU_LITTLE_ENDIAN && POWER7_CPU)
|
||||
select HAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
select HAVE_FAST_GUP
|
||||
select HAVE_FTRACE_MCOUNT_RECORD
|
||||
select HAVE_FUNCTION_DESCRIPTORS if PPC64_ELF_ABI_V1
|
||||
@ -290,7 +291,7 @@ config PPC_LONG_DOUBLE_128
|
||||
config PPC_BARRIER_NOSPEC
|
||||
bool
|
||||
default y
|
||||
depends on PPC_BOOK3S_64 || PPC_FSL_BOOK3E
|
||||
depends on PPC_BOOK3S_64 || PPC_E500
|
||||
|
||||
config EARLY_PRINTK
|
||||
bool
|
||||
@ -548,7 +549,7 @@ config PPC64_SUPPORTS_MEMORY_FAILURE
|
||||
|
||||
config KEXEC
|
||||
bool "kexec system call"
|
||||
depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) || PPC_BOOK3E
|
||||
depends on PPC_BOOK3S || PPC_E500 || (44x && !SMP)
|
||||
select KEXEC_CORE
|
||||
help
|
||||
kexec is a system call that implements the ability to shutdown your
|
||||
@ -583,7 +584,7 @@ config ARCH_HAS_KEXEC_PURGATORY
|
||||
|
||||
config RELOCATABLE
|
||||
bool "Build a relocatable kernel"
|
||||
depends on PPC64 || (FLATMEM && (44x || FSL_BOOKE))
|
||||
depends on PPC64 || (FLATMEM && (44x || PPC_85xx))
|
||||
select NONSTATIC_KERNEL
|
||||
help
|
||||
This builds a kernel image that is capable of running at the
|
||||
@ -606,7 +607,7 @@ config RELOCATABLE
|
||||
|
||||
config RANDOMIZE_BASE
|
||||
bool "Randomize the address of the kernel image"
|
||||
depends on (FSL_BOOKE && FLATMEM && PPC32)
|
||||
depends on PPC_85xx && FLATMEM
|
||||
depends on RELOCATABLE
|
||||
help
|
||||
Randomizes the virtual address at which the kernel image is
|
||||
@ -625,8 +626,8 @@ config RELOCATABLE_TEST
|
||||
|
||||
config CRASH_DUMP
|
||||
bool "Build a dump capture kernel"
|
||||
depends on PPC64 || PPC_BOOK3S_32 || FSL_BOOKE || (44x && !SMP)
|
||||
select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
|
||||
depends on PPC64 || PPC_BOOK3S_32 || PPC_85xx || (44x && !SMP)
|
||||
select RELOCATABLE if PPC64 || 44x || PPC_85xx
|
||||
help
|
||||
Build a kernel suitable for use as a dump capture kernel.
|
||||
The same kernel binary can be used as production kernel and dump
|
||||
@ -815,7 +816,7 @@ config DATA_SHIFT_BOOL
|
||||
depends on ADVANCED_OPTIONS
|
||||
depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE
|
||||
depends on PPC_BOOK3S_32 || (PPC_8xx && !PIN_TLB_DATA && !STRICT_KERNEL_RWX) || \
|
||||
FSL_BOOKE
|
||||
PPC_85xx
|
||||
help
|
||||
This option allows you to set the kernel data alignment. When
|
||||
RAM is mapped by blocks, the alignment needs to fit the size and
|
||||
@ -828,13 +829,13 @@ config DATA_SHIFT
|
||||
default 24 if STRICT_KERNEL_RWX && PPC64
|
||||
range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
|
||||
range 19 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
|
||||
range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_FSL_BOOKE
|
||||
range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_85xx
|
||||
default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
|
||||
default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
|
||||
default 23 if STRICT_KERNEL_RWX && PPC_8xx
|
||||
default 23 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && PIN_TLB_DATA
|
||||
default 19 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
|
||||
default 24 if STRICT_KERNEL_RWX && FSL_BOOKE
|
||||
default 24 if STRICT_KERNEL_RWX && PPC_85xx
|
||||
default PPC_PAGE_SHIFT
|
||||
help
|
||||
On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
|
||||
@ -1150,7 +1151,7 @@ config LOWMEM_SIZE
|
||||
|
||||
config LOWMEM_CAM_NUM_BOOL
|
||||
bool "Set number of CAMs to use to map low memory"
|
||||
depends on ADVANCED_OPTIONS && FSL_BOOKE
|
||||
depends on ADVANCED_OPTIONS && PPC_85xx
|
||||
help
|
||||
This option allows you to set the maximum number of CAM slots that
|
||||
will be used to map low memory. There are a limited number of slots
|
||||
@ -1161,7 +1162,7 @@ config LOWMEM_CAM_NUM_BOOL
|
||||
Say N here unless you know what you are doing.
|
||||
|
||||
config LOWMEM_CAM_NUM
|
||||
depends on FSL_BOOKE
|
||||
depends on PPC_85xx
|
||||
int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
|
||||
default 3 if !STRICT_KERNEL_RWX
|
||||
default 9 if DATA_SHIFT >= 24
|
||||
@ -1170,7 +1171,7 @@ config LOWMEM_CAM_NUM
|
||||
|
||||
config DYNAMIC_MEMSTART
|
||||
bool "Enable page aligned dynamic load address for kernel"
|
||||
depends on ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || 44x)
|
||||
depends on ADVANCED_OPTIONS && FLATMEM && (PPC_85xx || 44x)
|
||||
select NONSTATIC_KERNEL
|
||||
help
|
||||
This option enables the kernel to be loaded at any page aligned
|
||||
@ -1219,7 +1220,7 @@ config KERNEL_START
|
||||
|
||||
config PHYSICAL_START_BOOL
|
||||
bool "Set physical address where the kernel is loaded"
|
||||
depends on ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
|
||||
depends on ADVANCED_OPTIONS && FLATMEM && PPC_85xx
|
||||
help
|
||||
This gives the physical address where the kernel is loaded.
|
||||
|
||||
@ -1232,7 +1233,7 @@ config PHYSICAL_START
|
||||
|
||||
config PHYSICAL_ALIGN
|
||||
hex
|
||||
default "0x04000000" if FSL_BOOKE
|
||||
default "0x04000000" if PPC_85xx
|
||||
help
|
||||
This value puts the alignment restrictions on physical address
|
||||
where kernel is loaded and run from. Kernel is compiled for an
|
||||
|
@ -283,6 +283,12 @@ config PPC_EARLY_DEBUG_MEMCONS
|
||||
This console provides input and output buffers stored within the
|
||||
kernel BSS and should be safe to select on any system. A debugger
|
||||
can then be used to read kernel output or send input to the console.
|
||||
|
||||
config PPC_EARLY_DEBUG_16550
|
||||
bool "Serial 16550"
|
||||
depends on PPC_UDBG_16550
|
||||
help
|
||||
Select this to enable early debugging via Serial 16550 console
|
||||
endchoice
|
||||
|
||||
config PPC_MEMCONS_OUTPUT_SIZE
|
||||
@ -354,6 +360,15 @@ config PPC_EARLY_DEBUG_CPM_ADDR
|
||||
platform probing is done, all platforms selected must
|
||||
share the same address.
|
||||
|
||||
config PPC_EARLY_DEBUG_16550_PHYSADDR
|
||||
hex "Early debug Serial 16550 physical address"
|
||||
depends on PPC_EARLY_DEBUG_16550
|
||||
|
||||
config PPC_EARLY_DEBUG_16550_STRIDE
|
||||
int "Early debug Serial 16550 stride"
|
||||
depends on PPC_EARLY_DEBUG_16550
|
||||
default 1
|
||||
|
||||
config FAIL_IOMMU
|
||||
bool "Fault-injection capability for IOMMU"
|
||||
depends on FAULT_INJECTION
|
||||
|
@ -149,11 +149,12 @@ CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)
|
||||
ifdef CONFIG_PPC_BOOK3S_64
|
||||
ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power9,-mtune=power8)
|
||||
else
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,$(call cc-option,-mtune=power5))
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mcpu=power5,-mcpu=power4)
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4
|
||||
endif
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power10, \
|
||||
$(call cc-option,-mtune=power9, \
|
||||
$(call cc-option,-mtune=power8)))
|
||||
else ifdef CONFIG_PPC_BOOK3E_64
|
||||
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
|
||||
endif
|
||||
@ -191,9 +192,14 @@ ifdef CONFIG_476FPE_ERR46
|
||||
-T $(srctree)/arch/powerpc/platforms/44x/ppc476_modules.lds
|
||||
endif
|
||||
|
||||
# No AltiVec or VSX instructions when building kernel
|
||||
# No prefix or pcrel
|
||||
KBUILD_CFLAGS += $(call cc-option,-mno-prefixed)
|
||||
KBUILD_CFLAGS += $(call cc-option,-mno-pcrel)
|
||||
|
||||
# No AltiVec or VSX or MMA instructions when building kernel
|
||||
KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
|
||||
KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
|
||||
KBUILD_CFLAGS += $(call cc-option,-mno-mma)
|
||||
|
||||
# No SPE instruction when building kernel
|
||||
# (We use all available options to help semi-broken compilers)
|
||||
@ -210,7 +216,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-string)
|
||||
cpu-as-$(CONFIG_40x) += -Wa,-m405
|
||||
cpu-as-$(CONFIG_44x) += -Wa,-m440
|
||||
cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
|
||||
cpu-as-$(CONFIG_E500) += -Wa,-me500
|
||||
cpu-as-$(CONFIG_PPC_E500) += -Wa,-me500
|
||||
|
||||
# When using '-many -mpower4' gas will first try and find a matching power4
|
||||
# mnemonic and failing that it will allow any valid mnemonic that GAS knows
|
||||
@ -231,7 +237,7 @@ head-$(CONFIG_PPC_BOOK3S_32) := arch/powerpc/kernel/head_book3s_32.o
|
||||
head-$(CONFIG_PPC_8xx) := arch/powerpc/kernel/head_8xx.o
|
||||
head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o
|
||||
head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o
|
||||
head-$(CONFIG_FSL_BOOKE) := arch/powerpc/kernel/head_fsl_booke.o
|
||||
head-$(CONFIG_PPC_85xx) := arch/powerpc/kernel/head_85xx.o
|
||||
|
||||
head-$(CONFIG_PPC64) += arch/powerpc/kernel/entry_64.o
|
||||
head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o
|
||||
|
@ -1,11 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* PowerPC 44x related functions
|
||||
*
|
||||
* Copyright 2007 David Gibson, IBM Corporation.
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
#ifndef _PPC_BOOT_44X_H_
|
||||
#define _PPC_BOOT_44X_H_
|
||||
|
@ -1,12 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* PowerPC 4xx related functions
|
||||
*
|
||||
* Copyright 2007 IBM Corporation.
|
||||
* Josh Boyer <jwboyer@linux.vnet.ibm.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
#ifndef _POWERPC_BOOT_4XX_H_
|
||||
#define _POWERPC_BOOT_4XX_H_
|
||||
|
@ -34,6 +34,7 @@ endif
|
||||
|
||||
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
||||
-fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx \
|
||||
$(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \
|
||||
-pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
|
||||
$(LINUXINCLUDE)
|
||||
|
||||
|
51
arch/powerpc/boot/dts/fsl/e500v1_power_isa.dtsi
Normal file
51
arch/powerpc/boot/dts/fsl/e500v1_power_isa.dtsi
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* e500v1 Power ISA Device Tree Source (include)
|
||||
*
|
||||
* Copyright 2012 Freescale Semiconductor Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Freescale Semiconductor nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* ALTERNATIVELY, this software may be distributed under the terms of the
|
||||
* GNU General Public License ("GPL") as published by the Free Software
|
||||
* Foundation, either version 2 of that License or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/ {
|
||||
cpus {
|
||||
power-isa-version = "2.03";
|
||||
power-isa-b; // Base
|
||||
power-isa-e; // Embedded
|
||||
power-isa-atb; // Alternate Time Base
|
||||
power-isa-cs; // Cache Specification
|
||||
power-isa-e.le; // Embedded.Little-Endian
|
||||
power-isa-e.pm; // Embedded.Performance Monitor
|
||||
power-isa-ecl; // Embedded Cache Locking
|
||||
power-isa-mmc; // Memory Coherence
|
||||
power-isa-sp; // Signal Processing Engine
|
||||
power-isa-sp.fs; // SPE.Embedded Float Scalar Single
|
||||
power-isa-sp.fv; // SPE.Embedded Float Vector
|
||||
mmu-type = "power-embedded";
|
||||
};
|
||||
};
|
@ -7,7 +7,7 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "e500v2_power_isa.dtsi"
|
||||
/include/ "e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "MPC8540ADS";
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "e500v2_power_isa.dtsi"
|
||||
/include/ "e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "MPC8541CDS";
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "e500v2_power_isa.dtsi"
|
||||
/include/ "e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "MPC8555CDS";
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "e500v2_power_isa.dtsi"
|
||||
/include/ "e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "MPC8560ADS";
|
||||
|
@ -14,6 +14,8 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "fsl/e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "KSI8560";
|
||||
compatible = "emerson,KSI8560";
|
||||
|
@ -225,13 +225,6 @@ spi@11aa0 {
|
||||
interrupts = <2 8>;
|
||||
interrupt-parent = <&PIC>;
|
||||
cs-gpios = < &cpm2_pio_d 19 0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
ds3106@1 {
|
||||
compatible = "gen,spidev";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <8000000>;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "fsl/e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "stx,gp3";
|
||||
compatible = "stx,gp3-8560", "stx,gp3";
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "fsl/e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "stx,gp3";
|
||||
compatible = "stx,gp3-8560", "stx,gp3";
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "fsl/e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "tqc,tqm8540";
|
||||
compatible = "tqc,tqm8540";
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "fsl/e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "tqc,tqm8541";
|
||||
compatible = "tqc,tqm8541";
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "fsl/e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "tqc,tqm8555";
|
||||
compatible = "tqc,tqm8555";
|
||||
|
@ -8,6 +8,8 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "fsl/e500v1_power_isa.dtsi"
|
||||
|
||||
/ {
|
||||
model = "tqc,tqm8560";
|
||||
compatible = "tqc,tqm8560";
|
||||
|
@ -147,7 +147,7 @@ ports {
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "cpu1";
|
||||
label = "cpu";
|
||||
ethernet = <&enet1>;
|
||||
phy-mode = "rgmii-id";
|
||||
|
||||
@ -184,7 +184,7 @@ port@5 {
|
||||
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
label = "cpu0";
|
||||
label = "cpu";
|
||||
ethernet = <&enet0>;
|
||||
phy-mode = "rgmii-id";
|
||||
|
||||
@ -263,21 +263,21 @@ partition@0 {
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
/* 1.7 MB for Rescue Linux Kernel Image */
|
||||
/* 1.7 MB for Linux Kernel Image */
|
||||
reg = <0x00020000 0x001a0000>;
|
||||
label = "rescue-kernel";
|
||||
label = "kernel";
|
||||
};
|
||||
|
||||
partition@1c0000 {
|
||||
/* 1.5 MB for Rescue JFFS2 Root File System */
|
||||
reg = <0x001c0000 0x00180000>;
|
||||
label = "rescue-rootfs";
|
||||
label = "rescue";
|
||||
};
|
||||
|
||||
partition@340000 {
|
||||
/* 11 MB for TAR.XZ Backup with content of NAND Root File System */
|
||||
/* 11 MB for TAR.XZ Archive with Factory content of NAND Root File System */
|
||||
reg = <0x00340000 0x00b00000>;
|
||||
label = "backup-rootfs";
|
||||
label = "factory";
|
||||
};
|
||||
|
||||
partition@e40000 {
|
||||
|
@ -1,4 +0,0 @@
|
||||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
@ -16,7 +16,7 @@ opal_kentry:
|
||||
li r5, 0
|
||||
li r6, 0
|
||||
li r7, 0
|
||||
ld r11,opal@got(r2)
|
||||
LOAD_REG_ADDR(r11, opal)
|
||||
ld r8,0(r11)
|
||||
ld r9,8(r11)
|
||||
bctr
|
||||
@ -35,7 +35,7 @@ opal_call:
|
||||
mr r13,r2
|
||||
|
||||
/* Set opal return address */
|
||||
ld r11,opal_return@got(r2)
|
||||
LOAD_REG_ADDR(r11, opal_return)
|
||||
mtlr r11
|
||||
mfmsr r12
|
||||
|
||||
@ -45,7 +45,7 @@ opal_call:
|
||||
mtspr SPRN_HSRR1,r12
|
||||
|
||||
/* load the opal call entry point and base */
|
||||
ld r11,opal@got(r2)
|
||||
LOAD_REG_ADDR(r11, opal)
|
||||
ld r12,8(r11)
|
||||
ld r2,0(r11)
|
||||
mtspr SPRN_HSRR0,r12
|
||||
|
@ -1,12 +1,10 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Global definition of all the bootwrapper operations.
|
||||
*
|
||||
* Author: Mark A. Greer <mgreer@mvista.com>
|
||||
*
|
||||
* 2006 (c) MontaVista Software, Inc. This file is licensed under
|
||||
* the terms of the GNU General Public License version 2. This program
|
||||
* is licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
* 2006 (c) MontaVista Software, Inc.
|
||||
*/
|
||||
#ifndef _PPC_BOOT_OPS_H_
|
||||
#define _PPC_BOOT_OPS_H_
|
||||
|
@ -84,4 +84,14 @@
|
||||
#define MFTBU(dest) mfspr dest, SPRN_TBRU
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PPC64_BOOT_WRAPPER
|
||||
#define LOAD_REG_ADDR(reg,name) \
|
||||
addis reg,r2,name@toc@ha; \
|
||||
addi reg,reg,name@toc@l
|
||||
#else
|
||||
#define LOAD_REG_ADDR(reg,name) \
|
||||
lis reg,name@ha; \
|
||||
addi reg,reg,name@l
|
||||
#endif
|
||||
|
||||
#endif /* _PPC64_PPC_ASM_H */
|
||||
|
@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Generic serial console support
|
||||
*
|
||||
@ -6,10 +7,7 @@
|
||||
* Code in serial_edit_cmdline() copied from <file:arch/ppc/boot/simple/misc.c>
|
||||
* and was written by Matt Porter <mporter@kernel.crashing.org>.
|
||||
*
|
||||
* 2001,2006 (c) MontaVista Software, Inc. This file is licensed under
|
||||
* the terms of the GNU General Public License version 2. This program
|
||||
* is licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
* 2001,2006 (c) MontaVista Software, Inc.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
|
@ -1,12 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Implement primitive realloc(3) functionality.
|
||||
*
|
||||
* Author: Mark A. Greer <mgreer@mvista.com>
|
||||
*
|
||||
* 2006 (c) MontaVista, Software, Inc. This file is licensed under
|
||||
* the terms of the GNU General Public License version 2. This program
|
||||
* is licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
* 2006 (c) MontaVista, Software, Inc.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
@ -77,6 +77,5 @@ CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V4=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_CRC_T10DIF=y
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
CONFIG_CRYPTO_ECB=m
|
||||
CONFIG_CRYPTO_PCBC=m
|
||||
|
@ -74,7 +74,6 @@ CONFIG_MTD_PHYSMAP_OF=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_NAND_FSL_ELBC=y
|
||||
CONFIG_BLK_DEV_LOOP=m
|
||||
CONFIG_BLK_DEV_CRYPTOLOOP=m
|
||||
CONFIG_BLK_DEV_NBD=m
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=131072
|
||||
|
@ -7,9 +7,7 @@ CONFIG_RAPIDIO=y
|
||||
CONFIG_FSL_RIO=y
|
||||
CONFIG_RAPIDIO_DMA_ENGINE=y
|
||||
CONFIG_RAPIDIO_ENUM_BASIC=y
|
||||
CONFIG_RAPIDIO_TSI57X=y
|
||||
CONFIG_RAPIDIO_CPS_XX=y
|
||||
CONFIG_RAPIDIO_TSI568=y
|
||||
CONFIG_RAPIDIO_CPS_GEN2=y
|
||||
CONFIG_ADVANCED_OPTIONS=y
|
||||
CONFIG_LOWMEM_SIZE_BOOL=y
|
||||
|
@ -195,7 +195,6 @@ CONFIG_NLS_ISO8859_9=m
|
||||
CONFIG_NLS_ISO8859_13=m
|
||||
CONFIG_NLS_ISO8859_14=m
|
||||
CONFIG_NLS_ISO8859_15=m
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_DEBUG_MUTEXES=y
|
||||
|
@ -119,7 +119,6 @@ CONFIG_INPUT_EVDEV=y
|
||||
# CONFIG_SERIO_I8042 is not set
|
||||
# CONFIG_SERIO_SERPORT is not set
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
CONFIG_RAW_DRIVER=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_AGP=m
|
||||
CONFIG_AGP_UNINORTH=m
|
||||
|
@ -75,7 +75,12 @@ CONFIG_SPI_BITBANG=y
|
||||
CONFIG_SPI_SPIDEV=y
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_USB_SUPPORT is not set
|
||||
CONFIG_MMC=y
|
||||
# CONFIG_PWRSEQ_EMMC is not set
|
||||
# CONFIG_PWRSEQ_SIMPLE is not set
|
||||
CONFIG_MMC_LITEX=y
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
CONFIG_COMMON_CLK=y
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
# CONFIG_NVMEM is not set
|
||||
CONFIG_EXT4_FS=y
|
||||
|
@ -114,5 +114,4 @@ CONFIG_NFS_FS=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
|
@ -78,4 +78,4 @@ CONFIG_DEBUG_VM_PGTABLE=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_BDI_SWITCH=y
|
||||
CONFIG_PPC_EARLY_DEBUG=y
|
||||
CONFIG_PPC_PTDUMP=y
|
||||
CONFIG_GENERIC_PTDUMP=y
|
||||
|
@ -92,7 +92,6 @@ CONFIG_LEGACY_PTY_COUNT=4
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_RAW_DRIVER=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_PASEMI=y
|
||||
CONFIG_SENSORS_LM85=y
|
||||
|
@ -284,7 +284,6 @@ CONFIG_BOOTX_TEXT=y
|
||||
CONFIG_CRYPTO_PCBC=m
|
||||
CONFIG_CRYPTO_MD4=m
|
||||
CONFIG_CRYPTO_SHA512=m
|
||||
CONFIG_CRYPTO_TGR192=m
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
CONFIG_CRYPTO_ANUBIS=m
|
||||
CONFIG_CRYPTO_BLOWFISH=m
|
||||
|
@ -50,6 +50,7 @@ CONFIG_CPU_IDLE=y
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_BINFMT_MISC=m
|
||||
CONFIG_PPC_TRANSACTIONAL_MEM=y
|
||||
CONFIG_PPC_UV=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_KEXEC=y
|
||||
CONFIG_KEXEC_FILE=y
|
||||
@ -65,6 +66,8 @@ CONFIG_DEFERRED_STRUCT_PAGE_INIT=y
|
||||
CONFIG_SCHED_SMT=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_HOTPLUG_PCI=y
|
||||
CONFIG_ZONE_DEVICE=y
|
||||
CONFIG_DEVICE_PRIVATE=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
@ -252,7 +255,6 @@ CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_GENERIC=y
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
CONFIG_LIBNVDIMM=y
|
||||
# CONFIG_ND_BLK is not set
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT2_FS_XATTR=y
|
||||
CONFIG_EXT2_FS_POSIX_ACL=y
|
||||
@ -325,13 +327,11 @@ CONFIG_CRYPTO_MD5_PPC=m
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_SHA1_PPC=m
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_TGR192=m
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
CONFIG_CRYPTO_ANUBIS=m
|
||||
CONFIG_CRYPTO_BLOWFISH=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_KHAZAD=m
|
||||
CONFIG_CRYPTO_SALSA20=m
|
||||
CONFIG_CRYPTO_SERPENT=m
|
||||
CONFIG_CRYPTO_TEA=m
|
||||
CONFIG_CRYPTO_TWOFISH=m
|
||||
|
@ -1,7 +1,9 @@
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
# CONFIG_CONTEXT_TRACKING_USER_FORCE is not set
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
CONFIG_TASKSTATS=y
|
||||
CONFIG_TASK_DELAY_ACCT=y
|
||||
CONFIG_IKCONFIG=y
|
||||
@ -213,7 +215,6 @@ CONFIG_HVC_RTAS=y
|
||||
CONFIG_HVCS=m
|
||||
CONFIG_VIRTIO_CONSOLE=m
|
||||
CONFIG_IBM_BSR=m
|
||||
CONFIG_RAW_DRIVER=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_AMD8111=y
|
||||
CONFIG_I2C_PASEMI=y
|
||||
@ -342,13 +343,11 @@ CONFIG_CRYPTO_MD5_PPC=m
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_SHA1_PPC=m
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_TGR192=m
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
CONFIG_CRYPTO_ANUBIS=m
|
||||
CONFIG_CRYPTO_BLOWFISH=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_KHAZAD=m
|
||||
CONFIG_CRYPTO_SALSA20=m
|
||||
CONFIG_CRYPTO_SERPENT=m
|
||||
CONFIG_CRYPTO_TEA=m
|
||||
CONFIG_CRYPTO_TWOFISH=m
|
||||
|
@ -118,7 +118,6 @@ CONFIG_INPUT_MISC=y
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
CONFIG_RAW_DRIVER=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_AMD8111=y
|
||||
CONFIG_FB=y
|
||||
@ -234,13 +233,11 @@ CONFIG_CRYPTO_PCBC=m
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_SHA512=m
|
||||
CONFIG_CRYPTO_TGR192=m
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
CONFIG_CRYPTO_ANUBIS=m
|
||||
CONFIG_CRYPTO_BLOWFISH=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_KHAZAD=m
|
||||
CONFIG_CRYPTO_SALSA20=m
|
||||
CONFIG_CRYPTO_SERPENT=m
|
||||
CONFIG_CRYPTO_TEA=m
|
||||
CONFIG_CRYPTO_TWOFISH=m
|
||||
|
@ -321,7 +321,6 @@ CONFIG_PNP=y
|
||||
CONFIG_ISAPNP=y
|
||||
CONFIG_MAC_FLOPPY=m
|
||||
CONFIG_BLK_DEV_LOOP=m
|
||||
CONFIG_BLK_DEV_CRYPTOLOOP=m
|
||||
CONFIG_BLK_DEV_NBD=m
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=16384
|
||||
@ -590,7 +589,6 @@ CONFIG_GAMEPORT_EMU10K1=m
|
||||
CONFIG_GAMEPORT_FM801=m
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
CONFIG_SERIAL_NONSTANDARD=y
|
||||
CONFIG_ROCKETPORT=m
|
||||
CONFIG_SYNCLINK_GT=m
|
||||
CONFIG_NOZOMI=m
|
||||
CONFIG_N_HDLC=m
|
||||
@ -1107,13 +1105,9 @@ CONFIG_CRYPTO_XTS=m
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_XCBC=m
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_RMD128=m
|
||||
CONFIG_CRYPTO_RMD160=m
|
||||
CONFIG_CRYPTO_RMD256=m
|
||||
CONFIG_CRYPTO_RMD320=m
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_SHA512=m
|
||||
CONFIG_CRYPTO_TGR192=m
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
CONFIG_CRYPTO_ANUBIS=m
|
||||
CONFIG_CRYPTO_BLOWFISH=m
|
||||
@ -1121,7 +1115,6 @@ CONFIG_CRYPTO_CAMELLIA=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_FCRYPT=m
|
||||
CONFIG_CRYPTO_KHAZAD=m
|
||||
CONFIG_CRYPTO_SALSA20=m
|
||||
CONFIG_CRYPTO_SEED=m
|
||||
CONFIG_CRYPTO_SERPENT=m
|
||||
CONFIG_CRYPTO_TEA=m
|
||||
|
@ -165,6 +165,5 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60
|
||||
# CONFIG_FTRACE is not set
|
||||
CONFIG_CRYPTO_PCBC=m
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_SALSA20=m
|
||||
CONFIG_CRYPTO_LZO=m
|
||||
CONFIG_PRINTK_TIME=y
|
||||
|
@ -3,8 +3,10 @@ CONFIG_NR_CPUS=2048
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_AUDIT=y
|
||||
# CONFIG_CONTEXT_TRACKING_USER_FORCE is not set
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
CONFIG_TASKSTATS=y
|
||||
CONFIG_TASK_DELAY_ACCT=y
|
||||
CONFIG_TASK_XACCT=y
|
||||
@ -40,6 +42,7 @@ CONFIG_PPC_SPLPAR=y
|
||||
CONFIG_DTL=y
|
||||
CONFIG_PPC_SMLPAR=y
|
||||
CONFIG_IBMEBUS=y
|
||||
CONFIG_LIBNVDIMM=m
|
||||
CONFIG_PAPR_SCM=m
|
||||
CONFIG_PPC_SVM=y
|
||||
# CONFIG_PPC_PMAC is not set
|
||||
@ -187,7 +190,6 @@ CONFIG_HVC_RTAS=y
|
||||
CONFIG_HVCS=m
|
||||
CONFIG_VIRTIO_CONSOLE=m
|
||||
CONFIG_IBM_BSR=m
|
||||
CONFIG_RAW_DRIVER=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FIRMWARE_EDID=y
|
||||
@ -302,13 +304,11 @@ CONFIG_CRYPTO_MD5_PPC=m
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_SHA1_PPC=m
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_TGR192=m
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
CONFIG_CRYPTO_ANUBIS=m
|
||||
CONFIG_CRYPTO_BLOWFISH=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_KHAZAD=m
|
||||
CONFIG_CRYPTO_SALSA20=m
|
||||
CONFIG_CRYPTO_SERPENT=m
|
||||
CONFIG_CRYPTO_TEA=m
|
||||
CONFIG_CRYPTO_TWOFISH=m
|
||||
|
@ -133,7 +133,6 @@ CONFIG_ACENIC_OMIT_TIGON_I=y
|
||||
# CONFIG_NET_VENDOR_AQUANTIA is not set
|
||||
# CONFIG_NET_VENDOR_ARC is not set
|
||||
# CONFIG_NET_VENDOR_ATHEROS is not set
|
||||
# CONFIG_NET_VENDOR_AURORA is not set
|
||||
CONFIG_TIGON3=m
|
||||
CONFIG_BNX2X=m
|
||||
# CONFIG_NET_VENDOR_BROCADE is not set
|
||||
@ -274,7 +273,6 @@ CONFIG_NLS_UTF8=y
|
||||
CONFIG_ENCRYPTED_KEYS=y
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_HARDENED_USERCOPY=y
|
||||
CONFIG_HARDENED_USERCOPY_PAGESPAN=y
|
||||
CONFIG_FORTIFY_SOURCE=y
|
||||
CONFIG_SECURITY_LOCKDOWN_LSM=y
|
||||
CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
|
||||
|
@ -76,4 +76,3 @@ CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_CRC_T10DIF=y
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
|
@ -36,6 +36,7 @@ int64_t __opal_call(int64_t a0, int64_t a1, int64_t a2, int64_t a3,
|
||||
int64_t opcode, uint64_t msr);
|
||||
|
||||
/* misc runtime */
|
||||
void enable_machine_check(void);
|
||||
extern u64 __bswapdi2(u64);
|
||||
extern s64 __lshrdi3(s64, int);
|
||||
extern s64 __ashldi3(s64, int);
|
||||
@ -55,19 +56,6 @@ struct kvm_vcpu;
|
||||
void _kvmppc_restore_tm_pr(struct kvm_vcpu *vcpu, u64 guest_msr);
|
||||
void _kvmppc_save_tm_pr(struct kvm_vcpu *vcpu, u64 guest_msr);
|
||||
|
||||
/* Patch sites */
|
||||
extern s32 patch__call_flush_branch_caches1;
|
||||
extern s32 patch__call_flush_branch_caches2;
|
||||
extern s32 patch__call_flush_branch_caches3;
|
||||
extern s32 patch__flush_count_cache_return;
|
||||
extern s32 patch__flush_link_stack_return;
|
||||
extern s32 patch__call_kvm_flush_link_stack;
|
||||
extern s32 patch__call_kvm_flush_link_stack_p9;
|
||||
extern s32 patch__memset_nocache, patch__memcpy_nocache;
|
||||
|
||||
extern long flush_branch_caches;
|
||||
extern long kvm_flush_link_stack;
|
||||
|
||||
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||
void kvmppc_save_tm_hv(struct kvm_vcpu *vcpu, u64 msr, bool preserve_nv);
|
||||
void kvmppc_restore_tm_hv(struct kvm_vcpu *vcpu, u64 msr, bool preserve_nv);
|
||||
|
@ -86,7 +86,7 @@ do { \
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
#define NOSPEC_BARRIER_SLOT nop
|
||||
#elif defined(CONFIG_PPC_FSL_BOOK3E)
|
||||
#elif defined(CONFIG_PPC_E500)
|
||||
#define NOSPEC_BARRIER_SLOT nop; nop
|
||||
#endif
|
||||
|
||||
|
@ -112,31 +112,11 @@ static inline bool pte_user(pte_t pte)
|
||||
/* Permission masks used for kernel mappings */
|
||||
#define PAGE_KERNEL __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW)
|
||||
#define PAGE_KERNEL_NC __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | _PAGE_NO_CACHE)
|
||||
#define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \
|
||||
_PAGE_NO_CACHE | _PAGE_GUARDED)
|
||||
#define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | _PAGE_NO_CACHE | _PAGE_GUARDED)
|
||||
#define PAGE_KERNEL_X __pgprot(_PAGE_BASE | _PAGE_KERNEL_RWX)
|
||||
#define PAGE_KERNEL_RO __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO)
|
||||
#define PAGE_KERNEL_ROX __pgprot(_PAGE_BASE | _PAGE_KERNEL_ROX)
|
||||
|
||||
/*
|
||||
* Protection used for kernel text. We want the debuggers to be able to
|
||||
* set breakpoints anywhere, so don't write protect the kernel text
|
||||
* on platforms where such control is possible.
|
||||
*/
|
||||
#if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\
|
||||
defined(CONFIG_KPROBES) || defined(CONFIG_DYNAMIC_FTRACE)
|
||||
#define PAGE_KERNEL_TEXT PAGE_KERNEL_X
|
||||
#else
|
||||
#define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX
|
||||
#endif
|
||||
|
||||
/* Make modules code happy. We don't set RO yet */
|
||||
#define PAGE_KERNEL_EXEC PAGE_KERNEL_X
|
||||
|
||||
/* Advertise special mapping type for AGP */
|
||||
#define PAGE_AGP (PAGE_KERNEL_NC)
|
||||
#define HAVE_PAGE_AGP
|
||||
|
||||
#define PTE_INDEX_SIZE PTE_SHIFT
|
||||
#define PMD_INDEX_SIZE 0
|
||||
#define PUD_INDEX_SIZE 0
|
||||
|
@ -113,9 +113,11 @@ static inline void __pud_free(pud_t *pud)
|
||||
|
||||
/*
|
||||
* Early pud pages allocated via memblock allocator
|
||||
* can't be directly freed to slab
|
||||
* can't be directly freed to slab. KFENCE pages have
|
||||
* both reserved and slab flags set so need to be freed
|
||||
* kmem_cache_free.
|
||||
*/
|
||||
if (PageReserved(page))
|
||||
if (PageReserved(page) && !PageSlab(page))
|
||||
free_reserved_page(page);
|
||||
else
|
||||
kmem_cache_free(PGT_CACHE(PUD_CACHE_INDEX), pud);
|
||||
|
@ -26,16 +26,6 @@ static inline int pud_huge(pud_t pud)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int pgd_huge(pgd_t pgd)
|
||||
{
|
||||
/*
|
||||
* leaf pte for huge page
|
||||
*/
|
||||
if (radix_enabled())
|
||||
return !!(pgd_raw(pgd) & cpu_to_be64(_PAGE_PTE));
|
||||
return 0;
|
||||
}
|
||||
#define pgd_huge pgd_huge
|
||||
/*
|
||||
* With radix , we have hugepage ptes in the pud and pmd entries. We don't
|
||||
* need to setup hugepage directory for them. Our pte and page directory format
|
||||
|
@ -30,15 +30,6 @@ static inline int pud_huge(pud_t pud)
|
||||
return !!(pud_raw(pud) & cpu_to_be64(_PAGE_PTE));
|
||||
}
|
||||
|
||||
static inline int pgd_huge(pgd_t pgd)
|
||||
{
|
||||
/*
|
||||
* leaf pte for huge page
|
||||
*/
|
||||
return !!(pgd_raw(pgd) & cpu_to_be64(_PAGE_PTE));
|
||||
}
|
||||
#define pgd_huge pgd_huge
|
||||
|
||||
/*
|
||||
* With 64k page size, we have hugepage ptes in the pgd and pmd entries. We don't
|
||||
* need to setup hugepage directory for them. Our pte and page directory format
|
||||
|
@ -117,8 +117,7 @@
|
||||
#define _PAGE_KERNEL_RW (_PAGE_PRIVILEGED | _PAGE_RW | _PAGE_DIRTY)
|
||||
#define _PAGE_KERNEL_RO (_PAGE_PRIVILEGED | _PAGE_READ)
|
||||
#define _PAGE_KERNEL_ROX (_PAGE_PRIVILEGED | _PAGE_READ | _PAGE_EXEC)
|
||||
#define _PAGE_KERNEL_RWX (_PAGE_PRIVILEGED | _PAGE_DIRTY | \
|
||||
_PAGE_RW | _PAGE_EXEC)
|
||||
#define _PAGE_KERNEL_RWX (_PAGE_PRIVILEGED | _PAGE_DIRTY | _PAGE_RW | _PAGE_EXEC)
|
||||
/*
|
||||
* _PAGE_CHG_MASK masks of bits that are to be preserved across
|
||||
* pgprot changes
|
||||
@ -151,33 +150,17 @@
|
||||
#define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_READ | _PAGE_EXEC)
|
||||
#define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_READ)
|
||||
#define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_READ | _PAGE_EXEC)
|
||||
/* Radix only, Hash uses PAGE_READONLY_X + execute-only pkey instead */
|
||||
#define PAGE_EXECONLY __pgprot(_PAGE_BASE | _PAGE_EXEC)
|
||||
|
||||
/* Permission masks used for kernel mappings */
|
||||
#define PAGE_KERNEL __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW)
|
||||
#define PAGE_KERNEL_NC __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \
|
||||
_PAGE_TOLERANT)
|
||||
#define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \
|
||||
_PAGE_NON_IDEMPOTENT)
|
||||
#define PAGE_KERNEL_NC __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | _PAGE_TOLERANT)
|
||||
#define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | _PAGE_NON_IDEMPOTENT)
|
||||
#define PAGE_KERNEL_X __pgprot(_PAGE_BASE | _PAGE_KERNEL_RWX)
|
||||
#define PAGE_KERNEL_RO __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO)
|
||||
#define PAGE_KERNEL_ROX __pgprot(_PAGE_BASE | _PAGE_KERNEL_ROX)
|
||||
|
||||
/*
|
||||
* Protection used for kernel text. We want the debuggers to be able to
|
||||
* set breakpoints anywhere, so don't write protect the kernel text
|
||||
* on platforms where such control is possible.
|
||||
*/
|
||||
#if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) || \
|
||||
defined(CONFIG_KPROBES) || defined(CONFIG_DYNAMIC_FTRACE)
|
||||
#define PAGE_KERNEL_TEXT PAGE_KERNEL_X
|
||||
#else
|
||||
#define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX
|
||||
#endif
|
||||
|
||||
/* Make modules code happy. We don't set RO yet */
|
||||
#define PAGE_KERNEL_EXEC PAGE_KERNEL_X
|
||||
#define PAGE_AGP (PAGE_KERNEL_NC)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/*
|
||||
* page table defines
|
||||
@ -333,9 +316,6 @@ extern unsigned long pci_io_base;
|
||||
#define IOREMAP_END (KERN_IO_END - FIXADDR_SIZE)
|
||||
#define FIXADDR_SIZE SZ_32M
|
||||
|
||||
/* Advertise special mapping type for AGP */
|
||||
#define HAVE_PAGE_AGP
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/*
|
||||
@ -411,6 +391,9 @@ static inline int __ptep_test_and_clear_young(struct mm_struct *mm,
|
||||
* event of it not getting flushed for a long time the delay
|
||||
* shouldn't really matter because there's no real memory
|
||||
* pressure for swapout to react to. ]
|
||||
*
|
||||
* Note: this optimisation also exists in pte_needs_flush() and
|
||||
* huge_pmd_needs_flush().
|
||||
*/
|
||||
#define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
|
||||
#define ptep_clear_flush_young ptep_test_and_clear_young
|
||||
@ -1123,7 +1106,7 @@ static inline void vmemmap_remove_mapping(unsigned long start,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_PAGEALLOC
|
||||
#if defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KFENCE)
|
||||
static inline void __kernel_map_pages(struct page *page, int numpages, int enable)
|
||||
{
|
||||
if (radix_enabled())
|
||||
@ -1457,12 +1440,5 @@ static inline bool pud_is_leaf(pud_t pud)
|
||||
return !!(pud_raw(pud) & cpu_to_be64(_PAGE_PTE));
|
||||
}
|
||||
|
||||
#define p4d_is_leaf p4d_is_leaf
|
||||
#define p4d_leaf p4d_is_leaf
|
||||
static inline bool p4d_is_leaf(p4d_t p4d)
|
||||
{
|
||||
return !!(p4d_raw(p4d) & cpu_to_be64(_PAGE_PTE));
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* _ASM_POWERPC_BOOK3S_64_PGTABLE_H_ */
|
||||
|
@ -112,13 +112,11 @@ static inline void hash__flush_tlb_kernel_range(unsigned long start,
|
||||
|
||||
struct mmu_gather;
|
||||
extern void hash__tlb_flush(struct mmu_gather *tlb);
|
||||
void flush_tlb_pmd_range(struct mm_struct *mm, pmd_t *pmd, unsigned long addr);
|
||||
|
||||
#ifdef CONFIG_PPC_64S_HASH_MMU
|
||||
/* Private function for use by PCI IO mapping code */
|
||||
extern void __flush_hash_table_range(unsigned long start, unsigned long end);
|
||||
extern void flush_tlb_pmd_range(struct mm_struct *mm, pmd_t *pmd,
|
||||
unsigned long addr);
|
||||
void flush_hash_table_pmd_range(struct mm_struct *mm, pmd_t *pmd, unsigned long addr);
|
||||
#else
|
||||
static inline void __flush_hash_table_range(unsigned long start, unsigned long end) { }
|
||||
#endif
|
||||
|
@ -163,6 +163,62 @@ static inline void flush_tlb_fix_spurious_fault(struct vm_area_struct *vma,
|
||||
*/
|
||||
}
|
||||
|
||||
static inline bool __pte_flags_need_flush(unsigned long oldval,
|
||||
unsigned long newval)
|
||||
{
|
||||
unsigned long delta = oldval ^ newval;
|
||||
|
||||
/*
|
||||
* The return value of this function doesn't matter for hash,
|
||||
* ptep_modify_prot_start() does a pte_update() which does or schedules
|
||||
* any necessary hash table update and flush.
|
||||
*/
|
||||
if (!radix_enabled())
|
||||
return true;
|
||||
|
||||
/*
|
||||
* We do not expect kernel mappings or non-PTEs or not-present PTEs.
|
||||
*/
|
||||
VM_WARN_ON_ONCE(oldval & _PAGE_PRIVILEGED);
|
||||
VM_WARN_ON_ONCE(newval & _PAGE_PRIVILEGED);
|
||||
VM_WARN_ON_ONCE(!(oldval & _PAGE_PTE));
|
||||
VM_WARN_ON_ONCE(!(newval & _PAGE_PTE));
|
||||
VM_WARN_ON_ONCE(!(oldval & _PAGE_PRESENT));
|
||||
VM_WARN_ON_ONCE(!(newval & _PAGE_PRESENT));
|
||||
|
||||
/*
|
||||
* Must flush on any change except READ, WRITE, EXEC, DIRTY, ACCESSED.
|
||||
*
|
||||
* In theory, some changed software bits could be tolerated, in
|
||||
* practice those should rarely if ever matter.
|
||||
*/
|
||||
|
||||
if (delta & ~(_PAGE_RWX | _PAGE_DIRTY | _PAGE_ACCESSED))
|
||||
return true;
|
||||
|
||||
/*
|
||||
* If any of the above was present in old but cleared in new, flush.
|
||||
* With the exception of _PAGE_ACCESSED, don't worry about flushing
|
||||
* if that was cleared (see the comment in ptep_clear_flush_young()).
|
||||
*/
|
||||
if ((delta & ~_PAGE_ACCESSED) & oldval)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool pte_needs_flush(pte_t oldpte, pte_t newpte)
|
||||
{
|
||||
return __pte_flags_need_flush(pte_val(oldpte), pte_val(newpte));
|
||||
}
|
||||
#define pte_needs_flush pte_needs_flush
|
||||
|
||||
static inline bool huge_pmd_needs_flush(pmd_t oldpmd, pmd_t newpmd)
|
||||
{
|
||||
return __pte_flags_need_flush(pmd_val(oldpmd), pmd_val(newpmd));
|
||||
}
|
||||
#define huge_pmd_needs_flush huge_pmd_needs_flush
|
||||
|
||||
extern bool tlbie_capable;
|
||||
extern bool tlbie_enabled;
|
||||
|
||||
|
@ -25,7 +25,8 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
|
||||
unsigned long size, pgprot_t vma_prot);
|
||||
#define __HAVE_PHYS_MEM_ACCESS_PROT
|
||||
|
||||
#if defined(CONFIG_PPC32) || defined(CONFIG_PPC_64S_HASH_MMU)
|
||||
void __update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep);
|
||||
|
||||
/*
|
||||
* This gets called at the end of handling a page fault, when
|
||||
* the kernel has put a new PTE into the page table for the process.
|
||||
@ -35,10 +36,14 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
|
||||
* corresponding HPTE into the hash table ahead of time, instead of
|
||||
* waiting for the inevitable extra hash-table miss exception.
|
||||
*/
|
||||
void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep);
|
||||
#else
|
||||
static inline void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep) {}
|
||||
#endif
|
||||
static inline void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_PPC32) && !mmu_has_feature(MMU_FTR_HPTE_TABLE))
|
||||
return;
|
||||
if (radix_enabled())
|
||||
return;
|
||||
__update_mmu_cache(vma, address, ptep);
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif
|
||||
|
49
arch/powerpc/include/asm/cpu_setup.h
Normal file
49
arch/powerpc/include/asm/cpu_setup.h
Normal file
@ -0,0 +1,49 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* Copyright (C) 2020 IBM Corporation
|
||||
*/
|
||||
|
||||
#ifndef _ASM_POWERPC_CPU_SETUP_H
|
||||
#define _ASM_POWERPC_CPU_SETUP_H
|
||||
void __setup_cpu_power7(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_power8(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_power9(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_power10(unsigned long offset, struct cpu_spec *spec);
|
||||
void __restore_cpu_power7(void);
|
||||
void __restore_cpu_power8(void);
|
||||
void __restore_cpu_power9(void);
|
||||
void __restore_cpu_power10(void);
|
||||
|
||||
void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_440ep(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_440epx(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_440gx(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_440grx(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_440spe(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_440x5(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_460ex(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_460gt(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_603(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_604(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_750(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_750cx(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_750fx(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_7400(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_7410(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_745x(unsigned long offset, struct cpu_spec *spec);
|
||||
|
||||
void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec *spec);
|
||||
void __restore_cpu_pa6t(void);
|
||||
void __restore_cpu_ppc970(void);
|
||||
|
||||
void __setup_cpu_e5500(unsigned long offset, struct cpu_spec *spec);
|
||||
void __setup_cpu_e6500(unsigned long offset, struct cpu_spec *spec);
|
||||
void __restore_cpu_e5500(void);
|
||||
void __restore_cpu_e6500(void);
|
||||
#endif /* _ASM_POWERPC_CPU_SETUP_H */
|
@ -1,12 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* Copyright (C) 2020 IBM Corporation
|
||||
*/
|
||||
void __setup_cpu_power7(unsigned long offset, struct cpu_spec *spec);
|
||||
void __restore_cpu_power7(void);
|
||||
void __setup_cpu_power8(unsigned long offset, struct cpu_spec *spec);
|
||||
void __restore_cpu_power8(void);
|
||||
void __setup_cpu_power9(unsigned long offset, struct cpu_spec *spec);
|
||||
void __restore_cpu_power9(void);
|
||||
void __setup_cpu_power10(unsigned long offset, struct cpu_spec *spec);
|
||||
void __restore_cpu_power10(void);
|
@ -463,7 +463,7 @@ static inline void cpu_feature_keys_init(void) { }
|
||||
#define CPU_FTRS_COMPATIBLE (CPU_FTR_PPCAS_ARCH_V2)
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
#ifdef CONFIG_PPC_BOOK3E
|
||||
#ifdef CONFIG_PPC_BOOK3E_64
|
||||
#define CPU_FTRS_POSSIBLE (CPU_FTRS_E6500 | CPU_FTRS_E5500)
|
||||
#else
|
||||
#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
@ -510,7 +510,7 @@ enum {
|
||||
#elif defined(CONFIG_44x)
|
||||
CPU_FTRS_44X | CPU_FTRS_440x6 |
|
||||
#endif
|
||||
#ifdef CONFIG_E500
|
||||
#ifdef CONFIG_PPC_E500
|
||||
CPU_FTRS_E500 | CPU_FTRS_E500_2 |
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_E500MC
|
||||
@ -521,7 +521,7 @@ enum {
|
||||
#endif /* __powerpc64__ */
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
#ifdef CONFIG_PPC_BOOK3E
|
||||
#ifdef CONFIG_PPC_BOOK3E_64
|
||||
#define CPU_FTRS_ALWAYS (CPU_FTRS_E6500 & CPU_FTRS_E5500)
|
||||
#else
|
||||
|
||||
@ -584,7 +584,7 @@ enum {
|
||||
#elif defined(CONFIG_44x)
|
||||
CPU_FTRS_44X & CPU_FTRS_440x6 &
|
||||
#endif
|
||||
#ifdef CONFIG_E500
|
||||
#ifdef CONFIG_PPC_E500
|
||||
CPU_FTRS_E500 & CPU_FTRS_E500_2 &
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_E500MC
|
||||
|
@ -95,7 +95,7 @@ static notrace inline void account_stolen_time(void)
|
||||
struct lppaca *lp = local_paca->lppaca_ptr;
|
||||
|
||||
if (unlikely(local_paca->dtl_ridx != be64_to_cpu(lp->dtl_idx)))
|
||||
accumulate_stolen_time();
|
||||
pseries_accumulate_stolen_time();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -37,14 +37,6 @@ struct dtl_entry {
|
||||
extern struct kmem_cache *dtl_cache;
|
||||
extern rwlock_t dtl_access_lock;
|
||||
|
||||
/*
|
||||
* When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE = y, the cpu accounting code controls
|
||||
* reading from the dispatch trace log. If other code wants to consume
|
||||
* DTL entries, it can set this pointer to a function that will get
|
||||
* called once for each DTL entry that gets processed.
|
||||
*/
|
||||
extern void (*dtl_consumer)(struct dtl_entry *entry, u64 index);
|
||||
|
||||
extern void register_dtl_buffer(int cpu);
|
||||
extern void alloc_dtl_buffers(unsigned long *time_limit);
|
||||
extern long hcall_vphn(unsigned long cpu, u64 flags, __be32 *associativity);
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
#include <asm/book3s/64/hugetlb.h>
|
||||
#elif defined(CONFIG_PPC_FSL_BOOK3E)
|
||||
#include <asm/nohash/hugetlb-book3e.h>
|
||||
#elif defined(CONFIG_PPC_E500)
|
||||
#include <asm/nohash/hugetlb-e500.h>
|
||||
#elif defined(CONFIG_PPC_8xx)
|
||||
#include <asm/nohash/32/hugetlb-8xx.h>
|
||||
#endif /* CONFIG_PPC_BOOK3S_64 */
|
||||
|
@ -157,36 +157,18 @@ static inline notrace void irq_soft_mask_set(unsigned long mask)
|
||||
|
||||
static inline notrace unsigned long irq_soft_mask_set_return(unsigned long mask)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long flags = irq_soft_mask_return();
|
||||
|
||||
#ifdef CONFIG_PPC_IRQ_SOFT_MASK_DEBUG
|
||||
WARN_ON(mask && !(mask & IRQS_DISABLED));
|
||||
#endif
|
||||
|
||||
asm volatile(
|
||||
"lbz %0,%1(13); stb %2,%1(13)"
|
||||
: "=&r" (flags)
|
||||
: "i" (offsetof(struct paca_struct, irq_soft_mask)),
|
||||
"r" (mask)
|
||||
: "memory");
|
||||
irq_soft_mask_set(mask);
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static inline notrace unsigned long irq_soft_mask_or_return(unsigned long mask)
|
||||
{
|
||||
unsigned long flags, tmp;
|
||||
unsigned long flags = irq_soft_mask_return();
|
||||
|
||||
asm volatile(
|
||||
"lbz %0,%2(13); or %1,%0,%3; stb %1,%2(13)"
|
||||
: "=&r" (flags), "=r" (tmp)
|
||||
: "i" (offsetof(struct paca_struct, irq_soft_mask)),
|
||||
"r" (mask)
|
||||
: "memory");
|
||||
|
||||
#ifdef CONFIG_PPC_IRQ_SOFT_MASK_DEBUG
|
||||
WARN_ON((mask | flags) && !((mask | flags) & IRQS_DISABLED));
|
||||
#endif
|
||||
irq_soft_mask_set(flags | mask);
|
||||
|
||||
return flags;
|
||||
}
|
||||
@ -489,6 +471,30 @@ static inline void irq_soft_mask_regs_set_state(struct pt_regs *regs, unsigned l
|
||||
}
|
||||
#endif /* CONFIG_PPC64 */
|
||||
|
||||
static inline unsigned long mtmsr_isync_irqsafe(unsigned long msr)
|
||||
{
|
||||
#ifdef CONFIG_PPC64
|
||||
if (arch_irqs_disabled()) {
|
||||
/*
|
||||
* With soft-masking, MSR[EE] can change from 1 to 0
|
||||
* asynchronously when irqs are disabled, and we don't want to
|
||||
* set MSR[EE] back to 1 here if that has happened. A race-free
|
||||
* way to do this is ensure EE is already 0. Another way it
|
||||
* could be done is with a RESTART_TABLE handler, but that's
|
||||
* probably overkill here.
|
||||
*/
|
||||
msr &= ~MSR_EE;
|
||||
mtmsr_isync(msr);
|
||||
irq_soft_mask_set(IRQS_ALL_DISABLED);
|
||||
local_paca->irq_happened |= PACA_IRQ_HARD_DIS;
|
||||
} else
|
||||
#endif
|
||||
mtmsr_isync(msr);
|
||||
|
||||
return msr;
|
||||
}
|
||||
|
||||
|
||||
#define ARCH_IRQ_INIT_FLAGS IRQ_NOREQUEST
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
@ -74,6 +74,19 @@
|
||||
#include <asm/kprobes.h>
|
||||
#include <asm/runlatch.h>
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
/*
|
||||
* WARN/BUG is handled with a program interrupt so minimise checks here to
|
||||
* avoid recursion and maximise the chance of getting the first oops handled.
|
||||
*/
|
||||
#define INT_SOFT_MASK_BUG_ON(regs, cond) \
|
||||
do { \
|
||||
if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG) && \
|
||||
(user_mode(regs) || (TRAP(regs) != INTERRUPT_PROGRAM))) \
|
||||
BUG_ON(cond); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
extern char __end_soft_masked[];
|
||||
bool search_kernel_soft_mask_table(unsigned long addr);
|
||||
@ -170,8 +183,7 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs)
|
||||
* context.
|
||||
*/
|
||||
if (!(local_paca->irq_happened & PACA_IRQ_HARD_DIS)) {
|
||||
if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
|
||||
BUG_ON(!(regs->msr & MSR_EE));
|
||||
INT_SOFT_MASK_BUG_ON(regs, !(regs->msr & MSR_EE));
|
||||
__hard_irq_enable();
|
||||
} else {
|
||||
__hard_RI_enable();
|
||||
@ -194,19 +206,15 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs)
|
||||
* CT_WARN_ON comes here via program_check_exception,
|
||||
* so avoid recursion.
|
||||
*/
|
||||
if (TRAP(regs) != INTERRUPT_PROGRAM) {
|
||||
CT_WARN_ON(ct_state() != CONTEXT_KERNEL);
|
||||
if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
|
||||
BUG_ON(is_implicit_soft_masked(regs));
|
||||
}
|
||||
|
||||
/* Move this under a debugging check */
|
||||
if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG) &&
|
||||
arch_irq_disabled_regs(regs))
|
||||
BUG_ON(search_kernel_restart_table(regs->nip));
|
||||
if (TRAP(regs) != INTERRUPT_PROGRAM)
|
||||
CT_WARN_ON(ct_state() != CONTEXT_KERNEL &&
|
||||
ct_state() != CONTEXT_IDLE);
|
||||
INT_SOFT_MASK_BUG_ON(regs, is_implicit_soft_masked(regs));
|
||||
INT_SOFT_MASK_BUG_ON(regs, arch_irq_disabled_regs(regs) &&
|
||||
search_kernel_restart_table(regs->nip));
|
||||
}
|
||||
if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
|
||||
BUG_ON(!arch_irq_disabled_regs(regs) && !(regs->msr & MSR_EE));
|
||||
INT_SOFT_MASK_BUG_ON(regs, !arch_irq_disabled_regs(regs) &&
|
||||
!(regs->msr & MSR_EE));
|
||||
#endif
|
||||
|
||||
booke_restore_dbcr0();
|
||||
@ -281,7 +289,7 @@ static inline bool nmi_disables_ftrace(struct pt_regs *regs)
|
||||
if (TRAP(regs) == INTERRUPT_PERFMON)
|
||||
return false;
|
||||
}
|
||||
if (IS_ENABLED(CONFIG_PPC_BOOK3E)) {
|
||||
if (IS_ENABLED(CONFIG_PPC_BOOK3E_64)) {
|
||||
if (TRAP(regs) == INTERRUPT_PERFMON)
|
||||
return false;
|
||||
}
|
||||
@ -665,8 +673,7 @@ static inline void interrupt_cond_local_irq_enable(struct pt_regs *regs)
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
long system_call_exception(long r3, long r4, long r5, long r6, long r7, long r8,
|
||||
unsigned long r0, struct pt_regs *regs);
|
||||
long system_call_exception(struct pt_regs *regs, unsigned long r0);
|
||||
notrace unsigned long syscall_exit_prepare(unsigned long r3, struct pt_regs *regs, long scv);
|
||||
notrace unsigned long interrupt_exit_user_prepare(struct pt_regs *regs);
|
||||
notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs);
|
||||
|
@ -3,7 +3,7 @@
|
||||
#define _ASM_POWERPC_KEXEC_H
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#if defined(CONFIG_FSL_BOOKE) || defined(CONFIG_44x)
|
||||
#if defined(CONFIG_PPC_85xx) || defined(CONFIG_44x)
|
||||
|
||||
/*
|
||||
* On FSL-BookE we setup a 1:1 mapping which covers the first 2GiB of memory
|
||||
|
@ -11,11 +11,25 @@
|
||||
#include <linux/mm.h>
|
||||
#include <asm/pgtable.h>
|
||||
|
||||
#ifdef CONFIG_PPC64_ELF_ABI_V1
|
||||
#define ARCH_FUNC_PREFIX "."
|
||||
#endif
|
||||
|
||||
static inline bool arch_kfence_init_pool(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
static inline bool kfence_protect_page(unsigned long addr, bool protect)
|
||||
{
|
||||
struct page *page = virt_to_page(addr);
|
||||
|
||||
__kernel_map_pages(page, 1, !protect);
|
||||
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
static inline bool kfence_protect_page(unsigned long addr, bool protect)
|
||||
{
|
||||
pte_t *kpte = virt_to_kpte(addr);
|
||||
@ -29,5 +43,6 @@ static inline bool kfence_protect_page(unsigned long addr, bool protect)
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_POWERPC_KFENCE_H */
|
||||
|
@ -52,7 +52,7 @@ static inline void arch_kgdb_breakpoint(void)
|
||||
/* On non-E500 family PPC32 we determine the size by picking the last
|
||||
* register we need, but on E500 we skip sections so we list what we
|
||||
* need to store, and add it up. */
|
||||
#ifndef CONFIG_E500
|
||||
#ifndef CONFIG_PPC_E500
|
||||
#define MAXREG (PT_FPSCR+1)
|
||||
#else
|
||||
/* 32 GPRs (8 bytes), nip, msr, ccr, link, ctr, xer, acc (8 bytes), spefscr*/
|
||||
|
@ -443,7 +443,7 @@ struct kvmppc_passthru_irqmap {
|
||||
};
|
||||
#endif
|
||||
|
||||
# ifdef CONFIG_PPC_FSL_BOOK3E
|
||||
# ifdef CONFIG_PPC_E500
|
||||
#define KVMPPC_BOOKE_IAC_NUM 2
|
||||
#define KVMPPC_BOOKE_DAC_NUM 2
|
||||
# else
|
||||
|
@ -104,7 +104,6 @@ extern void kvmppc_subarch_vcpu_uninit(struct kvm_vcpu *vcpu);
|
||||
|
||||
extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gpa_t gpaddr,
|
||||
unsigned int gtlb_idx);
|
||||
extern void kvmppc_mmu_priv_switch(struct kvm_vcpu *vcpu, int usermode);
|
||||
extern void kvmppc_mmu_switch_pid(struct kvm_vcpu *vcpu, u32 pid);
|
||||
extern int kvmppc_mmu_dtlb_index(struct kvm_vcpu *vcpu, gva_t eaddr);
|
||||
extern int kvmppc_mmu_itlb_index(struct kvm_vcpu *vcpu, gva_t eaddr);
|
||||
@ -153,7 +152,6 @@ extern int kvmppc_core_check_requests(struct kvm_vcpu *vcpu);
|
||||
extern int kvmppc_booke_init(void);
|
||||
extern void kvmppc_booke_exit(void);
|
||||
|
||||
extern void kvmppc_core_destroy_mmu(struct kvm_vcpu *vcpu);
|
||||
extern int kvmppc_kvm_pv(struct kvm_vcpu *vcpu);
|
||||
extern void kvmppc_map_magic(struct kvm_vcpu *vcpu);
|
||||
|
||||
@ -162,8 +160,6 @@ extern void kvmppc_set_hpt(struct kvm *kvm, struct kvm_hpt_info *info);
|
||||
extern long kvmppc_alloc_reset_hpt(struct kvm *kvm, int order);
|
||||
extern void kvmppc_free_hpt(struct kvm_hpt_info *info);
|
||||
extern void kvmppc_rmap_reset(struct kvm *kvm);
|
||||
extern long kvmppc_prepare_vrma(struct kvm *kvm,
|
||||
struct kvm_userspace_memory_region *mem);
|
||||
extern void kvmppc_map_vrma(struct kvm_vcpu *vcpu,
|
||||
struct kvm_memory_slot *memslot, unsigned long porder);
|
||||
extern int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu);
|
||||
|
@ -104,14 +104,18 @@ struct lppaca {
|
||||
volatile __be32 dispersion_count; /* dispatch changed physical cpu */
|
||||
volatile __be64 cmo_faults; /* CMO page fault count */
|
||||
volatile __be64 cmo_fault_time; /* CMO page fault time */
|
||||
u8 reserved10[104];
|
||||
u8 reserved10[64]; /* [S]PURR expropriated/donated */
|
||||
volatile __be64 enqueue_dispatch_tb; /* Total TB enqueue->dispatch */
|
||||
volatile __be64 ready_enqueue_tb; /* Total TB ready->enqueue */
|
||||
volatile __be64 wait_ready_tb; /* Total TB wait->ready */
|
||||
u8 reserved11[16];
|
||||
|
||||
/* cacheline 4-5 */
|
||||
|
||||
__be32 page_ins; /* CMO Hint - # page ins by OS */
|
||||
u8 reserved11[148];
|
||||
u8 reserved12[148];
|
||||
volatile __be64 dtl_idx; /* Dispatch Trace Log head index */
|
||||
u8 reserved12[96];
|
||||
u8 reserved13[96];
|
||||
} ____cacheline_aligned;
|
||||
|
||||
#define lppaca_of(cpu) (*paca_ptrs[cpu]->lppaca_ptr)
|
||||
|
@ -204,7 +204,6 @@ struct machdep_calls {
|
||||
extern void e500_idle(void);
|
||||
extern void power4_idle(void);
|
||||
extern void ppc6xx_idle(void);
|
||||
extern void book3e_idle(void);
|
||||
|
||||
/*
|
||||
* ppc_md contains a copy of the machine description structure for the
|
||||
|
@ -120,6 +120,9 @@
|
||||
*/
|
||||
#define MMU_FTR_1T_SEGMENT ASM_CONST(0x40000000)
|
||||
|
||||
// NX paste RMA reject in DSI
|
||||
#define MMU_FTR_NX_DSI ASM_CONST(0x80000000)
|
||||
|
||||
/* MMU feature bit sets for various CPUs */
|
||||
#define MMU_FTRS_DEFAULT_HPTE_ARCH_V2 (MMU_FTR_HPTE_TABLE | MMU_FTR_TLBIEL | MMU_FTR_16M_PAGE)
|
||||
#define MMU_FTRS_POWER MMU_FTRS_DEFAULT_HPTE_ARCH_V2
|
||||
@ -141,7 +144,7 @@
|
||||
|
||||
typedef pte_t *pgtable_t;
|
||||
|
||||
#ifdef CONFIG_PPC_FSL_BOOK3E
|
||||
#ifdef CONFIG_PPC_E500
|
||||
#include <asm/percpu.h>
|
||||
DECLARE_PER_CPU(int, next_tlbcam_idx);
|
||||
#endif
|
||||
@ -162,7 +165,7 @@ enum {
|
||||
#elif defined(CONFIG_44x)
|
||||
MMU_FTR_TYPE_44x |
|
||||
#endif
|
||||
#ifdef CONFIG_E500
|
||||
#ifdef CONFIG_PPC_E500
|
||||
MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS | MMU_FTR_USE_TLBILX |
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_BOOK3S_32
|
||||
@ -181,7 +184,7 @@ enum {
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_RADIX_MMU
|
||||
MMU_FTR_TYPE_RADIX |
|
||||
MMU_FTR_GTSE |
|
||||
MMU_FTR_GTSE | MMU_FTR_NX_DSI |
|
||||
#endif /* CONFIG_PPC_RADIX_MMU */
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_KUAP
|
||||
@ -211,7 +214,7 @@ enum {
|
||||
#elif defined(CONFIG_44x)
|
||||
#define MMU_FTRS_ALWAYS MMU_FTR_TYPE_44x
|
||||
#endif
|
||||
#ifdef CONFIG_E500
|
||||
#ifdef CONFIG_PPC_E500
|
||||
#define MMU_FTRS_ALWAYS MMU_FTR_TYPE_FSL_E
|
||||
#endif
|
||||
|
||||
|
@ -31,7 +31,6 @@ extern long mm_iommu_newdev(struct mm_struct *mm, unsigned long ua,
|
||||
extern long mm_iommu_put(struct mm_struct *mm,
|
||||
struct mm_iommu_table_group_mem_t *mem);
|
||||
extern void mm_iommu_init(struct mm_struct *mm);
|
||||
extern void mm_iommu_cleanup(struct mm_struct *mm);
|
||||
extern struct mm_iommu_table_group_mem_t *mm_iommu_lookup(struct mm_struct *mm,
|
||||
unsigned long ua, unsigned long size);
|
||||
extern struct mm_iommu_table_group_mem_t *mm_iommu_get(struct mm_struct *mm,
|
||||
@ -117,7 +116,6 @@ static inline bool need_extra_context(struct mm_struct *mm, unsigned long ea)
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void switch_cop(struct mm_struct *next);
|
||||
extern int use_cop(unsigned long acop, struct mm_struct *mm);
|
||||
extern void drop_cop(unsigned long acop, struct mm_struct *mm);
|
||||
|
||||
|
@ -130,10 +130,10 @@ void unmap_kernel_page(unsigned long va);
|
||||
#include <asm/nohash/32/pte-40x.h>
|
||||
#elif defined(CONFIG_44x)
|
||||
#include <asm/nohash/32/pte-44x.h>
|
||||
#elif defined(CONFIG_FSL_BOOKE) && defined(CONFIG_PTE_64BIT)
|
||||
#include <asm/nohash/pte-book3e.h>
|
||||
#elif defined(CONFIG_FSL_BOOKE)
|
||||
#include <asm/nohash/32/pte-fsl-booke.h>
|
||||
#elif defined(CONFIG_PPC_85xx) && defined(CONFIG_PTE_64BIT)
|
||||
#include <asm/nohash/pte-e500.h>
|
||||
#elif defined(CONFIG_PPC_85xx)
|
||||
#include <asm/nohash/32/pte-85xx.h>
|
||||
#elif defined(CONFIG_PPC_8xx)
|
||||
#include <asm/nohash/32/pte-8xx.h>
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_POWERPC_NOHASH_32_PTE_FSL_BOOKE_H
|
||||
#define _ASM_POWERPC_NOHASH_32_PTE_FSL_BOOKE_H
|
||||
#ifndef _ASM_POWERPC_NOHASH_32_PTE_85xx_H
|
||||
#define _ASM_POWERPC_NOHASH_32_PTE_85xx_H
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* PTE bit definitions for Freescale BookE SW loaded TLB MMU based
|
||||
@ -71,4 +71,4 @@
|
||||
#define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _ASM_POWERPC_NOHASH_32_PTE_FSL_BOOKE_H */
|
||||
#endif /* _ASM_POWERPC_NOHASH_32_PTE_FSL_85xx_H */
|
@ -70,7 +70,7 @@
|
||||
/*
|
||||
* Include the PTE bits definitions
|
||||
*/
|
||||
#include <asm/nohash/pte-book3e.h>
|
||||
#include <asm/nohash/pte-e500.h>
|
||||
|
||||
#define PTE_RPN_MASK (~((1UL << PTE_RPN_SHIFT) - 1))
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_POWERPC_NOHASH_HUGETLB_BOOK3E_H
|
||||
#define _ASM_POWERPC_NOHASH_HUGETLB_BOOK3E_H
|
||||
#ifndef _ASM_POWERPC_NOHASH_HUGETLB_E500_H
|
||||
#define _ASM_POWERPC_NOHASH_HUGETLB_E500_H
|
||||
|
||||
static inline pte_t *hugepd_page(hugepd_t hpd)
|
||||
{
|
||||
@ -30,7 +30,7 @@ void flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
|
||||
|
||||
static inline void hugepd_populate(hugepd_t *hpdp, pte_t *new, unsigned int pshift)
|
||||
{
|
||||
/* We use the old format for PPC_FSL_BOOK3E */
|
||||
/* We use the old format for PPC_E500 */
|
||||
*hpdp = __hugepd(((unsigned long)new & ~PD_HUGE) | pshift);
|
||||
}
|
||||
|
||||
@ -42,4 +42,4 @@ static inline int check_and_get_huge_psize(int shift)
|
||||
return shift_to_mmu_psize(shift);
|
||||
}
|
||||
|
||||
#endif /* _ASM_POWERPC_NOHASH_HUGETLB_BOOK3E_H */
|
||||
#endif /* _ASM_POWERPC_NOHASH_HUGETLB_E500_H */
|
@ -8,9 +8,9 @@
|
||||
#elif defined(CONFIG_44x)
|
||||
/* 44x-style software loaded TLB */
|
||||
#include <asm/nohash/32/mmu-44x.h>
|
||||
#elif defined(CONFIG_PPC_BOOK3E_MMU)
|
||||
#elif defined(CONFIG_PPC_E500)
|
||||
/* Freescale Book-E software loaded TLB or Book-3e (ISA 2.06+) MMU */
|
||||
#include <asm/nohash/mmu-book3e.h>
|
||||
#include <asm/nohash/mmu-e500.h>
|
||||
#elif defined (CONFIG_PPC_8xx)
|
||||
/* Motorola/Freescale 8xx software loaded TLB */
|
||||
#include <asm/nohash/32/mmu-8xx.h>
|
||||
|
@ -15,7 +15,7 @@ static inline void tlb_flush_pgtable(struct mmu_gather *tlb,
|
||||
{
|
||||
|
||||
}
|
||||
#endif /* !CONFIG_PPC_BOOK3E */
|
||||
#endif /* !CONFIG_PPC_BOOK3E_64 */
|
||||
|
||||
static inline pgd_t *pgd_alloc(struct mm_struct *mm)
|
||||
{
|
||||
|
@ -11,31 +11,11 @@
|
||||
/* Permission masks used for kernel mappings */
|
||||
#define PAGE_KERNEL __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW)
|
||||
#define PAGE_KERNEL_NC __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | _PAGE_NO_CACHE)
|
||||
#define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \
|
||||
_PAGE_NO_CACHE | _PAGE_GUARDED)
|
||||
#define PAGE_KERNEL_NCG __pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | _PAGE_NO_CACHE | _PAGE_GUARDED)
|
||||
#define PAGE_KERNEL_X __pgprot(_PAGE_BASE | _PAGE_KERNEL_RWX)
|
||||
#define PAGE_KERNEL_RO __pgprot(_PAGE_BASE | _PAGE_KERNEL_RO)
|
||||
#define PAGE_KERNEL_ROX __pgprot(_PAGE_BASE | _PAGE_KERNEL_ROX)
|
||||
|
||||
/*
|
||||
* Protection used for kernel text. We want the debuggers to be able to
|
||||
* set breakpoints anywhere, so don't write protect the kernel text
|
||||
* on platforms where such control is possible.
|
||||
*/
|
||||
#if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\
|
||||
defined(CONFIG_KPROBES) || defined(CONFIG_DYNAMIC_FTRACE)
|
||||
#define PAGE_KERNEL_TEXT PAGE_KERNEL_X
|
||||
#else
|
||||
#define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX
|
||||
#endif
|
||||
|
||||
/* Make modules code happy. We don't set RO yet */
|
||||
#define PAGE_KERNEL_EXEC PAGE_KERNEL_X
|
||||
|
||||
/* Advertise special mapping type for AGP */
|
||||
#define PAGE_AGP (PAGE_KERNEL_NC)
|
||||
#define HAVE_PAGE_AGP
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* Generic accessors to PTE bits */
|
||||
@ -277,12 +257,6 @@ static inline int pud_huge(pud_t pud)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int pgd_huge(pgd_t pgd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#define pgd_huge pgd_huge
|
||||
|
||||
#define is_hugepd(hpd) (hugepd_ok(hpd))
|
||||
#endif
|
||||
|
||||
@ -292,7 +266,7 @@ static inline int pgd_huge(pgd_t pgd)
|
||||
* We use it to ensure coherency between the i-cache and d-cache
|
||||
* for the page which has just been mapped in.
|
||||
*/
|
||||
#if defined(CONFIG_PPC_FSL_BOOK3E) && defined(CONFIG_HUGETLB_PAGE)
|
||||
#if defined(CONFIG_PPC_E500) && defined(CONFIG_HUGETLB_PAGE)
|
||||
void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep);
|
||||
#else
|
||||
static inline
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_POWERPC_NOHASH_PTE_BOOK3E_H
|
||||
#define _ASM_POWERPC_NOHASH_PTE_BOOK3E_H
|
||||
#ifndef _ASM_POWERPC_NOHASH_PTE_E500_H
|
||||
#define _ASM_POWERPC_NOHASH_PTE_E500_H
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* PTE bit definitions for processors compliant to the Book3E
|
||||
@ -126,4 +126,4 @@ static inline pte_t pte_mkexec(pte_t pte)
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _ASM_POWERPC_NOHASH_PTE_BOOK3E_H */
|
||||
#endif /* _ASM_POWERPC_NOHASH_PTE_E500_H */
|
@ -18,7 +18,7 @@
|
||||
/*
|
||||
* TLB flushing for software loaded TLB chips
|
||||
*
|
||||
* TODO: (CONFIG_FSL_BOOKE) determine if flush_tlb_range &
|
||||
* TODO: (CONFIG_PPC_85xx) determine if flush_tlb_range &
|
||||
* flush_tlb_kernel_range are best implemented as tlbia vs
|
||||
* specific tlbie's
|
||||
*/
|
||||
|
@ -324,16 +324,10 @@ extern int opal_flush_console(uint32_t vtermno);
|
||||
|
||||
extern void hvc_opal_init_early(void);
|
||||
|
||||
extern int opal_notifier_register(struct notifier_block *nb);
|
||||
extern int opal_notifier_unregister(struct notifier_block *nb);
|
||||
|
||||
extern int opal_message_notifier_register(enum opal_msg_type msg_type,
|
||||
struct notifier_block *nb);
|
||||
extern int opal_message_notifier_unregister(enum opal_msg_type msg_type,
|
||||
struct notifier_block *nb);
|
||||
extern void opal_notifier_enable(void);
|
||||
extern void opal_notifier_disable(void);
|
||||
extern void opal_notifier_update_evt(uint64_t evt_mask, uint64_t evt_val);
|
||||
|
||||
extern int opal_async_get_token_interruptible(void);
|
||||
extern int opal_async_release_token(int token);
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <asm/lppaca.h>
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/page.h>
|
||||
#ifdef CONFIG_PPC_BOOK3E
|
||||
#ifdef CONFIG_PPC_BOOK3E_64
|
||||
#include <asm/exception-64e.h>
|
||||
#else
|
||||
#include <asm/exception-64s.h>
|
||||
@ -127,7 +127,7 @@ struct paca_struct {
|
||||
#endif
|
||||
#endif /* CONFIG_PPC_BOOK3S_64 */
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3E
|
||||
#ifdef CONFIG_PPC_BOOK3E_64
|
||||
u64 exgen[8] __aligned(0x40);
|
||||
/* Keep pgd in the same cacheline as the start of extlb */
|
||||
pgd_t *pgd __aligned(0x40); /* Current PGD */
|
||||
@ -151,7 +151,7 @@ struct paca_struct {
|
||||
void *dbg_kstack;
|
||||
|
||||
struct tlb_core_data tcd;
|
||||
#endif /* CONFIG_PPC_BOOK3E */
|
||||
#endif /* CONFIG_PPC_BOOK3E_64 */
|
||||
|
||||
#ifdef CONFIG_PPC_64S_HASH_MMU
|
||||
unsigned char mm_ctx_low_slices_psize[BITS_PER_LONG / BITS_PER_BYTE];
|
||||
@ -168,7 +168,7 @@ struct paca_struct {
|
||||
#ifdef CONFIG_PPC64
|
||||
u64 exit_save_r1; /* Syscall/interrupt R1 save */
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_BOOK3E
|
||||
#ifdef CONFIG_PPC_BOOK3E_64
|
||||
u16 trap_save; /* Used when bad stack is encountered */
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
@ -263,7 +263,6 @@ struct paca_struct {
|
||||
u64 l1d_flush_size;
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_PSERIES
|
||||
struct rtas_args *rtas_args_reentrant;
|
||||
u8 *mce_data_buf; /* buffer to hold per cpu rtas errlog */
|
||||
#endif /* CONFIG_PPC_PSERIES */
|
||||
|
||||
|
@ -31,7 +31,7 @@ extern unsigned int hpage_shift;
|
||||
#define HPAGE_SHIFT hpage_shift
|
||||
#elif defined(CONFIG_PPC_8xx)
|
||||
#define HPAGE_SHIFT 19 /* 512k pages */
|
||||
#elif defined(CONFIG_PPC_FSL_BOOK3E)
|
||||
#elif defined(CONFIG_PPC_E500)
|
||||
#define HPAGE_SHIFT 22 /* 4M pages */
|
||||
#endif
|
||||
#define HPAGE_SIZE ((1UL) << HPAGE_SHIFT)
|
||||
@ -308,12 +308,6 @@ static inline bool pfn_valid(unsigned long pfn)
|
||||
#include <asm/pgtable-types.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef CONFIG_HUGETLB_PAGE
|
||||
#define is_hugepd(pdep) (0)
|
||||
#define pgd_huge(pgd) (0)
|
||||
#endif /* CONFIG_HUGETLB_PAGE */
|
||||
|
||||
struct page;
|
||||
extern void clear_user_page(void *page, unsigned long vaddr, struct page *pg);
|
||||
extern void copy_user_page(void *to, void *from, unsigned long vaddr,
|
||||
|
@ -21,6 +21,18 @@ static inline bool is_shared_processor(void)
|
||||
return static_branch_unlikely(&shared_processor);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING
|
||||
extern struct static_key paravirt_steal_enabled;
|
||||
extern struct static_key paravirt_steal_rq_enabled;
|
||||
|
||||
u64 pseries_paravirt_steal_clock(int cpu);
|
||||
|
||||
static inline u64 paravirt_steal_clock(int cpu)
|
||||
{
|
||||
return pseries_paravirt_steal_clock(cpu);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If bit 0 is set, the cpu has been ceded, conferred, or preempted */
|
||||
static inline u32 yield_count_of(int cpu)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user