mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 03:04:01 +08:00
Merge branch 'linus' into sched/urgent, to pick up dependencies
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
42e405f7b1
@ -56,10 +56,6 @@
|
||||
<entry><constant>MEDIA_ENT_F_CONN_COMPOSITE</constant></entry>
|
||||
<entry>Connector for a RGB composite signal.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>MEDIA_ENT_F_CONN_TEST</constant></entry>
|
||||
<entry>Connector for a test generator.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>MEDIA_ENT_F_CAM_SENSOR</constant></entry>
|
||||
<entry>Camera video sensor entity.</entry>
|
||||
|
@ -23,6 +23,7 @@ Optional properties:
|
||||
during suspend.
|
||||
- ti,no-reset-on-init: When present, the module should not be reset at init
|
||||
- ti,no-idle-on-init: When present, the module should not be idled at init
|
||||
- ti,no-idle: When present, the module is never allowed to idle.
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -0,0 +1,26 @@
|
||||
Alpine MSIX controller
|
||||
|
||||
See arm,gic-v3.txt for SPI and MSI definitions.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: should be "al,alpine-msix"
|
||||
- reg: physical base address and size of the registers
|
||||
- interrupt-parent: specifies the parent interrupt controller.
|
||||
- interrupt-controller: identifies the node as an interrupt controller
|
||||
- msi-controller: identifies the node as an PCI Message Signaled Interrupt
|
||||
controller
|
||||
- al,msi-base-spi: SPI base of the MSI frame
|
||||
- al,msi-num-spis: number of SPIs assigned to the MSI frame, relative to SPI0
|
||||
|
||||
Example:
|
||||
|
||||
msix: msix {
|
||||
compatible = "al,alpine-msix";
|
||||
reg = <0x0 0xfbe00000 0x0 0x100000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupt-controller;
|
||||
msi-controller;
|
||||
al,msi-base-spi = <160>;
|
||||
al,msi-num-spis = <160>;
|
||||
};
|
@ -16,6 +16,7 @@ Main node required properties:
|
||||
"arm,cortex-a15-gic"
|
||||
"arm,cortex-a7-gic"
|
||||
"arm,cortex-a9-gic"
|
||||
"arm,eb11mp-gic"
|
||||
"arm,gic-400"
|
||||
"arm,pl390"
|
||||
"arm,tc11mp-gic"
|
||||
|
@ -0,0 +1,44 @@
|
||||
|
||||
* Marvell ODMI for MSI support
|
||||
|
||||
Some Marvell SoCs have an On-Die Message Interrupt (ODMI) controller
|
||||
which can be used by on-board peripheral for MSI interrupts.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : The value here should contain:
|
||||
|
||||
"marvell,ap806-odmi-controller", "marvell,odmi-controller".
|
||||
|
||||
- interrupt,controller : Identifies the node as an interrupt controller.
|
||||
|
||||
- msi-controller : Identifies the node as an MSI controller.
|
||||
|
||||
- marvell,odmi-frames : Number of ODMI frames available. Each frame
|
||||
provides a number of events.
|
||||
|
||||
- reg : List of register definitions, one for each
|
||||
ODMI frame.
|
||||
|
||||
- marvell,spi-base : List of GIC base SPI interrupts, one for each
|
||||
ODMI frame. Those SPI interrupts are 0-based,
|
||||
i.e marvell,spi-base = <128> will use SPI #96.
|
||||
See Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt
|
||||
for details about the GIC Device Tree binding.
|
||||
|
||||
- interrupt-parent : Reference to the parent interrupt controller.
|
||||
|
||||
Example:
|
||||
|
||||
odmi: odmi@300000 {
|
||||
compatible = "marvell,ap806-odm-controller",
|
||||
"marvell,odmi-controller";
|
||||
interrupt-controller;
|
||||
msi-controller;
|
||||
marvell,odmi-frames = <4>;
|
||||
reg = <0x300000 0x4000>,
|
||||
<0x304000 0x4000>,
|
||||
<0x308000 0x4000>,
|
||||
<0x30C000 0x4000>;
|
||||
marvell,spi-base = <128>, <136>, <144>, <152>;
|
||||
};
|
@ -23,6 +23,12 @@ Optional properties:
|
||||
- mti,reserved-cpu-vectors : Specifies the list of CPU interrupt vectors
|
||||
to which the GIC may not route interrupts. Valid values are 2 - 7.
|
||||
This property is ignored if the CPU is started in EIC mode.
|
||||
- mti,reserved-ipi-vectors : Specifies the range of GIC interrupts that are
|
||||
reserved for IPIs.
|
||||
It accepts 2 values, the 1st is the starting interrupt and the 2nd is the size
|
||||
of the reserved range.
|
||||
If not specified, the driver will allocate the last 2 * number of VPEs in the
|
||||
system.
|
||||
|
||||
Required properties for timer sub-node:
|
||||
- compatible : Should be "mti,gic-timer".
|
||||
@ -44,6 +50,7 @@ Example:
|
||||
#interrupt-cells = <3>;
|
||||
|
||||
mti,reserved-cpu-vectors = <7>;
|
||||
mti,reserved-ipi-vectors = <40 8>;
|
||||
|
||||
timer {
|
||||
compatible = "mti,gic-timer";
|
||||
|
@ -0,0 +1,49 @@
|
||||
Sigma Designs SMP86xx/SMP87xx secondary interrupt controller
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "sigma,smp8642-intc"
|
||||
- reg: physical address of MMIO region
|
||||
- ranges: address space mapping of child nodes
|
||||
- interrupt-parent: phandle of parent interrupt controller
|
||||
- interrupt-controller: boolean
|
||||
- #address-cells: should be <1>
|
||||
- #size-cells: should be <1>
|
||||
|
||||
One child node per control block with properties:
|
||||
- reg: address of registers for this control block
|
||||
- interrupt-controller: boolean
|
||||
- #interrupt-cells: should be <2>, interrupt index and flags per interrupts.txt
|
||||
- interrupts: interrupt spec of primary interrupt controller
|
||||
|
||||
Example:
|
||||
|
||||
interrupt-controller@6e000 {
|
||||
compatible = "sigma,smp8642-intc";
|
||||
reg = <0x6e000 0x400>;
|
||||
ranges = <0x0 0x6e000 0x400>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupt-controller;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
irq0: interrupt-controller@0 {
|
||||
reg = <0x000 0x100>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
irq1: interrupt-controller@100 {
|
||||
reg = <0x100 0x100>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
irq2: interrupt-controller@300 {
|
||||
reg = <0x300 0x100>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
@ -666,7 +666,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
||||
|
||||
clearcpuid=BITNUM [X86]
|
||||
Disable CPUID feature X for the kernel. See
|
||||
arch/x86/include/asm/cpufeature.h for the valid bit
|
||||
arch/x86/include/asm/cpufeatures.h for the valid bit
|
||||
numbers. Note the Linux specific bits are not necessarily
|
||||
stable over kernel options, but the vendor specific
|
||||
ones should be.
|
||||
@ -1687,6 +1687,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
||||
ip= [IP_PNP]
|
||||
See Documentation/filesystems/nfs/nfsroot.txt.
|
||||
|
||||
irqaffinity= [SMP] Set the default irq affinity mask
|
||||
Format:
|
||||
<cpu number>,...,<cpu number>
|
||||
or
|
||||
<cpu number>-<cpu number>
|
||||
(must be a positive range in ascending order)
|
||||
or a mixture
|
||||
<cpu number>,...,<cpu number>-<cpu number>
|
||||
|
||||
irqfixup [HW]
|
||||
When an interrupt is not handled search all handlers
|
||||
for it. Intended to get systems with badly broken
|
||||
@ -2566,6 +2575,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
||||
|
||||
nointroute [IA-64]
|
||||
|
||||
noinvpcid [X86] Disable the INVPCID cpu feature.
|
||||
|
||||
nojitter [IA-64] Disables jitter checking for ITC timers.
|
||||
|
||||
no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver
|
||||
@ -3491,6 +3502,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
||||
|
||||
ro [KNL] Mount root device read-only on boot
|
||||
|
||||
rodata= [KNL]
|
||||
on Mark read-only kernel memory as read-only (default).
|
||||
off Leave read-only kernel memory writable for debugging.
|
||||
|
||||
root= [KNL] Root filesystem
|
||||
See name_to_dev_t comment in init/do_mounts.c.
|
||||
|
||||
@ -3528,6 +3543,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
||||
|
||||
sched_debug [KNL] Enables verbose scheduler debug messages.
|
||||
|
||||
schedstats= [KNL,X86] Enable or disable scheduled statistics.
|
||||
Allowed values are enable and disable. This feature
|
||||
incurs a small amount of overhead in the scheduler
|
||||
but is useful for debugging and performance tuning.
|
||||
|
||||
skew_tick= [KNL] Offset the periodic timer tick per cpu to mitigate
|
||||
xtime_lock contention on larger systems, and/or RCU lock
|
||||
contention on all systems with CONFIG_MAXSMP set.
|
||||
|
@ -277,13 +277,15 @@ int main(int argc, char *argv[])
|
||||
" %d external time stamp channels\n"
|
||||
" %d programmable periodic signals\n"
|
||||
" %d pulse per second\n"
|
||||
" %d programmable pins\n",
|
||||
" %d programmable pins\n"
|
||||
" %d cross timestamping\n",
|
||||
caps.max_adj,
|
||||
caps.n_alarm,
|
||||
caps.n_ext_ts,
|
||||
caps.n_per_out,
|
||||
caps.pps,
|
||||
caps.n_pins);
|
||||
caps.n_pins,
|
||||
caps.cross_timestamping);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,8 @@ show up in /proc/sys/kernel:
|
||||
- panic_on_stackoverflow
|
||||
- panic_on_unrecovered_nmi
|
||||
- panic_on_warn
|
||||
- perf_cpu_time_max_percent
|
||||
- perf_event_paranoid
|
||||
- pid_max
|
||||
- powersave-nap [ PPC only ]
|
||||
- printk
|
||||
@ -639,6 +641,17 @@ allowed to execute.
|
||||
|
||||
==============================================================
|
||||
|
||||
perf_event_paranoid:
|
||||
|
||||
Controls use of the performance events system by unprivileged
|
||||
users (without CAP_SYS_ADMIN). The default value is 1.
|
||||
|
||||
-1: Allow use of (almost) all events by all users
|
||||
>=0: Disallow raw tracepoint access by users without CAP_IOC_LOCK
|
||||
>=1: Disallow CPU event access by users without CAP_SYS_ADMIN
|
||||
>=2: Disallow kernel profiling by users without CAP_SYS_ADMIN
|
||||
|
||||
==============================================================
|
||||
|
||||
pid_max:
|
||||
|
||||
@ -760,6 +773,14 @@ rtsig-nr shows the number of RT signals currently queued.
|
||||
|
||||
==============================================================
|
||||
|
||||
sched_schedstats:
|
||||
|
||||
Enables/disables scheduler statistics. Enabling this feature
|
||||
incurs a small amount of overhead in the scheduler but is
|
||||
useful for debugging and performance tuning.
|
||||
|
||||
==============================================================
|
||||
|
||||
sg-big-buff:
|
||||
|
||||
This file shows the size of the generic SCSI (sg) buffer.
|
||||
|
@ -358,7 +358,8 @@ In the first case there are two additional complications:
|
||||
- if CR4.SMEP is enabled: since we've turned the page into a kernel page,
|
||||
the kernel may now execute it. We handle this by also setting spte.nx.
|
||||
If we get a user fetch or read fault, we'll change spte.u=1 and
|
||||
spte.nx=gpte.nx back.
|
||||
spte.nx=gpte.nx back. For this to work, KVM forces EFER.NX to 1 when
|
||||
shadow paging is in use.
|
||||
- if CR4.SMAP is disabled: since the page has been changed to a kernel
|
||||
page, it can not be reused when CR4.SMAP is enabled. We set
|
||||
CR4.SMAP && !CR0.WP into shadow page's role to avoid this case. Note,
|
||||
|
@ -400,3 +400,7 @@ wm8350_wdt:
|
||||
nowayout: Watchdog cannot be stopped once started
|
||||
(default=kernel config parameter)
|
||||
-------------------------------------------------
|
||||
sun4v_wdt:
|
||||
timeout_ms: Watchdog timeout in milliseconds 1..180000, default=60000)
|
||||
nowayout: Watchdog cannot be stopped once started
|
||||
-------------------------------------------------
|
||||
|
@ -40,3 +40,28 @@ cp ../microcode.bin kernel/x86/microcode/GenuineIntel.bin (or AuthenticAMD.bin)
|
||||
find . | cpio -o -H newc >../ucode.cpio
|
||||
cd ..
|
||||
cat ucode.cpio /boot/initrd-3.5.0.img >/boot/initrd-3.5.0.ucode.img
|
||||
|
||||
Builtin microcode
|
||||
=================
|
||||
|
||||
We can also load builtin microcode supplied through the regular firmware
|
||||
builtin method CONFIG_FIRMWARE_IN_KERNEL. Here's an example:
|
||||
|
||||
CONFIG_FIRMWARE_IN_KERNEL=y
|
||||
CONFIG_EXTRA_FIRMWARE="intel-ucode/06-3a-09 amd-ucode/microcode_amd_fam15h.bin"
|
||||
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
|
||||
|
||||
This basically means, you have the following tree structure locally:
|
||||
|
||||
/lib/firmware/
|
||||
|-- amd-ucode
|
||||
...
|
||||
| |-- microcode_amd_fam15h.bin
|
||||
...
|
||||
|-- intel-ucode
|
||||
...
|
||||
| |-- 06-3a-09
|
||||
...
|
||||
|
||||
so that the build system can find those files and integrate them into
|
||||
the final kernel image. The early loader finds them and applies them.
|
||||
|
@ -290,3 +290,38 @@ Due to the way that the exception table is built and needs to be ordered,
|
||||
only use exceptions for code in the .text section. Any other section
|
||||
will cause the exception table to not be sorted correctly, and the
|
||||
exceptions will fail.
|
||||
|
||||
Things changed when 64-bit support was added to x86 Linux. Rather than
|
||||
double the size of the exception table by expanding the two entries
|
||||
from 32-bits to 64 bits, a clever trick was used to store addresses
|
||||
as relative offsets from the table itself. The assembly code changed
|
||||
from:
|
||||
.long 1b,3b
|
||||
to:
|
||||
.long (from) - .
|
||||
.long (to) - .
|
||||
|
||||
and the C-code that uses these values converts back to absolute addresses
|
||||
like this:
|
||||
|
||||
ex_insn_addr(const struct exception_table_entry *x)
|
||||
{
|
||||
return (unsigned long)&x->insn + x->insn;
|
||||
}
|
||||
|
||||
In v4.6 the exception table entry was expanded with a new field "handler".
|
||||
This is also 32-bits wide and contains a third relative function
|
||||
pointer which points to one of:
|
||||
|
||||
1) int ex_handler_default(const struct exception_table_entry *fixup)
|
||||
This is legacy case that just jumps to the fixup code
|
||||
2) int ex_handler_fault(const struct exception_table_entry *fixup)
|
||||
This case provides the fault number of the trap that occurred at
|
||||
entry->insn. It is used to distinguish page faults from machine
|
||||
check.
|
||||
3) int ex_handler_ext(const struct exception_table_entry *fixup)
|
||||
This case is used for uaccess_err ... we need to set a flag
|
||||
in the task structure. Before the handler functions existed this
|
||||
case was handled by adding a large offset to the fixup to tag
|
||||
it as special.
|
||||
More functions can easily be added.
|
||||
|
@ -60,6 +60,8 @@ Machine check
|
||||
threshold to 1. Enabling this may make memory predictive failure
|
||||
analysis less effective if the bios sets thresholds for memory
|
||||
errors since we will not see details for all errors.
|
||||
mce=recovery
|
||||
Force-enable recoverable machine check code paths
|
||||
|
||||
nomce (for compatibility with i386): same as mce=off
|
||||
|
||||
|
31
MAINTAINERS
31
MAINTAINERS
@ -2422,6 +2422,7 @@ F: arch/mips/bmips/*
|
||||
F: arch/mips/include/asm/mach-bmips/*
|
||||
F: arch/mips/kernel/*bmips*
|
||||
F: arch/mips/boot/dts/brcm/bcm*.dts*
|
||||
F: drivers/irqchip/irq-bcm63*
|
||||
F: drivers/irqchip/irq-bcm7*
|
||||
F: drivers/irqchip/irq-brcmstb*
|
||||
F: include/linux/bcm963xx_nvram.h
|
||||
@ -4518,6 +4519,12 @@ L: linuxppc-dev@lists.ozlabs.org
|
||||
S: Maintained
|
||||
F: drivers/dma/fsldma.*
|
||||
|
||||
FREESCALE GPMI NAND DRIVER
|
||||
M: Han Xu <han.xu@nxp.com>
|
||||
L: linux-mtd@lists.infradead.org
|
||||
S: Maintained
|
||||
F: drivers/mtd/nand/gpmi-nand/*
|
||||
|
||||
FREESCALE I2C CPM DRIVER
|
||||
M: Jochen Friedrich <jochen@scram.de>
|
||||
L: linuxppc-dev@lists.ozlabs.org
|
||||
@ -4534,7 +4541,7 @@ F: include/linux/platform_data/video-imxfb.h
|
||||
F: drivers/video/fbdev/imxfb.c
|
||||
|
||||
FREESCALE QUAD SPI DRIVER
|
||||
M: Han Xu <han.xu@freescale.com>
|
||||
M: Han Xu <han.xu@nxp.com>
|
||||
L: linux-mtd@lists.infradead.org
|
||||
S: Maintained
|
||||
F: drivers/mtd/spi-nor/fsl-quadspi.c
|
||||
@ -4548,6 +4555,15 @@ S: Maintained
|
||||
F: drivers/net/ethernet/freescale/fs_enet/
|
||||
F: include/linux/fs_enet_pd.h
|
||||
|
||||
FREESCALE IMX / MXC FEC DRIVER
|
||||
M: Fugang Duan <fugang.duan@nxp.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/freescale/fec_main.c
|
||||
F: drivers/net/ethernet/freescale/fec_ptp.c
|
||||
F: drivers/net/ethernet/freescale/fec.h
|
||||
F: Documentation/devicetree/bindings/net/fsl-fec.txt
|
||||
|
||||
FREESCALE QUICC ENGINE LIBRARY
|
||||
L: linuxppc-dev@lists.ozlabs.org
|
||||
S: Orphan
|
||||
@ -6764,6 +6780,7 @@ S: Maintained
|
||||
F: Documentation/networking/mac80211-injection.txt
|
||||
F: include/net/mac80211.h
|
||||
F: net/mac80211/
|
||||
F: drivers/net/wireless/mac80211_hwsim.[ch]
|
||||
|
||||
MACVLAN DRIVER
|
||||
M: Patrick McHardy <kaber@trash.net>
|
||||
@ -7383,6 +7400,17 @@ W: https://www.myricom.com/support/downloads/myri10ge.html
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/myricom/myri10ge/
|
||||
|
||||
NAND FLASH SUBSYSTEM
|
||||
M: Boris Brezillon <boris.brezillon@free-electrons.com>
|
||||
R: Richard Weinberger <richard@nod.at>
|
||||
L: linux-mtd@lists.infradead.org
|
||||
W: http://www.linux-mtd.infradead.org/
|
||||
Q: http://patchwork.ozlabs.org/project/linux-mtd/list/
|
||||
T: git git://github.com/linux-nand/linux.git
|
||||
S: Maintained
|
||||
F: drivers/mtd/nand/
|
||||
F: include/linux/mtd/nand*.h
|
||||
|
||||
NATSEMI ETHERNET DRIVER (DP8381x)
|
||||
S: Orphan
|
||||
F: drivers/net/ethernet/natsemi/natsemi.c
|
||||
@ -8448,6 +8476,7 @@ PERFORMANCE EVENTS SUBSYSTEM
|
||||
M: Peter Zijlstra <peterz@infradead.org>
|
||||
M: Ingo Molnar <mingo@redhat.com>
|
||||
M: Arnaldo Carvalho de Melo <acme@kernel.org>
|
||||
R: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
|
||||
S: Supported
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 5
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc6
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -168,7 +168,7 @@ smp_callin(void)
|
||||
cpuid, current, current->active_mm));
|
||||
|
||||
preempt_disable();
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
}
|
||||
|
||||
/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */
|
||||
|
@ -142,7 +142,7 @@ void start_kernel_secondary(void)
|
||||
|
||||
local_irq_enable();
|
||||
preempt_disable();
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -195,5 +195,7 @@ CFLAGS_font.o := -Dstatic=
|
||||
$(obj)/font.c: $(FONTC)
|
||||
$(call cmd,shipped)
|
||||
|
||||
AFLAGS_hyp-stub.o := -Wa,-march=armv7-a
|
||||
|
||||
$(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S
|
||||
$(call cmd,shipped)
|
||||
|
@ -70,8 +70,8 @@
|
||||
soc {
|
||||
ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
|
||||
MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>;
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
|
||||
|
||||
pcie-controller {
|
||||
status = "okay";
|
||||
|
@ -76,8 +76,8 @@
|
||||
ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
|
||||
MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
|
||||
MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x1000000
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>;
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
|
||||
|
||||
devbus-bootcs {
|
||||
status = "okay";
|
||||
|
@ -95,8 +95,8 @@
|
||||
ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
|
||||
MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
|
||||
MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x1000000
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>;
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
|
||||
|
||||
devbus-bootcs {
|
||||
status = "okay";
|
||||
|
@ -65,8 +65,8 @@
|
||||
soc {
|
||||
ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000
|
||||
MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>;
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
|
||||
|
||||
pcie-controller {
|
||||
status = "okay";
|
||||
|
@ -70,8 +70,8 @@
|
||||
soc {
|
||||
ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
|
||||
MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>;
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
|
||||
|
||||
pcie-controller {
|
||||
status = "okay";
|
||||
|
@ -68,8 +68,8 @@
|
||||
soc {
|
||||
ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
|
||||
MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>;
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
|
||||
|
||||
internal-regs {
|
||||
serial@12000 {
|
||||
|
@ -64,8 +64,8 @@
|
||||
soc {
|
||||
ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000
|
||||
MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>;
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
|
||||
|
||||
pcie-controller {
|
||||
status = "okay";
|
||||
|
@ -65,9 +65,9 @@
|
||||
soc {
|
||||
ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000
|
||||
MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
|
||||
MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x8000000
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>;
|
||||
MBUS_ID(0x01, 0x2f) 0 0 0xe8000000 0x8000000
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
|
||||
|
||||
devbus-bootcs {
|
||||
status = "okay";
|
||||
|
@ -78,8 +78,8 @@
|
||||
soc {
|
||||
ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
|
||||
MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>;
|
||||
MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
|
||||
MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
|
||||
|
||||
pcie-controller {
|
||||
status = "okay";
|
||||
|
@ -1500,6 +1500,16 @@
|
||||
0x48485200 0x2E00>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
/*
|
||||
* Do not allow gating of cpsw clock as workaround
|
||||
* for errata i877. Keeping internal clock disabled
|
||||
* causes the device switching characteristics
|
||||
* to degrade over time and eventually fail to meet
|
||||
* the data manual delay time/skew specs.
|
||||
*/
|
||||
ti,no-idle;
|
||||
|
||||
/*
|
||||
* rx_thresh_pend
|
||||
* rx_pend
|
||||
|
@ -283,7 +283,6 @@
|
||||
pinctrl-names = "default";
|
||||
|
||||
status = "okay";
|
||||
renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
|
@ -491,7 +491,6 @@ static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_RODATA
|
||||
void mark_rodata_ro(void);
|
||||
void set_kernel_text_rw(void);
|
||||
void set_kernel_text_ro(void);
|
||||
#else
|
||||
|
@ -88,6 +88,7 @@ obj-$(CONFIG_DEBUG_LL) += debug.o
|
||||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
||||
|
||||
obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o
|
||||
AFLAGS_hyp-stub.o :=-Wa,-march=armv7-a
|
||||
ifeq ($(CONFIG_ARM_PSCI),y)
|
||||
obj-$(CONFIG_SMP) += psci_smp.o
|
||||
endif
|
||||
|
@ -176,13 +176,13 @@ static struct resource mem_res[] = {
|
||||
.name = "Kernel code",
|
||||
.start = 0,
|
||||
.end = 0,
|
||||
.flags = IORESOURCE_MEM
|
||||
.flags = IORESOURCE_SYSTEM_RAM
|
||||
},
|
||||
{
|
||||
.name = "Kernel data",
|
||||
.start = 0,
|
||||
.end = 0,
|
||||
.flags = IORESOURCE_MEM
|
||||
.flags = IORESOURCE_SYSTEM_RAM
|
||||
}
|
||||
};
|
||||
|
||||
@ -851,7 +851,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc)
|
||||
res->name = "System RAM";
|
||||
res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region));
|
||||
res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1;
|
||||
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
|
||||
res->flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY;
|
||||
|
||||
request_resource(&iomem_resource, res);
|
||||
|
||||
|
@ -409,7 +409,7 @@ asmlinkage void secondary_start_kernel(void)
|
||||
/*
|
||||
* OK, it's off to the idle thread for us
|
||||
*/
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
}
|
||||
|
||||
void __init smp_cpus_done(unsigned int max_cpus)
|
||||
|
@ -506,18 +506,18 @@ static void kvm_arm_resume_guest(struct kvm *kvm)
|
||||
struct kvm_vcpu *vcpu;
|
||||
|
||||
kvm_for_each_vcpu(i, vcpu, kvm) {
|
||||
wait_queue_head_t *wq = kvm_arch_vcpu_wq(vcpu);
|
||||
struct swait_queue_head *wq = kvm_arch_vcpu_wq(vcpu);
|
||||
|
||||
vcpu->arch.pause = false;
|
||||
wake_up_interruptible(wq);
|
||||
swake_up(wq);
|
||||
}
|
||||
}
|
||||
|
||||
static void vcpu_sleep(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
wait_queue_head_t *wq = kvm_arch_vcpu_wq(vcpu);
|
||||
struct swait_queue_head *wq = kvm_arch_vcpu_wq(vcpu);
|
||||
|
||||
wait_event_interruptible(*wq, ((!vcpu->arch.power_off) &&
|
||||
swait_event_interruptible(*wq, ((!vcpu->arch.power_off) &&
|
||||
(!vcpu->arch.pause)));
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ static int get_timer_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
|
||||
u64 val;
|
||||
|
||||
val = kvm_arm_timer_get_reg(vcpu, reg->id);
|
||||
return copy_to_user(uaddr, &val, KVM_REG_SIZE(reg->id));
|
||||
return copy_to_user(uaddr, &val, KVM_REG_SIZE(reg->id)) ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static unsigned long num_core_regs(void)
|
||||
|
@ -70,7 +70,7 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu)
|
||||
{
|
||||
struct kvm *kvm = source_vcpu->kvm;
|
||||
struct kvm_vcpu *vcpu = NULL;
|
||||
wait_queue_head_t *wq;
|
||||
struct swait_queue_head *wq;
|
||||
unsigned long cpu_id;
|
||||
unsigned long context_id;
|
||||
phys_addr_t target_pc;
|
||||
@ -119,7 +119,7 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu)
|
||||
smp_mb(); /* Make sure the above is visible */
|
||||
|
||||
wq = kvm_arch_vcpu_wq(vcpu);
|
||||
wake_up_interruptible(wq);
|
||||
swake_up(wq);
|
||||
|
||||
return PSCI_RET_SUCCESS;
|
||||
}
|
||||
|
@ -86,8 +86,8 @@ static int lpc32xx_clcd_setup(struct clcd_fb *fb)
|
||||
{
|
||||
dma_addr_t dma;
|
||||
|
||||
fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev,
|
||||
PANEL_SIZE, &dma, GFP_KERNEL);
|
||||
fb->fb.screen_base = dma_alloc_wc(&fb->dev->dev, PANEL_SIZE, &dma,
|
||||
GFP_KERNEL);
|
||||
if (!fb->fb.screen_base) {
|
||||
printk(KERN_ERR "CLCD: unable to map framebuffer\n");
|
||||
return -ENOMEM;
|
||||
@ -116,15 +116,14 @@ static int lpc32xx_clcd_setup(struct clcd_fb *fb)
|
||||
|
||||
static int lpc32xx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
|
||||
{
|
||||
return dma_mmap_writecombine(&fb->dev->dev, vma,
|
||||
fb->fb.screen_base, fb->fb.fix.smem_start,
|
||||
fb->fb.fix.smem_len);
|
||||
return dma_mmap_wc(&fb->dev->dev, vma, fb->fb.screen_base,
|
||||
fb->fb.fix.smem_start, fb->fb.fix.smem_len);
|
||||
}
|
||||
|
||||
static void lpc32xx_clcd_remove(struct clcd_fb *fb)
|
||||
{
|
||||
dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
|
||||
fb->fb.screen_base, fb->fb.fix.smem_start);
|
||||
dma_free_wc(&fb->dev->dev, fb->fb.fix.smem_len, fb->fb.screen_base,
|
||||
fb->fb.fix.smem_start);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3,7 +3,6 @@ menuconfig ARCH_MVEBU
|
||||
depends on ARCH_MULTI_V7 || ARCH_MULTI_V5
|
||||
select ARCH_SUPPORTS_BIG_ENDIAN
|
||||
select CLKSRC_MMIO
|
||||
select GENERIC_IRQ_CHIP
|
||||
select PINCTRL
|
||||
select PLAT_ORION
|
||||
select SOC_BUS
|
||||
@ -29,6 +28,7 @@ config MACH_ARMADA_370
|
||||
bool "Marvell Armada 370 boards"
|
||||
depends on ARCH_MULTI_V7
|
||||
select ARMADA_370_CLK
|
||||
select ARMADA_370_XP_IRQ
|
||||
select CPU_PJ4B
|
||||
select MACH_MVEBU_V7
|
||||
select PINCTRL_ARMADA_370
|
||||
@ -39,6 +39,7 @@ config MACH_ARMADA_370
|
||||
config MACH_ARMADA_375
|
||||
bool "Marvell Armada 375 boards"
|
||||
depends on ARCH_MULTI_V7
|
||||
select ARMADA_370_XP_IRQ
|
||||
select ARM_ERRATA_720789
|
||||
select ARM_ERRATA_753970
|
||||
select ARM_GIC
|
||||
@ -58,6 +59,7 @@ config MACH_ARMADA_38X
|
||||
select ARM_ERRATA_720789
|
||||
select ARM_ERRATA_753970
|
||||
select ARM_GIC
|
||||
select ARMADA_370_XP_IRQ
|
||||
select ARMADA_38X_CLK
|
||||
select HAVE_ARM_SCU
|
||||
select HAVE_ARM_TWD if SMP
|
||||
@ -72,6 +74,7 @@ config MACH_ARMADA_39X
|
||||
bool "Marvell Armada 39x boards"
|
||||
depends on ARCH_MULTI_V7
|
||||
select ARM_GIC
|
||||
select ARMADA_370_XP_IRQ
|
||||
select ARMADA_39X_CLK
|
||||
select CACHE_L2X0
|
||||
select HAVE_ARM_SCU
|
||||
@ -86,6 +89,7 @@ config MACH_ARMADA_39X
|
||||
config MACH_ARMADA_XP
|
||||
bool "Marvell Armada XP boards"
|
||||
depends on ARCH_MULTI_V7
|
||||
select ARMADA_370_XP_IRQ
|
||||
select ARMADA_XP_CLK
|
||||
select CPU_PJ4B
|
||||
select MACH_MVEBU_V7
|
||||
|
@ -42,8 +42,8 @@ int netx_clcd_setup(struct clcd_fb *fb)
|
||||
|
||||
fb->panel = netx_panel;
|
||||
|
||||
fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, 1024*1024,
|
||||
&dma, GFP_KERNEL);
|
||||
fb->fb.screen_base = dma_alloc_wc(&fb->dev->dev, 1024 * 1024, &dma,
|
||||
GFP_KERNEL);
|
||||
if (!fb->fb.screen_base) {
|
||||
printk(KERN_ERR "CLCD: unable to map framebuffer\n");
|
||||
return -ENOMEM;
|
||||
@ -57,16 +57,14 @@ int netx_clcd_setup(struct clcd_fb *fb)
|
||||
|
||||
int netx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
|
||||
{
|
||||
return dma_mmap_writecombine(&fb->dev->dev, vma,
|
||||
fb->fb.screen_base,
|
||||
fb->fb.fix.smem_start,
|
||||
fb->fb.fix.smem_len);
|
||||
return dma_mmap_wc(&fb->dev->dev, vma, fb->fb.screen_base,
|
||||
fb->fb.fix.smem_start, fb->fb.fix.smem_len);
|
||||
}
|
||||
|
||||
void netx_clcd_remove(struct clcd_fb *fb)
|
||||
{
|
||||
dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
|
||||
fb->fb.screen_base, fb->fb.fix.smem_start);
|
||||
dma_free_wc(&fb->dev->dev, fb->fb.fix.smem_len, fb->fb.screen_base,
|
||||
fb->fb.fix.smem_start);
|
||||
}
|
||||
|
||||
static AMBA_AHB_DEVICE(fb, "fb", 0, 0x00104000, { NETX_IRQ_LCD }, NULL);
|
||||
|
@ -90,8 +90,8 @@ int nspire_clcd_setup(struct clcd_fb *fb)
|
||||
panel_size = ((panel->mode.xres * panel->mode.yres) * panel->bpp) / 8;
|
||||
panel_size = ALIGN(panel_size, PAGE_SIZE);
|
||||
|
||||
fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev,
|
||||
panel_size, &dma, GFP_KERNEL);
|
||||
fb->fb.screen_base = dma_alloc_wc(&fb->dev->dev, panel_size, &dma,
|
||||
GFP_KERNEL);
|
||||
|
||||
if (!fb->fb.screen_base) {
|
||||
pr_err("CLCD: unable to map framebuffer\n");
|
||||
@ -107,13 +107,12 @@ int nspire_clcd_setup(struct clcd_fb *fb)
|
||||
|
||||
int nspire_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
|
||||
{
|
||||
return dma_mmap_writecombine(&fb->dev->dev, vma,
|
||||
fb->fb.screen_base, fb->fb.fix.smem_start,
|
||||
fb->fb.fix.smem_len);
|
||||
return dma_mmap_wc(&fb->dev->dev, vma, fb->fb.screen_base,
|
||||
fb->fb.fix.smem_start, fb->fb.fix.smem_len);
|
||||
}
|
||||
|
||||
void nspire_clcd_remove(struct clcd_fb *fb)
|
||||
{
|
||||
dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
|
||||
fb->fb.screen_base, fb->fb.fix.smem_start);
|
||||
dma_free_wc(&fb->dev->dev, fb->fb.fix.smem_len, fb->fb.screen_base,
|
||||
fb->fb.fix.smem_start);
|
||||
}
|
||||
|
@ -2200,6 +2200,11 @@ static int _enable(struct omap_hwmod *oh)
|
||||
*/
|
||||
static int _idle(struct omap_hwmod *oh)
|
||||
{
|
||||
if (oh->flags & HWMOD_NO_IDLE) {
|
||||
oh->_int_flags |= _HWMOD_SKIP_ENABLE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
pr_debug("omap_hwmod: %s: idling\n", oh->name);
|
||||
|
||||
if (oh->_state != _HWMOD_STATE_ENABLED) {
|
||||
@ -2504,6 +2509,8 @@ static int __init _init(struct omap_hwmod *oh, void *data)
|
||||
oh->flags |= HWMOD_INIT_NO_RESET;
|
||||
if (of_find_property(np, "ti,no-idle-on-init", NULL))
|
||||
oh->flags |= HWMOD_INIT_NO_IDLE;
|
||||
if (of_find_property(np, "ti,no-idle", NULL))
|
||||
oh->flags |= HWMOD_NO_IDLE;
|
||||
}
|
||||
|
||||
oh->_state = _HWMOD_STATE_INITIALIZED;
|
||||
@ -2630,7 +2637,7 @@ static void __init _setup_postsetup(struct omap_hwmod *oh)
|
||||
* XXX HWMOD_INIT_NO_IDLE does not belong in hwmod data -
|
||||
* it should be set by the core code as a runtime flag during startup
|
||||
*/
|
||||
if ((oh->flags & HWMOD_INIT_NO_IDLE) &&
|
||||
if ((oh->flags & (HWMOD_INIT_NO_IDLE | HWMOD_NO_IDLE)) &&
|
||||
(postsetup_state == _HWMOD_STATE_IDLE)) {
|
||||
oh->_int_flags |= _HWMOD_SKIP_ENABLE;
|
||||
postsetup_state = _HWMOD_STATE_ENABLED;
|
||||
|
@ -525,6 +525,8 @@ struct omap_hwmod_omap4_prcm {
|
||||
* or idled.
|
||||
* HWMOD_OPT_CLKS_NEEDED: The optional clocks are needed for the module to
|
||||
* operate and they need to be handled at the same time as the main_clk.
|
||||
* HWMOD_NO_IDLE: Do not idle the hwmod at all. Useful to handle certain
|
||||
* IPs like CPSW on DRA7, where clocks to this module cannot be disabled.
|
||||
*/
|
||||
#define HWMOD_SWSUP_SIDLE (1 << 0)
|
||||
#define HWMOD_SWSUP_MSTANDBY (1 << 1)
|
||||
@ -541,6 +543,7 @@ struct omap_hwmod_omap4_prcm {
|
||||
#define HWMOD_SWSUP_SIDLE_ACT (1 << 12)
|
||||
#define HWMOD_RECONFIG_IO_CHAIN (1 << 13)
|
||||
#define HWMOD_OPT_CLKS_NEEDED (1 << 14)
|
||||
#define HWMOD_NO_IDLE (1 << 15)
|
||||
|
||||
/*
|
||||
* omap_hwmod._int_flags definitions
|
||||
|
@ -49,6 +49,9 @@ static int change_memory_common(unsigned long addr, int numpages,
|
||||
WARN_ON_ONCE(1);
|
||||
}
|
||||
|
||||
if (!numpages)
|
||||
return 0;
|
||||
|
||||
if (start < MODULES_VADDR || start >= MODULES_END)
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -53,8 +53,8 @@ static void s3c_pm_run_res(struct resource *ptr, run_fn_t fn, u32 *arg)
|
||||
if (ptr->child != NULL)
|
||||
s3c_pm_run_res(ptr->child, fn, arg);
|
||||
|
||||
if ((ptr->flags & IORESOURCE_MEM) &&
|
||||
strcmp(ptr->name, "System RAM") == 0) {
|
||||
if ((ptr->flags & IORESOURCE_SYSTEM_RAM)
|
||||
== IORESOURCE_SYSTEM_RAM) {
|
||||
S3C_PMDBG("Found system RAM at %08lx..%08lx\n",
|
||||
(unsigned long)ptr->start,
|
||||
(unsigned long)ptr->end);
|
||||
|
@ -23,9 +23,8 @@
|
||||
#include <linux/const.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
__PAGE_ALIGNED_DATA
|
||||
|
||||
.globl vdso_start, vdso_end
|
||||
.section .data..ro_after_init
|
||||
.balign PAGE_SIZE
|
||||
vdso_start:
|
||||
.incbin "arch/arm/vdso/vdso.so"
|
||||
|
@ -156,8 +156,4 @@ int set_memory_rw(unsigned long addr, int numpages);
|
||||
int set_memory_x(unsigned long addr, int numpages);
|
||||
int set_memory_nx(unsigned long addr, int numpages);
|
||||
|
||||
#ifdef CONFIG_DEBUG_RODATA
|
||||
void mark_rodata_ro(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -34,7 +34,7 @@
|
||||
/*
|
||||
* VMALLOC and SPARSEMEM_VMEMMAP ranges.
|
||||
*
|
||||
* VMEMAP_SIZE: allows the whole VA space to be covered by a struct page array
|
||||
* VMEMAP_SIZE: allows the whole linear region to be covered by a struct page array
|
||||
* (rounded up to PUD_SIZE).
|
||||
* VMALLOC_START: beginning of the kernel VA space
|
||||
* VMALLOC_END: extends to the available space below vmmemmap, PCI I/O space,
|
||||
@ -51,7 +51,9 @@
|
||||
|
||||
#define VMALLOC_END (PAGE_OFFSET - PUD_SIZE - VMEMMAP_SIZE - SZ_64K)
|
||||
|
||||
#define vmemmap ((struct page *)(VMALLOC_END + SZ_64K))
|
||||
#define VMEMMAP_START (VMALLOC_END + SZ_64K)
|
||||
#define vmemmap ((struct page *)VMEMMAP_START - \
|
||||
SECTION_ALIGN_DOWN(memstart_addr >> PAGE_SHIFT))
|
||||
|
||||
#define FIRST_USER_ADDRESS 0UL
|
||||
|
||||
|
@ -73,13 +73,13 @@ static struct resource mem_res[] = {
|
||||
.name = "Kernel code",
|
||||
.start = 0,
|
||||
.end = 0,
|
||||
.flags = IORESOURCE_MEM
|
||||
.flags = IORESOURCE_SYSTEM_RAM
|
||||
},
|
||||
{
|
||||
.name = "Kernel data",
|
||||
.start = 0,
|
||||
.end = 0,
|
||||
.flags = IORESOURCE_MEM
|
||||
.flags = IORESOURCE_SYSTEM_RAM
|
||||
}
|
||||
};
|
||||
|
||||
@ -210,7 +210,7 @@ static void __init request_standard_resources(void)
|
||||
res->name = "System RAM";
|
||||
res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region));
|
||||
res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1;
|
||||
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
|
||||
res->flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY;
|
||||
|
||||
request_resource(&iomem_resource, res);
|
||||
|
||||
|
@ -145,6 +145,10 @@ ENTRY(cpu_resume_mmu)
|
||||
ENDPROC(cpu_resume_mmu)
|
||||
.popsection
|
||||
cpu_resume_after_mmu:
|
||||
#ifdef CONFIG_KASAN
|
||||
mov x0, sp
|
||||
bl kasan_unpoison_remaining_stack
|
||||
#endif
|
||||
mov x0, #0 // return zero on success
|
||||
ldp x19, x20, [sp, #16]
|
||||
ldp x21, x22, [sp, #32]
|
||||
|
@ -195,7 +195,7 @@ asmlinkage void secondary_start_kernel(void)
|
||||
/*
|
||||
* OK, it's off to the idle thread for us
|
||||
*/
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
|
@ -194,7 +194,7 @@ static int get_timer_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
|
||||
u64 val;
|
||||
|
||||
val = kvm_arm_timer_get_reg(vcpu, reg->id);
|
||||
return copy_to_user(uaddr, &val, KVM_REG_SIZE(reg->id));
|
||||
return copy_to_user(uaddr, &val, KVM_REG_SIZE(reg->id)) ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -306,10 +306,6 @@ static __init int setup_hugepagesz(char *opt)
|
||||
hugetlb_add_hstate(PMD_SHIFT - PAGE_SHIFT);
|
||||
} else if (ps == PUD_SIZE) {
|
||||
hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT);
|
||||
} else if (ps == (PAGE_SIZE * CONT_PTES)) {
|
||||
hugetlb_add_hstate(CONT_PTE_SHIFT);
|
||||
} else if (ps == (PMD_SIZE * CONT_PMDS)) {
|
||||
hugetlb_add_hstate((PMD_SHIFT + CONT_PMD_SHIFT) - PAGE_SHIFT);
|
||||
} else {
|
||||
pr_err("hugepagesz: Unsupported page size %lu K\n", ps >> 10);
|
||||
return 0;
|
||||
@ -317,13 +313,3 @@ static __init int setup_hugepagesz(char *opt)
|
||||
return 1;
|
||||
}
|
||||
__setup("hugepagesz=", setup_hugepagesz);
|
||||
|
||||
#ifdef CONFIG_ARM64_64K_PAGES
|
||||
static __init int add_default_hugepagesz(void)
|
||||
{
|
||||
if (size_to_hstate(CONT_PTES * PAGE_SIZE) == NULL)
|
||||
hugetlb_add_hstate(CONT_PMD_SHIFT);
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(add_default_hugepagesz);
|
||||
#endif
|
||||
|
@ -319,8 +319,8 @@ void __init mem_init(void)
|
||||
#endif
|
||||
MLG(VMALLOC_START, VMALLOC_END),
|
||||
#ifdef CONFIG_SPARSEMEM_VMEMMAP
|
||||
MLG((unsigned long)vmemmap,
|
||||
(unsigned long)vmemmap + VMEMMAP_SIZE),
|
||||
MLG(VMEMMAP_START,
|
||||
VMEMMAP_START + VMEMMAP_SIZE),
|
||||
MLM((unsigned long)virt_to_page(PAGE_OFFSET),
|
||||
(unsigned long)virt_to_page(high_memory)),
|
||||
#endif
|
||||
|
@ -49,13 +49,13 @@ static struct resource __initdata kernel_data = {
|
||||
.name = "Kernel data",
|
||||
.start = 0,
|
||||
.end = 0,
|
||||
.flags = IORESOURCE_MEM,
|
||||
.flags = IORESOURCE_SYSTEM_RAM,
|
||||
};
|
||||
static struct resource __initdata kernel_code = {
|
||||
.name = "Kernel code",
|
||||
.start = 0,
|
||||
.end = 0,
|
||||
.flags = IORESOURCE_MEM,
|
||||
.flags = IORESOURCE_SYSTEM_RAM,
|
||||
.sibling = &kernel_data,
|
||||
};
|
||||
|
||||
@ -134,7 +134,7 @@ add_physical_memory(resource_size_t start, resource_size_t end)
|
||||
new->start = start;
|
||||
new->end = end;
|
||||
new->name = "System RAM";
|
||||
new->flags = IORESOURCE_MEM;
|
||||
new->flags = IORESOURCE_SYSTEM_RAM;
|
||||
|
||||
*pprev = new;
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ void secondary_start_kernel(void)
|
||||
|
||||
/* We are done with local CPU inits, unblock the boot CPU. */
|
||||
set_cpu_online(cpu, true);
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
}
|
||||
|
||||
void __init smp_prepare_boot_cpu(void)
|
||||
|
@ -281,8 +281,6 @@ notrace void __init machine_init(unsigned long dt_ptr)
|
||||
*/
|
||||
set_ist(_vectors_start);
|
||||
|
||||
lockdep_init();
|
||||
|
||||
/*
|
||||
* dtb is passed in from bootloader.
|
||||
* fdt is linked in blob.
|
||||
|
@ -180,7 +180,7 @@ void start_secondary(void)
|
||||
|
||||
local_irq_enable();
|
||||
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1178,7 +1178,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
|
||||
efi_memory_desc_t *md;
|
||||
u64 efi_desc_size;
|
||||
char *name;
|
||||
unsigned long flags;
|
||||
unsigned long flags, desc;
|
||||
|
||||
efi_map_start = __va(ia64_boot_param->efi_memmap);
|
||||
efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
|
||||
@ -1193,6 +1193,8 @@ efi_initialize_iomem_resources(struct resource *code_resource,
|
||||
continue;
|
||||
|
||||
flags = IORESOURCE_MEM | IORESOURCE_BUSY;
|
||||
desc = IORES_DESC_NONE;
|
||||
|
||||
switch (md->type) {
|
||||
|
||||
case EFI_MEMORY_MAPPED_IO:
|
||||
@ -1207,14 +1209,17 @@ efi_initialize_iomem_resources(struct resource *code_resource,
|
||||
if (md->attribute & EFI_MEMORY_WP) {
|
||||
name = "System ROM";
|
||||
flags |= IORESOURCE_READONLY;
|
||||
} else if (md->attribute == EFI_MEMORY_UC)
|
||||
} else if (md->attribute == EFI_MEMORY_UC) {
|
||||
name = "Uncached RAM";
|
||||
else
|
||||
} else {
|
||||
name = "System RAM";
|
||||
flags |= IORESOURCE_SYSRAM;
|
||||
}
|
||||
break;
|
||||
|
||||
case EFI_ACPI_MEMORY_NVS:
|
||||
name = "ACPI Non-volatile Storage";
|
||||
desc = IORES_DESC_ACPI_NV_STORAGE;
|
||||
break;
|
||||
|
||||
case EFI_UNUSABLE_MEMORY:
|
||||
@ -1224,6 +1229,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
|
||||
|
||||
case EFI_PERSISTENT_MEMORY:
|
||||
name = "Persistent Memory";
|
||||
desc = IORES_DESC_PERSISTENT_MEMORY;
|
||||
break;
|
||||
|
||||
case EFI_RESERVED_TYPE:
|
||||
@ -1246,6 +1252,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
|
||||
res->start = md->phys_addr;
|
||||
res->end = md->phys_addr + efi_md_size(md) - 1;
|
||||
res->flags = flags;
|
||||
res->desc = desc;
|
||||
|
||||
if (insert_resource(&iomem_resource, res) < 0)
|
||||
kfree(res);
|
||||
|
@ -80,17 +80,17 @@ unsigned long vga_console_membase;
|
||||
|
||||
static struct resource data_resource = {
|
||||
.name = "Kernel data",
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_MEM
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM
|
||||
};
|
||||
|
||||
static struct resource code_resource = {
|
||||
.name = "Kernel code",
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_MEM
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM
|
||||
};
|
||||
|
||||
static struct resource bss_resource = {
|
||||
.name = "Kernel bss",
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_MEM
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM
|
||||
};
|
||||
|
||||
unsigned long ia64_max_cacheline_size;
|
||||
|
@ -454,7 +454,7 @@ start_secondary (void *unused)
|
||||
preempt_disable();
|
||||
smp_callin();
|
||||
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -70,14 +70,14 @@ static struct resource data_resource = {
|
||||
.name = "Kernel data",
|
||||
.start = 0,
|
||||
.end = 0,
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_MEM
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM
|
||||
};
|
||||
|
||||
static struct resource code_resource = {
|
||||
.name = "Kernel code",
|
||||
.start = 0,
|
||||
.end = 0,
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_MEM
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM
|
||||
};
|
||||
|
||||
unsigned long memory_start;
|
||||
|
@ -432,7 +432,7 @@ int __init start_secondary(void *unused)
|
||||
*/
|
||||
local_flush_tlb_all();
|
||||
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -396,7 +396,7 @@ asmlinkage void secondary_start_kernel(void)
|
||||
/*
|
||||
* OK, it's off to the idle thread for us
|
||||
*/
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
}
|
||||
|
||||
void __init smp_cpus_done(unsigned int max_cpus)
|
||||
|
@ -130,8 +130,6 @@ void __init machine_early_init(const char *cmdline, unsigned int ram,
|
||||
memset(__bss_start, 0, __bss_stop-__bss_start);
|
||||
memset(_ssbss, 0, _esbss-_ssbss);
|
||||
|
||||
lockdep_init();
|
||||
|
||||
/* initialize device tree for usage in early_printk */
|
||||
early_init_devtree(_fdt_start);
|
||||
|
||||
|
@ -151,6 +151,7 @@ config BMIPS_GENERIC
|
||||
select CSRC_R4K
|
||||
select SYNC_R4K
|
||||
select COMMON_CLK
|
||||
select BCM6345_L1_IRQ
|
||||
select BCM7038_L1_IRQ
|
||||
select BCM7120_L2_IRQ
|
||||
select BRCMSTB_L2_IRQ
|
||||
@ -2169,7 +2170,6 @@ config MIPS_MT_SMP
|
||||
select CPU_MIPSR2_IRQ_VI
|
||||
select CPU_MIPSR2_IRQ_EI
|
||||
select SYNC_R4K
|
||||
select MIPS_GIC_IPI
|
||||
select MIPS_MT
|
||||
select SMP
|
||||
select SMP_UP
|
||||
@ -2267,7 +2267,6 @@ config MIPS_VPE_APSP_API_MT
|
||||
config MIPS_CMP
|
||||
bool "MIPS CMP framework support (DEPRECATED)"
|
||||
depends on SYS_SUPPORTS_MIPS_CMP && !CPU_MIPSR6
|
||||
select MIPS_GIC_IPI
|
||||
select SMP
|
||||
select SYNC_R4K
|
||||
select SYS_SUPPORTS_SMP
|
||||
@ -2287,7 +2286,6 @@ config MIPS_CPS
|
||||
select MIPS_CM
|
||||
select MIPS_CPC
|
||||
select MIPS_CPS_PM if HOTPLUG_CPU
|
||||
select MIPS_GIC_IPI
|
||||
select SMP
|
||||
select SYNC_R4K if (CEVT_R4K || CSRC_R4K)
|
||||
select SYS_SUPPORTS_HOTPLUG_CPU
|
||||
@ -2305,9 +2303,6 @@ config MIPS_CPS_PM
|
||||
select MIPS_CPC
|
||||
bool
|
||||
|
||||
config MIPS_GIC_IPI
|
||||
bool
|
||||
|
||||
config MIPS_CM
|
||||
bool
|
||||
|
||||
|
@ -26,90 +26,6 @@
|
||||
#include "common.h"
|
||||
#include "machtypes.h"
|
||||
|
||||
static void __init ath79_misc_intc_domain_init(
|
||||
struct device_node *node, int irq);
|
||||
|
||||
static void ath79_misc_irq_handler(struct irq_desc *desc)
|
||||
{
|
||||
struct irq_domain *domain = irq_desc_get_handler_data(desc);
|
||||
void __iomem *base = domain->host_data;
|
||||
u32 pending;
|
||||
|
||||
pending = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_STATUS) &
|
||||
__raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||
|
||||
if (!pending) {
|
||||
spurious_interrupt();
|
||||
return;
|
||||
}
|
||||
|
||||
while (pending) {
|
||||
int bit = __ffs(pending);
|
||||
|
||||
generic_handle_irq(irq_linear_revmap(domain, bit));
|
||||
pending &= ~BIT(bit);
|
||||
}
|
||||
}
|
||||
|
||||
static void ar71xx_misc_irq_unmask(struct irq_data *d)
|
||||
{
|
||||
void __iomem *base = irq_data_get_irq_chip_data(d);
|
||||
unsigned int irq = d->hwirq;
|
||||
u32 t;
|
||||
|
||||
t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||
__raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||
|
||||
/* flush write */
|
||||
__raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||
}
|
||||
|
||||
static void ar71xx_misc_irq_mask(struct irq_data *d)
|
||||
{
|
||||
void __iomem *base = irq_data_get_irq_chip_data(d);
|
||||
unsigned int irq = d->hwirq;
|
||||
u32 t;
|
||||
|
||||
t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||
__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||
|
||||
/* flush write */
|
||||
__raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||
}
|
||||
|
||||
static void ar724x_misc_irq_ack(struct irq_data *d)
|
||||
{
|
||||
void __iomem *base = irq_data_get_irq_chip_data(d);
|
||||
unsigned int irq = d->hwirq;
|
||||
u32 t;
|
||||
|
||||
t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_STATUS);
|
||||
__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_MISC_INT_STATUS);
|
||||
|
||||
/* flush write */
|
||||
__raw_readl(base + AR71XX_RESET_REG_MISC_INT_STATUS);
|
||||
}
|
||||
|
||||
static struct irq_chip ath79_misc_irq_chip = {
|
||||
.name = "MISC",
|
||||
.irq_unmask = ar71xx_misc_irq_unmask,
|
||||
.irq_mask = ar71xx_misc_irq_mask,
|
||||
};
|
||||
|
||||
static void __init ath79_misc_irq_init(void)
|
||||
{
|
||||
if (soc_is_ar71xx() || soc_is_ar913x())
|
||||
ath79_misc_irq_chip.irq_mask_ack = ar71xx_misc_irq_mask;
|
||||
else if (soc_is_ar724x() ||
|
||||
soc_is_ar933x() ||
|
||||
soc_is_ar934x() ||
|
||||
soc_is_qca955x())
|
||||
ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack;
|
||||
else
|
||||
BUG();
|
||||
|
||||
ath79_misc_intc_domain_init(NULL, ATH79_CPU_IRQ(6));
|
||||
}
|
||||
|
||||
static void ar934x_ip2_irq_dispatch(struct irq_desc *desc)
|
||||
{
|
||||
@ -212,142 +128,12 @@ static void qca955x_irq_init(void)
|
||||
irq_set_chained_handler(ATH79_CPU_IRQ(3), qca955x_ip3_irq_dispatch);
|
||||
}
|
||||
|
||||
/*
|
||||
* The IP2/IP3 lines are tied to a PCI/WMAC/USB device. Drivers for
|
||||
* these devices typically allocate coherent DMA memory, however the
|
||||
* DMA controller may still have some unsynchronized data in the FIFO.
|
||||
* Issue a flush in the handlers to ensure that the driver sees
|
||||
* the update.
|
||||
*
|
||||
* This array map the interrupt lines to the DDR write buffer channels.
|
||||
*/
|
||||
|
||||
static unsigned irq_wb_chan[8] = {
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
};
|
||||
|
||||
asmlinkage void plat_irq_dispatch(void)
|
||||
{
|
||||
unsigned long pending;
|
||||
int irq;
|
||||
|
||||
pending = read_c0_status() & read_c0_cause() & ST0_IM;
|
||||
|
||||
if (!pending) {
|
||||
spurious_interrupt();
|
||||
return;
|
||||
}
|
||||
|
||||
pending >>= CAUSEB_IP;
|
||||
while (pending) {
|
||||
irq = fls(pending) - 1;
|
||||
if (irq < ARRAY_SIZE(irq_wb_chan) && irq_wb_chan[irq] != -1)
|
||||
ath79_ddr_wb_flush(irq_wb_chan[irq]);
|
||||
do_IRQ(MIPS_CPU_IRQ_BASE + irq);
|
||||
pending &= ~BIT(irq);
|
||||
}
|
||||
}
|
||||
|
||||
static int misc_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
|
||||
{
|
||||
irq_set_chip_and_handler(irq, &ath79_misc_irq_chip, handle_level_irq);
|
||||
irq_set_chip_data(irq, d->host_data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct irq_domain_ops misc_irq_domain_ops = {
|
||||
.xlate = irq_domain_xlate_onecell,
|
||||
.map = misc_map,
|
||||
};
|
||||
|
||||
static void __init ath79_misc_intc_domain_init(
|
||||
struct device_node *node, int irq)
|
||||
{
|
||||
void __iomem *base = ath79_reset_base;
|
||||
struct irq_domain *domain;
|
||||
|
||||
domain = irq_domain_add_legacy(node, ATH79_MISC_IRQ_COUNT,
|
||||
ATH79_MISC_IRQ_BASE, 0, &misc_irq_domain_ops, base);
|
||||
if (!domain)
|
||||
panic("Failed to add MISC irqdomain");
|
||||
|
||||
/* Disable and clear all interrupts */
|
||||
__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||
__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS);
|
||||
|
||||
irq_set_chained_handler_and_data(irq, ath79_misc_irq_handler, domain);
|
||||
}
|
||||
|
||||
static int __init ath79_misc_intc_of_init(
|
||||
struct device_node *node, struct device_node *parent)
|
||||
{
|
||||
int irq;
|
||||
|
||||
irq = irq_of_parse_and_map(node, 0);
|
||||
if (!irq)
|
||||
panic("Failed to get MISC IRQ");
|
||||
|
||||
ath79_misc_intc_domain_init(node, irq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init ar7100_misc_intc_of_init(
|
||||
struct device_node *node, struct device_node *parent)
|
||||
{
|
||||
ath79_misc_irq_chip.irq_mask_ack = ar71xx_misc_irq_mask;
|
||||
return ath79_misc_intc_of_init(node, parent);
|
||||
}
|
||||
|
||||
IRQCHIP_DECLARE(ar7100_misc_intc, "qca,ar7100-misc-intc",
|
||||
ar7100_misc_intc_of_init);
|
||||
|
||||
static int __init ar7240_misc_intc_of_init(
|
||||
struct device_node *node, struct device_node *parent)
|
||||
{
|
||||
ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack;
|
||||
return ath79_misc_intc_of_init(node, parent);
|
||||
}
|
||||
|
||||
IRQCHIP_DECLARE(ar7240_misc_intc, "qca,ar7240-misc-intc",
|
||||
ar7240_misc_intc_of_init);
|
||||
|
||||
static int __init ar79_cpu_intc_of_init(
|
||||
struct device_node *node, struct device_node *parent)
|
||||
{
|
||||
int err, i, count;
|
||||
|
||||
/* Fill the irq_wb_chan table */
|
||||
count = of_count_phandle_with_args(
|
||||
node, "qca,ddr-wb-channels", "#qca,ddr-wb-channel-cells");
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
struct of_phandle_args args;
|
||||
u32 irq = i;
|
||||
|
||||
of_property_read_u32_index(
|
||||
node, "qca,ddr-wb-channel-interrupts", i, &irq);
|
||||
if (irq >= ARRAY_SIZE(irq_wb_chan))
|
||||
continue;
|
||||
|
||||
err = of_parse_phandle_with_args(
|
||||
node, "qca,ddr-wb-channels",
|
||||
"#qca,ddr-wb-channel-cells",
|
||||
i, &args);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
irq_wb_chan[irq] = args.args[0];
|
||||
pr_info("IRQ: Set flush channel of IRQ%d to %d\n",
|
||||
irq, args.args[0]);
|
||||
}
|
||||
|
||||
return mips_cpu_irq_of_init(node, parent);
|
||||
}
|
||||
IRQCHIP_DECLARE(ar79_cpu_intc, "qca,ar7100-cpu-intc",
|
||||
ar79_cpu_intc_of_init);
|
||||
|
||||
void __init arch_init_irq(void)
|
||||
{
|
||||
unsigned irq_wb_chan2 = -1;
|
||||
unsigned irq_wb_chan3 = -1;
|
||||
bool misc_is_ar71xx;
|
||||
|
||||
if (mips_machtype == ATH79_MACH_GENERIC_OF) {
|
||||
irqchip_init();
|
||||
return;
|
||||
@ -355,14 +141,26 @@ void __init arch_init_irq(void)
|
||||
|
||||
if (soc_is_ar71xx() || soc_is_ar724x() ||
|
||||
soc_is_ar913x() || soc_is_ar933x()) {
|
||||
irq_wb_chan[2] = 3;
|
||||
irq_wb_chan[3] = 2;
|
||||
irq_wb_chan2 = 3;
|
||||
irq_wb_chan3 = 2;
|
||||
} else if (soc_is_ar934x()) {
|
||||
irq_wb_chan[3] = 2;
|
||||
irq_wb_chan3 = 2;
|
||||
}
|
||||
|
||||
mips_cpu_irq_init();
|
||||
ath79_misc_irq_init();
|
||||
ath79_cpu_irq_init(irq_wb_chan2, irq_wb_chan3);
|
||||
|
||||
if (soc_is_ar71xx() || soc_is_ar913x())
|
||||
misc_is_ar71xx = true;
|
||||
else if (soc_is_ar724x() ||
|
||||
soc_is_ar933x() ||
|
||||
soc_is_ar934x() ||
|
||||
soc_is_qca955x())
|
||||
misc_is_ar71xx = false;
|
||||
else
|
||||
BUG();
|
||||
ath79_misc_irq_init(
|
||||
ath79_reset_base + AR71XX_RESET_REG_MISC_INT_STATUS,
|
||||
ATH79_CPU_IRQ(6), ATH79_MISC_IRQ_BASE, misc_is_ar71xx);
|
||||
|
||||
if (soc_is_ar934x())
|
||||
ar934x_ip2_irq_init();
|
||||
|
@ -15,6 +15,12 @@
|
||||
#include <asm/irq_cpu.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
static const struct of_device_id smp_intc_dt_match[] = {
|
||||
{ .compatible = "brcm,bcm7038-l1-intc" },
|
||||
{ .compatible = "brcm,bcm6345-l1-intc" },
|
||||
{}
|
||||
};
|
||||
|
||||
unsigned int get_c0_compare_int(void)
|
||||
{
|
||||
return CP0_LEGACY_COMPARE_IRQ;
|
||||
@ -24,8 +30,8 @@ void __init arch_init_irq(void)
|
||||
{
|
||||
struct device_node *dn;
|
||||
|
||||
/* Only the STB (bcm7038) controller supports SMP IRQ affinity */
|
||||
dn = of_find_compatible_node(NULL, NULL, "brcm,bcm7038-l1-intc");
|
||||
/* Only these controllers support SMP IRQ affinity */
|
||||
dn = of_find_matching_node(NULL, smp_intc_dt_match);
|
||||
if (dn)
|
||||
of_node_put(dn);
|
||||
else
|
||||
|
@ -17,7 +17,7 @@
|
||||
#define PORT(offset) (CKSEG1ADDR(AR7_REGS_UART0) + (4 * offset))
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACH_JZ4740
|
||||
#if defined(CONFIG_MACH_JZ4740) || defined(CONFIG_MACH_JZ4780)
|
||||
#include <asm/mach-jz4740/base.h>
|
||||
#define PORT(offset) (CKSEG1ADDR(JZ4740_UART0_BASE_ADDR) + (4 * offset))
|
||||
#endif
|
||||
|
@ -144,4 +144,8 @@ static inline u32 ath79_reset_rr(unsigned reg)
|
||||
void ath79_device_reset_set(u32 mask);
|
||||
void ath79_device_reset_clear(u32 mask);
|
||||
|
||||
void ath79_cpu_irq_init(unsigned irq_wb_chan2, unsigned irq_wb_chan3);
|
||||
void ath79_misc_irq_init(void __iomem *regs, int irq,
|
||||
int irq_base, bool is_ar71xx);
|
||||
|
||||
#endif /* __ASM_MACH_ATH79_H */
|
||||
|
@ -44,8 +44,9 @@ static inline void plat_smp_setup(void)
|
||||
mp_ops->smp_setup();
|
||||
}
|
||||
|
||||
extern void gic_send_ipi_single(int cpu, unsigned int action);
|
||||
extern void gic_send_ipi_mask(const struct cpumask *mask, unsigned int action);
|
||||
extern void mips_smp_send_ipi_single(int cpu, unsigned int action);
|
||||
extern void mips_smp_send_ipi_mask(const struct cpumask *mask,
|
||||
unsigned int action);
|
||||
|
||||
#else /* !CONFIG_SMP */
|
||||
|
||||
|
@ -270,7 +270,7 @@ uint32_t jz_gpio_port_get_value(int port, uint32_t mask)
|
||||
}
|
||||
EXPORT_SYMBOL(jz_gpio_port_get_value);
|
||||
|
||||
#define IRQ_TO_BIT(irq) BIT(irq_to_gpio(irq) & 0x1f)
|
||||
#define IRQ_TO_BIT(irq) BIT((irq - JZ4740_IRQ_GPIO(0)) & 0x1f)
|
||||
|
||||
static void jz_gpio_check_trigger_both(struct jz_gpio_chip *chip, unsigned int irq)
|
||||
{
|
||||
|
@ -52,7 +52,6 @@ obj-$(CONFIG_MIPS_MT_SMP) += smp-mt.o
|
||||
obj-$(CONFIG_MIPS_CMP) += smp-cmp.o
|
||||
obj-$(CONFIG_MIPS_CPS) += smp-cps.o cps-vec.o
|
||||
obj-$(CONFIG_MIPS_CPS_NS16550) += cps-vec-ns16550.o
|
||||
obj-$(CONFIG_MIPS_GIC_IPI) += smp-gic.o
|
||||
obj-$(CONFIG_MIPS_SPRAM) += spram.o
|
||||
|
||||
obj-$(CONFIG_MIPS_VPE_LOADER) += vpe.o
|
||||
|
@ -125,7 +125,7 @@ LEAF(_restore_fp_context)
|
||||
END(_restore_fp_context)
|
||||
.set reorder
|
||||
|
||||
.type fault@function
|
||||
.type fault, @function
|
||||
.ent fault
|
||||
fault: li v0, -EFAULT
|
||||
jr ra
|
||||
|
@ -358,7 +358,7 @@ LEAF(_restore_msa_all_upper)
|
||||
|
||||
.set reorder
|
||||
|
||||
.type fault@function
|
||||
.type fault, @function
|
||||
.ent fault
|
||||
fault: li v0, -EFAULT # failure
|
||||
jr ra
|
||||
|
@ -732,21 +732,23 @@ static void __init resource_init(void)
|
||||
end = HIGHMEM_START - 1;
|
||||
|
||||
res = alloc_bootmem(sizeof(struct resource));
|
||||
|
||||
res->start = start;
|
||||
res->end = end;
|
||||
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
|
||||
|
||||
switch (boot_mem_map.map[i].type) {
|
||||
case BOOT_MEM_RAM:
|
||||
case BOOT_MEM_INIT_RAM:
|
||||
case BOOT_MEM_ROM_DATA:
|
||||
res->name = "System RAM";
|
||||
res->flags |= IORESOURCE_SYSRAM;
|
||||
break;
|
||||
case BOOT_MEM_RESERVED:
|
||||
default:
|
||||
res->name = "reserved";
|
||||
}
|
||||
|
||||
res->start = start;
|
||||
res->end = end;
|
||||
|
||||
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
|
||||
request_resource(&iomem_resource, res);
|
||||
|
||||
/*
|
||||
|
@ -149,8 +149,8 @@ void __init cmp_prepare_cpus(unsigned int max_cpus)
|
||||
}
|
||||
|
||||
struct plat_smp_ops cmp_smp_ops = {
|
||||
.send_ipi_single = gic_send_ipi_single,
|
||||
.send_ipi_mask = gic_send_ipi_mask,
|
||||
.send_ipi_single = mips_smp_send_ipi_single,
|
||||
.send_ipi_mask = mips_smp_send_ipi_mask,
|
||||
.init_secondary = cmp_init_secondary,
|
||||
.smp_finish = cmp_smp_finish,
|
||||
.boot_secondary = cmp_boot_secondary,
|
||||
|
@ -472,8 +472,8 @@ static struct plat_smp_ops cps_smp_ops = {
|
||||
.boot_secondary = cps_boot_secondary,
|
||||
.init_secondary = cps_init_secondary,
|
||||
.smp_finish = cps_smp_finish,
|
||||
.send_ipi_single = gic_send_ipi_single,
|
||||
.send_ipi_mask = gic_send_ipi_mask,
|
||||
.send_ipi_single = mips_smp_send_ipi_single,
|
||||
.send_ipi_mask = mips_smp_send_ipi_mask,
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
.cpu_disable = cps_cpu_disable,
|
||||
.cpu_die = cps_cpu_die,
|
||||
|
@ -121,7 +121,7 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action)
|
||||
|
||||
#ifdef CONFIG_MIPS_GIC
|
||||
if (gic_present) {
|
||||
gic_send_ipi_single(cpu, action);
|
||||
mips_smp_send_ipi_single(cpu, action);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -33,12 +33,16 @@
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/ftrace.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_irq.h>
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/idle.h>
|
||||
#include <asm/r4k-timer.h>
|
||||
#include <asm/mips-cpc.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/time.h>
|
||||
#include <asm/setup.h>
|
||||
@ -79,6 +83,11 @@ static cpumask_t cpu_core_setup_map;
|
||||
|
||||
cpumask_t cpu_coherent_mask;
|
||||
|
||||
#ifdef CONFIG_GENERIC_IRQ_IPI
|
||||
static struct irq_desc *call_desc;
|
||||
static struct irq_desc *sched_desc;
|
||||
#endif
|
||||
|
||||
static inline void set_cpu_sibling_map(int cpu)
|
||||
{
|
||||
int i;
|
||||
@ -121,6 +130,7 @@ static inline void calculate_cpu_foreign_map(void)
|
||||
cpumask_t temp_foreign_map;
|
||||
|
||||
/* Re-calculate the mask */
|
||||
cpumask_clear(&temp_foreign_map);
|
||||
for_each_online_cpu(i) {
|
||||
core_present = 0;
|
||||
for_each_cpu(k, &temp_foreign_map)
|
||||
@ -145,6 +155,133 @@ void register_smp_ops(struct plat_smp_ops *ops)
|
||||
mp_ops = ops;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_GENERIC_IRQ_IPI
|
||||
void mips_smp_send_ipi_single(int cpu, unsigned int action)
|
||||
{
|
||||
mips_smp_send_ipi_mask(cpumask_of(cpu), action);
|
||||
}
|
||||
|
||||
void mips_smp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned int core;
|
||||
int cpu;
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
switch (action) {
|
||||
case SMP_CALL_FUNCTION:
|
||||
__ipi_send_mask(call_desc, mask);
|
||||
break;
|
||||
|
||||
case SMP_RESCHEDULE_YOURSELF:
|
||||
__ipi_send_mask(sched_desc, mask);
|
||||
break;
|
||||
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
|
||||
if (mips_cpc_present()) {
|
||||
for_each_cpu(cpu, mask) {
|
||||
core = cpu_data[cpu].core;
|
||||
|
||||
if (core == current_cpu_data.core)
|
||||
continue;
|
||||
|
||||
while (!cpumask_test_cpu(cpu, &cpu_coherent_mask)) {
|
||||
mips_cpc_lock_other(core);
|
||||
write_cpc_co_cmd(CPC_Cx_CMD_PWRUP);
|
||||
mips_cpc_unlock_other();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
|
||||
static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
scheduler_ipi();
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
generic_smp_call_function_interrupt();
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static struct irqaction irq_resched = {
|
||||
.handler = ipi_resched_interrupt,
|
||||
.flags = IRQF_PERCPU,
|
||||
.name = "IPI resched"
|
||||
};
|
||||
|
||||
static struct irqaction irq_call = {
|
||||
.handler = ipi_call_interrupt,
|
||||
.flags = IRQF_PERCPU,
|
||||
.name = "IPI call"
|
||||
};
|
||||
|
||||
static __init void smp_ipi_init_one(unsigned int virq,
|
||||
struct irqaction *action)
|
||||
{
|
||||
int ret;
|
||||
|
||||
irq_set_handler(virq, handle_percpu_irq);
|
||||
ret = setup_irq(virq, action);
|
||||
BUG_ON(ret);
|
||||
}
|
||||
|
||||
static int __init mips_smp_ipi_init(void)
|
||||
{
|
||||
unsigned int call_virq, sched_virq;
|
||||
struct irq_domain *ipidomain;
|
||||
struct device_node *node;
|
||||
|
||||
node = of_irq_find_parent(of_root);
|
||||
ipidomain = irq_find_matching_host(node, DOMAIN_BUS_IPI);
|
||||
|
||||
/*
|
||||
* Some platforms have half DT setup. So if we found irq node but
|
||||
* didn't find an ipidomain, try to search for one that is not in the
|
||||
* DT.
|
||||
*/
|
||||
if (node && !ipidomain)
|
||||
ipidomain = irq_find_matching_host(NULL, DOMAIN_BUS_IPI);
|
||||
|
||||
BUG_ON(!ipidomain);
|
||||
|
||||
call_virq = irq_reserve_ipi(ipidomain, cpu_possible_mask);
|
||||
BUG_ON(!call_virq);
|
||||
|
||||
sched_virq = irq_reserve_ipi(ipidomain, cpu_possible_mask);
|
||||
BUG_ON(!sched_virq);
|
||||
|
||||
if (irq_domain_is_ipi_per_cpu(ipidomain)) {
|
||||
int cpu;
|
||||
|
||||
for_each_cpu(cpu, cpu_possible_mask) {
|
||||
smp_ipi_init_one(call_virq + cpu, &irq_call);
|
||||
smp_ipi_init_one(sched_virq + cpu, &irq_resched);
|
||||
}
|
||||
} else {
|
||||
smp_ipi_init_one(call_virq, &irq_call);
|
||||
smp_ipi_init_one(sched_virq, &irq_resched);
|
||||
}
|
||||
|
||||
call_desc = irq_to_desc(call_virq);
|
||||
sched_desc = irq_to_desc(sched_virq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
early_initcall(mips_smp_ipi_init);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* First C code run on the secondary CPUs after being started up by
|
||||
* the master.
|
||||
@ -191,7 +328,7 @@ asmlinkage void start_secondary(void)
|
||||
WARN_ON_ONCE(!irqs_disabled());
|
||||
mp_ops->smp_finish();
|
||||
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
}
|
||||
|
||||
static void stop_this_cpu(void *dummy)
|
||||
|
@ -690,15 +690,15 @@ static int simulate_sync(struct pt_regs *regs, unsigned int opcode)
|
||||
asmlinkage void do_ov(struct pt_regs *regs)
|
||||
{
|
||||
enum ctx_state prev_state;
|
||||
siginfo_t info;
|
||||
siginfo_t info = {
|
||||
.si_signo = SIGFPE,
|
||||
.si_code = FPE_INTOVF,
|
||||
.si_addr = (void __user *)regs->cp0_epc,
|
||||
};
|
||||
|
||||
prev_state = exception_enter();
|
||||
die_if_kernel("Integer overflow", regs);
|
||||
|
||||
info.si_code = FPE_INTOVF;
|
||||
info.si_signo = SIGFPE;
|
||||
info.si_errno = 0;
|
||||
info.si_addr = (void __user *) regs->cp0_epc;
|
||||
force_sig_info(SIGFPE, &info, current);
|
||||
exception_exit(prev_state);
|
||||
}
|
||||
@ -874,7 +874,7 @@ out:
|
||||
void do_trap_or_bp(struct pt_regs *regs, unsigned int code,
|
||||
const char *str)
|
||||
{
|
||||
siginfo_t info;
|
||||
siginfo_t info = { 0 };
|
||||
char b[40];
|
||||
|
||||
#ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
|
||||
@ -903,7 +903,6 @@ void do_trap_or_bp(struct pt_regs *regs, unsigned int code,
|
||||
else
|
||||
info.si_code = FPE_INTOVF;
|
||||
info.si_signo = SIGFPE;
|
||||
info.si_errno = 0;
|
||||
info.si_addr = (void __user *) regs->cp0_epc;
|
||||
force_sig_info(SIGFPE, &info, current);
|
||||
break;
|
||||
|
@ -445,8 +445,8 @@ int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
|
||||
|
||||
dvcpu->arch.wait = 0;
|
||||
|
||||
if (waitqueue_active(&dvcpu->wq))
|
||||
wake_up_interruptible(&dvcpu->wq);
|
||||
if (swait_active(&dvcpu->wq))
|
||||
swake_up(&dvcpu->wq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -702,7 +702,7 @@ static int kvm_mips_get_reg(struct kvm_vcpu *vcpu,
|
||||
} else if ((reg->id & KVM_REG_SIZE_MASK) == KVM_REG_SIZE_U128) {
|
||||
void __user *uaddr = (void __user *)(long)reg->addr;
|
||||
|
||||
return copy_to_user(uaddr, vs, 16);
|
||||
return copy_to_user(uaddr, vs, 16) ? -EFAULT : 0;
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -732,7 +732,7 @@ static int kvm_mips_set_reg(struct kvm_vcpu *vcpu,
|
||||
} else if ((reg->id & KVM_REG_SIZE_MASK) == KVM_REG_SIZE_U128) {
|
||||
void __user *uaddr = (void __user *)(long)reg->addr;
|
||||
|
||||
return copy_from_user(vs, uaddr, 16);
|
||||
return copy_from_user(vs, uaddr, 16) ? -EFAULT : 0;
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -1174,8 +1174,8 @@ static void kvm_mips_comparecount_func(unsigned long data)
|
||||
kvm_mips_callbacks->queue_timer_int(vcpu);
|
||||
|
||||
vcpu->arch.wait = 0;
|
||||
if (waitqueue_active(&vcpu->wq))
|
||||
wake_up_interruptible(&vcpu->wq);
|
||||
if (swait_active(&vcpu->wq))
|
||||
swake_up(&vcpu->wq);
|
||||
}
|
||||
|
||||
/* low level hrtimer wake routine */
|
||||
|
@ -164,11 +164,13 @@ static int __init mips_sc_probe_cm3(void)
|
||||
|
||||
sets = cfg & CM_GCR_L2_CONFIG_SET_SIZE_MSK;
|
||||
sets >>= CM_GCR_L2_CONFIG_SET_SIZE_SHF;
|
||||
c->scache.sets = 64 << sets;
|
||||
if (sets)
|
||||
c->scache.sets = 64 << sets;
|
||||
|
||||
line_sz = cfg & CM_GCR_L2_CONFIG_LINE_SIZE_MSK;
|
||||
line_sz >>= CM_GCR_L2_CONFIG_LINE_SIZE_SHF;
|
||||
c->scache.linesz = 2 << line_sz;
|
||||
if (line_sz)
|
||||
c->scache.linesz = 2 << line_sz;
|
||||
|
||||
assoc = cfg & CM_GCR_L2_CONFIG_ASSOC_MSK;
|
||||
assoc >>= CM_GCR_L2_CONFIG_ASSOC_SHF;
|
||||
@ -176,9 +178,12 @@ static int __init mips_sc_probe_cm3(void)
|
||||
c->scache.waysize = c->scache.sets * c->scache.linesz;
|
||||
c->scache.waybit = __ffs(c->scache.waysize);
|
||||
|
||||
c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
|
||||
if (c->scache.linesz) {
|
||||
c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int __init mips_sc_probe(void)
|
||||
|
@ -675,7 +675,7 @@ int __init start_secondary(void *unused)
|
||||
#ifdef CONFIG_GENERIC_CLOCKEVENTS
|
||||
init_clockevents();
|
||||
#endif
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,9 @@
|
||||
|
||||
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
|
||||
|
||||
/* Read-only memory is marked before mark_rodata_ro() is called. */
|
||||
#define __ro_after_init __read_mostly
|
||||
|
||||
void parisc_cache_init(void); /* initializes cache-flushing */
|
||||
void disable_sr_hashing_asm(int); /* low level support for above */
|
||||
void disable_sr_hashing(void); /* turns off space register hashing */
|
||||
|
@ -121,10 +121,6 @@ flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vma
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_RODATA
|
||||
void mark_rodata_ro(void);
|
||||
#endif
|
||||
|
||||
#include <asm/kmap_types.h>
|
||||
|
||||
#define ARCH_HAS_KMAP
|
||||
|
@ -33,7 +33,7 @@
|
||||
* floppy accesses go through the track buffer.
|
||||
*/
|
||||
#define _CROSS_64KB(a,s,vdma) \
|
||||
(!vdma && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
|
||||
(!(vdma) && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
|
||||
|
||||
#define CROSS_64KB(a,s) _CROSS_64KB(a,s,use_virtual_dma & 1)
|
||||
|
||||
|
@ -361,8 +361,9 @@
|
||||
#define __NR_membarrier (__NR_Linux + 343)
|
||||
#define __NR_userfaultfd (__NR_Linux + 344)
|
||||
#define __NR_mlock2 (__NR_Linux + 345)
|
||||
#define __NR_copy_file_range (__NR_Linux + 346)
|
||||
|
||||
#define __NR_Linux_syscalls (__NR_mlock2 + 1)
|
||||
#define __NR_Linux_syscalls (__NR_copy_file_range + 1)
|
||||
|
||||
|
||||
#define __IGNORE_select /* newselect */
|
||||
|
@ -269,14 +269,19 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
|
||||
|
||||
long do_syscall_trace_enter(struct pt_regs *regs)
|
||||
{
|
||||
long ret = 0;
|
||||
|
||||
/* Do the secure computing check first. */
|
||||
secure_computing_strict(regs->gr[20]);
|
||||
|
||||
if (test_thread_flag(TIF_SYSCALL_TRACE) &&
|
||||
tracehook_report_syscall_entry(regs))
|
||||
ret = -1L;
|
||||
tracehook_report_syscall_entry(regs)) {
|
||||
/*
|
||||
* Tracing decided this syscall should not happen or the
|
||||
* debugger stored an invalid system call number. Skip
|
||||
* the system call and the system call restart handling.
|
||||
*/
|
||||
regs->gr[20] = -1UL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
if (!is_compat_task())
|
||||
@ -290,7 +295,8 @@ long do_syscall_trace_enter(struct pt_regs *regs)
|
||||
regs->gr[24] & 0xffffffff,
|
||||
regs->gr[23] & 0xffffffff);
|
||||
|
||||
return ret ? : regs->gr[20];
|
||||
out:
|
||||
return regs->gr[20];
|
||||
}
|
||||
|
||||
void do_syscall_trace_exit(struct pt_regs *regs)
|
||||
|
@ -305,7 +305,7 @@ void __init smp_callin(void)
|
||||
|
||||
local_irq_enable(); /* Interrupts have been off until now */
|
||||
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
|
||||
/* NOTREACHED */
|
||||
panic("smp_callin() AAAAaaaaahhhh....\n");
|
||||
|
@ -343,7 +343,7 @@ tracesys_next:
|
||||
#endif
|
||||
|
||||
comiclr,>>= __NR_Linux_syscalls, %r20, %r0
|
||||
b,n .Lsyscall_nosys
|
||||
b,n .Ltracesys_nosys
|
||||
|
||||
LDREGX %r20(%r19), %r19
|
||||
|
||||
@ -359,6 +359,9 @@ tracesys_next:
|
||||
be 0(%sr7,%r19)
|
||||
ldo R%tracesys_exit(%r2),%r2
|
||||
|
||||
.Ltracesys_nosys:
|
||||
ldo -ENOSYS(%r0),%r28 /* set errno */
|
||||
|
||||
/* Do *not* call this function on the gateway page, because it
|
||||
makes a direct call to syscall_trace. */
|
||||
|
||||
|
@ -441,6 +441,7 @@
|
||||
ENTRY_SAME(membarrier)
|
||||
ENTRY_SAME(userfaultfd)
|
||||
ENTRY_SAME(mlock2) /* 345 */
|
||||
ENTRY_SAME(copy_file_range)
|
||||
|
||||
|
||||
.ifne (. - 90b) - (__NR_Linux_syscalls * (91b - 90b))
|
||||
|
@ -55,12 +55,12 @@ signed char pfnnid_map[PFNNID_MAP_MAX] __read_mostly;
|
||||
|
||||
static struct resource data_resource = {
|
||||
.name = "Kernel data",
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_MEM,
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM,
|
||||
};
|
||||
|
||||
static struct resource code_resource = {
|
||||
.name = "Kernel code",
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_MEM,
|
||||
.flags = IORESOURCE_BUSY | IORESOURCE_SYSTEM_RAM,
|
||||
};
|
||||
|
||||
static struct resource pdcdata_resource = {
|
||||
@ -201,7 +201,7 @@ static void __init setup_bootmem(void)
|
||||
res->name = "System RAM";
|
||||
res->start = pmem_ranges[i].start_pfn << PAGE_SHIFT;
|
||||
res->end = res->start + (pmem_ranges[i].pages << PAGE_SHIFT)-1;
|
||||
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
|
||||
res->flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY;
|
||||
request_resource(&iomem_resource, res);
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ struct kvmppc_vcore {
|
||||
struct list_head runnable_threads;
|
||||
struct list_head preempt_list;
|
||||
spinlock_t lock;
|
||||
wait_queue_head_t wq;
|
||||
struct swait_queue_head wq;
|
||||
spinlock_t stoltb_lock; /* protects stolen_tb and preempt_tb */
|
||||
u64 stolen_tb;
|
||||
u64 preempt_tb;
|
||||
@ -629,7 +629,7 @@ struct kvm_vcpu_arch {
|
||||
u8 prodded;
|
||||
u32 last_inst;
|
||||
|
||||
wait_queue_head_t *wqp;
|
||||
struct swait_queue_head *wqp;
|
||||
struct kvmppc_vcore *vcore;
|
||||
int ret;
|
||||
int trap;
|
||||
|
@ -109,8 +109,9 @@ void arch_unregister_hw_breakpoint(struct perf_event *bp)
|
||||
* If the breakpoint is unregistered between a hw_breakpoint_handler()
|
||||
* and the single_step_dabr_instruction(), then cleanup the breakpoint
|
||||
* restoration variables to prevent dangling pointers.
|
||||
* FIXME, this should not be using bp->ctx at all! Sayeth peterz.
|
||||
*/
|
||||
if (bp->ctx && bp->ctx->task)
|
||||
if (bp->ctx && bp->ctx->task && bp->ctx->task != ((void *)-1L))
|
||||
bp->ctx->task->thread.last_hit_ubp = NULL;
|
||||
}
|
||||
|
||||
|
@ -114,8 +114,6 @@ extern unsigned int memset_nocache_branch; /* Insn to be replaced by NOP */
|
||||
|
||||
notrace void __init machine_init(u64 dt_ptr)
|
||||
{
|
||||
lockdep_init();
|
||||
|
||||
/* Enable early debugging if any specified (see udbg.h) */
|
||||
udbg_early_init();
|
||||
|
||||
|
@ -255,9 +255,6 @@ void __init early_setup(unsigned long dt_ptr)
|
||||
setup_paca(&boot_paca);
|
||||
fixup_boot_paca();
|
||||
|
||||
/* Initialize lockdep early or else spinlocks will blow */
|
||||
lockdep_init();
|
||||
|
||||
/* -------- printk is now safe to use ------- */
|
||||
|
||||
/* Enable early debugging if any specified (see udbg.h) */
|
||||
|
@ -727,7 +727,7 @@ void start_secondary(void *unused)
|
||||
|
||||
local_irq_enable();
|
||||
|
||||
cpu_startup_entry(CPUHP_ONLINE);
|
||||
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
|
||||
|
||||
BUG();
|
||||
}
|
||||
|
@ -114,11 +114,11 @@ static bool kvmppc_ipi_thread(int cpu)
|
||||
static void kvmppc_fast_vcpu_kick_hv(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
int cpu;
|
||||
wait_queue_head_t *wqp;
|
||||
struct swait_queue_head *wqp;
|
||||
|
||||
wqp = kvm_arch_vcpu_wq(vcpu);
|
||||
if (waitqueue_active(wqp)) {
|
||||
wake_up_interruptible(wqp);
|
||||
if (swait_active(wqp)) {
|
||||
swake_up(wqp);
|
||||
++vcpu->stat.halt_wakeup;
|
||||
}
|
||||
|
||||
@ -701,8 +701,8 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)
|
||||
tvcpu->arch.prodded = 1;
|
||||
smp_mb();
|
||||
if (vcpu->arch.ceded) {
|
||||
if (waitqueue_active(&vcpu->wq)) {
|
||||
wake_up_interruptible(&vcpu->wq);
|
||||
if (swait_active(&vcpu->wq)) {
|
||||
swake_up(&vcpu->wq);
|
||||
vcpu->stat.halt_wakeup++;
|
||||
}
|
||||
}
|
||||
@ -1459,7 +1459,7 @@ static struct kvmppc_vcore *kvmppc_vcore_create(struct kvm *kvm, int core)
|
||||
INIT_LIST_HEAD(&vcore->runnable_threads);
|
||||
spin_lock_init(&vcore->lock);
|
||||
spin_lock_init(&vcore->stoltb_lock);
|
||||
init_waitqueue_head(&vcore->wq);
|
||||
init_swait_queue_head(&vcore->wq);
|
||||
vcore->preempt_tb = TB_NIL;
|
||||
vcore->lpcr = kvm->arch.lpcr;
|
||||
vcore->first_vcpuid = core * threads_per_subcore;
|
||||
@ -2531,10 +2531,9 @@ static void kvmppc_vcore_blocked(struct kvmppc_vcore *vc)
|
||||
{
|
||||
struct kvm_vcpu *vcpu;
|
||||
int do_sleep = 1;
|
||||
DECLARE_SWAITQUEUE(wait);
|
||||
|
||||
DEFINE_WAIT(wait);
|
||||
|
||||
prepare_to_wait(&vc->wq, &wait, TASK_INTERRUPTIBLE);
|
||||
prepare_to_swait(&vc->wq, &wait, TASK_INTERRUPTIBLE);
|
||||
|
||||
/*
|
||||
* Check one last time for pending exceptions and ceded state after
|
||||
@ -2548,7 +2547,7 @@ static void kvmppc_vcore_blocked(struct kvmppc_vcore *vc)
|
||||
}
|
||||
|
||||
if (!do_sleep) {
|
||||
finish_wait(&vc->wq, &wait);
|
||||
finish_swait(&vc->wq, &wait);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2556,7 +2555,7 @@ static void kvmppc_vcore_blocked(struct kvmppc_vcore *vc)
|
||||
trace_kvmppc_vcore_blocked(vc, 0);
|
||||
spin_unlock(&vc->lock);
|
||||
schedule();
|
||||
finish_wait(&vc->wq, &wait);
|
||||
finish_swait(&vc->wq, &wait);
|
||||
spin_lock(&vc->lock);
|
||||
vc->vcore_state = VCORE_INACTIVE;
|
||||
trace_kvmppc_vcore_blocked(vc, 1);
|
||||
@ -2612,7 +2611,7 @@ static int kvmppc_run_vcpu(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
|
||||
kvmppc_start_thread(vcpu, vc);
|
||||
trace_kvm_guest_enter(vcpu);
|
||||
} else if (vc->vcore_state == VCORE_SLEEPING) {
|
||||
wake_up(&vc->wq);
|
||||
swake_up(&vc->wq);
|
||||
}
|
||||
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user